diff options
author | Jesús <heckyel@hyperbola.info> | 2019-02-25 12:52:25 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-02-25 12:52:25 -0500 |
commit | 204400b3298218ee21bfbe0d9d6707be75030005 (patch) | |
tree | 3b730cd418d7909e10a4c38b4f7ed72ced2f3d39 | |
parent | 1b96328b2c13ecf8194946208b6ff12fab36f6dd (diff) | |
download | cl-204400b3298218ee21bfbe0d9d6707be75030005.tar.lz cl-204400b3298218ee21bfbe0d9d6707be75030005.tar.xz cl-204400b3298218ee21bfbe0d9d6707be75030005.zip |
Fix Bash Brace Expansion
It bug appeared in Debian and Trisquel
-rw-r--r-- | Makefile.example | 3 | ||||
-rw-r--r-- | scripts/vendor.sh | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Makefile.example b/Makefile.example index 3aeec53..43b1fda 100644 --- a/Makefile.example +++ b/Makefile.example @@ -82,8 +82,7 @@ else endif vendor: - rm -rf output/{de,en,eo,fr}/vendor/ - xargs -n 1 cp -pPR content/vendor/<<<"output/de output/en output/eo output/fr" + @bash $(BASEDIR)/scripts/vendor.sh stopserver: $(BASEDIR)/develop_server.sh stop diff --git a/scripts/vendor.sh b/scripts/vendor.sh new file mode 100644 index 0000000..1344814 --- /dev/null +++ b/scripts/vendor.sh @@ -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 "$@" |