echo "$HEADER_WARNING" >> "$CRONTAB"
echo "###################################" >> "$CRONTAB"
echo >> "$CRONTAB"
-echo "# It was generated from '$DIRECTORY/*' on `date -R`." >> "$CRONTAB"
+printf "# It was generated from '%s/*' on %s." \
+ "$DIRECTORY" "`LANG=C date '+%a, %d %b %Y %H:%M:%S %z'`" >>"$CRONTAB"
# Enforce C sort order.
LC_ALL=C
break
fi
- echo "Found '$file'."
+ printf "Found '%s'.\n" "$file"
- echo >> "$CRONTAB"
- echo >> "$CRONTAB"
- echo "## $file:" >> "$CRONTAB"
+ printf '\n\n## %s:\n' "$file" >>"$CRONTAB"
# Strip licenses, multiple empty lines and fix $HOME variables in PATH
# (cron doesn't expand variables).
*)
# Display directory contents.
if test -d "$1"; then
- echo "=> Contents of $1:"
+ printf '=> Contents of %s:\n' "$1"
ls "$1"
exit 0
fi
# Usage: <file> <name> <grep-string> <value>
apply_optional_replacement() {
if test -n "$4"; then
- echo "$1: using $2 $4"
+ printf '%s: using %s %s\n' "$1" "$2" "$4"
generate "$1" '' simple_cpp \
"$3" -- "$4"
else
- echo "$1: removing $2 display"
+ printf '%s: removing %s display\n' "$1" "$2"
grep_i -v "$3" "$1"
fi
}