forked from vicgarin/Actiontec-V1000H
-
Notifications
You must be signed in to change notification settings - Fork 0
/
consumer_install
executable file
·80 lines (74 loc) · 2.33 KB
/
consumer_install
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
66
67
68
69
70
71
72
73
74
75
76
77
78
#! /bin/bash
bi_this_dir=`pwd`
bi_src_base=/opt
bi_crosstools_dir=/opt/toolchains/uclibc-crosstools-gcc-4.4.2-1
clear
echo ""
echo "This script installs BCM963xx DSL router components onto your Linux PC. The"
echo "installation will overwrite existing files. You will be prompted before a"
echo "component is installed."
echo ""
echo ""
read -p "Press 'y' to continue: " -n 1 dr_continue
echo ""
if [ "$dr_continue" != "y" ] ; then
echo "";
echo "exiting script";
echo "";
exit
fi
for f in *
do
case $f in
bcm963*_consumer.tar.gz)
bi_src_dir=$bi_src_base/bcm963xx_router
echo ""
echo "The bcm963xx DSL router source files are ready to be installed at "
echo "$bi_src_dir. Existing source files, in any, will be overwritten. "
echo ""
read -p "Press 'y' to install the bcm963xx DSL router source files: " -n 1 dr_continue
echo ""
echo ""
if [ "$dr_continue" == "y" ] ; then
echo ""
if ! [ -d $bi_src_dir ] ; then
echo "Creating directory $bi_src_dir."
echo ""
mkdir -p $bi_src_dir
fi
if [ -d $bi_src_dir ] ; then
echo "Installing files from $bi_this_dir/$f."
echo ""
cd $bi_src_dir
tar xfz $bi_this_dir/$f
chmod -R 777 * .*
cd $bi_this_dir
else
echo "The directory $bi_src_dir does not exist."
echo "The BCM963xx DSL router source files were not installed."
fi
else
echo "The BCM963xx DSL router source files were not installed."
fi
echo ""
;;
uclibc-crosstools*.tar.bz2)
echo ""
echo "The BCM963xx DSL router toolchain is ready to be installed at $bi_crosstools_dir."
echo "Existing toolchain files, if any, will be overwritten."
echo ""
read -p "Press 'y' to install the BCM963xx toolchain: " -n 1 dr_continue
echo ""
echo ""
if [ "$dr_continue" == "y" ] ; then
echo ""
echo "Installing files from $bi_this_dir/$f."
echo ""
tar xPfj $bi_this_dir/$f
else
echo "The BCM963xx toolchain was not installed."
fi
echo ""
;;
esac
done