added packages to the prereq list since we are not building them with the global...
[lxqt-slackware.git] / DOWNLOAD.sh
1 #! /bin/bash
2
3 # Download the superproject and all submodules for LXQT
4 # LXQT VERSION 0.16.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
28 # return to main directory
29 cd $CWD
30
31 # we grab the module's version numbers before deleting everything git related
32 sh ${CWD}/GRAB_VERSION.sh $SRCDIR
33
34 # we are done with git, so let's cleanup from all the unwanted git folders and files
35 find $SRCDIR -name '.git*' -mindepth 1 -exec rm -rfv '{}' \; || echo "error during removal of git files from source" >> $ERROR_LOG
36
37 # ALL DONE