I know this is kinda off-topic, but since I've found the code I'm talking about here on SO I hope that someone can help me.
I was dealing with a POSTGRES error and read here: Can not connect to local PostgreSQL an answer, the one from vvdpzz that lead me to run that code in my terminal. After that, my mac stopped working and since then it doens't reboot, it comes till the apple logo that keeps flashing and switching with a folder with a question mark.
I've checked the code that curl execute and it's the following:
#!/bin/sh
BREW_POSTGRES_DIR=`brew info postgres | awk '{print $1"/bin"}' | grep "/postgresql/"`
LION_POSTGRES_DIR=`which postgres | xargs dirname`
LION_PSQL_DIR=`which psql | xargs dirname`
sudo mkdir -p $LION_POSTGRES_DIR/archive
sudo mkdir -p $LION_PSQL_DIR/archive
for i in `ls $BREW_POSTGRES_DIR`
do
if [ -f $LION_POSTGRES_DIR/$i ]
then
sudo mv $LION_POSTGRES_DIR/$i $LION_POSTGRES_DIR/archive/$i
sudo ln -s $BREW_POSTGRES_DIR/$i $LION_POSTGRES_DIR/$i
fi
if [ -f $LION_PSQL_DIR/$i ]
then
sudo mv $LION_PSQL_DIR/$i $LION_PSQL_DIR/archive/$i
sudo ln -s $BREW_POSTGRES_DIR/$i $LION_PSQL_DIR/$i
fi
done
What happened? I'm not an expert. How can I solve this. I've tried to start in secure mode by pressing the shift key while booting but it doesn't work.