ViaThinkSoft CodeLib
Dieser Artikel befindet sich in der Kategorie:
CodeLib → HowTos → Sonstiges
Run following script pma-init.sh:
Now, the current stable version of phpMyAdmin is installed in phpmyadmin/ .
If you are doing this as superuser, please run "chown -R <webuser>:<webgroup> phpmyadmin/" so that Apache/PHP can access it correctly.
Now you can use the following script pma-update.sh which can be ran by a crontab.
To run it daily at 3:00 A.M., add this to your crontab:
--------------------------
Update: Here is the current version of our script:
#!/bin/sh
git clone --depth=1 git://github.com/phpmyadmin/phpmyadmin.git
cd phpmyadmin
git checkout --track -b PMASTABLE origin/STABLE
Now, the current stable version of phpMyAdmin is installed in phpmyadmin/ .
If you are doing this as superuser, please run "chown -R <webuser>:<webgroup> phpmyadmin/" so that Apache/PHP can access it correctly.
Now you can use the following script pma-update.sh which can be ran by a crontab.
#!/bin/sh
DIR=`dirname "$0"`
# Renew:
cd "$DIR/phpmyadmin"
# git pull | grep -v "Already up-to-date."
git config --global user.name "nobody@example.com" # put your mail address here
git pull &> /dev/null
# Use this line if you run this crontab as a superuser
# chown -R <webuser>:<webgroup> phpmyadmin
#echo $?
exit $?
To run it daily at 3:00 A.M., add this to your crontab:
0 3 * * * nice -n 18 /<directory>/pma-update.sh
--------------------------
Update: Here is the current version of our script:
#!/bin/bash
# http://www.networkjack.info/blog/2011/04/05/simple-checkout-of-phpmyadmin-with-git/
DIR=$( dirname "$0" )
# It was created by these commands:
if [ ! -d "$DIR"/phpmyadmin ]; then
cd "$DIR"
mkdir tmp
cd tmp
# git clone --depth=1 https://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
git clone --depth=1 https://github.com/phpmyadmin/phpmyadmin.git
cd phpmyadmin
git remote update
git fetch
git checkout --track -b PMASTABLE origin/STABLE
cd ..
mv phpmyadmin ../
cd ..
rm -R tmp
fi
# Renew:
cd "$DIR"/phpmyadmin
git config --global user.name "nobody@example.com"
# git pull | grep -v "Already up-to-date."
git pull --quiet
RET=$?
if [ $RET -eq 0 ]; then
# German (de) language recompile
# requires: sudo aptitude install gettext
"$DIR"/scripts/generate-mo de
fi
exit $RET
Daniel Marschall
ViaThinkSoft Mitbegründer
ViaThinkSoft Mitbegründer