Permalink
Browse files

Fix bogus bash binary location

  • Loading branch information...
1 parent a74279d commit 3fc60b5358dae05d89327ce1a52f6013eafee537 @grimreaper grimreaper committed Apr 17, 2012
Showing with 66 additions and 66 deletions.
  1. +1 −1 aliases/available/bundler.aliases.bash
  2. +1 −1 aliases/available/emacs.aliases.bash
  3. +1 −1 aliases/available/general.aliases.bash
  4. +1 −1 aliases/available/git.aliases.bash
  5. +1 −1 aliases/available/heroku.aliases.bash
  6. +2 −2 aliases/available/hg.aliases.bash
  7. +1 −1 aliases/available/osx.aliases.bash
  8. +1 −1 aliases/available/rails.aliases.bash
  9. +1 −1 aliases/available/textmate.aliases.bash
  10. +1 −1 aliases/available/todo.txt-cli.aliases.bash
  11. +2 −2 aliases/available/vim.aliases.bash
  12. +1 −1 bash_it.sh
  13. +1 −1 completion/available/fabric-completion.bash
  14. +1 −1 completion/available/rake.completion.bash
  15. +1 −1 completion/available/ssh.completion.bash
  16. +1 −1 completion/available/tmux.completion.bash
  17. +1 −1 custom/example.bash
  18. +1 −1 lib/appearance.bash
  19. +2 −2 lib/history.bash
  20. +1 −1 lib/preexec.bash
  21. +1 −1 plugins/available/base.plugin.bash
  22. +1 −1 plugins/available/battery.plugin.bash
  23. +1 −1 plugins/available/dirs.plugins.bash
  24. +1 −1 plugins/available/git.plugins.bash
  25. +2 −2 plugins/available/hg.plugins.bash
  26. +1 −1 plugins/available/javascript.plugins.bash
  27. +1 −1 plugins/available/jekyll.plugins.bash
  28. +1 −1 plugins/available/latex.plugin.bash
  29. +2 −2 plugins/available/nginx.plugins.bash
  30. +1 −1 plugins/available/osx.plugin.bash
  31. +1 −1 plugins/available/python.plugin.bash
  32. +2 −2 plugins/available/rbenv.plugin.bash
  33. +2 −2 plugins/available/ruby.plugin.bash
  34. +1 −1 plugins/available/rvm.plugin.bash
  35. +2 −2 plugins/available/ssh.plugins.bash
  36. +2 −2 plugins/available/subversion.plugin.bash
  37. +1 −1 plugins/available/tmuxinator.plugin.bash
  38. +1 −1 plugins/available/vagrant.plugins.bash
  39. +1 −1 plugins/available/virtualenv.plugin.bash
  40. +1 −1 plugins/available/z.bash
  41. +1 −1 template/bash_profile.template.bash
  42. +1 −1 themes/base.theme.bash
  43. +1 −1 themes/bobby/bobby.theme.bash
  44. +1 −1 themes/candy/candy.theme.bash
  45. +1 −1 themes/colors.theme.bash
  46. +1 −1 themes/demula/demula.theme.bash
  47. +1 −1 themes/doubletime/doubletime.theme.bash
  48. +1 −1 themes/doubletime_multiline/doubletime_multiline.theme.bash
  49. +1 −1 themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash
  50. +1 −1 themes/envy/envy.theme.bash
  51. +1 −1 themes/hawaii50/hawaii50.theme.bash
  52. +1 −1 themes/n0qorg/n0qorg.theme.bash
  53. +1 −1 themes/pete/pete.theme.bash
  54. +1 −1 themes/rainbowbrite/rainbowbrite.theme.bash
  55. +1 −1 themes/simple/simple.theme.bash
  56. +1 −1 themes/tylenol/tylenol.theme.bash
  57. +1 −1 themes/zitron/zitron.theme.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Bundler Commands
