change of [[ to [
This commit is contained in:
parent
9b4cdbc40c
commit
be1ad867db
1 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ CREATE() {
|
|||
RESTORE() {
|
||||
echo "Are you sure you want to restore the rescue? (y/N)"
|
||||
read -r entry
|
||||
if [[ "$entry" =~ ^[yY]$ ]]
|
||||
if echo "$entry" | grep -q "^[yY]$"
|
||||
then
|
||||
cp -i "${MAIN_LOCATION}/${LOCATION}/${VMHOSTNAME}.cow.backup" "${MAIN_LOCATION}/${LOCATION}/${VMHOSTNAME}.cow"
|
||||
echo "Done"
|
||||
|
@ -153,7 +153,7 @@ RESTORE() {
|
|||
BACKUP() {
|
||||
# Should test if the folder ${MAIN_LOCATION}/${LOCATION}/${VMHOSTNAME}.cow exist or else it will arrive an error.
|
||||
read -p "Are you sure you want to backup the volume? If you continue the previous backup will be lost (y/N) " -r entry
|
||||
if [[ "$entry" =~ ^[yY]$ ]]
|
||||
if echo "$entry" | grep -q "^[yY]$"
|
||||
then
|
||||
cp -i "${MAIN_LOCATION}/${LOCATION}/${VMHOSTNAME}.cow" "${MAIN_LOCATION}/${LOCATION}/${VMHOSTNAME}.cow.backup"
|
||||
echo "Done"
|
||||
|
@ -162,7 +162,7 @@ BACKUP() {
|
|||
|
||||
SUPPRESS() {
|
||||
read -p "Are you sure you want to delete all data relative to the vm $1? (y/N)" -r entry
|
||||
if [[ "$entry" =~ ^[yY]$ ]]
|
||||
if echo "$entry" | grep -q "^[yY]$"
|
||||
then
|
||||
rm -Ri "${MAIN_LOCATION}/${LOCATION}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue