summarylogtreecommitdiffstats
path: root/apply-upstream-patch.sh
blob: f5e35181f377b007549df88667b37fdb8acc8dca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# copy file
cp "$1" "$1.new"

# PKGBUILD
sed -i '' 's/pkgbase=ffmpeg/pkgbase=ffmpeg-libfdk_aac/g' "$1.new"
sed -i '' 's/pkgname=ffmpeg/pkgname=ffmpeg-libfdk_aac/g' "$1.new"
sed -i '' "s/pkgdesc='Complete solution to record, convert and stream audio and video'/pkgdesc='Complete solution to record, convert and stream audio and video (Same as official package except with libfdk-aac support)'/g" "$1.new"

# .SRCINFO
sed -i '' 's/pkgbase = ffmpeg/pkgbase = ffmpeg-libfdk_aac/g' "$1.new"
sed -i '' 's/pkgname = ffmpeg/pkgname = ffmpeg-libfdk_aac/g' "$1.new"
sed -i '' 's/pkgdesc = Complete solution to record, convert and stream audio and video/pkgdesc = Complete solution to record, convert and stream audio and video (Same as official package except with libfdk-aac support)/g' "$1.new"

# apply patch
git am "$1.new" || git am --abort