added logic to check if TEST_URL is already defined

#!/bin/bash

#********************************************************************************
# Copyright 2014 IBM
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed 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
#********************************************************************************

#############
# Colors    #
#############
export green='\e[0;32m'
export red='\e[0;31m'
export label_color='\e[0;33m'
export no_color='\e[0m' # No Color

##################################################
# Simple function to only run command if DEBUG=1 #
### ###############################################
debugme() {
  [[ $DEBUG = 1 ]] && "$@" || :
}

set +e
set +x
##################################################
# capture packages that on the originial container
##################################################
if [[ $DEBUG -eq 1 ]]; then
    dpkg -l | grep '^ii' > $EXT_DIR/pkglist
fi

###############################
# Configure extension PATH    #
###############################
if [ -n $EXT_DIR ]; then
    export PATH=$EXT_DIR:$PATH
fi
##############################
# Configure extension LIB    #
##############################
if [ -z $GAAS_LIB ]; then
    export GAAS_LIB="${EXT_DIR}/lib"
fi

################################
# Setup archive information    #
################################
if [ -z $WORKSPACE ]; then
    echo -e "${red}Please set WORKSPACE in the environment${no_color}"
    ${EXT_DIR}/print_help.sh
    exit 1
fi

if [ -z $ARCHIVE_DIR ]; then
    echo "${label_color}ARCHIVE_DIR was not set, setting to WORKSPACE/archive ${no_color}"
    export ARCHIVE_DIR="${WORKSPACE}"
fi

if [ -d $ARCHIVE_DIR ]; then
  echo "Archiving to $ARCHIVE_DIR"
else
  echo "Creating archive directory $ARCHIVE_DIR"
  mkdir $ARCHIVE_DIR
fi
export LOG_DIR=$ARCHIVE_DIR

#############################
# Install Cloud Foundry CLI #
#############################
#pushd .
#echo "Installing Cloud Foundry CLI"
#cd $EXT_DIR
#mkdir bin
#cd bin
#curl --silent -o cf-linux-amd64.tgz -v -L https://cli.run.pivotal.io/stable?release=linux64-binary &>/dev/null
#gunzip cf-linux-amd64.tgz &> /dev/null
#tar -xvf cf-linux-amd64.tar  &> /dev/null
#
#cf help &> /dev/null
#RESULT=$?
#if [ $RESULT -ne 0 ]; then
#    echo "Cloud Foundry CLI not already installed, adding CF to PATH"
#    export PATH=$PATH:$EXT_DIR/bin
#else
#    echo 'Cloud Foundry CLI already available in container.  Latest CLI version available in ${EXT_DIR}/bin'
#fi
#
## check that we are logged into cloud foundry correctly
#cf spaces
#RESULT=$?
#if [ $RESULT -ne 0 ]; then
#    echo -e "${red}Failed to check cf spaces to confirm login${no_color}"
#    exit $RESULT
#else
#    echo -e "${green}Successfully logged into IBM Bluemix${no_color}"
#fi
#popd
#
#export container_cf_version=$(cf --version)
#export latest_cf_version=$(${EXT_DIR}/bin/cf --version)
#echo "Container Cloud Foundry CLI Version: ${container_cf_version}"
#echo "Latest Cloud Foundry CLI Version: ${latest_cf_version}"

################################
# get the extensions utilities #
################################
pushd . >/dev/null
cd $EXT_DIR
git clone https://github.com/Osthanes/utilities.git utilities
popd >/dev/null

#############################################
# Capture packages installed on the container
#############################################
if [[ $DEBUG -eq 1 ]]; then
    dpkg -l | grep '^ii' > $EXT_DIR/pkglist2
    diff $EXT_DIR/pkglist $EXT_DIR/pkglist2
fi

#############################################
# Set app name and test url
#############################################
if [ -z "$TEST_URL" ]; then
    URL=$(cf app $CF_APP_NAME | grep 'urls:' | awk '{print $2}' | cut -d '*' -f 2)
    if [[ "$URL" =~ ','$ ]]; then
        URL="${URL%?}"
    fi
    if [ -z "$URL" ]; then
        #do nothing
        echo "No app name to pull..."
        exit 1
    else
        TEST_URL="https://$URL"
        export TEST_URL
    fi
fi

#!/bin/bash

#********************************************************************************
# Copyright 2014 IBM
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed 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
#********************************************************************************

#############
# Colors    #
#############
export green='\e[0;32m'
export red='\e[0;31m'
export label_color='\e[0;33m'
export no_color='\e[0m' # No Color

##################################################
# Simple function to only run command if DEBUG=1 #
### ###############################################
debugme() {
  [[ $DEBUG = 1 ]] && "$@" || :
}

set +e
set +x
##################################################
# capture packages that on the originial container
##################################################
if [[ $DEBUG -eq 1 ]]; then
    dpkg -l | grep '^ii' > $EXT_DIR/pkglist
fi

###############################
# Configure extension PATH    #
###############################
if [ -n $EXT_DIR ]; then
    export PATH=$EXT_DIR:$PATH
fi
##############################
# Configure extension LIB    #
##############################
if [ -z $GAAS_LIB ]; then
    export GAAS_LIB="${EXT_DIR}/lib"
fi

################################
# Setup archive information    #
################################
if [ -z $WORKSPACE ]; then
    echo -e "${red}Please set WORKSPACE in the environment${no_color}"
    ${EXT_DIR}/print_help.sh
    exit 1
fi

if [ -z $ARCHIVE_DIR ]; then
    echo "${label_color}ARCHIVE_DIR was not set, setting to WORKSPACE/archive ${no_color}"
    export ARCHIVE_DIR="${WORKSPACE}"
fi

if [ -d $ARCHIVE_DIR ]; then
  echo "Archiving to $ARCHIVE_DIR"
else
  echo "Creating archive directory $ARCHIVE_DIR"
  mkdir $ARCHIVE_DIR
fi
export LOG_DIR=$ARCHIVE_DIR

#############################
# Install Cloud Foundry CLI #
#############################
#pushd .
#echo "Installing Cloud Foundry CLI"
#cd $EXT_DIR
#mkdir bin
#cd bin
#curl --silent -o cf-linux-amd64.tgz -v -L https://cli.run.pivotal.io/stable?release=linux64-binary &>/dev/null
#gunzip cf-linux-amd64.tgz &> /dev/null
#tar -xvf cf-linux-amd64.tar  &> /dev/null
#
#cf help &> /dev/null
#RESULT=$?
#if [ $RESULT -ne 0 ]; then
#    echo "Cloud Foundry CLI not already installed, adding CF to PATH"
#    export PATH=$PATH:$EXT_DIR/bin
#else
#    echo 'Cloud Foundry CLI already available in container.  Latest CLI version available in ${EXT_DIR}/bin'
#fi
#
## check that we are logged into cloud foundry correctly
#cf spaces
#RESULT=$?
#if [ $RESULT -ne 0 ]; then
#    echo -e "${red}Failed to check cf spaces to confirm login${no_color}"
#    exit $RESULT
#else
#    echo -e "${green}Successfully logged into IBM Bluemix${no_color}"
#fi
#popd
#
#export container_cf_version=$(cf --version)
#export latest_cf_version=$(${EXT_DIR}/bin/cf --version)
#echo "Container Cloud Foundry CLI Version: ${container_cf_version}"
#echo "Latest Cloud Foundry CLI Version: ${latest_cf_version}"

################################
# get the extensions utilities #
################################
pushd . >/dev/null
cd $EXT_DIR
git clone https://github.com/Osthanes/utilities.git utilities
popd >/dev/null

#############################################
# Capture packages installed on the container
#############################################
if [[ $DEBUG -eq 1 ]]; then
    dpkg -l | grep '^ii' > $EXT_DIR/pkglist2
    diff $EXT_DIR/pkglist $EXT_DIR/pkglist2
fi

#############################################
# Set app name and test url
#############################################
URL=$(cf app $CF_APP_NAME | grep 'urls:' | awk '{print $2}' | cut -d '*' -f 2)
if [[ "$URL" =~ ','$ ]]; then
    URL="${URL%?}"
fi
if [ -z "$URL" ]; then
    #do nothing
    echo "No app name to pull..."
else
    TEST_URL="https://$URL"
    export TEST_URL
fi


Don't need that anymore. Needed it to migrate from old PictShare storage system

cd originals/
for f in *
do
 echo "Processing $f"

 mkdir ../upload/$f
 cp $f ../upload/$f/$f
done


a file to hold the bash aliases

a file to hold the bash aliases

#!/usr/bin/env bash
alias bc='bc -l'
alias dcd='docker-compose down'
alias dcr='dcd && dcu'
alias dcu='docker-compose up'
alias dps='docker ps'
alias gb='git branch -a'
alias gp='git remote prune origin'
alias ll='ls -al'
alias vd='vagrant destroy -f'
alias vr='vd && vu'
alias vs='vagrant status'
alias vssh='vagrant ssh'
alias vu='time vagrant up'

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


changed the download version of protobuf to 3.6.0

#!/bin/bash
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by 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.
# ==============================================================================

set -e

DOWNLOADS_DIR=tensorflow/contrib/makefile/downloads
BZL_FILE_PATH=tensorflow/workspace.bzl

# Ensure it is being run from repo root
if [ ! -f $BZL_FILE_PATH ]; then
  echo "Could not find ${BZL_FILE_PATH}":
  echo "Likely you are not running this from the root directory of the repository.";
  exit 1;
fi

EIGEN_URL="$(grep -o 'http.*bitbucket.org/eigen/eigen/get/.*tar\.gz' "${BZL_FILE_PATH}" | grep -v mirror.bazel | head -n1)"
GEMMLOWP_URL="$(grep -o 'https://mirror.bazel.build/github.com/google/gemmlowp/.*zip' "${BZL_FILE_PATH}" | head -n1)"
GOOGLETEST_URL="https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
NSYNC_URL="$(grep -o 'https://mirror.bazel.build/github.com/google/nsync/.*tar\.gz' "${BZL_FILE_PATH}" | head -n1)"
# Note: The Protobuf source in `tensorflow/workspace.bzl` in TensorFlow
# 1.10 branch does not work. `make distclean` fails and blocks the build
# process. For now we're hardcoding to the version which is used by
# TensorFlow 1.9.
PROTOBUF_URL="https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz"
# TODO (yongtang): Replace the following with 'https://mirror.bazel.build/github.com/google/re2/.*tar\.gz' once
# the archive has been propagated in mirror.bazel.build.
RE2_URL="$(grep -o 'https://github.com/google/re2/.*tar\.gz' "${BZL_FILE_PATH}" | head -n1)"
FFT2D_URL="$(grep -o 'http.*fft\.tgz' "${BZL_FILE_PATH}" | grep -v bazel-mirror | head -n1)"
DOUBLE_CONVERSION_URL="$(grep -o "https.*google/double-conversion.*\.zip" "${BZL_FILE_PATH}" | head -n1)"
ABSL_URL="$(grep -o 'https://github.com/abseil/abseil-cpp/.*tar.gz' "${BZL_FILE_PATH}" | head -n1)"
CUB_URL="$(grep -o 'https.*cub/archive.*zip' "${BZL_FILE_PATH}" | grep -v mirror.bazel | head -n1)"

# Required for TensorFlow Lite Flex runtime.
FARMHASH_URL="https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz"
FLATBUFFERS_URL="https://github.com/google/flatbuffers/archive/1f5eae5d6a135ff6811724f6c57f911d1f46bb15.tar.gz"

# TODO(petewarden): Some new code in Eigen triggers a clang bug with iOS arm64,
#                   so work around it by patching the source.
replace_by_sed() {
  local regex="${1}"
  shift
  # Detect the version of sed by the return value of "--version" flag. GNU-sed
  # supports "--version" while BSD-sed doesn't.
  if ! sed --version >/dev/null 2>&1; then
    # BSD-sed.
    sed -i '' -e "${regex}" "$@"
  else
    # GNU-sed.
    sed -i -e "${regex}" "$@"
  fi
}

download_and_extract() {
  local usage="Usage: download_and_extract URL DIR"
  local url="${1:?${usage}}"
  local dir="${2:?${usage}}"
  echo "downloading ${url}" >&2
  mkdir -p "${dir}"
  if [[ "${url}" == *gz ]]; then
    curl -Ls "${url}" | tar -C "${dir}" --strip-components=1 -xz
  elif [[ "${url}" == *zip ]]; then
    tempdir=$(mktemp -d)
    tempdir2=$(mktemp -d)
    if [[ "$OSTYPE" == "darwin"* ]]; then
      # macOS (AKA darwin) doesn't have wget.
      (cd "${tempdir}"; curl --remote-name --silent --location "${url}")
    else
      wget -P "${tempdir}" "${url}"
    fi
    unzip "${tempdir}"/* -d "${tempdir2}"
    # unzip has no strip components, so unzip to a temp dir, and move the files
    # we want from the tempdir to destination.
    cp -R "${tempdir2}"/*/* "${dir}"/
    rm -rf "${tempdir2}" "${tempdir}"
  fi

  # Delete any potential BUILD files, which would interfere with Bazel builds.
  find "${dir}" -type f -name '*BUILD' -delete
}

download_and_extract "${EIGEN_URL}" "${DOWNLOADS_DIR}/eigen"
download_and_extract "${GEMMLOWP_URL}" "${DOWNLOADS_DIR}/gemmlowp"
download_and_extract "${GOOGLETEST_URL}" "${DOWNLOADS_DIR}/googletest"
download_and_extract "${NSYNC_URL}" "${DOWNLOADS_DIR}/nsync"
download_and_extract "${PROTOBUF_URL}" "${DOWNLOADS_DIR}/protobuf"
download_and_extract "${RE2_URL}" "${DOWNLOADS_DIR}/re2"
download_and_extract "${FFT2D_URL}" "${DOWNLOADS_DIR}/fft2d"
download_and_extract "${DOUBLE_CONVERSION_URL}" "${DOWNLOADS_DIR}/double_conversion"
download_and_extract "${ABSL_URL}" "${DOWNLOADS_DIR}/absl"
download_and_extract "${CUB_URL}" "${DOWNLOADS_DIR}/cub/external/cub_archive"

# Required for TensorFlow Lite Flex runtime.
download_and_extract "${FARMHASH_URL}" "${DOWNLOADS_DIR}/farmhash"
download_and_extract "${FLATBUFFERS_URL}" "${DOWNLOADS_DIR}/flatbuffers"

replace_by_sed 's#static uint32x4_t p4ui_CONJ_XOR = vld1q_u32( conj_XOR_DATA );#static uint32x4_t p4ui_CONJ_XOR; // = vld1q_u32( conj_XOR_DATA ); - Removed by script#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
replace_by_sed 's#static uint32x2_t p2ui_CONJ_XOR = vld1_u32( conj_XOR_DATA );#static uint32x2_t p2ui_CONJ_XOR;// = vld1_u32( conj_XOR_DATA ); - Removed by scripts#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
replace_by_sed 's#static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );#static uint64x2_t p2ul_CONJ_XOR;// = vld1q_u64( p2ul_conj_XOR_DATA ); - Removed by script#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
# TODO(satok): Remove this once protobuf/autogen.sh is fixed.
replace_by_sed 's#https://googlemock.googlecode.com/files/gmock-1.7.0.zip#http://download.tensorflow.org/deps/gmock-1.7.0.zip#' \
  "${DOWNLOADS_DIR}/protobuf/autogen.sh"

echo "download_dependencies.sh completed successfully." >&2

#!/bin/bash
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by 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.
# ==============================================================================

set -e

DOWNLOADS_DIR=tensorflow/contrib/makefile/downloads
BZL_FILE_PATH=tensorflow/workspace.bzl

# Ensure it is being run from repo root
if [ ! -f $BZL_FILE_PATH ]; then
  echo "Could not find ${BZL_FILE_PATH}":
  echo "Likely you are not running this from the root directory of the repository.";
  exit 1;
fi

EIGEN_URL="$(grep -o 'http.*bitbucket.org/eigen/eigen/get/.*tar\.gz' "${BZL_FILE_PATH}" | grep -v mirror.bazel | head -n1)"
GEMMLOWP_URL="$(grep -o 'https://mirror.bazel.build/github.com/google/gemmlowp/.*zip' "${BZL_FILE_PATH}" | head -n1)"
GOOGLETEST_URL="https://github.com/google/googletest/archive/release-1.8.0.tar.gz"
NSYNC_URL="$(grep -o 'https://mirror.bazel.build/github.com/google/nsync/.*tar\.gz' "${BZL_FILE_PATH}" | head -n1)"
# Note: The Protobuf source in `tensorflow/workspace.bzl` in TensorFlow
# 1.10 branch does not work. `make distclean` fails and blocks the build
# process. For now we're hardcoding to the version which is used by
# TensorFlow 1.9.
PROTOBUF_URL="https://mirror.bazel.build/github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz"
# TODO (yongtang): Replace the following with 'https://mirror.bazel.build/github.com/google/re2/.*tar\.gz' once
# the archive has been propagated in mirror.bazel.build.
RE2_URL="$(grep -o 'https://github.com/google/re2/.*tar\.gz' "${BZL_FILE_PATH}" | head -n1)"
FFT2D_URL="$(grep -o 'http.*fft\.tgz' "${BZL_FILE_PATH}" | grep -v bazel-mirror | head -n1)"
DOUBLE_CONVERSION_URL="$(grep -o "https.*google/double-conversion.*\.zip" "${BZL_FILE_PATH}" | head -n1)"
ABSL_URL="$(grep -o 'https://github.com/abseil/abseil-cpp/.*tar.gz' "${BZL_FILE_PATH}" | head -n1)"
CUB_URL="$(grep -o 'https.*cub/archive.*zip' "${BZL_FILE_PATH}" | grep -v mirror.bazel | head -n1)"

# Required for TensorFlow Lite Flex runtime.
FARMHASH_URL="https://mirror.bazel.build/github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz"
FLATBUFFERS_URL="https://github.com/google/flatbuffers/archive/1f5eae5d6a135ff6811724f6c57f911d1f46bb15.tar.gz"

# TODO(petewarden): Some new code in Eigen triggers a clang bug with iOS arm64,
#                   so work around it by patching the source.
replace_by_sed() {
  local regex="${1}"
  shift
  # Detect the version of sed by the return value of "--version" flag. GNU-sed
  # supports "--version" while BSD-sed doesn't.
  if ! sed --version >/dev/null 2>&1; then
    # BSD-sed.
    sed -i '' -e "${regex}" "$@"
  else
    # GNU-sed.
    sed -i -e "${regex}" "$@"
  fi
}

download_and_extract() {
  local usage="Usage: download_and_extract URL DIR"
  local url="${1:?${usage}}"
  local dir="${2:?${usage}}"
  echo "downloading ${url}" >&2
  mkdir -p "${dir}"
  if [[ "${url}" == *gz ]]; then
    curl -Ls "${url}" | tar -C "${dir}" --strip-components=1 -xz
  elif [[ "${url}" == *zip ]]; then
    tempdir=$(mktemp -d)
    tempdir2=$(mktemp -d)
    if [[ "$OSTYPE" == "darwin"* ]]; then
      # macOS (AKA darwin) doesn't have wget.
      (cd "${tempdir}"; curl --remote-name --silent --location "${url}")
    else
      wget -P "${tempdir}" "${url}"
    fi
    unzip "${tempdir}"/* -d "${tempdir2}"
    # unzip has no strip components, so unzip to a temp dir, and move the files
    # we want from the tempdir to destination.
    cp -R "${tempdir2}"/*/* "${dir}"/
    rm -rf "${tempdir2}" "${tempdir}"
  fi

  # Delete any potential BUILD files, which would interfere with Bazel builds.
  find "${dir}" -type f -name '*BUILD' -delete
}

download_and_extract "${EIGEN_URL}" "${DOWNLOADS_DIR}/eigen"
download_and_extract "${GEMMLOWP_URL}" "${DOWNLOADS_DIR}/gemmlowp"
download_and_extract "${GOOGLETEST_URL}" "${DOWNLOADS_DIR}/googletest"
download_and_extract "${NSYNC_URL}" "${DOWNLOADS_DIR}/nsync"
download_and_extract "${PROTOBUF_URL}" "${DOWNLOADS_DIR}/protobuf"
download_and_extract "${RE2_URL}" "${DOWNLOADS_DIR}/re2"
download_and_extract "${FFT2D_URL}" "${DOWNLOADS_DIR}/fft2d"
download_and_extract "${DOUBLE_CONVERSION_URL}" "${DOWNLOADS_DIR}/double_conversion"
download_and_extract "${ABSL_URL}" "${DOWNLOADS_DIR}/absl"
download_and_extract "${CUB_URL}" "${DOWNLOADS_DIR}/cub/external/cub_archive"

# Required for TensorFlow Lite Flex runtime.
download_and_extract "${FARMHASH_URL}" "${DOWNLOADS_DIR}/farmhash"
download_and_extract "${FLATBUFFERS_URL}" "${DOWNLOADS_DIR}/flatbuffers"

replace_by_sed 's#static uint32x4_t p4ui_CONJ_XOR = vld1q_u32( conj_XOR_DATA );#static uint32x4_t p4ui_CONJ_XOR; // = vld1q_u32( conj_XOR_DATA ); - Removed by script#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
replace_by_sed 's#static uint32x2_t p2ui_CONJ_XOR = vld1_u32( conj_XOR_DATA );#static uint32x2_t p2ui_CONJ_XOR;// = vld1_u32( conj_XOR_DATA ); - Removed by scripts#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
replace_by_sed 's#static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );#static uint64x2_t p2ul_CONJ_XOR;// = vld1q_u64( p2ul_conj_XOR_DATA ); - Removed by script#' \
  "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h"
# TODO(satok): Remove this once protobuf/autogen.sh is fixed.
replace_by_sed 's#https://googlemock.googlecode.com/files/gmock-1.7.0.zip#http://download.tensorflow.org/deps/gmock-1.7.0.zip#' \
  "${DOWNLOADS_DIR}/protobuf/autogen.sh"

echo "download_dependencies.sh completed successfully." >&2


Remove from compute.sh function for save docker images

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/ddepaoli3/fuel-plugin-novadocker.git/'


DOC : add sbatch example from the MRIQC protocol in docs folder

#!/bin/bash
#
#SBATCH -J mriqc
#SBATCH --array=1-13
#SBATCH --time=136:00:00
#SBATCH -n 1
#SBATCH --cpus-per-task=16
#SBATCH --mem-per-cpu=4G
# Outputs ----------------------------------
#SBATCH -o log/%x-%A-%a.out
#SBATCH -e log/%x-%A-%a.err
#SBATCH --mail-user=%u@gmail.com
#SBATCH --mail-type=ALL
# ------------------------------------------

unset PYTHONPATH

BIDS_DIR="$STUDY/ds000030"
OUTPUT_DIR="${BIDS_DIR}/derivatives/mriqc-0.16.1"

SINGULARITY_CMD="singularity run -e $STUDY/mriqc-0.16.1.simg"

subject=$( sed -n -E \
    "$((${SLURM_ARRAY_TASK_ID} + 1))s/sub (\S*)\>.*/\1/gp" \
    ${BIDS_DIR}/participants.tsv )

cmd="${SINGULARITY_CMD} ${BIDS_DIR} ${OUTPUT_DIR} participant \
     --participant-label $subject \
     -w $L_SCRATCH/work/ \
     --omp-nthreads 8 --mem 10"
echo Running task ${SLURM_ARRAY_TASK_ID}
echo Commandline: $cmd
eval $cmd
exitcode=$?
echo "sub-$subject   ${SLURM_ARRAY_TASK_ID}    $exitcode" \
      >> ${SLURM_ARRAY_JOB_ID}.tsv
echo Finished tasks ${SLURM_ARRAY_TASK_ID} with exit code $exitcode
exit $exitcode

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


Add script for verifying that correct public and private keys are installed for the provided user.

#!/usr/bin/env bash

# Script which verfies that the provided public and private
# SSH keys are installed for the provided user

USERNAME=$1
PUBLIC_SSH_KEY=$2
PRIVATE_SSH_KEY=$3

if [ $# -lt 3 ]; then
    echo "Usage: <username> <public key content> <private key content>"
    exit 1
fi

# Default file name for the stanley private key file
DEFAULT_KEY_FILE_NAME="st2_${USERNAME}_key"

AUTHORIZED_KEYS_PATH="/home/${USERNAME}/.ssh/authorized_keys"
PRIVATE_KEY_PATH="/home/${USERNAME}/.ssh/${DEFAULT_KEY_FILE_NAME}"

# 1. Verify authorized_keys file exists
if [ ! -f ${AUTHORIZED_KEYS_PATH} ]; then
    echo "authorized_keys file ${AUTHORIZED_KEYS_PATH} doesn't exist"
    exit 2
fi

# 2. Verify private key file exists
if [ ! -f ${PRIVATE_KEY_PATH} ]; then
    echo "Private key file ${PRIVATE_KEY_PATH} doesn't exist"
    exit 3
fi

# 3. Verify authorized_keys file contains correct public key
AUTHORIZED_KEYS_LINES=$(cat ${AUTHORIZED_KEYS_PATH} | grep ${PUBLIC_SSH_KEY} | wc -l)

if [ ${AUTHORIZED_KEYS_LINES} -lt 1 ]; then
    echo "authorized_keys file (${AUTHORIZED_KEYS_PATH}) doesn't contain public key"
    exit 4
fi

# 4. Verify private key file contains correct private key
PRIVATE_KEYS_LINES=$(cat ${PRIVATE_KEY_PATH} | grep ${PRIVATE_SSH_KEY} | wc -l)

if [ ${PRIVATE_KEYS_LINES} -lt 1 ]; then
    echo "Private key (${PRIVATE_KEY_PATH}) file doesn't contain private key"
    exit 5
fi

echo "All good - public and private keys are present!"
exit 0

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


New setup for perf events only for critical section.

#!/bin/bash

# This requires the perf utility to be installed and the OS must be linux.
# Compile with CMAKE_BUILD_TYPE=RelWithDebInfo in the subdirectory "build".
# Run this script in the main source directory.
#
# This script sets up performance monitoring events to measure single
# document operations. Run this script with sudo when the ArangoDB
# process is already running:
#
#   sudo ./setupPerfEvents.sh
#
# Now you are able to recrod the event with:
#
#   sudo perf record -e "probe_arangod:*" -aR
#
# The above command will get sample data indefinitely, hit Ctrl-C when
# the measurement is finished. A file "perf.data" is written to the
# current directory. Dump the events in this file with:
#
#   sudo perf script > perf.history
#
# This logs the times when individual threads hit the events.
# Use the program perfanalyis.cpp in this directory in the following way:
# (for compilation instructions see at the top of perfanalysis.cpp)
#
#   ./scripts/perfanalyis < perf.history > perf.statistics
#
# This will group enter and exit events of functions together, compute the time
# spent and sort by function. When finished remove all events with:
#
#   sudo perf probe -d "probe_arangod:*"
#
# List events with:
#
#   sudo perf probe -l
#
#

export VERBOSE=0

main(){
  if [ "$1" == "-v" ] ; then
    export VERBOSE=1
    shift
  fi
  local ARANGOD_EXECUTABLE=${1-build/bin/arangod}

  #delete all existing events
  perf probe -x $ARANGOD_EXECUTABLE -d "probe_arangod:*"

  echo "Adding events, this takes a few seconds..."

  echo "work in LogicalCollection"
  addEvent logicalInsert insert@LogicalCollection.cpp

  echo "Some probes in the storage engine:"
  addEvent insertLocalLine2047 LogicalCollection.cpp:2047 noRet
  addEvent insertLocalLine2050 LogicalCollection.cpp:2050 noRet

  echo Done.
}

addEvent() {
  local name="$1"
  local func="${2-"${name}"}"
  local withRet="${3-1}"

  echo "setting up $name for function: $func"
  if [ "$VERBOSE" == "1" ] ; then
    perf probe -x $ARANGOD_EXECUTABLE -a $name=$func                #enter function
    if [ "$withRet" == 1 ]; then
        perf probe -x $ARANGOD_EXECUTABLE -a ${name}Ret=$func%return    #return form function
    fi
  else
    perf probe -x $ARANGOD_EXECUTABLE -a $name=$func 2> /dev/null             #enter function
    if [ "$withRet" == 1 ]; then
        perf probe -x $ARANGOD_EXECUTABLE -a ${name}Ret=$func%return 2> /dev/null #return form function
    fi
  fi
  if [ "$?" != "0" ] ; then
    echo ERROR!
  fi
}

main "$@"

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


script to force br-int controller to a particular address

#! /bin/bash

# put IP address of node running ONOS VTN App here
DESIRED_CONTROLLER="tcp:130.127.133.24:6653"

while [[ 1 ]]; do
    CONTROLLER=`ovs-vsctl get-controller br-int`
    if [[ "$CONTROLLER" == "tcp:172.17.0.2:6653" ]]; then
       ovs-vsctl set-controller br-int $DESIRED_CONTROLLER
       echo "changed controller from $CONTROLLER to $DESIRED_CONTROLLER"
    fi
    sleep 10s
done

error: pathspec 'xos/configurations/cord/dataplane/change_controller.sh' did not match any file(s) known to git


Fix: corrected syntax in minikube.sh

Fix: corrected syntax in minikube.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/KEAOSolutions/development_environment.git/'


Create switch.command

Create switch.command

#!/bin/bash

# -------------------------------------------------- #
#
# Visible/Invisible Switcher for OS X
#
# Copyright (c) 2014 tag
#
# -------------------------------------------------- #

status=`defaults read com.apple.finder AppleShowAllFiles`
if ${status}; then
	defaults write com.apple.finder AppleShowAllFiles FALSE
else
	defaults write com.apple.finder AppleShowAllFiles TRUE
fi
killall Finder
killall Terminal

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


Create begin.sh

Create begin.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/Phantasus/intelmq.git/'


initial setup.sh script

initial setup.sh script

#!/bin/sh

if [ "$#" -ne 4 ]; then
    echo "Usage: $0 <vmcount> <winxp.iso> <serial-key> <tmpfs-size>"
    echo "vmcount: Amount of Virtual Machines to be created"
    echo "winxp.iso: Path to a Windows XP Installer ISO"
    echo "serial-key: Serial Key for the given Windows XP version"
    echo "tmpfs-size: Size, in gigabytes, to create a tmpfs for the "
    echo "    relevant VirtualBox files. It is advised to give it roughly"
    echo "    one gigabyte per VM and to have a few spare gigabytes "
    echo "    just in case."
    exit 1
fi

if [ "$(id -u)" -ne 0 ]; then
    echo "You'll probably want to run this script as root."
fi

# Update apt repository and install required packages.
apt-get update -y
apt-get install -y sudo git python-dev python-pip postgresql libpq-dev \
    python-dpkt vim tcpdump libcap2-bin genisoimage

# Install the most up-to-date version of VirtualBox available at the moment.
if [ ! -e "/usr/bin/VirtualBox" ]; then
    # Update our apt repository with "contrib."
    DEBVERSION="$(lsb_release -cs)"
    echo "deb http://download.virtualbox.org/virtualbox/debian " \
        "$DEBVERSION contrib" >> /etc/apt/sources.list

    # Add the VirtualBox public key to our apt repository.
    wget -q https://www.virtualbox.org/download/oracle_vbox.asc \
        -O- | apt-key add -

    # Install the most recent VirtualBox.
    apt-get update -y
    apt-get install -y virtualbox-4.3
fi

# Allow tcpdump to dump packet captures when executed as a normal user.
setcap cap_net_raw,cap_net_admin=eip /usr/sbin/tcpdump

# Setup a Cuckoo user.
useradd cuckoo

CUCKOO="/home/cuckoo/cuckoo/"
VMCLOAK="/home/cuckoo/vmcloak/"
VMTEMP="/home/cuckoo/temp/"

# Fetch Cuckoo and VMCloak.
git clone git://github.com/cuckoobox/cuckoo.git "$CUCKOO"
git clone git://github.com/jbremer/vmcloak.git "$VMCLOAK"

mkdir -p "$VMTEMP"

chown -R cuckoo:cuckoo "$CUCKOO" "$VMCLOAK" "$VMTEMP"

# Install required packages part two.
pip install sqlalchemy psycopg2 \
    -r "$CUCKOO/requirements.txt" \
    -r "$VMCLOAK/requirements.txt"

# Setup VMCloak.
(cd "$VMCLOAK" && python setup.py install)

# Create a random password.
PASSWORD="$(tr -dc "[:alnum:]" < /dev/urandom|head -c ${1:-16})"

sql_query() {
    echo "$1"|sudo -u postgres psql
}

sql_query "DROP DATABASE cuckoo"
sql_query "CREATE DATABASE cuckoo"

sql_query "DROP USER cuckoo"
sql_query "CREATE USER cuckoo WITH PASSWORD '$PASSWORD'"

# Setup the VirtualBox hostonly network.
if [ -z "$(VBoxManage list hostonlyifs)" ]; then
    VBoxManage hostonlyif create
    VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
fi

# Run the magic iptables script that turns hostonly networks into full
# internet access.
vmcloak-iptables

MOUNT="/mnt/winxp/"

if [ ! -d "$MOUNT" ] || [ -z "$(ls -A "$MOUNT")" ]; then
    mkdir -p "$MOUNT"
    mount -o loop,ro "$2" "$MOUNT"
fi

VMS="/home/cuckoo/vms/"
VMSBACKUP="/home/cuckoo/vms-backup/"
VMDATA="/home/cuckoo/vm-data/"

mkdir -p "$VMDATA"

# Setup tmpfs to store the various Virtual Machines.
if [ ! -d "$VMS" ]; then
    mkdir -p "$VMS"

    if [ "$4" -ne 0 ]; then
        mount -o size=${4}G -t tmpfs tmpfs "$VMS"
    fi
fi

chown cuckoo:cuckoo "$VMS" "$VMDATA"

echo "[vmcloak]" > /tmp/vmcloak.conf
echo "cuckoo = $CUCKOO" >> /tmp/vmcloak.conf
echo "vm-dir = $VMS" >> /tmp/vmcloak.conf
echo "data-dir = $VMDATA" >> /tmp/vmcloak.conf
echo "iso-mount = $MOUNT" >> /tmp/vmcloak.conf
echo "serial-key = $3" >> /tmp/vmcloak.conf
echo "deps = dotnet40" >> /tmp/vmcloak.conf
echo "temp-dirpath = $VMTEMP" >> /tmp/vmcloak.conf

chown cuckoo:cuckoo /tmp/vmcloak.conf

# Unlock VMCloak just to be sure.
sudo -u cuckoo vmcloak --unlock

# Create a bunch of Virtual Machines.
for i in $(seq -w 1 "$1"); do
    sudo -u cuckoo \
        vmcloak -s /tmp/vmcloak.conf --hostonly-ip 192.168.56.1$i egg$i
done

# We create a backup of the Virtual Machines in case tmpfs is being used.
# Because if the machine for some reason does a reboot, all the contents of
# the tmpfs directory will be gone.
if [ "$4" -ne 0 ]; then
    cp -r "$VMS" "$VMSBACKUP"
fi

echo "PostgreSQL connection string:  " \
    "postgresql://cuckoo:$PASSWORD@localhost/cuckoo"

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


stand-alone shell script

stand-alone shell script

your_ip=$(curl ipecho.net/plain);
echo $your_ip;

error: pathspec 'whats-my-ip.sh' did not match any file(s) known to git


Try to get activity to work on XO

Try to get activity to work on XO

#!/bin/bash

mkdir -p dist

# Check if an external device exists
if [ -e /run/media/$USER/* ]; then

    # Build the .xo file
    echo 'Found external device.'
    echo 'Building xo file...'
    ./setup.py dist_xo
    file=dist/*.xo
    $(echo $file | cut -f1 -d-)

    # Check if the file already exists
    if [ -e /run/media/$USER/*/$file ]; then
        echo 'Removing version on device...'
        rm /run/media/$USER/*/$file
    fi

    # Move the new file onto the external device
    echo 'Moving xo file to device...'
    mv $file /run/media/$USER/*/
    echo 'Cleaning up...'
    rm -r dist/

# Notify the user a device was not found
else
    echo 'No external device found.'
    echo 'Building xo file...'
    ./setup.py dist_xo
    file=dist/*.xo
    activity=$(echo $(echo $file | cut -f1 -d-) | cut -f2 -d/)

    # Check if there is a current version of the xo file in your directory
    if [ -e ./$activity-*.xo ]; then
        # Prompt the user if they would like to replace the file or not
        echo -n 'Would you like to replace the current xo file? [y/n]: '
        read answer

        # If the user wants to replace the file, replace it
        if [ "$answer" == "y" ]; then
            echo 'Removing previous version...'
            rm ./$activity-*.xo
            mv dist/* ./

        # If the user does not want to replace the file,
        # save the old one and create the new file
        elif [ "$answer" == "n" ]; then
            old=$activity-*.xo
            mv ./$old ./$activity.old.xo
            mv ./$file ./$activity.new.xo

        else
            echo 'Invalid input.'
            echo 'Aborting.'
            rm -r dist/
            exit 1
        fi
    else
        mv dist/* ./
    fi

    echo 'Cleaning up...'
    rm -r dist/
fi

echo 'Finished!'

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


Create npm-install-serverless.sh

Create npm-install-serverless.sh

#!/bin/bash

# This script uses NPM to install PM2 globally

echo ""
echo "[Provision-Script] Installing the Serverless Framework"
echo ""

npm install -g serverless

error: pathspec 'vagrant/centos7/dev/v1/bin/npm-install-serverless.sh' did not match any file(s) known to git


Add a clean.sh for convenience.

Add a clean.sh for convenience.

#! /bin/bash

rm -rf build/ dist/ *.egg-info .pytest_cache/ .hypothesis/ .tox/
find . -type d -name __pycache__ -delete
find . -type f -name "*.pyc" -delete

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


add clean.sh

add clean.sh

#!/usr/bin/env sh
rm -rf .deps/
rm -rf Makefile
rm -rf Makefile.in
rm -rf aclocal.m4
rm -rf autom4te.cache/
rm -rf compile
rm -rf config.h
rm -rf config.h.in
rm -rf config.log
rm -rf config.status
rm -rf configure
rm -rf depcomp
rm -rf install-sh
rm -rf missing
rm -rf stamp-h1


Add install file

Add install file

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


Improve logging on replacing symlink

Improve logging on replacing symlink

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/BMC-RLM/brpm_content_framework.git/'


Added kexec install script

Added kexec install script

This installs kexec from git and it's used in Upstream testing

#!/bin/bash

########################################################################
#
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
# ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR
# PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
#
# See the Apache Version 2.0 License for specific language governing
# permissions and limitations under the License.
#
########################################################################

########################################################################
#
# Description:
#
# This script is used to install kexec-tools from git on Upstream jobs
#
########################################################################

# Convert eol
dos2unix utils.sh

# Source utils.sh
. utils.sh || {
    echo "ERROR: unable to source utils.sh!"
    echo "TestAborted" > state.txt
    exit 2
}

# Source constants file and initialize most common variables
UtilsInit

# Clone kexec-tools from git
git clone git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
if [ $? -ne 0 ]; then
    msg="ERROR: Failed to clone kexec"
    LogMsg "$msg"
    UpdateSummary "$msg"
    SetTestStateFailed
    exit 1
fi

cd kexec-tools

# Start configuring and installing kexec-tools
# Run bootstrap script
./bootstrap
if [ $? -ne 0 ]; then
    msg="ERROR: Failed to run bootstrap script"
    LogMsg "$msg"
    UpdateSummary "$msg"
    SetTestStateFailed
    exit 1
fi

# Run configure script. Prefix is different for Ubuntu and RHEL/CentOS/SLES
if is_ubuntu ; then
	./configure --prefix=/
else
	./configure --prefix=/usr
fi
if [ $? -ne 0 ]; then
    msg="ERROR: Failed to run configure script"
    LogMsg "$msg"
    UpdateSummary "$msg"
    SetTestStateFailed
    exit 1
fi

make && make install
if [ $? -ne 0 ]; then
    msg="ERROR: Failed to install kdump"
    LogMsg "$msg"
    UpdateSummary "$msg"
    SetTestStateFailed
    exit 1
fi

if is_suse ; then
	chkconfig kdump on
fi

# Do some cleanup
cd ~
rm -rf kexec*

msg="Kdump was successfully installed"
LogMsg "$msg"
UpdateSummary "$msg"
SetTestStateCompleted
exit 0

error: pathspec 'WS2012R2/lisa/remote-scripts/ica/kexec_git_install.sh' did not match any file(s) known to git


Update entrypoint.sh

Update entrypoint.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/djx339/docker-spark.git/'


add simple acceptance test suite

add simple acceptance test suite

#!/usr/bin/env bats

@test "no droplets exist" {
  run tugboat droplets
  [ "$status" -eq 0 ]
  [ "${lines[0]}" = "You don't appear to have any droplets." ]
}

@test "provisioner runs successfully" {
  run ansible-playbook -i hosts provision_digital_ocean.yml
  [ "$status" -eq 0 ]
}

@test "we can list hosts with ansible" {
  run ansible -i hosts all --list-hosts
  [ "$status" -eq 0 ]
  [[ "${lines[1]}" == *"localhost"* ]]
}

@test "we can list hosts with tugboat" {
  run tugboat droplets
  [ "$status" -eq 0 ]
  [[ "$output" == *"production.web.1"* ]]
  [[ "$output" == *"active"* ]]
}

@test "clean up all droplets" {
  run tugboat destroy production.web.1 -c
  [ "$status" -eq 0 ]
}

@test "droplets have been cleaned up" {
  sleep 5 # the droplets are destroyed asyncronously
  run tugboat droplets
  [ "$status" -eq 0 ]
  [ "${lines[0]}" = "You don't appear to have any droplets." ]
}

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


Add CNI setup example for Docker Machine

#!/bin/bash -xe

## This example features TLS configuration, which leverages availability of remote Docker API to securely
## transfer images with certificates between the master and worker nodes
##
## WARNING: This is an advanced example with TLS, although usage of Docker Machine keeps it rather readable
## and provides an ability to quickly spawn a cluster on a local hypervisor of your choice or one of the public
## clouds that Docker Machine supports
##
## For example, if you would like to use Microsoft Azure, then set the following:
##
##    export DOCKER_MACHINE_DRIVER="azure"
##    export AZURE_SUBSCRIPTION_CERT="/path/to/mycert.pem"
##    export AZURE_SUBSCRIPTION_ID="MySubscriptionID"
##
## Or for Google Compute Engine:
##
##    export DOCKER_MACHINE_DRIVER="google"
##    export GOOGLE_PROJECT="my-awesome-project-1"
##    export GOOGLE_AUTH_TOKEN="MyAuthToken"
##
## Similarly, there are environment variables for all major cloud providers, please check Docker Machine docs
## for details

DOCKER_MACHINE_DRIVER=${DOCKER_MACHINE_DRIVER:-'virtualbox'}

vm_names=$(seq -f 'kube-%g' 1 7)

fix_systemd_unit_if_needed=" \
  if grep -q MountFlags=slave /etc/systemd/system/docker.service 2> /dev/null ; then \
    sudo sed 's/\(MountFlags=slave\)/# \1/' -i /etc/systemd/system/docker.service ; \
    sudo systemctl daemon-reload ; \
    sudo systemctl restart docker ; \
  fi
"

install_weave=" \
  sudo curl --silent --location http://git.io/weave --output /usr/local/bin/weave ; \
  sudo chmod +x /usr/local/bin/weave ; \
  env WEAVE_VERSION=git-43786aaf4464 /usr/local/bin/weave launch-router --init-peer-count 7 ; \
  env WEAVE_VERSION=git-43786aaf4464 /usr/local/bin/weave launch-proxy --no-detect-tls ; \
  env WEAVE_VERSION=git-43786aaf4464 /usr/local/bin/weave launch-plugin ; \
"

## TODO: with a private network we still need to find a way to obtain the IPs, as Docker Machine doesn't have it
if [ "${DOCKER_MACHINE_DRIVER}" = 'digitalocean' ] && ! [ "${DIGITALOCEAN_PRIVATE_NETWORKING}" = 'true' ]; then
  WEAVE_PASSWORD=$(openssl genrsa 2> /dev/null | openssl base64 | tr -d "=+/\n")
  install_weave="export WEAVE_PASSWORD=${WEAVE_PASSWORD} ; ${install_weave}"
  echo "WEAVE_PASSWORD='${WEAVE_PASSWORD}'" > weave_password
fi

docker_on() {
  m=$1
  shift
  docker-machine ssh ${m} "docker $*"
}

## Create 7 VMs and install weave

for m in $vm_names ; do
  docker-machine create --driver ${DOCKER_MACHINE_DRIVER} ${m}
  docker-machine ssh ${m} "${fix_systemd_unit_if_needed}"
  docker-machine ssh ${m} "${install_weave}"
done

## Connect Weave Net peers to `kube-1`

for m in $vm_names ; do
  docker-machine ssh ${m} "env WEAVE_VERSION=git-43786aaf4464 /usr/local/bin/weave connect $(docker-machine ip 'kube-1')"
done

## In most cases we need to SSH into the VM in order to communicate with Weave proxy via the UNIX socket,
## as exposing it remotely doesn't make sense in the context of the Kubernetes Anywhere project

weaveproxy_socket="-H unix:///var/run/weave/weave.sock"

## Start etcd on `kube-{1,2,3}`

docker_on 'kube-1' ${weaveproxy_socket} run --detach \
  --env="ETCD_CLUSTER_SIZE=3" \
  --name="etcd1" \
    weaveworks/kubernetes-anywhere:etcd-v1.2

docker_on 'kube-2' ${weaveproxy_socket} run --detach \
  --env="ETCD_CLUSTER_SIZE=3" \
  --name="etcd2" \
    weaveworks/kubernetes-anywhere:etcd-v1.2

docker_on 'kube-3' ${weaveproxy_socket} run --detach \
  --env="ETCD_CLUSTER_SIZE=3" \
  --name="etcd3" \
    weaveworks/kubernetes-anywhere:etcd-v1.2

## Create TLS config volumes that will be transfered to worker nodes via `docker save | docker load` pipe
## In this instance it's easier to use remote Docker API, as Weave proxy is not required for this part

master_config=$(docker-machine config 'kube-4')

docker ${master_config} run \
  -v /var/run/docker.sock:/docker.sock \
    weaveworks/kubernetes-anywhere:toolbox-v1.2 \
      create-pki-containers

## Run intermediate containers to export the TLS config volumes for master components

for c in 'apiserver' 'controller-manager' 'scheduler' 'toolbox' ; do
  docker ${master_config} run \
    --name="kube-${c}-pki" \
    kubernetes-anywhere:${c}-pki
done

## Transfer TLS config images via a pipe between remote API, which is a neat trick to avoid having
## to setup a private registry, also rather safe as the network connection is encrypted

docker ${master_config} save \
    kubernetes-anywhere:kubelet-pki \
    kubernetes-anywhere:proxy-pki \
    kubernetes-anywhere:toolbox-pki \
  | tee \
    >(docker $(docker-machine config 'kube-5') load) \
    >(docker $(docker-machine config 'kube-6') load) \
    >(docker $(docker-machine config 'kube-7') load) \
  | cat > /dev/null

## Launch the master components using volumes provided as artefact of running the `*-pki` containers

docker_on 'kube-4' ${weaveproxy_socket} run --detach \
  --env="ETCD_CLUSTER_SIZE=3" \
  --name="kube-apiserver" \
  --volumes-from="kube-apiserver-pki" \
    weaveworks/kubernetes-anywhere:apiserver-v1.2

docker_on 'kube-4' ${weaveproxy_socket} run --detach \
  --name="kube-scheduler" \
  --volumes-from="kube-scheduler-pki" \
    weaveworks/kubernetes-anywhere:scheduler-v1.2

docker_on 'kube-4' ${weaveproxy_socket} run --detach \
  --name="kube-controller-manager" \
  --volumes-from="kube-controller-manager-pki" \
    weaveworks/kubernetes-anywhere:controller-manager-v1.2

## Launch kubelet and proxy on each of the worker nodes

for m in 'kube-5' 'kube-6' 'kube-7' ; do
  worker_config=$(docker-machine config ${m})

  ## Expose host to Weave Net and provide a DNS record that kubelet will pick up, as it runs in host namespace
  docker-machine ssh ${m} "env WEAVE_VERSION=git-43786aaf4464 /usr/local/bin/weave expose -h ${m}.weave.local"

  ## Run intermediate containers to export volumes kubelet wants
  docker ${worker_config} run \
    --name="kubelet-pki" \
      kubernetes-anywhere:kubelet-pki
  docker_on ${m} ${weaveproxy_socket} run \
    --env="USE_CNI=yes" \
    --volume="/:/rootfs" \
    --volume="/var/run/docker.sock:/docker.sock" \
      weaveworks/kubernetes-anywhere:toolbox-v1.2 \
        setup-kubelet-volumes
  ## Start the kubelete itself now
  docker_on ${m} ${weaveproxy_socket} run --detach \
    --name="kubelet" \
    --privileged="true" --net="host" --pid="host" \
    --env="USE_CNI=yes" \
    --volumes-from="kubelet-volumes" \
    --volumes-from="kubelet-pki" \
      weaveworks/kubernetes-anywhere:kubelet-v1.2

  ## Run intermediate container for proxy's TLS PKI data containers
  docker ${worker_config} run \
    --name="kube-proxy-pki" \
      kubernetes-anywhere:proxy-pki
  ## And now start the proxy itself
  docker_on ${m} ${weaveproxy_socket} run --detach \
    --name="kube-proxy" \
    --privileged="true" --net="host" --pid="host" \
    --volumes-from="kube-proxy-pki" \
      weaveworks/kubernetes-anywhere:proxy-v1.2
  ## Create toolbox PKI data volume for convenience
  docker ${worker_config} create \
    --name=kube-toolbox-pki \
      kubernetes-anywhere:toolbox-pki
done

## Run toolbox container to deploy SkyDNS addon
docker_on 'kube-4' ${weaveproxy_socket} run \
  --volumes-from="kube-toolbox-pki" \
    weaveworks/kubernetes-anywhere:toolbox-v1.2 \
      kubectl create -f kube-system-namespace.yaml
docker_on 'kube-4' ${weaveproxy_socket} run \
  --volumes-from="kube-toolbox-pki" \
    weaveworks/kubernetes-anywhere:toolbox-v1.2 \
      kubectl create -f skydns-addon-secure-v1.2

error: pathspec 'examples/docker-machine/create-cluster-v1.2-with-cni.sh' did not match any file(s) known to git


Add configure script for concourse

Add configure script for concourse

#!/usr/bin/env bash

script_dir="$( cd "$( dirname "$0" )" && pwd )"

fly -t bosh-ecosystem set-pipeline \
    -p yagnats \
    -c ${script_dir}/pipeline.yml

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


make script executable

make script executable

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/NGDATA/lilyproject.git/'


vscode, vscodium: add update.sh script

vscode, vscodium: add update.sh script

#!/usr/bin/env bash

command -v grep >/dev/null 2>&1 || { echo >&2 "[grep] is required, but not installed.  Aborting."; exit 1; }
command -v awk >/dev/null 2>&1 || { echo >&2 "[awk] is required, but not installed.  Aborting."; exit 1; }
command -v sed >/dev/null 2>&1 || { echo >&2 "[sed] is required, but not installed.  Aborting."; exit 1; }
command -v curl >/dev/null 2>&1 || { echo >&2 "[curl] is required, but not installed.  Aborting."; exit 1; }
command -v nix-prefetch-url >/dev/null 2>&1 || { echo >&2 "[nix-prefetch-url] is required, but not installed.  Aborting."; exit 1; }

ROOT="$(dirname "$(readlink -f "$0")")"
if [ ! -f "$ROOT/vscode.nix" ]; then
  echo "ERROR: cannot find vscode.nix in $ROOT"
  exit 1
fi
if [ ! -f "$ROOT/vscodium.nix" ]; then
  echo "ERROR: cannot find vscodium.nix in $ROOT"
  exit 1
fi

# VSCode

VSCODE_VER=$(curl -s -L "https://code.visualstudio.com/Download" | grep "is now available" | awk -F'</span>' '{print $1}' | awk -F'>' '{print $NF}')
VSCODE_VER=$(curl -s -L "https://code.visualstudio.com/updates/v${VSCODE_VER/./_}" | grep "Downloads:" | awk -F'code.visualstudio.com/' '{print $2}' | awk -F'/' '{print $1}')
sed -i "s/version = \".*\"/version = \"${VSCODE_VER}\"/" "$ROOT/vscode.nix"

VSCODE_LINUX_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-x64/stable"
VSCODE_LINUX_SHA256=$(nix-prefetch-url ${VSCODE_LINUX_URL})
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODE_LINUX_SHA256}\"/" "$ROOT/vscode.nix"

VSCODE_DARWIN_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/darwin/stable"
VSCODE_DARWIN_SHA256=$(nix-prefetch-url ${VSCODE_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODE_DARWIN_SHA256}\"/" "$ROOT/vscode.nix"

# VSCodium

VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}')
sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix"

VSCODIUM_LINUX_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-linux-x64-${VSCODIUM_VER}.tar.gz"
VSCODIUM_LINUX_SHA256=$(nix-prefetch-url ${VSCODIUM_LINUX_URL})
sed -i "s/x86_64-linux = \".\{52\}\"/x86_64-linux = \"${VSCODIUM_LINUX_SHA256}\"/" "$ROOT/vscodium.nix"

VSCODIUM_DARWIN_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-darwin-${VSCODIUM_VER}.zip"
VSCODIUM_DARWIN_SHA256=$(nix-prefetch-url ${VSCODIUM_DARWIN_URL})
sed -i "s/x86_64-darwin = \".\{52\}\"/x86_64-darwin = \"${VSCODIUM_DARWIN_SHA256}\"/" "$ROOT/vscodium.nix"

error: pathspec 'pkgs/applications/editors/vscode/update.sh' did not match any file(s) known to git


copy zsh-aliases-exa.plugin

copy zsh-aliases-exa.plugin

#
# Project:  zsh-aliases-exa
# File:     /zsh-aliases-exa.plugin.zsh
# Created:  2019-04-12 19:07:28
# Author:   Darrin Tisdale
# -----
# Modified: 2019-05-14 23:18:24
# Editor:   Darrin Tisdale
#

# general use
alias ls='exa'                                                         # ls
alias l='exa -lbF --git'                                               # list, size, type, git
alias ll='exa -lbGF --git'                                             # long list
alias llm='exa -lbGF --git --sort=modified'                            # long list, modified date sort
alias la='exa -lbhHigUmuSa --time-style=long-iso --git --color-scale'  # all list
alias lx='exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale' # all + extended list

# speciality views
alias lS='exa -1'			                                                  # one column, just names
alias lt='exa --tree --level=2'                                         # tree

error: pathspec 'plugins/zsh-aliases-exa/zsh-aliases-exa.plugin.zsh' did not match any file(s) known to git


Little script for running boxen workaround

Boxen isn't so good at building native-using gems on latest OSX/Xcode:

See https://github.com/boxen/our-boxen/issues/528

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


replace nova-manage by nova flavor-create

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/StackGeek/openstackgeek.git/'


add homebrew package installation script

#!/usr/bin/env bash

brewcmd=$( command -v brew )

echo "brewcmd:"
echo $brewcmd

if [ $brewcmd == '' ]; then
  echo "installing homebrew..."
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
  echo "homebrew already installed; adding packages"
fi

brew install carthage ffmpeg gnupg imagemagick ncdu nmap
brew cask install atom etcher keybase

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


add opensips output

add opensips output

#!/bin/bash

# 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
#
#      CC/LICENSE
#
# 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.

ROOT_DIR=`pwd`
PLAT_BASE=platform
PLAT_SVR="acd ivr ims agentproxy"

DEP_BASE=dep

INC_BASE=interface

RELEASE_BASE=`pwd`/release

clean()
{
    if [ -d ${RELEASE_BASE} ]; then
        rm -fr ${RELEASE_BASE};
    fi

    for d in ${PLAT_SVR}; do
        make -C ${PLAT_BASE}/$d clean;
    done

    make -C ${INC_BASE} clean
}

build()
{
    # 1. third party component
    # 2. interface
    # 3. platform

    cd ${DEP_BASE} && bash build.sh && cd ..

    cd ${ROOT_DIR} && make -C ${INC_BASE}

    for d in ${PLAT_SVR}; do
        make -C ${PLAT_BASE}/$d;

        if [ ! -d ${RELEASE_BASE}/$d ]; then
            mkdir -p ${RELEASE_BASE}/$d;
        fi

        cp -r ${PLAT_BASE}/$d/output/* ${RELEASE_BASE}/$d/
    done

    if [ ! -d ${RELEASE_BASE}/freeswitch ]; then
        mkdir -p ${RELEASE_BASE}/freeswitch;
    fi

    if [ ! -d ${RELEASE_BASE}/opensips ]; then
        mkdir -p ${RELEASE_BASE}/opensips;
    fi

    cp -r ${DEP_BASE}/freeswitch/output/*  ${RELEASE_BASE}/freeswitch/
    cp -r ${DEP_BASE}/opensips/output/*  ${RELEASE_BASE}/opensips/
}

case "$1" in
    build)
        build
        ;;
    clean)
        clean
        ;;
    *)
        echo "Usage: bash $0 {build|clean}"
        exit 1
        ;;
esac

exit 0

#!/bin/bash

# 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
#
#      CC/LICENSE
#
# 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.

ROOT_DIR=`pwd`
PLAT_BASE=platform
PLAT_SVR="acd ivr ims agentproxy"

DEP_BASE=dep

INC_BASE=interface

RELEASE_BASE=`pwd`/release

clean()
{
    if [ -d ${RELEASE_BASE} ]; then
        rm -fr ${RELEASE_BASE};
    fi

    for d in ${PLAT_SVR}; do
        make -C ${PLAT_BASE}/$d clean;
    done

    make -C ${INC_BASE} clean
}

build()
{
    # 1. third party component
    # 2. interface
    # 3. platform

    cd ${DEP_BASE} && bash build.sh && cd ..

    cd ${ROOT_DIR} && make -C ${INC_BASE}

    for d in ${PLAT_SVR}; do
        make -C ${PLAT_BASE}/$d;

        if [ ! -d ${RELEASE_BASE}/$d ]; then
            mkdir -p ${RELEASE_BASE}/$d;
        fi

        cp -r ${PLAT_BASE}/$d/output/* ${RELEASE_BASE}/$d/
    done

    if [ ! -d ${RELEASE_BASE}/freeswitch ]; then
        mkdir -p ${RELEASE_BASE}/freeswitch;
    fi

    cp -r ${DEP_BASE}/freeswitch/output/*  ${RELEASE_BASE}/freeswitch/
}

case "$1" in
    build)
        build
        ;;
    clean)
        clean
        ;;
    *)
        echo "Usage: bash $0 {build|clean}"
        exit 1
        ;;
esac

exit 0


change yarn to npm

change yarn to npm

#!/usr/bin/env bash
LOG=`git log --pretty=oneline --abbrev-commit -1`

case "$LOG" in
  *MAJOR@*) VERSION=$(npm version major --force) ;;
  *MINOR@*) VERSION=$(npm version minor --force) ;;
  *)       VERSION=$(npm version patch --force) ;;
esac

VERSION=$(echo $VERSION | cut -c 2-)

npm install && gulp version

git add *

git commit -m "$VERSION RELEASED" && git push origin master

git subsplit init git@github.com:ax5ui/ax5ui-kernel.git
git subsplit publish --heads="master" --no-tags src/ax5core:git@github.com:ax5ui/ax5core.git
git subsplit publish --heads="master" --no-tags src/ax5ui-mask:git@github.com:ax5ui/ax5ui-mask.git
git subsplit publish --heads="master" --no-tags src/ax5ui-dialog:git@github.com:ax5ui/ax5ui-dialog.git
git subsplit publish --heads="master" --no-tags src/ax5ui-toast:git@github.com:ax5ui/ax5ui-toast.git
git subsplit publish --heads="master" --no-tags src/ax5ui-modal:git@github.com:ax5ui/ax5ui-modal.git
git subsplit publish --heads="master" --no-tags src/ax5ui-calendar:git@github.com:ax5ui/ax5ui-calendar.git
git subsplit publish --heads="master" --no-tags src/ax5ui-picker:git@github.com:ax5ui/ax5ui-picker.git
git subsplit publish --heads="master" --no-tags src/ax5ui-formatter:git@github.com:ax5ui/ax5ui-formatter.git
git subsplit publish --heads="master" --no-tags src/ax5ui-menu:git@github.com:ax5ui/ax5ui-menu.git
git subsplit publish --heads="master" --no-tags src/ax5ui-select:git@github.com:ax5ui/ax5ui-select.git
git subsplit publish --heads="master" --no-tags src/ax5ui-grid:git@github.com:ax5ui/ax5ui-grid.git
git subsplit publish --heads="master" --no-tags src/ax5ui-media-viewer:git@github.com:ax5ui/ax5ui-media-viewer.git
git subsplit publish --heads="master" --no-tags src/ax5ui-combobox:git@github.com:ax5ui/ax5ui-combobox.git
git subsplit publish --heads="master" --no-tags src/ax5ui-layout:git@github.com:ax5ui/ax5ui-layout.git
git subsplit publish --heads="master" --no-tags src/ax5ui-binder:git@github.com:ax5ui/ax5ui-binder.git
git subsplit publish --heads="master" --no-tags src/ax5ui-autocomplete:git@github.com:ax5ui/ax5ui-autocomplete.git
git subsplit publish --heads="master" --no-tags src/ax5ui-multi-uploader:git@github.com:ax5ui/ax5ui-multi-uploader.git
git subsplit publish --heads="master" --no-tags src/ax5ui-uploader:git@github.com:ax5ui/ax5ui-uploader.git
rm -rf .subsplit/

#!/usr/bin/env bash
LOG=`git log --pretty=oneline --abbrev-commit -1`

case "$LOG" in
  *MAJOR@*) VERSION=$(npm version major --force) ;;
  *MINOR@*) VERSION=$(npm version minor --force) ;;
  *)       VERSION=$(npm version patch --force) ;;
esac

VERSION=$(echo $VERSION | cut -c 2-)

yarn && gulp version

git add *

git commit -m "$VERSION RELEASED" && git push origin master

git subsplit init git@github.com:ax5ui/ax5ui-kernel.git
git subsplit publish --heads="master" --no-tags src/ax5core:git@github.com:ax5ui/ax5core.git
git subsplit publish --heads="master" --no-tags src/ax5ui-mask:git@github.com:ax5ui/ax5ui-mask.git
git subsplit publish --heads="master" --no-tags src/ax5ui-dialog:git@github.com:ax5ui/ax5ui-dialog.git
git subsplit publish --heads="master" --no-tags src/ax5ui-toast:git@github.com:ax5ui/ax5ui-toast.git
git subsplit publish --heads="master" --no-tags src/ax5ui-modal:git@github.com:ax5ui/ax5ui-modal.git
git subsplit publish --heads="master" --no-tags src/ax5ui-calendar:git@github.com:ax5ui/ax5ui-calendar.git
git subsplit publish --heads="master" --no-tags src/ax5ui-picker:git@github.com:ax5ui/ax5ui-picker.git
git subsplit publish --heads="master" --no-tags src/ax5ui-formatter:git@github.com:ax5ui/ax5ui-formatter.git
git subsplit publish --heads="master" --no-tags src/ax5ui-menu:git@github.com:ax5ui/ax5ui-menu.git
git subsplit publish --heads="master" --no-tags src/ax5ui-select:git@github.com:ax5ui/ax5ui-select.git
git subsplit publish --heads="master" --no-tags src/ax5ui-grid:git@github.com:ax5ui/ax5ui-grid.git
git subsplit publish --heads="master" --no-tags src/ax5ui-media-viewer:git@github.com:ax5ui/ax5ui-media-viewer.git
git subsplit publish --heads="master" --no-tags src/ax5ui-combobox:git@github.com:ax5ui/ax5ui-combobox.git
git subsplit publish --heads="master" --no-tags src/ax5ui-layout:git@github.com:ax5ui/ax5ui-layout.git
git subsplit publish --heads="master" --no-tags src/ax5ui-binder:git@github.com:ax5ui/ax5ui-binder.git
git subsplit publish --heads="master" --no-tags src/ax5ui-autocomplete:git@github.com:ax5ui/ax5ui-autocomplete.git
git subsplit publish --heads="master" --no-tags src/ax5ui-multi-uploader:git@github.com:ax5ui/ax5ui-multi-uploader.git
git subsplit publish --heads="master" --no-tags src/ax5ui-uploader:git@github.com:ax5ui/ax5ui-uploader.git
rm -rf .subsplit/


sample build script

sample build 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/DarvinStudio/darvin-satellite-proxy.git/'


allow building into a different directory

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/szinck/esconsole.git/'


changed flags

changed flags

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


don't need this now

don't need this now

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/sharedprophet/container-toolbox.git/'


Add buildscript

Add buildscript

#!/usr/bin/env bash

npm install
npm run build


add build.sh

add build.sh

#!/bin/bash

SITE=/var/www/rhincodon.jp

mkdocs build
rm -rf ${SITE}/*
mv site/* ${SITE}/


Travis #13

Travis #13

#!/bin/bash

# only proceed script when started not by pull request (PR)
if [ $TRAVIS_PULL_REQUEST == "true" ]; then
  echo "this is PR, exiting"
  exit 0
fi

# enable error reporting to the console
set -e

# build site with jekyll, by default to `_site' folder
jekyll build

# cleanup
rm -rf ../tkralphs.github.io.master

#clone `master' branch of the repository using encrypted GH_TOKEN for authentification
git clone https://${GH_TOKEN}@github.com/tkralphs/tkralphs.github.io.git ../tkralphs.github.io.master

# copy generated HTML site to `master' branch
cp -R _site/* ../tkralphs.github.io.master

# commit and push generated content to `master' branch
# since repository was cloned in write mode with token auth - we can push there
cd ../tkralphs.github.io.master
git config user.email "ted@lehigh.edu"
git config user.name "Ted Ralphs"
git add -A .
git commit -a -m "Travis #$TRAVIS_BUILD_NUMBER"
git push --quiet origin master > /dev/null 2>&1


initial commit

initial commit

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/Flamewires/u14lts-gr-build.git/'


Added build script

Added build script

#!/bin/bash

git submodule update --init --recursive
dotnet --info
dotnet restore --no-cache
dotnet build .\ServiceBase.IdentityServer.sln --configuration Release


add build.sh

add build.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/bborbe/booking.git/'


Create gcc_install_on_ubuntu_core.sh

Create gcc_install_on_ubuntu_core.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/kneeprayer/ubuntucoreshell.git/'


+ builder script

+ builder script

#!/bin/bash

# Build and skip the unit tests
mvn -Dmaven.test.skip=true install

cd vig-distribution/

mvn assembly:single

echo
echo
echo "Installation completed. Now remember to set up the configuration files in the vig-distribution/target/resources folder!!!"
echo "For the first run, run with the --help or --help-verbose option."


Add build bash script

Add build bash script

#!/bin/bash -x

env

if [ "${INCOMING_HOOK_BODY}" == "" ] ; then
  bundle exec jekyll build --source source
  exit 0
else
  SCRIPTS=$(echo "${INCOMING_HOOK_BODY}" | jq -r .scripts)
  echo "${SCRIPTS}"
  ruby ./crags.rb
  bundle exec jekyll build --source source
fi


build script

build script

#!/bin/sh

BUILDOS=$(uname -s)
BUILDARCH=$(uname -p)
OUTFILE="build/myq_status.$BUILDOS-$BUILDARCH"

go build -i -o $OUTFILE myq_status.go && echo "Built $OUTFILE"


config for rpi0

config for rpi0

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/beylsp/rpi-installer.git/'


Added build script.

Added build script.

#!/bin/bash

PROG=mocker

go build -o $PROG ./...

rm -rf out
./$PROG gen android

pushd out > /dev/null
./gradlew assemble
popd > /dev/null

rm -f $PROG


first commit of numpy build script

first commit of numpy build script

#!/bin/bash -e
SOURCE_FILE=$NAME-$VERSION.tar.gz

module load ci
module load python

echo "REPO_DIR is "
echo $REPO_DIR
echo "SRC_DIR is "
echo $SRC_DIR
echo "WORKSPACE is "
echo $WORKSPACE
echo "SOFT_DIR is"
echo $SOFT_DIR

mkdir -p $WORKSPACE
mkdir -p $SRC_DIR
mkdir -p $SOFT_DIR

#  Download the source file

if [[ ! -e $SRC_DIR/$SOURCE_FILE ]] ; then
  echo "seems like this is the first build - let's get the source"
  mkdir -p $SRC_DIR
  wget http://mirror.ufs.ac.za/numpy/NumPy/$VERSION/$SOURCE_FILE -O $SRC_DIR/$SOURCE_FILE
else
  echo "continuing from previous builds, using source at " $SRC_DIR/$SOURCE_FILE
fi
tar -xvzf $SRC_DIR/$SOURCE_FILE -C $WORKSPACE
cd $WORKSPACE/$NAME-$VERSION
python setup.py build


added profiling script

added profiling script

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


Add script to install jetbrains font

Add script to install jetbrains font

#!/bin/bash

wget "https://download.jetbrains.com/fonts/JetBrainsMono-1.0.0.zip" -O /tmp/jetbrainsfont.zip

mkdir $HOME/.fonts
unzip -d $HOME/.fonts /tmp/jetbrainsfont.zip
sudo fc-cache -f -v

rm -r /tmp/jetbrainsfont.zip

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


Missed the build file - here it is

Missed the build file - here it is

#!/bin/bash

# only proceed script when started not by pull request (PR)
if [ $TRAVIS_PULL_REQUEST == "true" ]; then
  echo "this is a PR, exiting"
  exit 0
fi

# enable error reporting to the console
set -e

# build site with jekyll, by default to `_site' folder
jekyll build

# cleanup
rm -rf ../andrewharmellaw.github.io.master

#clone `master' branch of the repository using encrypted GH_TOKEN for authentification
git clone https://${GH_TOKEN}@github.com/andrewharmellaw/andrewharmellaw.github.io.git ../andrewharmellaw.github.io.master

# copy generated HTML site to `master' branch
cp -R _site/* ../andrewharmellaw.github.io.master

# commit and push generated content to `master' branch
# since repository was cloned in write mode with token auth - we can push there
cd ../eshepelyuk.github.io.master
git config user.email "andrew@harmel-law.com"
git config user.name "Andrew Harmel-Law"
git add -A .
git commit -a -m "Travis #$TRAVIS_BUILD_NUMBER"
git push --quiet origin master > /dev/null 2>&1


Bugfix for ansible-playbook

Bugfix for ansible-playbook

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/jmdots/cicd-demo.git/'


Added draft for a build script

Added draft for a build 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/achernakov/flugegeheimen-nginx.git/'


log workspace

log workspace

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/bborbe/mysql_to_csv.git/'


release scripts: use dash instead of underscore for RPM filenames

#!/bin/bash

# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by 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 script builds all the minikube binary for all 3 platforms as well as Windows-installer and .deb
# This is intended to be run on a new release tag in order to build/upload the required files for a release

# The script expects the following env variables:
# VERSION_MAJOR: The major version of the tag to be released.
# VERSION_MINOR: The minor version of the tag to be released.
# VERSION_BUILD: The build version of the tag to be released.
# BUCKET: The GCP bucket the build files should be uploaded to.
# GITHUB_TOKEN: The Github API access token. Injected by the Jenkins credential provider.

set -eux -o pipefail
readonly VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
readonly DEB_VERSION="${VERSION/-/\~}"
readonly RPM_VERSION="${DEB_VERSION}"
readonly TAGNAME="v${VERSION}"

# Make sure the tag matches the Makefile
grep -E "^VERSION_MAJOR \\?=" Makefile | grep "${VERSION_MAJOR}"
grep -E "^VERSION_MINOR \\?=" Makefile | grep "${VERSION_MINOR}"
grep -E "^VERSION_BUILD \\?=" Makefile | grep "${VERSION_BUILD}"

# Force go packages to the Jekins home directory
export GOPATH=$HOME/go

# Verify ISO exists
echo "Verifying ISO exists ..."
make verify-iso

# Build and upload
env BUILD_IN_DOCKER=y \
  make -j 16 \
  all \
  out/minikube-installer.exe \
  "out/minikube_${DEB_VERSION}-0_amd64.deb" \
  "out/minikube-${RPM_VERSION}-0.x86_64.rpm" \
  "out/docker-machine-driver-kvm2_${DEB_VERSION}-0_amd64.deb" \
  "out/docker-machine-driver-kvm2-${RPM_VERSION}-0.x86_64.rpm"

make checksum

# unversioned names to avoid updating upstream Kubernetes documentation each release
cp "out/minikube_${DEB_VERSION}-0_amd64.deb" out/minikube_latest_amd64.deb
cp "out/minikube-${RPM_VERSION}-0.x86_64.rpm" out/minikube-latest.x86_64.rpm

gsutil -m cp out/* "gs://$BUCKET/releases/$TAGNAME/"

# Update "latest" release for non-beta/non-alpha builds
if ! [[ ${VERSION_BUILD} =~ ^[0-9]+$ ]]; then
  echo "NOTE: ${VERSION} appears to be a non-standard release, not updating /releases/latest"
  exit 0
fi

echo "Updating Docker images ..."
make push-gvisor-addon-image push-storage-provisioner-image

echo "Updating latest bucket for ${VERSION} release ..."
gsutil cp -r "gs://${BUCKET}/releases/${TAGNAME}/*" "gs://${BUCKET}/releases/latest/"

#!/bin/bash

# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by 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 script builds all the minikube binary for all 3 platforms as well as Windows-installer and .deb
# This is intended to be run on a new release tag in order to build/upload the required files for a release

# The script expects the following env variables:
# VERSION_MAJOR: The major version of the tag to be released.
# VERSION_MINOR: The minor version of the tag to be released.
# VERSION_BUILD: The build version of the tag to be released.
# BUCKET: The GCP bucket the build files should be uploaded to.
# GITHUB_TOKEN: The Github API access token. Injected by the Jenkins credential provider.

set -eux -o pipefail
readonly VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
readonly DEB_VERSION="${VERSION/-/\~}"
readonly RPM_VERSION="${DEB_VERSION}"
readonly TAGNAME="v${VERSION}"

# Make sure the tag matches the Makefile
grep -E "^VERSION_MAJOR \\?=" Makefile | grep "${VERSION_MAJOR}"
grep -E "^VERSION_MINOR \\?=" Makefile | grep "${VERSION_MINOR}"
grep -E "^VERSION_BUILD \\?=" Makefile | grep "${VERSION_BUILD}"

# Force go packages to the Jekins home directory
export GOPATH=$HOME/go

# Verify ISO exists
echo "Verifying ISO exists ..."
make verify-iso

# Build and upload
env BUILD_IN_DOCKER=y \
  make -j 16 \
  all \
  out/minikube-installer.exe \
  "out/minikube_${DEB_VERSION}-0_amd64.deb" \
  "out/minikube-${RPM_VERSION}-0.x86_64.rpm" \
  "out/docker-machine-driver-kvm2_${DEB_VERSION}-0_amd64.deb" \
  "out/docker-machine-driver-kvm2-${RPM_VERSION}-0.x86_64.rpm"

make checksum

# unversioned names to avoid updating upstream Kubernetes documentation each release
cp "out/minikube_${DEB_VERSION}-0_amd64.deb" out/minikube_latest_amd64.deb
cp "out/minikube-${RPM_VERSION}-0.x86_64.rpm" out/minikube_latest.x86_64.rpm

gsutil -m cp out/* "gs://$BUCKET/releases/$TAGNAME/"

# Update "latest" release for non-beta/non-alpha builds
if ! [[ ${VERSION_BUILD} =~ ^[0-9]+$ ]]; then
  echo "NOTE: ${VERSION} appears to be a non-standard release, not updating /releases/latest"
  exit 0
fi

echo "Updating Docker images ..."
make push-gvisor-addon-image push-storage-provisioner-image

echo "Updating latest bucket for ${VERSION} release ..."
gsutil cp -r "gs://${BUCKET}/releases/${TAGNAME}/*" "gs://${BUCKET}/releases/latest/"


Initial commit

Initial commit

clean.sh —> to --/clean/-- without using "Grunt-Task: clean", for "ASPDB®".
Usage: $ sh clean.sh

#!/bin/sh
# ==========================++== ASPDB® ==++==========================
#      A manually curated dedicated acid shock proteins database.
#
#                                 CCPE
#             Centre for Computational Protein Engineering
#
#                            Apache License
#                    http://www.apache.org/licenses/
#
#        Handcrafted by Prabhat Kumar, http://prabhatkumar.org/.
#     Copyright © 2006 - 2016, Prabhat Kumar. All rights reserved.
# Copyright © 2014 - 2016, Sequømics Corporation, All rights reserved.
# ====================================================================

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


Cleaning script for moving between major releases

#!/bin/bash
find . -name "*.pyc" -print0 | xargs -0 rm -rf


Add dropquad to list of scripts regularly checked.

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/ZerothAngel/FtDScripts.git/'


ping the semantic web

ping the semantic web

#
# http://pingthesemanticweb.com/api.php
#
# Setting up a REST Client
# PingtheSemanticWeb.com accepts form-based HTTP POST and GET requests for non-extended pings. For example, the following is a valid HTTP GET ping request:
#
# URL: http://pingthesemanticweb.com/rest/?url=[url]
#
# Where [url] have to be replaced by the escaped URL of the FOAF or SIOC document to update.
#
# Note: You have to escape the reserved characters: {";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","}
# Example HTTP GET request:
# http://pingthesemanticweb.com/rest/?url=http%3A//apassant.net/blog/sioc.php
# ; %3B
# / %2F
# ? %3F
# : %3A
# @ %40
# & %26
# = %3D
# + %2B
# $ %24
# , %2C

while [ $# -gt 0 ]; do
   url="$1"
   echo $url
   encoded=`echo $url | perl -e 'use URI::Escape; @userinput = <STDIN>; foreach (@userinput) { chomp($_); print uri_escape($_); }'`
   echo "   http://pingthesemanticweb.com/rest/?url=$encoded"
   shift
done

error: pathspec 'bin/util/ptsw.sh' did not match any file(s) known to git


Add bitbar configs

Add bitbar configs

#!/bin/bash
pmset -g batt | awk 'FNR == 2 {print $5}'

error: pathspec 'bitbar/rem.2s.sh' did not match any file(s) known to git


add snap training script

add snap training script

#!/bin/bash

set -euo pipefail

maker2zff=$HOME/apps/maker/bin/maker2zff
snapbin=$HOME/apps/maker/exe/snap

$maker2zff $1
$snapbin/fathom -categorize 1000 genome.ann genome.dna
$snapbin/fathom -export 1000 -plus uni.ann uni.dna
$snapbin/forge export.ann export.dna
$snapbin/hmm-assembler.pl ha412 . > ha412.hmm

error: pathspec 'gene_annotation/gene_annotation_shell_scripts/train_snap.sh' did not match any file(s) known to git


Add nagios plugin for checking that a process is running and also its thread count

#!/usr/bin/env bash
#
## check_process_threads.sh
##
## Copyright (C) 2015 KISS IT Consulting <http://www.kissitconsulting.com/>
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
##
## 1. Redistributions of source code must retain the above copyright
##    notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above
##    copyright notice, this list of conditions and the following
##    disclaimer in the documentation and/or other materials
##    provided with the distribution.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ANY
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##
## Instructions
##
##
## These are the default settings used if not passed in via the options.  Change if desired.
PIDFILE=
PROCNAME=
PIDCHECK=0
WARN=100
CRIT=200

##################################################################################
## Nothing below here should need changed for normal cases
##################################################################################
usage()
{
cat << EOF
usage: $0 options

This nagios plugin can be used to check that a) a process is running and b) the number of threads its using

OPTIONS:
   -h   Show this message
   -p   PID file to use (One of -p or -n is required)
   -n   Process name to use (One of -p or -n is required)
   -w   Warning threshold for threads
   -c   Critical threshold for threads
EOF
}

while getopts "hp:n:w:c:" OPTION
do
     case $OPTION in
         h)
             usage
             exit 1
             ;;
         p)
             PIDFILE=$OPTARG
             ;;
         n)
             PROCNAME=$OPTARG
             ;;
         w)
             WARN=$OPTARG
             ;;
         c)
             CRIT=$OPTARG
             ;;
         ?)
             usage
             exit 0
             ;;
     esac
done

if [[ -z $PIDFILE ]] && [[ -z $PROCNAME ]]; then
     usage
     exit 0
fi

if [ -n "$PIDFILE" ]; then
    # Use the PID from the PID File if it exists and we can read it
    if [ -r "$PIDFILE" ]; then
        PIDCHECK=`cat $PIDFILE`
    else
        echo "ERROR: PID File cannot be read"
        exit 2;
    fi
else
    # Try to find the PID from the process name.
    PIDCHECK=`pgrep -fo $PROCNAME`
fi

if [[ -z $PIDCHECK ]]; then
    echo "CRITICAL: process not running"
    exit 2;
else
    THREADS=`ps -T -p $PIDCHECK | sed 1d | wc -l`
    if [ "$THREADS" -ge "$CRIT" ]; then
        echo "CRITICAL: $THREADS threads running"
        exit 2;
    elif [ "$THREADS" -ge "$WARN" ]; then
        echo "WARNING: $THREADS threads running"
        exit 1;
    else
        echo "OK: $THREADS threads running"
        exit 0;
    fi
fi

error: pathspec 'monitoring/nagios/plugins/check_process_threads.sh' did not match any file(s) known to git


debug.sh: helper for launching the debug server

#!/bin/bash
#
# Prepares and launces the stand-alone debugging SkyLines server.
#

set -e

cd `dirname $0`
python setup.py --quiet egg_info

if test -z "$@"; then
    paster serve --reload development.ini
else
    paster serve --reload "$@"
fi

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


Create awesome.sh

Create awesome.sh

# Configure Awesome
touch  ~/.config/awesome/rc.lua
wget -O ~/.config/awesome/rc.lua https://raw.githubusercontent.com/AllGray/PocketDesk/master/rc.lua
cp /usr/share/pocket-home/config.json ~/.pocket-home/config.json
sudo rm ~/.pocket-home/.passwd/passwd

sed -i -e 's/NoDisplay=true/NoDisplay=false/g'  /usr/share/xsessions/awesome.desktop

Sync

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


[rid_qualifier] Add script to run flight_data_generator.py in the docker container (#527)

#!/usr/bin/env bash

# Find and change to repo root directory
OS=$(uname)
if [[ "$OS" == "Darwin" ]]; then
	# OSX uses BSD readlink
	BASEDIR="$(dirname "$0")"
else
	BASEDIR=$(readlink -e "$(dirname "$0")")
fi
cd "${BASEDIR}/../.." || exit 1

docker build \
    -f monitoring/rid_qualifier/Dockerfile \
    -t interuss/dss/rid_qualifier \
    --build-arg version=`scripts/git/commit.sh` \
    monitoring

docker run -i -t --name flight_data_generator \
  --rm \
  --tty \
  -e PYTHONBUFFERED=1 \
  -v $(pwd)/monitoring/rid_qualifier/test_definitions:/app/test_definitions \
  interuss/dss/rid_qualifier \
  python flight_data_generator.py

error: pathspec 'monitoring/rid_qualifier/run_flight_data_generator.sh' did not match any file(s) known to git


Create npm-install-coffeescript.sh

Create npm-install-coffeescript.sh

#!/bin/bash

# This script uses NPM to install CoffeeScript globally

echo ""
echo "[Provision-Script] Installing CoffeeScript"
echo ""

npm install -g coffee-script

error: pathspec 'vagrant/centos7/dev/v1/npm-install-coffeescript.sh' did not match any file(s) known to git


fix echo bug in fetch.sh

fix echo bug in fetch.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/imwithye/dotfiles.git/'


add github deploy script

add github deploy script

#!/bin/sh

git push origin master
git push origin master:gh-pages

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


add 32/64 14.1 mirror sed command

add 32/64 14.1 mirror sed command

#!/bin/sh

# curl https://raw.github.com/ryanpcmcquen/linuxTweaks/master/slackware/config-o-matic/slackFluxConfigROOT.sh | bash

## configure lilo
sed -i 's/^#compact/lba32\
compact/g' /etc/lilo.conf

sed -i 's/^timeout = 50/timeout = 5/g' /etc/lilo.conf

lilo

## change to utf-8 encoding
sed -i 's/^export LANG=en_US/#export LANG=en_US/g' /etc/profile.d/lang.sh
sed -i 's/^#export LANG=en_US.UTF-8/export LANG=en_US.UTF-8/g' /etc/profile.d/lang.sh

sed -i '38isbopkg' /etc/slackpkg/blacklist

## doesn't work
#sed -i 's/#[0-9]+_SBo/\
#[0-9]+_SBo/g' /etc/slackpkg/blacklist

sed -i '39i[0-9]+_SBo' /etc/slackpkg/blacklist

## choose 64-14.1 or 32 mirrorbrain mirror
sed -i 's_^# http://mirrors.slackware.com/slackware/slackware64-14.1/_http://mirrors.slackware.com/slackware/slackware64-14.1/_g' /etc/slackpkg/mirrors
sed -i 's_^# http://mirrors.slackware.com/slackware/slackware-14.1/_http://mirrors.slackware.com/slackware/slackware-14.1/_g' /etc/slackpkg/mirrors

curl https://raw.github.com/ryanpcmcquen/linuxTweaks/master/bashGitVimROOT.sh | bash

wget -N http://sbopkg.googlecode.com/files/sbopkg-0.37.0-noarch-1_cng.tgz -P ~/
wget -N http://sourceforge.net/projects/slackpkgplus/files/slackpkg%2B-1.3.0-noarch-2mt.txz -P ~/

installpkg ~/*.t?z

error: pathspec 'slackware/config-o-matic/slackFluxConfig14.1ROOT.sh' did not match any file(s) known to git


Add liborbital recipe

Add liborbital recipe

GIT=https://github.com/xtibor/liborbital

function recipe_stage {
    dest="$(realpath $1)"
    make HOST="$HOST" DESTDIR="$dest" install
    skip=1
}

error: pathspec 'recipes/liborbital/recipe.sh' did not match any file(s) known to git


created sqlalchemy recipe for compiling its C extension in ARM environment.

#!/bin/bash

VERSION_sqlalchemy=0.8.2
DEPS_sqlalchemy=(python)
URL_sqlalchemy=https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-${VERSION_sqlalchemy}.tar.gz
MD5_sqlalchemy=5a33fb43dea93468dbb2a6562ee80b54
BUILD_sqlalchemy=$BUILD_PATH/sqlalchemy/$(get_directory "${URL_sqlalchemy}")
RECIPE_sqlalchemy=$RECIPES_PATH/sqlalchemy

function prebuild_sqlalchemy() {
	true
}

function build_sqlalchemy() {
	if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/sqlalchemy" ]; then
		return
	fi

	cd $BUILD_sqlalchemy

	push_arm

	try $BUILD_PATH/python-install/bin/python.host setup.py install -O2

	pop_arm
}

function postbuild_sqlalchemy() {
	true
}

error: pathspec 'recipes/sqlalchemy/recipe.sh' did not match any file(s) known to git


reshuffel, lint and document

reshuffel, lint and document

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/'


Perform automatic output diffing

Perform automatic output diffing

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/stevenpetryk/cda-project-grader.git/'


this set's up the qiime env. see _install-mgr-apps.sh for original source

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


Add a script to collect built thirdparty libs to avoid download and building again. (#3521)

#!/usr/bin/env bash
set -x

# Cause the script to exit if a single command fails.
set -e

ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)

function usage() {
  echo "Usage: collect_dependent_libs.sh [<args>]"
  echo
  echo "Options:"
  echo "  -h|--help               print the help info"
  echo "  -d|--target-dir         the target directory to put all the thirdparty libs"
  echo "  -n|--no-build           do not build ray, used in case that ray is already built"
  echo "  -r|--resource           the resource file name (default: resource.txt)"
  echo
}

# By default all the libs will be put into ./thirdparty/external_project_libs.
# However, this directory could be cleaned by `git clean`.
# Users can provide another directory using -d option.
DIR="$ROOT_DIR/../external_project_libs"
# By default ray will be built before copying the libs.
# Users can skip the building process if they have built ray.
BUILD="YES"

RESOURCE="resource.txt"

# Parse options
while [[ $# > 0 ]]; do
  key="$1"
  case $key in
    -h|--help)
      usage
      exit 0
      ;;
    -d|--target-dir)
      DIR="$2"
      shift
      ;;
    -n|--no-build)
      BUILD="NO"
      ;;
    -r|--resource)
      RESOURCE="$2"
      shift
      ;;
    *)
      echo "ERROR: unknown option \"$key\""
      echo
      usage
      exit -1
      ;;
  esac
  shift
done

echo "External project libs will be put to $DIR"
if [ ! -d "$DIR" ]; then
  mkdir -p $DIR
fi

pushd $ROOT_DIR
if [ "$BUILD" = "YES" ]; then
  echo "Build Ray First."
  ../../build.sh
fi

RAY_BUILD_DIR=$ROOT_DIR/../../build/external/
ARROW_BUILD_DIR=$ROOT_DIR/../../build/external/arrow/src/arrow_ep-build/

function cp_one_lib() {
  if [[ ! -d "$1" ]]; then
    echo "Lib root dir $1 does not exist!"
    exit -1
  fi
  if [[ ! -d "$1/include" ]]; then
    echo "Lib inlcude dir $1 does not exist!"
    exit -1
  fi
  if [[ ! -d "$1/lib" && ! -d "$1/lib64" ]]; then
    echo "Lib dir $1 does not exist!"
    exit -1
  fi
  cp -rf $1 $DIR
}

# copy libs that ray needs.
cp_one_lib $RAY_BUILD_DIR/boost-install
cp_one_lib $RAY_BUILD_DIR/flatbuffers-install
cp_one_lib $RAY_BUILD_DIR/glog-install
cp_one_lib $RAY_BUILD_DIR/googletest-install

# copy libs that arrow needs.
cp_one_lib $ARROW_BUILD_DIR/snappy_ep/src/snappy_ep-install
cp_one_lib $ARROW_BUILD_DIR/thrift_ep/src/thrift_ep-install

# generate the export script.
echo "Output the exporting resource file to $DIR/$RESOURCE."
echo "export BOOST_ROOT=$DIR/boost-install" > $DIR/$RESOURCE
echo "export RAY_BOOST_ROOT=\$BOOST_ROOT" >> $DIR/$RESOURCE

echo "export FLATBUFFERS_HOME=$DIR/flatbuffers-install" >> $DIR/$RESOURCE
echo "export RAY_FLATBUFFERS_HOME=\$FLATBUFFERS_HOME" >> $DIR/$RESOURCE

echo "export GTEST_HOME=$DIR/googletest-install" >> $DIR/$RESOURCE
echo "export RAY_GTEST_HOME=\$GTEST_HOME" >> $DIR/$RESOURCE

echo "export GLOG_HOME=$DIR/glog-install" >> $DIR/$RESOURCE
echo "export RAY_GLOG_HOME=\$GLOG_HOME" >> $DIR/$RESOURCE

echo "export SNAPPY_HOME=$DIR/snappy_ep-install" >> $DIR/$RESOURCE
echo "export THRIFT_HOME=$DIR/thrift_ep-install" >> $DIR/$RESOURCE

popd

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


Helper for mining the warmer

Helper for mining the warmer

#!/bin/bash

if [ "$1" == "" ]; then
    echo "$0 warmer_log"
    exit 1
fi

grep ERROR: $1 | sed -e 's|.*cap=ibp://||g' | cut -f1 -d# | sort | uniq -c | sort -nr

error: pathspec 'lserver/files/usr/local/bin/bad_warmer_rids.sh' did not match any file(s) known to git


add source url to deploy script

add source url to deploy 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/tinchodias/girasol.git/'


First version of beancounter_usage script

#!/bin/bash
#description 	:This script show the usage percent of some beancounters
#author			:turo.vargas@gmail.com
#date 			:2013-08-08
#version		:0.1
#===========================================================================
declare -a ubc_usage
declare usage

ubc=(kmemsize privvmpages oomguarpages tcpsndbuf tcprcvbuf othersockbuf numfile)

file="/proc/bc/resources"

while read -r line;
do
	#echo "$line"
	label=$(echo $line | awk '{print $1}')
	if [[ $label == "Version:" ]] || [[ $label == "uid" ]]; then
		continue
	fi
	#echo "label $label"
	veid=$(grep -o "[0-9]*" <<<"$label")

	if [[ "$veid" == 0 ]]; then
                break
        fi

	if [[ "$veid" != "" ]]; then
		echo -e "\nveid $veid";
		label=$(echo $line | awk '{print $2}')
	fi

	if [[ $(echo "${ubc[@]}" | fgrep --word-regexp "$label" | wc -c) > 0 ]]; then
		#echo "found $label!"

		if [[ "$label" == "kmemsize" ]]; then
               		usage=$(echo $line | awk '{ percent = $3 * 100 / $5; printf "%.0f\n", percent }')
	        else
        	        usage=$(echo $line | awk '{ percent = $2 * 100 / $4; printf "%.0f\n", percent }')
        	fi

		if [[ "$usage" -lt 90 ]]; then
			echo -e "$label: \t$usage%"
		else
			echo -e "$label: \t\e[00;31m$usage%\e[00m"
		fi
	fi

done < "$file"

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


Setup for dual screen home

Setup for dual screen home

#! /bin/sh

if [ $(xrandr|grep "DVI-I-2 connected"|wc -l) -eq 1 ] && [ $(xrandr|grep "DVI-I-3 connected"|wc -l) -eq 1 ]
then
  # at home
   xrandr --output DVI-I-2 --mode 1920x1080 --pos 1440x0 --primary
   xrandr --output DVI-I-3 --auto --pos 0x90 --noprimary
fi

exit 0

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


Update getGatewayAddress.sh

Update getGatewayAddress.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/liman/ldepo.git/'


re-add libsodium install script

re-add libsodium install script

#!/bin/bash

# This is needed because Ubuntu precise (12.04 LTS) doesn't know libsodium yet
# and I don't wanna use wily (unstable) because CMake 3.3 is not needed (CMake
# 2.8.12 is enough).

SODIUM_URL=https://github.com/jedisct1/libsodium/releases/download/1.0.3/libsodium-1.0.3.tar.gz
cd `mktemp -d /tmp/install-libsodium-XXXX`
wget $SODIUM_URL || exit 1
tar xf libsodium-*.tar.gz && cd libsodium-* || exit 1
./configure && make && make check && sudo make install || exit 1

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


add scanner-ecosystem.sh

add scanner-ecosystem.sh

ecosystem=ecosystem-0.92-65-35575ed

rm -rf ${ecosystem}-scanner

test -f ${ecosystem}.zip || curl -O http://archives.redpitaya.com/devel/${ecosystem}.zip

unzip -d ${ecosystem}-scanner ${ecosystem}.zip

arm-xilinx-linux-gnueabi-gcc -static projects/scanner/server/scanner.c -lm -o ${ecosystem}-scanner/bin/scanner
cp boot.bin devicetree.dtb uImage tmp/scanner.bit ${ecosystem}-scanner

cat <<- EOF_CAT > ${ecosystem}-scanner/uEnv.txt

kernel_image=uImage

devicetree_image=devicetree.dtb

ramdisk_image=uramdisk.image.gz

kernel_load_address=0x2080000

devicetree_load_address=0x2000000

ramdisk_load_address=0x4000000

bootcmd=mmcinfo && fatload mmc 0 \${kernel_load_address} \${kernel_image} && fatload mmc 0 \${devicetree_load_address} \${devicetree_image} && load mmc 0 \${ramdisk_load_address} \${ramdisk_image} && bootm \${kernel_load_address} \${ramdisk_load_address} \${devicetree_load_address}

bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk

EOF_CAT

cat <<- EOF_CAT >> ${ecosystem}-scanner/etc/init.d/rcS

# start MCPHA server

cat /opt/scanner.bit > /dev/xdevcfg

/opt/bin/scanner &

EOF_CAT

cd ${ecosystem}-scanner
zip -r ../${ecosystem}-scanner.zip .
cd ..

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


push in row mock file

push in row mock file

#!/bin/bash
if [[ $# -ne 1 ]]
then
    echo "Usage: nprocess"
    exit -1
fi

rm -rf train-machine.row* *.model
k=$1
# make machine data
cd ../../demo/regression/
python mapfeat.py
python mknfold.py machine.txt 1
cd -

# split the lib svm file into k subfiles
python splitrows.py ../../demo/regression/machine.txt.train train-machine $k

# run xgboost mpi
../../rabit/tracker/rabit_mpi.py $k local ../../rabit/test/keepalive.sh ../../xgboost machine-row.conf dsplit=row num_round=3 mock=1,1,1,0

error: pathspec 'multi-node/row-split/machine-row-rabit-mock.sh' did not match any file(s) known to git


packer: No linux-image-extra in Ubuntu 15.10 or later.

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/kurmaos.git/'