mirror of https://github.com/sbt/sbt.git
Moved downloads to user-owned dir.
Sbt launch jars are now downloaded to ~/.sbt/.lib to ensure that the location is writeable by the user. This could still be a faulty assumption, but we'll try it anyway.
This commit is contained in:
parent
57dd8bc0ac
commit
7574d35868
10
sbt
10
sbt
|
|
@ -29,6 +29,10 @@ get_mem_opts () {
|
|||
echo "-Xms${mem}m -Xmx${mem}m -XX:MaxPermSize=${perm}m -XX:ReservedCodeCacheSize=${codecache}m"
|
||||
}
|
||||
|
||||
is_owned_by_user () {
|
||||
[[ "$(stat --printf='%U' $1)" == "$(USER)" ]] && { echo "OK" ; return; }
|
||||
}
|
||||
|
||||
die() {
|
||||
echo "Aborting: $@"
|
||||
exit 1
|
||||
|
|
@ -52,7 +56,11 @@ declare -r latest_29="2.9.1"
|
|||
declare -r latest_210="2.10.0-SNAPSHOT"
|
||||
|
||||
declare -r script_path=$(get_script_path "$BASH_SOURCE")
|
||||
declare -r script_dir="$(dirname $script_path)"
|
||||
if test -z "$HOME"; then
|
||||
declare -r script_dir="$(dirname $script_path)"
|
||||
else
|
||||
declare -r script_dir="$HOME/.sbt"
|
||||
fi
|
||||
declare -r script_name="$(basename $script_path)"
|
||||
|
||||
declare java_cmd=java
|
||||
|
|
|
|||
Loading…
Reference in New Issue