makeusb: git must be run as user l_samenv
This commit is contained in:
7
makeusb
7
makeusb
@ -3,6 +3,11 @@
|
|||||||
# name of the USB stick to be created
|
# name of the USB stick to be created
|
||||||
NAME=BOOT_TINY
|
NAME=BOOT_TINY
|
||||||
|
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
then echo "Please run as root"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# list removeable disks
|
# list removeable disks
|
||||||
DISKS=()
|
DISKS=()
|
||||||
while read LINE
|
while read LINE
|
||||||
@ -28,7 +33,7 @@ if [[ " ${DISKS[@]} " =~ " $DEVICE " ]]; then
|
|||||||
echo "create TinyLinux"
|
echo "create TinyLinux"
|
||||||
|
|
||||||
if [ ! -d boot_tiny ] ; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ $(cat /sys/block/$DEVICE/removable) != "1" ]]; then
|
if [[ $(cat /sys/block/$DEVICE/removable) != "1" ]]; then
|
||||||
|
Reference in New Issue
Block a user