Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make roll.sh more portable #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions roll.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash

# Rick Astley in your Terminal.
# By Serene Han and Justine Tunney <3
# Saved for posterity by CryptoDragonLady
Expand Down Expand Up @@ -76,7 +77,17 @@ audpid=$!
#echo -e "${yell}Fetching video..."
# Sync FPS to reality as best as possible. Mac's freebsd version of date cannot
# has nanoseconds so inject python. :/
python <(cat <<EOF
if has? python; then
PYTHON=python
elif has? python3; then
PYTHON=python3
else
# if we can't show the visual... always gonna give you up, always gonna let you down.
# it's a good thing Rick Astley would never <3
cleanup && quit
fi

${PYTHON} <(cat <<EOF
import sys
import time
fps = 25; time_per_frame = 1.0 / fps
Expand Down