code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/sh . /etc/functions-net.sh USERS=/etc/ppp/users PEERS=/etc/ppp/peers # users.pptpd format: # username password ip-address # users.pptp format: # peername username password ip-address # peers.pptp format: # peername host-name username ppp_del_user() { rm_entry "$2" $USERS.$1 } ppp_add_user() { ppp...
Shell
#!/bin/sh . /etc/functions-net.sh USERS=/etc/ppp/users PEERS=/etc/ppp/peers # users.pptpd format: # username password ip-address # users.pptp format: # peername username password ip-address # peers.pptp format: # peername host-name username ppp_del_user() { rm_entry "$2" $USERS.$1 } ppp_add_user() { ppp...
Shell
#!/bin/sh /etc/rc.common START=60 report_log() { [ "$#" -gt 0 ] && logger -s -t "webifopenvpn" "$@" } append_bool() { local section="$1" local option="$2" local value="$3" local _loctmp config_get_bool _loctmp "$section" "$option" [ "$_loctmp" -gt 0 ] && append args "$value" } append_parm() { local section=...
Shell
#!/bin/sh /etc/rc.common START=60 report_log() { [ "$#" -gt 0 ] && logger -s -t "webifopenvpn" "$@" } append_bool() { local section="$1" local option="$2" local value="$3" local _loctmp config_get_bool _loctmp "$section" "$option" [ "$_loctmp" -gt 0 ] && append args "$value" } append_parm() { local section=...
Shell
#!/bin/sh /etc/rc.common # Copyright (C) 2007 OpenWrt.org # Liran Tal <liran@enginx.com> <liran.tal@gmail.com> # Last updated: 16 August 2007 START=70 NAME=l2tpns BIN=$(which $NAME 2>/dev/null) DEFAULT=/etc/default/$NAME RUN_D=/var/run PID_F=$RUN_D/$NAME.pid start() { [ -z "$BIN" ] && return [ -f $DEFAULT ] && . $D...
Shell
#!/bin/sh /etc/rc.common # Copyright (C) 2007 OpenWrt.org # Liran Tal <liran@enginx.com> <liran.tal@gmail.com> # Last updated: 16 August 2007 START=70 NAME=l2tpns BIN=$(which $NAME 2>/dev/null) DEFAULT=/etc/default/$NAME RUN_D=/var/run PID_F=$RUN_D/$NAME.pid start() { [ -z "$BIN" ] && return [ -f $DEFAULT ] && . $D...
Shell
#!/bin/sh # # L2TPns apply script # Applies the uci configuration to l2tpns' configuration file /etc/l2tpns/startup-config # # Author: Liran Tal <liran@enginx.com> # <liran.tal@gmail.com> # # Last edited: 27 Nov 2007 - added support for proper restart of l2tpns service # #=================...
Shell
#!/bin/sh # # L2TPns apply script # Applies the uci configuration to l2tpns' configuration file /etc/l2tpns/startup-config # # Author: Liran Tal <liran@enginx.com> # <liran.tal@gmail.com> # # Last edited: 27 Nov 2007 - added support for proper restart of l2tpns service # #=================...
Shell
#!/bin/sh # # Webif post-removal script. # echo "+ removing entry from cron" sed -e '/fonheartbeat/d' -i /etc/crontabs/root echo "+ restarting cron" /etc/init.d/cron restart echo "+ removing download.fon.com from knownhosts" sed -e '/download.fon.com/d' -i /root/.ssh/known_hosts
Shell
#!/bin/sh # # Webif post-install script. # if [ ! -f /root/.ssh/known_hosts ]; then echo "+ known_hosts not found, creating file" touch /root/.ssh/known_hosts fi if [ "`cat /root/.ssh/known_hosts|grep download.fon.com`" = "" ]; then echo "+ download.fon.com not found in known_hosts, adding download.fon.com" echo "...
Shell
#!/bin/sh # # Webif post-removal script. # echo "+ removing entry from cron" sed -e '/fonheartbeat/d' -i /etc/crontabs/root echo "+ restarting cron" /etc/init.d/cron restart echo "+ removing download.fon.com from knownhosts" sed -e '/download.fon.com/d' -i /root/.ssh/known_hosts
Shell
#!/bin/sh # # Webif post-install script. # if [ ! -f /root/.ssh/known_hosts ]; then echo "+ known_hosts not found, creating file" touch /root/.ssh/known_hosts fi if [ "`cat /root/.ssh/known_hosts|grep download.fon.com`" = "" ]; then echo "+ download.fon.com not found in known_hosts, adding download.fon.com" echo "...
Shell
#!/bin/sh /etc/rc.common # Copyright (C) 2008 x-wrt.org ###################################### # # # Orginal script by ben@wildblue.de # # # ###################################### ################################################################### # fon heartbeat script # # Description: # # Author(...
Shell
#!/bin/sh /etc/rc.common # Copyright (C) 2008 x-wrt.org ###################################### # # # Orginal script by ben@wildblue.de # # # ###################################### ################################################################### # fon heartbeat script # # Description: # # Author(...
Shell
#!/bin/sh # Copyright (C) 2009 Fabian Omar Franzotti <fofware@gmail.com> . /lib/mroute/common-mroute local iftype=$(uci_get "mroute.$INTERFACE") [ -z "$iftype" ] && exit 0 add_to_existing () { local table config_get table $1 rt_table [ -z "$table" ] && return add_net_to_rt $INTERFACE "add_to_existing" $table $ne...
Shell
#!/bin/sh # Copyright (C) 2009 Fabian Omar Franzotti <fofware@gmail.com> . /lib/mroute/common-mroute local iftype=$(uci_get "mroute.$INTERFACE") [ -z "$iftype" ] && exit 0 add_to_existing () { local table config_get table $1 rt_table [ -z "$table" ] && return add_net_to_rt $INTERFACE "add_to_existing" $table $ne...
Shell
#!/bin/sh . /etc/functions.sh . /lib/mroute/common-mroute make_wan_list () { local gateway local device local proto config_get device $1 device config_get gateway $1 gateway config_get proto $1 proto [ -z "$device" -o -z "$gateway" -o -z "$proto" ] && return # local ipaddr # local network # local mark local na...
Shell
#!/bin/sh . /etc/functions.sh . /lib/mroute/common-mroute make_wan_list () { local gateway local device local proto config_get device $1 device config_get gateway $1 gateway config_get proto $1 proto [ -z "$device" -o -z "$gateway" -o -z "$proto" ] && return # local ipaddr # local network # local mark local na...
Shell
#!/bin/bash # # Copyright (c) 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 t...
Shell
#!/bin/sh if [ $# != 1 ] || [ ! -f "$1" ]; then echo 'usage: spinp file.p' 1>&2 exit 1 fi rm -f $1.trail spin -a $1 || exit 1 cc -DSAFETY -DREACH -DMEMLIM=500 -o pan pan.c pan -i rm pan.* pan if [ -f $1.trail ]; then spin -t -p $1 fi
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/sh runoff1 "$@" | pr.pl -h "xv6/$@" | mpage -m50t50b -o -bLetter -T -t -2 -FLucidaSans-Typewriter83 -L60 >x.ps; gv --swap x.ps
Shell
#!/bin/sh if [ $# != 1 ] || [ ! -f "$1" ]; then echo 'usage: spinp file.p' 1>&2 exit 1 fi rm -f $1.trail spin -a $1 || exit 1 cc -DSAFETY -DREACH -DMEMLIM=500 -o pan pan.c pan -i rm pan.* pan if [ -f $1.trail ]; then spin -t -p $1 fi
Shell
#!/bin/sh runoff1 "$@" | pr.pl -h "xv6/$@" | mpage -m50t50b -o -bLetter -T -t -2 -FLucidaSans-Typewriter83 -L60 >x.ps; gv --swap x.ps
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/bash select ch in "begin" "end" "exit" do case $ch in "begin") echo "start something" ;; "end") echo "stop something" ;; "exit") echo "exit" break; ;; *) echo $ch echo ...
Shell
#!/bin/bash #Program: # Use loop to try find your input. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH until [ "$yn" == "yes" ] || [ "$yn" == "YES" ] do read -p "Please input yes/YES to stop this program: " yn done
Shell
#!/bin/bash #Program: # This program is used to show "Hello World!" in screen. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo "Now, the services of your Linux systemt will be detect!" echo -e "The www, ftp, ssh and ma...
Shell
#!/bin/bash #Program: # This program will show it's name and first 3 parameters. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo "The script name is ==> $0" [ -n "$1" ] && echo "The 1st parameter is ==> $1" || exit 0 [...
Shell
#!/bin/bash #Program: # This program is used to show "Hello World!" in screen. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo -e "Hello Word! \a \n" exit 0
Shell
#!/bin/bash # Program: # User can keyin filename to touch 3 new files. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # 1. Let user keyin filename. echo -e "I will use 'touch' command to create 3 files." read -p "Pleas...
Shell
#!/bin/bash # Program: # This program will show the user's choice # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input (Y/N): " yn [ "$yn" = "Y" -o "$yn" = "y" ] && echo "OK, continue" || \ ([ "$yn" = "...
Shell
#!/bin/bash # Program: # Let user input one, two, three and show in screen. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH function printit() { echo "Your choice is $1" } echo "This program will print your selecti...
Shell
#!/bin/bash #Program: # This program will show it's name and first 3 parameters. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo "The script name is ==> $0" [ -n "$1" ] && echo "The 1st parameter is ==> $1" || exit 0 [...
Shell
#!/bin/bash #Program: # Use loop to try find your input. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH until [ "$yn" == "yes" ] || [ "$yn" == "YES" ] do read -p "Please input yes/YES to stop this program: " yn done
Shell
#!/bin/bash # Program: # Show "Hello" from $1 ... by using case ... esac # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH case $1 in "hello") echo "Hello, how are you?" ;; "") ...
Shell
#!/bin/bash # Program: # This program will show the user's choise. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input (Y/N): " yn if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then echo "OK, continu...
Shell
#!/bin/bash #Program: # Use loop to try find your input. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH while [ "$yn" != "yes" ] && [ "$yn" != "YES" ] do read -p "Please input yes/YES to stop this program: " yn done
Shell
#!/bin/bash select ch in "begin" "end" "exit" do case $ch in "begin") echo "start something" ;; "end") echo "stop something" ;; "exit") echo "exit" break; ;; *) echo $ch echo ...
Shell
#!/bin/bash # Program: # Let user input a filename, the program will search the filename # 1) exist? 2) file/directory? 3) file permissions # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input a ...
Shell
#!/bin/bash # Program: # Let user keyin their first and last name, and show their full name. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input your first name: " firstname read -p "Please input your ...
Shell
#!/bin/bash #Program: # Try do calculate 1+2+...+100 #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH s=0 for (( i=1; i<=100; i=i+1 )) do s=$(($s+$i)) done echo "The result of '1+2+3+...+100' is $s" for animal in dog ca...
Shell
#!/bin/bash day=7 while getopts ":d:" opt; do case $opt in d) day=$OPTARG ;; *) echo "How to use: $0 [-d DAY]" exit 1 ;; ?) echo "Option -$OPTARG requires an argument." exit 1 ;; esac done e...
Shell
#!/bin/bash #Program: # This program is used to show "Hello World!" in screen. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo "Now, the services of your Linux systemt will be detect!" echo -e "The www, ftp, ssh and ma...
Shell
#!/bin/bash # Program: # Let user keyin their first and last name, and show their full name. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input your first name: " firstname read -p "Please input your ...
Shell
#!/bin/bash #Program: # Use loop to try find your input. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH while [ "$yn" != "yes" ] && [ "$yn" != "YES" ] do read -p "Please input yes/YES to stop this program: " yn done
Shell
#!/bin/bash # Program: # Let user input a filename, the program will search the filename # 1) exist? 2) file/directory? 3) file permissions # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input a ...
Shell
#!/bin/bash #Program: # This program is used to show "Hello World!" in screen. #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH echo -e "Hello Word! \a \n" exit 0
Shell
#!/bin/bash # Program: # Show "Hello" from $1 ... by using case ... esac # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH case $1 in "hello") echo "Hello, how are you?" ;; "") ...
Shell
#!/bin/bash # Program: # This program will show the user's choice # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input (Y/N): " yn [ "$yn" = "Y" -o "$yn" = "y" ] && echo "OK, continue" || \ ([ "$yn" = "...
Shell
#!/bin/bash # Program: # This program will show the user's choise. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH read -p "Please input (Y/N): " yn if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then echo "OK, continu...
Shell
#!/bin/bash # Program: # User can keyin filename to touch 3 new files. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH # 1. Let user keyin filename. echo -e "I will use 'touch' command to create 3 files." read -p "Pleas...
Shell
#!/bin/bash day=7 while getopts ":d:" opt; do case $opt in d) day=$OPTARG ;; *) echo "How to use: $0 [-d DAY]" exit 1 ;; ?) echo "Option -$OPTARG requires an argument." exit 1 ;; esac done e...
Shell
#!/bin/bash # Program: # Let user input one, two, three and show in screen. # History: # 2010/06/06 xuzhi First Release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH function printit() { echo "Your choice is $1" } echo "This program will print your selecti...
Shell
#!/bin/bash #Program: # Try do calculate 1+2+...+100 #History: #2010/06/06 xuzhi First release PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH s=0 for (( i=1; i<=100; i=i+1 )) do s=$(($s+$i)) done echo "The result of '1+2+3+...+100' is $s" for animal in dog ca...
Shell
#! /bin/sh erl -pa `pwd` -sname two -mnesia dir '"two"' -s robust_bank_server bstart 3030
Shell
#! /bin/sh erl -pa `pwd` -sname one -mnesia dir '"one"' -s robust_bank_server bstart 3020
Shell
#! /bin/sh erl -pa `pwd` -sname two -mnesia dir '"two"' -s robust_bank_server bstart 3030
Shell
#! /bin/sh erl -pa `pwd` -sname one -mnesia dir '"one"' -s robust_bank_server bstart 3020
Shell
#! /bin/sh NODE=$1 while [ 1 -lt 2 ]; do erl -sname $NODE sleep 1 done
Shell
#! /bin/sh NODE=$1 while [ 1 -lt 2 ]; do erl -sname $NODE sleep 1 done
Shell
#!/bin/sh echo "" > results for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25\ 26 27 28 29 30 31 32 do echo $i erl -boot start_clean -noshell -smp +S $i -s ptests tests $i >> results done
Shell
#!/bin/sh echo "" > results for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25\ 26 27 28 29 30 31 32 do echo $i erl -boot start_clean -noshell -smp +S $i -s ptests tests $i >> results done
Shell
#!/bin/sh if [ $# != 1 ] || [ ! -f "$1" ]; then echo 'usage: spinp file.p' 1>&2 exit 1 fi rm -f $1.trail spin -a $1 || exit 1 cc -DSAFETY -DREACH -DMEMLIM=500 -o pan pan.c pan -i rm pan.* pan if [ -f $1.trail ]; then spin -t -p $1 fi
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/sh runoff1 "$@" | pr.pl -h "xv6/$@" | mpage -m50t50b -o -bLetter -T -t -2 -FLucidaSans-Typewriter83 -L60 >x.ps; gv --swap x.ps
Shell
#!/bin/sh if [ $# != 1 ] || [ ! -f "$1" ]; then echo 'usage: spinp file.p' 1>&2 exit 1 fi rm -f $1.trail spin -a $1 || exit 1 cc -DSAFETY -DREACH -DMEMLIM=500 -o pan pan.c pan -i rm pan.* pan if [ -f $1.trail ]; then spin -t -p $1 fi
Shell
#!/bin/sh runoff1 "$@" | pr.pl -h "xv6/$@" | mpage -m50t50b -o -bLetter -T -t -2 -FLucidaSans-Typewriter83 -L60 >x.ps; gv --swap x.ps
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/bash dir=$(dirname $0) # flake8 (runs pep8 and pyflakes) flake8 $dir/praw if [ $? -ne 0 ]; then echo "Exiting due to flake8 errors. Fix and re-run to finish tests." exit $? fi # pylint output=$(pylint --rcfile=$dir/.pylintrc $dir/praw 2> /dev/null) if [ -n "$output" ]; then echo "--pylint--" e...
Shell
#!/bin/bash dir=$(dirname $0) # flake8 (runs pep8 and pyflakes) flake8 $dir/praw if [ $? -ne 0 ]; then echo "Exiting due to flake8 errors. Fix and re-run to finish tests." exit $? fi # pylint output=$(pylint --rcfile=$dir/.pylintrc $dir/praw 2> /dev/null) if [ -n "$output" ]; then echo "--pylint--" e...
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/bash set -e echo -n "Enter the version for this release: " read ver if [ ! $ver ]; then echo "Invalid version." exit fi name="select2" js="$name.js" mini="$name.min.js" css="$name.css" release="$name-$ver" tag="$ver" branch="build-$ver" curbranch=`git branch | grep "*" | sed "s/* //"` timestamp=$(date) tok...
Shell
#!/bin/bash set -e echo -n "Enter the version for this release: " read ver if [ ! $ver ]; then echo "Invalid version." exit fi name="select2" js="$name.js" mini="$name.min.js" css="$name.css" release="$name-$ver" tag="$ver" branch="build-$ver" curbranch=`git branch | grep "*" | sed "s/* //"` timestamp=$(date) tok...
Shell
#!/bin/bash # # Copyright (c) 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 t...
Shell
#! /bin/bash # Binary of the Texturepacker: TEXTUREPACKER_BINARY=/usr/local/bin/TexturePacker # Shared Spritesheet-Output-Definitions: SPRITESHEET_OUTPUT_DIRECTORY="../assets/gfx/spritesheets/" SPRITESHEET_OUTPUT_JAVAIDS_PACKAGE="org.anddev.andengine.examples.spritesheets" SPRITESHEET_OUTPUT_JAVAIDS_DIRECTORY="../src...
Shell
#!/bin/sh mkdir dist mkdir dist/graphchi_v$1 cd dist/graphchi_v$1 hg clone https://code.google.com/p/graphchi/ #rm -rf src/Eigen find . -name '*.hg' -exec rm -rf {} \; find . -name '*.dSYM' -exec rm -fr {} \; cd .. tar -czf graphchi_src_v$1.tar.gz graphchi_v$1
Shell
./toolkits/collaborative_filtering/gensgd --training=rec_log_train.txt --val_pos=2 --rehash=1 --limit_rating=1000000 --max_iter=10 --gensgd_mult_dec=0.999999 --minval=-1 --maxval=1 --quiet=1 --calc_error=1 --file_columns=4 ./toolkits/collaborative_filtering/gensgd --training=rec_log_train.txt --val_pos=2 --rehash=1 --...
Shell
#!/bin/sh -e #script for installing graphchi cf toolbox #written by Danny Bickson, CMU wget http://bitbucket.org/eigen/eigen/get/3.1.1.tar.bz2 tar -xjf 3.1.1.tar.bz2 mv eigen-eigen-*/Eigen ./src cd toolkits/collaborative_filtering make cd ../../
Shell
# Following command makes the unittest.sh fail if any of the # commands fail. set -e function display_name { echo "****************************************************************************" echo -n "*******************" echo -n $1 echo "**********************" echo "**************************************...
Shell
#!/bin/bash export GRAPHCHI_ROOT=$PWD/../../ stdoutfname=$PWD/stdout.log rm -f $stdoutfname echo | tee -a $stdoutfname echo "Running application tests"| tee -a $stdoutfname echo "========================="| tee -a $stdoutfname echo "GraphChi collaborative filtering library"| tee -a $stdoutfname somefailed=0 echo "--...
Shell
#!/bin/sh # script for merging the output of the rating application into a single sorted file # Written By Danny Bickson, CMU if [ $# -ne 1 ]; then echo "Usage: $0 <training file name>" exit 1 fi TRAINING=$1 pwd FOUND=0 rm -f *.sorted for i in `ls ${TRAINING}.out[0-9]*` do FOUND=1 echo "Sorting output file $i"...
Shell
#!/bin/sh if [ ! -d "../../src/Eigen/" ]; then echo "********************************************************************************" echo "Failed to find Eigen linear algebra package!" echo "Please follow step 3 of the instructions here: " echo "http://bickson.blogspot.co.il/2012/08/collaborative-filterin...
Shell
#!/bin/bash # script for visualizing a subgraph # Written by Danny Bickson, CMU cd ../../ GRAPHCHI_ROOT=`pwd` cd - CURPATH=`pwd` NUM_EDGES=0 FILENAME="" SEEDS="" HOPS=2 NODES=0; EDGES=0; PROGRAM_OPTIONS="f:h:n:o:r:s:" HELP_STRING="-f Graph_file [-h hops] [-n edge_num] [-o nodes] [-s seeds] [-r multiple files regexp]\...
Shell
#!/bin/sh #change the website path to point to your website dir, and then run "sh refresh_website.sh" when you #want to view your graph cp index.html *.css *.js graph*.csv logo.gif settingA file.txt *csv.txt /afs/cs.cmu.edu/user/bickson/www/graphchi/
Shell
#!/bin/bash # Android Screenshot Library # ############################## # Startup script # echo "Android Screenshot Library -- initializing..." # if [ -z $ANDROID ]; then echo "*** Android SDK not found ***" echo "Make sure the ANDROID variable is pointing to Android SDK root directory" else adb="$AN...
Shell
#!/bin/bash # # Copyright (C) 2010-2011 the original author or authors. # # 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 requi...
Shell
#!/bin/bash cd $(dirname "$0")/.. if [ -z "$JAVA_HOME" ]; then export JAVA_HOME=/usr/lib/jvm/java-6-sun export PATH=$JAVA_HOME/bin:$PATH export LD_LIBRARY_PATH=$JAVA_HOME/lib:$LD_LIBRARY_PATH fi #svn -q up #java -version #fix for Ubuntu Hardy export LIBXCB_ALLOW_SLOPPY_LOCK=1 CLASSPATH="$(pwd)/resource...
Shell
#!/bin/bash set -e # Check if the jar has been built. if [ ! -e target/bitcoinj-tools-*.jar ] || [[ "$ALWAYS_BUILD_WALLETTOOL" != "" ]]; then echo "Compiling WalletTool to a JAR" cd ../core mvn install -DskipTests cd ../tools [ -e target/bitcoinj-tools-*.jar ] && rm target/bitcoinj-tools-*.jar mvn package...
Shell
#!/bin/bash # set -uex dev_appserver.py --address 0.0.0.0 --skip_sdk_update_check --backends . $*
Shell
#!/bin/bash # set -ue # make sure stuff is installed [ ! -d 'node_modules' ] && npm install socket.io express set -x # run the game node games-server/main.js $*
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
Shell
#!/bin/sh echo This script takes a minute to run. Be patient. 1>&2 LC_CTYPE=C export LC_CTYPE # pad stdin to multiple of 120 lines pad() { awk '{print} END{for(; NR%120!=0; NR++) print ""}' } # create formatted (numbered) files mkdir -p fmt rm -f fmt/* cp README fmt files=`grep -v '^#' runoff.list | awk '{print $...
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/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "@php_bin@" = '@'php_bin'@'; then PHP=php else PHP="@php_bin@" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR...
Shell
#!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "@php_bin@" = '@'php_bin'@'; then PHP=php else PHP="@php_bin@" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR...
Shell
#!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "@php_bin@" = '@'php_bin'@'; then PHP=php else PHP="@php_bin@" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR...
Shell
#!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "@php_bin@" = '@'php_bin'@'; then PHP=php else PHP="@php_bin@" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR...
Shell
#!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "@php_bin@" = '@'php_bin'@'; then PHP=php else PHP="@php_bin@" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR...
Shell