1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/lokinet-bootstrap
Michael 0b4d787042
More work on router docker image
- Multi-stage docker build (final image only 15MB!)
- Build in release mode
    - Fix bug with release mode
    - Fix compiler being dumb AF
    - Disable FORTIFY for now
- Enable LTO when making a staticly linked release
- Fix some gcc specific warnings
- Refactor cmake stuff into multiple files
2019-04-28 17:04:52 +01:00

32 lines
871 B
Bash
Executable file

#!/usr/bin/env bash
# this shell script will be replaced by a proper program in the future (probably)
#
# from https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
if [ -z "$1" ]
then
url="https://i2p.rocks/i2procks.signed"
else
url="$1"
fi
echo "downloading $url"
if [ ! -d "$HOME/.lokinet" ]
then
mkdir $HOME/.lokinet
fi
# use temp file to not overrwrite existing bootstrap file on fail
#tmp=mktemp
tmp=/tmp/bootstrap.tmp
# MacOS does not have wget without homebrew but does have curl
# Rick also had indicated most BSDs have curl too
curl -o "$tmp" "$url" && \
(mv "$tmp" "$HOME/.lokinet/bootstrap.signed" && echo -e "${GREEN}lokinet successfully bootstrapped${NC}" ) \
|| echo -e "${RED}failed to download bootstrap from $url${NC}"
rm -f "$tmp"