on run {input, parameters}
set ledossier to input as string
set aa to ledossier as string
set sauv to AppleScript's text item delimiters --sauvegarder la variable delimiteur
set AppleScript's text item delimiters to {":"} --récupère la partie avant le dernier "."
set nomcourt to (text item -2 of aa) as string
set AppleScript's text item delimiters to sauv --restaurer la variable delimiteur
set guil to ASCII character 34
set macommande to "/opt/homebrew/Cellar/squashfs/4.5/bin/mksquash " & guil & "./" & nomcourt & guil & " " & guil & nomcourt & ".squashfs" & guil & " " & "-comp zstd"
display dialog macommande
do shell script macommande
return input
end run
on run {input, parameters}
set ledossier to input as string
set aa to ledossier as string
set sauv to AppleScript's text item delimiters --sauvegarder la variable delimiteur
set AppleScript's text item delimiters to {":"} --récupère la partie avant le dernier "."
set nomcourt to (text item -2 of aa) as string
set AppleScript's text item delimiters to sauv --restaurer la variable delimiteur
set guil to ASCII character 34
set macommande to "/opt/homebrew/Cellar/squashfs/4.5/bin/mksquash " & guil & "./" & nomcourt & guil & " " & guil & nomcourt & ".squashfs" & guil & " " & "-comp zsdt"
display dialog macommande
do shell script macommande
return input
end run
Tu lances bien le script en faisant un clic droit sur le dossier et en choisissant le service?
Et la commande affichée est-elle correcte ?
Si le terminal ne le prend pas on essaiera avec le chemin complet !Fais un autre test, fais un copie de la commande qui s'affiche puis fais un collé dans le terminal pour voir s'il le prend!
on run {input, parameters}
set ledossier to input as string
set aa to ledossier as string
set sauv to AppleScript's text item delimiters --sauvegarder la variable delimiteur
set AppleScript's text item delimiters to {":"} --récupère la partie avant le dernier "."
set nomcourt to (text item -2 of aa) as string
set AppleScript's text item delimiters to sauv --restaurer la variable delimiteur
set guil to ASCII character 34
set macommande to "/opt/homebrew/Cellar/squashfs/4.5/bin/mksquash " & quoted form of POSIX path of ledossier & " " & guil & nomcourt & ".squashfs" & guil & " " & "-comp zsdt"
display dialog macommande
do shell script macommande
return input
end run
on run {input, parameters}
set ledossier to input as string
set aa to ledossier as string
set sauv to AppleScript's text item delimiters --sauvegarder la variable delimiteur
set AppleScript's text item delimiters to {":"} --récupère la partie avant le dernier "."
set nomcourt to (text item -2 of aa) as string
set cheminfichier to (text items 1 thru -3 of aa) as string
set AppleScript's text item delimiters to sauv --restaurer la variable delimiteur
set nomfichier to cheminfichier & ":" & nomcourt & ".squashfs"
set guil to ASCII character 34
set macommande to "/opt/homebrew/Cellar/squashfs/4.5/bin/mksquash " & quoted form of POSIX path of ledossier & " " & quoted form of POSIX path of nomfichier & " " & "-comp zsdt"
display dialog macommande
do shell script macommande
return input
end run