Commit 37901916 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU install.sh: fine-tuned messages and date format when renaming an older installation

--HG--
branch : qemu
parent 3c0b7237dccf
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment