-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
882f6c5
commit 1ba6585
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|