2024-06-20 16:41:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ $(whoami) != root ]]
|
|
|
|
then
|
2024-08-19 16:56:18 +00:00
|
|
|
echo -e "\e[38;5;1mrun as root please\e[0m"
|
2024-06-20 16:41:25 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
NAME=minrootfs
|
|
|
|
SCRIPT_DIR=$(dirname -- "$(readlink -f "${BASH_SOURCE}")")
|
|
|
|
|
|
|
|
rm -rf $SCRIPT_DIR/$NAME
|
2024-08-21 12:25:19 +00:00
|
|
|
$SCRIPT_DIR/alpine-make-rootfs/alpine-make-rootfs --packages 'python3 gcc libc-dev' $SCRIPT_DIR/$NAME
|
2024-06-20 16:41:25 +00:00
|
|
|
#chown -R nobody:nogroup $SCRIPT_DIR/$NAME
|
|
|
|
#rm -r ../$NAME
|
|
|
|
#mv $NAME ../$NAME
|
|
|
|
|