Efficient scripting to get the directory path (#686)

Co-authored-by: Salman Abedin <salmanabedin@zohomail.com>
This commit is contained in:
Salman Abedin 2020-06-05 08:27:01 +06:00 committed by GitHub
parent 32e0623424
commit 7572627e85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@
# string "xelatex" somewhere in a comment/command in the first 5 lines.
file=$(readlink -f "$1")
dir=$(dirname "$file")
dir=${file%/*}
base="${file%.*}"
cd "$dir" || exit