-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakepkg.sh
More file actions
executable file
·49 lines (40 loc) · 1015 Bytes
/
makepkg.sh
File metadata and controls
executable file
·49 lines (40 loc) · 1015 Bytes
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
#!/bin/sh
# make sure git repo is clean
if [ "$(git clean -n)" != "" ]; then
echo "Please run 'git clean -f' first!"
exit 1
fi
# cleanup git clean leftovers
if [ -d src/.deps ] || [ -d gl/.libs ] || [ -d autom4te.cache ]; then
echo "* Cleaning 'git clean' leftovers"
rm -rf src/.deps
rm -rf gl/.libs
rm -rf autom4te.cache
fi
# generate configure script
./autogen.sh
# version
version="0.8"
# pkg file
pkg_file="$(pwd)/packages/avmount-${version}.tar.xz"
# create directories
rm -rf /tmp/avmount-${version}
mkdir -p /tmp/avmount-${version}
mkdir -p $(pwd)/packages
# copy files
echo "* Copying project files to temp location..."
find . \
-maxdepth 1 -mindepth 1 \
! -name 'showmem' \
! -name 'autogen.sh' \
! -name 'packages' \
! -name '.git' \
-exec cp -r '{}' /tmp/avmount-${version} \;
# create tarball
echo "* Creating tarball..."
cd /tmp
tar --xz -cf ${pkg_file} ./avmount-${version}
echo "* Tarball created at ${pkg_file}."
# cleanup
echo "* Cleaning up..."
rm -rf /tmp/avmount-${version}