#! /bin/bash

NEED_GVERS="mkdir rmdir"
set -x

# Rename install to ginstall, make install a symlink
mv install.exe ginstall.exe
stubify -g install.exe
stubedit install.exe runfile=ginstall

# Make d point to dir
stubify -g d.exe
stubedit d.exe runfile=dir

# Make v point to vdir
stubify -g v.exe
stubedit v.exe runfile=vdir

# Make g* versions
for i in $NEED_GVERS; do
    SRC=$i
    DEST=g$i
    
    stubify -g $DEST.exe
    stubedit $DEST.exe runfile=$SRC
done
