[ci] license-header.sh: Fix some shellcheck warnings
All checks were successful
eden-license / license-header (pull_request) Successful in 31s
All checks were successful
eden-license / license-header (pull_request) Successful in 31s
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
This commit is contained in:
parent
b7e23ff51e
commit
17899b18c1
1 changed files with 3 additions and 3 deletions
|
@ -140,10 +140,10 @@ cat << EOF
|
||||||
other files have been reviewed and addressed.
|
other files have been reviewed and addressed.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
TMP_DIR=$(mktemp -d /tmp/license-header.XXXXXX) || exit 1
|
TMP_DIR=$(mktemp -d "/tmp/license-header.XXXXXX") || exit 1
|
||||||
if [ "$FIX" = "true" ] || [ "$UPDATE" = "true" ]; then
|
if [ "$FIX" = "true" ] || [ "$UPDATE" = "true" ]; then
|
||||||
echo
|
echo
|
||||||
echo "license-header.sh: FIX set to true, fixing headers..."
|
echo "license-header.sh: FIX or UPDATE set to true, fixing headers..."
|
||||||
|
|
||||||
for file in $SRC_FILES $OTHER_FILES; do
|
for file in $SRC_FILES $OTHER_FILES; do
|
||||||
BASENAME=$(basename "$file")
|
BASENAME=$(basename "$file")
|
||||||
|
@ -163,7 +163,7 @@ if [ "$FIX" = "true" ] || [ "$UPDATE" = "true" ]; then
|
||||||
TMP="$TMP_DIR/$BASENAME.tmp"
|
TMP="$TMP_DIR/$BASENAME.tmp"
|
||||||
UPDATED=0
|
UPDATED=0
|
||||||
cp -p "$file" "$TMP"
|
cp -p "$file" "$TMP"
|
||||||
> "$TMP"
|
: > "$TMP"
|
||||||
|
|
||||||
# this logic is bit hacky but sed don't work well with $VARIABLES
|
# this logic is bit hacky but sed don't work well with $VARIABLES
|
||||||
# it's this or complete remove this logic and keep only the old way
|
# it's this or complete remove this logic and keep only the old way
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue