• Das kreative Thema des Monats Oktober wird vor allem diejenigen unter Euch besonders ansprechen, denen Do-it-yourself quasi im Blut liegt. Zeigt uns Eure Improvisationskünste oder fotografiert, was andere Leute sich so im Alltag zusammengestrickt haben. --> Zum Mitmachen bitte hier klicken

[AS] Shell Script & dirkte Eingabe ins Terminal

Alecco

Transparent von Croncels
Registriert
17.02.09
Beiträge
306
Hi! Ich habe ein Shell Script, welches in einem Apple Script aufgerufen wird. Leider funktioniert es nicht, wie ich es mir vorstelle.

Ich habe ein Script, welches meine Software automatisch "installieren" soll. Testeweise liegt es jetzt auf dem Desktop. Es soll die .app in den Application Ordner verschieben. Wenn ich per Terminal den folgenden Befehl ausführe, dann klappt es:

Code:
sudo cp -r ~/Desktop/Application.app/ /Applications/Application.app

In ein AS eingebunden, kommt es zu einem Fehler. Es wird nur eine Datei mit 5 KB angelegt und weiter passiert nichts :(

Code:
do shell script "cp -r ~/Desktop/Application.app/ /Applications/Application.app" with administrator privileges

Es liegt entweder an dem Einbinden des Shell Script in ein AS oder das Shell Script an sich hat ein Problem. Ich vermute, dass das Problem am Shell Script selbst liegt. Hat einer eine Idee?
 
1) man cp

...
COMPATIBILITY

Historic versions of the cp utility had a -r option.
This implementation supports that option; however, its use is strongly discouraged, as it does not correctly copy special files, symbolic links, or fifo's.

...​

2) Welche Datei wird denn da erzeugt und was ist ihr Inhalt?