Last active
September 10, 2017 20:32
-
-
Save ilg-ul/fb8dcded6ff69a7c9f7ddce4337e242b to your computer and use it in GitHub Desktop.
Sequence to set the current folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include this part after the bash-init.sh part | |
script_path="$0" | |
if [[ "${script_path}" != /* ]] | |
then | |
# Make relative path absolute. | |
script_path="$(pwd)/$0" | |
fi | |
script_folder="$(dirname ${script_path})" | |
# echo "$script_folder" | |
script_name="$(basename $0)" | |
# echo "${script_name}" | |
cd "$(dirname "${script_folder}")" | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment