X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=crontab.d%2Fupdate.sh;h=72422fc90390e3c767eddfacd5fc676045eae484;hp=173142ec214db7ddb29eed6ec690704ced1a97ed;hb=19420fa802a6d29f6268221894798ba86938a15e;hpb=fdbda4373a045a26e7025d90a2ae1a9fab4d12dd diff --git a/crontab.d/update.sh b/crontab.d/update.sh index 173142e..72422fc 100755 --- a/crontab.d/update.sh +++ b/crontab.d/update.sh @@ -50,7 +50,8 @@ echo "###################################" > "$CRONTAB" 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 @@ -63,11 +64,9 @@ for file in "$DIRECTORY"/crontab.*; do 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).