gresource extract
다음 스크립트를 사용하여 gnome-shell 리소스를 추출 하려고 합니다 .
#!/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
하지만 오류가 발생했습니다.
./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
gresource list gnome-shell-theme.gresource
출력은 다음 과 같습니다 .
/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
목록 출력에 이러한 파일이 있다고 표시될 때 왜 이런 일이 발생하는지 잘 모르겠습니다. 내 bash 스크립트가 엉망이 된 걸까요, 아니면 이유가 무엇일까요? 감사해요. 추신 - 저는 gnome-shell을 사용자 정의하려는 초보자입니다.
답변1
나머지도 추출되었습니다. 리소스 목록을 배열로 하드코딩한 다음 파일 이름과 함께 직접 출력했습니다.
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
감사합니다. 이제 맵파일에 대해서도 알게 되었습니다. @콰지모도