Revision 86555df4
b/arch-scripts/grep_xseg.sh | ||
---|---|---|
1 |
#! /bin/bash |
|
2 |
|
|
3 |
################### |
|
4 |
# Initializations # |
|
5 |
################### |
|
6 |
|
|
7 |
#Include basic functions |
|
8 |
source init.sh |
|
9 |
|
|
10 |
set -e #exit on error |
|
11 |
|
|
12 |
XSEG=/home/$(logname)/archipelago/xseg |
|
13 |
SED_XSEG=$(echo "${XSEG}/" | sed 's/\//\\\//g') |
|
14 |
|
|
15 |
INCLUDE="--include=*.c --include=*.h" |
|
16 |
|
|
17 |
############# |
|
18 |
# Arguments # |
|
19 |
############# |
|
20 |
|
|
21 |
if [[ -z $1 ]]; then |
|
22 |
red_echo "No parameters given." |
|
23 |
exit 1 |
|
24 |
elif [[ $1 = "-m" ]]; then |
|
25 |
INCLUDE="--include=Makefile --include=*.mk" |
|
26 |
shift |
|
27 |
fi |
|
28 |
|
|
29 |
############# |
|
30 |
# Grep XSEG # |
|
31 |
############# |
|
32 |
|
|
33 |
grep -RIni --exclude-dir=${XSEG}/sys/user/python --exclude=test.c \ |
|
34 |
${INCLUDE} --color=always -e $1 ${XSEG} | \ |
|
35 |
sed 's/'$SED_XSEG'//' |
b/arch-scripts/init.sh | ||
---|---|---|
1 |
#! /bin/bash |
|
2 |
|
|
3 |
########################## |
|
4 |
# Functions' definitions # |
|
5 |
########################## |
|
6 |
|
|
7 |
txtrst=$(tput sgr0) # Reset text color |
|
8 |
txtred=$(tput setaf 1) # Make text red |
|
9 |
txtgrn=$(tput setaf 2) # Make text green |
|
10 |
|
|
11 |
red_echo(){ |
|
12 |
echo -e "${txtred}${1}${txtrst}" |
|
13 |
} |
|
14 |
|
|
15 |
grn_echo(){ |
|
16 |
echo -e "${txtgrn}${1}${txtrst}" |
|
17 |
} |
b/arch-scripts/make_xseg.sh | ||
---|---|---|
1 |
#! /bin/bash |
|
2 |
|
|
3 |
################### |
|
4 |
# Initializations # |
|
5 |
################### |
|
6 |
|
|
7 |
#Include basic functions |
|
8 |
source init.sh |
|
9 |
|
|
10 |
set -e #exit on error |
|
11 |
|
|
12 |
XSEG=/home/$(logname)/archipelago/xseg |
|
13 |
PIPE="1>/dev/null" |
|
14 |
|
|
15 |
############# |
|
16 |
# Arguments # |
|
17 |
############# |
|
18 |
|
|
19 |
while [[ -n $1 ]]; do |
|
20 |
if [[ $1 = '-c' ]]; then CLEAN=0 #Will initially call `make clean` |
|
21 |
elif [[ $1 = '-d' ]]; then PIPE="" #Will not pipe any output to /dev/null |
|
22 |
else red_echo "${1}: Unknown command." |
|
23 |
fi |
|
24 |
shift |
|
25 |
done |
|
26 |
|
|
27 |
############# |
|
28 |
# Make XSEG # |
|
29 |
############# |
|
30 |
|
|
31 |
cd $XSEG |
|
32 |
|
|
33 |
if [[ $CLEAN ]]; then |
|
34 |
eval make clean $PIPE |
|
35 |
fi |
|
36 |
eval make $PIPE |
|
37 |
eval sudo make install $PIPE |
Also available in: Unified diff