diff --git a/src/config.fish b/src/config.fish index 43407bb..e7c3f45 100755 --- a/src/config.fish +++ b/src/config.fish @@ -1,5 +1,14 @@ function config -d "sets some configuration variables" + # If this is not set to "yes", snap-pac-uki will not do anything when + # executed. + + # This is to make sure that this program can be installed with pacman. If + # this wasn't done, pacman would install this program with an default + # config, which most likely wouldn't work correctly. Therefore this needs + # to be set to "yes" by the user, once they've configured snap-pac-uki. + set -g CFG_ENABLED "no" + # A directory where ukis can be built. # # It is recommended to keep this within /tmp, as the generated data will not diff --git a/src/snap-pac-uki.fish b/src/snap-pac-uki.fish index 437719c..d4f6569 100755 --- a/src/snap-pac-uki.fish +++ b/src/snap-pac-uki.fish @@ -151,6 +151,11 @@ function main config check_deps + if test "CFG_ENABLED" != "yes" + echo "not enabled in config file" 1>&2 + exit 0 + end + switch $argv[1] case "snapshots" find_tasks