Fix mkdir of target location

This commit is contained in:
Julian Ospald 2018-09-29 23:55:33 +08:00
parent 223557ed17
commit 6f70844708
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -274,8 +274,6 @@ install_ghc() {
download_url=$(get_download_url "${myghcver}")
download_tarball_name=$(basename "${download_url}")
[ -e "${target_location}" ] || mkdir "${target_location}"
if [ -e "${inst_location}" ] ; then
if ${FORCE} ; then
echo "GHC already installed in ${inst_location}, overwriting!"
@ -312,6 +310,8 @@ install_ghc() {
die "Failed to install"
}
[ -e "${target_location}" ] || mkdir "${target_location}"
for f in "${inst_location}"/bin/*-"${myghcver}" ; do
[ -e "${f}" ] || die "Something went wrong, ${f} does not exist!"
fn=$(basename "${f}")