diff options
-rwxr-xr-x | setup.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/setup.sh b/setup.sh index 5555020..4c3f75c 100755 --- a/setup.sh +++ b/setup.sh @@ -90,20 +90,21 @@ install_dscip() { echo "Installing dscip..." set -x mkdir -p "$PROJECT_LOCATION" + PROJECT_LOCATION="$($REALPATH "$PROJECT_LOCATION")" cd "$PROJECT_LOCATION" || return 1 if [ -d "/usr/share/charadon/dscip" ]; # See if dscip is packaged/installed on system. then DSCIP_PATH="/usr/share/charadon/dscip" - ln -s "$DSCIP_PATH"/dscip "$PROJECT_LOCATION" || \ - cp "$DSCIP_PATH"/dscip "$PROJECT_LOCATION" - install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION" + ln -s "$DSCIP_PATH"/dscip "$PROJECT_LOCATION"/dscip || \ + cp "$DSCIP_PATH"/dscip "$PROJECT_LOCATION"/dscip + install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION"/config.sh install_templates || cp "$DSCIP_PATH"/*.sh . elif [ -d /usr/local/share/charadon/dscip ]; then DSCIP_PATH="/usr/local/share/charadon/dscip" - ln -s "$DSCIP_PATH"/dscip "$PROJECT_LOCATION" || \ - cp "$DSCIP_PATH"/dscip "$PROJECT_LOCATION" - install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION" + ln -s "$DSCIP_PATH"/dscip "$PROJECT_LOCATION"/dscip || \ + cp "$DSCIP_PATH"/dscip "$PROJECT_LOCATION"/dscip + install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION"/config.sh install_templates || cp "$DSCIP_PATH"/*.sh . else # If not, clone it from upstream. if [ -z "$DSCIP_VERSION" ]; @@ -122,7 +123,7 @@ install_dscip() { set +x printf "\n" printf "\e[32mAll done. Be sure to add:\e[0m\n" - echo "* * * * * $($REALPATH ./dscip)" + echo "* * * * * $($REALPATH .)/dscip" printf "\e[32mTo your crontab! Usually by using \`crontab -e\`\e[0m\n\n" printf "\e[32mAlternatively, you can run dscip as a daemon by modifying DSCIP_DAEMON in config.sh\n" printf "and creating a daemon for your system's init system.\e[0m\n\n" |