Browse Source

Merge pull request #5 from sbadia/bashisms

Remove dependance on bash (and clean bashisms)
Émile Morel 10 years ago
parent
commit
90abc7e130

+ 1 - 3
olinux/config_board.sh

@@ -1,7 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 
 case $BOARD in
-
   a20lime2)
     U_BOOT_CONFIG="A20-OLinuXino-Lime2_defconfig"
     DTB="sun7i-a20-olinuxino-lime2.dtb"
@@ -18,5 +17,4 @@ case $BOARD in
     U_BOOT_CONFIG="A20-OLinuXino-Lime_defconfig"
     DTB="sun7i-a20-olinuxino-lime.dtb"
     ;;
-
 esac

+ 2 - 2
olinux/create_arm_debootstrap.sh

@@ -1,4 +1,4 @@
-#/bin/bash
+#!/bin/sh
 
 ######################
 #    Debootstrap     #
@@ -68,7 +68,7 @@ while getopts ":a:b:d:n:t:i:ycp" opt; do
   esac
 done
 
-source ${REP}/config_board.sh
+. ${REP}/config_board.sh
 
 rm -rf $TARGET_DIR && mkdir -p $TARGET_DIR
 

+ 5 - 5
olinux/create_device.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 set -x
@@ -53,11 +53,11 @@ if [ -z $DEVICE ] ; then
   show_usage
 fi
 
-if [ "$DEVICE" == "img" ] && [ -z $IMGSIZE ] ; then
+if [ "$DEVICE" = "img" ] && [ -z $IMGSIZE ] ; then
   show_usage
 fi
 
-if [ "${DEVICE}" == "img" ] ; then
+if [ "${DEVICE}" = "img" ] ; then
   echo "- Create image."
   rm -f ${TARGET}
   # create image file
@@ -85,7 +85,7 @@ parted --script $DEVICE mklabel msdos
 parted --script $DEVICE mkpart primary ext4 2048s ${IMGSIZE}
 parted --script $DEVICE align-check optimal 1
 
-if [ "${TYPE}" == "loop" ] ; then
+if [ "${TYPE}" = "loop" ] ; then
   DEVICEP1=${DEVICE}p1
 else
   DEVICEP1=${DEVICE}1
@@ -116,7 +116,7 @@ dd if=${UBOOT_FILE} of=${DEVICE} bs=1024 seek=8 >/dev/null 2>&1
 sync
 
 echo "- Umount"
-if [ "${TYPE}" == "loop" ] ; then
+if [ "${TYPE}" = "loop" ] ; then
   umount $MNT
   losetup -d $DEVICE
 else

+ 2 - 2
olinux/create_sunxi_boot_files.sh

@@ -1,4 +1,4 @@
-#/bin/sh
+#!/bin/sh
 
 ######################
 # Sunxi  compilation #
@@ -59,7 +59,7 @@ while getopts ":ob:t:l:c" opt; do
   esac
 done
 
-source ${REP}/config_board.sh
+. ${REP}/config_board.sh
 
 clone_or_pull (){
   project=$1