Skip to content

Instantly share code, notes, and snippets.

View wagesj45's full-sized avatar

Jordan Wages wagesj45

View GitHub Profile
@wagesj45
wagesj45 / cronpod.sh
Created January 9, 2019 04:23
Executes a script only if it isn't already running.
#!/bin/bash
isrunning=$(ps -ef | grep -v grep | grep "podcast.sh" | wc -l)
if [ "$isrunning" -gt "0" ]; then
echo "[ALREADY RUNNING]"
exit 0
else
sudo /home/[your username]/podcast.sh
exit 0
@wagesj45
wagesj45 / podcast.sh
Created January 9, 2019 03:48
Updates podcasts, downloads new episodes, then normalizes them using a normalization script and podfox.
#!/bin/bash
# Updates podcasts, downloads new episodes, then normalizes them.
if [ "$1" = "-h" ]; then
echo "Updates podcasts, downloads new episodes, then normalizes them."
echo "podcast.sh"
exit 0
fi
SAVEIFS=$IFS
@wagesj45
wagesj45 / normalize.sh
Created January 9, 2019 03:43
Normalizes the audio of an input file into an output file.
#!/bin/bash
# Normalizes the audio of the input to the output.
if [ "$1" = "-h" ]; then
echo "Normalizes the audio of the input into the output."
echo "normalize.sh [input] [output=normalized.ext]"
exit 0
fi
normalize() {