-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·39 lines (29 loc) · 818 Bytes
/
install.sh
File metadata and controls
executable file
·39 lines (29 loc) · 818 Bytes
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
#!/bin/bash
: "${TOOLS_DEST_DIR:=/usr/local/bin}"
if [ ! -w $TOOLS_DEST_DIR ]; then
echo "ERROR: access denied to $TOOLS_DEST_DIR"
echo " - this script needs to be run as 'root'"
exit -1
fi
tools_dir=$(dirname $0)
if [ ! -f $tools_dir/install.sh ]; then
echo "ERROR: could not determine Tools repository location"
exit -1
fi
opts=()
opts+=( "--force" )
opts+=( "--remove-destination" )
list=()
list+=( $(find $tools_dir/scr -type f) )
list+=( $(find $tools_dir/dpdk/scr -type f) )
cp ${opts[@]} ${list[@]} $TOOLS_DEST_DIR \
|| exit -1
# Install GCC
pkglist=()
pkglist+=( "gcc" )
$TOOLS_DEST_DIR/install-packages.sh --update ${pkglist[@]} \
|| exit -1
gcc $tools_dir/src/rate.c -o $TOOLS_DEST_DIR/rate
gcc $tools_dir/src/ofrates.c -o $TOOLS_DEST_DIR/ofrates
echo "SUCCESS"
exit 0