git @ Cat's Eye Technologies shelf / 3d73df0
Avoid use of realpath, which might not be installed. Chris Pressey 4 years ago
1 changed file(s) with 7 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2222
2323 _shelf_ln() {
2424 source="$1"
25 CWD=`pwd`
26 source="$CWD/$source"
2527 dest="$2"
2628 if [ -e "$dest" ]; then
2729 _shelf_verbose $dest already exists
2830 else
29 _shelf_show_run ln -s `realpath "$source"` "$dest"
31 _shelf_show_run ln -s "$source" "$dest"
3032 fi
3133 }
3234
121123 echo "Usage: shelf_unlink {dir}"
122124 return 1
123125 fi
126 CWD=`pwd`
124127 for dir in $*; do
125 dir=`realpath "$dir"`
128 dir="$CWD/$dir"
126129 for sub in bin include lib; do
127130 for file in $SHELF_FARMBASE/$sub/*; do
128131 link=`readlink -f "$file"`
152155
153156 shelf_build() {
154157 dir="$1"
155 dir=`realpath "$dir"`
156
157158 CWD=`pwd`
159 dir="$CWD/$dir"
160
158161 cd $dir
159162
160163 # if build command is defined for this, then run it, else