1
0
mirror of git://git.suckless.org/sbase synced 2025-03-19 17:46:01 +00:00
sbase/scripts/install
Quentin Rameau 6fc6bbbf71 scripts: Force file copying on install
This would otherwise cause an issue using cp to copy cp to itself.
2023-11-14 19:34:27 +01:00

22 lines
208 B
Bash
Executable File

#!/bin/sh
set -e
while read type src dst perm
do
case $type in
d)
mkdir -p $src
;;
c)
cp -f $src $dst
;;
*)
echo install: wrong entry type >&2
exit 1
;;
esac
chmod $perm $dst
done < $1