parent
4b2df37eb8
commit
e86673825b
1 changed files with 7 additions and 0 deletions
7
haini.sh
7
haini.sh
|
@ -4,6 +4,12 @@ set -e
|
|||
|
||||
DIR="$(dirname "$(realpath "$0")")"
|
||||
|
||||
# Sólo se puede correr desde el directorio de Sutty
|
||||
if test "$(dirname "$DIR")" != "$(dirname "$PWD")"; then
|
||||
echo "¡No estás corriendo dentro de una carpeta dentro de Sutty!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Por ahora sólo soportamos x86_64
|
||||
uname -m | grep -q x86_64 || exit 1
|
||||
|
||||
|
@ -45,6 +51,7 @@ correr() {
|
|||
--dev-bind /sys /sys \
|
||||
--dev-bind /proc /proc \
|
||||
--dev-bind /tmp /tmp \
|
||||
--chdir "/Sutty/${PWD##*/}" \
|
||||
/bin/sh -l -c "$1"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue