New commits:
commit 912afa0ed45211b1208f279739239822676e1778
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
move the quill lib sourcing after sorcery, so we can override
functions
this was the case with hash_get, now hash generation works.
substitute SOURCE with variables too
generate the hash here, where the vars are virgin
* lib*: removed $*ISON check from add_* functions, quill already
checks it
* libbuild, libdetails: fixed indentation
* libdetails: try SPELL_DESC_NAME first when searching for the
description
add some quoting to handle spaces in SOURCE and SOURCE_DIRECTORY
enabled the SOURCE_DIRECTORY extrapolation
fix substitute_url_variables to use proper vars. Found a bug
here, we
either pass the right values or substitute the right vars, but
not both
FIXME - disabled this on SOURCE_URL for now, others made to
work
* version: 0.1.4
diff --git a/usr/bin/quill b/usr/bin/quill
index 6a8c4f1..97a4f6d 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -42,12 +42,9 @@ ## really basic stuff that should be loa
. /var/lib/sorcery/modules/libmedia
LOCAL_MEDIA_CONFIG=/etc/sorcery/local/media source /etc/sorcery/media
function message() { echo -e "$@"; }
+. /var/lib/quill/modules/libcore
## end of skeletal prerequisites - we get the rest later
-for i in /var/lib/quill/modules/lib*
-do
- . $i
-done
QUILL_MODE="apprentice"
HISTORY_DATE="$(date +%Y-%m-%d)"
#---
@@ -78,6 +75,10 @@ done
unset -f message
. /etc/sorcery/config
EDITOR=${EDITOR:-nano}
+for i in /var/lib/quill/modules/lib*
+do
+ . $i
+done
QUILL_HOME_DIR=~/.sourcemage/quill
QUILL_QUILLRC=${QUILL_HOME_DIR}/quillrc
@@ -182,10 +183,15 @@ then
download_spell_source
- substitute_url_variables
-
hunt_src_dir
+ # use this once it is possible
+ #substitute_with_variables SPELL_SRC_FILE SPELL_NAME SPELL_VERSION
+ QUILL_SPELL_HASH="$(hash_get ${QUILL_TMP_DIR}/${SPELL_SRC_FILE})"
+ SPELL_SRC_FILE=${SPELL_SRC_FILE//${SPELL_NAME}/\$\{SPELL\}}
+ SPELL_SRC_FILE=${SPELL_SRC_FILE//${SPELL_VERSION}/\$\{VERSION\}}
+ substitute_url_variables
+
add_details
if [[ "${PREPAREISON}" == "PREPARE, " ]]
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index d7f367e..55a84aa 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -2,7 +2,20 @@
* added a global EDITOR fallback and removed the single ones
removed trailing white space
* quill: removed CURRENTPWD, wasn't used
+ move the quill lib sourcing after sorcery, so we can override
functions
+ this was the case with hash_get, now hash generation works.
+ substitute SOURCE with variables too
+ generate the hash here, where the vars are virgin
* libcore::quil_rc: refactored, reconfiguration saves previous
settings
+ * lib*: removed $*ISON check from add_* functions, quill already
checks it
+ * libbuild, libdetails: fixed indentation
+ * libdetails: try SPELL_DESC_NAME first when searching for the
description
+ add some quoting to handle spaces in SOURCE and SOURCE_DIRECTORY
+ enabled the SOURCE_DIRECTORY extrapolation
+ fix substitute_url_variables to use proper vars. Found a bug here,
we
+ either pass the right values or substitute the right vars, but
not both
+ FIXME - disabled this on SOURCE_URL for now, others made to work
+ * version: 0.1.4
2006-08-06 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
* version: another bugfix release 0.1.2, uped to 0.1.3
diff --git a/var/lib/quill/modules/libbuild b/var/lib/quill/modules/libbuild
index e7a776a..c5f6f81 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -6,28 +6,24 @@ #---
BUILDISON=""
function query_spell_build() {
- if query "Will you be adding a custom BUILD file:" "n"
- then
- BUILDISON="BUILD, "
- fi
+ if query "Will you be adding a custom BUILD file:" "n"
+ then
+ BUILDISON="BUILD, "
+ fi
}
function add_build() {
- if [[ "${BUILDISON}" == "BUILD, " ]]
- then
- touch BUILD
- chmod +x BUILD
- if query "Do you want the default_build function dumped into the BUILD
file" "n"
- then
- (declare -f real_default_build | \
- tail -n -2 | head -n 1 | sed 's:\(.\{20,41\}\)--:\1\\\n --:g' | \
- sed "s:&&:\&\&\n:g") > BUILD
- else
- echo "default_build" > BUILD
- fi
- $EDITOR BUILD
- fi
-
+ touch BUILD
+ chmod +x BUILD
+ if query "Do you want the default_build function dumped into the BUILD
file" "n"
+ then
+ (declare -f real_default_build | \
+ tail -n -2 | head -n 1 | sed 's:\(.\{20,41\}\)--:\1\\\n --:g' | \
+ sed "s:&&:\&\&\n:g") > BUILD
+ else
+ echo "default_build" > BUILD
+ fi
+ $EDITOR BUILD
}
#---
##
diff --git a/var/lib/quill/modules/libconflicts
b/var/lib/quill/modules/libconflicts
index 07f0ffe..4aab4e4 100644
--- a/var/lib/quill/modules/libconflicts
+++ b/var/lib/quill/modules/libconflicts
@@ -11,8 +11,6 @@ function query_spell_conflicts() {
}
function add_conflicts() {
-if [[ "${SPELL_CONFLICTS}" != "" ]]
-then
touch CONFLICTS
chmod +x CONFLICTS
CONFLICTSISON="CONFLICTS, "
@@ -20,7 +18,6 @@ then
do
echo "conflicts ${n}" >> CONFLICTS
done
-fi
}
#---
##
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index f03dee9..ae3982c 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -94,11 +94,11 @@ #---
## @Synopsis used to edit spell files
#---
function quill_edit() {
- message "Now invoking ${EDITOR:-nano} to edit spell files."
+ message "Now invoking $EDITOR to edit spell files."
cd ${QUILL_SPELL_DIR}/${SPELL_NAME}
for SPELL_FILE in *
do
- ${EDITOR:-nano} ${SPELL_FILE}
+ $EDITOR ${SPELL_FILE}
done
message "All modifications complete."
}
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index 54c10c2..6150e5c 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -16,8 +16,6 @@ spell if any:${DEFAULT_COLOR}"
}
function add_install()
{
-if [[ "${INSTALLISON}" == "INSTALL, " ]]
-then
touch INSTALL
chmod +x INSTALL
if query "Do you want the default_install function dumped into the INSTALL
file" "n"
@@ -17,7 +15,6 @@ then
echo "default_install" > INSTALL
fi
$EDITOR INSTALL
-fi
}
function query_spell_install()
diff --git a/var/lib/quill/modules/libprepare
b/var/lib/quill/modules/libprepare
index 2035bb6..2ead1fa 100644
--- a/var/lib/quill/modules/libprepare
+++ b/var/lib/quill/modules/libprepare
@@ -12,12 +12,9 @@ fi