Merge pull request #12 from deltachat/tolerant-package-name

be more tolerant on PACKAGE_NAME argument
This commit is contained in:
bjoern 2022-01-09 21:48:32 +01:00 committed by GitHub
commit 747c94fc49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,10 +6,10 @@ case "$1" in
exit
;;
"")
PACKAGE_NAME=${PWD##*/}
PACKAGE_NAME=${PWD##*/} # '##*/' removes everything before the last slash and the last slash
;;
*)
PACKAGE_NAME=$1
PACKAGE_NAME=${1%.xdc} # '%.xdc' removes the extension and allows PACKAGE_NAME to be given with or without extension
;;
esac