matthewbauer avatar matthewbauer committed 84916c8

Initial Commit

Comments (0)

Files changed (5)

+#!/bin/sh
+
+if [ -z "$ARCH" ]
+then
+	case $(uname -m) in
+		sparc) ARCH=k;;
+		powerpc|ppc64) ARCH=c;;
+		mips|mipsel) ARCH=v;;
+#68000
+		m68k) ARCH=1;;
+#68020
+#		m68k) ARCH=2;;
+		arm|armeb|armel) ARCH=5;;
+		x86_64) ARCH=6;;
+		alpha) ARCH=7;;
+		i386|i486|i586|i686) ARCH=8;;
+		#29k) ARCH=9;;
+	esac
+fi
+
+[ -z "$GC" ] && GC=${ARCH}g
+#[ -z "$GC" ] && GC=gccgo
+[ -z "$GL" ] && GL=${ARCH}l
+
+[ -z "$BIN" ] && BIN=bin
+[ -z "$SRC" ] && SRC=src
+[ -z "$TMP" ] && TMP=tmp
+
+[ -z "$SRCEXT" ] && SRCEXT='.go'
+
+clean(){
+	rm -r tmp
+}
+
+compile(){ # and link
+	mkdir -p "$BIN" "$SRC" "$TMP"
+	for srcfile in $@
+	do
+		filename="$(basename "$srcfile" | sed 's/^\(.*\)\.[^\.]*$/\1/')"
+		echo $filename
+		$GC -o "$TMP/$filename" "$srcfile"
+		$GL -o "$BIN/$filename" "$TMP/$filename"
+	done
+}
+
+install(){
+	cp -r ./bin /bin
+}
+
+usage(){
+	echo "$0 [compile|clean|help|install]"
+}
+
+default(){
+	compile src/*
+}
+
+[ $# == 0 ] && default
+
+while true
+do
+	case "$1" in
+		compile) compile;;
+		clean) clean;;
+		help|--help|-h) usage;;
+		install) install;;
+		'') break;;
+		*) compile "$1";;
+	esac
+	shift
+done
+MIT/X Consortium License
+
+© 2010 Matthew J Bauer <mjbauer95@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+#!/usr/bin/makepkg -p
+# Contributor: Matthew Bauer <mjbauer95@gmail.com>
+pkgname=goblin
+pkgver=VERSION
+pkgrel=1
+pkgdesc=""
+arch=()
+url=""
+license=('GPL')
+groups=()
+depends=()
+makedepends=()
+optdepends=()
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=()
+install=
+source=($pkgname-$pkgver.tar.gz)
+noextract=()
+md5sums=() #generate with 'makepkg -g'
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+	./INSTALL
+}
+#!/bin/english
+
+Rewrite the most useful unix userland commands in the new Go language created by Google to form a robust base for future Unix-like userlands that do not suffer from the vulnerabilities that are common in C or C++ code.
+The minimum of commands that need to be implemented in Go are those found in 9base.
+package main
+
+import (
+	"flag"
+	"os"
+	"file"
+)
+
+const (
+	Newline = "\n"
+)
+
+var omitNewline = flag.Bool("n", false, "don't print final newline")
+
+func ls(filename string) {
+	f, err := os.File.Open(filename, O_RDONLY, 0)
+	if f == nil {
+		fmt.Fprintf(os.Stderr, "ls: cannot access %s: error %s\n", filename, err)
+		os.Exit(1)
+	}
+	files, err := f.Readdirnames(-1)
+	for i := 0; i < len(files); i++ {
+		os.Stdout.Write(files[i])
+		if !*omitNewline && i == len(files) - 1 {
+			os.Stdout.Write(Newline)
+		}
+	}
+	f.Close()
+}
+
+func main() {
+	flag.Parse()   // Scans the arg list and sets up flags
+	for i := 0; i < flag.NArg(); i++ {
+		ls(flag.Arg(i))
+	}
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.