diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/librefetch/librefetch | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 5428655..07303ae 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -66,16 +66,6 @@ main() { mode=download-create parse_options "$@" - local startdir=$PWD - export BUILDDIR="${BUILDFILE%/*}" - if [[ -f "${BUILDDIR}/SRCBUILD" ]]; then - BUILDFILE="${BUILDDIR}/SRCBUILD" - srcbuild="$(modified_srcbuild "$BUILDFILE")" - else - srcbuild="$(modified_pkgbuild "$BUILDFILE")" - fi - makepkg="$(modified_makepkg "$(which "${MAKEPKG:-makepkg}")")" - # Mode: version, help ################################################## if [[ $mode =~ version ]]; then @@ -87,6 +77,18 @@ main() { return 0 fi + ######################################################################## + + local startdir=$PWD + export BUILDDIR="${BUILDFILE%/*}" + if [[ -f "${BUILDDIR}/SRCBUILD" ]]; then + BUILDFILE="${BUILDDIR}/SRCBUILD" + srcbuild="$(modified_srcbuild "$BUILDFILE")" + else + srcbuild="$(modified_pkgbuild "$BUILDFILE")" + fi + makepkg="$(modified_makepkg "$(which "${MAKEPKG:-makepkg}")")" + # Mode: checksums ###################################################### if [[ $mode =~ checksums ]]; then |