]> Sergey Matveev's repositories - feeder.git/commitdiff
POSIX shell does not support {a,b,c} substitutions
authorSergey Matveev <stargrave@stargrave.org>
Fri, 17 Feb 2023 18:57:56 +0000 (21:57 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 17 Feb 2023 18:58:21 +0000 (21:58 +0300)
For example native FreeBSD's sh will create "{cur,new,tmp}" directory literally.

opml2feeds

index 36ccc9628d34fb15f85b2867118fd87368c9baf6..f033040d5a7f3ea6b32da4f6a96227d5cbe13756 100755 (executable)
@@ -7,7 +7,7 @@ set -e
 xq '.opml.body.outline[]' -rc | while read outline ; do
        url=$(echo $outline | jq '."@xmlUrl"' -r)
        dir=$(echo $outline | jq '."@text"' -r)
-       mkdir -p "$dir"/{cur,new,tmp} # make it maildir
+       mkdir -p "$dir"/cur "$dir"/new "$dir"/tmp # make it maildir
        echo "$url" > $dir/url
        echo $dir
 done