code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Generate Go code listing errors and other #defined constant # values (ENAMETOOLONG etc.), by asking the preprocessor # about the definitions....
Shell
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e eval $(go env) unset CDPATH # in case user has it set unset GOPATH # we disallow local import for non-local packages, if $GOROOT ha...
Shell
#!/usr/bin/env bash # Copyright 2011 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This script creates the .zip, index, and configuration files for running # godoc on app-engine. # # If an argument is provided it is assumed...
Shell
#!/bin/sh # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Generate builtin.c from $* (runtime.go and unsafe.go). # Run this after changing runtime.go and unsafe.go # or after changing the export metadata forma...
Shell
#!/bin/sh # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. go help documentation > doc.go gofmt -w doc.go
Shell
#!/bin/bash # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e go build -o testgo ok=true unset GOPATH unset GOBIN # Test that error messages have file:line information # at beginning of line. for i in t...
Shell
#!/bin/sh x() { echo '--- ' "$@" "$@" echo '---' echo } x go help x go help build x go help clean x go help install x go help fix x go help fmt x go help get x go help list x go help test x go help version x go help vet x go help gopath x go help importpath x go help remote
Shell
#!/bin/rc -e # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. if(! test -f make.rc){ echo 'all.rc must be run from $GOROOT/src' >[1=2] exit wrongdir } . ./make.rc --no-banner ./run.rc --no-rebuild $GOTOOLDIR/d...
Shell
#!/bin/rc -e # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. eval `{go env -9} # allow all.rc to avoid double-build of everything rebuild = true if(~ $1 --no-rebuild) shift if not { echo '# Building packages ...
Shell
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e eval $(go tool dist env) if [ ! -x $GOTOOLDIR/dist ]; then echo 'cannot find $GOTOOLDIR/dist; nothing to clean' >&2 exit 1 fi "$GOB...
Shell
#!/bin/rc -e # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Environment variables that control make.rc: # # GOROOT_FINAL: The expected final Go root, baked into binaries. # The default is the location of the ...
Shell
#!/usr/bin/env bash # Copyright 2010 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e wiki_pid= cleanup() { kill $wiki_pid rm -f test_*.out Test.txt final-test.bin final-test.go } trap cleanup 0 INT go build -o get.bin ...
Shell
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e goos=$(go env GOOS) defer_panic_recover=" defer defer2 " effective_go=" eff_bytesize eff_qr eff_sequence " error_handling=" er...
Shell
#!/bin/sh # Copyright 2012 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This script rebuilds the time zone files using files # downloaded from the ICANN/IANA distribution. # Versions to use. CODE=2011i DATA=2011n set -e ...
Shell
#!/bin/bash # Copyright 2011 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Test the code review plugin. # Assumes a local Rietveld is running using the App Engine SDK # at http://localhost:7777/ # # dev_appserver.py -p 7777...
Shell
#!/usr/bin/env bash # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. eval $(go tool dist env) export GOARCH GOOS GOROOT export E= case X"$GOARCH" in Xamd64) export A=6 ;; X386) export A=8 ;; Xarm) export A=...
Shell
g++ $@ -DNDEBUG -I /usr/local/include -I ../misc -I . -O3 -o xbt_tracker \ -Wl,-R/usr/local/lib/gcc44 \ ../misc/sql/database.cpp \ ../misc/sql/sql_query.cpp \ ../misc/sql/sql_result.cpp \ ../misc/bt_misc.cpp \ ../misc/bvalue.cpp \ ../misc/sha1.cpp \ ../misc/socket.cpp \ ../misc/virtual_binary.cpp \ ../misc/xc...
Shell
#!/bin/sh # # PROVIDE: xbtt # REQUIRE: NETWORKING mysql # Add the following line to /etc/rc.conf to enable XBTT: # xbtt_enable (bool): Set to "NO" by default. # Set it to "YES" to enable XBTT. # xbtt_path (str): Path to dir with xbt_tracker.conf . /etc/rc.subr name="xbtt" rcvar=`set_rcvar`...
Shell
#!/bin/sh # # XBTT Start/Stop the XBT Tracker # # chkconfig: 2345 99 01 # # description: The XBT Tracker # Source function library. . /etc/init.d/functions set -e # *** CHANGE THE BELOW DEFAULT VALUES TO REFLECT YOUR SYSTEM *** # Defaults TRACKERDIR=/usr/local/xbtt/ DAEMON=/usr/local/xbtt/xbt_track...
Shell
#!/bin/sh cd /usr/local/rss PATH=/usr/local/bin:${PATH} mysql -u <login> -p<pass> -D <database> <yday.sql 1>yday1.log 2>yday2.log
Shell
#!/bin/bash # # Copyright 2010 Google Inc. All Rights Reserved. # Author: jcgregorio@google.com (Joe Gregorio) # # Creates the documentation set for the library by # running pydoc on all the files in apiclient. # # Notes: You may have to update the location of the # App Engine library for your local system. set...
Shell
echo "The following files are missing or are not checked in:" hg st echo "Enter to continue" read -e YES echo "The following files are missing from the MANIFEST file:" cat MANIFEST | sort > sorted-manifest.txt hg st --clean| sed "s/^C //" | grep -v "^v3" > sorted-allfiles.txt diff sorted-allfiles.txt sorted-manifest.tx...
Shell
#!/bin/bash # # Copyright 2007 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
export PYTHONPATH=`pwd`:$PYTHONPATH
Shell
#!/bin/bash # # Copyright 2011 Google Inc. All Rights Reserved. # Author: jcgregorio@google.com (Joe Gregorio) # # Uploads a training data set to Google Storage to be used by this sample # application. Download the 'language.txt' file from # http://code.google.com/apis/predict/docs/hello_world.html # # Requirements: # ...
Shell
#!/bin/bash # # s3-del-old # # Script's documentation page: http://www.adminbuntu.com/delete_stale_s3_objects # # Deletes stale objects in a specified bucket on Amazon AWS S3. # # # Copyright 2013 Andrew Ault # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associ...
Shell
#!/bin/bash # # optimize_website_images.sh # # Script's documentation page: http://www.adminbuntu.com/website_image_optimization # # Customize and rename this script for your website. Then, after images have been changed and # before changes are pushed to the server, run this script to optimize all images in the site f...
Shell
#!/bin/bash # # keymap # # Script's documentation page: http://www.adminbuntu.com/bash_keymap # # Show standard Bash terminal key mappings # # # Copyright 2013 Andrew Ault # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associated documentation files (the "Softwa...
Shell
#!/bin/bash # # create_wordpress.sh # # Script's documentation page: http://www.adminbuntu.com/create_wordpress_instance # # Create a Wordpress instance on an Ubuntu Server. Customize the parameters near the tops of this # script for your server and the WordPress site that you wish to create. # # Copyright 2013 Andrew ...
Shell
#!/bin/bash # # set_permissions.sh # # change WordPress owner and permissions # # Script's documentation page: http://www.adminbuntu.com/wordpress_permissions # # Create a Wordpress instance on an Ubuntu Server. Customize the parameters near the tops of this # script for your server and the WordPress site that you wish...
Shell
#!/bin/bash # # backup-dirs-s3 # # Script's documentation page: http://www.adminbuntu.com/backup_directories_to_aws_s3 # # Backs up one or more directories to an Amazon AWS S3 bucket # # # Copyright 2013 Andrew Ault # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and...
Shell
#!/bin/bash # # backup-subdirs-s3 # # Script's documentation page: http://www.adminbuntu.com/backup_subdirectories_to_aws_s3 # # Backs up all subdirectories of a specifed directory to an Amazon AWS S3 bucket # # # Copyright 2013 Andrew Ault # # Permission is hereby granted, free of charge, to any person obtaining a co...
Shell
#!/bin/sh # Copyright 2011 Cooliris, 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 # Copyright 2011 Cooliris, 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 # Copyright 2011 Cooliris, 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 # Copyright 2011 Cooliris, 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 # Copyright 2011 Cooliris, 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 # Copyright 2011 Cooliris, 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
# Copyright 2012 Google Inc. All Rights Reserved. # # author: psimakov@google.com (Pavel Simakov) # # This script starts local developer Google AppEngine server and initializes it # with the default data set. # # Run this script from the coursebuilder/ folder: # sh ./scripts/start.sh # usage () { echo "Options: -...
Shell
#!/bin/bash # Copyright 2014 Google Inc. All Rights Reserved. # # Wrapper script for tools/etl/etl.py that sets up the environment correctly. # # Run this script as follows: # sh ./scripts/etl.sh <arguments> # # ETL's arguments are involved; pass --help for details. You will need to # provide credentials when usin...
Shell
#! /bin/sh # Copyright 2012 Google Inc. All Rights Reserved. # # author: psimakov@google.com (Pavel Simakov) # # This script starts local developer Google AppEngine server for integration # tests and initializes it with a default data set. # # Run this script from the coursebuilder/ folder: # sh ./scripts/start_i...
Shell
#! /bin/bash # Copyright 2014 Google Inc. All Rights Reserved. # # Wrapper script to launch PyLint ( http://www.pylint.org/ ) against # CourseBuilder sources. This script is automatically run as part of # run_all_tests.py, and can be used on individual files; run with -h # option to get the "help" text on options and...
Shell
#!/bin/bash # Copyright 2012 Google Inc. All Rights Reserved. # # author: sll@google.com (Sean Lip) # Run this script from the Course Builder folder as follows: # sh ./scripts/test.sh --test_class <dotted test name> # E.g., # Run all tests in a module: # sh ./scripts/test.sh tests.unit.common_safe_dom # # ...
Shell
#!/bin/bash # Copyright 2014 Google Inc. All Rights Reserved. # # Usage: # # Run this script from the Course Builder folder. It can be run with the # following arguments: # # Deploy Course Builder to the App Engine app named in app.yaml: # sh ./scripts/deploy.sh # # Deploy Course Builder to the given App Engine ap...
Shell
# Copyright 2013 Google Inc. All Rights Reserved. # # # This script sets up all build/test dependencies including Google App Engine, # WebTest, Selenium, Chromedriver, etc. All other scripts will include this # script to setup these dependencies. # # Force shell to fail on any errors. set -e shopt -s nullglob # Se...
Shell
# Copyright 2014 Google Inc. All Rights Reserved. # # Set common config variables for developer runtime environment scripts. # NOTE: This file is also evaluated by Python scripts to get configurations # from environment variables. Do not add any non-idempotent side-effects # to this script. export SOURCE_DIR="$( cd "...
Shell
#!/bin/bash # Copyright 2015 Google Inc. All Rights Reserved. # # 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 appli...
Shell
#!/bin/bash # Copyright 2014 Google Inc. All Rights Reserved. # # Wrapper script for modules.py that sets up paths correctly. Usage from your # coursebuilder/ folder: # # sh scripts/modules.sh [args] set -e . "$(dirname "$0")/common.sh" python "$COURSEBUILDER_HOME/scripts/modules.py" "$@"
Shell
#!/bin/bash # # Copyright 2010 Google Inc. All Rights Reserved. # Author: jcgregorio@google.com (Joe Gregorio) # # Creates the documentation set for the library by # running pydoc on all the files in apiclient. # # Notes: You may have to update the location of the # App Engine library for your local system. set...
Shell
echo "The following files are missing or are not checked in:" hg st echo "Enter to continue" read -e YES echo "The following files are missing from the MANIFEST file:" cat MANIFEST | sort > sorted-manifest.txt hg st --clean| sed "s/^C //" | grep -v "^v3" > sorted-allfiles.txt diff sorted-allfiles.txt sorted-manifest.tx...
Shell
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
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 SCRIPTDIR=`dirname $0` cd $SCRIPTDIR/.. RED="0.5 0.5 0.5 0 0 0 0 0 0" GREEN="0 0 0 0.5 0.5 0.5 0 0 0" for x in btn_zoom_down_disabled.9 btn_zoom_down_disabled_focused.9 btn_zoom_down_normal.9 btn_zoom_up_disabled.9 btn_zoom_up_disabled_focused.9 btn_zoom_up_normal.9 btn_zoom_width_normal ; do conv...
Shell
#!/bin/sh # make sure ndk-build is in path SCRIPTDIR=`dirname $0` MUPDF_FILE=mupdf-snapshot-20111207.tar.gz MUPDF=mupdf #MUPDF_FILE=mupdf-0.9-source.tar.gz #MUPDF=mupdf-0.9 FREETYPE=freetype-2.4.6 OPENJPEG=openjpeg_v1_4_sources_r697 JBIG2DEC=jbig2dec-0.11 JPEGSRC=jpegsrc.v8a.tar.gz JPEGDIR=jpeg-8a cd $SCRIPTDIR/../de...
Shell
#!/bin/sh SCRIPTDIR=`dirname $0` cd $SCRIPTDIR/.. for x in upfolder folder home recent1 recent2 recent3 recent4 recent5 ; do convert res/drawable-hdpi/$x.png -resize 66.7% res/drawable-mdpi/$x.png convert res/drawable-hdpi/$x.png -resize 50% res/drawable-ldpi/$x.png done
Shell
#!/bin/sh SCRIPTDIR=`dirname $0` cd $SCRIPTDIR/.. RED="0.5 0.5 0.5 0 0 0 0 0 0" GREEN="0 0 0 0.5 0.5 0.5 0 0 0" for x in btn_zoom_down_disabled.9 btn_zoom_down_disabled_focused.9 btn_zoom_down_normal.9 btn_zoom_up_disabled.9 btn_zoom_up_disabled_focused.9 btn_zoom_up_normal.9 btn_zoom_width_normal ; do conv...
Shell
#!/bin/sh # make sure ndk-build is in path SCRIPTDIR=`dirname $0` MUPDF_FILE=mupdf-snapshot-20111207.tar.gz MUPDF=mupdf #MUPDF_FILE=mupdf-0.9-source.tar.gz #MUPDF=mupdf-0.9 FREETYPE=freetype-2.4.6 OPENJPEG=openjpeg_v1_4_sources_r697 JBIG2DEC=jbig2dec-0.11 JPEGSRC=jpegsrc.v8a.tar.gz JPEGDIR=jpeg-8a cd $SCRIPTDIR/../de...
Shell
#!/bin/sh SCRIPTDIR=`dirname $0` cd $SCRIPTDIR/.. for x in upfolder folder home recent1 recent2 recent3 recent4 recent5 ; do convert res/drawable-hdpi/$x.png -resize 66.7% res/drawable-mdpi/$x.png convert res/drawable-hdpi/$x.png -resize 50% res/drawable-ldpi/$x.png done
Shell
#!/bin/bash INSTALL_DIR="`pwd`/jni/libraw" SRC_DIR="`pwd`/../LibRaw-0.14.7" cd $SRC_DIR export TOOLCHAIN="$HOME/NVPACK/toolchain-14" export NDK="$HOME/NVPACK/android-ndk-r8b" export SYSROOT="$TOOLCHAIN/sysroot" export PATH="$TOOLCHAIN/bin:$SYSROOT/usr/local/bin:$PATH" export ARCH="armv7-a" export SYS_ROOT="$NDK_ROOT...
Shell
#!/bin/bash INSTALL_DIR="`pwd`/jni/exiv2" SRC_DIR="`pwd`/../exiv2-0.22" cd $SRC_DIR export TOOLCHAIN="$HOME/NVPACK/toolchain-14" export NDK="$HOME/NVPACK/android-ndk-r8b" export SYSROOT="$TOOLCHAIN/sysroot" export PATH="$TOOLCHAIN/bin:$SYSROOT/usr/local/bin:$PATH" export ARCH="armv7-a" export SYS_ROOT="$NDK_ROOT/pla...
Shell
#!/bin/sh # django-helpdesk shell script to upload to pypi. WORKDIR=/tmp/django-helpdesk-build.$$ mkdir $WORKDIR pushd $WORKDIR git clone git://github.com/rossp/django-helpdesk.git cd django-helpdesk /usr/bin/python2.4 setup.py bdist_egg upload /usr/bin/python2.5 setup.py bdist_egg upload /usr/bin/python2.5 setup.py...
Shell
#!/bin/bash # 打开apache.http调试信息 adb shell setprop log.tag.org.apache.http VERBOSE adb shell setprop log.tag.org.apache.http.wire VERBOSE adb shell setprop log.tag.org.apache.http.headers VERBOSE echo "Enable Debug"
Shell
#!/bin/bash # ----------------------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # ...
Shell
#!/bin/bash # ----------------------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # ...
Shell
#!/bin/sh cd .git/hooks ln -sf ../../git_hooks/* .
Shell
#!/bin/sh RIGHT_PKG_NAME=com.example.android.trivialdrivesample # Check that there isn't a NOCOMMIT flag if find . -name CONFIDENTIAL | grep -q CONFIDENTIAL; then echo "*** The working directory is marked as CONFIDENTIAL" echo "If you're really ready to commit, remove the CONFIDENTIAL files and try again:" fi...
Shell
#!/bin/sh # Copyright (c) 2012 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 rm -fr al mkdir al cp -a lib*.so* al/ /usr/local/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-unneeded al/* || echo "Can't find strip for android - pushing unstripped libs to device" adb push al /data/local/qt/lib
Shell
#!/bin/sh mkdir /data/local/qt/include/QtLocation/ cp *.h QGeo* QNmea* /data/local/qt/include/QtLocation/
Shell
#!/bin/sh # # Detects OS we're compiling on and outputs a file specified by the first # argument, which in turn gets read while processing Makefile. # # The output will set the following variables: # CC C Compiler path # CXX C++ Compiler path # PLATFORM_LDFLAGS ...
Shell
#!/bin/bash # Run standalone JavaScript tests # #Load the test framework, then JSON Template, then the tests javascript/v8shell/linux-i686/shell javascript/jsunity-0.6.js javascript/json-template.js javascript/json-template-test.js
Shell
#!/bin/bash # # jesyll.sh # Author: Andy Chu ../../../git/narwhal-v8/nw.sh $PWD/../../../git/jesyll/bin/jesyll $PWD
Shell
#!/bin/bash # # This directory contains a patch to convert Python 2.x jsontemplate.py to Python # 3. # # For now we are maintaining this patch in the source repo. When # python/jsontemplate/_jsontemplate.py is updated, this patch can be regenerated # if necessary. # # python3/jsontemplate.py should not be checked in -...
Shell
#!/bin/bash # # Scripts for JSON Template # # Usage: # ./do.sh <action> <args> TASTE_DIR=~/hg/taste pygrep() { find . -name \*.py | xargs grep "$@" } py-tests() { # Run Python unit tests export PYTHONPATH=$TASTE_DIR set -o errexit ./jsontemplate_test.py "$@" python/jsontemplate/jsontemplate_unittest.py...
Shell
#!/bin/sh # USAGES: Shell script to KILL Zombie Process # Author: AMIT MAHESHWARI # Website : http://linux.amitmaheshwari.in/ # version: 0.1 # Command Variable Cmd_echo=`which echo` Cmd_ps=`which ps` Cmd_awk=`which awk` Cmd_grep=`which grep` Cmd_sed=`which sed` Cmd_kill=`which kill` Cmd_date=`which date` ...
Shell
#!/bin/sh # USAGES: Shell script to KILL Zombie Process # Author: AMIT MAHESHWARI # Website : http://linux.amitmaheshwari.in/ # version: 0.1 # Command Variable Cmd_echo=`which echo` Cmd_ps=`which ps` Cmd_awk=`which awk` Cmd_grep=`which grep` Cmd_sed=`which sed` Cmd_kill=`which kill` Cmd_date=`which date` ...
Shell
#!/bin/sh # USAGES: Shell script to KILL Zombie Process # Author: AMIT MAHESHWARI # Website : http://linux.amitmaheshwari.in/ # version: 0.1 # Command Variable Cmd_echo=`which echo` Cmd_ps=`which ps` Cmd_awk=`which awk` Cmd_grep=`which grep` Cmd_sed=`which sed` Cmd_kill=`which kill` Cmd_date=`which date` ...
Shell
#!/bin/sh # USAGES: Shell script to KILL Zombie Process # Author: AMIT MAHESHWARI # Website : http://linux.amitmaheshwari.in/ # version: 0.1 # Command Variable Cmd_echo=`which echo` Cmd_ps=`which ps` Cmd_awk=`which awk` Cmd_grep=`which grep` Cmd_sed=`which sed` Cmd_kill=`which kill` Cmd_date=`which date` ...
Shell
#!/bin/bash # # Sample script for creating test users # (see test/FileShare/tests/TestConfig.py) ./admiraluseradd.sh TestUser1 "Test user 1" RGMember room1 111111 user1 ./admiraluseradd.sh TestUser2 "Test user 2" RGMember room2 222222 user2 ./admiraluseradd.sh TestLeader "Test group leader" R...
Shell
#!/bin/bash done=false while [[ $done == false ]] do /sbin/umount.cifs mountadmiral if [[ $? != 0 ]]; then done=true fi done
Shell
#! /bin/bash # # Create ZIP files of test directories # rm testdir.zip rm testdir2.zip rm testrdf.zip zip -r testdir.zip testdir zip -r testdir2.zip testdir2 cd testrdf zip -r ../testrdf.zip * cd ..
Shell
#!/bin/bash # # Get RDFDatabank dataset manifest using command line curl. # RDBROOT=http://163.1.127.173/admiral-test/datasets DATASET=${1-test} # --data-binary @- posts multiline from stdin echo echo "===== RETRIEVE DATASET $DATASET PAGE as RDF =====" curl ${RDBROOT}/${DATASET} -u admiral:admiral -H "Accept: applic...
Shell
#! /bin/bash curl http://163.1.127.173/admiral-test/datasets -u admiral:admiral | grep zipfile: | grep -v POST | grep delete | cut -d'<' -f 4| cut -d' ' -f 3|cut -d '"' -f 2| cut -d '/' -f 3-4
Shell
#! /bin/bash # # Upload small ZIP file # # Direct to server # curl http://163.1.127.173/packages/admiral-test -F "file=@small.zip;filename=small.zip;type=application/zip" -F id=small -u admiral:admiral -H "Accept: text/html,application/xhtml+xml" # Via SSH tunnel: curl http://localhost:9080/packages/admiral-test -F...
Shell
#! /bin/bash # # Test user access to the supplied path. # if [[ -w $1 ]]; then exit 0; else exit 1; fi
Shell
#!/bin/bash # # Set options to allow Wireshark traffic monitoring sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap # End.
Shell
echo "rowlabel,col1,col2,col3,col4" >test-bad-csv.txt echo "row1,a1,null>\\000<,c1,d1" >>test-bad-csv.txt
Shell
#!/bin/bash # # Bulk rename images # for f in 2008*; do echo "mv $f test-${f##*-}" mv $f test-${f##*-} done
Shell
#! /bin/bash # # Create and upload a ZIP file of apps directory # rm apps.zip zip -r apps.zip apps curl http://163.1.127.173/admiral-test/packages -F filename=apps.zip -F file=@apps.zip -F id=apps -u admiral:admiral -H "Accept: text/html,application/xhtml+xml" #curl http://localhost:9080/packages/admiral-test -F "fil...
Shell
#! /bin/bash # # Create ZIP file of test directory # rm test.zip zip -r test.zip test
Shell
#!/bin/bash # # Run script in background with log file # # $1 = script name (.sh) and log file name (.log) # echo "Usage: ./nohup.sh <scriptname> (.sh and .log appended)" echo "Process id is $$" echo "Logfile is $1-$$.log" if [ "$1" == "" ]; then echo "A script/log file name must be supplied" exit 1 fi # App...
Shell
#! /bin/bash # # Test user access to the supplied path. # This script is suid . Make sure that is cannot be modified by non-root users # Check arguments to prevent injection attack # $1 UserID # $2 FilePath if [[ "$1" == "" ]]; then echo "testuseraccess.sh - no username provided" exit 2 fi if [[ "$1" =~ "[a...
Shell
#! /bin/bash # # List all ADMIRAL Users. # This script is suid . Make sure that is cannot be modified by non-root users # Check arguments to prevent injection attack # $1 UserID # $2 FolderPath if [[ "$1" == "" ]]; then echo "listAdmiralUsers.sh - no username provided" exit 2 fi if [[ "$1" =~ "[a-z0-9_]" ]]...
Shell
#!/bin/bash # RDBROOT=http://163.1.127.173/admiral-test curl $RDBROOT/datasets -u admiral:admiral -H "Accept: text/plain" -o 000.tmp DATASETS=`grep -o "zipfile:[0-9]*" 000.tmp` for zipds in $DATASETS; do echo "Deleting $zipds" curl $RDBROOT/datasets/$zipds -X DELETE -u admiral:admiral -H "Accept: application/j...
Shell
#! /bin/bash # # Create ZIP file of apps directory # rm apps.zip zip -r apps.zip apps
Shell
#!/bin/bash # RDBROOT=http://163.1.127.173/ curl $RDBROOT/silos/ -X GET -u admiral:admiral -H "Accept: application/json" -o tmpSilos.html SILOS=`grep -o "zipfile:[0-9]*" tmpSilos.html` for silo in $SILOS; do if $silo == 'admiral-test' echo "found" #curl $RDBROOT/datasets/$zipds -X DELETE -u admiral:admi...
Shell
#!/bin/bash # # Driving RDFDatabank API using command line curl. # RDBROOT=http://163.1.127.173/admiral-test/datasets # --data-binary @- posts multiline from stdin echo echo "===== RETRIEVE DATASET LISTING (Accept JSON) =====" curl ${RDBROOT} -u admiral:admiral -o 00-temp-list.json -H "Accept: text/plain" echo echo...
Shell
#!/bin/bash # # Set device protection to allow Wireshark traffic monitoring # sudo chmod a+r /dev/bpf* # End.
Shell
#!/bin/bash # # Commands to create a data volume on the disk partition at /dev/sdb1, # copy files from the /home/data directory, and symlink /home/data to the # new data location # # This is the default case for a new system build when using a single # separate disk volume for ADMIRAL data pvcreate /dev/sdb1 vgcreate...
Shell
# rm /etc/libvirt/qemu/admiral.xml # sudo /etc/init.d/libvirt-bin restart HOSTNAME=%{HOSTNAME} DOMAINNAME=%{ADMIRALDOMAINNAME} IPADDR=%{IPADDR} PASSWD=%{PASSWORD} if true; then vmbuilder vmserver ubuntu \ --suite karmic \ --flavour virtual \ --arch amd64 \ --overwrite \ --ip $IPADDR \ --mask 255.255.252.0 \...
Shell