Created
October 16, 2022 03:52
-
-
Save okash1n/df8dbe398d4ed16352a9440b715eeb43 to your computer and use it in GitHub Desktop.
安全にスクリプト自身のディレクトリでスクリプトを実行するおまじない
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 | |
# スクリプト自身のディレクトリを確実に格納 | |
SCRIPT_DIR=$(cd $(dirname $0); pwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment