Subversion Repositories yt_downloader

Rev

Rev 2 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 3
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# TODO: also allow $DIR to be determinated inside a symlink'ed dir
3
# TODO: also allow $DIR to be determinated inside a symlink'ed dir
4
DIR=$( dirname "$0" )
4
DIR=$( dirname "$0" )
5
 
5
 
6
cd "$DIR"
6
cd "$DIR"
7
dirname=$( basename "$( pwd )" )
7
dirname=$( basename "$( pwd )" )
8
tmpfile=$( mktemp --suffix="_buildytdwn" )
8
tmpfile=$( mktemp --suffix="_buildytdwn" )
9
 
9
 
10
FILENAME="stable.tar.gz"
10
FILENAME="stable.tar.gz"
11
 
11
 
12
cd ..
12
cd ..
13
rm "$dirname"/"$FILENAME"
13
rm "$dirname"/"$FILENAME"
14
tar cvfz "$tmpfile" --exclude "yt_downloader2/ffmpeg" --exclude "yt_downloader2/libav" --exclude "yt_downloader2/marschall" --exclude "yt_downloader2/youtube-dl" --exclude "yt_downloader2/upload_to_vts" -- "$dirname"
14
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"
15
 
15
 
16
# otherwise: "the file has changed while reading"
16
# otherwise: "the file has changed while reading"
17
mv "$tmpfile" "$dirname"/"$FILENAME"
17
mv "$tmpfile" "$dirname"/"$FILENAME"
18
 
18
 
19
chmod 644 "$dirname"/"$FILENAME"
19
chmod 644 "$dirname"/"$FILENAME"
20
 
20