|
|
@ -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 "" |
|
|
|