#!/bin/env fish
begin
    set -l dir (status dirname)
    set -l projectDir "$dir/.."
    set -l patch "$dir/valhalla.patch"
    source "$dir/template-path.fish"
    cp -r "$(templatePath)"/* "$projectDir"

    and begin
        if [ -f "$patch" ]
            git -C "$projectDir" apply --directory=archiso "$patch"
        end
    end
end