add files and scripts for building

This commit is contained in:
6543
2019-03-07 00:24:02 +01:00
parent 944005d634
commit f29ae77c26
9 changed files with 40 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
/release

0
DEBIAN/conffiles Normal file
View File

12
DEBIAN/control Normal file
View File

@@ -0,0 +1,12 @@
Package: shorter
Source: shorter
Version: 0.1
Architecture: all
Maintainer: markus <markus@obermui.de>, 6543 <6543@obermui.de>
Installed-Size: 8,0K
Depends: sed (>= 4.2), bash (>= 4.3)
Suggests:
Section: utils
Priority: optional
Homepage: https://git.altinsystems.de/markus/shorter
Description: Bennent Serien in einheitliches Format um.

1
DEBIAN/postinst Executable file
View File

@@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/postrm Executable file
View File

@@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/preinst Executable file
View File

@@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/prerm Executable file
View File

@@ -0,0 +1 @@
#!/bin/sh

3
script/get_version.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
grep '@version ' src/shorter | cut -d " " -f 2

19
script/set_version.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
version=$1
date=`date +%Y-%m-%d`
[ -f "src/shorter" ] && {
version_sed=`echo $version | sed 's/\./\\./g'`
#nummer
sed -i "/#@version\ /c\#@version\ $version_sed" src/remaster.sh
#datum
sed -i "/#@date\ /c\#@date\ $date" src/remaster.sh
}
[ -f "DEBIAN/control" ] && {
sed -i "/Version:\ /c\Version:\ $version_sed" "DEBIAN/control"
}