function Get-ScriptDirectory { $scriptpath = $MyInvocation.MyCommand.Path return Split-Path $scriptpath } $scriptdir = Get-ScriptDirectory Push-Location $scriptdir $android_project_dir = Join-Path($scriptdir, "sdl-android-project") $android_app_dir = Join-Path($android_project_dir, "app") $android_jni_dir = Join-Path($android_app_dir, "jni") if (test-path $android_jni_dir) { rm $android_jni_dir } New-Item -ItemType Junction -Path $android_jni_dir -Value $scriptdir