0

I'm trying to extract gnome-shell resource using gresource extract using this script:

#!/bin/bash
declare -a n;
n=$(gresource list gnome-shell-theme.gresource | cat | tr '\n' ' ')
for r in ${n[@]}
do
gresource extract gnome-shell-theme.gresource ${r}>${r/#\/org\/gnome\/shell/.}
done

but am getting an error:

./extractshell.sh: line 6: ./theme/icons/eye-not-looking-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/eye-open-negative-filled-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/keyboard-caps-lock-filled-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/keyboard-enter-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/keyboard-hide-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/keyboard-layout-filled-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/keyboard-shift-filled-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/message-indicator-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/pointer-double-click-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/pointer-drag-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/pointer-primary-click-symbolic.svg: No such file or directory
./extractshell.sh: line 6: ./theme/icons/pointer-secondary-click-symbolic.svg: No such file or directory

Although the gresource list gnome-shell-theme.gresource outputs:

/org/gnome/shell/theme/calendar-today.svg
/org/gnome/shell/theme/checkbox-focused.svg
/org/gnome/shell/theme/checkbox-off-focused.svg
/org/gnome/shell/theme/checkbox-off.svg
/org/gnome/shell/theme/checkbox.svg
/org/gnome/shell/theme/dash-placeholder.svg
/org/gnome/shell/theme/gnome-shell-high-contrast.css
/org/gnome/shell/theme/gnome-shell.css
/org/gnome/shell/theme/icons/eye-not-looking-symbolic.svg
/org/gnome/shell/theme/icons/eye-open-negative-filled-symbolic.svg
/org/gnome/shell/theme/icons/keyboard-caps-lock-filled-symbolic.svg
/org/gnome/shell/theme/icons/keyboard-enter-symbolic.svg
/org/gnome/shell/theme/icons/keyboard-hide-symbolic.svg
/org/gnome/shell/theme/icons/keyboard-layout-filled-symbolic.svg
/org/gnome/shell/theme/icons/keyboard-shift-filled-symbolic.svg
/org/gnome/shell/theme/icons/message-indicator-symbolic.svg
/org/gnome/shell/theme/icons/pointer-double-click-symbolic.svg
/org/gnome/shell/theme/icons/pointer-drag-symbolic.svg
/org/gnome/shell/theme/icons/pointer-primary-click-symbolic.svg
/org/gnome/shell/theme/icons/pointer-secondary-click-symbolic.svg
/org/gnome/shell/theme/no-events.svg
/org/gnome/shell/theme/no-notifications.svg
/org/gnome/shell/theme/pad-osd.css
/org/gnome/shell/theme/process-working.svg
/org/gnome/shell/theme/toggle-off-dark.svg
/org/gnome/shell/theme/toggle-off-hc.svg
/org/gnome/shell/theme/toggle-off.svg
/org/gnome/shell/theme/toggle-on-dark.svg
/org/gnome/shell/theme/toggle-on-hc.svg
/org/gnome/shell/theme/toggle-on.svg

I'm not sure why this is happening when the list output shows that these files exist. Is my bash script messed up or what could be the reason? Thank you. P.S - I'm a newbie trying to customize my gnome-shell.

0

Extracted the remaining ones as well. I hard-coded the resources list in an array and then directly outputted it with file name.

declare -a new;
new=(/org/gnome/shell/theme/icons/eye-not-looking-symbolic.svg /org/gnome/shell/theme/icons/eye-open-negative-filled-symbolic.svg /org/gnome/shell/theme/icons/keyboard-caps-lock-filled-symbolic.svg /org/gnome/shell/theme/icons/keyboard-enter-symbolic.svg /org/gnome/shell/theme/icons/keyboard-hide-symbolic.svg /org/gnome/shell/theme/icons/keyboard-layout-filled-symbolic.svg /org/gnome/shell/theme/icons/message-indicator-symbolic.svg /org/gnome/shell/theme/icons/pointer-double-click-symbolic.svg /org/gnome/shell/theme/icons/keyboard-shift-filled-symbolic.svg /org/gnome/shell/theme/icons/pointer-drag-symbolic.svg /org/gnome/shell/theme/icons/pointer-primary-click-symbolic.svg /org/gnome/shell/theme/icons/pointer-secondary-click-symbolic.svg);

for r in ${new[@]}
do
    gresource extract gnome-shell-theme.gresource ${r}>`echo ${r:29}`
done

Thanks, as now I know about mapfile too. @Quasímodo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.