SCRIPT | Install-Figma-Latest

Install Figma

Summary

These scripts will install the latest version of Figma.

Please note there is 2 versions of the script. One is for installing the arm64 version of the application intended for Macs with an Apple Silicon CPU, the other script installs the x86_64 version of the app for Macs with an Intel CPU.


Script Content (for Apple Silicon CPU Macs – arm64)

#!/bin/zsh
cd "/Library/Application Support/JAMF/tmp"

# Update variables. These shouldn't need to change for each update
zipname="Figma.zip"
ziplink="https://desktop.figma.com/mac-arm/Figma.zip"
apptoreplace="Figma.app"
apptoreplacerunningname="Figma"
apptoreplacerunningname="FigmaAgent"

# Download ZIP
curl -L -o $zipname "$ziplink"

# Remove any previous downloaded remnants
rm -rf $apptoreplace
rm -rf "__MACOSX"

# Unzip ZIP
unzip $zipname

# Kill the app if it is running
killall -Kill "$apptoreplacerunningname"
killall -Kill "$apptoreplacerunningname2"

# Remove the app from the Applications Folder
rm -rf "/Applications/$apptoreplace"

# Copy the new version into the Applications Folder
cp -R "$apptoreplace" /Applications

# Set the user as the current logged in user
netname=`ls -l /dev/console | cut -d " " -f 4`

chown -R ${netname}:Staff && chmod -R 755 "/Applications/$apptoreplace"

sudo xattr -rc "/Applications/$apptoreplace/"

# Remove the downloaded App
rm -rf $apptoreplace
rm -rf "__MACOSX"

# Clear out the used variables
unset zipname
unset ziplink
unset apptoreplace
unset apptoreplacerunningname
unset apptoreplacerunningname2
unset netname
exit 0

Script Content (for Intel CPU Macs – x86_64)

#!/bin/zsh
cd "/Library/Application Support/JAMF/tmp"

# Update variables. These shouldn't need to change for each update
zipname="Figma.zip"
ziplink="https://desktop.figma.com/mac/Figma.zip"
apptoreplace="Figma.app"
apptoreplacerunningname="Figma"
apptoreplacerunningname="FigmaAgent"

# Download ZIP
curl -L -o $zipname "$ziplink"

# Remove any previous downloaded remnants
rm -rf $apptoreplace
rm -rf "__MACOSX"

# Unzip ZIP
unzip $zipname

# Kill the app if it is running
killall -Kill "$apptoreplacerunningname"
killall -Kill "$apptoreplacerunningname2"

# Remove the app from the Applications Folder
rm -rf "/Applications/$apptoreplace"

# Copy the new version into the Applications Folder
cp -R "$apptoreplace" /Applications

# Set the user as the current logged in user
netname=`ls -l /dev/console | cut -d " " -f 4`

chown -R ${netname}:Staff && chmod -R 755 "/Applications/$apptoreplace"

sudo xattr -rc "/Applications/$apptoreplace/"

# Remove the downloaded App
rm -rf $apptoreplace
rm -rf "__MACOSX"

# Clear out the used variables
unset zipname
unset ziplink
unset apptoreplace
unset apptoreplacerunningname
unset apptoreplacerunningname2
unset netname
exit 0

Concluding Comments

Figma is a vector graphics editor and prototyping tool which is primarily web-based, with additional offline features enabled by the desktop application for macOS.