Do not remove SOURCEDIR in install_rally.sh
Co-Authored-By: Oleh Anufriiev <oanufriev@mirantis.com> Change-Id: Ic7eac45455185c6ba18caf40ba39ecea845f366d
This commit is contained in:
parent
31d34f4c82
commit
66accdb1d4
@ -706,19 +706,6 @@ then
|
|||||||
echo "Warning! Unable to wipe python compiled files"
|
echo "Warning! Unable to wipe python compiled files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$USEVIRTUALENV" = 'yes' ]
|
|
||||||
then
|
|
||||||
if [ "$VENVDIR/src" != "$BASEDIR" ]
|
|
||||||
then
|
|
||||||
SOURCEDIR="$VENVDIR"/src
|
|
||||||
if [ -d $SOURCEDIR ]
|
|
||||||
then
|
|
||||||
rm -rf $SOURCEDIR
|
|
||||||
fi
|
|
||||||
mkdir $SOURCEDIR
|
|
||||||
cp -r . $SOURCEDIR/
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
else
|
else
|
||||||
if [ "$USEVIRTUALENV" = 'yes' ]
|
if [ "$USEVIRTUALENV" = 'yes' ]
|
||||||
@ -728,29 +715,6 @@ else
|
|||||||
SOURCEDIR="$ORIG_WD"/rally.git
|
SOURCEDIR="$ORIG_WD"/rally.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if source directory is present
|
|
||||||
if [ -d "$SOURCEDIR" ]
|
|
||||||
then
|
|
||||||
if [ $RECREATEDEST != 'yes' ]
|
|
||||||
then
|
|
||||||
echo "Source directory '$SOURCEDIR' already exists."
|
|
||||||
echo "I can wipe it out in order to make a new installation,"
|
|
||||||
echo "but this means any files in that directory, and the ones"
|
|
||||||
echo "underneath it will be deleted."
|
|
||||||
echo
|
|
||||||
if ! ask_yn "Do you want to wipe the source directory '$SOURCEDIR'?"
|
|
||||||
then
|
|
||||||
echo "*Not* overwriting destination directory '$SOURCEDIR'."
|
|
||||||
else
|
|
||||||
rm -rf $SOURCEDIR
|
|
||||||
if [ -d "$SOURCEDIR"/.git ]
|
|
||||||
then
|
|
||||||
abort $EX_CANTCREAT "Unable to wipe source directory $SOURCEDIR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! [ -d "$SOURCEDIR"/.git ]
|
if ! [ -d "$SOURCEDIR"/.git ]
|
||||||
then
|
then
|
||||||
echo "Downloading Rally from subversion repository $RALLY_GIT_URL ..."
|
echo "Downloading Rally from subversion repository $RALLY_GIT_URL ..."
|
||||||
@ -802,16 +766,11 @@ __EOF__
|
|||||||
SAMPLESDIR=$VENVDIR/samples
|
SAMPLESDIR=$VENVDIR/samples
|
||||||
mkdir -p $SAMPLESDIR
|
mkdir -p $SAMPLESDIR
|
||||||
cp -r $SOURCEDIR/samples/* $SAMPLESDIR/
|
cp -r $SOURCEDIR/samples/* $SAMPLESDIR/
|
||||||
if [ "$BASEDR" != "$SOURCEDIR" ]
|
|
||||||
then
|
|
||||||
rm -rf $SOURCEDIR
|
|
||||||
echo "Source directory is removed."
|
|
||||||
else
|
|
||||||
echo "Unabled to remove source directory, becaus this script was started from it."
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
SAMPLESDIR=$SOURCEDIR/samples
|
SAMPLESDIR=$SOURCEDIR/samples
|
||||||
fi
|
fi
|
||||||
|
mkdir -p $VENVDIR/etc/bash_completion.d
|
||||||
|
install $SOURCEDIR/etc/rally.bash_completion $VENVDIR/etc/bash_completion.d/
|
||||||
|
|
||||||
cat <<__EOF__
|
cat <<__EOF__
|
||||||
$GREEN==============================
|
$GREEN==============================
|
||||||
@ -843,14 +802,6 @@ else
|
|||||||
SAMPLESDIR=/usr/share/rally/samples
|
SAMPLESDIR=/usr/share/rally/samples
|
||||||
mkdir -p $SAMPLESDIR
|
mkdir -p $SAMPLESDIR
|
||||||
cp -r $SOURCEDIR/samples/* $SAMPLESDIR/
|
cp -r $SOURCEDIR/samples/* $SAMPLESDIR/
|
||||||
if [ "$BASEDIR" != "$SOURCEDIR" ]
|
|
||||||
then
|
|
||||||
rm -rf $SOURCEDIR
|
|
||||||
echo "Source directory is removed."
|
|
||||||
else
|
|
||||||
echo "Unabled to remove source directory, because this script was started from it."
|
|
||||||
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
SAMPLESDIR=$SOURCEDIR/samples
|
SAMPLESDIR=$SOURCEDIR/samples
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user