[SM-Commit] GIT changes to master =?unknown-8bit?Q?qui?= =?unknown-8bit?Q?ll_by_Andra=C5?= =?unknown-8bit?Q?=BE?= Levstik (f5a2fa889d62e72dbfa3ec1b91c9ed06cce294cb)

=?unknown-8bit?Q?Andra=C5=BE?= Levstik scm at mail.sourcemage.org
Thu Aug 3 15:42:08 EDT 2006


GIT changes to master quill by Andraž Levstik <ruskie at mages.ath.cx>:

 usr/bin/quill                         |   14 ++++++++++++--
 var/lib/quill/ChangeLog               |   11 +++++++++++
 var/lib/quill/modules/libcore         |   27 +++++++++++++++------------
 var/lib/quill/modules/libdetails      |   18 +++++++++---------
 var/lib/quill/modules/libfreshmeatxml |    1 +
 5 files changed, 48 insertions(+), 23 deletions(-)

New commits:
commit f5a2fa889d62e72dbfa3ec1b91c9ed06cce294cb
Author: Andraž Levstik <ruskie at mages.ath.cx>
Commit: Andraž Levstik <ruskie at mages.ath.cx>

    Argh how did I manage that...

commit ee66bcadd4bd27d202de9e8b2b4be46cc9c617c3
Author: Andraž Levstik <ruskie at mages.ath.cx>
Commit: Andraž Levstik <ruskie at mages.ath.cx>

diff --git a/usr/bin/quill b/usr/bin/quill
index 9659c54..e0a0985 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -41,7 +41,7 @@ ## @Thanks To all testers
 ## @Contribution abouter, lynxlynxlynx, iuso
 ##
 #---
-QUILL_VERSION=0.1-20060725
+QUILL_VERSION=0.1
 #---
 ## Some basic stuff that should be loaded and set
 . /etc/sorcery/config
@@ -69,6 +69,7 @@ while  [  -n  "$1"  ];  do
      --wizard|-w) export QUILL_MODE="wizard"; shift 1 ;;
 --reconfigure|-r) export QUILL_MODE="reconfigure"; shift 1 ;;
        --help|-h) quill_help ;;
+    --version|-v) message "Quill version: ${QUILL_VERSION}"
                *) message "${PROBLEM_COLOR}Invalid parameter $1$DEFAULT_COLOR"
                   quill_help ;;
     esac
@@ -120,6 +121,7 @@ then
 
   if [[ "${QUILL_MODE}" == "mage" ]] || [[ "${QUILL_MODE}" == "wizard" ]]
   then
+    query_spell_pre_build
     query_spell_prepare
     query_spell_conflicts
     #-query_spell_configure
@@ -131,13 +133,13 @@ then
     #-query_spell_volatiles
     if [[ "${QUILL_MODE}" == "wizard" ]]
     then
-      query_spell_pre_build
       #-  query_spell_pre_install
       #-  query_spell_post_install
       #-  query_spell_pre_remove
       #-  query_spell_post_remove
       #-  query_spell_pre_resurrect
       #-  query_spell_post_resurrect
+      true
     fi
   fi
 
@@ -227,6 +229,14 @@ then
 
   add_history
 fi
+  if query "Do you want to tarball the spell?" n
+then$
+quill_final_tarball
+fi
+if query "Do you want to put the spell into one of the avialable grimoires?" n
+then$
+  quill_final_put_in_grimoire
+fi
 cd ${CURRENTPWD}
 #---
 ##
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index dd6b616..357516a 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,14 @@
+2006-08-03 Andraž "ruskie" Levstik <ruskie at mages.ath.cx>
+	* quill: addded --version, updated version to 0.1 getting ready for release
+	         added queries for generating tarball and putting spell in grimoire
+	         moved pre_build to mage mode
+	* libcore: create relevant dirs, make the grimoire copy work, aditions to
+	           help
+	* libfreshmeatxml: added an extra var to store the original project name
+	                   fixes a bug
+	* libdetails: modified for libfreshmeatxml bug, some identing and replaced
+	              3 echos with message
+
 2006-07-25 Andraž "ruskie" Levstik <ruskie at mages.ath.cx>
 	* quill:updated copyright date, adde 2 more contributors,
 	        added new variable QUILL_VERSION, new mode --reconfigure,
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index c3c129e..66a4797 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -2,7 +2,7 @@ #---
 ## @Synopsis generate basic spell dir
 #---
 function create_spell_base(){
-  mkdir -p ${SPELL_NAME}
+  mkdir -p ${QUILL_SPELL_DIR}/${SPELL_NAME}
   cd ${SPELL_NAME}
   touch DETAILS
   chmod +x DETAILS
@@ -15,10 +15,10 @@ ## @Synopsis download spell's source fil
 #---
 
 function download_spell_source(){
+  mkdir -p ${QUILL_TMP_DIR}
   cd ${QUILL_TMP_DIR}
   wget -c "${SPELL_SRC_URL}"
-  cd ${CURRENTPWD}
-  cd ${SPELL_NAME}
+  cd ${QUILL_SPELL_DIR}/${SPELL_NAME}
 }
 
 #---
@@ -115,24 +115,25 @@ ## @Synopsis function to put the spell i
 #---
 function quill_final_put_in_grimoire() {
   message "You have selected to put the spell into the grimoire"
-  message "Please note there will also be a spell tarball in" 
+  message "Please note there will also be a spell tarball(if so desired) in" 
   message "${USER_HOME}/${QUILL_SPELLDIR} as will be a spelldir"
   message "-----------------------------------------------------------------------------"
-  message "Into which grimoire do you wish to put the spell"
-  quill_list_grimoires
+  message "Into which grimoire do you wish to put the spell(FULL path to it):"
+#  quill_list_grimoires
   read QUILL_GRIM_NAME
-  message "Into which section do you wish to put the spell"
-  quill_list_sections
+  message "Into which section do you wish to put the spell:"
+#  quill_list_sections
   read QUILL_SECT_NAME
   message "Now scribling spell into ${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}/${QUILL_SPELL_NAME}"
   cd ${QUILL_SPELL_DIR}/${QUILL_SPELL_NAME}
+  mkdir -p ${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}
   cp -r ${SPELL_NAME} ${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}/
   if $? != 0 ; then
-     message "Scribling failed"
+     message "Scribbling failed"
   else
-     message "Scribling succeded"
+     message "Scribbling succeded"
      message "Now running scribe reindex on ${QUILL_GRIM_NAME}"
-     scribe reindex ${QUILL_GRIM_NAME}
+     scribe reindex $(basename ${QUILL_GRIM_NAME})
   fi
 }
 
@@ -146,8 +147,10 @@ OPTIONS:  
   --fmxml, -f <SPELL>		get spell data from Freshmeat if possible
   --apprentice, -a		apprentice mode	(default)
   --mage, -m			mage mode (advanced)
-  --wizard, -w			wizard mode (expert)
+  --wizard, -w			wizard mode (expert)(DOES NOTHING FOR NOW)
   --help, -h			display this help
+  --version, -v			display version
+  --reconfigure, -r			reconfigure settings(DOES NOT WORK YET)
 "
   exit 1
 }
