mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Changed phing command line parsing to fit current version and corrected stat command.
This commit is contained in:
parent
8c45b73918
commit
19339420b0
1 changed files with 10 additions and 3 deletions
|
|
@ -1,8 +1,15 @@
|
||||||
|
stat -f%m . > /dev/null 2>&1
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
stat_cmd=(stat -f%m)
|
||||||
|
else
|
||||||
|
stat_cmd=(stat -L --format=%Y)
|
||||||
|
fi
|
||||||
|
|
||||||
_phing_does_target_list_need_generating () {
|
_phing_does_target_list_need_generating () {
|
||||||
if [ ! -f .phing_targets ]; then return 0;
|
if [ ! -f .phing_targets ]; then return 0;
|
||||||
else
|
else
|
||||||
accurate=$(stat -f%m .phing_targets)
|
accurate=$($stat_cmd .phing_targets)
|
||||||
changed=$(stat -f%m build.xml)
|
changed=$($stat_cmd build.xml)
|
||||||
return $(expr $accurate '>=' $changed)
|
return $(expr $accurate '>=' $changed)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +17,7 @@ _phing_does_target_list_need_generating () {
|
||||||
_phing () {
|
_phing () {
|
||||||
if [ -f build.xml ]; then
|
if [ -f build.xml ]; then
|
||||||
if _phing_does_target_list_need_generating; then
|
if _phing_does_target_list_need_generating; then
|
||||||
phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets
|
phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" | awk '{print $1}' | uniq > .phing_targets
|
||||||
fi
|
fi
|
||||||
compadd `cat .phing_targets`
|
compadd `cat .phing_targets`
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue