#!/bin/bash function mkuserdirs { local PKG_DIR i IFS=$'\n' for i in $( reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" \ | grep "^ [A-Za-z ]\+" \ | tr -d '\r' \ | sed -e "s/.\+REG_EXPAND_SZ[ ]\+//g" ); do if [[ "$i" =~ .*"\\AppData\\".* ]]; then continue fi if [[ "$i" =~ "%USERPROFILE".* ]]; then i=$USERPROFILE${i/\%USERPROFILE\%/} fi ln -vs "$( cygpath "$i" )" $HOME/ done # Package Directory PKG_DIR=$( cygpath "$APPDATA/../Local/Packages" ) if [ -d "$PKG_DIR" ]; then ln -vs "$PKG_DIR" $HOME/ fi }