deb-designate/contrib/devstack/install.sh
John Schwarz 8ed2b96318 devstack/install.sh shouldn't rely on exact paths
Currently the contrib/devstack/install.sh script relies on the fact that
designate and devstack are installed side by side. This isn't always
true and can restrict the developer if he keeps his code someplace else
on the filesystem. This patch proposes a change to install.sh which
stores the pwd (where the script assumes devstack is installed,
according to the installation documentation [1]) and uses that directory
instead.

[1]: https://designate.readthedocs.org/en/latest/devstack.html

Change-Id: I97f7762dde56df6e3b9a45198d9201ec0296d94f
Closes-Bug: 1428679
2015-03-05 17:13:40 +02:00

16 lines
341 B
Bash
Executable File

#!/bin/bash
SOURCE_DIR=$(readlink -e $(dirname $(readlink -f $0)))
DEVSTACK_DIR=$(pwd -P)
pushd $SOURCE_DIR >> /dev/null
for path in lib/* extras.d/* exercises/*; do
if [ ! -e "$DEVSTACK_DIR/$path" ]; then
echo "Installing symlink for $path"
ln -fs $SOURCE_DIR/$path $DEVSTACK_DIR/$path
fi
done
popd >> /dev/null