Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFilippo Giunchedi <filippog@users.noreply.github.com>2020-09-25 13:32:42 +0300
committerGitHub <noreply@github.com>2020-09-25 13:32:42 +0300
commitdf88349713b469a081ca33d29ecad0291283e99f (patch)
tree80ec127d9067ab22a388bb78213e8ee9aa9fb8d1 /bin
parent67825e6320a8fbe860750679d07ce11e354d6675 (diff)
bin: set error on exit for shell scripts (#7580)
I am building Roundcube via CI jobs, and also ran in #7567 (thank you for the quick fix!). The CI job I'm using runs css/js shrink and the build job itself succeeded, although Roundcube wasn't working. With this commit all shell scripts will propagate the exit code in case of errors, e.g. failed downloads.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cssshrink.sh6
-rwxr-xr-xbin/jsshrink.sh6
-rwxr-xr-xbin/makedoc.sh2
-rwxr-xr-xbin/transifexpull.sh2
4 files changed, 12 insertions, 4 deletions
diff --git a/bin/cssshrink.sh b/bin/cssshrink.sh
index 86e744f02..c5c2caa2f 100755
--- a/bin/cssshrink.sh
+++ b/bin/cssshrink.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+
+set -e
+
PWD=`dirname "$0"`
JAR_DIR='/tmp'
VERSION='2.4.8'
@@ -47,8 +50,7 @@ DIRS="$PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/skins/*"
# default: compress application scripts
for dir in $DIRS; do
for file in $dir/*.css; do
- echo "$file" | grep -e '.min.css$' >/dev/null
- if [ $? -eq 0 ]; then
+ if echo "$file" | grep -q -e '.min.css$'; then
continue
fi
if [ ! -f "$file" ]; then
diff --git a/bin/jsshrink.sh b/bin/jsshrink.sh
index a0c728992..81cce0d89 100755
--- a/bin/jsshrink.sh
+++ b/bin/jsshrink.sh
@@ -1,4 +1,7 @@
#!/bin/sh
+
+set -e
+
PWD=`dirname "$0"`
JS_DIR="$PWD/../program/js"
JAR_DIR='/tmp'
@@ -60,8 +63,7 @@ DIRS="$PWD/../program/js $PWD/../skins/* $PWD/../plugins/* $PWD/../plugins/*/ski
# default: compress application scripts
for dir in $DIRS; do
for file in $dir/*.js; do
- echo "$file" | grep -e '.min.js$' >/dev/null
- if [ $? -eq 0 ]; then
+ if echo "$file" | grep -q -e '.min.js$'; then
continue
fi
if [ ! -f "$file" ]; then
diff --git a/bin/makedoc.sh b/bin/makedoc.sh
index 896040aeb..68e591aa2 100755
--- a/bin/makedoc.sh
+++ b/bin/makedoc.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -e
+
TITLE="Roundcube Webmail"
PACKAGES="Webmail"
diff --git a/bin/transifexpull.sh b/bin/transifexpull.sh
index 4b9530345..6c51c1172 100755
--- a/bin/transifexpull.sh
+++ b/bin/transifexpull.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -e
+
# In 'translator' mode files will contain empty translated texts
# where translation is not available, we'll remove these later