Skip to content

Commit be83433

Browse files
committed
refactor: move repository list to README
1 parent c773226 commit be83433

File tree

3 files changed

+27
-34
lines changed

3 files changed

+27
-34
lines changed

README.org

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,31 @@ if you find your dotfiles in here and would like it removed, please
66
feel free to contact me or open a pull request. or if you want to add
77
your dotfiles instead, also please, PRs are welcome.
88

9+
* repositories
10+
# BEGIN REPOLIST
11+
| [[repos/aemogie/aetheria]] | https://github.com/aemogie/aetheria.git | dev |
12+
| [[repos/aemogie/aetheria]] | https://github.com/aemogie/aetheria.git | dev |
13+
| [[repos/abcdw/rde]] | https://git.sr.ht/~abcdw/rde | master |
14+
| [[repos/anemofilia/zero]] | https://codeberg.org/anemofilia/zero.git | main |
15+
| [[repos/look/misako]] | https://codeberg.org/look/misako.git | main |
16+
| [[repos/hako/Testament]] | https://git.boiledscript.com/hako/Testament.git | trunk |
17+
| [[repos/jjba23/sss]] | https://codeberg.org/jjba23/sss.git | trunk |
18+
| [[repos/divyaranjan/dotfiles]] | https://codeberg.org/divyaranjan/dotfiles.git | master |
19+
| [[repos/wloxyz/guix-configs]] | https://codeberg.org/wloxyz/guix-configs.git | main |
20+
| [[repos/lynn/galahad.git]] | https://git.transistor.house/lynn/galahad.git | main |
21+
| [[repos/ngraves/dotfiles]] | https://git.sr.ht/~ngraves/dotfiles | main |
22+
# this was slow, doubt their servers would be okay with my
23+
# cronjobs. couldnt find any mirrors
24+
# | [[repos/freya/dotfiles-guix]] | https://g.freya.cat/freya/dotfiles-guix.git | main |
25+
# END REPOLIST
26+
927
* motivation
1028
i found myself frequently going through multiple git forges, some of
1129
which don't have search/grep functionality, trying to find how others
1230
solved certain problems that i was encountering. this is an attempt to
1331
aggregate useful guix dotfiles and other guix related projects, so i
1432
can easily find examples.
1533

16-
* ~repositories.txt~
17-
this is the list of repositories you might want to change, it is a
18-
file with three whitespace seperated column, in the format
19-
#+BEGIN_SRC
20-
# owner/name url branch
21-
aemogie/aetheria https://codeberg.org/aemogie/aetheria.git dev
22-
#+END_SRC
23-
24-
the first column "owner/name" is used as the subdirectory to clone the
25-
repository into, the second as the url to the git repository, and the
26-
final as the branch to be cloned. empty lines and lines starting with
27-
~#~ are ignored, thus comments have to be on a seperate line.
28-
2934
* cloning
3035
as this repository might be large, for cloning for the purpose of
3136
making edits, i recommend these command which clones everything

aggregate.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/usr/bin/env bash
22
set -xeuo pipefail
33

4-
REPOS_FILE="repositories.txt"
4+
REPOS_FILE="README.org"
55
LOCK_FILE="repositories.lock"
6-
REPOS_DIR="repos"
6+
REPOS_DIR="repos" # if changed, also remember to change in $REPOS_FILE
77

88
# PURGE!!
99
rm -rf "$REPOS_DIR"
1010
mkdir -p "$REPOS_DIR"
1111
rm -f "$LOCK_FILE"
1212

1313
# the `||` is for when there's no trailing new line, but we still have content in the last line
14-
while read -r path url branch || [[ -n "$path" ]]; do
14+
while IFS='|' read -r first dir url branch _ || [[ -n "$first" ]]; do
1515
# empty lines and comments allowed
16-
[[ -z "$path" || "$path" == \#* ]] && continue
16+
[[ -z "$dir" || "$first" == \#* ]] && continue
1717

18-
dir="$REPOS_DIR/$path"
18+
# echo with no " to strip whitespace
19+
dir=$(echo $dir | tr -d "[]")
20+
url=$(echo $url)
21+
branch=$(echo $branch)
1922

2023
mkdir -p "$dir"
2124
git clone --depth 1 --no-tags --branch "$branch" "$url" "$dir"
@@ -24,7 +27,7 @@ while read -r path url branch || [[ -n "$path" ]]; do
2427
echo "$dir $hash" >> "$LOCK_FILE"
2528

2629
rm -rf "$dir/.git"
27-
done < "$REPOS_FILE"
30+
done <<< $(sed -n '/# BEGIN REPOLIST/,/# END REPOLIST/{//!p}' "$REPOS_FILE")
2831

2932
last_update=$(git log -1 --format=%cd --date=short 2>/dev/null || echo "initial")
3033
current_date=$(date +%Y-%m-%d)

repositories.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)