Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] RFC: Behavioral patches to Quill

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael.luceno AT gmail.com>
  • To: sm-discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: [SM-Discuss] RFC: Behavioral patches to Quill
  • Date: Fri, 22 Nov 2013 23:34:29 -0300

Ismael Luceno (3):
Allow specifying source url on command line
Replace install.sh with a Makefile
Allow specifying version on command line when updating

Makefile | 9 +++++++++
install.sh | 25 ++-----------------------
usr/bin/quill | 23 +++++++++++++++++------
3 files changed, 28 insertions(+), 29 deletions(-)
create mode 100644 Makefile
From 696fd584213997efec0e7a448eb32d126dee5795 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT sourcemage.org>
Date: Tue, 7 May 2013 11:44:14 -0300
Subject: [PATCH 1/3] Allow specifying source url on command line

Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
---
 usr/bin/quill | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/usr/bin/quill b/usr/bin/quill
index d65d615..bb622bd 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -97,8 +97,16 @@ elif [[ -n $2 ]]; then
   message "Discarding leftover arguments!"
 fi
 if [[ -z $QUILL_TARGET ]]; then
-  QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$1")
-  QUILL_ORIG_TARGET=$1
+  case "$1" in
+    *:*)
+      SPELL_SRC_URL="$1"
+      QUILL_ORIG_TARGET=$(basename "$1" | sed 's@[-._][0-9][^-_]*$@@')
+      ;;
+    *)
+      QUILL_ORIG_TARGET="$1"
+      ;;
+  esac
+  QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$QUILL_ORIG_TARGET")
 fi
 
 unset -f message
-- 
1.8.4.2

From 272f53442313b13bb2228680efe10033a21172c5 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT sourcemage.org>
Date: Fri, 10 May 2013 15:57:07 -0300
Subject: [PATCH 2/3] Replace install.sh with a Makefile

Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
---
 Makefile   |  9 +++++++++
 install.sh | 25 ++-----------------------
 2 files changed, 11 insertions(+), 23 deletions(-)
 create mode 100644 Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..20dd205
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+.PHONY: install uninstall
+DIRS = /usr/share/doc/quill /var/lib/quill/modules
+
+install:
+	cp -r usr var $(DESTDIR)/
+
+uninstall:
+	rm $(DESTDIR)/usr/bin/quill
+	rm -r $(DIRS:%=$(DESTDIR)%)
diff --git a/install.sh b/install.sh
index 4500ed6..8813457 100755
--- a/install.sh
+++ b/install.sh
@@ -1,24 +1,3 @@
 #!/bin/bash
-
-if [[ $2 ]] ; then
-  INSTALL_ROOT="$2"
-else
-  INSTALL_ROOT=""
-fi
-
-if [[ "$1" == "install" ]]; then
-  if ! grep -q "\./install.sh$" <<< "$0"; then
-    echo "This script must be ran from the quill checkout dir!"
-    exit 1
-  fi
-  mkdir -vp $INSTALL_ROOT/usr/bin
-  mkdir -vp $INSTALL_ROOT/usr/share/doc/quill
-  mkdir -vp $INSTALL_ROOT/var/lib/quill/modules
-  cp -vr usr var $INSTALL_ROOT/
-fi
-
-if [[ "$1" == "uninstall" ]]; then
-  rm -v $INSTALL_ROOT/usr/bin/quill
-  rm -rv $INSTALL_ROOT/var/lib/quill/
-  rm -rv $INSTALL_ROOT/usr/share/doc/quill
-fi
+# DEPRECATED
+make "$1" DESTDIR="$2"
-- 
1.8.4.2

From 5577183bdd7484b952b35a92cc98bad9314b164f Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT sourcemage.org>
Date: Fri, 22 Nov 2013 23:22:15 -0300
Subject: [PATCH 3/3] Allow specifying version on command line when updating

Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
---
 usr/bin/quill | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/usr/bin/quill b/usr/bin/quill
index bb622bd..4bbc11e 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -89,10 +89,13 @@ while true; do
   esac
   shift
 done
-if [[ -z $1 && -n $QUILL_UPDATE ]]; then
-  error_msg "Missing spellname argument!"
-  sleep 1
-  quill_help 104
+if [[ -n $QUILL_UPDATE ]]; then
+  if [[ -z $1 ]]; then
+    error_msg "Missing spellname argument!"
+    sleep 1
+    quill_help 104
+  fi
+  SPELL_VERSION="$2"
 elif [[ -n $2 ]]; then
   message "Discarding leftover arguments!"
 fi
-- 
1.8.4.2



  • [SM-Discuss] RFC: Behavioral patches to Quill, Ismael Luceno, 11/22/2013

Archive powered by MHonArc 2.6.24.

Top of Page