]> wagnertech.de Git - projects.git/blob - debian/eclipse-cpp.prepare
eclipse-cpp added
[projects.git] / debian / eclipse-cpp.prepare
1 #!/bin/bash
2 set -e
3
4 ECPP_PATTERN="eclipse-cpp*.tar.gz"
5
6 # check, if there is exactly 1 eclipse-cpp*.tar.gz in Downloads
7 pushd Downloads >/dev/null
8         if [ $(ls $ECPP_PATTERN| wc -l) -ne 1 ]; then
9                 echo "Es muss genau ein $ECPP_PATTERN in Downloads sein."
10                 exit 8
11         fi
12         eclipse_cpp_tgz=$(ls $ECPP_PATTERN)
13         
14         # entpacke tar.gz
15         if [ -d eclipse ]; then
16                 rm -r eclipse
17         fi
18         tar xf $eclipse_cpp_tgz
19 popd >/dev/null
20
21 # bestimme eclipse version
22 eversion=${eclipse_cpp_tgz#eclipse-cpp-}
23 eversion=${eversion%-linux*}
24 echo "version=$eversion" >> debian/rules.pre
25 echo "export version=$eversion" >> debian/setenv.sh
26
27 # bestimme arch
28 arch=${eclipse_cpp_tgz#*gtk-}
29 arch=${arch%.tar.gz}
30 echo "arch=$arch" >> debian/rules.pre
31 echo "export arch=$arch" >> debian/setenv.sh
32
33