diff options
-rw-r--r-- | clerk-git.install | 8 | ||||
-rwxr-xr-x | clerk_setup | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/clerk-git.install b/clerk-git.install index b9860b14de69..969a4296723d 100644 --- a/clerk-git.install +++ b/clerk-git.install @@ -3,6 +3,14 @@ post_install() { echo ' to use clerk you need to copy /usr/share/doc/clerk/clerk.conf and clerk.tmux to $HOME/.config/clerk/ and edit it to your needs. +You can also run clerk_setup to create a default config for your user. ' } + +post_upgrade() { +echo ' +Keep in mind, that clerk-git now installs the perl version which comes with its own config. +Copy /usr/share/doc/clerk/clerk.tmux and /usr/share/doc/clerk/clerk.conf to $HOME/.config/clerk +and edit them to your needs. +Or run clerk_setup (as user) to automate these steps. #post_install diff --git a/clerk_setup b/clerk_setup new file mode 100755 index 000000000000..2334c246fdcb --- /dev/null +++ b/clerk_setup @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +read -e -p "Create configuration for clerk? (Y/n) > " install +install=${install:-y} +case $install in + [Yy]) cp clerk $path; + if [[ ! -d "${HOME}/.config/clerk" ]] + then + mkdir "${HOME}/.config/clerk" + fi + cp /usr/share/doc/clerk/clerk.tmux /usr/share/doc/clerk/clerk.conf "${HOME}/.config/clerk" + sed -i "s@PLACEHOLDER@"$HOME"@" "${HOME}/.config/clerk/clerk.conf" + ;; + *) exit; +esac |