summaryrefslogtreecommitdiffstats
path: root/src/basic/linux
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-04-19 18:07:51 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2021-04-20 18:39:36 +0200
commit437e889b18743ea4d594521829e43b6067ce9036 (patch)
tree229a9f49d8d7e54aa2859c8166921e4a43a6230e /src/basic/linux
parentdocument DefaultOOMPolicy (diff)
downloadsystemd-437e889b18743ea4d594521829e43b6067ce9036.tar.xz
systemd-437e889b18743ea4d594521829e43b6067ce9036.zip
src: shellcheck-ify shell scripts
Diffstat (limited to 'src/basic/linux')
-rwxr-xr-xsrc/basic/linux/update.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/linux/update.sh b/src/basic/linux/update.sh
index ca0b9ec077..1ada894f09 100755
--- a/src/basic/linux/update.sh
+++ b/src/basic/linux/update.sh
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu
+set -o pipefail
for i in *.h */*.h; do
- if [[ $i == 'loadavg.h' ]]; then
- curl --fail https://raw.githubusercontent.com/torvalds/linux/master/include/linux/sched/$i -o $i
+ if [[ "$i" == "loadavg.h" ]]; then
+ curl --fail "https://raw.githubusercontent.com/torvalds/linux/master/include/linux/sched/$i" -o "$i"
else
- curl --fail https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i -o $i
+ curl --fail "https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i" -o "$i"
fi
- sed -i -e 's/__user //g' -e '/^#include <linux\/compiler.h>/ d' $i
+ sed -i -e 's/__user //g' -e '/^#include <linux\/compiler.h>/ d' "$i"
done