Skip to content

Instantly share code, notes, and snippets.

View pix's full-sized avatar
🌴
On vacation

PiX pix

🌴
On vacation
View GitHub Profile
#!/bin/bash
#
# Links files in this directory to the current users home directory.
#
# If the link already exists the file will be skipped unless the -f flag is given.
real_path () {
_=`pwd`
[ -d $DIR ] && DIR=$1
[ -f $DIR ] && DIR=`dirname $1`