-#---
## Questions and stuff
quill_welcome
if [[ ! -z $QUILL_FETCH_MODE ]]
diff --git a/var/lib/quill/modules/libbuild b/var/lib/quill/modules/libbuild
index 1d2d186..fcc3dc3 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -3,8 +3,10 @@
## @Synopsis BUILD module for quill
#---
+#---
##
## @Globals QUILL_FETCH_MODE BUILDISON
+#---
function query_spell_build() {
if [[ "$QUILL_FETCH_MODE" != "cpan" ]]; then
if query "Will you be adding a custom BUILD file:" "n"
@@ -14,8 +16,10 @@ function query_spell_build() {
fi
}
+#---
##
## @Globals QUILL_FETCH_MODE QUILL_TMP_DIR QUILL_SPELL_DIR SPELL_NAME EDITOR
+#---
function add_build() {
if [[ "$QUILL_FETCH_MODE" == "cpan" ]]; then
cp ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
diff --git a/var/lib/quill/modules/libcompat b/var/lib/quill/modules/libcompat
index bf2e7ae..a5dab3a 100644
--- a/var/lib/quill/modules/libcompat
+++ b/var/lib/quill/modules/libcompat
@@ -1,4 +1,9 @@
#!/bin/bash
+#---
+## @Synopsis COMPAT module for quill
+#---
+
+
# 1.14 sorcery function
if ! declare -f codex_get_spell_paths &> /dev/null; then
function codex_get_spell_paths() {
@@ -10,8 +15,10 @@ if ! declare -f codex_get_spell_paths &> /dev/null; then
}
fi
@@ -31,8 +38,11 @@ function url_ftp_verify() {
fi
}
-# too many menu options for 1.13
+
unset -f select_list &&
+#---
+## too many menu options for 1.13
+#---
function select_list()
{
local i
@@ -61,6 +71,11 @@ function select_list()
}
unset -f select_list_sub &&
+#---
+## @param return var
+## @param hashname
+## @param message
+#---
function select_list_sub() {
local returnvar=$1
local hashname=$2
@@ -80,6 +95,9 @@ function select_list_sub() {
}
unset -f url_https_verify &&
+#---
+##
+#---
function url_https_verify() {
local URL=$1
@@ -93,9 +111,11 @@ function url_https_verify() {
fi
}
+#---
# permanent override; since we don't use timeout, no need for
# treating the first char specially, which means it can be deleted
# if the user makes an error
+#---
function real_query_string() {
debug "libmisc" "Running quill_question() with the following arguments:
'$1' and '$2'"
+#---
##
## @Globals SPELL_CONFLICTS
+#---
function query_spell_conflicts() {
query_msg "Please enter all conflicting spell names if any:"
read "SPELL_CONFLICTS"
}
+#---
##
## @Globals CONFLICTSISON SPELL_CONFLICTS
+#---
function add_conflicts() {
touch CONFLICTS
CONFLICTSISON="CONFLICTS, "
diff --git a/var/lib/quill/modules/libcopy b/var/lib/quill/modules/libcopy
index 66358d2..a514f70 100644
--- a/var/lib/quill/modules/libcopy
+++ b/var/lib/quill/modules/libcopy
@@ -1,5 +1,9 @@
#!/bin/bash
#---
+## @Synopsis libcopy
+#---
+
+#---
## @Synopsis Copies the new spell somewhere under $QUILL_GIT_DIR
##
## @Globals QUILL_GIT_DIR SPELL_NAME QUILL_SUDO
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 30badaf..774a28d 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -1,5 +1,9 @@
#!/bin/bash
#---
+## @Synopsis libcore
+#---
+
+#---
## @Synopsis query_list function from init-manager
## $1 - the question
## $2 - the VARIABLE to which to store the answer
@@ -173,6 +177,7 @@ QUA
## @Synopsis The welcome message for quill
##
## @Globals QUILL_SPELL_DIR
+#---
function quill_welcome() {
message "Welcome to Source Mage GNU/Linux quill - a spell creator and
updater script."
message
"-----------------------------------------------------------------------------"
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index 1c7fdad..a38444f 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -3,8 +3,10 @@
## @Synopsis libdepends
#---
+#---
##
## @Globals SPELL_DEPENDENCIES
+#---
function query_spell_dependencies() {
if ! [[ $SPELL_DEPENDENCIES ]] ||
! query "Are \"${SPELL_DEPENDENCIES}\" the proper dependencies for this
spell" y
@@ -16,15 +18,19 @@ of the spell if any:"
fi
}
+#---
##
## @Globals SPELL_OPTIONAL_DEPENDENCIES
+#---
function query_spell_optional_dependencies() {
query_msg "Please enter the optional dependencies of the spell if any:"
read -a "SPELL_OPTIONAL_DEPENDENCIES"
}
+#---
##
## @Globals DEPENDSISON SPELL_DEPENDENCIES
+#---
function add_dependencies() {
local i
@@ -36,8 +42,10 @@ function add_dependencies() {
done
}
+#---
##
## @Globals DEPENDSISON SPELL_OPTIONAL_DEPENDENCIES
+#---
function add_optional_dependencies() {
local dep dep_count
local SPELL_OPTIONAL_DEPENDENCIES_ENABLED[0]=""
@@ -64,11 +72,14 @@ function add_optional_dependencies() {
# "optional_depends ${j} \"enabled-option\" \"disabled-option\"
\"description\""
}
+#---
##
## @Globals
+#---
function add_bs_depends() {
return
}
+
#---
##
## This software is free software; you can redistribute it and/or modify
diff --git a/var/lib/quill/modules/libdeprecation
b/var/lib/quill/modules/libdeprecation
index 300eccf..abc45df 100644
--- a/var/lib/quill/modules/libdeprecation
+++ b/var/lib/quill/modules/libdeprecation
@@ -35,7 +35,10 @@ function deprecate_menu() {
sleep 5
}
-# start the deprecation
+
+#---
+## start the deprecation
+#---
function deprecate() {
local overrides='DOWNLOAD PRE_BUILD BUILD INSTALL'
local replacement=$1
@@ -99,7 +102,9 @@ na
unset_spell_paths
}
-# complete the deprecation of a spell
+#---
+## complete the deprecation of a spell
+#---
function complete_deprecation() {
-# recreate DETAILS for a deprecated spell
+#---
+## recreate DETAILS for a deprecated spell
+#---
function deprecate_details() {
local replacement=$1
@@ -135,7 +142,9 @@ EOFZ
fi
}
-# ask the user for the replacement spell
+#---
+## ask the user for the replacement spell
+#---
function get_replacement() {
local __replacement
local var=$1
@@ -148,7 +157,9 @@ function get_replacement() {
upvar $var "$__replacement"
}
-# plain deletes a spell, can't really work
+#---
+## plain deletes a spell, can't really work
+#---
function delete_spell() {
local reason=$1
+#---
##
## @Globals BUILD_DTFILE SPELL_NAME DTFILE_MENUENTRY DTFILE_EXEC
## @Globals DTFILE_MENUPATH DTFILE_ICON DTFILE_TERM
+#---
query_spell_desktop_file() {
if query "Will you be adding a custom desktop file?" "n"
then
@@ -26,9 +28,11 @@ then
fi
}
+#---
##
## @Globals SPELL_NAME SPELL_SHORT_DESCRIPTION DTFILE_MENUENTRY SPELL_VERSION
## @Globals DTFILE_EXEC DTFILE_ICON DTFILE_MENUPATH DTFILE_TERM
+#---
add_desktop_file() {
mkdir -p desktop
cd desktop
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index d82a026..a3b9a47 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -5,8 +5,10 @@
## and if so, give the user an opportunity to change the value
#---
+#---
##
## @Globals SPELL_NAME
+#---
function query_spell_name(){
#downcase before query
SPELL_NAME=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$SPELL_NAME")
@@ -19,8 +21,10 @@ function query_spell_name(){
fi
}
+#---
##
## @Globals SPELL_SRC_URL
+#---
function query_spell_source_url(){
# misc sf fix
# try to handle as many sf url formats as possible
@@ -48,9 +52,11 @@ if ! [[ $SPELL_SRC_URL ]] ||
fi
}
+#---
## used in update mode only, elsewhere the version is parsed from the
filename
##
## @Globals SPELL_VERSION
+#---
function query_spell_version(){
if ! [[ $SPELL_VERSION ]] ||
! query "Is $SPELL_VERSION the proper spell version?" y; then
@@ -59,8 +65,10 @@ function query_spell_version(){
fi
}
+#---
##
## @Globals SPELL_LICENSE
+#---
function query_spell_license(){
if ! [[ $SPELL_LICENSE ]] ||
! query "Is $SPELL_LICENSE the proper license?" y; then
@@ -69,8 +77,10 @@ if ! [[ $SPELL_LICENSE ]] ||
fi
}
+#---
##
## @Globals SPELL_URL
+#---
function query_spell_url(){
if ! [[ $SPELL_URL ]] ||
! query "Is $SPELL_URL the proper website?" y; then
@@ -79,8 +89,10 @@ if ! [[ $SPELL_URL ]] ||
fi
}
+#---
##
## @Globals SPELL_SHORT_DESCRIPTION
+#---
function query_spell_short_description(){
if ! [[ $SPELL_SHORT_DESCRIPTION ]] ||
! ( message "${QUERY_COLOR}Is${DEFAULT_COLOR}\n$SPELL_SHORT_DESCRIPTION"
@@ -90,8 +102,10 @@ if ! [[ $SPELL_SHORT_DESCRIPTION ]] ||
fi
}
+#---
##
## @Globals EDITOR SPELL_NAME SPELL_DESC_NAME QUILL_TMP_DIR
+#---
function query_spell_description(){
local description=${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-${SPELL_NAME}}
if ! test -f $description ||
@@ -105,7 +119,7 @@ if ! test -f $description ||
fi
}
-#--
+#---
## @Synopsis Assign to SPELL_SRC_FILE the filename and to VERSION the
## @Synopsis version number parsed from source url.
##
diff --git a/var/lib/quill/modules/libgpg b/var/lib/quill/modules/libgpg
index efb477d..040dedd 100644
--- a/var/lib/quill/modules/libgpg
+++ b/var/lib/quill/modules/libgpg
@@ -1,5 +1,9 @@
#!/bin/bash
#---
+## @Synopsis libgpg
+#---
+
+#---
## @Synopsis Tries to change the source verification in favour of upstream
gpg
##
## @Globals "version" SPELL_KEYRING SPELL_SIGNATURE SPELL_UPDATED
@@ -202,6 +206,7 @@ function convert_to_upstream_gpg() {
## @return 1 otherwise
##
## @Globals "i" "su" "source"
+#---
function guess_signature_url() {
local suffix silent=$1
@@ -224,6 +229,7 @@ function guess_signature_url() {
##
## @Globals SPELL_KEYRING QUILL_SPELL_DIR SPELL_NAME
## @Globals QUILL_TMP_DIR
+#---
function quill_get_spell_keyring() {
# return if a previous pass already set it
[[ -n $SPELL_KEYRING ]] && return 0
@@ -290,8 +296,10 @@ function quill_get_spell_keyring() {
}
+#---
##
## @Globals SPELL_SIGNATURE
+#---
function query_spell_signature(){
if [[ $SPELL_SIGNATURE ]] &&
! query "Is $SPELL_SIGNATURE the proper signature url?" y; then
@@ -305,8 +313,10 @@ function query_spell_signature(){
done
}
+#---
##
## @Globals SPELL_KEYRING
+#---
function query_spell_keyring(){
while ! [[ $SPELL_KEYRING ]]; do
query_msg "Please enter the url of the keyring:"
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index 2ea049f..e431edc 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -3,9 +3,11 @@
## @Synopsis libhistory
#---
+#---
## @param entry without the leading tab, bullet and space
##
## @Globals HISTORY_DATE GURU_NAME GURU_EMAIL
+#---
function add_history()
{
local title="$HISTORY_DATE $GURU_NAME <$GURU_EMAIL>" files
diff --git a/var/lib/quill/modules/libinstall
b/var/lib/quill/modules/libinstall
index 433ff3f..24fac24 100644
--- a/var/lib/quill/modules/libinstall
+++ b/var/lib/quill/modules/libinstall
@@ -3,8 +3,10 @@
## @Synopsis libinstall
#---
+#---
##
## @Globals EDITOR
+#---
function add_install()
{
touch INSTALL
@@ -17,8 +19,10 @@ function add_install()
$EDITOR INSTALL
}
+#---
##
## @Globals INSTALLISON
+#---
function query_spell_install()
{
if query "Will you be adding a custom INSTALL file:" "n"
@@ -27,8 +31,10 @@ then
fi
}
+#---
##
## @Globals PREBUILDISON
+#---
function query_spell_pre_build()
{
if query "Will you be adding a custom PRE_BUILD file:" "n"
@@ -13,8 +15,10 @@ function query_spell_pre_build()
fi
}
+#---
##
## @Globals QUILL_TMP_DIR SPELL_NAME
+#---
function add_pre_build()
{
if [[ -e PRE_BUILD ]]; then
@@ -125,7 +129,9 @@ function pre_build_menu() {
esac
}
+#---
## doesn't handle compressed patches
+#---
function get_patches()
{
local _patch patches
@@ -165,6 +171,9 @@ function get_patches()
upvar "$1" "$_patch"
}
+#---
+## test pre_build
+#---
function test_pre_build()
{
true
diff --git a/var/lib/quill/modules/libprepare
b/var/lib/quill/modules/libprepare
index a93946e..c7f3c57 100644
--- a/var/lib/quill/modules/libprepare
+++ b/var/lib/quill/modules/libprepare
@@ -3,8 +3,10 @@
## @Synopsis libprepare
#---
+#---
##
## @Globals PREPAREISON
+#---
function query_spell_prepare()
{
if query "Will you be adding a PREPARE file:" "n"
@@ -13,8 +15,10 @@ then
fi
}
+#---
##
## @Globals SPELL_NAME FRESHMEAT_XML_URL FRESHMEAT_PROJECT_URL
SPELL_DESC_NAME
## @Globals FRESHMEAT_PROJECT_FILE FRESHMEAT_FILE QUILL_TMP_DIR SPELL_SRC_URL
## @Globals SPELL_SRC_URL SPELL_LICENSE SPELL_SHORT_DESCRIPTION
+#---
function quill_fmxml_core() {
# so it is set even if we end prematurely, useful when adding spells
# gets properly overwritten later on
diff --git a/var/lib/quill/modules/site_handlers/libfsfdirectory
b/var/lib/quill/modules/site_handlers/libfsfdirectory
index 597621e..604c12b 100644
--- a/var/lib/quill/modules/site_handlers/libfsfdirectory
+++ b/var/lib/quill/modules/site_handlers/libfsfdirectory
@@ -1,8 +1,11 @@
#!/bin/bash
-#
+#---
## FSF/UNESCO directory module
-#
+#---
+#---
+##
+#---
function quill_fsf_get_deps(){
local data
local file
@@ -15,9 +18,12 @@ function quill_fsf_get_deps(){
sed -e "s:<li>\(.*\)\ ($data).*</li>:\1:g" | \
tr "\n" " " | tr "A-Z" "a-z"
}
+
+#---
##
## @Globals SPELL_NAME SPELL_LICENSE SPELL_URL
## @Globals QUILL_TMP_DIR
+#---
function quill_fsf_core(){
local project
local fsf_project_file
diff --git a/var/lib/quill/modules/site_handlers/libgna
b/var/lib/quill/modules/site_handlers/libgna
index dfebf24..ec5612d 100644
--- a/var/lib/quill/modules/site_handlers/libgna
+++ b/var/lib/quill/modules/site_handlers/libgna
@@ -1,8 +1,11 @@
#!/bin/bash
-#
+#---
## Gna! module
-#
+#---
+#---
+##
+#---
function quill_gna_core(){
quill_savane_core "${1}" "https://gna.org/projects"
}
diff --git a/var/lib/quill/modules/site_handlers/libperlcpan
b/var/lib/quill/modules/site_handlers/libperlcpan
index 96213d6..b5830da 100644
--- a/var/lib/quill/modules/site_handlers/libperlcpan
+++ b/var/lib/quill/modules/site_handlers/libperlcpan
@@ -3,8 +3,10 @@
## @Synopsis Perl-cpan module to generate spells from perl-cpan metadata
#---
+#---
##
## @Globals QUILL_TMP_DIR
+#---
function quill_get_manifests()
{
# unless someone knows a better way to check files creation time
@@ -32,8 +34,10 @@ function quill_get_manifests()
fi
}
+#---
##
## @Globals QUILL_TMP_DIR SPELL_NAME SPELL_SRC_URL SPELL_VERSION
SPELL_LICENSE
## @Globals SPELL_SHORT_DESCRIPTION SPELL_URL SPELL_DEPENDENCIES BUILDISON
## @Globals DEPENDSISON QUILL_CPAN_INFO QUILL_CPAN_METADATA
+#---
function quill_cpan_core()
{
# so it is set even if we end prematurely, useful when adding spells
diff --git a/var/lib/quill/modules/site_handlers/librubyraa
b/var/lib/quill/modules/site_handlers/librubyraa
index cda1265..cb1d1fb 100644
--- a/var/lib/quill/modules/site_handlers/librubyraa
+++ b/var/lib/quill/modules/site_handlers/librubyraa
@@ -1,10 +1,12 @@
#!/bin/bash
-#
+#---
## Ruby RAA module
-#
+#---
+#---
##
## @Globals none
+#---
function quill_raa_get_info(){
local info
local raa_project_file
@@ -13,9 +15,11 @@ function quill_raa_get_info(){
grep "${info}:" $raa_project_file | sed -e "s/ *${info}: *\(.*\)/\1/"
}