comparison .bashrc @ 101:8b15a38ccd0f

* fix vpns * create a flatten function
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 28 Oct 2010 13:05:56 -0700
parents 6d09c2a8e5e9
children 35d28c0a6ba3
comparison
equal deleted inserted replaced
100:3016fa6a7c13 101:8b15a38ccd0f
288 echo "[paths]" 288 echo "[paths]"
289 echo "default = ${ROOT}" 289 echo "default = ${ROOT}"
290 echo "default-push = ssh://${ROOT#http*://}" 290 echo "default-push = ssh://${ROOT#http*://}"
291 } 291 }
292 292
293 flatten() {
294 directory=$PWD
295 if [ "$#" == "1" ]
296 then
297 directory=$1
298 fi
299 cd $directory
300 unset find # don't use the alias
301 find -name '*' -type f | sed 's/.\///' | while read line
302 do
303 filename=$(echo $line | sed 's/\//-/g')
304 mv "${line}" "${filename}"
305 done
306 for i in *
307 do
308 if [ -d $i ]
309 then
310 rm -rf "${i}"
311 fi
312 done
313 }
314
293 ### include overrides for commands 315 ### include overrides for commands
294 source ~/.bash_overrides 316 source ~/.bash_overrides
295 317
296 ### regenerate fluxbox menus here for convenience 318 ### regenerate fluxbox menus here for convenience
297 MENU=~/web/site/programs.html 319 MENU=~/web/site/programs.html