summaryrefslogtreecommitdiffstats
path: root/prog/jelka/chroot.sh
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-12-01 00:08:51 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-12-01 00:08:51 +0100
commit2c87f8bd0e28ffcda4e297b5edc643c30cd84e59 (patch)
tree23151e8d11d03fec01b47c9358f2066ec1c40053 /prog/jelka/chroot.sh
parentlib64 (diff)
downloadr-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar.gz
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar.bz2
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar.lz
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar.xz
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.tar.zst
r-2c87f8bd0e28ffcda4e297b5edc643c30cd84e59.zip
Diffstat (limited to 'prog/jelka/chroot.sh')
-rwxr-xr-xprog/jelka/chroot.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/jelka/chroot.sh b/prog/jelka/chroot.sh
index cf6a1da..b55645e 100755
--- a/prog/jelka/chroot.sh
+++ b/prog/jelka/chroot.sh
@@ -1,9 +1,9 @@
#!/bin/bash
set -xeuo pipefail
-mkdir -p $2
-mount -t tmpfs -o nr_blocks=1,mode=0755 tmp $2
if [ x$1 = xstart ]
then
+ mkdir -p $2
+ mount -t tmpfs -o nr_blocks=1,mode=0755 tmp $2
for i in /bin /dev/null /etc /lib /usr
do
[ -d $i ] && mkdir -p $2/$i || { mkdir -p $2/`rev <<<$i | cut -d/ -f2- | rev` && touch $2/$i; }