Skip to content
Snippets Groups Projects
Commit 5286c45f authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

update grml-zsh-config config

parent d4e87083
No related branches found
No related tags found
No related merge requests found
...@@ -50,119 +50,97 @@ index 3aed935..c4ff58b 100644 ...@@ -50,119 +50,97 @@ index 3aed935..c4ff58b 100644
+grml-zsh-config: diversion-for-unknown-file *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst:35 +grml-zsh-config: diversion-for-unknown-file *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst:35
+grml-zsh-config: orphaned-diversion *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst +grml-zsh-config: orphaned-diversion *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst
diff --git a/debian/postrm b/debian/postrm diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755 index 72da544..9bb8222 100755
index 72da544..0000000
--- a/debian/postrm --- a/debian/postrm
+++ /dev/null +++ b/debian/postrm
@@ -1,44 +0,0 @@ @@ -1,6 +1,6 @@
-#!/bin/sh #!/bin/sh
-# Filename: postrm # Filename: postrm
-# Purpose: postrm script for package grml-etc-core -# Purpose: postrm script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org> +# Purpose: postrm script for package grml-zsh-config
-# Bug-Reports: see http://grml.org/bugs/ # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# License: This file is licensed under the GPL v2. # Bug-Reports: see http://grml.org/bugs/
-################################################################################ # License: This file is licensed under the GPL v2.
- @@ -10,12 +10,11 @@ set -e
-set -e
- TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc"
-TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc" TO_UNDIVERT2=".zshrc"
-TO_UNDIVERT2=".zshrc"
-TO_UNDIVERT3="vimrc" -TO_UNDIVERT3="vimrc"
-
-undivert_gen() { undivert_gen() {
- if [ -f "$2/$1" -o "$2/$1".original ] ; then if [ -f "$2/$1" -o "$2/$1".original ] ; then
- DEXT=${3:-original} DEXT=${3:-original}
- dpkg-divert --remove --rename --package grml-etc-core \ - dpkg-divert --remove --rename --package grml-etc-core \
- --divert $2/$1.$DEXT $2/$1 #> /dev/null + dpkg-divert --remove --rename --package grml-zsh-config \
- fi --divert $2/$1.$DEXT $2/$1 #> /dev/null
-} fi
- }
-case "$1" in @@ -28,9 +27,6 @@ case "$1" in
- purge) for cmd in $TO_UNDIVERT2; do
- for cmd in $TO_UNDIVERT1; do undivert_gen $cmd /etc/skel
- undivert_gen $cmd /etc/zsh done
- done
- for cmd in $TO_UNDIVERT2; do
- undivert_gen $cmd /etc/skel
- done
- for cmd in $TO_UNDIVERT3; do - for cmd in $TO_UNDIVERT3; do
- undivert_gen $cmd /etc/vim - undivert_gen $cmd /etc/vim
- done - done
- ;; ;;
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;; ;;
- *)
- echo "postrm called with unknown argument $1" >&2
- exit 1
-esac
-
-exit 0
-
-## END OF FILE #################################################################
diff --git a/debian/preinst b/debian/preinst diff --git a/debian/preinst b/debian/preinst
deleted file mode 100755 index c30e103..c5227d5 100755
index c30e103..0000000
--- a/debian/preinst --- a/debian/preinst
+++ /dev/null +++ b/debian/preinst
@@ -1,56 +0,0 @@ @@ -1,6 +1,6 @@
-#!/bin/sh #!/bin/sh
-# Filename: preinst # Filename: preinst
-# Purpose: preinst script for package grml-etc-core -# Purpose: preinst script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org> +# Purpose: preinst script for package grml-zsh-config
-# Bug-Reports: see http://grml.org/bugs/ # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# License: This file is licensed under the GPL v2. # Bug-Reports: see http://grml.org/bugs/
-################################################################################ # License: This file is licensed under the GPL v2.
- @@ -16,33 +16,33 @@ backup_conffile() {
-set -e if [ -e "$CONFFILE.dpkg-bak" -a -e "$CONFFILE" ]; then
- cp -f "$CONFFILE" "$CONFFILE".original
-# check for files from rm_conffile() in debian/preinst of grml-etc else
-# make sure we don't lose any files...
-backup_conffile() {
- CONFFILE="$1"
-
- if [ -e "$CONFFILE.dpkg-bak" -a -e "$CONFFILE" ]; then
- cp -f "$CONFFILE" "$CONFFILE".original
- else
- [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-etc-core || true - [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-etc-core || true
- fi + [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-zsh-config || true
-} fi
- }
-case "$1" in
- install|upgrade|configure) case "$1" in
- TMP=$$ install|upgrade|configure)
TMP=$$
- # move files from package grml-etc to grml-etc-core, make sure - # move files from package grml-etc to grml-etc-core, make sure
- # we don't lose any files... + # move files from package grml-etc to grml-zsh-config, make sure
- for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \ # we don't lose any files...
for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \
- /etc/zsh/zlogout /etc/vim/vimrc /etc/tmux.conf; do - /etc/zsh/zlogout /etc/vim/vimrc /etc/tmux.conf; do
- [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true + /etc/zsh/zlogout ; do
- backup_conffile $file && \ [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true
- [ -f "$file" ] && rm $file && \ backup_conffile $file && \
[ -f "$file" ] && rm $file && \
- dpkg-divert --quiet --add --rename --package grml-etc-core --divert "$file".original $file && \ - dpkg-divert --quiet --add --rename --package grml-etc-core --divert "$file".original $file && \
- [ -f "$file".dpkg-bak ] && mv -f "$file".dpkg-bak "$file" + dpkg-divert --quiet --add --rename --package grml-zsh-config --divert "$file".original $file && \
[ -f "$file".dpkg-bak ] && mv -f "$file".dpkg-bak "$file"
- [ -f "$file".grml-etc-core ] && mv -f "$file".grml-etc-core "$file" - [ -f "$file".grml-etc-core ] && mv -f "$file".grml-etc-core "$file"
- [ -e "${file}.tmp.$TMP" ] && mv -f "${file}.tmp.$TMP" "$file.original" + [ -f "$file".grml-zsh-config ] && mv -f "$file".grml-zsh-config "$file"
- [ -e "${file}.tmp.$TMP" ] && mv -f "${file}.tmp.$TMP" "$file.original"
- # trying to overwrite `/etc/skel/.zshrc', which is also in package zsh
- # [ -f /etc/skel/.zshrc ] && \ # trying to overwrite `/etc/skel/.zshrc', which is also in package zsh
# [ -f /etc/skel/.zshrc ] && \
- # dpkg-divert --quiet --add --rename --package grml-etc-core --divert /etc/skel/.zshrc.original /etc/skel/.zshrc - # dpkg-divert --quiet --add --rename --package grml-etc-core --divert /etc/skel/.zshrc.original /etc/skel/.zshrc
- done + # dpkg-divert --quiet --add --rename --package grml-zsh-config --divert /etc/skel/.zshrc.original /etc/skel/.zshrc
- done
- if dpkg-divert --list grml-etc-core 2>/dev/null | grep -q /etc/skel/.zshrc.original ; then - if dpkg-divert --list grml-etc-core 2>/dev/null | grep -q /etc/skel/.zshrc.original ; then
- mv -f /etc/skel/.zshrc.original /etc/skel/.zshrc.original.old && \ + if dpkg-divert --list grml-zsh-config 2>/dev/null | grep -q /etc/skel/.zshrc.original ; then
mv -f /etc/skel/.zshrc.original /etc/skel/.zshrc.original.old && \
- dpkg-divert --remove --rename --package grml-etc-core /etc/skel/.zshrc - dpkg-divert --remove --rename --package grml-etc-core /etc/skel/.zshrc
- fi + dpkg-divert --remove --rename --package grml-zsh-config /etc/skel/.zshrc
- fi
- ;;
- *) ;;
- echo "preinst called with unknown argument $1" >&2
- exit 1
-esac
-
-exit 0
-
-## END OF FILE #################################################################
diff --git a/debian/rules b/debian/rules diff --git a/debian/rules b/debian/rules
index 7bf93ff..b49fc95 100755 index 7bf93ff..ebe8ef9 100755
--- a/debian/rules --- a/debian/rules
+++ b/debian/rules +++ b/debian/rules
@@ -19,7 +19,7 @@ clean: @@ -19,7 +19,7 @@ clean:
...@@ -182,8 +160,8 @@ index 7bf93ff..b49fc95 100755 ...@@ -182,8 +160,8 @@ index 7bf93ff..b49fc95 100755
- cp -a etc/ debian/grml-etc-core/ - cp -a etc/ debian/grml-etc-core/
- cp -a usr_share_grml/ debian/grml-etc-core/usr/share/grml - cp -a usr_share_grml/ debian/grml-etc-core/usr/share/grml
+ # Add here commands to install the package into debian/grml-zsh-config. + # Add here commands to install the package into debian/grml-zsh-config.
+ cp -a etc/skel/.zshrc debian/grml-zsh-config/skel/ + cp -a etc/skel/.zshrc debian/grml-zsh-config/etc/skel/
+ cp -a etc/zsh debian/grml-zsh-config/ + cp -a etc/zsh debian/grml-zsh-config/etc/
# Build architecture-dependent files here. # Build architecture-dependent files here.
binary-arch: build install binary-arch: build install
......
#!/bin/bash #!/bin/bash
echo "deb-src http://deb.grml.org/ grml-stable main" > /etc/apt/sources.list.d/grml_src.list git clone https://github.com/grml/grml-etc-core grml-zsh-config
cd grml-zsh-config
git tag --sort "version:refname" -l | tail -n1 | xargs git checkout
GRML_ZSH_CONFIG_VERSION=$(git tag --sort "version:refname" -l | tail -n1 | sed s/v//)
ADCLI_VERSION=$(rmadison adcli --architecture=amd64 -s stretch| cut -d\| -f2 | sed s"/ //g" | sed s"/\-.*$//g") for patch in ../patches/grml-zsh-config/*.patch ; do
patch -p1 < ${patch}
apt-get update
apt-get source --only-source adcli
TARGET_DIR=adcli-$ADCLI_VERSION
cd ${TARGET_DIR}/debian
for patch in ../../patches/adcli/*.patch ; do
quilt import $patch
done done
cd .. sed -i s/grml-etc-core/grml-zsh-config/g debian/changelog
debchange --preserve --newversion ${ADCLI_VERSION}-fsmpi "Apply the unreleased upstream-patches, fixing RT#100" debchange --preserve --newversion ${GRML_ZSH_CONFIG_VERSION}-fsmpi "Remove unneeded grml-configs"
apt-get build-dep -y adcli apt-get install -y txt2tags debhelper
fakeroot debian/rules binary fakeroot debian/rules binary
debuild -b -uc -us debuild -b -uc -us
cd .. cd ..
mkdir debug packages mkdir packages
mv *dbgsym* debug
mv *.deb packages mv *.deb packages
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment