Add install script to package

This commit is contained in:
Eric Torres 2022-04-15 21:50:55 -07:00
parent 60f679ca93
commit 8a9976c86d
2 changed files with 56 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Eric Torres <erictorres4@protonmail.com>
pkgname=file-scripts
pkgver=1.1.1
pkgrel=1
pkgrel=2
pkgdesc="Various scripts for performing file-related operations such as editing and deleting."
arch=(any)
license=(GPL3)
@ -9,6 +9,7 @@ depends=(fd fzf mlocate python python-termcolor)
makedepends=(git python-setuptools python-sphinx)
checkdepends=(python-hypothesis python-pytest)
source=("${pkgname}-${pkgver}::git+file:///home/etorres/Projects/file-scripts")
install=$pkgname.install
sha256sums=('SKIP')
pkgver() {

54
file-scripts.install Normal file
View File

@ -0,0 +1,54 @@
## arg 1: the new package version
#pre_install() {
# do something here
#}
post_install() {
cat << EOF
To bind a key to run fedit:
Add the following lines to your shell config file:
_run_fedit() {
fedit && zle reset-prompt
}
_run_etcedit() {
fedit --etc && zle reset-prompt
}
zle -N _run_fedit
bindkey -M viins '^o' _run_fedit
zle -N _run_etcedit
bindkey -M viins '^e' _run_etcedit
EOF
}
## arg 1: the new package version
## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
## arg 1: the new package version
## arg 2: the old package version
#post_upgrade() {
# do something here
#}
# arg 1: the old package version
pre_remove() {
cat << EOF
Remember to remove any lines invoking any of these scripts from your shell config files
EOF
}
## arg 1: the old package version
#post_remove() {
# do something here
#}
#
#