aboutsummaryrefslogtreecommitdiff
path: root/bin/plmu.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-31 14:19:57 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-31 14:29:17 +1300
commit0c84989ca0b97ca1d075e7a304a407553e34381d (patch)
tree2188a585aef6ed345b1c575da6f63445baabf522 /bin/plmu.sh
parentAdd clarifying comment (diff)
downloaddotfiles-0c84989ca0b97ca1d075e7a304a407553e34381d.tar.gz
dotfiles-0c84989ca0b97ca1d075e7a304a407553e34381d.zip
Clarify control flow in shell scripts
Diffstat (limited to 'bin/plmu.sh')
-rw-r--r--bin/plmu.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/plmu.sh b/bin/plmu.sh
index 5c599828..3f237ae2 100644
--- a/bin/plmu.sh
+++ b/bin/plmu.sh
@@ -1,8 +1,12 @@
# Upgrade plenv modules with cpanm(1)
# Set up exceptions file if it exists
-ef=$HOME/.plenv/non-cpanm-modules
-[ -e "$ef" ] || ef=/dev/null
+def="$HOME"/.plenv/non-cpanm-modules
+if [ -e "$def" ] ; then
+ ef=$def
+else
+ ef=/dev/null
+fi
# Check that exceptions file is sorted
if ! LC_COLLATE=C sort -c -- "$ef" ; then