diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index f23da5f..2d6fbcf 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -1,4 +1,4 @@ -Thu Feb 19 21:47:06 UTC 2009 +Sun Feb 22 05:04:02 UTC 2009 Sbopkg 0.XX.X released. This version contains the following fixes and enhancements: @@ -17,9 +17,10 @@ enhancements: * Assorted menu navigation fixes, and document -p switch in sbopkg(8) man page; thanks to Mauro Giachero for these improvements. * Add ability to view a diff of an edited .info or SlackBuild file before - choosing which one to use; thanks to Phillip Warner for the suggestion and - thanks to Mauro Giachero for helping debug/improve my original - implemenation. + choosing which one to use; this feature adds two configuration variables + to the sbopkg.conf file: DIFF and DIFFOPTS; thanks to Phillip Warner for + the suggestion and thanks to Mauro Giachero for helping debug/improve my + original implemenation. * Add ability to view more files in each application's folder, i.e. doinst.sh, or *.desktop files; thanks to Phillip Warner for the suggestion and thanks to slakmagik for the patch implementing this feature. @@ -29,9 +30,9 @@ enhancements: * Allow the usage of the -d, -f and -v command-line options in dialog mode, and spit an error message when the command line contains unrecognized tokens. - * Implement a workaround so that the dialog interface now works with - rxvt-based terminals. Thanks to Phillip Warner for raising the issue and - thanks to Mauro Giachero for working on the implementation. + * Implement a workaround so that the dialog interface now works better with + GNU Screen and rxvt-based terminals. Thanks to Phillip Warner for raising + the issue and thanks to Mauro Giachero for working on the implementation. * Include a French translation of the two sbopkg man pages. For now, these man pages will be included in the /doc directory until I have time to figure out whether they can be automatically installed in place of the diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index f4edc75..c41c9f2 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -27,3 +27,5 @@ DEBUG=0 # change these default values. RSYNCFLAGS="--verbose --timeout=10" WGETFLAGS="--continue --progress=bar --timeout=15 --tries=5" +DIFF=${DIFF:-diff} +DIFFOPTS=${DIFFOPTS:--u} diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 388f5e9..76cdc07 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -99,7 +99,7 @@ config_check () { KEEPLOG=$(echo "$KEEPLOG" | tr [[:lower:]] [[:upper:]]) # Some configuration options are mandatory for VAR in RSYNCMIRROR SLACKVER LOCALREPO SRCDIR TMP OUTPUT QUEUEDIR \ - KEEPLOG LOGFILE DEBUG RSYNCFLAGS WGETFLAGS; do + KEEPLOG LOGFILE DEBUG RSYNCFLAGS WGETFLAGS DIFF DIFFOPTS; do if [ -z "${!VAR}" ]; then MISSING+="$VAR " fi @@ -2260,7 +2260,7 @@ pick_file () { fi PICKFILE="original" if [[ -f $PKGPATH/$PKG.$FILE.sbopkg ]]; then - ${DIFF:-diff} ${DIFFOPTS:--u} $PKGPATH/$PKG.$FILE{,.sbopkg} \ + $DIFF $DIFFOPTS $PKGPATH/$PKG.$FILE{,.sbopkg} \ > $TMP/sbopkg_diff fi if [[ -s $TMP/sbopkg_diff ]]; then diff --git a/src/usr/man/man5/sbopkg.conf.5 b/src/usr/man/man5/sbopkg.conf.5 index 243e678..25427f6 100644 --- a/src/usr/man/man5/sbopkg.conf.5 +++ b/src/usr/man/man5/sbopkg.conf.5 @@ -97,7 +97,7 @@ be kept. The default value of QUEUEDIR is: .br -QUEUEDIR=$TMP/queues +QUEUEDIR=$TMP/queues. .TP 5 .B KEEPLOG @@ -165,6 +165,26 @@ The default value of WGETFLAGS is: .br "--continue --progress-bar --timeout=15 --tries=5". +.TP 5 +.B DIFF +.br +This option allows the user to set which diff program to use when +sbopkg displays differences between edited files. + +The default value of DIFF is: +.br +DIFF=${DIFF:-diff}. + +.TP 5 +.B DIFFOPTS +.br +This option allows the user to set which options are used by the $DIFF +program when sbopkg displays differences between edited files. + +The default value of DIFFOPTS is: + +DIFFOPTS=${DIFFOPTS:--u} + .SH FILES .TP 5 .B /etc/sbopkg/sbopkg.conf