]> TLD Linux GIT Repositories - packages/rc-scripts.git/commitdiff
- help getting new rcscripts
authorBartosz Świątek <shadzik@tld-linux.org>
Mon, 3 Oct 2011 20:40:27 +0000 (22:40 +0200)
committerBartosz Świątek <shadzik@tld-linux.org>
Mon, 3 Oct 2011 20:40:27 +0000 (22:40 +0200)
getrcscripts.sh [new file with mode: 0755]

diff --git a/getrcscripts.sh b/getrcscripts.sh
new file mode 100755 (executable)
index 0000000..a9c9c62
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# get pld rc-scripts from svn, always get stable tags
+#
+# author: Bartosz Świątek shadzik@tld-linux.org
+
+if [ $# -lt 1 ]; then
+       echo "Usage: $0 version"
+       echo
+       echo "Example: $0 0.4.5.1"
+       exit 1
+fi
+
+VERSION=$1
+
+echo "Getting rc-scripts-$VERSION"
+svn co http://svn.pld-linux.org/svn/rc-scripts/tags/$VERSION rc-scripts-$VERSION >/dev/null || exit 1
+
+echo "Adjusting for TLD"
+cd rc-scripts-$VERSION
+find . -type f |xargs sed -i 's/PLD/TLD/g'
+
+echo "Archiving..."
+cd ..
+tar czf rc-scripts-$VERSION.tar.gz rc-scripts-$VERSION
+
+echo "Cleaning up..."
+rm -rf rc-scripts-$VERSION
+
+md5sum rc-scripts-$VERSION.tar.gz