mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-12 03:16:07 +08:00
initial revision of synergy. currently semi-supports X windows
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.
This commit is contained in:
46
tools/depconv
Executable file
46
tools/depconv
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user