22 |
# to Tobias Gruetzmacher who reported this bug) |
# to Tobias Gruetzmacher who reported this bug) |
23 |
# 2003-09-04 moved do_sudo before first call (fixes bug when trying to |
# 2003-09-04 moved do_sudo before first call (fixes bug when trying to |
24 |
# install iselect) |
# install iselect) |
25 |
# 2003-10-09 allow multi-selection of packages to view and install |
# 2003-10-09 allow multi-selection of packages to view details |
26 |
# 2003-11-13 fix for RedHat 9.0 mktemp bug suggested by Dobes Vandermeer |
# 2003-11-13 fix for RedHat 9.0 mktemp bug suggested by Dobes Vandermeer |
27 |
|
# 2004-07-27 allow multi-selection of packages to install |
28 |
|
# 2004-12-04 Add quick install options |
29 |
# |
# |
30 |
# I know it's ugly, but it's still faster than aptitude :-) |
# I know it's ugly, but it's still faster than aptitude :-) |
31 |
# |
# |
72 |
rmtemp() { |
rmtemp() { |
73 |
rm -f $res |
rm -f $res |
74 |
rm -f $res2 |
rm -f $res2 |
75 |
|
test -f $sel && rm -f $sel |
76 |
rm -f $pkg |
rm -f $pkg |
77 |
} |
} |
78 |
|
|
96 |
echo >> $res2 |
echo >> $res2 |
97 |
cat $res | sed 's/^/{s}/' >> $res2 |
cat $res | sed 's/^/{s}/' >> $res2 |
98 |
fi |
fi |
99 |
|
if [ $nr -gt 0 ] ; then |
100 |
|
echo >> $res2 |
101 |
|
echo "{s:_quick_install_}Install all selected" >> $res2 |
102 |
|
fi |
103 |
echo >> $res2 |
echo >> $res2 |
104 |
echo "Enter new apt-cache search {s:search=%[Search for]S}" >> $res2 |
echo "Enter new apt-cache search {s:search=%[Search for]S}" >> $res2 |
105 |
} |
} |
119 |
elif tmp=`grep search= <$sel 2>/dev/null` ; then |
elif tmp=`grep search= <$sel 2>/dev/null` ; then |
120 |
apt_cache_search `echo $tmp | grep search= | cut -d= -f2` |
apt_cache_search `echo $tmp | grep search= | cut -d= -f2` |
121 |
loop=1 |
loop=1 |
122 |
|
elif tmp=`grep -i ':_quick_install_' $sel` ; then |
123 |
|
debs=`grep -v ':_quick_install_' $sel | cut -d: -f2 | cut -d" " -f1 | xargs echo` |
124 |
|
do_sudo "Installing '$debs'" apt-get install $debs |
125 |
else |
else |
126 |
# not search, find packages info |
# not search, find packages info |
127 |
|
|
141 |
done |
done |
142 |
echo '{s}Back to search results' >> $pkg |
echo '{s}Back to search results' >> $pkg |
143 |
|
|
144 |
tmp=`iselect -d '{,}' -n "Packages: $pkg_list" < $pkg` |
tmp=`iselect -d '{,}' -n "Packages: $pkg_list" -m < $pkg` |
145 |
if echo $tmp | grep -i back >/dev/null ; then |
if echo $tmp | grep -i back >/dev/null ; then |
146 |
loop=1 |
loop=1 |
147 |
elif echo $tmp | grep '^Package: ' >/dev/null ; then |
elif echo $tmp | grep '^Package: ' >/dev/null ; then |
148 |
deb=`echo $tmp | sed 's,{b/*},,g' | cut -d: -f2 | sed 's/^ *//'` |
deb=`echo $tmp | sed -e 's,{b/*},,g' -e 's,Package: *,,g'` |
149 |
do_sudo "Installing '$deb'" apt-get install $deb |
do_sudo "Installing '$deb'" apt-get install $deb |
150 |
elif [ -z "$tmp" ] ; then |
elif [ -z "$tmp" ] ; then |
151 |
loop=1 |
loop=1 |