code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/bash # # Copyright 2010 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 ...
Shell
#!/bin/sh while read DOC; do ln -sfv /usr/share/doc/${DOC} done < doclist #ln -sfv ~/Download/Zimbu/docs ./zimbu
Shell
#!/bin/sh find . -type l | xargs rm
Shell
#!/bin/sh # Default acpi script that takes an entry for all actions set $* # Take care about the way events are reported ev_type=`echo "$1" | cut -d/ -f1` if [ "$ev_type" = "$1" ]; then event="$2"; else event=`echo "$1" | cut -d/ -f2` fi case "$ev_type" in button) case "$event" in power) ...
Shell
#!/bin/sh # /etc/acpi/powerbtn.sh # Initiates a shutdown when the power putton has been # pressed. # getXuser gets the X user belonging to the display in $displaynum. # If you want the foreground X user, use getXconsole! getXuser() { user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynu...
Shell
#!/bin/sh # /etc/acpid/ac.sh # Detect loss of AC power and regaining of AC power, and take action # appropriatly. # On my laptop anyway, this script doesn't not get different parameters for # loss of power and regained power. So, I have to use a separate program to # tell what the adapter status is. # This uses the s...
Shell
#!/bin/sh # # This is an example of using HGEDITOR to create of diff to review the # changes while commiting. # If you want to pass your favourite editor some other parameters # only for Mercurial, modify this: case "${EDITOR}" in "") EDITOR="sensible-editor" ;; emacs) EDITOR="$EDITOR -...
Shell
#!/bin/sh # # tcsh_completion_build.sh - script to generate tcsh completion # # # Copyright (C) 2005 TK Soh. # # This 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
######################################################################### # /etc/profile: System-wide initialisation file for bash # ######################################################################### # This script file is executed by bash(1) for login shells. By default, # it executes /etc/bash....
Shell
#! /bin/sh # postrm.skeleton # Skeleton maintainer script showing all the possible cases. # Written by Charles Briscoe-Smith, March-June 1998. Public Domain. # Abort if any command returns an error value set -e # This script is called twice during the removal of the package; once # after the removal of the package's...
Shell
#! /bin/sh # postinst.skeleton # Skeleton maintainer script showing all the possible cases. # Written by Charles Briscoe-Smith, March-June 1998. Public Domain. # Abort if any command returns an error value set -e # This script is called as the last step of the installation of the # package. All the package's files ...
Shell
#!/bin/sh # Sample udhcpc deconfig script /sbin/ifconfig $interface 0.0.0.0
Shell
#!/bin/sh # Currently, we only dispatch according to command. However, a more # elaborate system might dispatch by command and interface or do some # common initialization first, especially if more dhcp event notifications # are added. exec /usr/share/udhcpc/sample.$1
Shell
#!/bin/sh # Sample udhcpc bound script RESOLV_CONF="/etc/udhcpc/resolv.conf" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet" /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$router" ] then echo "deleting routers" while /sbin/route del default gw 0.0...
Shell
#!/bin/sh # Sample udhcpc nak script echo Received a NAK: $message
Shell
#!/bin/sh # Sample udhcpc renew script RESOLV_CONF="/etc/udhcpc/resolv.conf" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet" /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$router" ] then echo "deleting routers" while /sbin/route del default gw 0.0...
Shell
#!/bin/sh # udhcpc script edited by Tim Riker <Tim@Rikers.org> RESOLV_CONF="/etc/resolv.conf" [ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } NETMASK="" [ -n "$subnet" ] && NETMASK="netmask $subnet" BROADCAST="broadcast +" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" case "$1" in ...
Shell
#!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac # The options part of the kernel "video=" argument (i.e. everyting # after "video=<fbdriver>:") has very inconsistent rules. # # Generally the following applies: # 1) options are comma-separated # 2) ...
Shell
#!/bin/sh # # This script is run inside of the initramfs environment during the # system boot process. It is installed there by 'update-initramfs'. # The # package that owns it may opt to install it in an appropriate # location under "/usr/share/initramfs-tools/scripts/". # # see initramfs-tools(8) for more details. ...
Shell
#!/bin/sh # # # This is an example hook script. It will be run by 'mkinitramfs' # when it creates the image. It's job is to decide which files to # install, then install them into the staging area, where the # initramfs is being created. This happens when a new 'linux-image' # package is installed, or when the admin...
Shell
#! /bin/sh ## The web sucks. It is a mighty dismal kludge built out of a thousand ## tiny dismal kludges all band-aided together, and now these bottom-line ## clueless pinheads who never heard of "TCP handshake" want to run ## *commerce* over the damn thing. Ye godz. Welcome to TV of the next ## century -- six milli...
Shell
#! /bin/sh ## This is a quick example listen-exec server, which was used for a while to ## distribute netcat prereleases. It illustrates use of netcat both as a ## "fake inetd" and a syslogger, and how easy it then is to crock up a fairly ## functional server that restarts its own listener and does full connection ## ...
Shell
#! /bin/sh ## duplicate DaveG's ident-scan thingie using netcat. Oooh, he'll be pissed. ## args: target port [port port port ...] ## hose stdout *and* stderr together. ## ## advantages: runs slower than ident-scan, giving remote inetd less cause ## for alarm, and only hits the few known daemon ports you specify. ## di...
Shell
#! /bin/sh ## Web proxy, following the grand tradition of Web things being handled by ## gross scripts. Uses netcat to listen on a high port [default 8000], ## picks apart requests and sends them on to the right place. Point this ## at the browser client machine you'll be coming from [to limit access to ## only it], ...
Shell
#! /bin/sh ## web relay -- a degenerate version of webproxy, usable with browsers that ## don't understand proxies. This just forwards connections to a given server. ## No query logging, no access control [although you can add it to XNC for ## your own run], and full-URL links will undoubtedly confuse the browser ## i...
Shell
#! /bin/sh ## Shit-simple script to supply the "privmsg <recipient>" of IRC typein, and ## keep the connection alive. Pipe this thru "nc -v -w 5 irc-server port". ## Note that this mechanism makes the script easy to debug without being live, ## since it just echoes everything bound for the server. ## if you want autol...
Shell
#! /bin/sh ## Hit the major search engines. Hose the [large] output to a file! ## autoconverts multiple arguments into the right format for given servers -- ## usually worda+wordb, with certain lame exceptions like dejanews. ## Extracting and post-sorting the URLs is highly recommended... ## ## Altavista currently han...
Shell
#! /bin/sh ## launch a whole buncha shit at yon victim in no particular order; capture ## stderr+stdout in one place. Run as root for rservice and low -p to work. ## Fairly thorough example of using netcat to collect a lot of host info. ## Will set off every intrusion alarm in existence on a paranoid machine! # where...
Shell
#! /bin/sh ## special handler for altavista, since they only hand out chunks of 10 at ## a time. Tries to isolate out results without the leading/trailing trash. ## multiword arguments are foo+bar, as usual. ## Second optional arg switches the "what" field, to e.g. "news" test "${1}" = "" && echo 'Needs an argument t...
Shell
#! /bin/sh ## Like "rcp" but uses netcat on a high port. ## do "ncp targetfile" on the RECEIVING machine ## then do "ncp sourcefile receivinghost" on the SENDING machine ## if invoked as "nzp" instead, compresses transit data. ## pick your own personal favorite port, which will be used on both ends. ## You should prob...
Shell
#! /bin/sh ## a little wrapper to "password" and re-launch a shell-listener. ## Arg is taken as the port to listen on. Define "NC" to point wherever. NC=nc case "$1" in ?* ) LPN="$1" export LPN sleep 1 echo "-l -p $LPN -e $0" | $NC > /dev/null 2>&1 & echo "launched on port $LPN" exit 0 ;; esac # her...
Shell
#! /bin/bash # script to measure the speed of netcat. # start with one argument for usage information # # Tools that are used by this script are: # nc, bc, wc, sed, awk # # Author: Karsten Priegnitz (koem@petoria.de) NCPORT=23457 WAIT=1 # determine the programme's name me=`echo $0 | sed 's+.*/++'` # check number of...
Shell
#!/usr/sh # @(#) hical - displays previous, current & next months - today highlighted # @(#) an "internationalizationable" version of a 3-month 'cal' display, it # @(#) may be edited for week to start with Sun or Mon & for local language prog=/tmp/hical.$$ ; trap 'rm -f $prog ; trap 0 ; exit' 0 1 2 3 15 : ${so:=`tpu...
Shell
#!/bin/sh usage () { echo "usage:" $@ exit 127 } die () { echo $@ exit 128 } if test $# -lt 2 || test $# -gt 3 then usage "$0 <repository> <new_workdir> [<branch>]" fi orig_git=$1 new_workdir=$2 branch=$3 # want to make sure that what is pointed to has a .git directory ... git_dir=$(cd "$orig_git" 2>/dev/null...
Shell
#!/bin/sh # Use this tool to rewrite your .git/remotes/ files into the config. . git-sh-setup if [ -d "$GIT_DIR"/remotes ]; then echo "Rewriting $GIT_DIR/remotes" >&2 error=0 # rewrite into config { cd "$GIT_DIR"/remotes ls | while read f; do name=$(printf "$f" | tr -c "A-Za-z0-9-" ".") sed -n \ -e ...
Shell
#!/bin/sh # Copyright 2008 Lukas Sandström <luksan@gmail.com> # # AppendPatch - A script to be used together with ExternalEditor # for Mozilla Thunderbird to properly include patches inline in e-mails. # ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2 CONFFILE=~/.appprc SEP="-=-=-=-=-=-...
Shell
#!/bin/sh # # An example hook script to verify if you are on battery, in case you # are running Linux or OS X. Called by git-gc --auto with no arguments. # The hook should exit with non-zero status after issuing an appropriate # message if it wants to stop the auto repacking. # # This hook is stored in the contrib/hook...
Shell
#!/bin/sh # # Copyright (c) 2007 Andy Parkins # # An example hook script to mail out commit update information. This hook # sends emails listing new revisions to the repository introduced by the # change being reported. The rule is that (for branch updates) each commit # will appear on one email and one email only. #...
Shell
#!/bin/sh # This script displays the distribution of longest common hash prefixes. # This can be used to determine the minimum prefix length to use # for object names to be unique. git rev-list --objects --all | sort | perl -lne ' substr($_, 40) = ""; # uncomment next line for a distribution of bits instead of he...
Shell
#!/bin/sh USAGE="[-a] [-r] [-m] [-t] [-n] [-b <newname>] <name>" LONG_USAGE="git-resurrect attempts to find traces of a branch tip called <name>, and tries to resurrect it. Currently, the reflog is searched for checkout messages, and with -r also merge messages. With -m and -t, the history of all refs is scanned for...
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
#!/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 # # Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano # USAGE='[--mixed | --soft | --hard] [<commit-ish>] [ [--] <paths>...]' SUBDIRECTORY_OK=Yes . git-sh-setup set_reflog_action "reset $*" require_work_tree update= reset_type=--mixed unset rev while test $# != 0 do case "$1" in --mixed | --soft...
Shell
#!/bin/sh # # Copyright (c) 2006, Shawn O. Pearce # # Cleanup unreachable files and optimize the repository. USAGE='[--prune]' SUBDIRECTORY_OK=Yes . git-sh-setup no_prune=: while test $# != 0 do case "$1" in --prune) no_prune= ;; --) usage ;; esac shift done case "$(git config --get gc.packrefs)" in not...
Shell
#!/bin/sh # # Copyright (c) 2005, Linus Torvalds # Copyright (c) 2005, Junio C Hamano # # Clone a repository into a different directory that does not yet exist. # See git-sh-setup why. unset CDPATH OPTIONS_SPEC="\ git-clone [options] [--] <repo> [<dir>] -- n,no-checkout don't create a checkout bare ...
Shell
#!/bin/sh USAGE="(edit [-F <file> | -m <msg>] | show) [commit]" . git-sh-setup test -z "$1" && usage ACTION="$1"; shift test -z "$GIT_NOTES_REF" && GIT_NOTES_REF="$(git config core.notesref)" test -z "$GIT_NOTES_REF" && GIT_NOTES_REF="refs/notes/commits" MESSAGE= while test $# != 0 do case "$1" in -m) test "$AC...
Shell
#!/bin/sh # usage () { echo >&2 "usage: $0 [--heads] [--tags] [-u|--upload-pack <upload-pack>]" echo >&2 " <repository> <refs>..." exit 1; } die () { echo >&2 "$*" exit 1 } exec= while test $# != 0 do case "$1" in -h|--h|--he|--hea|--head|--heads) heads=heads; shift ;; -t|--t|--t...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # # Resolve two trees. # echo 'WARNING: This command is DEPRECATED and will be removed very soon.' >&2 echo 'WARNING: Please use git-merge or git-pull instead.' >&2 sleep 2 USAGE='<head> <remote> <merge-message>' . git-sh-setup dropheads() { rm -f -- "$GIT_DIR/MERGE_H...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # # Pretend we resolved the heads, but declare our tree trumps everybody else. # # We need to exit with 2 if the index does not match our HEAD tree, # because the current index is what we will be committing as the # merge result. git diff-index --quiet --cached HEAD -- ...
Shell
#!/bin/sh # Copyright (c) 2005 Linus Torvalds USAGE='[-n [<num>]] -l [<pattern>] | [-a | -s | -u <key-id>] [-f | -d | -v] [-m <msg>] <tagname> [<head>]' SUBDIRECTORY_OK='Yes' . git-sh-setup message_given= annotate= signed= force= message= username= list= verify= LINES=0 while test $# != 0 do case "$1" in -a) ...
Shell
#!/bin/sh # USAGE='<fetch-options> <repository> <refspec>...' SUBDIRECTORY_OK=Yes . git-sh-setup set_reflog_action "fetch $*" cd_to_toplevel ;# probably unnecessary... . git-parse-remote _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" LF=' ' IFS="$LF" no_tags= tags= a...
Shell
#!/bin/sh USAGE='<tag>' SUBDIRECTORY_OK='Yes' . git-sh-setup verbose= while test $# != 0 do case "$1" in -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose) verbose=t ;; *) break ;; esac shift done if [ "$#" != "1" ] then usage fi type="$(git cat-file -t "$1" 2>/dev/null)" || die "$1: no such object." ...
Shell
#!/bin/sh # # Copyright (c) 2005-2006 Pavel Roskin # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git-clean [options] <paths>... Clean untracked files from the working directory When optional <paths>... arguments are given, the paths affected are further limited to those that match them. -- d remove directories as well f o...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2006 Junio C Hamano USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= . git-sh-setup re...
Shell
#!/bin/sh OPTIONS_KEEPDASHDASH=t OPTIONS_SPEC="\ git-checkout [options] [<branch>] [<paths>...] -- b= create a new branch started at <branch> l create the new branch's reflog track arrange that the new branch tracks the remote branch f proceed even if the index or working tree is not...
Shell
#!/bin/sh # # Copyright (c) 2005 Linus Torvalds # Copyright (c) 2005 Junio C Hamano # case "$0" in *-revert* ) test -t 0 && edit=-e replay= me=revert USAGE='[--edit | --no-edit] [-n] <commit-ish>' ;; *-cherry-pick* ) replay=t edit= me=cherry-pick USAGE='[--edit] [-n] [-r] [-x] <commit-ish>' ;; * ) echo >&2 "...
Shell
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git merge [options] <remote>... git merge [options] <msg> HEAD <remote> -- stat show a diffstat at the end of the merge n don't show a diffstat at the end of the merge summary (synony...
Shell
#!/bin/sh # Copyright (c) 2008, Nanako Shiraishi # Prime rerere database from existing merge commits me=rerere-train USAGE="$me rev-list-args" SUBDIRECTORY_OK=Yes OPTIONS_SPEC= . $(git --exec-path)/git-sh-setup require_work_tree cd_to_toplevel # Remember original branch branch=$(git symbolic-ref -q HEAD) || original...
Shell
#!/bin/sh # # Performs an initial import of a directory. This is the equivalent # of doing 'git init; git add .; git commit'. It's a lot slower, # but is meant to be a simple fast-import example. if [ -z "$1" -o -z "$2" ]; then echo "Usage: git-import branch import-message" exit 1 fi USERNAME="$(git config user.nam...
Shell
#!/bin/sh # Copyright 2010 - 2012, Tim Henigan <tim.henigan@gmail.com> # # Perform a directory diff between commits in the repository using # the external diff or merge tool specified in the user's config. USAGE='[--cached] [--copy-back] [-x|--extcmd=<command>] <commit>{0,2} [-- <path>*] --cached Compare to t...
Shell
#!/bin/sh usage() { cat <<\EOF usage: git jump <mode> [<args>] Jump to interesting elements in an editor. The <mode> parameter is one of: diff: elements are diff hunks. Arguments are given to diff. merge: elements are merge conflicts. Arguments are ignored. grep: elements are grep hits. Arguments are given to gre...
Shell
#!/bin/sh # Distributed under the terms of the GNU General Public License v2 # Copyright (c) 2006 Fernando J. Pereda <ferdy@gentoo.org> # Copyright (c) 2008 Natanael Copa <natanael.copa@gmail.com> # Copyright (c) 2010 Eric S. Raymond <esr@thyrsus.com> # # This is a version 3.x of ciabot.sh; use -V to find the exact # v...
Shell
#!/bin/sh # # This is an example of using HGEDITOR to create of diff to review the # changes while commiting. # If you want to pass your favourite editor some other parameters # only for Mercurial, modify this: case "${EDITOR}" in "") EDITOR="sensible-editor" ;; emacs) EDITOR="$EDITOR -...
Shell
#!/bin/sh # # tcsh_completion_build.sh - script to generate tcsh completion # # # Copyright (C) 2005 TK Soh. # # This 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 # ############################################################################# # # 7z2lzma.bash is very primitive .7z to .lzma converter. The input file must # have exactly one LZMA compressed stream, which has been created with the # default lc, lp, and pb values. The CRC32 in the .7z archive is not check...
Shell
#!/bin/sh # Copyright (C) 2002, 2004 Free Software Foundation, 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 3 of the License, or # (at your option) any later version. # ...
Shell
#!/bin/bash # # Review the cron tasks defined in the system and warn the admin # if some of the files will not be run # # This program is copyright 2011 by Javier Fernandez-Sanguino <jfs@debian.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pu...
Shell
#!/bin/sh # This script is useful to check wether an interface is up and, # if not, it attempts to bring it back. This can be necessary # if your ISP provider causes occasional outages. # Some ISPs are known to termine connections when they reach # 24 hours to "prevent abuse". # Run this script through cron (every 5 mi...
Shell
#!/bin/sh iface="$1" if [ -z "$iface" ] ; then echo "Usage: $0 IFACE" exit 1 fi if ifconfig "$iface" | grep -Fw UP >/dev/null then echo UP else echo DOWN fi
Shell
#!/bin/sh set -e export LANG=C iface="$1" mac=$(/sbin/ifconfig "$iface" | sed -n -e '/^.*HWaddr \([:[:xdigit:]\-]*\).*/{s//\1/;y/ABCDEF/abcdef/;p;q;}') which="" while read testmac scheme; do if [ "$which" ]; then continue; fi if [ "$mac" = "$(echo "$testmac" | sed -e 'y/ABCDEF/abcdef/')" ]; then which="$scheme"; ...
Shell
#!/bin/sh if [ ! -e /etc/pcmcia/shared ]; then exit 1; fi pcmcia_shared () { . /etc/pcmcia/shared } iface="$1" # /etc/pcmcia/shared sucks pcmcia_shared "start" $iface usage () { exit 1 } get_info $iface HWADDR=`/sbin/ifconfig $DEVICE | sed -n -e 's/.*addr \([^ ]*\) */\1/p'` which="" while read glob scheme; do ...
Shell
#!/bin/sh # The following script example, if dropped in /etc/network/if-pre-up.d/ # and under /etc/network/if-down.d/, will manage to configure a bridge # if defined in the /etc/network/interfaces file as either: # # Note: The bridge-utils package already provide a similar (more # powerful) script this is just provid...
Shell
#!/bin/sh # # Checks if the given interface matches the given ethernet MAC. # If it does it exits with 0 (success) status; # if it doesn't then it exists with 1 (error) status. set -e export LANG=C if [ ! "$2" ] ; then echo "Usage: $0 IFACE targetMAC" exit 1 fi iface="$1" targetmac=`echo "$2" | sed -e 'y/ABCDEF/ab...
Shell
#!/bin/sh if [ `id -u` -ne 0 ] || [ "$1" = "" ]; then exit 1; fi if [ -x /usr/bin/fping ]; then PING="/usr/bin/fping" else PING="/bin/ping -c 2" fi iface="$1" which="" while read addr pingme scheme; do if [ "$which" ]; then continue; fi #echo " Trying $addr & $pingme ($scheme)" >&2 ip addr add $addr dev $if...
Shell
#!/bin/bash # A small example program for using the new getopt(1) program. # This program will only work with bash(1) # An similar program using the tcsh(1) script language can be found # as parse.tcsh # Example input and output (from the bash prompt): # ./parse.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b...
Shell
#!/bin/sh gpg --ignore-time-conflict --no-options --no-default-keyring \ --secret-keyring /tmp/`basename $0`.$$.tmp --trustdb-name /etc/apt/trustdb.gpg \ --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg \ --keyserver hkp://keyserver.ubuntu.com:80/ --recv $*
Shell
#!/bin/sh while read DOC; do ln -sfv /usr/share/doc/${DOC} done < doclist #ln -sfv ~/Download/Zimbu/docs ./zimbu
Shell
#!/bin/sh find . -type l | xargs rm
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return unsetopt menu_complete # do not autoselect the first completion entry unsetopt flowcontrol setopt auto_list setopt auto_menu # show completion menu on succesive tab press setopt complete_in_word setopt always_to_end autoload -U compinit compinit -i zmodload -i zsh/com...
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return # enviroment [ -x /usr/bin/dircolors ] && eval "$(dircolors)" [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" export EDITOR='/usr/bin/vim' export GREP_OPTIONS='--color=auto' export ZLSCOLORS="${LS_COLORS}" # alias alias so='source' alias -g ls='ls -Fh --color=aut...
Shell
#!/usr/bin/zsh if [ ! -z "$PUTTY" ]; then export LANG=zh_CN.GBK fi ZSH=$HOME/workspace/config/zsh bindkey -e for zshrc ($ZSH/*.zsh) source $zshrc rm -f core
Shell
#!/usr/bin/zsh export DOWNLOAD="$HOME/download" hash -d DOWNLOAD="$DOWNLOAD" export DROPBOX="$HOME/dropbox" hash -d DROPBOX="$DROPBOX" export VM="$HOME/vmshare" hash -d VM="$VM" export WORKSPACE="$HOME/workspace" hash -d WORKSPACE="$WORKSPACE" export CONFIG="$WORKSPACE/config" hash -d CONFIG="$CONFIG" export...
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return autoload -U edit-command-line zle -N edit-command-line bindkey '\C-x\C-e' edit-command-line autoload -U url-quote-magic zle -N self-insert url-quote-magic setopt long_list_jobs bindkey "^[m" copy-prev-shell-word bindkey "\e[3~" delete-char bindkey "\e[1~" beginning-of-line ...
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return [ -f /etc/zsh_command_not_found ] && . /etc/zsh_command_not_found #if [ ! -z "$PUTTY" ]; then # RPROMPT=$(echo '%{\033[31m%}%D %T%{\033[m%}') # PROMPT=$(echo '%{\e]0;%n@%m:%~\a%}%{\033[34m%}%M%{\033[00m%}:%{\033[32m%}%~ #%{\033[36m%}%n %{\033[01;31m%}>%{\033[33m%}>%{\033[34m%}>...
Shell
#!/bin/zsh export ORACLE_BASE="$HOME/download/instantclient_11_2" export ORACLE_HOME="$ORACLE_BASE" export ORACLE_SID="oradb" if [ -z "$PUTTY" ]; then export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8" else export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" fi export PATH="$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/sdk...
Shell
#!/usr/bin/zsh export PATH="$HOME/workspace/bin:/usr/local/go/bin:$PATH"
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return # Changing/making/removing directory # setopt auto_name_dirs setopt auto_pushd setopt pushd_ignore_dups alias ..='cd ..' alias cd..='cd ..' alias cd...='cd ../..' alias cd....='cd ../../..' alias cd.....='cd ../../../..' alias cd/='cd /' alias 1='cd -' alias 2='cd +2' alias 3=...
Shell
#!/usr/bin/zsh [ -z "$PS1" ] && return ## Command history configuration HISTFILE=$HOME/.zhistory HISTSIZE=10000 SAVEHIST=10000 setopt append_history setopt extended_history setopt hist_expire_dups_first setopt hist_ignore_all_dups setopt hist_ignore_dups # ignore duplication command history list setopt hist_ignore_s...
Shell
#!/bin/sh if [ ! -e icons ]; then echo "You must run this script in the scripts directory." exit 1 fi name=$1 echo "Using iconset $name.png" if [ ! -e "icons/${name}_150.png" ]; then echo "Icon set does not exist." echo "usage: set_icons.sh quill" exit 1 fi cp "icons/${name}_150.png" ../res/drawable/icon...
Shell
#!/bin/sh cat toolbox.xml | \ sed 's/Left/XXXXX/g' | \ sed 's/Right/Left/g' | \ sed 's/XXXXX/Right/g' | \ sed 's/toolbox_undo/XXXXX/g' | \ sed 's/toolbox_redo/toolbox_undo/g' | \ sed 's/XXXXX/toolbox_redo/g' | \ sed 's/toolbox_next/XXXXX/g' | \ sed 's/toolbox_prev/toolbox_next/g' | \ ...
Shell
#!/bin/sh pushd /home/vbraun/Eclipse/workspace/Quill javah -jni -d jni -classpath bin/classes org.libharu.Document javah -jni -d jni -classpath bin/classes org.libharu.Page javah -jni -d jni -classpath bin/classes org.libharu.Font javah -jni -d jni -classpath bin/classes org.libharu.Image /home/vbraun/opt/android-n...
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=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public ...
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 ./configure --system-name=GCC mv Makefile script/Makefile.gcc ./configure --system-name=GCC --shared mv Makefile script/Makefile.gcc_so ./configure --system-name=CYGWIN mv Makefile script/Makefile.cygwin ./configure --system-name=CYGWIN --shared mv Makefile script/Makefile.cygwin_dll ./configure --system-name...
Shell
#!/bin/sh # # make resource files for each platforms # _VERSION2=$(grep VERSION include/hpdf_consts.h | awk '{print $3}' | sed 's/"//g')".0" _VERSION1=$(grep VERSION include/hpdf_consts.h | awk '{print $3}' | sed 's/"//g;s/\./,/g')",0" _COMPILER="" which windres if [ $? -ne 0 ]; then echo "windres does not exist." ...
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 eval `grep '^HPDF_EXTRA_VERSION=' configure.in` case "$HPDF_EXTRA_VERSION" in *-dev) rebuildok=1 ;; *) rebuildok=0 ;; esac cvsclean=0 while test $# -gt 0; do if test "$1" = "--force"; then rebuildok=1 echo "Forcing buildconf" fi if test "$1" = "--clean"; then cvsclean=...
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 # libtool - Provide generalized library-building support services. # Generated automatically by config.status (polo) 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, 2001,...
Shell