Add Evernote as a macOS FMA (#36857)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Evernote",
|
||||
"unique_identifier": "com.evernote.Evernote",
|
||||
"token": "evernote",
|
||||
"installer_format": "dmg",
|
||||
"slug": "evernote/darwin",
|
||||
"default_categories": ["Productivity"],
|
||||
"install_script_path": "ee/maintained-apps/inputs/homebrew/scripts/evernote-install.sh"
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
|
||||
# variables
|
||||
APPDIR="/Applications/"
|
||||
TMPDIR=$(dirname "$(realpath $INSTALLER_PATH)")
|
||||
|
||||
# functions
|
||||
|
||||
quit_application() {
|
||||
local bundle_id="$1"
|
||||
local timeout_duration=10
|
||||
|
||||
# check if the application is running
|
||||
if ! osascript -e "application id \"$bundle_id\" is running" 2>/dev/null; then
|
||||
return
|
||||
fi
|
||||
|
||||
local console_user
|
||||
console_user=$(stat -f "%Su" /dev/console)
|
||||
if [[ $EUID -eq 0 && "$console_user" == "root" ]]; then
|
||||
echo "Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'."
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Quitting application '$bundle_id'..."
|
||||
|
||||
# try to quit the application within the timeout period
|
||||
local quit_success=false
|
||||
SECONDS=0
|
||||
while (( SECONDS < timeout_duration )); do
|
||||
if osascript -e "tell application id \"$bundle_id\" to quit" >/dev/null 2>&1; then
|
||||
if ! pgrep -f "$bundle_id" >/dev/null 2>&1; then
|
||||
echo "Application '$bundle_id' quit successfully."
|
||||
quit_success=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [[ "$quit_success" = false ]]; then
|
||||
echo "Application '$bundle_id' did not quit."
|
||||
fi
|
||||
}
|
||||
|
||||
# extract contents
|
||||
# Use 'yes' to automatically accept license agreement when mounting DMG
|
||||
# This replicates Homebrew's behavior for DMG files with license agreements
|
||||
MOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)
|
||||
yes | hdiutil attach -nobrowse -readonly -mountpoint "$MOUNT_POINT" "$INSTALLER_PATH" || exit 1
|
||||
sudo cp -R "$MOUNT_POINT"/* "$TMPDIR"
|
||||
hdiutil detach "$MOUNT_POINT" || true
|
||||
|
||||
# copy to the applications folder
|
||||
quit_application 'com.evernote.Evernote'
|
||||
if [ -d "$APPDIR/Evernote.app" ]; then
|
||||
sudo mv "$APPDIR/Evernote.app" "$TMPDIR/Evernote.app.bkp"
|
||||
fi
|
||||
sudo cp -R "$TMPDIR/Evernote.app" "$APPDIR"
|
||||
|
||||
@@ -323,6 +323,13 @@
|
||||
"unique_identifier": "epp.package.committers",
|
||||
"description": "Eclipse IDE is an Eclipse integrated development environment for Java."
|
||||
},
|
||||
{
|
||||
"name": "Evernote",
|
||||
"slug": "evernote/darwin",
|
||||
"platform": "darwin",
|
||||
"unique_identifier": "com.evernote.Evernote",
|
||||
"description": "Evernote is an app for note taking, organising, task lists, and archiving."
|
||||
},
|
||||
{
|
||||
"name": "Figma",
|
||||
"slug": "figma/darwin",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "10.105.4",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.evernote.Evernote';"
|
||||
},
|
||||
"installer_url": "https://mac.desktop.evernote.com/builds/Evernote-10.105.4-mac-ddl-stage-20240910164757-a2e60a8d876a07eded5d212fa56ba45214114ad0.dmg",
|
||||
"install_script_ref": "c4c66da7",
|
||||
"uninstall_script_ref": "7be36873",
|
||||
"sha256": "98d1f6d52718a0b05222b7cdce14a3755ece619edf0a1b8557af75afbfe2cd73",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"7be36873": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nquit_application 'com.evernote.Evernote'\nquit_application 'com.evernote.EvernoteHelper'\nsudo rm -rf \"$APPDIR/Evernote.app\"\ntrash $LOGGED_IN_USER '~/Library/Application Support/Caches/evernote-client-updater'\ntrash $LOGGED_IN_USER '~/Library/Application Support/com.evernote.Evernote'\ntrash $LOGGED_IN_USER '~/Library/Application Support/com.evernote.EvernoteHelper'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Evernote'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.evernote.Evernote'\ntrash $LOGGED_IN_USER '~/Library/Cookies/com.evernote.Evernote.binarycookies'\ntrash $LOGGED_IN_USER '~/Library/Logs/Evernote'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.evernote.Evernote.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.evernote.EvernoteHelper.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.evernote.Evernote.savedState'\n",
|
||||
"c4c66da7": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n\n# functions\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n# extract contents\n# Use 'yes' to automatically accept license agreement when mounting DMG\n# This replicates Homebrew's behavior for DMG files with license agreements\nMOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)\nyes | hdiutil attach -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\" || exit 1\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\" || true\n\n# copy to the applications folder\nquit_application 'com.evernote.Evernote'\nif [ -d \"$APPDIR/Evernote.app\" ]; then\n\tsudo mv \"$APPDIR/Evernote.app\" \"$TMPDIR/Evernote.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Evernote.app\" \"$APPDIR\"\n\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -45,6 +45,7 @@ import Dropbox from "./Dropbox";
|
||||
import Eclipse from "./Eclipse";
|
||||
import Edge from "./Edge";
|
||||
import EightXEightWork from "./8X8Work";
|
||||
import Evernote from "./Evernote";
|
||||
import Excel from "./Excel";
|
||||
import Extension from "./Extension";
|
||||
import Falcon from "./Falcon";
|
||||
@@ -193,6 +194,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
"draw.io": Drawio,
|
||||
dropbox: Dropbox,
|
||||
eclipse: Eclipse,
|
||||
evernote: Evernote,
|
||||
falcon: Falcon,
|
||||
figma: Figma,
|
||||
firefox: Firefox,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user