-
Notifications
You must be signed in to change notification settings - Fork 8
/
pbp-install-postinstall
executable file
·57 lines (47 loc) · 1.18 KB
/
pbp-install-postinstall
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
#!/bin/sh
### Package: pbp-install-postinstall
### Version: v20200630.2300
### Author: Michael Gan "xmixahlx" michaelbgan@gmail.com
### License: GPLv3
### Script Dependencies: linux
## PBPTOOLSDIR
if [ -z $PBPTOOLSDIR ]; then
PBPTOOLSDIR="`pwd`"
fi
## VARS
DATE=`date +%Y%m%d%H%M%S`
RESDIR=$PBPTOOLSDIR/resources
DEVDIR=$PBPTOOLSDIR/upstream
GITREPO=https://gitlab.manjaro.org/manjaro-arm/packages/community
GITTREE=pinebookpro-post-install
GITBRANCH=master
PKGDIR=$GITTREE\_$GITBRANCH
## DEPS
# Provide INSTALLDEPS=debian to install dependencies.
if [ $INSTALLDEPS ]; then
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils git patch meson \
brightness-udev brightnessctl alsa-utils pulseaudio systemd
fi
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## GIT
[ -d $PKGDIR ] || git clone --depth=1 $GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -f
git reset --hard
git pull
## INSTALL
sudo mkdir -p /etc/udev/hwdb.d
sudo mkdir -p /var/lib/alsa
sudo install -Dm644 10-usb-kbd.hwdb /etc/udev/hwdb.d/
sudo install -Dm644 asound.state /var/lib/alsa/
## RESTART SERVICES
sudo alsactl nrestore
sudo systemctl restart udev
## EXIT
exit
## ENJOY