forked from PDXostc/fm_radio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp_rpms.sh
executable file
·54 lines (48 loc) · 1.96 KB
/
cp_rpms.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
#!/bin/bash
# This script copies all the newly built RPMS to target device's home. NOTE: Use *must* define TIZEN_IP in the environment (export) prior to calling this script
# Some nice colors!
red='\033[0;31m'
NC='\033[0m' # No Color
DEBUG_MODE="0"
if [ $# -eq 1 ]; then
if [ $1 = "debug" ]; then
DEBUG_MODE="1"
fi
fi
RPM_FOLDER=$HOME/GBS-ROOT/local/repos/tizen/i586/RPMS
RPM_LIST=( "agl-plugins-0.0.1-1.i686.rpm" \
"agl-plugins-fftw3-0.0.1-1.i686.rpm" \
"agl-plugins-gstsdrjfm-0.0.1-1.i686.rpm" \
"agl-plugins-rtl-sdr-0.0.1-1.i686.rpm" \
"agl-plugins-samplerate-0.0.1-1.i686.rpm" \
"agl-plugins-service-0.0.1-1.i686.rpm" )
DEBUG_RPM_LIST=( "agl-plugins-debuginfo-0.0.1-1.i686.rpm" \
"agl-plugins-debugsource-0.0.1-1.i686.rpm" \
"agl-plugins-fftw3-debuginfo-0.0.1-1.i686.rpm" \
"agl-plugins-gstsdrjfm-debuginfo-0.0.1-1.i686.rpm" \
"agl-plugins-rtl-sdr-debuginfo-0.0.1-1.i686.rpm" \
"agl-plugins-samplerate-debuginfo-0.0.1-1.i686.rpm" \
"agl-plugins-service-debuginfo-0.0.1-1.i686.rpm" )
if env | grep -q ^TIZEN_IP=
then
echo -e "${red}Copying binary rpms to target device...${NC}"
for i in "${RPM_LIST[@]}"
do
scp $RPM_FOLDER/$i app@$TIZEN_IP:
done
if [ $DEBUG_MODE -eq "1" ]; then
echo -e "${red}Copying debug rpms to target device...${NC}"
for i in "${DEBUG_RPM_LIST[@]}"
do
scp $RPM_FOLDER/$i app@$TIZEN_IP:
done
fi
echo -e "${red}Copying the install script to target device...${NC}"
scp ./install_rpms.sh app@$TIZEN_IP:
scp blacklist-rtlsdr.conf root@$TIZEN_IP:/etc/modprobe.d
scp 99-librtlsdr.rules root@$TIZEN_IP:/etc/udev/rules.d
ssh root@TizenVTC "mkdir -p /tmp/pulseaudio"
ssh root@TizenVTC "cd /home/app; ./install_rpms.sh"
else
echo "Error! You have to set and export TIZEN_IP prior to calling this script!"
fi