From: Perforce Review Daemon <p4review AT smee.org>
To: "Andraž " ruskie " Levstik" <ruskie AT mages.ath.cx>, "Andrew Stitt" <a AT t.armory.com>, "Arjan Bouter" <abouter AT sourcemage.org>, "Arwed von Merkatz" <v.merkatz AT gmx.net>, "SM-Commit Daemon" <sm-commit AT lists.ibiblio.org>, "David Michael Leo Brown Jr." <dmlb2000 AT gmail.com>, "David Kowis" <dkowis+smgl-p4 AT shlrm.org>, "duane_malcolm" <d.malcolm AT auckland.ac.nz>, "Eric Sandall" <eric AT sandall.us>, "Jason Flatt" <jflatt AT sourcemage.org>, "Jeremy Blosser" <jblosser AT sourcemage.org>, "Juuso Alasuutari" <iuso AT sourcemage.org>, "Ladislav Hagara" <ladislav.hagara AT unob.cz>, "Robin Cook" <rcook AT wyrms.net>, "Thibaut Fernagut" <t.fernagut AT h0m3.be>, "vladimir_marek" <vlmarek AT volny.cz>
Subject: [SM-Commit] PERFORCE change 77256 by Andra?? "ruskie" Levstik for review
Date: Tue, 4 Apr 2006 21:05:01 +0100 (BST)
Change 77256 by andraž_levstik AT omega.mages.ath.cx on 2006/04/04 21:04:42
Made it workable and installable... it's not done yet...
By tomorrow evening I hope to have ATLEOST mage mode 100% working
and ready for 0.5 version of quill
@@ -1,24 +1,23 @@
-//sgl/misc/quill/usr/bin/quill#8 - edit change 73413 (xtext)
#!/bin/bash
#---
## @Synopsis Spell creator script for SourceMage GNU/Linux
## @Copyright Copyright 2005 Andrew "ruskie" Levstik <ruskie AT mages.ath.cx>
## @Copyright Copyright 2005 SourceMage GNU/Linux
-## @License GPL v2
+## @License GPL v2 or higher
##
## @ToDo Add option to use upstream gpg signature as included or
## @ToDo downloadable .sig file
## @ToDo Put a multiversion option
## @ToDo Make an option to edit all the existing files after generation
-## @ToDo Make configuring optional depends a must
-## @ToDo Add logic to quill to make it possible to use optional_depends
+## @ToDo Make configuring optional depends a must - DONE
+## @ToDo Add logic to quill to make it possible to use optional_depends
- DONE
## @ToDo single line or multiline depending on the length of line if
## @ToDo <80 single else multi
## @ToDo Interface to add CONFIGURE options
## @ToDo Automated bugcli submissions of spells
## @ToDo Make a tar.bz2 of the spell immediately
## @ToDo Automatic inclusion into a grimoire when finished
-## @ToDo Make it use the ~/.sourcemage dir for config
+## @ToDo Make it use the ~/.sourcemage dir for config - DONE
## @ToDo Add cmdline options to make it possible to autoscript it
## @ToDo Add a better configuration interface(dialog based I hope)
## @ToDo Make it possible to also update spells using quill
@@ -43,15 +42,14 @@
#---
#---
-## @Synopsis md5_unpack function taken from md5unpack script
-##
-#---
-
-#---
## Some basic stuff that should be loaded and set
. /etc/sorcery/config
+for i in $(ls -1 /var/lib/quill/modules/lib*)
+do
+. $i
+done
QUILL_MODE="apprentice"
-CURRENTPWD=$(pwd)
+CURRENTPWD="$(pwd)"
@@ -1,3 +1,16 @@
+2006-01-21 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * install.sh: added install/deinstall script
+ * usr/bin/quill:commented out unused functions
+ added sourcing of modules
+ * var/lib/quill/modules/libcore: made it workable
+ * var/lib/quill/modules/libdepends: made it workable
+ * var/lib/quill/modules/libdetails: made it workable
+ * var/lib/quill/modules/libfreshmeatxml: made it workable
+ * var/lib/quill/modules/libhistory: made it workable
+ * var/lib/quill/modules/libinstall: made it workable
+ * var/lib/quill/modules/libprepare: made it workable
+ * var/lib/quill/modules/libprovides: made it workable
+
2006-02-12 Juuso Alasuutari <juuso.alasuutari AT tamperelainen.org>
* quill: edited ToDo list
* libdetails: added substitute_with_variables, a generic
@@ -35,7 +48,7 @@
2006-01-22 Juuso Alasuutari <juuso.alasuutari AT tamperelainen.org>
* quill: added cmdline flags for most main variables in DETAILS.
-2006-01-21 Andrew "ruskie" Levstik <ruskie AT mages.ath.cx>
+2006-01-21 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
* quill: reverted the function parese parameters should be there but
not as function
* libcore: removed parse_parameteres and added some comments
@@ -60,10 +73,10 @@
* quill: added calls to functions check_if_tarball and
hunt_src_dir
-2005-11-13 Andrew "ruskie" Levstik <ruskie AT mages.ath.cx>
+2005-11-13 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
* libcore: updated hash_get to use only sha512
-2005-09-11 Andrew "ruskie" Levstik <ruskie AT mages.ath.cx>
+2005-09-11 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
* quill: added an improved quill_rc to support
the new naming of user ran guru tools also
added stubs to function calls for more advanced
function query_spell_dependencies() {
- message "${QUERY_COLOR}Please enter the dependencies(non optional)\
- of the spell if any:${DEFAULT_COLOR}"
+ message "${QUERY_COLOR}Please enter the dependencies(non optional) \
+of the spell if any:${DEFAULT_COLOR}"
read "SPELL_DEPENDENCIES"
}
function query_spell_optional_dependencies() {
- message "${QUERY_COLOR}Please enter the optional dependencies of the\
- spell if any:${DEFAULT_COLOR}"
+ message "${QUERY_COLOR}Please enter the optional dependencies of the \
+spell if any:${DEFAULT_COLOR}"
read -a "SPELL_OPTIONAL_DEPENDENCIES"
}
@@ -39,24 +39,17 @@
NM=${#SPELL_OPTIONAL_DEPENDENCIES[*]}
for ((MN=0; MN < $NM; MN++))
do
- message "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a ./configure enable
option"
- message "Enclosed in \" \""
+ message "${QUERY_COLOR}${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a
./configure enable option${DEFAULT_COLOR}"
read SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$MN]
- message "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a ./configure disable
option"
- message "Enclosed in \" \""
+ message "${QUERY_COLOR}${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a
./configure disable option${DEFAULT_COLOR}"
read SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$MN]
- message "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a description"
- message "Enclosed in \" \""
+ message "${QUERY_COLOR}${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a
description${DEFAULT_COLOR}"
read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$MN]
done
for ((MN=0; MN < $NM; MN++))
do
function query_spell_description(){
-if ! test -f ${QUILL_TMP_DIR/${SPELL_NAME} ||
+if ! test -f ${QUILL_TMP_DIR}/${SPELL_NAME} ||
! ( message "${QUERY_COLOR}Is${DEFAULT_COLOR}"
- cat ${QUILL_TMP_DIR/${SPELL_NAME}
+ cat ${QUILL_TMP_DIR}/${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_NAME}
fi
}
@@ -160,7 +160,7 @@
## @return 1 if not a tarball
#---
function check_if_tarball(){
-if [[ -z `tar tf "${QUILL_TMP_DIR}/${SPELL_SRC_FILE}" 2>&1 | grep "^tar: " |
head -n1` ]]; then
+if [[ -z $(tar tf "${QUILL_TMP_DIR}/${SPELL_SRC_FILE}" 2>&1 | grep "^tar: "
| head -n1) ]]; then
return 0
else
return 1
@@ -178,11 +178,12 @@
if check_if_tarball; then
SPELL_SRC_DIR=$(tar tf "${QUILL_TMP_DIR}/${SPELL_SRC_FILE}" | grep / | sed
-e "s=/.*$==g;q")
if [ -n "$SPELL_SRC_DIR" ]; then
- SPELL_SRC_DIR=${SPELL_SRC_DIR//${SPELL}/\${SPELL\}}
- SPELL_SRC_DIR=${SPELL_SRC_DIR//${VERSION}/\${VERSION\}}
+ SPELL_SRC_DIR=${SPELL_SRC_DIR//${SPELL}/\$\{SPELL\}}
+ SPELL_SRC_DIR=${SPELL_SRC_DIR//${VERSION}/\$\{VERSION\}}
return 0
else
return 1
+ fi
else
unset SPELL_SRC_DIR
return 2
@@ -207,7 +208,7 @@
SOURCE=${SPELL_SRC_FILE}
SOURCE_URL[0]=${SPELL_SRC_URL}
SOURCE_HASH=sha512:${QUILL_SPELL_HASH}
-SOURCE_DIRECTORY=\${BUILD_DIRECTORY}/${SPELL_SRC_DIR}
+SOURCE_DIRECTORY=\${BUILD_DIRECTORY}/\${SPELL}-\${VERSION}
WEB_SITE=${SPELL_URL}
ENTERED=${SPELL_DATE}
UPDATED=${SPELL_DATE}
@@ -25,38 +26,37 @@
# if the argument looks like a url then use that, otherwise
# assume the argument is the name of the spell and construct a
# url for where we think freshmeat.net stores their xml data
- if echo $QUILL_FMXML_SPELL|grep -q http://; then
- FRESHMEAT_XML_URL="${QUILL_FMXML_SPELL}"
+ if echo $1|grep -q http://; then
+ FRESHMEAT_XML_URL="$1"
else
-
FRESHMEAT_XML_URL=http://freshmeat.net/projects-xml/$QUILL_FMXML_SPELL/${QUILL_FMXML_SPELL}.xml
+ FRESHMEAT_XML_URL=http://freshmeat.net/projects-xml/${1}/${1}.xml
fi
# check if we already have the xml file, if we dont, download it
- if test -f ${QUILL_TMP_DIR}/${QUILL_FMXML_SPELL}.xml ; then
- FRESHMEAT_FILE=${QUILL_FMXML_SPELL}.xml
+ if test -f ${QUILL_TMP_DIR}/${1}.xml ; then
+ FRESHMEAT_FILE=${1}.xml
else
- if ! curl -O ${FRESHMEAT_XML_URL} ; then
- message "${ERROR_COLOR}Failed to get
${QUILL_FMXML_SPELL}${DEFAULT_COLOR}"
+ if ! curl -o ${QUILL_TMP_DIR}/${1}.xml ${FRESHMEAT_XML_URL} ; then
+ message "${ERROR_COLOR}Failed to get ${1}${DEFAULT_COLOR}"
exit 1
fi
- FRESHMEAT_FILE=$FILE
+ FRESHMEAT_FILE=$FRESHMEAT_FILE
unset FILE
fi
-fi
# fill in variables from xml file
-if [[ $QUILL_FMXML_SPELL ]] ; then
- SPELL_NAME=$(quill_fmxml_grab_from_xml projectname_short|tr 'A-Z' 'a-z')
+if [[ $1 ]] ; then
+ SPELL_NAME=$(quill_fmxml_grab_from_xml projectname_short $1|tr 'A-Z' 'a-z')
for each in url_bz2 url_tgz; do
- TMP=$(quill_fmxml_grab_from_xml $each)
+ TMP=$(quill_fmxml_grab_from_xml $each $1)
if [[ $TMP ]] ; then
SPELL_SRC_URL=$(quill_fmxml_hunt_src_url $SPELL_NAME $TMP)
break
fi
done
- SPELL_URL=$(curl -I $(quill_fmxml_grab_from_xml url_homepage) 2>&1|\
+ SPELL_URL=$(curl -I $(quill_fmxml_grab_from_xml url_homepage $1) 2>&1|\
grep Location|awk '{print $2}'|sed 's/\r//g')
- SPELL_LICENSE=$(quill_fmxml_grab_from_xml license|awk '{print $NF}'|tr -d
'()')
- SPELL_SHORT_DESCRIPTION=$(quill_fmxml_grab_from_xml desc_short|sed
's/\r//g')
- quill_fmxml_grab_from_xml desc_full|fmt > ${QUILL_TMP_DIR}/${SPELL_NAME}
+ SPELL_LICENSE=$(quill_fmxml_grab_from_xml license $1|awk '{print $NF}'|tr
-d '()')
+ SPELL_SHORT_DESCRIPTION=$(quill_fmxml_grab_from_xml desc_short $1|sed
's/\r//g')
+ quill_fmxml_grab_from_xml desc_full $1 |fmt >
${QUILL_TMP_DIR}/${SPELL_NAME}
fi
}