[137737] branches/gsoc15-portfile/github2port/github2port
chunyang at macports.org
chunyang at macports.org
Thu Jun 18 00:25:58 PDT 2015
Revision: 137737
https://trac.macports.org/changeset/137737
Author: chunyang at macports.org
Date: 2015-06-18 00:25:57 -0700 (Thu, 18 Jun 2015)
Log Message:
-----------
github2port: Create usage procedure
Modified Paths:
--------------
branches/gsoc15-portfile/github2port/github2port
Modified: branches/gsoc15-portfile/github2port/github2port
===================================================================
--- branches/gsoc15-portfile/github2port/github2port 2015-06-18 07:10:12 UTC (rev 137736)
+++ branches/gsoc15-portfile/github2port/github2port 2015-06-18 07:25:57 UTC (rev 137737)
@@ -3,18 +3,20 @@
#
# Generate a github group template Portfile given tarball URL
#
-# https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz
-# https://github.com/JuliaLang/julia/releases/download/v0.3.8/julia-0.3.8_79599ada44.tar.gz
-# https://github.com/ali-rantakari/trash/archive/v0.8.5.tar.gz
-# TODO: Create a usage proc
+proc usage {{channel stderr}} {
+ global argv0
+ puts $channel "Usage: $argv0 URL"
+ puts $channel ""
+ puts $channel "URL is the github tarball URL"
+ puts $channel ""
+ puts $channel "Example:"
+ puts $channel " $argv0 https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz"
+ puts $channel " $argv0 https://github.com/jonas/tig/archive/tig-2.1.1.tar.gz"
+}
+
if {$argc != 1} {
- puts stderr "Usage: $argv0 URL"
- puts stderr ""
- puts stderr "URL is the github tarball URL"
- puts stderr ""
- puts stderr "Example: $argv0 https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz"
- puts stderr ""
+ usage
exit 1
}
@@ -56,6 +58,9 @@
# v0.8.5.tar.gz
set tarball [lindex $tmp 6]
parse_fancy_version $tarball
+} else {
+ usage
+ exit 1
}
puts "# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150618/cf5da878/attachment.html>
More information about the macports-changes
mailing list