#SOURCE_GPG?
- if grep -q ":.*:" <<< "$current_check"
+ if ! grep -Eq "(sha(512|256|1)|md5):.*:" <<< "$current_check"
then #it is a gpg
if ! query "Do you want to replace SOURCE${i}_GPG with a
hash?" n
then
@@ -274,7 +274,6 @@ message "Done with updating the spell!"
esac
- if [[ "$QUILL_FMXML_MODE" != "on" ]]
- then
- parse_spell_source_file_info
- fi
+ # redo it for fmxml - so it works if the xml didn't contain a valid source
url
+ # first time for other modes
+ parse_spell_source_file_info
show_spell_source_file_info
+ echo
get_spell_source
@@ -406,14 +405,14 @@ else
then
quill_final_tarball
fi
- message "The spell has been generated and put into:"
- message "$QUILL_SPELL_DIR/$SPELL_NAME"
-# This is broken in a way
-# if query "Do you want to put the spell into one of the avialable
grimoires?" n
-# then
-# quill_final_put_in_grimoire root
-# fi
+ message ""
+ message "The spell has been generated and put into:
$QUILL_SPELL_DIR/$SPELL_NAME"
+ if query "Do you want to put the spell into one of the avialable
grimoires?" n
+ then
+ quill_final_put_in_grimoire
+ fi
fi
+message "That's all folks!"
#---
##
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 4cbda95..b9c34d4 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,13 @@
+2006-12-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * quill: fixed SOURCE_GPG check, reenabled
quill_final_put_in_grimoire,
+ fixed fmxml mode by having it redo parse_spell_source_file_info
+ use quill_hash_get, remove SPELL_DATE
+ * libcore: fixed quill_final_put_in_grimoire,
+ renamed hash_get to quill_hash_get as it overrode the sorcery one
+ * libdetails: use quill_hash_get, use HISTORY_DATE instead of
SPELL_DATE
+ * libhistory, libdepends: cosmetic fixes
+ * version: 0.1.10
+
2006-11-11 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
* libcore: added query_list function from init-manager
* quill: use query_list intead of directcly calling select_list
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 954aa31..f61945e 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -44,15 +44,12 @@ function get_spell_source(){
}
#---
-## @Synopsis hash_get function by afreydknot
+## @Synopsis Print the sha512 hash, a simplified gpg_hashsum
##
#---
#---
@@ -156,27 +153,39 @@ function quill_set_executable_bit() {
## @Synopsis function to put the spell into the grimoire
#---
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(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(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
- 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 "Scribbling failed"
+
+ query_list "Into which grimoire do you wish to put the spell:"
QUILL_GRIM_NAME \
+ $(codex_get_all_grimoires | get_basenames)
+ echo
+ QUILL_GRIM_NAME=$(codex_canonicalize_grimoire_name $QUILL_GRIM_NAME)
+
+ # can't use query_list, as the section count can be bigger than the
available index
+ message "Available sections in grimoire $QUILL_GRIM_NAME:"
+ codex_get_section_names $QUILL_GRIM_NAME | column
+ query_string QUILL_SECT_NAME "Into which section do you wish to put the
spell: "
+
+ message "Scribbling spell into
$QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME ..."
+
+ quill_final_put_in_grimoire_sub(){
+ mkdir -p $QUILL_GRIM_NAME/$QUILL_SECT_NAME
+ cp -r $QUILL_SPELL_DIR/$SPELL_NAME $QUILL_GRIM_NAME/$QUILL_SECT_NAME/
+ if [[ $? != 0 ]]; then
+ echo "Scribbling failed!"
+ else
+ echo "Scribbling succeded"
+ echo
+ echo "Running scribe reindex on $QUILL_GRIM_NAME ..."
+ scribe reindex $(basename $QUILL_GRIM_NAME)
+ fi
+ }
+ if [[ $UID == 0 ]]; then
+ quill_final_put_in_grimoire_sub
else
- message "Scribbling succeded"
- message "Now running scribe reindex on ${QUILL_GRIM_NAME}"
- scribe reindex $(basename ${QUILL_GRIM_NAME})
+ export QUILL_GRIM_NAME QUILL_SECT_NAME QUILL_SPELL_DIR SPELL_NAME
+ su -c "$(declare -f quill_final_put_in_grimoire_sub); \
+ quill_final_put_in_grimoire_sub"
fi
+
}
#---
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index c26a293..f54ae68 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -46,7 +46,7 @@ function add_optional_dependencies() {
message "${QUERY_COLOR}${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a
description${DEFAULT_COLOR}"
read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$MN]