vendor cleanup: remove unused,non-go and test files

This commit is contained in:
Madhu Rajanna
2019-01-16 00:05:52 +05:30
parent 52cf4aa902
commit b10ba188e7
15421 changed files with 17 additions and 4208853 deletions

View File

@ -1,12 +0,0 @@
prefix=/usr/local/bin
default: build
build:
@echo "Nothing to build. Use make install"
install: intemp.sh
install intemp.sh $(DESTDIR)$(prefix)
uninstall:
-rm $(DESTDIR)$(prefix)/intemp.sh

View File

@ -1,52 +0,0 @@
# intemp
A bash script to execute a command within a temporary work directory.
## Dependencies
Requires: mktemp
## Install
```
git clone https://github.com/karlkfi/intemp
cd intemp
make install
```
or
```
curl -o- https://raw.githubusercontent.com/karlkfi/intemp/master/install.sh | bash
```
## Usage
```
intemp.sh [-t prefix] "<command>"
```
Example (install intemp using intemp):
```
intemp.sh -t intemp "git clone https://github.com/karlkfi/intemp . && make install"
```
## License
Copyright 2015 Karl Isenberg
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.

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Install intemp from the internet
# Usage: install.sh [version]
# Alt Usage: curl -o- https://raw.githubusercontent.com/karlkfi/intemp/master/install.sh | bash
# Requires: curl
set -o errexit
set -o nounset
set -o pipefail
prefix="/usr/local/bin"
version=${1:-}
if [ -z "${version}" ]; then
version=$(curl -s https://api.github.com/repos/karlkfi/intemp/releases/latest | grep 'tag_name' | cut -d\" -f4)
fi
echo "Installing intemp ${version} -> ${prefix}/intemp.sh"
curl -o- "https://raw.githubusercontent.com/karlkfi/intemp/${version}/intemp.sh" > "${prefix}/intemp.sh"
chmod a+x "${prefix}/intemp.sh"

View File

@ -1,41 +0,0 @@
#!/usr/bin/env bash
# Runs the supplied bash command string in a temporary workspace directory.
# Usage: intemp.sh [-t prefix] <command>
# Requires: mktemp
set -o errexit
set -o nounset
set -o pipefail
opt_flag=${1:-}
[ -z "${opt_flag}" ] && echo "No command supplied" >&2 && exit 1
if [ "${opt_flag}" == "-t" ]; then
shift
prefix=${1:-}
[ -z "${prefix}" ] && echo "No prefix supplied" >&2 && exit 1
shift
else
prefix='temp'
fi
cmd="$1"
[ -z "${cmd}" ] && echo "No command supplied" >&2 && exit 1
workspace=$(mktemp -d "${TMPDIR:-/tmp}/${prefix}.XXXXXX")
echo "Workspace created: ${workspace}" 1>&2
cleanup() {
local -r workspace="$1"
rm -rf "${workspace}"
echo "Workspace deleted: ${workspace}" 1>&2
}
trap "cleanup '${workspace}'" EXIT
pushd "${workspace}" > /dev/null
bash -ceu "${cmd}"
popd > /dev/null
trap - EXIT
cleanup "${workspace}"