ISSUE-295 use "mktemp" instead of creating files locally which makes it possible to install Refine under a different user than the one executing it on *nix systems

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1956 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-12-24 20:05:57 +00:00
parent 209f157656
commit 9c98842132

12
refine
View File

@ -91,9 +91,13 @@ add_option() {
} }
load_configs() { load_configs() {
cat $1 | egrep "^[A-Z]" | sed 's/^\(.*\)$/export \1/' > .$1 TEMP_CONFIG=$(mktemp -t refine.XXXXXXX)
. ./.$1 if [ "${TEMP_CONFIG}" == "" ]; then
rm ./.$1 error "Could not create temporary file to load configurations"
fi
cat $1 | egrep "^[A-Z]" | sed 's/^\(.*\)$/export \1/' > ${TEMP_CONFIG}
. ${TEMP_CONFIG}
rm ${TEMP_CONFIG}
} }
check_macosx() { check_macosx() {
@ -937,3 +941,5 @@ case "$ACTION" in
dist) dist $1;; dist) dist $1;;
*) usage; ;; *) usage; ;;
esac esac
# ----------- end of file --------------------