-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_linux.sh
59 lines (40 loc) · 1.16 KB
/
build_linux.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
54
55
56
57
58
59
#!/bin/bash
REMOTE="root@localhost"
PORT="9999"
cwd=$(pwd)
REPO_URL="https://github.com/ATtinyTeenageRiot/AvrdudeGnusbuinoMidi2Kicker.git"
REPO_DIR="/root/AvrdudeGnusbuinoMidi2Kicker"
STAGING_DIR="./tools/staging"
DESTINATION_REPO="../platform/avr/tools/avrdude"
COMMIT_HASH="fa58e264"
#ssh ${REMOTE} -p ${PORT} bash -c "'
#cd "${REPO_DIR}/avrdude-6.0rc1"
#./avrdude -cusbasp -pt85 -C ./avrdude.conf
#'"
ssh ${REMOTE} -p ${PORT} bash -c "'
#rm -fr "${REPO_DIR}"
git clone ${REPO_URL}
cd ${REPO_DIR}
git checkout ${COMMIT_HASH}
git log -1
ls "${REPO_DIR}"
cd "${REPO_DIR}"
git fetch --all
git pull --all
git reset --hard ${COMMIT_HASH}
git clean -dfx
cd "${REPO_DIR}/avrdude-6.0rc1"
chmod +x configure
#make clean
./configure --silent > /dev/null
make
patchelf --set-rpath ./ ./avrdude
patchelf --print-rpath ./avrdude
mv ./avrdude ./avrdude_bin
cp "/lib/libusb-0.1.so.4" .
cp "/lib/libusb-1.0.so.0" .
cp "/lib/libncurses.so.5" .
git log -1 > changelog.txt
'"
mkdir -p "${cwd}/${DESTINATION_REPO}/linux"
scp -P ${PORT} ${REMOTE}:${REPO_DIR}/avrdude-6.0rc1/\{avrdude_bin,changelog.txt,libusb-0.1.so.4,libusb-1.0.so.0,libncurses.so.5\} "${cwd}/${DESTINATION_REPO}/linux"