X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/projects.git/blobdiff_plain/b7dc2b69d6f7d354ddd82fc3f64fed711ceb317d..996b5fdc6f6aa459d079154b3025cc4c24e802b4:/debian/eclipse-cpp.prepare?ds=inline diff --git a/debian/eclipse-cpp.prepare b/debian/eclipse-cpp.prepare new file mode 100755 index 0000000..169b64f --- /dev/null +++ b/debian/eclipse-cpp.prepare @@ -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 + +