chiark / gitweb /
Allow usage of fd-commit inside the main fdroiddata directories
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 18 Nov 2013 14:13:18 +0000 (15:13 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 18 Nov 2013 14:13:18 +0000 (15:13 +0100)
fd-commit

index e833e034fda8b3b8350aaa6f4bd269604cffb44d..9b5a2dcd11fe2ee680810dfc293a0edb5d291393 100755 (executable)
--- a/fd-commit
+++ b/fd-commit
@@ -4,6 +4,10 @@
 
 commands=()
 
+if [ ! -d metadata ]; then
+       [ -d ../metadata ] && cd .. || { echo "No metadata files found!"; exit 2; }
+fi
+
 while read line; do
        if [[ "$line" == *M*metadata/*.txt ]]; then
                file=${line##* }