add vconf helper to install in /etc

This commit is contained in:
Christian Neukirchen 2014-07-17 19:36:52 +02:00
parent e144b2ebf7
commit fb96a25cfc
2 changed files with 18 additions and 1 deletions

View File

@ -187,6 +187,12 @@ The optional 4th argument can be used to change the `file name`.
`$DESTDIR`. The optional 2nd argument can be used to change the
`file name`.
- *vconf()* `vconf <file> [<name>]`
Installs `file` into `etc` in the pkg
`$DESTDIR`. The optional 2nd argument can be used to change the
`file name`.
- *vsconf()* `vsconf <file> [<name>]`
Installs `file` into `usr/share/examples/<pkgname>` in the pkg

View File

@ -13,7 +13,7 @@ _noglob_helper() {
}
# Apply _noglob to v* commands
for cmd in vinstall vcopy vmove vmkdir vbin vman vdoc vsconf vlicense; do
for cmd in vinstall vcopy vmove vmkdir vbin vman vdoc vconf vsconf vlicense; do
alias ${cmd}="set -f; _noglob_helper _${cmd}"
done
@ -67,6 +67,17 @@ _vdoc() {
vinstall "$file" 644 "usr/share/doc/${pkgname}" "$targetfile"
}
_vconf() {
local file="$1" targetfile="$2"
if [ $# -lt 1 ]; then
msg_red "$pkgver: vconf: 1 argument expected: <file>\n"
return 1
fi
vinstall "$file" 644 "etc/${pkgname}" "$targetfile"
}
_vsconf() {
local file="$1" targetfile="$2"