Created
September 6, 2017 19:16
-
-
Save komputronika/8cf8f0db972999bbb6a9f10ebcb124cf to your computer and use it in GitHub Desktop.
Switch XAMPP version in Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "XAMPP Switcher" | |
if [ -z "$1" ] ; then | |
# No argument | |
echo | |
echo "Silahkan ketik versi PHP" | |
echo "[5] Untuk PHP versi 5" | |
echo "[7] Untuk PHP versi 7" | |
echo | |
read versi | |
else | |
# Get version from argument | |
versi=$1 | |
fi | |
echo "Versi yang anda pilih: " $versi | |
echo | |
sudo /opt/lampp/xampp stop | |
sudo rm /opt/lampp | |
sudo ln -s /opt/lampp$versi /opt/lampp | |
echo | |
sudo /opt/lampp/xampp start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment