releasing 3.8

This commit is contained in:
Dustin Kirkland 2010-11-10 18:29:04 -06:00
commit d99f8656e4
2 changed files with 20 additions and 11 deletions

6
debian/changelog vendored
View file

@ -1,8 +1,8 @@
byobu (3.8) unreleased; urgency=low
byobu (3.8-0ubuntu1) natty; urgency=low
* UNRELEASED
* usr/bin/byobu-janitor: fix migration to XDG, LP: #673797, #673727
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 08 Nov 2010 18:24:15 -0600
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 10 Nov 2010 18:29:01 -0600
byobu (3.7-0ubuntu1) natty; urgency=low

View file

@ -26,8 +26,23 @@ PKG="byobu"
RUN="$SOCKETDIR/S-$USER"
FLAG="$RUN/$PKG.reload-required"
# Never hurts, always helps to do this
[ -d "$DATA" ] || mkdir -p "$DATA"
# Handle xdg migration
if [ -d "$HOME/.$PKG" ]; then
# Old dir exists
if [ ! -e "$DATA" ]; then
# New dir does not; rename and link back
mkdir -p $(dirname "$DATA")
mv -f "$HOME/.$PKG" "$DATA"
ln -sf "$DATA" "$HOME/.$PKG"
elif [ -d "$DATA" ]; then
# Old and new dir exist; migrate files from old to new
mv -f "$HOME/.$PKG/"* "$DATA" 2>/dev/null
rmdir "$HOME/.$PKG"
ln -sf "$DATA" "$HOME/.$PKG"
fi
fi
# Make the directory just in case
mkdir -p "$DATA"
# Exit immediately, if we're not forced, and there is no reload flag
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
@ -40,12 +55,6 @@ PROFILE="$DATA/profile"
# Use gsed on non-Linux OS's
which gsed 2>/dev/null && SED="gsed" || SED="sed"
# If the old dir exists, but the xdg one doesn't, migrate
if [ -d "$HOME/.$PKG" ] && [ ! -e "$DATA" ]; then
mv -f "$HOME/.$PKG" "$DATA"
ln -sf "$DATA" "$HOME/.$PKG"
fi
# Create byobu-exchange buffer file, with secure permissions, if it doesn't exist
if [ -w "$RUN" ] && [ ! -e "$RUN/$PKG-exchange" ]; then
install -m 600 /dev/null "$RUN/$PKG-exchange"