From: frantisek holop <minusf@obiit.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: first-setup.sh patch
Date: Wed, 9 Nov 2011 21:55:05 +0100 [thread overview]
Message-ID: <20111109205505.GH7395@obiit.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
hi there,
here is a simple patch for first-setup.sh
in a nutshell:
- removed the first check for ruby. the same check is performed
at the end of the install process again, and IMHO it is a much
better place to show some reminders to the user after many
screenfuls of rsync flew by.
- a low hanging optimisation for setting platform=
- moved the platform overriding above the platform == unknown check
because just uncommenting the line will not work, the script will
exit a couple lines above
- if the uknown platform is considered an "Error", exit should return
non-zero :]
have a nice day
-f
--
a self-addressed envelope would be addressed "envelope"
[-- Attachment #2: first-setup.sh.patch --]
[-- Type: text/plain, Size: 2339 bytes --]
--- first-setup.sh.orig Wed Nov 9 21:46:46 2011
+++ first-setup.sh Wed Nov 9 21:52:57 2011
@@ -10,12 +10,10 @@
echo "You need to install rsync first."
exit 1
fi
-if [ ! -x "`which ruby`" ]; then
- echo "You might want to install Ruby first if you want to use pdfTeX or XeTeX."
-fi
system=`uname -s`
cpu=`uname -m`
+platform="unknown"
case "$system" in
# linux
@@ -28,7 +26,6 @@
# we currently support just mipsel, but Debian is lying (reports mips64)
# we need more hacks to fix the situation, this is just a temporary solution
mips|mips64|mipsel|mips64el) platform="linux-mipsel" ;;
- *) platform="unknown" ;;
esac ;;
# Mac OS X
Darwin)
@@ -36,7 +33,6 @@
i*86) platform="osx-intel" ;;
x86_64) platform="osx-64" ;;
ppc*|powerpc|power*|Power*) platform="osx-ppc" ;;
- *) platform="unknown" ;;
esac ;;
# FreeBSD
FreeBSD|freebsd)
@@ -44,30 +40,25 @@
i*86) platform="freebsd" ;;
x86_64) platform="freebsd" ;; # no special binaries are available yet
amd64) platform="freebsd-amd64" ;;
- *) platform="unknown" ;;
esac ;;
# kFreeBSD (debian)
GNU/kFreeBSD)
case "$cpu" in
i*86) platform="kfreebsd-i386" ;;
x86_64|amd64) platform="kfreebsd-amd64" ;;
- *) platform="unknown" ;;
esac ;;
# cygwin
CYGWIN*)
case "$cpu" in
i*86) platform="cygwin" ;;
x86_64|ia64) platform="cygwin-64" ;;
- *) platform="unknown" ;;
esac ;;
# SunOS/Solaris
SunOS)
case "$cpu" in
sparc) platform="solaris-sparc" ;;
i86pc) platform="solaris-intel" ;;
- *) platform="unknown" ;;
esac ;;
- *) platform="unknown"
esac
# temporary patch for 64-bit Leopard with 32-bit kernel
@@ -83,15 +74,15 @@
fi
fi
+# if you want to enforce some specific platform
+# (when 'uname' doesn't agree with true architecture), uncomment and modify next line:
+#platform="linux"
+
if test "$platform" = "unknown" ; then
echo "Error: your system \"$system $cpu\" is not supported yet."
echo "Please report to the ConTeXt mailing-list (ntg-context@ntg.nl)"
- exit
+ exit 1
fi
-
-# if you want to enforce some specific platform
-# (when 'uname' doesn't agree with true architecture), uncomment and modify next line:
-# platform=linux
# download or rsync the latest scripts first
rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin .
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
reply other threads:[~2011-11-09 20:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111109205505.GH7395@obiit.org \
--to=minusf@obiit.org \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).