2006-12-29 05:05:30 -01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CODENAME="$1"
|
|
|
|
if [ -z "$CODENAME" ]; then
|
|
|
|
echo "usage: update_tasks CODENAME" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e /usr/share/tasksel/debian-tasks.desc ]; then
|
|
|
|
echo "tasksel must be installed to update task lists" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
update_full_list () {
|
|
|
|
file=$1
|
|
|
|
tasklist=$2
|
|
|
|
|
|
|
|
grep '\*' $file > $file.new
|
2007-12-17 18:59:42 -01:00
|
|
|
for i in $(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist); do
|
2006-12-29 05:05:30 -01:00
|
|
|
grep-aptavail -e -F Task "(^| )$i(,|$)" -s Package -n;
|
|
|
|
done >> $file.new
|
|
|
|
mv $file.new $file
|
|
|
|
}
|
|
|
|
|
|
|
|
update_essential_list () {
|
|
|
|
file=$1
|
|
|
|
tasklist=$2
|
|
|
|
desktoptask=$3
|
|
|
|
|
|
|
|
grep '\*' $file > $file.new
|
2007-12-17 18:59:42 -01:00
|
|
|
for i in $(grep -Ev "^(#.*)?[[:space:]]*$" $tasklist); do
|
2006-12-29 05:05:30 -01:00
|
|
|
if ( [ "$i" != gnome-dekstop ] &&
|
|
|
|
[ "$i" != kde-desktop ] &&
|
|
|
|
[ "$i" != xfce-desktop ] ) ||
|
|
|
|
[ "$i" = "$desktoptask" ]; then
|
|
|
|
grep-dctrl -F Task -e "^$i$" /usr/share/tasksel/debian-tasks.desc |
|
|
|
|
grep-dctrl -s Key -n -e '.*';
|
|
|
|
fi
|
|
|
|
done | sed -e 's? *??' | grep -v ^$ >> $file.new
|
|
|
|
mv $file.new $file
|
|
|
|
}
|
|
|
|
|
|
|
|
update_essential_list tasks/task-essential-$CODENAME tasks/task.list gnome-desktop
|
|
|
|
update_essential_list tasks/task-essential-$CODENAME-kde tasks/task.list.kde kde-desktop
|
|
|
|
update_essential_list tasks/task-essential-$CODENAME-xfce tasks/task.list.xfce xfce-desktop
|
|
|
|
|
|
|
|
update_full_list tasks/task-full-$CODENAME tasks/task.list
|
|
|
|
update_full_list tasks/task-full-$CODENAME-kde tasks/task.list.kde
|
|
|
|
update_full_list tasks/task-full-$CODENAME-xfce tasks/task.list.xfce
|