build script to check build dependencies
This commit is contained in:
2
Makefile
2
Makefile
@@ -14,7 +14,7 @@ about: ## Display release info
|
||||
printf "Hush Silentdragonlite-cli Makefile by jahway603\n"
|
||||
|
||||
build: ## Build the release
|
||||
cargo build --release
|
||||
./util/build.sh
|
||||
cp `pwd`/target/release/$(PROJECT_NAME) .
|
||||
printf "Hush silentdragonlite-cli is ready for you\n"
|
||||
|
||||
|
||||
50
util/build.sh
Executable file
50
util/build.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2021-2022 The Hush Developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file LICENSE or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
# Purpose: Script to build Hush silentdragonlite on x86 64-bit arch
|
||||
## Usage: ./util/build.sh
|
||||
|
||||
# Check if rustc is installed on system and exits if it is not
|
||||
if ! [ -x "$(command -v rustc)" ]; then
|
||||
echo 'Error: rustc is not installed. Install it and try again.' >&2
|
||||
exit 1
|
||||
fi
|
||||
# Check if cargo is installed on system and exits if it is not
|
||||
if ! [ -x "$(command -v cargo)" ]; then
|
||||
echo 'Error: cargo is not installed. Install it and try again.' >&2
|
||||
exit 1
|
||||
fi
|
||||
# Check if rustfmt is installed on system and exits if it is not
|
||||
if ! [ -x "$(command -v rustfmt)" ]; then
|
||||
echo 'Error: rustfmt is not installed. Install it and try again.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Welcome to the Hush magic folks..."
|
||||
echo ""
|
||||
echo " #### ##### # #### # # ##### # # # # ##### ##### # # # ###### "
|
||||
echo "# # # # # # # # # # # # # # # # # # ## ## # "
|
||||
echo " #### # # # ##### # # # ##### # # # # # # # # # ## # ##### "
|
||||
echo " # # # # # # # # # # # # # # # # # # # # "
|
||||
echo "# # # # # # # # # # # # # # # # # # # # # # "
|
||||
echo " #### ##### ###### #### ###### # ##### #### # ###### ##### # # # # ###### "
|
||||
|
||||
# now to compiling...
|
||||
echo ""
|
||||
echo "You have the requirements installed, so let's build!"
|
||||
|
||||
cargo build --release
|
||||
|
||||
# check if compile was success
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo 'Error: Something went wrong and it did not build successfully... Please reach out if you need support.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Hush silentdragonlite-cli is now compiled for you. Enjoy and reach out if you need support."
|
||||
echo "For options, run ./silentdragonlite --help"
|
||||
Reference in New Issue
Block a user