Merge branch 'master' of github.com:cloudbuilders/devstack
This commit is contained in:
commit
f1a98143dc
2 changed files with 14 additions and 10 deletions
5
stack.sh
5
stack.sh
|
@ -270,8 +270,11 @@ failed() {
|
||||||
# an error. It is also useful for following along as the install occurs.
|
# an error. It is also useful for following along as the install occurs.
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
|
# create the destination directory and ensure it is writable by the user
|
||||||
sudo mkdir -p $DEST
|
sudo mkdir -p $DEST
|
||||||
|
if [ ! -w $DEST ]; then
|
||||||
sudo chown `whoami` $DEST
|
sudo chown `whoami` $DEST
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Packages
|
# Install Packages
|
||||||
# ================
|
# ================
|
||||||
|
@ -300,8 +303,6 @@ function git_clone {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d $2 ]; then
|
if [ ! -d $2 ]; then
|
||||||
sudo mkdir $2
|
|
||||||
sudo chown `whoami` $2
|
|
||||||
git clone $1 $2
|
git clone $1 $2
|
||||||
cd $2
|
cd $2
|
||||||
# This checkout syntax works for both branches and tags
|
# This checkout syntax works for both branches and tags
|
||||||
|
|
|
@ -21,11 +21,14 @@ if [ -b $DEST_DIR ]; then
|
||||||
# We have a block device, install syslinux and mount it
|
# We have a block device, install syslinux and mount it
|
||||||
DEST_DEV=$DEST_DIR
|
DEST_DEV=$DEST_DIR
|
||||||
DEST_DIR=`mktemp -d mntXXXXXX`
|
DEST_DIR=`mktemp -d mntXXXXXX`
|
||||||
|
mount $DEST_DEV $DEST_DIR
|
||||||
|
|
||||||
|
if [ ! -d $DEST_DIR/syslinux ]; then
|
||||||
|
mkdir -p $DEST_DIR/syslinux
|
||||||
|
fi
|
||||||
|
|
||||||
# Install syslinux on the device
|
# Install syslinux on the device
|
||||||
syslinux --install --directory syslinux $DEST_DEV
|
syslinux --install --directory syslinux $DEST_DEV
|
||||||
|
|
||||||
mount $DEST_DEV $DEST_DIR
|
|
||||||
else
|
else
|
||||||
# We have a directory (for sanity checking output)
|
# We have a directory (for sanity checking output)
|
||||||
DEST_DEV=""
|
DEST_DEV=""
|
||||||
|
|
Loading…
Reference in a new issue