Skip to content

Commit

Permalink
Update dev note for inst script
Browse files Browse the repository at this point in the history
  • Loading branch information
clsty committed Jan 27, 2025
1 parent c3a3205 commit cc05810
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/content/docs/en/dev/inst-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,35 @@ title: Install scripts
layout: /src/layouts/autonum.astro
sidebar:
order: 20
lastUpdated: 2024-02-25
lastUpdated: 2025-01-27
---
Currently:
- `install.sh` `checkdeps.sh` `setup.sh` only work for Arch(-based) distros.
- `update-ags.sh` works for common distros, but user must figure out deps for AGS themselves (at least not easy for openSUSE, see [end-4#275](https://github.com/end-4/dots-hyprland/discussions/275) and [Aylur#313](https://github.com/Aylur/ags/discussions/313)).

# Structrue
# Main method
The related scripts and files around `install.sh` belongs to "main method", which is developed and maintained mainly by clsty.
## Folder Structrue
Main script: `install.sh`
- The script keeps its "data" part under `./scriptdata/`. Some files are also shared by other scripts.
- When the script build something from source, they're stored under `./cache/`. Of course, `./cache` is listed on `.gitignore`.
## Old Dependency Installation Method
The old deps install method mainly involves `./scriptdata/dependencies.conf` (which is empty now). It's not used anymore but I keep the relevant part just in case, e.g. the new install method breaks in future.

Other scripts:
- `update-ags.sh`
- The script uses the `install-ags` function from `./scriptdata/installers`.
- If executed, it installs AGS without confirm.
- `checkdeps.sh`
- Check the existence of pkgs listed in `./scriptdata/dependencies.conf`.
There is also a `checkdeps.sh`:
- It checks the existence of pkgs listed in `./scriptdata/dependencies.conf`.
- It somehow fixes [the problem caused by yay](https://github.com/end-4/dots-hyprland/discussions/204).
- `uninstall.sh`
- Deprecated. Unrecommended to use because its behavior may be destructive.
- If executed, it tries to revert all changes from `install.sh`, whether the change is or is not really caused by `install.sh`.

Online script: `setup.sh`
## Current Dependency Installation
Local PKGBUILDs under `./arch-packages/` are used to install dependencies. It enables a workable `uninstall.sh` script.

The PKGBUILDs contains two forms of dependencies:
- Package name written in dependencies, like a "meta" package.
- Normal PKGBUILD content to build dependencies, e.g. AGS, which is often for version controlling.
## Configuration Files Sync
Mainly use rsync.

# Online script
`setup.sh`:
- Stored in the repo of dots-hyprland-wiki to be served by the doc site directly.
- When executed, it downloads the dots-hyprland repo and then executes the `install.sh`.
# Idempotent
The scripts (`install.sh` `update-ags.sh` `checkdeps.sh` `setup.sh`) are and should be **idempotent**, i.e. capable for running multiple times.
The scripts are and should be **idempotent**, i.e. capable for running multiple times.

This is useful for debugging and a resumable installation, and also provide updating function somehow.

0 comments on commit cc05810

Please sign in to comment.