diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-27 12:26:43 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-27 12:26:43 +1200 |
commit | d6f24584bdec9e0a163d7c72a918e41c11af5c68 (patch) | |
tree | 2017aa9b4e494809f3ed92bc1d1508aaaa64162c | |
parent | Move bash-independent code ~/.bashrc -> ~/.shrc (diff) | |
download | dotfiles-d6f24584bdec9e0a163d7c72a918e41c11af5c68.tar.gz dotfiles-d6f24584bdec9e0a163d7c72a918e41c11af5c68.zip |
Use only system-path mkdir/grep for options setup
A little quicker
-rw-r--r-- | sh/profile.d/options.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh index b4000e5d..aa7e9ace 100644 --- a/sh/profile.d/options.sh +++ b/sh/profile.d/options.sh @@ -10,7 +10,7 @@ options() ( [ -d "$dir" ] && exit # Create the directory and step into it - mkdir -p -- "$dir" || exit + command -p mkdir -p -- "$dir" || exit cd -- "$dir" || exit # Write the program's --help output to a file, even if it's empty @@ -22,7 +22,7 @@ options() ( # Iterate through some useful options and create files to show they're # available if found in the help output for opt ; do - grep -q -- '[^[:alnum:]]--'"$opt"'[^[:alnum:]]' help && + command -p grep -q -- '[^[:alnum:]]--'"$opt"'[^[:alnum:]]' help && touch -- "$opt" done ) |