openmamba-netsrpms: remove dependency on kdialog by using license-dialog and notify-send

This commit is contained in:
Silvan Calarco 2011-06-24 14:33:07 +02:00
parent e7345535b2
commit 1829a21e95

View File

@ -32,19 +32,16 @@ fi
function check_if_already_installed() { function check_if_already_installed() {
rpm -q $1 &>/dev/null rpm -q $1 &>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
kdialog \ notify-send -i $icon "$pckname" "$pckname: "$"already installed."
--caption "$pckname" \
--msgbox "$pckname: "$"already installed."
else else
kdialog \ notify-send -i $icon "$pckname" $"There was an error installing"" $pckname!"
--caption "$pckname" \
--sorry $"There was an error installing"" $pckname!"
fi fi
} }
for pckname in $PACKAGES; do for pckname in $PACKAGES; do
icon=`grep Icon= /usr/share/applications/openmamba-$pckname.desktop | sed "s|Icon=||"`
SRPM_NAME=`\ SRPM_NAME=`\
find $DISTRO_SRPMS_DIR \ find $DISTRO_SRPMS_DIR \
-regex ".*/${pckname//+/\\+}-[^-]*-[^-]*" -printf "%f " 2>/dev/null` -regex ".*/${pckname//+/\\+}-[^-]*-[^-]*" -printf "%f " 2>/dev/null`
@ -104,16 +101,11 @@ for pckname in $PACKAGES; do
cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null
if [ -f $tmpdir/LICENSE ]; then if [ -f $tmpdir/LICENSE ]; then
kdialog \ license-dialog $tmpdir/LICENSE
--caption "LICENSE" \
--textbox $tmpdir/LICENSE 600 400
[ $? -ne 0 ] && exit 1 [ $? -ne 0 ] && exit 1
fi fi
kdialog \ notify-send -i $icon "$pckname" $"$pckname installation in progress..."
--title "$pckname" \
--passivepopup \
$"$pckname installation in progress..."
# build rpm # build rpm
echo "$me: "$"rebuilding package \`$SRPM_PATH'..." echo "$me: "$"rebuilding package \`$SRPM_PATH'..."
@ -135,14 +127,9 @@ for pckname in $PACKAGES; do
rpm -q $pckname 2>/dev/null rpm -q $pckname 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
kdialog \ notify-send -i $icon "$pckname" $"Installation of $pckname successfully completed."
--title "$pckname" \
--passivepopup \
$"Installation of $pckname successfully completed."
else else
kdialog \ notify-send -i $icon "$pckname" $"There was an error installing $pckname!"
--caption "$pckname" \
--sorry $"There was an error installing $pckname!"
fi fi
rm -rf $tmpdir $tmpfile rm -rf $tmpdir $tmpfile