chore(cli): check vars file prior update (#1091)
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
b051e5b3f9
commit
d67c86edfe
1 changed files with 5 additions and 1 deletions
|
|
@ -263,7 +263,11 @@ function upgrade() {
|
|||
# 3. How to update package. Because openreplay -u will be done from old update script
|
||||
# 4. Update from Version
|
||||
exists git || log err "Git not found. Please install"
|
||||
or_version=$(busybox awk '/fromVersion/{print $2}' < "${OR_DIR}/vars.yaml")
|
||||
or_version=$(busybox awk '/fromVersion/{print $2}' < "${OR_DIR}/vars.yaml") || {
|
||||
log err "${BWHITE}${OR_DIR}/vars.yaml${RED} not found.
|
||||
Please do ${BWHITE}openreplay --deprecated-upgrade /path/to/vars.yaml${RED}
|
||||
"
|
||||
}
|
||||
|
||||
# Creating backup dir of current installation
|
||||
[[ -d "$OR_DIR/openreplay" ]] && sudo cp -rfb "$OR_DIR/openreplay" "$OR_DIR/openreplay_${or_version//\"}" && sudo rm -rf ${OR_DIR}/openreplay
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue