Script to create a fresh Debian environment
This commit is contained in:
+23
@@ -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" "$@"
|
||||
Reference in New Issue
Block a user