-
Notifications
You must be signed in to change notification settings - Fork 0
/
VxWorks_Install.sh
57 lines (41 loc) · 1.2 KB
/
VxWorks_Install.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
50
51
52
53
54
55
56
57
#!/bin/sh
if [ -n "$WIND_BASE" ]; then
echo "\$WIND_BASE is [$WIND_BASE]"
else
echo "\$WIND_BASE is not set"
while true
do
read -p "Input \$WIND_BASE path: " WIND_BASE
if [ -n "$WIND_BASE" ]; then
break
fi
done
echo "\$WIND_BASE is [$WIND_BASE]"
fi
OLDPATH=$(pwd)
INSTALLDIR=$WIND_BASE/pkgs/os/lang-lib
# echo "target path is $INSTALLDIR"
cd $INSTALLDIR
if [ $(pwd) != "$INSTALLDIR" ]; then
echo "Invalid path"
exit -1
fi
echo "CilkPlus will be installed to $INSTALLDIR\cilk_kernel and $INSTALLDIR\cilk_usr"
echo "Press any key to install..."
read -n 1
rm -rf $INSTALLDIR/cilk_kernel
rm -rf $INSTALLDIR/cilk_usr
mkdir $INSTALLDIR/cilk_kernel
mkdir $INSTALLDIR/cilk_kernel/include
mkdir $INSTALLDIR/cilk_kernel/runtime
cd $INSTALLDIR/cilk_kernel
cp -v -r $OLDPATH/include/* $INSTALLDIR/cilk_kernel/include/
cp -v -r $OLDPATH/runtime/* $INSTALLDIR/cilk_kernel/runtime/
cp -v -r $OLDPATH/mk/vxworks_krnl/* $INSTALLDIR/cilk_kernel/
mkdir $INSTALLDIR/cilk_usr
mkdir $INSTALLDIR/cilk_usr/include
mkdir $INSTALLDIR/cilk_usr/runtime
cp -v -r $OLDPATH/include/* $INSTALLDIR/cilk_usr/include/
cp -v -r $OLDPATH/runtime/* $INSTALLDIR/cilk_usr/runtime/
cp -v -r $OLDPATH/mk/vxworks_usr/* $INSTALLDIR/cilk_usr/
cd $OLDPATH