install.sh
1.63 KB
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
58
59
60
61
62
63
64
65
#!/bin/bash
#
# script to install the BB devkit
#
DEST=/opt/ique/sdk-v1.5
DESTLINK=/opt/ique/sdk
#
# check whether executed as root
#
if id | grep "^uid=0(root)" > /dev/null; then
echo starting root installation of iQue SDK
echo installing compilation tools
rpm -Uhv --replacepkgs --force binutils-mips-linux-2.9.5-3.i386.rpm
rpm -Uhv --replacepkgs --force egcs-mips-linux-1.1.2-4.i386.rpm
rpm -Uhv --replacepkgs --force libelf-0.8.2-2.i386.rpm
rpm -Uhv --replacepkgs --force libelf-devel-0.8.2-2.i386.rpm
mkdir -p /usr/mips-linux/bin
cp as /usr/mips-linux/bin
cp as /usr/bin/mips-linux-as
#
# Copy to devkit to the real install location, unless we're there already
#
if [ `/bin/pwd` != "$DEST" ]; then
echo copying SDK contents to $DEST ...
rm -rf $DEST
mkdir -p $DEST
tar cf - . | (cd $DEST; tar xf -)
cd $DEST
find . \( -type f -or -type d \) -exec chmod u+w "{}" ";"
rm -f $DESTLINK
ln -s $DEST $DESTLINK
else
echo skip copy to $DEST, not needed
fi
make -C modules install
echo root installation complete, each developer must also run this script individually
exit 0
fi
#
# install user files
#
echo starting individual user installation of iQue SDK
if [ -d $DEST/per_user ]; then
cd $DEST
else
echo Directory $DEST does not exist: run install as root first.
exit 1
fi
if [ "x" == "x$ROOT" ]; then
echo ROOT environment variable is not set.
exit 1
fi
if [ ! -d $ROOT ]; then
echo Directory $ROOT does not exist: please create it before running this script.
exit 1
fi
(cd ./per_user; tar cf - .) | (cd $ROOT; tar xf -)
mkdir -p $ROOT/doc
ln -sf $DEST/index.html $ROOT/doc