Skip to content

Commit c6ccdc5

Browse files
committed
Supress curl error message and add user confirmation for upgrade.
1 parent 4cbdb81 commit c6ccdc5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bin/v-update-sys-hestia-git

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,21 @@ if [ -z "$branch" ]; then
102102
exit
103103
fi
104104

105+
# Ask the user for a final confirmation
106+
read -p 'The update to a development branch should only be performed on test systems, as this can lead to instabilities and problems. Continue with the installation? [Y/N]: ' answer
107+
if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then
108+
echo 'Goodbye'
109+
exit 1
110+
fi
111+
105112
# Install needed software
106113
echo "Updating system APT repositories..."
107114
apt-get -qq update > /dev/null 2>&1
108115
echo "Installing dependencies for compilation..."
109116
apt-get -qq install -y $SOFTWARE > /dev/null 2>&1
110117

111118
# Fix for Debian PHP Envroiment
112-
if [ ! -e /usr/local/include/curl ]; then
113-
ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl
114-
fi
119+
ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl > /dev/null 2>&1
115120

116121
# Get system cpu cores
117122
NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq | awk '{print $4}')

0 commit comments

Comments
 (0)