MINGW_PREFIX=/mingw32

post_install() {
  PREFIX_WIN=$(cygpath -m ${MINGW_PREFIX})
  sed -s "s|${MINGW_PREFIX}|${PREFIX_WIN}|g" \
    -i ${MINGW_PREFIX}/etc/luarocks/config-5.1.lua
	
  sed -s "s|${MINGW_PREFIX}|${PREFIX_WIN}|g" \
    -i ${MINGW_PREFIX}/etc/luarocks/config-5.4.lua
	
  sed -s "s|${MINGW_PREFIX}|${PREFIX_WIN}|g" \
    -i ${MINGW_PREFIX}/bin/luarocks
	
  sed -s "s|${MINGW_PREFIX}|${PREFIX_WIN}|g" \
    -i ${MINGW_PREFIX}/bin/luarocks-admin
    
}

post_upgrade() {
  post_install
}