mirror of
https://github.com/popura-network/Popura.git
synced 2024-12-06 19:26:23 +01:00
19 lines
403 B
Bash
Executable File
19 lines
403 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ef
|
|
|
|
PEER_LIST=${PEER_LIST:-"assets/peers.txt"}
|
|
|
|
# Create peers.go "asset" file
|
|
make_peers_go() {
|
|
PEERS_GO_FILE="src/autopeering/peers.go"
|
|
printf "package autopeering\nvar PublicPeers = []string{\n" >$PEERS_GO_FILE
|
|
while IFS= read -r line
|
|
do
|
|
printf "\t\"$line\",\n" >> $PEERS_GO_FILE
|
|
done < $PEER_LIST
|
|
sed -i -e "$ s/,/}/" $PEERS_GO_FILE
|
|
}
|
|
|
|
make_peers_go
|