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

dwarfsextract option (command) of the read operation (process) for yad (progressbar) ? #117

Closed
mhx opened this issue Nov 20, 2022 Discussed in #116 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request fixready
Milestone

Comments

@mhx
Copy link
Owner

mhx commented Nov 20, 2022

Discussed in #116

Originally posted by fwn0 November 19, 2022
I would like to have the progress of extracting dwarf archives displayed graphically. Is there any way to send the unpacking process to a pipe?
I have tried something similar 7 zip or fa:

# Unpacking package
"$7zz" x archive.7z -aoa -oc:"$1" >> "$progress_pipe" \
2>&1 >> "$progress_pipe" & echo "$!" >> "$main_proc_id"

# Wait here and it returns exit status "${?}"
# It's stderr redirected to /dev/null for prevent messages from the kill
wait "$(<"$main_proc_id")" 2>/dev/null

if [ "$?" = "0" ]; then
	echo "#Installation completed" >> "$progress_pipe"
	kill "$main_pid" >"$main_proc_id" 2>/dev/null
else
	echo "#Installation error" >> "$progress_pipe"
	echo $? >> "$progress_pipe" 
	kill "$main_pid" >"$main_proc_id" 2>/dev/null
fi

or: 
# Unpacking from the archive
"$fa" x "$dir"/archive.fa -o+ -dp"$1" >> "$progress_pipe" \
2>&1 >> "$progress_pipe" & echo "$!" >> "$main_proc_id"

# Wait here and it returns exit status "${?}"
# It's stderr redirected to /dev/null for prevent messages from the kill
wait "$(<"$main_proc_id")" 2>/dev/null

if [ "$?" = "0" ]; then
	echo "#Installation completed" >> "$progress_pipe"
	kill "$main_pid" 2>/dev/null >"$main_proc_id"
else
	echo "#Installation error" >> "$progress_pipe"
	kill "$main_pid" 2>/dev/null >"$main_proc_id"
fi

which works fine, but for dwarfsextract it cannot capture this process.

@mhx mhx added the enhancement New feature or request label Nov 20, 2022
@mhx mhx added this to the v0.7.0 milestone Nov 20, 2022
@mhx mhx self-assigned this Nov 20, 2022
@mhx mhx added the fixready label Nov 20, 2022
@mhx
Copy link
Owner Author

mhx commented Nov 20, 2022

Fixed in dwarfs-0.7.0-RC3.

@mhx mhx closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixready
Projects
None yet
Development

No branches or pull requests

1 participant