File: install.sh

package info (click to toggle)
apriltag 0.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,504 kB
  • sloc: ansic: 170,904; makefile: 153; cpp: 127; sh: 8
file content (16 lines) | stat: -rwxr-xr-x 324 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh -e

# Usage: install.sh TARGET [RELATIVE PATHS ...]
#
# e.g. ./install.sh /usr/local foo/file1 foo/file2 ...
# This creates the files /usr/local/foo/file1 and /usr/local/foo/file2

TARGETDIR=$1
shift

for src in "$@"; do
    dest=$TARGETDIR/$src
    mkdir -p $(dirname $dest)
    cp $src $dest
    echo $dest
done