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

If a folder is named "scripts", coderbot_update ignores it #2

Open
avivace opened this issue Dec 26, 2018 · 1 comment
Open

If a folder is named "scripts", coderbot_update ignores it #2

avivace opened this issue Dec 26, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@avivace
Copy link
Member

avivace commented Dec 26, 2018

For some obscure reason (probably related to the fact that update/scripts is the folder containing install-scripts) if a folder is named scripts, it does NOT get copied in a update.

Example situation to reproduce, using the sample update in this repo:

files/install
/home/pi/coderbot/scripts/check_conn.sh

produce the update, with the script handling files doing this:

FILES=${FILES:-../files}

[ -d "${FILES}/install/" ] && cp -a ${FILES}/install/. $ROOT

No errors reported, update_status remains at done showing success.. everything else is copied correctly.

@avivace avivace added the bug Something isn't working label Dec 26, 2018
@previ
Copy link
Contributor

previ commented Dec 28, 2018

Could not find anything wrong in the "coderbot_update" script, this is the code launching update scripts:

cd scripts
allscripts=($(ls *.sh))
numscripts=${#allscripts[@]}
countscripts=0
for script in ${allscripts[@]}
do
        let countscripts++
        pending $countscripts $numscripts $script
    bash $script || ERRORS=true && $BREAK_ON_FAIL && fail "ERROR: script: $script ended with non zero exit code" 6
done

It just executes anything *.sh found in the scripts folder, it should not skip any files in paths with the same folder name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants