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

Typos in the script #5

Open
msuhanov opened this issue Oct 6, 2023 · 4 comments
Open

Typos in the script #5

msuhanov opened this issue Oct 6, 2023 · 4 comments

Comments

@msuhanov
Copy link

msuhanov commented Oct 6, 2023

Hello.

There is a missing space here:

tar --exclude=$OUTPUT_DIR -cvf $OUTPUT_DIR/homedir/root/root.tar /root/ --exclude-from$OUTPUT_DIR/homedir/oversized_files.txt 1> /dev/null 2> /dev/null

This:
--exclude-from$OUTPUT_DIR

This creates problems when collecting files from /root/ (when no rsync is found).

@msuhanov
Copy link
Author

msuhanov commented Oct 6, 2023

And here:

tar --exclude=$OUTPUT_DIR -cvf $OUTPUT_DIR/tmpfiles/tmp.tar /tmp/ --exclude-from --exclude-from $OUTPUT_DIR/tmpfiles/oversized_files.txt 1> /dev/null 2> /dev/null

This:
--exclude-from --exclude-from

@msuhanov msuhanov changed the title A typo in the script Typos in the script Oct 6, 2023
@msuhanov
Copy link
Author

find / -size $TAR_MAX_FILESIZE -type f -iname "*.plist" 2>/dev/null | while read line

find / -size $TAR_MAX_FILESIZE -type f -iname "*.apk" 2>/dev/null | while read line

The -size argument isn't needed here. Actually, it forces the script to skip files to be collected.

@msuhanov
Copy link
Author

Also:

ls -lL /etc/cron.daily/$name $OUTPUT_DIR/general/cron.daily/perms 2> /dev/null

No output redirection here...

@msuhanov
Copy link
Author

Also, the path is missing here (only the file name is given):

if [ -f $name ]

(And in other places too...)

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