-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-python.sh
executable file
·53 lines (47 loc) · 2.17 KB
/
setup-python.sh
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
#!/bin/sh
AMPACHEDIR=$PWD
COMPOSERPATH="/usr/local/bin/composer"
if [ ! -f $COMPOSERPATH ]; then
COMPOSERPATH="$AMPACHEDIR/docker/composer"
wget -q -O $COMPOSERPATH https://getcomposer.org/download/latest-stable/composer.phar
chmod +x $COMPOSERPATH
fi
if [ ! -d $AMPACHEDIR/python ]; then
mkdir $AMPACHEDIR/python
fi
if [ ! -d $AMPACHEDIR/ampache-test ]; then
git clone https://github.com/lachlan-00/ampache-test.git ampache-test
cd $AMPACHEDIR/ampache-test && sh ./setup-ampache-test.sh
fi
if [ ! -f $AMPACHEDIR/ampache-test/ampache.cfg.php ]; then
rm -rf $AMPACHEDIR/ampache-test
git clone https://github.com/lachlan-00/ampache-test.git ampache-test
fi
if [ ! -d $AMPACHEDIR/python/python3-ampache3 ]; then
cd $AMPACHEDIR/python && git clone -b api3 https://github.com/ampache/python3-ampache.git python3-ampache3
fi
if [ ! -f $AMPACHEDIR/python/python3-ampache3/setup.py ]; then
rm -rf $AMPACHEDIR/python/python3-ampache3
cd $AMPACHEDIR/python && git clone -b api3 https://github.com/ampache/python3-ampache.git python3-ampache3
fi
if [ ! -d $AMPACHEDIR/python/python3-ampache4 ]; then
cd $AMPACHEDIR/python && git clone -b api4 https://github.com/ampache/python3-ampache.git python3-ampache4
fi
if [ ! -f $AMPACHEDIR/python/python3-ampache4/setup.py ]; then
rm -rf $AMPACHEDIR/python/python3-ampache4
cd $AMPACHEDIR/python && git clone -b api4 https://github.com/ampache/python3-ampache.git python3-ampache4
fi
if [ ! -d $AMPACHEDIR/python/python3-ampache5 ]; then
cd $AMPACHEDIR/python && git clone -b api5 https://github.com/ampache/python3-ampache.git python3-ampache5
fi
if [ ! -f $AMPACHEDIR/python/python3-ampache5/setup.py ]; then
rm -rf $AMPACHEDIR/python/python3-ampache5
cd $AMPACHEDIR/python && git clone -b api5 https://github.com/ampache/python3-ampache.git python3-ampache5
fi
if [ ! -d $AMPACHEDIR/python/python3-ampache6 ]; then
cd $AMPACHEDIR/python && git clone -b api6 https://github.com/ampache/python3-ampache.git python3-ampache6
fi
if [ ! -f $AMPACHEDIR/python/python3-ampache6/setup.py ]; then
rm -rf $AMPACHEDIR/python/python3-ampache6
cd $AMPACHEDIR/python && git clone -b api6 https://github.com/ampache/python3-ampache.git python3-ampache6
fi