github.com/sagernet/sing-box@v1.9.0-rc.20/release/local/reinstall.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e -o pipefail
     4  
     5  if [ -d /usr/local/go ]; then
     6    export PATH="$PATH:/usr/local/go/bin"
     7  fi
     8  
     9  DIR=$(dirname "$0")
    10  PROJECT=$DIR/../..
    11  
    12  pushd $PROJECT
    13  go install -v -trimpath -ldflags "-s -w -buildid=" -tags with_quic,with_wireguard,with_acme ./cmd/sing-box
    14  popd
    15  
    16  sudo systemctl stop sing-box
    17  sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
    18  sudo systemctl start sing-box