]> wagnertech.de Git - projects.git/blobdiff - debian/eclipse-cpp.prepare
eclipse-cpp added
[projects.git] / debian / eclipse-cpp.prepare
diff --git a/debian/eclipse-cpp.prepare b/debian/eclipse-cpp.prepare
new file mode 100755 (executable)
index 0000000..169b64f
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -e
+
+ECPP_PATTERN="eclipse-cpp*.tar.gz"
+
+# check, if there is exactly 1 eclipse-cpp*.tar.gz in Downloads
+pushd Downloads >/dev/null
+       if [ $(ls $ECPP_PATTERN| wc -l) -ne 1 ]; then
+               echo "Es muss genau ein $ECPP_PATTERN in Downloads sein."
+               exit 8
+       fi
+       eclipse_cpp_tgz=$(ls $ECPP_PATTERN)
+       
+       # entpacke tar.gz
+       if [ -d eclipse ]; then
+               rm -r eclipse
+       fi
+       tar xf $eclipse_cpp_tgz
+popd >/dev/null
+
+# bestimme eclipse version
+eversion=${eclipse_cpp_tgz#eclipse-cpp-}
+eversion=${eversion%-linux*}
+echo "version=$eversion" >> debian/rules.pre
+echo "export version=$eversion" >> debian/setenv.sh
+
+# bestimme arch
+arch=${eclipse_cpp_tgz#*gtk-}
+arch=${arch%.tar.gz}
+echo "arch=$arch" >> debian/rules.pre
+echo "export arch=$arch" >> debian/setenv.sh
+
+