wok-current annotate suggested-applications/stuff/default-app @ rev 5130
Add slitaz suggested-applications
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Mon Mar 22 12:06:26 2010 +0000 (2010-03-22) |
parents | |
children | 67404973a113 |
rev | line source |
---|---|
jozee@5130 | 1 #!/bin/sh |
jozee@5130 | 2 |
jozee@5130 | 3 APP="$1" |
jozee@5130 | 4 |
jozee@5130 | 5 # Auto Install DEPENDS and/or SUGGESTED |
jozee@5130 | 6 install() |
jozee@5130 | 7 { |
jozee@5130 | 8 TMPFILE="/tmp/installlist-$$" |
jozee@5130 | 9 #echo "pkgs to install: $1" |
jozee@5130 | 10 for pkg in $1 ; do |
jozee@5130 | 11 if [ ! -d /var/lib/tazpkg/installed/${pkg} ]; then |
jozee@5130 | 12 echo "$pkg" >> $TMPFILE |
jozee@5130 | 13 fi |
jozee@5130 | 14 done |
jozee@5130 | 15 |
jozee@5130 | 16 if [ -f $TMPFILE ] ; then |
jozee@5130 | 17 xterm -geometry 80x16 -title "Installing Packages (Press ENTER to close and proceed)" \ |
jozee@5130 | 18 -e "echo -n \"Installing packages as root. This option depends on \ |
jozee@5130 | 19 `cat $TMPFILE`\"; |
jozee@5130 | 20 echo \" \" |
jozee@5130 | 21 subox tazpkg get-install-list $TMPFILE --forced; |
jozee@5130 | 22 echo -e \"----\nPress ENTER to close and proceed further when done...\"; read i; exit 0; |
jozee@5130 | 23 " |
jozee@5130 | 24 rm -f $TMPFILE |
jozee@5130 | 25 fi |
jozee@5130 | 26 |
jozee@5130 | 27 } |
jozee@5130 | 28 |
jozee@5130 | 29 if [ "$2" == "--install" ] ; then |
jozee@5130 | 30 SUGGESTED="$3" |
jozee@5130 | 31 install "$SUGGESTED" |
jozee@5130 | 32 fi |
jozee@5130 | 33 |
jozee@5130 | 34 $APP & |
jozee@5130 | 35 |
jozee@5130 | 36 exit 0 |