From 48f3615ba8232b00725f98bcfa55d290581b4a21 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 24 Jun 2010 10:19:42 -0500 Subject: [PATCH] usr/bin/byobu-export --- debian/changelog | 1 + usr/bin/byobu-export | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index f3bd0b49..d1de6b78 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ byobu (2.81) unreleased; urgency=low usr/bin/byobu-launcher-uninstall - usr/bin/byobu-launcher - usr/bin/byobu + - usr/bin/byobu-export * usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help text, per feedback from Turnkey Linux users diff --git a/usr/bin/byobu-export b/usr/bin/byobu-export index 54512e3f..ad135fe2 100755 --- a/usr/bin/byobu-export +++ b/usr/bin/byobu-export @@ -61,7 +61,14 @@ done if [ -z "$file" ]; then file="$TMP/$PKG.tar.gz" fi -echo "$file" | grep -qs "\.tar\.gz$" || error "Target file must be a '.tar.gz' archive" +case "$file" in + *.tar.gz) + true + ;; + *) + error "Target file must be a '.tar.gz' archive" + ;; +esac if [ -e "$file" ]; then echo `gettext "File exists"` " [$file]" echo -n "`gettext 'Remove file? [y/N] '`" @@ -95,9 +102,11 @@ ln -sf usr/share/$PKG/ec2/rates.us_ca "$DIR/.$PKG/ec2_rates" # Some gardening; update paths to be $HOME-based for i in /usr/bin/$PKG-*; do - if echo "$i" | grep -qs "install"; then - continue - fi + case "$i" in + install) + continue + ;; + esac bin=$(basename "$i") sed -i "s:$bin:\$HOME/.$PKG$i:g" $(find $DIR -type f) done