Skip to content

Conversation

@sitolam
Copy link
Contributor

@sitolam sitolam commented Jul 5, 2024

Pull Request

Description

I have fixed restore_cfg.sh to work with directories. Previously it would restore the configs if the overwrite option was set to no. I added a small piece of code to check that the config is not also a directory.

This PR is linked to my previously made issue: #1658

Type of change

Please put an x in the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Screenshots

Previously

N|Y|${HOME}|.floorp|floorp-bin
image

Now

N|Y|${HOME}|.floorp|floorp-bin
image

@rubiin
Copy link
Contributor

rubiin commented Aug 8, 2024

LGTM

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Aug 9, 2024

I don't usually touch his script because maybe there is an intended reason for this. I would recommend using Hyde-cli's Hyde restore Config instead to manage configs explicitly. I will just wait for the owner to merge this. But overall I approved this MR.

@Anshul-007
Copy link
Contributor

Anshul-007 commented Oct 9, 2024

Hello have you added a newline in restore_cfg.lst after adding your directory path?
like

N|Y|${HOME}/.config|libinput-gestures.conf|libinput-gestures
[Empty line]

@sitolam
Copy link
Contributor Author

sitolam commented Oct 10, 2024

Hello have you added a newline in restore_cfg.lst after adding your directory path?
like

N|Y|${HOME}/.config|libinput-gestures.conf|libinput-gestures
[Empty line]

Yes but that doesn't fix the issue

@T-Crypt
Copy link
Collaborator

T-Crypt commented Dec 12, 2024

Instead of checking for files (-f) and directories (-d) separately, use -e to check if the path exists, regardless of type.

if [ ! -e "${pth}/${cfg_chk}" ]; then

@T-Crypt T-Crypt closed this Dec 12, 2024
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

Successfully merging this pull request may close these issues.

5 participants