defaults to mixed case instead of uppercase when specifying -v and a folder

This commit is contained in:
Ivan X
2015-12-07 23:49:05 -05:00
parent a1c0806d3f
commit b7aad394f6

View File

@@ -36,9 +36,9 @@ processPath () {
else else
IFS='' IFS=''
result=$(sudo dbd -r $sharepath | grep encoding) result=$(sudo dbd -r $sharepath | grep encoding)
f=$(echo $result | wc -l) f=$(wc -l <<< $result)
[[ $(echo $result | wc -w) == 0 ]] && f=0 [[ $(wc -w <<< $result) == 0 ]] && f=0
[[ f -eq 1 && $(echo $result | grep APPLEDESKTOP) && $(grep MTOULOWER $sharepath/.AppleDesktop/.volinfo) ]] && (( f-- )) [[ $f -eq 1 && $(grep AppleDesktop <<< "$result") && $(grep MTOULOWER $sharepath/.AppleDesktop/.volinfo) ]] && (( f-- ))
if (( f == 0 )); then if (( f == 0 )); then
echo "AppleDouble files have been updated for volume $sharepath." echo "AppleDouble files have been updated for volume $sharepath."
else else
@@ -103,7 +103,10 @@ else
sudo true sudo true
if [[ $1 ]]; then if [[ $1 ]]; then
sharepath=$(readlink -m $1) sharepath=$(readlink -m $1)
processPath # behavior change in 1.3.0: now defaults to mixed case
# on a volume when specifying a folder and -v
# (as opposed to defaulting to casefold:toupper previously)
processPath 1
else else
grep ^/media /usr/local/etc/netatalk/AppleVolumes.default | \ grep ^/media /usr/local/etc/netatalk/AppleVolumes.default | \
while read line; do while read line; do