summarylogtreecommitdiffstats
path: root/ros2-galactic.install
blob: 3a08069c151b385985fbb44cf49706a7d8e4ff91 (plain)
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
pre_install() {
    # Create required symlinks (see https://wiki.archlinux.org/index.php/ROS)
    mkdir -p /usr/share/sip
    ln -sf /usr/lib/python3.9/site-packages/PyQt5 /usr/share/sip/.
    ln -sf /usr/lib/python3.9/site-packages/PyQt5/bindings/* /usr/share/sip/PyQt5/.
}

post_install() {
    printf "
    \e[33m\e[1mIMPORTANT NOTE:\e[0m
    You should add something like this to your ~/.bashrc file:

      export ROS_DOMAIN_ID=42
      source /opt/ros2/galactic/setup.bash
    
    This quick command will do it for you:
        
      printf \"\\\nexport ROS_DOMAIN_ID=42\\\nsource /opt/ros2/galactic/setup.bash\\\n\" >> ~/.bashrc

    Note 1: If you use zsh, replace '.bash' in the above lines with
    '.zsh' and add the lines to ~/.zshrc .
    
    Note 2: This will slow down terminal startup for a few seconds on
    cold start, and a fraction of a second for terminals that open later.
    If you know a better transparent solution, you are welcome to edit
    this.
    \e[33m\e[1mEND OF IMPORTANT NOTE.\e[0m
    "
}

post_remove() {
    printf "You may want to clean up .bashrc and/or .zshrc."
}