Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
fix ubuntu deboostrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Nugmanov and Dmitriy Kalinin committed Mar 21, 2013
1 parent 3703f80 commit e9fa29c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions warden/root/linux/rootfs/ubuntu.sh
Expand Up @@ -17,18 +17,6 @@ then
fi

function debootstrap() {
if [ -d $target ]
then
read -p "Target directory already exists. Erase it? "
if [[ $REPLY =~ ^[Yy].*$ ]]
then
rm -rf $target
else
echo "Aborting..."
exit 1
fi
fi

# -v is too new, revert to old trick
# ${VAR+X} will be
# X when VAR is unset
Expand Down Expand Up @@ -68,6 +56,19 @@ then
fi

target=$1

if [ -d $target ]
then
read -p "Target directory already exists. Erase it? "
if [[ $REPLY =~ ^[Yy].*$ ]]
then
rm -rf $target
else
echo "Aborting..."
exit 1
fi
fi

mkdir -p $target

debootstrap
Expand Down

0 comments on commit e9fa29c

Please sign in to comment.