git-hacks

git-hacks Commit Details

Date:2012-11-17 21:55:06 (5 years 8 months ago)
Author:Nicola Fontana
Branch:master
Commit:d5944aa1cb38fd3cf930728756796f0997c723f9
Parents: 8768fcf630259322a120c8c6283747c590c16384
Message:gitdeploy: silent sed errors

Changes:
Mgitdeploy (1 diff)

File differences

gitdeploy
6464
6565
6666
67
67
6868
6969
7070
# The approach using regex is quite flaky but way better than loading
# a whole PHP framework to get a freaking value.
lookup() {
sed -n "s/\s*['\"]$1['\"]\s*=>\s*['\"]\(.*\)['\"].*/\1/p" $2
sed -n "s/\s*['\"]$1['\"]\s*=>\s*['\"]\(.*\)['\"].*/\1/p" $2 2> /dev/null
}
refresh_dummy() {

Archive Download the corresponding diff file

Branches