#!/bin/bash
# $1 is the binary location, $2 is the arch, $3 is the version number
mkdir out
mkdir -p appimage/IPENtool.AppDir/usr/lib/ipentool
rm -rf appimage/IPENtool.AppDir/usr/lib/ipentool
rsync -rv "$1" appimage/IPENtool.AppDir/usr/lib/ipentool
chmod +x appimage/IPENtool.AppDir/AppRun
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
./appimagetool appimage/IPENtool.AppDir "out/IPENtool_$3_$2.AppImage"
