diff --git a/makeusb b/makeusb index 3ebdae2..f5299a8 100755 --- a/makeusb +++ b/makeusb @@ -3,6 +3,11 @@ # name of the USB stick to be created NAME=BOOT_TINY +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + # list removeable disks DISKS=() while read LINE @@ -28,7 +33,7 @@ if [[ " ${DISKS[@]} " =~ " $DEVICE " ]]; then echo "create TinyLinux" if [ ! -d boot_tiny ] ; then - git clone --depth 1 git@gitlab.psi.ch:samenv/boot_tiny.git + sudo --user l_samenv git clone --depth 1 git@gitlab.psi.ch:samenv/boot_tiny.git fi if [[ $(cat /sys/block/$DEVICE/removable) != "1" ]]; then