Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
add /usr/bin/cmupdate command in 123.09beta01
- typing command in SSH: cmupdate - equivalent to running centmin.sh menu option 23 submenu option 2
- Loading branch information
Showing
with
53 additions
and 0 deletions.
- +10 −0 inc/cpcheck.inc
- +43 −0 tools/cmupdate.sh
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
###################################################### | ||
# cmupdate | ||
# written by George Liu (eva2000) centminmod.com | ||
###################################################### | ||
# variables | ||
MAINDIR='/etc/centminmod' | ||
CM_INSTALLDIR='/usr/local/src/centminmod' | ||
############# | ||
if [ -f "${MAINDIR}/custom_config.inc" ]; then | ||
# default is at /etc/centminmod/custom_config.inc | ||
source "${MAINDIR}/custom_config.inc" | ||
fi | ||
|
||
# variables | ||
############# | ||
|
||
|
||
DT=$(date +"%d%m%y-%H%M%S") | ||
###################################################### | ||
# functions | ||
############# | ||
# set locale temporarily to english | ||
# due to some non-english locale issues | ||
export LC_ALL=en_US.UTF-8 | ||
export LANG=en_US.UTF-8 | ||
export LANGUAGE=en_US.UTF-8 | ||
export LC_CTYPE=en_US.UTF-8 | ||
|
||
fupdate() { | ||
if [[ -d "${CM_INSTALLDIR}/.git" ]]; then | ||
cd "${CM_INSTALLDIR}" | ||
git stash | ||
git pull | ||
fi | ||
} | ||
|
||
###################################################### | ||
fupdate | ||
|
||
exit | ||
|
||
|