24 lines
593 B
Bash
Executable File
24 lines
593 B
Bash
Executable File
#!/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" "$@"
|