Rev 2 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
#!/bin/bash
# TODO: also allow $DIR to be determinated inside a symlink'ed dir
DIR=$( dirname "$0" )
cd "$DIR"
dirname=$( basename "$( pwd )" )
tmpfile=$( mktemp --suffix="_buildytdwn" )
FILENAME="stable.tar.gz"
cd ..
rm "$dirname"/"$FILENAME"
tar cvfz "$tmpfile" --exclude "yt_downloader2/ffmpeg" --exclude "yt_downloader2/.svn" --exclude "yt_downloader2/libav" --exclude "yt_downloader2/marschall" --exclude "yt_downloader2/youtube-dl" --exclude "yt_downloader2/upload_to_vts" -- "$dirname"
# otherwise: "the file has changed while reading"
mv "$tmpfile" "$dirname"/"$FILENAME"
chmod 644 "$dirname"/"$FILENAME"