Personally, I would be tmp directory stuff in the if statement, to keep the logic together. Plus, as standard practice, you don't really want to run code before your variable declarations. Like this:
if [ $INSTALL_METHOD = "DOWNLOAD" ]
then
POL_Download "http://reshade.com/static/reshade-install.exe" "8786327bc7209134e9fad15f581fe0cc"
POL_System_TmpCreate "Reshade"
cd "$POL_System_TmpDir"
POL_Wine "reshade-install.exe"
cd "$POL_USER_ROOT"
POL_System_TmpDelete
Basically, there is no need to have the tmp folder created globally, and since it is only used in the if statement, it keeps it all in one spot, easier to read, easier to maintain if you need to change something, plus, if you wanted, you could always create and delete the tmp directory multiple times in the conditionals, whereas if it was declared globally, you cannot do that as effectively in the if statements. Not that you would want to do that, but yeah. haha. It is totally up to you, but I would, at the very least, move the TmpCreate statement below where PrefixCreate is, though I recommend the above stated change. :)
Other than that, it doesn't look bad. I am a photographer too, so I am interested in seeing a little more about this application. lol
Edytowane przez RoninDusette