usr/bin/byobu-export: correct paths to their new locations, LP: #507461

This commit is contained in:
Dustin Kirkland 2010-01-18 09:14:36 +13:00
commit 98effe30bd
2 changed files with 15 additions and 6 deletions

5
debian/changelog vendored
View file

@ -1,9 +1,12 @@
byobu (2.48) unreleased; urgency=low
[ darwinawdwinner@gmail.com ]
[ launchpad.net/~rct86 ]
* usr/bin/byobu-launcher: use screen -wipe, instead of screen -ls, to
clean up destroyed sessions, LP: #508609
[ launchpad.net/~dperson ]
* usr/bin/byobu-export: correct paths to their new locations, LP: #507461
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 12 Jan 2010 12:14:16 -0600
byobu (2.47-0ubuntu1) lucid; urgency=low

View file

@ -38,7 +38,7 @@ usage() {
error() {
echo "ERROR: $1" 1>&2
[ "$generated" = "1" -a -f "$file" ] && rm -f "$file"
[ -f "$file" ] && rm -f "$file"
exit 1
}
@ -75,7 +75,7 @@ fi
# Create workspace
for i in etc usr/bin usr/lib usr/share/doc; do
mkdir -p "$DIR/.$PKG/$i/$PKG"
mkdir -p "$DIR/.$PKG/$i"
done
dpkg-query --show --showformat '${Package} ${Version}\n' $PKG > "$DIR/.$PKG/version" 2>/dev/null || true
echo "http://launchpad.net/$PKG" >> "$DIR/.$PKG/version"
@ -90,15 +90,21 @@ cp -a /usr/bin/$PKG-* "$DIR/.$PKG/usr/bin"
cp /etc/$PKG/statusrc "$DIR/.$PKG/status"
echo "source \$HOME/.$PKG/profile" > "$DIR/.screenrc"
echo "source \$HOME/.$PKG/usr/share/$PKG/keybindings/common" > "$DIR/.$PKG/keybindings"
cd $DIR/.$PKG; ln -s usr/lib/$PKG bin; cd -
cd $DIR/.$PKG; ln -s usr/share/$PKG/profiles/common profile; cd -
ln -s usr/share/$PKG/profiles/common profile; cd -
# Some gardening; update paths to be $HOME-based
for i in $(ls /usr/bin/$PKG-* | grep -v "install"); do
bin=$(basename "$i")
sed -i "s:$bin:\$HOME/.$PKG$i:g" $(find $DIR -type f)
done
sed -i "s:/etc/\$PKG:\$HOME/.$PKG/etc/\$PKG:g" $(find $DIR -type f)
for i in /etc/ /usr/lib/ /usr/share/; do
sed -i "s:$i$PKG:\$HOME/.$PKG$i$PKG:g" $(find $DIR -type f)
sed -i "s:$i\$PKG:\$HOME/.$PKG$i\$PKG:g" $(find $DIR -type f)
sed -i "s:\$HOME/\.$PKG$i\$HOME/\.$PKG$i:\$HOME/.$PKG$i:g" $(find $DIR -type f)
done
+sed -i "s:\$HOME/\.$PKG\$HOME/\.$PKG:\$HOME/.$PKG:g" $(find $DIR -type f)
+sed -i "s:\$HOME/\.$PKG/usr/bin/\$HOME/\.$PKG/usr/bin/:\$HOME/.$PKG/usr/bin/:g" $(find $DIR -type f)
rm -f $DIR/.$PKG/usr/bin/$PKG-export
# tar up the results