Debian Codegraph @

weekly/make-weekly-common

raw
1 #!/bin/bash
2
3 # Keep the current folder
4 curdir=`pwd`
5
6 # find the root dir
7 while [ ! -d ".git" ]; do
8 cd ..
9 done
10
11 echo "Root dir is set to $(pwd)"
12
13 # Clear old installers
14 os_name=`uname -s`
15 arch=`uname -m`
16
17 os_name=`uname -s`
18 echo rm -f $curdir/build-release/codelite.app.tar.gz
19 rm -f $curdir/build-release/codelite.app.tar.gz
20
21 if [[ "$os_name" == "Darwin" ]]; then
22 cpu_count=$(sysctl -n hw.ncpu)
23 elif [[ "$os_name" == "Linux" ]]; then
24 cpu_count=$(nproc)
25 fi
26
27 ## parse the command line arguments and over defaults
28 for i in "$@"
29 do
30 case $i in
31 --version=*)
32 version="${i#*=}"
33 shift
34 ;;
35 esac
36 done
37
38 if [ -z ${version} ]; then
39 echo -e "ERROR: please provide version. e.g. --version=16.5.0"
40 exit 1
41 fi
42
43 echo "Platform : ${os_name}"
44 echo "CPU count : ${cpu_count}"
45 echo "Verison : ${version}"
46
47 # Update our source tree
48 cd $curdir
49 echo "Pulling CodeLite changes..."
50 echo `pwd`
51 git pull --rebase --recurse-submodules
52 if [ $? -ne 0 ]; then
53 exit $?
54 fi
55
56 cd $curdir
57 ORIG_PATH=$PATH
58 ORIG_LDPATH=$LD_LIBRARY_PATH
59 ROOT_DIR=$(pwd)
60
61 upload_path="/var/www/html/downloads/codelite/${version}"