diff --git a/.gitignore b/.gitignore index 6487d8b..1b6248c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .DS_Store _downloads/ -tools/ +_tools/ Patches.xcodeproj/xcuserdata Patches.xcodeproj/project.xcworkspace Build/*.aml diff --git a/_get_tools.sh b/_get_tools.sh new file mode 100755 index 0000000..b664456 --- /dev/null +++ b/_get_tools.sh @@ -0,0 +1,16 @@ +#!/bin/bash +#set -x + +# get copy of tools if not present +if [[ ! -d ./_tools ]]; then + git clone https://github.com/RehabMan/hack-tools.git _tools +fi +# update tools to latest +if [[ -e ./_tools/.git ]]; then + cd ./_tools && git pull + cd .. +fi +# remove old tools copy (that was in tools instead of _tools) +rm -Rf tools + +#eof diff --git a/download.sh b/download.sh index b4291dd..5070c90 100755 --- a/download.sh +++ b/download.sh @@ -1,19 +1,11 @@ #!/bin/bash #set -x -# get copy of tools if not present -if [[ ! -d ./tools ]]; then - git clone https://github.com/RehabMan/hack-tools.git tools -fi -# update tools to latest -if [[ -e ./tools/.git ]]; then - cd ./tools && git pull - cd .. -fi +# get copy of tools +"$(dirname ${BASH_SOURCE[0]})"/_get_tools.sh # include subroutines -DIR=$(dirname ${BASH_SOURCE[0]}) -source "$DIR/tools/_download_subs.sh" +source "$(dirname ${BASH_SOURCE[0]})"/_tools/_download_subs.sh # remove deprecated downloads directory to avoid confusion if [[ -e ./downloads ]]; then rm -Rf ./downloads; fi diff --git a/install_downloads.sh b/install_downloads.sh index 50b7f2b..6fc8728 100755 --- a/install_downloads.sh +++ b/install_downloads.sh @@ -8,8 +8,7 @@ ESSENTIAL= #HDA=ALC283 # include subroutines -DIR=$(dirname ${BASH_SOURCE[0]}) -source "$DIR/tools/_install_subs.sh" +source "$(dirname ${BASH_SOURCE[0]})"/_tools/_install_subs.sh warn_about_superuser diff --git a/mount_efi.sh b/mount_efi.sh new file mode 120000 index 0000000..d50e089 --- /dev/null +++ b/mount_efi.sh @@ -0,0 +1 @@ +_tools/mount_efi.sh \ No newline at end of file