List of Debian games & scripts 2/2



Script to get list of games from by_vote popcon data:

#/bin/sh
while read line
do
test=`echo $line | cut -c 1-1`
if [ $test != "#" ]; then
   if [ $test == "-" ]; then
secondtest=`echo $line | cut -c 1-5` #just to make sure it is actually EOF
      if [ $secondtest == "-----" ]; then break; fi
   else
      packagename=`echo $line | cut -d" " -f2`
packagecategory=`apt-cache show $packagename 2>/dev/null | grep Section | cut -c 10-` if [ "$packagecategory" == "$2" -o "$packagecategory" == "main/$2" -o "$packagecategory" == "universe/$2" ]
                then
                        echo "$packagename"
                        echo "$packagename" >> $3
                fi
   fi
fi
done < $1

##############################################################################

Script to install games from games list:

#/bin/sh
while read line
do
      sudo apt-get -y install "$line"
done < $1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]