summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bc6c68a)
Running open_wrapper.sh was failing with some shells different from
bash, because they don't support substring expansion.
For example, dash was giving this error:
./open_wrapper.sh: 35: ./open_wrapper.sh: Bad substitution
While fixing the issue also use a stricter check for the URL: the anchor
should only contain hex digits.
echo "${TEMPDIR}/${FILENAME}"
}
echo "${TEMPDIR}/${FILENAME}"
}
-if [ ${URL: -97:1} = "#" ];
+if echo -n "$URL" | grep -q '#[[:xdigit:]]\{96\}$';
then
DESTINATION=$(decrypted_file "$URL")
else
then
DESTINATION=$(decrypted_file "$URL")
else