Subject: [alpine-devel] [PATCH 0/4] some patches for alpine-conf

From: Dubiousjim <[email-masked]>
Date: Mon, 1 Jul 2013 17:14:13 -0400

Dubiousjim (4):
  various: use long-form apk options
  libalpine: reword some messages
  update-conf: accept long options
  update-conf: add vimdiff action

 libalpine.sh.in     | 10 +++++-----
 setup-apkrepos.in   |  8 ++++----
 setup-bootable.in   |  4 ++--
 setup-disk.in       |  6 +++---
 setup-interfaces.in |  2 +-
 setup-keymap.in     |  6 +++---
 setup-ntp.in        |  2 +-
 setup-timezone.in   |  6 +++---
 setup-xen-dom0.in   |  2 +-
 update-conf.in      | 53 ++++++++++++++++++++++++++++++++++++-----------------
 10 files changed, 59 insertions(+), 40 deletions(-)

-- 
1.8.3.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Dubiousjim <[email-masked]>
Date: Mon, 1 Jul 2013 17:14:17 -0400

---
 update-conf.in | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/update-conf.in b/update-conf.in
index da4208c..90c7e69 100644
--- a/update-conf.in
+++ b/update-conf.in
@@ -51,6 +51,11 @@ while true; do
 	shift
 done
 
+if which vimdiff >/dev/null; then
+	vflag=", Vimdiff old new"
+	vflag2="/v"
+fi
+
 for apknew in $(find "$ROOT/etc" -name '*.apk-new') ; do
 	p="${apknew%.apk-new}"
 	f="${p#${ROOT}/}"
@@ -75,7 +80,7 @@ for apknew in $(find "$ROOT/etc" -name '*.apk-new') ; do
 		# ask user what to do with the file
 		while [ -z "$choice" ] ; do
 			echo "New $p available:"
-			echon "Quit, Next, Show diff, Edit new, Zap new, Use new (q/n/s/e/z/u) [s]: "
+			echon "Quit, Next, Show diff, Edit new${vflag}, Zap new, Use new (q/n/s/e${vflag2}/z/u) [s]: "
 			default_read choice "s" </dev/tty
 			case "$choice" in
 				q) exit;;
@@ -84,6 +89,10 @@ for apknew in $(find "$ROOT/etc" -name '*.apk-new') ; do
 				   unset choice
 				   ;;	
 				e) ${EDITOR:-vi} "$apknew" ; unset choice;;
+				v) if [ "$vflag" ]; then
+					vimdiff "$p" "$apknew"
+				   fi
+				   unset choice;;
 				z) rm "$apknew";;
 				u) mv "$apknew" "$p";;
 				*) unset choice;;
-- 
1.8.3.1

---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 3 Jul 2013 15:30:56 +0200

On Mon,  1 Jul 2013 17:14:13 -0400

>  10 files changed, 59 insertions(+), 40 deletions(-)

appled. Thanks!

-nc

---

---

From: Dubiousjim <[email-masked]>
Date: Mon, 1 Jul 2013 17:14:15 -0400

---
 libalpine.sh.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libalpine.sh.in b/libalpine.sh.in
index adfacb6..a03deb3 100644
--- a/libalpine.sh.in
+++ b/libalpine.sh.in
@@ -52,12 +52,12 @@ init_tmpdir() {
 }
 
 pkg_inst() {
-	eecho "warning: pkg_inst is deprecated. Use 'apk add --quiet' in script"
+	eecho "WARNING: pkg_inst is deprecated. Use 'apk add --quiet' in script"
 	[ -z "$NOCOMMIT" ] && apk add --quiet $*
 }
 
 pkg_deinst() {
-	eecho "warning: pkg_deinst is deprecated. Use 'apk del --quiet' in script"
+	eecho "WARNING: pkg_deinst is deprecated. Use 'apk del --quiet' in script"
 	[ -z "$NOCOMMIT" ] && apk del --quiet $*
 }
 
@@ -92,7 +92,7 @@ is_xen_dom0() {
 	grep -q "control_d" /proc/xen/capabilities
 }
 
-# list of acailable network interfaces thats not part of any bridge or bond
+# list of available network interfaces that aren't part of any bridge or bond
 available_ifaces() {
         local iflist= ifpath= iface= i=
         sorted_ifindexes=$(
-- 
1.8.3.1

---