Skip to content

Commit

Permalink
postinst
Browse files Browse the repository at this point in the history
  • Loading branch information
matttbe committed Apr 25, 2011
1 parent f3a5536 commit 1a1c1b8
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 0 deletions.
29 changes: 29 additions & 0 deletions hardy/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

29 changes: 29 additions & 0 deletions karmic/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

29 changes: 29 additions & 0 deletions lucid/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

29 changes: 29 additions & 0 deletions maverick/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

29 changes: 29 additions & 0 deletions natty/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

11 changes: 11 additions & 0 deletions next-ubuntu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
A changé:
* les man pages
- (cairo-dock-core.install) => debian/tmp/usr/man/
- rules
* (cairo-dock-data.install) => debian/tmp/usr/bin/cairo-dock-package-theme

lintian -i blah.dsc
lintian -i -I --show-overrides gentoo_0.9.12-1_i386.changes

W: cairo-dock source: out-of-date-standards-version 3.8.3 (current is 3.9.1)
E: cairo-dock source: not-binnmuable-all-depends-any cairo-dock-dev -> cairo-dock-core
29 changes: 29 additions & 0 deletions postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

RIGHT="\e["70"\`" # => [ OK ]
OK="$RIGHT [ OK ]"
FAIL="$RIGHT [ FAIL ]"

case "$1" in
configure)
# We have to change the directory in the ppa
if [[ `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/` ]]; then
echo -e -n "[Cairo-Dock-Team] Repository: \n * Updated your sources.list (repository.glx-dock.org => download.tuxfamily.org/glxdock/repository)"
rm -rf /tmp/cairo-dock-dpkg
mkdir /tmp/cairo-dock-dpkg
for i in `grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/`; do
cp $i /tmp/cairo-dock-dpkg/
done
grep -rl "^deb http://repository.glx-dock.org/" /etc/apt/ | xargs sed -i "s/http:\/\/repository\.glx-dock\.org/http:\/\/download.tuxfamily.org\/glxdock\/repository/g"
if [ $? -eq 0 ]; then
rm -r /tmp/cairo-dock-dpkg
echo -e "$OK"
else
echo -e "$FAIL\nPlease update our ppa (cairo-dock-team/debian/ubuntu) from $BEFORE to $AFTER in your sources.list"
cp -R /tmp/cairo-dock-dpkg/* /etc/apt/
fi
fi
;;
esac

0 comments on commit 1a1c1b8

Please sign in to comment.