Changed uboot path

Changed uboot path

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/MattDooner/crochet-freebsd.git/'


origin determination was moved to setup.sh

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


Fix zun log dir permissions

Fix zun log dir permissions

Change-Id: I9bc413d99953d93f8cd9bbcfcf74bd70c70c13ff

#!/bin/bash

if [[ ! -d "/var/log/kolla/zun" ]]; then
    mkdir -p /var/log/kolla/zun
fi
if [[ $(stat -c %U:%G /var/log/kolla/zun) != "zun:kolla" ]]; then
    chown zun:kolla /var/log/kolla/zun
fi
if [[ $(stat -c %a /var/log/kolla/zun) != "755" ]]; then
    chmod 755 /var/log/kolla/zun
fi

. /usr/local/bin/kolla_zun_extend_start

#!/bin/bash

if [[ ! -d "/var/log/kolla/zun" ]]; then
    mkdir -p /var/log/kolla/zun
fi
if [[ $(stat -c %a /var/log/kolla/zun) != "755" ]]; then
    chmod 755 /var/log/kolla/zun
fi

. /usr/local/bin/kolla_zun_extend_start


add lxc-start-aufs

add lxc-start-aufs

#!/bin/bash

CONTAINERS_DIR=/var/lib/lxc/
TEMPLATE_ROOTFS_DIR=/var/cache/lxc/saucy/rootfs-amd64

NAME=$1

CONTAINER_DIR=$CONTAINERS_DIR/$NAME

# mkdir
RW_DIR=$CONTAINER_DIR/rw
ROOTFS_DIR=$CONTAINER_DIR/rootfs

# mount as aufs
mount -t aufs -o br=$RW_DIR:$TEMPLATE_ROOTFS_DIR none $ROOTFS_DIR

# invoke lxc-create
lxc-start -d -n $1

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


bugfix

bugfix

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


Create install.sh

Create install.sh

#!/bin/bash

cp config/os-release/os-release /mnt/etc/os-release

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


Add publish.sh

Add publish.sh

#!/bin/bash -eux

cd npf
hugo
cd public
cp blog/index.html index.html
cd ../..

cd npfpersonal
hugo
cd public
cp blog/index.html index.html
cd ..
cp -r public/* ../npf/public/personal/
cd ..

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


q&d script to restart puma server

q&d script to restart puma server

#!/bin/sh
ps auxw | grep puma | grep -v grep > /dev/null

if [ $? != 0 ]
then
	puma -p 3000 > /dev/null
fi

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


Adding a script that downloads and patches the ColorEditor syntax highlighting plugin for Eclipse so that it supports CoffeeScript.

#!/bin/bash

# Downloads an Eclipse syntax-highlighting plugin for Eclipse named
# ColorEditor (http://www.gstaff.org/colorEditor/) and modifies it
# to support syntax highlighting for CoffeeScript.
#
# Adapted from manual instructions at
# http://stackoverflow.com/questions/4246024/coffeescript-editor-for-macos

set -e

BUILD_DIR=build.cbg
JAR=cbg.editor_1.2.6.jar

# Create a temporary directory and download the original jar.
mkdir -p ${BUILD_DIR}
pushd ${BUILD_DIR}
wget http://www.gstaff.org/colorEditor/${JAR}

# Extract the contents of the jar and edit the necessary files.
jar -xf ${JAR}
sed -i -e 's#,cls#,cls,coffee#' plugin.xml
pushd modes
sed -i -e 's#</MODES>#<MODE NAME="coffee" FILE="coffeescript.xml" FILE_NAME_GLOB="*.coffee" /></MODES>#' catalog

# Optional: Remove the stuff about ### being a block comment because
# the CoffeeScript source code uses #### to indicate a heading
# (for its documentation generator), which is then treated as an open
# block comment that is never closed.
wget https://raw.github.com/dhotson/coffeescript-jedit/master/coffeescript.xml
sed -i -e '/commentStart/d' coffeescript.xml
sed -i -e '/commentEnd/d' coffeescript.xml
sed -i -e '/<SPAN TYPE="COMMENT2">/,/<\/SPAN>/D' coffeescript.xml

# Remove the downloaded jar and pop back to the original directory.
popd
rm ${JAR}
popd

# Create the new jar file.
# Be sure to use -M so that the original manifest is not overwritten.
jar -cMf ${JAR} -C ${BUILD_DIR} .
rm -rf ${BUILD_DIR}

echo "Add ${JAR} to your \$ECLIPSE_HOME/plugins directory and restart Eclipse with the -clean flag."

error: pathspec 'patch-color-editor.sh' did not match any file(s) known to git


Support grep with modules/grep

Support grep with modules/grep

error: pathspec 'modules/grep/interactive.sh' did not match any file(s) known to git


chore(packageRelease.sh): 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/ozone-development/ozp-iwc-owf7-widget-adapter.git/'


install recommends

install recommends

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


wget must overwrite for xml atom feeds to update

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


download the README file

download the README file

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


Fix the `stdin: is not a tty` message

Fix the `stdin: is not a tty` message

#!/bin/sh

# Fix the `stdin: is not a tty` message
sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile

error: pathspec 'vagrant/provision/fix_stdin_not_tty_message.sh' did not match any file(s) known to git


Add comments

Add comments

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/drew-gee/pelican-zenity.git/'


Adding bamboo config

Adding bamboo config

#!/bin/bash
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc.  Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program.  If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# -----------------------------------------------------------------------------

# Install what's necessary on top of raw Ubuntu for testing a NuPIC wheel.
#
# NOTE much of this will eventually go into a docker image

set -o errexit
set -o xtrace

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

apt-get update
apt-get install -y \
  apt-utils \
  python2.7 \
  python2.7-dev \
  libffi-dev \
  libssl-dev \
  curl \
  build-essential \
  openssl

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --set python /usr/bin/python2.7

#
# Install and start mysql (needed for integration and swarming tests)
#

# Install, suppressing prompt for admin password, settling for blank password
DEBIAN_FRONTEND=noninteractive \
  debconf-set-selections <<< 'mysql-server mysql-server/root_password password'

DEBIAN_FRONTEND=noninteractive \
  debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password'

DEBIAN_FRONTEND=noninteractive \
  apt-get -y install mysql-server

# Start mysql server
/usr/bin/mysqld_safe &

#
# Install pip/setuptools/wheel
#
${MY_DIR}/install-pip-setuptools-wheel.sh

# Hack to resolve SNIMissingWarning
pip install urllib3[secure]

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


Update bgnotify.plugin.zsh

Update bgnotify.plugin.zsh

Fixed error with spaces in commands

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/takady/oh-my-zsh.git/'


Add CakePHP3 plugin

Add CakePHP3 plugin


add build_add.sh

add build_add.sh

#!/bin/bash

VERSION=$1

pushd OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2 && \
pushd package/ChinaDNS-C && \
git fetch origin && \
git merge origin/dev --ff-only && \
popd && \
make V=s && \
rsync --progress -e ssh bin/ar71xx/packages/ChinaDNS-C_$1_ar71xx.ipk frs.sourceforge.net:/home/frs/project/chinadns/dist/ && \
popd && \

pushd OpenWrt-SDK-brcm47xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2 && \
make V=s && \
rsync --progress -e ssh bin/brcm47xx/packages/base/ChinaDNS-C_$1_brcm47xx.ipk frs.sourceforge.net:/home/frs/project/chinadns/dist/ && \
popd && \

pushd OpenWrt-SDK-brcm63xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2 && \
make V=s && \
rsync --progress -e ssh bin/brcm63xx/packages/base/ChinaDNS-C_$1_brcm63xx.ipk frs.sourceforge.net:/home/frs/project/chinadns/dist/ && \
popd && \

pushd OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2 && \
make V=s && \
rsync --progress -e ssh bin/ramips/packages/base/ChinaDNS-C_$1_ramips_24kec.ipk frs.sourceforge.net:/home/frs/project/chinadns/dist/ && \
popd

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


Update dep.sh

Update dep.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/JonaDupIO/docker-machine.git/'


add example using markup

add example using markup

rgb.sh example using markup.
need rgb.txt file from X consortium.

#! /usr/bin/env bash

# name=$(sed -n 's/^[0-9 \t]*\([a-zA-Z0-9 ].*$\)/██ <\/span>\1/p' /usr/share/nvim/runtime/rgb.txt| t4 -l 40  | cut -d ' ' -f 2-) ; grep -hw "$name" /usr/share/nvim/runtime/rgb.txt

if [[ -f /usr/share/nvim/runtime/rgb.txt ]]; then
    rgb_file=/usr/share/nvim/runtime/rgb.txt
elif [[ -f /usr/share/emacs/26.3/etc/rgb.txt ]]; then
    rgb_file=/usr/share/emacs/26.3/etc/rgb.txt
elif [[ -f /usr/share/vim/vim81/rgb.txt ]]; then
    rgb_file=/usr/share/vim/vim81/rgb.txt
else
        echo "file rgb.txt not found"
        exit 1
fi

select=$(sed -n 's/^[0-9 \t]*\([a-zA-Z0-9 ].*$\)/██ <\/span>\1/p' ${rgb_file} | t4 -l 40  | cut -d ' ' -f 2-)

if [[ -z ${select} ]]; then
    exit 1
else
    selected=$(grep -hw "${select}" ${rgb_file})
    echo ${selected}
fi

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


:penguin: 赋执行权限

:penguin: 赋执行权限

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


Streamline logging in Linux framework

Streamline logging in Linux framework

Also writes to the console, which is captured as the system log in EC2.
This makes it easy to view the results from the AWS console or API.

Former-commit-id: ce79e15d4b879139105d24a9e326834e4e3b347a
Former-commit-id: edc4c740cbd3a869b16d5afdd6b64c38038cc321
Former-commit-id: b7d85d425ac55cbc1708fbe7426c0fc1f02e6c22

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

#User variables
SOURCEISS3BUCKET="True"
AWSREGION="us-east-1"
SYSTEMPREPMASTERSCRIPTSOURCE="https://s3.amazonaws.com/systemprep/MasterScripts/systemprep-linuxmaster.py"
SYSTEMPREPPARAMS=( "SaltStates=Highstate"
                   "NoReboot=False"
                   "SourceIsS3Bucket=${SOURCEISS3BUCKET}"
                   "AwsRegion=${AWSREGION}" )

#System variables
SCRIPTNAME=${0}
AWS=$(which aws)
CURL=$(which curl)
WGET=$(which wget)
LOGGER=$(which logger)
TIMESTAMP=$(date -u +"%Y%m%d_%H%M_%S")
WORKINGDIR=/usr/tmp
LOGDIR=/var/log
LOGTAG=systemprep
LOGFILE="${LOGDIR}/${LOGTAG}-${TIMESTAMP}.log"
LOGLINK="${LOGDIR}/${LOGTAG}.log"

# Validate logger exists
if [[ (! -x ${LOGGER}) || (-z "${LOGGER}") ]]; then
	echo "Can't find 'logger' in path. Quitting..." > /dev/console 2>&1
	exit
fi

# Validate log directory exists
if [[ ! -d ${LOGDIR} ]]; then
  echo "Creating ${LOGDIR} directory." >(${LOGGER} -t "${LOGTAG}" -s 2> /dev/console) 2>&1
  mkdir ${LOGDIR} >(${LOGGER} -t "${LOGTAG}" -s 2> /dev/console) 2>&1
fi

# Validate working directory exists
if [[ ! -d ${WORKINGDIR} ]]; then
  echo "Creating ${WORKINGDIR} directory" >(${LOGGER} -t "${LOGTAG}" -s 2> /dev/console) 2>&1
  mkdir ${WORKINGDIR} >(${LOGGER} -t "${LOGTAG}" -s 2> /dev/console) 2>&1
fi

# Establish logging to write to the logfile, syslog, and the console
exec > >(tee "${LOGFILE}" | "${LOGGER}" -t "${LOGTAG}" -s 2> /dev/console) 2>&1

# Create the link to the logfile
touch ${LOGFILE}
ln -s -f ${LOGFILE} ${LOGLINK}

# Change to the working directory
cd ${WORKINGDIR}

# Create the log file and write out the parameters
echo "Entering SystemPrep script -- ${SCRIPTNAME}"
echo "Writing SystemPrep Parameters to log file..."
for param in "${SYSTEMPREPPARAMS[@]}"; do echo "   ${param}" ; done

# Download the master script
SCRIPTFILENAME=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{ print ( $(NF) ) }')
SCRIPTFULLPATH=${WORKINGDIR}/${SCRIPTFILENAME}
if [[ "true" = ${SOURCEISS3BUCKET,,} ]]; then
    if [[ (-x ${AWS}) && (! -z ${AWS}) ]]; then
        echo "Using AWS Tools to download from S3 Bucket -- ${SYSTEMPREPMASTERSCRIPTSOURCE}"
        KEY=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{$1=$2=$3=""; print substr($0,4)}' OFS="/")
        ${AWS} s3 cp s3://${KEY} ${SCRIPTFULLPATH} --source-region ${AWSREGION}
    else
        echo "Missing 'aws' in path. Could not download file. Quitting..."
        exit
    fi
else
    if [[ (-x ${CURL}) && (! -z ${CURL}) ]]; then
        echo "Using 'curl' to download from web host -- ${SYSTEMPREPMASTERSCRIPTSOURCE}"
        ${CURL} -L -O -s -S ${SYSTEMPREPMASTERSCRIPTSOURCE}
    elif [[ (-x ${WGET}) && (! -z ${WGET}) ]]; then
        echo "Using 'wget' to download from web host -- ${SYSTEMPREPMASTERSCRIPTSOURCE}"
        ${WGET} --quiet ${SYSTEMPREPMASTERSCRIPTSOURCE}
    else
        echo "Missing 'curl' or 'wget' in path. Could not download file. Quitting..."
        exit
    fi
fi

# Convert the parameter list to a string
# The string will be converted to a python dictionary by the master script
PARAMSTRING=$( IFS=$' '; echo "${SYSTEMPREPPARAMS[*]}" )

# Temporarily suppress rsyslog rate limiting
if [[ -e /etc/rsyslog.conf ]]; then
    echo "Temporarily disabling rsyslog rate limiting"
    RSYSLOGFLAG=1
    # Replace or append the $SystemLogRateLimitInterval parameter
    grep -q '^$SystemLogRateLimitInterval' /etc/rsyslog.conf && \
        sed -i.bak -e \
        "s/^$SystemLogRateLimitInterval.*/$SystemLogRateLimitInterval 0/" \
        /etc/rsyslog.conf || \
        sed -i.bak "$ a\$SystemLogRateLimitInterval 0" /etc/rsyslog.conf
    echo "Restarting rsyslog..."
    service rsyslog restart
fi

# Execute the master script
SCRIPTFILENAME=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{ print ( $(NF) ) }')
SCRIPTFULLPATH=${WORKINGDIR}/${SCRIPTFILENAME}
echo "Running the SystemPrep master script -- ${SCRIPTFULLPATH}"
python ${SCRIPTFULLPATH} ${PARAMSTRING}

# Restore prior rsyslog config
if [[ -n "${RSYSLOGFLAG}" ]]; then
    # Sleep to let the logger catch up with the output of the python script...
    sleep 2
    echo "Re-storing previous rsyslog configuration"
    mv -f /etc/rsyslog.conf.bak /etc/rsyslog.conf
    echo "Restarting rsyslog..."
    service rsyslog restart
fi

# Cleanup
echo "Deleting the SystemPrep master script -- ${SCRIPTFULLPATH}"
rm -f ${SCRIPTFULLPATH}

# Exit
echo "Exiting SystemPrep bootstrap script -- ${SCRIPTNAME}"

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

#User variables
SOURCEISS3BUCKET="True"
AWSREGION="us-east-1"
SYSTEMPREPMASTERSCRIPTSOURCE="https://s3.amazonaws.com/systemprep/MasterScripts/systemprep-linuxmaster.py"
SYSTEMPREPPARAMS=( "SaltStates=Highstate"
                   "NoReboot=False"
                   "SourceIsS3Bucket=${SOURCEISS3BUCKET}"
                   "AwsRegion=${AWSREGION}" )

#System variables
SCRIPTNAME=${0}
AWS=$(which aws)
CURL=$(which curl)
WGET=$(which wget)
LOGGER=$(which logger)
TIMESTAMP=$(date -u +"%Y%m%d_%H%M_%S")
WORKINGDIR=/usr/tmp
LOGDIR=/var/log
LOGTAG=systemprep
LOGFILE="${LOGDIR}/${LOGTAG}-${TIMESTAMP}.log"

log() {
    if [[ -n "$1" ]]; then
        IN="$1"
    else
        read IN
    fi
    echo ${IN} | tee -a "${LOGFILE}" | "${LOGGER}" -t "${LOGTAG}"
}

# Validate logger exists
if [[ (! -x ${LOGGER}) || (-z "${LOGGER}") ]]; then
	echo "Can't find 'logger' in path. Quitting..."
	exit
fi

# Validate log directory exists
if [[ ! -d ${LOGDIR} ]]; then
  echo "Creating ${LOGDIR} directory." 2>&1 | ${LOGGER} -t "${LOGTAG}"
  mkdir ${LOGDIR} 2>&1 | "${LOGGER}" -t "${LOGTAG}"
fi

# Validate working directory exists
if [[ ! -d ${WORKINGDIR} ]]; then
  echo "Creating ${WORKINGDIR} directory" 2>&1 | "${LOGGER}" -t "${LOGTAG}"
  mkdir ${WORKINGDIR} 2>&1 | "${LOGGER}" -t "${LOGTAG}"
fi

# Change to the working directory
cd ${WORKINGDIR}

# Create the log file and write out the parameters
echo "Entering SystemPrep script -- ${SCRIPTNAME}" 2>&1 | log
echo "Writing SystemPrep Parameters to log file..." 2>&1 | log
for param in "${SYSTEMPREPPARAMS[@]}"; do echo "   ${param}" 2>&1 | log ; done

# Download the master script
SCRIPTFILENAME=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{ print ( $(NF) ) }')
SCRIPTFULLPATH=${WORKINGDIR}/${SCRIPTFILENAME}
if [[ "true" = ${SOURCEISS3BUCKET,,} ]]; then
    if [[ (-x ${AWS}) && (! -z ${AWS}) ]]; then
        echo "Using AWS Tools to download from S3 Bucket -- ${SYSTEMPREPMASTERSCRIPTSOURCE}" 2>&1 | log
        KEY=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{$1=$2=$3=""; print substr($0,4)}' OFS="/")
        ${AWS} s3 cp s3://${KEY} ${SCRIPTFULLPATH} --source-region ${AWSREGION} 2>&1 | log
    else
        echo "Missing 'aws' in path. Could not download file. Quitting..." 2>&1 | log
        exit
    fi
else
    if [[ (-x ${CURL}) && (! -z ${CURL}) ]]; then
        echo "Using 'curl' to download from web host -- ${SYSTEMPREPMASTERSCRIPTSOURCE}" 2>&1 | log
        ${CURL} -L -O -s -S ${SYSTEMPREPMASTERSCRIPTSOURCE} 2>&1 | log
    elif [[ (-x ${WGET}) && (! -z ${WGET}) ]]; then
        echo "Using 'wget' to download from web host -- ${SYSTEMPREPMASTERSCRIPTSOURCE}" 2>&1 | log
        ${WGET} --quiet ${SYSTEMPREPMASTERSCRIPTSOURCE} 2>&1 | log
    else
        echo "Missing 'curl' or 'wget' in path. Could not download file. Quitting..." 2>&1 | log
        exit
    fi
fi

# Convert the parameter list to a string
# The string will be converted to a python dictionary by the master script
PARAMSTRING=$( IFS=$' '; echo "${SYSTEMPREPPARAMS[*]}" )

# Execute the master script
SCRIPTFILENAME=$(echo ${SYSTEMPREPMASTERSCRIPTSOURCE} | awk -F'/' '{ print ( $(NF) ) }')
SCRIPTFULLPATH=${WORKINGDIR}/${SCRIPTFILENAME}
echo "Running the SystemPrep master script -- ${SCRIPTFULLPATH}" 2>&1 | log
python ${SCRIPTFULLPATH} ${PARAMSTRING} &>> ${LOGFILE}

# Cleanup
echo "Deleting the SystemPrep master script -- ${SCRIPTFULLPATH}" 2>&1 | log
rm -f ${SCRIPTFULLPATH}  2>&1 | log

# Exit
echo "Exiting SystemPrep bootstrap script -- ${SCRIPTNAME}" 2>&1 | log


Some formatting changes

Some formatting changes

#!/bin//bash

SYNC(){
    rsync -e ssh -avh --progress --delete --inplace --compress-level=0 ~/BackUps/ \
	    bblinder_backup-$(date +%F).tar.gz pi@raspberrypi:/path/to/.bblinder_backup/ ; return 0 \
	    || return 1
}

SYNC
if [[ $SYNC -eq 0 ]]
then
    echo "All done."
else
    echo "Sync failed."
fi

#!/bin//bash

SYNC(){
    rsync -e ssh -avh --progress --delete --inplace --compress-level=0 ~/BackUps/bblinder_backup-$(date +%F).tar.gz pi@raspberrypi:/path/to/.bblinder_backup/ ; return 0

}

SYNC
if [[ $SYNC -eq 0 ]]
then
    echo "All done."
else
    echo "Sync failed."
fi


update

update

#!/bin/bash
# manview.sh: Formats the source of a man page for viewing.

#  This script is useful when writing man page source.
#  It lets you look at the intermediate results on the fly
#+ while working on it.

E_WRONGARGS=85

if [ -z "$1" ]
then
  echo "Usage: `basename $0` filename"
  exit $E_WRONGARGS
fi

# ---------------------------
groff -Tascii -man $1 | less
# From the man page for groff.
# ---------------------------

#  If the man page includes tables and/or equations,
#+ then the above code will barf.
#  The following line can handle such cases.
#
#   gtbl < "$1" | geqn -Tlatin1 | groff -Tlatin1 -mtty-char -man
#
#   Thanks, S.C.

exit $?   # See also the "maned.sh" script.

error: pathspec 'abs/16/manview.sh' did not match any file(s) known to git


Simple script to help generate the python code to create and access the web service

wsdl2py -l -f visualizerservice.wsdl
wsdl2dispatch -f visualizerservice.wsdl

error: pathspec 'apollo-ws/visualizer-services/GAIA/trunk/gen.sh' did not match any file(s) known to git


Utility script to rerun autoconf and autoheader

git-svn-id: 620571fa9b4bd0cbce9a0cf901e91ef896adbf27@2802 d073be05-634f-4543-b044-5fe20cf6d1d6

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


Create offer2AddIcon-v4.sh

Create offer2AddIcon-v4.sh

#!/bin/sh

#########################################################################################
##
##	Script Name:        offer2AddIcon-v4.sh
##	Author:             Mike Morales
##	Last Date Modified: 06-13-2014
##	Notes:		    Edited to include cocoaDialog GUI functions if installed
##		            Added error check if app path is not found on disk, to exit
##
#########################################################################################

## Get information about the logged in user
user=$(stat -f%Su /dev/console)
HomeDirPath=$( /usr/bin/dscl . -read /Users/$user NFSHomeDirectory | awk '{print $2}' )

## Set the location to dockutil and the SS icon
dockutil="/usr/sbin/dockutil"
icon="/Applications/Self Service.app/Contents/Resources/Self Service.icns"

## Location of cocoaDialog and jamfHelper
cdPath="/Library/Application Support/JAMF/bin/cocoaDialog.app/Contents/MacOS/cocoaDialog"
jhPath="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"

## Parameter assignments. $4, $5 and $6 must be assigned within the Casper Suite policy
AppName=""
ID=""
AppPath=""

## Assign REQUIRED parameters 4, 5 and 6 to "AppName", "ID" and "AppPath" respectively
if [ "$4" != "" ] && [ "$AppName" == "" ]; then
	AppName=$4
fi

if [ "$5" != "" ] && [ "$ID" == "" ]; then
	ID=$5
fi

if [ "$6" != "" ] && [ "$AppPath" == "" ]; then
	AppPath=$6
fi

## Set optional parameter for "after" icon
## Note, script will continue if this parameter is not assigned in the policy
if [ "$7" != "" ]; then
	AfterApp=$7
fi

## Check for assigned parameters. If either $4 or $5 fail, we exit with an error
if [ "$AppName" == "" ]; then
	echo "Error:  The parameter 'AppName' is blank.  Please specify an application name."
	exit 1
fi

if [ "$ID" == "" ]; then
	echo "Error:  The parameter 'ID' is blank.  Please specify a Dock icon ID #."
	exit 1
fi

if [ "$AppPath" == "" ]; then
	echo "Error:  The parameter 'AppPath' is blank.  Please specify an application path."
	exit 1
fi

## Debug process - Echoing parameters
echo "Listing parameters for script:
App Name:\t${AppName}
App Path:\t${AppPath}
Icon ID:\t${ID}
Username:\t${user}"

## Creating variables based on assigned parameters
dockIconCheck=$( /usr/bin/defaults read $HomeDirPath/Library/Preferences/com.apple.dock | grep "file-label.*${AppName}" )

## Various message strings that we may use
MSG1="The $AppName installation has completed.

The $AppName icon is not in your Dock. Would you like to add it now?"

MSG2="The $AppName installation has completed"

MSG3="The $AppName icon is not in your Dock. Would you like to add it now?"

#### BEGIN SCRIPT CONTENTS. DO NOT EDIT BELOW THIS LINE ####

## Function to add the Dock icon using either dockutil or the jamf binary
function addDockIcon ()
{

if [[ -f /usr/sbin/dockutil ]]; then
	echo "$user clicked \"Yes\", adding $AppName Dock icon. dockutil found on system. Utilizing..."
	if [[ $AfterApp != "" ]]; then
		if [[ $( /usr/sbin/dockutil --list /Users/$user | awk -F"file" '{print $1}' | grep "$AfterApp" ) != "" ]]; then
			## The After app was found in the user's Dock, so place the new icon after it
			/usr/sbin/dockutil --add "/Applications/$AppName.app" --after "$AfterApp" /Users/$user
			echo "$AppName icon added after the $AfterApp icon in $user's Dock"
		else
			## The After app wasn't found in the user's Dock, so place it at the end
			/usr/sbin/dockutil --add "/Applications/$AppName.app" /Users/$user
			echo "$AppName icon added to the end of $user's Dock"
		fi
	else
		## No After app was set in the script parameter, so just add it to the end of the Dock
		/usr/sbin/dockutil --add "/Applications/$AppName.app" /Users/$user
		echo "$AppName icon added to the end of $user's Dock"
	fi
else
	## Dockutil isn't installed, so fall back to using the jamf binary function
	echo "$user clicked \"Yes\", adding $AppName Dock icon. dockutil not found on system. Using jamf binary..."
	/usr/local/jamf/bin/jamf modifyDock -id "$ID" -end
	echo "$AppName icon added to $user's Dock"
fi

}

## First check to make sure the AppPath executable exists on the Mac or we exit silently,
## since it means perhaps the installation from Self Service failed

if [[ ! -d "${AppPath}" ]]; then
	echo "The application at $AppPath isn't on this Mac, so exit"
	exit 1
fi

## If the Dock icon is not found, offer to add it
if [[ "$dockIconCheck" = "" ]]; then
	echo "The icon for $AppName was not found in $user's Dock"
	if [[ -e "$cdPath" ]]; then
		## cocoaDialog is installed. Display cocoaDialog message
		offerRes=$( "$cdPath" msgbox --title "Self Service" --text "$MSG2" --informative-text "$MSG3" --button1 "   Yes   " --button2 "   No   " \
		--cancel "button2" --timeout 30 --timeout-format " " --icon-file "$icon" --posY top --width 400 --string-output )
	else
		## cocoaDialog isn't installed yet, so fall back to using jamfHelper. Display jamfHelper message
		offerRes=$( "$jamfHelper" -windowType utility -title "Self Service" -description "$MSG1" -button1 "Yes" -button2 "No" \
		-defaultButton 1 -cancelButton 2 -timeout 30 -icon "$icon" )
	fi

	## Check the result of the offer dialog
	if [[ "$offerRes" == "0" ]] || [[ "$offerRes" =~ "Yes" ]]; then
		## Looks like the Yes was button was clicked, so move on to the add Dock icon function
		addDockIcon
	else
		echo "$user clicked \"No\". Leaving Dock as is and exiting"
		exit 0
	fi
fi

## If the Dock icon is already present, let the user know installation is complete
if [[ "$dockIconCheck" != "" ]]; then
	echo "$AppName icon was already found in $user's Dock"
	if [[ -e "$cdPath" ]]; then
		## cocoaDialog is installed. Use it
		"$cdPath" msgbox --title "Self Service" --text "Complete" --informative-text "$MSG2" --button1 "    OK    " --timeout 10 --timeout-format " " --icon-file "$icon" --posY top
	else
		## cocoaDialog isn't installed, so use jamfHelper
		"$jamfHelper" -windowType utility -title "Self Service" -description "$MSG2" -button1 "OK" -defaultButton 1 -timeout 10 -icon "$icon"
	fi
fi

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


scripts: sync with master of: git://github.com/RobertCNelson/stable-kernel.git

Signed-off-by: Robert Nelson <d6c41255011d14bfa93d8562b946ca186cfa0c7b@gmail.com>

#!/bin/sh -e

#opensuse support added by: Antonio Cavallo
#https://launchpad.net/~a.cavallo

warning () { echo "! $@" >&2; }
error () { echo "* $@" >&2; exit 1; }
info () { echo "+ $@" >&2; }
ltrim () { echo "$1" | awk '{ gsub(/^[ \t]+/,"", $0); print $0}'; }
rtrim () { echo "$1" | awk '{ gsub(/[ \t]+$/,"", $0); print $0}'; }
trim () { local x="$( ltrim "$1")"; x="$( rtrim "$x")"; echo "$x"; }

detect_host () {
	local REV DIST PSEUDONAME

	if [ -f /etc/redhat-release ] ; then
		DIST='RedHat'
		PSEUDONAME=$(cat /etc/redhat-release | sed s/.*\(// | sed s/\)//)
		REV=$(cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//)
		echo "redhat-$REV"
	elif [ -f /etc/SuSE-release ] ; then
		DIST=$(cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//)
		REV=$(cat /etc/SuSE-release | tr "\n" ' ' | sed s/.*=\ //)
		trim "suse-$REV"
	elif [ -f /etc/debian_version ] ; then
		DIST="Debian Based"
		debian="debian"
		echo "${debian}"
	fi
}

check_rpm () {
	pkg_test=$(LC_ALL=C rpm -q ${pkg})
	if [ "x${pkg_test}" = "xpackage ${pkg} is not installed" ] ; then
		rpm_pkgs="${rpm_pkgs}${pkg} "
	fi
}

redhat_reqs () {
	#https://fedoraproject.org/wiki/Releases
	unset rpm_pkgs
	pkg="redhat-lsb-core"
	check_rpm
	pkg="gcc"
	check_rpm
	pkg="ncurses-devel"
	check_rpm
	pkg="wget"
	check_rpm

	arch=$(uname -m)
	if [ "x${arch}" = "xx86_64" ] ; then
		pkg="ncurses-devel.i686"
		check_rpm
		pkg="libstdc++.i686"
		check_rpm
		pkg="zlib.i686"
		check_rpm
	fi

	if [ $(which lsb_release) ] ; then
		rpm_distro=$(lsb_release -rs)
		echo "RPM distro version: [${rpm_distro}]"

		case "${rpm_distro}" in
		6.4|6.5)
			echo "-----------------------------"
			echo "Warning: RHEL/CentOS [${rpm_distro}] has no [uboot-tools] pkg by default"
			echo "add: [EPEL] repo: https://fedoraproject.org/wiki/EPEL"
			echo "http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html"
			echo "-----------------------------"
			pkg="uboot-tools"
			check_rpm
			;;
		7.0)
			echo "-----------------------------"
			echo "Warning: RHEL/CentOS [${rpm_distro}] has no [uboot-tools] pkg by default"
			echo "add: [EPEL] repo: https://fedoraproject.org/wiki/EPEL"
			echo "http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html"
			echo "-----------------------------"
			#pkg="uboot-tools"
			#check_rpm
			;;
		17|18|19|20)
			pkg="uboot-tools"
			check_rpm
			;;
		*)
			echo "Warning: [uboot-tools] package check still in development"
			echo "Please email to: bugs@rcn-ee.com"
			echo "Success/Failure of [yum install uboot-tools]"
			echo "RPM distro version: [${rpm_distro}]"
			pkg="uboot-tools"
			check_rpm
			;;
		esac
	fi

	if [ "${rpm_pkgs}" ] ; then
		echo "Red Hat, or derivatives: missing dependencies, please install:"
		echo "-----------------------------"
		echo "yum install ${rpm_pkgs}"
		echo "-----------------------------"
		return 1
	fi
}

suse_regs () {
    local BUILD_HOST="$1"
# --- SuSE-release ---
    if [ ! -f /etc/SuSE-release ]
    then
        cat >&2 <<@@
Missing /etc/SuSE-release file
 this file is part of the efault suse system. If this is a
 suse system for real, please install the package with:

    zypper install openSUSE-release
@@
        return 1
    fi

# --- patch ---
    if [ ! $( which patch ) ]
    then
        cat >&2 <<@@
Missing patch command,
 it is part of the opensuse $BUILD_HOST distribution so it can be
 installed simply using:

    zypper install patch

@@
        return 1
    fi

# --- mkimage ---
    if [ ! $( which mkimage ) ]
    then
        cat >&2 <<@@
Missing mkimage command.
 This command is part of a package not provided directly from
 opensuse. It can be found under several places for suse.
 There are two ways to install the package: either using a rpm
 or using a repo.
 In the second case these are the command to issue in order to
 install it:

    zypper addrepo -f http://download.opensuse.org/repositories/home:/jblunck:/beagleboard/openSUSE_11.2
    zypper install uboot-mkimage

@@
        return 1
    fi

}

check_dpkg () {
	LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}$" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} "
}

debian_regs () {
	unset deb_pkgs
	pkg="bc"
	check_dpkg
	pkg="build-essential"
	check_dpkg
	pkg="device-tree-compiler"
	check_dpkg
	pkg="fakeroot"
	check_dpkg
	pkg="lsb-release"
	check_dpkg
	pkg="lzma"
	check_dpkg
	pkg="lzop"
	check_dpkg
	pkg="man-db"
	check_dpkg

	unset warn_dpkg_ia32
	unset stop_pkg_search
	#lsb_release might not be installed...
	if [ $(which lsb_release) ] ; then
		deb_distro=$(lsb_release -cs | sed 's/\//_/g')

		if [ "x${deb_distro}" = "xn_a" ] ; then
			echo "+ Warning: [lsb_release -cs] just returned [n/a], so now testing [lsb_release -rs] instead..."
			deb_lsb_rs=$(lsb_release -rs | awk '{print $1}' | sed 's/\//_/g')

			#http://docs.kali.org/kali-policy/kali-linux-relationship-with-debian
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID:    Debian
			#Description:    Debian GNU/Linux Kali Linux 1.0
			#Release:    Kali Linux 1.0
			#Codename:    n/a
			if [ "x${deb_lsb_rs}" = "xKali" ] ; then
				deb_distro="wheezy"
			fi

			#Debian "testing"
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID: Debian
			#Description:    Debian GNU/Linux testing/unstable
			#Release:        testing/unstable
			#Codename:       n/a
			if [ "x${deb_lsb_rs}" = "xtesting_unstable" ] ; then
				deb_distro="jessie"
			fi
		fi

		if [ "x${deb_distro}" = "xtesting" ] ; then
			echo "+ Warning: [lsb_release -cs] just returned [testing], so now testing [lsb_release -ds] instead..."
			deb_lsb_ds=$(lsb_release -ds | awk '{print $1}')

			#http://solydxk.com/about/solydxk/
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID: SolydXK
			#Description:    SolydXK
			#Release:        1
			#Codename:       testing
			if [ "x${deb_lsb_ds}" = "xSolydXK" ] ; then
				deb_distro="jessie"
			fi
		fi

		if [ "x${deb_distro}" = "xluna" ] ; then
			#http://distrowatch.com/table.php?distribution=elementary
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID:    elementary OS
			#Description:    elementary OS Luna
			#Release:    0.2
			#Codename:    luna
			deb_distro="precise"
		fi

		#Linux Mint: Compatibility Matrix
		#http://www.linuxmint.com/oldreleases.php
		#http://packages.linuxmint.com/index.php
		case "${deb_distro}" in
		debian)
			deb_distro="jessie"
			;;
		isadora)
			deb_distro="lucid"
			;;
		julia)
			deb_distro="maverick"
			;;
		katya)
			deb_distro="natty"
			;;
		lisa)
			deb_distro="oneiric"
			;;
		maya)
			deb_distro="precise"
			;;
		nadia)
			deb_distro="quantal"
			;;
		olivia)
			deb_distro="raring"
			;;
		petra)
			deb_distro="saucy"
			;;
		esac

		case "${deb_distro}" in
		squeeze|wheezy|jessie|sid)
			#Supported Debian:
			unset error_unknown_deb_distro
			unset warn_eol_distro
			;;
		lucid|precise|quantal|saucy|trusty)
			#Supported Ubuntu:
			unset error_unknown_deb_distro
			unset warn_eol_distro
			;;
		raring)
			#Old Ubuntu: between lts: precise -> trusty
			#But still on: http://us.archive.ubuntu.com/ubuntu/dists/
			unset error_unknown_deb_distro
			warn_eol_distro=1
			;;
		oneiric)
			#Old Ubuntu: between lts: lucid -> precise
			#But still on: http://us.archive.ubuntu.com/ubuntu/dists/ (supported except for oneiric)
			#in 'theory' could bring oneiric back, but no reason too at this point...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		maverick|natty)
			#Old Ubuntu: between lts: lucid -> precise
			#removed from http://us.archive.ubuntu.com/ubuntu/dists/ thus unsupported...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		hardy)
			#Old Ubuntu LTS: unsupported...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		*)
			error_unknown_deb_distro=1
			unset warn_eol_distro
			stop_pkg_search=1
			;;
		esac
	fi

	if [ $(which lsb_release) ] && [ ! "${stop_pkg_search}" ] ; then
		deb_arch=$(LC_ALL=C dpkg --print-architecture)

		#pkg: mkimage
		case "${deb_distro}" in
		squeeze|lucid)
			pkg="uboot-mkimage"
			check_dpkg
			;;
		*)
			pkg="u-boot-tools"
			check_dpkg
			;;
		esac

		#Libs; starting with jessie/sid/saucy, lib<pkg_name>-dev:<arch>
		case "${deb_distro}" in
		jessie|sid|saucy|trusty)
			pkg="libncurses5-dev:${deb_arch}"
			check_dpkg
			;;
		*)
			pkg="libncurses5-dev"
			check_dpkg
			;;
		esac

		#pkg: ia32-libs
		if [ "x${deb_arch}" = "xamd64" ] ; then
			unset dpkg_multiarch
			case "${deb_distro}" in
			squeeze|lucid|precise)
				pkg="ia32-libs"
				check_dpkg
				;;
			wheezy|jessie|sid|quantal|raring|saucy|trusty)
				pkg="libc6:i386"
				check_dpkg
				pkg="libncurses5:i386"
				check_dpkg
				pkg="libstdc++6:i386"
				check_dpkg
				pkg="zlib1g:i386"
				check_dpkg
				dpkg_multiarch=1
				;;
			esac

			if [ "${dpkg_multiarch}" ] ; then
				unset check_foreign
				check_foreign=$(LC_ALL=C dpkg --print-foreign-architectures)
				if [ "x${check_foreign}" = "x" ] ; then
					warn_dpkg_ia32=1
				fi
			fi
		fi
	fi

	if [ "${warn_eol_distro}" ] ; then
		echo "End Of Life (EOL) deb based distro detected."
		echo "-----------------------------"
	fi

	if [ "${stop_pkg_search}" ] ; then
		echo "Dependency check skipped, you are on your own."
		echo "-----------------------------"
		unset deb_pkgs
	fi

	if [ "${error_unknown_deb_distro}" ] ; then
		echo "Unrecognized deb based system:"
		echo "-----------------------------"
		echo "Please cut, paste and email to: bugs@rcn-ee.com"
		echo "-----------------------------"
		echo "git: `git rev-parse HEAD`"
		echo "uname -m"
		uname -m
		echo "lsb_release -a"
		lsb_release -a
		echo "-----------------------------"
		return 1
	fi

	if [ "${deb_pkgs}" ] ; then
		echo "Debian/Ubuntu/Mint: missing dependencies, please install:"
		echo "-----------------------------"
		if [ "${warn_dpkg_ia32}" ] ; then
			echo "sudo dpkg --add-architecture i386"
		fi
		echo "sudo apt-get update"
		echo "sudo apt-get install ${deb_pkgs}"
		echo "-----------------------------"
		return 1
	fi
}

BUILD_HOST=${BUILD_HOST:="$( detect_host )"}
if [ $(which lsb_release) ] ; then
	info "Detected build host [`lsb_release -sd`]"
	info "host: [`uname -m`]"
	info "git HEAD commit: [`git rev-parse HEAD`]"
else
	info "Detected build host [$BUILD_HOST]"
	info "host: [`uname -m`]"
	info "git HEAD commit: [`git rev-parse HEAD`]"
fi
case "$BUILD_HOST" in
    redhat*)
	    redhat_reqs || error "Failed dependency check"
        ;;
    debian*)
	    debian_regs || error "Failed dependency check"
        ;;
    suse*)
	    suse_regs "$BUILD_HOST" || error "Failed dependency check"
        ;;
esac

#!/bin/sh -e

#opensuse support added by: Antonio Cavallo
#https://launchpad.net/~a.cavallo

warning () { echo "! $@" >&2; }
error () { echo "* $@" >&2; exit 1; }
info () { echo "+ $@" >&2; }
ltrim () { echo "$1" | awk '{ gsub(/^[ \t]+/,"", $0); print $0}'; }
rtrim () { echo "$1" | awk '{ gsub(/[ \t]+$/,"", $0); print $0}'; }
trim () { local x="$( ltrim "$1")"; x="$( rtrim "$x")"; echo "$x"; }

detect_host () {
	local REV DIST PSEUDONAME

	if [ -f /etc/redhat-release ] ; then
		DIST='RedHat'
		PSEUDONAME=$(cat /etc/redhat-release | sed s/.*\(// | sed s/\)//)
		REV=$(cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//)
		echo "redhat-$REV"
	elif [ -f /etc/SuSE-release ] ; then
		DIST=$(cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//)
		REV=$(cat /etc/SuSE-release | tr "\n" ' ' | sed s/.*=\ //)
		trim "suse-$REV"
	elif [ -f /etc/debian_version ] ; then
		DIST="Debian Based"
		debian="debian"
		echo "${debian}"
	fi
}

check_rpm () {
	pkg_test=$(LC_ALL=C rpm -q ${pkg})
	if [ "x${pkg_test}" = "xpackage ${pkg} is not installed" ] ; then
		rpm_pkgs="${rpm_pkgs}${pkg} "
	fi
}

redhat_reqs () {
	#https://fedoraproject.org/wiki/Releases
	unset rpm_pkgs
	pkg="redhat-lsb-core"
	check_rpm
	pkg="gcc"
	check_rpm
	pkg="ncurses-devel"
	check_rpm
	pkg="wget"
	check_rpm

	arch=$(uname -m)
	if [ "x${arch}" = "xx86_64" ] ; then
		pkg="ncurses-devel.i686"
		check_rpm
		pkg="libstdc++.i686"
		check_rpm
		pkg="zlib.i686"
		check_rpm
	fi

	if [ $(which lsb_release) ] ; then
		rpm_distro=$(lsb_release -rs)
		echo "RPM distro version: [${rpm_distro}]"

		case "${rpm_distro}" in
		6.4|6.5)
			echo "-----------------------------"
			echo "Warning: RHEL/CentOS [${rpm_distro}] has no [uboot-tools] pkg by default"
			echo "add: [EPEL] repo: https://fedoraproject.org/wiki/EPEL"
			echo "http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html"
			echo "-----------------------------"
			pkg="uboot-tools"
			check_rpm
			;;
		7.0)
			echo "-----------------------------"
			echo "Warning: RHEL/CentOS [${rpm_distro}] has no [uboot-tools] pkg by default"
			echo "add: [EPEL] repo: https://fedoraproject.org/wiki/EPEL"
			echo "http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html"
			echo "-----------------------------"
			#pkg="uboot-tools"
			#check_rpm
			;;
		17|18|19|20)
			pkg="uboot-tools"
			check_rpm
			;;
		*)
			echo "Warning: [uboot-tools] package check still in development"
			echo "Please email to: bugs@rcn-ee.com"
			echo "Success/Failure of [yum install uboot-tools]"
			echo "RPM distro version: [${rpm_distro}]"
			pkg="uboot-tools"
			check_rpm
			;;
		esac
	fi

	if [ "${rpm_pkgs}" ] ; then
		echo "Red Hat, or derivatives: missing dependencies, please install:"
		echo "-----------------------------"
		echo "yum install ${rpm_pkgs}"
		echo "-----------------------------"
		return 1
	fi
}

suse_regs () {
    local BUILD_HOST="$1"
# --- SuSE-release ---
    if [ ! -f /etc/SuSE-release ]
    then
        cat >&2 <<@@
Missing /etc/SuSE-release file
 this file is part of the efault suse system. If this is a
 suse system for real, please install the package with:

    zypper install openSUSE-release
@@
        return 1
    fi

# --- patch ---
    if [ ! $( which patch ) ]
    then
        cat >&2 <<@@
Missing patch command,
 it is part of the opensuse $BUILD_HOST distribution so it can be
 installed simply using:

    zypper install patch

@@
        return 1
    fi

# --- mkimage ---
    if [ ! $( which mkimage ) ]
    then
        cat >&2 <<@@
Missing mkimage command.
 This command is part of a package not provided directly from
 opensuse. It can be found under several places for suse.
 There are two ways to install the package: either using a rpm
 or using a repo.
 In the second case these are the command to issue in order to
 install it:

    zypper addrepo -f http://download.opensuse.org/repositories/home:/jblunck:/beagleboard/openSUSE_11.2
    zypper install uboot-mkimage

@@
        return 1
    fi

}

check_dpkg () {
	LC_ALL=C dpkg --list | awk '{print $2}' | grep "^${pkg}$" >/dev/null || deb_pkgs="${deb_pkgs}${pkg} "
}

debian_regs () {
	unset deb_pkgs
	pkg="bc"
	check_dpkg
	pkg="build-essential"
	check_dpkg
	pkg="device-tree-compiler"
	check_dpkg
	pkg="fakeroot"
	check_dpkg
	pkg="lsb-release"
	check_dpkg
	pkg="lzma"
	check_dpkg
	pkg="lzop"
	check_dpkg
	pkg="man-db"
	check_dpkg

	unset warn_dpkg_ia32
	unset stop_pkg_search
	#lsb_release might not be installed...
	if [ $(which lsb_release) ] ; then
		deb_distro=$(lsb_release -cs | sed 's/\//_/g')

		if [ "x${deb_distro}" = "xn_a" ] ; then
			echo "+ Warning: [lsb_release -cs] just returned [n/a], so now testing [lsb_release -rs] instead..."
			deb_lsb_rs=$(lsb_release -rs | awk '{print $1}' | sed 's/\//_/g')

			#http://docs.kali.org/kali-policy/kali-linux-relationship-with-debian
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID:    Debian
			#Description:    Debian GNU/Linux Kali Linux 1.0
			#Release:    Kali Linux 1.0
			#Codename:    n/a
			if [ "x${deb_lsb_rs}" = "xKali" ] ; then
				deb_distro="wheezy"
			fi

			#Debian "testing"
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID: Debian
			#Description:    Debian GNU/Linux testing/unstable
			#Release:        testing/unstable
			#Codename:       n/a
			if [ "x${deb_lsb_rs}" = "xtesting_unstable" ] ; then
				deb_distro="jessie"
			fi
		fi

		if [ "x${deb_distro}" = "xtesting" ] ; then
			echo "+ Warning: [lsb_release -cs] just returned [testing], so now testing [lsb_release -ds] instead..."
			deb_lsb_ds=$(lsb_release -ds | awk '{print $1}')

			#http://solydxk.com/about/solydxk/
			#lsb_release -a
			#No LSB modules are available.
			#Distributor ID: SolydXK
			#Description:    SolydXK
			#Release:        1
			#Codename:       testing
			if [ "x${deb_lsb_ds}" = "xSolydXK" ] ; then
				deb_distro="jessie"
			fi
		fi

		#Linux Mint: Compatibility Matrix
		#http://www.linuxmint.com/oldreleases.php
		#http://packages.linuxmint.com/index.php
		case "${deb_distro}" in
		debian)
			deb_distro="jessie"
			;;
		isadora)
			deb_distro="lucid"
			;;
		julia)
			deb_distro="maverick"
			;;
		katya)
			deb_distro="natty"
			;;
		lisa)
			deb_distro="oneiric"
			;;
		maya)
			deb_distro="precise"
			;;
		nadia)
			deb_distro="quantal"
			;;
		olivia)
			deb_distro="raring"
			;;
		petra)
			deb_distro="saucy"
			;;
		esac

		case "${deb_distro}" in
		squeeze|wheezy|jessie|sid)
			#Supported Debian:
			unset error_unknown_deb_distro
			unset warn_eol_distro
			;;
		lucid|precise|quantal|saucy|trusty)
			#Supported Ubuntu:
			unset error_unknown_deb_distro
			unset warn_eol_distro
			;;
		raring)
			#Old Ubuntu: between lts: precise -> trusty
			#But still on: http://us.archive.ubuntu.com/ubuntu/dists/
			unset error_unknown_deb_distro
			warn_eol_distro=1
			;;
		oneiric)
			#Old Ubuntu: between lts: lucid -> precise
			#But still on: http://us.archive.ubuntu.com/ubuntu/dists/ (supported except for oneiric)
			#in 'theory' could bring oneiric back, but no reason too at this point...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		maverick|natty)
			#Old Ubuntu: between lts: lucid -> precise
			#removed from http://us.archive.ubuntu.com/ubuntu/dists/ thus unsupported...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		hardy)
			#Old Ubuntu LTS: unsupported...
			unset error_unknown_deb_distro
			warn_eol_distro=1
			stop_pkg_search=1
			;;
		*)
			error_unknown_deb_distro=1
			unset warn_eol_distro
			stop_pkg_search=1
			;;
		esac
	fi

	if [ $(which lsb_release) ] && [ ! "${stop_pkg_search}" ] ; then
		deb_arch=$(LC_ALL=C dpkg --print-architecture)

		#pkg: mkimage
		case "${deb_distro}" in
		squeeze|lucid)
			pkg="uboot-mkimage"
			check_dpkg
			;;
		*)
			pkg="u-boot-tools"
			check_dpkg
			;;
		esac

		#Libs; starting with jessie/sid/saucy, lib<pkg_name>-dev:<arch>
		case "${deb_distro}" in
		jessie|sid|saucy|trusty)
			pkg="libncurses5-dev:${deb_arch}"
			check_dpkg
			;;
		*)
			pkg="libncurses5-dev"
			check_dpkg
			;;
		esac

		#pkg: ia32-libs
		if [ "x${deb_arch}" = "xamd64" ] ; then
			unset dpkg_multiarch
			case "${deb_distro}" in
			squeeze|lucid|precise)
				pkg="ia32-libs"
				check_dpkg
				;;
			wheezy|jessie|sid|quantal|raring|saucy|trusty)
				pkg="libc6:i386"
				check_dpkg
				pkg="libncurses5:i386"
				check_dpkg
				pkg="libstdc++6:i386"
				check_dpkg
				pkg="zlib1g:i386"
				check_dpkg
				dpkg_multiarch=1
				;;
			esac

			if [ "${dpkg_multiarch}" ] ; then
				unset check_foreign
				check_foreign=$(LC_ALL=C dpkg --print-foreign-architectures)
				if [ "x${check_foreign}" = "x" ] ; then
					warn_dpkg_ia32=1
				fi
			fi
		fi
	fi

	if [ "${warn_eol_distro}" ] ; then
		echo "End Of Life (EOL) deb based distro detected."
		echo "-----------------------------"
	fi

	if [ "${stop_pkg_search}" ] ; then
		echo "Dependency check skipped, you are on your own."
		echo "-----------------------------"
		unset deb_pkgs
	fi

	if [ "${error_unknown_deb_distro}" ] ; then
		echo "Unrecognized deb based system:"
		echo "-----------------------------"
		echo "Please cut, paste and email to: bugs@rcn-ee.com"
		echo "-----------------------------"
		echo "git: `git rev-parse HEAD`"
		echo "uname -m"
		uname -m
		echo "lsb_release -a"
		lsb_release -a
		echo "-----------------------------"
		return 1
	fi

	if [ "${deb_pkgs}" ] ; then
		echo "Debian/Ubuntu/Mint: missing dependencies, please install:"
		echo "-----------------------------"
		if [ "${warn_dpkg_ia32}" ] ; then
			echo "sudo dpkg --add-architecture i386"
		fi
		echo "sudo apt-get update"
		echo "sudo apt-get install ${deb_pkgs}"
		echo "-----------------------------"
		return 1
	fi
}

BUILD_HOST=${BUILD_HOST:="$( detect_host )"}
if [ $(which lsb_release) ] ; then
	info "Detected build host [`lsb_release -sd`]"
	info "host: [`uname -m`]"
	info "git HEAD commit: [`git rev-parse HEAD`]"
else
	info "Detected build host [$BUILD_HOST]"
	info "host: [`uname -m`]"
	info "git HEAD commit: [`git rev-parse HEAD`]"
fi
case "$BUILD_HOST" in
    redhat*)
	    redhat_reqs || error "Failed dependency check"
        ;;
    debian*)
	    debian_regs || error "Failed dependency check"
        ;;
    suse*)
	    suse_regs "$BUILD_HOST" || error "Failed dependency check"
        ;;
esac


Create a10v2-power-shell-android-sdk.sh

Create a10v2-power-shell-android-sdk.sh

#!bin/bash

# may need a new power shell for each line

android update sdk --filter platform-tools --no-ui --force

android update sdk --filter tools --no-ui --force
android update sdk --filter extra --no-ui --force

android update sdk --filter extra --no-ui --force
android update sdk --all --filter build-tools-23.0.2 --no-ui --force
android update sdk --filter android-20 --no-ui --force   #Android 4.4W.2 KitKat

#android update sdk --filter android-22 --no-ui --force   #Android 5.1.1  Lollipop
#android update sdk --filter android-23 --no-ui --force   #Android 6.0    Marshmallow

android list sdk

error: pathspec 'a10v2-power-shell-android-sdk.sh' did not match any file(s) known to git


Add add-copyright.sh script

Add add-copyright.sh script

#!/bin/sh
cp $1 $1.bak
cat copyright-header-template.txt $1.bak > $1
rm -f $1.bak

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


Updated bash settings

Updated bash settings

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/shanep/os-config.git/'


add dns-resolver-ip tool

add dns-resolver-ip tool

#!/bin/bash -e

function main()
{
    local -r attributeFile="${1}"

    local -r appPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    local -r command='grep -o "^CCMUI_DNS_RESOLVER_IP=.*$" "/apps/scripts/ccweb.sh" &&
                      grep -F 'nameserver' "/etc/resolv.conf"'

    "${appPath}/../../../../../../../../tools/run-remote-command.bash" \
        --attribute-file "${attributeFile}" \
        --command "${command}" \
        --machine-type 'masters'
}

main "${@}"

error: pathspec 'roles/adobe/roles/ccmui/roles/aws/tools/recipes/dns-resolver.bash' did not match any file(s) known to git


Add script to copy datasets between deployments (#926)

* Add script to copy datasets between deployments

* Replace gnuism with standard date

* Switch to matching http error code

* Fail if dataset not found after multiple retries

#!/bin/bash
# a script to copy a dataset from one deployment to another

set -eu

### INPUTS ###
DATASET_UUID_TO_COPY="00000000-0000-0000-0000-000000000000"
AUTH_TOKEN="authorization: Bearer ya29"

SRC_URL="https://jade.datarepo-dev.broadinstitute.org"
DST_URL="https://jade-fb.datarepo-dev.broadinstitute.org/"

### utility functions ###
token_check() {
    RESULT=$(curl -s -X GET "${SRC_URL}/api/resources/v1/profiles" -H "accept: application/json" -H "${AUTH_TOKEN}" -w "%{http_code}" -o /dev/null)
    if [[ ${RESULT} =~ "401" ]]; then
        echo "Error: AUTH_TOKEN is invalid or expired"
        exit 1
    fi
}

uuid_lc() {
    uuidgen | tr '[:upper:]' '[:lower:]'
}

post_url() {
    curl -s -X POST "${1}" -H  "accept: application/json" -H  "Content-Type: application/json" -H "${AUTH_TOKEN}" -d "${2}"
}

get_url() {
    curl -s -X GET  "${1}" -H  "accept: application/json" -H  "Content-Type: application/json" -H "${AUTH_TOKEN}"
}

CURRENT_DATE=$(date +%Y%m%d)

### PART 1: create profile ###
profile_create() {
    echo "1: creating new profile"

    PROFILE_URL="${DST_URL}/api/resources/v1/profiles"

    PROFILE_UUID=$(uuid_lc)
    PROFILE_NAME="profile-search-api-${CURRENT_DATE}-${PROFILE_UUID:0:8}"

    PROFILE_JSON=$(cat << EOF
{
  "biller": "direct",
  "billingAccountId": "00708C-45D19D-27AAFA",
  "description": "profile created by datasetcopy.sh",
  "id": "${PROFILE_UUID}",
  "profileName": "${PROFILE_NAME}"
}
EOF
)

    post_url "${PROFILE_URL}" "${PROFILE_JSON}"

    printf "\n1: created profile %s\n" "${PROFILE_UUID}"
}

### PART 2: copy dataset schema ###
dataset_copy_schema() {
    echo "2: copying dataset schema"

    DATASET_URL="${SRC_URL}/api/repository/v1/datasets/${DATASET_UUID_TO_COPY}?include=SCHEMA&include=ACCESS_INFORMATION"

    DATASET_JSON=$(get_url "${DATASET_URL}")
    DATASET_NAME=$(echo "${DATASET_JSON}" | jq -r '.name')
    DATASET_SCHEMA=$(echo "${DATASET_JSON}" \
        | jq 'del(.id, .dataProject, .defaultSnapshotId, .createdDate, .storage, .accessInformation) | . + { "cloudPlatform": "gcp", "region": "US" } | .defaultProfileId = "'"${PROFILE_UUID}"'"' \
        | sed 's/"datatype": "fileref"/"datatype": "string"/')
    DATASET_TABLES=$(echo "${DATASET_JSON}" | jq -r '.accessInformation.bigQuery.tables[].qualifiedName')

    echo "${DATASET_SCHEMA}" > schema.json

    echo "2: copied schema for dataset ${DATASET_UUID_TO_COPY}"
}

### part 3: extract dataset data ###
dataset_extract_data() {
    echo "3: saving dataset into temporary directory"

    DATASET_TMP_DIR=$(mktemp -d)
    for DATASET_TABLE in ${DATASET_TABLES} ; do
        DATASET_TMP_JSON0="${DATASET_TMP_DIR}/${DATASET_TABLE}.json"
        DATASET_TMP_JSONL="${DATASET_TMP_DIR}/${DATASET_TABLE}.jsonl"
        bq query --nouse_legacy_sql --format=json 'SELECT * FROM `'"${DATASET_TABLE}"'`' > "${DATASET_TMP_JSON0}"
        jq -c -r '.[]' < "${DATASET_TMP_JSON0}" > "${DATASET_TMP_JSONL}"
    done

    echo "3: saved dataset data into ${DATASET_TMP_DIR}"
}

### part 4: copy dataset data in bucket ###
gcs_copy_dataset_data() {
    echo "4: copying data into gcs"

    DATASET_GCS_DIR=$(basename "${DATASET_TMP_DIR}" | tr '[:upper:]' '[:lower:]' | sed 's/\./-/')
    DATASET_GCS_DIR="gs://${DATASET_GCS_DIR}-${CURRENT_DATE}"

    gsutil mb "${DATASET_GCS_DIR}"
    gsutil cp "${DATASET_TMP_DIR}/*.jsonl" "${DATASET_GCS_DIR}"

    echo "4: copied data into bucket ${DATASET_GCS_DIR}"
}

### part 5a: create dataset schema ###
dataset_create_schema() {
    echo "5: creating schema"

    DATASET_URL="${DST_URL}/api/repository/v1/datasets"

    post_url "${DATASET_URL}" "${DATASET_SCHEMA}"

    printf "\n"
    Z=0
    while true ; do
        DATASET_NEW_UUID=$(get_url "${DATASET_URL}" | jq -r '.items[] | select(.name=="'"${DATASET_NAME}"'") | .id')

        if [ -n "${DATASET_NEW_UUID}" ]; then
            echo "5: created schema for NEW dataset ${DATASET_NEW_UUID}"
            break
        elif [ "${Z}" -ge 6 ]; then
            echo "Error: dataset not found after multiple retries"
            exit 1
        fi

        echo "5: could not find dataset, sleeping"
        sleep 10

        Z=$((Z+1))
    done
}

### part 5b: ingest the files ###
gcs_ingest_dataset() {
    echo "5: ingesting dataset tables from gcs"

    DATASET_URL="${DST_URL}/api/repository/v1/datasets/${DATASET_NEW_UUID}/ingest"

    GCS_FILES=$(gsutil ls "${DATASET_GCS_DIR}")
    LOAD_TAG_UUID=$(uuid_lc)

    for GCS_FILE in ${GCS_FILES} ; do
        TABLE_NAME=$(echo "${GCS_FILE}" | sed -r 's/(.+\.)(\w+)(\.jsonl)/\2/')
        TABLE_JSON=$(cat << EOF
{
    "format": "json",
    "ignore_unknown_values": true,
    "load_tag": "${LOAD_TAG_UUID}",
    "max_bad_records": 0,
    "path": "${GCS_FILE}",
    "table": "${TABLE_NAME}"
}
EOF
)

        post_url "${DATASET_URL}" "${TABLE_JSON}"

        printf "\n"
    done

    echo "5: ingested dataset tables from gcs"
}

### part 6: finish up ###
final_msg() {
    echo "!!! COMPLETED DATASET COPY, CHECK JOBS AND LOGS FOR FAILURES DURING INGESTION !!!"
}

### Run all the functions ###
exec_main() {
    token_check
    profile_create
    dataset_copy_schema
    dataset_extract_data
    gcs_copy_dataset_data
    dataset_create_schema
    gcs_ingest_dataset
    final_msg
}

exec_main

error: pathspec 'ops/dataset-copy.sh' did not match any file(s) known to git


Add trailmix to path

Add trailmix to path

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


Adding bandmeter from linuxquestions.org

#Author szboardstretcher @ linuxquestions.org
#Contributor sag47 @ linuxquestions.org
#Wed Sep 18 09:16:15 EDT 2013
#GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)

#DESCRIPTION
#  A simple bandwidth rate usage script for a device.  This script
#  will only output changes in bandwidth and samples at every second.
#  If it doesn't output at all then it is assumed the value is the same
#  for every second since the last output.
#USAGE
#  ./bandmeter.sh eth0

#do some error checking
if [ -z "${1}" ];then
  echo "Device not specified!" 1>&2
  echo "Usage: $(basename ${0}) device" 1>&2
  exit 1
elif [ ! -e "/sys/class/net/${1}" ];then
  echo "Error: The device you specified does not exist!" 1>&2
  echo "Usage: $(basename ${0}) device" 1>&2
  exit 1
fi
R1=0
T1=0
while true;do
  #R2 and T2 are now the old values from the last second
  R2="${R1}"
  T2="${T1}"
  #date of right now in seconds since 1970
  DATE="$(date +%s)"
  R1="$(cat /sys/class/net/${1}/statistics/rx_bytes)"
  T1="$(cat /sys/class/net/${1}/statistics/tx_bytes)"
  TBPS="$(expr ${T1} - ${T2})"
  RBPS="$(expr ${R1} - ${R2})"
  TKBPS="$(expr ${TBPS} / 1024)"
  RKBPS="$(expr ${RBPS} / 1024)"
  current_message="tx ${1}: ${TKBPS} kb/s rx ${1}: ${RKBPS} kb/s"
  #If the last message is not the same as the current message then output the current message
  if [ ! "${last_message}" = "${current_message}" ];then
    echo "${DATE};${current_message}"
  fi
  last_message="${current_message}"
  sleep 1
done

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


disable coveralls

disable coveralls

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/edenlabllc/ehealth.api.git/'


Add update.sh

Add update.sh

#!/bin/bash
set -e

current="$(curl -sSL 'https://pypi.python.org/pypi/celery/json' | awk -F '"' '$2 == "version" { print $4 }')"

set -x
sed -ri 's/^(ENV CELERY_VERSION) .*/\1 '"$current"'/' Dockerfile

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


initial commit of update script

initial commit of update script


pdksh: import patch

pdksh: import patch

error: pathspec 'pdksh/patch-siglist.sh' did not match any file(s) known to git


finder opens in list views

finder opens in list views

# Sets reasonable OS X defaults.
#
# Or, in other words, set shit how I like in OS X.
#
# The original idea (and a couple settings) were grabbed from:
#   https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run ./set-defaults.sh and you'll be good to go.

# Disable press-and-hold for keys in favor of key repeat
defaults write -g ApplePressAndHoldEnabled -bool false

# Use AirDrop over every interface. srsly this should be a default.
defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

# Always open everything in Finder's list view. This is important.
defaults write com.apple.Finder FXPreferredViewStyle Nlsv

# Show the ~/Library folder
chflags nohidden ~/Library

# Sets reasonable OS X defaults.
#
# Or, in other words, set shit how I like in OS X.
#
# The original idea (and a couple settings) were grabbed from:
#   https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run ./set-defaults.sh and you'll be good to go.

# Disable press-and-hold for keys in favor of key repeat
defaults write -g ApplePressAndHoldEnabled -bool false

# Use AirDrop over every interface. srsly this should be a default.
defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

# Show the ~/Library folder
chflags nohidden ~/Library


Prefix is already specified in configure 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/loli10K/scripts.git/'


From Bertrand:
Fix a fatal error when parsing the -optimize:0 flag (don't use cygpath on it).

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@38214 27541ba8-7e3a-0410-8455-c3a389f83636

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


Android SDK

Android SDK

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

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


Add tests for __expand_path layout helper

#! /usr/bin/env bash
source "../../test-helper.sh"
source "${root}/lib/layout-helpers.sh"

#
# __expand_path() tests.
#

# Setup.
realHOME="$HOME"
HOME="/home/test-user"

# When given a path containing "~", it expands "~" to "$HOME".
assert '__expand_path "~/Foo/Bar"' "${HOME}/Foo/Bar"

# When given a path without "~", it returns path as is.
assert '__expand_path "/path/to/file"' "/path/to/file"

# When given a path containing spaces, it returns path correctly.
assert '__expand_path "~/Path To/File"' "${HOME}/Path To/File"

# Tear down.
HOME="$realHOME"
unset realHOME

# End of tests.
assert_end "__expand_path()"

error: pathspec 'test/lib/layout-helpers/__expand_path-test.sh' did not match any file(s) known to git


add kumquat hostname config

add kumquat hostname config

#!/bin/bash
# Configure kumquat

HOSTNAME=$(hostname)

# Setup hostname for kumquat config
sed -i "s:HOSTNAME:${HOSTNAME}:g" /opt/local/etc/httpd/01-kumquat.conf

error: pathspec 'copy/opt/core/var/mdata-setup/includes/20-kumquat.sh' did not match any file(s) known to git


Adds CLI test that I forgot to do "git add" to.

#!/usr/bin/env bats
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
#   list of conditions and the following disclaimer.
#
# * 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.
#
# * Neither the name of the copyright holder nor the names of its
#   contributors may be used to endorse or promote products derived from
#   this software without specific prior written permission.
#
# 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 THE COPYRIGHT HOLDER OR 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.

. $IMPROVER_DIR/tests/lib/utils

@test "threshold input output 280 --fuzzy_factor 0.2" {
  TEST_DIR=$(mktemp -d)
  improver_check_skip_acceptance

  # Run threshold processing and check it passes.
  run improver threshold \
      "$IMPROVER_ACC_TEST_DIR/threshold/basic/input.nc" "$TEST_DIR/output.nc" \
      --threshold_config $IMPROVER_ACC_TEST_DIR/threshold/fuzzy_bounds/threshold_config.json
  [[ "$status" -eq 0 ]]

  # Run nccmp to compare the output and kgo.
  improver_compare_output "$TEST_DIR/output.nc" \
      "$IMPROVER_ACC_TEST_DIR/threshold/fuzzy_factor/kgo.nc"
  rm "$TEST_DIR/output.nc"
  rmdir "$TEST_DIR"
}

error: pathspec 'tests/improver-threshold/07-fuzzy_bounds.bats' did not match any file(s) known to git


Implementado menu complementar EmBranco

Implementado menu complementar EmBranco

#!/bin/bash

whiptail --title "Facius" --msgbox "Você não selecionou nenhuma opção, será redirecionado para o menu." 8 78

error: pathspec 'app/menus/complementares/EmBranco.sh' did not match any file(s) known to git


$commitMsg

$commitMsg

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


fix deploy script

fix 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/vbmithr/virtu.git/'


Added deploy script

Added deploy script

#!/bin/bash

python3 setup.py sdist
twine upload dist/*

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


Add deploy script

Add deploy script

#!/bin/bash

./bin/jar.sh
./bin/deploy-jar.sh


Add mvn deploy script

Add mvn deploy script


fixed ldflags

fixed ldflags

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


Make deploy.sh executable

Make deploy.sh 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/Coveo/styleguide.git/'


update deploy script for git deploy

update deploy script for git deploy

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/npm/orgs-docs.git/'


MNT:Deployment script that utilizes conda and epics ioc infrastructure

#!/bim/bash
apt-get install sysv-rc-softioc
conda create -p /opt/conda_envs/services python=3.5
source activate services
conda install pymongo ujson tornado jsonschema yaml pytz doct
pip install requests
mkdir /services
cd /services
mkdir -p /epics/iocs/
cd /services/
git clone https://github.com/NSLS-II/metadataservice
python setup.py develop
mkdir -p /epics/iocs/metadataservice/
cd /epics/iocs/metadataservice

echo "NAME=metadataservice
PORT=4052
HOST=$HOSTNAME
USER=tornado" > config
echo '#!/bin/bash
export PATH=/opt/conda/bin:$PATH
source activate services
python /services/metadataservice/startup.py --mongo-host=localhost --mongo-port=27017 --database=datastore --service-port=7772 --timezone=US/Eastern' > launch.sh
ln -s -T launch.sh st.cmd

chown -R tornado:tornado /epics/iocs/metadataservice

manage-iocs install metadataservice
manage-iocs enable metadataservice
/etc/init.d/softioc-metadataservice start


add deploy.sh

add deploy.sh

sudo apt-get install default-jre
sudo apt-get install default-jdk
cd ..
curl -L -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.0.tar.gz
tar -xvf elasticsearch-1.3.0.tar.gz
cd elasticsearch-1.3.0/bin
./elasticsearch -f


fix - publish image

fix - publish image

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/keboola/jsonparser-api.git/'


Add new scripts

Add new scripts

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/FerreAnthony/Linux-admin-scripts.git/'


Added build script for byte-buddy (#1149)

# ----------------------------------------------------------------------------
#
# Package       : byte-buddy
# Version       : 1.9.10
# Source repo   : https://github.com/raphw/byte-buddy
# Tested on     : UBI: 8.3
# Script License: Apache License 2.0
# Maintainer's  : Jotirling Swami <Jotirling.Swami1@ibm.com>
#
#
# Disclaimer: This script has been tested in root mode on given
# ==========  platform using the mentioned version of the package.
#             It may not work as expected with newer versions of the
#             package and/or distribution. In such case, please
#             contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------
#!/bin/bash

# Variables
REPO=https://github.com/raphw/byte-buddy.git
VERSION=byte-buddy-1.9.10
DIR=byte-buddy

# install tools and dependent packages
yum update -y
yum install -y git wget

# install java
yum -y install java-1.8.0-openjdk-devel

#install maven
cd /opt/
wget https://www-eu.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xzf apache-maven-3.6.3-bin.tar.gz
ln -s apache-maven-3.6.3 maven
export M2_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
mvn -version

# Cloning the repository from remote to local
cd /home
git clone $REPO
cd $DIR
git checkout $VERSION
cd $DIR

# Build and test package
mvn clean package -DskipTests
mvn test

error: pathspec 'b/byte-buddy/byte-buddy-1.9.10_ubi_8.3.sh' did not match any file(s) known to git


how to build a mac package

how to build a mac package

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@19051 ec53bebd-3082-4978-b11e-865c3cabbd6b

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


polishing

polishing

#!/bin/bash
# LGSM mods_list.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Description: Lists and defines available mods for LGSM supported servers.
# Usage: To add a mod, you just need to add an array variable into fn_mods_info following the guide to set proper values.
# Usage: Then add this array to the mods_global_array.
# Usage: If needed, you can scrape to define the download URL inside the fn_mods_scrape_urls function.

local commandname="MODS"
local commandaction="List Mods"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

check.sh

## Useful variables
# Separator name
modseparator="MOD"

# Define mods information (required)
fn_mods_info(){
	# REQUIRED: mod_info_name=( MOD "modcommand" "Pretty Name" "URL" "filename" "modsubdirs" "LowercaseOn/Off" "/files/to/keep;" "/install/path" "ENGINES" "GAMES" "NOTGAMES" "AUTHOR_URL" "Short Description" )
	# Example 1) Well made mod: mod_info_name=( MOD "awesomemod" "This is an Awesome Mod" "https://awesomemod.com/latest.zip" "awesomemod.zip" "0" "LowercaseOff" "OVERWRITE" "${systemdir}/addons" "source;unity3d;" "GAMES" "NOTGAMES" "https://awesomemod.com/" "This mod knows that 42 is the answer" )
	# Example 2) Poorly made mod: mod_info_name=( MOD "stupidmod" "This is a stupid mod" "${crappymodurl}" "StupidMod.zip" "2" "LowercaseOn" "cfg;data/crappymod;" "${systemdir}" "source;" "GAMES" "Garry's mod;Counter-Strike: Source;" "This mod is dumber than dumb" )
	# None of those values can be empty
	# index | Usage
	# [0] 	| MOD: separator, all mods must begin with it
	# [1] 	| "modcommand": the LGSM name and command to install the mod (must be unique and lowercase)
	# [2] 	| "Pretty Name": the common name people use to call the mod that will be displayed to the user
	# [3] 	| "URL": link to the file; can be a variable defined in fn_mods_nasty_urls (make sure curl can download it)
	# [4] 	| "filename": the output filename
	# [5]	| "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future)
	# [6]	| "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it)
	# [7] 	| "modinstalldir": the directory in which to install the mode ( use LGSM dir variables such as ${systemdir})
	# [8]	| "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" to ignore the value or "NOUPDATE" to disallow updating
	# [9] 	| "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value
	# [10] 	| "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value
	# [11]	| "Unsupported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use NOTGAMES to ignore the value (useful to exclude a game when using Supported Engines)
	# [12]	| "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install
	# [13]	| "Short Description" a description showed to the user upon installation

	# Source mods
	mod_info_metamod=( MOD "metamod" "MetaMod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" )
	mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires MetaMod)" )
	# Garry's Mod Addons
	mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" )
	mod_info_ulx=( MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)" )
	mod_info_utime=( MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time" )
	mod_info_uclip=( MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip" )
	mod_info_acf=( MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines" )
	mod_info_acf_missiles=( MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF" )
	mod_info_acf_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions" )
	mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" )
	mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" )
	# Oxidemod
	mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-Rust.zip" "Oxide-Rust_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-rust.1659" "Allows for the use of plugins" )
	mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-Hurtworld.zip" "Oxide-Hurtworld_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-hurtworld.1332" "Allows for the use of plugins" )
	mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-7DaysToDie.zip" "Oxide-7DaysToDie_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813" "Allows for the use of plugins" )

	# REQUIRED: Set all mods info into one array for convenience
	mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" )
}

# Get a proper URL for mods that don't provide a good one (optional)
fn_mods_scrape_urls(){
	fn_script_log "Retriving latest mods URLs"
	# Metamod
	metamodscrapeurl="http://www.gsptalk.com/mirror/sourcemod"
	metamodlatestfile="$(wget "${metamodscrapeurl}/?MD" -q -O -| grep "mmsource" | grep "\-linux" | head -n1 | awk -F '>' '{ print $3 }' | awk -F '<' '{ print $1}')"
	metamodfasterurl="http://cdn.probablyaserver.com/sourcemod/"
	metamodurl="${metamodfasterurl}/${metamodlatestfile}"
	# Sourcemod
	sourcemodmversion="1.8"
	sourcemodscrapeurl="http://www.gsptalk.com/mirror/sourcemod"
	sourcemodlatestfile="$(wget "${sourcemodscrapeurl}/?MD" -q -O -| grep "sourcemod-" | grep "\-linux" | head -n1 | awk -F '>' '{ print $3 }' | awk -F '<' '{ print $1}')"
	sourcemodfasterurl="http://cdn.probablyaserver.com/sourcemod/"
	sourcemodurl="${sourcemodfasterurl}/${sourcemodlatestfile}"
}

#!/bin/bash
# LGSM mods_list.sh function
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Description: Lists and defines available mods for LGSM supported servers.
# Usage: To add a mod, you just need to add an array variable into fn_mods_info following the guide to set proper values.
# Usage: Then add this array to the mods_global_array.
# Usage: If needed, you can scrape to define the download URL inside the fn_mods_scrape_urls function.

local commandname="MODS"
local commandaction="List Mods"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

check.sh

## Useful variables
# Separator name
modseparator="MOD"

# Define mods information (required)
fn_mods_info(){
	# REQUIRED: mod_info_name=( MOD "modcommand" "Pretty Name" "URL" "filename" "modsubdirs" "LowercaseOn/Off" "/files/to/keep;" "/install/path" "ENGINES" "GAMES" "NOTGAMES" "AUTHOR_URL" "Short Description" )
	# Example 1) Well made mod: mod_info_name=( MOD "awesomemod" "This is an Awesome Mod" "https://awesomemod.com/latest.zip" "awesomemod.zip" "0" "LowercaseOff" "OVERWRITE" "${systemdir}/addons" "source;unity3d;" "GAMES" "NOTGAMES" "https://awesomemod.com/" "This mod knows that 42 is the answer" )
	# Example 2) Poorly made mod: mod_info_name=( MOD "stupidmod" "This is a stupid mod" "${crappymodurl}" "StupidMod.zip" "2" "LowercaseOn" "cfg;data/crappymod;" "${systemdir}" "source;" "GAMES" "Garry's mod;Counter-Strike: Source;" "This mod is dumber than dumb" )
	# None of those values can be empty
	# [index]	| Usage
	# [0] 	| MOD: separator, all mods must begin with it
	# [1] 	| "modcommand": the LGSM name and command to install the mod (must be unique and lowercase)
	# [2] 	| "Pretty Name": the common name people use to call the mod that will be displayed to the user
	# [3] 	| "URL": link to the file; can be a variable defined in fn_mods_nasty_urls (make sure curl can download it)
	# [4] 	| "filename": the output filename
	# [5]	| "modsubdirs": in how many subdirectories is the mod (none is 0)
	# [6]	| "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it)
	# [7] 	| "modinstalldir": the directory in which to install the mode ( use LGSM dir variables such as ${systemdir})
	# [8]	| "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" to ignore the value or "NOUPDATE" to disallow updating
	# [9] 	| "Supported Engines;": list them according to LGSM ${engine} variables, separated and ended with a semicolon, or use ENGINES to ignore the value
	# [10] 	| "Supported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use GAMES to ignore the value
	# [11]	| "Unsupported Games;": list them according to LGSM ${gamename} variables, separated and ended with a semicolon, or use NOTGAMES to ignore the value (useful to exclude a game when using Supported Engines)
	# [12]	| "AUTHOR_URL" is the author's website, displayed to the user when chosing mods to install
	# [13]	| "Short Description" a description showed to the user upon installation

	# Source mods
	mod_info_metamod=( MOD "metamod" "MetaMod" "${metamodurl}" "${metamodlatestfile}" "0" "LowercaseOff" "${systemdir}" "addons/metamod/metaplugins.ini;" "source;" "GAMES" "NOTGAMES" "https://www.sourcemm.net" "Plugins Framework" )
	mod_info_sourcemod=( MOD "sourcemod" "SourceMod" "${sourcemodurl}" "${sourcemodlatestfile}" "0" "LowercaseOff" "${systemdir}" "cfg;addons/sourcemod/configs;" "source;" "GAMES" "NOTGAMES" "http://www.sourcemod.net" "Admin Features (requires MetaMod)" )
	# Garry's Mod Addons
	mod_info_ulib=( MOD "ulib" "ULib" "https://codeload.github.com/TeamUlysses/ulib/zip/master" "ulib-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Complete Framework" )
	mod_info_ulx=( MOD "ulx" "ULX" "https://codeload.github.com/TeamUlysses/ulx/zip/master" "ulx-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Admin Panel (requires ULib)" )
	mod_info_utime=( MOD "utime" "UTime" "https://github.com/TeamUlysses/utime/archive/master.zip" "utime-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "Keep track of players play time" )
	mod_info_uclip=( MOD "uclip" "UClip" "https://github.com/TeamUlysses/uclip/archive/master.zip" "uclip-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://ulyssesmod.net" "An alternative to noclip" )
	mod_info_acf=( MOD "acf" "Armoured Combat Framework" "https://github.com/nrlulz/ACF/archive/master.zip" "acf-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/nrlulz/ACF" "Realistic Wepons & Engines" )
	mod_info_acf_missiles=( MOD "acfmissiles" "ACF Missiles" "https://github.com/Bubbus/ACF-Missiles/archive/master.zip" "acf-missiles-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/Bubbus/ACF-Missiles" "More missiles for ACF" )
	mod_info_acf_advdupe2=( MOD "advdupe2" "Advanced Duplicator 2" "https://github.com/wiremod/advdupe2/archive/master.zip" "advdupe2-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://www.wiremod.com" "Save your constructions" )
	mod_info_darkrp=( MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/master.zip" "darkrp-master.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Most popular gamemode" )
	mod_info_darkrpmodification=( MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings" )
	# Oxidemod
	mod_info_rustoxide=( MOD "rustoxide" "Oxide for Rust" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-Rust.zip" "Oxide-Rust_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-rust.1659" "Allows for the use of plugins" )
	mod_info_hwoxide=( MOD "hwoxide" "Oxide for Hurtworld" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-Hurtworld.zip" "Oxide-Hurtworld_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-hurtworld.1332" "Allows for the use of plugins" )
	mod_info_sdtdoxide=( MOD "sdtdoxide" "Oxide for 7 Days To Die" "https://raw.githubusercontent.com/OxideMod/Snapshots/master/Oxide-7DaysToDie.zip" "Oxide-7DaysToDie_Linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "http://oxidemod.org/downloads/oxide-for-7-days-to-die.813" "Allows for the use of plugins" )

	# REQUIRED: Set all mods info into one array for convenience
	mods_global_array=( "${mod_info_metamod[@]}" "${mod_info_sourcemod[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" )
}

# Get a proper URL for mods that don't provide a good one (optional)
fn_mods_scrape_urls(){
	# Metamod
	metamodscrapeurl="http://www.gsptalk.com/mirror/sourcemod"
	metamodlatestfile="$(wget "${metamodscrapeurl}/?MD" -q -O -| grep "mmsource" | grep "\-linux" | head -n1 | awk -F '>' '{ print $3 }' | awk -F '<' '{ print $1}')"
	metamodfasterurl="http://cdn.probablyaserver.com/sourcemod/"
	metamodurl="${metamodfasterurl}/${metamodlatestfile}"
	# Sourcemod
	sourcemodmversion="1.8"
	sourcemodscrapeurl="http://www.gsptalk.com/mirror/sourcemod"
	sourcemodlatestfile="$(wget "${sourcemodscrapeurl}/?MD" -q -O -| grep "sourcemod-" | grep "\-linux" | head -n1 | awk -F '>' '{ print $3 }' | awk -F '<' '{ print $1}')"
	sourcemodfasterurl="http://cdn.probablyaserver.com/sourcemod/"
	sourcemodurl="${sourcemodfasterurl}/${sourcemodlatestfile}"
}


add debug_ce.sh

add debug_ce.sh

#!/bin/bash
###############################
# sets property sonar.ce.javaAdditionalOpts in sonar.properties to activate debug on port 5006
###############################

set -euo pipefail

source scripts/property_utils.sh

SQ_HOME=$1

echo "enabling debug for Compute Engine, listening on port 5006"
set_property sonar.ce.javaAdditionalOpts -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006 $SQ_HOME/conf/sonar.properties

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


feat(aliases): add brew cleanup

feat(aliases): add brew cleanup

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


Add Ubuntu package dependencies

Add Ubuntu package dependencies

#!/bin/bash

set -e
set -x

sudo apt-get install \
  python-fuse

error: pathspec 'deps/install_dependent_packages-ubuntu-14.04.sh' did not match any file(s) known to git


Manually adding bin and configure/compile/package script, note to self, should make it update, then install all required packages for building. -JZ

#!/bin/bash

if [ "${1}" ]
then
    BUILD_DIR="${1}"
else
    BUILD_DIR="${HOME}/${JOB_NAME}"
fi

if [ ! -d "${BUILD_DIR}" ]
     then
         mkdir -p ${BUILD_DIR}
         cd ${BUILD_DIR}
         git clone git://github.com/jonzobrist/Percona-Server-5.1.git
         cd Percona-Server-5.1/Percona-Server/
         echo "Running $(which autoreconf) at $(date)"
         autoreconf -i
         echo "Configuring for build at $(date)"
         #This was my old/original mysql configure command, but it is currently causing things to fail in compile time, so I'm shortening it
         #./configure -prefix=/usr -enable-local-infile -enable-thread-safe-client -enable-assembler -with-client-ldflags=-all-static -with-mysqld-ldflags=-all-static -with-unix-socket-path=/var/run/mysqld/mysqld.sock -with-plugins=partition,archive,blackhole,csv,federated,heap,innodb_plugin,myisam,myisammrg -with-big-tables -without-debug -with-tcp-port=3306 -with-readline -enable-profiling -disable-shared -enable-static -with-extra-charsets=complex -with-pic -with-fast-mutexes -with-zlib-dir=bundled -with-ssl
         ./configure --prefix=/usr --enable-local-infile --with-plugins=partition,archive,blackhole,csv,federated,heap,innodb_plugin,myisam,myisammrg --with-big-tables --without-debug --with-readline --with-pic --with-fast-mutexes --with-zlib-dir=bundled --with-ssl

         echo "Compiling began at $(date)"
         make
         echo "Compiling done at $(date), Making install, creating deb file"
         #sudo checkinstall make install
         checkinstall --pkgname="inthinc-percona-server-5.1" --pkgversion="5.1" --maintainer="root@inthinc.com" --provides="5.1.66-inthinc.1-495.precise - mysql-server-core-5.1 mysql-server-core mysql-server-5.1 mysql-server" --requires="5.1.66-inthinc.1-495.precise - inthinc-percona-server-client-5.1 (2 5.1.66-inthinc.1-495.precise) libdbi-perl (0 (null)) perl (2 5.6) libc6 (2 2.14) libmysqlclient16 (2 5.1.21-1) libstdc++6 (2 4.6) libwrap0 (2 7.6-4~) zlib1g (2 1:1.2.0) debconf (18 0.5) debconf-2.0 (0 (null)) psmisc (0 (null)) passwd (0 (null)) lsb-base (2 3.0-10) inthinc-percona-server-common-5.1 (2 5.1.66-inthinc.1-495.precise) adduser (2 3.40) debconf (0 (null)) tinyca (0 (null)) mailx (0 (null)) libhtml-template-perl (0 (null)) mysql-server (3 5.1.66-inthinc.1-495.precise) mysql-server:i386 (3 5.1.66-inthinc.1-495.precise) mysql-server-4.1 (0 (null)) mysql-server-4.1:i386 (0 (null)) mysql-server-5.1 (0 (null)) mysql-server-5.1:i386 (0 (null)) mysql-server-5.5 (0 (null)) mysql-server-5.5:i386 (0 (null)) mysql-server-core-5.1 (0 (null)) mysql-server-core-5.1:i386 (0 (null)) mysql-server-core-5.5 (0 (null)) mysql-server-core-5.5:i386 (0 (null)) percona-xtradb-server-5.0 (0 (null)) percona-xtradb-server-5.0:i386 (0 (null)) mysql-server (3 5.1.66-inthinc.1-495.precise) mysql-server:i386 (3 5.1.66-inthinc.1-495.precise) mysql-server-5.0 (0 (null)) mysql-server-5.0:i386 (0 (null)) mysql-server-5.1 (0 (null)) mysql-server-5.1:i386 (0 (null)) mysql-server-core-5.1 (0 (null)) mysql-server-core-5.1:i386 (0 (null)) percona-xtradb-server-5.0 (0 (null)) percona-xtradb-server-5.0:i386 (0 (null))" --conflicts="mysql-server (<< 5.1.66-inthinc.1-495.precise), mysql-server-4.1, mysql-server-5.1, mysql-server-5.5, mysql-server-core-5.1, mysql-server-core-5.5, percona-xtradb-server-5.0" --replaces="mysql-server (<< 5.1.66-inthinc.1-495.precise), mysql-server-5.0, mysql-server-5.1, mysql-server-core-5.1, percona-xtradb-server-5.0" --provides="mysql-server, mysql-server-5.1, mysql-server-core, mysql-server-core-5.1" --pkgarch="amd64" --pkgrelease="database" -y make install

         echo "Done creating deb file at $(date)"
         ls -l *deb
         #git add *deb
         #git commit -m "Deb packages ${BUILD_TAG} $(date) By Jenkins"
         #git push origin master

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


correct typo

correct typo

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