on run {input, parameters}
set lefichier to input as alias
tell application "Finder"
set ledossier to container of lefichier as string
set lenom to name of lefichier
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 elements to text items of lenom
set nomcourt to (items 1 thru -2 of elements) as string
set AppleScript's text item delimiters to sauv --restaurer la variable delimiteur
set ledossier to ledossier & nomcourt
end tell
set macommande to "/opt/homebrew/Cellar/squashfs/4.5/bin/unsquashfs -no -d " & quoted form of POSIX path of ledossier & " " & quoted form of POSIX path of lefichier
display dialog macommande
do shell script macommande
return input
end run