Skip to content

Commit

Permalink
Merge pull request #370 from nolith/anathema_script
Browse files Browse the repository at this point in the history
Linux anathema.sh overhaul
  • Loading branch information
UrsKR committed Jun 11, 2014
2 parents 25e3bb4 + 190b23a commit 7a3cfba
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Development_Distribution/Linux/anathema.sh
@@ -1,7 +1,17 @@
#!/bin/sh

ANATHEMA_DIR=/usr/share/anathema
REPO_DIR=${HOME}/.anathema/repository
# get the absolute path of the current script
SOURCE=$(readlink -f "$0")
# resolve $SOURCE until the file is no longer a symlink
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
# if $SOURCE was a relative symlink, we need to resolve it relative
# to the path where the symlink file was located
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
ANATHEMA_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
REPO_DIR=${1-${HOME}/.anathema/repository}
JAVA_BIN=

# Check for java in $JAVA_HOME
Expand Down

0 comments on commit 7a3cfba

Please sign in to comment.