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

build_lin tries to rm stuff around root if builds fail #18

Closed
leshy opened this issue Jun 20, 2018 · 2 comments
Closed

build_lin tries to rm stuff around root if builds fail #18

leshy opened this issue Jun 20, 2018 · 2 comments

Comments

@leshy
Copy link

leshy commented Jun 20, 2018

if make fails, build/lin folder is never created and

cd build/lin

fails, but

cd ../..

passes.
it will try to zip your whole hard drive, which is fine, but after it will run

ls | grep -v '\.zip$' | xargs rm

which will remove files in its current dir. this is most dangerous when it passes through your home folder, it ends at /

rm: cannot remove 'bin': Permission denied                               
rm: cannot remove 'boot': Is a directory                              
rm: cannot remove 'dev': Is a directory        
rm: cannot remove 'etc': Is a directory                                                                           
rm: cannot remove 'home': Is a directory        
rm: cannot remove 'lib': Permission denied        
rm: cannot remove 'lost+found': Is a directory                
rm: cannot remove 'mnt': Is a directory         
rm: cannot remove 'opt': Is a directory                       
rm: cannot remove 'proc': Is a directory                                                                                                                                             
rm: cannot remove 'root': Is a directory                                                                                                                                                                                                                       
rm: cannot remove 'sbin': Permission denied                                                                                                                                                                                                                             
rm: cannot remove 'srv': Is a directory                                                                                                                                     
rm: cannot remove 'sys': Is a directory                                                                                                                                
rm: cannot remove 'tmp': Is a directory                                                                                                                                              
rm: cannot remove 'usr': Is a directory                                                                                                                       
rm: cannot remove 'var': Is a directory                                                                                                                     
@rpasichnyk
Copy link
Contributor

Add
set -e
in the beginning of the build script

@vedderb
Copy link
Owner

vedderb commented Feb 20, 2019

set -e is added, hopefully that solves the problem.

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

3 participants