-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix-install-coppwr
executable file
·79 lines (65 loc) · 1.52 KB
/
mix-install-coppwr
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh
### Package: mix-install-coppwr
### Version: v20240825.2300
### Author: Michael Gan "xmixahlx" michaelbgan@gmail.com
### License: GPLv3
### Script Dependencies: (none)
## OVERRIDES
# MIXTOOLSDIR
if [ -z $MIXTOOLSDIR ]; then
MIXTOOLSDIR="`pwd`"
PATH=$MIXTOOLSDIR:$PATH
fi
echo "*** MIXTOOLSDIR selected is $MIXTOOLSDIR."
# INSTALLDEPS
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "*** INSTALLDEPS selected is $INSTALLDEPS."
# GITBRANCH
if [ -z $GITBRANCH ]; then
GITBRANCH=main
fi
echo "*** GITBRANCH selected is $GITBRANCH."
# GITPR
if [ -z $GITPR ]; then
GITPR=none
fi
echo "*** GITPR selected is $GITPR."
## VARS
DEVDIR=$MIXTOOLSDIR/upstream
RESDIR=$MIXTOOLSDIR/resources
GITURL=https://github.com
GITREPO=dimtpap
GITTREE=coppwr
PKGDIR=$GITTREE\_$GITBRANCH
GITPRURL=$GITURL
GITPRPATCH=$GITPRURL/$GITREPO/$GITTREE/-/merge_requests/$GITPR.patch
## INSTALLDEPS
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils libc-bin git meson
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## CLEAN
sudo rm -Rf $PKGDIR/tmpbuild
## GIT
[ -d $PKGDIR ] || git clone --recursive --depth=1 $GITURL/$GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -dfx
git reset --hard
git pull
git submodule update --init --recursive --depth=1
## GITPR
if [ $GITPR != none ]; then
rm -f $DEVDIR/$GITTREE\_$GITPR.patch
wget $GITPRPATCH -O $DEVDIR/$GITTREE\_$GITPR.patch
patch -p1 < $DEVDIR/$GITTREE\_$GITPR.patch
fi
## INSTALL
cargo install --all-features --locked --path .
## EXIT
exit
# ENJOY