2021-10-06 11:56:38 +00:00
#!/bin/bash
# Bash strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
RED = $( tput setaf 1)
GREEN = $( tput setaf 2)
YELLOW = $( tput setaf 3)
NC = $( tput sgr0) # No Color
2022-07-29 09:12:43 +00:00
read -p " ${ YELLOW } This script will overwrite any existing Intellij config you might already have for this Baserow repo with a standard set of config, are you sure? ${ NC } ${ GREEN } Enter Y or y to continue ${ NC } ${ RED } , or any other character to abort. ${ NC } " -n 1 -r
2021-10-06 11:56:38 +00:00
echo # (optional) move to a new line
if [ [ $REPLY = ~ ^[ Yy] $ ] ]
then
SCRIPT_DIR = " $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " & > /dev/null && pwd ) "
2022-07-19 06:15:27 +00:00
cp -a " ${ SCRIPT_DIR } /. " " ${ SCRIPT_DIR } /../../ "
# Cleanup this file which also got copied.
2021-10-06 11:56:38 +00:00
THIS_SCRIPTS_NAME = ` basename " $0 " `
2022-07-19 06:15:27 +00:00
rm " ${ SCRIPT_DIR } /../../ ${ THIS_SCRIPTS_NAME } "
2021-10-06 11:56:38 +00:00
echo " ${ GREEN } Successfully applied the default Baserow Intellij config... ${ NC } "
else
echo " ${ RED } Aborted application of the default Baserow Intellij config... ${ NC } "
fi