Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- svn:special
- #!/bin/sh
- grep -lr '^link ' . | while read placeholderfile
- do
- linecount=`wc -l $placeholderfile | cut -c1`
- if [ $linecount -eq 0 ] ; then
- linkfile=`cut -c6- "$placeholderfile"`
- ln -sf "$linkfile" "$placeholderfile"
- echo -e "[E[32;40mOKE[37;40m] Replaced $placeholderfile with symlink"
- else
- echo -e "[E[31;40mWARNINGE[37;40m] $placeholderfile contains newline(s)"
- fi
- tput sgr0
- done
Add Comment
Please, Sign In to add comment