summaryrefslogtreecommitdiff
path: root/tools/repo2solv.sh
diff options
context:
space:
mode:
authorKlaus Kaempf <kkaempf@suse.de>2008-02-15 16:41:45 +0000
committerKlaus Kaempf <kkaempf@suse.de>2008-02-15 16:41:45 +0000
commit370a61a04bcff2f02350374160a908838a152845 (patch)
treeebef02c497cfc6671e6d5b5a4a7d44117f7fe85d /tools/repo2solv.sh
parent43d3099eded1d589a88dbb598ee1df501430ef18 (diff)
downloadlibsolv-370a61a04bcff2f02350374160a908838a152845.tar.gz
libsolv-370a61a04bcff2f02350374160a908838a152845.tar.bz2
libsolv-370a61a04bcff2f02350374160a908838a152845.zip
Argh, can't code Bash properly
Diffstat (limited to 'tools/repo2solv.sh')
-rwxr-xr-xtools/repo2solv.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/repo2solv.sh b/tools/repo2solv.sh
index bcf0318..aeebf7b 100755
--- a/tools/repo2solv.sh
+++ b/tools/repo2solv.sh
@@ -5,6 +5,8 @@
# tries to detect the repo type and generate one SOLV file on stdout
LANG=C
+parser_options=${PARSER_OPTIONS:-}
+
dir="$1"
cd "$dir" || exit 1
@@ -25,7 +27,7 @@ if test -d repodata; then
if test -n "$cmd"; then
# we have some primary.xml*
primfile=`mktemp` || exit 3
- $cmd $i | rpmmd2solv $(PARSER_OPTIONS) > $primfile
+ $cmd $i | rpmmd2solv $parser_options > $primfile
fi
patchfile="/nonexist"
@@ -41,7 +43,7 @@ if test -d repodata; then
esac
done
echo '</patches>'
- ) | grep -v '\?xml' | patchxml2solv $(PARSER_OPTIONS) > $patchfile
+ ) | grep -v '\?xml' | patchxml2solv $parser_options > $patchfile
fi
# Now merge primary and patches
@@ -89,6 +91,8 @@ elif test -d suse/setup/descr && test -s content; then
esac
done
fi
- ) | susetags2solv -c "${olddir}/content" $(PARSER_OPTIONS)
+ ) | susetags2solv -c "${olddir}/content" $parser_options
cd "$olddir"
+else
+ exit 1
fi