Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
351a3adc4971
Commit
37901916
authored
Dec 27, 2017
by
alex@thinkpad
Browse files
QEMU install.sh: fine-tuned messages and date format when renaming an older installation
--HG-- branch : qemu
parent
3c0b7237dccf
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/qemu/install.sh
View file @
351a3adc
...
@@ -318,19 +318,22 @@ echo "*** Setting up QEMU in $(pwd)..."
...
@@ -318,19 +318,22 @@ echo "*** Setting up QEMU in $(pwd)..."
echo
echo
if
[
-d
$QEMU_NAME
]
;
then
if
[
-d
$QEMU_NAME
]
;
then
DATE
=
`
date
'+%Y-%m-%d
-
%H-%M-%S'
`
DATE
=
`
date
'+%Y-%m-%d
_
%H-%M-%S'
`
echo
"*** Directory
$(
pwd
)
/
$QEMU_NAME
already exists."
echo
"*** Directory
$(
pwd
)
/
$QEMU_NAME
already exists."
echo
"*** To reinstall, please rename or delete it, then run this script again."
echo
"*** To reinstall, please rename or delete it first."
echo
"*** You can enter
\"
D
\"
(uppercase!) now to delete the directory automatically"
echo
""
echo
"*** or
\"
R
\"
|
\"
r
\"
to rename it to
$(
pwd
)
/
$QEMU_NAME
-
$DATE
."
echo
" - R or r : rename to
$(
pwd
)
/
${
QEMU_NAME
}
_
$DATE
/"
echo
"*** Everything else will cancel the operation."
echo
" - uppercase D : delete
$(
pwd
)
/
$QEMU_NAME
/ without confirmation (!)"
echo
" - any other key : cancel the operation (exit the script)"
echo
" you'll have to rename/delete this directory"
echo
" and run the script again."
read
answer
read
answer
case
"
$answer
"
in
case
"
$answer
"
in
D
)
D
)
rm
-Rf
$QEMU_NAME
rm
-Rf
$QEMU_NAME
;;
;;
R|r
)
R|r
)
mv
$QEMU_NAME
$QEMU_NAME
-
$DATE
mv
$QEMU_NAME
$
{
QEMU_NAME
}
_
$DATE
;;
;;
*
)
*
)
exit
1
exit
1
...
@@ -343,6 +346,7 @@ wget -q --show-progress --progress=dot:giga -c http://wiki.qemu-project.org/down
...
@@ -343,6 +346,7 @@ wget -q --show-progress --progress=dot:giga -c http://wiki.qemu-project.org/down
echo
echo
tar
jxf
$QEMU_NAME
.tar.bz2
tar
jxf
$QEMU_NAME
.tar.bz2
echo
echo
# initialize a git repo, to make it easy to track changes to QEMU source
# initialize a git repo, to make it easy to track changes to QEMU source
cd
$QEMU_NAME
cd
$QEMU_NAME
if
[
!
-d
.git
]
;
then
if
[
!
-d
.git
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment