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

2
resources/ao-config

@ -20,7 +20,7 @@ export default {
// default is '~/.ao/database.sqlite3'
file: 'SQLITE_DATABASE'
},
hostnames: []
hostnames: [],
privateKey: 'PRIVATEKEY',
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
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")
# 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}"
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 ""
case $AO in
"3")
@ -317,23 +331,12 @@ case $AO in
pushd ~/ao-3
npm install
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
popd
;;
"react")
echo -e "Installing ${BLUE}ao-react${RESET}"
git clone 'https://github.com/coalition-of-invisible-colleges/ao-react.git' ~/ao-react
pushd ~/ao-react
npm install
npm run webpack
@ -341,20 +344,6 @@ case $AO in
;;
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 -------------------
echo ""

2
scripts/ingredients

@ -12,7 +12,7 @@ RESET="\e[0m"
trap "exit" INT
# 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 ---------------
# Coding Moment: generally, whenever you see something with brackets at the end of it, like this()

Loading…
Cancel
Save