summaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/update.sh b/update.sh
new file mode 100755
index 0000000..d5068b5
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+PROG=`basename $0`
+if [ $# -ne 1 ]; then
+ echo -e "Usage: $PROG [RPM_DIR]\n"
+ exit 1
+fi
+
+RPM_DIR=$1
+
+echo "Removing old data"
+rm -rf main devel tests
+mkdir -p main devel tests
+
+unpack() {
+ echo "Unpacking '$1' package to './$1'"
+ pushd $1
+ rpm2cpio "$2" | cpio -id
+ popd
+}
+
+unpack "main" "$RPM_DIR"/pvr-mdfld-1*.rpm
+unpack "tests" "$RPM_DIR"/pvr-mdfld-tests*.rpm
+unpack "devel" "$RPM_DIR"/pvr-mdfld-devel*.rpm
+