aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydra/bootless8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/hydra/bootless b/share/hydra/bootless
index 86fd928..eedcf08 100755
--- a/share/hydra/bootless
+++ b/share/hydra/bootless
@@ -37,7 +37,7 @@ function hydra_bootless_make {
hydra_bootless_folder
# Set sudo config
- local sudo
+ local sudo device rsync
if [ "`whoami`" != 'root' ]; then
sudo="sudo"
fi
@@ -70,6 +70,10 @@ EOF
device=$1
fi
+ if [ "$2" == "--rsync" ]; then
+ rsync="true"
+ fi
+
usbdevice=`echo ${device} | sed -e s/[0-9]\$//g`
# Target device consistency check
@@ -135,7 +139,7 @@ EOF
fi
# Copy data
- if [ "$2" == "--rsync" ]; then
+ if [ "$rsync" == "true" ]; then
$sudo rsync -Cav ${BOOTLESS_DIR}/ ${tmpdir}/boot/
else
$sudo git clone --depth=1 ${BOOTLESS_DIR} ${tmpdir}/boot