3 # Install data or executable file.
5 # Usage: $0 {data|bin} src dest
7 # Copyright (c) 2014 Jonas Fonseca <jonas.fonseca@gmail.com>
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of
12 # the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
33 if [ "$V" = "@" ]; then
37 # Replace fake /etc-path
39 dest
="$dest/$(basename "$src")"
40 sed "s#++SYSCONFDIR++#${sysconfdir}#" < "$src" > "$src+"
45 install -p -m "$mode" "$src" "$dest"
47 if [ -n "$trash" ]; then