PortValhalla/archiso/scripts/show-diff.fish
2024-07-15 20:19:52 +02:00

25 lines
822 B
Fish
Executable file

#!/bin/env fish
# Shows the differences between Arch's original `archiso` template named `releng` and this `archiso` directory.
begin
set -l contextRoot (mktemp -d)
set -l dir (status dirname)
set -l projectDir "$dir/.."
begin
source "$dir/template-path.fish"
rm -rf "$contextRoot"
and cp -r "$(templatePath)" "$contextRoot"
and chmod -R 755 "$contextRoot"
and git init "$contextRoot"
and git -C "$contextRoot" add .
and begin
git -C "$projectDir" ls-files
git -C "$projectDir" ls-files --exclude-standard --others
end | \
rsync --files-from=/dev/stdin --exclude={.gitignore,README.md,scripts,LICENSE,valhalla.patch} "$dir/.." "$contextRoot"
end &> /dev/null;
and git -C "$contextRoot" diff
end