Skip to content

Instantly share code, notes, and snippets.

@cjemorton
Created December 12, 2021 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjemorton/a5332b6b6e71b4806a01bb63d39a0d29 to your computer and use it in GitHub Desktop.
Save cjemorton/a5332b6b6e71b4806a01bb63d39a0d29 to your computer and use it in GitHub Desktop.
if [ "$update_available" == 'true' ]
then
# Makefile Changes
if [ -e $ports_dir/Makefile ]
then
echo "Makefile exists, creating backup."
cp $ports_dir/Makefile $ports_dir/Makefile.orig
sed -e "s/Created by.*/Created by: $name <$email>/g" \
-e "s/PORTVERSION=.*/PORTVERSION=\t"$version_prefix"/g" \
-e "s/DISTVERSIONSUFFIX=.*/DISTVERSIONSUFFIX="$version_suffix"/g" \
-e "s/MAINTAINER=.*/MAINTAINER=\t"$email"/g" $ports_dir/Makefile > $ports_dir/Makefile.new
mv $ports_dir/Makefile.new $ports_dir/Makefile
fi
# Generate distinfo
# aria2c multi threads and connections.
# aria2c -s16 -x16 --dir=$distfiles -c $download_url
cd $ports_dir && make makesum
else
echo "Plex is running $version, no update needed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment