Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: configure_cache_path: Invalid conf generated #25

Open
NGenetzky opened this issue Jan 7, 2021 · 0 comments
Open

common: configure_cache_path: Invalid conf generated #25

NGenetzky opened this issue Jan 7, 2021 · 0 comments

Comments

@NGenetzky
Copy link

NGenetzky commented Jan 7, 2021

  1. by using -e for echo you are actually removing the '\n' which needs to be in the output.
  2. This also adds an absolute path into the project - which is a problem for shared projects.
  3. this also appends to the file again if called again - which might not be a problem, but it is a disadvantage.
→ bash -x echo_badly.sh 
+ CACHE_DIR=/a/b/c
+ DOWNLOAD_CACHE=dl
+ CONF_FILE=foo.conf
+ echo -e '\nPREMIRRORS_prepend = "git://.*/.* file:///a/b/c/dl \ \n' 'ftp://.*/.* file:///a/b/c/dl \ \n' 'http://.*/.* file:///a/b/c/dl \ \n' 'https://.*/.* file:///a/b/c/dl "\n'
+ cat foo.conf

PREMIRRORS_prepend = "git://.*/.* file:///a/b/c/dl \ 
 ftp://.*/.* file:///a/b/c/dl \ 
 http://.*/.* file:///a/b/c/dl \ 
 https://.*/.* file:///a/b/c/dl "

Similar comments here about adding absolute path into the project. These variables are easily configured many other more proper ways, consider using them.

  echo "DL_DIR = \"${CACHE_DIR}/${DOWNLOAD_CACHE}\"" >> ${CONF_FILE}
  echo "SSTATE_DIR = \"${CACHE_DIR}/${SSTATE_CACHE}\"" >> ${CONF_FILE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant