add script (only test on ubuntu)

add script (only test on ubuntu)

#!/bin/bash
# Simple script which installs Google's configs into yout user configs.

echo "Installing Google's code style configs..."

HERE=$(dirname $0)

#get the config
echo ""
echo "Retrieving the config..."
wget -q https://raw.githubusercontent.com/android/platform_development/master/ide/intellij/codestyles/AndroidStyle.xml -O $HERE/AndroidStyle.xml

echo ""
echo "Copying the config file..."
for i in $HOME/Library/Preferences/IntelliJIdea*\
	 $HOME/Library/Preferences/IdeaIC* \
	 $HOME/Library/Preferences/AndroidStudio* \
	 $HOME/.IntelliJIdea*/config \
	 $HOME/.IdeaIC*/config \
	 $HOME/.AndroidStudio*/config
do
    if [ -d "$i" ]; then
	#Create the codesStyle folder if it doesn't exist
	echo mkdir $i/codestyles
	mkdir $i/codestyles

	#Copy the config file
	echo cp -f $HERE/AndroidStyle.xml* $i/codestyles/
	cp -f $HERE/AndroidStyle.xml* $i/codestyles/
    fi
done

echo ""
echo "Done."
echo ""
echo "Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'AndroidStyle'"

error: pathspec 'install.sh' did not match any file(s) known to git


modify install to fit other shell

modify install to fit other shell

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/broven/iconf.git/'


temp dir handling

temp dir handling

#!/bin/bash

TMPROOTDIR="."
TMPDIR="${TMPROOTDIR}/AFZCAMCREATOR.$$"

cleanup() {
  rv=$?
  rm -rf $TMPDIR
  exit $rv
}

trap cleanup INT TERM EXIT

usage() {
    echo "Usage:"
    echo "  $(basename $0)"
}

error() {
    echo $1
    usage
    exit 1
}

mkdir "$TMPDIR" || error "CANNOT CREATE TEMPORARY FILE DIRECTORY"

echo Test


fixes path persmissions

fixes path persmissions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Covve/vagrant-orientdb.git/'


Modified install.sh, removing use of sudo command

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/IodineLang/Iodine.git/'


First commit.

First commit.

#!/usr/bin/env bash

current_track=$(osascript <<EOF
tell application "iTunes"
  return name of current track & " - " & artist of current track
end tell
EOF)


deployement is now single click

deployement is now single click

echo "changing directory to Tasks"
cd $GOPATH/src/github.com/thewhitetulip/Tasks
echo "creating table"
cat schema.sql | sqlite3 tasks.db
echo "building the go binary"
go build -o Tasks

echo "starting the binary"
./Tasks


Move `log_debug` uses to after its definition

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/austb/infusion.git/'


Added install script (not tested).

Added install script (not tested).

#!/usr/bin/env bash
# install.sh
# Author: Bruno Gama

PYTHON2="2.7.3"
PYTHON3k="3.3.0"

echo "Installing oh-my-zsh"
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

echo "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
echo "Running Homebrew default system packages"
sh brew.sh

echo "Installing Pythonbrew"
curl -kL http://xrl.us/pythonbrewinstall | bash
echo "Installing Python ${PYTHON2} and ${PYTHON3k}"
pythonbrew install $PYTHON2 $PYTHON3k
echo "Switching to Python ${PYTHON2} as default Interpreter"
python switch 2.7.3
echo "Installing Packages"
easy_install pip
pip install yolk

echo "Installing gems"
gem cupertino liftoff

echo "Setting up OSX settings"
sh osx
mkdir -p ~/.local/bin
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/.local/bin/subl
ln -s .gitconfig ~/.gitconfig
ln -s .global_ignore ~/.global_ignore
ln -s .zshrc ~/.zshrc
ln -s slate.js ~/.slate.js
ln -s .pythonrc ~/.pythonrc


add critcality to pillar

add critcality to pillar

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/DWBN/salt-check_mk_agent-formula.git/'


Moved the Apcera-specific AD test to Continuum

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/apcera/gssapi.git/'


Script to create, alter and update the DB

#!/bin/bash

CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASE_DIR=$(pwd)

source "$CUR_DIR/common/include_import.sh"
source "$CUR_DIR/common/import_functions.sh"

logger "Starting ALOJA DB create/update script"

logger "Creating tables, applying alters, updating data..."

source "$CUR_DIR/common/create_db.sh"

logger "Updating clusters and hosts"

for clusterConfigFile in $configFolderPath/cluster_* ; do

  id_cluster="${clusterConfigFile:(-7):2}"
  logger "INFO: loading $clusterConfigFile with ID $id_cluster"

  #TODO this check wont work for old folders with numeric values at the end, need another strategy
  #line to fix update execs set id_cluster=1 where id_cluster IN (28,32,56,64);
  if [ -f "$clusterConfigFile" ] && [[ $id_cluster =~ ^-?[0-9]+$ ]] ; then
    sql_tmp="$(get_insert_cluster_sql "$id_cluster" "$clusterConfigFile")"
    echo "Executing $MYSQL $sql_tmp"
    $MYSQL "$sql_tmp"
  fi

done

error: pathspec 'shell/create-update_DB.sh' did not match any file(s) known to git


[test-upstream] Install upstream version of nc-time-axis in upstream build (#5744)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/markelg/xray.git/'


added test script

added test script

#!/usr/bin/env bash

# Exit immediately if a command exits with a non-zero status
set -e

VIRTUALENVS_HOME=$HOME/virtualenvs
VENV=$VIRTUALENVS_HOME/django-u2f

mkdir -p $VIRTUALENVS_HOME
virtualenv -p python3 $VENV
source $VENV/bin/activate
pip install Django==1.11.10 django-u2f
git clone git@github.com:gavinwahl/django-u2f $VENV/src
cd $VENV/src/testproj
pip install -r requirements.txt
python manage.py migrate
./mkcert.sh
python manage.py createsuperuser
python manage.py runserver_plus --cert localhost

error: pathspec 'Tests/django-u2f-test.sh' did not match any file(s) known to git


Run tests with jenkins

Run tests with jenkins

#!/bin/bash -e

. ./create_virtualenv.sh "$(echo ${JOB_NAME} | tr ' ' '-')"
./run_tests.sh

error: pathspec 'jenkins.sh' did not match any file(s) known to git


feat: Script for manually synchronizing data between old and new version (refs #53)

#!/bin/sh
HOSTNAME=ddcz-access-point
TMPDIR=/tmp/ddcz-prod-sync
REMROOT=/var/www/dracidoupe.cz/www_root/www/htdocs
BUCKET="s3://uploady.dracidoupe.cz"

mkdir $TMPDIR

set -e

for dir in dobrodruzstvi soub galerie fotogalerie; do
  rsync -av w-dracidoupe-cz@ddcz-access-point:$REMROOT/$dir/ $TMPDIR/$dir/
  aws s3 sync $TMPDIR/$dir/ $BUCKET/$dir/
done;

rm -rf $TMPDIR;

error: pathspec 'bin/uploads-sync.sh' did not match any file(s) known to git


💎 alias 'be' as 'bundle exec'

💎 alias 'be' as 'bundle exec'

error: pathspec 'ruby/aliases.zsh' did not match any file(s) known to git


start脚本修改

start脚本修改

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ddppfamily/xgb.git/'


GeniaSS Batch Script

GeniaSS Batch Script

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ninjin/ppod.git/'


init heroku bootstrap

init heroku bootstrap

#!/usr/bin/env bash
app=basename "$PWD"
echo "DATABASE_URL=postgres://localhost/$app" > ./.env
echo "web: gunicorn $app.wsgi --log-file -" > ./Procfile
echo "For whitenoise static file serving:"

# output sample file content:
echo "change wsgi.py"
echo "change settings"

error: pathspec 'heroku_bootstrap.sh' did not match any file(s) known to git


Modify homebrew app list

Modify homebrew app list

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nsdont/dotfiles.git/'


removed installs

removed installs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/amdemas/dotfiles.git/'


Update install.sh

Update install.sh


Adding package builder shell script. Run with 'sh pkg.sh' to create build and dist directories with pysal zip, tar.gz, and .exe installer.

#!/bin/bash

cd doc/
make latex
cd build/latex
make all-pdf
cd ../../../
python setup.py sdist --formats=gztar,zip
python setup.py bdist_wininst
rm -rf build/

error: pathspec 'pkg.sh' did not match any file(s) known to git


(more) parameterisation via environment

(more) parameterisation via environment

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/eResearchSA/nectar-shell.git/'


UPD: handle subprocesses

UPD: handle subprocesses

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dkfiresky/flask-lcd-monit.git/'


Add run.sh

Add run.sh

#!/bin/bash
node miubot.js | tee miu-con.log

error: pathspec 'run.sh' did not match any file(s) known to git


*nix version

*nix version

#!/bin/sh
java -jar target/local-repo-importer-1.0-jar-with-dependencies.jar


Revert "Add temporary logging to help us trace down root cause for dotnet/coreclr#16063 (#26866)" (#26885)

This reverts commit 8c947b77660ddb4f50b105d2292c33125cf13abd.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/zhenlan/corefx.git/'


added run.sh script for running on android with cordova; need to fix gulp file because data and images aren't copied quite right;

#!/bin/bash

ANDROID_HOME=/opt/local/android-sdk

cordova=mobile

gulp

echo -e "Copying files to $cordova"
cp -r dist/* $cordova/www/
cp app/data/* $cordova/www/data/
cp -r app/images/* $cordova/www/img/
rm $cordova/www/bower_components/web-animations-js/*.gz

cd $cordova
echo -e "Building and running"
cordova run android
echo -e "Done!"


added start-jira script

added start-jira script

#!/usr/bin/env bash
atlas-run-standalone --container tomcat7x --product jira --version 7.2.0-OD-05-023 --data-version 7.2.0-OD-05-023 --bundled-plugins com.atlassian.bundles:json-schema-validator-atlassian-bundle:1.0.4,com.atlassian.upm:atlassian-universal-plugin-manager-plugin:2.21-D20160128T024330,com.atlassian.jwt:jwt-plugin:1.5.9-0019,com.atlassian.plugins:atlassian-connect-plugin:1.1.84 --jvmargs -Datlassian.upm.on.demand=true

error: pathspec 'start-jira.sh' did not match any file(s) known to git


Added build script

Added build script

#!/bin/bash
#
# Build bagman binaries for AWS servers.
# The binaries MUST be built on the target server.
# Although go does support cross-compiling, you cannot
# currently cross-compile applications that use cgo.
# Bagman uses the cgo magic mime libraries to parse file
# mime types.
#
# Because we're building on the target server, the target
# server must have all of the libraries required for
# building. We don't want to automatically call go get
# on the target server because that gets the latest master
# branch of all libraries, some of which have breaking
# API changes.

BAGMAN_HOME=~/go/src/github.com/APTrust/bagman
BAGMAN_BIN=${BAGMAN_HOME}/bin

if [ ! -d ${BAGMAN_DIR} ]; then
    mkdir ${BAGMAN_DIR}
else
    echo "cleaning out bin directory"
    rm ${BAGMAN_BIN}/*
fi

echo "building apt_nsq_service"
cd "${BAGMAN_HOME}/nsq"
go build -o ${BAGMAN_BIN}/apt_nsq_service service.go

echo "building apt_prepare"
cd "${BAGMAN_HOME}/apps/apt_prepare"
go build -o ${BAGMAN_BIN}/apt_prepare apt_prepare.go

echo "building apt_store"
cd "${BAGMAN_HOME}/apps/apt_store"
go build -o ${BAGMAN_BIN}/apt_store apt_store.go

echo "building apt_store"
cd "${BAGMAN_HOME}/apps/apt_store"
go build -o ${BAGMAN_BIN}/apt_store apt_store.go

echo "building apt_trouble"
cd "${BAGMAN_HOME}/apps/apt_trouble"
go build -o ${BAGMAN_BIN}/apt_trouble apt_trouble.go

echo "building apt_cleanup"
cd "${BAGMAN_HOME}/apps/apt_cleanup"
go build -o ${BAGMAN_BIN}/apt_cleanup apt_cleanup.go

echo "building apt_restore"
cd "${BAGMAN_HOME}/apps/apt_restore"
go build -o ${BAGMAN_BIN}/apt_restore apt_restore.go

echo "building apt_delete"
cd "${BAGMAN_HOME}/apps/apt_delete"
go build -o ${BAGMAN_BIN}/apt_delete apt_delete.go

echo "building bucket_reader"
cd "${BAGMAN_HOME}/apps/bucket_reader"
go build -o ${BAGMAN_BIN}/bucket_reader bucket_reader.go

echo "building request_reader"
cd "${BAGMAN_HOME}/apps/request_reader"
go build -o ${BAGMAN_BIN}/request_reader request_reader.go

echo "copying config files into bin directory"
cp ${BAGMAN_HOME}/config.json ${BAGMAN_BIN}/
cp ${BAGMAN_HOME}/nsq/*.config ${BAGMAN_BIN}/

error: pathspec 'scripts/build.sh' did not match any file(s) known to git


Add a script to help build the theme

Add a script to help build the theme

#!/bin/bash
#
# This script is part of the GeoTag-X theme project.
# https://github.com/geotagx/geotagx-theme
#
# Author: Jeremy Othieno (j.othieno@gmail.com)
#
# Copyright (c) 2017 UNITAR/UNOSAT
#
# The MIT License (MIT)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
# OR OTHER DEALINGS IN THE SOFTWARE.
set -e
set -o pipefail

NPM=$(type -P npm)
if [ ! -x "$NPM" ]
then
	echo "Error! Could not find the 'npm' executable. Please make sure it's installed, in your PATH, and executable."
	exit 1
fi

GRUNT=$(type -P grunt)
if [ ! -x "$GRUNT" ]
then
	echo "Error! Could not find the 'grunt' executable. Please make sure it's installed, in your PATH, and executable."
	exit 1
fi

BASE_DIR="$(readlink -f $0 | xargs realpath | xargs dirname | xargs dirname)"
STATIC_DIR="$BASE_DIR/static"

# Install depedencies and build the static files.
"$NPM" --prefix "$STATIC_DIR" install
"$GRUNT" --base "$STATIC_DIR" --gruntfile "$STATIC_DIR/Gruntfile.js"

exit 0


BACKUP

BACKUP

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Zex/neural-node.git/'


grunt [skip ci]

grunt [skip ci]

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ascsi/FHKlubdatabase.git/'


Update

Update

# Drosophila melanogaster transcriptome FASTA
# Ensembl annotations are out of date (2014)
# Use the resources from FlyBase instead
organism="$1"
type="$2"
if [[ $organism == "dmelanogaster" ]]; then
    if [[ $type == "genome" ]]; then
        request="ftp://ftp.flybase.net/genomes/Drosophila_melanogaster/dmel_r6.14_FB2017_01/fasta/dmel-all-aligned-r6.14.fasta.gz"
    elif [[ $type == "transcriptome" ]]; then
        request="ftp://ftp.flybase.net/genomes/Drosophila_melanogaster/dmel_r6.14_FB2017_01/fasta/dmel-all-transcript-r6.14.fasta.gz"
    fi
fi
file=$(basename "$request")
mkdir -p metadata/
cd metadata
wget "$request"
gunzip "$file"
cd ..
ls -l metadata/*.fasta

error: pathspec 'scripts/fasta.sh' did not match any file(s) known to git


Prettify the installer neovim message

Prettify the installer neovim message

#!/usr/bin/env bash

SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
. ${SCRIPT_DIR}/func.sh

setup() {
  # $1 - optional - path to haskell-vim-now installation
  #      If not set, script will use default location.
  unset HVN_DEST
  if [ -z $1 ] ; then
    # No argument provided, using default path
    HVN_DEST="$(config_home)/haskell-vim-now"
  else
    HVN_DEST=$1
  fi
  [ ! -e ${HVN_DEST} ] && exit_err "${HVN_DEST} doesn't exist! Install Haskell-Vim-Now first!"

  SYSTEM_TYPE=$(system_type)
  PACKAGE_MGR=$(package_manager)
  CONFIG_HOME=$(config_home)

  BREW_LIST="git make vim ctags"
  APT_LIST="git make vim libcurl4-openssl-dev exuberant-ctags fonts-powerline"
  YUM_LIST="git make vim ctags libcurl-devel zlib-devel powerline"

  if ! check_exist stack >/dev/null ; then
    err "Installer requires Stack."
    msg "Installation instructions: https://github.com/commercialhaskell/stack#how-to-install"
    exit 1
  fi

  msg "Installing system package dependencies..."
  case ${PACKAGE_MGR} in
    BREW )
      msg "Installing with homebrew..."
      brew install ${BREW_LIST}
      ;;
    APT )
      msg "Installing with apt-get..."
      sudo apt-get install -y ${APT_LIST}
      ;;
    DNF )
      msg "Installing with DNF..."
      sudo dnf install -yq ${YUM_LIST} # yum and dnf use same repos
      ;;
    YUM )
      msg "Installing with YUM..."
      sudo yum install -yq ${YUM_LIST}
      ;;
    OTHER )
      warn "No package manager detected. You may need to install required packages manually."
      ;;
    * )
      err "setup.sh is not configured to handle ${PACKAGE_MGR} manager! Aborting..."
      exit 1
  esac

  NOT_INSTALLED=$(check_exist ctags curl-config git make vim)
  [ ! -z ${NOT_INSTALLED} ] && exit_err "Installer requires '${NOT_INSTALLED}'. Please install and try again."

  VIM_VER=$(vim --version | sed -n 's/^.*IMproved \([^ ]*\).*$/\1/p')
  if ! verlte '7.4' ${VIM_VER} ; then
    warn "Detected vim version \"${VIM_VER}\""
    err "However version 7.4 or later is required. Aborting."
    exit 1
  fi

  if vim --version | grep -q +ruby 2>&1 ; then
    msg "Testing for broken Ruby interface in vim..."
    vim -T dumb --cmd "ruby puts RUBY_VERSION" --cmd qa! 1>/dev/null 2>/dev/null
    if [ $? -eq 0 ] ; then
      msg "Test passed. Ruby interface is OK."
    else
      err "The Ruby interface is broken on your installation of vim."
      err "Reinstall or recompile vim."
      msg "If you're on OS X, try the following:"
      detail "rvm use system"
      detail "brew reinstall vim"
      warn "If nothing helped, please report at https://github.com/begriffs/haskell-vim-now/issues"
      exit 1
    fi
  fi

  msg "Setting up GHC if needed..."
  stack setup --verbosity warning ; RETCODE=$?
  [ ${RETCODE} -ne 0 ] && exit_err "Stack setup failed with error ${RETCODE}. Aborting..."

  STACK_BIN_PATH=$(stack --verbosity 0 path --local-bin-path)
  STACK_GLOBAL_DIR=$(stack --verbosity 0 path --global-stack-root)
  STACK_GLOBAL_CONFIG=$(stack --verbosity 0 path --config-location)

  detail "Stack bin path: ${STACK_BIN_PATH}"
  detail "Stack global path: ${STACK_GLOBAL_DIR}"
  detail "Stack global config location: ${STACK_GLOBAL_CONFIG}"

  if [ -z ${STACK_BIN_PATH} ] || [ -z ${STACK_GLOBAL_DIR} ] || [ -z ${STACK_GLOBAL_CONFIG} ] ; then
    err "Incorrect stack paths."
    err "Please report at https://github.com/begriffs/haskell-vim-now/issues"
    err "Aborting..."
    exit 1
  fi

  msg "Adding extra stack deps if needed..."
  DEPS_REGEX='s/extra-deps: \[\]/extra-deps: [cabal-helper-0.6.1.0, pure-cdb-0.1.1]/'
  # upgrade from a previous installation
  DEPS_UPGRADE_REGEX='s/cabal-helper-0.5.3.0/cabal-helper-0.6.1.0/g'
  sed -i.bak "${DEPS_REGEX}" ${STACK_GLOBAL_CONFIG}
  sed -i.bak "${DEPS_UPGRADE_REGEX}" ${STACK_GLOBAL_CONFIG}
  rm -f ${STACK_GLOBAL_CONFIG}.bak

  msg "Installing helper binaries..."
  stack --resolver nightly-2015-12-08 install ghc-mod hdevtools hasktags codex hscope pointfree pointful hoogle stylish-haskell --verbosity warning ; RETCODE=$?
  [ ${RETCODE} -ne 0 ] && err "Binary installation failed with error ${RETCODE}. Aborting..."

  msg "Installing git-hscope..."
  cp ${HVN_DEST}/git-hscope ${STACK_BIN_PATH}

  msg "Building Hoogle database..."
  ${STACK_BIN_PATH}/hoogle data

  msg "Configuring codex to search in stack..."
  cat > $HOME/.codex <<EOF
hackagePath: $STACK_GLOBAL_DIR/indices/Hackage/
tagsFileHeader: false
tagsFileSorted: false
tagsCmd: hasktags --extendedctag --ignore-close-implementation --ctags --tags-absolute --output='\$TAGS' '\$SOURCES'
EOF

  ## Vim configuration steps

  if [ -e ~/.vim/colors ]; then
    msg "Preserving color scheme files..."
    cp -R ~/.vim/colors ${HVN_DEST}/colors
  fi

  today=`date +%Y%m%d_%H%M%S`
  msg "Backing up current vim config using timestamp ${today}..."
  [ ! -e ${HVN_DEST}/backup ] && mkdir ${HVN_DEST}/backup

  for i in .vim .vimrc .gvimrc; do [ -e ${HOME}/${i} ] && mv ${HOME}/${i} ${HVN_DEST}/backup/${i}.${today} && detail "${HVN_DEST}/backup/${i}.${today}"; done

  msg "Creating symlinks"
  detail "~/.vimrc -> ${HVN_DEST}/.vimrc"
  ln -sf ${HVN_DEST}/.vimrc ${HOME}/.vimrc
  detail "~/.vim   -> ${HVN_DEST}/.vim"
  ln -sf ${HVN_DEST}/.vim ${HOME}/.vim
  detail "${HVN_DEST}/.stack-bin -> ${STACK_BIN_PATH}"
  ln -sf ${STACK_BIN_PATH} ${HVN_DEST}/.stack-bin

  if [ ! -e ${HVN_DEST}/.vim/autoload/plug.vim ]; then
    msg "Installing vim-plug"
    curl -fLo ${HVN_DEST}/.vim/autoload/plug.vim --create-dirs \
      https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  fi

  msg "Installing plugins using vim-plug..."
  vim -E -u ${HVN_DEST}/.vimrc +PlugUpgrade +PlugUpdate +PlugClean! +qall

  msg "Setting git to use fully-pathed vim for messages..."
  git config --global core.editor $(which vim)

  echo -e "\n"
  msg "<---- HASKELL VIM NOW installation successfully finished ---->"
  echo -e "\n"

  warn "If you are using NeoVim"
  detail "Run ${HOME}/${HVN_DEST}/scripts/neovim.sh to backup your existing"
  detail "configuration and symlink the new one."

  warn "Note for a good-looking vim experience:"
  detail "Configure your terminal to use a font with Powerline symbols."
  detail "https://powerline.readthedocs.org/en/master/installation.html#fonts-installation"
}

#!/usr/bin/env bash

SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
. ${SCRIPT_DIR}/func.sh

setup() {
  # $1 - optional - path to haskell-vim-now installation
  #      If not set, script will use default location.
  unset HVN_DEST
  if [ -z $1 ] ; then
    # No argument provided, using default path
    HVN_DEST="$(config_home)/haskell-vim-now"
  else
    HVN_DEST=$1
  fi
  [ ! -e ${HVN_DEST} ] && exit_err "${HVN_DEST} doesn't exist! Install Haskell-Vim-Now first!"

  SYSTEM_TYPE=$(system_type)
  PACKAGE_MGR=$(package_manager)
  CONFIG_HOME=$(config_home)

  BREW_LIST="git make vim ctags"
  APT_LIST="git make vim libcurl4-openssl-dev exuberant-ctags fonts-powerline"
  YUM_LIST="git make vim ctags libcurl-devel zlib-devel powerline"

  if ! check_exist stack >/dev/null ; then
    err "Installer requires Stack."
    msg "Installation instructions: https://github.com/commercialhaskell/stack#how-to-install"
    exit 1
  fi

  msg "Installing system package dependencies..."
  case ${PACKAGE_MGR} in
    BREW )
      msg "Installing with homebrew..."
      brew install ${BREW_LIST}
      ;;
    APT )
      msg "Installing with apt-get..."
      sudo apt-get install -y ${APT_LIST}
      ;;
    DNF )
      msg "Installing with DNF..."
      sudo dnf install -yq ${YUM_LIST} # yum and dnf use same repos
      ;;
    YUM )
      msg "Installing with YUM..."
      sudo yum install -yq ${YUM_LIST}
      ;;
    OTHER )
      warn "No package manager detected. You may need to install required packages manually."
      ;;
    * )
      err "setup.sh is not configured to handle ${PACKAGE_MGR} manager! Aborting..."
      exit 1
  esac

  NOT_INSTALLED=$(check_exist ctags curl-config git make vim)
  [ ! -z ${NOT_INSTALLED} ] && exit_err "Installer requires '${NOT_INSTALLED}'. Please install and try again."

  VIM_VER=$(vim --version | sed -n 's/^.*IMproved \([^ ]*\).*$/\1/p')
  if ! verlte '7.4' ${VIM_VER} ; then
    warn "Detected vim version \"${VIM_VER}\""
    err "However version 7.4 or later is required. Aborting."
    exit 1
  fi

  if vim --version | grep -q +ruby 2>&1 ; then
    msg "Testing for broken Ruby interface in vim..."
    vim -T dumb --cmd "ruby puts RUBY_VERSION" --cmd qa! 1>/dev/null 2>/dev/null
    if [ $? -eq 0 ] ; then
      msg "Test passed. Ruby interface is OK."
    else
      err "The Ruby interface is broken on your installation of vim."
      err "Reinstall or recompile vim."
      msg "If you're on OS X, try the following:"
      detail "rvm use system"
      detail "brew reinstall vim"
      warn "If nothing helped, please report at https://github.com/begriffs/haskell-vim-now/issues"
      exit 1
    fi
  fi

  msg "Setting up GHC if needed..."
  stack setup --verbosity warning ; RETCODE=$?
  [ ${RETCODE} -ne 0 ] && exit_err "Stack setup failed with error ${RETCODE}. Aborting..."

  STACK_BIN_PATH=$(stack --verbosity 0 path --local-bin-path)
  STACK_GLOBAL_DIR=$(stack --verbosity 0 path --global-stack-root)
  STACK_GLOBAL_CONFIG=$(stack --verbosity 0 path --config-location)

  detail "Stack bin path: ${STACK_BIN_PATH}"
  detail "Stack global path: ${STACK_GLOBAL_DIR}"
  detail "Stack global config location: ${STACK_GLOBAL_CONFIG}"

  if [ -z ${STACK_BIN_PATH} ] || [ -z ${STACK_GLOBAL_DIR} ] || [ -z ${STACK_GLOBAL_CONFIG} ] ; then
    err "Incorrect stack paths."
    err "Please report at https://github.com/begriffs/haskell-vim-now/issues"
    err "Aborting..."
    exit 1
  fi

  msg "Adding extra stack deps if needed..."
  DEPS_REGEX='s/extra-deps: \[\]/extra-deps: [cabal-helper-0.6.1.0, pure-cdb-0.1.1]/'
  # upgrade from a previous installation
  DEPS_UPGRADE_REGEX='s/cabal-helper-0.5.3.0/cabal-helper-0.6.1.0/g'
  sed -i.bak "${DEPS_REGEX}" ${STACK_GLOBAL_CONFIG}
  sed -i.bak "${DEPS_UPGRADE_REGEX}" ${STACK_GLOBAL_CONFIG}
  rm -f ${STACK_GLOBAL_CONFIG}.bak

  msg "Installing helper binaries..."
  stack --resolver nightly-2015-12-08 install ghc-mod hdevtools hasktags codex hscope pointfree pointful hoogle stylish-haskell --verbosity warning ; RETCODE=$?
  [ ${RETCODE} -ne 0 ] && err "Binary installation failed with error ${RETCODE}. Aborting..."

  msg "Installing git-hscope..."
  cp ${HVN_DEST}/git-hscope ${STACK_BIN_PATH}

  msg "Building Hoogle database..."
  ${STACK_BIN_PATH}/hoogle data

  msg "Configuring codex to search in stack..."
  cat > $HOME/.codex <<EOF
hackagePath: $STACK_GLOBAL_DIR/indices/Hackage/
tagsFileHeader: false
tagsFileSorted: false
tagsCmd: hasktags --extendedctag --ignore-close-implementation --ctags --tags-absolute --output='\$TAGS' '\$SOURCES'
EOF

  ## Vim configuration steps

  if [ -e ~/.vim/colors ]; then
    msg "Preserving color scheme files..."
    cp -R ~/.vim/colors ${HVN_DEST}/colors
  fi

  today=`date +%Y%m%d_%H%M%S`
  msg "Backing up current vim config using timestamp ${today}..."
  [ ! -e ${HVN_DEST}/backup ] && mkdir ${HVN_DEST}/backup

  for i in .vim .vimrc .gvimrc; do [ -e ${HOME}/${i} ] && mv ${HOME}/${i} ${HVN_DEST}/backup/${i}.${today} && detail "${HVN_DEST}/backup/${i}.${today}"; done

  msg "Creating symlinks"
  detail "~/.vimrc -> ${HVN_DEST}/.vimrc"
  ln -sf ${HVN_DEST}/.vimrc ${HOME}/.vimrc
  detail "~/.vim   -> ${HVN_DEST}/.vim"
  ln -sf ${HVN_DEST}/.vim ${HOME}/.vim
  detail "${HVN_DEST}/.stack-bin -> ${STACK_BIN_PATH}"
  ln -sf ${STACK_BIN_PATH} ${HVN_DEST}/.stack-bin

  if [ ! -e ${HVN_DEST}/.vim/autoload/plug.vim ]; then
    msg "Installing vim-plug"
    curl -fLo ${HVN_DEST}/.vim/autoload/plug.vim --create-dirs \
      https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  fi

  msg "Installing plugins using vim-plug..."
  vim -E -u ${HVN_DEST}/.vimrc +PlugUpgrade +PlugUpdate +PlugClean! +qall

  msg "Setting git to use fully-pathed vim for messages..."
  git config --global core.editor $(which vim)

  echo -e "\n"
  msg "<---- HASKELL VIM NOW installation successfully finished ---->"
  echo -e "\n"

  detail "If you want to use HASKELL VIM NOW with Neovim, you can run ${HOME}/${HVN_DEST}/scripts/neovim.sh to backup your existing configuration and symlink the new one."

  warn "Note for a good-looking vim experience:"
  detail "Configure your terminal to use a font with Powerline symbols."
  detail "https://powerline.readthedocs.org/en/master/installation.html#fonts-installation"

}


Add script to set DYLD_LIBRARY_PATH.

Add script to set DYLD_LIBRARY_PATH.

#!/usr/bin/env bash

# Where to look for external installations.
EXTERNPATH=external

# Find paths to external installations.
INSTALLDIRS=`find $EXTERNPATH/* -name install`

# Add to LD_LIBRARY_PATH
for INSTALLDIR in ${INSTALLDIRS[@]}; do
    if [ -d $PWD/$INSTALLDIR/lib ]; then
	export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/$INSTALLDIR/lib
    fi
done

error: pathspec 'scripts/setup.sh' did not match any file(s) known to git


Add libyajl2

Add libyajl2

Signed-off-by: Brad Wilson <e855abcf3ae723040923ff22bff5eeee0c887281@gmail.com>

pkg_name=libyajl2
pkg_origin=core
pkg_version="2.1.0"
pkg_description="Yet Another JSON Library"
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=("ISC")
pkg_upstream_url="https://github.com/lloyd/yajl"
pkg_source="https://github.com/lloyd/yajl/archive/${pkg_version}.tar.gz"
pkg_dirname="yajl-${pkg_version}"
pkg_filename="${pkg_name}-${pkg_version}.tar.gz"
pkg_shasum="3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a"
pkg_deps=(core/glibc)
pkg_build_deps=(core/busybox-static core/cmake core/doxygen core/gcc core/make)
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
pkg_pconfig_dirs=(share/pkgconfig)

do_install() {
  for type in bin include lib share; do
    cp -r ${CACHE_PATH}/build/yajl-${pkg_version}/${type} ${pkg_prefix};
  done
}

error: pathspec 'libyajl2/plan.sh' did not match any file(s) known to git


change version (#43)

change version (#43)

change Palo version to 0.8.0

#!/usr/bin/env bash

# Modifications copyright (C) 2017, Baidu.com, Inc.
# Copyright 2017 The Apache Software Foundation

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

##############################################################
# the script generates src/be/src/common/version.h and
# src/fe/src/com/cloudera/PALO/common/Version.java which
# contains the build version based on the git hash or svn revision.
##############################################################

build_version="0.8.0"

unset LANG
unset LC_CTYPE

user=`whoami`
date=`date +"%a, %d %b %Y %H:%M:%S %Z"`
hostname=`hostname`

cwd=`pwd`

if [ -z ${PALO_HOME+x} ]
then
    ROOT=`dirname "$0"`
    ROOT=`cd "$ROOT"; pwd`
    PALO_HOME=${ROOT}/../..
    echo "PALO_HOME: ${PALO_HOME}"
fi

if [[ ${RUN_BE_TEST} == 1 ]]; then
    if [ -e ${PALO_HOME}/gensrc/build/java/com/baidu/palo/common/Version.java \
         -a -e ${PALO_HOME}/gensrc/build/gen_cpp/version.h ]; then
        exit
    fi
fi

cd ${PALO_HOME}
if [ -d .svn ]; then
    revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
    url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
    if echo ${url} | grep '\/tags\/' > /dev/null
    then
        build_version="`echo ${url} | sed 's/.*_\([0-9-]\+\)_PD_BL.*/\1/g' | sed 's/-/\./g'`"
    fi
elif [ -d .git ]; then
    revision=`git log -1 --pretty=format:"%H"`
    url="git://${hostname}${PALO_HOME}"
else
    revision="Unknown"
    url="file://${PALO_HOME}"
fi

cd ${cwd}

build_hash="${url}@${revision}"
build_time="${date}"
build_info="${user}@${hostname}"

VERSION_PACKAGE="${PALO_HOME}/gensrc/build/java/com/baidu/palo/common"
mkdir -p ${VERSION_PACKAGE}
cat >"${VERSION_PACKAGE}/Version.java" <<EOF
// Modifications copyright (C) 2017, Baidu.com, Inc.
// Copyright 2017 The Apache Software Foundation

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

package com.baidu.palo.common;

// This is a generated file, DO NOT EDIT IT.
// To change this file, see palo/src/common/version-info
// the file should be placed in src/java/com/baidu/palo/common/Version.java

public class Version {

  public static final String PALO_BUILD_VERSION = "${build_version}";
  public static final String PALO_BUILD_HASH = "${build_hash}";
  public static final String PALO_BUILD_TIME = "${build_time}";
  public static final String PALO_BUILD_INFO = "${build_info}";

  public static void main(String[] args) {
    System.out.println("palo_build_version: " + PALO_BUILD_VERSION);
    System.out.println("palo_build_hash: " + PALO_BUILD_HASH);
    System.out.println("palo_build_time: " + PALO_BUILD_TIME);
    System.out.println("palo_build_info: " + PALO_BUILD_INFO);
  }

}
EOF

GEN_CPP_DIR=${PALO_HOME}/gensrc/build/gen_cpp/
mkdir -p ${GEN_CPP_DIR}
cat >"${GEN_CPP_DIR}/version.h" <<EOF
// Modifications copyright (C) 2017, Baidu.com, Inc.
// Copyright 2017 The Apache Software Foundation

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

// This is a generated file, DO NOT EDIT IT.
// To change this file, see bin/gen_build_version.sh
// the file should be placed in src/be/src/common/version.h

#ifndef PALO_GEN_CPP_VERSION_H
#define PALO_GEN_CPP_VERSION_H

namespace palo {

#define PALO_BUILD_VERSION "${build_version}"
#define PALO_BUILD_HASH    "${build_hash}"
#define PALO_BUILD_TIME    "${build_time}"
#define PALO_BUILD_INFO    "${build_info}"

} // namespace palo

#endif
EOF

#!/usr/bin/env bash

# Modifications copyright (C) 2017, Baidu.com, Inc.
# Copyright 2017 The Apache Software Foundation

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

##############################################################
# the script generates src/be/src/common/version.h and
# src/fe/src/com/cloudera/PALO/common/Version.java which
# contains the build version based on the git hash or svn revision.
##############################################################

build_version="2.1.0.0"

unset LANG
unset LC_CTYPE

user=`whoami`
date=`date +"%a, %d %b %Y %H:%M:%S %Z"`
hostname=`hostname`

cwd=`pwd`

if [ -z ${PALO_HOME+x} ]
then
    ROOT=`dirname "$0"`
    ROOT=`cd "$ROOT"; pwd`
    PALO_HOME=${ROOT}/../..
    echo "PALO_HOME: ${PALO_HOME}"
fi

if [[ ${RUN_BE_TEST} == 1 ]]; then
    if [ -e ${PALO_HOME}/gensrc/build/java/com/baidu/palo/common/Version.java \
         -a -e ${PALO_HOME}/gensrc/build/gen_cpp/version.h ]; then
        exit
    fi
fi

cd ${PALO_HOME}
if [ -d .svn ]; then
    revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
    url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
    if echo ${url} | grep '\/tags\/' > /dev/null
    then
        build_version="`echo ${url} | sed 's/.*_\([0-9-]\+\)_PD_BL.*/\1/g' | sed 's/-/\./g'`"
    fi
elif [ -d .git ]; then
    revision=`git log -1 --pretty=format:"%H"`
    url="git://${hostname}${PALO_HOME}"
else
    revision="Unknown"
    url="file://${PALO_HOME}"
fi

cd ${cwd}

build_hash="${url}@${revision}"
build_time="${date}"
build_info="${user}@${hostname}"

VERSION_PACKAGE="${PALO_HOME}/gensrc/build/java/com/baidu/palo/common"
mkdir -p ${VERSION_PACKAGE}
cat >"${VERSION_PACKAGE}/Version.java" <<EOF
// Modifications copyright (C) 2017, Baidu.com, Inc.
// Copyright 2017 The Apache Software Foundation

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

package com.baidu.palo.common;

// This is a generated file, DO NOT EDIT IT.
// To change this file, see palo/src/common/version-info
// the file should be placed in src/java/com/baidu/palo/common/Version.java

public class Version {

  public static final String PALO_BUILD_VERSION = "${build_version}";
  public static final String PALO_BUILD_HASH = "${build_hash}";
  public static final String PALO_BUILD_TIME = "${build_time}";
  public static final String PALO_BUILD_INFO = "${build_info}";

  public static void main(String[] args) {
    System.out.println("palo_build_version: " + PALO_BUILD_VERSION);
    System.out.println("palo_build_hash: " + PALO_BUILD_HASH);
    System.out.println("palo_build_time: " + PALO_BUILD_TIME);
    System.out.println("palo_build_info: " + PALO_BUILD_INFO);
  }

}
EOF

GEN_CPP_DIR=${PALO_HOME}/gensrc/build/gen_cpp/
mkdir -p ${GEN_CPP_DIR}
cat >"${GEN_CPP_DIR}/version.h" <<EOF
// Modifications copyright (C) 2017, Baidu.com, Inc.
// Copyright 2017 The Apache Software Foundation

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

// This is a generated file, DO NOT EDIT IT.
// To change this file, see bin/gen_build_version.sh
// the file should be placed in src/be/src/common/version.h

#ifndef PALO_GEN_CPP_VERSION_H
#define PALO_GEN_CPP_VERSION_H

namespace palo {

#define PALO_BUILD_VERSION "${build_version}"
#define PALO_BUILD_HASH    "${build_hash}"
#define PALO_BUILD_TIME    "${build_time}"
#define PALO_BUILD_INFO    "${build_info}"

} // namespace palo

#endif
EOF


Add nodemon

Add nodemon

fatal: remote error: upload-pack: not our ref 14023379d4840b405b52b39cd89762ceb00577ac
fatal: the remote end hung up unexpectedly


missed a fi

missed a fi

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/hipages/travis-tools.git/'


what is creating this file

what is creating this file


Added checkenv.sh script to repo.

Added checkenv.sh script to repo.

#!/bin/bash

# Functions ==============================================

# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
# set to 0 if not found
type $1 >/dev/null 2>&1 || { local return_=0; }
# return value
echo "$return_"
        }

        # return 1 if local npm package is installed at ./node_modules, else 0
        # example
        # echo "gruntacular : $(npm_package_is_installed gruntacular)"
        function npm_package_is_installed {
        # set to 1 initially
        local return_=1
        # set to 0 if not found
        ls node_modules | grep $1 >/dev/null 2>&1 || { local return_=0; }
        # return value
        echo "$return_"
    }

    # display a message in red with a cross by it
    # example
    # echo echo_fail "No"
    function echo_fail {
    # echo first argument in red
    printf "\e[31m✘ ${1}"
    # reset colours back to normal
    echo "\033[0m"
}

# display a message in green with a tick by it
# example
# echo echo_fail "Yes"
function echo_pass {
# echo first argument in green
printf "\e[32m✔ ${1}"
# reset colours back to normal
echo "\033[0m"
                        }

                        # echo pass or fail
                        # example
                        # echo echo_if 1 "Passed"
                        # echo echo_if 0 "Failed"
                        function echo_if {
                        if [ $1 == 1 ]; then
                            echo_pass $2
                        else
                            echo_fail $2
                        fi
                    }

                    # ============================================== Functions

                    # command line programs
                    echo "node          $(echo_if $(program_is_installed node))"
                    echo "grunt         $(echo_if $(program_is_installed grunt))"
                    echo "testacular    $(echo_if $(program_is_installed testacular))"
                    echo "uglifyjs      $(echo_if $(program_is_installed uglifyjs))"
                    echo "requirejs     $(echo_if $(program_is_installed r.js))"
                    echo "lodash        $(echo_if $(program_is_installed lodash))"
                    echo "gem           $(echo_if $(program_is_installed gem))"

                    # local npm packages
                    echo "grunt-shell   $(echo_if $(npm_package_is_installed grunt-shell))"
                    echo "grunt-hashres $(echo_if $(npm_package_is_installed grunt-hashres))"
                    echo "gruntacular   $(echo_if $(npm_package_is_installed gruntacular))"

error: pathspec 'checkenv.sh' did not match any file(s) known to git


Added custom classifier and top1 will now be top1 from custom classifier iff specified as VR_CLASSIFIER for each device

fatal: remote error: upload-pack: not our ref c864186046a07c2938df0f4519ec3a82a74d4088
fatal: the remote end hung up unexpectedly


Wrong order w.r.t. quotations and colons for JSON

fatal: remote error: upload-pack: not our ref c280f4c390f70ec3a4e04a76ea46c1fc05700f2a
fatal: the remote end hung up unexpectedly


Short script to download the latest data from my ForeRunner 110 and convert it to GPX

#!/usr/bin/zsh

function die(){
    fmt="$1"
    shift

    printf "${fmt}\n" "$@"
    exit 1
}

function main(){
    gapath=/run/media/conrad/GARMIN/Garmin/Activities
    hgpath="$HOME/docs/run"

    cd "$gapath" || die "Couldn't find activities directory: %s" "$gapath"

    fitname="`ls -htr | tail -n1`"
    if ! ( echo "$fitname" | grep -q ".fit" ) ; then
        die "No activity file present?!"
    fi

    if [ -f "$hgpath/garmin/${fitname}" ]; then
        die "Already copied latest activity"
    fi

    cp "$fitname" "$hgpath/garmin/" || die "Couldn't copy activity"

    date="${fitname/.fit/}"
    cd "$hgpath" || die "Couldn't find run directory?!"

    gpsbabel -i garmin_fit -f "garmin/${date}.fit" -o gpx -F "gpx/${date}.gpx" \
        || die "gpsbabel failed"
}

main


bash: Generate base64 string

bash: Generate base64 string

fatal: remote error: upload-pack: not our ref 020f2cff85a2c482ae40f8aa33c64df3b61f681a
fatal: the remote end hung up unexpectedly


fixed deploy bug

fixed deploy bug

#!/bin/bash
REDIS_HOST=${REDIS_HOST:-localhost}
REDIS_PORT=${REDIS_PORT:-6379}
DB_TYPE=${DB_TYPE:-sqlite3}
DB_NAME=${DB_NAME:-shipyard.db}
DB_USER=${DB_USER:-}
DB_PASS=${DB_PASS:-}
DB_HOST=${DB_HOST:-}
DB_PORT=${DB_PORT:-}
VE_DIR=/opt/ve/shipyard
EXTRA_CMD=${EXTRA_CMD:-}
EXTRA_REQUIREMENTS=${EXTRA_REQUIREMENTS:-}
CONFIG=/opt/apps/shipyard/shipyard/local_settings.py
SKIP_DEPLOY=${SKIP_DEPLOY:-}
REVISION=${REVISION:-master}
cd /opt/apps/shipyard
echo "REDIS_HOST=\"$REDIS_HOST\"" > $CONFIG
echo "REDIS_PORT=$REDIS_PORT" >> $CONFIG
cat << EOF >> $CONFIG
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.${DB_TYPE}',
        'NAME': '${DB_NAME}',
        'USER': '${DB_USER}',
        'PASSWORD': '${DB_PASS}',
        'HOST': '${DB_HOST}',
        'PORT': '${DB_PORT}',
    }
}
EOF
if [ -z "$SKIP_DEPLOY" ] ; then
    git fetch
    git branch --track $REVISION origin/$REVISION
    git checkout --force $REVISION
    git pull --ff-only origin $REVISION
