PortValhalla/archiso/scripts/show-diff.fish

25 lines
802 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
. "$dir/template-path.fish"
rm -rf "$contextRoot"
cp -r "$(templatePath)" "$contextRoot"
chmod -R 755 "$contextRoot"
git init "$contextRoot"
git -C "$contextRoot" add .
begin
git -C "$projectDir" ls-files
git -C "$projectDir" ls-files --exclude-standard --others
end | \
rsync -r --include-from=/dev/stdin --exclude={.gitignore,README.md,scripts,LICENSE,valhalla.patch} "$dir/.." "$contextRoot"
end 2>&1 > /dev/null;
git -C "$contextRoot" diff
end