Fix Bash Brace Expansion

It bug appeared in Debian and Trisquel
This commit is contained in:
Jesús 2019-02-25 12:52:25 -05:00
parent 1b96328b2c
commit 204400b329
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 19 additions and 2 deletions

View File

@ -82,8 +82,7 @@ else
endif endif
vendor: vendor:
rm -rf output/{de,en,eo,fr}/vendor/ @bash $(BASEDIR)/scripts/vendor.sh
xargs -n 1 cp -pPR content/vendor/<<<"output/de output/en output/eo output/fr"
stopserver: stopserver:
$(BASEDIR)/develop_server.sh stop $(BASEDIR)/develop_server.sh stop

18
scripts/vendor.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
run_vendor()
{
local LOCALDIR="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
local BASE="${LOCALDIR%scripts}" # input
rm -rf "$BASE"/output/{de,en,eo,fr}/vendor/
echo "$BASE"output/{de,en,eo,fr} | xargs -n 1 cp -rf "$BASE"/output/vendor
}
# ==============================================================================
# EXECUTION - START
# ==============================================================================
run_vendor "$@"