projects
/
grml-scripts-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update changelog
[grml-scripts-core.git]
/
usr_bin
/
grml-slrn
diff --git
a/usr_bin/grml-slrn
b/usr_bin/grml-slrn
index
a59e3b3
..
763296c
100755
(executable)
--- a/
usr_bin/grml-slrn
+++ b/
usr_bin/grml-slrn
@@
-4,7
+4,6
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Sun Jan 15 22:46:00 CET 2006 [mika]
################################################################################
PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'}
################################################################################
PATH=${PATH:-'/bin/:/sbin/:/usr/local/bin:/usr/bin:/usr/sbin'}
@@
-12,6
+11,11
@@
PN=$(basename "$0")
USER=$(grep \`whoami\` /etc/passwd | cut -d: -f5 | cut -d, -f1)
HOST=$(hostname -f)
USER=$(grep \`whoami\` /etc/passwd | cut -d: -f5 | cut -d, -f1)
HOST=$(hostname -f)
+if [ -r /etc/grml/script-functions ] ; then
+ . /etc/grml/script-functions
+ check4progs dialog slrn || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 ; }
+fi
+
[ -z "$EDITOR" ] && EDITOR='vim'
[ -z "$NNTPSERVER" ] && NNTPSERVER="news.`hostname`"
[ -z "$EDITOR" ] && EDITOR='vim'
[ -z "$NNTPSERVER" ] && NNTPSERVER="news.`hostname`"
@@
-28,7
+32,6
@@
cat > $SLRNRC << EOF
% Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
% Bug-Reports: see http://grml.org/bugs/
% License: This file is licensed under the GPL v2.
% Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
% Bug-Reports: see http://grml.org/bugs/
% License: This file is licensed under the GPL v2.
-% Latest change: Son Nov 28 22:38:30 CET 2004 [mika]
%###############################################################################
%###############################################################################
%###############################################################################
%###############################################################################
@@
-111,9
+114,9
@@
cat > $SLRNRC << EOF
set spoiler_display_mode 1
set spoiler_display_mode 1
- set charset isolatin
set use_mime 1
set use_mime 1
- set mime_charset "iso-8859-15"
+% set charset isolatin
+% set mime_charset "iso-8859-15"
set sorting_method 5
set check_new_groups 1 % let slrn check for new newsgroups
set sorting_method 5
set check_new_groups 1 % let slrn check for new newsgroups
@@
-222,7
+225,7
@@
mono quotes5 "underline"
mono quotes6 "underline"
mono quotes7 "underline"
mono response_char "bold"
mono quotes6 "underline"
mono quotes7 "underline"
mono response_char "bold"
-mono selection "bold"
+mono selection "bold"
mono signature "none"
mono status "reverse"
mono subject "none"
mono signature "none"
mono status "reverse"
mono subject "none"
@@
-293,10
+296,10
@@
case $retval in
esac
writecolors() {
esac
writecolors() {
- if [ "$COLOR" =
=
'light' ] ; then
+ if [ "$COLOR" = 'light' ] ; then
lightcolors
fi
lightcolors
fi
- if [ "$COLOR" =
=
'dark' ] ; then
+ if [ "$COLOR" = 'dark' ] ; then
darkcolors
fi
}
darkcolors
fi
}
@@
-308,25
+311,23
@@
WRITESLRNRC=$(dialog --stdout --title "$PN" --yesno "Write $SLRNRC?" 5 65)
retval=$?
case $retval in
retval=$?
case $retval in
- 0)
+ 0)
if [ -f "$SLRNRC" ] ; then
dialog --stdout --title "$PN" --yesno "$SLRNRC exists. Overwrite?" 5 65
retval=$?
case $retval in
if [ -f "$SLRNRC" ] ; then
dialog --stdout --title "$PN" --yesno "$SLRNRC exists. Overwrite?" 5 65
retval=$?
case $retval in
- 0)
+ 0)
writeslrnrc && writecolors && \
dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successful." 7 65 || \
writeslrnrc && writecolors && \
dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successful." 7 65 || \
- dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65
+ { dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65 ; exit 1 ; }
;;
;;
-# *) exit 1 ;;
esac
else
writeslrnrc && writecolors && \
dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successfull." 7 65 || \
esac
else
writeslrnrc && writecolors && \
dialog --stdout --title "$PN" --msgbox "Writing $SLRNRC was successfull." 7 65 || \
- dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65
+ { dialog --stdout --title "$PN" --msgbox "Error $?: writing $SLRNRC failed." 7 65 ; exit 1 ; }
fi
;;
fi
;;
-# *) exit 1 ;;
esac
infoscreen
esac
infoscreen
@@
-335,11
+336,11
@@
ASKRUN=$(dialog --stdout --title "$PN" --yesno "Run slrn now?" 0 0)
retval=$?
case $retval in
retval=$?
case $retval in
- 0)
+ 0)
slrn -create -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC && \
slrn -create -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC && \
- echo "
"
-
echo "
Start slrn with taken settings via:
-
$
slrn -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC
+ echo "
+Start slrn with taken settings via:
+
%
slrn -h $NEWSSERVER -f $HOME/.newsrc_$NEWSSERVER -i $SLRNRC
Thanks for using $PN and have fun with slrn!"
;;
Thanks for using $PN and have fun with slrn!"
;;