kkimurak / ssl-setup

Bash script that setup the official RoboCup-SSL tools with required packages ( https://github.com/RoboCup-SSL/ )
4 stars 0 forks source link

update method to create temporal directory #36

Closed kkimurak closed 4 years ago

kkimurak commented 4 years ago

closes #34

overview

through this PR, method to create temporal directory will be updated.

# old
path_tmp="/home/${SUDO_USER}/Documents/sslinst_tmp/"
# this line will be run as root. It will cause permission problem if ~/Documents does not exist
# (owner of /home/${SUDO_USER}/Documents will be root)
mkdir -p path_tmp

This causes problem when ~/Documents does not exist (e.g. xfce does not provide any directory in ~/ excluding Desktop)

# new : will be created on /tmp/
path_tmp="$(mktemp -d)"

Much simple. And I don't have to care about permission of temporal directory.

test