fi
if [ ! -z "$EXTRA_CMD" ]; then
    /bin/bash -c "$EXTRA_CMD"
fi
$VE_DIR/bin/pip install -r requirements.txt
if [ ! -z "$EXTRA_REQUIREMENTS" ]; then
    $VE_DIR/bin/pip install $EXTRA_REQUIREMENTS
fi
$VE_DIR/bin/python manage.py syncdb --noinput
$VE_DIR/bin/python manage.py migrate --noinput
$VE_DIR/bin/python manage.py create_api_keys
supervisord -c /opt/apps/shipyard/.docker/supervisor.conf -n

#!/bin/bash
REDIS_HOST=${REDIS_HOST:-localhost}
REDIS_PORT=${REDIS_PORT:-6379}
DB_TYPE=${DB_TYPE:-sqlite3}
DB_NAME=${DB_NAME:-shipyard.db}
DB_USER=${DB_USER:-}
DB_PASS=${DB_PASS:-}
DB_HOST=${DB_HOST:-}
DB_PORT=${DB_PORT:-}
VE_DIR=/opt/ve/shipyard
EXTRA_CMD=${EXTRA_CMD:-}
EXTRA_REQUIREMENTS=${EXTRA_REQUIREMENTS:-}
CONFIG=/opt/apps/shipyard/shipyard/local_settings.py
cd /opt/apps/shipyard
echo "REDIS_HOST=\"$REDIS_HOST\"" > $CONFIG
echo "REDIS_PORT=$REDIS_PORT" >> $CONFIG
cat << EOF >> $CONFIG
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.${DB_TYPE}',
        'NAME': '${DB_NAME}',
        'USER': '${DB_USER}',
        'PASSWORD': '${DB_PASS}',
        'HOST': '${DB_HOST}',
        'PORT': '${DB_PORT}',
    }
}
EOF
git pull origin master --rebase
if [ ! -z "$EXTRA_CMD" ]; then
    /bin/bash -c "$EXTRA_CMD"
fi
$VE_DIR/bin/pip install -r requirements.txt
if [ ! -z "$EXTRA_REQUIREMENTS" ]; then
    $VE_DIR/bin/pip install $EXTRA_REQUIREMENTS
fi
$VE_DIR/bin/python manage.py syncdb --noinput
$VE_DIR/bin/python manage.py migrate --noinput
$VE_DIR/bin/python manage.py create_api_keys
supervisord -c /opt/apps/shipyard/.docker/supervisor.conf -n


Add add.bats.

Add add.bats.

#!/usr/bin/env bats

load test_helper

# `hosts add` #################################################################

@test "\`add\` with no arguments exits with status 1." {
  run "$_HOSTS" add
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ $status -eq 1 ]]
}

@test "\`add\` with no argument does not change the hosts file." {
  _original="$(cat "${HOSTS_PATH}")"

  run "$_HOSTS" add
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "$(cat "${HOSTS_PATH}")" == "${_original}" ]]
}

@test "\`add\` with no arguments prints help information." {
  run "$_HOSTS" add
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "${lines[0]}" == "Usage:" ]]
  [[ "${lines[1]}" == "  hosts add <ip> <hostname> [comment]" ]]
}

# `hosts add <ip>` ############################################################

@test "\`add <ip>\` exits with status 1." {
  run "$_HOSTS" add 0.0.0.0
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ $status -eq 1 ]]
}

@test "\`add <ip>\` does not change the hosts file." {
  _original="$(cat "${HOSTS_PATH}")"

  run "$_HOSTS" add 0.0.0.0
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "$(cat "${HOSTS_PATH}")" == "${_original}" ]]
}

@test "\`add <ip>\` prints help information." {
  run "$_HOSTS" add 0.0.0.0
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "${lines[0]}" == "Please include a hostname" ]]
  [[ "${lines[1]}" == "Usage:" ]]
  [[ "${lines[2]}" == "  hosts add <ip> <hostname> [comment]" ]]
}

# `hosts add <ip> <hostname>` #################################################

@test "\`add <ip> <hostname>\` exits with status 0." {
  run "$_HOSTS" add 0.0.0.0 example.com
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ $status -eq 0 ]]
}

@test "\`add <ip> <hostname>\` adds the entry to the hosts file." {
  _original="$(cat "${HOSTS_PATH}")"

  run "$_HOSTS" add 0.0.0.0 example.com
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  _compare "${_original}" "$(cat "${HOSTS_PATH}")"
  _compare '0.0.0.0	example.com' "$(sed -n '11p' "${HOSTS_PATH}")"
  [[ "$(cat "${HOSTS_PATH}")" != "${_original}" ]]
  [[ "$(sed -n '11p' "${HOSTS_PATH}")" == "0.0.0.0	example.com" ]]
}

@test "\`add <ip> <hostname>\` prints feedback." {
  run "$_HOSTS" add 0.0.0.0 example.com
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "${lines[0]}" == "Added:" ]]
  [[ "${lines[1]}" == "0.0.0.0	example.com" ]]
}

# `hosts add <ip> <hostname> [comment]` #######################################

@test "\`add <ip> <hostname> [comment]\` exits with status 0." {
  run "$_HOSTS" add 0.0.0.0 example.com 'Comment.'
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ $status -eq 0 ]]
}

@test "\`add <ip> <hostname> [comment]\` adds the entry to the hosts file." {
  _original="$(cat "${HOSTS_PATH}")"

  run "$_HOSTS" add 0.0.0.0 example.com 'Comment.'
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "$(cat "${HOSTS_PATH}")" != "${_original}" ]]
  [[ "$(sed -n '11p' "${HOSTS_PATH}")" == "0.0.0.0	example.com	# Comment." ]]
}

@test "\`add <ip> <hostname> [comment]\` prints feedback." {
  run "$_HOSTS" add 0.0.0.0 example.com 'Comment.'
  printf "\$status: %s\n" "$status"
  printf "\$output: '%s'\n" "$output"
  [[ "${lines[0]}" == "Added:" ]]
  [[ "${lines[1]}" == "0.0.0.0	example.com	# Comment." ]]
}

error: pathspec 'test/add.bats' did not match any file(s) known to git


update

update

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/neurobin/test.git/'


Update build file

Update build file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xfournet/sandbox.git/'


Update setup.sh

Update setup.sh

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/xe1gyq/openstack.git/'


SpyBug: add script for full run

SpyBug: add script for full run

#!/bin/bash
# spybug.sh, Norbert Manthey, 2017, LGPL v2, see LICENSE
#
# This script runs Riss in combination with SpyBug to check for problems with
# parameter combinations. The first parameter to the script is the timeout to
# run the analysis. It defaults to 15 minutes.

# fail early
set -e -u

# by default, run 900 seconds
TIMEOUT=900
[ "$#" -lt 1 ] || TIMEOUT=$1

ROOTDIR="$(git rev-parse --show-toplevel)"
if [ -z "$ROOTDIR" ]
then
	echo "error: not called from within a git repository"
	exit 1
fi

cd "$ROOTDIR"

if [ ! -x build/bin/riss-core ]
then
	echo "error: cannot find a riss executable 'build/bin/riss-core'"
	exit 1
fi

# check whether all tools are installed
echo
echo "Install tool dependencies ..."
pushd tools
	if [ -d spybug ]
	then
		cd spybug
		git pull origin master
		cd ..
	else
		git clone https://bitbucket.org/mlindauer/spybug.git
	fi
	pip install numpy --user
	pip install git+https://github.com/automl/ParameterConfigSpace.git --user
	pip install git+https://github.com/automl/pysmac --user
popd

echo
echo "Prepare the PCS File ..."
pushd tools/spybug-files
	ln -sf ../../build/bin/riss-core riss || true
	./riss -config= -pcs-file=riss.pcs
popd

# Running (from the example directory of SpyBug, because there all files are
# present already.
echo
echo "Run SpyBug for $TIMEOUT seconds ..."
pushd tools/spybug/example/
	python ../SpyBug.py --scenario ../../spybug-files/spybug_scenario.txt --n 100000 --time_limit $TIMEOUT
popd

error: pathspec 'tools/spybug-files/spybug.sh' did not match any file(s) known to git


Add admiral-config.js to updateadmiralfiles.sh

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tectronics/admiral-jiscmrd.git/'


Empty script for oarsub

Empty script for oarsub

git-svn-id: 9146c88ff6d39b48099bf954d15d68f687b3fa69@1781 28e8926c-6b08-0410-baaa-805c5e19b8d6

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lpellegr/scheduling.git/'