Kaydet (Commit) 8b480be3 authored tarafından Adınız's avatar Adınız

fix inary-template pspec class bug

üst 01297451
...@@ -21,6 +21,7 @@ err_msg(){ ...@@ -21,6 +21,7 @@ err_msg(){
echo " -x build package after create" echo " -x build package after create"
echo " -y do not ask anything" echo " -y do not ask anything"
echo " -z do not generate pspec and actions" echo " -z do not generate pspec and actions"
echo " -d do not generate pspec class"
echo " -h write help message" echo " -h write help message"
echo " Actions options:" echo " Actions options:"
echo " -t build type (default: autotools)" echo " -t build type (default: autotools)"
...@@ -50,8 +51,13 @@ name="" ...@@ -50,8 +51,13 @@ name=""
directory="" directory=""
homepage="https://gitlab.com/sulinos/devel/inary" homepage="https://gitlab.com/sulinos/devel/inary"
buildtype="autotools" buildtype="autotools"
packager="Your Name" if [ -f "~/.gitconfig" ] ; then
email="yourmane@example.org" email="$(cat ~/.gitconfig | grep 'email =' | sed 's/.*= //g')"
packager="$(cat ~/.gitconfig | grep 'name =' | sed 's/.*= //g')"
else
packager="Your Name"
email="yourmane@example.org"
fi
license="GPLv3" license="GPLv3"
isa="" isa=""
summary="Package summary missing" summary="Package summary missing"
...@@ -66,8 +72,9 @@ bnow=false ...@@ -66,8 +72,9 @@ bnow=false
confopt="" confopt=""
forceyes="" forceyes=""
dummy="" dummy=""
noclass=""
#opt parse #opt parse
while getopts -- ':o:n:t:c:p:u:e:l:i:s:d:b:a:r:v:m:' OPTION; do while getopts -- ':o:n:t:c:p:u:e:l:i:s:d:b:a:r:v:m:d' OPTION; do
case "$OPTION" in case "$OPTION" in
o) o)
directory="${OPTARG[@]}" directory="${OPTARG[@]}"
...@@ -156,6 +163,9 @@ while getopts -- ':o:n:t:c:p:u:e:l:i:s:d:b:a:r:v:m:' OPTION; do ...@@ -156,6 +163,9 @@ while getopts -- ':o:n:t:c:p:u:e:l:i:s:d:b:a:r:v:m:' OPTION; do
z) z)
dummy="true" dummy="true"
;; ;;
d)
noclass="true"
;;
*) *)
inf_msg inf_msg
err_msg err_msg
...@@ -368,7 +378,7 @@ echo "" ...@@ -368,7 +378,7 @@ echo ""
echo " class package_pages:" echo " class package_pages:"
echo " name = \"${name}-pages\"" echo " name = \"${name}-pages\""
echo " runtimedependencies = [\"$name\"]" echo " runtimedependencies = [\"$name\"]"
echo " files = [(\"library\", \"/usr/share/doc/\")]" echo " files = [(\"library\", \"/usr/share/man/\")]"
echo "" echo ""
echo " class package_32bit:" echo " class package_32bit:"
echo " name = \"${name}-32bit\"" echo " name = \"${name}-32bit\""
...@@ -454,7 +464,10 @@ directory=$(realpath $directory) ...@@ -454,7 +464,10 @@ directory=$(realpath $directory)
mkdir -p $directory mkdir -p $directory
info "Creating" "pspec.xml to $directory/pspec.xml" info "Creating" "pspec.xml to $directory/pspec.xml"
write_pspec > $directory/pspec.xml write_pspec > $directory/pspec.xml
write_pspec_class > $directory/pspec.py if [ ! "$noclass" == "true" ] ; then
info "Creating" "pspec.py to $directory/pspec.py"
write_pspec_class > $directory/pspec.py
fi
info "Creating" "actions.py to $directory/actions.py" info "Creating" "actions.py to $directory/actions.py"
write_actions > $directory/actions.py write_actions > $directory/actions.py
......
Markdown is supported
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