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

be more tolerant on PACKAGE_NAME argument
master
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
1 changed files with 2 additions and 2 deletions

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