Skip to content

Commit e9a4c09

Browse files
committed
pack src script
1 parent de346ad commit e9a4c09

7 files changed

Lines changed: 78 additions & 17 deletions

File tree

build/dep_globals.sh

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
22

33
# author Oliver Blaser
4-
# date 04.05.2022
4+
# date 12.05.2022
55
# copyright MIT - Copyright (c) 2022 Oliver Blaser
66

77
versionstr=$(head -n 1 dep_vstr.txt)
8+
prjDirName="rpihal"
89

910
function ptintTitle()
1011
{
@@ -15,3 +16,27 @@ function ptintTitle()
1516
echo -e "\033[3$2m --=====# \033[9$2m$1\033[3$2m #=====--\033[39m"
1617
fi
1718
}
19+
20+
function writeReadmeFile()
21+
{
22+
echo "" > $1
23+
echo " \$\$ \$\$\$" >> $1
24+
echo " \$\$ \$\$ \$\$\$" >> $1
25+
echo " \$\$ \$\$ \$\$" >> $1
26+
echo " \$\$ \$\$" >> $1
27+
echo "\$\$ \$\$\$\$\$ \$\$ \$\$\$\$\$ \$\$\$ \$\$ \$\$\$\$\$ \$\$\$\$\$ \$\$ \$\$" >> $1
28+
echo "\$\$\$\$\$\$\$\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$\$\$\$\$\$ \$\$" >> $1
29+
echo "\$\$\$ \$\$\$ \$\$\$ \$\$\$ \$\$ \$\$\$ \$\$\$ \$\$\$ \$\$\$ \$\$" >> $1
30+
echo "\$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$" >> $1
31+
echo "\$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$ \$\$" >> $1
32+
echo "\$\$ \$\$\$ \$\$\$ \$\$ \$\$ \$\$ \$\$\$ \$\$\$ \$\$" >> $1
33+
echo "\$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$ \$\$ \$\$ \$\$\$\$\$\$\$\$\$ \$\$\$\$" >> $1
34+
echo "\$\$ \$\$ \$\$\$\$ \$\$\$\$ \$\$ \$\$ \$\$\$\$\$ \$\$ \$\$\$\$" >> $1
35+
echo " \$\$" >> $1
36+
echo " \$\$" >> $1
37+
echo " \$\$ v$versionstr" >> $1
38+
echo "" >> $1
39+
echo "" >> $1
40+
echo "" >> $1
41+
echo "GitHub https://github.com/oblaser/rpihal/" >> $1
42+
}

build/dep_vstr.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0-alpha
1+
0.1.0-rc

build/pack_source.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# author Oliver Blaser
4+
# date 12.05.2022
5+
# copyright MIT - Copyright (c) 2022 Oliver Blaser
6+
7+
source dep_globals.sh
8+
9+
packedDir="./packed"
10+
outDirName="${prjDirName}_src"
11+
outDir="$packedDir/$outDirName"
12+
archive="$packedDir/${prjDirName}_src_v$versionstr.tar.gz"
13+
14+
15+
16+
rm -rf $outDir
17+
18+
mkdir -p $outDir/$prjDirName
19+
mkdir $outDir/$prjDirName/include
20+
mkdir $outDir/$prjDirName/src
21+
22+
cp -r ../include/* $outDir/$prjDirName/include
23+
cp -r ../src/* $outDir/$prjDirName/src
24+
25+
writeReadmeFile $outDir/$prjDirName/readme.txt
26+
cp ../license.txt $outDir/$prjDirName
27+
28+
rm -f $archive
29+
tar -czf $archive -C $outDir $prjDirName

build/readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Build Scripts
22

3+
> `cmake` isn't set up yet, thus `build.sh` doesn't do something useful for now.
4+
35
The scripts must have this directory as working directory.
46

57
`dep_*` files are dependencies of the scripts and should not be called directly.
@@ -20,5 +22,4 @@ Eexcept the `pack_*` scripts don't.
2022
### files to edit on version update
2123

2224
- `build/dep_vstr.txt`
23-
- ~~`build/dep_readme.txt`~~
24-
- `include/rpihal/defs.h.h`
25+
- `include/rpihal/defs.h`

include/rpihal/defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern "C" {
1515
#define RPIHAL_VERSION_MAJOR 0
1616
#define RPIHAL_VERSION_MINOR 1
1717
#define RPIHAL_VERSION_PATCH 0
18-
#define RPIHAL_VERSION_PRERELEASE "alpha"
18+
#define RPIHAL_VERSION_PRERELEASE "rc"
1919

2020
#define RPIHAL_VERSION_ISPRERELEASE 1
2121

readme.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
# Raspberry Pi Hardware Abstraction Layer
1+
# raspihal
22

3-
Not completed. Grows as I need it.
3+
A Raspberry Pi Hardware Abstraction Layer for C/C++ projects.
44

5+
> Not completed. Grows as I need it.
56
67

7-
# GPIO Module
88

9-
> __CAUTION!__ Currently only supports models with the _~~BCM283x~~_ BCM2836 and BCM2837. Be aware of the different header pinouts on the various boards!
9+
## GPIO Module
1010

11-
> __CAUTION!__ look for _DEVICE SPECIFIC_ or _DEVSPEC_ comments in code.
11+
> __CAUTION!__ Currently only supports models with the BCM2836, BCM2837 and BCM2837B0. _~~BCM283x. Be aware of the different header pinouts on the various boards!~~_
12+
>
13+
> Search for _DEVSPEC_ comments in code to find the critical portions.
1214
13-
Supported Models:
14-
- 2B
15-
- 3A+
16-
- 3B
17-
- 3B+
15+
### Supported Models:
16+
`2B`
17+
`3A+`
18+
`3B`
19+
`3B+`
1820

19-
## Links
21+
These all have the 40 pin header, which has the same pinout on all models listed above.
22+
23+
### Links
2024

2125
- https://elinux.org/RPi_GPIO_Code_Samples
2226
- https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#general-purpose-io-gpio

release-notes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33

44

5-
### v0.1.0
5+
### v0.1.0-rc
66

7+
New
78
- init pin as IN, OUT or AF
89
- read and write I/O pin
10+
- Serial/UART library

0 commit comments

Comments
 (0)