How to create a app with automator to run a bash script?
Get link
Facebook
X
Pinterest
Email
Other Apps
i want create app kind of ds store remover remove directories instead of 1 file. wondering how go doing have bash script code below need know do. have app ask root password , allow user select directory want these directories.
sudo rm -rf “.thrashes”
sudo rm -rf “.spotlight-v100”
sudo rm -rf “.trash”
sudo rm -rf “.ds_store”
it sounds want run bash script application. i'd rewriting in applescript:
code:
set targetdir (choose folder prompt "choose folder want clean") set targetpath posix path of targetdir set shellscript "cd " & targetpath & " rm -rf .trashes rm -rf .spotlight-v100 rm -rf .trash rm -rf .ds_store" shell script shellscript administrator privileges
you can file -> save... , choose application file format.
note doing way lets operating system deal granting root permissions - doesn't mess around handling passwords itself.
be careful. if cd command fails reason rm commands carry on regardless, in /. idea bash script exit if cd fails.
is necessary use finger print feature or can pass during set-uo process? you can skip step during setup. Forums iPhone, iPad, and iPod Touch iPhone iPhone iPhone Mac OS & System Software iPad Apple Watch Notebooks iTunes Apple ID iCloud Desktop Computers Apple Music Professional Applications iPod iWork Apple TV iLife Wireless
i try change bool value in dispatch_async when applicationdidenterbackground invoked. can read correct value when method invoked when try use in dispatch_asynch see not right value. here how code looks code: - (void)applicationdidenterbackground:(uiapplication *)application { __block bool isalarmon = [[nsuserdefaults standarduserdefaults] boolforkey:@"alarmsituation"]; __block bool iswarningrepeaton = [[nsuserdefaults standarduserdefaults] boolforkey:@"warningrepeat"]; nslog(@"iswarningrepeaton %d", iswarningrepeaton); bool isvibrationon = [[nsuserdefaults standarduserdefaults] boolforkey:@"vibration"]; nsstring *strsoundname = [[[nsuserdefaults standarduserdefaults] objectforkey:@"selectedsoundname"] lowercasestring]; if ([[uidevice currentdevice] ismultitaskingsupported]) { __block uibackgroundtaskidentifier background_task; bac...
#4 i'm not sure ask, or go...is normal keychain storage logs? com.apple.iadidrecords apple persistent state encryption call history user data key com.apple.ids: devicehbi ids: identity-rsa-private-key itunes iad password safari extensions list safari webcrypto master key didn't create of these. normal? me again... also, apparently certified apple employee? certificate id , everything. can log in apple certification registry keychain storage password , have account id?????? may hub? apple using. not losing it. don't think @ least. Forums Macs macOS macOS iPhone Mac OS & System Software iPad Apple Watch Notebooks iTunes Apple ID iCloud Desktop Computers Apple Music Profess...
Comments
Post a Comment