Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
packages
Commits
5286c45f
Commit
5286c45f
authored
6 years ago
by
Hinrikus Wolf
Browse files
Options
Downloads
Patches
Plain Diff
update grml-zsh-config config
parent
d4e87083
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
patches/grml-zsh-config/remove_non_zsh_config.patch
+74
-96
74 additions, 96 deletions
patches/grml-zsh-config/remove_non_zsh_config.patch
scripts/grml-zsh-config.sh
+10
-18
10 additions, 18 deletions
scripts/grml-zsh-config.sh
with
84 additions
and
114 deletions
patches/grml-zsh-config/remove_non_zsh_config.patch
+
74
−
96
View file @
5286c45f
...
...
@@ -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
+++ /de
v/null
@@ -1,
44 +0,0
@@
-
#!/bin/sh
-
# Filename: postrm
+++
b
/de
bian/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
+++ /de
v/null
@@ -1,
5
6 +
0,0
@@
-
#!/bin/sh
-
# Filename: preinst
+++
b
/de
bian/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
...
...
This diff is collapsed.
Click to expand it.
scripts/grml-zsh-config.sh
+
10
−
18
View file @
5286c45f
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment