diff --git a/common.sh b/common.sh index 5d4d3d1cc9..7bee54c7c8 100644 --- a/common.sh +++ b/common.sh @@ -372,7 +372,7 @@ closing_image (){ display_alert "Possible after install." "customize-image.sh" "info" cp $SRC/userpatches/customize-image.sh $DEST/cache/sdcard/tmp/customize-image.sh chmod +x $DEST/cache/sdcard/tmp/customize-image.sh -chroot $DEST/cache/sdcard /bin/bash "/tmp/customize-image.sh $RELEASE $FAMILY $BOARD $BUILD_DESKTOP" +chroot $DEST/cache/sdcard /bin/bash -c "/tmp/customize-image.sh $RELEASE $FAMILY $BOARD $BUILD_DESKTOP" chroot $DEST/cache/sdcard /bin/bash -c "sync" sync sleep 3 diff --git a/scripts/customize-image.sh.template b/scripts/customize-image.sh.template index 545a7a11f7..bb4268c803 100644 --- a/scripts/customize-image.sh.template +++ b/scripts/customize-image.sh.template @@ -1,26 +1,26 @@ -#!/bin/bash - -# arguments: $RELEASE $FAMILY $BOARD $BUILD_DESKTOP -# -# This is the image customization script -# -# NOTE: It is copied to /tmp directory inside the image -# and executed there inside chroot environment -# so don't reference any files that are not already installed - -RELEASE=$1 -FAMILY=$2 -BOARD=$3 -BUILD_DESKTOP=$4 - - case $RELEASE in - wheezy) - # your code here - ;; - jessie) - # your code here - ;; - trusty) - # your code here - ;; - esac +#!/bin/bash + +# arguments: $RELEASE $FAMILY $BOARD $BUILD_DESKTOP +# +# This is the image customization script +# +# NOTE: It is copied to /tmp directory inside the image +# and executed there inside chroot environment +# so don't reference any files that are not already installed + +RELEASE=$1 +FAMILY=$2 +BOARD=$3 +BUILD_DESKTOP=$4 + + case $RELEASE in + wheezy) + # your code here + ;; + jessie) + # your code here + ;; + trusty) + # your code here + ;; + esac