Last active
April 3, 2020 14:44
-
-
Save a-yasui/d598e524680798d6712e693b239052b1 to your computer and use it in GitHub Desktop.
Work directory moving
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
#!/usr/bin/env bash | |
# スクリプトの設置ディレクトリに移動して、そのディレクトリパスを取得する | |
# :-$0 とする事で他のshellでも動くようになる | |
PWD="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://qiita.com/tkygtr6/items/fee79f710c55e3649ec0