root / arch-scripts / make_xseg.sh @ 8e3ab0e2
History | View | Annotate | Download (663 Bytes)
1 |
#! /bin/bash |
---|---|
2 |
|
3 |
################### |
4 |
# Initializations # |
5 |
################### |
6 |
|
7 |
set -e #exit on error |
8 |
|
9 |
# Find script location |
10 |
ARCH_SCRIPTS=$(dirname "$(readlink /proc/$$/fd/255)") |
11 |
|
12 |
#Include basic functions |
13 |
source $ARCH_SCRIPTS/init.sh |
14 |
|
15 |
PIPE="1>/dev/null" |
16 |
|
17 |
############# |
18 |
# Arguments # |
19 |
############# |
20 |
|
21 |
while [[ -n $1 ]]; do |
22 |
if [[ $1 = '-c' ]]; then CLEAN=0 #Will initially call `make clean` |
23 |
elif [[ $1 = '-d' ]]; then PIPE="" #Will not pipe any output to /dev/null |
24 |
else red_echo "${1}: Unknown command." |
25 |
fi |
26 |
shift |
27 |
done |
28 |
|
29 |
############# |
30 |
# Make XSEG # |
31 |
############# |
32 |
|
33 |
cd $XSEG |
34 |
|
35 |
if [[ $CLEAN ]]; then |
36 |
eval make clean $PIPE |
37 |
fi |
38 |
eval make $PIPE |
39 |
eval sudo make install $PIPE |