Browse Source

bug fixes, trimmed trailing whitespace

main
Zen 3 years ago
parent
commit
7c4879585e
  1. 8
      init.sh
  2. 2
      resources/ao-config
  3. BIN
      resources/wordpress.tar.gz
  4. 41
      scripts/ao.sh
  5. 2
      scripts/ingredients

8
init.sh

@ -63,9 +63,11 @@ if [[ ! $UPDATED ]]; then
sudo apt update sudo apt update
sudo apt autoremove sudo apt autoremove
sudo apt upgrade sudo apt upgrade
sudo apt install build-essential
;; ;;
"arch") "arch")
sudo pacman -Syu sudo pacman -Syu --noconfirm
sudo pacman -S base-devel --noconfirm
;; ;;
"fedora") "fedora")
sudo dnf update sudo dnf update
@ -80,5 +82,5 @@ if [[ ! $UPDATED ]]; then
fi fi
echo "" echo ""
echo -e "${GREEN}${ULINE}Base Dependencies${RESET}" echo -e "${GREEN}${ULINE}Core Dependencies${RESET}"
install_if_needed make git wget install_if_needed git wget

2
resources/ao-config

@ -20,7 +20,7 @@ export default {
// default is '~/.ao/database.sqlite3' // default is '~/.ao/database.sqlite3'
file: 'SQLITE_DATABASE' file: 'SQLITE_DATABASE'
}, },
hostnames: [] hostnames: [],
privateKey: 'PRIVATEKEY', privateKey: 'PRIVATEKEY',
memes: { memes: {
// default is ~/.ao/memes' // default is ~/.ao/memes'

BIN
resources/wordpress.tar.gz

Binary file not shown.

41
scripts/ao.sh

@ -126,7 +126,7 @@ case $DISTRO in
fi fi
install_if_needed wget python gmp sqlite3 \ install_if_needed wget python gmp sqlite3 \
python-mako python-pip net-tools zlib libsodium gettext dnsutil nginx python-mako python-pip net-tools zlib libsodium gettext dnsutils nginx
;; ;;
"mac") "mac")
# install_if_needed better-computer # install_if_needed better-computer
@ -309,6 +309,20 @@ else
echo -e "Just made a fresh private key and put it in ${GREEN}~/.ao${RESET}" echo -e "Just made a fresh private key and put it in ${GREEN}~/.ao${RESET}"
fi fi
# TODO this is really janky/fragile, it would be better to store this in ~/.ao
CONFIG_FILE=$HOME/ao-$AO/configuration.js
if [ -f "$CONFIG_FILE" ]; then
echo configuration.js already exists
else
cp resources/ao-config $CONFIG_FILE
sed -i "s#SQLITE_DATABASE#${HOME}/.ao/database.sqlite3#" $CONFIG_FILE
sed -i "s#PASSLINE#${PASSLINE}#" $CONFIG_FILE
sed -i "s#PRIVATEKEY#${HOME}/.ao/key#" $CONFIG_FILE
sed -i "s#CLIGHTNING_DIR#${HOME}/.lightning/bitcoin#" $CONFIG_FILE
sed -i "s#MEMES_DIR#${HOME}/.ao/memes#" $CONFIG_FILE
fi
echo "" echo ""
case $AO in case $AO in
"3") "3")
@ -317,23 +331,12 @@ case $AO in
pushd ~/ao-3 pushd ~/ao-3
npm install npm install
npm run build npm run build
if [ -f "$HOME/ao-3/configuration.js" ]; then
echo configuration.js already exists
else
cp resources/ao-config $HOME/ao-react/configuration.js
sed -i "s#SQLITE_DATABASE#${HOME}/.ao/database.sqlite3#" $HOME/ao-react/configuration.js
sed -i "s#CLIGHTNING_DIR#${HOME}/.lightning/bitcoin#" $HOME/ao-react/configuration.js
sed -i "s#MEMES_DIR#${HOME}/.ao/memes#" $HOME/ao-react/configuration.js
fi
npm run checkconfig npm run checkconfig
popd popd
;; ;;
"react") "react")
echo -e "Installing ${BLUE}ao-react${RESET}" echo -e "Installing ${BLUE}ao-react${RESET}"
git clone 'https://github.com/coalition-of-invisible-colleges/ao-react.git' ~/ao-react git clone 'https://github.com/coalition-of-invisible-colleges/ao-react.git' ~/ao-react
pushd ~/ao-react pushd ~/ao-react
npm install npm install
npm run webpack npm run webpack
@ -341,20 +344,6 @@ case $AO in
;; ;;
esac esac
# TODO this is kind of janky/fragile, it would be better to store this in ~/.ao
CONFIG_FILE=$HOME/ao-$AO/configuration.js
if [ -f "$CONFIG_FILE" ]; then
echo configuration.js already exists
else
cp resources/ao-config $CONFIG_FILE
sed -i "s#SQLITE_DATABASE#${HOME}/.ao/database.sqlite3#" $CONFIG_FILE
sed -i "s#PASSLINE#${PASSLINE}#" $CONFIG_FILE
sed -i "s#PRIVATEKEY#${HOME}/.ao/key#" $CONFIG_FILE
sed -i "s#CLIGHTNING_DIR#${HOME}/.lightning/bitcoin#" $CONFIG_FILE
sed -i "s#MEMES_DIR#${HOME}/.ao/memes#" $CONFIG_FILE
fi
# ------------------- Step 4 - NGINX Setup ------------------- # ------------------- Step 4 - NGINX Setup -------------------
echo "" echo ""

2
scripts/ingredients

@ -12,7 +12,7 @@ RESET="\e[0m"
trap "exit" INT trap "exit" INT
# Give informative error messages # Give informative error messages
trap 'echo "Oops! Something went wrong on line $LINENO of this script. Exit code was $?" >&2' ERR trap 'echo -e "${RED}Oops!${RESET} Something went wrong on line $LINENO of this script. Exit code was $?" >&2' ERR
# --------------- Functions --------------- # --------------- Functions ---------------
# Coding Moment: generally, whenever you see something with brackets at the end of it, like this() # Coding Moment: generally, whenever you see something with brackets at the end of it, like this()

Loading…
Cancel
Save