code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/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-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-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 # 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-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 # 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 # 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-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 # 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 # 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-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-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-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 # 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/bash if [ $# != 1 ] then echo "Usage: $0 emailAddress" exit 1 fi read -s -p "Password: " mypassword echo "" curl https://www.google.com/accounts/ClientLogin -d Email=$1 -d "Passwd=$mypassword" -d accountType=GOOGLE -d source=Google-cURL-Example -d service=ac2dm
Shell
#!/bin/sh # Create a backup tar gzip file of the cwd with the date appended # located in the parent directory. FILENAME=../`pwd|xargs basename`-`date -j "+%Y-%m-%d"`.tgz echo Will create $FILENAME tar cfz $FILENAME . echo Done.
Shell
#!/bin/sh # Need to run a full clean install when changing the request factory interfaces # Doing so deletes the local debug app engine database # This script backs that up first SRC=shuffle-app-engine/target/shuffle-app-engine-2.0.0-SNAPSHOT/WEB-INF/appengine-generated DEST=../db_backup rm -r $DEST mkdir $DEST cp -...
Shell
#! /bin/sh cd /tmp # Make sure previous copies are gone rm -rf quake3/ # Checkout a new copy of ioq3 svn co svn://svn.icculus.org/quake3/trunk/ quake3 cd quake3/ IOQ3REVISION=`svnversion .` IOQ3VERSION=ioq3-r$IOQ3REVISION rm -rf $IOQ3VERSION svn export . $IOQ3VERSION cd $IOQ3VERSION # Remove READMEs and the like ...
Shell
#! /bin/sh cd /tmp # Make sure previous copies are gone rm -rf quake3/ # Checkout a new copy of ioq3 svn co svn://svn.icculus.org/quake3/trunk/ quake3 cd quake3/ IOQ3REVISION=`svnversion .` IOQ3VERSION=ioq3-r$IOQ3REVISION rm -rf $IOQ3VERSION svn export . $IOQ3VERSION cd $IOQ3VERSION # Remove READMEs and the like ...
Shell
#!/bin/sh APPBUNDLE=Tremulous.app BINARY=Tremulous.ub PKGINFO=APPLTREM ICNS=src/unix/MacSupport/Tremulous.icns DESTDIR=build/release-darwin-ub BASEDIR=base Q3_VERSION=`grep "\#define Q3_VERSION" src/qcommon/q_shared.h | \ sed -e 's/.*".* \([^ ]*\)"/\1/'`; BIN_OBJ=" build/release-darwin-ppc/tremulous.ppc build/relea...
Shell
#!/bin/sh # # This script appends a SLA.r (Software License Agreement) resource to a .dmg # # usage is './SLA-dmg.sh SLA.r /path/to/ioquake3.dmg' # if [ "x$1" = "x" ] || [ "x$2" = "x"]; then echo "usage: ./SLA-dmg.sh SLAFILE DMGFILE" exit 1; fi if [ ! -r $1 ]; then echo "$1 is not a readable .r file" exit 1; fi i...
Shell
#!/bin/sh # # This script appends a SLA.r (Software License Agreement) resource to a .dmg # # usage is './SLA-dmg.sh SLA.r /path/to/ioquake3.dmg' # if [ "x$1" = "x" ] || [ "x$2" = "x"]; then echo "usage: ./SLA-dmg.sh SLAFILE DMGFILE" exit 1; fi if [ ! -r $1 ]; then echo "$1 is not a readable .r file" exit 1; fi i...
Shell
#!/bin/sh export CC=i586-mingw32msvc-gcc export WINDRES=i586-mingw32msvc-windres export PLATFORM=mingw32 exec make $*
Shell
#!/bin/sh APPBUNDLE=Tremulous.app BINARY=Tremulous.ub PKGINFO=APPLTREM ICNS=src/unix/MacSupport/Tremulous.icns DESTDIR=build/release-darwin-ub BASEDIR=base Q3_VERSION=`grep "\#define Q3_VERSION" src/qcommon/q_shared.h | \ sed -e 's/.*".* \([^ ]*\)"/\1/'`; BIN_OBJ=" build/release-darwin-ppc/tremulous.ppc build/relea...
Shell
#! /bin/sh gcc -E infopanes.def.h | grep "^[^#].*" > infopanes.def
Shell
#! /bin/sh gcc -E infopanes.def.h | grep "^[^#].*" > infopanes.def
Shell
#!/bin/sh export CC=i586-mingw32msvc-gcc export WINDRES=i586-mingw32msvc-windres export PLATFORM=mingw32 exec make $*
Shell
#!/bin/sh tar xzvf libircclient*.gz cd libircclient* ./configure make
Shell
#!/bin/sh # $Id: scull_load,v 1.4 2004/11/03 06:19:49 rubini Exp $ module="fpga_driver" device="fpga" mode="664" # Group: since distributions do it differently, look for wheel or use staff if grep -q '^staff:' /etc/group; then group="staff" else group="wheel" fi # invoke insmod with all arguments we got # and...
Shell
# set params ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5 COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android # make sure assets is exist if [ -d $HELLOWORLD_ROOT/assets ]; then rm -rf $HELLOWORLD_ROOT/assets fi mkdir $HELLOWORLD_ROOT/assets # copy resources for file in $CO...
Shell
#!/bin/bash append_str=' \' list_alldir() { for file in $1/* do if [ -f $file ]; then echo $file$append_str | grep .cpp fi if [ -d $file ]; then list_alldir $file fi done } if [ $# -gt 0 ]; then list_...
Shell
#!/bin/bash append_str=' \' list_alldir() { for file in $1/* do if [ -f $file ]; then echo $file$append_str | grep .cpp fi if [ -d $file ]; then list_alldir $file fi done } if [ $# -gt 0 ]; then list_...
Shell
pushd ./box2d/proj.wophone make -f Makefile.ARM clean make -f Makefile.ARM all popd pushd ./chipmunk/proj.wophone make -f Makefile.ARM clean make -f Makefile.ARM all popd pushd ./cocos2dx/proj.wophone make -f Makefile.ARM clean make -f Makefile.ARM all popd pushd ./CocosDenshion/proj.wophone make -f Makefile.ARM cle...
Shell
#!/bin/sh # This script should be called by create-android-project.bat # or should be runned in linux shell. It can not be runned under # cygwin. # Don't modify the script until you know what you do. # set environment paramters NDK_ROOT="/workspace/android-dev/android-ndk-r5" ANDROID_SDK_ROOT="/workspace/android-dev/a...
Shell
pushd ../../ echo "generating libcocos2dx" mkdir -p template/xcode4/lib_cocos2dx.xctemplate python ./tools/xcode4_template_generator/template_generator.py --directory cocos2dx --identifier libcocos2dx --prefix libs --exclude "android win32 airplay wophone third_party CCImage.cpp CCFileUtils.cpp Android.mk" > ./templat...
Shell
#!/bin/bash echo 'cocos2d-x template installer' COCOS2D_VER='cocos2d-1.0.1-x-0.9.1' BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode" BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode" force= user_dir= usage(){ cat << EOF usage: $0 [options] Install / update te...
Shell
#!/bin/bash echo 'cocos2d-x template installer' COCOS2D_VER='cocos2d-1.0.1-x-0.9.1' BASE_TEMPLATE_DIR="/Library/Application Support/Developer/Shared/Xcode" BASE_TEMPLATE_USER_DIR="$HOME/Library/Application Support/Developer/Shared/Xcode" force= user_dir= usage(){ cat << EOF usage: $0 [options] Install / update te...
Shell
#!/bin/sh # This script should be called by create-android-project.bat # or should be runned in linux shell. It can not be runned under # cygwin. # Don't modify the script until you know what you do. # set environment paramters NDK_ROOT="/workspace/android-dev/android-ndk-r5" ANDROID_SDK_ROOT="/workspace/android-dev/a...
Shell
# set params ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5 COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x GAME_ROOT=$COCOS2DX_ROOT/HelloLua GAME_ANDROID_ROOT=$GAME_ROOT/android GAME_RESOURCE_ROOT=$GAME_ROOT/Resource # make sure assets is exist if [ -d $GAME_ANDROID_ROOT/assets ]; then rm -rf $GAME_ANDROID_ROOT/assets fi...
Shell
# set params ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5 COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android # make sure assets is exist if [ -d $TESTS_ROOT/assets ]; then rm -rf $TESTS_ROOT/assets fi mkdir $TESTS_ROOT/assets # copy resources for file in $COCOS2DX_ROOT/tests/Re...
Shell
# check the args # $1: root of cocos2dx $2: app name $3: ndk root $4:pakcage path APP_NAME=$2 COCOS2DX_ROOT=$1 APP_DIR=$COCOS2DX_ROOT/$APP_NAME HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld NDK_ROOT=$3 PACKAGE_PATH=$4 # xxx.yyy.zzz -> xxx/yyy/zzz convert_package_path_to_dir(){ PACKAGE_PATH_DIR=`echo $1 | sed -e "s/\....
Shell
# set params ANDROID_NDK_ROOT=__ndkroot__ COCOS2DX_ROOT=__cocos2dxroot__ GAME_ROOT=$COCOS2DX_ROOT/__projectname__ GAME_ANDROID_ROOT=$GAME_ROOT/android RESOURCE_ROOT=$GAME_ROOT/Resource # make sure assets is exist if [ -d $GAME_ANDROID_ROOT/assets ]; then rm -rf $GAME_ANDROID_ROOT/assets fi mkdir $GAME_ANDROID_ROO...
Shell
#!/bin/bash # this is a simple start script that runs zonerama in a endless loop cd /root/zonerama for (( ; ; )) do time ./Zonerama sleep 10 done
Shell
#!/bin/bash # this is a simple start script that runs zonerama in a endless loop cd /root/zonerama for (( ; ; )) do time ./Zonerama sleep 10 done
Shell
#! /bin/sh /Applications/Adobe\ Flash\ Builder\ 4\ Plug-in/sdks/4.0.0/bin/asdoc -source-path . -doc-sources . -output docs
Shell
#! /bin/sh /Applications/Adobe\ Flash\ Builder\ 4\ Plug-in/sdks/4.0.0/bin/asdoc -source-path . -doc-sources . -output docs
Shell
#!/usr/bin/env bash # Copyright (c) 2012 Felipe Contreras alias=$1 url=$2 dir="$GIT_DIR/testgit/$alias" prefix="refs/testgit/$alias" default_refspec="refs/heads/*:${prefix}/heads/*" refspec="${GIT_REMOTE_TESTGIT_REFSPEC-$default_refspec}" test -z "$refspec" && prefix="refs" export GIT_DIR="$url/.git" mkdir -p "$...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # # Fetch one or more remote refs and merge it/them into the current HEAD. USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] [--[no-]ff] [-s strategy]... [<fetch-options>] <repo> <head>...' LONG_USAGE='Fetch one or more remote refs and merge it/them into the curren...
Shell
#!/bin/sh GVF=GIT-VERSION-FILE DEF_VER=v1.8.2-rc0 LF=' ' # First see if there is a version file (included in release tarballs), # then try git-describe, then default. if test -f version then VN=$(cat version) || VN="$DEF_VER" elif test -d .git -o -f .git && VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/de...
Shell
#!/bin/sh while [ "$1" ] do if [ "$1" != "git-sh-setup" -a "$1" != "git-parse-remote" -a "$1" != "git-svn" ]; then old="$1" new=$(echo "$1" | sed 's/git-/git /') echo "Converting '$old' to '$new'" sed -i "s/\\<$old\\>/$new/g" $(git ls-files '*.sh') fi shift done sed -i 's/git merge-one-file/git-merge-one-fi...
Shell
#!/bin/sh # Copyright 2005, Ryan Anderson <ryan@michonline.com> # # This file is licensed under the GPL v2, or a later version # at the discretion of Linus Torvalds. USAGE='<start> <url> [<end>]' LONG_USAGE='Summarizes the changes between two commits to the standard output, and includes the given URL in the generated ...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano. # SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>] git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>] git-rebase --continue | --abort | --skip | --edi...
Shell
#!/bin/sh GVF=GIT-VERSION-FILE DEF_VER=0.17.GITGUI LF=' ' tree_search () { head=$1 tree=$2 for p in $(git rev-list --parents --max-count=1 $head 2>/dev/null) do test $tree = $(git rev-parse $p^{tree} 2>/dev/null) && vn=$(git describe --abbrev=4 $p 2>/dev/null) && case "$vn" in gitgui-[0-9]*) echo $vn; br...
Shell
#!/bin/sh # This is a very, _very_, simple script to convert a tab-separated # .txt file into a .pot/.po. # Its not clever but it took me 2 minutes to write :) # Michael Twomey <michael.twomey@ireland.sun.com> # 23 March 2001 # with slight GnuCash modifications by Christian Stimming <stimming@tuhh.de> # 19 Aug 2001, 23...
Shell
#!/bin/sh # # Copyright (c) 2005, 2006 Junio C Hamano SUBDIRECTORY_OK=Yes OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git am [options] [(<mbox>|<Maildir>)...] git am [options] (--resolved | --skip | --abort) -- i,interactive run interactively b,binary* (historical option -- no-op) 3,3way allow fall back on ...
Shell
#!/bin/sh { cat <<\EOF sayIt: $(foreach b,$(BUILT_INS),echo XXX $b YYY;) EOF cat Makefile } | make -f - sayIt 2>/dev/null | sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' | sort | { bad=0 while read builtin do base=`expr "$builtin" : 'git-\(.*\)'` x=`sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base' \1/p' git...
Shell
#!/bin/sh # # Copyright (c) Linus Torvalds, 2005 # # This is the git per-file merge script, called with # # $1 - original file SHA1 (or empty) # $2 - file in branch1 SHA1 (or empty) # $3 - file in branch2 SHA1 (or empty) # $4 - pathname in repository # $5 - original file mode (or empty) # $6 - file in branc...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # # Resolve two or more trees. # LF=' ' die () { echo >&2 "$*" exit 1 } # The first parameters up to -- are merge bases; the rest are heads. bases= head= remotes= sep_seen= for arg do case ",$sep_seen,$head,$arg," in *,--,) sep_seen=yes ;; ,yes,,*) hea...
Shell
#!/bin/sh # # Copyright (c) 2010 Junio C Hamano. # case "$action" in continue) git am --resolved --resolvemsg="$resolvemsg" && move_to_original_branch exit ;; skip) git am --skip --resolvemsg="$resolvemsg" && move_to_original_branch exit ;; esac test -n "$rebase_root" && root_flag=--root ret=0 if test -n "$k...
Shell
#!/bin/sh # # Copyright (c) 2006 Eric Wong # PERL='@@PERL@@' OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git instaweb [options] (--start | --stop | --restart) -- l,local only bind on 127.0.0.1 p,port= the port to bind to d,httpd= the command to launch b,browser= the browser to launch m,module-path= t...
Shell
#!/bin/sh # # Copyright (c) 2010 Junio C Hamano. # prec=4 read_state () { onto_name=$(cat "$state_dir"/onto_name) && end=$(cat "$state_dir"/end) && msgnum=$(cat "$state_dir"/msgnum) } continue_merge () { test -d "$state_dir" || die "$state_dir directory does not exist" unmerged=$(git ls-files -u) if test -n "...
Shell
#!/bin/sh # wrap-for-bin.sh: Template for git executable wrapper scripts # to run test suite against sandbox, but with only bindir-installed # executables in PATH. The Makefile copies this into various # files in bin-wrappers, substituting # @@BUILD_DIR@@ and @@PROG@@. GIT_EXEC_PATH='@@BUILD_DIR@@' if test -n "$NO_S...
Shell
#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $...
Shell
#!/bin/sh # An example hook script to verify what is about to be pushed. Called by "git # push" after it has checked the remote status, but before anything has been # pushed. If this script exits with a non-zero status nothing will be pushed. # # This hook is called with the following parameters: # # $1 -- Name of t...
Shell
#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --ver...
Shell
#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commi...
Shell
#!/bin/sh # # An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". # # Config # ------ # hooks.allowunannotated # This boolean sets whether unannotated tags will be allowed into ...
Shell
#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup test -x...
Shell
#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename ...
Shell
#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # t...
Shell
#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info
Shell
#!/bin/sh # # Copyright (c) 2012 Mozilla Foundation # test_description='diff.context configuration' . ./test-lib.sh test_expect_success 'setup' ' cat >template <<-\EOF && firstline b c d e f preline TARGET postline i j k l m n EOF sed "/TARGET/d" >x <template && git update-index --add x && git co...
Shell
#!/bin/sh test_description='log --grep/--author/--regexp-ignore-case/-S/-G' . ./test-lib.sh test_expect_success setup ' >file && git add file && test_tick && git commit -m initial && echo Picked >file && test_tick && git commit -a --author="Another Person <another@example.com>" -m second ' test_expect_succes...
Shell
#!/bin/sh # # Copyright (c) 2009 Giuseppe Bilotta # test_description='git-apply --ignore-whitespace. ' . ./test-lib.sh # This primes main.c file that indents without using HT at all. # Various patches with HT and other spaces are attempted in the test. cat > patch1.patch <<\EOF diff --git a/main.c b/main.c new file...
Shell
#!/bin/sh test_description='git merge Testing octopus merge when reducing parents to independent branches.' . ./test-lib.sh # 0 - 1 # \ 2 # \ 3 # \ 4 - 5 # # So 1, 2, 3 and 5 should be kept, 4 should be avoided. test_expect_success 'setup' ' echo c0 > c0.c && git add c0.c && git commit -m c0 && git tag c...
Shell
#!/bin/sh # # Copyright (c) 2007 Eric Wong # test_description='git svn useSvmProps test' . ./lib-git-svn.sh test_expect_success 'load svm repo' ' svnadmin load -q "$rawsvnrepo" < "$TEST_DIRECTORY"/t9110/svm.dump && git svn init --minimize-url -R arr -i bar "$svnrepo"/mirror/arr && git svn init --minimize-url -R a...
Shell
#!/bin/sh test_description='--show-all --parents does not rewrite TREESAME commits' . ./test-lib.sh test_expect_success 'set up --show-all --parents test' ' test_commit one foo.txt && commit1=`git rev-list -1 HEAD` && test_commit two bar.txt && commit2=`git rev-list -1 HEAD` && test_commit three foo.txt && com...
Shell
#!/bin/sh test_description='checkout $tree -- $paths' . ./test-lib.sh test_expect_success setup ' mkdir dir && >dir/master && echo common >dir/common && git add dir/master dir/common && test_tick && git commit -m "master has dir/master" && git checkout -b next && git mv dir/master dir/next0 && echo next >dir/...
Shell
#!/bin/sh test_description='check problems with relative GIT_DIR This test creates a working tree state with a file and subdir: top (committed several times) subdir (a subdirectory) It creates a commit-hook and tests it, then moves .git into the subdir while keeping the worktree location, and tries commits from...
Shell
#!/bin/sh # # Copyright (c) 2012 Heiko Voigt # test_description='Test revision walking api' . ./test-lib.sh cat >run_twice_expected <<-EOF 1st > add b > add a 2nd > add b > add a EOF test_expect_success 'setup' ' echo a > a && git add a && git commit -m "add a" && echo b > b && git add b && git commit -m ...
Shell
#!/bin/sh test_description='undoing resolution' . ./test-lib.sh check_resolve_undo () { msg=$1 shift while case $# in 0) break ;; 1|2|3) die "Bug in check-resolve-undo test" ;; esac do path=$1 shift for stage in 1 2 3 do sha1=$1 shift case "$sha1" in '') continue ;; esac sha1=$(git r...
Shell
#!/bin/sh # # Copyright (c) 2010 Steven Walter # test_description='git svn mergeinfo propagation' . ./lib-git-svn.sh say 'define NO_SVN_TESTS to skip git svn tests' test_expect_success 'initialize source svn repo' ' svn_cmd mkdir -m x "$svnrepo"/trunk && svn_cmd co "$svnrepo"/trunk "$SVN_TREE" && ( cd "$SVN_TR...
Shell
#!/bin/sh test_description='pushing to a mirror repository' . ./test-lib.sh D=`pwd` invert () { if "$@"; then return 1 else return 0 fi } mk_repo_pair () { rm -rf master mirror && mkdir mirror && ( cd mirror && git init && git config receive.denyCurrentBranch warn ) && mkdir master && ( cd mas...
Shell
#!/bin/sh # # Copyright (c) 2009 Vitaly Shukela # Copyright (c) 2009 Eric Wong # test_description='git svn property tests' . ./lib-git-svn.sh test_expect_success 'setup test repository' ' svn_cmd co "$svnrepo" s && ( cd s && mkdir qqq www && echo test_qqq > qqq/test_qqq.txt && echo test_www > www/test_www.t...
Shell
#!/bin/sh test_description='git merge Testing octopus merge with more than 25 refs.' . ./test-lib.sh test_expect_success 'setup' ' echo c0 > c0.c && git add c0.c && git commit -m c0 && git tag c0 && i=1 && while test $i -le 30 do git reset --hard c0 && echo c$i > c$i.c && git add c$i.c && git commit ...
Shell
#!/bin/sh # # Copyright (c) 2008 Ping Yin # test_description='Summary support for submodules This test tries to verify the sanity of summary subcommand of git submodule. ' . ./test-lib.sh add_file () { sm=$1 shift owd=$(pwd) cd "$sm" for name; do echo "$name" > "$name" && git add "$name" && test_tick && ...
Shell
#!/bin/sh # # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at> # if test -z "$GIT_TEST_HTTPD" then skip_all="Network testing disabled (define GIT_TEST_HTTPD to enable)" test_done fi HTTPD_PARA="" for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2' do if test -x "$DEFAULT_HTTPD_PATH" then break ...
Shell
#!/bin/sh test_description='git-cvsserver and git refspecs tests ability for git-cvsserver to switch between and compare tags, branches and other git refspecs' . ./test-lib.sh ######### check_start_tree() { rm -f "$WORKDIR/list.expected" echo "start $1" >>"${WORKDIR}/check.log" } check_file() { sandbox="$1" f...
Shell
#!/bin/sh test_description='update-index with options' . ./test-lib.sh test_expect_success basics ' >one && >two && >three && # need --add when adding test_must_fail git update-index one && test -z "$(git ls-files)" && git update-index --add one && test zone = "z$(git ls-files)" && # update-index is atomi...
Shell
#!/bin/sh # # Copyright (c) 2006 Carl D. Worth # test_description='Test of the various options to git rm.' . ./test-lib.sh # Setup some files to be removed, some with funny characters test_expect_success \ 'Initialize test directory' \ "touch -- foo bar baz 'space embedded' -q && git add -- foo bar baz ...
Shell
#!/bin/sh # # Copyright (c) 2009 Marc Branchaud # test_description='git svn multiple branch and tag paths in the svn repo' . ./lib-git-svn.sh test_expect_success 'setup svnrepo' ' mkdir project \ project/trunk \ project/b_one \ project/b_two \ project/tags_A \ project/tags_B && echo 1 > project/trunk/a.fi...
Shell
#!/bin/sh test_description='.git file Verify that plumbing commands work when .git is a file ' . ./test-lib.sh objpath() { echo "$1" | sed -e 's|\(..\)|\1/|' } objck() { p=$(objpath "$1") if test ! -f "$REAL/objects/$p" then echo "Object not found: $REAL/objects/$p" false fi } test_expect_success 'ini...
Shell
#!/bin/sh # # Copyright (c) 2012 Torsten Bögershausen # test_description='utf-8 decomposed (nfd) converted to precomposed (nfc)' . ./test-lib.sh if ! test_have_prereq UTF8_NFD_TO_NFC then skip_all="filesystem does not corrupt utf-8" test_done fi # create utf-8 variables Adiarnfc=`printf '\303\204'` Adiarnfd=`prin...
Shell
#!/bin/sh test_description='basic clone options' . ./test-lib.sh test_expect_success 'setup' ' mkdir parent && (cd parent && git init && echo one >file && git add file && git commit -m one) ' test_expect_success 'clone -o' ' git clone -o foo parent clone-o && (cd clone-o && git rev-parse --verify refs/rem...
Shell
#!/bin/sh # # Copyright (c) 2006 Catalin Marinas # test_description='git apply trying to add an ending line. ' . ./test-lib.sh # setup cat >test-patch <<\EOF diff --git a/file b/file --- a/file +++ b/file @@ -1,2 +1,3 @@ a b +c EOF echo 'a' >file echo 'b' >>file echo 'c' >>file test_expect_success setup \ '...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # Copyright (c) 2005 Robert Fitzsimons # test_description='git apply test for patches which require scanning forwards and backwards. ' . ./test-lib.sh test_expect_success 'git apply scan' ' git apply \ "$TEST_DIRECTORY/t4110/patch1.patch" \ "$TEST_DIRECTORY/t4110/...
Shell
#!/bin/sh test_description='git archive --format=zip test' . ./test-lib.sh GIT_UNZIP=${GIT_UNZIP:-unzip} SUBSTFORMAT=%H%n test_lazy_prereq UNZIP ' "$GIT_UNZIP" -v test $? -ne 127 ' test_lazy_prereq UNZIP_SYMLINKS ' ( mkdir unzip-symlinks && cd unzip-symlinks && "$GIT_UNZIP" "$TEST_DIRECTORY"/t5003/infozip...
Shell