From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72280 Path: news.gmane.org!not-for-mail From: frantisek holop Newsgroups: gmane.comp.tex.context Subject: first-setup.sh patch Date: Wed, 9 Nov 2011 21:55:05 +0100 Message-ID: <20111109205505.GH7395@obiit.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="wq9mPyueHGvFACwf" X-Trace: dough.gmane.org 1320872533 13417 80.91.229.12 (9 Nov 2011 21:02:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Nov 2011 21:02:13 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 09 22:02:08 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ROFHR-0000fc-Ui for gctc-ntg-context-518@m.gmane.org; Wed, 09 Nov 2011 22:01:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2DDA5CB0C9; Wed, 9 Nov 2011 22:01:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Lma5GH3UGxKf; Wed, 9 Nov 2011 22:01:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 589F4CB0CA; Wed, 9 Nov 2011 22:01:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 147A2CB0CA for ; Wed, 9 Nov 2011 22:01:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id L4hGy1He6j9Q for ; Wed, 9 Nov 2011 22:01:50 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id CE390CB0C9 for ; Wed, 9 Nov 2011 22:01:50 +0100 (CET) Original-Received: from obiit.org (integer.obiit.org [195.168.92.92]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pA9L1nR7018988 for ; Wed, 9 Nov 2011 22:01:50 +0100 Original-Received: by integer.obiit.org (Postfix, from userid 1001) id 031B6D85D0; Wed, 9 Nov 2011 21:55:05 +0100 (CET) Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=195.168.92.92; country=SK; region=04; city=Komoca; latitude=47.9500; longitude=18.0333; http://maps.google.com/maps?q=47.9500,18.0333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bFT91NbJ - d48754f1cb1b - 20111109 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72280 Archived-At: --wq9mPyueHGvFACwf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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" --wq9mPyueHGvFACwf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="first-setup.sh.patch" --- 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 . --wq9mPyueHGvFACwf Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --wq9mPyueHGvFACwf--