73c8ba7d |
1 | #! /bin/bash |
2 | |
3 | # Download the superproject and all submodules for LXQT |
4 | # LXQT VERSION 0.15.0 |
5 | |
6 | set -e |
7 | |
8 | CWD=$(pwd) |
9 | LXQT="https://github.com/lxqt/lxqt.git" |
10 | SRCDIR=${SRCDIR:-$CWD/src} |
11 | ERROR_LOG=${CWD}/build_error.log |
12 | GIT=${GIT:-/usr/bin/git} |
13 | |
14 | if [ ! -f $ERROR_LOG ];then |
15 | touch $ERROR_LOG |
16 | fi |
17 | |
18 | # clone the superproject in the source directory |
19 | $GIT clone $LXQT $SRCDIR || echo "error cloning superproject" >> $ERROR_LOG |
20 | cd $SRCDIR |
21 | |
22 | # initialize every submodule |
23 | $GIT submodule init || echo "error initializing submodules" >> $ERROR_LOG |
24 | |
25 | # checkout every submodule |
26 | $GIT submodule update --remote --rebase || echo "error during checkout of submodules" >> $ERROR_LOG |
27 | |
c01fcab1 |
28 | # return to main directory |
29 | cd $CWD |
30 | |
4201a740 |
31 | # we grab the module's version numbers before deleting everything git related |
b1415a29 |
32 | sh ${CWD}/GRAB_VERSION.sh $SRCDIR |
4201a740 |
33 | |
73c8ba7d |
34 | # we are done with git, so let's cleanup from all the unwanted git folders and files |
c01fcab1 |
35 | find $SRCDIR -name '.git*' -mindepth 1 -exec rm -rfv '{}' \; || echo "error during removal of git files from source" >> $ERROR_LOG |
73c8ba7d |
36 | |
37 | # ALL DONE |