code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/bash
#
# Run from new VM console or SSH session
if [[ "$1" != "test" && ! -e /mnt/data/data/ADMIRAL.README ]]; then
echo "Allocate and mount data volume first (or use '$0 test')"
echo "See http://imageweb.zoo.ox.ac.uk/wiki/index.php/ADMIRAL_LVM_allocation"
exit
fi
if [[ "$1" == "test" ]]; then
mkdir /m... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-devel
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="ADMIRAL Demonstrator"
ADMIRALHOSTNAME="admiral-demo"
ADMIRALDOMAINDC=""
IPADDR="192.168.82.129"
# Samba/Windows workgroup name for research group files
WORKGROUP="ADMIRAL"
# Databank host and si... | Shell |
#!/bin/bash
#
# Set access rights on ADMIRAL data file areas
#
source /root/admiralconfig.d/admiralconfig.sh
chgrp "RGMember" /home/data
chown test_admiral: ADMIRAL.README
# Add ACLs to prevent unauthenticated access?
mkdir -p /home/data/private
chown www-data: /home/data/private
chmod --recursive g+s /home/data/pr... | Shell |
#!/bin/bash
#
# Apply modifications to LDAP from ldif file
#
if [ -z $1 ]; then
echo "Usage: $0 <ldif-file>"
exit
fi
ldapadd -x -D cn=admin,%{ADMIRALFULLDN} -W -f $1
#cn=admin,cn=config
# End.
| Shell |
#!/bin/bash
#
# Apply modifications to LDAP from ldif file
#
if [ -z $1 ]; then
echo "Usage: $0 <ldif-file>"
exit
fi
ldapmodify -x -D cn=admin,cn=config -W -f $1
# End.
| Shell |
#!/bin/bash
#
# ldapsearch -xLLL -b cn=config -D cn=admin,cn=config -W $1
ldapsearch -xLLL -b %{ADMIRALFULLDN} -D cn=admin,cn=config -W $1
#olcDatabase={1}hdb
# End.
| Shell |
#!/bin/bash
# Assume that slapd and ldap-utils have been installed.
# Assume that db.ldif has been created.
# Assume that base.ldif has been created with the appropriate root password hash
# (use slappasswd -h {MD5} to create/display the hash).
# Assume that config.ldif has been created, again with the appropriate root... | Shell |
#!/bin/bash
#
# Create a self-signed CA certificate that can be used for signing other certificates,
# and imported into the local trust root.
#
# See: https://help.ubuntu.com/9.10/serverguide/C/certificates-and-security.html#certificate-authority
#
sudo mkdir /etc/ssl/CA
sudo mkdir /etc/ssl/CA/newcerts
sudo sh -c "e... | Shell |
#!/bin/bash
#
# Create a certified server key, using a self-signed CA key
#
# See:
# http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html
#
# Generate a key
openssl genrsa -des3 -out %{HOSTNAME}.key.secure 1024
# View key contents
# openssl rsa -noout -text -in %{HOSTNAME}.key.secure
# Create a decrypted PEM version o... | Shell |
#!/bin/bash
#
# View certificate contents
openssl x509 -text -in $1
# End.
| Shell |
#!/bin/bash
/etc/init.d/slapd stop
apt-get purge slapd
rm /var/lib/ldap/*
#apt-get install slapd
| Shell |
#!/bin/bash
#
# Apply modifications to LDAP from ldif file
#
if [ -z $1 ]; then
echo "Usage: $0 <distinguished-name>"
exit
fi
ldapdelete -x -D cn=admin,%{ADMIRALFULLDN} -W $1
# End.
| Shell |
#!/bin/bash
#
# Copy CA-signed certificate and key to working locations
sudo mv %{HOSTNAME}.key /etc/ssl/private/
sudo chgrp ssl-cert /etc/ssl/private/%{HOSTNAME}.key
sudo chmod g=r,o= /etc/ssl/private/%{HOSTNAME}.key
sudo mv /etc/ssl/CA/newcerts/01.pem /etc/ssl/certs/%{HOSTNAME}.pem
ls -al /etc/ssl/private/%{HO... | Shell |
#!/bin/bash
test -w $1
| Shell |
#!/bin/bash
#
# Run from new VM console or SSH session
echo =============================
echo "Install LDAP packages"
echo =============================
apt-get update
apt-get install -qy --force-yes libpam-ldap
echo ===============================
echo "Configure LDAP"
echo ===============================
./ldaps... | Shell |
#!/bin/bash
if [[ "$1" == "" ]]; then
echo "Usage:"
echo " $0 username [orphan]"
echo " Generate Apache access configuration for named user (or deleted user)"
echo ""
echo " $0 all"
echo " Generate Apache access configuration for all configured ADMIRAL users"
echo ""
exit... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-devel
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="Evolutionary Development"
ADMIRALDOMAINDC="zoo ox ac uk"
ADMIRALHOSTNAME="zoo-admiral-devel"
# Samba/Windows workgroup name for research group files
WORKGROUP="EvolutionaryDevelopment"
# Databan... | Shell |
#!/bin/bash
if [[ "$1" == "" ]]; then
echo "Usage:"
echo " $0 username"
echo " Generate system configuration for named user"
echo ""
echo " $0 all password"
echo " Generate system configuration for all recorded ADMIRAL users"
echo " Each user gets a password of the form '... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-silk
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="Silk"
ADMIRALDOMAINDC="zoo ox ac uk"
ADMIRALHOSTNAME="zoo-admiral-silk"
# Samba/Windows workgroup name for research group files
WORKGROUP="Silk"
# Databank host and silo names
DATABANKHOST="data... | Shell |
#!/bin/bash
smbldap-userlist "$@"
| Shell |
#! /bin/bash
#
# Add a new ADMIRAL User.
# This script is suid . Make sure that is cannot be modified by non-root users
# Check arguments to prevent injection attack
# $1 RemoteUserID Remote user who is trying to add the UserID details
# $2 UserID Admiral user whose details are being created
# $3 FullName FullName o... | Shell |
#! /bin/bash
#
# Update the user details for the ADMIRAL User.
# This script is suid . Make sure that is cannot be modified by non-root users
# Check arguments to prevent injection attack
# $1 RemoteUserID trying to update the UserID details
# $2 UserID for whose details are being updated
# $3 FullName Updated FullNa... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-ibrg
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="Image Bioinformatics"
ADMIRALDOMAINDC="zoo ox ac uk"
ADMIRALHOSTNAME="zoo-admiral-ibrg"
# Samba/Windows workgroup name for research group files
WORKGROUP="SHOTTON"
# Databank host and silo names
... | Shell |
#!/bin/bash
# Create testUserD and files
/root/admiraluseradd.sh TestUserD "Deleted User" RGMember 4444 4444 userd
echo "Deleted User Private File" > /home/data/private/TestUserD/testDeletedUserFile.tmp
echo "Deleted User Shared File" > /home/data/shared/TestUserD/testDeletedUserFile.tmp
echo "Deleted User Collab File... | Shell |
#! /bin/bash
#
# Test user access to the supplied path.
# This script is suid . Make sure that is cannot be modified by non-root users
# Check arguments to prevent injection attack
# $1 UserID
# $2 FilePath
if [[ "$1" == "" ]]; then
echo "testuseraccess.sh - no username provided"
exit 2
fi
if [[ "$1" =~ "[a... | Shell |
#!/bin/bash
function generateuserrecord()
{
# $1 - username
# $2 - fullname
# $3 - rolename or group
# $4 - room number
# $5 - phone number
cat > /root/admiralconfig.d/admiralresearchgroupmembers/$1.sh <<EOF
username="$1"
userfullname="$2"
userrole="$3"
userroom="$4"
userphone="$5"
EOF
}
funct... | Shell |
#!/bin/bash
# Using both -G and -g options to smbldap-usermod may seem like a belt and
# braces approach, but I am unconvinced that either on their own does enough.
source /root/admiralconfig.d/admiralRGLeader.sh
if [[ 0 ]]; then
echo "Current leader: $RGLeaderName"
echo "Change from: $1"
echo "Change to: $... | Shell |
#!/bin/bash
#
# Run from new VM console
echo =============================
echo Install ssh
echo =============================
apt-get update
apt-get install -qy --force-yes openssh-server
echo =============================
echo Configure ssh
echo =============================
cp /root/ssh_config /etc/ssh/ssh_confi... | Shell |
#!/bin/bash
#
# Run from new VM console or SSH session
echo =============================
echo "Install new packages"
echo =============================
apt-get update
apt-get install -qy --force-yes libpam-krb5 nagios3 nagios-nrpe-plugin nagios-nrpe-server tsm-client
apt-get install -qy --force-yes lvm2 mercurial py... | Shell |
#! /bin/bash
#
# Get user details for the requested ADMIRAL User.
# This script is suid . Make sure that is cannot be modified by non-root users
# Check arguments to prevent injection attack
# $1 RemoteUserID requesting the UserID details
# $2 UserID for whose details are being requested
RemoteUserID=$1
UserID=$2
... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-ibrg
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="DataStage"
ADMIRALDOMAINDC="oerc ox ac uk"
ADMIRALHOSTNAME="dataflow-vm1"
# Samba/Windows workgroup name for research group files
WORKGROUP="SHOTTON"
# Databank host and silo names
DATABANKHOST=... | Shell |
#!/bin/bash
#
# $Id: $
#
# Copy files from source directory to target directory, ignoring those listed as
# blacklisted, and replace the originals with a symlink to the copy.
#
# This is used to create a test working copy of an ADMIRAL system, with
# supplied host name, password and interpolated into key
# configurat... | Shell |
./admiraluserdel.sh TestUser1 purge
./admiraluserdel.sh TestUser2 purge
./admiraluserdel.sh TestLeader purge
./admiraluserdel.sh TestCollab purge
./admiraluserdel.sh TestUserD purge
| Shell |
# This script will run the first time the virtual machine boots
# It is run as root.
echo "*****FIRST BOOT*****"
mv /etc/sudoers /etc/sudoers-orig
chmod 440 /root/sudoers
cp /root/sudoers /etc/sudoers
#chmod 440 /etc/sudoers
cp /root/testwriteaccess.sh /usr/local/sbin
chmod 755 /usr/local/sbin/testwriteaccess.sh
cp /... | Shell |
#!/bin/bash
RGLeaderName=%{LeaderName}
| Shell |
#! /bin/bash
#
# List all ADMIRAL Users.
# This script is suid . Make sure that is cannot be modified by non-root users
# Check arguments to prevent injection attack
# $1 RemoteUserID requesting the list of ADMIRAL users
if [[ "$1" == "" ]]; then
echo "listAdmiralUsers.sh - no remote username provided"
exit ... | Shell |
#!/bin/bash
# ADMIRAL system parameters
# (see also apache-default and apache-default-ssl)
RGLeaderGID=600
RGMemberGID=601
RGCollabGID=602
RGOrphanGID=603
RESEARCHGROUPNAME="%{RESEARCHGROUPNAME}"
ADMIRALDOMAINDC="%{ADMIRALDOMAINDC}"
ADMIRALHOSTNAME="%{HOSTNAME}"
SAMBAWORKGROUP="%{WORKGROUP}"
DATABANKHOST="%{DATABANK... | Shell |
#!/bin/bash
# source /root/admiralconfig.d/admiralconfig.sh
echo ==========================================
echo "Extract admiral tools from code repository"
echo ==========================================
echo TODO: tag stable version of tools and use that
echo NOTE: tool directories are owned by root, with RO acces... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-ibrg
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="DataStage"
ADMIRALDOMAINDC="bodleian ox ac uk"
ADMIRALHOSTNAME="datastage-test"
# Samba/Windows workgroup name for research group files
WORKGROUP="SHOTTON"
# Databank host and silo names
DATABAN... | Shell |
#!/bin/bash
#
# Configuration parameters for host Zakynthos
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="ADMIRAL Test System"
ADMIRALDOMAINDC="zoo ox ac uk"
ADMIRALHOSTNAME="zakynthos"
# Samba/Windows workgroup name for research group files
WORKGROUP="TestGroup"
# Databank host and silo names
DATABANKHOST... | Shell |
#!/bin/bash
#
# updateadmiralfiles.sh
#
# Update ADMIRAL configuration files on system.
#
USAGE="Usage: $0 RUN"
if [[ "$1" == "" ]]; then
echo "$USAGE"
echo ""
echo "Before running this, run makeresearchgroupfiles.sh to create a"
echo "customized copy of the installation build files"
exit 1
fi
# ... | Shell |
#!/bin/bash
#
# Configuration parameters for host zoo-admiral-behav
#
# (See also: admiralconfig.sh)
#
RESEARCHGROUPNAME="Behavioural Ecology"
ADMIRALDOMAINDC="zoo ox ac uk"
ADMIRALHOSTNAME="zoo-admiral-behav"
# Samba/Windows workgroup name for research group files
WORKGROUP="BehaviouralEcology"
# Databank host and... | Shell |
#!/bin/sh
umask 077
answers() {
echo --
echo Oxfordshire
echo Oxford
echo University of Oxford
echo Zoology Department
echo %{HOSTFULLNAME}
echo root@%{HOSTFULLNAME}
}
if [ $# -eq 0 ] ; then
echo $"Usage: `basename $0` filename [...]"
exit 0
fi
TARGETKEYDIR=/etc/ssl/private
TARGETCRTDIR=/etc/ssl/certs
#For... | Shell |
#!/bin/bash
source /root/admiralconfig.d/admiralconfig.sh
smbldap-groupadd -a -g $RGLeaderGID RGLeader
smbldap-groupadd -a -g $RGMemberGID RGMember
smbldap-groupadd -a -g $RGCollabGID RGCollaborator
smbldap-groupadd -a -g $RGOrphanGID RGOrphan
smbldap-useradd -a -P -m -g $RGMemberGID test_admiral
echo =============... | Shell |
#!/bin/bash
if [[ "$1" == "" || "$2" == "" || "$3" == "" ]]; then
echo "Usage: $0 username fullname role [room number] [work phone] [password]"
exit 1
fi
if [[ -e "/home/$1" || -e "/mnt/data/home/$1" ]]; then
echo "User $1 already exists (or home directory exists)"
exit 1
fi
if [[ -e "/root/admiralconfig.d/a... | Shell |
#!/bin/bash
source /root/admiralconfig.d/admiralconfig.sh
if [[ "$1" == "" ]]; then
echo "Usage: $0 username [purge]"
exit 1
else
if [[ "$2" == "purge" ]]; then
rm -rf "/home/data/private/$1"
rm -rf "/home/data/shared/$1"
rm -rf "/home/data/collab/$1"
rm -rf "/mnt/data/home/$1"
rm -rf "/h... | Shell |
./admiraluseradd.sh TestUser1 "Test User 1" RGMember room tel user1
./admiraluseradd.sh TestUser2 "Test User 2" RGMember room tel user2
./admiraluseradd.sh TestLeader "Test Leader" RGLeader room tel leader
./admiraluseradd.sh TestCollab "Test Collaborator" RGCollaborator room tel collab
| Shell |
#!/bin/sh
# START-COMMIT HOOK
#
# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered... | Shell |
#!/bin/sh
# POST-REVPROP-CHANGE HOOK
#
# The post-revprop-change hook is invoked after a revision property
# has been added, modified or deleted. Subversion runs this hook by
# invoking a program (script, executable, binary, etc.) named
# 'post-revprop-change' (for which this file is a template), with the
# f... | Shell |
#!/bin/sh
# POST-LOCK HOOK
#
# The post-lock hook is run after a path is locked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-lock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repos... | Shell |
#!/bin/sh
# POST-LOCK HOOK
#
# The post-lock hook is run after a path is locked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-lock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repos... | Shell |
#!/bin/sh
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the pat... | Shell |
#!/bin/sh
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this... | Shell |
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (t... | Shell |
#!/bin/sh
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH ... | Shell |
#!/bin/sh
# POST-REVPROP-CHANGE HOOK
#
# The post-revprop-change hook is invoked after a revision property
# has been added, modified or deleted. Subversion runs this hook by
# invoking a program (script, executable, binary, etc.) named
# 'post-revprop-change' (for which this file is a template), with the
# f... | Shell |
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this rep... | Shell |
#!/bin/sh
# START-COMMIT HOOK
#
# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered... | Shell |
#!/bin/sh
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following or... | Shell |
#!/bin/sh
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the pat... | Shell |
#!/bin/sh
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH ... | Shell |
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this rep... | Shell |
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (t... | Shell |
#!/bin/sh
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following or... | Shell |
#!/bin/sh
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this... | Shell |
#!/bin/bash
#
# Starts a basic web server on the port specified.
#
# ./serve.sh 3000 -> http://localhost:3000
#
# Copyright 2012 Eric Bidelman <ebidel@gmail.com>
port=$1
if [ $# -ne 1 ]
then
port=8000
fi
open http://localhost:$port/template.html && python -m SimpleHTTPServer $port;
| Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
eval $(go tool dist env)
export GOARCH GOOS GOROOT
export E=
case X"$GOARCH" in
Xamd64)
export A=6
;;
X386)
export A=8
;;
Xarm)
export A=... | Shell |
#!/bin/sh
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
case "$1" in
-*)
echo 'usage: benchcmp old.txt new.txt' >&2
echo >&2
echo 'Each input file should be go test -test.run=NONE -test.bench=. > [old,new... | Shell |
#!/usr/bin/env bash
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This is a small script for executing go binaries on the android platform.
#
# example:
# ./a 5.out foo bar baz
#
# The script exports the l... | Shell |
#!/usr/bin/env bash
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Illustrates how a Go language specification can be installed for Xcode 4.x.,
# to enable syntax coloring, by adding an entry to a plugindata... | Shell |
#!/bin/sh
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build hello.go
go build fib.go
go build chain.go
echo '*' hello >run.out
./hello >>run.out
echo '*' fib >>run.out
./fib >>run.out
echo '*' ch... | Shell |
#!/bin/sh
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build -o life main.go
echo '*' life >run.out
./life >>run.out
diff run.out golden.out
rm -f life
| Shell |
#!/bin/sh
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
gcc $(go env GOGCCFLAGS) -shared -o libcgosotest.so cgoso_c.c
go build main.go
LD_LIBRARY_PATH=. ./main
rm -f libcgosotest.so main
| Shell |
#!/bin/bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
if ! test -f ../../src/all.bash; then
echo >&2 "package.bash must be run from $GOROOT/misc/osx"
exit 1
fi
echo >&2 "Locating PackageMaker...... | Shell |
#!/bin/bash
GOROOT=/usr/local/go
echo "Fixing permissions"
cd $GOROOT
find . -exec chmod ugo+r \{\} \;
find bin -exec chmod ugo+rx \{\} \;
find . -type d -exec chmod ugo+rx \{\} \;
chmod o-w .
echo "Fixing debuggers via sudo.bash"
# setgrp procmod the debuggers (sudo.bash)
cd $GOROOT/src
./sudo.bash
echo "Installin... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
if [ ! -f make.bash ]; then
echo 'all.bash must be run from $GOROOT/src' 1>&2
exit 1
fi
. ./make.bash --no-banner
bash run.bash --no-r... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
eval $(go env)
unset CDPATH # in case user has it set
unset GOPATH # we disallow local import for non-local packages, if $GOROOT ha... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
eval $(go tool dist env)
if [ ! -x $GOTOOLDIR/dist ]; then
echo 'cannot find $GOTOOLDIR/dist; nothing to clean' >&2
exit 1
fi
"$GOB... | Shell |
#!/bin/sh
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Generate builtin.c from $* (runtime.go and unsafe.go).
# Run this after changing runtime.go and unsafe.go
# or after changing the export metadata forma... | Shell |
#!/usr/bin/env bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This script creates the .zip, index, and configuration files for running
# godoc on app-engine.
#
# If an argument is provided it is assumed... | Shell |
#!/bin/bash
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build -o testgo
ok=true
unset GOPATH
unset GOBIN
# Test that error messages have file:line information
# at beginning of line.
for i in t... | Shell |
#!/bin/sh
x() {
echo '--- ' "$@"
"$@"
echo '---'
echo
}
x go help
x go help build
x go help clean
x go help install
x go help fix
x go help fmt
x go help get
x go help list
x go help test
x go help version
x go help vet
x go help gopath
x go help importpath
x go help remote
| Shell |
#!/bin/sh
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
go help documentation > doc.go
gofmt -w doc.go
| Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
case "`uname`" in
Darwin)
;;
*)
exit 0
esac
eval $(go env)
if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
echo "You don't n... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Generate Go code listing errors and other #defined constant
# values (ENAMETOOLONG etc.), by asking the preprocessor
# about the definitions.... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Generate Go code listing errors and other #defined constant
# values (ENAMETOOLONG etc.), by asking the preprocessor
# about the definitions.... | Shell |
#!/bin/sh
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
trap "rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h" EXIT INT TERM
set -e
SYS=$1
export GOOS=$(echo $SYS | sed 's/_.*//')
export GOARC... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Environment variables that control make.bash:
#
# GOROOT_FINAL: The expected final Go root, baked into binaries.
# The default is the locatio... | Shell |
#!/usr/bin/env bash
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
wiki_pid=
cleanup() {
kill $wiki_pid
rm -f test_*.out Test.txt final-test.bin final-test.go
}
trap cleanup 0 INT
go build -o get.bin ... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
goos=$(go env GOOS)
defer_panic_recover="
defer
defer2
"
effective_go="
eff_bytesize
eff_qr
eff_sequence
"
error_handling="
er... | Shell |
#!/bin/sh
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This script rebuilds the time zone files using files
# downloaded from the ICANN/IANA distribution.
# Versions to use.
CODE=2011i
DATA=2011n
set -e
... | Shell |
#!/bin/bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Test the code review plugin.
# Assumes a local Rietveld is running using the App Engine SDK
# at http://localhost:7777/
#
# dev_appserver.py -p 7777... | Shell |
#!/bin/sh
# Regenerate PHPMailer documentation
# Run from within the docs folder
rm -rf phpdoc/*
phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/,vendor/,language/ --sourcecode --force --title PHPMailer --template="clean"
# You can merge regenerated docs into a separate docs working... | Shell |
#!/bin/sh
# Regenerate PHPMailer documentation
# Run from within the docs folder
rm -rf phpdoc/*
phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/,vendor/,language/ --sourcecode --force --title PHPMailer --template="clean"
# You can merge regenerated docs into a separate docs working... | Shell |
#!/usr/bin/env bash
#Fake sendmail script, adapted from:
#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh
#Create a temp folder to put messages in
numPath="${TMPDIR-/tmp/}fakemail"
umask 037
mkdir -p $numPath
if [ ! -f $numPath/num ]; then
echo "0" > $numPath/num
fi... | Shell |
#!/usr/bin/env bash
# Run the fake pop server from bash
# Idea from http://blog.ale-re.net/2007/09/ipersimple-remote-shell-with-netcat.html
# Defaults to port 1100 so it can be run by unpriv users and not clash with a real server
# Optionally, pass in in a port number as the first arg
mkfifo fifo
nc -l ${1:-1100} <fi... | Shell |
#!/usr/bin/env bash
# Fake POP3 server
# By Marcus Bointon <phpmailer@synchromedia.co.uk>
# Based on code by 'Frater' found at http://www.linuxquestions.org/questions/programming-9/fake-pop3-server-to-capture-pop3-passwords-933733
# Does not actually serve any mail, but supports commands sufficient to test POP-before ... | Shell |
#!/usr/bin/env bash
# Run the fake pop server from bash
# Idea from http://blog.ale-re.net/2007/09/ipersimple-remote-shell-with-netcat.html
# Defaults to port 1100 so it can be run by unpriv users and not clash with a real server
# Optionally, pass in in a port number as the first arg
mkfifo fifo
nc -l ${1:-1100} <fi... | Shell |
#!/usr/bin/env bash
#Fake sendmail script, adapted from:
#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh
#Create a temp folder to put messages in
numPath="${TMPDIR-/tmp/}fakemail"
umask 037
mkdir -p $numPath
if [ ! -f $numPath/num ]; then
echo "0" > $numPath/num
fi... | Shell |
#!/usr/bin/env bash
# Fake POP3 server
# By Marcus Bointon <phpmailer@synchromedia.co.uk>
# Based on code by 'Frater' found at http://www.linuxquestions.org/questions/programming-9/fake-pop3-server-to-capture-pop3-passwords-933733
# Does not actually serve any mail, but supports commands sufficient to test POP-before ... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.