diff --git a/var/lib/quill/modules/libdetails b/var/lib/quill/modules/libdetails
index 1a7d4f7..f1b3fc9 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -67,14 +67,14 @@ fi
 }
 
 function query_spell_description(){
-if ! test -f ${QUILL_TMP_DIR}/${SPELL_NAME} ||
+if ! test -f ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-${SPELL_NAME}} ||
    ! ( message "${QUERY_COLOR}Is${DEFAULT_COLOR}"
-       cat ${QUILL_TMP_DIR}/${SPELL_NAME}
+       cat ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-${SPELL_NAME}}
        query "the proper long description?${DEFAULT_COLOR}" y ; ) ; then
   message "${QUERY_COLOR}Please enter a description of the spell:${DEFAULT_COLOR}"
   message "${PROBLEM_COLOR}!!!PRESS ENTER TO CONTINUE!!!${DEFAULT_COLOR}"
   read
-  ${EDITOR:-nano} ${QUILL_TMP_DIR}/${SPELL_NAME}
+  ${EDITOR:-nano} ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-${SPELL_NAME}}
 fi
 }
 
@@ -83,18 +83,18 @@ ## @Synopsis Assign to SPELL_SRC_FILE th
 ## @Synopsis version number parsed from source url.
 #---
 function parse_spell_source_file_info(){
-SPELL_SRC_FILE=$(expr "$SPELL_SRC_URL" : '.*/\(.*\)')
-SPELL_SANITIZED_FILE_NAME=$(expr "$SPELL_SRC_FILE" : '\(.*\)[-|_][0-9]')
-SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : "${SPELL_SANITIZED_FILE_NAME}[-|_]\(.*\)\.t")
+  SPELL_SRC_FILE=$(expr "$SPELL_SRC_URL" : '.*/\(.*\)')
+  SPELL_SANITIZED_FILE_NAME=$(expr "$SPELL_SRC_FILE" : '\(.*\)[-|_][0-9]')
+  SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : "${SPELL_SANITIZED_FILE_NAME}[-|_]\(.*\)\.t")
 }
 
 #---
 ## @Synopsis Print on screen info gathered from source url.
 #---
 function show_spell_source_file_info(){
-echo "Sanitized filename: ${SPELL_SANITIZED_FILE_NAME}"
-echo "Version: ${SPELL_VERSION}"
-echo "URL: ${SPELL_SRC_URL}"
+  message "Sanitized filename: ${SPELL_SANITIZED_FILE_NAME}"
+  message "Version: ${SPELL_VERSION}"
+  message "URL: ${SPELL_SRC_URL}"
 }
 
 #---
diff --git a/var/lib/quill/modules/libfreshmeatxml b/var/lib/quill/modules/libfreshmeatxml
index e7ffedc..6159c5d 100644
--- a/var/lib/quill/modules/libfreshmeatxml
+++ b/var/lib/quill/modules/libfreshmeatxml
@@ -53,6 +53,7 @@ function quill_fmxml_core(){
   # fill in variables from xml file
   if [[ $1 ]] ; then
     SPELL_NAME=$(quill_fmxml_grab_from_xml projectname_short $1|tr 'A-Z' 'a-z')
+    SPELL_DESC_NAME="${SPELL_NAME}"
     for each in url_bz2 url_tgz; do
       TMP=$(quill_fmxml_grab_from_xml $each $1)
       if [[ $TMP ]] ; then



More information about the SM-Commit mailing list