fix cd to python dir in freeze.bash

- cd was missing, instead the directory was being printed
- readlink doesn't exist on BSD
pull/158/head
Min RK 2017-11-30 12:33:46 +01:00
rodzic 3c6c19e1c5
commit 3290f93512
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -5,7 +5,14 @@ set -euo pipefail
# Does the same for requirements2.txt to requirements2.frozen.txt...
# cd to the directory where the freeze script is located
dirname "$(readlink -f "$0")"
if [[ ! -z "$(which realpath 2>/dev/null)" ]]; then
realpath=realpath
else
realpath="readlink -f"
fi
cd $(dirname "$($realpath "$0")")
function freeze-requirements {
# Freeze a requirements file $2 into a frozen requirements file $3