Gitify on Windows

How to run Gitify on Windows under Cygwin or Babun.

git clone https://github.com/modmore/Gitify.git ~/Gitify
cd ~/Gitify
composer install
chmod +x Gitify
mkdir ~/bin
export PATH="$PATH:~/bin/"
# source ~/.zshrc
source ~/.bashrc
php
#!/bin/bash
 
# change path to your PHP.exe
php="/cygdrive/c/UwAmp/bin/php/php-5.4.31/php.exe"
 
for ((n=1; n <= $#; n++)); do
    if [ -e "${!n}" ]; then
        # Converts Unix style paths to Windows equivalents
        path="$(cygpath --mixed ${!n} | xargs)"
 
        case 1 in
            $(( n == 1 )) )
                set -- "$path" "${@:$(($n+1))}";;
            $(( n < $# )) )
                set -- "${@:1:$((n-1))}" "$path" ${@:$((n+1)):$#};;
            *)
                set -- "${@:1:$(($#-1))}" "$path";;
        esac
    fi
done
 
"$php" "$@"
ln -s ~/Gitify/Gitify ~/bin/Gitify
ln -s ~/bin/php /usr/bin/php