Skip to content
Snippets Groups Projects
Commit e26568f2 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

CONFIG: add foamPackRelease -gitbase option

parent 497cdb50
Branches
Tags
No related merge requests found
......@@ -51,6 +51,7 @@ options:
-no-prefix Do not prefix subdirectory
-compress=TYPE Compress with specified type
-sep=SEP Change version/patch separator from '_' to SEP
-gitbase=DIR Alternative repo location
-with-api=NUM Specify alternative api value for packaging
-tgz Alias for -compress=tgz
-help Print help
......@@ -86,6 +87,7 @@ outputDir="."
versionSeparator='_'
withPatchNum=true
unset compress packageApi withSource withModules prefixDir tarName
unset gitbase
while [ "$#" -gt 0 ]
do
......@@ -124,6 +126,9 @@ do
-sep=*)
versionSeparator="${1#*=}"
;;
-gitbase=*)
gitbase="${1#*=}"
;;
-with-api=*)
packageApi="${1#*=}"
;;
......@@ -175,8 +180,18 @@ findGitDir()
)
}
echo "Find git repository ... from script location" 1>&2
gitbase=$(findGitDir "${0%/*}")
if [ -d "$PWD/.git" ] && [ -d "$PWD/META-INFO" ]
then
echo "Use git repository ... from current directory" 1>&2
gitbase=$(findGitDir "$PWD")
fi
##DEBUG unset gitbase
if [ -z "$gitbase" ]
then
echo "Find git repository ... from script location" 1>&2
gitbase=$(findGitDir "${0%/*}")
fi
##DEBUG unset gitbase
if [ -z "$gitbase" ]
......@@ -185,7 +200,7 @@ then
gitbase=$(findGitDir "$PWD")
fi
[ -d "$gitbase" ] || die "Could not locate a git directory"
[ -d "$gitbase/.git" ] || die "Could not locate a git directory"
echo "Detected git repository at $gitbase" 1>&2
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment