Last active
August 29, 2015 13:56
-
-
Save produnis/8985306 to your computer and use it in GitHub Desktop.
Nautilus-Scripte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# required Packages: | |
# ---- zenity | |
# ---- mp3val | |
################################################# | |
# check for zenity | |
gui=$(which zenity) | |
if [ ! -x "$gui" ]; | |
then | |
echo "Zenity is required: 'sudo apt-get install zenity" | |
exit 0 | |
fi | |
# check for mp3val | |
gui=$(which mp3val) | |
if [ ! -x "$gui" ]; | |
then | |
echo "mp3val is required: 'sudo apt-get install mp3val" | |
exit 0 | |
fi | |
O=$IFS # save default File-Seperator | |
# write selected Files as Array | |
IFS=$'\n' arFILES=($(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" )) | |
IFS=$O # save back default File-Seperator | |
ZIEL=$(zenity --entry --text "Enter full path and output-filename" --entry-text="~/Downloads/OUTPUT.mp3") | |
( | |
echo "merging files..." | |
cat "${arFILES[@]}" > "$ZIEL" | |
echo "Repairing Xing header with mp3val..." | |
mp3val $ZIEL -f -nb | |
)|zenity --progress --pulsate --text="processing..." --percentage=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment