|
|
@ -114,7 +114,7 @@ ask_for() { |
|
|
|
|
|
|
|
|
|
|
|
# --------------- Environment Setup --------------- |
|
|
|
# --------------- Environment Setup --------------- |
|
|
|
|
|
|
|
|
|
|
|
# If there's an env file, export it's contents to the environment |
|
|
|
# If there's an env file, export its contents to the environment |
|
|
|
source_env() { |
|
|
|
source_env() { |
|
|
|
if [ -f .env ]; then |
|
|
|
if [ -f .env ]; then |
|
|
|
export $(grep -v '^#' .env | xargs) |
|
|
|
export $(grep -v '^#' .env | xargs) |
|
|
@ -153,7 +153,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
# This one installs utilities to your OS (If you need them!) |
|
|
|
# This one installs utilities to your OS (If you need them!) |
|
|
|
install_if_needed() { |
|
|
|
install_if_needed() { |
|
|
|
for package in "$@" # $@ means "all the arguments you passed |
|
|
|
for package in "$@" # $@ means "all the arguments you passed" |
|
|
|
do |
|
|
|
do |
|
|
|
case $DISTRO in |
|
|
|
case $DISTRO in |
|
|
|
"debian") |
|
|
|
"debian") |
|
|
@ -195,12 +195,10 @@ install_if_needed() { |
|
|
|
done |
|
|
|
done |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --------------- Memory --------------- |
|
|
|
# --------------- Memory --------------- |
|
|
|
# These two functions might look like gibberish because we're using regex, |
|
|
|
# These two functions might look like gibberish because we're using regex, |
|
|
|
# short for REGular EXpression. It's a form of matching text to a pattern. |
|
|
|
# short for REGular EXpression. It's a form of matching text to a pattern. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# It takes values and stores them away in the env for later reference |
|
|
|
# It takes values and stores them away in the env for later reference |
|
|
|
forget() { |
|
|
|
forget() { |
|
|
|
DOTENV_ENTRY=$(cat .env | grep ^${1}\=) |
|
|
|
DOTENV_ENTRY=$(cat .env | grep ^${1}\=) |
|
|
|