Commit 5286c45f authored by Hinrikus Wolf's avatar Hinrikus Wolf

update grml-zsh-config config

parent d4e87083
......@@ -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: orphaned-diversion *&&[-f*.dpkg-bak]&&mv-f*.dpkg-bak* preinst
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100755
index 72da544..0000000
index 72da544..9bb8222 100755
--- a/debian/postrm
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# Filename: postrm
+++ b/debian/postrm
@@ -1,6 +1,6 @@
#!/bin/sh
# Filename: postrm
-# Purpose: postrm script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-################################################################################
-
-set -e
-
-TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc"
-TO_UNDIVERT2=".zshrc"
+# Purpose: postrm script for package grml-zsh-config
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
@@ -10,12 +10,11 @@ set -e
TO_UNDIVERT1="zlogin zlogout zprofile zshenv zshrc"
TO_UNDIVERT2=".zshrc"
-TO_UNDIVERT3="vimrc"
-
-undivert_gen() {
- if [ -f "$2/$1" -o "$2/$1".original ] ; then
- DEXT=${3:-original}
undivert_gen() {
if [ -f "$2/$1" -o "$2/$1".original ] ; then
DEXT=${3:-original}
- dpkg-divert --remove --rename --package grml-etc-core \
- --divert $2/$1.$DEXT $2/$1 #> /dev/null
- fi
-}
-
-case "$1" in
- purge)
- for cmd in $TO_UNDIVERT1; do
- undivert_gen $cmd /etc/zsh
- done
- for cmd in $TO_UNDIVERT2; do
- undivert_gen $cmd /etc/skel
- done
+ dpkg-divert --remove --rename --package grml-zsh-config \
--divert $2/$1.$DEXT $2/$1 #> /dev/null
fi
}
@@ -28,9 +27,6 @@ case "$1" in
for cmd in $TO_UNDIVERT2; do
undivert_gen $cmd /etc/skel
done
- for cmd in $TO_UNDIVERT3; do
- undivert_gen $cmd /etc/vim
- done
- ;;
- 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 #################################################################
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100755
index c30e103..0000000
index c30e103..c5227d5 100755
--- a/debian/preinst
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-# Filename: preinst
+++ b/debian/preinst
@@ -1,6 +1,6 @@
#!/bin/sh
# Filename: preinst
-# Purpose: preinst script for package grml-etc-core
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2.
-################################################################################
-
-set -e
-
-# check for files from rm_conffile() in debian/preinst of grml-etc
-# 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
+# Purpose: preinst script for package grml-zsh-config
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
@@ -16,33 +16,33 @@ backup_conffile() {
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
- fi
-}
-
-case "$1" in
- install|upgrade|configure)
- TMP=$$
+ [ -e "$CONFFILE" ] && cp -f "$CONFFILE" "$CONFFILE".grml-zsh-config || true
fi
}
case "$1" in
install|upgrade|configure)
TMP=$$
- # move files from package grml-etc to grml-etc-core, make sure
- # we don't lose any files...
- for file in /etc/zsh/zlogin /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc \
+ # move files from package grml-etc to grml-zsh-config, make sure
# 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
- [ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true
- backup_conffile $file && \
- [ -f "$file" ] && rm $file && \
+ /etc/zsh/zlogout ; do
[ -e "$file".original ] || cp -f "$file" "${file}.tmp.$TMP" 2>/dev/null || true
backup_conffile $file && \
[ -f "$file" ] && rm $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"
- [ -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 ] && \
+ [ -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 ] && \
- # 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
- 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
- fi
-
- ;;
- *)
- echo "preinst called with unknown argument $1" >&2
- exit 1
-esac
-
-exit 0
-
-## END OF FILE #################################################################
+ dpkg-divert --remove --rename --package grml-zsh-config /etc/skel/.zshrc
fi
;;
diff --git a/debian/rules b/debian/rules
index 7bf93ff..b49fc95 100755
index 7bf93ff..ebe8ef9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@ clean:
......@@ -182,8 +160,8 @@ index 7bf93ff..b49fc95 100755
- cp -a etc/ debian/grml-etc-core/
- cp -a usr_share_grml/ debian/grml-etc-core/usr/share/grml
+ # 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/zsh debian/grml-zsh-config/
+ cp -a etc/skel/.zshrc debian/grml-zsh-config/etc/skel/
+ cp -a etc/zsh debian/grml-zsh-config/etc/
# Build architecture-dependent files here.
binary-arch: build install
......
#!/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")
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
for patch in ../patches/grml-zsh-config/*.patch ; do
patch -p1 < ${patch}
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
debuild -b -uc -us
cd ..
mkdir debug packages
mv *dbgsym* debug
mkdir packages
mv *.deb packages
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment