code
stringlengths 2
1.05M
| repo_name
stringlengths 5
110
| path
stringlengths 3
922
| language
stringclasses 1
value | license
stringclasses 15
values | size
int64 2
1.05M
|
---|---|---|---|---|---|
#!/bin/sh
################################################################################
# Title : publishDocumentation.sh
# Date created : 2016/02/22
# Notes :
__AUTHOR__="Jeroen de Bruijn"
# Preconditions:
# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
# must be installed.
# - Doxygen configuration file must have the destination directory empty and
# source code directory with a $(TRAVIS_BUILD_DIR) prefix.
# - An gh-pages branch should already exist. See below for mor info on hoe to
# create a gh-pages branch.
#
# Required global variables:
# - TRAVIS_BUILD_NUMBER : The number of the current build.
# - TRAVIS_COMMIT : The commit that the current build is testing.
# - DOXYFILE : The Doxygen configuration file.
# - GH_REPO_NAME : The name of the repository.
# - GH_REPO_REF : The GitHub reference to the repository.
# - GH_REPO_TOKEN : Secure token to the github repository.
#
# For information on how to encrypt variables for Travis CI please go to
# https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables
# or https://gist.github.com/vidavidorra/7ed6166a46c537d3cbd2
# For information on how to create a clean gh-pages branch from the master
# branch, please go to https://gist.github.com/vidavidorra/846a2fc7dd51f4fe56a0
#
# This script will generate Doxygen documentation and push the documentation to
# the gh-pages branch of a repository specified by GH_REPO_REF.
# Before this script is used there should already be a gh-pages branch in the
# repository.
#
################################################################################
################################################################################
##### Setup this script and get the current gh-pages branch. #####
echo 'Setting up the script...'
# Exit with nonzero exit code if anything fails
# Create a clean working directory for this script.
mkdir code_docs
cd code_docs
# Get the current gh-pages branch
git clone -b gh-pages https://git@$GH_REPO_REF
cd $GH_REPO_NAME
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name "Travis CI"
git config user.email "[email protected]"
# Remove everything currently in the gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files. So the gh-pages branch
# can be safely cleaned, and it is sure that everything pushed later is the new
# documentation.
rm -rf *
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
# to NO, which it is by default. So creating the file just in case.
echo "" > .nojekyll
mv $TRAVIS_BUILD_DIR/build/docs/* .
################################################################################
##### Upload the documentation to the gh-pages branch of the repository. #####
# Only upload if Doxygen successfully created the documentation.
# Check this by verifying that the html directory and the file html/index.html
# both exist. This is a good indication that Doxygen did it's work.
echo "List of files present:"
ls
if [ -d "html" ] && [ -f "html/index.html" ]; then
echo 'Uploading documentation to the gh-pages branch...'
# Add everything in this directory (the Doxygen code documentation) to the
# gh-pages branch.
# GitHub is smart enough to know which files have changed and which files have
# stayed the same and will only update the changed files.
git add --all
# Commit the added files with a title and description containing the Travis CI
# build number and the GitHub commit reference that issued this build.
git commit -m "Deploy code docs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"
# Force push to the remote gh-pages branch.
# The ouput is redirected to /dev/null to hide any sensitive credential data
# that might otherwise be exposed.
git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" #> /dev/null 2>&1
echo "Exit status: $?"
else
echo '' >&2
echo 'Warning: No documentation (html) files have been found!' >&2
echo 'Warning: Not going to push the documentation to GitHub!' >&2
exit 1
fi
|
sunpho84/SUNphi
|
config/publishDocumentation.sh
|
Shell
|
gpl-3.0
| 4,546 |
#!/bin/bash
# cloud.sh saved session
set -x
set -euo pipefail
echo "args: $*"
snap_pattern=$1
if [[ -z "$snap_pattern" ]]
then
echo "snap_pattern is empty"
exit 1
fi
if [[ $# -ge 2 ]]
then
myhostname=$2
else
myhostname="tmp-$$.opensource-expert.com"
echo "generating hostname: $myhostname"
fi
FLAVOR_NAME=s1-2
mytmp=$TMP_DIR/saved_debian9_$FLAVOR_NAME.$$
myimage=$(last_snapshot $PROJECT_ID "$snap_pattern")
echo "restoring fo '$snap_pattern' => myimage $myimage hostname $myhostname ..."
mysshkey=$(get_sshkeys $PROJECT_ID | awk '/sylvain/ {print $1; exit}')
myinit_script=$SCRIPTDIR/init/init_root_login_OK.sh
echo "press any key to continue"
read
instance=$(create_instance $PROJECT_ID "$myimage" "$mysshkey" \
"$myhostname" "$myinit_script" \
| jq -r '.id')
if wait_for_instance $PROJECT_ID "$instance" 210 ; then
get_instance_status $PROJECT_ID $instance FULL > $mytmp
ip=$(get_ip_from_json < $mytmp)
hostname=$(jq -r '.name' < $mytmp)
echo "hostname from JSOn: $hostname, using $myhostname"
set_ip_domain $ip $myhostname
fi
rm $mytmp
# post setup if success
if [[ -n "$ip" ]]
then
# empty my ssh/known_hosts
ssh-keygen -f "/home/sylvain/.ssh/known_hosts" -R $myhostname
ssh-keygen -f "/home/sylvain/.ssh/known_hosts" -R $ip
fi
|
opensource-expert/ovh-tools
|
saved/restore_snap.sh
|
Shell
|
gpl-3.0
| 1,274 |
#!/bin/bash
source "../spinner.sh"
NEUTRE="\033[0;0m"
ROUGE="\033[31;1m"
JAUNE="\033[33;1m"
RAPPORT="/var/log/AutoInstall/unbound.log"
mkdir -p /var/log/AutoInstall/
touch ${RAPPORT}
clear
echo
echo -e "${ROUGE}. . : : [ U N B O U N D ] : : . .${NEUTRE}"
echo ""
echo "# Installation des librairies requises" > ${RAPPORT} 2>&1
start_spinner "# Installation des librairies requises"
apt-get install build-essential libssl-dev -y --force-yes >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Telechargement du packet Unbound DNS" >> ${RAPPORT} 2>&1
start_spinner "# Telechargement du packet Unbound DNS"
wget -q http://www.unbound.net/downloads/unbound-latest.tar.gz >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Compilation" >> ${RAPPORT} 2>&1
start_spinner "# Compilation"
mkdir dwl >> ${RAPPORT} 2>&1
tar xfz unbound-latest.tar.gz -C dwl >> ${RAPPORT} 2>&1
cd dwl >> ${RAPPORT} 2>&1
cd $(ls) >> ${RAPPORT} 2>&1
./configure -q >> ${RAPPORT} 2>&1
make -s >> ${RAPPORT} 2>&1
make install -s >> ${RAPPORT} 2>&1
cd ../../ >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Creation du groupe / utilisateur unbound" >> ${RAPPORT} 2>&1
start_spinner "# Creation du groupe / utilisateur unbound"
groupadd unbound >> ${RAPPORT} 2>&1
useradd -d /var/unbound -m -g unbound -s /bin/false unbound >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Creation du PID" >> ${RAPPORT} 2>&1
start_spinner "# Creation du PID"
mkdir -p /var/unbound/var/run >> ${RAPPORT} 2>&1
chown -R unbound:unbound /var/unbound >> ${RAPPORT} 2>&1
ln -s /var/unbound/var/run/unbound.pid /var/run/unbound.pid >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Creation du script stop / start pour unbound" >> ${RAPPORT} 2>&1
start_spinner "# Creation du script stop / start pour unbound"
cp init-d-unbound "/etc/init.d/unbound" >> ${RAPPORT} 2>&1
chmod 755 /etc/init.d/unbound >> ${RAPPORT} 2>&1
update-rc.d unbound defaults >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Creation de la configuration unbound" >> ${RAPPORT} 2>&1
start_spinner "# Creation de la configuration unbound"
cp unbound.conf "/var/unbound/unbound.conf" >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Telechargement des serveurs racines" >> ${RAPPORT} 2>&1
start_spinner "# Telechargement des serveurs racines"
wget -q ftp://ftp.internic.net/domain/named.cache -O /var/unbound/named.cache >> ${RAPPORT} 2>&1
stop_spinner $?
echo "# Lancement du service Unbound" >> ${RAPPORT} 2>&1
start_spinner "# Lancement du service Unbound"
/etc/init.d/unbound start >> ${RAPPORT} 2>&1
stop_spinner $?
echo ""
echo -e "${JAUNE}Installation du service Unbound finie"
echo -e "Log de l'installation: /var/log/AutoInstall/unbound.log"
echo -e ""
echo -e "Appuyer sur Entrée pour quitter${NEUTRE}"
read a
clear
exit 0
|
nastyshade/AutoInstall
|
UnBound/install.sh
|
Shell
|
gpl-3.0
| 2,712 |
#!/bin/bash
# Be sure that's 'bash' not just 'sh'.
/usr/bin/python /home/pi/piCLOCKTWO/weather-display.py
exit 0
|
sonium0/piCLOCKTWO
|
startup.sh
|
Shell
|
mpl-2.0
| 115 |
#!/bin/bash
# Runs a small computational study on algorithmic performance
set -e
which parallel >/dev/null 2>&1 || (echo 'GNU parallel needed (http://www.gnu.org/software/parallel/)' && false)
which stats >/dev/null 2>&1 || (echo 'Program stats needed (https://github.com/rustyrussell/stats)' && false)
ntrial=$1; echo -n "Running ${ntrial:=1e3} trials"
niter=$2; echo " each for {${niter:=1e4 5e3 2e3 1e3 5e2 2e2 1e2 5e1 2e1 1e1}} iterations"
parallel --gnu --noswap --nice=10 --eta -j+0 \
'(for i in $(seq 1 {1}); do ./examples/basic {2}; done) | stats > result.{1}.{2}' \
::: $ntrial ::: $niter
|
RhysU/tuna
|
study.sh
|
Shell
|
mpl-2.0
| 679 |
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#
# Copyright 2020 Joyent, Inc.
#
function usage()
{
echo "Usage: $0 [-cr -R|-s] <platform URI>"
echo "(URI can be file:///, http://, anything curl supports or a filename)"
exit 1
}
function fatal()
{
printf "Error: %s\n" "$1" >/dev/stderr
if [ ${fatal_cleanup} -eq 1 ]; then
rm -rf ${usbcpy}/os/${version}
rm -f ${usbcpy}/os/tmp.$$.tgz
fi
exit 1
}
cleanup_key=0
do_reboot=0
switch_platform=0
force_replace=0
while getopts "cRrs" opt
do
case "$opt" in
c) cleanup_key=1;;
r) do_reboot=1;;
R) force_replace=1;;
s) switch_platform=1;;
*) usage;;
esac
done
shift $(($OPTIND - 1))
input=$1
if [[ -z ${input} ]]; then
usage
fi
if [ ${force_replace} -eq 1 -a ${switch_platform} -eq 1 ]; then
usage
fi
if echo "${input}" | grep "^[a-z]*://"; then
# input is a url style pattern
/bin/true
else
if [[ -f ${input} ]]; then
dir=$(cd $(dirname ${input}); pwd)
file=$(basename ${input})
input="file://${dir}/${file}"
else
fatal "file: '${input}' not found."
fi
fi
# BEGIN BASHSTYLED
usbcpy="$(svcprop -p 'joyentfs/usb_copy_path' svc:/system/filesystem/smartdc:default)"
# END BASHSTYLED
fatal_cleanup=0
. /lib/sdc/config.sh
load_sdc_config
platform_type=smartos
# this should result in something like 20110318T170209Z
version=$(basename "${input}" .tgz | tr [:lower:] [:upper:] | \
sed -e "s/.*\-\(2.*Z\)$/\1/")
if [[ -n $(echo $(basename "${input}") | \
grep -i "HVM-${version}" 2>/dev/null) ]]; then
version="HVM-${version}"
platform_type=hvm
fi
echo "${version}" | grep "^2[0-9]*T[0-9]*Z$" > /dev/null
if [[ $? != 0 ]]; then
echo "Invalid platform version format: ${version}" >&2
echo "Please ensure this is a valid SmartOS platform image." >&2
exit 1
fi
if [ ${force_replace} -eq 1 ]; then
rm -rf ${usbcpy}/os/${version}
fi
fatal_cleanup=1
if [[ ! -d ${usbcpy}/os/${version} ]]; then
echo "==> Staging ${version}"
curl --progress -k ${input} -o ${usbcpy}/os/tmp.$$.tgz
[ $? != 0 ] && fatal "retrieving $input"
[[ ! -f ${usbcpy}/os/tmp.$$.tgz ]] && fatal "file: '${input}' not found."
echo "==> Unpacking ${version} to ${usbcpy}/os"
echo "==> This may take a while..."
mkdir -p ${usbcpy}/os/${version}
[ $? != 0 ] && fatal "unable to mkdir ${usbcpy}/os/${version}"
(cd ${usbcpy}/os/${version} \
&& gzcat ${usbcpy}/os/tmp.$$.tgz | tar -xf - 2>/tmp/install_platform.log)
[ $? != 0 ] && fatal "unpacking image into ${usbcpy}/os/${version}"
(cd ${usbcpy}/os/${version} && mv platform-* platform)
[ $? != 0 ] && fatal "moving image in ${usbcpy}/os/${version}"
rm -f ${usbcpy}/os/tmp.$$.tgz
fi
fatal_cleanup=0
echo "==> Adding to list of available platforms"
if [ ${switch_platform} -eq 1 ]; then
echo "==> Switching boot image to ${version}"
args=""
if [ ${cleanup_key} -eq 1]; then
args+="-c"
fi
/usbkey/scripts/switch-platform.sh ${args} ${version}
[ $? != 0 ] && fatal "switching boot image to ${version}"
fi
if [ ${do_reboot} -eq 1 ]; then
echo "==> Rebooting"
reboot
fi
echo "==> Done!"
exit 0
|
joyent/sdc-headnode
|
scripts/install-platform.sh
|
Shell
|
mpl-2.0
| 3,405 |
#!/bin/bash
DARKNET_DIR=$1
FILE_LOCATION=$2
RESULT_LOCATION=$3
cd $DARKNET_DIR
./darknet detect yolo-sort.cfg yolo-sort.weights $FILE_LOCATION 2> /dev/null | grep 'box' | sed -e "s/^box://"
mv predictions.png $RESULT_LOCATION
|
SORT-ETS/SORT
|
server/tools/yolo.sh
|
Shell
|
agpl-3.0
| 228 |
#!/bin/bash
abort () { echo $1; exit 1; }
test -z $MAPIC_CLI && abort "This script must be run from mapic cli. Use: mapic install ssl (#todo!)"
# debug mode. usage: command 2>"${PIPE}" 1>"${PIPE}"
if [[ ${MAPIC_DEBUG} = true ]]; then
PIPE=/dev/stdout
else
PIPE=/dev/null
fi
INSTALL_CMD="yarn install"
cd $MAPIC_ROOT_FOLDER
echo "Installing node modules for Mile"
docker run -v $MAPIC_ROOT_FOLDER/config/${MAPIC_DOMAIN}:/mapic/config -v $MAPIC_ROOT_FOLDER/modules:/mapic/modules -w /mapic/modules/mile -it mapic/mile:latest $INSTALL_CMD 2>"${PIPE}" 1>"${PIPE}"
echo "Installing node modules for Engine"
docker run -v $MAPIC_ROOT_FOLDER/config/${MAPIC_DOMAIN}:/mapic/config -v $MAPIC_ROOT_FOLDER/modules:/mapic/modules -w /mapic/modules/engine -it mapic/engine:latest $INSTALL_CMD 2>"${PIPE}" 1>"${PIPE}"
echo "Installing node modules for Mapic.js"
docker run -v $MAPIC_ROOT_FOLDER/config/${MAPIC_DOMAIN}:/mapic/config -v $MAPIC_ROOT_FOLDER/modules:/mapic/modules -w /mapic/modules/mapic.js -it mapic/engine:latest $INSTALL_CMD 2>"${PIPE}" 1>"${PIPE}"
echo "All node modules installed."
# todo: make each entrypoint.sh respectively build node modules when needed
# tood: use yarn
|
mapic/mapic
|
cli/install/npm-install-on-modules.sh
|
Shell
|
agpl-3.0
| 1,192 |
#!/bin/bash
# Copyright 2013 Telefonica Investigación y Desarrollo, S.A.U
#
# This file is part of FI-WARE LiveDemo App
#
# FI-WARE LiveDemo App is free software: you can redistribute it and/or modify it under the terms
# of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# FI-WARE LiveDemo App 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 General Public License
# for more details.
#
# You should have received a copy of the GNU Affero General Public License along with FI-WARE LiveDemo App. If not,
# see http://www.gnu.org/licenses/.
#
# For those usages not covered by the GNU Affero General Public License please contact with fermin at tid dot es
(curl ${CB_HOST}:${CB_PORT}/NGSI10/queryContext -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format -) <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<queryContextRequest>
<entityIdList>
<entityId type="AMMS" isPattern="true">
<id>OUTSMART.AMMS.*</id>
</entityId>
</entityIdList>
<attributeList>
</attributeList>
</queryContextRequest>
EOF
|
telefonicaid/fiware-livedemoapp
|
scripts/query-amms.sh
|
Shell
|
agpl-3.0
| 1,302 |
#!/bin/bash
set -xe
if [[ -z "${TMPDIR}" ]]; then
TMPDIR=/tmp
fi
set -u
### alleleCount
VER_ALLELECOUNT="v4.0.2"
### cgpNgsQc
VER_CGPNGSQC="v1.5.1"
BIN_VERIFYBAMID='https://github.com/statgen/verifyBamID/releases/download/v1.1.3/verifyBamID'
### ascatNgs
VER_ASCATNGS="v4.2.1"
SRC_ASCAT="https://raw.githubusercontent.com/Crick-CancerGenomics/ascat/v2.5.1/ASCAT/R/ascat.R"
### grass
VER_GRASS="v2.1.1"
### BRASS
VER_BRASS="v6.2.1"
SOURCE_BLAT="http://users.soe.ucsc.edu/~kent/src/blatSrc35.zip"
SRC_FASTA36="https://github.com/wrpearson/fasta36/archive/fasta-v36.3.8g.tar.gz"
if [ "$#" -lt "1" ] ; then
echo "Please provide an installation path such as /opt/ICGC"
exit 1
fi
# get path to this script
SCRIPT_PATH=`dirname $0`;
SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)`
# get the location to install to
INST_PATH=$1
mkdir -p $1
INST_PATH=`(cd $1 && pwd)`
echo $INST_PATH
# get current directory
INIT_DIR=`pwd`
CPU=`grep -c ^processor /proc/cpuinfo`
if [ $? -eq 0 ]; then
if [ "$CPU" -gt "6" ]; then
CPU=6
fi
else
CPU=1
fi
echo "Max compilation CPUs set to $CPU"
SETUP_DIR=$INIT_DIR/install_tmp
mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end
mkdir -p $INST_PATH/bin
cd $SETUP_DIR
# make sure tools installed can see the install loc of libraries
set +u
export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'`
export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'`
export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'`
export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'`
set -u
##### alleleCount installation
if [ ! -e $SETUP_DIR/alleleCount.success ]; then
curl -sSL --retry 10 https://github.com/cancerit/alleleCount/archive/${VER_ALLELECOUNT}.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
cd distro
if [ ! -e $SETUP_DIR/alleleCount_c.success ]; then
make -C c clean
make -C c -j$CPU prefix=$INST_PATH HTSLIB=$INST_PATH/lib
cp c/bin/alleleCounter $INST_PATH/bin/.
touch $SETUP_DIR/alleleCount_c.success
fi
cd perl
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/alleleCount.success
fi
### cgpNgsQc
if [ ! -e $SETUP_DIR/cgpNgsQc.success ]; then
curl --fail -sSL $BIN_VERIFYBAMID > $OPT/bin/verifyBamID
chmod +x $OPT/bin/verifyBamID
# link to Id to handle misuse in cgpNgsQc
ln -s $OPT/bin/verifyBamID $OPT/bin/verifyBamId
curl -sSL --retry 10 https://github.com/cancerit/cgpNgsQc/archive/${VER_CGPNGSQC}.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
cd distro
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/cgpNgsQc.success
fi
### ascatNgs
if [ ! -e $SETUP_DIR/ascatNgs.success ]; then
curl -sSL --retry 10 https://github.com/cancerit/ascatNgs/archive/${VER_ASCATNGS}.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
cd distro/perl
# add ascatSrc
curl --fail -sSL $SRC_ASCAT > share/ascat/ascat.R
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/ascatNgs.success
fi
### grass
if [ ! -e $SETUP_DIR/grass.success ]; then
curl -sSL --retry 10 https://github.com/cancerit/grass/archive/${VER_GRASS}.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
cd distro
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/grass.success
fi
### BRASS
if [ ! -e $SETUP_DIR/BRASS.success ]; then
if [ ! -e $SETUP_DIR/fasta36.success ]; then
curl -sSL --retry 10 $SRC_FASTA36 > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
cd distro/src
make -j$CPU -f ../make/Makefile.linux64
cp ../bin/ssearch36 $OPT/bin/.
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/fasta36.success
fi
if [ ! -e $SETUP_DIR/blat.success ]; then
curl -k -sSL --retry 10 $SOURCE_BLAT > distro.zip
rm -rf distro/*
unzip -d distro distro.zip
cd distro/blatSrc
BINDIR=$SETUP_DIR/blat/bin
mkdir -p $BINDIR
export BINDIR
export MACHTYPE
make -j$CPU
cp $BINDIR/blat $INST_PATH/bin/.
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/blat.success
fi
## need brass distro here
curl -sSL --retry 10 https://github.com/cancerit/BRASS/archive/${VER_BRASS}.tar.gz > distro.tar.gz
rm -rf distro/*
tar --strip-components 1 -C distro -xzf distro.tar.gz
if [ ! -e $SETUP_DIR/velvet.success ]; then
cd $SETUP_DIR/distro/distros
tar zxf velvet_1.2.10.tgz
cd velvet_1.2.10
make MAXKMERLENGTH=95 velveth velvetg
mv velveth $INST_PATH/bin/velvet95h
mv velvetg $INST_PATH/bin/velvet95g
make clean
make velveth velvetg # don't do multi-threaded make
mv velveth $INST_PATH/bin/velvet31h
mv velvetg $INST_PATH/bin/velvet31g
ln -fs $INST_PATH/bin/velvet95h $INST_PATH/bin/velveth
ln -fs $INST_PATH/bin/velvet95g $INST_PATH/bin/velvetg
cd $SETUP_DIR/distro
rm -rf distros/velvet_1.2.10
touch $SETUP_DIR/velvet.success
fi
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org -l $INST_PATH Graph
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org -l $INST_PATH Bio::Tools::Run::WrapperBase
if [ ! -e $SETUP_DIR/brass_c.success ]; then
cd $SETUP_DIR/distro
rm -rf cansam*
unzip -q distros/cansam.zip
mv cansam-master cansam
make -j$CPU -C cansam
make -j$CPU -C c++
cp c++/augment-bam $INST_PATH/bin/.
cp c++/brass-group $INST_PATH/bin/.
cp c++/filterout-bam $INST_PATH/bin/.
make -C c++ clean
rm -rf cansam
touch $SETUP_DIR/brass_c.success
fi
cd $SETUP_DIR/distro/perl
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps .
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH .
cd $SETUP_DIR
rm -rf distro.* distro/*
touch $SETUP_DIR/BRASS.success
fi
cd $HOME
rm -rf $SETUP_DIR
set +x
echo "
################################################################
To use the non-central tools you need to set the following
export LD_LIBRARY_PATH=$INST_PATH/lib:\$LD_LIBRARY_PATH
export PATH=$INST_PATH/bin:\$PATH
export MANPATH=$INST_PATH/man:$INST_PATH/share/man:\$MANPATH
export PERL5LIB=$INST_PATH/lib/perl5:\$PERL5LIB
################################################################
"
|
cancerit/dockstore-cgpwgs
|
build/opt-build.sh
|
Shell
|
agpl-3.0
| 7,232 |
#!/bin/bash
set -x
# gen vortex_1_1_product_version.nsh
echo -n "!define PRODUCT_VERSION \"" > vortex_1_1_product_version.nsh
value=`cat VERSION`
echo -n $value >> vortex_1_1_product_version.nsh
echo "\"" >> vortex_1_1_product_version.nsh
echo "!define PLATFORM_BITS \"$1\"" >> vortex_1_1_product_version.nsh
echo "InstallDir \"\$PROGRAMFILES$1\VortexW$1\"" >> vortex_1_1_product_version.nsh
# readline libs
readline_libs=`echo $readline_libs | sed 's@/@\\\@g'`
readline_libs=$(echo $readline_libs)
echo "!define READLINE_LIBS \"$readline_libs\"" >> vortex_1_1_product_version.nsh
# gsasl include dir
gsasl_include_dir=`echo $GSASL_FLAGS | sed 's@-I@@g' | sed 's@-DENABLE_SASL_SUPPORT@@g' | sed 's@/@\\\@g'`
gsasl_include_dir=$(echo $gsasl_include_dir)
echo "!define GSASL_INCLUDE_DIR \"$gsasl_include_dir\"" >> vortex_1_1_product_version.nsh
# check those files that should be included
rm -f vortex_1_1_sasl_optional_files.nsh
touch vortex_1_1_sasl_optional_files.nsh
if [ -f "libvortex-1.1/test/libgcrypt-11.dll" ]; then
echo ' File "libvortex-1.1\test\libgcrypt-11.dll"' >> vortex_1_1_sasl_optional_files.nsh
fi
if [ -f "libvortex-1.1/test/libgpg-error-0.dll" ]; then
echo ' File "libvortex-1.1\test\libgpg-error-0.dll"' >> vortex_1_1_sasl_optional_files.nsh
fi
|
ASPLes/libvortex-1.1
|
prepare-nsh.sh
|
Shell
|
lgpl-2.1
| 1,279 |
#!/bin/sh
#
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Usage: MODULES.html.sh [--git-urls] > MODULES.html
# Extend the PATH so that gnulib-tool is found.
PATH=`dirname "$0"`:$PATH; export PATH
POSIX2001_URL='http://www.opengroup.org/susv3'
POSIX2008_URL='http://www.opengroup.org/onlinepubs/9699919799'
repo_url_prefix=
repo_url_suffix=
if test $# != 0; then
case "$1" in
--git-urls)
# Generate URLs to the official gnulib git repository.
repo_url_prefix='http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f='
repo_url_suffix=''
;;
esac
fi
# For sed replacements: Escape the '&'.
repo_url_suffix_repl=`echo "$repo_url_suffix" | sed -e 's,[&],\\\&,'`
sed_lt='s,<,\<,g'
sed_gt='s,>,\>,g'
sed_escape_dot='s,\.,\\.,g'
sed_escape_slash='s,/,\\/,g'
trnl='\012'
sed_alt1='s,$,\\|,'
sed_alt2='s,^\\|,\\(,'
sed_alt3='s,\\|\\|$,\\),'
posix_headers=`echo '
aio
arpa/inet
assert
complex
cpio
ctype
dirent
dlfcn
errno
fcntl
fenv
float
fmtmsg
fnmatch
ftw
glob
grp
iconv
inttypes
iso646
langinfo
libgen
limits
locale
math
monetary
mqueue
ndbm
net/if
netdb
netinet/in
netinet/tcp
nl_types
poll
pthread
pwd
regex
sched
search
semaphore
setjmp
signal
spawn
stdarg
stdbool
stddef
stdint
stdio
stdlib
string
strings
stropts
sys/ipc
sys/mman
sys/msg
sys/resource
sys/select
sys/sem
sys/shm
sys/socket
sys/stat
sys/statvfs
sys/time
sys/times
sys/types
sys/uio
sys/un
sys/utsname
sys/wait
syslog
tar
termios
tgmath
time
trace
ulimit
unistd
utime
utmpx
wchar
wctype
wordexp
' | sed -e "$sed_alt1" | tr -d "$trnl" | sed -e "$sed_alt2" -e "$sed_alt3"`
posix2001_headers=`echo '
sys/timeb
ucontext
' | sed -e "$sed_alt1" | tr -d "$trnl" | sed -e "$sed_alt2" -e "$sed_alt3"`
posix_functions=`echo '
FD_CLR
FD_ISSET
FD_SET
FD_ZERO
_Exit
_exit
_longjmp
_setjmp
_tolower
_toupper
a64l
abort
abs
accept
access
acos
acosf
acosh
acoshf
acoshl
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
alarm
alphasort
asctime
asctime_r
asin
asinf
asinh
asinhf
asinhl
asinl
assert
atan
atan2
atan2f
atan2l
atanf
atanh
atanhf
atanhl
atanl
atexit
atof
atoi
atol
atoll
basename
bind
bsearch
btowc
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
calloc
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
catclose
catgets
catopen
cbrt
cbrtf
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
ceil
ceilf
ceill
cexp
cexpf
cexpl
cfgetispeed
cfgetospeed
cfsetispeed
cfsetospeed
chdir
chmod
chown
cimag
cimagf
cimagl
clearerr
clock
clock_getcpuclockid
clock_getres
clock_gettime
clock_nanosleep
clock_settime
clog
clogf
clogl
close
closedir
closelog
confstr
conj
conjf
conjl
connect
copysign
copysignf
copysignl
cos
cosf
cosh
coshf
coshl
cosl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
creat
crypt
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
ctermid
ctime
ctime_r
daylight
dbm_clearerr
dbm_close
dbm_delete
dbm_error
dbm_fetch
dbm_firstkey
dbm_nextkey
dbm_open
dbm_store
difftime
dirfd
dirname
div
dlclose
dlerror
dlopen
dlsym
dprintf
drand48
dup
dup2
duplocale
encrypt
endgrent
endhostent
endnetent
endprotoent
endpwent
endservent
endutxent
environ
erand48
erf
erfc
erfcf
erfcl
erff
erfl
errno
execl
execle
execlp
execv
execve
execvp
exit
exp
exp2
exp2f
exp2l
expf
expl
expm1
expm1f
expm1l
fabs
fabsf
fabsl
faccessat
fattach
fchdir
fchmod
fchmodat
fchown
fchownat
fclose
fcntl
fdatasync
fdetach
fdim
fdimf
fdiml
fdopen
fdopendir
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feof
feraiseexcept
ferror
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fexecve
fflush
ffs
fgetc
fgetpos
fgets
fgetwc
fgetws
fileno
flock
flockfile
floor
floorf
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmemopen
fmin
fminf
fminl
fmod
fmodf
fmodl
fmtmsg
fnmatch
fopen
fork
fpathconf
fpclassify
fprintf
fputc
fputs
fputwc
fputws
fread
free
freeaddrinfo
freelocale
freopen
frexp
frexpf
frexpl
fscanf
fseek
fseeko
fsetpos
fstat
fstatat
fstatvfs
fsync
ftell
ftello
ftok
ftruncate
ftrylockfile
ftw
funlockfile
futimens
fwide
fwprintf
fwrite
fwscanf
gai_strerror
getaddrinfo
getc
getc_unlocked
getchar
getchar_unlocked
getcwd
getdate
getdate_err
getdelim
getegid
getenv
geteuid
getgid
getgrent
getgrgid
getgrgid_r
getgrnam
getgrnam_r
getgroups
gethostent
gethostid
gethostname
getitimer
getline
getlogin
getlogin_r
getmsg
getnameinfo
getnetbyaddr
getnetbyname
getnetent
getopt
getpeername
getpgid
getpgrp
getpid
getpmsg
getppid
getpriority
getprotobyname
getprotobynumber
getprotoent
getpwent
getpwnam
getpwnam_r
getpwuid
getpwuid_r
getrlimit
getrusage
gets
getservbyname
getservbyport
getservent
getsid
getsockname
getsockopt
getsubopt
gettimeofday
getuid
getutxent
getutxid
getutxline
getwc
getwchar
glob
globfree
gmtime
gmtime_r
grantpt
hcreate
hdestroy
hsearch
htonl
htons
hypot
hypotf
hypotl
iconv
iconv_close
iconv_open
if_freenameindex
if_indextoname
if_nameindex
if_nametoindex
ilogb
ilogbf
ilogbl
imaxabs
imaxdiv
inet_addr
inet_ntoa
inet_ntop
inet_pton
initstate
insque
ioctl
isalnum
isalnum_l
isalpha
isalpha_l
isascii
isastream
isatty
isblank
isblank_l
iscntrl
iscntrl_l
isdigit
isdigit_l
isfinite
isgraph
isgraph_l
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
islower
islower_l
isnan
isnormal
isprint
isprint_l
ispunct
ispunct_l
isspace
isspace_l
isunordered
isupper
isupper_l
iswalnum
iswalnum_l
iswalpha
iswalpha_l
iswblank
iswblank_l
iswcntrl
iswcntrl_l
iswctype
iswctype_l
iswdigit
iswdigit_l
iswgraph
iswgraph_l
iswlower
iswlower_l
iswprint
iswprint_l
iswpunct
iswpunct_l
iswspace
iswspace_l
iswupper
iswupper_l
iswxdigit
iswxdigit_l
isxdigit
isxdigit_l
j0
j1
jn
jrand48
kill
killpg
l64a
labs
lchown
lcong48
ldexp
ldexpf
ldexpl
ldiv
lfind
lgamma
lgammaf
lgammal
link
linkat
lio_listio
listen
llabs
lldiv
llrint
llrintf
llrintl
llround
llroundf
llroundl
localeconv
localtime
localtime_r
lockf
log
log10
log10f
log10l
log1p
log1pf
log1pl
log2
log2f
log2l
logb
logbf
logbl
logf
logl
longjmp
lrand48
lrint
lrintf
lrintl
lround
lroundf
lroundl
lsearch
lseek
lstat
malloc
mblen
mbrlen
mbrtowc
mbsinit
mbsnrtowcs
mbsrtowcs
mbstowcs
mbtowc
memccpy
memchr
memcmp
memcpy
memmove
memset
mkdir
mkdirat
mkdtemp
mkfifo
mkfifoat
mknod
mknodat
mkstemp
mktime
mlock
mlockall
mmap
modf
modff
modfl
mprotect
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
mrand48
msgctl
msgget
msgrcv
msgsnd
msync
munlock
munlockall
munmap
nan
nanf
nanl
nanosleep
nearbyint
nearbyintf
nearbyintl
newlocale
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
nftw
nice
nl_langinfo
nl_langinfo_l
nrand48
ntohl
ntohs
open
open_memstream
open_wmemstream
openat
opendir
openlog
optarg
opterr
optind
optopt
pathconf
pause
pclose
perror
pipe
poll
popen
posix_fadvise
posix_fallocate
posix_madvise
posix_mem_offset
posix_memalign
posix_openpt
posix_spawn
posix_spawn_file_actions_addclose
posix_spawn_file_actions_adddup2
posix_spawn_file_actions_addopen
posix_spawn_file_actions_destroy
posix_spawn_file_actions_init
posix_spawnattr_destroy
posix_spawnattr_getflags
posix_spawnattr_getpgroup
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_getsigdefault
posix_spawnattr_getsigmask
posix_spawnattr_init
posix_spawnattr_setflags
posix_spawnattr_setpgroup
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_spawnattr_setsigdefault
posix_spawnattr_setsigmask
posix_spawnp
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getcreatetime
posix_trace_attr_getgenversion
posix_trace_attr_getinherited
posix_trace_attr_getlogfullpolicy
posix_trace_attr_getlogsize
posix_trace_attr_getmaxdatasize
posix_trace_attr_getmaxsystemeventsize
posix_trace_attr_getmaxusereventsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogfullpolicy
posix_trace_attr_setlogsize
posix_trace_attr_setmaxdatasize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_create_withlog
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_get_name
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventset_del
posix_trace_eventset_empty
posix_trace_eventset_fill
posix_trace_eventset_ismember
posix_trace_eventtypelist_getnext_id
posix_trace_eventtypelist_rewind
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_get_status
posix_trace_getnext_event
posix_trace_open
posix_trace_rewind
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_stop
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
pow
powf
powl
pread
printf
pselect
psiginfo
psignal
pthread_atfork
pthread_attr_destroy
pthread_attr_getdetachstate
pthread_attr_getguardsize
pthread_attr_getinheritsched
pthread_attr_getschedparam
pthread_attr_getschedpolicy
pthread_attr_getscope
pthread_attr_getstack
pthread_attr_getstacksize
pthread_attr_init
pthread_attr_setdetachstate
pthread_attr_setguardsize
pthread_attr_setinheritsched
pthread_attr_setschedparam
pthread_attr_setschedpolicy
pthread_attr_setscope
pthread_attr_setstack
pthread_attr_setstacksize
pthread_barrier_destroy
pthread_barrier_init
pthread_barrier_wait
pthread_barrierattr_destroy
pthread_barrierattr_getpshared
pthread_barrierattr_init
pthread_barrierattr_setpshared
pthread_cancel
pthread_cleanup_pop
pthread_cleanup_push
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_timedwait
pthread_cond_wait
pthread_condattr_destroy
pthread_condattr_getclock
pthread_condattr_getpshared
pthread_condattr_init
pthread_condattr_setclock
pthread_condattr_setpshared
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_getspecific
pthread_join
pthread_key_create
pthread_key_delete
pthread_kill
pthread_mutex_consistent
pthread_mutex_destroy
pthread_mutex_getprioceiling
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_setprioceiling
pthread_mutex_timedlock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_mutexattr_destroy
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_getpshared
pthread_mutexattr_getrobust
pthread_mutexattr_gettype
pthread_mutexattr_init
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutexattr_setpshared
pthread_mutexattr_setrobust
pthread_mutexattr_settype
pthread_once
pthread_rwlock_destroy
pthread_rwlock_init
pthread_rwlock_rdlock
pthread_rwlock_timedrdlock
pthread_rwlock_timedwrlock
pthread_rwlock_tryrdlock
pthread_rwlock_trywrlock
pthread_rwlock_unlock
pthread_rwlock_wrlock
pthread_rwlockattr_destroy
pthread_rwlockattr_getpshared
pthread_rwlockattr_init
pthread_rwlockattr_setpshared
pthread_self
pthread_setcancelstate
pthread_setcanceltype
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
pthread_setspecific
pthread_sigmask
pthread_spin_destroy
pthread_spin_init
pthread_spin_lock
pthread_spin_trylock
pthread_spin_unlock
pthread_testcancel
ptsname
putc
putc_unlocked
putchar
putchar_unlocked
putenv
putmsg
putpmsg
puts
pututxline
putwc
putwchar
pwrite
qsort
raise
rand
rand_r
random
read
readdir
readdir_r
readlink
readlinkat
readv
realloc
realpath
recv
recvfrom
recvmsg
regcomp
regerror
regexec
regfree
remainder
remainderf
remainderl
remove
remque
remquo
remquof
remquol
rename
renameat
rewind
rewinddir
rint
rintf
rintl
rmdir
round
roundf
roundl
scalbln
scalblnf
scalblnl
scalbn
scalbnf
scalbnl
scandir
scanf
sched_get_priority_max
sched_get_priority_min
sched_getparam
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
sched_yield
seed48
seekdir
select
sem_close
sem_destroy
sem_getvalue
sem_init
sem_open
sem_post
sem_timedwait
sem_trywait
sem_unlink
sem_wait
semctl
semget
semop
send
sendmsg
sendto
setbuf
setegid
setenv
seteuid
setgid
setgrent
sethostent
setitimer
setjmp
setkey
setlocale
setlogmask
setnetent
setpgid
setpgrp
setpriority
setprotoent
setpwent
setregid
setreuid
setrlimit
setservent
setsid
setsockopt
setstate
setuid
setutxent
setvbuf
shm_open
shm_unlink
shmat
shmctl
shmdt
shmget
shutdown
sigaction
sigaddset
sigaltstack
sigdelset
sigemptyset
sigfillset
sighold
sigignore
siginterrupt
sigismember
siglongjmp
signal
signbit
signgam
sigpause
sigpending
sigprocmask
sigqueue
sigrelse
sigset
sigsetjmp
sigsuspend
sigtimedwait
sigwait
sigwaitinfo
sin
sinf
sinh
sinhf
sinhl
sinl
sleep
snprintf
sockatmark
socket
socketpair
sprintf
sqrt
sqrtf
sqrtl
srand
srand48
srandom
sscanf
stat
statvfs
stderr
stdin
stdout
stpcpy
stpncpy
strcasecmp
strcasecmp_l
strcat
strchr
strcmp
strcoll
strcoll_l
strcpy
strcspn
strdup
strerror
strerror_l
strerror_r
strfmon
strfmon_l
strftime
strftime_l
strlen
strncasecmp
strncasecmp_l
strncat
strncmp
strncpy
strndup
strnlen
strpbrk
strptime
strrchr
strsignal
strspn
strstr
strtod
strtof
strtoimax
strtok
strtok_r
strtol
strtold
strtoll
strtoul
strtoull
strtoumax
strxfrm
strxfrm_l
swab
swprintf
swscanf
symlink
symlinkat
sync
sysconf
syslog
system
tan
tanf
tanh
tanhf
tanhl
tanl
tcdrain
tcflow
tcflush
tcgetattr
tcgetpgrp
tcgetsid
tcsendbreak
tcsetattr
tcsetpgrp
tdelete
telldir
tempnam
tfind
tgamma
tgammaf
tgammal
time
timer_create
timer_delete
timer_getoverrun
timer_gettime
timer_settime
times
timezone
tmpfile
tmpnam
toascii
tolower
tolower_l
toupper
toupper_l
towctrans
towctrans_l
towlower
towlower_l
towupper
towupper_l
trunc
truncate
truncf
truncl
tsearch
ttyname
ttyname_r
twalk
tzname
tzset
ulimit
umask
uname
ungetc
ungetwc
unlink
unlinkat
unlockpt
unsetenv
uselocale
utime
utimensat
utimes
va_arg
va_copy
va_end
va_start
vdprintf
vfprintf
vfscanf
vfwprintf
vfwscanf
vprintf
vscanf
vsnprintf
vsprintf
vsscanf
vswprintf
vswscanf
vwprintf
vwscanf
wait
waitid
waitpid
wcpcpy
wcpncpy
wcrtomb
wcscasecmp
wcscasecmp_l
wcscat
wcschr
wcscmp
wcscoll
wcscoll_l
wcscpy
wcscspn
wcsdup
wcsftime
wcslen
wcsncasecmp
wcsncasecmp_l
wcsncat
wcsncmp
wcsncpy
wcsnlen
wcsnrtombs
wcspbrk
wcsrchr
wcsrtombs
wcsspn
wcsstr
wcstod
wcstof
wcstoimax
wcstok
wcstol
wcstold
wcstoll
wcstombs
wcstoul
wcstoull
wcstoumax
wcswidth
wcsxfrm
wcsxfrm_l
wctob
wctomb
wctrans
wctrans_l
wctype
wctype_l
wcwidth
wmemchr
wmemcmp
wmemcpy
wmemmove
wmemset
wordexp
wordfree
wprintf
write
writev
wscanf
y0
y1
yn
' | sed -e "$sed_alt1" | tr -d "$trnl" | sed -e "$sed_alt2" -e "$sed_alt3"`
posix2001_functions=`echo '
bcmp
bcopy
bsd_signal
bzero
ecvt
fcvt
ftime
gcvt
getcontext
gethostbyaddr
gethostbyname
getwd
h_errno
index
makecontext
mktemp
pread
pthread_attr_getstackaddr
pthread_attr_setstackaddr
rindex
scalb
setcontext
swapcontext
ualarm
usleep
vfork
wcswcs
' | sed -e "$sed_alt1" | tr -d "$trnl" | sed -e "$sed_alt2" -e "$sed_alt3"`
indent=""
seen_modules=
seen_files=
# func_exit STATUS
# exit with status
func_exit ()
{
(exit $1); exit $1
}
# func_tmpdir
# creates a temporary directory.
# Sets variable
# - tmp pathname of freshly created temporary directory
func_tmpdir ()
{
# Use the environment variable TMPDIR, falling back to /tmp. This allows
# users to specify a different temporary directory, for example, if their
# /tmp is filled up or too small.
: ${TMPDIR=/tmp}
{
# Use the mktemp program if available. If not available, hide the error
# message.
tmp=`(umask 077 && mktemp -d "$TMPDIR/MDXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
# Use a simple mkdir command. It is guaranteed to fail if the directory
# already exists. $RANDOM is bash specific and expands to empty in shells
# other than bash, ksh and zsh. Its use does not increase security;
# rather, it minimizes the probability of failure in a very cluttered /tmp
# directory.
tmp=$TMPDIR/MD$$-$RANDOM
(umask 077 && mkdir "$tmp")
} ||
{
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
func_exit 1
}
}
# func_append var value
# appends the given value to the shell variable var.
if ( foo=bar; foo+=baz && test "$foo" = barbaz ) >/dev/null 2>&1; then
# Use bash's += operator. It reduces complexity of appending repeatedly to
# a single variable from O(n^2) to O(n).
func_append ()
{
eval "$1+=\"\$2\""
}
else
func_append ()
{
eval "$1=\"\$$1\$2\""
}
fi
# func_echo line
# outputs line with indentation.
func_echo ()
{
echo "${indent}$*"
}
# func_indent
# increases the indentation.
func_indent ()
{
indent="$indent "
}
# func_unindent
# decreases the indentation.
func_unindent ()
{
indent=`echo "$indent" | sed -e 's/ $//'`
}
# func_begin tag [attribute...]
# opens a HTML tag.
func_begin ()
{
func_echo "<$*>"
func_indent
}
# func_end tag
# closes a HTML tag.
func_end ()
{
func_unindent
func_echo "</$1>"
}
# func_wrap tag [attribute...]
# encloses $element in a HTML tag, without line breaks.
func_wrap ()
{
element="<$*>${element}</$1>"
}
# func_section_wrap sectiontag
# encloses $element in a HTML tag referring to the given tag.
func_section_wrap ()
{
if test -n "$in_toc"; then
func_wrap A "HREF=\"#$1\""
else
func_wrap A "NAME=\"$1\""
fi
}
# func_begin_table
func_begin_table ()
{
func_begin TABLE
if test -z "$in_toc"; then
func_begin TR
func_echo "<TH ALIGN=LEFT>modules/"
func_echo "<TH ALIGN=LEFT>lib/"
func_echo "<TH ALIGN=LEFT>lib/"
func_echo "<TH ALIGN=LEFT>m4/"
func_echo "<TH ALIGN=LEFT> "
func_end TR
func_begin TR
func_echo "<TH ALIGN=LEFT>Module"
func_echo "<TH ALIGN=LEFT>Header"
func_echo "<TH ALIGN=LEFT>Implementation"
func_echo "<TH ALIGN=LEFT>Autoconf macro"
func_echo "<TH ALIGN=LEFT>Depends on"
func_end TR
fi
}
# func_module module
func_module ()
{
sed_remove_trailing_empty_line='${
/^$/d
}'
if test -n "$in_toc"; then
func_begin TR "WIDTH=\"100%\""
element='<A HREF="#module='$1'">'$1'</A>'
func_echo "<TD ALIGN=LEFT VALIGN=TOP WIDTH=\"20%\">$element"
# Rendering the description:
# - Change the symbol() syntax as suitable for documentation, removing the
# parentheses (as per GNU standards, section "GNU Manuals").
# - Flag the remaining symbol() constructs as errors.
# - Change 'xxx' to <CODE>xxx</CODE>.
sed_extract_element='
'$sed_lt'
'$sed_gt'
'$sed_remove_trailing_empty_line'
s,^, ,
s,$, ,
s,\([^a-zA-Z_]\)'$posix_functions'() \(function\|macro\),\1<A HREF="'$POSIX2008_URL'/functions/\2.html">\2</A> \3,g
s,\([^a-zA-Z_]\)'$posix_functions' \(function\|macro\),\1<A HREF="'$POSIX2008_URL'/functions/\2.html">\2</A> \3,g
s,\([^a-zA-Z_]\)'$posix_functions'(),\1<A HREF="'$POSIX2008_URL'/functions/\2.html">\2</A> <SPAN STYLE="color:#FF0000;">what?? If you mean a function\, please say so.</SPAN>,g
s,\([^a-zA-Z_]\)'$posix2001_functions'() \(function\|macro\),\1<A HREF="'$POSIX2001_URL'xsh/\2.html">\2</A> \3,g
s,\([^a-zA-Z_]\)'$posix2001_functions' \(function\|macro\),\1<A HREF="'$POSIX2001_URL'xsh/\2.html">\2</A> \3,g
s,\([^a-zA-Z_]\)'$posix2001_functions'(),\1<A HREF="'$POSIX2001_URL'xsh/\2.html">\2</A> <SPAN STYLE="color:#FF0000;">what?? If you mean a function\, please say so.</SPAN>,g
s,\([^a-zA-Z_]\)\([a-zA-Z_][a-zA-Z0-9_]*\)() \(function\|macro\),\1\2 \3,g
s,\([^a-zA-Z_]\)\([a-zA-Z_][a-zA-Z0-9_]*\)(),\1\2 <SPAN STYLE="color:#FF0000;">what?? If you mean a function\, please say so.</SPAN>,g
s, '"'"'\([a-zA-Z0-9_ -]*\)'"'"'\([^a-zA-Z0-9_]\), <CODE>\1</CODE>\2,g
s,^ ,,
s, $,,
'
element=`gnulib-tool --extract-description $1 \
| LC_ALL=C sed -e "$sed_extract_element"`
func_echo "<TD ALIGN=LEFT VALIGN=TOP WIDTH=\"80%\">$element"
func_end TR
else
func_begin TR
element='<A NAME="module='$1'"></A><A HREF="'$repo_url_prefix'modules/'$1$repo_url_suffix'">'$1'</A>'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
includes=`gnulib-tool --extract-include-directive $1`
files=`gnulib-tool --extract-filelist $1 \
| grep -v '^m4/gnulib-common\.m4$'`
sed_extract_element='
'$sed_lt'
'$sed_gt'
'$sed_remove_trailing_empty_line'
s,^#include "\(.*\)"$,#include "<A HREF="'$repo_url_prefix'lib/\1'$repo_url_suffix_repl'">\1</A>",
s,^#include <'$posix_headers'\.h>$,#include \<<A HREF="'$POSIX2008_URL'/basedefs/\1.h.html">\1.h</A>\>,
s,<A HREF="'$POSIX2008_URL'/basedefs/\([a-zA-Z0-9_]*\)/\([a-zA-Z0-9_]*\)\.h\.html">,<A HREF="'$POSIX2008_URL'/basedefs/\1_\2.h.html">,
s,^#include <'$posix2001_headers'\.h>$,#include \<<A HREF="'$POSIX2001_URL'xbd/\1.h.html">\1.h</A>\>,
s/$/<BR>/
'
element=`echo "$includes" \
| LC_ALL=C sed -e "$sed_extract_element" | tr -d "$trnl" \
| sed -e 's/<BR>$//'`
test -n "$element" || element='---'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
sed_choose_unconditional_nonstandard_include='s,^#include "\(.*\)"$,\1,p'
includefile=`echo "$includes" \
| sed -n -e "$sed_choose_unconditional_nonstandard_include" \
| sed -e "$sed_escape_dot" | tr -d "$trnl"`
sed_choose_lib_files='s,^lib/\(.*\)$,\1,p'
sed_extract_include='
\|^'"$includefile"'$|d
s,^\(.*\)$,<A HREF="'$repo_url_prefix'lib/\1'$repo_url_suffix_repl'">\1</A>,
s/$/<BR>/
'
element=`echo "$files" \
| sed -e '/^$/d' \
| sed -n -e "$sed_choose_lib_files" \
| sed -e "$sed_extract_include" \
| tr -d "$trnl" | sed -e 's/<BR>$//'`
test -n "$element" || element='---'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
sed_choose_m4_files='s,^m4/\(.*\)$,\1,p'
sed_extract_repo_url='
/^onceonly/d
s,^\(.*\)$,<A HREF="'$repo_url_prefix'm4/\1'$repo_url_suffix_repl'">\1</A>,
'
element=`(echo "$files" \
| sed -e "$sed_remove_trailing_empty_line" \
| sed -n -e "$sed_choose_m4_files" \
| sed -e "$sed_extract_repo_url"; \
gnulib-tool --extract-autoconf-snippet $1 \
| sed -e "$sed_remove_trailing_empty_line") \
| sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
test -n "$element" || element='---'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
element=`gnulib-tool --extract-dependencies $1 \
| sed -e "$sed_remove_trailing_empty_line" \
-e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
test -n "$element" || element='---'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
func_end TR
func_append seen_modules " $1"
func_append seen_files " $files"
fi
}
# func_end_table
func_end_table ()
{
func_end TABLE
}
# func_all_modules
func_all_modules ()
{
element="Support for obsolete systems lacking ANSI C 89"
func_section_wrap ansic_sup_obsolete
func_wrap H2
func_echo "$element"
func_begin_table
func_module stdlib
func_module strtol
func_module strtoul
func_module memcmp
func_module memcpy
func_module memmove
func_module memset
func_module strcspn
func_module strpbrk
func_end_table
func_echo 'These modules are not listed among dependencies below, for simplicity.'
func_echo 'If your package requires portability to old, obsolete systems, you need to list these modules explicitly among the modules to import through gnulib-tool.'
element="Support for systems lacking ANSI C 89"
func_section_wrap ansic_sup
func_wrap H2
func_echo "$element"
func_begin_table
func_module atexit
func_module strtod
func_module strerror
func_module strerror-override
func_module mktime
func_end_table
element="Enhancements for ANSI C 89 functions"
func_section_wrap ansic_enh
func_wrap H2
func_echo "$element"
element="Diagnostics <assert.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_assert_diagnostics
func_wrap H3
func_echo "$element"
func_begin_table
func_module assert
func_module verify
func_end_table
element="Mathematics <math.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_math
func_wrap H3
func_echo "$element"
func_begin_table
func_module fpieee
func_end_table
element="Input/output <stdio.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_stdio
func_wrap H3
func_echo "$element"
func_begin_table
func_module fflush
func_module fseterr
func_module tmpfile
func_end_table
element="Memory management functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_stdlib_memory
func_wrap H3
func_echo "$element"
func_begin_table
func_module calloc-gnu
func_module eealloc
func_module free
func_module malloc-gnu
func_module realloc-gnu
func_module pagealign_alloc
func_end_table
element="Sorting functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_stdlib_sorting
func_wrap H3
func_echo "$element"
func_begin_table
func_module array-mergesort
func_module mpsort
func_end_table
element="Date and time <time.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_enh_time_datetime
func_wrap H3
func_echo "$element"
func_begin_table
func_module fprintftime
func_module strftime
func_end_table
element="Extra functions based on ANSI C 89"
func_section_wrap ansic_ext
func_wrap H2
func_echo "$element"
element="Memory management functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_stdlib_memory
func_wrap H3
func_echo "$element"
func_begin_table
func_module xsize
func_module xalloc
func_module xalloc-die
func_module alloca
func_module alloca-opt
func_module malloca
func_module xmalloca
func_module xmemdup0
func_module safe-alloc
func_end_table
element="Integer arithmetic functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_stdlib_arith
func_wrap H3
func_echo "$element"
func_begin_table
func_module count-leading-zeros
func_module count-one-bits
func_module ffs
func_module ffsl
func_module ffsll
func_module gcd
func_module minmax
func_end_table
element="Environment variables <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_stdlib_env
func_wrap H3
func_echo "$element"
func_begin_table
func_module putenv
func_module setenv
func_module unsetenv
func_module xsetenv
func_end_table
element="Character handling <ctype.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_ctype
func_wrap H3
func_echo "$element"
func_begin_table
func_module c-ctype
func_end_table
element="String handling <string.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_string
func_wrap H3
func_echo "$element"
func_begin_table
func_module bcopy
func_module memchr
func_module memchr2
func_module memcmp2
func_module memmem
func_module memmem-simple
func_module mempcpy
func_module memrchr
func_module amemxfrm
func_module rawmemchr
func_module stpcpy
func_module stpncpy
func_module c-strcase
func_module strcase
func_module c-strcaseeq
func_module c-strcasestr
func_module strcasestr
func_module strcasestr-simple
func_module strchrnul
func_module streq
func_module strerror_r-posix
func_module strnlen
func_module strnlen1
func_module strndup
func_module strsep
func_module strstr
func_module strstr-simple
func_module c-strstr
func_module astrxfrm
func_module trim
func_module fstrcmp
func_module xstrndup
func_end_table
element="Mathematics <math.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_math
func_wrap H3
func_echo "$element"
func_begin_table
func_module printf-frexp
func_end_table
element="Numeric conversion functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_stdlib_conv
func_wrap H3
func_echo "$element"
func_begin_table
func_module c-strtod
func_module c-strtold
func_module xstrtod
func_module xstrtol
func_module xstrtoll
func_module xstrtold
func_end_table
element="Date and time <time.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_time_datetime
func_wrap H3
func_echo "$element"
func_begin_table
func_module mktime-internal
func_module parse-datetime
func_module timegm
func_module tzset
func_end_table
element="Input/Output <stdio.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_stdio
func_wrap H3
func_echo "$element"
func_begin_table
func_module unlocked-io
func_module fwriteerror
func_module vasnprintf
func_module vasprintf
func_module xprintf
func_module xvasprintf
func_end_table
element="Signal handling <signal.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_signal
func_wrap H3
func_echo "$element"
func_begin_table
func_module fatal-signal
func_module raise
func_module strsignal
func_end_table
element="Command-line arguments"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_argv
func_wrap H3
func_echo "$element"
func_begin_table
func_module argmatch
func_module argv-iter
func_module version-etc
func_module version-etc-fsf
func_module long-options
func_end_table
element="Container data structures"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_container
func_wrap H3
func_echo "$element"
func_begin_table
func_module list
func_module xlist
func_module array-list
func_module carray-list
func_module linked-list
func_module avltree-list
func_module rbtree-list
func_module linkedhash-list
func_module avltreehash-list
func_module rbtreehash-list
func_module sublist
func_module xsublist
func_module oset
func_module xoset
func_module array-oset
func_module avltree-oset
func_module rbtree-oset
func_end_table
element="Cryptographic computations (low-level)"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_crypto
func_wrap H3
func_echo "$element"
func_begin_table
func_module crypto/arcfour
func_module crypto/arctwo
func_module crypto/des
func_module crypto/hmac-md5
func_module crypto/hmac-sha1
func_module crypto/md2
func_module crypto/md4
func_module crypto/md5
func_module crypto/rijndael
func_module crypto/sha1
func_module crypto/sha256
func_module crypto/sha512
func_end_table
element="Cryptographic computations (high-level)"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_crypto2
func_wrap H3
func_echo "$element"
func_begin_table
func_module crypto/gc
func_module crypto/gc-arcfour
func_module crypto/gc-arctwo
func_module crypto/gc-camellia
func_module crypto/gc-des
func_module crypto/gc-hmac-md5
func_module crypto/gc-hmac-sha1
func_module crypto/gc-md2
func_module crypto/gc-md4
func_module crypto/gc-md5
func_module crypto/gc-pbkdf2-sha1
func_module crypto/gc-random
func_module crypto/gc-rijndael
func_module crypto/gc-sha1
func_end_table
element="Compiler warning management"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_compwarn
func_wrap H3
func_echo "$element"
func_begin_table
func_module ignore-value
func_end_table
element="Misc"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap ansic_ext_misc
func_wrap H3
func_echo "$element"
func_begin_table
func_module base32
func_module base64
func_module check-version
func_module crc
func_module diacrit
func_module diffseq
func_module execinfo
func_module getline
func_module getdelim
func_module getnline
func_module getndelim2
func_module linebuffer
func_module memxor
func_module obstack
func_module obstack-printf
func_module obstack-printf-posix
func_module hash-pjw
func_module hash
func_module readline
func_module readtokens
func_module readtokens0
func_module strverscmp
func_module filevercmp
func_end_table
element="Support for systems lacking ISO C 99"
func_section_wrap isoc_sup
func_wrap H2
func_echo "$element"
element="Core language properties"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_core_properties
func_wrap H3
func_echo "$element"
func_begin_table
func_module alignof
func_module flexmember
func_module fpucw
func_module func
func_module inline
func_module longlong
func_module snippet/unused-parameter
func_module va-args
func_module vararrays
func_end_table
element="Sizes of integer types <limits.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_limits
func_wrap H3
func_echo "$element"
func_begin_table
func_module size_max
func_end_table
element="Variable arguments <stdarg.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stdarg
func_wrap H3
func_echo "$element"
func_begin_table
func_module stdarg
func_end_table
element="Boolean type and values <stdbool.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stdbool
func_wrap H3
func_echo "$element"
func_begin_table
func_module stdbool
func_end_table
element="Basic types <stddef.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stddef
func_wrap H3
func_echo "$element"
func_begin_table
func_module stddef
func_end_table
element="Integer types and values <stdint.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stdint
func_wrap H3
func_echo "$element"
func_begin_table
func_module stdint
func_end_table
element="Input/output <stdio.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stdio
func_wrap H3
func_echo "$element"
func_begin_table
func_module stdio
func_module snprintf
func_module vsnprintf
func_end_table
element="Process control, Numeric conversion functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_stdlib_procconv
func_wrap H3
func_echo "$element"
func_begin_table
func_module _Exit
func_module atoll
func_module strtoll
func_module strtoull
func_end_table
element="Unibyte characters <ctype.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_ctype
func_wrap H3
func_echo "$element"
func_begin_table
func_module ctype
func_end_table
element="Functions for greatest-width integer types <inttypes.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_inttypes
func_wrap H3
func_echo "$element"
func_begin_table
func_module imaxabs
func_module imaxdiv
func_module inttypes
func_module strtoimax
func_module strtoumax
func_end_table
element="String handling <string.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_string
func_wrap H3
func_echo "$element"
func_begin_table
func_module strncat
func_end_table
element="Extended multibyte and wide character utilities <wchar.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_wchar
func_wrap H3
func_echo "$element"
func_begin_table
func_module wchar
func_module btowc
func_module wctob
func_module mbsinit
func_module mbrlen
func_module mbrtowc
func_module mbsrtowcs
func_module wcrtomb
func_module wcsrtombs
func_end_table
element="Wide character classification and mapping utilities <wctype.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_wctype
func_wrap H3
func_echo "$element"
func_begin_table
func_module wctype
func_end_table
element="Characteristics of floating types <float.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_float
func_wrap H3
func_echo "$element"
func_begin_table
func_module float
func_end_table
element="Mathematics <math.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_math
func_wrap H3
func_echo "$element"
func_begin_table
func_module acos
func_module acosl
func_module asin
func_module asinl
func_module atan
func_module atan2
func_module atanl
func_module cbrt
func_module ceil
func_module ceilf
func_module ceill
func_module copysign
func_module cos
func_module cosh
func_module cosl
func_module erf
func_module erfc
func_module exp
func_module expl
func_module fabs
func_module floor
func_module floorf
func_module floorl
func_module fmod
func_module frexp
func_module frexp-nolibm
func_module frexpl
func_module frexpl-nolibm
func_module hypot
func_module isfinite
func_module isinf
func_module isnan
func_module isnanf
func_module isnanf-nolibm
func_module isnand
func_module isnand-nolibm
func_module isnanl
func_module isnanl-nolibm
func_module j0
func_module j1
func_module jn
func_module ldexp
func_module ldexpl
func_module lgamma
func_module log
func_module log10
func_module log1p
func_module logb
func_module logl
func_module math
func_module mathl
func_module modf
func_module nextafter
func_module pow
func_module remainder
func_module rint
func_module round
func_module roundf
func_module roundl
func_module signbit
func_module sin
func_module sinh
func_module sinl
func_module sqrt
func_module sqrtl
func_module tan
func_module tanh
func_module tanl
func_module trunc
func_module truncf
func_module truncl
func_module y0
func_module y1
func_module yn
func_end_table
element="Enhancements for ISO C 99 functions"
func_section_wrap isoc_enh
func_wrap H2
func_echo "$element"
element="Input/output <stdio.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_enh_stdio
func_wrap H3
func_echo "$element"
func_begin_table
func_module printf-safe
func_end_table
element="Extra functions based on ISO C 99"
func_section_wrap isoc_ext
func_wrap H2
func_echo "$element"
element="Mathematics <math.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_ext_math
func_wrap H3
func_echo "$element"
func_begin_table
func_module printf-frexpl
func_end_table
element="Numeric conversion functions <stdlib.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_ext_stdlib_conv
func_wrap H3
func_echo "$element"
func_begin_table
func_module dtoastr
func_module ftoastr
func_module intprops
func_module inttostr
func_module ldtoastr
func_module xstrtoimax
func_module xstrtoumax
func_end_table
element="Extended multibyte and wide character utilities <wchar.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_ext_wchar_mb
func_wrap H3
func_echo "$element"
func_begin_table
func_module mbchar
func_module mbiter
func_module mbuiter
func_module mbfile
func_end_table
element="Support for systems lacking ISO C11"
func_section_wrap c11_sup
func_wrap H2
func_echo "$element"
element="Core language properties"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap c11_core_properties
func_wrap H3
func_echo "$element"
func_begin_table
func_module stdalign
func_end_table
element="Support for obsolete systems lacking POSIX:2008"
func_section_wrap posix_sup_obsolete
func_wrap H2
func_echo "$element"
func_begin_table
func_module strdup
func_end_table
func_echo 'These modules are not listed among dependencies below, for simplicity.'
func_echo 'If your package requires portability to old, obsolete systems, you need to list these modules explicitly among the modules to import through gnulib-tool.'
element="Support for systems lacking POSIX:2008"
func_section_wrap posix_sup
func_wrap H2
func_echo "$element"
func_begin_table
func_module accept
func_module alphasort
func_module arpa_inet
func_module bind
func_module calloc-posix
func_module chown
func_module close
func_module connect
func_module dirent
func_module dprintf
func_module dprintf-posix
func_module dup2
func_module duplocale
func_module environ
func_module errno
func_module fchdir
func_module fclose
func_module fcntl-h
func_module fcntl
func_module fdatasync
func_module flock
func_module fopen
func_module fprintf-posix
func_module freopen
func_module fseek
func_module fseeko
func_module fsync
func_module ftell
func_module ftello
func_module ftruncate
func_module futimens
func_module getaddrinfo
func_module getcwd
func_module getcwd-lgpl
func_module getgroups
func_module gethostname
func_module getlogin
func_module getlogin_r
func_module getopt-posix
func_module getpeername
func_module getsockname
func_module getsockopt
func_module getsubopt
func_module gettimeofday
func_module grantpt
func_module hostent
func_module iconv-h
func_module iconv_open
func_module inet_ntop
func_module inet_pton
func_module ioctl
func_module isblank
func_module langinfo
func_module link
func_module linkat
func_module listen
func_module locale
func_module lseek
func_module lstat
func_module malloc-posix
func_module mbsnrtowcs
func_module mkdir
func_module mkdtemp
func_module mkfifo
func_module mknod
func_module mkstemp
func_module net_if
func_module netdb
func_module netinet_in
func_module nl_langinfo
func_module open
func_module perror
func_module poll
func_module popen
func_module posix_openpt
func_module posix_spawn
func_module posix_spawnattr_destroy
func_module posix_spawnattr_getflags
func_module posix_spawnattr_getpgroup
func_module posix_spawnattr_getschedparam
func_module posix_spawnattr_getschedpolicy
func_module posix_spawnattr_getsigdefault
func_module posix_spawnattr_getsigmask
func_module posix_spawnattr_init
func_module posix_spawnattr_setflags
func_module posix_spawnattr_setpgroup
func_module posix_spawnattr_setschedparam
func_module posix_spawnattr_setschedpolicy
func_module posix_spawnattr_setsigdefault
func_module posix_spawnattr_setsigmask
func_module posix_spawn_file_actions_addclose
func_module posix_spawn_file_actions_adddup2
func_module posix_spawn_file_actions_addopen
func_module posix_spawn_file_actions_destroy
func_module posix_spawn_file_actions_init
func_module posix_spawn-internal
func_module posix_spawnp
func_module pread
func_module printf-posix
func_module pselect
func_module pthread
func_module ptsname
func_module pwrite
func_module readlink
func_module realloc-posix
func_module recv
func_module recvfrom
func_module remove
func_module scandir
func_module sched
func_module select
func_module send
func_module sendto
func_module servent
func_module setsockopt
func_module shutdown
func_module signal-h
func_module sleep
func_module snprintf-posix
func_module socket
func_module spawn
func_module sprintf-posix
func_module stat
func_module strdup-posix
func_module string
func_module strings
func_module tempname
func_module time
func_module time_r
func_module times
func_module timespec
func_module nanosleep
func_module pthread_sigmask
func_module regex
func_module rename
func_module renameat
func_module rmdir
func_module search
func_module sigaction
func_module sigprocmask
func_module socklen
func_module ssize_t
func_module strptime
func_module strtok_r
func_module sys_select
func_module sys_socket
func_module sys_stat
func_module sys_time
func_module sys_times
func_module sys_uio
func_module sys_utsname
func_module sys_wait
func_module tsearch
func_module ttyname_r
func_module uname
func_module unistd
func_module unlink
func_module unlockpt
func_module utimensat
func_module vasnprintf-posix
func_module vasprintf-posix
func_module vdprintf
func_module vdprintf-posix
func_module vfprintf-posix
func_module vprintf-posix
func_module vsnprintf-posix
func_module vsprintf-posix
func_module wcsnrtombs
func_module wcwidth
func_module write
func_end_table
element="Compatibility checks for POSIX:2008 functions"
func_section_wrap posix_compat
func_wrap H2
func_echo "$element"
func_begin_table
func_module clock-time
func_module d-ino
func_module d-type
func_module link-follow
func_module rename-dest-slash
func_module rmdir-errno
func_module timer-time
func_module unlink-busy
func_module winsz-ioctl
func_module winsz-termios
func_end_table
element="Enhancements for POSIX:2008 functions"
func_section_wrap posix_enh
func_wrap H2
func_echo "$element"
func_begin_table
func_module chdir-long
func_module dirent-safer
func_module dirname
func_module dirname-lgpl
func_module getopt-gnu
func_module iconv_open-utf
func_module unistd-safer
func_module fnmatch
func_module fnmatch-posix
func_module fnmatch-gnu
func_module glob
func_module exclude
func_end_table
element="Extra functions based on POSIX:2008"
func_section_wrap posix_ext
func_wrap H2
func_echo "$element"
element="Input/output"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_stdio
func_wrap H3
func_echo "$element"
func_begin_table
func_module xprintf-posix
func_module xvasprintf-posix
func_end_table
element="Numeric conversion functions"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_conv
func_wrap H3
func_echo "$element"
func_begin_table
func_module human
func_end_table
element="File system functions"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_filesys
func_wrap H3
func_echo "$element"
func_begin_table
func_module acl
func_module areadlink
func_module areadlink-with-size
func_module areadlinkat
func_module areadlinkat-with-size
func_module backupfile
func_module canonicalize
func_module canonicalize-lgpl
func_module chdir-safer
func_module clean-temp
func_module concat-filename
func_module copy-file
func_module fsusage
func_module dirfd
func_module double-slash-root
func_module euidaccess
func_module faccessat
func_module fdopendir
func_module fdutimensat
func_module file-type
func_module fileblocks
func_module filemode
func_module filename
func_module filenamecat
func_module filenamecat-lgpl
func_module fts
func_module isdir
func_module largefile
func_module lchmod
func_module lchown
func_module mkancesdirs
func_module mkfifoat
func_module mkdir-p
func_module mkostemp
func_module mkostemps
func_module mkstemps
func_module modechange
func_module mountlist
func_module openat
func_module openat-die
func_module pathmax
func_module read-file
func_module readlinkat
func_module same
func_module save-cwd
func_module savedir
func_module savewd
func_module stat-macros
func_module stat-time
func_module symlink
func_module symlinkat
func_module sys_file
func_module sys_ioctl
func_module tmpdir
func_module unlinkdir
func_module utimecmp
func_module utimens
func_module write-any-file
func_module xconcat-filename
func_module xgetcwd
func_module xreadlink
func_module xreadlinkat
func_end_table
element="File system as inode set"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_inodeset
func_wrap H3
func_echo "$element"
func_begin_table
func_module cycle-check
func_module dev-ino
func_module file-set
func_module hash-triple
func_module i-ring
func_module same-inode
func_end_table
element="File descriptor based Input/Output"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_filedesc
func_wrap H3
func_echo "$element"
func_begin_table
func_module dup3
func_module fd-safer-flag
func_module getdtablesize
func_module fcntl-safer
func_module openat-safer
func_module safe-read
func_module safe-write
func_module full-read
func_module full-write
func_module binary-io
func_module isapipe
func_module pipe-posix
func_module pipe2
func_module pipe2-safer
func_end_table
element="File stream based Input/Output"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_filestream
func_wrap H3
func_echo "$element"
func_begin_table
func_module close-stream
func_module closein
func_module closeout
func_module fbufmode
func_module fopen-safer
func_module fpending
func_module fpurge
func_module freadable
func_module freadahead
func_module freading
func_module freadptr
func_module freadseek
func_module freopen-safer
func_module fwritable
func_module fwriting
func_module getpass
func_module getpass-gnu
func_module popen-safer
func_module stdlib-safer
func_module tmpfile-safer
func_module xfreopen
func_end_table
element="Users and groups"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_uidgid
func_wrap H3
func_echo "$element"
func_begin_table
func_module getugroups
func_module group-member
func_module idcache
func_module mgetgroups
func_module userspec
func_end_table
element="Security"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_security
func_wrap H3
func_echo "$element"
func_begin_table
func_module idpriv-drop
func_module idpriv-droptemp
func_module priv-set
func_end_table
element="Date and time"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_datetime
func_wrap H3
func_echo "$element"
func_begin_table
func_module gethrxtime
func_module gettime
func_module posixtm
func_module settime
func_module usleep
func_module xnanosleep
func_end_table
element="Networking functions"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_net
func_wrap H3
func_echo "$element"
func_begin_table
func_module accept4
func_module xgethostname
func_module canon-host
func_module sockets
func_end_table
element="Multithreading"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_thread
func_wrap H3
func_echo "$element"
func_begin_table
func_module threadlib
func_module lock
func_module tls
func_module thread
func_module yield
func_module cond
func_module openmp
func_end_table
element="Signal handling"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_signal
func_wrap H3
func_echo "$element"
func_begin_table
func_module c-stack
func_module libsigsegv
func_module sig2str
func_module sigpipe
func_module sigpipe-die
func_end_table
element="Internationalization functions"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_i18n
func_wrap H3
func_echo "$element"
func_begin_table
func_module gettext
func_module gettext-h
func_module propername
func_module iconv
func_module striconv
func_module xstriconv
func_module striconveh
func_module xstriconveh
func_module striconveha
func_module localcharset
func_module hard-locale
func_module localename
func_module mbmemcasecmp
func_module mbmemcasecoll
func_module mbslen
func_module mbsnlen
func_module mbschr
func_module mbsrchr
func_module mbsstr
func_module mbscasecmp
func_module mbsncasecmp
func_module mbspcasecmp
func_module mbscasestr
func_module mbscspn
func_module mbspbrk
func_module mbsspn
func_module mbssep
func_module mbstok_r
func_module mbswidth
func_module memcasecmp
func_module memcoll
func_module xmemcoll
func_module unicodeio
func_module rpmatch
func_module yesno
func_module bison-i18n
func_end_table
element="Unicode string functions"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_unicode
func_wrap H3
func_echo "$element"
func_begin_table
func_module libunistring
func_module libunistring-optional
func_module unitypes
func_module ucs4-utf8
func_module ucs4-utf16
func_module utf8-ucs4-unsafe
func_module utf16-ucs4-unsafe
func_module utf8-ucs4
func_module utf16-ucs4
func_module unistr/base
func_module unistr/u8-to-u16
func_module unistr/u8-to-u32
func_module unistr/u16-to-u8
func_module unistr/u16-to-u32
func_module unistr/u32-to-u8
func_module unistr/u32-to-u16
func_module unistr/u8-check
func_module unistr/u16-check
func_module unistr/u32-check
func_module unistr/u8-chr
func_module unistr/u16-chr
func_module unistr/u32-chr
func_module unistr/u8-cmp
func_module unistr/u16-cmp
func_module unistr/u32-cmp
func_module unistr/u8-cmp2
func_module unistr/u16-cmp2
func_module unistr/u32-cmp2
func_module unistr/u8-cpy
func_module unistr/u16-cpy
func_module unistr/u32-cpy
func_module unistr/u8-cpy-alloc
func_module unistr/u16-cpy-alloc
func_module unistr/u32-cpy-alloc
func_module unistr/u8-endswith
func_module unistr/u16-endswith
func_module unistr/u32-endswith
func_module unistr/u8-mblen
func_module unistr/u16-mblen
func_module unistr/u32-mblen
func_module unistr/u8-mbsnlen
func_module unistr/u16-mbsnlen
func_module unistr/u32-mbsnlen
func_module unistr/u8-mbtouc-unsafe
func_module unistr/u16-mbtouc-unsafe
func_module unistr/u32-mbtouc-unsafe
func_module unistr/u8-mbtouc
func_module unistr/u16-mbtouc
func_module unistr/u32-mbtouc
func_module unistr/u8-mbtoucr
func_module unistr/u16-mbtoucr
func_module unistr/u32-mbtoucr
func_module unistr/u8-move
func_module unistr/u16-move
func_module unistr/u32-move
func_module unistr/u8-next
func_module unistr/u16-next
func_module unistr/u32-next
func_module unistr/u8-prev
func_module unistr/u16-prev
func_module unistr/u32-prev
func_module unistr/u8-set
func_module unistr/u16-set
func_module unistr/u32-set
func_module unistr/u8-startswith
func_module unistr/u16-startswith
func_module unistr/u32-startswith
func_module unistr/u8-stpcpy
func_module unistr/u16-stpcpy
func_module unistr/u32-stpcpy
func_module unistr/u8-stpncpy
func_module unistr/u16-stpncpy
func_module unistr/u32-stpncpy
func_module unistr/u8-strcat
func_module unistr/u16-strcat
func_module unistr/u32-strcat
func_module unistr/u8-strchr
func_module unistr/u16-strchr
func_module unistr/u32-strchr
func_module unistr/u8-strcmp
func_module unistr/u16-strcmp
func_module unistr/u32-strcmp
func_module unistr/u8-strcoll
func_module unistr/u16-strcoll
func_module unistr/u32-strcoll
func_module unistr/u8-strcpy
func_module unistr/u16-strcpy
func_module unistr/u32-strcpy
func_module unistr/u8-strcspn
func_module unistr/u16-strcspn
func_module unistr/u32-strcspn
func_module unistr/u8-strdup
func_module unistr/u16-strdup
func_module unistr/u32-strdup
func_module unistr/u8-strlen
func_module unistr/u16-strlen
func_module unistr/u32-strlen
func_module unistr/u8-strmblen
func_module unistr/u16-strmblen
func_module unistr/u32-strmblen
func_module unistr/u8-strmbtouc
func_module unistr/u16-strmbtouc
func_module unistr/u32-strmbtouc
func_module unistr/u8-strncat
func_module unistr/u16-strncat
func_module unistr/u32-strncat
func_module unistr/u8-strncmp
func_module unistr/u16-strncmp
func_module unistr/u32-strncmp
func_module unistr/u8-strncpy
func_module unistr/u16-strncpy
func_module unistr/u32-strncpy
func_module unistr/u8-strnlen
func_module unistr/u16-strnlen
func_module unistr/u32-strnlen
func_module unistr/u8-strpbrk
func_module unistr/u16-strpbrk
func_module unistr/u32-strpbrk
func_module unistr/u8-strrchr
func_module unistr/u16-strrchr
func_module unistr/u32-strrchr
func_module unistr/u8-strspn
func_module unistr/u16-strspn
func_module unistr/u32-strspn
func_module unistr/u8-strstr
func_module unistr/u16-strstr
func_module unistr/u32-strstr
func_module unistr/u8-strtok
func_module unistr/u16-strtok
func_module unistr/u32-strtok
func_module unistr/u8-uctomb
func_module unistr/u16-uctomb
func_module unistr/u32-uctomb
func_module uniconv/base
func_module uniconv/u8-conv-from-enc
func_module uniconv/u16-conv-from-enc
func_module uniconv/u32-conv-from-enc
func_module uniconv/u8-conv-to-enc
func_module uniconv/u16-conv-to-enc
func_module uniconv/u32-conv-to-enc
func_module uniconv/u8-strconv-from-enc
func_module uniconv/u16-strconv-from-enc
func_module uniconv/u32-strconv-from-enc
func_module uniconv/u8-strconv-to-enc
func_module uniconv/u16-strconv-to-enc
func_module uniconv/u32-strconv-to-enc
func_module uniconv/u8-strconv-from-locale
func_module uniconv/u16-strconv-from-locale
func_module uniconv/u32-strconv-from-locale
func_module uniconv/u8-strconv-to-locale
func_module uniconv/u16-strconv-to-locale
func_module uniconv/u32-strconv-to-locale
func_module unistdio/base
func_module unistdio/u-printf-args
func_module unistdio/ulc-asnprintf
func_module unistdio/ulc-asprintf
func_module unistdio/ulc-fprintf
func_module unistdio/ulc-printf-parse
func_module unistdio/ulc-snprintf
func_module unistdio/ulc-sprintf
func_module unistdio/ulc-vasnprintf
func_module unistdio/ulc-vasprintf
func_module unistdio/ulc-vfprintf
func_module unistdio/ulc-vsnprintf
func_module unistdio/ulc-vsprintf
func_module unistdio/u8-asnprintf
func_module unistdio/u8-asprintf
func_module unistdio/u8-printf-parse
func_module unistdio/u8-snprintf
func_module unistdio/u8-sprintf
func_module unistdio/u8-vasnprintf
func_module unistdio/u8-vasprintf
func_module unistdio/u8-vsnprintf
func_module unistdio/u8-vsprintf
func_module unistdio/u8-u8-asnprintf
func_module unistdio/u8-u8-asprintf
func_module unistdio/u8-u8-snprintf
func_module unistdio/u8-u8-sprintf
func_module unistdio/u8-u8-vasnprintf
func_module unistdio/u8-u8-vasprintf
func_module unistdio/u8-u8-vsnprintf
func_module unistdio/u8-u8-vsprintf
func_module unistdio/u16-asnprintf
func_module unistdio/u16-asprintf
func_module unistdio/u16-printf-parse
func_module unistdio/u16-snprintf
func_module unistdio/u16-sprintf
func_module unistdio/u16-vasnprintf
func_module unistdio/u16-vasprintf
func_module unistdio/u16-vsnprintf
func_module unistdio/u16-vsprintf
func_module unistdio/u16-u16-asnprintf
func_module unistdio/u16-u16-asprintf
func_module unistdio/u16-u16-snprintf
func_module unistdio/u16-u16-sprintf
func_module unistdio/u16-u16-vasnprintf
func_module unistdio/u16-u16-vasprintf
func_module unistdio/u16-u16-vsnprintf
func_module unistdio/u16-u16-vsprintf
func_module unistdio/u32-asnprintf
func_module unistdio/u32-asprintf
func_module unistdio/u32-printf-parse
func_module unistdio/u32-snprintf
func_module unistdio/u32-sprintf
func_module unistdio/u32-vasnprintf
func_module unistdio/u32-vasprintf
func_module unistdio/u32-vsnprintf
func_module unistdio/u32-vsprintf
func_module unistdio/u32-u32-asnprintf
func_module unistdio/u32-u32-asprintf
func_module unistdio/u32-u32-snprintf
func_module unistdio/u32-u32-sprintf
func_module unistdio/u32-u32-vasnprintf
func_module unistdio/u32-u32-vasprintf
func_module unistdio/u32-u32-vsnprintf
func_module unistdio/u32-u32-vsprintf
func_module uniname/base
func_module uniname/uniname
func_module unictype/base
func_module unictype/bidicategory-byname
func_module unictype/bidicategory-name
func_module unictype/bidicategory-of
func_module unictype/bidicategory-test
func_module unictype/bidicategory-all
func_module unictype/block-list
func_module unictype/block-of
func_module unictype/block-test
func_module unictype/block-all
func_module unictype/category-C
func_module unictype/category-Cc
func_module unictype/category-Cf
func_module unictype/category-Cn
func_module unictype/category-Co
func_module unictype/category-Cs
func_module unictype/category-L
func_module unictype/category-Ll
func_module unictype/category-Lm
func_module unictype/category-Lo
func_module unictype/category-Lt
func_module unictype/category-Lu
func_module unictype/category-M
func_module unictype/category-Mc
func_module unictype/category-Me
func_module unictype/category-Mn
func_module unictype/category-N
func_module unictype/category-Nd
func_module unictype/category-Nl
func_module unictype/category-No
func_module unictype/category-P
func_module unictype/category-Pc
func_module unictype/category-Pd
func_module unictype/category-Pe
func_module unictype/category-Pf
func_module unictype/category-Pi
func_module unictype/category-Po
func_module unictype/category-Ps
func_module unictype/category-S
func_module unictype/category-Sc
func_module unictype/category-Sk
func_module unictype/category-Sm
func_module unictype/category-So
func_module unictype/category-Z
func_module unictype/category-Zl
func_module unictype/category-Zp
func_module unictype/category-Zs
func_module unictype/category-and
func_module unictype/category-and-not
func_module unictype/category-byname
func_module unictype/category-name
func_module unictype/category-none
func_module unictype/category-of
func_module unictype/category-or
func_module unictype/category-test
func_module unictype/category-test-withtable
func_module unictype/category-all
func_module unictype/combining-class
func_module unictype/ctype-alnum
func_module unictype/ctype-alpha
func_module unictype/ctype-blank
func_module unictype/ctype-cntrl
func_module unictype/ctype-digit
func_module unictype/ctype-graph
func_module unictype/ctype-lower
func_module unictype/ctype-print
func_module unictype/ctype-punct
func_module unictype/ctype-space
func_module unictype/ctype-upper
func_module unictype/ctype-xdigit
func_module unictype/decimal-digit
func_module unictype/digit
func_module unictype/mirror
func_module unictype/numeric
func_module unictype/property-alphabetic
func_module unictype/property-ascii-hex-digit
func_module unictype/property-bidi-arabic-digit
func_module unictype/property-bidi-arabic-right-to-left
func_module unictype/property-bidi-block-separator
func_module unictype/property-bidi-boundary-neutral
func_module unictype/property-bidi-common-separator
func_module unictype/property-bidi-control
func_module unictype/property-bidi-embedding-or-override
func_module unictype/property-bidi-eur-num-separator
func_module unictype/property-bidi-eur-num-terminator
func_module unictype/property-bidi-european-digit
func_module unictype/property-bidi-hebrew-right-to-left
func_module unictype/property-bidi-left-to-right
func_module unictype/property-bidi-non-spacing-mark
func_module unictype/property-bidi-other-neutral
func_module unictype/property-bidi-pdf
func_module unictype/property-bidi-segment-separator
func_module unictype/property-bidi-whitespace
func_module unictype/property-byname
func_module unictype/property-case-ignorable
func_module unictype/property-cased
func_module unictype/property-changes-when-casefolded
func_module unictype/property-changes-when-casemapped
func_module unictype/property-changes-when-lowercased
func_module unictype/property-changes-when-titlecased
func_module unictype/property-changes-when-uppercased
func_module unictype/property-combining
func_module unictype/property-composite
func_module unictype/property-currency-symbol
func_module unictype/property-dash
func_module unictype/property-decimal-digit
func_module unictype/property-default-ignorable-code-point
func_module unictype/property-deprecated
func_module unictype/property-diacritic
func_module unictype/property-extender
func_module unictype/property-format-control
func_module unictype/property-grapheme-base
func_module unictype/property-grapheme-extend
func_module unictype/property-grapheme-link
func_module unictype/property-hex-digit
func_module unictype/property-hyphen
func_module unictype/property-id-continue
func_module unictype/property-id-start
func_module unictype/property-ideographic
func_module unictype/property-ids-binary-operator
func_module unictype/property-ids-trinary-operator
func_module unictype/property-ignorable-control
func_module unictype/property-iso-control
func_module unictype/property-join-control
func_module unictype/property-left-of-pair
func_module unictype/property-line-separator
func_module unictype/property-logical-order-exception
func_module unictype/property-lowercase
func_module unictype/property-math
func_module unictype/property-non-break
func_module unictype/property-not-a-character
func_module unictype/property-numeric
func_module unictype/property-other-alphabetic
func_module unictype/property-other-default-ignorable-code-point
func_module unictype/property-other-grapheme-extend
func_module unictype/property-other-id-continue
func_module unictype/property-other-id-start
func_module unictype/property-other-lowercase
func_module unictype/property-other-math
func_module unictype/property-other-uppercase
func_module unictype/property-paired-punctuation
func_module unictype/property-paragraph-separator
func_module unictype/property-pattern-syntax
func_module unictype/property-pattern-white-space
func_module unictype/property-private-use
func_module unictype/property-punctuation
func_module unictype/property-quotation-mark
func_module unictype/property-radical
func_module unictype/property-sentence-terminal
func_module unictype/property-soft-dotted
func_module unictype/property-space
func_module unictype/property-terminal-punctuation
func_module unictype/property-test
func_module unictype/property-titlecase
func_module unictype/property-unassigned-code-value
func_module unictype/property-unified-ideograph
func_module unictype/property-uppercase
func_module unictype/property-variation-selector
func_module unictype/property-white-space
func_module unictype/property-xid-continue
func_module unictype/property-xid-start
func_module unictype/property-zero-width
func_module unictype/property-all
func_module unictype/scripts
func_module unictype/scripts-all
func_module unictype/syntax-c-ident
func_module unictype/syntax-c-whitespace
func_module unictype/syntax-java-ident
func_module unictype/syntax-java-whitespace
func_module uniwidth/base
func_module uniwidth/u8-strwidth
func_module uniwidth/u8-width
func_module uniwidth/u16-strwidth
func_module uniwidth/u16-width
func_module uniwidth/u32-strwidth
func_module uniwidth/u32-width
func_module uniwidth/width
func_module uniwbrk/base
func_module uniwbrk/ulc-wordbreaks
func_module uniwbrk/u8-wordbreaks
func_module uniwbrk/u16-wordbreaks
func_module uniwbrk/u32-wordbreaks
func_module uniwbrk/wordbreak-property
func_module unilbrk/base
func_module unilbrk/tables
func_module unilbrk/ulc-common
func_module unilbrk/u8-possible-linebreaks
func_module unilbrk/u16-possible-linebreaks
func_module unilbrk/u32-possible-linebreaks
func_module unilbrk/ulc-possible-linebreaks
func_module unilbrk/u8-width-linebreaks
func_module unilbrk/u16-width-linebreaks
func_module unilbrk/u32-width-linebreaks
func_module unilbrk/ulc-width-linebreaks
func_module uninorm/base
func_module uninorm/canonical-decomposition
func_module uninorm/composition
func_module uninorm/decomposing-form
func_module uninorm/decomposition
func_module uninorm/filter
func_module uninorm/nfc
func_module uninorm/nfd
func_module uninorm/nfkc
func_module uninorm/nfkd
func_module uninorm/u8-normalize
func_module uninorm/u16-normalize
func_module uninorm/u32-normalize
func_module uninorm/u8-normcmp
func_module uninorm/u16-normcmp
func_module uninorm/u32-normcmp
func_module uninorm/u8-normcoll
func_module uninorm/u16-normcoll
func_module uninorm/u32-normcoll
func_module uninorm/u8-normxfrm
func_module uninorm/u16-normxfrm
func_module uninorm/u32-normxfrm
func_module unicase/base
func_module unicase/empty-prefix-context
func_module unicase/empty-suffix-context
func_module unicase/locale-language
func_module unicase/tolower
func_module unicase/totitle
func_module unicase/toupper
func_module unicase/ulc-casecmp
func_module unicase/ulc-casecoll
func_module unicase/ulc-casexfrm
func_module unicase/u8-casecmp
func_module unicase/u16-casecmp
func_module unicase/u32-casecmp
func_module unicase/u8-casecoll
func_module unicase/u16-casecoll
func_module unicase/u32-casecoll
func_module unicase/u8-casefold
func_module unicase/u16-casefold
func_module unicase/u32-casefold
func_module unicase/u8-casexfrm
func_module unicase/u16-casexfrm
func_module unicase/u32-casexfrm
func_module unicase/u8-ct-casefold
func_module unicase/u16-ct-casefold
func_module unicase/u32-ct-casefold
func_module unicase/u8-ct-tolower
func_module unicase/u16-ct-tolower
func_module unicase/u32-ct-tolower
func_module unicase/u8-ct-totitle
func_module unicase/u16-ct-totitle
func_module unicase/u32-ct-totitle
func_module unicase/u8-ct-toupper
func_module unicase/u16-ct-toupper
func_module unicase/u32-ct-toupper
func_module unicase/u8-is-cased
func_module unicase/u16-is-cased
func_module unicase/u32-is-cased
func_module unicase/u8-is-casefolded
func_module unicase/u16-is-casefolded
func_module unicase/u32-is-casefolded
func_module unicase/u8-is-lowercase
func_module unicase/u16-is-lowercase
func_module unicase/u32-is-lowercase
func_module unicase/u8-is-titlecase
func_module unicase/u16-is-titlecase
func_module unicase/u32-is-titlecase
func_module unicase/u8-is-uppercase
func_module unicase/u16-is-uppercase
func_module unicase/u8-prefix-context
func_module unicase/u16-prefix-context
func_module unicase/u32-prefix-context
func_module unicase/u8-suffix-context
func_module unicase/u16-suffix-context
func_module unicase/u32-suffix-context
func_module unicase/u8-tolower
func_module unicase/u16-tolower
func_module unicase/u32-tolower
func_module unicase/u8-totitle
func_module unicase/u16-totitle
func_module unicase/u32-totitle
func_module unicase/u8-toupper
func_module unicase/u16-toupper
func_module unicase/u32-toupper
func_end_table
element="Executing programs"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_exec
func_wrap H3
func_echo "$element"
func_begin_table
func_module cloexec
func_module findprog
func_module findprog-lgpl
func_module wait-process
func_module execute
func_module spawn-pipe
func_module pipe-filter-gi
func_module pipe-filter-ii
func_module sh-quote
func_end_table
element="Java"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_java
func_wrap H3
func_echo "$element"
func_begin_table
func_module classpath
func_module javacomp-script
func_module javacomp
func_module javaexec-script
func_module javaexec
func_module javaversion
#func_module gcj
func_end_table
element="C#"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_csharp
func_wrap H3
func_echo "$element"
func_begin_table
func_module csharpcomp-script
func_module csharpcomp
func_module csharpexec-script
func_module csharpexec
func_end_table
element="Misc"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap posix_ext_misc
func_wrap H3
func_echo "$element"
func_begin_table
func_module argp
func_module argp-version-etc
func_module argz
func_module bitrotate
func_module byteswap
func_module exitfail
func_module error
func_module extensions
func_module forkpty
func_module getdomainname
func_module xgetdomainname
func_module getloadavg
func_module getpagesize
func_module getusershell
func_module lib-symbol-visibility
func_module login_tty
func_module nproc
func_module openpty
func_module parse-duration
func_module physmem
func_module posixver
func_module progname
func_module ptsname_r
func_module pty
func_module quotearg
func_module quote
func_module readutmp
func_module random_r
func_module selinux-h
func_module selinux-at
func_module sysexits
func_module u64
func_module verror
func_end_table
element="Support for building libraries and executables"
func_section_wrap build_lib
func_wrap H2
func_echo "$element"
func_begin_table
func_module absolute-header
func_module snippet/arg-nonnull
func_module config-h
func_module configmake
func_module dummy
func_module gperf
func_module havelib
func_module include_next
func_module ldd
func_module lib-ignore
func_module lib-msvc-compat
func_module lib-symbol-versions
func_module snippet/link-warning
func_module manywarnings
func_module no-c++
func_module relocatable-lib
func_module relocatable-lib-lgpl
func_module relocatable-prog
func_module relocatable-prog-wrapper
func_module relocatable-script
func_module snippet/warn-on-use
func_module warnings
func_end_table
element="Support for building documentation"
func_section_wrap build_doc
func_wrap H2
func_echo "$element"
func_begin_table
func_module agpl-3.0
func_module fdl
func_module fdl-1.3
func_module gendocs
func_module gpl-2.0
func_module gpl-3.0
func_module lgpl-2.1
func_module lgpl-3.0
func_module pmccabe2html
func_module regexprops-generic
func_end_table
element="Support for maintaining and releasing projects"
func_section_wrap maintain
func_wrap H2
func_echo "$element"
func_begin_table
func_module announce-gen
func_module autobuild
func_module do-release-commit-and-tag
func_module git-version-gen
func_module gitlog-to-changelog
func_module gnu-web-doc-update
func_module gnumakefile
func_module gnupload
func_module maintainer-makefile
func_module mktempd
func_module non-recursive-gnulib-prefix-hack
func_module readme-release
func_module test-framework-sh
func_module update-copyright
func_module useless-if-before-free
func_module vc-list-files
func_end_table
element="Misc"
func_section_wrap misc
func_wrap H2
func_echo "$element"
func_begin_table
func_module gnu-make
func_module host-os
func_module nocrash
func_module perl
func_module posix-shell
func_module uptime
func_end_table
}
func_tmpdir
trap 'exit_status=$?
if test "$signal" != 0; then
echo "caught signal $signal" >&2
fi
rm -rf "$tmp"
exit $exit_status' 0
for signal in 1 2 3 13 15; do
trap '{ signal='$signal'; func_exit 1; }' $signal
done
signal=0
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">'
func_begin HTML
func_begin HEAD
element="Gnulib Module List"
func_wrap TITLE
func_echo "$element"
modules=`gnulib-tool --list`
modules=`for m in $modules; do printf "%s, " $m; done | sed -e 's/, $//'`
func_echo '<META NAME="keywords" CONTENT="'"${modules}"'">'
func_end HEAD
func_begin BODY
element="Gnulib Module List"
func_wrap H1
func_echo "$element"
func_echo 'This is a list of the modules which make up gnulib, with dependencies.'
in_toc=yes
func_all_modules
in_toc=
func_all_modules
gnulib-tool --list > "$tmp/all-modules"
missed_modules=`for module in $seen_modules; do echo $module; done \
| LC_ALL=C sort -u \
| LC_ALL=C join -v 2 - "$tmp/all-modules"`
if test -n "$missed_modules"; then
element="Unclassified modules - please update MODULES.html.sh"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_wrap H2
func_echo "$element"
func_begin_table
for module in $missed_modules; do
func_module $module
done
func_end_table
fi
{ find lib -type f -print; find m4 -type f -print; } | LC_ALL=C sort | sed -e '/\/\./d' -e /CVS/d -e /README/d -e /ChangeLog/d -e /Makefile/d -e /TODO/d -e '/tags$/d' -e '/TAGS$/d' -e '/~$/d' > "$tmp/all-files"
missed_files=`for file in $seen_files; do echo $file; done \
| LC_ALL=C sort -u \
| LC_ALL=C join -v 2 - "$tmp/all-files"`
if test -n "$missed_files"; then
element="Lone files - please create new modules containing them"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_wrap H2
func_echo "$element"
func_echo '<PRE>'
echo "$missed_files" | sed -e 's,^\(.*\)$,<A HREF="'"$repo_url_prefix"'\1'"$repo_url_suffix_repl"'">\1</A>,'
echo '</PRE>'
fi
element="Future developments"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_wrap H2
func_echo "$element"
func_echo 'Ideally a module could consist of:'
func_begin UL
func_echo '<LI>A header file: lib/<VAR>module</VAR>.h'
func_echo '<LI>One or more implementation files: lib/<VAR>module</VAR>.c et al.'
func_echo '<LI>One or more autoconf macro files: m4/<VAR>module</VAR>.m4 et al.'
func_echo '<LI>A configure.ac fragment, Makefile.am fragment, dependency list: modules/<VAR>module</VAR>'
func_echo '<LI>A testsuite: source files in tests/ and metainformation (a configure.ac fragment, Makefile.am fragment, dependency list) in modules/<VAR>module</VAR>-tests'
func_echo '<LI>Some documentation'
func_echo '<LI>A POT file and some PO files'
func_end UL
func_echo '<HR>'
func_echo 'Generated from <CODE>MODULES.html.sh</CODE> on '`LC_ALL=C date +"%e %B %Y"`.
func_end BODY
func_end HTML
rm -rf "$tmp"
# Undo the effect of the previous 'trap' command.
trap '' 0
trap 'func_exit $?' 1 2 3 13 15
exit 0
# Local Variables:
# indent-tabs-mode: nil
# whitespace-check-buffer-indent: nil
# End:
|
novel/fbsd-libvirt
|
.gnulib/MODULES.html.sh
|
Shell
|
lgpl-2.1
| 80,045 |
#!/bin/bash
#
# EatWhite
#
# Function: EatWhite -- Removes all leading/trailing whitespace characters
# Params: $* - The string
# Output: String (a whitespace-trimmed version of the input)
function EatWhite
{
if [ "$1" = "" ]; then
Error "EatWhite: No input provided."
return 1
fi
echo "$*" | sed 's/^\s*//' | sed 's/\s*^//'
return 0
}
# vim: tabstop=4 shiftwidth=4
|
nicrohobak/BashLib
|
Functions/String/EatWhite.sh
|
Shell
|
lgpl-3.0
| 382 |
#!/bin/bash
# Capture the name of the script
PROGNAME=${0##*/}
# Set the version number
PROGVERSION=1.1
# --------------------
# Help and Information
# --------------------
# When requested show information about script
if [[ "$1" = '-h' ]] || [[ "$1" = '--help' ]]; then
# Display the following block
cat << end-of-messageblock
$PROGNAME version $PROGVERSION
Show or hide items in the application section of the main menu
Usage:
$PROGNAME [options]
Note: must be sourced from menu_manager.sh
Options:
-h, --help Show this output
Summary:
Refer to menu_manager.sh
Configuration:
Refer to menu_manager.sh
Environment:
Refer to menu_manager.sh
Requires:
Refer to menu_manager.sh
end-of-messageblock
exit 0
fi
# ---------------------
# Inherit configuration
# ---------------------
# When this script is not being sourced
if [[ "$0" = "$BASH_SOURCE" ]]; then
# Title in the titlebar of YAD window
WINDOW_TITLE="Menu Manager"
# Location of icons used in this script
ICONS=/usr/share/pixmaps
# Message to display in error window
ERROR_MSG_1="\n This script must be started from \
\n menu_manager.sh \
\n \
\n Exiting..."
# Display an error message
yad \
--button="OK:1" \
--title="$WINDOW_TITLE" \
--image="$ICONS/cross_red.png" \
--text="$ERROR_MSG_1"
# Exit the script
clear
exit 1
fi
# --------------------------------------------------------------------
# Repeat all stages continually, or until the user instructs otherwise
# --------------------------------------------------------------------
# Create an infinite loop
while true
do
# -----------------------
# Select operational mode
# -----------------------
# Question and guidance to display
MESSAGE="\n Which one? \
\n \
\n 1. Hide items from the $MENU_SECTION menu \
\n \
\n 2. Show items in the $MENU_SECTION menu \
\n \
\n \
\n"
# Display the choices to obtain operational mode
yad \
--center \
--width=0 \
--height=0 \
--buttons-layout=center \
--button="Hide":0 \
--button="Show":3 \
--button="gtk-cancel":1 \
--title="$WINDOW_TITLE" \
--image="$ICONS/questionmark_yellow.png" \
--text="$MESSAGE"
# Capture which button was selected
EXIT_STATUS=$?
# When cancel button was selected or window closed
exit-upon-yad-cancel-button-or-window-close-performing-optional-command "quit-honouring-pending-menu-update"
# Capture which action was requested
ACTION=$EXIT_STATUS
# Assign mode and NoDisplay values corresponding to the selected mode
case $ACTION in
0) # Hide was selected
MODE=hide
SELECTED_NODISPLAY_VALUE=True
;;
3) # Show was selected
MODE=show
SELECTED_NODISPLAY_VALUE=False
;;
*) # Otherwise
exit 1
;;
esac
# ----------------------------------------
# Select the .desktop files to be modified
# ----------------------------------------
# Create a list of .desktop candidates
get-list-of-.desktop-candidates $MENU_FILES_GENERAL $MENU_FILES_ANTIX
# Question and guidance to display
MESSAGE="\n Select one or more items to $MODE \
\n"
# Titles to display in the list column headers
COLUMN_HEADER_1="Path"
COLUMN_HEADER_2="Menu Item"
COLUMN_HEADER_3="Current Status"
# Items to display in the list one item per column in each row
LIST_ITEMS=( "${FILE_CANDIDATES_SORTED[@]}" )
# Ensure variable to be used is empty
SELECTED_MENU_ENTRIES=
# Re-show the following window until it is cancelled or a selection is made
while [[ "$SELECTED_MENU_ENTRIES" = "" ]]
do
# Display the list of menu items, with path column hidden from view
SELECTED_MENU_ENTRIES="$(yad \
--maximized \
--list \
--no-click \
--column "$COLUMN_HEADER_1":HD \
--column "$COLUMN_HEADER_2":TXT \
--column "$COLUMN_HEADER_3":TXT \
"${LIST_ITEMS[@]}" \
--print-column=1 \
--multiple \
--separator=" " \
--buttons-layout=center \
--button="gtk-ok":0 \
--button="gtk-cancel":1 \
--title="$WINDOW_TITLE" \
--image="$ICONS/info_blue.png" \
--text="$MESSAGE" \
)"
# Capture which button was selected
EXIT_STATUS=$?
# When cancel button was selected or window closed
exit-upon-yad-cancel-button-or-window-close-performing-optional-command "quit-honouring-pending-menu-update"
done
# Set a marker that a menu update is to be performed
MENU_REFRESH_PENDING_APPLICATIONS=Y
# Create an array holding the full file path of each individual selected menu entry
SELECTED_FILES=( $SELECTED_MENU_ENTRIES )
# ----------------------------------
# Modify the selected .desktop files
# ----------------------------------
# Step through the list of selected .desktop files, handle each in turn
for FILE in "${SELECTED_FILES[@]}"
do
# Capture the first occurrence of a NoDisplay line
CURRENT_NODISPLAY_ENTRY=$(get-1st-line-that-contains "NoDisplay=" "$FILE")
# Capture the current NoDisplay= value
CURRENT_NODISPLAY_VALUE=$(get-value-of-field "2" "=" "$CURRENT_NODISPLAY_ENTRY")
# When the the file does not contain a NoDisplay entry line
if [[ "$CURRENT_NODISPLAY_ENTRY" = "" ]]; then
# Append a NoDisplay entry with the selected NoDisplay value on the line following the first occurrence of Exec=
sed --in-place --expression="/Exec=/{a\NoDisplay=$SELECTED_NODISPLAY_VALUE" --expression=':a;$q;n;ba;'} $FILE
# Reset the current NoDisplay value to match the value appended to the file
CURRENT_NODISPLAY_VALUE=$SELECTED_NODISPLAY_VALUE
fi
# When the the current NoDisplay value does not match the selected NoDisplay value
if [[ "$CURRENT_NODISPLAY_VALUE" != "$SELECTED_NODISPLAY_VALUE" ]]; then
# Replace the current NoDisplay line in the file with one containing the selected value
sed --in-place --expression="s/$CURRENT_NODISPLAY_ENTRY/NoDisplay=$SELECTED_NODISPLAY_VALUE/" $FILE
fi
done
# ---------------------------------------------------
# Select refresh the menu or repeat another iteration
# ---------------------------------------------------
# Question and guidance to display
MESSAGE="\n Which one? \
\n \
\n 1. Refresh menu \
\n \
\n 2. Make another change before refreshing menu \
\n \
\n \
\n"
# Display the choices to obtain whether to refresh menu or make another change
yad \
--center \
--width=0 \
--height=0 \
--buttons-layout=center \
--button="Refresh":0 \
--button="Another":3 \
--title="$WINDOW_TITLE" \
--image="$ICONS/questionmark_yellow.png" \
--text="$MESSAGE"
# Capture which button was selected
EXIT_STATUS=$?
# When the user chose to not make another change
if [[ $EXIT_STATUS -ne 3 ]]; then
# Refresh the menu
break 1
fi
done
|
antiX-Linux/menu-manager-antix
|
bin/menu_manager_applications.sh
|
Shell
|
lgpl-3.0
| 8,467 |
#PBS -S /bin/bash
#PBS -N mnakao_job
#PBS -A XMPTCA
#PBS -q tcaq
#PBS -l select=64:ncpus=20:mpiprocs=4:ompthreads=5
#PBS -l walltime=00:03:00
#PBS -j oe
. /opt/Modules/default/init/bash
#---------------
# select=NODES:ncpus=CORES:mpiprocs=PROCS:ompthreads=THREADS:mem=MEMORY
# NODES : num of nodes
# CORES : num of cores per node
# PROCS : num of procs per node
# THREADS : num of threads per process
#----------------
module purge
module load intelmpi mkl intel cuda/6.5.14
cd $PBS_O_WORKDIR
export KMP_AFFINITY=granularity=fine,compact
mpirun -np 256 -perhost 4 ./STREAM 357913942 0.68
|
omni-compiler/omni-compiler
|
samples/XACC/STREAM/job_scripts/HA-PACS/run_intel_tca_64nodes_256GPUs.sh
|
Shell
|
lgpl-3.0
| 594 |
#!/bin/bash
#
# Author : Rishi Gupta
#
# This file is part of 'serial communication manager' library.
#
# The 'serial communication manager' is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# The 'serial communication manager' 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with serial communication manager. If not, see <http://www.gnu.org/licenses/>.
#################################################################################################
# Generates JNI-C header file for Silicon labs CP210XRuntime library SerialComCP210xRuntimeJNIBridge java class.
#set system specific absolute paths
PROJECT_ROOT_DIR_PATH="/home/r/ws-host-uart/serial-communication-manager"
JDK_INCLUDE_DIR="/home/r/packages/jdk1.7.0_75/include"
JNI_HEADER_FILE_PATH="/home/r/packages/jdk1.7.0_75/include/jni.h"
# Generating header file.
set -e
javah -jni -d $PROJECT_ROOT_DIR_PATH/vendor-libs/silicon-labs/cp210xruntime -classpath $PROJECT_ROOT_DIR_PATH/com.embeddedunveiled.serial/src com.embeddedunveiled.serial.internal.SerialComCP210xRuntimeJNIBridge
echo "javah : Silicon labs CP210XRuntime library SerialComCP210xRuntimeJNIBridge done !"
|
Tecsisa/serial-communication-manager
|
build_scripts/javah-slabs-cp210xruntime-header-gen.sh
|
Shell
|
lgpl-3.0
| 1,595 |
# base
# Use base tools for a bash script
# cross platform bash script start
#!/usr/bin/env bash
# Fail script and exit if any command exit's non-zero
set -e
# Add a DEBUG=* to the env and see all commands run. Useful for debugging
# DEBUG ./base
[[ -z $DEBUG ]] || set -x
sudo service network-manager stop
sudo service networking stop
sudo dhclient -r wlp2s0
sudo dhclient wlp2s0
sudo service networking start
sudo service network-manager start
|
adamryman/dotfiles
|
scripts/dhcp-bounce.sh
|
Shell
|
unlicense
| 450 |
#!/usr/bin/env bash
# This is where VMware stores templates/scripts for the master branch of this repository
S3_BUCKET=vmware-aws-quickstart-test
S3_PREFIX=vmware/kubernetes/master/
# Where to place your cluster
REGION=us-west-2
AZ=us-west-2b
# What to name your CloudFormation stack
STACK=VMware-Kubernetes
# What SSH key you want to allow access to the cluster (must be created ahead of time in your AWS EC2 account)
KEYNAME=mykey
# What IP addresses should be able to connect over SSH and over the Kubernetes API
INGRESS=0.0.0.0/0
aws cloudformation create-stack \
--region $REGION \
--stack-name $STACK \
--template-url "https://${S3_BUCKET}.s3.amazonaws.com/${S3_PREFIX}templates/kubernetes-cluster-with-new-vpc.template" \
--parameters \
ParameterKey=AvailabilityZone,ParameterValue=$AZ \
ParameterKey=KeyName,ParameterValue=$KEYNAME \
ParameterKey=AdminIngressLocation,ParameterValue=$INGRESS \
ParameterKey=QSS3BucketName,ParameterValue=${S3_BUCKET} \
ParameterKey=QSS3KeyPrefix,ParameterValue=${S3_PREFIX} \
--capabilities=CAPABILITY_IAM
|
heptio/aws-quickstart
|
bin/boot-master-branch.sh
|
Shell
|
apache-2.0
| 1,083 |
#!/usr/bin/env bash
sudo docker cp ../generated/skysail.app.osgi.jar skysail-server:/home/skysail/products/osgi/plugins/skysail.app.osgi.jar
|
evandor/skysail-core
|
skysail.app.osgi/deploy/deploy2skysail-server.sh
|
Shell
|
apache-2.0
| 142 |
python sentiment_analysis_cnn.py --gpu 0 --batch_size 50 --epochs 200 --dropout 0.5 --model_mode rand --data_name SST-1
|
dmlc/web-data
|
gluonnlp/logs/sentiment/SST-1_rand.sh
|
Shell
|
apache-2.0
| 120 |
python example.py
tar -cvf examples.tar *png *html
rm *png *html
mv examples.tar /tmp/
git checkout gh-pages
mv /tmp/examples.tar .
tar -xvf examples.tar
rm *tar
git add *.png *.html
git commit --amend -m "Examples"
|
tkrajina/cartesius
|
bin/create_examples_page.sh
|
Shell
|
apache-2.0
| 216 |
#!/bin/bash
# Author: yeho <lj2007331 AT gmail.com>
# BLOG: https://blog.linuxeye.com
#
# Notes: OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+
#
# Project home page:
# https://oneinstack.com
# https://github.com/lj2007331/oneinstack
Install_tomcat-8() {
cd $oneinstack_dir/src
. /etc/profile
src_url=http://mirrors.linuxeye.com/apache/tomcat/v$tomcat_8_version/apache-tomcat-$tomcat_8_version.tar.gz && Download_src
src_url=http://mirrors.linuxeye.com/apache/tomcat/v$tomcat_8_version/catalina-jmx-remote.jar && Download_src
id -u $run_user >/dev/null 2>&1
[ $? -ne 0 ] && useradd -M -s /bin/bash $run_user || { [ -z "`grep ^$run_user /etc/passwd | grep '/bin/bash'`" ] && usermod -s /bin/bash $run_user; }
tar xzf apache-tomcat-$tomcat_8_version.tar.gz
[ ! -d "$tomcat_install_dir" ] && mkdir -p $tomcat_install_dir
/bin/cp -R apache-tomcat-$tomcat_8_version/* $tomcat_install_dir
rm -rf $tomcat_install_dir/webapps/{docs,examples,host-manager,manager,ROOT/*}
if [ -e "$tomcat_install_dir/conf/server.xml" ];then
/bin/cp catalina-jmx-remote.jar $tomcat_install_dir/lib
cd $tomcat_install_dir/lib
[ ! -d "$tomcat_install_dir/lib/catalina" ] && mkdir $tomcat_install_dir/lib/catalina
cd $tomcat_install_dir/lib/catalina
jar xf ../catalina.jar
sed -i 's@^server.info=.*@server.info=Tomcat@' org/apache/catalina/util/ServerInfo.properties
sed -i 's@^server.number=.*@server.number=8@' org/apache/catalina/util/ServerInfo.properties
sed -i "s@^server.built=.*@server.built=`date`@" org/apache/catalina/util/ServerInfo.properties
jar cf ../catalina.jar ./*
cd ../../bin
rm -rf $tomcat_install_dir/lib/catalina
[ "$OS" == 'CentOS' ] && yum -y install apr apr-devel
[[ $OS =~ ^Ubuntu$|^Debian$ ]] && apt-get -y install libapr1-dev libaprutil1-dev
tar xzf tomcat-native.tar.gz
cd tomcat-native-*-src/jni/native/
rm -rf /usr/local/apr
./configure --with-apr=/usr/bin/apr-1-config
make -j ${THREAD} && make install
if [ -d "/usr/local/apr/lib" ];then
[ $Mem -le 768 ] && Xms_Mem=`expr $Mem / 3` || Xms_Mem=256
cat > $tomcat_install_dir/bin/setenv.sh << EOF
JAVA_OPTS='-Djava.security.egd=file:/dev/./urandom -server -Xms${Xms_Mem}m -Xmx`expr $Mem / 2`m -Dfile.encoding=UTF-8'
CATALINA_OPTS="-Djava.library.path=/usr/local/apr/lib"
# -Djava.rmi.server.hostname=$IPADDR
# -Dcom.sun.management.jmxremote.password.file=\$CATALINA_BASE/conf/jmxremote.password
# -Dcom.sun.management.jmxremote.access.file=\$CATALINA_BASE/conf/jmxremote.access
# -Dcom.sun.management.jmxremote.ssl=false"
EOF
cd ../../../;rm -rf tomcat-native-*
chmod +x $tomcat_install_dir/bin/*.sh
/bin/mv $tomcat_install_dir/conf/server.xml{,_bk}
cd $oneinstack_dir/src
/bin/cp ../config/server.xml $tomcat_install_dir/conf
sed -i "s@/usr/local/tomcat@$tomcat_install_dir@g" $tomcat_install_dir/conf/server.xml
if [ ! -e "$nginx_install_dir/sbin/nginx" -a ! -e "$tengine_install_dir/sbin/nginx" -a ! -e "$apache_install_dir/conf/httpd.conf" ];then
if [ "$OS" == 'CentOS' ];then
if [ -z "`grep -w '8080' /etc/sysconfig/iptables`" ];then
iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
service iptables save
fi
elif [[ $OS =~ ^Ubuntu$|^Debian$ ]];then
if [ -z "`grep -w '8080' /etc/iptables.up.rules`" ];then
iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
iptables-save > /etc/iptables.up.rules
fi
fi
fi
[ ! -d "$tomcat_install_dir/conf/vhost" ] && mkdir $tomcat_install_dir/conf/vhost
cat > $tomcat_install_dir/conf/vhost/localhost.xml << EOF
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="$wwwroot_dir/default" debug="0" reloadable="false" crossContext="true"/>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
</Host>
EOF
# logrotate tomcat catalina.out
cat > /etc/logrotate.d/tomcat << EOF
$tomcat_install_dir/logs/catalina.out {
daily
rotate 5
missingok
dateext
compress
notifempty
copytruncate
}
EOF
[ -z "`grep '<user username="admin" password=' $tomcat_install_dir/conf/tomcat-users.xml`" ] && sed -i "s@^</tomcat-users>@<role rolename=\"admin-gui\"/>\n<role rolename=\"admin-script\"/>\n<role rolename=\"manager-gui\"/>\n<role rolename=\"manager-script\"/>\n<user username=\"admin\" password=\"`cat /dev/urandom | head -1 | md5sum | head -c 10`\" roles=\"admin-gui,admin-script,manager-gui,manager-script\"/>\n</tomcat-users>@" $tomcat_install_dir/conf/tomcat-users.xml
cat > $tomcat_install_dir/conf/jmxremote.access << EOF
monitorRole readonly
controlRole readwrite \
create javax.management.monitor.*,javax.management.timer.* \
unregister
EOF
cat > $tomcat_install_dir/conf/jmxremote.password << EOF
monitorRole `cat /dev/urandom | head -1 | md5sum | head -c 8`
# controlRole R&D
EOF
chown -R $run_user.$run_user $tomcat_install_dir
/bin/cp ../init.d/Tomcat-init /etc/init.d/tomcat
sed -i "s@JAVA_HOME=.*@JAVA_HOME=$JAVA_HOME@" /etc/init.d/tomcat
sed -i "s@^CATALINA_HOME=.*@CATALINA_HOME=$tomcat_install_dir@" /etc/init.d/tomcat
sed -i "s@^TOMCAT_USER=.*@TOMCAT_USER=$run_user@" /etc/init.d/tomcat
[ "$OS" == 'CentOS' ] && { chkconfig --add tomcat;chkconfig tomcat on; }
[[ $OS =~ ^Ubuntu$|^Debian$ ]] && update-rc.d tomcat defaults
echo "${CSUCCESS}Tomcat installed successfully! ${CEND}"
fi
else
rm -rf $tomcat_install_dir
echo "${CFAILURE}Tomcat install failed, Please contact the author! ${CEND}"
kill -9 $$
fi
service tomcat start
cd ..
}
|
batpig61/lnmp
|
include/tomcat-8.sh
|
Shell
|
apache-2.0
| 5,999 |
#!/bin/sh -x
PARAMS=""
if [ -n "$suite" ]
then
PARAMS="$PARAMS -Dsuite=$suite"
fi
if [ -n "$scenario" ]
then
PARAMS="$PARAMS -Dscenario=$scenario"
elif [ -n "$1" ]
then
PARAMS="$PARAMS -Dscenario=$1"
fi
if [ -n "$startScriptLocation" ]
then
PARAMS="$PARAMS -DstartScriptLocation=$startScriptLocation"
fi
if [ -n "$runType" ]
then
PARAMS="$PARAMS -DrunType=$runType"
fi
if [ -n "$duration" ]
then
PARAMS="$PARAMS -Dduration=$duration"
fi
if [ -n "$iterations" ]
then
PARAMS="$PARAMS -Diterations=$iterations"
fi
if [ -n "$expectedRate" ]
then
PARAMS="$PARAMS -DexpectedRate=$expectedRate"
fi
if [ -n "$warmUp" ]
then
PARAMS="$PARAMS -DwarmUp=$warmUp"
fi
if [ -n "$warmUpCount" ]
then
PARAMS="$PARAMS -DwarmUpCount=$warmUpCount"
fi
if [ -n "$warmUpTime" ]
then
PARAMS="$PARAMS -DwarmUpTime=$warmUpTime"
fi
if [ -n "$auditLogging" ]
then
PARAMS="$PARAMS -DauditLogging=$auditLogging"
fi
if [ -n "$threads" ]
then
PARAMS="$PARAMS -Dthreads=$threads"
fi
if [ -n "$reporterType" ]
then
PARAMS="$PARAMS -DreporterType=$reporterType"
fi
if [ -n "$periodicity" ]
then
PARAMS="$PARAMS -Dperiodicity=$periodicity"
fi
if [ -n "$reportDataLocation" ]
then
PARAMS="$PARAMS -DreportDataLocation=$reportDataLocation"
fi
if [ -n "$perfRepo_host" ]
then
PARAMS="$PARAMS -DperfRepo.host=$perfRepo_host"
fi
if [ -n "$perfRepo_urlPath" ]
then
PARAMS="$PARAMS -DperfRepo.urlPath=$perfRepo_urlPath"
fi
if [ -n "$perfRepo_username" ]
then
PARAMS="$PARAMS -DperfRepo.username=$perfRepo_username"
fi
if [ -n "$perfRepo_password" ]
then
PARAMS="$PARAMS -DperfRepo.password=$perfRepo_password"
fi
if [ -n "$jbpm_runtimeManagerStrategy" ]
then
PARAMS="$PARAMS -Djbpm.runtimeManagerStrategy=$jbpm_runtimeManagerStrategy"
fi
if [ -n "$jbpm_persistence" ]
then
PARAMS="$PARAMS -Djbpm.persistence=$jbpm_persistence"
fi
if [ -n "$jbpm_concurrentUsersCount" ]
then
PARAMS="$PARAMS -Djbpm.concurrentUsersCount=$jbpm_concurrentUsersCount"
fi
if [ -n "$jbpm_locking" ]
then
PARAMS="$PARAMS -Djbpm.locking=$jbpm_locking"
fi
if [ -n "$jbpm_ht_eager" ]
then
PARAMS="$PARAMS -Djbpm.ht.eager=$jbpm_ht_eager"
fi
# If we are running only one scenario (so we won't fork run for each scenario as we do when nothing is specified), we want to run also DB cleaning
if [ -n "$scenario" ] || [ -n "$1" ]
then
ACTIVATE_DB_PROFILE="-Dperfdb"
fi
# Provide Nexus location, group and Maven local repository directory to settings.xml
PARAMS="$PARAMS -Dnexus.host=$LOCAL_NEXUS_IP -Dnexus.group=$NEXUS_GROUP -Dlocal.repo.dir=$WORKSPACE/maven-repo"
mvn clean install -s settings.xml $ACTIVATE_DB_PROFILE exec:exec $PARAMS
|
droolsjbpm/kie-benchmarks
|
jbpm-benchmarks/jbpm-performance-tests/run.sh
|
Shell
|
apache-2.0
| 2,641 |
#!/bin/sh
set -e
mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\""
xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
;;
*.xcassets)
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
;;
esac
}
if [[ "$CONFIGURATION" == "Development" ]]; then
install_resource "MASPreferences/MASPreferencesWindow.xib"
fi
if [[ "$CONFIGURATION" == "Deployment" ]]; then
install_resource "MASPreferences/MASPreferencesWindow.xib"
fi
if [[ "$CONFIGURATION" == "StaticAnalyzer" ]]; then
install_resource "MASPreferences/MASPreferencesWindow.xib"
fi
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]]; then
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
then
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
|
aidanamavi/vienna-rss
|
Pods/Target Support Files/Pods-Vienna/Pods-Vienna-resources.sh
|
Shell
|
apache-2.0
| 4,147 |
#!/usr/bin/env bash
##########################################################################
# Version: v0.3.0
# Date: 2021-11-04T10:17:38+00:00
#
# Script to record changelog entries in individual files to get around
# the issue of merge conflicts on the CHANGELOG file when doing PRs.
#
# Credit for this idea goes to
# https://about.gitlab.com/blog/2018/07/03/solving-gitlabs-changelog-conflict-crisis/
#
# Change log entries are stored in files in <repo_root>/unreleased_changes
# This script is used in conjunction with tag_release.sh which adds the
# change entries to the CHANGELOG at release time.
##########################################################################
set -euo pipefail
IS_DEBUG=${IS_DEBUG:-false}
UNRELEASED_DIR_NAME="unreleased_changes"
# File containing the configuration values for this script
TAG_RELEASE_CONFIG_FILENAME='tag_release_config.env'
TAG_RELEASE_SCRIPT_FILENAME='tag_release.sh'
# e.g
# * Fix bug
# Used to look for lines that might be a change entry
ISSUE_LINE_SIMPLE_PREFIX_REGEX="^\* [A-Z]"
# e.g.
# * Issue **#1234** :
# * Issue **gchq/stroom-resources#104** :
# https://regex101.com/r/VcvbFV/1
ISSUE_LINE_NUMBERED_PREFIX_REGEX="^\* (Issue \*\*([a-zA-Z0-9_\-.]+\/[a-zA-Z0-9_\-.]+\#[0-9]+|#[0-9]+)\*\* : )"
# https://regex101.com/r/Pgvckt/1
ISSUE_LINE_TEXT_REGEX="^[A-Z].+\.$"
# Lines starting with a word in the past tense
PAST_TENSE_FIRST_WORD_REGEX='^(Add|Allow|Alter|Attempt|Chang|Copi|Correct|Creat|Disabl|Extend|Fix|Import|Improv|Increas|Inherit|Introduc|Limit|Mark|Migrat|Modifi|Mov|Preferr|Recognis|Reduc|Remov|Renam|Reorder|Replac|Restor|Revert|Stopp|Supersed|Switch|Turn|Updat|Upgrad)ed[^a-z]'
setup_echo_colours() {
# Exit the script on any error
set -e
# shellcheck disable=SC2034
if [ "${MONOCHROME:-false}" = true ]; then
RED=''
GREEN=''
YELLOW=''
BLUE=''
BLUE2=''
DGREY=''
NC='' # No Colour
else
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
BLUE2='\033[1;34m'
DGREY='\e[90m'
NC='\033[0m' # No Colour
fi
}
info() {
echo -e "${GREEN}$*${NC}"
}
warn() {
echo -e "${YELLOW}WARNING${NC}: $*${NC}" >&2
}
error() {
echo -e "${RED}ERROR${NC}: $*${NC}" >&2
}
error_exit() {
error "$@"
exit 1
}
debug_value() {
local name="$1"; shift
local value="$1"; shift
if [ "${IS_DEBUG}" = true ]; then
echo -e "${DGREY}DEBUG ${name}: [${value}]${NC}"
fi
}
debug() {
local str="$1"; shift
if [ "${IS_DEBUG}" = true ]; then
echo -e "${DGREY}DEBUG ${str}${NC}"
fi
}
get_git_issue_from_branch() {
local current_branch
current_branch="$(git rev-parse --abbrev-ref HEAD)"
local git_issue_from_branch
git_issue_from_branch="$( \
echo "${current_branch}" \
| grep \
--only-matching \
--perl-regexp '(?<=^gh-)[1-9][0-9]*' \
)"
if [[ -z "${git_issue_from_branch}" ]]; then
error_exit "Unable to establish GitHub issue number from" \
"branch ${BLUE}${current_branch}${NC}"
fi
echo "${git_issue_from_branch}"
}
validate_git_issue() {
local git_issue="$1"; shift
debug "Validating [${git_issue}]"
if [[ ! "${git_issue}" =~ ^([_.a-zA-Z0-9-]+\/[_.a-zA-Z0-9-]+\#[0-9]+|[0-9]+)$ ]]; then
error_exit "Invalid github issue number ${BLUE}${git_issue}${NC}." \
"Should be of the form ${BLUE}1234${NC}," \
"${BLUE}namespace/repo#1234${NC}, ${BLUE}0${NC} or ${BLUE}auto${NC}."
fi
# global scope
issue_title=""
if [[ ! "${git_issue}" = "0" ]]; then
if [[ "${git_issue}" =~ ^[1-9][0-9]*$ ]]; then
# Issue in this repo so use the values we got from the local repo
issue_namespace="${GITHUB_NAMESPACE}"
issue_repo="${GITHUB_REPO}"
issue_number="${git_issue}"
else
# Fully qualified issue so extract the parts by replacing / and # with
# space then reading into an array which will split on space
local parts=()
IFS=" " read -r -a parts <<< "${git_issue//[\#\/]/ }"
issue_namespace="${parts[0]}"
issue_repo="${parts[1]}"
issue_number="${parts[2]}"
fi
debug_value "issue_namespace" "${issue_namespace}"
debug_value "issue_repo" "${issue_repo}"
debug_value "issue_number" "${issue_number}"
local github_issue_api_url="https://api.github.com/repos/${issue_namespace}/${issue_repo}/issues/${issue_number}"
debug_value "github_issue_api_url" "${github_issue_api_url}"
local curl_return_code=0
# Turn off exit on error so we can get the curl return code in the subshell
set +e
if command -v jq >/dev/null 2>&1; then
# jq is available so use it
issue_title="$( \
curl \
--silent \
--fail \
"${github_issue_api_url}" \
| jq \
--raw-output \
'.title' \
)"
curl_return_code=$?
else
# no jq so fall back to grep
issue_title="$( \
curl \
--silent \
--fail \
"${github_issue_api_url}" \
| grep \
--only-matching \
--prl-regexp \
'(?<="title": ").*(?=",)' \
)"
curl_return_code=$?
fi
set -e
debug_value "curl_return_code" "${curl_return_code}"
# curl_return_code is NOT the http status, just sucess/fail
if [[ "${curl_return_code}" -ne 0 ]]; then
# curl failed so check to see what the status code was
local http_status_code
http_status_code="$( \
curl \
--silent \
--output /dev/null \
--write-out "%{http_code}" \
"${github_issue_api_url}"\
)"
debug_value "http_status_code" "${http_status_code}"
if [[ "${http_status_code}" = "404" ]]; then
error_exit "Issue ${BLUE}${git_issue}${NC} does not exist on" \
"${BLUE}github.com/(${issue_namespace}/${issue_repo}${NC}"
else
warn "Unable to obtain issue title for issue ${BLUE}${issue_number}${NC}" \
"from ${BLUE}github.com/(${issue_namespace}/${issue_repo}${NC}" \
"(HTTP status: ${BLUE}${http_status_code}${NC})"
issue_title=""
fi
else
info "Issue title: ${BLUE}${issue_title}${NC}"
fi
fi
}
validate_in_git_repo() {
if ! git rev-parse --show-toplevel > /dev/null 2>&1; then
error_exit "You are not in a git repository. This script should be run from" \
"inside a repository.${NC}"
fi
}
validate_change_text_arg() {
local change_text="$1"; shift
if ! grep --quiet --perl-regexp "${ISSUE_LINE_TEXT_REGEX}" <<< "${change_text}"; then
error "The change entry text is not valid"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${YELLOW}${change_text}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "Validation regex: ${BLUE}${ISSUE_LINE_TEXT_REGEX}${NC}"
exit 1
fi
if ! validate_tense "${change_text}"; then
error "The change entry text should be in the imperitive mood" \
"\ni.e. \"Fix nasty bug\" rather than \"Fixed nasty bug\""
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${YELLOW}${change_text}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
exit 1
fi
}
validate_tense() {
debug "validate_tense()"
local change_text="$1"; shift
debug_value "change_text" "${change_text}"
if [[ "${IS_TENSE_VALIDATED:-true}" = true ]]; then
if echo "${change_text}" | grep --quiet --perl-regexp "${PAST_TENSE_FIRST_WORD_REGEX}"; then
debug "Found past tense first word"
return 1
else
debug "Tense validated ok"
return 0
fi
else
debug "Tense validation disabled"
return 0
fi
}
is_existing_change_file_present() {
local git_issue="$1"; shift
local change_text="$1"; shift
local git_issue_str
git_issue_str="$(format_git_issue_for_filename "${git_issue}")"
local existing_files=()
for existing_file in "${unreleased_dir}"/*__"${git_issue_str}".md; do
if [[ -f "${existing_file}" ]]; then
debug_value "existing_file" "${existing_file}"
local filename
filename="$(basename "${existing_file}" )"
existing_files+=( "${filename}" )
fi
done
debug_value "existing_files" "${existing_files[@]:-()}"
local existing_file_count="${#existing_files[@]}"
debug_value "existing_file_count" "${existing_file_count}"
if [[ "${existing_file_count}" -eq 0 ]]; then
debug "File does not exist"
return 1
else
# Multiple files exist for this
debug "${existing_file_count} files exist"
info "Change file(s) already exist for this issue:"
echo
list_unreleased_changes "${git_issue_str}"
echo
echo "Do you want to create a new change file for the issue or open an existing one?"
echo "If it is a different change tied to the same issue then you should create a new"
echo "file to avoid merge conflicts."
# Build the menu options
local menu_item_arr=()
menu_item_arr+=( "Create new file" )
for filename in "${existing_files[@]}"; do
menu_item_arr+=( "Open ${filename}" )
done
# Present the user with a menu of options in a single column
COLUMNS=1
select user_input in "${menu_item_arr[@]}"; do
if [[ "${user_input}" = "Create new file" ]]; then
write_change_entry "${git_issue}" "${change_text:-}"
break
elif [[ "${user_input}" =~ ^Open ]]; then
local chosen_file_name="${user_input#Open }"
debug_value "chosen_file_name" "${chosen_file_name}"
open_file_in_editor "${unreleased_dir}/${chosen_file_name}" "${git_issue}"
break
else
echo "Invalid option. Try another one."
continue
fi
done
return 0
fi
}
format_git_issue_for_filename() {
local git_issue="$1"; shift
local git_issue_str
if [[ "${git_issue}" = "0" ]]; then
git_issue_str="0"
else
# replace / and # with _
git_issue_str="${git_issue//[\#\/]/_}"
#debug_value "git_issue_str" "${git_issue_str}"
fi
echo "${git_issue_str}"
}
write_change_entry() {
local git_issue="$1"; shift
local change_text="$1"; shift
local date_str
date_str="$(date --utc +%Y%m%d_%H%M%S_%3N)"
local git_issue_str
git_issue_str="$(format_git_issue_for_filename "${git_issue}")"
# Use two underscores to help distinguish the date from the issue part
# which may itself contain underscores.
local filename="${date_str}__${git_issue_str}.md"
local change_file="${unreleased_dir}/${filename}"
debug_value "change_file" "${change_file}"
if [[ -e "${change_file}" ]]; then
error_exit "File ${BLUE}${change_file}${NC} already exists"
fi
local issue_prefix="Issue **"
local issue_suffix="** : "
local line_prefix="* "
local issue_part
if [[ "${git_issue}" = "0" ]]; then
issue_part=""
elif [[ "${git_issue}" =~ ^[0-9]+$ ]]; then
# * Issue **#1234** : My change text
issue_part="${issue_prefix}#${git_issue}${issue_suffix}"
else
# * Issue **gchq/stroom#1234** :
issue_part="${issue_prefix}${git_issue}${issue_suffix}"
fi
local change_entry_line="${line_prefix}${issue_part}${change_text}"
local all_content
# Craft the content of the file
# shellcheck disable=SC2016
all_content="$( \
echo "${change_entry_line}"
echo
echo
echo '```sh'
if [[ -n "${issue_title:-}" ]]; then
local github_issue_url="https://github.com/${issue_namespace}/${issue_repo}/issues/${issue_number}"
echo "# ********************************************************************************"
echo "# Issue title: ${issue_title}"
echo "# Issue link: ${github_issue_url}"
echo "# ********************************************************************************"
echo
fi
echo "# ONLY the top line will be included as a change entry in the CHANGELOG."
echo "# The entry should be in GitHub flavour markdown and should be written on a SINGLE"
echo "# line with no hard breaks. You can have multiple change files for a single GitHub issue."
echo "# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than"
echo "# 'Fixed nasty bug'."
echo "#"
echo "# Examples of acceptable entries are:"
echo "#"
echo "#"
echo "# * Issue **123** : Fix bug with an associated GitHub issue in this repository"
echo "#"
echo "# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository"
echo "#"
echo "# * Fix bug with no associated GitHub issue."
echo '```'
)"
info "Writing file ${BLUE}${change_file}${GREEN}:"
info "${DGREY}------------------------------------------------------------------------${NC}"
info "${YELLOW}${change_entry_line}${NC}"
info "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${all_content}" > "${change_file}"
if [[ -z "${change_text}" ]]; then
open_file_in_editor "${change_file}" "${git_issue}"
fi
}
# Return zero if the file was changed, else non-zero
open_file_in_editor() {
local file_to_open="$1"; shift
local git_issue="$1"; shift
local editor
editor="${VISUAL:-${EDITOR:-vi}}"
local is_first_pass=true
info "Opening file ${BLUE}${file_to_open}${GREEN} in editor" \
"(${BLUE}${editor}${GREEN})${NC}"
while true; do
if [[ "${is_first_pass}" = true ]]; then
read -n 1 -s -r -p "Press any key to open the file"
else
read -n 1 -s -r -p "Press any key to re-open the file"
# Extra line break for subsequent passes to separate them
echo
fi
echo
echo
# Open the user's preferred editor or vi/vim if not set
"${editor}" "${file_to_open}"
if validate_issue_line_in_file "${file_to_open}" "${git_issue}"; then
# Happy with the file so break out of loop
info "File passed validation"
break;
fi
is_first_pass=false
done
}
validate_issue_line_in_file() {
debug "validate_issue_line_in_file ($*)"
local change_file="$1"; shift
local git_issue="$1"; shift
debug "Validating file ${change_file}"
debug_value "git_issue" "${git_issue}"
local issue_line_prefix_regex
if [[ "${git_issue}" = "0" ]]; then
issue_line_prefix_regex="${ISSUE_LINE_SIMPLE_PREFIX_REGEX}"
else
issue_line_prefix_regex="${ISSUE_LINE_NUMBERED_PREFIX_REGEX}"
fi
debug_value "issue_line_prefix_regex" "${issue_line_prefix_regex}"
local issue_line_count
issue_line_count="$( \
grep \
--count \
--perl-regexp \
"${issue_line_prefix_regex}" \
"${change_file}" \
|| true
)"
debug_value "issue_line_count" "${issue_line_count}"
if [[ "${issue_line_count}" -eq 0 ]]; then
error "No change entry line found in ${BLUE}${change_file}${NC}"
echo -e "Line prefix regex: ${BLUE}${issue_line_prefix_regex}${NC}"
return 1
elif [[ "${issue_line_count}" -gt 1 ]]; then
local matching_change_lines
matching_change_lines="$(grep --perl-regexp "${issue_line_prefix_regex}" "${change_file}" )"
error "More than one entry lines found in ${BLUE}${change_file}${NC}:"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${YELLOW}${matching_change_lines}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "Line prefix regex: ${BLUE}${issue_line_prefix_regex}${NC}"
return 1
else
# Found one issue line which should be on the top line so validate it
local issue_line
issue_line="$(head -n1 "${change_file}")"
local issue_line_text
if [[ "${git_issue}" = "0" ]]; then
# Line should look like
# * Fix something.
# Delete the prefix part
issue_line_text="${issue_line#* }"
else
# Line should look like one of
# * Issue **#1234** : Fix something.
# * Issue **gchq/stroom-resources#104** : Fix something.
# Delete the prefix part
issue_line_text="${issue_line#*: }"
fi
debug_value "issue_line" "${issue_line}"
debug_value "issue_line_text" "${issue_line_text}"
if ! echo "${issue_line_text}" | grep --quiet --perl-regexp "${ISSUE_LINE_TEXT_REGEX}"; then
error "The change entry text is not valid in ${BLUE}${change_file}${NC}:"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${YELLOW}${issue_line_text}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "Validation regex: ${BLUE}${ISSUE_LINE_TEXT_REGEX}${NC}"
return 1
fi
if ! validate_tense "${issue_line_text}"; then
error "The change entry text should be in the imperitive mood" \
"\ni.e. \"Fix nasty bug\" rather than \"Fixed nasty bug\""
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
echo -e "${YELLOW}${issue_line_text}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"
return 1
fi
fi
}
list_unreleased_changes() {
# if no git issue is provided use a wildcard so we can get all issues
local git_issue_str="${1:-*}"; shift
debug_value "git_issue_str" "${git_issue_str}"
local found_change_files=false
local list_output=""
for file in "${unreleased_dir}/"*__${git_issue_str}.md; do
if [[ -f "${file}" ]]; then
local filename
local change_entry_line
found_change_files=true
filename="$(basename "${file}" )"
change_entry_line="$( \
head \
-n1 \
"${file}" \
)"
list_output+="${BLUE}${filename}${NC}:\n${change_entry_line}\n\n"
fi
done
#if [[ "${#entry_map[@]}" -gt 0 ]]; then
if [[ "${found_change_files}" = true ]]; then
#for filename in "${!MYMAP[@]}"; do echo $K; done
# Remove the trailing blank lines
list_output="$(echo -e "${list_output}" | head -n-2 )"
echo -e "${list_output}"
else
info "There are no unreleased changes"
fi
}
main() {
#local SCRIPT_DIR
#SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
#debug_value "SCRIPT_DIR" "${SCRIPT_DIR}"
setup_echo_colours
if [[ $# -eq 0 ]]; then
error "Invalid arguments"
echo -e "Usage: $0 github_issue [change_text]" >&2
echo -e "git_issue - GitHub issue number in one of the following formats:" >&2
echo -e " 0 - No issue exists for this change" >&2
echo -e " n - Just the issue number." >&2
echo -e " namespace/repo#n - Issue number on another repo." >&2
echo -e " auto - Will derive the issue number from the current branch." >&2
echo -e " list - List all unreleased issues." >&2
echo -e "change_text - The change text in github markdown format. This will be appended to" >&2
echo -e " change log entry" >&2
echo -e "E.g: $0 1234 \"Fix nasty bug\"" >&2
echo -e "E.g: $0 gchq/stroom#1234 \"Fix nasty bug\"" >&2
echo -e "E.g: $0 1234" >&2
echo -e "E.g: $0 auto \"Fix nasty bug\"" >&2
echo -e "E.g: $0 0 \"Fix something without an issue number\"" >&2
echo -e "E.g: $0 list" >&2
exit 1
fi
local git_issue="$1"; shift
local change_text="${1:-}"
debug_value "git_issue" "${git_issue}"
debug_value "change_text" "${change_text}"
# TODO validate change_text against the text part of issue_line_regex if
# it is set
validate_in_git_repo
if [[ -n "${change_text}" ]]; then
validate_change_text_arg "${change_text}"
fi
local repo_root_dir
repo_root_dir="$(git rev-parse --show-toplevel)"
local tag_release_config_file="${repo_root_dir}/${TAG_RELEASE_CONFIG_FILENAME}"
if [[ -f "${tag_release_config_file}" ]]; then
# Source any repo specific config
# shellcheck disable=SC1090
source "${tag_release_config_file}"
else
error_exit "Config file ${BLUE}${tag_release_config_file}${NC}" \
"doesn't exist. Run ${BLUE}./${TAG_RELEASE_SCRIPT_FILENAME}${NC}" \
"to generate it."
fi
debug_value "GITHUB_NAMESPACE" "${GITHUB_NAMESPACE}"
debug_value "GITHUB_REPO" "${GITHUB_REPO}"
local unreleased_dir="${repo_root_dir}/${UNRELEASED_DIR_NAME}"
mkdir -p "${unreleased_dir}"
if [[ "${git_issue}" = "list" ]]; then
list_unreleased_changes ""
else
if [[ "${git_issue}" = "auto" ]]; then
git_issue="$(get_git_issue_from_branch)"
fi
validate_git_issue "${git_issue}"
if [[ "${git_issue}" = "0" ]] \
|| ! is_existing_change_file_present "${git_issue}" "${change_text:-}"; then
write_change_entry "${git_issue}" "${change_text:-}"
fi
fi
}
main "$@"
# vim: set tabstop=2 shiftwidth=2 expandtab:
|
gchq/stroom
|
log_change.sh
|
Shell
|
apache-2.0
| 20,965 |
#!/bin/bash
bash docker/prepare-env.sh
opnfv-testapi
|
grakiss888/testapi
|
docker/start-server.sh
|
Shell
|
apache-2.0
| 54 |
#!/bin/sh
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
PRGDIR=`dirname "$PRG"`
EXECUTABLE=shutdown.sh
# Check that target executable exists
if [ ! -x "$PRGDIR"/apache-tomcat/bin/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/apache-tomcat/bin/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi
echo "Stopping the SOA4ALl platform..."
exec "$PRGDIR"/apache-tomcat/bin/"$EXECUTABLE" "$@"
|
chamerling/soa4all-installer
|
soa4all-installer-package/src/izpack/res/default/shutdown.sh
|
Shell
|
apache-2.0
| 615 |
#!/bin/bash
#
# (C) Copyright 2013 The CloudDOE Project and others.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Contributors:
# Wei-Chun Chung ([email protected])
# Yu-Chun Wang ([email protected])
#
# CloudDOE Project:
# http://clouddoe.iis.sinica.edu.tw/
#
if [ $# -lt 2 ]; then
echo "Using:" $0 "{hostname} {userPass}"; exit
else
echo "---- [2.0] Start Stage 2 ----";
./sudo_hack.sh "$2"
./21_update_hostname.sh $1
./22_update_hosts.sh
./23_update_keypair.sh
fi
# vim: ai ts=2 sw=2 et sts=2 ft=sh
|
moneycat/CloudDOE
|
workspace/bin/20_install.sh
|
Shell
|
apache-2.0
| 1,048 |
#! /bin/bash
echo "cdh4-node-start.sh: About to start cloudera agent..."
## starting cloudera agent
sudo service cloudera-scm-agent start
|
fastconnect/cloudify-cloudera
|
services/cloudera/cdh4-node/scripts-sh/cdh4-node-start.sh
|
Shell
|
apache-2.0
| 139 |
#!/bin/bash
#calucalate received message number
#if size is the specified size, received
data_path=$1
if [ ! -f "$data_path" ];then
echo "Usage: $0 <data_path>"
exit 1
fi
cat $data_path | awk -F" " 'BEGIN{cnt=0}{if($1!="#"){if($2==1024)cnt++}}END{print cnt}'
|
melon-li/tools
|
netem/statdata/calrecnum.sh
|
Shell
|
apache-2.0
| 270 |
#!/bin/bash -eux
SPEC="/rpmbuild/SPECS/python-horizon-bsn.spec"
# RPM runs as root and doesn't like source files owned by a random UID
OUTER_UID=$(stat -c '%u' $SPEC)
OUTER_GID=$(stat -c '%g' $SPEC)
trap "chown -R $OUTER_UID:$OUTER_GID /rpmbuild" EXIT
chown -R root:root /rpmbuild
ln -s /rpmbuild /root/rpmbuild
rpmbuild -ba $SPEC
chown -R $OUTER_UID:$OUTER_GID /rpmbuild
|
wolverineav/horizon-bsn
|
build/build-rhel-packages-inner.sh
|
Shell
|
apache-2.0
| 375 |
#!/bin/bash
docker run -it --rm repmgr
|
cognition/rbrooker-pgrepmgr
|
bin/run-container.sh
|
Shell
|
apache-2.0
| 44 |
#!/bin/bash
hdfs dfs -rm /test
hdfs dfs -copyFromLocal ../env.sh /test
hadoop jar FileTester.jar overwrite /test 100 CONCENTRATE
|
songweijia/hdfsrs
|
experiments/exp1/run.sh
|
Shell
|
apache-2.0
| 130 |
#!/bin/bash
# Recover WPA PSKs - prints out PSKs for WPA-PSK networks pushed to device via user/device policy
# Run this script on a Chromebook:
# 1. Put Chromebook in developer mode - https://www.chromium.org/chromium-os/poking-around-your-chrome-os-device
# 2. Log into device. Press CTRL+ALT+T to open crosh shell.
# 3. Type "shell" to enter Bash shell.
# 4. Type:
# bash <(curl -s -S -L https://raw.githubusercontent.com/jay0lee/cros-scripts/master/recover-psks.sh)
device_policy_file=/var/cache/shill/default.profile
echo "Device PSKs:"
if ls $device_policy_file 1> /dev/null 2>&1; then
sudo cat $device_policy_file | \
grep -E '^Name=|^Passphrase=' | \
cut -d "=" -f 2- | \
while read line
do
if [[ "$line" == "default" ]]; then
continue
fi
if [[ "$line" == "rot47"* ]]; then
rotted=${line:6}
unrotted=`echo $rotted | tr '!-~' 'P-~!-O'`
echo " PSK: $unrotted"
echo
else
echo "SSID: $line"
fi
done
else
echo "No device policy networks found."
fi
echo
echo
echo "User PSKs:"
sudo bash -c 'cat /home/root/*/session_manager/policy/policy' | \
grep -a -E '\"Passphrase\":|\"SSID\":'
|
jay0lee/cros-scripts
|
recover-psks.sh
|
Shell
|
apache-2.0
| 1,163 |
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\""
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/AFNetworking/AFNetworking.framework"
install_framework "$BUILT_PRODUCTS_DIR/FMDB/FMDB.framework"
install_framework "$BUILT_PRODUCTS_DIR/MJExtension/MJExtension.framework"
install_framework "$BUILT_PRODUCTS_DIR/Mantle/Mantle.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveCocoa/ReactiveCocoa.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveObjC/ReactiveObjC.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveObjCBridge/ReactiveObjCBridge.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework"
install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework"
install_framework "$BUILT_PRODUCTS_DIR/lottie-ios/Lottie.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/AFNetworking/AFNetworking.framework"
install_framework "$BUILT_PRODUCTS_DIR/FMDB/FMDB.framework"
install_framework "$BUILT_PRODUCTS_DIR/MJExtension/MJExtension.framework"
install_framework "$BUILT_PRODUCTS_DIR/Mantle/Mantle.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveCocoa/ReactiveCocoa.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveObjC/ReactiveObjC.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveObjCBridge/ReactiveObjCBridge.framework"
install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework"
install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework"
install_framework "$BUILT_PRODUCTS_DIR/lottie-ios/Lottie.framework"
fi
|
qiandashuai/FuniOS
|
Pods/Target Support Files/Pods-TestJson/Pods-TestJson-frameworks.sh
|
Shell
|
apache-2.0
| 4,961 |
#!/bin/bash
#
# SSH Authentication
#
if [ -z "$id_rsa_{1..23}" ]; then echo 'No $id_rsa_{1..23} found !' ; exit 1; fi
# Careful ! Put the correct number here !!! (the last line number)
echo -n $id_rsa_{1..23} >> ~/.ssh/travis_rsa_64
base64 --decode --ignore-garbage ~/.ssh/travis_rsa_64 > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo -e ">>> Copy config"
mv -fv .travis/ssh-config ~/.ssh/config
echo -e ">>> Hi github.com !"
ssh -T [email protected]
ssh -T [email protected]
echo -e "\n"
# Make sure system-installed Python is used
mkdir $HOME/bin
ln -sf /usr/bin/python2* $HOME/bin
|
rawler/bithorde
|
.travis/before_script.sh
|
Shell
|
apache-2.0
| 590 |
# -----------------------------------------------------------------------------
#
# Package : range-parser
# Version : 1.2.0
# Source repo : https://github.com/jshttp/range-parser
# Tested on : RHEL 8.3
# Script License: Apache License, Version 2 or later
# Maintainer : BulkPackageSearch Automation <[email protected]>
#
# 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.
#
# ----------------------------------------------------------------------------
PACKAGE_NAME=range-parser
PACKAGE_VERSION=1.2.0
PACKAGE_URL=https://github.com/jshttp/range-parser
yum -y update && yum install -y yum-utils nodejs nodejs-devel nodejs-packaging npm python38 python38-devel ncurses git gcc gcc-c++ libffi libffi-devel ncurses git jq make cmake
yum-config-manager --add-repo http://rhn.pbm.ihost.com/rhn/latest/8.3Server/ppc64le/appstream/
yum-config-manager --add-repo http://rhn.pbm.ihost.com/rhn/latest/8.3Server/ppc64le/baseos/
yum-config-manager --add-repo http://rhn.pbm.ihost.com/rhn/latest/7Server/ppc64le/optional/
yum install -y firefox liberation-fonts xdg-utils && npm install n -g && n latest && npm install -g npm@latest && export PATH="$PATH" && npm install --global yarn grunt-bump xo testem acorn
OS_NAME=`python3 -c "os_file_data=open('/etc/os-release').readlines();os_info = [i.replace('PRETTY_NAME=','').strip() for i in os_file_data if i.startswith('PRETTY_NAME')];print(os_info[0])"`
HOME_DIR=`pwd`
if ! git clone $PACKAGE_URL $PACKAGE_NAME; then
echo "------------------$PACKAGE_NAME:clone_fails---------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME" > /home/tester/output/clone_fails
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Clone_Fails" > /home/tester/output/version_tracker
exit 0
fi
cd $HOME_DIR/$PACKAGE_NAME
git checkout $PACKAGE_VERSION
PACKAGE_VERSION=$(jq -r ".version" package.json)
# run the test command from test.sh
if ! npm install && npm audit fix && npm audit fix --force; then
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_Fails"
exit 0
fi
cd $HOME_DIR/$PACKAGE_NAME
if ! npm test; then
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_success_but_test_Fails"
exit 0
else
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi
|
ppc64le/build-scripts
|
r/range-parser/range-parser_rhel_8.3.sh
|
Shell
|
apache-2.0
| 3,064 |
#!/usr/bin/env bash
# Run it before committing to verify whether all files
# are properly formatted so you won't fail early on review
# Execute from repo root or, if using aa from base/head/startup-os
RED=$(tput setaf 1)
RESET=$(tput sgr0)
bazel run //tools:bazel_deps -- format-deps \
--overwrite \
--deps $(pwd)/dependencies.yaml
bazel run //tools/formatter -- \
--path $(pwd) \
--java --python --proto --cpp --build --sh --ts \
--ignore_directories $(find $(pwd) -name node_modules -type d | paste -s -d , -) \
&>/dev/null
# Prints out an error only if both conditions are satisfied:
# * we are on CircleCI
# * working tree contains unstaged changes
# When ran locally it silently fixes everything.
if [[ ! -z "$CIRCLECI" && ! -z $(git status -s) ]]; then
echo "$RED[!] Source files are not formatted$RESET"
echo "Please run ''$0'' to fix it"
exit 1
fi
|
google/startup-os
|
tools/fix_formatting.sh
|
Shell
|
apache-2.0
| 879 |
#! /bin/bash
docker stop monodevelop-docker
docker rm monodevelop-docker
|
noricohuas/docker
|
vnc/ubuntu-gnome-monodevelop-docker/remove.sh
|
Shell
|
apache-2.0
| 74 |
#!/bin/bash
# Yet Another UserAgent Analyzer
# Copyright (C) 2013-2017 Niels Basjes
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
INPUT=AppleTypes.csv
OUTPUT=../AppleTypes.yaml
if [ "Generate.sh" -ot "${OUTPUT}" ]; then
if [ "${INPUT}" -ot "${OUTPUT}" ]; then
echo "${OUTPUT} is up to date";
exit;
fi
fi
echo "Generating ${OUTPUT}";
(
echo "# ============================================="
echo "# THIS FILE WAS GENERATED; DO NOT EDIT MANUALLY"
echo "# ============================================="
echo "#"
echo "# Yet Another UserAgent Analyzer"
echo "# Copyright (C) 2013-2017 Niels Basjes"
echo "#"
echo "# Licensed under the Apache License, Version 2.0 (the \"License\");"
echo "# you may not use this file except in compliance with the License."
echo "# You may obtain a copy of the License at"
echo "#"
echo "# http://www.apache.org/licenses/LICENSE-2.0"
echo "#"
echo "# Unless required by applicable law or agreed to in writing, software"
echo "# distributed under the License is distributed on an \"AS IS\" BASIS,"
echo "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."
echo "# See the License for the specific language governing permissions and"
echo "# limitations under the License."
echo "#"
echo "config:"
echo "- lookup:"
echo " name: 'AppleDeviceClass'"
echo " map:"
echo " \"iPhone\" : \"Phone\""
echo " \"iPad\" : \"Tablet\""
echo " \"iPod\" : \"Phone\""
echo " \"iPod touch\" : \"Phone\""
cat "AppleTypes.csv" | fgrep -v '#' | grep '[a-z]' | while read line ; \
do
key=$(echo ${line} | cut -d'|' -f1)
keyC=$(echo ${line} | cut -d'|' -f1 | sed 's/,/C/g')
deviceClass=$(echo ${line} | cut -d'|' -f2)
deviceName=$(echo ${line} | cut -d'|' -f3)
deviceVersion=$(echo ${line} | cut -d'|' -f4-)
echo " \"${key}\" : \"${deviceClass}\""
echo " \"${keyC}\" : \"${deviceClass}\""
done
echo ""
echo "- lookup:"
echo " name: 'AppleDeviceName'"
echo " map:"
echo " \"iPhone\" : \"Apple iPhone\""
echo " \"iPad\" : \"Apple iPad\""
echo " \"iPod\" : \"Apple iPod\""
echo " \"iPod touch\" : \"Apple iPod touch\""
cat "AppleTypes.csv" | fgrep -v '#' | grep '[a-z]' | while read line ; \
do
key=$(echo ${line} | cut -d'|' -f1)
keyC=$(echo ${line} | cut -d'|' -f1 | sed 's/,/C/g')
deviceClass=$(echo ${line} | cut -d'|' -f2)
deviceName=$(echo ${line} | cut -d'|' -f3)
deviceVersion=$(echo ${line} | cut -d'|' -f4-)
echo " \"${key}\" : \"${deviceName}\""
echo " \"${keyC}\" : \"${deviceName}\""
done
echo ""
echo "- lookup:"
echo " name: 'AppleDeviceVersion'"
echo " map:"
echo " \"iPhone\" : \"iPhone\""
echo " \"iPad\" : \"iPad\""
echo " \"iPod\" : \"iPod\""
echo " \"iPod touch\" : \"iPod touch\""
cat "AppleTypes.csv" | fgrep -v '#' | grep '[a-z]' | while read line ; \
do
key=$(echo ${line} | cut -d'|' -f1)
keyC=$(echo ${line} | cut -d'|' -f1 | sed 's/,/C/g')
deviceClass=$(echo ${line} | cut -d'|' -f2)
deviceName=$(echo ${line} | cut -d'|' -f3)
deviceVersion=$(echo ${line} | cut -d'|' -f4-)
echo " \"${key}\" : \"${deviceVersion}\""
echo " \"${keyC}\" : \"${deviceVersion}\""
done
cat "AppleTypes.csv" | fgrep -v '#' | grep '[a-z]' | while read line ; \
do
key=$(echo ${line} | cut -d'|' -f1)
deviceClass=$(echo ${line} | cut -d'|' -f2)
deviceName=$(echo ${line} | cut -d'|' -f3)
deviceVersion=$(echo ${line} | cut -d'|' -f4-)
echo "
- matcher:
require:
- 'agent.product.comments.entry.(1)text=\"${key}\"'
extract:
- 'DeviceBrand : 110:\"Apple\"'
- 'DeviceClass : 110:\"${deviceClass}\"'
- 'DeviceName : 110:\"${deviceName}\"'
- 'DeviceVersion : 110:\"${deviceVersion}\"'
- matcher:
require:
- 'agent.product.(1)name=\"${key}\"'
extract:
- 'DeviceBrand : 111:\"Apple\"'
- 'DeviceClass : 111:\"${deviceClass}\"'
- 'DeviceName : 111:\"${deviceName}\"'
- 'DeviceVersion : 111:\"${deviceVersion}\"'
- matcher:
require:
- 'agent.text=\"${key}\"'
extract:
- 'DeviceBrand : 111:\"Apple\"'
- 'DeviceClass : 111:\"${deviceClass}\"'
- 'DeviceName : 111:\"${deviceName}\"'
- 'DeviceVersion : 111:\"${deviceVersion}\"'
"
done
) > ${OUTPUT}
|
Innometrics/yauaa
|
analyzer/src/main/resources/UserAgents/AppleTypes/Generate.sh
|
Shell
|
apache-2.0
| 4,857 |
#!/bin/bash
set -e
clear
echo Starting Consul
docker stop consul || true && docker rm consul || true
docker run --rm -d --name=consul -p 8500:8500 -p 8400:8400 -p 8600:8600 -e CONSUL_BIND_INTERFACE=eth0 consul
sleep 5
docker exec consul sh -c "consul kv put 'config/cas-consul/cas/authn/accept/users' 'securecas::p@SSw0rd'"
echo Consul started
|
apereo/cas
|
ci/tests/puppeteer/scenarios/configuration-properties-consul/init.sh
|
Shell
|
apache-2.0
| 344 |
#!/bin/bash
# Hello World in bash
echo "Hello, World!"
|
cseppento/code-samples-bash
|
01-basics/01-helloworld.sh
|
Shell
|
apache-2.0
| 55 |
#!/bin/bash
# JBoss, Home of Professional Open Source
# Copyright 2016, Red Hat, Inc. and/or its affiliates, and individual
# contributors by the @authors tag. See the copyright.txt in the
# distribution for a full listing of individual contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
echo "Openning a new bash process in the exising application container"
oc rsh `oc get pods -l app=my12factorapp --no-headers=true|grep my12factorapp -m 1|awk '{print $1}'`
|
redhat-developer-demos/12factor-app
|
12_admin.sh
|
Shell
|
apache-2.0
| 965 |
#!/bin/bash
#
# plain-text-server.sh: read from socket, generate plain-text demo output.
#
# This script starts a RelEx server that listens for plain-text input
# (English sentences) on port 3333. It then parses the text, and
# returns a plain-text output on the same socket. The end of the parse is
# demarcated with an ; END OF SENTENCE token.
#
# It is intended that this server be used only for live web demos,
# rather than for anything serious.
#
# Example usage:
# ./opencog-server.sh &
# telnet localhost 3333
# This is a test
# ^]q
#
export LANG=en_US.UTF-8
VM_OPTS="-Xmx1024m"
RELEX_OPTS="\
-Djava.library.path=/usr/lib:/usr/lib/jni:/usr/local/lib:/usr/local/lib/jni \
"
CLASSPATH="-classpath \
bin:\
/usr/local/share/java/opennlp-tools-1.5.3.jar:\
/usr/local/share/java/maxent-3.0.3.jar:\
/usr/local/share/java/opennlp-tools-1.5.0.jar:\
/usr/local/share/java/maxent-3.0.0.jar:\
/usr/local/share/java/maxent-2.5.2.jar:\
/usr/local/share/java/trove.jar:\
/usr/local/share/java/jwnl-1.4rc2.jar:\
/usr/local/share/java/jwnl.jar:\
/usr/share/java/commons-logging.jar:\
/usr/share/java/slf4j-api.jar:\
/usr/share/java/logback-core.jar:\
/usr/share/java/logback-classic.jar:\
/usr/share/java/gnu-getopt.jar:\
/usr/share/java/linkgrammar.jar:\
/usr/local/share/java/linkgrammar.jar:\
"
# java $VM_OPTS $RELEX_OPTS $CLASSPATH relex.PlainTextServer --port 3333 --lang ru
java $VM_OPTS $RELEX_OPTS $CLASSPATH relex.PlainTextServer --port 3333
|
AmeBel/relex
|
plain-text-server.sh
|
Shell
|
apache-2.0
| 1,460 |
#!/bin/bash
set -e
REALPATH=$(python -c "import os; print(os.path.realpath('$0'))")
BASEDIR="$(dirname "${REALPATH}")/.."
cd "$BASEDIR"
JARFILE="$(ls -rt target/scala-*/tileserver-assembly-*.jar 2>/dev/null | tail -n 1)"
SRC_PATHS=($(find . -maxdepth 2 -name 'src' -o -name '*.sbt' -o -name '*.scala'))
if [ -z "$JARFILE" ] || find "${SRC_PATHS[@]}" -newer "$JARFILE" | egrep -q -v '(/target/)|(/bin/)'; then
if [ "$1" == '--fast' ]; then
echo 'Assembly is out of date. Fast start is enabled so skipping rebuild anyway...' >&2
else
nice -n 19 sbt assembly >&2
JARFILE="$(ls -rt target/scala-*/tileserver-assembly-*.jar 2>/dev/null | tail -n 1)"
touch "$JARFILE"
fi
fi
python -c "import os; print(os.path.realpath('$JARFILE'))"
|
socrata-platform/tileserver
|
bin/build.sh
|
Shell
|
apache-2.0
| 776 |
#!/usr/bin/env bash
project_root=
function find_script_path() {
PROG_PATH=${BASH_SOURCE[0]}
PROG_NAME=${PROG_PATH##*/}
PROG_DIR=$(cd "$(dirname "${PROG_PATH:-$PWD}")" 2>/dev/null 1>&2 && pwd)
project_root=${PROG_DIR}/..
}
function check_outcome() {
if [ "$?" != "0" ]; then
echo $1
exit 1
fi
}
find_script_path
cd ${project_root}
pip install --upgrade pip
echo "installing requirements"
pip install -r ./requirements/requirements.txt --upgrade
pip install -r ./requirements/requirements-ci.txt --upgrade
# lint and pep8 check
echo "running flake8"
flake8
check_outcome "flake8 failure. quitting."
# unit test + coverage
echo "coverage run --source=pages ./setup.py test"
coverage run --source=pages ./setup.py test
check_outcome "tests failed. quitting."
# genrating html report
echo "coverage html"
coverage html
|
Skyscanner/pages
|
scripts/test.sh
|
Shell
|
apache-2.0
| 864 |
#!/bin/sh
if [ "$#" -eq 0 ]; then
echo 'usage: replace-version.sh <current-version> [<new-version>]'
echo ' single argument will report which files will be changed'
fi
if [ "$#" -eq 1 ]; then
echo searching for $1
grep -r $1 --include="pom.xml" .
fi
if [ "$#" -eq 2 ]; then
echo replacing $1 with $2...
if [[ $OSTYPE == linux-gnu ]]; then
find . -name pom.xml -type f -print0 | xargs -0 sed -i. -e "s/$1/$2/g"
else
find . -name pom.xml -type f -print0 | xargs -0 sed -i . -e "s/$1/$2/g"
fi
fi
|
McLeodMoores/starling
|
replace-version.sh
|
Shell
|
apache-2.0
| 524 |
# ----------------------------------------------------------------------------
#
# Package : Kotlin (stdlib & stdlib-common)
# Version : 1.3.50
# Source repo : https://github.com/JetBrains/kotlin.git
# Tested on : UBI:8.3
# Script License: Apache License, Version 2 or later
# Maintainer : Srividya Chittiboina <[email protected]>
#
# 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
set -e
VERSION=${1:-v1.3.50}
yum install -y wget git patch
useradd -G root -d /home/testuser testuser -p test123
su testuser
cd
wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u302-b08/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u302b08.tar.gz
tar xf OpenJDK8U-jdk_ppc64le_linux_hotspot_8u302b08.tar.gz
wget https://github.com/AdoptOpenJDK/openjdk9-binaries/releases/download/jdk-9.0.4%2B11/OpenJDK9U-jdk_ppc64le_linux_hotspot_9.0.4_11.tar.gz
tar xf OpenJDK9U-jdk_ppc64le_linux_hotspot_9.0.4_11.tar.gz
rm -rf OpenJDK8U-jdk_ppc64le_linux_hotspot_8u302b08.tar.gz OpenJDK9U-jdk_ppc64le_linux_hotspot_9.0.4_11.tar.gz
export JAVA_HOME=$HOME/jdk8u302-b08
export JDK_9=$HOME/jdk-9.0.4+11
export JDK_16=$JAVA_HOME
export JDK_17=$JAVA_HOME
export JDK_18=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
wget https://raw.githubusercontent.com/ppc64le/build-scripts/master/k/kotlin-stdlib/v1.3.50/kotlin.patch
git clone https://github.com/JetBrains/kotlin.git
cd kotlin
git checkout $VERSION
patch -p1 < $HOME/kotlin.patch
./gradlew :kotlin-stdlib-common:test
./gradlew :kotlin-stdlib:test
echo "JARS at "
find -name *kotlin-stdlib*SNAPSHOT.jar
|
ppc64le/build-scripts
|
k/kotlin-stdlib/v1.3.50/kotlin-stdlib_v1.3.50_ubi_8.3.sh
|
Shell
|
apache-2.0
| 1,936 |
#!/bin/sh
JENKINS_CLI_CMD=$1
COGNITOUSER=$2
COGNITOPASSWORD=$3
cat <<EOF | $JENKINS_CLI_CMD create-credentials-by-xml system::system::jenkins "(global)"
<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
<scope>GLOBAL</scope>
<id>SVC_ADMIN</id>
<description>Jazz Admin User</description>
<username>$COGNITOUSER</username>
<password>$COGNITOPASSWORD</password>
</com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
EOF
|
tmobile/jazz-installer
|
installer/terraform/provisioners/jenkinscli/credentials/cognitouser.sh
|
Shell
|
apache-2.0
| 472 |
#!/bin/bash
count=0
serverarray=()
while read -r line
do
((count=count+1))
echo $count": `echo -n $line | awk '{print $1}'` (`echo -n $line | awk '{print $2}'`)"
serverarray[$count]=`echo -n $line | awk '{print $1}'`
done <serverlist
read -p "pls cloose server:" servernum
ssh ${serverarray[$servernum]}
|
ichengchao/bash-practice
|
ssh-login/mylogin.sh
|
Shell
|
apache-2.0
| 316 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
calculate_heap_sizes()
{
case "`uname`" in
Linux)
system_memory_in_mb=`free -m | awk '/Mem:/ {print $2}'`
system_cpu_cores=`egrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo`
;;
FreeBSD)
system_memory_in_bytes=`sysctl hw.physmem | awk '{print $2}'`
system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
;;
SunOS)
system_memory_in_mb=`prtconf | awk '/Memory size:/ {print $3}'`
system_cpu_cores=`psrinfo | wc -l`
;;
Darwin)
system_memory_in_bytes=`sysctl hw.memsize | awk '{print $2}'`
system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024`
system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'`
;;
*)
# assume reasonable defaults for e.g. a modern desktop or
# cheap server
system_memory_in_mb="2048"
system_cpu_cores="2"
;;
esac
# some systems like the raspberry pi don't report cores, use at least 1
if [ "$system_cpu_cores" -lt "1" ]
then
system_cpu_cores="1"
fi
# set max heap size based on the following
# max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
# calculate 1/2 ram and cap to 1024MB
# calculate 1/4 ram and cap to 8192MB
# pick the max
half_system_memory_in_mb=`expr $system_memory_in_mb / 2`
quarter_system_memory_in_mb=`expr $half_system_memory_in_mb / 2`
if [ "$half_system_memory_in_mb" -gt "1024" ]
then
half_system_memory_in_mb="1024"
fi
if [ "$quarter_system_memory_in_mb" -gt "8192" ]
then
quarter_system_memory_in_mb="8192"
fi
if [ "$half_system_memory_in_mb" -gt "$quarter_system_memory_in_mb" ]
then
max_heap_size_in_mb="$half_system_memory_in_mb"
else
max_heap_size_in_mb="$quarter_system_memory_in_mb"
fi
MAX_HEAP_SIZE="${max_heap_size_in_mb}M"
# Young gen: min(max_sensible_per_modern_cpu_core * num_cores, 1/4 * heap size)
max_sensible_yg_per_core_in_mb="100"
max_sensible_yg_in_mb=`expr $max_sensible_yg_per_core_in_mb "*" $system_cpu_cores`
desired_yg_in_mb=`expr $max_heap_size_in_mb / 4`
if [ "$desired_yg_in_mb" -gt "$max_sensible_yg_in_mb" ]
then
HEAP_NEWSIZE="${max_sensible_yg_in_mb}M"
else
HEAP_NEWSIZE="${desired_yg_in_mb}M"
fi
}
# Determine the sort of JVM we'll be running on.
java_ver_output=`"${JAVA:-java}" -version 2>&1`
jvmver=`echo "$java_ver_output" | awk -F'"' 'NR==1 {print $2}'`
JVM_VERSION=${jvmver%_*}
JVM_PATCH_VERSION=${jvmver#*_}
jvm=`echo "$java_ver_output" | awk 'NR==2 {print $1}'`
case "$jvm" in
OpenJDK)
JVM_VENDOR=OpenJDK
# this will be "64-Bit" or "32-Bit"
JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $2}'`
;;
"Java(TM)")
JVM_VENDOR=Oracle
# this will be "64-Bit" or "32-Bit"
JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $3}'`
;;
*)
# Help fill in other JVM values
JVM_VENDOR=other
JVM_ARCH=unknown
;;
esac
# Override these to set the amount of memory to allocate to the JVM at
# start-up. For production use you may wish to adjust this for your
# environment. MAX_HEAP_SIZE is the total amount of memory dedicated
# to the Java heap; HEAP_NEWSIZE refers to the size of the young
# generation. Both MAX_HEAP_SIZE and HEAP_NEWSIZE should be either set
# or not (if you set one, set the other).
#
# The main trade-off for the young generation is that the larger it
# is, the longer GC pause times will be. The shorter it is, the more
# expensive GC will be (usually).
#
# The example HEAP_NEWSIZE assumes a modern 8-core+ machine for decent pause
# times. If in doubt, and if you do not particularly want to tweak, go with
# 100 MB per physical CPU core.
#MAX_HEAP_SIZE="4G"
#HEAP_NEWSIZE="800M"
if [ "x$MAX_HEAP_SIZE" = "x" ] && [ "x$HEAP_NEWSIZE" = "x" ]; then
calculate_heap_sizes
else
if [ "x$MAX_HEAP_SIZE" = "x" ] || [ "x$HEAP_NEWSIZE" = "x" ]; then
echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs (see cassandra-env.sh)"
exit 1
fi
fi
# Specifies the default port over which Cassandra will be available for
# JMX connections.
JMX_PORT="7199"
# Here we create the arguments that will get passed to the jvm when
# starting cassandra.
# enable assertions. disabling this in production will give a modest
# performance benefit (around 5%).
JVM_OPTS="$JVM_OPTS -ea"
# add the jamm javaagent
if [ "$JVM_VENDOR" != "OpenJDK" -o "$JVM_VERSION" \> "1.6.0" ] \
|| [ "$JVM_VERSION" = "1.6.0" -a "$JVM_PATCH_VERSION" -ge 23 ]
then
JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.5.jar"
fi
# enable thread priorities, primarily so we can give periodic tasks
# a lower priority to avoid interfering with client workload
JVM_OPTS="$JVM_OPTS -XX:+UseThreadPriorities"
# allows lowering thread priority without being root. see
# http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workaround.html
JVM_OPTS="$JVM_OPTS -XX:ThreadPriorityPolicy=42"
# min and max heap sizes should be set to the same value to avoid
# stop-the-world GC pauses during resize, and so that we can lock the
# heap in memory on startup to prevent any of it from being swapped
# out.
JVM_OPTS="$JVM_OPTS -Xms${MAX_HEAP_SIZE}"
JVM_OPTS="$JVM_OPTS -Xmx${MAX_HEAP_SIZE}"
JVM_OPTS="$JVM_OPTS -Xmn${HEAP_NEWSIZE}"
JVM_OPTS="$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError"
# set jvm HeapDumpPath with CASSANDRA_HEAPDUMP_DIR
if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then
JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=$CASSANDRA_HEAPDUMP_DIR/cassandra-`date +%s`-pid$$.hprof"
fi
startswith() { [ "${1#$2}" != "$1" ]; }
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss180k"
fi
echo "xss = $JVM_OPTS"
# GC tuning options
JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC"
JVM_OPTS="$JVM_OPTS -XX:+UseConcMarkSweepGC"
JVM_OPTS="$JVM_OPTS -XX:+CMSParallelRemarkEnabled"
JVM_OPTS="$JVM_OPTS -XX:SurvivorRatio=8"
JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1"
JVM_OPTS="$JVM_OPTS -XX:CMSInitiatingOccupancyFraction=75"
JVM_OPTS="$JVM_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
JVM_OPTS="$JVM_OPTS -XX:+UseTLAB"
# note: bash evals '1.7.x' as > '1.7' so this is really a >= 1.7 jvm check
if [ "$JVM_VERSION" \> "1.7" ] ; then
JVM_OPTS="$JVM_OPTS -XX:+UseCondCardMark"
fi
# GC logging options -- uncomment to enable
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDetails"
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCDateStamps"
# JVM_OPTS="$JVM_OPTS -XX:+PrintHeapAtGC"
# JVM_OPTS="$JVM_OPTS -XX:+PrintTenuringDistribution"
# JVM_OPTS="$JVM_OPTS -XX:+PrintGCApplicationStoppedTime"
# JVM_OPTS="$JVM_OPTS -XX:+PrintPromotionFailure"
# JVM_OPTS="$JVM_OPTS -XX:PrintFLSStatistics=1"
# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log"
# If you are using JDK 6u34 7u2 or later you can enable GC log rotation
# don't stick the date in the log name if rotation is on.
# JVM_OPTS="$JVM_OPTS -Xloggc:/var/log/cassandra/gc.log"
# JVM_OPTS="$JVM_OPTS -XX:+UseGCLogFileRotation"
# JVM_OPTS="$JVM_OPTS -XX:NumberOfGCLogFiles=10"
# JVM_OPTS="$JVM_OPTS -XX:GCLogFileSize=10M"
# uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
# JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1414"
# Prefer binding to IPv4 network intefaces (when net.ipv6.bindv6only=1). See
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561 (short version:
# comment out this entry to enable IPv6 support).
JVM_OPTS="$JVM_OPTS -Djava.net.preferIPv4Stack=true"
# jmx: metrics and administration interface
#
# add this if you're having trouble connecting:
# JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<public name>"
#
# see
# https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
# for more on configuring JMX through firewalls, etc. (Short version:
# get it working with no firewall first.)
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS"
|
leomrocha/cassandra
|
conf/cassandra-env.sh
|
Shell
|
apache-2.0
| 9,400 |
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=ARM-Linux-x86
CND_CONF=Release
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/librpi-spi-iqrf.a
OUTPUT_BASENAME=librpi-spi-iqrf.a
PACKAGE_TOP_DIR=rpi-spi-iqrf/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
rm -rf ${NBTMPDIR}
mkdir -p ${NBTMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory "${NBTMPDIR}/rpi-spi-iqrf/lib"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/rpi-spi-iqrf.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/rpi-spi-iqrf.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}
|
MICRORISC/iqrfsdk
|
libs/raspberry/c/armv6hf/spi/clibrpi-spi-iqrf/nbproject/Package-Release.bash
|
Shell
|
apache-2.0
| 1,485 |
#AZURE specific functions
#### start $cloud_provider customizations
# $1 vm name
vm_exists() {
logger "Checking if VM $1 exists..."
if [ ! -z "$(azure vm list -s "$subscriptionID"|grep " $1 " | grep " $dnsName.cloudapp.net ")" ] ; then
return 0
else
return 1
fi
}
#$1 name $2 location
azure_create_group() {
if [ "$1" ] && [ "$2" ] ; then
echo "azure account affinity-group create --location $2 -s $subscriptionID --label $1 $1"
azure account affinity-group create --location "$2" -s "$subscriptionID" --label "$1" "$1"
else
logger "ERROR: invalid parameters for creating affinity group name=$1 location=$2"
fi
}
#$1 vnet name $2 affinity group
azure_create_vnet() {
if [ "$1" ] && [ "$2" ] ; then
echo "azure network vnet create --affinity-group $2 -s $subscriptionID $1"
azure network vnet create --affinity-group "$2" -s "$subscriptionID" "$1"
else
logger "ERROR: invalid parameters for creating vnet group name=$1 affinity=$2"
fi
}
# $1 vm name $2 ssh port
vm_create() {
#check if the port was specified, for Windows this will be the RDP port
if [ ! -z "$2" ] ; then
ssh_port="$2"
else
ssh_port=$(( ( RANDOM % 65535 ) + 1024 ))
fi
if [ "$vmType" != "windows" ] ; then
logger "Creating Linux VM $1 with SSH port $ssh_port..."
#if a virtual network is specified
if [ "$virtualNetworkName" ] ; then
#uncomment to create at first deploy
#azure_create_group "$affinityGroup" "$azureLocation"
#azure_create_vnet "$virtualNetworkName" "$affinityGroup"
azure vm create \
-s "$subscriptionID" \
--connect "$dnsName" `#Deployment name` \
--vm-name "$1" \
--vm-size "$vmSize" \
`#--location 'West Europe'` \
--affinity-group "$affinityGroup" \
--virtual-network-name "$virtualNetworkName" \
`#--subnet-names "$subnetNames"` \
--ssh "$ssh_port" \
--ssh-cert "$sshCert" \
`#-v` \
`#'test-11'` `#DNS name` \
"$vmImage" \
"$userAloja" "$passwordAloja"
#no virtual network preference
else
azure vm create \
-s "$subscriptionID" \
--connect "$dnsName" `#Deployment name` \
--vm-name "$1" \
--vm-size "$vmSize" \
--location "$azureLocation" \
--ssh "$ssh_port" \
--ssh-cert "$sshCert" \
"$vmImage" \
"$userAloja" "$passwordAloja"
fi
else
logger "Creating Windows VM $1 with RDP port $ssh_port..."
azure vm create \
-s "$subscriptionID" \
--connect "$dnsName" `#Deployment name` \
--vm-name "$1" \
--vm-size "$vmSize" \
`#--location 'West Europe'` \
--affinity-group "$affinityGroup" \
--virtual-network-name "$virtualNetworkName" \
--subnet-names "$subnetNames" \
--rdp "$ssh_port" \
`#-v` \
`#'test-11'` `#DNS name` \
"$vmImage" \
"$userAloja" "$passwordAloja"
fi
#--location 'West Europe' \
}
# $1 vm name
vm_start() {
logger "Starting VM $1"
azure vm start "$1"
}
# $1 vm name
vm_reboot() {
logger "Rebooting VM $1"
azure vm restart "$1"
}
#$1 vm_name
vm_get_status(){
echo "$(azure vm show "$1" -s "$subscriptionID"|grep "InstanceStatus"|head -n +1|awk '{print substr($3,2,(length($3)-2));}')"
}
get_OK_status() {
echo "ReadyRole"
}
#$1 vm_name
number_of_attached_disks() {
numberOfDisks="$(azure vm disk list " $1 " |grep " $1"|wc -l)"
#substract the system volume
if [ -z "$numberOfDisks" ] ; then
numberOfDisks="$(( numberOfDisks - 1 ))"
fi
echo "$numberOfDisks"
}
#$1 vm_name $2 disk size in MB $3 disk number
vm_attach_new_disk() {
logger " Attaching a new disk #$3 to VM $1 of size ${2}GB"
azure vm disk attach-new "$1" "$2" -s "$subscriptionID"
}
#Azure uses a different key
get_ssh_key() {
echo "$ALOJA_SSH_KEY"
}
get_ssh_host() {
echo "${dnsName}.cloudapp.net"
}
#azure special case for ssh ids
get_vm_ssh_port() {
local node_ssh_port=''
if [ "$type" == "node" ] ; then
local node_ssh_port="$vm_ssh_port" #for Azure nodes
else #cluster auto id
for vm_id in $(seq -f "%02g" 0 "$numberOfNodes") ; do #pad the sequence with 0s
local vm_name_tmp="${clusterName}-${vm_id}"
local vm_ssh_port_tmp="2${clusterID}${vm_id}"
if [ ! -z "$vm_name" ] && [ "$vm_name" == "$vm_name_tmp" ] ; then
local node_ssh_port="2${clusterID}${vm_id}"
break #just return one
fi
done
fi
echo "$node_ssh_port"
}
#construct the port number from vm_name
get_ssh_port() {
local vm_ssh_port_tmp="$(get_vm_ssh_port)" #default port for the vagrant vm
if [ "$vm_ssh_port_tmp" ] ; then
echo "$vm_ssh_port_tmp"
else
die "cannot get SSH port for VM $vm_name"
fi
}
#$1 $endpoints list $2 end1 $3 end2
vm_check_endpoint_exists() {
echo $1 | grep $2 | grep $3
if [ "$?" -ne "0" ]; then
return 0
else
return 1
fi
}
vm_endpoints_create() {
endpointList=$(azure vm endpoint list $vm_name)
for endpoint in "${endpoints[@]}"
do
end1=$(echo $endpoint | cut -d: -f1)
end2=$(echo $endpoint | cut -d: -f2)
if vm_check_endpoint_exists "$endpointList" "$end1" "$end2"; then
echo "Adding endpoint $endpoint to $vm_name"
azure vm endpoint create "$vm_name" $end1 $end2
else
echo "Endpoint $end1:$end2 already exists"
fi
done
azure vm endpoint list "$vm_name"
}
vm_final_bootstratp() {
: #not necessary for Azure (yet)
}
### cluster functions
cluster_final_boostrap() {
: #not necessary for Azure (yet)
}
#interactive SSH
vm_connect_RDP() {
logger "Connecting to VM $vm_name, with details: RDP rdesktop -u $(get_ssh_user) -p xxx $(get_ssh_host):$(get_ssh_port)"
rdesktop -u "$(get_ssh_user)" -p "$passwordAloja" "$(get_ssh_host):$(get_ssh_port)"
}
###for executables
#1 $vm_name
node_connect() {
logger "Connecting to azure subscription $subscriptionID"
if [ "$vmType" != "windows" ] ; then
vm_connect
else
vm_connect_RDP
fi
}
#1 $vm_name
node_delete() {
logger "Deleting node $1 and its associated attached volumes"
azure vm delete -b -q "$1"
}
#1 $vm_name
node_stop() {
logger "Stopping vm $1"
azure vm shutdown "$1"
}
#1 $vm_name
node_start() {
logger "Starting VM $1"
azure vm start "$1"
}
get_extra_fstab() {
local create_string="/mnt /scratch/local none bind 0 0"
if [ "$clusterName" == "al-29" ] ; then
vm_execute "mkdir -p /scratch/ssd/1"
local create_string="$create_string
/mnt /scratch/ssd/1 none bind,nobootwait 0 0"
fi
echo -e "$create_string"
}
vm_final_bootstrap() {
logger "Checking if setting a static host file for cluster"
vm_set_statics_hosts
}
vm_set_statics_hosts() {
if [ "$clusterName" == "al-26" ] || [ "$clusterName" == "al-29" ] || [ "$clusterName" == "al-35" ]; then
logger "WARN: Setting statics hosts file for cluster"
vm_update_template "/etc/hosts" "$(get_static_hostnames)" "secured_file"
else
logger "INFO: no need to set static host file for cluster"
fi
}
get_static_hostnames() {
#a 'ip addr |grep inet |grep 10.'|sort
echo -e "
10.32.0.4 al-26-00
10.32.0.5 al-26-01
10.32.0.6 al-26-02
10.32.0.12 al-26-03
10.32.0.13 al-26-04
10.32.0.14 al-26-05
10.32.0.20 al-26-06
10.32.0.21 al-26-07
10.32.0.22 al-26-08
10.32.0.4 al-29-00
10.32.0.5 al-29-01
10.32.0.6 al-29-02
10.32.0.12 al-29-03
10.32.0.13 al-29-04
10.32.0.14 al-29-05
10.32.0.20 al-29-06
10.32.0.21 al-29-07
10.32.0.22 al-29-08
10.32.0.46 al-35-08
10.32.0.45 al-35-07
10.32.0.44 al-35-06
10.32.0.38 al-35-05
10.32.0.37 al-35-04
10.32.0.36 al-35-03
10.32.0.206 al-35-02
10.32.0.53 al-35-01
10.32.0.52 al-35-00
"
}
|
t-ivanov/aloja
|
aloja-deploy/providers/azure.sh
|
Shell
|
apache-2.0
| 7,830 |
echo "Deploying"
|
Hasreon/Hasreon
|
scripts/deploy.sh
|
Shell
|
artistic-2.0
| 16 |
#!/bin/sh
# gcc -w -Os -ansi -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o record.cgi -Ilibs/qdecoder/src/ ../receiver/record.c libs/qdecoder/src/libqdecoder.a
# gcc -w -Os -ansi -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o calc_kwh calc_kwh.c
# gcc -w -Os -ansi -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o canary canary.c
tcc -w -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o record.cgi -Ilibs/qdecoder/src/ ../receiver/record.c /usr/local/lib/libqdecoder.a -lcrypto -lsqlite3
tcc -w -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o calc_kwh calc_kwh.c -lsqlite3
tcc -w -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_THREADSAFE=0 -o canary canary.c -lsqlite3
|
markerr/lunar-remote-monitoring-system
|
system/makeit.sh
|
Shell
|
bsd-2-clause
| 818 |
#!/bin/sh
cd "$(dirname "$0")"
rm .coverage 2> /dev/null
tox $*
EXITCODE=$?
[ -f .coverage ] && coverage report -m
echo "\ntox exited with code: $EXITCODE\n"
exit $EXITCODE
|
un-def/django-janyson
|
runtests.sh
|
Shell
|
bsd-2-clause
| 174 |
#!/bin/bash
# Daemon reload
systemctl --system daemon-reload
# Stop service
deb-systemd-invoke stop httpserver.service
# Purge
deb-systemd-helper purge httpserver.service
deb-systemd-helper unmask httpserver.service
|
djthorpe/gopi
|
etc/nfpm/httpserver-preremove.sh
|
Shell
|
bsd-2-clause
| 223 |
#!/bin/sh
on_crash_status()
{
local _ret=0
case "${on_crash}" in
restart)
_ret=1
;;
destroy)
_ret=0
;;
*)
logger -t bhyverun.sh "unknown value for on_poweroff: ${on_poweroff}"
_ret=0 # use default behavior
;;
esac
return ${_ret}
}
# FreeBSD 11
# EXIT STATUS
# Exit status indicates how the VM was terminated:
# 0 rebooted
# 1 powered off
# 2 halted
# 3 triple fault
# FreeBSD 12+
# 4 exited due to an error
# route for exit codes and exit_action:
# on_poweroff='destroy'
# on_reboot='restart'
# on_crash='destroy'
# return 0 when we should stop bhyve loop
# return 1 when show must go on
exit_action_mode()
{
local _ret
if [ ${exit_action} = "0" -a ${bhyve_exit} -eq 0 ]; then
# no exit_action mode but normal reboot
return 1
fi
[ "${exit_action}" != "1" ] && return 0
# use on_poweroff/on_reboot/on_crash settings
logger -t bhyverun.sh "in exit_action mode"
_ret=0
case ${bhyve_exit} in
0)
case "${on_reboot}" in
restart)
_ret=1
;;
destroy)
_ret=0
;;
*)
logger -t bhyverun.sh "unknown value for on_reboot: ${on_reboot}"
_ret=1 # use default behavior
;;
esac
logger -t bhyverun.sh "bhyve ${jname} was rebooted, exit_action_mode ret: ${_ret}"
;;
1)
case "${on_poweroff}" in
restart)
_ret=1
;;
destroy)
_ret=0
;;
*)
logger -t bhyverun.sh "unknown value for on_poweroff: ${on_poweroff}"
_ret=0 # use default behavior
;;
esac
logger -t bhyverun.sh "bhyve ${jname} was poweroff, exit_action_mode ret: ${_ret}"
;;
2)
on_crash_status
_ret=$?
logger -t bhyverun.sh "bhyve ${jname} was halted, exit_action_mode ret: ${_ret}"
;;
3)
on_crash_status
_ret=$?
logger -t bhyverun.sh "bhyve ${jname} was tripple fault, exit_action_mode ret: ${_ret}"
;;
4)
on_crash_status
_ret=$?
logger -t bhyverun.sh "bhyve ${jname} exited due to an error, exit_action_mode ret: ${_ret}"
;;
*)
on_crash_status
_ret=$?
logger -t bhyverun.sh "bhyve ${jname} exited with unknown error ${bhyve_exit}, exit_action_mode ret: ${_ret}"
;;
esac
return ${_ret}
}
while getopts "c:d:e:g:l:r:w:" opt; do
case "${opt}" in
c) conf="${OPTARG}" ;;
d) debug="${OPTARG}" ;;
e) exit_action="${OPTARG}" ;;
g) debug_engine="${OPTARG}" ;;
l) orig_logfile="${OPTARG}" ;;
r) restore_checkpoint="${OPTARG}" ;;
w) workdir="${OPTARG}" ;;
esac
shift $(($OPTIND - 1))
done
[ -z "${debug_engine}" ] && debug_engine="none"
[ -z "${xhci}" ] && xhci=0
[ -z "${hda}" ] && hda="none"
[ -z "${exit_action}" ] && exit_action=0 # use on_poweroff/on_reboot/on_crash settings: disabled by default
[ ! -f "${conf}" ] && exit 0
. ${conf}
# jailed process?
jailed=$( sysctl -qn security.jail.jailed 2>/dev/null )
[ -z "${jailed}" ] && jailed=0
[ -n "${orig_logfile}" ] && vm_logfile="${orig_logfile}"
if [ -n "${restore_checkpoint}" ]; then
if [ ! -r ${restore_checkpoint} ]; then
echo "No checkpoint here: ${restore_checkpoint}"
exit 1
fi
fi
detach=
[ "${2}" = "-d" ] && detach="-d"
[ -f /tmp/bhyvestop.${jname}.lock ] && /bin/rm -f /tmp/bhyvestop.${jname}.lock
if [ -z "${workdir}" ]; then
[ -z "${cbsd_workdir}" ] && . /etc/rc.conf
if [ -z "${cbsd_workdir}" ]; then
echo "No cbsd workdir defined"
exit 1
else
workdir="${cbsd_workdir}"
fi
fi
orig_vnc_args="${vnc_args}"
. /usr/local/cbsd/cbsd.conf
. ${subr} # readconf
# mod_cbsd_queue_enabled?
. ${inventory}
if [ "${mod_cbsd_queue_enabled}" = "YES" -a -z "${MOD_CBSD_QUEUE_DISABLED}" ]; then
readconf cbsd_queue.conf
[ -z "${cbsd_queue_backend}" ] && MOD_CBSD_QUEUE_DISABLED="1"
fi
while [ ! -f /tmp/bhyvestop.${jname}.lock ]; do
vnc_args="${orig_vnc_args}"
/usr/sbin/bhyvectl --vm=${jname} --destroy > /dev/null 2>&1
/usr/bin/truncate -s0 ${vm_logfile}
if [ ${cd_boot_once} -eq 0 ]; then
echo "DEBUG: ${bhyveload_cmd}" | /usr/bin/tee -a ${vm_logfile}
eval "${bhyveload_cmd}" 2>&1 | /usr/bin/tee -a ${vm_logfile}
else
echo "Boot from CD" | /usr/bin/tee -a ${vm_logfile}
echo "DEBUG: ${bhyveload_cmd}" | /usr/bin/tee -a ${vm_logfile}
eval "${bhyveload_cmd}" 2>&1 | /usr/bin/tee -a ${vm_logfile}
fi
case "${vm_boot}" in
"cd")
# add ,wait args when boot from CD
if [ "${vm_efi}" != "none" ]; then
if [ -n "${vnc_args}" -a "${vm_vnc_port}" != "1" ]; then
#orig_vnc_args="${vnc_args}"
# bhyve_vnc_vgaconf before wait
if [ "${bhyve_vnc_vgaconf}" != "io" ]; then
[ -n "${bhyve_vnc_vgaconf}" ] && vnc_args="${vnc_args},vga=${bhyve_vnc_vgaconf}"
fi
#orig_vnc_args="${vnc_args}"
if [ "${cd_vnc_wait}" = "1" ]; then
echo "Waiting for first connection via VNC to starting VMs..."
vnc_args="${vnc_args},wait"
fi
fi
fi
;;
*)
# bhyve_vnc_vgaconf before wait
if [ "${bhyve_vnc_vgaconf}" != "io" ]; then
[ -n "${bhyve_vnc_vgaconf}" ] && vnc_args="${vnc_args},vga=${bhyve_vnc_vgaconf}"
fi
esac
if [ ${jailed} -eq 0 ]; then
for i in ${mytap}; do
/sbin/ifconfig ${i} up
done
fi
[ ${freebsdhostversion} -lt 1100120 ] && vm_vnc_port=1 # Disable xhci on FreeBSD < 11
if [ "${vm_efi}" != "none" ]; then
if [ -n "${vm_vnc_port}" -a "${vm_vnc_port}" != "1" ]; then
if [ ${xhci} -eq 1 ]; then
xhci_args="-s 30,xhci,tablet"
else
xhci_args=
fi
# VNC password support introduced in FreeBSD 11.1+
if [ ${freebsdhostversion} -gt 1101500 ]; then
if [ -n "${vnc_password}" ]; then
vnc_args="${vnc_args},password=${vnc_password}"
fi
fi
else
xhci_args=""
fi
fi
add_bhyve_opts="-H" # Yield the virtual CPU thread when a HLT instruction is detected.
[ "${bhyve_generate_acpi}" = "1" ] && add_bhyve_opts="${add_bhyve_opts} -A"
[ "${bhyve_wire_memory}" = "1" -o -n "${pci_passthru_args}" ] && add_bhyve_opts="${add_bhyve_opts} -S"
[ "${bhyve_rts_keeps_utc}" = "1" ] && add_bhyve_opts="${add_bhyve_opts} -u"
[ "${bhyve_force_msi_irq}" = "1" ] && add_bhyve_opts="${add_bhyve_opts} -W"
[ "${bhyve_x2apic_mode}" = "1" ] && add_bhyve_opts="${add_bhyve_opts} -x"
[ "${bhyve_mptable_gen}" = "0" ] && add_bhyve_opts="${add_bhyve_opts} -Y" # disable mptable gen
[ "${bhyve_ignore_msr_acc}" = "1" ] && add_bhyve_opts="${add_bhyve_opts} -w"
if [ -n "${soundhw_args}" ]; then
if [ "${soundhw_args}" = "none" -o ${freebsdhostversion} -lt 1300034 ]; then
soundhw_args=
fi
fi
checkpoint_args=
[ -n "${restore_checkpoint}" ] && checkpoint_args="-r ${restore_checkpoint}"
if [ -n "${live_migration_args}" ]; then
# check that this is for me
if [ ! -r ${jailsysdir}/${jname}/live_migration.conf ]; then
live_migration_args=
break
else
. ${jailsysdir}/${jname}/live_migration.conf
my_hostname=$( cat ${workdir}/nodename | awk '{printf $1}' )
if [ "${my_hostname}" = "${live_migration_dst_nodename}" ]; then
# this is for me!
live_migration_args="-R ${live_migration_args}"
else
# this is not for me!
live_migration_args=
fi
fi
fi
bhyve_cmd="env LIB9P_LOGGING=/tmp/cbsd_lib9p.log /usr/bin/nice -n ${nice} /usr/sbin/bhyve ${bhyve_flags} -c ${vm_cpus} -m ${vm_ram} ${add_bhyve_opts} ${hostbridge_args} ${virtio_9p_args} ${uefi_boot_args} ${dsk_args} ${dsk_controller_args} ${cd_args} ${nic_args} ${nvme_args} ${virtiornd_args} ${pci_passthru_args} ${vnc_args} ${xhci_args} ${soundhw_args} ${lpc_args} ${console_args} ${efi_args} ${checkpoint_args} ${live_migration_args} ${jname}"
debug_bhyve_cmd="env LIB9P_LOGGING=/tmp/cbsd_lib9p.log /usr/sbin/bhyve ${bhyve_flags} -c ${vm_cpus} -m ${vm_ram} ${add_bhyve_opts} ${hostbridge_args} ${virtio_9p_args} ${uefi_boot_args} ${dsk_args} ${dsk_controller_args} ${cd_args} ${nic_args} ${nvme_args} ${virtiornd_args} ${pci_passthru_args} ${vnc_args} ${xhci_args} ${soundhw_args} ${lpc_args} ${console_args} ${efi_args} ${checkpoint_args} ${live_migration_args} ${jname}"
echo "[debug] ${bhyve_cmd}"
logger -t bhyverun.sh "[debug] ${bhyve_cmd}"
echo "cmd: ${bhyve_cmd}" >> ${vm_logfile}
echo "-----" >> ${vm_logfile}
bhyve_exit=0
# triggering to update process id
/usr/local/bin/cbsd task mode=new "sleep 5; /usr/local/bin/cbsd bset jname=${jname} vm_pid=auto"
case "${debug_engine}" in
gdb)
if [ -x /usr/local/bin/gdb ]; then
gdb_cmd="/usr/local/bin/gdb"
elif [ -x /usr/libexec/gdb ]; then
gdb_cmd="/usr/libexec/gdb"
elif [ -x /usr/bin/gdb ]; then
gdb_cmd="/usr/bin/gdb"
fi
# break while loop
touch /tmp/bhyvestop.${jname}.lock
echo
echo "Warning"
echo "Run bhyve throuch GDB. Please execute 'run' to launch bhyve instance"
echo
echo "/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock ${gdb_cmd} -batch --args ${debug_bhyve_cmd}"
/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock ${gdb_cmd} -ex run --args ${debug_bhyve_cmd}
bhyve_exit=$?
;;
lldb)
# break while loop
touch /tmp/bhyvestop.${jname}.lock
echo
echo "Warning"
echo "Run bhyve throuch LLDB. Please execute 'run' to launch bhyve instance"
echo
echo "/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock /usr/bin/lldb -- ${debug_bhyve_cmd}"
/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock /usr/bin/lldb -- ${debug_bhyve_cmd}
bhyve_exit=$?
;;
*)
/usr/bin/lockf -s -t0 /tmp/bhyveload.${jname}.lock ${bhyve_cmd} >> ${vm_logfile} 2>&1
bhyve_exit=$?
;;
esac
ret=0
exit_action_mode
ret=$?
if [ ${ret} -eq 0 ]; then
# exit from loop
touch /tmp/bhyvestop.${jname}.lock
echo "bhyve exit code: ${bhyve_exit}. exit_action settings: ${exit_action}, exit_action_mode ret: ${ret}: must stoppped"
logger -t bhyverun.sh "bhyve exit code: ${bhyve_exit}. exit_action settings: ${exit_action}, exit_action_mode ret: ${ret}: must stopped"
case ${bhyve_exit} in
0|1)
# normal exit
/bin/rm -f ${vm_logfile}
;;
*)
# bhyve error or crash
echo "See ${vm_logfile} for details"
echo
/usr/bin/tail -n50 ${vm_logfile}
echo "Sleep 1 seconds..."
sleep 1
esac
else
echo "bhyve exit code: ${bhyve_exit}. exit_action settings: ${exit_action}, exit_action_mode ret: ${ret}: must continue"
logger -t bhyverun.sh "bhyve exit code: ${bhyve_exit}. exit_action settings: ${exit_action}, exit_action_mode ret: ${ret}: must continue"
fi
# restore original value
[ -n "${orig_vnc_args}" ] && vnc_args="${orig_vnc_args}"
if [ ${cd_boot_once} -eq 1 ]; then
# Eject cd
cd_boot_once=0
vm_boot="hdd"
[ -n "${bhyveload_cmd_once}" ] && bhyveload_cmd="${bhyveload_cmd_once}"
# replace hdd boot in conf
/usr/sbin/sysrc -qf ${conf} cd_boot_once=0
/usr/sbin/sysrc -qf ${conf} vm_boot=hdd
/usr/sbin/sysrc -qf ${conf} bhyveload_cmd="${bhyveload_cmd}"
# remove CD string for EFI
if [ "${vm_efi}" != "none" ]; then
if [ -n "${cd_args2}" ]; then
/usr/sbin/sysrc -qf ${conf} cd_args="${cd_args2}"
cd_args="${cd_args2}"
else
/usr/sbin/sysrc -qf ${conf} cd_args=""
unset cd_args
fi
else
/usr/sbin/sysrc -qf ${conf} cd_args=""
unset cd_args
fi
fi
reset
clear
done
# live migration todo
# check for bhyve migrated successful to me ( bregister and/or bstatus passed ? )
# bhyverun.sh QUEUE
[ -z "${cbsd_queue_name}" ] && cbsd_queue_name="/clonos/bhyvevms/"
if [ -x "${moduledir}/cbsd_queue.d/cbsd_queue" ]; then
[ "${cbsd_queue_name}" != "none" ] && [ "${cbsd_queue_name}" != "none" ] && /usr/local/bin/cbsd cbsd_queue cbsd_queue_name=${cbsd_queue_name} id=${jname} cmd=bstop progress=1 data_status=1
sleep 0.3 # timeout for web socket
[ "${cbsd_queue_name}" != "none" ] && /usr/local/bin/cbsd cbsd_queue cbsd_queue_name=${cbsd_queue_name} id=${jname} cmd=bstop progress=100 data_status=0
fi
# extra destroy
/usr/bin/nice -n ${nice} /usr/sbin/bhyvectl --vm=${jname} --destroy > /dev/null 2>&1 || true
/bin/rm -f /tmp/bhyvestop.${jname}.lock
# extra stop/cleanup
/usr/local/bin/cbsd bstop cbsd_queue_name=none jname=${jname}
exit ${bhyve_exit}
|
mergar/cbsd
|
share/bhyverun.sh
|
Shell
|
bsd-2-clause
| 11,944 |
#!/usr/bin/env sh
# test_net_seg.bin test_proto pre_train_model label.txt outputfolder [CPU/GPU]
ROOTFILE=/home/dragon123/3dnormal_joint_cnncode/caffe-3dnormal_joint
GLOG_logtostderr=1 /home/dragon123/3dnormal_joint_cnncode/caffe-3dnormal_joint_past/build/tools/test_net_3dnormal_locedgetxt.bin seg_test_2fc_3dnormal_edge.prototxt /home/dragon123/3dnormal_joint_cnncode/models/local_model/3dnormal__iter_280000 /home/dragon123/3dnormal_joint_cnncode/imgfile.txt /home/dragon123/3dnormal_joint_cnncode/slide_results/txts
|
xiaolonw/caffe-3dnormal_joint_past
|
jointscript/loc_slide_window/test_3dnet_localtxt_edge.sh
|
Shell
|
bsd-2-clause
| 627 |
#! /usr/bin/env bash
for ((i = 0; i < 10; i++)); do
java Network -q machine random
done
echo $SECONDS
|
jrgoldfinemiddleton/cs61b
|
pj2/networkTest.sh
|
Shell
|
bsd-2-clause
| 105 |
if [ -d ~/.shearch ]
then
echo "\033[0;31mYou already have shearch installed.\033[0m You'll need to remove ~/.shearch if you want to reinstall it."
return 1
fi
echo "\033[0;32mCloning shearch...\033[0m"
hash git >/dev/null && /usr/bin/env git clone https://github.com/shearch/shearch.git ~/.shearch || {
echo "git not installed"
return 1
}
response=1
# If this stays 1, then we were unable to bind key.
f_keys()
{
FKEY[$((SH_J))]="\e[OP~"
FKEY[$((SH_J + 1))]="\e[OQ~"
FKEY[$((SH_J + 2))]="\e[OR~"
FKEY[$((SH_J + 3))]="\e[OS~"
FKEY[$((SH_J + 4))]="\e[15~"
FKEY[$((SH_J + 5))]="\e[17~"
FKEY[$((SH_J + 6))]="\e[18~"
FKEY[$((SH_J + 7))]="\e[19~"
FKEY[$((SH_J + 8))]="\e[20~"
FKEY[$((SH_J + 9))]="\e[21~"
FKEY[$((SH_J + 10))]="\e[23~"
FKEY[$((SH_J + 11))]="\e[24~"
FKEY[$((SH_J + 12))]="-1"
}
sf_keys()
{
FKEY[$((SH_J))]="\e[1;2P~"
FKEY[$((SH_J + 1))]="\e[1;2Q~"
FKEY[$((SH_J + 2))]="\e[1;2R~"
FKEY[$((SH_J + 3))]="\e[1;2S~"
FKEY[$((SH_J + 4))]="\e[15;2~"
FKEY[$((SH_J + 5))]="\e[17;2~"
FKEY[$((SH_J + 6))]="\e[18;2~"
FKEY[$((SH_J + 7))]="\e[19;2~"
FKEY[$((SH_J + 8))]="\e[20;2~"
FKEY[$((SH_J + 9))]="\e[21;2~"
FKEY[$((SH_J + 10))]="\e[23;2~"
FKEY[$((SH_J + 11))]="\e[24;2~"
FKEY[$((SH_J + 12))]="-1"
}
bash_key_get()
{
total=${#FKEY[*]}
total=$((total + SH_J))
for (( i=$SH_J; i<$(( $total )); i++ ))
do
if [ "$SH_HOTKEY" = ${FKEY[$i]} ]; then
return $((i + SH_O))
fi
done
return -1
}
parse_key()
{
f_keys
bash_key_get
res=$?
if [ $res -ge 1 ] && [ $res -le 12 ]; then
echo "F${res}"
return 0
fi
sf_keys
bash_key_get
res=$?
if [ $res -ge 1 ] && [ $res -le 12 ]; then
echo "Shift + F${res}"
return 0
fi
echo ""
echo "Installer can map only 'F' keys and Shitf + 'F' keys at the moment."
return 1
}
map_key()
{
# Read user key from installer's argument.
echo -ne "\033[0;32mBindkey: \033[0m"
if [ "${SH_HOTKEY:0:1}" = "F" ]; then
f_keys
f_off=$((${SH_HOTKEY:1} - $SH_O))
if [ $f_off -ge $SH_S ] && [ $f_off -le $SH_E ]; then
SH_HOTKEY=${FKEY[$f_off]}
printf "F%s\n" $(($f_off + $SH_O))
return 0
else
echo "Selected key is out of range."
fi
elif [ "${SH_HOTKEY:0:1}" = "S" ]; then
sf_keys
f_off=$((${SH_HOTKEY:2} - $SH_O))
if [ $f_off -ge $SH_S ] && [ $f_off -le $SH_E ]; then
SH_HOTKEY=${FKEY[$f_off]}
printf "Shift + F%s\n" $(($f_off + $SH_O))
return 0
else
echo "Selected key is out of range."
fi
else
echo "Installer can map only 'F' keys and Shift + 'F' keys at the moment."
fi
return 1
}
read_key()
{
# Read user key from stdin.
echo -ne "\033[0;32mEnter your hotkey and press <RETURN>: \033[0m"
# http://ss64.com/bash/read.html
read -s SH_HOTKEY
if [ -z "$SH_HOTKEY" ]; then
echo ""
echo "You did not enter vaild key, defaulting to F12."
SH_HOTKEY="\e[24~"
return 0
elif [ ${SH_HOTKEY:0:1} = "" ]; then
SH_HOTKEY="\e${SH_HOTKEY:1}"
fi
parse_key
return $?
}
sh_common()
{
echo $SH_NAME
echo -ne "\033[0;32mChecking for configuration file... \033[0m"
if [ -f "$SH_CONFIG" ] || [ -h "$SH_CONFIG" ]; then
echo "$SH_CONFIG"
else
echo "not found!"
echo -e "\033[0;32mCreating new configuration file.\033[0m"
touch "$SH_CONFIG"
fi
HK_FOUND=$(grep -m 1 -x "$SH_HOTLINE" "$SH_CONFIG")
}
hk_bash()
{
sh_common
if [ -n "$HK_FOUND" ]; then
[[ $HK_FOUND =~ $SH_REGEX ]]
name="${BASH_REMATCH[1]}"
echo -ne "\033[0;31mYou already have key of shearch bound to... \033[0m"
SH_HOTKEY="${name}"
parse_key
if [ $? -eq 1 ]; then
echo "You might have already set your but we cannot tell which one :(."
fi
return 2
else
SH_J=0 # Index of first element in an array.
SH_O=1 # Offset for F keys.
SH_S=0 # Start position of F keys
SH_E=11 # End position of F keys
if [ -n "$SH_HOTKEY" ]; then
map_key
response=$?
else
read_key
response=$?
fi
fi
if [ $response -eq 0 ]; then
shortcut="bind '\"${SH_HOTKEY}\": \"\`python ~/.shearch/src/shearch.py 3>&1 1>&2\`\\e\\C-e\"'"
printf "\n%s\n" "$shortcut" >> "$SH_CONFIG"
return 0
fi
return 1
}
hk_zsh()
{
sh_common
if [ -n "$HK_FOUND" ]; then
[[ $HK_FOUND =~ $SH_REGEX ]]
name="${match[1]}"
echo -ne "\033[0;31mYou already have key of shearch bound to... \033[0m"
SH_HOTKEY="${name}"
parse_key
if [ $? -eq 1 ]; then
echo "You might have already set your but we cannot tell which one :(."
fi
return 2
else
typeset -A keymap
SH_J=1 # Index of first element in an array.
SH_O=0 # Offset for F keys.
SH_S=1 # Start position of F keys
SH_E=12 # End position of F keys
if [ -n "$SH_HOTKEY" ]; then
map_key
response=$?
else
read_key
response=$?
fi
fi
if [ $response -eq 0 ]; then
echo "shpush()\n{\n TMP_OUT=\$(~/.shearch/src/shearch.py 3>&1 1>&2)\n print -z \$TMP_OUT\n}" >> "$SH_CONFIG"
shortcut="bindkey -s \"${SH_HOTKEY}\" \" shpush\\n\""
printf "\n%s\n" "$shortcut" >> "$SH_CONFIG"
return 0
fi
return 1
}
if [ -z "$1" ]; then
SH_HOTKEY=""
else
SH_HOTKEY="$(echo ${1} | tr '[:lower:]' '[:upper:]')"
fi
echo -ne "\033[0;32mDetecthing shell... \033[0m"
if [ "$ZSH_VERSION" ]; then
SH_NAME="zsh"
SH_VERSION="$ZSH_VERSION"
SH_CONFIG=~/.zshrc
SH_HOTLINE="^bindkey -s \".*\" \" shpush\\\n\"$"
SH_REGEX="^bindkey -s \"(.*)\" \" shpush\\\n\"$"
hk_zsh
response=$?
elif [ "$BASH_VERSION" ]; then
SH_NAME="bash"
SH_VERSION="$BASH_VERSION"
SH_CONFIG=~/.bashrc
SH_HOTLINE="^bind '\".*\": \"\`python ~/.shearch/src/shearch.py 3>&1 1>&2\`\\\e\\\C-e\"'$"
SH_REGEX="^bind '\"(.*)\": \"\`python ~/.shearch/src/shearch.py 3>&1 1>&2\`\\\e\\\C-e\"'$"
hk_bash
response=$?
else
SH_NAME="other"
SH_VERSION="-1"
SH_CONFIG=""
echo $SH_NAME
echo "Unable to bound key shortcut. You will have to do it manually or use shearch without shortcut."
fi
if [ $response -eq 2 ]; then
return 1
fi
# http://patorjk.com/software/taag/#p=display&f=Star%20Wars&t=shearch
echo -e "\033[1;33;40m"' _______. __ _______ ___ .______ ______ __ __ '"\033[0m"
echo -e "\033[1;33;40m"' / || | | ____| / \ | _ \ / || | | |'"\033[0m"
echo -e "\033[1;33;40m"' | (----`| |_____ | |__ / ^ \ | |_) | | ,----;| |__| |'"\033[0m"
echo -e "\033[1;33;40m"' \ \ | __ | | __| / /_\ \ | / | | | __ |'"\033[0m"
echo -e "\033[1;33;40m"'.----) | | | | | | |____ / _____ \ | |\ \----.| `----.| | | |'"\033[0m"
echo -e "\033[1;33;40m"'|_______/ |__| |__| |_______/__/ \__\ | _| `._____| \______||__| |__|'"\033[0m"
echo -e "\033[1;33;40m"' '"\033[0m"
# http://www.sloganmaker.com/
echo -e "\033[0;33;40m"' It"s not a secret when you have shearch. '"\033[0m"
# shearch is degenerated, noxious and depraved. # Hate Sloganmaker
echo -e "\033[0;33;40m"'...is now installed. '"\033[0m"
if [ $response -eq 1 ]; then
echo -e "\033[0;31mshearch has been installed successfully but we were unable to bind your key\033[0m"
fi
. "$SH_CONFIG"
|
shearch/shearch
|
tools/install.sh
|
Shell
|
bsd-3-clause
| 7,133 |
#! /bin/sh
# $Id: iptables_init_and_clean.sh,v 1.3 2012/03/05 20:36:19 nanard Exp $
# Improved Miniupnpd iptables init script.
# Checks for state of filter before doing anything..
EXTIF=eth0
IPTABLES=/sbin/iptables
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`"
NDIRTY="`LC_ALL=C /sbin/iptables -t nat -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
FDIRTY="`LC_ALL=C /sbin/iptables -t filter -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`"
echo "External IP = $EXTIP"
if [[ $NDIRTY = "MINIUPNPDChain" ]]; then
echo "Nat table dirty; Cleaning..."
$IPTABLES -t nat -F MINIUPNPD
elif [[ $NDIRTY = "Chain" ]]; then
echo "Dirty NAT chain but no reference..? Fixsted."
$IPTABLES -t nat -A PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD
$IPTABLES -t nat -F MINIUPNPD
else
echo "NAT table clean..initalizing.."
$IPTABLES -t nat -N MINIUPNPD
$IPTABLES -t nat -A PREROUTING -d $EXTIP -i $EXTIF -j MINIUPNPD
fi
if [[ $FDIRTY = "MINIUPNPDChain" ]]; then
echo "Filter table dirty; Cleaning..."
$IPTABLES -t filter -F MINIUPNPD
elif [[ $FDIRTY = "Chain" ]]; then
echo "Dirty filter chain but no reference..? Fixsted."
$IPTABLES -t filter -I FORWARD 4 -i $EXTIF ! -o $EXTIF -j MINIUPNPD
$IPTABLES -t filter -F MINIUPNPD
else
echo "Filter table clean..initalizing.."
$IPTABLES -t filter -N MINIUPNPD
$IPTABLES -t filter -I FORWARD 4 -i $EXTIF ! -o $EXTIF -j MINIUPNPD
fi
|
zoltan/miniupnp
|
netfilter/iptables_init_and_clean.sh
|
Shell
|
bsd-3-clause
| 1,529 |
#!/bin/bash
#SBATCH -N 2
#SBATCH -t 00:10:00
#SBATCH -J hubio
#SBATCH -o %j.out
#SBATCH -e %j.err
#SBATCH -C haswell
#SBATCH -p debug
#i=1100000 1100000, 1200000, 1300000, 1400000, 1401000, knl cpu frequencies
freq=2300000 #1200000 # 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1900000, 2000000, 2100000, 2200000, 2300000, 2301000, haswell cpu frequencies
nodes=2
rank_per_node=32
nprocs=$(($nodes * $rank_per_node))
cbn=2 #Aggregators 32
cbs=16777216 #Collective Buffer size 16MB
iscollective=0 #Collective IO
unit=2000
dimx=$(($unit * $nprocs)) #Size of X dimension
dimy=102400 #Size of Y dimension
size_per_proc=$(($dimx * $dimy)) # 1.52GB
SCRATCH_OLD=/global/cscratch1/sd/jialin
lost=72
hostpartion=has
directio=1 #1 for direct io, 0 for io offloading
filename=/global/cscratch1/sd/jialin/hdf-data/ost${lost}/${hostpartion}/test_${hostpartion}_${nprocs}_${freq}_${directio}.h5
var=`scontrol show -d hostname | awk '{ $1 = substr($1, 4, 5) } 1'`
arr=($var)
hasmax=${arr[$((($nodes-1)/2))]}
knlmax=${arr[$(($nodes-1))]}
echo $hasmax
echo $knlmax
rm $SCRATCH_OLD/hdf-data/ost${lost}/${hostpartion}/*
#Test original IO
srun --cpu-freq=$freq --tasks-per-node=32 -n $nprocs ./test_get_procid -f $filename -b $cbs -n $cbn -k $iscollective -x $dimx -y $dimy -l $hasmax -m $knlmax -d $directio
#h5dump -H $filename
#lfs getstripe $filename
#Test IO Offloading
#directio=0
#filename=$SCRATCH_OLD/hdf-data/ost${lost}/${hostpartion}/test_${hostpartion}_${nprocs}_${freq}_${directio}.h5
#srun --cpu-freq=$freq --tasks-per-node=32 -n $nprocs ./test_get_procid -f $filename -b $cbs -n $cbn -k $iscollective -x $dimx -y $dimy -l $hasmax -m $knlmax -d $directio
#h5dump -H $filename
#lfs getstripe $filename
|
NERSC/heterogeneous-IO
|
io/datahub/hub.sh
|
Shell
|
bsd-3-clause
| 1,747 |
#!/bin/bash
NUM=$1
RHOST=127.0.0.1
RPORT=22222
[ -f /etc/sysconfig/rtpproxy_benchmark ] && . . /etc/sysconfig/rtpproxy_benchmark
for i in `seq 1 ${NUM}`
do
HPORT=$((8080+i))
/usr/bin/rtpproxy_monitoring -syslog=false -hport=${HPORT} -rhost="${RHOST}" -rport="${RPORT}" -ptype=8 -psize=160 -htime=60 -hsize=10 > /dev/null 2>&1 &
done
|
lemenkov/rtpproxy_monitoring
|
rtpproxy_benchmark.sh
|
Shell
|
bsd-3-clause
| 339 |
#!/bin/sh
python manage.py migrate djcelery
celery -A remo beat -l INFO
|
tsmrachel/remo
|
bin/run-celery-beat.sh
|
Shell
|
bsd-3-clause
| 73 |
#!/bin/bash -e
install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
if [ -n "$APT_PROXY" ]; then
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
sed "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -i -e "s|APT_PROXY|${APT_PROXY}|"
else
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
fi
on_chroot apt-key add - < files/raspberrypi.gpg.key
on_chroot << EOF
apt-get update
apt-get dist-upgrade -y
EOF
|
jacen92/pi-gen
|
stage0/00-configure-apt/00-run.sh
|
Shell
|
bsd-3-clause
| 654 |
#!/bin/sh
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
#
# This file is part the FLAC project. FLAC is comprised of several
# components distributed under difference licenses. The codec libraries
# are distributed under Xiph.Org's BSD-like license (see the file
# COPYING.Xiph in this distribution). All other programs, libraries, and
# plugins are distributed under the GPL (see COPYING.GPL). The documentation
# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
# FLAC distribution contains at the top the terms under which it may be
# distributed.
#
# Since this particular file is relevant to all components of FLAC,
# it may be distributed under the Xiph.Org license, which is the least
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
die ()
{
echo $* 1>&2
exit 1
}
if [ x = x"$1" ] ; then
BUILD=debug
else
BUILD="$1"
fi
LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$((RANDOM % 255 + 1))
PATH=../src/flac:$PATH
PATH=../src/test_streams:$PATH
PATH=../obj/$BUILD/bin:$PATH
if [ x"$FLAC__TEST_LEVEL" = x ] ; then
FLAC__TEST_LEVEL=1
fi
flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac ()
{
if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 flac $*" >>test_streams.valgrind.log
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 flac $* 4>>test_streams.valgrind.log
else
flac $*
fi
}
echo "Generating streams..."
if [ ! -f wacky1.wav ] ; then
test_streams || die "ERROR during test_streams"
fi
#
# single-file test routines
#
test_file ()
{
name=$1
channels=$2
bps=$3
encode_options="$4"
echo -n "$name (--channels=$channels --bps=$bps $encode_options): encode..."
cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding $name.raw"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
$cmd 2>>./streams.log || die "ERROR during encode of $name"
echo -n "decode..."
cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --output-name=$name.cmp $name.flac"
echo "### DECODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
$cmd 2>>./streams.log || die "ERROR during decode of $name"
ls -1l $name.raw >> ./streams.log
ls -1l $name.flac >> ./streams.log
ls -1l $name.cmp >> ./streams.log
echo -n "compare..."
cmp $name.raw $name.cmp || die "ERROR during compare of $name"
echo OK
}
test_file_piped ()
{
name=$1
channels=$2
bps=$3
encode_options="$4"
if [ `env | grep -ic '^comspec='` != 0 ] ; then
is_win=yes
else
is_win=no
fi
echo -n "$name: encode via pipes..."
if [ $is_win = yes ] ; then
cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding --stdout $name.raw"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
$cmd 1>$name.flac 2>>./streams.log || die "ERROR during encode of $name"
else
cmd="run_flac --verify --silent --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options --no-padding --stdout -"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
cat $name.raw | $cmd 1>$name.flac 2>>./streams.log || die "ERROR during encode of $name"
fi
echo -n "decode via pipes..."
if [ $is_win = yes ] ; then
cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --stdout $name.flac"
echo "### DECODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
$cmd 1>$name.cmp 2>>./streams.log || die "ERROR during decode of $name"
else
cmd="run_flac --silent --force --endian=little --sign=signed --decode --force-raw-format --stdout -"
echo "### DECODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
cat $name.flac | $cmd 1>$name.cmp 2>>./streams.log || die "ERROR during decode of $name"
fi
ls -1l $name.raw >> ./streams.log
ls -1l $name.flac >> ./streams.log
ls -1l $name.cmp >> ./streams.log
echo -n "compare..."
cmp $name.raw $name.cmp || die "ERROR during compare of $name"
echo OK
}
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
max_lpc_order=32
else
max_lpc_order=16
fi
echo "Testing noise through pipes..."
test_file_piped noise 1 8 "-0"
echo "Testing small files..."
test_file test01 1 16 "-0 -l $max_lpc_order --lax -m -e -p"
test_file test02 2 16 "-0 -l $max_lpc_order --lax -m -e -p"
test_file test03 1 16 "-0 -l $max_lpc_order --lax -m -e -p"
test_file test04 2 16 "-0 -l $max_lpc_order --lax -m -e -p"
for bps in 8 16 24 ; do
echo "Testing $bps-bit full-scale deflection streams..."
for b in 01 02 03 04 05 06 07 ; do
test_file fsd$bps-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e -p"
done
done
echo "Testing 16-bit wasted-bits-per-sample streams..."
for b in 01 ; do
test_file wbps16-$b 1 16 "-0 -l $max_lpc_order --lax -m -e -p"
done
for bps in 8 16 24 ; do
echo "Testing $bps-bit sine wave streams..."
for b in 00 ; do
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=48000"
done
for b in 01 ; do
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=96000"
done
for b in 02 03 04 ; do
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order --lax -m -e"
done
for b in 10 11 ; do
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=48000"
done
for b in 12 ; do
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e --sample-rate=96000"
done
for b in 13 14 15 16 17 18 19 ; do
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order --lax -m -e"
done
done
echo "Testing blocksize variations..."
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
for blocksize in 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
for lpc_order in 0 1 2 3 4 5 7 8 9 15 16 17 31 32 ; do
if [ $lpc_order = 0 ] || [ $lpc_order -le $blocksize ] ; then
test_file noise8m32 1 8 "-8 -p -e -l $lpc_order --lax --blocksize=$blocksize $disable"
fi
done
done
done
echo "Testing some frame header variations..."
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b $max_lpc_order"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b 65535"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90000"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90000"
echo "Testing option variations..."
for f in 00 01 02 03 04 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file sine16-$f 1 16 "-$opt $extras $disable"
fi
done
done
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable"
fi
fi
done
done
for f in 10 11 12 13 14 15 16 17 18 19 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file sine16-$f 2 16 "-$opt $extras $disable"
fi
done
done
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable"
fi
fi
done
done
echo "Testing noise..."
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for channels in 1 2 4 8 ; do
if [ $channels -le 2 ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for bps in 8 16 24 ; do
for opt in 0 1 2 3 4 5 6 7 8 ; do
for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do
if [ -z "$blocksize" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file noise $channels $bps "-$opt $extras $blocksize $disable"
fi
done
fi
done
done
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order --lax -e -p $disable"
fi
done
fi
done
fi
done
|
kode54/flac
|
test/test_streams.sh
|
Shell
|
bsd-3-clause
| 9,896 |
#!/bin/bash
set -e
set -v
# http://superuser.com/questions/196848/how-do-i-create-an-administrator-user-on-ubuntu
# http://unix.stackexchange.com/questions/1416/redirecting-stdout-to-a-file-you-dont-have-write-permission-on
echo "vagrant ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/init-users
sudo cat /etc/sudoers.d/init-users
# Installing vagrant keys
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub'
sudo mkdir -p /home/vagrant/.ssh
cat ./vagrant.pub >> /home/vagrant/.ssh/authorized_keys
sudo chown -R vagrant:vagrant /home/vagrant/.ssh
##################################################
# Change hostname and /etc/hosts
##################################################
cat << EOT >> /etc/hosts
# Nodes
192.168.33.110 riemanna riemanna.example.com
192.168.33.120 riemannb riemannb.example.com
192.168.33.100 riemannmc riemannmc.example.com
192.168.33.210 graphitea graphitea.example.com
192.168.33.220 graphiteb graphiteb.example.com
192.168.33.200 graphitemc graphitemc.example.com
192.168.33.150 ela1 ela1.example.com
192.168.33.160 ela2 ela2.example.com
192.168.33.170 ela3 ela3.example.com
192.168.33.180 logstash logstash.example.com
192.168.33.10 host1 host1.example.com
192.168.33.11 host2 host2.example.com
EOT
sudo hostnamectl set-hostname host1
##################################################
sudo apt-get update -y
|
jhajek/packer-vagrant-build-scripts
|
packer/scripts/post_install_itmo-453-553-vagrant-host1-setup.sh
|
Shell
|
bsd-3-clause
| 1,396 |
#!/usr/bin/env bash
# resolve python-version to use
if [ "$PYTHON" == "" ] ; then
if ! PYTHON=$(command -v python || command -v python2 || command -v python 2.7)
then
echo "Unable to locate build-dependency python2.x!" 1>&2
exit 1
fi
fi
# validate python-dependency
# useful in case of explicitly set option.
if ! command -v $PYTHON > /dev/null
then
echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
exit 1
fi
usage()
{
echo "Usage: $0 [BuildArch] [BuildType] [verbose] [coverage] [cross] [clangx.y] [ninja] [configureonly] [skipconfigure] [skipnative] [skipmscorlib] [skiptests] [stripsymbols] [ignorewarnings] [cmakeargs] [bindir]"
echo "BuildArch can be: x64, x86, arm, armel, arm64"
echo "BuildType can be: debug, checked, release"
echo "coverage - optional argument to enable code coverage build (currently supported only for Linux and OSX)."
echo "ninja - target ninja instead of GNU make"
echo "clangx.y - optional argument to build using clang version x.y."
echo "cross - optional argument to signify cross compilation,"
echo " - will use ROOTFS_DIR environment variable if set."
echo "crosscomponent - optional argument to build cross-architecture component,"
echo " - will use CAC_ROOTFS_DIR environment variable if set."
echo "nopgooptimize - do not use profile guided optimizations."
echo "pgoinstrument - generate instrumented code for profile guided optimization enabled binaries."
echo "ibcinstrument - generate IBC-tuning-enabled native images when invoking crossgen."
echo "configureonly - do not perform any builds; just configure the build."
echo "skipconfigure - skip build configuration."
echo "skipnative - do not build native components."
echo "skipmscorlib - do not build mscorlib.dll."
echo "skiptests - skip the tests in the 'tests' subdirectory."
echo "skipnuget - skip building nuget packages."
echo "skiprestoreoptdata - skip restoring optimization data used by profile-based optimizations."
echo "skipcrossgen - skip native image generation"
echo "verbose - optional argument to enable verbose build output."
echo "-skiprestore: skip restoring packages ^(default: packages are restored during build^)."
echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib."
echo "-sequential: force a non-parallel build ^(default is to build in parallel"
echo " using all processors^)."
echo "-officialbuildid=^<ID^>: specify the official build ID to be used by this build."
echo "-Rebuild: passes /t:rebuild to the build projects."
echo "stripSymbols - Optional argument to strip native symbols during the build."
echo "skipgenerateversion - disable version generation even if MSBuild is supported."
echo "ignorewarnings - do not treat warnings as errors"
echo "cmakeargs - user-settable additional arguments passed to CMake."
echo "bindir - output directory (defaults to $__ProjectRoot/bin)"
echo "buildstandalonegc - builds the GC in a standalone mode. Can't be used with \"cmakeargs\"."
echo "msbuildonunsupportedplatform - build managed binaries even if distro is not officially supported."
echo "numproc - set the number of build processes."
exit 1
}
initHostDistroRid()
{
__HostDistroRid=""
if [ "$__HostOS" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
__HostDistroRid="$ID.$VERSION_ID-$__HostArch"
elif [ -e /etc/redhat-release ]; then
local redhatRelease=$(</etc/redhat-release)
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
__HostDistroRid="rhel.6-$__HostArch"
fi
fi
fi
if [ "$__HostDistroRid" == "" ]; then
echo "WARNING: Can not determine runtime id for current distro."
fi
}
initTargetDistroRid()
{
if [ $__CrossBuild == 1 ]; then
if [ "$__BuildOS" == "Linux" ]; then
if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
if [ -e $ROOTFS_DIR/android_platform ]; then
source $ROOTFS_DIR/android_platform
export __DistroRid="$RID"
else
echo "WARNING: Can not determine runtime id for current distro."
export __DistroRid=""
fi
else
source $ROOTFS_DIR/etc/os-release
export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
fi
fi
else
export __DistroRid="$__HostDistroRid"
fi
# Portable builds target the base RID
if [ $__PortableBuild == 1 ]; then
if [ "$__BuildOS" == "Linux" ]; then
export __DistroRid="linux-$__BuildArch"
elif [ "$__BuildOS" == "OSX" ]; then
export __DistroRid="osx-$__BuildArch"
fi
fi
}
setup_dirs()
{
echo Setting up directories for build
mkdir -p "$__RootBinDir"
mkdir -p "$__BinDir"
mkdir -p "$__LogsDir"
mkdir -p "$__IntermediatesDir"
if [ $__CrossBuild == 1 ]; then
mkdir -p "$__CrossComponentBinDir"
mkdir -p "$__CrossCompIntermediatesDir"
fi
}
# Check the system to ensure the right prereqs are in place
check_prereqs()
{
echo "Checking prerequisites..."
# Check presence of CMake on the path
hash cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }
# Minimum required version of clang is version 3.9 for arm/armel cross build
if [[ $__CrossBuild == 1 && ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") ]]; then
if ! [[ "$__ClangMajorVersion" -gt "3" || ( $__ClangMajorVersion == 3 && $__ClangMinorVersion == 9 ) ]]; then
echo "Please install clang3.9 or latest for arm/armel cross build"; exit 1;
fi
fi
# Check for clang
hash clang-$__ClangMajorVersion.$__ClangMinorVersion 2>/dev/null || hash clang$__ClangMajorVersion$__ClangMinorVersion 2>/dev/null || hash clang 2>/dev/null || { echo >&2 "Please install clang-$__ClangMajorVersion.$__ClangMinorVersion before running this script"; exit 1; }
}
restore_optdata()
{
# we only need optdata on a Release build
if [[ "$__BuildType" != "Release" ]]; then __SkipRestoreOptData=1; fi
if [[ ( $__SkipRestoreOptData == 0 ) && ( $__isMSBuildOnNETCoreSupported == 1 ) ]]; then
echo "Restoring the OptimizationData package"
"$__ProjectRoot/run.sh" sync -optdata
if [ $? != 0 ]; then
echo "Failed to restore the optimization data package."
exit 1
fi
fi
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
# Parse the optdata package versions out of msbuild so that we can pass them on to CMake
local DotNetCli="$__ProjectRoot/Tools/dotnetcli/dotnet"
if [ ! -f $DotNetCli ]; then
"$__ProjectRoot/init-tools.sh"
if [ $? != 0 ]; then
echo "Failed to restore buildtools."
exit 1
fi
fi
local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
__PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo | sed 's/^\s*//')
__IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo | sed 's/^\s*//')
fi
}
generate_event_logging_sources()
{
if [ $__SkipCoreCLR == 1 ]; then
return
fi
# Event Logging Infrastructure
__GeneratedIntermediate="$__IntermediatesDir/Generated"
__GeneratedIntermediateEventProvider="$__GeneratedIntermediate/eventprovider_new"
__GeneratedIntermediateEventPipe="$__GeneratedIntermediate/eventpipe_new"
if [[ -d "$__GeneratedIntermediateEventProvider" ]]; then
rm -rf "$__GeneratedIntermediateEventProvider"
fi
if [[ -d "$__GeneratedIntermediateEventPipe" ]]; then
rm -rf "$__GeneratedIntermediateEventPipe"
fi
if [[ ! -d "$__GeneratedIntermediate/eventprovider" ]]; then
mkdir -p "$__GeneratedIntermediate/eventprovider"
fi
if [[ ! -d "$__GeneratedIntermediate/eventpipe" ]]; then
mkdir -p "$__GeneratedIntermediate/eventpipe"
fi
mkdir -p "$__GeneratedIntermediateEventProvider"
mkdir -p "$__GeneratedIntermediateEventPipe"
__PythonWarningFlags="-Wall"
if [[ $__IgnoreWarnings == 0 ]]; then
__PythonWarningFlags="$__PythonWarningFlags -Werror"
fi
if [[ $__SkipCoreCLR == 0 || $__ConfigureOnly == 1 ]]; then
echo "Laying out dynamically generated files consumed by the build system "
echo "Laying out dynamically generated Event Logging Test files"
$PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genXplatEventing.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --exc "$__ProjectRoot/src/vm/ClrEtwAllMeta.lst" --testdir "$__GeneratedIntermediateEventProvider/tests"
if [[ $? != 0 ]]; then
exit
fi
case $__BuildOS in
Linux)
echo "Laying out dynamically generated EventPipe Implementation"
$PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genEventPipe.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__GeneratedIntermediateEventPipe" --exc "$__ProjectRoot/src/vm/ClrEtwAllMeta.lst"
if [[ $? != 0 ]]; then
exit
fi
;;
*)
;;
esac
#determine the logging system
case $__BuildOS in
Linux)
echo "Laying out dynamically generated Event Logging Implementation of Lttng"
$PYTHON -B $__PythonWarningFlags "$__ProjectRoot/src/scripts/genXplatLttng.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__GeneratedIntermediateEventProvider"
if [[ $? != 0 ]]; then
exit
fi
;;
*)
;;
esac
fi
echo "Cleaning the temp folder of dynamically generated Event Logging files"
$PYTHON -B $__PythonWarningFlags -c "import sys;sys.path.insert(0,\"$__ProjectRoot/src/scripts\"); from Utilities import *;UpdateDirectory(\"$__GeneratedIntermediate/eventprovider\",\"$__GeneratedIntermediateEventProvider\")"
if [[ $? != 0 ]]; then
exit
fi
rm -rf "$__GeneratedIntermediateEventProvider"
echo "Cleaning the temp folder of dynamically generated EventPipe files"
$PYTHON -B $__PythonWarningFlags -c "import sys;sys.path.insert(0,\"$__ProjectRoot/src/scripts\"); from Utilities import *;UpdateDirectory(\"$__GeneratedIntermediate/eventpipe\",\"$__GeneratedIntermediateEventPipe\")"
if [[ $? != 0 ]]; then
exit
fi
rm -rf "$__GeneratedIntermediateEventPipe"
}
build_native()
{
skipCondition=$1
platformArch="$2"
intermediatesForBuild="$3"
extraCmakeArguments="$4"
message="$5"
if [ $skipCondition == 1 ]; then
echo "Skipping $message build."
return
fi
# All set to commence the build
echo "Commencing build of $message for $__BuildOS.$__BuildArch.$__BuildType in $intermediatesForBuild"
generator=""
buildFile="Makefile"
buildTool="make"
if [ $__UseNinja == 1 ]; then
generator="ninja"
buildFile="build.ninja"
if ! buildTool=$(command -v ninja || command -v ninja-build); then
echo "Unable to locate ninja!" 1>&2
exit 1
fi
fi
if [ $__SkipConfigure == 0 ]; then
# if msbuild is not supported, then set __SkipGenerateVersion to 1
if [ $__isMSBuildOnNETCoreSupported == 0 ]; then __SkipGenerateVersion=1; fi
# Drop version.cpp file
__versionSourceFile="$intermediatesForBuild/version.cpp"
if [ $__SkipGenerateVersion == 0 ]; then
pwd
"$__ProjectRoot/run.sh" build -Project=$__ProjectDir/build.proj -generateHeaderUnix -NativeVersionSourceFile=$__versionSourceFile $__RunArgs $__UnprocessedBuildArgs
else
# Generate the dummy version.cpp, but only if it didn't exist to make sure we don't trigger unnecessary rebuild
__versionSourceLine="static char sccsid[] __attribute__((used)) = \"@(#)No version information produced\";"
if [ -e $__versionSourceFile ]; then
read existingVersionSourceLine < $__versionSourceFile
fi
if [ "$__versionSourceLine" != "$existingVersionSourceLine" ]; then
echo $__versionSourceLine > $__versionSourceFile
fi
fi
pushd "$intermediatesForBuild"
# Regenerate the CMake solution
echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $__IncludeTests $generator $extraCmakeArguments $__cmakeargs"
"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion $__ClangMinorVersion $platformArch $__BuildType $__CodeCoverage $__IncludeTests $generator "$extraCmakeArguments" "$__cmakeargs"
popd
fi
if [ ! -f "$intermediatesForBuild/$buildFile" ]; then
echo "Failed to generate $message build project!"
exit 1
fi
# Build
if [ $__ConfigureOnly == 1 ]; then
echo "Finish configuration & skipping $message build."
return
fi
# Check that the makefiles were created.
pushd "$intermediatesForBuild"
echo "Executing $buildTool install -j $__NumProc"
$buildTool install -j $__NumProc
if [ $? != 0 ]; then
echo "Failed to build $message."
exit 1
fi
popd
}
build_cross_arch_component()
{
__SkipCrossArchBuild=1
TARGET_ROOTFS=""
# check supported cross-architecture components host(__HostArch)/target(__BuildArch) pair
if [[ "$__BuildArch" == "arm" && "$__CrossArch" == "x86" ]]; then
export CROSSCOMPILE=0
__SkipCrossArchBuild=0
# building x64-host/arm-target cross-architecture component need to use cross toolchain of x86
if [ "$__HostArch" == "x64" ]; then
export CROSSCOMPILE=1
fi
else
# not supported
return
fi
export __CMakeBinDir="$__CrossComponentBinDir"
export CROSSCOMPONENT=1
__IncludeTests=
if [ $CROSSCOMPILE == 1 ]; then
TARGET_ROOTFS="$ROOTFS_DIR"
if [ -n "$CAC_ROOTFS_DIR" ]; then
export ROOTFS_DIR="$CAC_ROOTFS_DIR"
else
export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__CrossArch"
fi
fi
__ExtraCmakeArgs="-DCLR_CMAKE_TARGET_ARCH=$__BuildArch -DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize"
build_native $__SkipCrossArchBuild "$__CrossArch" "$__CrossCompIntermediatesDir" "$__ExtraCmakeArgs" "cross-architecture component"
# restore ROOTFS_DIR, CROSSCOMPONENT, and CROSSCOMPILE
if [ -n "$TARGET_ROOTFS" ]; then
export ROOTFS_DIR="$TARGET_ROOTFS"
fi
export CROSSCOMPONENT=
export CROSSCOMPILE=1
}
isMSBuildOnNETCoreSupported()
{
__isMSBuildOnNETCoreSupported=$__msbuildonunsupportedplatform
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
return
fi
if [ "$__HostArch" == "x64" ]; then
if [ "$__HostOS" == "Linux" ]; then
__isMSBuildOnNETCoreSupported=1
# note: the RIDs below can use globbing patterns
UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64" "alpine.3.6.*-x64" "rhel.6-x64" "")
for UNSUPPORTED_RID in "${UNSUPPORTED_RIDS[@]}"
do
if [[ $__HostDistroRid == $UNSUPPORTED_RID ]]; then
__isMSBuildOnNETCoreSupported=0
break
fi
done
elif [ "$__HostOS" == "OSX" ]; then
__isMSBuildOnNETCoreSupported=1
fi
fi
}
build_CoreLib_ni()
{
if [ $__SkipCrossgen == 1 ]; then
echo "Skipping generating native image"
return
fi
if [ $__SkipCoreCLR == 0 -a -e $__BinDir/crossgen ]; then
echo "Generating native image for System.Private.CoreLib."
$__BinDir/crossgen /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll
if [ $? -ne 0 ]; then
echo "Failed to generate native image for System.Private.CoreLib."
exit 1
fi
if [ "$__BuildOS" == "Linux" ]; then
echo "Generating symbol file for System.Private.CoreLib."
$__BinDir/crossgen /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll
if [ $? -ne 0 ]; then
echo "Failed to generate symbol file for System.Private.CoreLib."
exit 1
fi
fi
fi
}
build_CoreLib()
{
if [ $__isMSBuildOnNETCoreSupported == 0 ]; then
echo "System.Private.CoreLib.dll build unsupported."
return
fi
if [ $__SkipMSCorLib == 1 ]; then
echo "Skipping building System.Private.CoreLib."
return
fi
echo "Commencing build of managed components for $__BuildOS.$__BuildArch.$__BuildType"
# Invoke MSBuild
__ExtraBuildArgs=""
if [[ "$__IbcTuning" -eq "" ]]; then
__ExtraBuildArgs="$__ExtraBuildArgs -OptimizationDataDir=\"$__PackagesDir/optimization.$__BuildOS-$__BuildArch.IBC.CoreCLR/$__IbcOptDataVersion/data/\""
__ExtraBuildArgs="$__ExtraBuildArgs -EnableProfileGuidedOptimization=true"
fi
$__ProjectRoot/run.sh build -Project=$__ProjectDir/build.proj -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false $__RunArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
if [ $? -ne 0 ]; then
echo "Failed to build managed components."
exit 1
fi
# The cross build generates a crossgen with the target architecture.
if [ $__CrossBuild != 1 ]; then
# The architecture of host pc must be same architecture with target.
if [[ ( "$__HostArch" == "$__BuildArch" ) ]]; then
build_CoreLib_ni
elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "x86" ) ]]; then
build_CoreLib_ni
elif [[ ( "$__HostArch" == "arm64" ) && ( "$__BuildArch" == "arm" ) ]]; then
build_CoreLib_ni
else
exit 1
fi
fi
}
generate_NugetPackages()
{
# We can only generate nuget package if we also support building mscorlib as part of this build.
if [ $__isMSBuildOnNETCoreSupported == 0 ]; then
echo "Nuget package generation unsupported."
return
fi
# Since we can build mscorlib for this OS, did we build the native components as well?
if [ $__SkipCoreCLR == 1 ]; then
echo "Unable to generate nuget packages since native components were not built."
return
fi
echo "Generating nuget packages for "$__BuildOS
echo "DistroRid is "$__DistroRid
echo "ROOTFS_DIR is "$ROOTFS_DIR
# Build the packages
$__ProjectRoot/run.sh build -Project=$__SourceDir/.nuget/packages.builds -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false $__RunArgs $__UnprocessedBuildArgs
if [ $? -ne 0 ]; then
echo "Failed to generate Nuget packages."
exit 1
fi
}
echo "Commencing CoreCLR Repo build"
# Argument types supported by this script:
#
# Build architecture - valid values are: x64, ARM.
# Build Type - valid values are: Debug, Checked, Release
#
# Set the default arguments for build
# Obtain the location of the bash script to figure out where the root of the repo is.
__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Use uname to determine what the CPU is.
CPUName=$(uname -p)
# Some Linux platforms report unknown for platform, but the arch for machine.
if [ "$CPUName" == "unknown" ]; then
CPUName=$(uname -m)
fi
case $CPUName in
i686)
echo "Unsupported CPU $CPUName detected, build might not succeed!"
__BuildArch=x86
__HostArch=x86
;;
x86_64)
__BuildArch=x64
__HostArch=x64
;;
armv7l)
echo "Unsupported CPU $CPUName detected, build might not succeed!"
__BuildArch=arm
__HostArch=arm
;;
aarch64)
__BuildArch=arm64
__HostArch=arm64
;;
*)
echo "Unknown CPU $CPUName detected, configuring as if for x64"
__BuildArch=x64
__HostArch=x64
;;
esac
# Use uname to determine what the OS is.
OSName=$(uname -s)
case $OSName in
Linux)
__BuildOS=Linux
__HostOS=Linux
;;
Darwin)
__BuildOS=OSX
__HostOS=OSX
;;
FreeBSD)
__BuildOS=FreeBSD
__HostOS=FreeBSD
;;
OpenBSD)
__BuildOS=OpenBSD
__HostOS=OpenBSD
;;
NetBSD)
__BuildOS=NetBSD
__HostOS=NetBSD
;;
SunOS)
__BuildOS=SunOS
__HostOS=SunOS
;;
*)
echo "Unsupported OS $OSName detected, configuring as if for Linux"
__BuildOS=Linux
__HostOS=Linux
;;
esac
__BuildType=Debug
__CodeCoverage=
__IncludeTests=Include_Tests
__IgnoreWarnings=0
# Set the various build properties here so that CMake and MSBuild can pick them up
__ProjectDir="$__ProjectRoot"
__SourceDir="$__ProjectDir/src"
__PackagesDir="$__ProjectDir/packages"
__RootBinDir="$__ProjectDir/bin"
__UnprocessedBuildArgs=
__RunArgs=
__MSBCleanBuildArgs=
__UseNinja=0
__VerboseBuild=0
__PgoInstrument=0
__PgoOptimize=1
__IbcTuning=""
__ConfigureOnly=0
__SkipConfigure=0
__SkipRestore=""
__SkipNuget=0
__SkipCoreCLR=0
__SkipMSCorLib=0
__SkipRestoreOptData=0
__SkipCrossgen=0
__CrossBuild=0
__ClangMajorVersion=0
__ClangMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
__HostDistroRid=""
__DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
__DoCrossArchBuild=0
__PortableBuild=1
__msbuildonunsupportedplatform=0
__PgoOptDataVersion=""
__IbcOptDataVersion=""
# Get the number of processors available to the scheduler
# Other techniques such as `nproc` only get the number of
# processors available to a single process.
if [ `uname` = "FreeBSD" ]; then
__NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'`
elif [ `uname` = "NetBSD" ]; then
__NumProc=$(($(getconf NPROCESSORS_ONLN)+1))
else
__NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
fi
while :; do
if [ $# -le 0 ]; then
break
fi
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-\?|-h|--help)
usage
exit 1
;;
x86)
__BuildArch=x86
;;
x64)
__BuildArch=x64
;;
arm)
__BuildArch=arm
;;
armel)
__BuildArch=armel
;;
arm64)
__BuildArch=arm64
;;
debug)
__BuildType=Debug
;;
checked)
__BuildType=Checked
;;
release)
__BuildType=Release
;;
coverage)
__CodeCoverage=Coverage
;;
cross)
__CrossBuild=1
;;
-portablebuild=false)
__PortableBuild=0
;;
verbose)
__VerboseBuild=1
;;
stripsymbols)
__cmakeargs="$__cmakeargs -DSTRIP_SYMBOLS=true"
;;
clang3.5)
__ClangMajorVersion=3
__ClangMinorVersion=5
;;
clang3.6)
__ClangMajorVersion=3
__ClangMinorVersion=6
;;
clang3.7)
__ClangMajorVersion=3
__ClangMinorVersion=7
;;
clang3.8)
__ClangMajorVersion=3
__ClangMinorVersion=8
;;
clang3.9)
__ClangMajorVersion=3
__ClangMinorVersion=9
;;
clang4.0)
__ClangMajorVersion=4
__ClangMinorVersion=0
;;
ninja)
__UseNinja=1
;;
pgoinstrument)
__PgoInstrument=1
;;
nopgooptimize)
__PgoOptimize=0
__SkipRestoreOptData=1
;;
ibcinstrument)
__IbcTuning="/Tuning"
;;
configureonly)
__ConfigureOnly=1
__SkipMSCorLib=1
__SkipNuget=1
;;
skipconfigure)
__SkipConfigure=1
;;
skipnative)
# Use "skipnative" to use the same option name as build.cmd.
__SkipCoreCLR=1
;;
skipcoreclr)
# Accept "skipcoreclr" for backwards-compatibility.
__SkipCoreCLR=1
;;
crosscomponent)
__DoCrossArchBuild=1
;;
skipmscorlib)
__SkipMSCorLib=1
;;
skipgenerateversion)
__SkipGenerateVersion=1
;;
skiprestoreoptdata)
__SkipRestoreOptData=1
;;
skipcrossgen)
__SkipCrossgen=1
;;
includetests)
;;
skiptests)
__IncludeTests=
;;
skipnuget)
__SkipNuget=1
;;
ignorewarnings)
__IgnoreWarnings=1
__cmakeargs="$__cmakeargs -DCLR_CMAKE_WARNINGS_ARE_ERRORS=OFF"
;;
cmakeargs)
if [ -n "$2" ]; then
__cmakeargs="$__cmakeargs $2"
shift
else
echo "ERROR: 'cmakeargs' requires a non-empty option argument"
exit 1
fi
;;
bindir)
if [ -n "$2" ]; then
__RootBinDir="$2"
if [ ! -d $__RootBinDir ]; then
mkdir $__RootBinDir
fi
__RootBinParent=$(dirname $__RootBinDir)
__RootBinName=${__RootBinDir##*/}
__RootBinDir="$(cd $__RootBinParent &>/dev/null && printf %s/%s $PWD $__RootBinName)"
shift
else
echo "ERROR: 'bindir' requires a non-empty option argument"
exit 1
fi
;;
buildstandalonegc)
__cmakeargs="$__cmakeargs -DFEATURE_STANDALONE_GC=1 -DFEATURE_STANDALONE_GC_ONLY=1"
;;
msbuildonunsupportedplatform)
__msbuildonunsupportedplatform=1
;;
numproc)
if [ -n "$2" ]; then
__NumProc="$2"
shift
else
echo "ERROR: 'numproc' requires a non-empty option argument"
exit 1
fi
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
esac
shift
done
__RunArgs="-BuildArch=$__BuildArch -BuildType=$__BuildType -BuildOS=$__BuildOS"
# Configure environment if we are doing a verbose build
if [ $__VerboseBuild == 1 ]; then
export VERBOSE=1
__RunArgs="$__RunArgs -verbose"
fi
# Set default clang version
if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then
if [ $__CrossBuild == 1 ]; then
if [[ "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ]]; then
__ClangMajorVersion=3
__ClangMinorVersion=9
else
__ClangMajorVersion=3
__ClangMinorVersion=6
fi
else
__ClangMajorVersion=3
__ClangMinorVersion=5
fi
fi
if [[ "$__BuildArch" == "armel" ]]; then
# Armel cross build is Tizen specific and does not support Portable RID build
__PortableBuild=0
fi
if [ $__PortableBuild == 0 ]; then
__RunArgs="$__RunArgs -PortableBuild=false"
fi
# Set dependent variables
__LogsDir="$__RootBinDir/Logs"
# init the host distro name
initHostDistroRid
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/Product/$__BuildOS.$__BuildArch.$__BuildType"
__PackagesBinDir="$__BinDir/.nuget"
__ToolsDir="$__RootBinDir/tools"
__TestWorkingDir="$__RootBinDir/tests/$__BuildOS.$__BuildArch.$__BuildType"
export __IntermediatesDir="$__RootBinDir/obj/$__BuildOS.$__BuildArch.$__BuildType"
__TestIntermediatesDir="$__RootBinDir/tests/obj/$__BuildOS.$__BuildArch.$__BuildType"
__isMSBuildOnNETCoreSupported=0
__CrossComponentBinDir="$__BinDir"
__CrossCompIntermediatesDir="$__IntermediatesDir/crossgen"
__CrossArch="$__HostArch"
if [[ "$__HostArch" == "x64" && "$__BuildArch" == "arm" ]]; then
__CrossArch="x86"
fi
if [ $__CrossBuild == 1 ]; then
__CrossComponentBinDir="$__CrossComponentBinDir/$__CrossArch"
fi
__CrossgenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__BuildOS.$BuildArch.$__BuildType.log"
__CrossgenExe="$__CrossComponentBinDir/crossgen"
# Init if MSBuild for .NET Core is supported for this platform
isMSBuildOnNETCoreSupported
# CI_SPECIFIC - On CI machines, $HOME may not be set. In such a case, create a subfolder and set the variable to set.
# This is needed by CLI to function.
if [ -z "$HOME" ]; then
if [ ! -d "$__ProjectDir/temp_home" ]; then
mkdir temp_home
fi
export HOME=$__ProjectDir/temp_home
echo "HOME not defined; setting it to $HOME"
fi
# Specify path to be set for CMAKE_INSTALL_PREFIX.
# This is where all built CoreClr libraries will copied to.
export __CMakeBinDir="$__BinDir"
# Configure environment if we are doing a cross compile.
if [ $__CrossBuild == 1 ]; then
export CROSSCOMPILE=1
if ! [[ -n "$ROOTFS_DIR" ]]; then
export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__BuildArch"
fi
fi
# init the target distro name
initTargetDistroRid
# Make the directories necessary for build if they don't exist
setup_dirs
# Check prereqs.
check_prereqs
# Restore the package containing profile counts for profile-guided optimizations
restore_optdata
# Generate event logging infrastructure sources
generate_event_logging_sources
# Build the coreclr (native) components.
__ExtraCmakeArgs="-DCLR_CMAKE_TARGET_OS=$__BuildOS -DCLR_CMAKE_PACKAGES_DIR=$__PackagesDir -DCLR_CMAKE_PGO_INSTRUMENT=$__PgoInstrument -DCLR_CMAKE_OPTDATA_VERSION=$__PgoOptDataVersion -DCLR_CMAKE_PGO_OPTIMIZE=$__PgoOptimize"
build_native $__SkipCoreCLR "$__BuildArch" "$__IntermediatesDir" "$__ExtraCmakeArgs" "CoreCLR component"
# Build cross-architecture components
if [[ $__CrossBuild == 1 && $__DoCrossArchBuild == 1 ]]; then
build_cross_arch_component
fi
# Build System.Private.CoreLib.
build_CoreLib
# Generate nuget packages
if [ $__SkipNuget != 1 ]; then
generate_NugetPackages
fi
# Build complete
echo "Repo successfully built."
echo "Product binaries are available at $__BinDir"
exit 0
|
ragmani/coreclr
|
build.sh
|
Shell
|
mit
| 31,621 |
#!/bin/bash -ex
USE_NDK=false
if [[ "$1" = "--ndk" ]]; then
USE_NDK=true
if [[ ! -d $ANDROID_NDK ]]; then
echo Error: ANDROID_NDK not a directory: $ANDROID_NDK
exit 1
fi
fi
if [[ ! -d NNPACK ]]; then
rm -rf NNPACK
git clone --recursive [email protected]:silklabs/NNPACK.git
fi
cd NNPACK/
if [[ ! -d env ]]; then
virtualenv env
fi
source env/bin/activate
pip install ninja-syntax
if [[ ! -d PeachPy ]]; then
git clone https://github.com/Maratyszcza/PeachPy.git
fi
if ! pip list --format=legacy | grep -q PeachPy; then
(
cd PeachPy
pip install --upgrade -r requirements.txt
python setup.py generate
pip install --upgrade .
)
fi
if $USE_NDK; then
# Select right platform and ABI
if [[ "$SILK_BUILDJS_ARCH" = "arm64" ]]; then
APP_ABI=arm64-v8a
else
APP_ABI=armeabi-v7a
fi
cat > jni/Application.mk <<EOF
APP_PLATFORM := android-21
APP_PIE := true
APP_ABI := $APP_ABI
APP_STL := c++_static
NDK_TOOLCHAIN_VERSION := clang
EOF
$ANDROID_NDK/ndk-build -j$(nproc)
else
python ./configure.py --enable-shared
ninja
fi
exit 0
|
silklabs/silk
|
node-nnpack/install.sh
|
Shell
|
mit
| 1,082 |
#!/bin/bash
FILES=/data/parlparse/documents/westminhall/westminster201*
for f in $FILES
do
echo "Handling $f"
/bin/bash /data/politics/1.bash $f speech.csv
done
|
postfix/ensu
|
preprocessing/xml_westminster.bash
|
Shell
|
mit
| 164 |
#!/bin/bash
#Load private config
source developer-tools/private.conf
#Generate non-ui translatables
#fixme: In future there are a few other files that belong here.
python3.8 developer-tools/translations/extract_strings_qt.py src/init.cpp src/net.cpp src/wallet/wallet_init.cpp
#Cleanup
cd src/qt/locale/Gulden
rm *.po || true
#Fetch onesky translations
python3.8 ../../../../developer-tools/translations/fetch_translations.py ${ONESKY_API_KEY}
#Work around for dropped qt flag (needed for lconvert to behave in a way that is not brain damaged)
sed -i 's|^\"Language\(.*\)$|"Language\1\n"X-Qt-Contexts: true\\n"|' *.po
#Now update ts files from onesky translations
for filename in *.po; do
lconvert -locations relative $filename -o `dirname ${filename}`/`basename ${filename} .po`.ts -target-language `echo $filename | sed "s/gulden_//" | sed "s/.po//" | sed "s/-/_/"`
done
#Remerge updated ts files from source if source has changed (english only)
lupdate ../../../../src -locations relative -no-obsolete -ts gulden_en.ts
#Update OneSky
#fixme: This should deprecated phrases (currently have to do that by manually uploading)
lconvert -locations relative gulden_en.ts -o `dirname gulden_en.ts`/`basename gulden_en .ts`.po
python3.8 ../../../../developer-tools/translations/push_translations.py ${ONESKY_API_KEY} || true
sed -i 's|<extra-po-header-po_revision_date>.*</extra-po-header-po_revision_date>|<extra-po-header-po_revision_date>2018-08-29 15:43+0000</extra-po-header-po_revision_date>|' *.ts
sed -i 's|<extra-po-header-pot_creation_date>.*</extra-po-header-pot_creation_date>|<extra-po-header-pot_creation_date>2018-08-29 15:43+0000</extra-po-header-pot_creation_date>|' *.ts
#The below would do the same for other languages (if we needed it)
#lupdate ../../../../src -locations none -no-obsolete -ts `ls *.ts | grep -v src/qt/locale/Gulden/gulden_en.ts`
#Push updated translations back to onesky
#for filename in *.ts; do
# lconvert -locations relative $filename -o `dirname ${filename}`/`basename ${filename} .ts`.po
#done
#lconvert -locations relative gulden_en.ts -o `dirname gulden_en.ts`/`basename gulden_en .ts`.po
#Cleanup
#rm *.po || true
|
nlgcoin/guldencoin-official
|
developer-tools/update_translations.sh
|
Shell
|
mit
| 2,178 |
#!/bin/sh
git filter-branch --env-filter '
OLD_NAME="OLD_NAME"
CORRECT_NAME="CORRECT_NAME"
CORRECT_EMAIL="CORRECT_EMAIL"
if [ "$GIT_COMMITTER_NAME" = "$OLD_NAME" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_NAME" = "$OLD_NAME" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
|
jcherqui/dotfiles
|
bin/git-author-rewrite.sh
|
Shell
|
mit
| 449 |
#!/bin/bash
# Notes:
# - Call this scrupt by sourcing it, not by running it normally.
# - Do not use "set -u" before sourcing this script, virtualenv's activate script may trigger it.
# - Make sure the user bin dir is added to PATH
SYSTEM_PACKAGES="virtualenv setuptools wheel"
VENV_DIR=".venv"
# Exit early if inside Docker, no need for venv then
if [[ -e /.dockerenv ]]; then
return
fi
# Windows uses "python" and "pip" for both Python 2 and 3
# Linux uses "python" and "pip" for Python 2 only
if [[ $(uname -s) == "MINGW"* ]]; then
PIP2_CMD="py -2 -m pip"
VENV_CMD="py -2 -m virtualenv"
VENV_ACTIVATE_SCRIPT="$VENV_DIR/Scripts/activate"
else
PIP2_CMD="pip"
VENV_CMD="virtualenv -p $(which python)"
VENV_ACTIVATE_SCRIPT="$VENV_DIR/bin/activate"
fi
# Create venv if missing
if [[ ! -e $VENV_DIR ]]; then
echo "Virtualenv not found, creating it ..."
# Users need "--user", while CI doesn't allow it
if [[ $CI == "true" ]]; then
$PIP2_CMD install $SYSTEM_PACKAGES
else
$PIP2_CMD install --user $SYSTEM_PACKAGES --no-warn-script-location
fi
$VENV_CMD $VENV_DIR
fi
# Enter venv
source $VENV_ACTIVATE_SCRIPT
|
CasualGaming/studlan
|
manage/activate-venv.sh
|
Shell
|
mit
| 1,180 |
#!/bin/bash
# this script is based on debian installation guide from:
# https://github.com/jp9000/obs-studio/wiki/Install-Instructions
# use it as main guide when updating this script
# CUSTOM BUILD FLAGS
# Read more: https://wiki.gentoo.org/wiki/GCC_optimization
#
# modify these if you know what you are doing
# Example flags below are for AMD FX-8350 processor
# "-march=bdver2 -mprefer-avx128 -mvzeroupper -O3 -pipe"
# march=native will optimize code for your current processor, thus will not work on any other system
# -O3 is highest optimization level, which is good for encoding purposes
# export CFLAGS="-march=native -O3 -pipe"
# export CXXFLAGS="${CFLAGS}"
#
# export DEB_CFLAGS_PREPEND="-march=native -pipe"
# export DEB_CXXFLAGS_PREPEND="-march=native -pipe"
# Variables
skip_init=false
compile_x264=true
compile_x265=false
force_ffmpeg=false
force_obs=false
skip_owner=false
override_threads=0
workdir=$(pwd)"/workdir"
# Help text
help_text="allowed switches:
--skip-init skip required package installation
--force-ffmpeg removes ffmpeg directory
--force-obs removes obs directory
--skip-owner skips chown resetting to directory default
--enable-x265 compile & install the experimental x265 encoder
-t= | --threads= set number of threads used manually default = number of cores
-o= | --out= specify output directory what script will use"
# read arguments
for i in $@; do
case "$i" in
--skip-init)
skip_init=true;
;;
--force-ffmpeg)
force_ffmpeg=true;
;;
--force-obs)
force_obs=true;
;;
--skip-owner)
skip_owner=true;
;;
--enable-x265)
compile_x265=true;
# assume you already compiled ffmpeg without x265, so we need to do it again
force_ffmpeg=true;
;;
-t=*|--threads=*)
override_threads="${i#*=}"
;;
-o=*|--out=*)
workdir="${i#*=}"
;;
-h|--help)
echo "$help_text"
exit 0
;;
*)
echo "unknown switch: $i, $help_text"
exit 1
esac
done
# Require root privileges
ROOTUID="0"
if [ "$(id -u)" -ne "$ROOTUID" ] ; then
echo "This script must be executed with root/sudo privileges!"
exit 1
fi
# read number of cores
num_threads=$(nproc)
if (($override_threads > 0)); then
echo "threads overridden from $num_threads to $override_threads"
num_threads=$override_threads
fi
export CONCURRENCY_LEVEL=$num_threads
MAKEJOBS="-j$num_threads"
# init = install required packages
if ! $skip_init; then
# install required building tools
apt-get install build-essential pkg-config cmake git checkinstall --yes
# Install required *-dev packages
apt-get install libx11-dev libgl1-mesa-dev libpulse-dev libxcomposite-dev \
libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \
libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \
libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev \
libcurl4-openssl-dev --yes
# ffmpeg requirements:
apt-get install autoconf automake libass-dev libsdl1.2-dev libtheora-dev libtool \
libva-dev libvdpau-dev libvorbis-dev libxcb1-dev \
libxcb-xfixes0-dev texi2html zlib1g-dev yasm \
libmp3lame-dev --yes
fi
# create directories
mkdir -p $workdir --verbose ||
(
echo "fatal: unable to create working directory: $workdir"
exit 1;
)
# these sections are based on ffmpeg compilation guide:
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
if $compile_x264; then
cd $workdir
echo "removing previous x264 files"
rm -r x264* --verbose
git clone --depth 1 git://git.videolan.org/x264.git
cd x264
# apply patch if still not fixed in HEAD
brokenHash="e86f3a1993234e8f26050c243aa253651200fa6b"
testHash=$(git rev-parse HEAD)
if [ "$brokenHash" == "$testHash" ]; then
echo "applying patch to x264"
wget -O p.patch "http://git.videolan.org/?p=x264/x264-sandbox.git;a=patch;h=235f389e1d39ac662dc40ff21196d91c61314261"
git am -3 p.patch
fi
./configure --enable-static --enable-shared
make $MAKEJOBS
checkinstall -D --pkgname=x264 --fstrans=no --backup=no \
--pkgversion="$(date +%Y%m%d)-git" --deldoc=yes --default
fi
ffmpegEnableX265=""
if $compile_x265; then
echo "removing previous x265 files"
rm -r x265* --verbose
ffmpegEnableX265="--enable-libx265"
apt-get install cmake mercurial
cd $workdir
hg clone http://hg.videolan.org/x265
cd x265/build/linux
cmake -G "Unix Makefiles" ../../source
make $MAKEJOBS
checkinstall -D --default --backup=no
fi
# ffmpeg ./configure could not find shared fdk-aac installation
# so install libfaac instead
apt-get install libfaac-dev
# run ldconfig
ldconfig
# build ffmpeg from git
cd $workdir
if $force_ffmpeg; then
rm -rf ffmpeg/
fi
# if ffmpeg directory does not exist
if [ ! -d ffmpeg ]; then
git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-static --enable-shared --enable-nonfree --enable-gpl \
--enable-libx264 --enable-x11grab --enable-libfaac $ffmpegEnableX265
make $MAKEJOBS
checkinstall -D --pkgname=FFmpeg --fstrans=no --backup=no \
--pkgversion="$(date +%Y%m%d)-git" --deldoc=yes --default
fi
# run ldconfig again
ldconfig
cd $workdir
# if --force-obs then delete obs-studio directory
if $force_obs; then
rm -rf obs-studio/
fi
# if obs-studio directory does not exist, clone it from github
if [ ! -d obs-studio ]; then
git clone https://github.com/jp9000/obs-studio.git
fi
cd obs-studio
# delete build directory if it exists
if [ -d build ]; then
rm -r build/
fi
# start building obs
mkdir build && cd build
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
make $MAKEJOBS
checkinstall -D --pkgname=obs-studio --fstrans=no --backup=no \
--pkgversion="$(date +%Y%m%d)-git" --deldoc=yes --default
cd ../..
# change file ownerships to owner of the parent directory
if ! $skip_owner; then
cd $workdir
# get owner of current directory
owner=$(stat -c "%U %G" .)
owner=${owner/ /:}
# change owner
chown "$owner" -R obs-studio
chown "$owner" -R ffmpeg
fi
echo "script ended"
|
SHOTbyGUN/obs-debian-easycompile
|
obs-easycompile.sh
|
Shell
|
mit
| 6,580 |
#===================================================================================================================================
# Decompose Sam files into FASTQ files for introduction into the sequence analysis pipeline.
#-----------------------------------------------------------------------------------------------------------------------------------
user=$1;
project=$2;
inputFile=$3;
main_dir=$(pwd)"/";
projectDirectory=$main_dir"users/"$user"/projects/"$project"/";
logFile=$projectDirectory"process_log.txt";
echo "#|---- sam2fastw.sh ---- begin." >> $logFile;
# import locations of auxillary software for pipeline analysis.
. $main_dir"local_installed_programs.sh";
# #===================================================================================================================================
# # Run picard-tools SamToFastq : This method requires large amounts of memory and will crash when it runs out of memory.
# #-----------------------------------------------------------------------------------------------------------------------------------
# java -Xmx16g -jar $picardDirectory"SamToFastq.jar" INPUT=$projectDirectory$inputFile FASTQ=$projectDirectory"data_r1.a.fastq" SECOND_END_FASTQ=$projectDirectory"data_r2.a.fastq";
#===================================================================================================================================
# Alternate method using generalized commandline tools with low memory footprint.
#-----------------------------------------------------------------------------------------------------------------------------------
echo "#| Translating SAM/BAM file to FASTQ format." >> $logFile;
echo "#| input file name = "$inputFile >> $logFile;
inputFileNameLength=`expr $inputFile|wc -c`;
inputFileNameLength=`expr $inputFileNameLength - 1`;
echo "#| length of input file name = "$inputFileNameLength >> $logFile;
fileName=${inputFile%.*};
echo "#| trimmed file name = "$fileName >> $logFile;
fileNameLength=`expr $fileName|wc -c`;
fileNameLength=`expr $fileNameLength - 1`;
echo "#| length of trimmed file name = "$fileNameLength >> $logFile;
fileExtLength=`expr $inputFileNameLength - $fileNameLength - 1`;
echo "#| length of extension = "$fileExtLength >> $logFile;
fileExt1=`echo $inputFile | sed -e "s/$fileName.//g"`;
echo "#| file extension = "$fileExt1 >> $logFile;
fileExt2=$(echo "$fileExt1" | awk '{print tolower($0)}'); # convert to lowercase.
echo "#| file extension, lowercase = "$fileExt1 >> $logFile;
# Check if inputfile is BAM format, then decompress if needed.
if [ "$fileExt2" = "bam" ]
then
$samtools_exec view -h $projectDirectory$inputFile > $projectDirectory$fileName.sam
newExt=".sam";
else
newExt="."$fileExt1;
fi
echo "#| fileExt1 = "$fileExt1 >> $logFile;
echo "#| fileName = "$fileName >> $logFile;
echo "#| newExt = "$newExt >> $logFile;
tempOutput1=$projectDirectory"data_r1.b.fastq"
tempOutput2a=$projectDirectory"data_r2.b.fastq"
tempOutput2b=$projectDirectory"data_r2.c.fastq"
finalOutput1=$projectDirectory"data_r1.fastq";
finalOutput2=$projectDirectory"data_r2.fastq";
# Convert SAM to fastq using generalized commandline tools.
(
grep -v ^@ $projectDirectory$fileName$newExt | awk 'NR%2==1 {print "@"$1"\n"$10"\n+\n"$11}' > $tempOutput1;
) &
(
grep -v ^@ $projectDirectory$fileName$newExt | awk 'NR%2==0 {print "@"$1"\n"$10"\n+\n"$11}' > $tempOutput2a;
) &
wait;
# The resulting files do not match those from picard-tools in the following ways:
#--------------------------------------------------------------------------------
echo "#| Correct some formatting errors in the resulting FASTQ files." >> $logFile;
echo "#| forward read file: append '/1' at end of each id line string." >> $logFile;
echo "#| reverse read file: append '/2' at end of each id line string." >> $logFile;
echo "#| reverse-complement each sequence line string." >> $logFile;
echo "#| reverse each quality line string." >> $logFile;
## Correct the first-end read file.
(
# Add '/1' to each ID string.
sed 's/$/\/1/;n;n;n' $tempOutput1 > $finalOutput1;
) &
## Correct the second-end read file.
(
# Add '/2' to each ID string.
sed 's/$/\/2/;n;n;n' $tempOutput2a > $tempOutput2b;
# Reverse compliment fastq entries.
$seqtkDirectory"seqtk" seq -r $tempOutput2b > $finalOutput2;
) &
wait;
#===================================================================================================================================
# Delete the intermediate files which we don't want cluttering the drive.
#-----------------------------------------------------------------------------------------------------------------------------------
echo "#| Delete intermediate FASTQ files." >> $logFile;
rm $tempOutput1;
rm $tempOutput2a;
rm $tempOutput2b;
echo "#|---- sam2fastw.sh ---- end." >> $logFile;
|
darrenabbey/ymap
|
scripts_seqModules/sam2fastq.sh
|
Shell
|
mit
| 4,893 |
# cd with smart ... handling.
cd() {
local first="${1%%/*}"
local num
local rest
# Only consider if first is all dots
if [ ! "$(tr -d . <<< "$first")" ]; then
num="$(wc -c <<< "$first")"
rest="${1#$first}"
else
num=0
fi
if [ $num -gt 3 ]; then
command cd "..$(printf '%0.s/..' $(seq 1 $(($num - 3))))$rest"
else
command cd "$@"
fi
}
# Touch with script shebang.
touchx() {
[ ! "$1" ] && return 1
cat <<< "#!/usr/bin/env ${2:-bash}" > "$1"
chmod +x "$1"
}
# Shortcut to awk a field.
field() {
[ ! "$1" ] && return 1
awk "{ print \$$1 }"
}
# Perform a countdown.
countdown() {
[ ! "$1" ] && return 1
for i in $(seq $1); do echo $(($1 - $i + 1)); sleep 1; done
}
# Urgent bell when task finishes.
remind() {
eval "$@"
echo -en "\a"
}
# Urgent bell + say when task finishes.
remind-say() {
remind "$@"
say -- "Finished $@."
}
# Port tunnel to a remove server.
portup() {
if [ -z "$PORTUP_HOST" ]; then
echo "Missing PORTUP_HOST!"
return 1
fi
ssh -NTCR "${2:-3000}:localhost:${1:-3000}" "${3:-"$PORTUP_HOST"}"
}
|
metakirby5/dotfiles
|
base/.config/bash/configs/functions.bash
|
Shell
|
mit
| 1,091 |
#! /usr/bin/env bash
set -e
which dotnet
dotnet --info
dotnet restore
dotnet build
for proj in test/**/*.csproj
do
dotnet test $proj
done
|
iwillspeak/PollyTick
|
build.sh
|
Shell
|
mit
| 148 |
#!/bin/sh
#
# Homebrew
#
# This installs some of the common dependencies needed (or at least desired)
# using Homebrew.
# Check for Homebrew
if test ! $(which brew)
then
echo " Installing Homebrew for you."
# Install the correct homebrew for each OS type
if test "$(uname)" = "Darwin"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
elif test "$(expr substr $(uname -s) 1 5)" = "Linux"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
fi
else
brew update
fi
exit 0
|
Sloy/scripts
|
homebrew/install.sh
|
Shell
|
cc0-1.0
| 585 |
#!/bin/sh
set -eu
# Required args:
# $1: Relative path to the root jovan-s/DTAUnpacker directory.
# $2: Relative path to the root Mafia 1 install directory.
# $3: Relative path to the directory in which you wish to
# store the unpacked directories.
#
# Example usage: sh dta-unpack-all.sh repositories/DTAUnpacker ~/.wine/drive_c/path/to/mafia backups/
# Check if at least 3 args were passed.
if [ $# -lt 3 ]
then
echo 'Missing args: path_unpacker path_mafia path_backup'
exit 1
fi
# Create temporary file links.
ln -s "$1/DTAUnpacker.exe" "$2"
ln -s "$1/tmp.dll" "$2"
# Navigate to the Mafia installation directory and run DTAUnpacker via wine.
cd "$2"
wine DTAUnpacker.exe A0.dta 0xD8D0A975 0x467ACDE0 # sounds/
wine DTAUnpacker.exe A1.dta 0x3D98766C 0xDE7009CD # missions/
wine DTAUnpacker.exe A2.dta 0x82A1C97B 0x2D5085D4 # MODELS/
wine DTAUnpacker.exe A3.dta 0x43876FEA 0x900CDBA8 # anims/
#wine DTAUnpacker.exe A4.dta 0x43876FEA 0x900CDBA8
wine DTAUnpacker.exe A5.dta 0xDEAC5342 0x760CE652 # DIFF/
wine DTAUnpacker.exe A6.dta 0x64CD8D0A 0x4BC97B2D # MAPS/
wine DTAUnpacker.exe A7.dta 0xD6FEA900 0xCDB76CE6 # Records/
#wine DTAUnpacker.exe A8.dta 0xD8DD8FAC 0x5324ACE5
wine DTAUnpacker.exe A9.dta 0x6FEE6324 0xACDA4783 # system/
wine DTAUnpacker.exe AA.dta 0x5342760C 0xEDEAC652 # tables/
wine DTAUnpacker.exe AB.dta 0xD8D0A975 0x467ACDE0 # sounds/music
#wine DTAUnpacker.exe AC.dta 0x43876FEA 0x900CDBA8
# Move unpacked directories.
mv anims "$3"
mv DIFF "$3"
mv MAPS "$3"
mv missions "$3"
mv MODELS "$3"
mv Records "$3"
mv sounds "$3"
mv system "$3"
mv tables "$3"
# Remove previously created temporary file links.
rm "$2/DTAUnpacker.exe"
rm "$2/tmp.dll"
|
iterami/AutomationScripts
|
mafia/1/dta-unpack-all.sh
|
Shell
|
cc0-1.0
| 1,690 |
#!/bin/sh
# check there is no case-sensitive file
check_case_files() {
casefiles=`find ./ -name '*[A-Z]*' | grep -v '.svn' | grep -v 'README' | grep -v 'Makefile'`
if [ "$casefiles" = "" ]; then
return 0
fi
nbcasefiles=`/bin/echo -e "$casefiles" | wc -l`
if [ $nbcasefiles -ne 0 ]; then
/bin/echo -e "***********************************************************"
/bin/echo -e "ERROR: there are $nbcasefiles case sensitive files. Please "
/bin/echo -e " rename them and check config.xml files"
/bin/echo -e "$casefiles"
/bin/echo -e "***********************************************************"
return 1
fi
return 0
}
# check there is no space in filenames!
check_space_files() {
spacefiles=`find ./ -name '* *' | grep -v '.svn' | grep -v 'README' | grep -v 'Makefile'`
if [ "$spacefiles" = "" ]; then
return 0
fi
nbspacefiles=`/bin/echo -e "$spacefiles" | wc -l`
if [ $nbspacefiles -ne 0 ]; then
/bin/echo -e "***********************************************************"
/bin/echo -e "ERROR: there are $nbspacefiles files with space in their names."
/bin/echo -e "Please rename them and check config.xml files"
/bin/echo -e "$spacefiles"
/bin/echo -e "***********************************************************"
return 1
fi
return 0
}
check_files_exist() {
filenames=`grep ' file=' $1/config.xml | sed 's/.*file=\"\(.*\)".*/\1/'`
for f in $filenames; do
if [ ! -f $1/$f ]; then
/bin/echo -e "*** ERROR: file $1/$f does not exist"
return 1
fi
done
}
check_water_type() {
VALID_WATER_TYPE="no chocolate dirtywater lava radioactive water wine"
water=`grep '<water>' $1/config.xml | sed 's%.*<water>\(.*\)</water>.*%\1%'`
for w in $VALID_WATER_TYPE; do
if [ "$water" = "$w" ]; then
return 0
fi
done
echo "*** ERROR: Invalid water type $water for map $1"
return 1
}
check_one_map_config() {
check_files_exist $1
if [ $? -ne 0 ]; then
return 1
fi
check_water_type $1
}
check_maps_config() {
for d in *; do
if [ -d "$d" ]; then
check_one_map_config "$d";
if [ $? -ne 0 ]; then
/bin/echo -e "*** ERROR: invalid configuration file for map $d"
return 1
fi
fi
done
}
check_space_files || exit 1
check_case_files || exit 1
check_maps_config || exit 1
DATE=`date +%Y%m%d`
tar -czf WarMUX-CommunituMaps-${DATE}.tar.gz * --exclude=.svn --exclude=src --exclude=compress.sh --exclude=*~
|
yeKcim/warmux
|
community_maps/compress.sh
|
Shell
|
gpl-2.0
| 2,468 |
#!/bin/sh
NETWORK="$1" # liszt28
MODE="$2" # testing
[ -z "$2" ] && {
echo "usage: $0 <network|all> <mode>"
echo "e.g. : $0 liszt28 testing"
exit 1
}
list_networks()
{
local pattern1="/var/www/networks/"
local pattern2="/meshrdf/recent"
find /var/www/networks/ -name recent |
grep "meshrdf/recent"$ |
sed -e "s|$pattern1||" -e "s|$pattern2||"
}
[ "$NETWORK" = 'all' ] && NETWORK="$( list_networks )"
for NW in $NETWORK; do {
DIR="/var/www/networks/$NW/tarball/$MODE"
cp -v /tmp/tarball.tgz $DIR
echo "CRC[md5]: $(md5sum /tmp/tarball.tgz | cut -d' ' -f1) SIZE[byte]: $(stat -c%s /tmp/tarball.tgz) FILE: 'tarball.tgz'" >"$DIR/info.txt"
} done
|
houzhenggang/kalua
|
openwrt-monitoring/tarball_update.sh
|
Shell
|
gpl-2.0
| 698 |
#! /bin/bash
#
# Usage: tag-release.sh <release-ver> [<ref>]
#
# Creates a new bugfix branch and release tag for a release.
# Optionally, the release can be based off a specific git ref.
# Default is HEAD of the current branch.
#
# The script does a lot of error checking, but boils down to
# the following actions.
#
# For major/minor releases (X.Y.0) from master branch:
# git checkout -b X.Y.x
# git tag -a X.Y.Z -m "X.Y.Z" HEAD
# and optionally:
# git push -u origin X.Y.x
# git push origin refs/tags/X.Y.Z
#
# For bugfix releases from associated branch (X.Y.x):
# git tag -a X.Y.Z -m "X.Y.Z" HEAD
# and optionally:
# git push origin refs/tags/X.Y.Z
#
GIT_EXE='git'
function validate_repo()
{
local HASH err AHEAD BEHIND proceed
# Check whether we have git
if ! hash ${GIT_EXE} 2>/dev/null; then
echo "Command '${GIT_EXE}' not found." 1>&2
return 1
fi
# Check if there is a valid git repo here
HASH=$(${GIT_EXE} rev-parse HEAD)
err=$?
if [[ ${err} -ne 0 ]]; then
echo "Not a valid repository." 1>&2
return ${err}
elif [[ -z ${HASH} ]]; then
echo "Not a valid repository." 1>&2
return 1
fi
if [[ -n "$(${GIT_EXE} status --porcelain)" ]]; then
echo "There are uncommitted changes. Aborting." 1>&2
return 1
fi
echo "Fetching repo data..."
${GIT_EXE} fetch
err=$?
if [[ ${err} -ne 0 ]]; then
echo "Failed to fetch repo data." 1>&2
return ${err}
fi
AHEAD=$(${GIT_EXE} rev-list @{u}..HEAD --count)
BEHIND=$(${GIT_EXE} rev-list HEAD..@{u} --count)
if [[ ${AHEAD} -ne 0 ]]; then
echo "There are unpushed changes. Continue anyway? (y/N)"
read proceed
if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
echo "Aborting..."
return 1
fi
fi
if [[ ${BEHIND} -ne 0 ]]; then
echo "There are unmerged upstream changes. Continue anyway? (y/N)"
read proceed
if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
echo "Aborting..."
return 1
fi
fi
}
function tag_release()
{
local TAG REF COMMIT BRANCH proceed new_branch ERR HASH
TAG=${1}
REF=${2}
if [ "x${TAG}" == "x" ]; then
echo "Missing release tag (e.g. 0.10.0)"
fi
# bugfix branch name
BRANCH=${TAG%.[0-9]*}.x
if [ "x${REF}" == "x" ]; then
echo "Creating release tag ${TAG} and branch ${BRANCH} from HEAD, proceed? (y/N)"
# retrive full hash of HEAD
COMMIT=$(${GIT_EXE} rev-list HEAD --max-count=1)
else
echo "Creating release tag ${TAG} and branch ${BRANCH} from ${REF}, proceed? (y/N)"
# retrieve full hash from ref or short hash
COMMIT=$(${GIT_EXE} rev-list ${REF} --max-count=1)
fi
read proceed
if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
echo "Aborting..."
return 0
fi
# check if the remote branch already exists
${GIT_EXE} rev-parse --quiet --verify origin/${BRANCH} > /dev/null
if [ $? -ne 0 ]; then
# remote branch does not exist
new_branch=1
# does the branch already exist locally?
${GIT_EXE} rev-parse --quiet --verify ${BRANCH} > /dev/null
if [ $? -ne 0 ]; then
# local branch does not exist
# create bugfix branch from commit
${GIT_EXE} checkout "${COMMIT}" -b "${BRANCH}"
ERR=$?
if [ ${ERR} -ne 0 ]; then
echo "Failed to create branch ${BRANCH}"
return ${ERR}
fi
else
# local branch already exists
# When the branch already exists, make sure it is being used!
current_branch=$(${GIT_EXE} rev-parse --abbrev-ref HEAD)
if [ "$current_branch" != "${BRANCH}" ]; then
echo "You did not checkout the correct branch ${BRANCH} for tag ${TAG}"
return 1
fi
fi
else
new_branch=0
# When the branch already exists, make sure it is being used!
current_branch=$(${GIT_EXE} rev-parse --abbrev-ref HEAD)
if [ "$current_branch" != "${BRANCH}" ]; then
echo "You did not checkout the correct branch ${BRANCH} for tag ${TAG}"
return 1
fi
fi
# at this point we should be at the head of the tracking branch
# for this release. Make certain that HEAD matches COMMIT
HASH=$(${GIT_EXE} rev-list HEAD --max-count=1)
if [ ${HASH} != ${COMMIT} ]; then
echo "Commit specified does not match current branch HEAD"
return 1
fi
# create tag
${GIT_EXE} tag -a "${TAG}" -m "${TAG}" HEAD
ERR=$?
if [ ${ERR} -ne 0 ]; then
echo "Failed to create tag ${TAG}"
# cleanup... remove the branch that was created
${GIT_EXE} branch -d "${BRANCH}"
return ${ERR}
fi
# checkout tag in preparation for building release
# this should put you in a "detached HEAD" state
${GIT_EXE} checkout "${TAG}"
ERR=$?
if [ ${ERR} -ne 0 ]; then
echo "Failed to checkout tag ${TAG}"
# cleanup... remove the branch that was created
${GIT_EXE} branch -d "${BRANCH}"
return ${ERR}
fi
remote=$(${GIT_EXE} config remote.origin.url)
echo
echo "Do you wish to push this release branch and tag to $remote? (y/N)"
echo "You may want to do this manually after creating and verifying release."
echo "e.g."
echo " git push -u origin ${BRANCH}"
echo " git push origin refs/tags/${TAG}"
read proceed
if [[ ( "x${proceed}" == "xy" ) || ( "x${proceed}" == "xY" ) ]] ; then
if [ $new_branch .eq 1 ]; then
${GIT_EXE} push -u origin "${BRANCH}"
ERR=$?
if [ ${ERR} -ne 0 ]; then
echo "Failed to push branch ${BRANCH} to remote"
return ${ERR}
fi
fi
${GIT_EXE} push origin refs/tags/"${TAG}"
ERR=$?
if [ ${ERR} -ne 0 ]; then
echo "Failed to push tag ${BRANCH} to remote"
return ${ERR}
fi
else
echo "Branch and tag are local, changes not pushed to remote!"
fi
}
function main()
{
if validate_repo; then
tag_release "$@"
else
return $?
fi
}
main "$@"
|
KonaBlend/HandBrake
|
scripts/tag-release.sh
|
Shell
|
gpl-2.0
| 6,437 |
TARGETDIR=$1
VERSION=$2
TARGETPATH=$1/$2
echo "Copying to $TARGETPATH"
mkdir -p $TARGETPATH
cp PPSSPPWindows.exe $TARGETPATH
cp PPSSPPWindows64.exe $TARGETPATH
cp -r assets $TARGETPATH
cp -r flash0 $TARGETPATH
cp README.md $TARGETPATH
rm $TARGETPATH/assets/lang/.git
|
FTPiano/ppsspp
|
copyrelease.sh
|
Shell
|
gpl-2.0
| 270 |
# Copyright (C) 2009-2010 OpenWrt.org
fw_config_get_rule() {
[ "${rule_NAME}" != "$1" ] || return
fw_config_get_section "$1" rule { \
string _name "$1" \
string name "" \
string src "" \
ipaddr src_ip "" \
string src_mac "" \
string src_port "" \
string dest "" \
ipaddr dest_ip "" \
string dest_port "" \
string icmp_type "" \
string proto "tcpudp" \
string target "" \
string family "" \
string limit "" \
string limit_burst "" \
string extra "" \
} || return
[ -n "$rule_name" ] || rule_name=$rule__name
}
fw_load_rule() {
fw_config_get_rule "$1"
[ "$rule_target" != "NOTRACK" ] || [ -n "$rule_src" ] || [ "$rule_src" != "*" ] || {
fw_log error "NOTRACK rule ${rule_name}: needs src, skipping"
return 0
}
fw_callback pre rule
local table=f
local chain=input
local target="${rule_target:-REJECT}"
if [ "$target" == "NOTRACK" ]; then
table=r
chain="zone_${rule_src}_notrack"
else
if [ -n "$rule_src" ]; then
if [ "$rule_src" != "*" ]; then
chain="zone_${rule_src}${rule_dest:+_forward}"
else
chain="${rule_dest:+forward}"
chain="${chain:-input}"
fi
fi
if [ -n "$rule_dest" ]; then
if [ "$rule_dest" != "*" ]; then
target="zone_${rule_dest}_${target}"
elif [ "$target" = REJECT ]; then
target=reject
fi
fi
fi
local mode
fw_get_family_mode mode ${rule_family:-x} $rule_src I
local src_spec dest_spec
fw_get_negation src_spec '-s' "${rule_src_ip:+$rule_src_ip/$rule_src_ip_prefixlen}"
fw_get_negation dest_spec '-d' "${rule_dest_ip:+$rule_dest_ip/$rule_dest_ip_prefixlen}"
[ "$rule_proto" == "tcpudp" ] && rule_proto="tcp udp"
local pr; for pr in $rule_proto; do
local sports dports itypes
case "$pr" in
icmp|icmpv6|1|58)
sports=""; dports=""
itypes="$rule_icmp_type"
;;
*)
sports="$rule_src_port"
dports="$rule_dest_port"
itypes=""
;;
esac
fw_get_negation pr '-p' "$pr"
local sp; for sp in ${sports:-""}; do
fw_get_port_range sp $sp
fw_get_negation sp '--sport' "$sp"
local dp; for dp in ${dports:-""}; do
fw_get_port_range dp $dp
fw_get_negation dp '--dport' "$dp"
local sm; for sm in ${rule_src_mac:-""}; do
fw_get_negation sm '--mac-source' "$sm"
local it; for it in ${itypes:-""}; do
fw_get_negation it '--icmp-type' "$it"
fw add $mode $table $chain $target + \
{ $rule_src_ip $rule_dest_ip } { \
$src_spec $dest_spec \
$pr $sp $dp $it \
${sm:+-m mac $sm} \
${rule_limit:+-m limit --limit $rule_limit \
${rule_limit_burst:+--limit-burst $rule_limit_burst}} \
$rule_extra \
}
done
done
done
done
done
fw_callback post rule
}
|
riedel/openwrt-wdtv
|
package/firewall/files/lib/core_rule.sh
|
Shell
|
gpl-2.0
| 2,703 |
#!/bin/sh
# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind
#
# Script to start the MySQL daemon and restart it if it dies unexpectedly
#
# This should be executed in the MySQL base directory if you are using a
# binary installation that is not installed in its compile-time default
# location
#
# mysql.server works by first doing a cd to the base directory and from there
# executing mysqld_safe
# Initialize script globals
KILL_MYSQLD=1;
MYSQLD=
niceness=0
mysqld_ld_preload=
mysqld_ld_library_path=
# Initial logging status: error log is not open, and not using syslog
logging=init
want_syslog=0
syslog_tag=
user='@MYSQLD_USER@'
pid_file=
err_log=
syslog_tag_mysqld=mysqld
syslog_tag_mysqld_safe=mysqld_safe
trap '' 1 2 3 15 # we shouldn't let anyone kill us
umask 007
defaults=
case "$1" in
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
defaults="$1"; shift
;;
esac
usage () {
cat <<EOF
Usage: $0 [OPTIONS]
--no-defaults Don't read the system defaults file
--defaults-file=FILE Use the specified defaults file
--defaults-extra-file=FILE Also use defaults from the specified file
--ledir=DIRECTORY Look for mysqld in the specified directory
--open-files-limit=LIMIT Limit the number of open files
--core-file-size=LIMIT Limit core files to the specified size
--timezone=TZ Set the system timezone
--malloc-lib=LIB Preload shared library LIB if available
--mysqld=FILE Use the specified file as mysqld
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld
--nice=NICE Set the scheduling priority of mysqld
--plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if
VERSION is given
--skip-kill-mysqld Don't try to kill stray mysqld processes
--syslog Log messages to syslog with 'logger'
--skip-syslog Log messages to error log (default)
--syslog-tag=TAG Pass -t "mysqld-TAG" to 'logger'
All other options are passed to the mysqld program.
EOF
exit 1
}
my_which ()
{
save_ifs="${IFS-UNSET}"
IFS=:
ret=0
for file
do
for dir in $PATH
do
if [ -f "$dir/$file" ]
then
echo "$dir/$file"
continue 2
fi
done
ret=1 #signal an error
break
done
if [ "$save_ifs" = UNSET ]
then
unset IFS
else
IFS="$save_ifs"
fi
return $ret # Success
}
log_generic () {
priority="$1"
shift
msg="`date +'%y%m%d %H:%M:%S'` mysqld_safe $*"
echo "$msg"
case $logging in
init) ;; # Just echo the message, don't save it anywhere
file) echo "$msg" >> "$err_log" ;;
syslog) logger -t "$syslog_tag_mysqld_safe" -p "$priority" "$*" ;;
*)
echo "Internal program error (non-fatal):" \
" unknown logging method '$logging'" >&2
;;
esac
}
log_error () {
log_generic daemon.error "$@" >&2
}
log_notice () {
log_generic daemon.notice "$@"
}
eval_log_error () {
cmd="$1"
case $logging in
file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
syslog)
# mysqld often prefixes its messages with a timestamp, which is
# redundant when logging to syslog (which adds its own timestamp)
# However, we don't strip the timestamp with sed here, because
# sed buffers output (only GNU sed supports a -u (unbuffered) option)
# which means that messages may not get sent to syslog until the
# mysqld process quits.
cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error"
;;
*)
echo "Internal program error (non-fatal):" \
" unknown logging method '$logging'" >&2
;;
esac
#echo "Running mysqld: [$cmd]"
eval "$cmd"
}
shell_quote_string() {
# This sed command makes sure that any special chars are quoted,
# so the arg gets passed exactly to the server.
echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g'
}
parse_arguments() {
# We only need to pass arguments through to the server if we don't
# handle them here. So, we collect unrecognized options (passed on
# the command line) into the args variable.
pick_args=
if test "$1" = PICK-ARGS-FROM-ARGV
then
pick_args=1
shift
fi
for arg do
# the parameter after "=", or the whole $arg if no match
val=`echo "$arg" | sed -e 's;^--[^=]*=;;'`
# what's before "=", or the whole $arg if no match
optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'`
# replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does.
optname_subst=`echo "$optname" | sed 's/_/-/g'`
arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
case "$arg" in
# these get passed explicitly to mysqld
--basedir=*) MY_BASEDIR_VERSION="$val" ;;
--datadir=*) DATADIR="$val" ;;
--pid-file=*) pid_file="$val" ;;
--plugin-dir=*) PLUGIN_DIR="$val" ;;
--user=*) user="$val"; SET_USER=1 ;;
# these might have been set in a [mysqld_safe] section of my.cnf
# they are added to mysqld command line to override settings from my.cnf
--log-error=*) err_log="$val" ;;
--port=*) mysql_tcp_port="$val" ;;
--socket=*) mysql_unix_port="$val" ;;
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--core-file-size=*) core_file_size="$val" ;;
--ledir=*) ledir="$val" ;;
--malloc-lib=*) set_malloc_lib "$val" ;;
--mysqld=*) MYSQLD="$val" ;;
--mysqld-version=*)
if test -n "$val"
then
MYSQLD="mysqld-$val"
PLUGIN_VARIANT="/$val"
else
MYSQLD="mysqld"
fi
;;
--nice=*) niceness="$val" ;;
--open-files-limit=*) open_files="$val" ;;
--open_files_limit=*) open_files="$val" ;;
--skip-kill-mysqld*) KILL_MYSQLD=0 ;;
--syslog) want_syslog=1 ;;
--skip-syslog) want_syslog=0 ;;
--syslog-tag=*) syslog_tag="$val" ;;
--timezone=*) TZ="$val"; export TZ; ;;
--help) usage ;;
*)
if test -n "$pick_args"
then
append_arg_to_args "$arg"
fi
;;
esac
done
}
# Add a single shared library to the list of libraries which will be added to
# LD_PRELOAD for mysqld
#
# Since LD_PRELOAD is a space-separated value (for historical reasons), if a
# shared lib's path contains spaces, that path will be prepended to
# LD_LIBRARY_PATH and stripped from the lib value.
add_mysqld_ld_preload() {
lib_to_add="$1"
log_notice "Adding '$lib_to_add' to LD_PRELOAD for mysqld"
case "$lib_to_add" in
*' '*)
# Must strip path from lib, and add it to LD_LIBRARY_PATH
lib_file=`basename "$lib_to_add"`
case "$lib_file" in
*' '*)
# The lib file itself has a space in its name, and can't
# be used in LD_PRELOAD
log_error "library name '$lib_to_add' contains spaces and can not be used with LD_PRELOAD"
exit 1
;;
esac
lib_path=`dirname "$lib_to_add"`
lib_to_add="$lib_file"
[ -n "$mysqld_ld_library_path" ] && mysqld_ld_library_path="$mysqld_ld_library_path:"
mysqld_ld_library_path="$mysqld_ld_library_path$lib_path"
;;
esac
# LD_PRELOAD is a space-separated
[ -n "$mysqld_ld_preload" ] && mysqld_ld_preload="$mysqld_ld_preload "
mysqld_ld_preload="${mysqld_ld_preload}$lib_to_add"
}
# Returns LD_PRELOAD (and LD_LIBRARY_PATH, if needed) text, quoted to be
# suitable for use in the eval that calls mysqld.
#
# All values in mysqld_ld_preload are prepended to LD_PRELOAD.
mysqld_ld_preload_text() {
text=
if [ -n "$mysqld_ld_preload" ]; then
new_text="$mysqld_ld_preload"
[ -n "$LD_PRELOAD" ] && new_text="$new_text $LD_PRELOAD"
text="${text}LD_PRELOAD="`shell_quote_string "$new_text"`' '
fi
if [ -n "$mysqld_ld_library_path" ]; then
new_text="$mysqld_ld_library_path"
[ -n "$LD_LIBRARY_PATH" ] && new_text="$new_text:$LD_LIBRARY_PATH"
text="${text}LD_LIBRARY_PATH="`shell_quote_string "$new_text"`' '
fi
echo "$text"
}
mysql_config=
get_mysql_config() {
if [ -z "$mysql_config" ]; then
mysql_config=`echo "$0" | sed 's,/[^/][^/]*$,/mysql_config,'`
if [ ! -x "$mysql_config" ]; then
log_error "Can not run mysql_config $@ from '$mysql_config'"
exit 1
fi
fi
"$mysql_config" "$@"
}
# set_malloc_lib LIB
# - If LIB is empty, do nothing and return
# - If LIB is 'tcmalloc', look for tcmalloc shared library in /usr/lib
# then pkglibdir. tcmalloc is part of the Google perftools project.
# - If LIB is an absolute path, assume it is a malloc shared library
#
# Put LIB in mysqld_ld_preload, which will be added to LD_PRELOAD when
# running mysqld. See ld.so for details.
set_malloc_lib() {
malloc_lib="$1"
if [ "$malloc_lib" = tcmalloc ]; then
pkglibdir=`get_mysql_config --variable=pkglibdir`
malloc_lib=
# This list is kept intentionally simple. Simply set --malloc-lib
# to a full path if another location is desired.
for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do
for flavor in _minimal '' _and_profiler _debug; do
tmp="$libdir/libtcmalloc$flavor.so"
#log_notice "DEBUG: Checking for malloc lib '$tmp'"
[ -r "$tmp" ] || continue
malloc_lib="$tmp"
break 2
done
done
if [ -z "$malloc_lib" ]; then
log_error "no shared library for --malloc-lib=tcmalloc found in /usr/lib or $pkglibdir"
exit 1
fi
fi
# Allow --malloc-lib='' to override other settings
[ -z "$malloc_lib" ] && return
case "$malloc_lib" in
/*)
if [ ! -r "$malloc_lib" ]; then
log_error "--malloc-lib '$malloc_lib' can not be read and will not be used"
exit 1
fi
;;
*)
log_error "--malloc-lib must be an absolute path or 'tcmalloc'; " \
"ignoring value '$malloc_lib'"
exit 1
;;
esac
add_mysqld_ld_preload "$malloc_lib"
}
#
# First, try to find BASEDIR and ledir (where mysqld is)
#
if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
then
relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
else
# pkgdatadir is not relative to prefix
relpkgdata='@pkgdatadir@'
fi
MY_PWD=`pwd`
# Check for the directories we would expect from a binary release install
if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
then
# BASEDIR is already overridden on command line. Do not re-set.
# Use BASEDIR to discover le.
if test -x "$MY_BASEDIR_VERSION/libexec/mysqld"
then
ledir="$MY_BASEDIR_VERSION/libexec"
elif test -x "$MY_BASEDIR_VERSION/sbin/mysqld"
then
ledir="$MY_BASEDIR_VERSION/sbin"
else
ledir="$MY_BASEDIR_VERSION/bin"
fi
elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/bin/mysqld"
then
MY_BASEDIR_VERSION="$MY_PWD" # Where bin, share and data are
ledir="$MY_PWD/bin" # Where mysqld is
# Check for the directories we would expect from a source install
elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/libexec/mysqld"
then
MY_BASEDIR_VERSION="$MY_PWD" # Where libexec, share and var are
ledir="$MY_PWD/libexec" # Where mysqld is
elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/sbin/mysqld"
then
MY_BASEDIR_VERSION="$MY_PWD" # Where sbin, share and var are
ledir="$MY_PWD/sbin" # Where mysqld is
# Since we didn't find anything, used the compiled-in defaults
else
MY_BASEDIR_VERSION='@prefix@'
ledir='@libexecdir@'
fi
#
# Second, try to find the data directory
#
# Try where the binary installs put it
if test -d $MY_BASEDIR_VERSION/data/mysql
then
DATADIR=$MY_BASEDIR_VERSION/data
if test -z "$defaults" -a -r "$DATADIR/my.cnf"
then
defaults="--defaults-extra-file=$DATADIR/my.cnf"
fi
# Next try where the source installs put it
elif test -d $MY_BASEDIR_VERSION/var/mysql
then
DATADIR=$MY_BASEDIR_VERSION/var
# Or just give up and use our compiled-in default
else
DATADIR=@localstatedir@
fi
#
# Try to find the plugin directory
#
# Use user-supplied argument
if [ -n "${PLUGIN_DIR}" ]; then
plugin_dir="${PLUGIN_DIR}"
else
# Try to find plugin dir relative to basedir
for dir in lib/mysql/plugin lib/plugin
do
if [ -d "${MY_BASEDIR_VERSION}/${dir}" ]; then
plugin_dir="${MY_BASEDIR_VERSION}/${dir}"
break
fi
done
# Give up and use compiled-in default
if [ -z "${plugin_dir}" ]; then
plugin_dir='@pkgplugindir@'
fi
fi
plugin_dir="${plugin_dir}${PLUGIN_VARIANT}"
if test -z "$MYSQL_HOME"
then
if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"
then
log_error "WARNING: Found two instances of my.cnf -
$MY_BASEDIR_VERSION/my.cnf and
$DATADIR/my.cnf
IGNORING $DATADIR/my.cnf"
MYSQL_HOME=$MY_BASEDIR_VERSION
elif test -r "$DATADIR/my.cnf"
then
log_error "WARNING: Found $DATADIR/my.cnf
The data directory is a deprecated location for my.cnf, please move it to
$MY_BASEDIR_VERSION/my.cnf"
MYSQL_HOME=$DATADIR
else
MYSQL_HOME=$MY_BASEDIR_VERSION
fi
fi
export MYSQL_HOME
# Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
# and then merge with the command line arguments
if test -x "$MY_BASEDIR_VERSION/bin/my_print_defaults"
then
print_defaults="$MY_BASEDIR_VERSION/bin/my_print_defaults"
elif test -x `dirname $0`/my_print_defaults
then
print_defaults="`dirname $0`/my_print_defaults"
elif test -x ./bin/my_print_defaults
then
print_defaults="./bin/my_print_defaults"
elif test -x @bindir@/my_print_defaults
then
print_defaults="@bindir@/my_print_defaults"
elif test -x @bindir@/mysql_print_defaults
then
print_defaults="@bindir@/mysql_print_defaults"
else
print_defaults="my_print_defaults"
fi
append_arg_to_args () {
args="$args "`shell_quote_string "$1"`
}
args=
SET_USER=2
parse_arguments `$print_defaults $defaults --loose-verbose mysqld server`
if test $SET_USER -eq 2
then
SET_USER=0
fi
parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
# Determine what logging facility to use
# Ensure that 'logger' exists, if it's requested
if [ $want_syslog -eq 1 ]
then
my_which logger > /dev/null 2>&1
if [ $? -ne 0 ]
then
log_error "--syslog requested, but no 'logger' program found. Please ensure that 'logger' is in your PATH, or do not specify the --syslog option to mysqld_safe."
exit 1
fi
fi
if [ -n "$err_log" -o $want_syslog -eq 0 ]
then
if [ -n "$err_log" ]
then
# mysqld adds ".err" if there is no extension on the --log-error
# argument; must match that here, or mysqld_safe will write to a
# different log file than mysqld
# mysqld does not add ".err" to "--log-error=foo."; it considers a
# trailing "." as an extension
if expr "$err_log" : '.*\.[^/]*$' > /dev/null
then
:
else
err_log="$err_log".err
fi
case "$err_log" in
/* ) ;;
* ) err_log="$DATADIR/$err_log" ;;
esac
else
err_log=$DATADIR/`@HOSTNAME@`.err
fi
append_arg_to_args "--log-error=$err_log"
if [ $want_syslog -eq 1 ]
then
# User explicitly asked for syslog, so warn that it isn't used
log_error "Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect."
fi
# Log to err_log file
log_notice "Logging to '$err_log'."
logging=file
else
if [ -n "$syslog_tag" ]
then
# Sanitize the syslog tag
syslog_tag=`echo "$syslog_tag" | sed -e 's/[^a-zA-Z0-9_-]/_/g'`
syslog_tag_mysqld_safe="${syslog_tag_mysqld_safe}-$syslog_tag"
syslog_tag_mysqld="${syslog_tag_mysqld}-$syslog_tag"
fi
log_notice "Logging to syslog."
logging=syslog
fi
USER_OPTION=""
if test -w / -o "$USER" = "root"
then
if test "$user" != "root" -o $SET_USER = 1
then
USER_OPTION="--user=$user"
fi
# Change the err log to the right user, if it is in use
if [ $want_syslog -eq 0 ]; then
touch "$err_log"
chown $user "$err_log"
fi
if test -n "$open_files"
then
ulimit -n $open_files
fi
fi
if test -n "$open_files"
then
append_arg_to_args "--open-files-limit=$open_files"
fi
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
# Make sure that directory for $safe_mysql_unix_port exists
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
if [ ! -d $mysql_unix_port_dir ]
then
mkdir $mysql_unix_port_dir
chown $user $mysql_unix_port_dir
chmod 755 $mysql_unix_port_dir
fi
# If the user doesn't specify a binary, we assume name "mysqld"
if test -z "$MYSQLD"
then
MYSQLD=mysqld
fi
if test ! -x "$ledir/$MYSQLD"
then
log_error "The file $ledir/$MYSQLD
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information"
exit 1
fi
if test -z "$pid_file"
then
pid_file="$DATADIR/`@HOSTNAME@`.pid"
else
case "$pid_file" in
/* ) ;;
* ) pid_file="$DATADIR/$pid_file" ;;
esac
fi
append_arg_to_args "--pid-file=$pid_file"
if test -n "$mysql_unix_port"
then
append_arg_to_args "--socket=$mysql_unix_port"
fi
if test -n "$mysql_tcp_port"
then
append_arg_to_args "--port=$mysql_tcp_port"
fi
if test $niceness -eq 0
then
NOHUP_NICENESS="nohup"
else
NOHUP_NICENESS="nohup nice -$niceness"
fi
# Using nice with no args to get the niceness level is GNU-specific.
# This check could be extended for other operating systems (e.g.,
# BSD could use "nohup sh -c 'ps -o nice -p $$' | tail -1").
# But, it also seems that GNU nohup is the only one which messes
# with the priority, so this is okay.
if nohup nice > /dev/null 2>&1
then
normal_niceness=`nice`
nohup_niceness=`nohup nice 2>/dev/null`
numeric_nice_values=1
for val in $normal_niceness $nohup_niceness
do
case "$val" in
-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | \
[0-9] | [0-9][0-9] | [0-9][0-9][0-9] )
;;
* )
numeric_nice_values=0 ;;
esac
done
if test $numeric_nice_values -eq 1
then
nice_value_diff=`expr $nohup_niceness - $normal_niceness`
if test $? -eq 0 && test $nice_value_diff -gt 0 && \
nice --$nice_value_diff echo testing > /dev/null 2>&1
then
# nohup increases the priority (bad), and we are permitted
# to lower the priority with respect to the value the user
# might have been given
niceness=`expr $niceness - $nice_value_diff`
NOHUP_NICENESS="nice -$niceness nohup"
fi
fi
else
if nohup echo testing > /dev/null 2>&1
then
:
else
# nohup doesn't work on this system
NOHUP_NICENESS=""
fi
fi
# Try to set the core file size (even if we aren't root) because many systems
# don't specify a hard limit on core file size.
if test -n "$core_file_size"
then
ulimit -c $core_file_size
fi
#
# If there exists an old pid file, check if the daemon is already running
# Note: The switches to 'ps' may depend on your operating system
if test -f "$pid_file"
then
PID=`cat "$pid_file"`
if @CHECK_PID@
then
if @FIND_PROC@
then # The pid contains a mysqld process
log_error "A mysqld process already exists"
exit 1
fi
fi
rm -f "$pid_file"
if test -f "$pid_file"
then
log_error "Fatal error: Can't remove the pid file:
$pid_file
Please remove it manually and start $0 again;
mysqld daemon not started"
exit 1
fi
fi
#
# Uncomment the following lines if you want all tables to be automatically
# checked and repaired during startup. You should add sensible key_buffer
# and sort_buffer values to my.cnf to improve check performance or require
# less disk space.
# Alternatively, you can start mysqld with the "myisam-recover" option. See
# the manual for details.
#
# echo "Checking tables in $DATADIR"
# $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check $DATADIR/*/*.MYI
# $MY_BASEDIR_VERSION/bin/isamchk --silent --force $DATADIR/*/*.ISM
# Does this work on all systems?
#if type ulimit | grep "shell builtin" > /dev/null
#then
# ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and FreeBSD systems
#fi
cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
"--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
do
cmd="$cmd "`shell_quote_string "$i"`
done
cmd="$cmd $args"
# Avoid 'nohup: ignoring input' warning
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"
log_notice "Starting $MYSQLD daemon with databases from $DATADIR"
while true
do
rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety
eval_log_error "$cmd"
if test ! -f "$pid_file" # This is removed if normal shutdown
then
break
fi
if @TARGET_LINUX@ && test $KILL_MYSQLD -eq 1
then
# Test if one process was hanging.
# This is only a fix for Linux (running as base 3 mysqld processes)
# but should work for the rest of the servers.
# The only thing is ps x => redhat 5 gives warnings when using ps -x.
# kill -9 is used or the process won't react on the kill.
numofproces=`ps xaww | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"`
log_notice "Number of processes running now: $numofproces"
I=1
while test "$I" -le "$numofproces"
do
PROC=`ps xaww | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "pid-file=$pid_file" | sed -n '$p'`
for T in $PROC
do
break
done
# echo "TEST $I - $T **"
if kill -9 $T
then
log_error "$MYSQLD process hanging, pid $T - killed"
else
break
fi
I=`expr $I + 1`
done
fi
log_notice "mysqld restarted"
done
log_notice "mysqld from pid file $pid_file ended"
|
dmhust/mysql-5.5.20
|
scripts/mysqld_safe.sh
|
Shell
|
gpl-2.0
| 22,030 |
export HOMEIO_SITE=wind
[ -d build ] || mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++ ..
make
|
HomeIO/homeio_backend
|
cmake_wind.sh
|
Shell
|
gpl-3.0
| 109 |
FREEBAYES=/export/home/rgarcia/software/freebayes/bin/freebayes
REF=/export/home/rgarcia/reference/GRCh38/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna
BED=/export/home/rgarcia/canalopatias/targets/Miocardiopatias_y_canalopatias_AllTracks.bed
SAMDIR_ION=/export/home/rgarcia/canalopatias/sam_ion
SAMDIR_MISEQ=/export/home/rgarcia/canalopatias/sam_miseq
VCFDIR=/export/home/rgarcia/canalopatias/vcf_ion_miseq
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S01_dedup.bam $SAMDIR_ION/S01_dedup.bam -v $VCFDIR/S01.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S02_dedup.bam $SAMDIR_ION/S02_dedup.bam -v $VCFDIR/S02.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S03_dedup.bam $SAMDIR_ION/S03_dedup.bam -v $VCFDIR/S03.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S04_dedup.bam $SAMDIR_ION/S04_dedup.bam -v $VCFDIR/S04.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S05_dedup.bam $SAMDIR_ION/S05_dedup.bam -v $VCFDIR/S05.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S06_dedup.bam $SAMDIR_ION/S06_dedup.bam -v $VCFDIR/S06.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S07_dedup.bam $SAMDIR_ION/S07_dedup.bam -v $VCFDIR/S07.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S08_dedup.bam $SAMDIR_ION/S08_dedup.bam -v $VCFDIR/S08.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S09_dedup.bam $SAMDIR_ION/S09_dedup.bam -v $VCFDIR/S09.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S10_dedup.bam $SAMDIR_ION/S10_dedup.bam -v $VCFDIR/S10.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S11_dedup.bam $SAMDIR_ION/S11_dedup.bam -v $VCFDIR/S11.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S12_dedup.bam $SAMDIR_ION/S12_dedup.bam -v $VCFDIR/S12.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S13_dedup.bam $SAMDIR_ION/S13_dedup.bam -v $VCFDIR/S13.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S14_dedup.bam $SAMDIR_ION/S14_dedup.bam -v $VCFDIR/S14.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S15_dedup.bam $SAMDIR_ION/S15_dedup.bam -v $VCFDIR/S15.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S16_dedup.bam $SAMDIR_ION/S16_dedup.bam -v $VCFDIR/S16.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S17_dedup.bam $SAMDIR_ION/S17_dedup.bam -v $VCFDIR/S17.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S18_dedup.bam $SAMDIR_ION/S18_dedup.bam -v $VCFDIR/S18.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S19_dedup.bam $SAMDIR_ION/S19_dedup.bam -v $VCFDIR/S19.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S20_dedup.bam $SAMDIR_ION/S20_dedup.bam -v $VCFDIR/S20.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S21_dedup.bam $SAMDIR_ION/S21_dedup.bam -v $VCFDIR/S21.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S22_dedup.bam $SAMDIR_ION/S22_dedup.bam -v $VCFDIR/S22.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S23_dedup.bam $SAMDIR_ION/S23_dedup.bam -v $VCFDIR/S23.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S24_dedup.bam $SAMDIR_ION/S24_dedup.bam -v $VCFDIR/S24.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S25_dedup.bam $SAMDIR_ION/S25_dedup.bam -v $VCFDIR/S25.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S26_dedup.bam $SAMDIR_ION/S26_dedup.bam -v $VCFDIR/S26.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S27_dedup.bam $SAMDIR_ION/S27_dedup.bam -v $VCFDIR/S27.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S28_dedup.bam $SAMDIR_ION/S28_dedup.bam -v $VCFDIR/S28.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S29_dedup.bam $SAMDIR_ION/S29_dedup.bam -v $VCFDIR/S29.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S30_dedup.bam $SAMDIR_ION/S30_dedup.bam -v $VCFDIR/S30.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S31_dedup.bam $SAMDIR_ION/S31_dedup.bam -v $VCFDIR/S31.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S32_dedup.bam $SAMDIR_ION/S32_dedup.bam -v $VCFDIR/S32.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S33_dedup.bam $SAMDIR_ION/S33_dedup.bam -v $VCFDIR/S33.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S34_dedup.bam $SAMDIR_ION/S34_dedup.bam -v $VCFDIR/S34.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S35_dedup.bam $SAMDIR_ION/S35_dedup.bam -v $VCFDIR/S35.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S36_dedup.bam $SAMDIR_ION/S36_dedup.bam -v $VCFDIR/S36.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S37_dedup.bam $SAMDIR_ION/S37_dedup.bam -v $VCFDIR/S37.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S38_dedup.bam $SAMDIR_ION/S38_dedup.bam -v $VCFDIR/S38.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S39_dedup.bam $SAMDIR_ION/S39_dedup.bam -v $VCFDIR/S39.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S40_dedup.bam $SAMDIR_ION/S40_dedup.bam -v $VCFDIR/S40.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S41_dedup.bam $SAMDIR_ION/S41_dedup.bam -v $VCFDIR/S41.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S42_dedup.bam $SAMDIR_ION/S42_dedup.bam -v $VCFDIR/S42.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S43_dedup.bam $SAMDIR_ION/S43_dedup.bam -v $VCFDIR/S43.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S44_dedup.bam $SAMDIR_ION/S44_dedup.bam -v $VCFDIR/S44.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S45_dedup.bam $SAMDIR_ION/S45_dedup.bam -v $VCFDIR/S45.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S46_dedup.bam $SAMDIR_ION/S46_dedup.bam -v $VCFDIR/S46.vcf
$FREEBAYES --standard-filters -t $BED -f $REF $SAMDIR_MISEQ/S47_dedup.bam $SAMDIR_ION/S47_dedup.bam -v $VCFDIR/S47.vcf
|
INMEGEN/MCAC
|
call_variants_freebayes/call_variants_from_ion_et_miseq.sh
|
Shell
|
gpl-3.0
| 6,005 |
##depends:none
# prinseq
cd ${TMPDIR_PATH}/
#curl -sL http://sourceforge.net/projects/prinseq/files/standalone/prinseq-lite-0.20.4.tar.gz/download | tar -xz
curl -sL http://$NIC_MIRROR/pub/sci/molbio/chipster/dist/tools_extras/prinseq-lite-0.20.4.tar.gz | tar -xz
chmod a+x prinseq-lite-0.20.4/*.pl
mv prinseq-lite-0.20.4 ${TOOLS_PATH}/
ln -s prinseq-lite-0.20.4 ${TOOLS_PATH}/prinseq
|
ilarischeinin/chipster
|
src/main/admin/vm/modules/external_tools/prinseq.bash
|
Shell
|
gpl-3.0
| 399 |
#!/bin/sh
OF=/home/disk2/benFinder/benFinder.log
echo "Starting benFinder" > $OF
cd /home/graham/benFinder
python ./benFinder.py > $OF 2>&1
|
OpenSeizureDetector/OpenSeizureDetector
|
kinect_version/benFinder/runBenFinder.sh
|
Shell
|
gpl-3.0
| 140 |
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=GNU-Linux
CND_CONF=Debug
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cppapplication_1
OUTPUT_BASENAME=cppapplication_1
PACKAGE_TOP_DIR=cppapplication1/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
rm -rf ${NBTMPDIR}
mkdir -p ${NBTMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory "${NBTMPDIR}/cppapplication1/bin"
copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cppapplication1.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}
|
Sajgon66/Practise
|
PrimeFactorization/nbproject/Package-Debug.bash
|
Shell
|
gpl-3.0
| 1,489 |
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1vAGREzlRwYKl
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OwxWWbRdmWxQ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1mrGmnLyjPVJy
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OwxWErAAAwGQ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1rmxPOyEAdjJN
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1YpKkWlLPbVKj
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1lDxLAlNgERKm
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1kvKpkbZjDXxE
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1eaJbqgPvykGX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1lDxLAPbbVYKm
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1yoKMMZwOqeKQ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1nAKEWLqVlvJL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1BRKjLeLbEeJw
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1YpKkWLDdjyKj
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OdKrAekoqXxX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1ynJOodqYbwJR
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OyJAdvajDbGb
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1ZkJzdpbLDNKv
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1BdGYMVOXwYGX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1MnxngyzkByKO
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1eaJbqemEDvGX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1rmxPOppmgQJN
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1yoJMMYoqWzJQ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1vOxwNBEBVoJB
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1nAKEWnMmovJL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1ZkKzdlgANdJv
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1rmxPOBoavVJN
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1jMJgdDOozwxL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1jMKgdDDRBmGL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1RDxlnMzAklGL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1rmGPOVeAyyKN
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1MnGngOmwZEJO
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1RDxlnMeppEGL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1ypKdNyXBEyJW
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1BdGYMmBppYGX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1nAKEWNEgZaJL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1ynKOovrNAvKR
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1mrxmZpWPgVKy
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1yNGaVrBVQDJj
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1vAGRMnLlogKl
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OyJArLRzpyxb
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1jMJgPXWrelxL
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1yNGamOPweWGj
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1lPKqwzdgymJb
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1BdGYWBdPyQxX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1MYxNXWONNQGw
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1YpJkmyQPvyKj
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1djxXAWwpdoKZ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OdJryAvArvGX
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1gqxvbdLDrRxB
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1OwxWAbvqYnGQ
tubeup --metadata=collection:weedtubers http://pscp.tv/HighFromPiper/1zqKVAkkeDYxB
|
vxbinaca/archive-env-NG
|
re-rip/periscope/HighFromPiper.sh
|
Shell
|
gpl-3.0
| 4,316 |
#!/bin/bash
[[ -z ${DESTINATION_DIR} ]] && DESTINATION_DIR="keyfiles"
[[ -z ${PARTICLE_DATA_TABLE} ]] && PARTICLE_DATA_TABLE="../../../particleData/particleDataTable.txt"
[[ -z ${WAVESET_FILES} ]] && WAVESET_FILES=""
TEMPLATE_KEY_FILES="etaeta.template.key pi-eta.template.key"
# if WAVESET_FILES is not empty, only keep those keyfiles actually used in one
# of the wavesets.
# check and create directory to contain the keyfiles
if [[ ! -d ${DESTINATION_DIR} ]]
then
mkdir -p ${DESTINATION_DIR}
fi
# generate the keyfiles
for TEMPLATE_KEY_FILE in ${TEMPLATE_KEY_FILES}
do
generateWaveSet -p ${PARTICLE_DATA_TABLE} -o ${DESTINATION_DIR} -k ${TEMPLATE_KEY_FILE}
done
if [[ ! -z "${WAVESET_FILES}" ]]
then
# copy wavesets to destination dir
ALL_WAVESET_FILES=
for WAVESET_FILE in ${WAVESET_FILES}
do
if [[ ! -e ${WAVESET_FILE} ]]
then
echo "Waveset file '${WAVESET_FILE}' does not exist."
else
cp ${WAVESET_FILE} ${DESTINATION_DIR}
ALL_WAVESET_FILES="${ALL_WAVESET_FILES} ${DESTINATION_DIR}/${WAVESET_FILE}"
fi
done
# create list of all waves in wavesets (removing the thresholds)
awk '{print $1}' ${ALL_WAVESET_FILES} | sed -e 's/\.amp$//' | awk '{print $0".key"}' | sort -u > temp.waves.keep
# create list of all keyfiles just created
for i in `ls -1 ${DESTINATION_DIR}/*.key` ; do basename $i ; done | sort -u > temp.waves.all
if [[ `diff temp.waves.all temp.waves.keep | grep "^>" | wc -l` -gt 0 ]]
then
echo "The wavesets contain waves for which no keyfiles were created."
diff temp.waves.all temp.waves.keep | grep "^>" | awk '{print $2}'
echo "No keyfiles will be removed!"
else
rm -rf `diff temp.waves.all temp.waves.keep | grep "^<" | awk "{print \"${DESTINATION_DIR}/\"\\\$2}"`
fi
rm -rf temp.waves.all temp.waves.keep
fi
|
odrotleff/ROOTPWA
|
userAnalysisWorkspace/pi_2eta.-00/keyfiles/GenerateKeyfiles.sh
|
Shell
|
gpl-3.0
| 1,776 |
#!/usr/bin/env bash
set -eu
branch=${DEPENDS_ON_BATS_VERSION:-v0.4.0}
rm -rf bats
git clone https://github.com/sstephenson/bats.git --branch $branch
cd bats
./install.sh "$DEPENDS_PREFIX"
|
netj/buildkit
|
depends/common/bats/install.sh
|
Shell
|
gpl-3.0
| 190 |
#!/bin/sh
# This script pushes updates to my Ubuntu PPA: https://launchpad.net/~micahflee/+archive/ppa
# If you want to use it, you'll need your own ~/.dput.cf and ssh key.
# More info: https://help.launchpad.net/Packaging/PPA/Uploading
VERSION=`cat version`
rm -rf deb_dist
python setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/pdf-redact-tools-$VERSION
dpkg-buildpackage -S
cd ..
dput ppa:micahflee/ppa pdf-redact-tools_$VERSION-1_source.changes
cd ..
|
firstlook/pdf-redact-tools
|
ppa_release.sh
|
Shell
|
gpl-3.0
| 474 |
#!/bin/bash -f
xv_path="/opt/Xilinx/Vivado/2016.2"
ExecStep()
{
"$@"
RETVAL=$?
if [ $RETVAL -ne 0 ]
then
exit $RETVAL
fi
}
ExecStep $xv_path/bin/xsim Testbench_FPU_multiplication_behav -key {Behavioral:sim_1:Functional:Testbench_FPU_multiplication} -tclbatch Testbench_FPU_multiplication.tcl -view /home/jorge/Documents/Karatsuba_FPU/Karat/MUL_FPU_FUNCIONAL_v1/MUL_FPU_FUNCIONAL_v1.srcs/sim_1/imports/Proyecto_De_Graduacion/FPU_FLM/FPU_2.0/Testbench_FPU_Add_Subt_behav.wcfg -log simulate.log
|
GSejas/Karatsuba_FPU
|
FPGA_FLOW/Proyectos Funcionales Francis Jeffrey/MUL_FPU_FUNCIONAL_v1/MUL_FPU_FUNCIONAL_v1.sim/sim_1/behav/simulate.sh
|
Shell
|
gpl-3.0
| 492 |
#!/usr/bin/env bash
if [ -r versions.mak ]
then
source versions.mak
else
echo "No versions.mak file found. Please run qmake."
exit 1
fi
source build-deps
function set_umask {
umask 0022
}
set_umask
function get_infos {
UNAME_ARCH="$(uname -m)" # Gets i?86 or x86_64
case "$UNAME_ARCH" in
*86)
ARCH="i386"
;;
*64)
ARCH="amd64"
;;
esac
}
get_infos
function package-content {
cd "$GIT_DIR"
PKGDIR=pkg
PKGROOT=$PKGDIR/root
RESOURCES_DIR=packaging/resources
mkdir -p $PKGROOT/opt/xivoclient
cp -r bin/* $PKGROOT/opt/xivoclient
cp -P $DEBIAN_QT_PATH/lib/libQt5{Core,DBus,Gui,Network,Svg,Widgets,Xml,XcbQpa}.so* $PKGROOT/opt/xivoclient
cp -P $DEBIAN_QT_PATH/lib/libicu{i18n,uc,data}.so* $PKGROOT/opt/xivoclient
cp -r $DEBIAN_QT_PATH/plugins $PKGROOT/opt/xivoclient
cp -r $DEBIAN_QT_PATH/translations $PKGROOT/opt/xivoclient
cp $RESOURCES_DIR/qt.conf $PKGROOT/opt/xivoclient
mkdir -p $PKGROOT/usr/share/icons/hicolor/128x128/apps
cp $RESOURCES_DIR/xivoclient.png $PKGROOT/usr/share/icons/hicolor/128x128/apps
mkdir -p $PKGROOT/usr/share/applications/
cp $RESOURCES_DIR/xivoclient.desktop $PKGROOT/usr/share/applications/
sed -i s/xivoicon/xivoclient/ $PKGROOT/usr/share/applications/xivoclient.desktop
mkdir -p $PKGROOT/usr/bin
cp $RESOURCES_DIR/xivoclient.script $PKGROOT/usr/bin/xivoclient
chmod 755 $PKGROOT/usr/bin/xivoclient
}
package-content
function package-control {
mkdir -p pkg/control
PKGSIZE=$(du -s $PKGROOT | cut -f 1)
cat > pkg/control/control <<EOF
Package: xivoclient
Version: ${XC_VERSION}
Architecture: ${ARCH}
Maintainer: Avencall Maintainance Team <[email protected]>
Installed-Size: ${PKGSIZE}
Depends: libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1-21), libstdc++6 (>= 4.1.1-21)
Section: graphics
Priority: optional
Homepage: http://www.xivo.io/
Description: CTI client for XiVO
XiVO CTI (Computer Telephony Integration) client is the graphical
front-end to the XiVO CTI services.
EOF
pushd $PKGROOT > /dev/null
find * -type f | xargs md5sum > ../control/md5sums
popd > /dev/null
}
package-control
function package {
cd $PKGROOT
tar zcf ../data.tar.gz --owner=0 --group=0 .
cd ../control
tar zcf ../control.tar.gz --owner=0 --group=0 .
cd ..
echo "2.0" > debian-binary
PACKAGE_PATH="$GIT_DIR/xivoclient-${XC_VERSION}-${ARCH}.deb"
rm -f "$PACKAGE_PATH"
ar -r "$PACKAGE_PATH" debian-binary control.tar.gz data.tar.gz
}
package
function clean {
cd ..
rm -rf $PKGDIR
}
clean
|
altzone/Aera-Client
|
packaging/xc-package-debian.sh
|
Shell
|
gpl-3.0
| 2,647 |
#!/bin/bash -e
SVNFLAGS="-q"
CURDIR=$(pwd)
SCRIPT_DIR=$(cd $(dirname $0) && pwd)
cd $SCRIPT_DIR
./setup.sh
cd svn-test/checkout/testrepo
echo "this is a test file" > README.txt
echo "this is a test file" > README2.txt
echo "this is a test file" > README3.txt
svn add $SVNFLAGS README.txt README2.txt README3.txt
svn commit $SVNFLAGS -m "Added 3 files."
svn rm $SVNFLAGS README.txt README2.txt README3.txt
svn commit $SVNFLAGS -m "Deleted 3 files."
cd $SCRIPT_DIR
./export.sh
cd $CURDIR
|
cstroe/svndumpapi
|
src/test/resources/dumps/scripts/svn_multi_file_delete.sh
|
Shell
|
agpl-3.0
| 520 |
#!/usr/bin/env bash
ci_dir="$(dirname "$0")"
source ${ci_dir}/ci-common.sh
coq_dpdgraph_CI_DIR=${CI_BUILD_DIR}/coq-dpdgraph
git_checkout ${coq_dpdgraph_CI_BRANCH} ${coq_dpdgraph_CI_GITURL} ${coq_dpdgraph_CI_DIR}
( cd ${coq_dpdgraph_CI_DIR} && autoconf && ./configure && make -j ${NJOBS} && make tests && (make tests | tee tmp.log) && (if grep DIFFERENCES tmp.log ; then exit 1 ; else exit 0 ; fi) )
|
amintimany/coq
|
dev/ci/ci-coq-dpdgraph.sh
|
Shell
|
lgpl-2.1
| 403 |
#!/bin/sh
# env
#
# Replacement for env command which preserves fakechroot enviroment even with
# --ignore-environment option.
#
# (c) 2013 Piotr Roszatycki <[email protected]>, LGPL
fakechroot_env_args=
fakechroot_env_extra_args=
fakechroot_env_fakechroot_base=${FAKECHROOT_BASE_ORIG:-$FAKECHROOT_BASE}
fakechroot_env_fakechroot_env=
fakechroot_env_ignore_env=no
fakechroot_env_unset_path=no
fakechroot_env_null=no
fakechroot_env_path=$PATH
help () {
cat << END
Usage: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
Set each NAME to VALUE in the environment and run COMMAND.
-i, --ignore-environment start with an empty environment
-0, --null end each output line with 0 byte rather than newline
-u, --unset=NAME remove variable from the environment
--help display this help and exit
--version output version information and exit
A mere - implies -i. If no COMMAND, print the resulting environment.
END
exit 0
}
while [ $# -gt 0 ]; do
case "$1" in
-h|--help)
help
;;
-i|--ignore-environment)
fakechroot_env_ignore_env=yes
shift
;;
-0|--null)
fakechroot_env_null=yes
shift
;;
--unset=*)
fakechroot_env_key=${1#--unset=}
case "$fakechroot_env_key" in
LD_LIBRARY_PATH|LD_PRELOAD) ;;
*) unset $fakechroot_env_key
esac
shift
;;
-u|--unset)
fakechroot_env_key=$2
case "$fakechroot_env_key" in
LD_LIBRARY_PATH|LD_PRELOAD) ;;
*) unset $fakechroot_env_key
esac
shift 2
;;
-)
fakechroot_env_ignore_env=yes
shift
break
;;
*)
break
esac
done
if [ $# -eq 0 ]; then
export | while read line; do
fakechroot_env_key="${line#declare -x }"
fakechroot_env_key="${fakechroot_env_key#export }"
fakechroot_env_key="${fakechroot_env_key%%=*}"
printf "%s=" "$fakechroot_env_key"
eval printf "%s" '$'$fakechroot_env_key
if [ $fakechroot_env_null = yes ]; then
printf "\0"
else
printf "\n"
fi
done
else
if [ $fakechroot_env_null = yes ]; then
echo 'env: cannot specify --null (-0) with command' 1>&2
exit 125
fi
if [ $fakechroot_env_ignore_env = yes ]; then
fakechroot_env_keys=`export | while read line; do
fakechroot_env_key="${line#declare -x }"
fakechroot_env_key="${fakechroot_env_key#export }"
fakechroot_env_key="${fakechroot_env_key%%=*}"
case "$fakechroot_env_key" in
FAKEROOTKEY|FAKED_MODE|FAKECHROOT|FAKECHROOT_*|LD_LIBRARY_PATH|LD_PRELOAD) ;;
*) echo $fakechroot_env_key
esac
done`
for fakechroot_env_key in $fakechroot_env_keys; do
unset $fakechroot_env_key
done
fi
while [ $# -gt 1 ]; do
case "$1" in
*=*)
fakechroot_env_key=${1%%=*}
eval $1
eval export $fakechroot_env_key
shift
;;
*)
break
esac
done
fakechroot_env_cmd=`PATH=$fakechroot_env_path command -v $1 2>/dev/null`
fakechroot_env_cmd=${fakechroot_env_cmd:-$1}
shift
$fakechroot_env_cmd "$@"
exit $?
fi
exit 0
|
giuliolunati/fakechroot
|
scripts/env.fakechroot.sh
|
Shell
|
lgpl-2.1
| 3,561 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.