Change install.sh to work on fresh install
Also, change shell to allow use of bash on Debian. Change-Id: I53b038432389c824556d90ea686c28d132708904 Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
This commit is contained in:
parent
fa7d89e5ed
commit
f87fb58e01
32
install.sh
32
install.sh
|
@ -1,22 +1,30 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
mkdir -p /var/log/heat
|
if [[ $EUID -ne 0 ]]; then
|
||||||
mkdir -p /etc/heat
|
echo "This script must be run as root"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
pushd etc
|
CONF_DIR=/etc/heat
|
||||||
|
LOG_DIR=/var/log/heat
|
||||||
|
|
||||||
|
mkdir -p $LOG_DIR
|
||||||
|
mkdir -p $CONF_DIR
|
||||||
|
|
||||||
|
pushd etc > /dev/null
|
||||||
for f in *
|
for f in *
|
||||||
do
|
do
|
||||||
if [ -d $f ] ; then
|
if [ -d $f ]; then
|
||||||
#ignore
|
# ignore directories
|
||||||
s=0
|
continue
|
||||||
elif [ -f $f ] ; then
|
elif [ -f $CONF_DIR/$f ]; then
|
||||||
echo not coping over /etc/heat/$f
|
echo "not copying over $CONF_DIR/$f"
|
||||||
diff -u /etc/heat/$f $f
|
diff -u $CONF_DIR/$f $f
|
||||||
else
|
else
|
||||||
cp $f /etc/heat/
|
cp $f $CONF_DIR
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd
|
popd > /dev/null
|
||||||
|
|
||||||
./setup.py install --root=/ >/dev/null
|
./setup.py install --root=/ >/dev/null
|
||||||
rm -rf build heat.egg-info
|
rm -rf build heat.egg-info
|
||||||
|
|
Loading…
Reference in New Issue