wok-next diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/suggested-applications/stuff/default-app	Mon Mar 22 12:06:26 2010 +0000
     1.3 @@ -0,0 +1,36 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +APP="$1"
     1.7 +
     1.8 +# Auto Install DEPENDS and/or SUGGESTED
     1.9 +install()
    1.10 +{
    1.11 +	TMPFILE="/tmp/installlist-$$"
    1.12 +	#echo "pkgs to install: $1"
    1.13 +	for pkg in $1 ; do
    1.14 +	  	if [ ! -d /var/lib/tazpkg/installed/${pkg} ]; then
    1.15 +			echo "$pkg" >> $TMPFILE
    1.16 +		fi	
    1.17 +	done 
    1.18 +	
    1.19 +	if [ -f $TMPFILE ] ; then
    1.20 +		xterm -geometry 80x16 -title "Installing Packages (Press ENTER to close and proceed)" \
    1.21 +				-e "echo -n \"Installing packages as root. This option depends on \
    1.22 +				 `cat $TMPFILE`\"; 
    1.23 +				   echo \" \"
    1.24 +				    subox tazpkg get-install-list $TMPFILE --forced;
    1.25 +				    echo -e \"----\nPress ENTER to close and proceed further when done...\"; read i; exit 0;
    1.26 +				"
    1.27 +		rm -f $TMPFILE
    1.28 +	fi	
    1.29 +	
    1.30 +}
    1.31 +
    1.32 +if [ "$2" == "--install" ] ; then
    1.33 +	SUGGESTED="$3"
    1.34 +	install "$SUGGESTED"
    1.35 +fi
    1.36 +
    1.37 +$APP &
    1.38 +
    1.39 +exit 0