-
Notifications
You must be signed in to change notification settings - Fork 116
/
ipkg_install_all.sh
executable file
·47 lines (47 loc) · 1.24 KB
/
ipkg_install_all.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
#!/bin/sh
#
# $Id: ipkg_install_all.sh 336 2012-08-04 00:12:14Z [email protected] $
#
. "./shared.inc"
### 20110225-MCT The VERSION is set in the shared.inc file from a single external source now.
VERSION="${SHARED_VERSION}"
#
# Title: ipkg_install_all.sh
# Author: Jeremy Collake <[email protected]>
# Site: hhttp://code.google.com/p/firmware-mod-kit/
#
# Invoke ipkg_install for every package in the given
# folder.
#
# See documentation at:
# http://www.bitsum.com/firmware_mod_kit.htm
#
# USAGE: ipkg_install_all.sh PACKAGES_FOLDER WORKING_DIRECTORY/
#
# PACKAGE_SOURCE is the path to the .PKG file(s).
#
# WORKING_DIRECTORY is the working directory supplied to
# extract_firmware.sh.
#
# Example:
#
# ./ipkg_install_all.sh ../packages ../working_dir/
#
echo "$0 v$VERSION, (c)2006-2012 Jeremy Collake"
##################################################
if [ ! $# = "2" ]; then
echo " Invalid usage"
echo " USAGE: $0 PACKAGE_PATH WORKING_DIRECTORY"
exit 1
fi
BASE_NAME=`basename $1`
echo " Installing $BASE_NAME"
##################################################
if [ ! -e "$1" ]; then
echo " ERROR: $1 does not exist."
exit 1
fi
##################################################
for i in $( ls "$1" ); do
./ipkg_install.sh $1/$i $2
done