Created
April 9, 2014 09:23
-
-
Save toc21c/10246434 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
MIDW_BIN="/usr/local/middleware/bin" | |
PATCH_FILE="patch_daemon.tar.gz" | |
# get daemon list | |
shopt -s nullglob | |
psd_array=($MIDW_BIN/*_psd) | |
bsd_array=($MIDW_BIN/*bsd) | |
# old files backup and patch | |
for psd in "${psd_array[@]}" | |
do | |
mv $psd $psd.$$ | |
done | |
for bsd in "${bsd_array[@]}" | |
do | |
mv $bsd $bsd.$$ | |
done | |
tar xf $PATH_FILE -C $MIDW_BIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment