bootdisk/trunk/batch-installer/ui/ui-pkgs
klakier
cvs at pld-linux.org
Sat Jun 11 13:03:40 CEST 2005
Author: klakier
Date: Thu Jun 7 12:42:34 2001
New Revision: 2000
Modified:
bootdisk/trunk/batch-installer/ui/ui-pkgs (contents, props changed)
Log:
- fix
Modified: bootdisk/trunk/batch-installer/ui/ui-pkgs
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-pkgs (original)
+++ bootdisk/trunk/batch-installer/ui/ui-pkgs Thu Jun 7 12:42:34 2001
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: ui-pkgs,v 1.5 2001/06/07 00:59:35 klakier Exp $
+# $Id: ui-pkgs,v 1.6 2001/06/07 10:42:34 klakier Exp $
#set -x
@@ -170,7 +170,7 @@
grep '^[0-9A-Za-z!\*]' $groupsfile >/tmp/pkgs-data-all
# list of all packages listed in config
-grep -v '^[# \t]' $pkgsfile | sort | uniq >/tmp/pkgs-conf-packages
+grep '^[0-9A-Za-z]' $pkgsfile | sort | uniq >/tmp/pkgs-conf-packages
# list of all standard packages listed in data file
grep '^[0-9A-Za-z]' /tmp/pkgs-data-all | sort | uniq >/tmp/pkgs-data-standard
@@ -211,7 +211,7 @@
test -z "`cat /tmp/pkgs-tmp /tmp/pkgs-conf-packages | sort | uniq -d`" || pkgs_groups="$i $pkgs_groups" || :
done
-echo "Selected: $pkgs_groups"
+#echo "Selected: $pkgs_groups"
pkgs_standard_packages=`cat /tmp/pkgs-conf-standard`
@@ -239,21 +239,17 @@
<button res=1> <button res=2 caption="{{_Cancel}}">
EOF
+ # find newly added groups and unchecked groups
+ echo "$pkgs_groups" | tr ' ' '\n' >/tmp/pkgs-tmp1
+ echo "$pkgs_groups_old" | tr ' ' '\n' >/tmp/pkgs-tmp2
+ # the common part
+ cat /tmp/pkgs-tmp1 /tmp/pkgs-tmp2 | sort | uniq -d >/tmp/pkgs-tmp
+ # subtraction
+ new_groups=`cat /tmp/pkgs-tmp1 /tmp/pkgs-tmp | sort | uniq -u`
+ removed_groups=`cat /tmp/pkgs-tmp2 /tmp/pkgs-tmp | sort | uniq -u`
- if test "$pkgs_groups" != "$pkgs_groups_old"; then
-
- # find newly added groups and unchecked groups
- echo "$pkgs_groups" | tr ' ' '\n' >/tmp/pkgs-tmp1
- echo "$pkgs_groups_old" | tr ' ' '\n' >/tmp/pkgs-tmp2
- # the common part
- cat /tmp/pkgs-tmp1 /tmp/pkgs-tmp2 | sort | uniq -d >/tmp/pkgs-tmp
- # subtraction
- new_groups=`cat /tmp/pkgs-tmp1 /tmp/pkgs-tmp | sort | uniq -u`
- removed_groups=`cat /tmp/pkgs-tmp2 /tmp/pkgs-tmp | sort | uniq -u`
-
- # put standard packages as selected by default
- pkgs_standard_packages="$pkgs_standard_packages `list_standard $new_groups`"
-
+ if test "$removed_groups"; then
+ echo "Removing groups $removed_groups"
# remove all packages for removed groups
#removed_groups=`list_diff $pkgs_groups $pkgs_groups_old`
echo "$pkgs_standard_packages" | tr ' ' '\n' >/tmp/pkgs-tmp
@@ -265,6 +261,12 @@
rm -fr /tmp/pkgs-tmp /tmp/pkgs-tmp1 /tmp/pkgs-tmp2
fi
+ if test "$new_groups"; then
+ echo "Adding groups $removed_groups"
+ # put standard packages as selected by default
+ pkgs_standard_packages="$pkgs_standard_packages `list_standard $new_groups`"
+ fi
+
# res is used by all dialogs, change to result
result=$res
case "$result" in
More information about the pld-cvs-commit
mailing list