-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sh
executable file
·50 lines (39 loc) · 1.06 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
component=$1
action=$2
WS_TOP=`pwd`
#USERLAND_GIT_REMOTE=`git remote show origin | grep -v 'Push' | sed -n 's/.*URL: //p'`
USERLAND_GIT_REMOTE='https://github.com/PluribusNetworks/pluribus_userland.git'
USERLAND_GIT_REV=`git rev-parse HEAD`
BUILD_VERSION="5.11-0.134"
if [ "x$component" = "xclean" ]
then
rm -rf i386
rm .setup
rm tools/*.o
rm tools/*.so
action=clean
elif [ "x$component" = "xbuild" ]
then
action=build
elif [ "x$component" = "xinstall" ]
then
action=install
elif [ "x$component" != "x" ]
then
cd components/$component
[ $? -ne 0 ] && exit 1
fi
if [ "x$action" = "x" ]
then
action=publish
fi
if [ ! -f .setup -a $action != clean ]
then
(cd $WS_TOP
gmake setup WS_TOP=$WS_TOP USERLAND_GIT_REMOTE=$USERLAND_GIT_REMOTE USERLAND_GIT_BRANCH=master USERLAND_GIT_REV=$USERLAND_GIT_REV BUILD_VERSION=$BUILD_VERSION
[ $? -ne 0 ] && exit 1
touch .setup)
[ $? -ne 0 ] && exit 1
fi
gmake $action WS_TOP=$WS_TOP USERLAND_GIT_REMOTE=$USERLAND_GIT_REMOTE USERLAND_GIT_BRANCH=master USERLAND_GIT_REV=$USERLAND_GIT_REV BUILD_VERSION=$BUILD_VERSION