Files
Arch-R/tools/mkpkg/mkpkg_libcec
2018-07-17 23:58:49 +02:00

28 lines
617 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
echo "getting sources..."
if [ ! -d libcec.git ]; then
git clone --depth=1 https://github.com/Pulse-Eight/libcec.git libcec.git
fi
cd libcec.git
git pull
GIT_REV=`git log -n1 --format=%h`
cd ..
echo "copying sources..."
rm -rf libcec-$GIT_REV
cp -R libcec.git libcec-$GIT_REV
echo "cleaning sources..."
rm -rf libcec-$GIT_REV/.git
echo "packing sources..."
tar cvJf libcec-$GIT_REV.tar.xz libcec-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf libcec-$GIT_REV