Giter Club home page Giter Club logo

ssl-setup's People

Contributors

kkimurak avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

ssl-setup's Issues

Select the behavior with command line option

This script installs all of required packages for official tools and useful tools for beginner even if user does not want them.

I want to change the behavior with command line option.
e.g. -b
It mean "Build" , so when run the script with this option,
only the function "build_ssl_tools()" will be called.

Additionally, options that runs each functions will be required I think.

too many message : password for sudo

Currently I'm using "sudo" for each commands.
But in this method, password required many times (because it takes few minutes to process).

Idea :
delete all sudo, run this script as root isntead.
This will place robocup-ssl's tools for /root/Documents, it's problem.
So, I can use su -l ${logname} when required.

flag "-e" not working (not stopping at error)

Currently I'm setting the flag set -Ceu.

  • C : error on overwriting
  • e : stop when error
  • u : error on non-existing variable

I think option -e will check the exit code for each line,
and I added || echo "error message for line" for end of most of lines.
It will returns non-error value, so option -e may not work.

BTW, I've added function error_end() to script. it shows error message and exit with 1. I can use this.

remove vartypes installation

grSim already supports inline build when vartypes not found.
ssl-vision also contains vartypes in its source (src/share) and uses this.
So we don't need to build and install vartypes library by ourselves.

Sometime running installDeps.sh for ssl-autorefs fails (Arch)

Using Arch Linux, installDeps.sh only installs dependency for ER-Force, and the script I made stops when building TIGERs's AutoReferee, reporting no javac found.

Currently I'm running installDeps.sh via

yes | curl https://raw.githubusercontent.com/robocup-ssl/ssl-autorefs/master/installDeps.sh | bash`.  

I think it is better to fix it like this :

curl https://raw.githubusercontent.com/robocup-ssl/ssl-autorefs/master/installDeps.sh > installDeps.sh
yes | bash installDeps.sh

update dependency

Currently this script will install ode 0.13 (if need to build from source),
and OpenCV is also older version.
Need a way to get latest release, and I've already did it for ssl-game-controller.
OpenCV is hosted on GitHub. How about ODE...?

I need to know how to get latest release on BitBucket.

test on Arch Linux

This script is only tested on Fedora and Ubuntu.
In my team it is recommended to use Fedora or Arch Linux to develop our AI system for RoboCup-SSL.

So I think I have to test this on Arch Linux.

create documentation (usage of each software, setting up Linux, and so on)

  • needed
    • usage of each software
  • not needed, but exist (I've already wrote)
    • setting up Linux (VM) on Windows, and start develop of RoboCup-SSL
    • introducing code editor

idea

  • Use asciidoctor : place to /docs/
  • It can generate .html for each .adoc files with option -R (source directory) -D (output directory)

multiple install process of vartypes

during test of script, I've build and installed vartypes so many times. It's too noisy.

So check if vartypes is already installed before install_vartypes().
Example :

if ! ls /usr/local/lib/*vartypes* > /dev/null; then
    install_vartypes
fi

The script adding invalid repository (Ubuntu)

In current script, for Ubuntu, there're process to add ppa boost repository.
I don't remember why I did so because it was a long time ago that I had tested on Ubuntu before.
(I may have read the page that wrote it)

Due to this INVALID repository, apt is not working correctly during installation process of Dependency for ssl-autorefs,
so build for ssl-autorefs fail.

In Ubuntu 18.04 LTS, libboost is in official repository.
So I don't need to add ppa repository for boost.

permission denied when ~/Documents not exist

When using xfce, ~/Desktop is the only directory that created in default.
And, in function install_liraries(), creating directory ~/Documents/sslinst_tmp - and this function is run as root.
So it will cause permission problem.
It is better to use temporal directory

idea : use mktemp

# current code
local path_tmp=/home/${SUDO_USER}/Documents/sslinst_tmp/
mkdir -p path_tmp && cd $_

# using mktemp : no need to mkdir, mktemp make directory and return its path
local path_tmp="$(mktemp)/sslinst_tmp/"

Divide the libraries according to the dependency of each software

overview

Currently the libraries to be installed are written in plain text.
e.g. dnf -y install git boost-devel ...
That's weird and I want to divide them.
#6 will decrease them, but that's not enough because most of them does not support fedora...

how?

we can use variables in bash. so those libraries could be put together like this :

dnf_grsim="git automake gcc gcc-c++ kernel-devel qt-devel mesa-libGL-devel mesa-libgGLU-mesa-devel protobuf-compiler ode ode-devel"
apt_grsim= "..."

dnf_vision="gcc libjpeg libpng v4l-utils libdc1394 libdc1394-devel"
...

dnf install ${dnf_grsim} ${dnf_vision}

grSim build failed : PKG_CONFIG_PATH empty?

I've tested on Fedora32 but build for grSim failed. It stopped with reporting error about FindODE even pkg-config is already installed.
Then I checked var, it was empty

$ echo $PKG_CONFIG_PATH
# nothing shown

ok, PKG_CONFIG_PATH is not set.

I've tested with this and build passed successfully.
If I can't find out any solution, I'll put this in script.

$ pwd
~/Documents/robocup/tools/grSim/build
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cmake ..

unexpected behavior with timeout of `read -t`

I'm currently using read with option -t to set the path to place ssl-tools,
but read -t will make the script finish when nothing typed.
In my idea, It must jump to the * ) case if there is no input.

To check exit status code will help us to solve this problem.

Current code :

read -r -t 60 SSL_DIR
# process finish before reaching to `case`
case $SSL_DIR in
    # each process

Example code to check the exit status :

read -r -t 60 SSL_DIR || if [ "$?" == "142" ] ; then echo " set to default..."; fi
case $SSL_DIR in
    # each process

It worked fine.

  • Q. Why "142" ?
    • A. I've tested on Ubuntu 18.04 LTS, Fedora29 and Arch Linux.
      Timeout for read -t N always returns it (of course N is not 0).

update qt from qt4 to qt5

Recently grSim officially add support for qt5, so old version of qt may not works.
I have to update installation section after work #11

install firefox only if needed

This script will install firefox (see commit 3c65689 and #35), even if valid web-browser is installed.

To avoid useless installation, do like:

result=0
command -v "${xdg-settings get default-web-browser | sed "s:.desktop::g")" || result="$?"
if [ result != 0 ]; then
  # install firefox
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.