alias be="bundle exec"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $OSTYPE in
linux*)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# List directory contents
alias sl=ls
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Aliases
alias gcl='git clone'
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# heroku
alias h='heroku'
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
alias hs='hg status'
alias hsum='hg summary'
@@ -11,4 +11,4 @@ function hg-help() {
echo " hsum = hg summary"
echo " hcm = hg commit -m"
echo
-}
+}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Desktop Programs
alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Rails Commands
alias r='rails'
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $OSTYPE in
darwin*)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
alias tls="$TODO ls"
alias ta="$TODO a"
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
-alias v='mvim --remote-tab'
+alias v='mvim --remote-tab'
View
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Initialize Bash It
# Reload Library
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Bash completion support for Fabric (http://fabfile.org/)
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Bash completion support for Rake, Ruby Make.
export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Bash completion support for ssh.
export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# tmux completion
# See: http://www.debian-administration.org/articles/317 for how to write more.
View
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This is an example file. Don't use this for your custom scripts. Instead, create another file within the
# custom directory.
View
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# colored grep
export GREP_OPTIONS='--color=auto'
View
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# append to bash_history if Terminal.app quits
shopt -s histappend
@@ -17,4 +17,4 @@ export AUTOFEATURE=true autotest
function rh {
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
-}
+}
View
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# http://www.twistedmatrix.com/users/glyph/preexec.bash.txt
# preexec.bash -- Bash support for ZSH-like 'preexec' and 'precmd' functions.
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# For generic functions.
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
battery_percentage(){
if command_exists acpi;
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Directory stack navigation:
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function git_remote {
echo "Running: git remote add origin ${GIT_HOSTING}:$1.git"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
hg_dirty() {
hg status --no-color 2> /dev/null \
| awk '$1 == "?" { print "?" } $1 != "?" { print "!" }' \
@@ -11,4 +11,4 @@ hg_in_repo() {
hg_branch() {
hg branch 2> /dev/null
-}
+}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# The install directory is hard-coded. TOOD: allow the directory to be specified on the command line.
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
editpost() {
unset SITE
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# add mactex to the path if its present
MACTEX_PATH=/usr/local/texlive/2009/bin/universal-darwin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function nginx_reload() {
FILE="${NGINX_PATH}/logs/nginx.pid"
@@ -47,4 +47,4 @@ function nginx_restart() {
echo "Nginx pid file not found"
return 0
fi
-}
+}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function tab() {
osascript 2>/dev/null <<EOF
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [ $(uname) = "Linux" ]
then
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Load rbebv, if you are using it
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Load the auto-completion script if rbenv was loaded.
-source ~/.rbenv/completions/rbenv.bash
+source ~/.rbenv/completions/rbenv.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function remove_gem {
gem list | grep $1 | awk '{ print $1; }' | xargs sudo gem uninstall
-}
+}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
@@ -1,9 +1,9 @@
-#!/bin/bash
+#!/usr/bin/env bash
function add_ssh() {
echo -en "\n\nHost $1\n HostName $2\n User $3\n ServerAliveInterval 30\n ServerAliveCountMax 120" >> ~/.ssh/config
}
function sshlist() {
awk '$1 ~ /Host$/ { print $2 }' ~/.ssh/config
-}
+}
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
rm_svn(){
find $1 -name .svn -print0 | xargs -0 rm -rf
}
svn_add(){
svn status | grep '^\?' | sed -e 's/? *//' | sed -e 's/ /\ /g' | xargs svn add
-}
+}
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && . $HOME/.tmuxinator/scripts/tmuxinator
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
_vagrant()
{
cur="${COMP_WORDS[COMP_CWORD]}"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# make sure virtualenvwrapper is enabled if available
[[ `which virtualenvwrapper.sh` ]] && . virtualenvwrapper.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# maintains a jump-list of the directories you actually use
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Load RVM, if you are using it
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
THEME_PROMPT_HOST='\H'
SCM_THEME_PROMPT_DIRTY=''
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}"
SCM_THEME_PROMPT_PREFIX=" |"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function prompt_command() {
PS1="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(scm_prompt_info)\]${blue}${bold_blue} ${reset_color} ";
}
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function __ {
echo "$@"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Theme inspired on:
# - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=''
SCM_THEME_PROMPT_CLEAN=''
SCM_GIT_CHAR="${bold_cyan}±${normal}"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "$BASH_IT/themes/doubletime/doubletime.theme.bash"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "$BASH_IT/themes/doubletime/doubletime.theme.bash"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}"
SCM_THEME_PROMPT_PREFIX=" |"
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# This theme was obviously inspired a lot by
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# n0qorg theme by Florian Baumann <flo@noqqe.de>
## look-a-like
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
prompt_setter() {
# Save history
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# based off of n0qorg
# looks like, if you're in a git repo:
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# prompt themeing
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Based on 'bobby' theme with the addition of virtualenv_prompt
#
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# zitron theme by Florian Baumann <flo@noqqe.de>
## git-theme

9 comments on commit 3fc60b5

@hypersoft

Launch two commands just to run one? System abuse.

Inefficient, and pointless. Ever heard of a symlink? If your bash is not in /bin/bash or you don't have a link to it, get a real operating system.

@hypersoft

Either that or contact a real sysadmin... lol

@grimreaper

http://blog.eitanadler.com/2012/10/binbash-considered-harmful.html
Lets see:

  • FreeBSD
  • OpenBSD
  • Solaris (I think)
  • Mac OSX with MacPorts

the entire world isn't Debian.

Real sysadmins don't want to mix up their system by mixing third party and base packages.

@hypersoft

http://pastebin.com/bp7Cf6Rv and your point?

Not exactly my first rodeo ...

Welcome to the wonderful world of UNIX. You are welcome.

@grimreaper

Triston, I guess you need to meet a real sysadmin before you learn how to write non-broken scripts.
In the meantime I guess you don't care about releasing broken software so I'll close this thread.

@hypersoft

Some people never learn...

I've been at this more than 15 years. If a makefile won't work, a symlink won't work, and bash won't work, odds are good your scripts won't work. `env' isn't doing anything that bash can't do from a makefile ONCE. Your scripts are already broken. 'env' allows malicious attacks against the system because the path isn't hard coded. But I guess you know it all don't ya?

Happy trails ;)

@hypersoft

Sorry to bug you reaper, but in hopes of spreading some enlightenment to my peers through my peers and resources I have added some key notes you should review to the file I provided for your projects.

Please have a look. I'm sure you will find the great wisdom of your elders worthy of your acknowledgment.

http://pastebin.com/bp7Cf6Rv

@grimreaper

I understand that you have no interest in writing correct or non-broken software. I also understand that you no interest in learning.
I also understand that you have limited UNIX knowledge (env is not the same thing as a symlink - it actually cares about PATH).

Also - there isn't a security issues here - I suggest you learn about how PATH and env work...

That said, I have marked this thread "mute" and will not reply further.

@hypersoft

lol That's what's wrong with kids these days. They know just enough to break stuff. I wish I had a webhost using /bin/env oh the joy of surpassing the system administrators approved list of application capabilites what? no /dev/tcp? fuck that he's using /bin/env

put the new binary in my path and boom! I have just mastered the universe.

You are either a hacker or an idiot.

14,225 people like my UNIX page... I suppose you think they are all wrong too? lol don't make me laugh kid. I've got more knowledge, reach and pull than your project is ever going surpass.

https://www.facebook.com/unix4u?ref=ts&fref=ts

Please sign in to comment.