Browse Source

quick updates

main
zen 3 years ago
parent
commit
8e09f8bde7
  1. 2
      ingredients/gold
  2. 10
      ingredients/iron
  3. 5
      ingredients/lead
  4. 5
      recipes/alchemy.sh

2
ingredients/gold

@ -29,7 +29,7 @@ install_bitcoin() {
# This still relies on package management though
case $DISTRO in
"arch")
install_if_needed boost autoconf
install_if_needed boost base-devel python3 openssl libevent zeromq qt5 protobuf git ccache sqlite3 autoconf
;;
"debian")
install_if_needed build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler git libsqlite3-dev ccache

10
ingredients/iron

@ -60,14 +60,14 @@ set_node_to() {
nvm use default
fi
else
echo "nvm not available, something went wrong..."
say "nvm not available, something went wrong..."
fi
}
install_nvm() {
say "${BOLD}Installing Node Version Manager${RESET}"
if [ -d "$NVM_DIR" ]; then
echo "nvm already installed! skipping"
say "nvm already installed! skipping"
else
chmod +x scripts/nvm_install.sh
scripts/nvm_install.sh &> /dev/null
@ -81,7 +81,7 @@ install_nvm() {
build_service_from_template() {
SERVICE=$1
shift
echo ""
say ""
if [ -f resources/service-templates/${SERVICE} ]; then
say "Creating $SERVICE.service..."
SERVICE_FILE=/etc/systemd/system/${SERVICE}.service
@ -105,8 +105,8 @@ build_service_from_template() {
sudo sed -i "s#USER#${USER}#g" $SERVICE_FILE
sudo sed -i "s#HOME#${HOME}#g" $SERVICE_FILE
for keyval; do
KEY=$(echo $keyval | cut -d'=' -f 1)
VAL=$(echo $keyval | cut -d'=' -f 2)
KEY=$(say $keyval | cut -d'=' -f 1)
VAL=$(say $keyval | cut -d'=' -f 2)
say "Substituting $KEY for $VAL"
sudo sed -i "s#$KEY#$VAL#g" $SERVICE_FILE

5
ingredients/lead

@ -116,7 +116,7 @@ ask_for() {
# If there's an env file, export its contents to the environment
source_env() {
if [ -f .env ]; then
if [ -s .env ]; then
export $(grep -v '^#' .env | xargs)
else
if [ -z $ALCHEMY ]; then
@ -240,7 +240,8 @@ remember() {
# If we're setting a valid key/value pair
if say ${1} | grep -Eq "^[A-Z_]+\=[$VALID_CHARS]+$"; then
DOTENV_ENTRY=$(cat $ENV_LOCATION | grep "^${KEY}" )
# This subshell sometimes returns a non zero and we try to exit, lets not
DOTENV_ENTRY=$(cat $ENV_LOCATION | grep "^${KEY}" ) && return 0
# If something already exists and we're trying to set it to something new
if [ -n "$DOTENV_ENTRY" ] && [ "$DOTENV_ENTRY" != "$1" ]; then
say "I'm trying to remember ${BLUE}${1}${RESET}, but..."

5
recipes/alchemy.sh

@ -27,13 +27,12 @@ say " ${BOLD}Initialization Script -- BMA${BLUE} Y8b
say "${RESET}"
say "${GREEN}${ULINE}Environment${RESET}"
if [ -f .env ]; then
if [ -s .env ]; then
grep -v '^#' .env
export $(grep -v '^#' .env | xargs)
else
say "No .env file found, let's initialize it"
touch "${ALCHEMY}/.env"
remember "ALCHEMY=${ALCHEMY}"
say "ALCHEMY=${ALCHEMY}" > "${ALCHEMY}/.env"
fi
say ""

Loading…
Cancel
Save