22
23
24
25
26
27
28
29
30
31
|
# echo "#!/bin/bash" > $target
# if [ "$LD_LIBRARY_PATH" != "" ];then
# echo "source $prefix/bin/.\$(lsb_release -sr)/cfg.sh" >> $target
# fi
# echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target
echo "#!/bin/bash" > $target
echo "lsbr=\$(lsb_release -sr)" >> $target
echo "if [[ -e \$lsbr ]];then source \$lsbr;fi" >> $target
echo "exec $prefix/bin/.\$lsbr/$cmd \"\$@\"" >> $target
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
|
# echo "#!/bin/bash" > $target
# if [ "$LD_LIBRARY_PATH" != "" ];then
# echo "source $prefix/bin/.\$(lsb_release -sr)/cfg.sh" >> $target
# fi
# echo "exec $prefix/bin/.\$(lsb_release -sr)/$cmd \"\$@\"" >> $target
echo "#!/bin/bash" > $target
if [[ $cmd =~ dboard ]]; then
cat >> $target <<'EOF'
# check that $DISPLAY is set
if [[ -z $DISPLAY ]]; then
echo 'ERROR: $DISPLAY environment variable is not set; megatest dashboard requires X display address to be set in $DISPLAY.'
exit 1
fi
# check that $DISPLAY is proper
if [[ -x $(which xdpyinfo 2>/dev/null) ]]; then
if ! xdpyinfo -display "$DISPLAY" &>/dev/null; then
echo 'ERROR: megatest dashboard cannot open display "'$DISPLAY'". Please check $DISPLAY environment variable.'
exit 1
fi
fi
EOF
fi
echo "lsbr=\$(lsb_release -sr)" >> $target
echo "if [[ -e \$lsbr ]];then source \$lsbr;fi" >> $target
echo "exec $prefix/bin/.\$lsbr/$cmd \"\$@\"" >> $target
|