Skip to content

Commit

Permalink
Add copy_to_gate.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Aug 16, 2021
1 parent 19d3ba7 commit 3c91206
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions copy_to_gate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/ksh -e

# Script to refresh the contrib/lib9p area in a checkout of illumos-gate

if [[ -z "$1" ]]; then
echo "Syntax: $0 <path to gate checkout>"
exit 1
fi

gate="$1"
lib="$gate/usr/src/lib/lib9p/common"
if [[ ! -d "$lib" ]]; then
echo "Error, could not find usr/src/lib/lib9p/common under $gate"
exit 1
fi

rm -rf $lib/*

cp COPYRIGHT $lib/../
echo 'lib9p library' > $lib/../COPYRIGHT.descrip

rsync='rsync -a --delete --delete-excluded'

mkdir -p $lib/transport $lib/backend $lib/sbuf
set -o globstar
for f in **/*.[ch]; do
[[ $f = example* ]] && continue
[[ $f = apple* ]] && continue
[[ $f = sbuf* ]] && continue
echo "... $f"
[[ $f = */* ]] && mkdir -p $lib/${f%/*}
cp $f $lib/$f
done

cp sbuf_illumos/* $lib/sbuf

0 comments on commit 3c91206

Please sign in to comment.