diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-12-07 00:39:40 -0500 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-12-07 00:39:40 -0500 |
commit | 4ee1a6093ad914405f8a45faa965ca68734bc4f1 (patch) | |
tree | 96b885aaf6003a155aa3de047f0b713695f77be7 | |
parent | 35eb6d2112ef2219e6d7766296465aedfc2b7439 (diff) |
tidy (specific)
-rw-r--r-- | .config/login.d/01_locale.sh | 3 | ||||
-rwxr-xr-x | .local/bin/cronic | 48 |
2 files changed, 2 insertions, 49 deletions
diff --git a/.config/login.d/01_locale.sh b/.config/login.d/01_locale.sh index 2e4f3c4..2c205fa 100644 --- a/.config/login.d/01_locale.sh +++ b/.config/login.d/01_locale.sh @@ -1,3 +1,4 @@ -if { [[ $LANG = C ]] || [[ -z $LANG ]]; } && grep '^en_US.UTF-8\s' /etc/locale.gen &>/dev/null; then +#!/hint/sh +if [ "$LANG" = C -o -z "$LANG" ] && grep '^en_US\.UTF-8\s' /etc/locale.gen &>/dev/null; then export LANG=en_US.UTF-8 fi diff --git a/.local/bin/cronic b/.local/bin/cronic deleted file mode 100755 index 8536f29..0000000 --- a/.local/bin/cronic +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Cronic v2 - cron job report wrapper -# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever. -# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -set -eu - -OUT=/tmp/cronic.out.$$ -ERR=/tmp/cronic.err.$$ -TRACE=/tmp/cronic.trace.$$ - -set +e -"$@" >$OUT 2>$TRACE -RESULT=$? -set -e - -PATTERN="^${PS4:0:1}\\+${PS4:1}" -if grep -aq "$PATTERN" $TRACE -then - ! grep -av "$PATTERN" $TRACE > $ERR -else - ERR=$TRACE -fi - -if [ $RESULT -ne 0 -o -s "$ERR" ] - then - echo "Cronic detected failure or error output for the command:" - echo "$@" - echo - echo "RESULT CODE: $RESULT" - echo - echo "ERROR OUTPUT:" - cat "$ERR" - echo - echo "STANDARD OUTPUT:" - cat "$OUT" - if [ $TRACE != $ERR ] - then - echo - echo "TRACE-ERROR OUTPUT:" - cat "$TRACE" - fi -fi - -rm -f "$OUT" -rm -f "$ERR" -rm -f "$TRACE" |