Script to create a fresh Debian environment

This commit is contained in:
Jarvis Carroll
2025-05-23 13:42:14 +10:00
commit c29250e550
4 changed files with 97 additions and 0 deletions
Vendored Executable
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# Finds debootstrap in $PATH, or the current directory, or download some
# version of it if none is found.
IT_LOCAL=`pwd`/debootstrap/debootstrap
if test -e "$IT_LOCAL"
then
IT="$IT_LOCAL"
echo "Found $IT in current directory"
elif IT=`command -v debootstrap`
then
echo "Found $IT in PATH"
else
echo "debootstrap not found. Downloading to $IT_LOCAL."
curl http://deb.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.128+nmu2+deb12u2.tar.gz --output debootstrap.tar.gz
tar xf debootstrap.tar.gx
IT="$IT_LOCAL"
fi
# Run debootstrap.
"$IT" "$@"