mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
misc: improved build script
This commit is contained in:
parent
3013dd13f1
commit
416c39a7a8
1 changed files with 28 additions and 9 deletions
37
build.sh
37
build.sh
|
@ -67,11 +67,12 @@ build_windows_amd64() {
|
||||||
|
|
||||||
build_android_arm() {
|
build_android_arm() {
|
||||||
host_dep 'shield'
|
host_dep 'shield'
|
||||||
|
|
||||||
THEPATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/system/xbin:/system/bin"
|
BASE=/data/data/com.termux/files
|
||||||
LPATH="/data/data/com.termux/files/usr/lib"
|
THEPATH="$BASE/usr/bin:$BASE/usr/bin/applets:/system/xbin:/system/bin"
|
||||||
GPATH=/data/data/com.termux/files/home/go
|
LPATH="$BASE/usr/lib"
|
||||||
DIR=/data/data/com.termux/files/home/go/src/github.com/bettercap/bettercap
|
GPATH=$BASE/home/go
|
||||||
|
DIR=$GPATH/src/github.com/bettercap/bettercap
|
||||||
|
|
||||||
echo "@ Updating repo on Android host ..."
|
echo "@ Updating repo on Android host ..."
|
||||||
ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && rm -rf bettercap* && git pull && export GOPATH=$GPATH && go get ./...'"
|
ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && rm -rf bettercap* && git pull && export GOPATH=$GPATH && go get ./...'"
|
||||||
|
@ -87,10 +88,28 @@ rm -rf $BUILD_FOLDER
|
||||||
mkdir $BUILD_FOLDER
|
mkdir $BUILD_FOLDER
|
||||||
cd $BUILD_FOLDER
|
cd $BUILD_FOLDER
|
||||||
|
|
||||||
build_linux_amd64 && create_archive bettercap_linux_amd64_$VERSION.zip
|
if [ -z "$1" ]
|
||||||
build_macos_amd64 && create_archive bettercap_macos_amd64_$VERSION.zip
|
then
|
||||||
build_windows_amd64 && create_exe_archive bettercap_windows_amd64_$VERSION.zip
|
WHAT=all
|
||||||
build_android_arm && create_archive bettercap_android_arm_$VERSION.zip
|
else
|
||||||
|
WHAT="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "@ Building for $WHAT ...\n\n"
|
||||||
|
|
||||||
|
case "$WHAT" in
|
||||||
|
all|linux)
|
||||||
|
build_linux_amd64 && create_archive bettercap_linux_amd64_$VERSION.zip
|
||||||
|
;;
|
||||||
|
all|osx|mac|macos)
|
||||||
|
build_macos_amd64 && create_archive bettercap_macos_amd64_$VERSION.zip
|
||||||
|
;;
|
||||||
|
all|windows|win)
|
||||||
|
build_windows_amd64 && create_exe_archive bettercap_windows_amd64_$VERSION.zip
|
||||||
|
;;
|
||||||
|
all|android)
|
||||||
|
build_android_arm && create_archive bettercap_android_arm_$VERSION.zip
|
||||||
|
esac
|
||||||
|
|
||||||
sha256sum * > checksums.txt
|
sha256sum * > checksums.txt
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue