File: csp_install

package info (click to toggle)
caspar 20140919-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 864 kB
  • ctags: 157
  • sloc: sh: 588; makefile: 124
file content (25 lines) | stat: -rwxr-xr-x 700 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# This file is maintained at http://git.mdcc.cx/caspar

# csp_install - wrapper for install(1), to be used in caspar-ized Makefiles
#
#  usage: csp_install <directory> <file>
#
# honors optionally set environment variable csp_INSTALL_OPTIONS.
# use e.g.
#  export csp_INSTALL_OPTIONS='--owner=www-data --group=www-data'
#
# Generally, this script is to be used by stating e.g.
#
#   csp_UHOST = dummy
#   csp_PUSH = $(csp_install_FUNC)
#   csp_DIR = /etc/
#   include caspar/mk/caspar.mk
#
# in a Makefile

: ${csp_INSTALL_MODE:=u=rw,go=r}
install --directory $1
exec install --backup=off --preserve-timestamps --mode=$csp_INSTALL_MODE --no-target-directory $csp_INSTALL_OPTIONS $2 $1/$2