Skip to content

Commit 512e01c

Browse files
author
Louis T. Getterman IV
committed
Bug fix for OSX touch time in FMDMS
Now platform agnostic, and should work on all -nix systems using "touch -t" and time calculations handled by Python instead of "touch -d" which is only available on (most of) Linux. Help message, color, and error message clean-up in cleaner, ggcom version, and qrsvg.
1 parent d95a54d commit 512e01c

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
GotGet Common - Bash - Utilities
33

44
```
5+
Install:
6+
57
mkdir -pv ~/ggcom/
68
git clone https://github.com/LTGIV/ggcom-bash-library.git ~/ggcom/ggcom-bash-library/
79
git clone https://github.com/LTGIV/ggcom-bash-utils.git ~/ggcom/ggcom-bash-utils/

Diff for: cleaner.bash

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
: <<'!COMMENT'
33
4-
GGCOM - Bash - Utils - Cleaner v201507100702
4+
GGCOM - Bash - Utils - Cleaner v201508012114
55
Louis T. Getterman IV (@LTGIV)
66
www.GotGetLLC.com | www.opensour.cc/ggcom/cleaner
77
@@ -94,8 +94,7 @@ fi
9494
#----- NOTICE: HELP INFO
9595
if [ "$valHelp" = True ]; then
9696
read -r -d '' HELPMENU <<EOF
97-
Usage: $SCRIPTNAME [OPTIONS]... ALGORITHM TARGET
98-
or $SCRIPTNAME [OPTIONS]
97+
Usage: $SCRIPTNAME [OPTIONS]... (-p|--pattern)=PATTERN (-t|--target)=TARGET
9998
10099
Options
101100
-t, --target target to hash (file or directory)

Diff for: fmdms.bash

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
: <<'!COMMENT'
33
4-
GGCOM - Bash - Utils - FMDMS (File Mtime Directory Md5 Synchronization) v201507060458
4+
GGCOM - Bash - Utils - FMDMS (File Mtime Directory Md5 Synchronization) v201508012114
55
Louis T. Getterman IV (@LTGIV)
66
www.GotGetLLC.com | www.opensour.cc/ggcom/fmdms
77
@@ -532,7 +532,7 @@ while :; do
532532
fi
533533

534534
# Changes within DIFF seconds have occurred.
535-
touch -d "-${DIFF} seconds" "$FMDMSSYNCTIME"
535+
touch -t `python -c "import datetime; print( ( datetime.datetime.now() - datetime.timedelta(seconds=$DIFF) ).strftime('%Y%m%d%H%M.%S') )"` "$FMDMSSYNCTIME"
536536
TMPCHANGES=`find "$ansrSrc" -type f -newer "$FMDMSSYNCTIME"`
537537

538538
if [ ! -z "$TMPCHANGES" ] || [ "$TRIGGERSYNC" == true ]; then

Diff for: ggcom-version.bash

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
: <<'!COMMENT'
33
4-
GGCOM Application Version Checker v201504162001
4+
GGCOM Application Version Checker v201507120415
55
Louis T. Getterman IV (@LTGIV)
66
www.GotGetLLC.com | www.opensour.cc/ggcom/versions
77
@@ -26,13 +26,18 @@ source "${LIBPATH}/varsBash.bash"
2626
source "${LIBPATH}/string.bash"
2727
source "${LIBPATH}/version.bash"
2828
################################################################################
29-
#
29+
source "${LIBPATH}/colors.bash"
3030
################################################################################
3131

3232
GGCOMAPP=${1-$0}
3333
VERTYPE=${2-header}
3434

3535
# No such file
36-
if [ ! -f $GGCOMAPP ]; then echo "No such file ($GGCOMAPP). Exiting." >&2; exit 1; fi
36+
if [ ! -f $GGCOMAPP ]; then echo -e "${ggcLightRed}No such file ($GGCOMAPP). Exiting.${ggcNC}" >&2; exit 1; fi
3737

38-
echo "`getVersion "$GGCOMAPP" "$VERTYPE"`"
38+
OUTPUT="`getVersion "$GGCOMAPP" "$VERTYPE"`"
39+
40+
# No version information found
41+
if [ -z "${OUTPUT}" ]; then echo -e "${ggcLightRed}No version information found ($GGCOMAPP). Exiting.${ggcNC}" >&2; exit 1; fi
42+
43+
echo "${OUTPUT}"

Diff for: qrsvg.bash

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
: <<'!COMMENT'
33
4-
GGCOM - Bash - Utils - Encode QR to SVG v201505201148
4+
GGCOM - Bash - Utils - Encode QR to SVG v201508012114
55
Louis T. Getterman IV (@LTGIV)
66
www.GotGetLLC.com | www.opensour.cc/ggcom/qrsvg
77
@@ -59,9 +59,9 @@ echo `str_repeat - 80`
5959

6060
#------------------------------ Support Programs Exist?
6161

62-
hash qrencode 2>/dev/null || { echo -e "${ggcLightRed}qrencode is not installed. Aborting.${ggcNC}" >&2; exit 1; }
63-
hash convert 2>/dev/null || { echo -e "${ggcLightRed}convert is not installed. Aborting.${ggcNC}" >&2; exit 1; }
64-
hash potrace 2>/dev/null || { echo -e "${ggcLightRed}potrace is not installed. Aborting.${ggcNC}" >&2; exit 1; }
62+
hash qrencode 2>/dev/null || { echo -e "${ggcLightRed}qrencode is not installed. Exiting.${ggcNC}" >&2; exit 1; }
63+
hash convert 2>/dev/null || { echo -e "${ggcLightRed}convert is not installed. Exiting.${ggcNC}" >&2; exit 1; }
64+
hash potrace 2>/dev/null || { echo -e "${ggcLightRed}potrace is not installed. Exiting.${ggcNC}" >&2; exit 1; }
6565

6666
#------------------------------/Support Programs Exist?
6767

0 commit comments

Comments
 (0)