Add runScript()
This commit is contained in:
parent
ce619c7603
commit
9923bfc641
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
runScript() {
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
pacman -Syu --noconfirm base-devel
|
pacman -Syu --noconfirm base-devel
|
||||||
|
@ -27,3 +28,6 @@ echo "::set-output name=pkgFile::$relPkgFile"
|
||||||
newFiles=$(find -H "$PWD" -not -path '*.git*')
|
newFiles=$(find -H "$PWD" -not -path '*.git*')
|
||||||
mapfile -t toRemove < <(printf '%s\n%s\n' "$newFiles" "$oldFiles" | sort | uniq -u)
|
mapfile -t toRemove < <(printf '%s\n%s\n' "$newFiles" "$oldFiles" | sort | uniq -u)
|
||||||
rm -rf "${toRemove[@]}"
|
rm -rf "${toRemove[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
runScript "$@"
|
||||||
|
|
Loading…
Reference in New Issue