3
# <zaurus@bredband.net>
4
# Modified by Aman Gupta <oz@themastermind1.net>
8
echo " $0 add packagename (links \"packagename\" to root filesystem)"
9
echo " $0 remove packagename (unlinks \"packagename\" from root filesystem)"
10
echo " $0 list mountpoint (lists packages on \"mountpoint\", e.g. '/mnt/card')"
11
echo " $0 mount mountpoint (links all packages on \"mountpoint\", e.g. '/mnt/card')"
12
echo " $0 umount mountpoint (unlinks all packages on \"mountpoint\", e.g. '/mnt/card')"
17
echo "*** Locating package"
18
# Does the list file exist?
19
if [ -e "/mnt/card/usr/lib/ipkg/info/$PACKAGE.list" ]; then
22
if [ -e "/mnt/cf/usr/lib/ipkg/info/$PACKAGE.list" ]; then
25
if [ -e "/mnt/ram/usr/lib/ipkg/info/$PACKAGE.list" ]; then
28
echo "Package \"$PACKAGE\" not found."
33
files=`cat "$PREFIX/usr/lib/ipkg/info/$PACKAGE.list"`
34
echo "*** Found package on $PREFIX"
38
echo "*** Adding $PACKAGE"
41
if [ ! -e "$line" ]; then
42
# Only if it doesn't already exist.
43
if [ -d "$PREFIX$line" ]; then
48
`ln -s "$PREFIX$line" "$line"`
55
echo "*** Removing $PACKAGE"
56
files=`cat "$PREFIX/usr/lib/ipkg/info/$PACKAGE.list" | sort -r`
59
if [ -e "$line" ]; then
60
# File/Directory exists.
61
if [ -d "$line" ]; then
63
contents=$(ls -1 "$line")
64
if [ ! "$contents" ]; then
68
elif [ -L "$line" ]; then
77
files=`ls -1 $LOCATION/usr/lib/ipkg/info/*.list`
78
for filename in $files; do
79
filename=${filename##*/}
80
filename=${filename%%.list}
81
filelist="$filelist $filename"
94
echo "*** Command: $COMMAND"
106
for file in $filelist; do
112
for file in $filelist; do
118
for file in $filelist; do