-
Notifications
You must be signed in to change notification settings - Fork 2
/
sd.sh
executable file
·91 lines (70 loc) · 1.74 KB
/
sd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
this_dir=$PWD
src_dist=rampartc-src-1.3.0 #Make sure you set the correct directory name
src_dist_tar_gz=$src_dist.tar.gz
src_dist_tar_gz_md5=$src_dist_tar_gz.md5
src_dist_tar_gz_asc=$src_dist_tar_gz.asc
src_dist_zip=$src_dist.zip
src_dist_zip_md5=$src_dist_zip.md5
src_dist_zip_asc=$src_dist_zip.asc
echo "Clean archives if any"
rm $src_dist_tar_gz
rm $src_dist_zip
make dist
echo "Extract tar"
tar -xzvf $src_dist_tar_gz
rm $src_dist_tar_gz
ls
#cd $src_dist
echo "Removing makefiles in $src_dist"
for i in `find $src_dist -name "Makefile"`
do
echo "Deleting $i"
rm $i
done
echo "Removing .svn entries in $src_dist"
for i in `find $src_dist -name ".svn"`
do
echo "Deleting $i"
rm -rf $i
done
echo "Removing .la entries in $src_dist"
for i in `find $src_dist -name "*.la"`
do
echo "Deleting $i"
rm $i
done
echo "Removing .lo entries in $src_dist"
for i in `find $src_dist -name "*.o"`
do
echo "Deleting $i"
rm $i
done
echo "Removing .lo entries in $src_dist"
for i in `find $src_dist -name "*.lo"`
do
echo "Deleting $i"
rm $i
done
echo "Removing .libs entries in $src_dist"
for i in `find $src_dist -name ".libs"`
do
echo "Deleting $i"
rm -rf $i
done
echo "Removing .deps entries in $src_dist"
for i in `find $src_dist -name ".deps"`
do
echo "Deleting $i"
rm -rf $i
done
cd $this_dir
echo "Make the tar and its friends"
tar -czvf $src_dist_tar_gz $src_dist
openssl md5 < $src_dist_tar_gz > $src_dist_tar_gz_md5
gpg --armor --output $src_dist_tar_gz_asc --detach-sig $src_dist_tar_gz
echo "Make the zip and its friends"
zip -r $src_dist_zip $src_dist
openssl md5 < $src_dist_zip > $src_dist_zip_md5
gpg --armor --output $src_dist_zip_asc --detach-sig $src_dist_zip
echo "Done... :)"