mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
900b075e3a
on unix, but client screens don't simulate events other than mouse move. also not supporting clipboard at all yet and the main app is just a temporary framework to test with. must clean up protocol and communication.
47 lines
892 B
Bash
Executable File
47 lines
892 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# add dependency info from files on command line to $depfile
|
|
|
|
depfile="Makedepends"
|
|
|
|
dependencies=""
|
|
targets="^$"
|
|
|
|
# tmp directory
|
|
if test -z "$TMP"; then TMP=/tmp; fi
|
|
|
|
while [ -n "$*" ]; do
|
|
case "$1" in
|
|
-f)
|
|
depfile=$2
|
|
shift
|
|
shift
|
|
;;
|
|
-*)
|
|
echo "usage: $0 [-f <makefile>] <dependency-file> ..."
|
|
exit 1
|
|
;;
|
|
*)
|
|
break
|
|
esac
|
|
done
|
|
|
|
# collect all dependencies
|
|
while [ -n "$*" ]; do
|
|
line=`cat $1 | sed -e 's/\\\\//g' | sed -e 's/ \/[^ ]*//g'`
|
|
target=`echo $line | sed -e 's/^\([^:]*\):.*/\1/'`
|
|
targets="$targets|^$target:"
|
|
dependencies="$dependencies$line\n"
|
|
shift
|
|
done
|
|
|
|
# add new dependencies to $depfile
|
|
if [ -n "$targets" ]; then
|
|
if [ -r $depfile ]; then
|
|
(egrep -v $targets $depfile; echo -e -n $dependencies) > $TMP/dep$$
|
|
if [ $? -eq 0 ]; then mv $TMP/dep$$ $depfile; fi
|
|
else
|
|
echo -e -n $dependencies > $depfile
|
|
fi
|
|
fi
|