added version grab script to download script in order to get versions before purging...
[lxqt-slackware.git] / DOWNLOAD.sh
CommitLineData
73c8ba7d 1#! /bin/bash
2
3# Download the superproject and all submodules for LXQT
4# LXQT VERSION 0.15.0
5
6set -e
7
8CWD=$(pwd)
9LXQT="https://github.com/lxqt/lxqt.git"
10SRCDIR=${SRCDIR:-$CWD/src}
11ERROR_LOG=${CWD}/build_error.log
12GIT=${GIT:-/usr/bin/git}
13
14if [ ! -f $ERROR_LOG ];then
15 touch $ERROR_LOG
16fi
17
18# clone the superproject in the source directory
19$GIT clone $LXQT $SRCDIR || echo "error cloning superproject" >> $ERROR_LOG
20cd $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
4201a740 28# we grab the module's version numbers before deleting everything git related
29sh GRAB_VERSION.sh $SRCDIR
30
73c8ba7d 31# we are done with git, so let's cleanup from all the unwanted git folders and files
32find . -name '.git*' -mindepth 1 -exec rm -rfv '{}' \; || echo "error during removal of git files from source" >> $ERROR_LOG
33
34# ALL DONE