File: arch_makepkg.sh

package info (click to toggle)
hardinfo 2.2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,040 kB
  • sloc: ansic: 40,169; cpp: 1,216; sh: 340; xml: 81; python: 50; makefile: 3
file content (27 lines) | stat: -rwxr-xr-x 579 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
#"CPACK" - called in build dir
echo "Building Arch Package"
cd ..
cp -f ./tools/PKGBUILD .
cp -f ./tools/hardinfo2.install .

#build
if [ $(id -u) -ne 0 ]; then
    makepkg -cs --noextract
else
    chown -R nobody ../hardinfo2
    sudo -u nobody makepkg -cs --noextract
    chown -R root ../hardinfo2
fi


#rename and move result to build dir
DISTRO=$(cat /etc/os-release |grep ^NAME=|awk '{sub(" ","");sub("NAME=","");sub("\"","");sub("\"","")}1')
rename hardinfo2 hardinfo2-${DISTRO} *.zst
mv *.zst ./build/

#cleanup
rm -f PKGBUILD
rm -f hardinfo2.install

cd build