Skip to content
Browse files

fix FS#28028

  • Loading branch information...
1 parent 24eee39 commit 305afaedbca9272b231eb8f294d0fe5ffed2e728 @keenerd committed Jan 21, 2012
Showing with 10 additions and 7 deletions.
  1. +4 −4 PKGBUILD
  2. +6 −3 pacmatic
View
8 PKGBUILD
@@ -1,6 +1,7 @@
-# Contributor: Kyle Keen <keenerd@gmail.com>
+# $Id$
+# Maintainer: Kyle Keen <keenerd@gmail.com>
pkgname=pacmatic
-pkgver=20110407
+pkgver=20120121
pkgrel=1
pkgdesc="A pacman wrapper to avoid bricking your system and such other surprises."
arch=('any')
@@ -10,12 +11,11 @@ depends=('pacman' 'bash' 'wget' 'pacman-contrib' 'expac')
makedepends=()
optdepends=('vim: for vimdiff')
source=(http://kmkeen.com/pacmatic/$pkgname-$pkgver.tar.gz)
-md5sums=('963c873e33bad1b0b15b0819537fb77a')
+md5sums=('d1e225b855bebfe6e7f031af1a392e14')
package() {
cd "$srcdir/$pkgname"
install -D -m 0755 $pkgname "$pkgdir/usr/bin/$pkgname"
install -D -m 0644 $pkgname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
}
-
View
9 pacmatic
@@ -23,6 +23,7 @@
# More unixy env vars.
# Merge serial seds.
# Backup db.
+# Conf file for vars.
# sledgehammer says to watch arch-dev-public and arch-commits
# (sledgehammer also reads no MLs)
@@ -121,7 +122,7 @@ check_news() # none : news (logfile)
line2=`xml_decode "$line"`
this_date=`echo -n "$line2" | cut -d ' ' -f 1 | sed 's/ //g'`
if [ $(( $this_date )) -gt $(( $last_news_date )) ]; then
- echo "$line2" | cut -d ' ' -f 2- | sed 's|<br />||g' | sed 's|\\n||g'
+ echo "$line2" | cut -d ' ' -f 2- | sed -e 's|<br />|\n|g' -e 's|\\n||g' -e 's|<p>|\n|g' -e 's|</p>||g'
echo ""
echo "$line2" >> $log_file
fi
@@ -137,7 +138,7 @@ check_checkspace() # none : return value
pacnew_count() # none : int
{
- find /etc/ \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) | wc -l
+ find /etc/ \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) 2> /dev/null | wc -l
}
docs() # none : docs
@@ -204,7 +205,9 @@ old_pc=`pacnew_count`
$pacman_program $*
exit_code=$?
exit_time=`date "+[%F %H:%M]"`
-echo "$exit_time Exited with code $exit_code" >> "$pacman_log"
+if [ -w "$pacman_log" ]; then
+ echo "$exit_time Exited with code $exit_code" >> "$pacman_log"
+fi
new_pc=`pacnew_count`
add_pc=$(( $new_pc - $old_pc ))

0 comments on commit 305afae

Please sign in to comment.
Something went wrong with that request. Please try again.