mirror of https://github.com/zulip/zulip.git
build-release-tarball: Fix shellcheck warnings.
In tools/build-release-tarball line 50: for i in `cat "$TMPDIR/$prefix/tools/release-tarball-exclude.txt"`; do ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. ^-- SC2006: Use $(..) instead of legacy `..`. In tools/build-release-tarball line 51: rm -r --interactive=never "$TMPDIR/$prefix/$i"; ^-- SC2115: Use "${var:?}" to ensure this never expands to / . In tools/build-release-tarball line 97: echo; echo -ne "\033[33mRunning update-prod-static failed. " ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0". In tools/build-release-tarball line 98: echo -e "Check $TMPDIR/update-prod-static.log for more information.\033[0m" ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0". Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
a5280d7d02
commit
b5bfe77844
|
@ -47,9 +47,9 @@ git archive -o "$TARBALL" "--prefix=$prefix/" HEAD
|
|||
|
||||
cd "$TMPDIR"
|
||||
tar -xf "$TARBALL"
|
||||
for i in `cat "$TMPDIR/$prefix/tools/release-tarball-exclude.txt"`; do
|
||||
rm -r --interactive=never "$TMPDIR/$prefix/$i";
|
||||
done
|
||||
while read -r i; do
|
||||
rm -r --interactive=never "${TMPDIR:?}/$prefix/$i";
|
||||
done < "$TMPDIR/$prefix/tools/release-tarball-exclude.txt"
|
||||
tar -cf "$TARBALL" "$prefix"
|
||||
rm -rf "$prefix"
|
||||
|
||||
|
@ -94,8 +94,8 @@ ln -nfs "$BUILD_PROD_STATIC_LOGPATH" "$USER_PROD_STATIC_LOGPATH"
|
|||
|
||||
./tools/update-prod-static $authors_not_required || (
|
||||
set +x
|
||||
echo; echo -ne "\033[33mRunning update-prod-static failed. "
|
||||
echo -e "Check $TMPDIR/update-prod-static.log for more information.\033[0m"
|
||||
echo; echo -ne '\033[33mRunning update-prod-static failed. '
|
||||
echo -e "Check $TMPDIR/update-prod-static.log for more information.\\033[0m"
|
||||
exit 1
|
||||
)
|
||||
rm -f "$USER_PROD_STATIC_LOGPATH"
|
||||
|
|
Loading…
Reference in New Issue