-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix-alternatives-cython
executable file
·55 lines (46 loc) · 1.14 KB
/
mix-alternatives-cython
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
#!/bin/sh
### Package: mix-alternatives-cython
### Version: v20210912.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: (none)
## OVERRIDES
# MIXTOOLS
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."
# DEBIANREPO
if [ -z $DEBIANREPO ]; then
DEBIANREPO=unstable
fi
echo "*** DEBIANREPO selected is $DEBIANREPO."
# PKGVER
if [ -z $PKGVER ]; then
PKGVER=3
fi
echo "*** PKGVER selected is $PKGVER."
## INSTALLDEPS
# Debian Dependencies
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils libc-bin
sudo apt-get -y -t $DEBIANREPO install cython$PKGVER
fi
## INSTALL
if [ $INSTALLDEPS = debian ]; then
# PYTHON
sudo rm /usr/bin/python
sudo update-alternatives --install /usr/bin/cython cython /usr/bin/cython2 2
sudo update-alternatives --install /usr/bin/cython cython /usr/bin/cython3 3
# ALTERNATIVES
sudo update-alternatives --config cython
fi
## EXIT
exit
## ENJOY