dotfiles/sync.sh

25 lines
320 B
Bash
Raw Normal View History

2022-12-16 14:23:28 +01:00
#!/bin/sh
2023-02-19 21:02:08 +01:00
SUDO=${SUDO:-sudo}
2023-01-26 15:13:35 +01:00
2023-02-19 21:02:08 +01:00
PM=${PM:-pacman}
PM_INSTALL=${PM_INSTALL:--S}
PM_NOCONFIRM=${PM_NOCONFIRM:---noconfirm}
2022-12-16 14:23:28 +01:00
2023-02-20 16:47:39 +01:00
set -e
2022-12-16 14:23:28 +01:00
main() {
2023-02-20 16:47:39 +01:00
if [ ! -z "$@" ]; then
. ./scripts/$@
exit 0
fi
2023-02-19 21:02:08 +01:00
for script in ./scripts/* ; do
echo "# exec $script"
. $script
done
2022-12-16 14:23:28 +01:00
}
2023-02-19 21:02:08 +01:00
main "$@"
2023-02-20 16:47:39 +01:00
echo "# OK"