#!/usr/bin/env bash run_directory=$(dirname "$0") user=$(whoami) if [ -f $run_directory/.disabled ]; then echo "Installation is disabled. Exiting..." exit 0 fi if [[ $user != 'root' ]]; then if [ ! -d /home/$user/.bashrc.d ]; then echo "~/.bashrc.d does not exist. Creating it..." mkdir /home/$user/.bashrc.d fi echo "Copying bashrc-cloud to extensions directory..." cp $run_directory/bashrc-cloud /home/$user/.bashrc.d/ else if [ ! -d /root/.bashrc.d ]; then echo "~/.bashrc.d does not exist. Creating it..." mkdir /root/.bashrc.d fi echo "Copying bashrc-cloud to extensions directory..." cp $run_directory/bashrc-cloud /root/.bashrc.d/ fi echo "Finished install. Exiting..." exit 0