diff options
Diffstat (limited to 'samples/Shell')
| -rw-r--r-- | samples/Shell/.bash_profile | 1 | ||||
| -rw-r--r-- | samples/Shell/.bashrc | 1 | ||||
| -rw-r--r-- | samples/Shell/.profile | 1 | ||||
| -rw-r--r-- | samples/Shell/.zlogin | 1 | ||||
| -rw-r--r-- | samples/Shell/.zshrc | 1 | ||||
| -rw-r--r-- | samples/Shell/filenames/PKGBUILD | 43 | ||||
| -rwxr-xr-x | samples/Shell/rbenv-sh-shell | 32 | ||||
| -rwxr-xr-x | samples/Shell/rvm | 57 | ||||
| -rwxr-xr-x | samples/Shell/script.bash | 2 | ||||
| -rwxr-xr-x | samples/Shell/script.sh | 2 | ||||
| -rwxr-xr-x | samples/Shell/script.zsh | 2 |
11 files changed, 143 insertions, 0 deletions
diff --git a/samples/Shell/.bash_profile b/samples/Shell/.bash_profile new file mode 100644 index 0000000..b7edb8a --- /dev/null +++ b/samples/Shell/.bash_profile @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/samples/Shell/.bashrc b/samples/Shell/.bashrc new file mode 100644 index 0000000..b7edb8a --- /dev/null +++ b/samples/Shell/.bashrc @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/samples/Shell/.profile b/samples/Shell/.profile new file mode 100644 index 0000000..b7edb8a --- /dev/null +++ b/samples/Shell/.profile @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/samples/Shell/.zlogin b/samples/Shell/.zlogin new file mode 100644 index 0000000..b7edb8a --- /dev/null +++ b/samples/Shell/.zlogin @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/samples/Shell/.zshrc b/samples/Shell/.zshrc new file mode 100644 index 0000000..b7edb8a --- /dev/null +++ b/samples/Shell/.zshrc @@ -0,0 +1 @@ +export PATH="/usr/local/bin:/usr/bin:/bin" diff --git a/samples/Shell/filenames/PKGBUILD b/samples/Shell/filenames/PKGBUILD new file mode 100644 index 0000000..854d2f1 --- /dev/null +++ b/samples/Shell/filenames/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Daniel Micay <danielmicay@gmail.com> +pkgname=stud-git +pkgver=20120316 +pkgrel=1 +pkgdesc="The Scalable TLS Unwrapping Daemon" +arch=(i686 x86_64) +url="https://github.com/bumptech/stud" +license=('BSD') +depends=(libev openssl) +makedepends=(git) +provides=(stud) +conflicts=(stud) + +_gitroot=https://github.com/bumptech/stud.git +_gitname=stud + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + make +} + +package() { + cd "$srcdir/$_gitname-build" + make PREFIX=/usr DESTDIR="$pkgdir/" install + install -Dm755 init.stud "$pkgdir/etc/rc.d/stud" + mkdir -p "$pkgdir/etc/stud" +} diff --git a/samples/Shell/rbenv-sh-shell b/samples/Shell/rbenv-sh-shell new file mode 100755 index 0000000..a216cb2 --- /dev/null +++ b/samples/Shell/rbenv-sh-shell @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -e +[ -n "$RBENV_DEBUG" ] && set -x + +# Provide rbenv completions +if [ "$1" = "--complete" ]; then + echo --unset + echo system + exec rbenv-versions --bare +fi + +version="$1" + +if [ -z "$version" ]; then + if [ -z "$RBENV_VERSION" ]; then + echo "rbenv: no shell-specific version configured" >&2 + exit 1 + else + echo "echo \"\$RBENV_VERSION\"" + exit + fi +fi + +if [ "$version" = "--unset" ]; then + echo "unset RBENV_VERSION" + exit 1 +fi + +# Make sure the specified version is installed. +rbenv-prefix "$version" >/dev/null + +echo "export RBENV_VERSION=\"${version}\"" diff --git a/samples/Shell/rvm b/samples/Shell/rvm new file mode 100755 index 0000000..4a9e9c3 --- /dev/null +++ b/samples/Shell/rvm @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +if (( ${rvm_ignore_rvmrc:=0} == 0 )) +then + declare rvmrc + + rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc") + if [[ -n "${rvm_prefix:-}" ]] && ! [[ "$HOME/.rvmrc" -ef "${rvm_prefix}/.rvmrc" ]] + then rvm_rvmrc_files+=( "${rvm_prefix}/.rvmrc" ) + fi + + for rvmrc in "${rvm_rvmrc_files[@]}" + do + if [[ -f "$rvmrc" ]] + then + if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1 + then + printf "%b" " + Error: + $rvmrc is for rvm settings only. + rvm CLI may NOT be called from within $rvmrc. + Skipping the loading of $rvmrc +" + exit 1 + else + source "$rvmrc" + fi + fi + done + unset rvm_rvmrc_files + unset rvmrc +fi + +export rvm_path +if [[ -z "${rvm_path:-}" ]] +then + if (( UID == 0 )) && [[ -d "/usr/local/rvm" ]] + then rvm_path="/usr/local/rvm" + elif [[ -d "${HOME}/.rvm" ]] + then rvm_path="${HOME}/.rvm" + elif [[ -d "/usr/local/rvm" ]] + then rvm_path="/usr/local/rvm" + else echo "Can't find rvm install!" 1>&2 ; exit 1 + fi +fi + +# allow disabling check temporary +: rvm_is_not_a_shell_function:${rvm_is_not_a_shell_function:=1} + +# if to prevent fork-bomb +if source "${rvm_scripts_path:="$rvm_path/scripts"}/rvm" +then + rvm "$@" +else + echo "Error sourcing RVM!" 1>&2 + exit 1 +fi diff --git a/samples/Shell/script.bash b/samples/Shell/script.bash new file mode 100755 index 0000000..0c2172c --- /dev/null +++ b/samples/Shell/script.bash @@ -0,0 +1,2 @@ +#!/bin/bash +echo "bash" diff --git a/samples/Shell/script.sh b/samples/Shell/script.sh new file mode 100755 index 0000000..e5ed467 --- /dev/null +++ b/samples/Shell/script.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo "sh" diff --git a/samples/Shell/script.zsh b/samples/Shell/script.zsh new file mode 100755 index 0000000..ed274ab --- /dev/null +++ b/samples/Shell/script.zsh @@ -0,0 +1,2 @@ +#!/bin/zsh +echo "zsh" |
