Moves binaries for use with gnu stow
This commit is contained in:
parent
f528ba793c
commit
4fd9f4809b
89 changed files with 0 additions and 0 deletions
53
bin/.bin/php-swap.old
Executable file
53
bin/.bin/php-swap.old
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/bash
|
||||
line=$(php --version | grep "PHP" -m 1)
|
||||
libphp="/opt/lampp/modules/libphp7.1.so"
|
||||
case "$1" in
|
||||
5)
|
||||
file="/opt/lampp/etc/extra/httpd-xampp-php5.conf"
|
||||
phpexe=$(ls /opt/lampp/bin/php-5.*)
|
||||
phpcgi=$(ls /opt/lampp/bin/php-cgi-5.*)
|
||||
phpconfig=$(ls /opt/lampp/bin/php-config-5.*)
|
||||
phpize=$(ls /opt/lampp/bin/phpize-5.*)
|
||||
;;
|
||||
7 | 7.1)
|
||||
file="/opt/lampp/etc/extra/httpd-xampp-php7.conf"
|
||||
phpexe=$(ls /opt/lampp/bin/php-7.1.*)
|
||||
phpcgi=$(ls /opt/lampp/bin/php-cgi-7.1.*)
|
||||
phpconfig=$(ls /opt/lampp/bin/php-config-7.1.*)
|
||||
phpize=$(ls /opt/lampp/bin/phpize-7.1.*)
|
||||
;;
|
||||
7.0)
|
||||
file="/opt/lampp/etc/extra/httpd-xampp-php7.conf"
|
||||
phpexe=$(ls /opt/lampp/bin/php-7.0.*)
|
||||
phpcgi=$(ls /opt/lampp/bin/php-cgi-7.0.*)
|
||||
phpconfig=$(ls /opt/lampp/bin/php-config-7.0.*)
|
||||
phpize=$(ls /opt/lampp/bin/phpize-7.0.*)
|
||||
libphp="/opt/lampp/modules/libphp7.0.so"
|
||||
;;
|
||||
*)
|
||||
echo "Please specify the version you want"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
lampp='/opt/lampp/lampp'
|
||||
echo $phpexe
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "Sorry, you are not root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
$lampp stopapache
|
||||
ln -s -f $file /opt/lampp/etc/extra/httpd-xampp.conf
|
||||
ln -s -f $phpexe /opt/lampp/bin/php
|
||||
ln -s -f $phpcgi /opt/lampp/bin/php-cgi
|
||||
ln -s -f $phpconfig /opt/lampp/bin/php-config
|
||||
ln -s -f $phpize /opt/lampp/bin/phpize
|
||||
ln -s -f $libphp /opt/lampp/modules/libphp7.so
|
||||
|
||||
|
||||
$lampp startapache
|
||||
echo
|
||||
echo "Now on PHP ${phpexe##*-}"
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue