forked from hyphanet/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uploadrefs
executable file
·36 lines (28 loc) · 1.04 KB
/
uploadrefs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
source freenet-scripts-common || exit
cd "$seedrefsDir" || exit
rm -f "$seedrefsPath"
for ref in *
do
cat "$ref" >> "$seedrefsPath" || exit
# Newline in case a reference is missing one on the last line.
echo >> "$seedrefsPath" || exit
done
if grep -ni "priv" "$seedrefsPath"
then
echo "Found private noderef at above line in $seedrefsPath"
exit 1
fi
if egrep -n "^End" "$seedrefsPath" | egrep -v "End$"
then
echo "Missing newline after End at above line in $seedrefsPath"
exit 1
fi
# gpg will prompt before overwriting, which is not desirable here.
rm -f "$seedrefsPath.gpg"
gpg -o "$seedrefsPath.gpg" --sign "$seedrefsPath" || exit
# update the installer seedrefs
for i in wininstaller-innosetup/install_node/seednodes.fref wininstaller/res/install_node/seednodes.fref java_installer/offline/seednodes.fref java_installer/bin/seednodes.fref; do
cp "$seedrefsPath" $HOME/$i
(cd $(dirname $HOME/$i); git diff --name-only $HOME/$i | grep . && echo seednodes were updated in $HOME/$i - Please commit.; cd -)
done