summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-04 19:49:34 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-04 19:49:34 +0200
commit8a2754e0fbdea7497281327f2896be2a1253a107 (patch)
treebc7c400745fde54e6fb7a010fcb026258564d3bc /scripts
parent9bd4456c5a83c3474fdf9fe5cf14004a0874e2c8 (diff)
parent2d3aaf1664850031f5497e121dc82ab65f63641a (diff)
Merge branch 'master' of ssh://openadk.org/git/openadk
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-image.sh5
-rwxr-xr-xscripts/install.sh53
-rwxr-xr-xscripts/make2
-rw-r--r--scripts/md5sum2
-rw-r--r--scripts/rstrip.sh2
-rw-r--r--scripts/scan-pkgs.sh6
-rw-r--r--scripts/scan-tools.sh2
-rwxr-xr-xscripts/sed2
-rw-r--r--scripts/split-cfg.sh3
-rw-r--r--scripts/strip-script.sh3
-rwxr-xr-xscripts/tar2
-rw-r--r--scripts/update-patches7
12 files changed, 31 insertions, 58 deletions
diff --git a/scripts/create-image.sh b/scripts/create-image.sh
index 13f7cacd5..fda269990 100755
--- a/scripts/create-image.sh
+++ b/scripts/create-image.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-# $Id$
grubinstall=1
@@ -77,11 +76,11 @@ fi
printf "Generate qemu image\n"
-$qimg create -f raw $1 200M
+$qimg create -f raw $1 300M
printf "Create partition and filesystem\n"
$parted -s $1 mklabel msdos
-$parted -s $1 mkpart primary ext2 0 200
+$parted -s $1 mkpart primary ext2 0 300
$parted -s $1 set 1 boot on
$parted -s $1 mkfs 1 ext2
diff --git a/scripts/install.sh b/scripts/install.sh
index 8f374e6b2..9baf4f428 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,29 +1,13 @@
#!/bin/sh
-# $Id$
if [ $(id -u) -ne 0 ];then
printf "Installation is only possible as root\n"
exit 1
fi
-cfgfs=1
-while getopts "n" option
-do
- case $option in
- n)
- cfgfs=0
- ;;
- *)
- printf "Option not recognized\n"
- exit 1
- ;;
- esac
-done
-shift $(($OPTIND - 1))
-
printf "Checking if grub is installed"
grub=$(which grub)
-if [ -x $grub ];then
+if [ ! -z $grub -a -x $grub ];then
printf "...okay\n"
else
printf "...failed\n"
@@ -33,7 +17,7 @@ fi
printf "Checking if sfdisk is installed"
sfdisk=$(which sfdisk)
-if [ -x $sfdisk ];then
+if [ ! -z $sfdisk -a -x $sfdisk ];then
printf "...okay\n"
else
printf "...failed\n"
@@ -43,7 +27,7 @@ fi
printf "Checking if parted is installed"
parted=$(which parted)
-if [ -x $parted ];then
+if [ ! -z $parted -a -x $parted ];then
printf "...okay\n"
else
printf "...failed\n"
@@ -53,7 +37,7 @@ fi
printf "Checking if mke2fs is installed"
mke2fs=$(which mke2fs)
-if [ -x $mke2fs ];then
+if [ ! -z $mke2fs -a -x $mke2fs ];then
printf "...okay\n"
else
printf "...failed\n"
@@ -63,15 +47,31 @@ fi
printf "Checking if tune2fs is installed"
tune2fs=$(which tune2fs)
-if [ -x $tune2fs ];then
+if [ ! -z $tune2fs -a -x $tune2fs ];then
printf "...okay\n"
else
printf "...failed\n"
exit 1
fi
+cfgfs=1
+while getopts "n" option
+do
+ case $option in
+ n)
+ cfgfs=0
+ ;;
+ *)
+ printf "Option not recognized\n"
+ exit 1
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+
if [ -z $1 ];then
- printf "Please give your compact flash device node as first parameter\n"
+ printf "Please give your compact flash or USB device as first parameter\n"
exit 1
else
if [ -z $2 ];then
@@ -85,7 +85,7 @@ else
exit 1
fi
if [ -b $1 ];then
- printf "Using $1 as CF disk for installation\n"
+ printf "Using $1 as CF/USB disk for installation\n"
printf "This will destroy all data on $1, are you sure?\n"
printf "Type "y" to continue\n"
read y
@@ -119,6 +119,7 @@ if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then
read y
if [ $y = "y" ];then
printf "Wiping existing partitions\n"
+ dd if=/dev/zero of=$1 bs=512 count=1
else
printf "Exiting.\n"
exit 1
@@ -138,14 +139,16 @@ EOF
$mke2fs ${1}1
else
+$parted -s $1 mklabel msdos
+sleep 2
declare -i maxsize
maxsize=$(parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//')
let rootsize=$maxsize-1
-$parted -s $1 mklabel msdos
$parted -s $1 unit cyl mkpartfs primary ext2 0 $rootsize
-$parted -s $1 unit cyl mkpart primary ext2 $rootsize $maxsize
+$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize
$parted -s $1 set 1 boot on
+$sfdisk --change-id $1 2 88
fi
if [ $? -eq 0 ];then
diff --git a/scripts/make b/scripts/make
index c8807be94..e8e518653 100755
--- a/scripts/make
+++ b/scripts/make
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
-# $Id$
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/md5sum b/scripts/md5sum
index b76ca4ee3..6a95a4707 100644
--- a/scripts/md5sum
+++ b/scripts/md5sum
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
-# $Id: md5sum 185 2008-10-28 12:24:05Z wbx $
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh
index 272460be0..d897c0ef3 100644
--- a/scripts/rstrip.sh
+++ b/scripts/rstrip.sh
@@ -1,5 +1,3 @@
-# $Id: rstrip.sh 440 2009-05-13 16:09:54Z wbx $
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh
index c40f7c43d..9ac3c2d4a 100644
--- a/scripts/scan-pkgs.sh
+++ b/scripts/scan-pkgs.sh
@@ -1,8 +1,5 @@
-# $Id: scan-pkgs.sh 431 2009-05-09 01:01:40Z wbx $
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-#-
# Scan host-tool prerequisites of certain packages before building.
if test -z "$BASH_VERSION"; then
@@ -25,7 +22,6 @@ out=0
. $topdir/.config
-#-- start adding dependencies here --
if [[ -n $ADK_PACKAGE_ALSA_UTILS ]]; then
NEED_XMLTO="$NEED_XMLTO alsa-utils"
fi
@@ -48,7 +44,6 @@ if [[ -n $ADK_PACKAGE_GLIB2 ]]; then
NEED_PKGCONFIG="$NEED_PKGCONFIG glib2"
fi
-#-- start checking dependencies here --
if [[ -n $NEED_GETTEXT ]]; then
if ! which xgettext >/dev/null 2>&1; then
@@ -107,5 +102,4 @@ fi
# out=1
#fi
-#-- end of dependency checks
exit $out
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 11dc4c059..57df8b4c7 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -1,5 +1,3 @@
-# $Id: scan-tools.sh 436 2009-05-10 18:15:31Z wbx $
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/sed b/scripts/sed
index 2b8a81f17..36cfdbfa7 100755
--- a/scripts/sed
+++ b/scripts/sed
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
-# $Id$
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/split-cfg.sh b/scripts/split-cfg.sh
index 9b043424e..4331709a5 100644
--- a/scripts/split-cfg.sh
+++ b/scripts/split-cfg.sh
@@ -1,8 +1,5 @@
-# $Id: split-cfg.sh 280 2008-12-25 20:54:25Z wbx $
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-#-
# Note: this is slow, but it's not the "progress stuff" which cau-
# ses the slow-down.
diff --git a/scripts/strip-script.sh b/scripts/strip-script.sh
index 3f9a54605..355df0e73 100644
--- a/scripts/strip-script.sh
+++ b/scripts/strip-script.sh
@@ -1,5 +1,3 @@
-# $Id: strip-script.sh 30 2008-09-04 13:31:09Z wbx $
-#-
# Copyright (c) 2007
# Thorsten Glaser <tg@mirbsd.de>
#
@@ -26,7 +24,6 @@
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person's immediate fault when using the work as intended.
-#-
# Shell script to strip down a shell script (filter).
shopt -s extglob
diff --git a/scripts/tar b/scripts/tar
index 625b11588..60c5057da 100755
--- a/scripts/tar
+++ b/scripts/tar
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
-# $Id$
-#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
diff --git a/scripts/update-patches b/scripts/update-patches
index 4c695f0cc..2c3f57278 100644
--- a/scripts/update-patches
+++ b/scripts/update-patches
@@ -1,7 +1,4 @@
#!/usr/bin/env bash
-# $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
-# $MirOS: ports/infrastructure/scripts/update-patches,v 1.5 2006/06/15 19:18:43 tg Exp $
-#-
# Copyright (c) 2006
# Thorsten Glaser <tg@freewrt.org>
#
@@ -157,9 +154,7 @@ for file in $(cd ${WRKDIST}; find . -type f | sed 's#^\./##'); do
# Build a sensible name for the new patch file
patchname=patch-$(echo "$file" | sed -e 's#[/. ]#_#g')
echo "No patch-* found for $file, creating $patchname" >&2
- ( echo '$Id: update-patches 24 2008-08-31 14:56:13Z wbx $'; \
- cd $D_BASE && do_diff "$file" "$D_SUB.orig" "$D_SUB" \
- ) >$patchname
+ ( cd $D_BASE && do_diff "$file" "$D_SUB.orig" "$D_SUB" ) >$patchname
edit="$edit $patchname"
accounted="$accounted $patchname"
done