Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add input method and ctags pkg.
#!/bin/sh sudo apt-get install vim git tmux zsh build-essential gitk git-gui curl docky screen dos2unix tree sudo apt-get install texlive-science texlive-publishers texlive-math-extra texlive-bibtex-extra latex-beamer texlive-xetex texlive-lang-cjk
#!/bin/sh sudo apt-get install vim git tmux zsh build-essential gitk git-gui curl docky screen dos2unix tree exuberant-ctags ibus-sunpinyin sudo apt-get install texlive-science texlive-publishers texlive-math-extra texlive-bibtex-extra latex-beamer texlive-xetex texlive-lang-cjk
Add deploy commandline for vesselinfo upload
#!/bin/bash # Clone the repo git clone --recursive git@github.com:SkyTruth/pelagos.git # Initialize GAE virutalenv #TODO: Put this into a script in the pelagos repo virtualenv pelagos/gae/virtualenvloader/gaevirtualenv source pelagos/gae/virtualenvloader/gaevirtualenv/bin/activate pip install -r pelagos/gae-requireme...
#!/bin/bash # Clone the repos git clone --recursive git@github.com:SkyTruth/pelagos.git git clone --recursive git@github.com:SkyTruth/pelagos-data.git # Initialize GAE virutalenv #TODO: Put this into a script in the pelagos repo virtualenv pelagos/gae/virtualenvloader/gaevirtualenv source pelagos/gae/virtualenvloader...
Exit immediately if a command exits with a non-zero status
#!/usr/bin/env bash # # Script to initialize angular app # @log startup time START_SERVER_TEIM=$(date +%s) rm -rf app # copy doc directory if [ "$APP_ENV" = "development" ]; then # save symlinks ln -s build/docs app else # resolve symlinks cp -Lr build/docs app fi # copy javascript files cp build/*.js app/ ...
#!/usr/bin/env bash # # Script to initialize angular app set -e # @log startup time START_SERVER_TEIM=$(date +%s) rm -rf app # copy doc directory if [ "$APP_ENV" = "development" ]; then # save symlinks ln -s build/docs app else # resolve symlinks cp -Lr build/docs app fi # copy javascript files cp build/*.j...
Remove debugging from simple starter
#!/usr/bin/env bash set -ex echo "Starting nginx .. " nginx -p `pwd` -c static_server/nginx.conf echo "nginx started" function stop_nginx { echo "Stopping nginx .. " kill "$(cat /tmp/nginx.pid)" echo "nginx Stopped" } && trap stop_nginx EXIT echo "Start initial build" jekyll build echo "Starting trackin...
#!/usr/bin/env bash set -e echo "Starting nginx .. " nginx -p `pwd` -c static_server/nginx.conf echo "nginx started" function stop_nginx { echo "Stopping nginx .. " kill "$(cat /tmp/nginx.pid)" echo "nginx Stopped" } && trap stop_nginx EXIT echo "Start initial build" jekyll build echo "Starting tracking...
Use this branch name for now
#!/usr/bin/env bash -e cd $APPCENTER_SOURCE_DIRECTORY ############################## ### Deploy Xcode extension ### ############################## if [ "$APPCENTER_BRANCH" == "master" ]; then appcenter \ build queue \ --app quicktype/quicktype-xcode \ --branch master \ --token $AP...
#!/usr/bin/env bash -e cd $APPCENTER_SOURCE_DIRECTORY ############################## ### Deploy Xcode extension ### ############################## if [ "$APPCENTER_BRANCH" == "appcenter" ]; then appcenter \ build queue \ --app quicktype/quicktype-xcode \ --branch master \ --token ...
Add header; restore PDF creation
#!/bin/bash set -eu if [[ ${#*} != 1 ]] then echo "Provide MODE!" exit 1 fi MODE=$1 # JWPLOT: https://github.com/jmjwozniak/jwplot jwplot $MODE.{cfg,eps,data} # convert $MODE.{eps,pdf}
#!/bin/bash set -eu # PLOT SH # Wraps JWPLOT, EPS->PDF conversion # Provide a MODE: load or rate if [[ ${#*} != 1 ]] then echo "Provide MODE!" exit 1 fi MODE=$1 # JWPLOT: https://github.com/jmjwozniak/jwplot jwplot $MODE.{cfg,eps,data} convert $MODE.{eps,pdf}
Stop devtest job to see if we can get the mapview jobs running more timely
#!/usr/bin/env bash # 2017-05-09 ND: Add second query and destination .json file to output # for `mapview_24h_clustered_devtest.sql` source db_settings.env psql -f mapview_schema.sql psql -f mapview_24h_processing.sql psql -q -f mapview_24h_clustered.sql |\ aws s3 cp - "${EXPORT_TARGET}"/json/view24h...
#!/usr/bin/env bash # 2017-05-09 ND: Add second query and destination .json file to output # for `mapview_24h_clustered_devtest.sql` source db_settings.env psql -f mapview_schema.sql psql -f mapview_24h_processing.sql psql -q -f mapview_24h_clustered.sql |\ aws s3 cp - "${EXPORT_TARGET}"/json/view24h...
Add pip --user paths to PATH
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- # vim:set expandtab tabstop=2 fenc=utf-8 fileformat=unix filetype=sh: # extend $PATH if [ -d ${HOME}/.local/bin ]; then PATH="${HOME}/.local/bin:${PATH}" fi if [ -d ${HOME}/.composer/vendor/bin ]; then PATH="${HOME}/.composer/vendor/bin:${PATH...
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- # vim:set expandtab tabstop=2 fenc=utf-8 fileformat=unix filetype=sh: # extend $PATH if [ -d ${HOME}/.local/bin ]; then PATH="${HOME}/.local/bin:${PATH}" fi if [ -d ${HOME}/.composer/vendor/bin ]; then PATH="${HOME}/.composer/vendor/bin:${PATH...
Fix name of sms_conv tag in wikipedia tag mangling script (review by @jerith).
#!/bin/bash if [ $# -ne 3 ]; then echo "usage:" echo " $0 <user email> <USSD conv key> <SMS conv key>" exit 1 fi email_address="$1" ussd_conv="CONVERSATION:wikipedia_ussd:$2" sms_conv="TRANSPORT_TAG:wikipedia_sms:$3" . $(dirname $0)/mangle_routing_table_utils.sh assert_routing_exists $ussd_conv assert_...
#!/bin/bash if [ $# -ne 3 ]; then echo "usage:" echo " $0 <user email> <USSD conv key> <SMS conv key>" exit 1 fi email_address="$1" ussd_conv="CONVERSATION:wikipedia_ussd:$2" sms_conv="CONVERSATION:wikipedia_sms:$3" . $(dirname $0)/mangle_routing_table_utils.sh assert_routing_exists $ussd_conv assert_r...
Fix location of sphinx directory
#!/usr/bin/env bash set -e #------------------------------------------------------------------------------- # Make SRPM to get a list of build dependencies #------------------------------------------------------------------------------- git submodule update --init --recursive ./packaging/make-srpm.sh dnf builddep -y b...
#!/usr/bin/env bash set -e #------------------------------------------------------------------------------- # Make SRPM to get a list of build dependencies #------------------------------------------------------------------------------- git submodule update --init --recursive ./packaging/make-srpm.sh dnf builddep -y b...
Support lancet completion when using shell integration
if [ -z "$LANCET_BIN" ]; then LANCET_BIN=$(which lancet); fi function lancet_helper() { export LANCET_SHELL_HELPER=$(mktemp -u -t lancet_) $LANCET_BIN $@ if [ $? -a -f $LANCET_SHELL_HELPER ] ; then source $LANCET_SHELL_HELPER fi rm -f $LANCET_SHELL_HELPER unset LANCET_SHELL_HELPER } al...
if [ -z "$LANCET_BIN" ]; then LANCET_BIN=$(which lancet); fi function lancet_helper() { export LANCET_SHELL_HELPER=$(mktemp -u -t lancet_) $LANCET_BIN $@ if [ $? -a -f $LANCET_SHELL_HELPER ] ; then source $LANCET_SHELL_HELPER fi rm -f $LANCET_SHELL_HELPER unset LANCET_SHELL_HELPER } co...
Package man page and LICENSE with executable
# Build script shamelessly stolen from ripgrep :) cargo build --target $TARGET --release build_dir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp) out_dir=$(pwd) name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}" mkdir "$build_dir/$name" cp target/$TARGET/release/watchexec "$build_dir/$name/" pushd $build_dir tar czf "$ou...
# Build script shamelessly stolen from ripgrep :) cargo build --target $TARGET --release build_dir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp) out_dir=$(pwd) name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}" mkdir "$build_dir/$name" cp target/$TARGET/release/watchexec "$build_dir/$name/" cp {doc/watchexec.1,LICENSE} "...
Update Shebang in Linux Wrapper Script to /usr/bin/env bash
#!/bin/bash export SRC_DIR=$(cd "$(dirname "$0")"; pwd) $SRC_DIR/__AUTO_UPDATE_BUNDLE__/exo_browser/exo_browser \ --raw $SRC_DIR/__AUTO_UPDATE_BUNDLE__/breach_core
#!/usr/bin/env bash export SRC_DIR=$(cd "$(dirname "$0")"; pwd) $SRC_DIR/__AUTO_UPDATE_BUNDLE__/exo_browser/exo_browser \ --raw $SRC_DIR/__AUTO_UPDATE_BUNDLE__/breach_core
Move actual monit calls to outside the loop, as it seems the stop commands repeatedly put the tasks to "pending"
#!/bin/bash for x in {0..120} do echo -n "." # DEPRECATED: should be removed in the near future sudo monit stop recalculate > /dev/null 2>&1 # When monit is already busy quiting OR starting, it can throw an error message: # monit: action failed -- Other action already in progress -- please try again later ...
#!/bin/bash # DEPRECATED: should be removed in the near future sudo monit stop recalculate > /dev/null 2>&1 # When monit is already busy quiting OR starting, it can throw an error message: # monit: action failed -- Other action already in progress -- please try again later # We don't care for that message, so we just...
Fix for version.txt creation on linux
#!/bin/sh if [ -z "$1" ] then echo "$0 <outpath>" elif which -s svn then if [ -d .svn ] then LC_ALL=C svn info >"$1/version.txt" else REL=$(basename $PWD) echo "Version: $REL" >$1/version.txt fi fi
#!/bin/sh if [ -z "$1" ] then echo "$0 <outpath>" elif which svn >/dev/null then if [ -d .svn ] then LC_ALL=C svn info >"$1/version.txt" else REL=$(basename $PWD) echo "Version: $REL" >$1/version.txt fi fi
Update script with directory option
#!/bin/bash function deploy_proxy { if hash apigeetool 2>/dev/null; then printf "\n\nUsing apigeetool to deploy the proxy to the $env environment in the $org org...\n\n" apigeetool deployproxy -o $org -e $env -n learn-edge -L $url -u $username -p $password -V printf "\nIf 'State: deployed', th...
#!/bin/bash function deploy_proxy { if hash apigeetool 2>/dev/null; then printf "\n\nUsing apigeetool to deploy the proxy to the $env environment in the $org org...\n\n" apigeetool deployproxy -o $org -e $env -n learn-edge -L $url -u $username -d . -p $password -V printf "\nIf 'State: deployed...
Configure /data as a persisted directory.
#!/bin/bash # Copyright (C) 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
#!/bin/bash # Copyright (C) 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Add file completion as optional argument
# ------------------------------------------------------------------------------ # FILE: n98-magerun.plugin.zsh # DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin # AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com) # VERSION: 1.0.0 # ------------------------------------------------------...
# ------------------------------------------------------------------------------ # FILE: n98-magerun.plugin.zsh # DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin # AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com) # VERSION: 1.0.0 # ------------------------------------------------------...
Add sc-launch as a shortcut for start & enable
user_commands=( list-units is-active status show help list-unit-files is-enabled list-jobs show-environment) sudo_commands=( start stop reload restart try-restart isolate kill reset-failed enable disable reenable preset mask unmask link load cancel set-environment unset-environment) for c in $user_commands;...
user_commands=( list-units is-active status show help list-unit-files is-enabled list-jobs show-environment) sudo_commands=( start stop reload restart try-restart isolate kill reset-failed enable disable reenable preset mask unmask link load cancel set-environment unset-environment) for c in $user_commands;...
Remove /etc/salt/pki/minion/minion_master.pub when switching masters
#!/bin/sh LM=$(cat /etc/susecon2017/local_master) sed -i "s/^master.*\$/master: $LM/" /etc/salt/minion.d/ceph.conf
#!/bin/sh LOCAL_MASTER=$(cat /etc/susecon2017/local_master) sed -i "s/^master.*\$/master: $LOCAL_MASTER/" /etc/salt/minion.d/ceph.conf rm -f /etc/salt/pki/minion/minion_master.pub
Correct user changement in boot script
#!/bin/bash USER=pi TVJS_REPO=https://github.com/SamyPesse/tv.js.git TVJS_DIR="/home/${USER}/tv.js" OUT="/home/${USER}/tvjs.log" case "$1" in update) echo "updating tv.js from $TVJS_REPO" rm -rf $TVJS_DIR mkdir $TVJS_DIR git clone $TVJS_REPO $TVJS_DIR cd $TVJS_DIR rake install > $OUT 2>$OUT & rake build > $O...
#!/bin/bash USER=pi TVJS_REPO=https://github.com/SamyPesse/tv.js.git TVJS_DIR="/home/${USER}/tv.js" OUT="/home/${USER}/tvjs.log" case "$1" in update) echo "updating tv.js from $TVJS_REPO" su - $USER rm -rf $TVJS_DIR mkdir $TVJS_DIR git clone $TVJS_REPO $TVJS_DIR cd $TVJS_DIR rake install > $OUT 2>$OUT & rak...
Extend Newton comparison (different skip factors)
#!/bin/sh LOOPS="$1" shift [ -z "$LOOPS" ] && exit 1 run_measure() { echo "$1" shift ./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//' } run_measure "Without any agent" run_measure "With bare agent" --std-agent-bare run_measure "With agent, without measuring" --std-agent=no-measuring run_meas...
#!/bin/sh LOOPS="$1" shift [ -z "$LOOPS" ] && exit 1 run_measure() { echo "$1" shift ./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//' } run_measure "Without any agent" run_measure "With bare agent" --std-agent-bare run_measure "With agent, without measuring" --std-agent=no-measuring run_meas...
Remove PUPPET_MAJ_VERSION check for unit modules
#!/bin/bash # # This script is used by Puppet OpenStack modules to prepare # modules before running dependencies. # set -ex if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ export PATH=${PATH}:${GEM_BIN_DIR} fi if [ "${PUPPET_MAJ_VERSION}" = 4 ]; then export PUPPET_BASE_PATH=/etc/puppetlabs/code ...
#!/bin/bash # # This script is used by Puppet OpenStack modules to prepare # modules before running dependencies. # set -ex if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ export PATH=${PATH}:${GEM_BIN_DIR} fi export PUPPET_BASE_PATH=/etc/puppetlabs/code export SCRIPT_DIR=$(cd `dirname $0` && pwd ...
Deploy sqlplus code to all dbs, including EGRNARLS
#!/bin/bash # Copyright [2009-2014] EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
#!/bin/bash # Copyright [2009-2014] EMBL-European Bioinformatics Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
Add evaluation using moses bleu script
#!/bin/sh MODEL=$1 INPUT='/u/vineeku6/storage/train-data/ellipsis/unk-200-v2/valid_src.txt' GOLD='/u/vineeku6/storage/train-data/ellipsis/unk-200-v2/valid_target.txt' OUT=out-$MODEL.txt python translate_all.py $MODEL.npz $INPUT $OUT python convert_symbols.py $INPUT $OUT python report.py $INPUT $OUT $GOLD $MODEL
#!/bin/sh MODEL=$1 INPUT='/u/vineeku6/storage/train-data/ellipsis/raw-5/valid_src.txt' GOLD='/u/vineeku6/storage/train-data/ellipsis/raw-5/valid_target.txt' OUT=out-$MODEL.txt python translate_all.py $MODEL.npz $INPUT $OUT --all #python translate_all.py $MODEL.npz $INPUT $OUT python convert_symbols.py $INPUT $OUT ./m...
Move mount path to a variable
#!/bin/sh -eux SSH_USER="${SSH_USERNAME:-vagrant}" SSH_USER_HOME="${SSH_USER_HOME:-/home/${SSH_USER}}" case "$PACKER_BUILDER_TYPE" in virtualbox-iso|virtualbox-ovf) echo "==> Installing VirtualBox guest additions" VER=$(cat "$SSH_USER_HOME"/.vbox_version) ISO="VBoxGuestAdditions_$VER.iso"; mkdir -p /t...
#!/bin/sh -eux SSH_USER="${SSH_USERNAME:-vagrant}" SSH_USER_HOME="${SSH_USER_HOME:-/home/${SSH_USER}}" case "$PACKER_BUILDER_TYPE" in virtualbox-iso|virtualbox-ovf) echo "==> Installing VirtualBox guest additions" VER=$(cat "$SSH_USER_HOME"/.vbox_version) ISO="VBoxGuestAdditions_$VER.iso"; MOUNT_PATH=...
Add some prompt info when starting swap instance.
#!/bin/sh SSDB_CFG=ssdb.conf.template REDIS_CFG=redis.conf.template SSDB=../../../build/ssdb-server REDIS=../../../build/redis-server if [ -n "$1" ];then REDISPORT=$1 else REDISPORT=6379 fi DIR=./tmp/${REDISPORT}_dir cleanup(){ killall -9 ssdb-server killall -9 redis-server rm -r $DIR } prepare_...
#!/bin/sh SSDB_CFG=ssdb.conf.template REDIS_CFG=redis.conf.template SSDB=../../../build/ssdb-server REDIS=../../../build/redis-server if [ -n "$1" ];then REDISPORT=$1 else REDISPORT=6379 fi DIR=./tmp/${REDISPORT}_dir prepare_dir() { mkdir -p $DIR cp $SSDB_CFG $REDIS_CFG $DIR } startSSDBServer(){ ...
Add a notice to PHPUnit saying it'll take a while
#!/bin/bash echo "Installing Pear" yum install -y php-pear echo "Adding Pear channels" pear channel-discover pear.phpunit.de pear channel-discover pear.symfony.com echo "Installing PHPUnit" pear install phpunit/PHPUnit echo "PHPUnit and Pear installed"
#!/bin/bash echo "Installing Pear" yum install -y php-pear echo "Adding Pear channels" pear channel-discover pear.phpunit.de pear channel-discover pear.symfony.com echo "Installing PHPUnit - note this might take a while" pear install phpunit/PHPUnit echo "PHPUnit and Pear installed"
Rewrite the script to be sourced instead
#!/bin/bash # Install a custom Go version, https://golang.org/ # # Add at least the following environment variables to your project configuration # (otherwise the defaults below will be used). # * GO_VERSION # # Include in your builds via # \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/...
#!/bin/bash # Install a custom Go version, https://golang.org/ # # Add at least the following environment variables to your project configuration # (otherwise the defaults below will be used). # * GO_VERSION # # Include in your builds via # \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/...
Fix to shell script. Now it works like Makefile
#!/bin/sh RESULT_DIR="result" OUTPUT_DIR="../temp" FILE="thesis" mkdir $RESULT_DIR cd tex mkdir $OUTPUT_DIR pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex bibtex $OUTPUT_DIR/${FILE}.aux makeindex $OUTPUT_DIR/${FILE}.idx pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -inte...
#!/bin/sh RESULT_DIR="../result" OUTPUT_DIR="../temp" FILE="thesis" cd tex mkdir $RESULT_DIR mkdir $OUTPUT_DIR cp literatur.bib $OUTPUT_DIR pdflatex -output-directory="$OUTPUT_DIR" -synctex=1 -interaction=nonstopmode ${FILE}.tex cd $OUTPUT_DIR bibtex ${FILE}.aux makeindex ${FILE}.idx cd ../tex pdflatex -output-directo...
Stop execution of tests when a container step fails
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${SCRIPT_DIR}" find . -type d -mindepth 2 -path "*/dockerfiles/*" | sort --reverse | while read directory; do echo "Running ${directory}" && pushd "${directory}" && bash "1_build.sh" && bash "2_start.sh" && bash "3_test.sh" && ...
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${SCRIPT_DIR}" find . -type d -mindepth 2 -path "*/dockerfiles/*" | sort --reverse | while read directory; do printf '=%.0s' {1..80} echo -e "\nRunning ${directory}" pushd "${directory}" bash "1_build.sh" if [[ $? -ne 0 ]]; then ...
Revert "Version numbers are weird."
#!/bin/bash # Shell script for installing hyper's dependencies on Travis. In particular, # this upgrades the OpenSSL version used on Travis. set -e set -x sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl1.0.0 libcrypto1.0.0 pip instal...
#!/bin/bash # Shell script for installing hyper's dependencies on Travis. In particular, # this upgrades the OpenSSL version used on Travis. set -e set -x sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl libcrypto pip install . pip in...
Update RabbitMQ recipe (docker container creation)
#!/usr/bin/env bash echo "\033[92m# Creating Redis container \033[0m" docker run --name redis-store -d -p 6379:6379 redis echo "\033[92m# Creating PostgreSQL container \033[0m" docker run --name postgres-store -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=$DATABASE_PASSWORD -p 5432:5432 postgres echo "\033[92m# Cr...
#!/usr/bin/env bash echo "\033[92m# Creating Redis container \033[0m" docker run --name redis-store -d -p 6379:6379 redis echo "\033[92m# Creating PostgreSQL container \033[0m" docker run --name postgres-store -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=$DATABASE_PASSWORD -p 5432:5432 postgres echo "\033[92m# Cr...
Increase limit of handled builds 2 -> 20 for buildbot logs uploader
#! /bin/bash # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Runs a single instance of the log uploader. # invocation: upload_runner.sh <master name> # This script is intended to be run from cron. UPLOA...
#! /bin/bash # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Runs a single instance of the log uploader. # invocation: upload_runner.sh <master name> # This script is intended to be run from cron. UPLOA...
Add code for variable replacement on build time
#!/usr/bin/env bash if ! [[ -f ./.env ]]; then cp .env.dist .env; fi export myUID=`id -u ${whoami}` export myGID=`id -g ${whoami}` export myIP=`ifconfig $(netstat -rn | grep -E "^default|^0.0.0.0" | head -1 | awk '{print $NF}') | grep 'inet ' | awk '{print $2}' | grep -Eo '([0-9]*\.){3}[0-9]*'` cp src/main/resources/...
#!/usr/bin/env bash if ! [[ -f ./.env ]]; then cp .env.dist .env; fi export myUID=`id -u ${whoami}` export myGID=`id -g ${whoami}` export myIP=`ifconfig $(netstat -rn | grep -E "^default|^0.0.0.0" | head -1 | awk '{print $NF}') | grep 'inet ' | awk '{print $2}' | grep -Eo '([0-9]*\.){3}[0-9]*'` cp docker/solr/Docke...
Reduce hermes build box noise with sleep OPS-4107
#!/bin/bash # This is only relevant for AWS instances, and shouldnt be added or run otherwise. # This script exists because when we build amis we take a snapshot and when we take this snapshot # the best practice is to reboot the instance since if you do not do this reboot the instance's # file system integrity cannot...
#!/bin/bash # This is only relevant for AWS instances, and shouldnt be added or run otherwise. # This script exists because when we build amis we take a snapshot and when we take this snapshot # the best practice is to reboot the instance since if you do not do this reboot the instance's # file system integrity cannot...
Change setup ansible clone url to use https
#!/bin/bash sudo apt-get -y install git python-pip sudo pip install jinja2 u=$(whoami) g=$(groups | awk '{print $1}') mkdir -p /opt/stack || (sudo mkdir -p /opt/stack && sudo chown $u:$g /opt/stack) cd /opt/stack if [ ! -d ansible ]; then git clone git://github.com/ansible/ansible.git --recursive else cd an...
#!/bin/bash sudo apt-get -y install git python-pip sudo pip install jinja2 u=$(whoami) g=$(groups | awk '{print $1}') mkdir -p /opt/stack || (sudo mkdir -p /opt/stack && sudo chown $u:$g /opt/stack) cd /opt/stack if [ ! -d ansible ]; then git clone https://github.com/ansible/ansible.git --recursive else cd ...
Update script to add opbeat releases
#!/bin/bash cd /home/deploy/Env/logtacts/ source bin/activate cd /home/deploy/logtacts/ git pull --rebase pip install -r requirements.txt kill -HUP `cat /tmp/logtacts-master.pid`
#!/bin/bash cd /home/deploy/Env/logtacts/ source bin/activate cd /home/deploy/logtacts/ source .env git pull --rebase pip install -r requirements.txt kill -HUP `cat /tmp/logtacts-master.pid` curl https://intake.opbeat.com/api/v1/organizations/$OPBEAT_ORG_ID/apps/$OPBEAT_APP_ID/releases/ \     -H "Authorization: Bearer ...
Install boxkeeper SSH keys when provisioning
#!/bin/bash set -e set -u set -x KEEPER_USERNAME="boxkeeper" RETURN_DIR=$(pwd) if id -u "$KEEPER_USERNAME" >/dev/null 2>&1; then echo -n "User '$KEEPER_USERNAME' already exists... skipping" else echo -n "Creating '$KEEPER_USERNAME' user..." useradd -G wheel $KEEPER_USERNAME echo "$KEEPER_USERNAME:va...
#!/bin/bash set -e set -u set -x KEEPER_USERNAME="boxkeeper" KEEPER_HOMEDIR="/home/$KEEPER_USERNAME" KEEPER_SSHDIR="$KEEPER_HOMEDIR/.ssh" KEEPER_KEYS="$KEEPER_SSHDIR/authorized_keys" RETURN_DIR=$(pwd) if id -u "$KEEPER_USERNAME" >/dev/null 2>&1; then echo -n "User '$KEEPER_USERNAME' already exists... skipping" ...
Use dotnet to push package
echo "Deploying DnDGen.EventGen to NuGet" ApiKey=$1 Source=$2 echo "Nuget Source is $Source" echo "Nuget API Key is $ApiKey (should be secure)" echo "Pushing DnDGen.EventGen" nuget push ./DnDGen.EventGen/bin/Release/DnDGen.EventGen.*.nupkg -Verbosity detailed -ApiKey $ApiKey -Source $Source
echo "Deploying DnDGen.EventGen to NuGet" ApiKey=$1 Source=$2 echo "Nuget Source is $Source" echo "Nuget API Key is $ApiKey (should be secure)" echo "Pushing DnDGen.EventGen" dotnet nuget push ./DnDGen.EventGen/bin/Release/DnDGen.EventGen.*.nupkg -v normal --api-key $ApiKey --source $Source
Fix Rails versions test script
#! /bin/bash set -e for RAILS_VERSION in "3.2.0" "4.0.0" "4.1.0" "5.0.0" do bundle update bundle exec rspec spec done
#! /bin/bash set -e for RAILS_VERSION in "3.2.0" "4.0.0" "4.1.0" "4.2.0" "5.0.0" do export RAILS_VERSION echo "Rails $RAILS_VERSION" bundle update bundle exec rspec spec done unset RAILS_VERSION
Update to support zsh 4.2.6
autoload -U is-at-least if is-at-least 5.1.0; then __CGITC_CMD="local arr=(\"\${(@s/#/)line}\") line=\$arr[1]" else __CGITC_CMD="line=\$(echo \"\$line\" | cut -d '#' -f 1)" fi while read line; do # Strip out comments eval $__CGITC_CMD # Skip empty lines if [ -z "$line" ]; then; continue; fi # Split a l...
autoload -U is-at-least if is-at-least 5.1.0; then __CGITC_CMD="local arr=(\"\${(@s/#/)line}\") line=\$arr[1]" else __CGITC_CMD="line=\$(echo \"\$line\" | cut -d '#' -f 1)" fi while read line; do # Strip out comments eval $__CGITC_CMD # Skip empty lines if [ -z "$line" ]; then; continue; fi # Split a l...
Use Perl version-agnostic way of switching to Media Cloud's Perl library
#!/bin/bash ## These 3 lines are mandatory. export PERLBREW_ROOT=$HOME/perl5/perlbrew export PERLBREW_HOME=$HOME/.perlbrew #echo source ${PERLBREW_ROOT}/etc/bashrc unset MANPATH source ${PERLBREW_ROOT}/etc/bashrc #if [[ -z "$PERLBREW_BASHRD_VERSION" ]] # then # echo "if branch taken" # source ~/perl5/perlbrew/et...
#!/bin/bash ## These 3 lines are mandatory. export PERLBREW_ROOT=$HOME/perl5/perlbrew export PERLBREW_HOME=$HOME/.perlbrew #echo source ${PERLBREW_ROOT}/etc/bashrc unset MANPATH source ${PERLBREW_ROOT}/etc/bashrc # Switch to whatever version has the "mediacloud" library perlbrew use @mediacloud # NOTE: We filter th...
Increase memory for master API
#!/bin/sh JAVA_OPTS="${JAVA_OPTS} -DconfigFileLocation=/config/frontend-config.properties "
#!/bin/sh JAVA_OPTS="${JAVA_OPTS} -DconfigFileLocation=/config/frontend-config.properties -Xmx512M"
Make this a little more general.
#!/bin/bash # AUTHOR: Jeremy Wall (jw), jeremy@marzhillstudios.com set -x file=$1 cargo build --release sudo dtrace -c "target/release/ucg build ${file}" -o out.stacks -n 'profile-997 /execname == "ucg"/ { @[ustack(100)] = count(); }' stackcollapse.pl out.stacks > collapsed.stacks cat collapsed.stacks | flamegraph.p...
#!/bin/bash # AUTHOR: Jeremy Wall (jw), jeremy@marzhillstudios.com set -x cmd=$1 cargo build --release sudo dtrace -c "target/release/ucg ${cmd}" -o out.stacks -n 'profile-997 /execname == "ucg"/ { @[ustack(100)] = count(); }' stackcollapse.pl out.stacks > collapsed.stacks cat collapsed.stacks | flamegraph.pl --minw...
Clean tmp folder after unzipping KoreBuild
#!/usr/bin/env bash repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi buildFolder=".build" buildFile="$buildFolder/KoreBuild.sh" if test ! -d $buildFolder...
#!/usr/bin/env bash repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi buildFolder=".build" buildFile="$buildFolder/KoreBuild.sh" if test ! -d $buildFolder...
Revert "Invoke gradle with daemon flag."
#!/bin/bash export JAVA_HOME=$(/usr/libexec/java_home -v1.7) export GVM_SERVICE="http://localhost:8080" export GVM_DIR="/tmp/gvm" ./gradlew --daemon -i clean test
#!/bin/bash export JAVA_HOME=$(/usr/libexec/java_home -v1.7) export GVM_SERVICE="http://localhost:8080" export GVM_DIR="/tmp/gvm" ./gradlew -i clean test
Remove destination support from checkout script
#! /bin/bash # If any command here fails, exit the script set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $DIR/config.sh # Validate branch name # TODO: support just pieces of branch name if [[ $1 == "" ]] then echo "Usage: $0 branch [destination]" exit 1 fi # Check if destination was given...
#! /bin/bash # If any command here fails, exit the script set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $DIR/config.sh # Validate branch name # TODO: support just pieces of branch name if [[ $1 == "" ]] then echo "Usage: $0 branch " exit 1 fi pushd $IPA_DIR # Checkout to the given branc...
Update the call to generate_rvs.py.
# Check the types in everything. pytype cabby # RVS bazel build cabby/rvs:* bazel query cabby/rvs:* | xargs bazel test bazel-bin/cabby/rvs/generate_rvs --ref_poi "Empire State Building" --goal_poi "pharmacy" # Geo bazel-bin/cabby/geo/geo_computation --orig_lat 40.749102 --orig_lon -73.984076 -dest_lat 40.748432 --des...
# Check the types in everything. pytype cabby # RVS bazel build cabby/rvs:* bazel query cabby/rvs:* | xargs bazel test bazel-bin/cabby/rvs/generate_rvs --start_lat 40.753628 --start_lon -73.985085 --goal_lat 40.748432 --goal_lon -73.98247 # Geo bazel-bin/cabby/geo/geo_computation --orig_lat 40.749102 --orig_lon -73.9...
Return 0 instead of exitting, makes multiple asserts work
#!/bin/sh # vim: set ts=4 : STEVE_OUTPUT=steve-output function AssertEqual { if [ -z "$1" ] || [ -z "$2" ] then echo "AssertEqual expects two arguments" > /dev/stderr exit 1 fi if [ "$1" != "$2" ] then TestFailure "Expected \"$1\" to be \"$2\"" exit 1 fi ex...
#!/bin/sh # vim: set ts=4 : STEVE_OUTPUT=steve-output function AssertEqual { if [ -z "$1" ] || [ -z "$2" ] then echo "AssertEqual expects two arguments" > /dev/stderr exit 1 fi if [ "$1" != "$2" ] then TestFailure "Expected \"$1\" to be \"$2\"" exit 1 fi re...
Copy phar instead of moving
#!/bin/bash composer --no-dev update && box build && mv ./build/stati.phar ./build/stati && cd ../stati-paginate-plugin/ && box build && cd ../stati/ && cd ../stati-related-plugin/ && box build && cd ../stati/ && cd ../stati-categories-plugin/ && box build && cd ../stati/ && cp ../stati-paginate-plugin/build/paginate....
#!/bin/bash composer --no-dev update && box build && cp ./build/stati.phar ./build/stati && cd ../stati-paginate-plugin/ && box build && cd ../stati/ && cd ../stati-related-plugin/ && box build && cd ../stati/ && cd ../stati-categories-plugin/ && box build && cd ../stati/ && cp ../stati-paginate-plugin/build/paginate....
Adjust test script a bit
#!/bin/sh gst-launch --gst-plugin-path=`pwd`/src/.libs v4l2src ! video/x-raw-rgb,width=320, height=240 ! dmtx ! ffmpegcolorspace ! xvimagesink
#!/bin/sh gst-launch --gst-plugin-path=`pwd`/src/.libs \ v4l2src ! video/x-raw-rgb,width=320, height=240,fps=10 ! \ dmtx scale=2 ! \ queue ! ffmpegcolorspace ! xvimagesink
Add git for fuseki container
# # Fuseki container # docker kill /fuseki docker rm /fuseki docker build -t 0xffea/saucy-server-fuseki - <<EOL FROM 0xffea/saucy-server-existdb-amd64 MAINTAINER David Höppner <0xffea@gmail.com> EXPOSE 3030 ADD https://raw.github.com/beijingren/dedalus-infrastructure/master/scripts/start-fuseki.sh /root/start-fusek...
# # Fuseki container # docker kill /fuseki docker rm /fuseki docker build -t 0xffea/saucy-server-fuseki - <<EOL FROM 0xffea/saucy-server-existdb-amd64 MAINTAINER David Höppner <0xffea@gmail.com> RUN export DEBIAN_FRONTEND=noninteractive RUN apt-get -qy install \ git EXPOSE 3030 ADD https://raw.github.com/beijing...
Fix little bit typo error
#!/bin/sh curpath=`dirname $0` nohup ${curpath}/run_agent.sh $1 >> /${TMPDIR:=/tmp}/ngrinder.log & 2>&1
#!/bin/sh curpath=`dirname $0` nohup ${curpath}/run_agent.sh $1 >> ${TMPDIR:=/tmp}/ngrinder.log & 2>&1
Use deadline scheduler for disks on Postgres master
#!/bin/sh umount /mnt yes | mdadm --create /dev/md0 --raid-devices=2 --level=1 /dev/xvdb /dev/xvdc blockdev --setra 4096 /dev/xvdb blockdev --setra 4096 /dev/xvdc blockdev --setra 4096 /dev/md0 mkfs.xfs /dev/md0 echo "/dev/md0 /srv xfs noatime,barrier 1 1" >> /etc/fstab mount /srv pg_ctlcluster 9.1 main stop mv ...
#!/bin/sh umount /mnt yes | mdadm --create /dev/md0 --raid-devices=2 --level=1 /dev/xvdb /dev/xvdc blockdev --setra 4096 /dev/xvdb blockdev --setra 4096 /dev/xvdc blockdev --setra 4096 /dev/md0 echo deadline > /sys/block/xvdb/queue/scheduler echo deadline > /sys/block/xvdc/queue/scheduler mkfs.xfs /dev/md0 echo "/dev...
Add beets music library manager
#!/bin/sh # # Description: installs python and python packages if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-opens...
#!/bin/sh # # Description: installs python and python packages if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-opens...
Install Bazel in the Kokoro build script.
#!/bin/bash # Fail on any error. set -e # Display commands being run. # WARNING: please only enable 'set -x' if necessary for debugging, and be very # careful if you handle credentials (e.g. from Keystore) with 'set -x': # statements like "export VAR=$(cat /tmp/keystore/credentials)" will result in # the credentia...
#!/bin/bash # Fail on any error. set -e # Install Bazel. use_bazel.sh 4.2.1 command -v bazel bazel version # Code under repo is checked out to ${KOKORO_ARTIFACTS_DIR}/git. # The final directory name in this path is determined by the scm name specified # in the job configuration. cd "${KOKORO_ARTIFACTS_DIR}/git/local...
Make user:group the owner of /etc/appname/*
#!/usr/bin/env bash set -e APP_NAME="<%= name %>" APP_USER="<%= user %>" APP_GROUP="<%= group %>" HOME="<%= home %>" HOME_LOGS="${HOME}/log" LOGS="/var/log/${APP_NAME}" chown -R ${APP_USER}.${APP_GROUP} ${HOME} # link app log directory to /var/log/NAME rm -rf ${HOME_LOGS} ln -fs ${LOGS} ${HOME_LOGS} chown -R ${APP_...
#!/usr/bin/env bash set -e APP_NAME="<%= name %>" APP_USER="<%= user %>" APP_GROUP="<%= group %>" APP_HOME="<%= home %>" HOME_LOGS="${APP_HOME}/log" LOGS="/var/log/${APP_NAME}" chown -R ${APP_USER}.${APP_GROUP} ${APP_HOME} # link app log directory to /var/log/NAME rm -rf ${HOME_LOGS} ln -fs ${LOGS} ${HOME_LOGS} cho...
Clean up and fix +1/-0 syntax to work as expected
## # dircycle plugin: enables cycling through the directory # stack using Ctrl+Shift+Left/Right eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" zle -N insert-cycledleft bindkey "\e[1;6D" insert-cycledleft eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q +0'; zle acce...
# enables cycling through the directory stack using # Ctrl+Shift+Left/Right # # left/right direction follows the order in which directories # were visited, like left/right arrows do in a browser # NO_PUSHD_MINUS syntax: # pushd +N: start counting from left of `dirs' output # pushd -N: start counting from right of `d...
Remove -e: it doesn't work with some versions of bash.
#!/usr/bin/env bash -e # Runs a CI build for castanet. Assumes: # # 1) RVM is installed in the build user's home directory and can be # activated by sourcing ~/.rvm/scripts/rvm. # # 2) rvm_install_on_use_flag and rvm_create_on_use_flag are set. # # 3) The Ruby environment to use is provided as the first argument. i...
#!/usr/bin/env bash # Runs a CI build for castanet. Assumes: # # 1) RVM is installed in the build user's home directory and can be # activated by sourcing ~/.rvm/scripts/rvm. # # 2) rvm_install_on_use_flag and rvm_create_on_use_flag are set. # # 3) The Ruby environment to use is provided as the first argument. if [...
Document source of repos for deps
#!/bin/sh (cd ../../ekmett/bifunctors && cabal clean && cabal install --allow-newer) # (cd ../../ekmett/comonad && cabal clean && cabal install --allow-newer) (cd ../../ekmett/free && cabal clean && cabal install --allow-newer) (cd ../../alanz/HUnit && cabal clean && cabal install --allow-newer) cabal ...
#!/bin/sh # https://github.com/ekmett/bifunctors.git master (cd ../../ekmett/bifunctors && cabal clean && cabal install --allow-newer) # https://github.com/ekmett/free.git master (cd ../../ekmett/free && cabal clean && cabal install --allow-newer) # https://github.com/alanz/HUnit.git ghc-head (cd ../../alanz/H...
Allow the old version being given as parameter
#!/bin/sh OLD_VERSION=$(git describe --abbrev=0 --tags | tr -d 'v\n') VERSION="$1" if [ -z "$VERSION" ]; then exit 1 fi README="README.md" echo "Replace $OLD_VERSION with $VERSION in $README" sed -i -e "s/$OLD_VERSION/$VERSION/g" "$README" git add "$README" git commit -a -m "Setting version to $VERSION" git tag...
#!/bin/sh OLD_VERSION=$(git describe --abbrev=0 --tags | tr -d 'v\n') if [ -n "$2" ]; then OLD_VERSION="$2" fi VERSION="$1" if [ -z "$VERSION" ]; then exit 1 fi README="README.md" echo "Replace $OLD_VERSION with $VERSION in $README" sed -i -e "s/$OLD_VERSION/$VERSION/g" "$README" git add "$README" git commi...
Test for old school CSV download.
#!/usr/bin/env bash set -e set -x AUTH="$1" curl -i -H "Accept: application/json" -H "content-type: application/json" -H "Authorization: $AUTH" --data "@event.json" -X POST http://misp.local/events curl -H "Authorization: $AUTH" -X GET http://misp.local/events/csv/download/1 | sed -e 's/^M//g' | cut -d, -f2 --compl...
#!/usr/bin/env bash set -e set -x AUTH="$1" curl -i -H "Accept: application/json" -H "content-type: application/json" -H "Authorization: $AUTH" --data "@event.json" -X POST http://misp.local/events curl -H "Authorization: $AUTH" -X GET http://misp.local/events/csv/download/1/ignore:1 | sed -e 's/^M//g' | cut -d, -f...
Use --compressed in curl invocation since it's returning gzipped content randomly
#!/bin/bash set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( "$@" ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) fi versions=( "${versions[@]%/}" ) for version in "${versions[@]}"; do fullVersion="$(curl -sSL "http://cache.ruby-lang.org/pub/ruby/$version/" \ | grep -E '<a href="ruby-'"$ver...
#!/bin/bash set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( "$@" ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) fi versions=( "${versions[@]%/}" ) for version in "${versions[@]}"; do fullVersion="$(curl -sSL --compressed "http://cache.ruby-lang.org/pub/ruby/$version/" \ | grep -E '<a href...
Add remote pruning to gitcleanup
alias git=hub alias gitoneline="git log --graph --decorate --pretty=format:\"%C(auto)%h%d %Cblue%an%Creset: %C(auto)%s\"" alias gitonelineall="git log --graph --decorate --all --pretty=format:\"%C(auto)%h%d %Cblue%an%Creset: %C(auto)%s\"" alias gitpretty="git log --graph --decorate --name-status" alias gitprettyall="gi...
alias git=hub alias gitoneline="git log --graph --decorate --pretty=format:\"%C(auto)%h%d %Cblue%an%Creset: %C(auto)%s\"" alias gitonelineall="git log --graph --decorate --all --pretty=format:\"%C(auto)%h%d %Cblue%an%Creset: %C(auto)%s\"" alias gitpretty="git log --graph --decorate --name-status" alias gitprettyall="gi...
Build f/ws too if they're present
#!/usr/bin/env bash cd ag-grid #./node_modules/.bin/gulp stylus #./node_modules/.bin/webpack gulp webpack cd ../ag-grid-enterprise #./node_modules/.bin/webpack gulp webpack cd ..
#!/usr/bin/env bash cd ag-grid gulp webpack cd ../ag-grid-enterprise gulp webpack if [ -d "../ag-grid-angular" ]; then cd ../ag-grid-angular npm run clean-build fi if [ -d "../ag-grid-react" ]; then cd ../ag-grid-react gulp fi if [ -d "../ag-grid-vue" ]; then cd ../ag-grid-vue gulp fi if [ -d "../ag-g...
Fix toxiproxy server download script
#!/bin/bash -e VERSION='v2.0.0rc2' TOXIPROXY_LOG_DIR=${CIRCLE_ARTIFACTS:-'/tmp'} echo "[start toxiproxy]" curl --silent https://github.com/Shopify/toxiproxy/releases/download/$VERSION/toxiproxy-server-linux-amd64 -o ./bin/toxiproxy-server chmod +x ./bin/toxiproxy-server nohup bash -c "./bin/toxiproxy-server > ${TOXIP...
#!/bin/bash -e VERSION='v2.0.0rc2' TOXIPROXY_LOG_DIR=${CIRCLE_ARTIFACTS:-'/tmp'} echo "[start toxiproxy]" curl --silent -L https://github.com/Shopify/toxiproxy/releases/download/$VERSION/toxiproxy-server-linux-amd64 -o ./bin/toxiproxy-server chmod +x ./bin/toxiproxy-server nohup bash -c "./bin/toxiproxy-server > ${TO...
Speed up npm package list check considerably
#!/usr/bin/env bash # # Node package manager (NPM) set -e # Packages to install globally PACKAGES=( "autoprefixer" "bower" "csscomb" "grunt" "gulp" "http-server" "live-server" "nodemon" "nvm" "localtunnel" ) echo "" echo " Running Node install script" # Check for npm if command -v npm >/dev/nul...
#!/usr/bin/env bash # # Node package manager (NPM) set -e # Cache already installed global packages INSTALLED_PACKAGES=( $(find `npm root -g` -type d -maxdepth 1 -not -path '*/\.*' -print0 | while IFS= read -r -d '' dirname; do echo ${dirname##*/}; done) ) # Packages to install globally PACKAGES=( "autoprefixer" ...
Use vars for SID in fixpacks script
sidadm=poqadm db2sid=db2poq DB2INSTALLER=/tmp/DB2_LUW_10.5_FP5_RDBMS_LINUX_/LINUXX86_64 SID=POQ set -e su - $sidadm stopsap all exit tar -jcvf /backup/$db2sid.tar.bz2 /db2/$db2sid su - $db2sid $DB2DIR/bin/ipclean $DB2DIR/das/bin/db2admin stop db2ls exit cd $DB2INSTALLER/ESE/disk1/ # responda DB2DIR ; no ./in...
sidadm=ecqadm db2sid=db2ecq DB2INSTALLER=/tmp/DB2_LUW_10.5_FP5_RDBMS_LINUX_/LINUXX86_64 SID=ECQ # rsync -avz /sapmedia/IBM_DB2/DB2_LUW_10.5_FP5_RDBMS_LINUX_ /tmp/ set -e su - $sidadm stopsap all exit tar -jcvf /backup/$db2sid.tar.bz2 /db2/$db2sid su - $db2sid $DB2DIR/bin/ipclean $DB2DIR/das/bin/db2admin stop d...
Revert "ci: docker -> podman"
#!/bin/bash set -e TAG="registry.gitlab.gnome.org/gnome/glib-networking/master:v5" cd "$(dirname "$0")" podman build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" . if [ "$1" = "--push" ]; then podman login registry.gitlab.gnome.org podman push $TAG else podman run --rm \ --volume "$(pwd)/..:/home/use...
#!/bin/bash set -e TAG="registry.gitlab.gnome.org/gnome/glib-networking/master:v4" cd "$(dirname "$0")" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" --file "Dockerfile" . if [ "$1" = "--push" ]; then sudo docker login registry.gitlab.gnome.org sudo docker push $TAG else sudo docker run --...
Remove subfolders in compressed tarball
#!/bin/bash TAR_EXTENSION=.tar.gz # Check architecture and set variables if [[ ! $check_and_set ]]; then . 0-check-and-set.sh $1 fi tar cfz $build_dir/$rootfs_dir$TAR_EXTENSION $build_dir/$rootfs_dir echo echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
#!/bin/bash TAR_EXTENSION=.tar.gz # Check architecture and set variables if [[ ! $check_and_set ]]; then . 0-check-and-set.sh $1 fi cd $build_dir tar cfz $rootfs_dir$TAR_EXTENSION $rootfs_dir cd - >/dev/null echo echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
Revert sudo for centos7 dir
#!/bin/bash -e # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) | | .` | (_) ||...
#!/bin/bash -e # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) | | .` | (_) ||...
Allow test db to be created
#!/bin/bash set -euo pipefail sudo su postgres <<'EOF' psql -c 'DROP SCHEMA public CASCADE;' stagecraft psql -c 'DROP DATABASE stagecraft;' /usr/lib/postgresql/9.3/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'SQL_ASCII' --locale=en_GB.UTF-8 'stagecraft' psql -c 'CREATE SCHEMA public;'...
#!/bin/bash set -euo pipefail sudo su postgres <<'EOF' psql -c 'DROP SCHEMA public CASCADE;' stagecraft psql -c 'DROP DATABASE stagecraft;' /usr/lib/postgresql/9.3/bin/createdb --port='5432' --owner='postgres' --template=template0 --encoding 'SQL_ASCII' --locale=en_GB.UTF-8 'stagecraft' psql -c 'CREATE SCHEMA public;'...
Move networkd setup to mesos unit
#!/bin/bash set -e FAULT_DOMAIN_SCRIPT=/opt/mesosphere/bin/detect_fault_domain if [ -x $FAULT_DOMAIN_SCRIPT ]; then export MESOS_DOMAIN="$($FAULT_DOMAIN_SCRIPT)" fi exec "$@"
#!/bin/bash set -e FAULT_DOMAIN_SCRIPT=/opt/mesosphere/bin/detect_fault_domain if [ -x $FAULT_DOMAIN_SCRIPT ]; then export MESOS_DOMAIN="$($FAULT_DOMAIN_SCRIPT)" fi function coreos_networkd_config() { network_config="/etc/systemd/network/dcos.network" sudo tee $network_config > /dev/null<<'EOF' [Match] Type=...
Copy local properties to RS
# hack to get latest ResearchStack code since artficts aren't being published if [[ $TRAVIS_BRANCH != 'master' ]]; then git clone -b develop https://github.com/ResearchStack/ResearchStack.git pushd ResearchStack ./gradlew install popd fi
# hack to get latest ResearchStack code since artficts aren't being published if [[ $TRAVIS_BRANCH != 'master' ]]; then git clone -b develop https://github.com/ResearchStack/ResearchStack.git pushd ResearchStack cp ../local.properties . ./gradlew install popd fi
Remove --stderr switch from Travis test runner
#!/bin/bash travisdir=$(dirname $(readlink /proc/$$/fd/255)) testdir="$travisdir/../tests" testedcomponents=(`cat "$travisdir/tested-components"`) result=0 for tested in "${testedcomponents[@]}" do echo "$tested:" phpunit -c $testdir/phpunit.xml --stderr $testdir/$tested result=$(($result |...
#!/bin/bash travisdir=$(dirname $(readlink /proc/$$/fd/255)) testdir="$travisdir/../tests" testedcomponents=(`cat "$travisdir/tested-components"`) result=0 for tested in "${testedcomponents[@]}" do echo "$tested:" phpunit -c $testdir/phpunit.xml $testdir/$tested result=$(($result || $?)) do...
Fix missing library issue on i386/armhf
#! /bin/bash if [[ $(uname -m) == "x86_64" ]] then wget --backups=0 "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz" tar -zxf ./mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz --strip-components=1 else IFS=" " read -a links <<< $(apt-get -y --print-uris install mongodb | egrep -o "htt...
#! /bin/bash if [[ $(uname -m) == "x86_64" ]] then wget --backups=0 "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz" tar -zxf ./mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz --strip-components=1 else IFS=" " read -a links <<< $(apt-get -y --print-uris install mongodb | egrep -o "htt...
Upgrade to Splash V2 Standards
echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration cp tests/parameters.yml.travis app/config/parameters.yml
echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration # cp tests/parameters.yml.travis app/config/parameters.yml cp app/config/p...
Update theme in VS Code installation script
#!/bin/sh # Installs the Visual Studio Code (Flatpak) with favorite packages flatpak remote-add --if-not-exists flathub \ https://dl.flathub.org/repo/flathub.flatpakrepo && flatpak install flathub \ com.visualstudio.code.oss && flatpak run com.visualstudio.code.oss \ --install-extension ms-ceintl.vscode-language-pack-p...
#!/bin/sh # Installs the Visual Studio Code (Flatpak) with favorite packages flatpak remote-add --if-not-exists flathub \ https://dl.flathub.org/repo/flathub.flatpakrepo && flatpak install flathub \ com.visualstudio.code.oss && flatpak run com.visualstudio.code.oss \ --install-extension ms-ceintl.vscode-language-pack-p...
Change the commit we're using for keystone.
#!/usr/bin/env sh set -ex pip install keystonemiddleware pip install python-keystoneclient keystone_commit=stable/mitaka ./ci/keystone/keystone.sh setup
#!/usr/bin/env sh set -ex pip install keystonemiddleware pip install python-keystoneclient # The exact commit we use here is somewhat arbitrary, but we want # something that (a) won't change out from under our feet, and (b) # works with our existing tests. keystone_commit=10.0.0.0b2 ./ci/keystone/keystone.sh setup
Use 127.0.0.1 instead of localhost
#! /bin/sh # # Copyright 2011 Couchbase, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
#! /bin/sh # # Copyright 2011 Couchbase, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Make start script for docker retain JAVA_OPTS
#!/bin/bash # if nobody manually set a host to list on then go with $HOSTNAME if [ -z "$MB_JETTY_HOST" ]; then export MB_JETTY_HOST=$HOSTNAME fi # Metabase Database Info - this is just about what db the Metabase application uses for internal storage # AWS Elastic Beanstalk w/ RDS if [ ! -z "$RDS_HOSTNAME" ]; th...
#!/bin/bash # if nobody manually set a host to list on then go with $HOSTNAME if [ -z "$MB_JETTY_HOST" ]; then export MB_JETTY_HOST=$HOSTNAME fi # Metabase Database Info - this is just about what db the Metabase application uses for internal storage # AWS Elastic Beanstalk w/ RDS if [ ! -z "$RDS_HOSTNAME" ]; th...
Fix renamed interface name for splash, too
#!/bin/sh # Setup_splash, takes 1 argument: 1=net . /etc/functions.sh . $dir/functions.sh net=$1 handle_splash() { config_get network "$1" network if [ "$network" == "${netrenamed}dhcp" ]; then if [ "$cleanup" == 1 ]; then section_cleanup luci_splash.$1 else if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then se...
#!/bin/sh # Setup_splash, takes 1 argument: 1=net . /etc/functions.sh . $dir/functions.sh net=$1 handle_splash() { config_get network "$1" network if [ "$network" == "${netrenamed}dhcp" ]; then if [ "$cleanup" == 1 ]; then section_cleanup luci_splash.$1 else if [ -z "${1/cfg[0-9a-fA-F]*/}" ]; then se...
Remove useless download of JSON.sh since it is vendored in anyway.
_dl_cmd init "initialize $DOCKERLITE_ROOT and create the root (empty) image" _dl_init () { curl -s https://raw.github.com/dominictarr/JSON.sh/master/JSON.sh > JSON.sh chmod +x JSON.sh cd $DOCKERLITE_ROOT mkdir -p images mkdir -p containers mkdir -p networks EMPTY=empty$RANDOM ZEROHASH=...
_dl_cmd init "initialize $DOCKERLITE_ROOT and create the root (empty) image" _dl_init () { # If for some reason, we cannot "vendor in" JSON.sh, we could download # it here, when the image store is initialized. #curl -s https://raw.github.com/dominictarr/JSON.sh/master/JSON.sh > JSON.sh #chmod +x JSON.sh...
Use utils to create glance service and endpoint
openstack user create --domain default --password $1 glance openstack role add --project service --user glance admin openstack service create --name glance --description "OpenStack Image service" image openstack endpoint create --region RegionOne image public http://$2:9292 openstack endpoint create --region RegionOne ...
#!/bin/sh source /opt/local/bin/os-utils.sh create_or_get_user glance $1 get_or_add_user_project_role admin glance service create_or_get_service glance image "OpenStack Image service" create_or_get_endpoint image public http://$2:9292 create_or_get_endpoint image internal http://$2:9292 create_or_get_endpoint image ad...
Use double brackets in generation test
#!/bin/bash set -eu echo "===> Generating API server..." cd _example ../bin/apig gen --all if [ ! $(git status | grep 'nothing to commit') ]; then echo " x Generator artifact and example application are different." git --no-pager diff exit 1 fi echo "===> Building API server..." go get ./... go build if [ $?...
#!/bin/bash set -eu echo "===> Generating API server..." cd _example ../bin/apig gen --all if [[ ! $(git status | grep 'nothing to commit') ]]; then echo " x Generator artifact and example application are different." git --no-pager diff exit 1 fi echo "===> Building API server..." go get ./... go build if [[...
Add some comment about aws-sdk version
#!/bin/bash echo -n "* Executing apt-get update" sudo apt-get update echo -n "* Attempting to install puppet" sudo apt-get install -y --force-yes puppet echo " - Done" sudo /usr/bin/logger -t autobootstrap "installed puppet" echo "* installing gems" sudo gem install hiera-eyaml sudo gem install aws-sdk -v '~> 2.6.11' s...
#!/bin/bash echo -n "* Executing apt-get update" sudo apt-get update echo -n "* Attempting to install puppet" sudo apt-get install -y --force-yes puppet echo " - Done" sudo /usr/bin/logger -t autobootstrap "installed puppet" echo "* installing gems" sudo gem install hiera-eyaml # aws-codedeploy-agent 1.0-1.1067 depends...
Check for adg.h existence in the proper path
#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. if test ! -f $srcdir/configure.ac -o ! -f $srcdir/adg/adg.h; then echo "**Error**: '$srcdir' does not look like the top-level adg directory" exit 1 fi cd $srcdir glib-gettextize -f || exit $? #...
#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. if test ! -f $srcdir/configure.ac -o ! -f $srcdir/src/adg/adg.h; then echo "**Error**: '$srcdir' does not look like the top-level adg directory" exit 1 fi cd $srcdir glib-gettextize -f || exit $...
Fix oshinko-rest version after merge
if [ -n "$OSHINKO_SERVER_TAG" ] then TAG="$OSHINKO_SERVER_TAG" elif [ -d .git ] then GIT_TAG=`git describe --tags --abbrev=0 2> /dev/null | head -n1` GIT_COMMIT=`git log -n1 --pretty=format:%h 2> /dev/null` TAG="${GIT_TAG}-${GIT_COMMIT}" else TAG="unknown" fi APP=oshinko-rest-server TAG_APPNAME_FL...
if [ -n "$OSHINKO_SERVER_TAG" ] then TAG="$OSHINKO_SERVER_TAG" elif [ -d ../.git ] then GIT_TAG=`git describe --tags --abbrev=0 2> /dev/null | head -n1` GIT_COMMIT=`git log -n1 --pretty=format:%h 2> /dev/null` TAG="${GIT_TAG}-${GIT_COMMIT}" else TAG="unknown" fi APP=oshinko-rest-server TAG_APPNAME...
Switch back to using default VIM
# Quick Directory tab completions c() { cd ~/Development/$1; } _c() { _files -W ~/Development -/; } compdef _c c h() { cd ~/$1; } _h() { _files -W ~/ -/; } compdef _h h # My aliases alias reload!='. ~/.zshrc' # Reloads my zsh configurion alias cls='clear' # Clear screen alias pubkey="clipcopy ~/.ssh/id_rsa.pub | echo...
# Quick Directory tab completions c() { cd ~/Development/$1; } _c() { _files -W ~/Development -/; } compdef _c c h() { cd ~/$1; } _h() { _files -W ~/ -/; } compdef _h h # My aliases alias reload!='. ~/.zshrc' # Reloads my zsh configurion alias cls='clear' # Clear screen alias pubkey="clipcopy ~/.ssh/id_rsa.pub | echo...
Check that the project directory exists.
#!/bin/bash DATADIR="$(dirname "$0")" PROJECT="$1" if [[ "$PROJECT" == "" ]]; then echo "Usage: $0 projectdir" exit 1 fi echo "==> Prepending changelog." CLTARGET="$PROJECT/debian/changelog" CLDIST="$CLTARGET.dist" CLPRE="$DATADIR/changelog-pre.txt" needscl=1 if [[ -f "$CLDIST" ]]; then # Check if the changelog h...
#!/bin/bash DATADIR="$(dirname "$0")" PROJECT="$1" if [[ "$PROJECT" == "" ]]; then echo "Usage: $0 projectdir" >&2 exit 1 fi if [[ ! -d "$PROJECT" ]]; then echo "Project is not a directory: $PROJECT" >&2 exit 1 fi echo "==> Prepending changelog." CLTARGET="$PROJECT/debian/changelog" CLDIST="$CLTARGET.dist" CLPRE...
Print .def files as well as other files
#!/bin/sh # This is useful because it prints out all of the source files. Useful for # greps. find . -name \*.\[chyl\]\* | grep -v Lexer.cpp | grep -v llvmAsmParser.cpp | grep -v llvmAsmParser.h | grep -v '~$' | grep -v '\.ll$' | grep -v test | grep -v .flc | grep -v Sparc.burm.c
#!/bin/sh # This is useful because it prints out all of the source files. Useful for # greps. find . -name \*.\[cdhyl\]\* | grep -v Lexer.cpp | grep -v llvmAsmParser.cpp | grep -v llvmAsmParser.h | grep -v '~$' | grep -v '\.ll$' | grep -v test | grep -v .flc | grep -v Sparc.burm.c | grep -v '\.d$' | grep -v '\.dir$'
Revert "Fix build on Travis CI"
#!/usr/bin/env bash # # This script will deploy artifacts of the project. # set -e CD_DIR=$(cd "$(dirname "$0")"; pwd) ROOT_DIR=${CD_DIR}/../ MVNW="${ROOT_DIR}/mvnw -B" RELEASE_TYPE=${1:-snapshot} VERSION="$2" MAVEN_RELEASE_SETTINGS=${CD_DIR}/settings.xml GPG_TTY=$(tty) export GPG_TTY if [ "${RELEASE_TYPE}" == "re...
#!/usr/bin/env bash # # This script will deploy artifacts of the project. # set -e CD_DIR=$(cd "$(dirname "$0")"; pwd) ROOT_DIR=${CD_DIR}/../ MVNW="${ROOT_DIR}/mvnw -B" RELEASE_TYPE=${1:-snapshot} VERSION="$2" MAVEN_RELEASE_SETTINGS=${CD_DIR}/settings.xml if [ "${RELEASE_TYPE}" == "release" ] && [ ! -z "${VERSION}"...
Improve headless test running script
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the LICENSE file # in the root directory of this source tree. set -xeuo pipefail if [ `adb devices | wc -l` -lt "3" ] then echo "No devices are connected. Make sure emulator is booted wit...
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the LICENSE file # in the root directory of this source tree. set -euo pipefail if [ `adb devices | wc -l` -lt "3" ] then echo "ERROR: No devices are connected. Make sure emulator is boot...
Update comment to reference .dotfiles_profile
#!/usr/bin/env bash cd $(dirname $BASH_SOURCE) SETUP_DIR=$(pwd) # Only symlink bashrc and zshrc if they don't exist. # If they already exist but do not 'source ~/.dotfiles', then append it. for rc in bashrc zshrc; do if [ ! -e ~/.$rc ]; then ln -sfv $SETUP_DIR/$rc ~/.$rc elif ! grep -q -F 'source ~/.d...
#!/usr/bin/env bash cd $(dirname $BASH_SOURCE) SETUP_DIR=$(pwd) # Only symlink bashrc and zshrc if they don't exist. # If they already exist but do not 'source ~/.dotfiles_prompt', then append it. for rc in bashrc zshrc; do if [ ! -e ~/.$rc ]; then ln -sfv $SETUP_DIR/$rc ~/.$rc elif ! grep -q -F 'sour...
Use ruby-1.8.7-p358 instead of the system installed debian version
#!/usr/bin/env bash set -e set -x eval "$(rbenv init -)" rbenv local 1.8.7-debian bundle install --deployment --path=.bundle/gems bundle exec rake spec
#!/usr/bin/env bash set -e set -x eval "$(rbenv init -)" rbenv local 1.8.7-p358 bundle install --deployment --path=.bundle/gems bundle exec rake spec
Install Automaton on set up
#!/usr/bin/env sh ln -s ~/.config/ghci ~/.ghci mkdir -p ~/.cache/psql_history # Neovim spell NVIM_SPELL_DEST=~/.local/share/nvim/site/spell/ NVIM_SPELL_EXTENSION=.utf-8.spl NVIM_SPELL_SOURCE=http://ftp.vim.org/vim/runtime/spell/ mkdir -p ${NVIM_SPELL_DEST} for l in en es; do curl ${NVIM_SPELL_SOURCE}${l}${NVIM_SPE...
#!/usr/bin/env sh ln -s ~/.config/ghci ~/.ghci mkdir -p ~/.cache/psql_history # Neovim git clone git@github.com:tssm/neovim-automaton \ ~/.local/share/nvim/site/pack/automaton/start/neovim-automaton NVIM_SPELL_DEST=~/.local/share/nvim/site/spell/ NVIM_SPELL_EXTENSION=.utf-8.spl NVIM_SPELL_SOURCE=http://ftp.vim.org...
Use a different command to showcase scaling down
#!/bin/bash # deploy a replicated service -- one instance on every node # NOTE: must be run on the master node DESCRIPTOR=`pwd`/descriptors/replicated-service-definition.yml STACK_NAME=replicated-test echo Deploying Stack docker stack deploy --compose-file ${DESCRIPTOR} ${STACK_NAME} sleep 2 clear echo List all sta...
#!/bin/bash # deploy a replicated service -- one instance on every node # NOTE: must be run on the master node DESCRIPTOR=`pwd`/descriptors/replicated-service-definition.yml STACK_NAME=replicated-test echo Deploying Stack docker stack deploy --compose-file ${DESCRIPTOR} ${STACK_NAME} sleep 2 clear echo List all sta...
Fix kumquat_admin_email for php-fpm.d value and path
#!/usr/bin/env bash # Configure PHP sendmail return-path if possible if mdata-get kumquat_admin_email 1>/dev/null 2>&1; then echo "php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f $(mdata-get kumquat_admin_email)" \ >> /opt/local/etc/fpm.d/pool-www.conf fi # Enable PHP-FPM /usr/sbin/svcadm enable svc:/...
#!/usr/bin/env bash # Configure PHP sendmail return-path if possible if mdata-get kumquat_admin_email 1>/dev/null 2>&1; then echo "php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f $(mdata-get kumquat_admin_email)" \ >> /opt/local/etc/php-fpm.d/pool-www.conf fi # Enable PHP-FPM /usr/sbin/svcadm enable s...
Make sed reference more portable
log "setting hostname, IPs and resolvers" : ${RESOLVERS:=8.8.8.8 8.8.4.4} RESOLVERS=(${RESOLVERS}) echo "${HOSTNAME}" > /etc/nodename /bin/hostname ${HOSTNAME} sed -i'' '/nameserver/d' /etc/resolv.conf for HOST in ${RESOLVERS[@]}; do echo "nameserver ${HOST}" >> /etc/resolv.conf done if [ ${#NET_INTERFACES[@]} -g...
log "setting hostname, IPs and resolvers" : ${RESOLVERS:=8.8.8.8 8.8.4.4} RESOLVERS=(${RESOLVERS}) echo "${HOSTNAME}" > /etc/nodename /bin/hostname ${HOSTNAME} sed '/nameserver/d' /etc/resolv.conf > /tmp/resolv.conf.tmp && \ mv /tmp/resolv.conf.tmp /etc/resolv.conf for HOST in ${RESOLVERS[@]}; do echo "nameserve...