How to make a .sh file into a .dmg or .app file for client to download

169 Views Asked by At

Im currently doing a project that need to make a web app to host bash scripts for people to download and execute. For example, I am doing a code that helps the user to clear cache

#!/bin/bash
rm -r ~/Library/Caches/*
rm -r /System/Caches/*
echo "Cache fully cleared"
osascript -e 'tell app "Finder" to display dialog "Cleared Cache"'

I am able to make .sh file into a .app file and from a .app file into a .dmg file, but when i send to my friends they are unable to run it anymore as it just shows

You can’t open the application “clear_cache” because this application is not supported on this Mac.

<a href="/dmg_clear_cache.dmg" download="dmg.app" className="DownloadLink">
    <Button>download clear cache script </Button>
</a>

Also when I try to download on react, it also become a .app that cant be opened.

Can someone help me out with this?

0

There are 0 best solutions below