How to Create a macOS 10.15 Catalina Installation Boot Disk
สารบัญ:
เมื่อคิดถึงตอนนี้เราจะแบ่งปันเวิร์กโฟลว์เล็ก ๆ น้อย ๆ ที่คุณสามารถนำไปใช้กับ Mac ของคุณโดยใช้ Automator ด้วยสิ่งเหล่านี้ทุกครั้งที่คุณทำการติดตั้งแอพใน Mac ของคุณคุณจะสามารถนำ / ถอนการติดตั้ง และ ลบภาพดิสก์ได้ด้วยการคลิกเพียงไม่กี่ครั้ง
มาเริ่มกันด้วยวิธีการตั้งค่าเวิร์กโฟลว์ Automator ที่ดีเหล่านี้
ลบไฟล์ DMG โดยอัตโนมัติเมื่อคุณนำพวกเขาออก
ขั้นตอนที่ 1: เปิด Automator และเลือกที่จะสร้างเอกสารใหม่ จากประเภทเอกสารที่มีอยู่ที่แสดงในกล่องโต้ตอบให้เลือก บริการ
ขั้นตอนที่ 2: ที่ด้านบนของแผงด้านขวาตรวจสอบให้แน่ใจว่าได้เลือกตัวเลือก 'ไม่มีอินพุต' และ 'Finder' ตามลำดับเพื่อให้ผลลัพธ์สุดท้ายเป็นภาพด้านล่าง
ขั้นตอนที่ 3: ถัดไปบนแผงด้านซ้ายของ Automator ค้นหาแอคชัน Run AppleScript และลากไปยังพาเนลด้านขวา หน้าต่าง AppleScript จะปรากฏขึ้นพร้อมรหัสตัวยึดบางตำแหน่ง
ลบรหัสนั้นและคัดลอกและวางรหัสต่อไปนี้ในกล่องสคริปต์:
tell application "Finder"
set selection_list to selection
if (count selection_list) < 1 then
display dialog
"Please select a volume mounted from a disk image." with title
"No Selection Found" with icon stop
buttons default button 1
return
end if
set my_selection to item 1 of selection_list
set my_kind to kind of my_selection
set my_name to name of my_selection
if my_kind is not "Volume" then
display dialog
"Please select a volume mounted from a disk image file." with title
"Selection is not a Disk Image" with icon stop
buttons default button 1
return
end if
set volume_list to paragraphs of (do shell script "hdiutil info | grep ^/dev/disk | grep -o '/Volumes/.*'")
set source_list to paragraphs of (do shell script "hdiutil info | grep ^image'-'alias | grep -o '/.*'")
set match_found to false
repeat with v from 1 to (count volume_list)
if "/Volumes/" & my_name = item v of volume_list then
set match_found to true
exit repeat
end if
end repeat
if match_found is not equal to true then
display dialog
"The selected volume does not appear to be a Disk Image." with title
"Could not find Disk Image" with icon stop
buttons default button 1
return
else
set my_source to POSIX file (item v of source_list) as alias
move my_source to the trash
eject my_selection
--reveal my_source
end if
end tell
ขั้นตอนที่ 4: ตอนนี้บันทึกบริการ Automator และตั้งชื่อให้จดจำได้ง่าย
ตอนนี้เรามาดูเวิร์กโฟลว์ Automator อื่นที่บรรลุเป้าหมายเดียวกันโดยทำสิ่งตรงกันข้าม
นำไฟล์ DMG ออกโดยอัตโนมัติเมื่อคุณลากไปยังถังขยะ
อย่างที่คุณเห็นจากชื่อเวิร์กโฟลว์อัตโนมัตินี้ช่วยให้คุณสามารถบรรลุวัตถุประสงค์เดียวกันยกเว้นในทางกลับกันดังนั้นคุณสามารถหลีกเลี่ยงข้อความนี้ทุกครั้งที่คุณลากไฟล์ DMG ที่เมาท์ไปยังถังขยะ
ขั้นตอนที่ 2: ที่ด้านบนของแผงด้านขวาให้เลือก อื่น ๆ … จากเมนูแบบเลื่อนลง จากนั้นในกล่องโต้ตอบที่ปรากฏขึ้นให้พิมพ์ ~ /.Trash เพื่อทำงานกับโฟลเดอร์นั้น