provision: Use 'cp -a' for copying requirements.txt.

It's generally best to preserve the metadata when copying files.
This commit is contained in:
Tim Abbott 2017-08-17 10:46:58 -07:00
parent 5e4c65f325
commit 2f7968e860

View file

@ -27,7 +27,7 @@ cmp "$BASEDIR/zulip-api-py2-venv/installed-requirements.txt" requirements.txt 2>
RVAL=$? # Return value of the comparision. 0 means files are same. RVAL=$? # Return value of the comparision. 0 means files are same.
if [ "$RVAL" -ne 0 ]; then if [ "$RVAL" -ne 0 ]; then
pip install -r "$BASEDIR/requirements.txt" pip install -r "$BASEDIR/requirements.txt"
cp requirements.txt "$BASEDIR/zulip-api-py2-venv/installed-requirements.txt" cp -a requirements.txt "$BASEDIR/zulip-api-py2-venv/installed-requirements.txt"
echo "Requirements installed." echo "Requirements installed."
fi fi
echo 'Success! Run `source' "$BASEDIR/zulip-api-py2-venv/bin/activate"'`' "to activate virtualenv." echo 'Success! Run `source' "$BASEDIR/zulip-api-py2-venv/bin/activate"'`' "to activate virtualenv."