makeusb: git must be run as user l_samenv

This commit is contained in:
2024-03-05 11:29:59 +01:00
parent 7b4c2cd6fd
commit c3a36879cb

View File

@ -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