scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#!/bin/sh
 2
 3set -e
 4
 5for i
 6do
 7	case "$i" in
 8	-p)
 9		proto=$2
10		shift 2
11		;;
12	-*)
13		echo usage: install [-p proto] root >&2
14		exit 1
15		;;
16	esac
17done
18
19root=${1?'root missed'}
20
21while read type perm name
22do
23	case $type in
24	d)
25		mkdir -p $root/$name
26		;;
27	f)
28		cp $name $root/$name
29		;;
30	*)
31		echo install: wrong entry type >&2
32		exit 1
33		;;
34	esac
35
36	chmod $perm $root/$name
37done < ${proto:-scripts/proto.all}