mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
Adding Bridges code as git subtree. (#2515)
* Add instructions. * Squashed 'bridges/' content from commit 345e84a21 git-subtree-dir: bridges git-subtree-split: 345e84a2146b56628e9888c9f5e129cb40e868a9 * Remove bridges workspace file to avoid confusing Cargo. * Add some bridges primitives to Polkadot workspace. * Improve docs.
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PAT_GPL="^// Copyright.*If not, see <http://www.gnu.org/licenses/>\.$"
|
||||
PAT_OTHER="^// Copyright"
|
||||
|
||||
SCRIPTS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||
|
||||
for f in $(find . -type f | egrep '\.(c|cpp|rs)$'); do
|
||||
HEADER=$(head -16 $f)
|
||||
if [[ $HEADER =~ $PAT_GPL ]]; then
|
||||
BODY=$(tail -n +17 $f)
|
||||
cat $SCRIPTS_DIR/license_header > temp
|
||||
echo "$BODY" >> temp
|
||||
mv temp $f
|
||||
elif [[ $HEADER =~ $PAT_OTHER ]]; then
|
||||
echo "Other license was found do nothing"
|
||||
else
|
||||
echo "$f was missing header"
|
||||
cat $SCRIPTS_DIR/license_header $f > temp
|
||||
mv temp $f
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user