summarylogtreecommitdiffstats
path: root/tar.sh
blob: d282d2322fae61bfb520d39b257defa081e976ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

pre_reg_md5=`md5sum reg_files.tar.bz2|cut -d ' ' -f1`

cd reg_tmp && \
   tar -cvjSf reg_files.tar.bz2 * && \
   mv reg_files.tar.bz2 ../ && \
   cd ../

new_reg_md5=`md5sum reg_files.tar.bz2|cut -d ' ' -f1`

if [ "$pre_reg_md5" = "$new_reg_md5" ];
then
    echo -e "\033[33mReg files have not changed\033[0m"
else
    sed -i "s#$pre_reg_md5#$new_reg_md5#" PKGBUILD
    echo Done
fi