Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script file resides?
Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script file resides?
弿°ã§è¤æ°ã®ãã³ã°ãªãã·ã§ã³ãæå®ãããæã®getoptã®æå®ã®ä»æ¹ãããããããªãã£ãã®ã§ã 調ã¹ããå®é¨ããããã¦ã¿ãçµæâã§åºæ¥ãããã«ãªãã¾ããã å®è¡ã³ãã³ã batch/sample.sh --target=maker --env=stage ã³ã¼ã OPT=`getopt -o "" -l target: -l env: -- "$@"` if [ "$?" -ne 0 ]; then error "Usage: $0 [--target VALUE] [--env VALUE]" fi eval set -- "$OPT" until [ "$1" == "--" ]; do echo $1 case $1 in --target) target=$2 ;; --env) env=$2 ;; esac shift done echolog log "target is :
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã¡ã³ããã³ã¹
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}