A channel where you can find @yshalsager's projects and its updates.
https://yshalsager.com/en/
Post #1006
295
YS @yshalsager_projects
Forwarded from XM Firmware Updater
Forwarded from XM Firmware Updater
Forwarded from Hacker News
Forwarded from Hacker News
Forwarded from Hacker News
yshalsager's Channel Managing macOS apps with mise Mise downloads GitHub release assets, but it does not install DMG applications into /Applications. Add this custom global task to ~/.config/mise/config.toml: [tasks."macos:install-dmg-app"] hide = true run = ''' set -euo pipefail…
/Applications. Add this custom global task to ~/.config/mise/config.toml:
[tasks."macos:install-dmg-app"]
hide = true
run = '''
set -euo pipefail
install_path="${MISE_TOOL_INSTALL_PATH:?MISE_TOOL_INSTALL_PATH is required}"
dmg_pattern="${MACOS_DMG_PATTERN:-*.dmg}"
app_pattern="${MACOS_APP_PATTERN:-*.app}"
dmg="$(find "$install_path" -maxdepth 1 -name "$dmg_pattern" -type f -print -quit)"
app_root="$install_path"
if [ -n "$dmg" ]; then
mount="$(hdiutil attach "$dmg" -nobrowse -readonly |
awk '/\/Volumes\// {print substr($0, index($0, "/Volumes/")); exit}')"
cleanup() {
hdiutil detach "$mount" -quiet 2>/dev/null || true
}
trap cleanup EXIT
app_root="$mount"
fi
app="$(find "$app_root" -maxdepth 1 -name "$app_pattern" -type d -print -quit)"
[ -n "$app" ] || { echo "No .app found in $app_root"; exit 1; }
app_name="${MACOS_APP_NAME:-$(basename "$app")}"
case "$app_name" in
*.app) ;;
*) app_name="$app_name.app" ;;
esac
ditto "$app" "/Applications/$app_name"
'''
[tools."github:user/repo"]
version = "latest"
asset_pattern = "App-darwin-arm64-{{ version }}.dmg"
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"
.app:
asset_pattern = "App-*.zip"
strip_components = 0
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"
mise install
mise upgrade
yshalsager's Channel https://github.com/firecrawl/anydoc




