From c0737b3dd711aef7f30241a31dfdbcbe40740b13 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 19 Oct 2014 14:06:31 -0400 Subject: [PATCH] Added ffmpeg.sh, added better support for Macs --- scripts/ffmpeg.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ scripts/sync.sh | 11 ++++++----- shells/zshrc | 4 +++- 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100755 scripts/ffmpeg.sh diff --git a/scripts/ffmpeg.sh b/scripts/ffmpeg.sh new file mode 100755 index 0000000..64277b8 --- /dev/null +++ b/scripts/ffmpeg.sh @@ -0,0 +1,44 @@ +sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev yasm libx264-dev unzip libmp3lame-dev libopus-dev +mkdir ~/ffmpeg_sources +cd ~/ffmpeg_sources +wget -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master +unzip fdk-aac.zip +cd mstorsjo-fdk-aac* +autoreconf -fiv +./configure --prefix="$HOME/ffmpeg_build" --disable-shared +make +sudo make install +make distclean +cd ~/ffmpeg_sources +wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2 +tar xjvf libvpx-v1.3.0.tar.bz2 +cd libvpx-v1.3.0 +PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples +PATH="$PATH:$HOME/bin" make +sudo make install +make clean +cd ~/ffmpeg_sources +wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 +tar xjvf ffmpeg-snapshot.tar.bz2 +cd ffmpeg +PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ + --prefix="$HOME/ffmpeg_build" \ + --extra-cflags="-I$HOME/ffmpeg_build/include" \ + --extra-ldflags="-L$HOME/ffmpeg_build/lib" \ + --bindir="$HOME/bin" \ + --enable-gpl \ + --enable-libass \ + --enable-libfdk-aac \ + --enable-libfreetype \ + --enable-libmp3lame \ + --enable-libopus \ + --enable-libtheora \ + --enable-libvorbis \ + --enable-libvpx \ + --enable-libx264 \ + --enable-nonfree \ + --enable-x11grab +PATH="$PATH:$HOME/bin" make +sudo make install +make distclean +hash -r diff --git a/scripts/sync.sh b/scripts/sync.sh index b627e06..8169d95 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -50,9 +50,9 @@ while getopts ":hbsdclw" VALUE "$@"; do if [ "$VALUE" = "c" ] ; then echo "Syncing config files" if which trash >/dev/null; then - trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.oh-my-zsh/themes/af-magic.zsh-theme ~/.screenrc ~/.Xresources ~/.tmux.conf + trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf else - rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.oh-my-zsh/themes/af-magic.zsh-theme ~/.screenrc ~/.Xresources ~/.tmux.conf + rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf fi ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf ln -s $ABSPATH/python/pylintrc ~/.pylintrc @@ -75,9 +75,10 @@ while getopts ":hbsdclw" VALUE "$@"; do fi ln -s $ABSPATH/shells/zshrc ~/.zshrc ln -s $ABSPATH/shells/screenrc ~/.screenrc - ln -s $ABSPATH/shells/Xresources ~/.Xresources - xrdb -merge ~/.Xresources - ln -s $ABSPATH/shells/af-magic.zsh-theme ~/.oh-my-zsh/themes/af-magic.zsh-theme + if [ "$(uname)" != "Darwin" ]; then + ln -s $ABSPATH/shells/Xresources ~/.Xresources + xrdb -merge ~/.Xresources + fi mkdir -p ~/.i3 ln -s $ABSPATH/i3/config ~/.i3/config ln -s $ABSPATH/i3/wall.sh ~/.i3/wall.sh diff --git a/shells/zshrc b/shells/zshrc index 670dca1..37ee2a4 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -33,7 +33,9 @@ if [ -f /etc/zsh_command_not_found ] ; then fi export PATH="/home/stonewareslord/.autojump/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" export EDITOR='vim' -alias ls='ls --color=always -F' +if [ "$(uname)" != "Darwin" ]; then + alias ls='ls --color=always -F' +fi alias ehistory='cat ~/.bash_eternal_history|egrep -iP $@' alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"' alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'