-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
- by using
-efor echo you are actually removing the '\n' which needs to be in the output. - This also adds an absolute path into the project - which is a problem for shared projects.
- 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}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels