code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/usr/local/plan9/bin/rc
builtin cd $1
for (i in [a-z0-9:]*.[0-9]*) {
b=`{echo $i | sed 's/\..*//'}
9 sed -n '
/SH *NAM/,/SH/{
/SH/d
s/, *$//
ty
:y
s/ *\\*-.*//
tx
s/ *\\\(mi.*//
tx
s/, */\
/g
s/\n\\n/\
/g
s/$/ '$i'/g
p
}
/SH *DES/q
d
:x
s/ *\\*-.*//
s/ *\\\(mi.*//
/^$/d
s/, */\
/g
... | Shell |
#!/bin/sh
sed -E '
s/\$\(([^)]+)\)/$\1/g
s/^(.*)\+=/\1=$\1 /g
s/^include /</g
/^</ s/Make/mk/g
' "$@"
| Shell |
#!/bin/sh
/usr/bin/sed -E '
s/\.(sp|rsp)/.s.\1/g
s/\.(ep|rep)/.e.\1/g
s/(\.|->)(cp|r|subid|right)([^a-zA-Z0-9_])/\1u1.\2\3/g
s/(\.|->)(left|next)([^a-z])/\1u2.\2\3/g
/#include <u.h>/d
s/<libc.h>/"lib9.h"/g
s/"regexp.h"/"regexp9.h"/g
' $*
| Shell |
#!/bin/rc
fn demo {proj=$1; shift;
label=$1; shift;
{ echo 'o'
echo 'ra -8192 -8492 8192 8492'
echo 'e'
echo 'm -8192 8192'
echo t $type
echo 'm -8192 -8192'
echo t $proj - $label
MAP=world MAPDIR=$PLAN9/map map $proj $* -s -d 5
}
sleep 5
}
rfork en
{
type='Equatorial projections centered on long. ... | Shell |
#!/bin/rc
rfork en
# F FEATUREs, M map files, A other arguments
FEATURE=no
if (~ $MAPPROG '')
MAPPROG=/bin/aux/mapd
if (~ $MAPDIR '')
MAPDIR=/lib/map
F=(); M=(); A=();
for (i) {
switch ($FEATURE) {
case no
switch ($i) {
case -f
FEATURE=yes
F=($F)
case *
A=($A $i)
}
case yes
switch ($i) {
... | Shell |
#!/usr/local/plan9/bin/rc
# This program enqueues the file to be printed and starts the daemon, when necessary.
# Make changes to /sys/src/cmd/lp/lp.rc. Changes made directly to /rc/bin/lp will be lost.
# rfork en # so that environment and name space are not polluted
#
# put 'fn sigexit { rm /tmp/lpcrap; exit interr... | Shell |
#!/bin/rc
if (! ~ $DEBUG '') { flag x + }
if (test -e /net/tcp/clone) {
dialstring=`{ndb/query sys $1 dom}
network=tcp
if (~ $#dialstring 0 || ! ~ $dialstring '') {
dialstring=$1
}
if(lpsend $network^!^$dialstring^!printer) exit ''
rv='tcp failed'
}
if not rv='no tcp'
if (! ~ $dialstring '')
exit 'lpsend: no... | Shell |
#!/bin/sh
if [ "x$1" = "xx11" ]; then
if [ "x$2" = "x" ]; then
i=/usr/include
else
i=$2
fi
echo 'CFLAGS=$CFLAGS '$i'/freetype2'
echo 'LDFLAGS=$LDFLAGS -lfontconfig -lfreetype -lz'
fi
| Shell |
#!/bin/sh
[ -f $PLAN9/config ] && . $PLAN9/config
if [ "x$X11" = "x" ]; then
if [ -d /usr/X11R6 ]; then
X11=/usr/X11R6
elif [ -d /usr/local/X11R6 ]; then
X11=/usr/local/X11R6
elif [ -d /usr/X ]; then
X11=/usr/X
elif [ -d /usr/openwin ]; then # for Sun
X11=/usr/openwin
elif [ -d /usr/include/X11 ]; then
... | Shell |
#!/usr/local/plan9/bin/rc
# Formatted dump of encoded characters in one or more PostScript fonts.
# Arguments should be PostScript font names or the word all, which dumps
# all ROM and disk based fonts.
#
POSTLIB=/usr/local/plan9/postscript/prologues
PROLOGUE=$POSTLIB/printfont.ps
OPTIONS=''
COPYFILE=''
MODE=portrait... | Shell |
#!/bin/rc
# Generate paper output from the data that a PostScript program normally
# sends back to a host computer using file output operators.
#
POSTLIB=/sys/lib/postscript/prologues
PROLOGUE=$POSTLIB/hardcopy.ps
OPTIONS=
MODE=portrait
NONCONFORMING='%!PS'
ENDPROLOG='%%EndProlog'
BEGINSETUP='%%BeginSetup'
ENDSETUP=... | Shell |
#!/bin/rc
# Trivial script for checking and setting the default PostScript font
# encoding. Changing the default assumes you can write in $POSTLIB.
# Available font encodings are files in $POSTLIB that end in .enc.
# The default is $POSTLIB/Default.enc.
#
POSTLIB=/sys/lib/postscript/prologues
DEFAULT=Default.enc
CURRE... | Shell |
#!/usr/local/plan9/bin/rc
# the venti configuration is stored at the 248kB offset in the first index
# partition and extends for at most 8 kB.
rfork e
fn usage {
echo 'usage: venti/conf [-w] /dev/sdC0/v.arenas' >[1=2]
exit usage
}
wflag=no
while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){
switch($1){
case -w
wflag=yes... | Shell |
#!/usr/local/plan9/bin/rc
vtmp=/home/tmp
venti=tcp!127.1!17034
url=127.1:8901
fn reformat {
if(! test -f $vtmp/arena)
dd bs'='1048576 count'='100 if'='/dev/zero of'='$vtmp/arena
if(! test -f $vtmp/bloom)
dd bs'='1048576 count'='128 if'='/dev/zero of'='$vtmp/bloom
if(! test -f $vtmp/isect)
dd bs'='1048576 cou... | Shell |
if [ "x$WSYSTYPE" != xx11 ]; then
echo 'all install clean nuke:Q:'
echo ' #'
exit 0
fi
cat $PLAN9/src/mkmany
| Shell |
#!/bin/rc
spellflags=()
deroffargs=()
fflag=''
for(x){
switch($x){
case -[abcvx]
spellflags=($spellflags $x)
case -f
fflag=$x
case *
if(~ $fflag -f) {
spellflags=($spellflags -f $x)
fflag=''
}
if not deroffargs=($deroffargs $x)
}
}
deroff -w $deroffargs | sort -u | aux/sprog $spellflags
| Shell |
#!/bin/sh
awk ' # see.prep
# Input: string "\t" string
# Output: string "\t{see [also]} " string
BEGIN { FS = "\t" }
$3 ~ /%also/ { print $1 "\t{see also} " $2; next }
{ print $1 "\t{see} " $2 }
' $*
| Shell |
#!/bin/sh
#check.data $*
doclean $* >foo1
deroman foo1 >foo2
range.prep foo2 >foo3
rotate foo3 >foo4
range.sort foo4 >foo5
range.collapse foo5 >foo6
reroman foo6 >foo7
num.collapse foo7 >foo8
gen.key foo8 >foo9
see.prep see.terms | gen.key >foo.see
final.sort foo9 foo.see >foo.regular
hierarchy foo.regular >foo.hier... | Shell |
#!/bin/sh
rm foo[1-9] foo.*
| Shell |
#!/bin/sh
# input:
# key (tab) string (tab) page numbers
# command command 123
# command, data command, [data] 11
# command, display command, [display] 11, 54, 63, 75
# command, model command, [model] 11
# command, quit command, [quit] 5, 16
# output:
# key (tab) string (tab) page numbers
# key command 123
# k... | Shell |
#!/bin/sh
awk ' # doclean
# Input: "number tab IX string
# 107 IX self-reference #1186 -
# 281 TL APPENDIX A AMPL Reference Manual #26 -
# Output: string (tab) number
# excess spaces are removed output string
# note reversal of order; rest of programs expect it
# This contains some special pl... | Shell |
#!/bin/rc
sed '
s/[ ]+$//
/ /!d
s/\\N''349''//g
s/''//g
s/ -/ /
s/-$//
/\([^,) ]+(\)|$)/{; h; s///; p; g; s/\(//; s/\)//; }
/\(r, s\)$/{; s///; p; s/$/r/; p; s/r$/s/; }
' $1 |
sed '
/\([^,) ]+(\)|$)/{; h; s///; p; g; s/\(//; s/\)//; }
/\(r, s\)$/{; s///; p; s/$/r/; p; s/r$/s/; }
' |
sed '/ß/{; p; s/ß/ss/g; ... | Shell |
#!/bin/rc
for (x in spec tag aux status) {
grep ' '^$x^' ' $1 > junk1
sort +4 -5 +3n -4 junk1 > junk2
awk '{if ($5 != prev) print $0; prev = $5}' junk2 > junk3
sort -n +2 -3 junk3 > need$x
rm junk*
}
| Shell |
#!/bin/rc
sed '
s/[ ]+$//
/ /!d
/, /{; h; s/,.*//; p; g; s/ .*, / /; }
' $1 |
sed '
/\(/{; h; s/\([^)]+\)//; p; g; s/[()]//g; }
' |
sed '
s/ +/ /
s/[ ]+$//
s/ +/ /g
'
| Shell |
#!/bin/rc
awk '
BEGIN { FS = " |, " }
{ for(i=2; i<=NF; i++)print $i " " $1 }
' $1 |
tr A-Z a-z |
sort -u -t' ' +0f -1 +0 -1 +1n -2
| Shell |
#!/usr/local/plan9/bin/rc
f=getfile
if(~ $1 -d){
f=getdir
shift
}
if(! ~ $#* 2){
echo 'usage: netfileget [-d] system path' >[1=2]
exit usage
}
. netfilelib.rc $1
fn getfile9p {
if(! 9p read $1/$2)
exit 1
}
fn getdir9p {
9p ls -l $1/$2 | awk '{s=$NF; if($0 ~ /^d/) s=s"/"; print s}'
}
fn getfile {
rm -f $t... | Shell |
#!/usr/local/plan9/bin/rc
if(! ~ $#* 2){
echo usage: netfilestat system path >[1=2]
exit usage
}
f=dostat
. netfilelib.rc $1
fn dostat {
echo cd $2 | runsftp $1
if(9 test -e $t.sftp -a ! -s $t.sftp){
echo directory
exit 0
}
if(9 grep -s 'Can''t change directory|is not a directory' $t.sftp){
echo file
... | Shell |
#!/usr/local/plan9/bin/rc
if(! ~ $#* 2){
echo 'usage: netfileput system path' >[1=2]
exit usage
}
f=putfile
. netfilelib.rc $1
fn putfile{
cat >$t
echo put $t $2 | runsftp -e $1
}
fn putfile9p{
if(! 9p write $1/$2)
exit 1
}
$f $1 $2
exit 0
| Shell |
#!/bin/rc
for(i){
if(! test -f $i){
if(cp /dev/null $i){
chmod 600 $i
chmod +al $i
}
}
if not echo $i already exists
}
| Shell |
#!/usr/local/plan9/bin/rc
shift
sender=$1
shift
addr=$1
shift
upas/smtp -g yourgateway $addr $sender $*
| Shell |
#!/usr/local/plan9/bin/rc
switch($#*){
case 0
exec upas/nedmail
}
switch($1){
case -f* -r* -c* -m*
exec upas/nedmail $*
case *
exec upas/marshal $*
}
| Shell |
#!/usr/local/plan9/bin/rc
sender=$1
shift
addr=$1
shift
qer $PLAN9/mail/queue mail $sender $addr $* && runq $PLAN9/mail/queue $PLAN9/mail/lib/remotemail
| Shell |
#!/bin/sh
case $1 in
-n)
exec LIBDIR/notify
exit $? ;;
-m*|-f*|-r*|-p*|-e*|"")
exec LIBDIR/edmail $*
exit $? ;;
*)
exec LIBDIR/send $*
exit $? ;;
esac
| Shell |
#!/bin/sh
PATH=/bin:/usr/bin
message=${1-/usr/lib/upas/gone.msg}
return=`sed '2,$s/^From[ ]/>&/'|tee -a $HOME/gone.mail|sed -n '1s/^From[ ]\([^ ]*\)[ ].*$/\1/p'`
echo '' >>$HOME/gone.mail
grep "^$return" $HOME/gone.addrs >/dev/null 2>/dev/null || {
echo $return >>$HOME/gone.addrs
mail $return < $message
}
| Shell |
#!/bin/rc
rfork e
TMP=/tmp/myupassend.$pid
# collect upas/send options
options=()
while (! ~ $#* 0 && ~ $1 -*) {
options=($options $1);
shift
}
# collect addresses and add them to my patterns
dests=()
while (! ~ $#* 0) {
dests=($dests $1);
shift
}
echo $dests > $TMP
upas/list add /mail/box/$user/_pattern $TMP >[... | Shell |
#!/bin/rc
# create a /tmp for here documents
rfork en
bind -c /mail/tmp /tmp
KEY=whocares
USER=ken
RECIP=$1
MBOX=$2
PF=/mail/box/$USER/_pattern
TMP=/mail/tmp/mine.$pid
BIN=/bin/upas
D=/mail/fs/mbox/1
# save and parse the mail file
{sed '/^$/,$ s/^From / From /'; echo} > $TMP
upas/fs -f $TMP
# if we like the source... | Shell |
#!/bin/rc
# create a /tmp for here documents
rfork en
bind -c /mail/tmp /tmp
KEY=whocares
USER=ken
RECIP=$1
MBOX=$2
PF=/mail/box/$USER/_pattern
TMP=/mail/tmp/mine.$pid
BIN=/bin/upas
D=/mail/fs/mbox/1
# save and parse the mail file
{sed '/^$/,$ s/^From / From /'; echo} > $TMP
upas/fs -f $TMP
# if we like the source... | Shell |
#!/bin/sh
set -x
> /usr/spool/mail/test.local
echo "Forward to test.local" > /usr/spool/mail/test.forward
echo "Pipe to cat > /tmp/test.mail" > /usr/spool/mail/test.pipe
chmod 644 /usr/spool/mail/test.pipe
mail test.local <<EOF
mailed to test.local
EOF
mail test.forward <<EOF
mailed to test.forward
EOF
mail test.pipe... | Shell |
#!/bin/sh
sed -E '
s/\$([a-zA-Z0-9_][a-zA-Z0-9_]+)/$(\1)/g
s/^</include /
/^include / s/mk/Make/g
' "$@"
| Shell |
#!/bin/sh
test -f $PLAN9/config && . $PLAN9/config
tag="$OBJTYPE-$SYSNAME-${SYSVERSION:-`uname -r`}-${CC9:-cc}"
case "$tag" in
*-Linux-2.[0-5]*)
# will have to fix this for linux power pc
echo ${SYSNAME}-${OBJTYPE}-asm.o $SYSNAME.o
;;
*-FreeBSD-[0-4].*)
echo ${SYSNAME}-${OBJTYPE}-asm.o $SYSNAME.o
;;
*-NetBSD-*)
... | Shell |
#!/bin/sh
case $# in
0)
old=/usr/local/plan9
;;
1)
old=`cleanname $1`
;;
*)
echo 'usage: moveplan9.sh [oldpath]' 1>&2
exit 1
esac
[ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9"
new=`cleanname $PLAN9_TARGET`
if [ X"$new" = X"" ]
then
echo cleanname failed 1>&2
exit 2
fi
cd $PLAN9
# Avoid broken builtin echo... | Shell |
#!/bin/rc
T=/tmp/cs$pid
cstrans $T $1
rc $T
rm $T
| 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-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/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
. /etc/conf.d/acpi-eeepc-generic.conf
[ ! -d "$EEEPC_VAR" ] && mkdir -p $EEEPC_VAR
KERNEL=`uname -r`
KERNEL=${KERNEL%%-*}
KERNEL_maj=${KERNEL%%\.*}
k=${KERNEL#${KERNEL_maj}.}
KERNEL_min=${k%%\.*}
k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.}
KERNEL_rel=${k%%\.*}
k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.${KERNEL... | Shell |
#!/bin/sh
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
get_model
. /etc/acpi/eeepc/models/acpi-eeepc-$EEEPC_MODEL-events.conf
# Needed, else libnotify can't display its magic
su $XUSER --login -c "xhost +"
SELECTION=$3
if [ "$KEY_SHOW" = "1" ]; then
eeepc_notify "You pressed: \"$SELECTION\"" keyboard
fi
case ... | Shell |
# Maintainer: Nicolas Bigaouette <nbigaouette@gmail.com>
# Greatly inspired by:
# EeePC ACPI Utilities : http://eeepc-acpi-util.sourceforge.net
# Other Eee acpi packages from AUR: http://aur.archlinux.org/packages.php?K=eee
# TODO
# XRandR toggle between (see acpi-eeepc900, display.sh):
# -LVDS only
# ... | Shell |
#!/bin/bash
#
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
# eeepc_notify "Bluetooth toggle not fully implemented. Please report problems" stop
BT_SAVED_STATE_FILE=$EEEPC_VAR/bluetooth-saved
if [ -e $BT_SAVED_STATE_FILE ]; then
BT_SAVED_STATE=$(cat $BT_SAVED_STATE_FILE)
else
BT_SAVED_STATE=0
fi
# Find t... | Shell |
#!/bin/bash
now=`date +"%Y%m%d_%Hh%m"`
case "$1" in
stop)
mkdir -p /logs_backup/$now
cp -Rp /var/log/* /logs_backup/$now/
;;
start)
;;
*)
echo 'Usage: /etc/init.d/console-setup {start||stop}'
exit 1
;;
esac
| Shell |
#!/bin/bash
#
# EeePC LVDS resolution toggle
# Andrew Wyatt
# Tool to toggle LVDS output resolutions
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
tmp_xrandr=... | Shell |
#!/bin/bash
#
# LVDS Rotate
# Andrew Wyatt
# Tool to rotate LVDS panel
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
function rotate_toggle {
CURRENT=`xrandr | grep LVDS | awk '{print $4}'`
if [ "$CURRENT" = "left" ]; then
ROTATION="inverted"
elif [ "$CURRENT" = "inverted" ]; then
ROTATION="right... | Shell |
#!/bin/sh
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
get_model
. /etc/acpi/eeepc/models/acpi-eeepc-$EEEPC_MODEL-events.conf
# Needed, else libnotify can't display its magic
su $XUSER --login -c "xhost +"
SELECTION=$3
if [ "$KEY_SHOW" = "1" ]; then
eeepc_notify "You pressed: \"$SELECTION\"" keyboard
fi
case ... | Shell |
#!/bin/bash
. /etc/conf.d/acpi-eeepc-generic.conf
[ ! -d "$EEEPC_VAR" ] && mkdir -p $EEEPC_VAR
KERNEL=`uname -r`
KERNEL=${KERNEL%%-*}
KERNEL_maj=${KERNEL%%\.*}
k=${KERNEL#${KERNEL_maj}.}
KERNEL_min=${k%%\.*}
k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.}
KERNEL_rel=${k%%\.*}
k=${KERNEL#${KERNEL_maj}.${KERNEL_min}.${KERNEL... | Shell |
#!/bin/bash
#
# EeePC Touchpad toggle
# Tool to enable / disable touchpad
# Andrew Wyatt
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
if [ -e "$EEEPC_VAR/to... | Shell |
#!/bin/bash
#
# EeePC WIFI Toggle
# by Andrew Wyatt
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
EEEPC_RADIO_SAVED_STATE_FILE=$EEEPC_VAR/wifi-saved
if [ -e ... | Shell |
#!/bin/bash
#
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
# eeepc_notify "Bluetooth toggle not fully implemented. Please report problems" stop
BT_SAVED_STATE_FILE=$EEEPC_VAR/bluetooth-saved
if [ -e $BT_SAVED_STATE_FILE ]; then
BT_SAVED_STATE=$(cat $BT_SAVED_STATE_FILE)
else
BT_SAVED_STATE=0
fi
# Find t... | Shell |
#!/bin/sh
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
logger "#############################################"
logger "acpi-eeepc-generic-suspend2ram.sh:"
function suspend_check_blacklisted_processes() {
processes=( "$@" )
p_num=${#processes[@]}
logger "Checking for processes before suspending: $proc... | Shell |
#!/bin/bash
now=`date +"%Y%m%d_%Hh%m"`
case "$1" in
stop)
mkdir -p /logs_backup/$now
cp -Rp /var/log/* /logs_backup/$now/
;;
start)
;;
*)
echo 'Usage: /etc/init.d/console-setup {start||stop}'
exit 1
;;
esac
| Shell |
#!/bin/sh
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
logger "#############################################"
logger "acpi-eeepc-generic-suspend2ram.sh:"
function suspend_check_blacklisted_processes() {
processes=( "$@" )
p_num=${#processes[@]}
logger "Checking for processes before suspending: $proc... | Shell |
#!/bin/bash
#
# LVDS Rotate
# Andrew Wyatt
# Tool to rotate LVDS panel
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
function rotate_toggle {
CURRENT=`xrandr | grep LVDS | awk '{print $4}'`
if [ "$CURRENT" = "left" ]; then
ROTATION="inverted"
elif [ "$CURRENT" = "inverted" ]; then
ROTATION="right... | Shell |
#!/bin/bash
#
# EeePC Touchpad toggle
# Tool to enable / disable touchpad
# Andrew Wyatt
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
if [ -e "$EEEPC_VAR/to... | Shell |
#!/bin/bash
#
# EeePC WIFI Toggle
# by Andrew Wyatt
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
EEEPC_RADIO_SAVED_STATE_FILE=$EEEPC_VAR/wifi-saved
if [ -e ... | Shell |
#!/bin/bash
#
# EeePC LVDS resolution toggle
# Andrew Wyatt
# Tool to toggle LVDS output resolutions
# Edited by Nicolas Bigaouette
# Generic WIFI toggle utility which should work across EeePC models.
#
# http://code.google.com/p/acpi-eeepc-generic/
#
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
tmp_xrandr=... | Shell |
#!/bin/bash
. /etc/conf.d/acpi-eeepc-generic.conf
[ ! -d "$EEEPC_VAR" ] && mkdir -p $EEEPC_VAR
# Get username
if [ -S /tmp/.X11-unix/X0 ]; then
export DISPLAY=:0
user=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
# If autodetection fails, try another way...
[ "x$user" == "x" ] && user=`ps aux | ... | Shell |
#!/bin/sh
. /etc/acpi/eeepc/acpi-eeepc-generic-functions.sh
get_model
. /etc/acpi/eeepc/models/acpi-eeepc-$EEEPC_MODEL-events.conf
# Needed, else libnotify can't display its magic
su $XUSER --login -c "xhost +"
SELECTION=$3
if [ "$KEY_SHOW" = "1" ]; then
eeepc_notify "You pressed: \"$SELECTION\"" keyboard
fi
cas... | Shell |
# Maintainer: Nicolas Bigaouette <nbigaouette@gmail.com>
# Greatly inspired by:
# EeePC ACPI Utilities : http://eeepc-acpi-util.sourceforge.net
# Other Eee acpi packages from AUR: http://aur.archlinux.org/packages.php?K=eee
# TODO
# Wifi module autodetection + hacks (See acpi-eee 10.0-1's wlan.sh)
# Volume dev... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.