code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/bash # # Test that sub-cluster allocating writes zero the rest of the cluster # # Copyright (C) 2010 IBM, Corp. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the L...
Shell
#!/bin/bash # # Copyright (C) 2009 Red Hat, Inc. # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation. # # This program is dist...
Shell
#!/bin/bash # # Merge backing file into test image when converting the image # # Copyright (C) 2009 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Licens...
Shell
#!/bin/bash # # Nolan II qcow2 corruption - wrong used cluster # # Copyright (C) 2009 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at yo...
Shell
#!/bin/bash # # Test command line configuration of block devices and driver-specific options # # Copyright (C) 2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version...
Shell
#!/bin/bash # # qcow2 pattern test, empty and compressed image - 4k cluster patterns # # Copyright (C) 2009 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of th...
Shell
#!/bin/sh export QEMU_PROG="$(pwd)/x86_64-softmmu/qemu-system-x86_64" export QEMU_IMG_PROG="$(pwd)/qemu-img" export QEMU_IO_PROG="$(pwd)/qemu-io" if [ ! -x $QEMU_PROG ]; then echo "'make check-block' requires qemu-system-x86_64" exit 1 fi cd $SRC_PATH/tests/qemu-iotests ret=0 ./check -T -nocache -raw || ret...
Shell
#!/bin/sh # We don't know which of the system emulator binaries there is (or if there is # any at all), so the 'quick' group doesn't contain any tests that require # running qemu proper. Assign a fake binary name so that qemu-iotests doesn't # complain about the missing binary. export QEMU_PROG="this_should_be_unused"...
Shell
#! /bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? $srcdir/configure "$@"
Shell
#!/bin/bash # Clam AV Scanner more /tmp/scripts/clamav/main.hdb | grep $1 if [[ $? == 1 ]] then exit 0 fi exit 1
Shell
#!/bin/bash # Clam AV Scanner # PARAMS UBUNTU_64="/local/vms/ubuntu-11-64-server" MOUNT="/local/vm_hds" NBD="/dev/nbd0" # FUNCTIONS checkError() { if [[ $? -ne 0 ]] then echo "An error occurred aborting." exit 0 fi } verifyCmd() { if [[ $(echo $2 | egrep "\([A-Za-z0-9_-/]+\)" | wc -l) != 1 ]] then echo ...
Shell
#!/bin/bash if [[ $# != 2 ]] then echo "Usage: run_performance_tests.sh <load_times> <execution_times>" exit fi echo "Each Module will be loaded $1 times and executed $2 times..." DIR=$(pwd) find . -name "*_performance.ko" | while read line; do cd $(dirname $line) # make echo "" echo "=====...
Shell
#!/bin/bash if [[ $# != 3 ]] then echo "Usage: module_injector.sh <injection_times> <load_times> <execution_times>" exit fi echo "Module $1 will be loaded $2 times and executed $3 times..." for (( i = 1; i <= $2; i++ )) do sudo insmod $1 loop=$3 if [[ $? != 0 ]] then exit fi sudo rmmod $1 if [[ $? != ...
Shell
if [ -n "$1" ]; then API_VER=$1 else API_VER='7' fi echo "API version: $API_VER" START_DIR=`pwd` cd ./sources/apk-API$API_VER zip ../../eclipse-files-API$API_VER.zip \ ./.classpath \ ./.project cd $START_DIR
Shell
#APP_VER=`cat version` #if [ -z "$APP_VER" ]; then # echo "no version file found!" # exit #fi #echo "Application version: $APP_VER" START_DIR=`pwd` for i in 7 do API_VER=$i echo "Building for API: $API_VER" cd $START_DIR/sources/apk-API$API_VER ant release done cd $START_DIR
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 if [ $(uname -s) == "Darwin" ] then open=open else open=xdg-open fi $open http://localhost:$port/templat...
Shell
#!/bin/bash set -x mkdir -p /scratch/cp-union fusermount -u /scratch/cp-union FUSE_CMD= for h in 2 3 5 6 7 8 9 10 11 12 13; do FUSE_CMD="/scratch/cp-remote/beaker-$h=RW:${FUSE_CMD}" if [[ ! -d /scratch/cp-remote/beaker-$h ]]; then mkdir -p /scratch/cp-remote/beaker-$h fi umount -l /scratch/cp-remote/b...
Shell
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
Shell
# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # ...
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Ge...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free softw...
Shell
#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is ...
Shell
#! /bin/sh # libtool - Provide generalized library-building support services. # Generated automatically by config.status (anymote) 0.1 # Libtool was configured on host timberline.bld.corp.google.com: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 20...
Shell
#!/bin/sh # Before using, you should figure out all the .m4 macros that your # configure.m4 script needs and make sure they exist in the m4/ # directory. # # These are the files that this script might edit: # aclocal.m4 configure Makefile.in src/config.h.in \ # depcomp config.guess config.sub install-sh missing ...
Shell
#!/bin/sh ENABLE=$1 echo "" echo " DataTables unit tests" echo "" if [ ! "$ENABLE" = "Enable" -a ! "$ENABLE" = "Disable" -o "ENABLE" = "-h" ]; then echo " Enable or Disable must be given as the first argument." echo " Optionally the second argument can be given as an integer to enable/disable a certain " echo ...
Shell
#!/bin/sh cd ../media/src # DEFAULTS CLOSURE="/usr/local/closure_compiler/compiler.jar" JSDOC="/usr/local/jsdoc/jsdoc" CMD=$1 MAIN_FILE="../js/jquery.dataTables.js" MIN_FILE="../js/jquery.dataTables.min.js" VERSION=$(grep " * @version " DataTables.js | awk -F" " '{ print $3 }') echo "" echo " DataTables build ...
Shell
#!/bin/sh ENABLE=$1 echo "" echo " DataTables unit tests" echo "" if [ ! "$ENABLE" = "Enable" -a ! "$ENABLE" = "Disable" -o "ENABLE" = "-h" ]; then echo " Enable or Disable must be given as the first argument." echo " Optionally the second argument can be given as an integer to enable/disable a certain " echo ...
Shell
#!/bin/sh cd ../media/src # DEFAULTS CLOSURE="/usr/local/closure_compiler/compiler.jar" JSDOC="/usr/local/jsdoc/jsdoc" CMD=$1 MAIN_FILE="../js/jquery.dataTables.js" MIN_FILE="../js/jquery.dataTables.min.js" VERSION=$(grep " * @version " DataTables.js | awk -F" " '{ print $3 }') echo "" echo " DataTables build ...
Shell
#!/bin/bash gdb /home/dinex/Cdk/SK5783.imx285/trunk/cdk/rootfs/home/dinex/bin/xtestx
Shell
target remote 172.22.52.246:2345
Shell
#!/bin/bash gdb /home/dinex/Cdk/SK5783.imx285/trunk/cdk/rootfs/home/dinex/bin/xtestx
Shell
#!/bin/sh if [ "${1}" == "x64" ]; then arch=x86_64 archdir=x64 else arch=x86 archdir=Win32 fi make_dirs() ( if [ ! -d bin_${archdir}d/lib ]; then mkdir -p bin_${archdir}d/lib fi ) copy_libs() ( cp lib*/*-lav-*.dll ../bin_${archdir}d cp lib*/*-lav-*.pdb ../bin_${archdir}d cp lib*/*.lib ../bin_${...
Shell
#!/bin/sh if [ "${1}" == "x64" ]; then arch=x86_64 archdir=x64 else arch=x86 archdir=Win32 fi make_dirs() ( if [ ! -d bin_${archdir}/lib ]; then mkdir -p bin_${archdir}/lib fi if [ ! -d bin_${archdir}d/lib ]; then mkdir -p bin_${archdir}d/lib fi ) strip_libs() { if [ "${arch}" == "x86_64" ...
Shell
#!/bin/bash # # This script checks the java version and bails if it's less # than Java6 (because we use @Override annotations on interface # overriding methods. It then proceeds to do a maven build that # first cleans, then builds the normal lifecycle through compilation # unit testing (if available) up to packaging. ...
Shell
#!/bin/sh # Copyright 2013 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
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/ash args=`getopt l:sk:o: $*` set -- $args for i; do case "$i" in -l) shift;shift;; -s) shift;param="$param -s";; -k) shift;param="$param -k $1";shift;; -o) shift;param="$param -o $1";shift;; esac done ./tmdb $param -l de
Shell
#!/bin/ash args=`getopt l:sk:o: $*` set -- $args for i; do case "$i" in -l) shift;shift;; -s) shift;param="$param -s";; -k) shift;param="$param -k $1";shift;; -o) shift;param="$param -o $1";shift;; esac done ./tmdb $param -l cs
Shell
#!/bin/ash args=`getopt l:sk:o: $*` set -- $args for i; do case "$i" in -l) shift;shift;; -s) shift;param="$param -s";; -k) shift;param="$param -k $1";shift;; -o) shift;param="$param -o $1";shift;; esac done ./tmdb $param -l de
Shell
#!/bin/ash args=`getopt l:sk:o: $*` set -- $args for i; do case "$i" in -l) shift;shift;; -s) shift;param="$param -s";; -k) shift;param="$param -k $1";shift;; -o) shift;param="$param -o $1";shift;; esac done ./tmdb $param -l cs
Shell
#!/bin/sh cat \ start.js \ utils.js \ tabs.js \ select.js \ radiocheck.js \ file.js \ filters.js \ flags.js \ jquery.idealforms.js \ end.js \ | uglifyjs -o min/jquery.idealforms.min.js
Shell
#!/bin/sh cat \ start.js \ utils.js \ tabs.js \ select.js \ radiocheck.js \ file.js \ filters.js \ flags.js \ jquery.idealforms.js \ end.js \ | uglifyjs -o min/jquery.idealforms.min.js
Shell
#!/bin/sh #hotel search and screening stat #author taoran.xu #date 2012-07-12 QDATE=`/bin/date -d 'last day' +%F`; if [ $# -eq 1 ]; then QDATE="$1"; fi QDATE2=`/bin/date -d "$QDATE" +%Y%m%d`; DSQL=/export/tmp/dsql.sql; BSQL=/export/tmp/bsql.sql; SSQL=/export/tmp/ssql.sql; ASQL=/export/tmp/asql.sql; CSQL=/export/t...
Shell
#!/bin/sh qdate=`date -d 'last day' +%F` if [ $# -eq 1 ];then qdate=$1 fi echo $qdate is begin... rm data/*$qdate.jieguo zcat /logs/qunarlog/train/$qdate.gz|awk -v qdate=$qdate 'function abc(_str,_arr,_a,_b,_c,_d,_e,_f){split(_str,_a,"?"); split(_a[2],_c,"&"); for(_d in _c){split(_c[_d],_e,"="); _arr[_e[1]]=_e[2...
Shell
#!/bin/sh #date 2012-08-01 #authoer taoran.xu # 将dataware1上的日志数据复制到datalog5上 PDATE=`/bin/date -d 'last day' +%F` if [ $# -eq 1 ];then PDATE=$1 fi echo "开始传输"$PDATE"日志..." FILES=`find /logs/qunarlog/ -name "$PDATE*" -a -type f ` for FILE in $FILES do F=`dirname $FILE` scp -rpC $FILE l-datalog...
Shell
#!/bin/sh #zyj log #date 2012-06-05 #author taoran.xu PDATE=`/bin/date -d 'last day' +%F` if [ $# -eq 1 ]; then PDATE="$1"; fi PDATENO=`/bin/date -d "$PDATE" +%Y%m%d` QDATE=`/bin/date -d "$PDATE next day" +%F` /server/bin/logs/bin/download_logs.pl -debug 5 -alertto 'data-request@qunar.com' -date "$QDATE" -...
Shell
#!/bin/sh PDATE=`/bin/date -d 'last day' +%F` logdb1='mysql -uqunarlog -p2HhxtsSel6rg -h192.168.0.253 logstat --default-character-set=utf8' if [ $# -eq 1 ];then PDATE=$1 fi resultfile="/export/tmp/train$PDATE.result" bookingfile="/export/tmp/booking_$PDATE.csv" pvuvfile="/export/tmp/pvuv_$PDATE.csv" echo "del...
Shell
#!/bin/sh #hotel search and screening stat #author taoran.xu #date 2012-07-12 QDATE=`/bin/date -d 'last day' +%F`; if [ $# -eq 1 ]; then QDATE="$1"; fi QDATE2=`/bin/date -d "$QDATE" +%Y%m%d`; DSQL=/export/tmp/dsql.sql; BSQL=/export/tmp/bsql.sql; SSQL=/export/tmp/ssql.sql; ASQL=/export/tmp/asql.sql; CSQL=/export/t...
Shell
#!/bin/sh qdate=`date -d 'last day' +%F` if [ $# -eq 1 ];then qdate=$1 fi echo $qdate is begin... rm data/*$qdate.jieguo zcat /logs/qunarlog/train/$qdate.gz|awk -v qdate=$qdate 'function abc(_str,_arr,_a,_b,_c,_d,_e,_f){split(_str,_a,"?"); split(_a[2],_c,"&"); for(_d in _c){split(_c[_d],_e,"="); _arr[_e[1]]=_e[2...
Shell
#!/bin/sh SUM=0 OVERALL=0 for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do PID=`echo $DIR | cut -d / -f 3` PROGNAME=`ps -p $PID -o comm --no-headers` for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` do let SUM=$SUM+$SWAP done echo "PID=$PID - Swap used: $SUM - ($PROGNAME )" le...
Shell
#!/bin/sh # # stat hotel(iffrom = 'qunarHotel') queryword(query detail booking) # stat bnb queryword(query) # # author:taoran.xu # date:2012-04-19 QDATE=`/bin/date -d 'last day' +%F` QMONTH=`/bin/date -d 'last day' +%Y%m` if [ $# -eq 1 ]; then QDATE="$1" QMONTH=`/bin/date -d "$1" +%Y%m` fi RESULTFILE=/logs/api/ho...
Shell
#!/bin/sh #bnb toppic data import to db #date 2012-06-04 #author taoran.xu PDATE=`/bin/date -d 'last day' +%F` LOGFILE=/export/tmp/bnb_top"$PDATE".log LOGDATA=/export/tmp/bnb_top"$PDATE".data OUTFILE=/export/tmp/bnb_top"$PDATE".sql wget -O "$LOGDATA" -o "$LOGFILE" http://bnb.qunar.com/render/bnbData.jsp echo "dele...
Shell
#!/bin/sh #QUERY_STRING=scan TRANSLATE=${TRANSLATE:-/usr/local/etc/translate} printhdflag2conf() { case $1 in no|No|NO|0) echo 0 >> $RSSCONF ;; yes|Yes|YES|1) echo 1 >> $RSSCONF ;; *) echo 2 >> $RSSCONF ;; esac } if [ -f $TRANSLATE/etc/translate.con...
Shell
#!/bin/sh PDATE=`/bin/date -d 'last day' +%F` logdb1='mysql -uqunarlog -p2HhxtsSel6rg -h192.168.0.253 logstat --default-character-set=utf8' if [ $# -eq 1 ];then PDATE=$1 fi resultfile="/export/tmp/train$PDATE.result" bookingfile="/export/tmp/booking_$PDATE.csv" pvuvfile="/export/tmp/pvuv_$PDATE.csv" echo "del...
Shell
#!/bin/sh #date 2012-08-01 #authoer taoran.xu # 将dataware1上的日志数据复制到datalog5上 PDATE=`/bin/date -d 'last day' +%F` if [ $# -eq 1 ];then PDATE=$1 fi echo "开始传输"$PDATE"日志..." FILES=`find /logs/qunarlog/ -name "$PDATE*" -a -type f ` for FILE in $FILES do F=`dirname $FILE` scp -rpC $FILE l-datalog...
Shell
#!/bin/sh #QUERY_STRING=scan TRANSLATE=${TRANSLATE:-/usr/local/etc/translate} printhdflag2conf() { case $1 in no|No|NO|0) echo 0 >> $RSSCONF ;; yes|Yes|YES|1) echo 1 >> $RSSCONF ;; *) echo 2 >> $RSSCONF ;; esac } if [ -f $TRANSLATE/etc/translate.con...
Shell
#!/bin/sh #bnb toppic data import to db #date 2012-06-04 #author taoran.xu PDATE=`/bin/date -d 'last day' +%F` LOGFILE=/export/tmp/bnb_top"$PDATE".log LOGDATA=/export/tmp/bnb_top"$PDATE".data OUTFILE=/export/tmp/bnb_top"$PDATE".sql wget -O "$LOGDATA" -o "$LOGFILE" http://bnb.qunar.com/render/bnbData.jsp echo "dele...
Shell
#!/bin/sh # # stat hotel(iffrom = 'qunarHotel') queryword(query detail booking) # stat bnb queryword(query) # # author:taoran.xu # date:2012-04-19 QDATE=`/bin/date -d 'last day' +%F` QMONTH=`/bin/date -d 'last day' +%Y%m` if [ $# -eq 1 ]; then QDATE="$1" QMONTH=`/bin/date -d "$1" +%Y%m` fi RESULTFILE=/logs/api/ho...
Shell
#!/bin/sh SUM=0 OVERALL=0 for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do PID=`echo $DIR | cut -d / -f 3` PROGNAME=`ps -p $PID -o comm --no-headers` for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` do let SUM=$SUM+$SWAP done echo "PID=$PID - Swap used: $SUM - ($PROGNAME )" le...
Shell
#!/bin/sh #zyj log #date 2012-06-05 #author taoran.xu PDATE=`/bin/date -d 'last day' +%F` if [ $# -eq 1 ]; then PDATE="$1"; fi PDATENO=`/bin/date -d "$PDATE" +%Y%m%d` QDATE=`/bin/date -d "$PDATE next day" +%F` /server/bin/logs/bin/download_logs.pl -debug 5 -alertto 'data-request@qunar.com' -date "$QDATE" -...
Shell
#!/bin/bash # # Copyright (C) 2007 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
Shell
#!/bin/bash # # Copyright (C) 2007 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
Shell
#!/bin/bash for dir in $(find . -mindepth 2 \( -type l -o -type f \) -name makefile | sed -e 's/makefile$//'); do make -C $dir main; if [ $? != 0 ]; then exit 1; fi done
Shell
#!/bin/sh echo "Uploading latest Version" version=$(grep '<version>' pom.xml | head -n1 | tr -d ' a-z<>/') read a a a name a pw < ~/.netrc echo "Current Version $version uploading using username $name" echo "uploading jar..." python ./googlecode_upload.py -p morphium -s "Morphium V$version" -u $name -w $pw -l "Featured...
Shell
#!/bin/bash for dir in $(find . -mindepth 2 \( -type l -o -type f \) -name makefile | sed -e 's/makefile$//'); do make -C $dir main; if [ $? != 0 ]; then exit 1; fi done
Shell
#!/bin/sh USAGE='[help|start|bad|good|skip|next|reset|visualize|replay|log|run]' LONG_USAGE='git bisect help print this long help message. git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<pathspec>...] reset bisect state and start bisection. git bisect bad [<rev>] mark <rev> a known-bad revision. git bis...
Shell
#!/bin/sh # # This program resolves merge conflicts in git # # Copyright (c) 2006 Theodore Y. Ts'o # # This file is licensed under the GPL v2, or a later version # at the discretion of Junio C Hamano. # USAGE='[--tool=tool] [-y|--no-prompt|--prompt] [file to merge] ...' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= TOOL_MODE=merg...
Shell
#!/bin/sh # # Copyright (c) 2010 Ævar Arnfjörð Bjarmason # # This is Git's interface to gettext.sh. See po/README for usage # instructions. # Export the TEXTDOMAIN* data that we need for Git TEXTDOMAIN=git export TEXTDOMAIN if test -z "$GIT_TEXTDOMAINDIR" then TEXTDOMAINDIR="@@LOCALEDIR@@" else TEXTDOMAINDIR="$GIT_T...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git repack [options] -- a pack everything in a single pack A same as -a, and turn unreachable objects loose d remove redundant packs, and run git-prune-packed f pass --no-reus...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano. # USAGE='[--interactive | -i] [-v] [--force-rebase | -f] [--no-ff] [--onto <newbase>] [<upstream>|--root] [<branch>] [--quiet | -q]' LONG_USAGE='git-rebase replaces <branch> with a new branch of the same name. When the --onto option is provided the new branch starts ou...
Shell
#!/bin/sh USAGE='' SUBDIRECTORY_OK='Yes' OPTIONS_SPEC= . git-sh-setup echo "WARNING: '$0' is deprecated in favor of 'git fsck --lost-found'" >&2 if [ "$#" != "0" ] then usage fi laf="$GIT_DIR/lost-found" rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit git fsck --full --no-reflogs | while read dang...
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 # # This is included in commands that either have to be run from the toplevel # of the repository, or with GIT_DIR environment variable properly. # If the GIT_DIR does not look like the right correct git-repository, # it dies. # Having this variable in your environment would break scripts because # you would...
Shell
#!/bin/sh echo >&2 "fatal: git was built without support for `basename $0` (@@REASON@@)." exit 128
Shell
#!/bin/sh # # Rewrite revision history # Copyright (c) Petr Baudis, 2006 # Minimal changes to "port" it to core-git (c) Johannes Schindelin, 2007 # # Lets you rewrite the revision history of the current branch, creating # a new branch. You can specify a number of filters to modify the commits, # files and trees. # The...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2005 Junio C Hamano # # Resolve two trees, using enhanced multi-base read-tree. # 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 ;; ...
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) 2007, Nanako Shiraishi dashless=$(basename "$0" | sed -e 's/-/ /') USAGE="list [<options>] or: $dashless show [<stash>] or: $dashless drop [-q|--quiet] [<stash>] or: $dashless ( pop | apply ) [--index] [-q|--quiet] [<stash>] or: $dashless branch <branchname> [<stash>] or: $dash...
Shell
#!/bin/sh T="$1" for h in \ *.txt *.html \ howto/*.txt howto/*.html \ technical/*.txt technical/*.html \ RelNotes/*.txt *.css do if test ! -f "$h" then : did not match elif test -f "$T/$h" && $DIFF -u -I'^Last updated ' "$T/$h" "$h" then :; # up to date else echo >&2 "# install $h $T/$h" rm -f "$T/...
Shell
#!/bin/sh # This requires git-manpages and/or git-htmldocs repositories repository=${1?repository} destdir=${2?destination} head=master GIT_DIR= for d in "$repository/.git" "$repository" do if GIT_DIR="$d" git rev-parse refs/heads/master >/dev/null 2>&1 then GIT_DIR="$d" export GIT_DIR break fi done if test...
Shell
#!/bin/sh ( c=//////////////////////////////////////////////////////////////// skel=api-index-skel.txt sed -e '/^\/\/ table of contents begin/q' "$skel" echo "$c" ls api-*.txt | while read filename do case "$filename" in api-index-skel.txt | api-index.txt) continue ;; esac title=$(sed -e 1q "$filename"...
Shell
#!/bin/sh cat <<\EOF GIT Howto Index =============== Here is a collection of mailing list postings made by various people describing how they use git in their workflow. EOF for txt do title=`expr "$txt" : '.*/\(.*\)\.txt$'` from=`sed -ne ' /^$/q /^From:[ ]/{ s/// s/^[ ]*// s/[ ]*$// s/^/by / p } ...
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 dd if=/dev/zero bs=1048576 count=100 2>/dev/null | /usr/bin/time ./test-sha1 >/dev/null while read expect cnt pfx do case "$expect" in '#'*) continue ;; esac actual=` { test -z "$pfx" || echo "$pfx" dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null | perl -pe 'y/\000/g/' } | ./test-sha1 $cnt ...
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 # # 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 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 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 # # 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 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 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. # 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 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 # 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) 2010 Junio C Hamano. # . git-sh-setup 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 -...
Shell
#!/bin/sh GVF=GIT-VERSION-FILE DEF_VER=v1.7.10.GIT 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=4 HEAD 2>/d...
Shell
#!/bin/sh # git-ls-remote could be called from outside a git managed repository; # this would fail in that case and would issue an error message. GIT_DIR=$(git rev-parse -q --git-dir) || :; get_default_remote () { curr_branch=$(git symbolic-ref -q HEAD) curr_branch="${curr_branch#refs/heads/}" origin=$(git config ...
Shell
#!bash # # bash/zsh completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. # # The contained completion routines provide support for completi...
Shell
#!/bin/sh print_if_bare_repo=' if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true then printf "%s\n" "${1#./}" fi ' find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null
Shell
#!/bin/sh if tty -s then echo "Run 'help' for help, or 'exit' to leave. Available commands:" else echo "Run 'help' for help. Available commands:" fi cd "$(dirname "$0")" for cmd in * do case "$cmd" in help) ;; *) [ -f "$cmd" ] && [ -x "$cmd" ] && echo "$cmd" ;; esac done
Shell