fix: use $DIR instead of ./
This commit is contained in:
parent
2fd5c0f094
commit
c45f1362ed
@ -5,8 +5,8 @@
|
|||||||
TARGET=/mnt
|
TARGET=/mnt
|
||||||
DEVICE=$(findmnt -n -o SOURCE $TARGET | sed 's/\[.*//')
|
DEVICE=$(findmnt -n -o SOURCE $TARGET | sed 's/\[.*//')
|
||||||
UUID=$(blkid -s UUID -o value ${DEVICE})
|
UUID=$(blkid -s UUID -o value ${DEVICE})
|
||||||
echo $UUID
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
echo $DEVICE
|
echo $DIR
|
||||||
|
|
||||||
debootstrap stable $TARGET http://deb.debian.org/debian/
|
debootstrap stable $TARGET http://deb.debian.org/debian/
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ mount --bind /sys/firmware/efi/efivars $TARGET/sys/firmware/efi/efivars
|
|||||||
echo "deb http://deb.debian.org/debian stable main non-free-firmware" >$TARGET/etc/apt/sources.list
|
echo "deb http://deb.debian.org/debian stable main non-free-firmware" >$TARGET/etc/apt/sources.list
|
||||||
echo "export PATH=$PATH:/sbin/" >>$TARGET/root/.bashrc
|
echo "export PATH=$PATH:/sbin/" >>$TARGET/root/.bashrc
|
||||||
|
|
||||||
cp ./chroot-commands.sh $TARGET/root/
|
cp $DIR/chroot-commands.sh $TARGET/root/
|
||||||
chmod +x $TARGET/root/chroot-commands.sh
|
chmod +x $TARGET/root/chroot-commands.sh
|
||||||
chroot $TARGET /bin/bash -l -c '/root/chroot-commands.sh'
|
chroot $TARGET /bin/bash -l -c '/root/chroot-commands.sh'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user