Skip to content

Restore executable bit on edited scripts#15

Merged
wnstfy merged 1 commit into
developfrom
fix/restore-exec-bits
Jun 21, 2026
Merged

Restore executable bit on edited scripts#15
wnstfy merged 1 commit into
developfrom
fix/restore-exec-bits

Conversation

@wnstfy

@wnstfy wnstfy commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the dead-code cleanup PRs (#12, #13, #14). Those edits rewrote several files through a temp file (sed ... > tmp && mv tmp file), which silently dropped the executable bit (755 → 644) on files that were originally executable.

This restores the original mode on the five affected files:

  • install.sh
  • lib/core.sh
  • lib/crypto.sh
  • lib/generators.sh
  • lib/schedule.sh

Details

  • Mode-only change — zero content diff.
  • Functionally cosmetic: the lib/*.sh modules are sourced, not executed, and install.sh is run via curl … | bash. But the inconsistency with the rest of the tree (e.g. backup.sh, verify.sh, setup.sh are 755) is unintended, so this puts them back.
  • Files that were already 644 before the cleanup (history.sh, jobs.sh, migration.sh, restic.sh) are left as-is.

Testing

No code change. git diff shows only mode change 100644 => 100755 for the five files.

The dead-code removal edits rewrote these files through a temp file, which
dropped their executable bit (755 -> 644). Restore the original mode. No
content change. lib modules are sourced so this is cosmetic, but keeps the
permissions consistent with the rest of the tree.
@greptile-apps

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown

Greptile Summary

This is a mode-only follow-up to the dead-code cleanup PRs (#12#14), restoring the executable bit (755) on five shell scripts whose permissions were silently dropped to 644 by the sed … > tmp && mv tmp file pattern used in those PRs.

  • install.sh, lib/core.sh, lib/crypto.sh, lib/generators.sh, and lib/schedule.sh each have their mode restored from 100644 to 100755; zero bytes of content changed.
  • The lib/*.sh files are sourced rather than executed directly, so the permission drop had no runtime impact, but this restoration brings them back in line with the rest of the tree (backup.sh, verify.sh, setup.sh).

Confidence Score: 5/5

Pure mode restoration with no content changes — safe to merge immediately.

Every changed file shows only a 100644 → 100755 mode flip; git diff contains no content changes at all. The fix is narrowly scoped to restoring permissions that were unintentionally dropped by the temp-file rewrite pattern, and the five files selected match the description precisely.

No files require special attention.

Important Files Changed

Filename Overview
install.sh Mode-only change: 100644 → 100755. No content diff.
lib/core.sh Mode-only change: 100644 → 100755. No content diff.
lib/crypto.sh Mode-only change: 100644 → 100755. No content diff.
lib/generators.sh Mode-only change: 100644 → 100755. No content diff.
lib/schedule.sh Mode-only change: 100644 → 100755. No content diff.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Previous PRs #12-#14\n(dead-code cleanup)"] -->|"sed … > tmp && mv tmp file\nsilently drops executable bit"| B["Affected files: 100644\ninstall.sh, lib/core.sh\nlib/crypto.sh, lib/generators.sh\nlib/schedule.sh"]
    B -->|"This PR: chmod +x / git update-index"| C["Restored files: 100755\ninstall.sh, lib/core.sh\nlib/crypto.sh, lib/generators.sh\nlib/schedule.sh"]
    D["Unchanged files (already 644)\nhistory.sh, jobs.sh\nmigration.sh, restic.sh"] -->|"Left as-is"| D
    C --> E["Tree consistent with\nbackup.sh, verify.sh, setup.sh (755)"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["Previous PRs #12-#14\n(dead-code cleanup)"] -->|"sed … > tmp && mv tmp file\nsilently drops executable bit"| B["Affected files: 100644\ninstall.sh, lib/core.sh\nlib/crypto.sh, lib/generators.sh\nlib/schedule.sh"]
    B -->|"This PR: chmod +x / git update-index"| C["Restored files: 100755\ninstall.sh, lib/core.sh\nlib/crypto.sh, lib/generators.sh\nlib/schedule.sh"]
    D["Unchanged files (already 644)\nhistory.sh, jobs.sh\nmigration.sh, restic.sh"] -->|"Left as-is"| D
    C --> E["Tree consistent with\nbackup.sh, verify.sh, setup.sh (755)"]
Loading

Reviews (1): Last reviewed commit: "Restore executable bit on edited scripts" | Re-trigger Greptile

@wnstfy
wnstfy merged commit df28801 into develop Jun 21, 2026
3 checks passed
@wnstfy
wnstfy deleted the fix/restore-exec-bits branch June 21, 2026 13:01
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.

1 participant