]> arthur.barton.de Git - ax-unix.git/commitdiff
Fix some shellcheck(1) warnings in ax-common example code
authorAlexander Barton <alex@barton.de>
Sat, 6 Aug 2016 17:36:19 +0000 (19:36 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 6 Aug 2016 17:36:19 +0000 (19:36 +0200)
lib/ax/README

index c55c01b0588d5e5987178c235cf9d2e4cc4b1f51..80e9de07fa7939eb900b173fbd43e0889b82203d 100644 (file)
@@ -1,5 +1,5 @@
 ax-unix: Alex' UNIX Tools & Scripts
-Copyright (c)2013-2015 Alexander Barton (alex@barton.de)
+Copyright (c)2013-2016 Alexander Barton (alex@barton.de)
 
 This directory contains library files to use in 3rd party applications and
 scripts. Please see below for usage information.
@@ -17,10 +17,12 @@ Use something like the following in your scrips:
 
 ----> cut here <---------------------------------------------------------------
 # Include "ax-common.sh":
+ax_common_sourced=
 for dir in "$HOME/lib" "$HOME/.ax" /usr/local /opt/ax /usr; do
        [ -z "$ax_common_sourced" ] || break
        ax_common="${dir}/lib/ax/ax-common.sh"
-       [ -r "$ax_common" ] && source "$ax_common"
+       # shellcheck source=/usr/local/lib/ax/ax-common.sh
+       [ -r "$ax_common" ] && . "$ax_common"
 done
 if [ -z "$ax_common_sourced" ]; then
        echo "Error (`basename "$0"`): \"ax-common.sh\" not found, aborting!"