Reorganize install.sh slightly

This commit is contained in:
2016-12-27 23:22:38 +00:00
parent b04f58d9c6
commit 965552b8e5

View File

@@ -30,6 +30,21 @@ SYMLINKS=(
)
LOAD_FILES=(profile zshrc)
#
# Initial Setup
#
if [ -n "${BASH_SOURCE[0]}" ] && [ -f "${BASH_SOURCE[0]}" ] ; then
ROOT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
elif [ -n "$0" ] && [ -f "$0" ]; then
ROOT_PATH=$(cd "$(dirname "$0")" && pwd)
else
echo "[ERROR] Can't determine dotfiles' root path."
exit 1
fi
#
# Main Functions
#
@@ -97,20 +112,6 @@ install_dokku() {
}
#
# Initial Setup
#
if [ -n "${BASH_SOURCE[0]}" ] && [ -f "${BASH_SOURCE[0]}" ] ; then
ROOT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
elif [ -n "$0" ] && [ -f "$0" ]; then
ROOT_PATH=$(cd "$(dirname "$0")" && pwd)
else
echo "[ERROR] Can't determine dotfiles' root path."
exit 1
fi
#
# Helper functions
#