Skip to content

Commit

Permalink
Merge pull request #96 from snogge/no-bashisms
Browse files Browse the repository at this point in the history
auto.diod.in: remove bashisms
  • Loading branch information
garlick authored Mar 7, 2024
2 parents 937fbb2 + f732f19 commit b4b5e8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/auto.diod.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# auto.diod - executable automounter map for diod file systems
#
Expand Down Expand Up @@ -41,15 +41,15 @@ dcatopts="${DIOD_TIMEOUT:+-t $DIOD_TIMEOUT}"
for server in $DIOD_SERVERS; do
$DIOD_DIODCAT -s $server $dcatopts exports | awk '{print $1}' |\
while read path; do
if [ "$path" == "/" ]; then
if [ "$key" == "ROOT" ]; then
if [ "$path" = "/" ]; then
if [ "$key" = "ROOT" ]; then
echo "$prefix $server:$path"
exit 0
fi
elif [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \
|| [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \
|| [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \
|| [ "$key" == "$(basename $path)" ]; then
elif [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \
|| [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \
|| [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \
|| [ "$key" = "$(basename $path)" ]; then
echo "$prefix $server:$path"
exit 0
fi
Expand Down

0 comments on commit b4b5e8e

Please sign in to comment.