Changes between Version 5 and Version 6 of CommittersTipsAndTricks
- Timestamp:
- Jun 8, 2008, 3:42:08 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CommittersTipsAndTricks
v5 v6 27 27 {{{ 28 28 function trac-get { 29 curl "$1?format=raw" -o $(basename $1) 29 local url=$1 30 local dir=$2 31 32 if [[ -z $dir ]]; then 33 dir=. 34 fi 35 36 curl "$url?format=raw" --create-dirs -o $dir/$(basename $1) 30 37 } 31 38 … … 63 70 }}} 64 71 65 You can also add options which will get passed through to the patch tool. This is especially useful when the patch needs another prefix level.72 You can also add options to `trac-patch` which will get passed through to the patch tool. This is especially useful when the patch needs another prefix level. 66 73 {{{ 67 74 $ trac-patch -p1 http://trac.macports.org/attachment/ticket/.../Portfile.diff 68 75 }}} 69 76 If you don't add any option, `-p0` is used as a default. This should be the most common case. 77 78 `trac-get` can also download to another directory. If the directory does not yet exist, it will be created. Just add a second parameter with the name of the directory. If you omit the second parameter, the current directory is used. 79 {{{ 80 $ trac-get http://trac.macports.org/attachment/ticket/.../Portfile new-port 81 }}}