CLI interface to SDL https://hush.is/privacy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
2.0 KiB

#!/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"