]> jfr.im git - irc/evilnet/x3.git/blame - install-r.sh
Fix for crash bug during burst where X3 sends a B (BURST) message with a channel...
[irc/evilnet/x3.git] / install-r.sh
CommitLineData
07559983 1#! /bin/sh
2
3# This is a hacky solution to the problem of INSTALL not knowing how to recursively copy files
4# and our need to recursively copy with exceptions the plugin tree. It works on linux,
5# but needs serious work to be more portable. Please Help. -Rubin
6SRC=$1
7DST=$2
8
9# TODO: find banaries like 'find' and 'cp' in common locations and/or path, and
10# use them there instead of assuming they are in path.
11
12if [ "_$DST" = _ ]; then
13 exit
14fi
15
16cd `dirname "$SRC"`
17SRCDIR=`basename "$SRC"`
18find "$SRCDIR" \! -path '*/.*' | \
19 while read f; do \
20 d="$DST/${f#foo/}"; \
21 mkdir -p "$(dirname "$d")"; \
22 if [ -f $f ]; then cp -v $f $d; fi; \
23 done
24# this will break if SRCDIR has hidden directories in it :/
25#find "$SRCDIR" \! -path '*/.*'
26