Skip to content

Instantly share code, notes, and snippets.

@AhiyaHiya
Created December 10, 2019 20:53
Show Gist options
  • Save AhiyaHiya/e17993b8bde8d101fe2ff5059fe5fce3 to your computer and use it in GitHub Desktop.
Save AhiyaHiya/e17993b8bde8d101fe2ff5059fe5fce3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Brief:
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
on_script_exit(){
printf "*********************************\\n%s\\n" "${FUNCNAME[0]}"
cd "$CURRENT_DIR"
}
main(){
printf "*********************************\\n%s\\n" "${FUNCNAME[0]}"
}
readonly CURRENT_DIR=$PWD
trap on_script_exit 0
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment