document_id stringlengths 8 12 | document stringlengths 50 3.21k | split stringclasses 1
value |
|---|---|---|
d_bash_6800 | ---
+++
@@ -1,6 +1,13 @@
# Load the configuration
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/config.sh
+
+function recreate_dir(){
+# mkdir -p creates directory only if it does not exist
+ rm -rf $1
+ sudo mkdir -p $1
+ sudo chown -R $USER $1
+}
if [[ $1 == 'original' ]]
then
@@ -13... | bash |
d_bash_6801 | ---
+++
@@ -1,13 +1,18 @@
#!/usr/bin/env bash
# Reference:
-# Get Docker CE for Ubuntu | Docker Documentation]
+# Get Docker CE for Ubuntu | Docker Documentation
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
+# (amd64)
if [ $UID -ne 0 ]; then
echo 'requires superuser privilege' 1>&2
... | bash |
d_bash_6802 | ---
+++
@@ -4,8 +4,10 @@
distribution=$(lsb_release -sc)
echo 'Adding Opscode repo to sources.list.d...'
-echo "deb http://apt.opscode.com/ ${distribution} main" \
- | sudo tee /etc/apt/sources.list.d/opscode.list > /dev/null
+cat <<EOS | sudo tee /etc/apt/sources.list.d/opscode.list > /dev/null
+deb http://... | bash |
d_bash_6803 | ---
+++
@@ -21,7 +21,7 @@
openssl x509 -in $CADIR/ca.crt -noout -subject -dates
fi
i=1
-while -n "$1"; do
+while [ -n "$1" ]; do
fn="ca$i.crt"
echo "Add certificate to trusted CA from argument $i.$fn = '$1'"
echo "$1" > $CADIR/$fn | bash |
d_bash_6804 | ---
+++
@@ -1,5 +1,4 @@
#!/bin/bash
-set -x
# Determine if the following files changed in the branch
echo "Checking POM dependencies for changes..."
@@ -9,7 +8,7 @@
git checkout HEAD^1
mvn dependency:tree -Doutput=temp/old-tree.txt
-echo "---- Current dependencies..."
+echo "---- Latest dependencies..."
cat... | bash |
d_bash_6805 | ---
+++
@@ -1,14 +1,14 @@
echo ""
echo "# Executing https://raw.github.com/embarkmobile/android-sdk-installer"
echo ""
-
+sudo apt-get install -qq libstdc++6:i386 lib32z1
curl -L https://raw.github.com/embarkmobile/android-sdk-installer/version-2/android-sdk-installer \
- | bash /dev/stdin --install=build-tools-... | bash |
d_bash_6806 | ---
+++
@@ -30,6 +30,5 @@
install_cask qlmarkdown
install_cask scriptql
install_cask quicklook-json
-install_cask betterzipql
install_cask suspicious-package
qlmanage -r | bash |
d_bash_6807 | ---
+++
@@ -1,2 +1,7 @@
#!/bin/bash
+isExistApp=`ps -eaf |grep cp-dojos-service |grep -v grep| awk '{ print $2; }'`
+if [[ -n $isExistApp ]]; then
+ service cp-dojos-service stop
+fi
+
service cp-dojos-service start | bash |
d_bash_6808 | ---
+++
@@ -8,7 +8,9 @@
return 0;
fi;
- local version=$(cat package.json | awk 'match($0, /"version": "([0-9]+\.[0-9]+\.[0-9]+)"/, arr) { print arr[1]; }');
+ # Sadly MacOS doesn't have gawk but awk, which doesn't support this match :/
+ # awk 'match($0, /"version": "([0-9]+\.[0-9]+\.[0-9]+)"... | bash |
d_bash_6809 | ---
+++
@@ -5,10 +5,10 @@
alias pylint='python /usr/local/bin/pylint'
validatejson() {
- cat $1 | python -m simplejson.tool
+ cat $1 | python -m json.tool
}
function remote_shell() {
- environment=$3 || "PRODUCTION"
+ environment=$3 || "PRODUCTION"
/usr/bin/env ssh $1 "( DEPLOYMENT_TYPE=$env... | bash |
d_bash_6810 | ---
+++
@@ -5,5 +5,4 @@
export LC_ALL=en_US.UTF-8
export EDITOR=vim
-export PAGER=vimpager
export CLICOLOR=1 | bash |
d_bash_6811 | ---
+++
@@ -1,23 +1,29 @@
#!/bin/bash
#
-# Simple bash script for building binaries for all relevant platforms
+# Shell script for building binaries for all relevant platforms
SCRIPT_DIR=$(dirname $0)
cd ${SCRIPT_DIR}
+
+go test
+if [ "$?" -ne "0" ] ; then
+ echo "go test failed, aborting"
+ exit 1
+fi
... | bash |
d_bash_6812 | ---
+++
@@ -1,6 +1,5 @@
# Install Caskroom
brew tap caskroom/cask
-brew install brew-cask
brew tap caskroom/versions
# Not on brew-cask | bash |
d_bash_6813 | ---
+++
@@ -10,7 +10,7 @@
../gocd_scripts/generate_warden_manifest.sh
bosh -n create release cf --force
bosh login admin admin
-bosh -n upload release
+bosh -n upload release --skip-if-exists
bosh -n upload stemcell http://bosh-jenkins-gems-warden.s3.amazonaws.com/stemcells/latest-bosh-stemcell-warden.tgz --skip-... | bash |
d_bash_6814 | ---
+++
@@ -5,14 +5,9 @@
# Adam Walz <adam@adamwalz.net>
#
+docker_machine_name="dev"
+
# Load manually installed boot2docker environment into the shell session.
-if [[ "$OSTYPE" == darwin* ]] && (( $+commands[boot2docker] )); then
- if [[ $(boot2docker status) == "running" ]]; then
- export DOCKER_CERT_PA... | bash |
d_bash_6815 | ---
+++
@@ -4,16 +4,16 @@
param="--noconfirm --needed -S"
# arch
-sudo pacman $param binutils fakeroot patch bash-completion
+sudo pacman $param base-devel bash-completion
# console
-sudo pacman $param sudo git htop openssh wget rsync screen tree acpi apg
+sudo pacman $param git htop openssh wget rsync screen ... | bash |
d_bash_6816 | ---
+++
@@ -11,8 +11,8 @@
fi
# Instal epics base
dir=/home/fac_files/lnls-sirius/
-cd $dir
if [ -d $dir ]; then
+ cd $dir
git clone ssh://git@github.com/lnls-sirius/epics-dev.git
cd epics-dev/
git checkout base-3.15 | bash |
d_bash_6817 | ---
+++
@@ -20,11 +20,11 @@
do
$COMMAND link -v $test || exit 1
print_single_separator
- $COMMAND herd
- exit_code=$?
- if [ "$exit_code" != '42' ]; then
- exit 1
- fi
+ $COMMAND herd && exit 1
+ # exit_code=$?
+ # if [ "$exit_code" !=... | bash |
d_bash_6818 | ---
+++
@@ -10,13 +10,7 @@
rm -rf ./dist
-# Install jq 1.5
-# On K/Ubuntu 14.04 only jq 1.3 is available and ."results"[]["name"] is unsupported syntax
-mkdir --parents ./tmp
-curl --location --silent --show-error --output ./tmp/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
-chmod +x ./tm... | bash |
d_bash_6819 | ---
+++
@@ -7,8 +7,9 @@
cd haskell
# Run unit tests
-runhaskell -isrc -itest test/Test.hs > /dev/null 2>&1 || {
- echo "'python biotool_test.py' failed"
+#runhaskell -isrc -itest test/Test.hs > /dev/null 2>&1 || {
+runhaskell -isrc -itest test/Test.hs || {
+ echo "'runhaskell -isrc -itest test/Test.hs' fai... | bash |
d_bash_6820 | ---
+++
@@ -1,10 +1,8 @@
#!/bin/bash
set -ev
-if [ $TRAVIS_PYTHON_VERSION == '2.6' ] && ([ $DJANGO == 'Django<1.8' ] || [ $DJANGO == 'Django<1.9' ])
-then
- exit 0
-elif ([ $TRAVIS_PYTHON_VERSION == '3.3'] || [ $TRAVIS_PYTHON_VERSION == '3.4' ]) && \
- ([ $DJANGO == 'Django<1.4' ] || [ $DJANGO == 'Django<1.... | bash |
d_bash_6821 | ---
+++
@@ -6,6 +6,10 @@
# proxy it in the apache.php script.
echo
+
+# Save pwd and then change dir to this location
+STARTDIR=`pwd`
+cd `dirname $0`
# Fetch a shallow clone from the latest master of APC
echo "1. Fetching the APC repo from git.php.net, around a 300Kb download..."
@@ -31,3 +35,6 @@
htpass... | bash |
d_bash_6822 | ---
+++
@@ -23,8 +23,8 @@
if [ "$skip_checks" = false ]; then
# Clean-up build & install directory
- if [ -d $source_dir/build ] && [ "$(ls $source_dir/build/default)" ] || [ -d $install_prefix ] ; then
- printf "Clean-up your build & install directory using below command.\nmake clean && rm -rf $install_pr... | bash |
d_bash_6823 | ---
+++
@@ -3,11 +3,11 @@
# Prevent commits to default (master) branch.
# The branch that is to be protected
-PROTECTED_BRANCH="master"
-
-# A stub for future (so that hook is enabled for all by default, but
-# can be disabled per project config)
-allowprotected=$(git config --bool hooks.allowProtectedBranchCommi... | bash |
d_bash_6824 | ---
+++
@@ -23,4 +23,4 @@
exit 1
fi
-python "${POST_DATA_PY}" "${OUTLOG}" "${HOST_NAME}" "${CONFIG_PATH}"
+python -u "${POST_DATA_PY}" "${OUTLOG}" "${HOST_NAME}" "${CONFIG_PATH}" | bash |
d_bash_6825 | ---
+++
@@ -13,6 +13,10 @@
export NPM_DIR=$HOME/.npm
export PATH="$PATH:$NPM_DIR"
+# Go lang
+export GOPATH=/usr/local/opt/go/libexec/bin
+export PATH="$PATH:$GOPATH"
+
# Google Service Util
export GSUTIL=$HOME/.google/gsutil
export PATH="$PATH:$GSUTIL" | bash |
d_bash_6826 | ---
+++
@@ -2,6 +2,6 @@
# anaconda login
# anaconda auth -c -n travis --max-age 307584000 --url https://anaconda.org/USERNAME/PACKAGENAME --scopes "api:write api:read"
mkdir -p ./conda-recipe/ && cd ./conda-recipe/ && \
-conda skeleton --noarch-python pypi oddt && \
+conda skeleton pypi --noarch-python oddt && \
... | bash |
d_bash_6827 | ---
+++
@@ -9,7 +9,7 @@
run_command "bin/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv" || exit $?
print_header "Setting the web assets up" "Sylius"
-run_command "bin/console assets:install --env=test_cached --no-debug -vvv" || exit $?
+run_command "bin/console assets:inst... | bash |
d_bash_6828 | ---
+++
@@ -6,7 +6,7 @@
echo "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz"
;;
java11)
- echo "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.t... | bash |
d_bash_6829 | ---
+++
@@ -1,7 +1,7 @@
#!/bin/bash
echo "Installing PHP and common modules"
-yum install -y php php-common php-pdo php-mysql php-session php-dom php-gd php-fileinfo php-hash php-iconv php-mbstring php-simplexml php-tokenizer php-xml php-tidy
+yum install -y php php-common php-pdo php-mysql php-session php-dom p... | bash |
d_bash_6830 | ---
+++
@@ -1,18 +1,18 @@
#!/bin/sh
# quick and dirty script to install the blender nif scripts
-for BLENDERVERSION in 2.59 2.58 2.57 2.56 2.55 2.54 2.53 2.52 2.51 2.50
+for BLENDERVERSION in 2.61 2.60 2.59 2.58 2.57 2.56 2.55 2.54 2.53 2.52 2.51 2.50
do
BLENDERADDONS=~/.blender/$BLENDERVERSION/scripts/addons... | bash |
d_bash_6831 | ---
+++
@@ -6,9 +6,9 @@
if [ $# -eq 0 ] || [ "$1" == '--help' ] || [ "$1" == '-h' ]; then
echo "Example:" \
"docker run" \
- "-v \$(pwd):/src" \
+ "-v \"\$(pwd):/src\"" \
"-v /var/run/docker.sock:/var/run/docker.sock" \
- "<container>" \
+ "dkubb/haskell-builder" \
... | bash |
d_bash_6832 | ---
+++
@@ -1,7 +1,9 @@
#!/bin/sh
if [ "$(uname -s)" == "Darwin" ]; then
- brew install fish
+ if ! command -v fish >/dev/null 2>&1; then
+ brew install fish
+ fi
# Add fish to standard shells
echo "/usr/local/bin/fish" | sudo tee -a /etc/shells | bash |
d_bash_6833 | ---
+++
@@ -1,5 +1,5 @@
rm -rf Build/Windows
mkdir -p Build/Windows
cd Build/Windows
-cmake -G "Visual Studio 14 Win64" ../..
+cmake -G "Visual Studio 15 Win64" ../..
cd ../.. | bash |
d_bash_6834 | ---
+++
@@ -3,7 +3,6 @@
export DEBIAN_FRONTEND=noninteractive
apt-get purge -y nano
apt-get install -y vim
-apt-get install -y cron-apt
apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
apt-get install -y byobu
ap... | bash |
d_bash_6835 | ---
+++
@@ -11,7 +11,7 @@
if ! file_exists "$filename"; then
write_file "$filename" <<DEF
require_llvm 3.5
-install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
+ins... | bash |
d_bash_6836 | ---
+++
@@ -1 +1 @@
-export PATH="./bin:~/bin:/usr/local/bin:/usr/local/sbin:$ZSH/bin:$PATH"
+export PATH="./bin:$HOME/bin:/usr/local/bin:/usr/local/sbin:$ZSH/bin:$PATH" | bash |
d_bash_6837 | ---
+++
@@ -1,19 +1,3 @@
#!/bin/sh
-# Because Chrome
-frontmost() {
-osascript <<EOF
-tell application "System Events"
- set frontApp to name of first application process whose frontmost is true
-end tell
-EOF
-}
-
-before=$(frontmost)
open -g "$1"
-sleep 0.1
-after=$(frontmost)
-
-if [ "$before" != "$after" ]; ... | bash |
d_bash_6838 | ---
+++
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Abort on Error
set -e
| bash |
d_bash_6839 | ---
+++
@@ -7,7 +7,7 @@
# Add the number of commits after last tag to the version string
add_commits=$(git describe | cut -d'-' -f2)
rev=$(git describe | cut -d'-' -f3)
-sed -i "/ \"version/s/\"$/.${add_commits}+${rev}\"/" ${VERSION_FILE}
+sed -i "/ \"version/s/\"$/.${add_commits}.${rev}\"/" ${VERSION_FILE}
# R... | bash |
d_bash_6840 | ---
+++
@@ -1,6 +1,6 @@
#!/bin/sh
-if [ "$1" = "thelounge" -a "$(id -u)" = '0' ]; then
+if [ "$1" = "thelounge" ] && [ "$(id -u)" = '0' ]; then
find "${THELOUNGE_HOME}" \! -user node -exec chown node '{}' +
exec su node -c "$*"
fi | bash |
d_bash_6841 | ---
+++
@@ -9,5 +9,7 @@
alias la='gls -A --color'
fi
+alias grep="grep --color"
+
alias books="cd ~/Dropbox/books/"
alias dotfiles="cd ~/github/d-land/dotfiles" | bash |
d_bash_6842 | ---
+++
@@ -10,18 +10,26 @@
if [ "$#" -ge 2 ] ; then
if [ "$2" -ge 1 ]; then
- revision_limit=$2
+ revision_limit="$2"
fi
fi
-repo_dir=$1 #Path to directory where all old revisions will be stored
+function get_dir_count {
+ ls -1 -p "$1"/versions | grep / | wc -l
+}
-dir_count=$(ls -1 -p $1/versions | g... | bash |
d_bash_6843 | ---
+++
@@ -2,6 +2,8 @@
# Small script to get a recent openssl, with npn support
# Will run configure and build_libs to generate the .s files
+
+cd $(dirname $0)
SSL=openssl-1.1.1n.tar.gz
APR=apr-1.7.0.tar.gz | bash |
d_bash_6844 | ---
+++
@@ -3,19 +3,36 @@
set -e # Bail if something fails
# TODO: Determine if a Docker Toolbox setup
-IS_TOOLBOX=false
+IS_TOOLBOX=true
if [ "$IS_TOOLBOX" = true ]; then
- echo "TODO: Docker machine environment setup"
+ # Make sure default docker machine is started
+ STATUS=$(docker-machine status ... | bash |
d_bash_6845 | ---
+++
@@ -1,7 +1,7 @@
#!/bin/sh
mkdir bin
-env GOOS=linux GOARCH=arm go build -o bin/watchcat-arm
-env GOOS=linux GOARCH=amd64 go build -o bin/watchcat-linux
-env GOOS=darwin GOARCH=amd64 go build -o bin/watchcat-macos
-env GOOS=windows GOARCH=amd64 go build -o bin/watchcat-win
+env GOOS=linux GOARCH=arm go bui... | bash |
d_bash_6846 | ---
+++
@@ -4,9 +4,11 @@
git clone git@github.com:measurement-factory/functional-text-sandbox.git
cd functional-text-sandbox
+SANDBOX_COMMIT=$(git rev-parse --verify master)
git clone git@github.com:measurement-factory/functional-text.git
cd functional-text
+PARENT_COMMIT=$(git rev-parse --verify master)
npm... | bash |
d_bash_6847 | ---
+++
@@ -1,4 +1,6 @@
#!/bin/sh
+
+BASEDIR=$(dirname "$0")
REALTIMEURL=$1
VICTIMID=$2
@@ -6,6 +8,6 @@
echo "module.exports = {
COMMAND_CONTROL_URL: '${REALTIMEURL}',
VICTIM_ID: '${VICTIMID}'
-};" > config.js
+};" > $BASEDIR/config.js
gulp browserify | bash |
d_bash_6848 | ---
+++
@@ -1,3 +1,3 @@
-BASE16_SHELL=$HOME/.sh_common/vendor/base16-shell/
-[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"
+BASE16_SHELL="$HOME/.sh_common/vendor/base16-shell/"
+[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$("$BASE16_SHELL"/pr... | bash |
d_bash_6849 | ---
+++
@@ -3,7 +3,7 @@
#A .sh file is the OLD way of doing things. In the newest postgres docker images,
#a .sql file can be used instead
-gosu postgres pg_ctl -w start
+gosu postgres pg_ctl -w start -o "-h localhost"
gosu postgres psql <<EOSQL
CREATE DATABASE template_postgis; | bash |
d_bash_6850 | ---
+++
@@ -16,5 +16,12 @@
wget http://archive.cloudera.com/director/redhat/6/x86_64/director/cloudera-director.repo -O /etc/yum.repos.d/cloudera-director.repo
yum -y -e1 -d1 install oracle-j2sdk1.7 cloudera-director-server cloudera-director-client
+cp -pc /etc/cloudera-director-server/application.properties /etc... | bash |
d_bash_6851 | ---
+++
@@ -5,11 +5,12 @@
git diff-index --quiet --cached HEAD && git diff-files --quiet || early_exit
+
cd doc/ && \
echo "Installing gitbook" && \
- npm install && \
+ npm -g install gitbook-cli && \
echo "Building the book" && \
- node_modules/.bin/gitbook build && \
+ gitbook build && ... | bash |
d_bash_6852 | ---
+++
@@ -17,7 +17,7 @@
################################################################################
./autogen.sh
-./configure
+./configure --with-http=no
make -j$(nproc) clean
make -j$(nproc) all
| bash |
d_bash_6853 | ---
+++
@@ -1,15 +1,12 @@
mkdir -p ~/.histsync
for file in {'bash-preexec.sh','histsync-client'}; do
- echo Downloading, $file
curl "http://histsync.io/download-client/$file" > ~/.histsync/$file;
done
-read -p "Github username: " username
-read -p "API key (from histsync.io profile): " key
echo '# Add t... | bash |
d_bash_6854 | ---
+++
@@ -16,6 +16,14 @@
[ -d "$GIT_REPO_PATH/.git" ] ||
error "Can't find a git checkout under $GIT_REPO_PATH ."
cd "$GIT_REPO_PATH"
+
+# The GitHub runner user and the container user might differ making git error
+# out with:
+# error: fatal: detected dubious ownership in repository at '/work'
+# Avoid this ... | bash |
d_bash_6855 | ---
+++
@@ -2,10 +2,14 @@
include logger.Logger
+include string.util.StringUtil
include string.validator.StringValidator
TestExecutor(){
executeTest(){
+ local results_debug=()
+ local results_fail=()
+ local results_pass=()
local testClass=${1}
local path=($(echo ${testClass} | sed "s#\([A-Z]\)... | bash |
d_bash_6856 | ---
+++
@@ -4,3 +4,6 @@
pip3 install --upgrade pip
pip3 install neovim
+
+pip2 install --upgrade pip
+pip2 install neovim | bash |
d_bash_6857 | ---
+++
@@ -30,6 +30,6 @@
fi
sudo hostname $HOSTNAME
-echo "$HOSTNAME" | sudo tee -a /etc/hostname
+echo "$HOSTNAME" | sudo tee /etc/hostname
echo "HOSTNAME=$HOSTNAME" | sudo tee -a /etc/sysconfig/network
echo "$IP $HOSTNAME $HOSTNAME_SHORT" | sudo tee -a /etc/hosts | bash |
d_bash_6858 | ---
+++
@@ -24,8 +24,8 @@
export TEST_DATABASE_URL=postgres://postgres:$POSTGRES_PASSWORD@$database_host:$PGPORT/postgres
-npm install
+yarn
DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up
-npm test
+yarn test
docker stop $HASH
docker rm $HASH | bash |
d_bash_6859 | ---
+++
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/bash -ex
# Tar up the staged release, all the pom files, and some build files. We will use these in
# subsequent build steps to perform the actual release.
@@ -12,3 +12,6 @@
# Output build version into file for later Jenkins items
VERSION=$(egrep -o '<version>.*</... | bash |
d_bash_6860 | ---
+++
@@ -1,6 +1,7 @@
#!/bin/sh
-NECTAR_SERVER_JAR=Nectar-Server-0.4.4-SNAPSHOT.jar
+NECTAR_VERSION=0.4.4
+NECTAR_SERVER_JAR=Nectar-Server-$NECTAR_VERSION-SNAPSHOT.jar
BUILD_NUMBER=0
if [ $# == 0 ]; then
@@ -10,6 +11,6 @@
fi
# Build Deb
-fpm -s dir -t deb -a all -n nectar-server -v 0.4.1 --iteration $BUI... | bash |
d_bash_6861 | ---
+++
@@ -1,4 +1,4 @@
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUPSTREAM=git
-PS1='\[\e[0;92m\]\W\[\e[m\]$(__git_ps1 " (\[\e[0;93m\]%s\[\e[m\])") \$ '
+PROMPT_COMMAND='__git_ps1 "\[\e[0;92m\]\W\[\e[m\]\[\e[0;93m\]" "\[\e[m\] \$ "' | bash |
d_bash_6862 | ---
+++
@@ -1,5 +1,9 @@
#!/bin/bash -x
set -e # exit with nonzero exit code if anything fails
+
+
+# DISABLE document publishing for now
+exit 0
cd $HOME
rm -fr gh-pages | bash |
d_bash_6863 | ---
+++
@@ -38,7 +38,7 @@
chmod +x $buildFile
# Cleanup
- if test ! -d $tempFolder; then
+ if test -d $tempFolder; then
rm -rf $tempFolder
fi
fi | bash |
d_bash_6864 | ---
+++
@@ -1,14 +1,7 @@
#!/usr/bin/env bash
gocode close
sleep 1
-gocode set deny-package-renames true
echo "--------------------------------------------------------------------"
echo "Autocompletion tests..."
echo "--------------------------------------------------------------------"
./run.rb
-cd semantic_re... | bash |
d_bash_6865 | ---
+++
@@ -1,7 +1,7 @@
#! /bin/sh
# Wait for PostgreSQL
-until nc -z -v -w30 $DB_HOST 5432
+until nc -z -v -w30 "$DB_HOST" 5432
do
echo 'Waiting for PostgreSQL...'
sleep 1
@@ -9,7 +9,7 @@
echo "PostgreSQL is up and running"
# Wait for Elasticsearch
-until nc -z -v -w30 $ELASTICSEARCH_HOST 9200
+until ... | bash |
d_bash_6866 | ---
+++
@@ -9,6 +9,8 @@
eval "$(ssh-agent -s)"
chmod 600 deploy_key
ssh-add deploy_key
+
+rm docs/deploy_key.enc
rm deploy_key
git remote remove origin | bash |
d_bash_6867 | ---
+++
@@ -4,19 +4,6 @@
# | Builds all 3rdparty software packages so that the project can then be
# | built on top of them.
# =========================================================================
-
-VERBOSE_BUILD="-q"
-OPTIONS="v"
-while getopts $OPTIONS OPTION
-do
- case $OPTION in
- v)
- VERBOSE_BU... | bash |
d_bash_6868 | ---
+++
@@ -4,25 +4,50 @@
if [[ "${OVERRIDE_JDK}" = 'true' ]] #If Installing Custom JDK
then
+ if uname -a | grep x86_64 >/dev/null;
+ then
+ #64bit arch
+ ARCH_SUFFIX=amd64
+ JVM_LIBS_DIR=/usr/lib/jvm
+ else
+ #32bit arch
+ ARCH_SUFFIX=i386
+ JVM_LIBS_DIR=/usr/l... | bash |
d_bash_6869 | ---
+++
@@ -8,7 +8,7 @@
exit 1
fi
-for filename in "$1"; do
- transmission-remote --authenv --add "filename"
- rm "filename"
+for filename in "$1"*.torrent; do
+ transmission-remote --authenv --add "$filename"
+ rm "$filename"
done | bash |
d_bash_6870 | ---
+++
@@ -3,7 +3,8 @@
set -e
set -x
-version=$(python setup.py --version | sed 's/\.dev.*//')
+version="$1"
+[ -z "$version"] && version=$(python setup.py --version | sed 's/\.dev.*//')
status=$(git status -sz | grep -v '\.eggs/' | xargs)
[ -z "$status" ] || false | bash |
d_bash_6871 | ---
+++
@@ -7,11 +7,16 @@
echo "Running command: '${CMD}'"
$CMD
-# TODO(SamYaple): This has the potential for a race condition triggered by a
-# config reload that could cause the container to exit
-while [[ -e "/proc/$(cat /run/haproxy.pid)" ]]; do
+retry=0
+# The loop breaks only when haproxy.pi... | bash |
d_bash_6872 | ---
+++
@@ -10,13 +10,20 @@
# if the proxy is around, use it
nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123"
+export PATH="/usr/local/bin:$PATH"
+
gem install json_pure -v '~> 1.0' --no-ri --no-rdoc
gem install puppet -v '~> 3.0' --no-ri --no-rdoc
gem install fpm -v '~> 0.4.0' --no-ri... | bash |
d_bash_6873 | ---
+++
@@ -6,7 +6,7 @@
ROOT=$(dirname $0)
pushd ${ROOT}/.. > /dev/null
-if [[ $(uname-a ) == Darwin* ]]; then
+if [[ $(uname -a) == Darwin* ]]; then
SED="sed -i ''"
else
SED="sed -i" | bash |
d_bash_6874 | ---
+++
@@ -3,8 +3,9 @@
alias rakk="spring rake"
alias rc="bundle exec rails c"
alias cdb="cd /Developer/betterplace"
-alias cdc="cd /Developer/provisioning/chef-repo"
alias cda="cd /Developer/provisioning/betterplace-provisioning"
alias cde="cd /Developer/epo"
+alias cdx="cd /Developer/xform"
+alias cdc="cd /De... | bash |
d_bash_6875 | ---
+++
@@ -1,6 +1,6 @@
#!/bin/bash
-export remote_command="/usr/bin/ssh -i /keys/infrastructure.pem ubuntu@birt.eha.io "
+export remote_command="/usr/bin/ssh ubuntu@birt.eha.io "
#Make sure repo is up to date
$remote_command "cd /opt/infrastructure && git pull" | bash |
d_bash_6876 | ---
+++
@@ -23,7 +23,7 @@
cd tmp
-for file in $( find . -type f -perm +111 -maxdepth 1 -name "ssoca-*-$version-*" | cut -c3- | sort ); do
+for file in $( find . -maxdepth 1 -type f -perm -111 -name "ssoca-*-$version-*" | cut -c3- | sort ); do
echo "$file"
meta4 import-file --metalink="$metalink_path" --f... | bash |
d_bash_6877 | ---
+++
@@ -26,6 +26,6 @@
done
for f in stuff/settings.py; do
- replace BASEDIR "'$PWD/stuff'" $f
+ replace BASEDIR "'$PWD'" $f
done
| bash |
d_bash_6878 | ---
+++
@@ -14,7 +14,7 @@
--exclude='**/index.adoc' \
--exclude='**/attributes.adoc' \
../target/asciidoc/generated/ \
- target/web-site/_generated-config
+ target/web-site/_generated-config/latest
echo "Sync done!"
echo "==========" | bash |
d_bash_6879 | ---
+++
@@ -5,7 +5,7 @@
SEL_FG={{ fgc_nohash }}
TXT_BG={{ n_black_nohash }}
TXT_FG={{ fgc_nohash }}
-MENU_BG={{ n_white_nohash }}
-MENU_FG={{ n_black_nohash }}
+MENU_BG={{ bgc_nohash }}
+MENU_FG={{ fgc_nohash }}
BTN_BG={{ b_black_nohash }}
BTN_FG={{ fgc_nohash }} | bash |
d_bash_6880 | ---
+++
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
set -Eeu -o pipefail
+# This is currently erroring out if LLVM 7 is installed.
+
# https://github.com/JuliaLang/julia/blob/master/doc/build/build.md
# https://github.com/JuliaLang/julia/blob/master/doc/build/linux.md
-
-# This is currently erroring out if LLVM 7 is ... | bash |
d_bash_6881 | ---
+++
@@ -4,3 +4,6 @@
docker-bootstrap(){
docker -H unix:///var/run/system-docker.sock "$@"
}
+docker-rm-stopped(){
+ docker rm $(docker ps --filter status=exited -q)
+} | bash |
d_bash_6882 | ---
+++
@@ -1,3 +1,5 @@
+#!/bin/bash
+
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#!/bin/bash
set -e
if [ $# -lt 3 ]; then | bash |
d_bash_6883 | ---
+++
@@ -6,7 +6,7 @@
echo "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u282b08.tar.gz"
;;
java11)
- echo "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.9.1_1... | bash |
d_bash_6884 | ---
+++
@@ -5,7 +5,7 @@
echo "I am a Mac. Brew installing stuff."
echo "Don't worry about warnings of things already installed."
brew install --upgrade glib
- brew install libsoup yajl
+ brew install libsoup yajl libusb
;;
*linux*)
echo "I am some kind ... | bash |
d_bash_6885 | ---
+++
@@ -33,12 +33,14 @@
if test -f $1+$platform.$suffix; then
found=true
echo $1+$platform.$suffix
+ exit
fi
done
if test "x$found" = "x"; then
if test -f $1.$suffix; then
found=true
echo $1.$suffix
+ exit
fi
fi
done | bash |
d_bash_6886 | ---
+++
@@ -3,7 +3,7 @@
#SBATCH -N 1
#SBATCH -t 5:00:00
#SBATCH -J pbzip2
-#SBATCH -A YOUR_PROJECT_OR_QUEUE
+#SBATCH -A project_id
#SBATCH --mail-user=YOURMAIL@example.com
#SBATCH --mail-type=ALL
@@ -12,22 +12,28 @@
# ... using all cores with pbzip2
function usage {
- echo "Usage: compress_pbzip2.sh [d... | bash |
d_bash_6887 | ---
+++
@@ -5,12 +5,12 @@
OS_ID=$(. /etc/os-release; echo "$ID"); readonly OS_ID
echo 'Install ripgrep'
-if [[ $(uname -m) == 'aarch64' ]]; then
- echo 'ripgrep is not yet available as an ARM binary.'
- exit 0
-fi
case $OS_ID in
ol)
+ if [[ $(uname -m) == 'aarch64' ]]; then
+ echo 'ripgrep is not ye... | bash |
d_bash_6888 | ---
+++
@@ -2,6 +2,15 @@
set -v # print commands as they're executed
set -e # fail and exit on any command erroring
+
+function setup_env() {
+ local py_version=$1
+ local venv_path="tfds_env_${py_version}"
+ virtualenv -p $py_version $venv_path
+ source $venv_path/bin/activate
+ pip install -q --upgrade s... | bash |
d_bash_6889 | ---
+++
@@ -7,8 +7,8 @@
mpc stop
fi
-AIRPLAY=`netstat -atunp | grep ESTABLISHED | grep 5002`
-UPNP=`netstat -atunp | grep gmediarender | grep "CLOSE_WAIT\|ESTABLISHED"`
+AIRPLAY=$(netstat -atunp | grep ESTABLISHED | grep 5002)
+UPNP=$(netstat -atunp | grep gmediarender | grep "CLOSE_WAIT\|ESTABLISHED")
if [ ... | bash |
d_bash_6890 | ---
+++
@@ -32,7 +32,9 @@
# Add rbenv to PATH.
export PATH="$HOME/.rbenv/bin:$PATH"
- eval "$(rbenv init -)"
+ if hash rbenv &> /dev/null; then
+ eval "$(rbenv init -)"
+ fi
# And set the editor as MacVim if available, vim if not. | bash |
d_bash_6891 | ---
+++
@@ -24,11 +24,11 @@
UTILITIES="tree curl"
echo "Install dependencies: Begin"
-apt-get -y install $DEPENDENCIES
+sudo apt-get -y install $DEPENDENCIES
echo "Install dependencies: End"
echo "Install utilities: Begin"
-apt-get -y install $UTILITIES
+sudo apt-get -y install $UTILITIES
echo "Install util... | bash |
d_bash_6892 | ---
+++
@@ -5,6 +5,8 @@
include string.util.StringUtil
include string.validator.StringValidator
+
+include system.validator.SystemValidator
FileUtil(){
construct(){
@@ -48,5 +50,15 @@
done
}
+ open(){
+ if [[ $(SystemValidator isLinux) ]]; then
+ local cmd=open
+ elif [[ $(SystemValidator isWindow... | bash |
d_bash_6893 | ---
+++
@@ -1,8 +1,7 @@
#!/bin/sh
-`docker ps | grep 'hour ago' | awk '{print $1}' | xargs docker kill` > /dev/null
-`docker ps | grep 'hours ago' | awk '{print $1}' | xargs docker kill` > /dev/null
-`docker ps | grep 'day ago' | awk '{print $1}' | xargs docker kill` > /dev/null
-`docker ps | grep 'days ago' | awk... | bash |
d_bash_6894 | ---
+++
@@ -2,7 +2,7 @@
function llvm_download() {
# Get the sources
- wget http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.tar.xz
+ wget http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz
mkdir llvm-${LLVM_VERSION}
tar xf llvm-${LLVM_VERSION}.tar.xz -C llvm... | bash |
d_bash_6895 | ---
+++
@@ -5,10 +5,27 @@
chown -R git /home/git/.ssh
fi
+if [ ! -d /root/paus/config ]; then
+ mkdir -p /root/paus/config
+fi
+
if [ -n "$PAUS_BASE_DOMAIN" ]; then
- echo $PAUS_BASE_DOMAIN > /base-domain
+ echo $PAUS_BASE_DOMAIN > /root/paus/config/BaseDomain
else
- echo "example.com" > /base-domain
+ e... | bash |
d_bash_6896 | ---
+++
@@ -1,7 +1,7 @@
#!/bin/bash
mkdir -p /var/log/cobbler/{anamon,kicklog,syslog,tasks}
-#reset authorized_keys file so puppet can a write new one
+# reset authorized_keys file so puppet can a write new one
rm -f /etc/cobbler/authorized_keys
# Make sure services are not running (no pids, etc), puppet will... | bash |
d_bash_6897 | ---
+++
@@ -4,6 +4,8 @@
echo "Usage: $0 <database> <table> [<column>]"
exit 1
fi
+
+. `dirname $0`/run_in_docker.inc
DATABASE=$1
TABLE=$2
@@ -19,5 +21,5 @@
export PGDATABASE=$DATABASE
cat<<EOF | psql
-SELECT ST_AsGeoJSON(ST_EXTENT("$COL"::geometry)) FROM "$TABLE";
+SELECT ST_EXTENT("$COL"::geometry) FROM... | bash |
d_bash_6898 | ---
+++
@@ -12,12 +12,12 @@
"tmuxinator"
)
-if test ! $(which rbenv) ; then
+if ! $(command -v rbenv >/dev/null 2>&1) ; then
echo " Installing rbenv for you."
brew install rbenv > /tmp/rbenv-install.log
fi
-if test ! $(which ruby-build) ; then
+if ! $(command -v ruby-build >/dev/null 2>&1) ; then
e... | bash |
d_bash_6899 | ---
+++
@@ -15,6 +15,9 @@
alias pkg="sudo pkg"
+#directories
+function localetc() { cddir /usr/local/etc "$1"; a; }
+
#nginx
alias nginx="sudo service nginx"
| bash |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.