Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Fixed Master branch (#41)
Browse files Browse the repository at this point in the history
* Removed Nasty .DS_Store and #!/bin/sh to #!/bin/bash

* Fixed everything on the master branch
  • Loading branch information
torch2424 authored Sep 21, 2018
1 parent 24e015f commit e4d0a6c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# OSX Files
**/.DS_Store

# Other build files
ffmpeg-source/*
libfdk*
libfdk*/*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Next, install the dependencies. This will take a little bit of time, probably 5-
./installDeps.sh
````

Then you probably want to edit your `config.sh` file to provide your Stream key and url (Default URL is for youtube).
Then you probably want to edit your `config.sh` file to provide your Stream key and url (Default URL is for youtube). Copy the example, and then edit the final `config.sh`.

````
cp radioFiles/config.example.sh radioFiles/config.sh
Expand Down
4 changes: 2 additions & 2 deletions getFileFromDir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ if [ "$#" -ne 1 ]; then
echo "USAGE: ./getFileFromDir.sh [Directory path]"
else
# Use find instead of ls to better handle non-alphanumeric filenames.
ranfile=$( find "$1" | sort --random-sort | tail -1 )
echo "$1/$ranfile"
ranfile=$( find "$1" -mindepth 1 | sort --random-sort | tail -1 )
echo "$ranfile"
fi
Binary file removed radioFiles/.DS_Store
Binary file not shown.
Binary file removed radioFiles/gifs/.DS_Store
Binary file not shown.
Binary file removed radioFiles/music/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions runFfmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ else
STREAM_TEXT_PATH=$2

# Souce our config
.radioFiles/config.sh
source radioFiles/config.sh

# Define our private variables
# KEYINT represents the number of key frames.
# Should be somewhere between 2 to 4.
KEYINT=${#VIDEO_FPS \* 3}
KEYINT=$(expr $VIDEO_FPS \* 3)

# Run our ffmpeg command
# Draw text on multiple lines
Expand Down
5 changes: 3 additions & 2 deletions startStream.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# Source our config files
source radioFiles/config.sh
Expand Down Expand Up @@ -36,6 +36,7 @@ echo "$CURRENT_GIF" > "$CURRENT_GIF_PATH"
RANDOM_GIF=$(./getFileFromDir.sh "$GIF_DIRECTORY")
./optimizeGif.sh "$RANDOM_GIF" "$CURRENT_GIF"


echo " "
echo " "
echo "--------------------------------------------------"
Expand All @@ -53,7 +54,7 @@ while true ; do
RANDOM_SONG=""

# Check if we support interludes, and we should show one
if [ "$RADIO_INTERLUDES" = true ] && [ "${#(date +%s) % $RADIO_INTERLUDE_INTERVAL_LENGTH }" = 0 ]; then
if [ "$RADIO_INTERLUDES" = true ] && [ $(expr $(date +%s) % $RADIO_INTERLUDE_INTERVAL_LENGTH) = 0 ]; then
# Get our random song
RANDOM_SONG=$(./getFileFromDir.sh "$INTERLUDE_DIRECTORY")

Expand Down

0 comments on commit e4d0a6c

Please sign in to comment.