gencode-remote gibt nur noch befehle aus wenn was zu tun ist ...

This commit is contained in:
Daniel Heule 2013-12-05 08:45:12 +01:00
parent 72bbf93282
commit e1a2ebab5c

View file

@ -51,8 +51,6 @@ else
state="present" state="present"
fi fi
all_repo_ids="$(cat "$__object/explorer/all_repo_ids")"
enabled_repo_ids="$(cat "$__object/explorer/enabled_repo_ids")"
repo_id="$(cat "$__object/explorer/repo_id")" repo_id="$(cat "$__object/explorer/repo_id")"
act_id="" act_id=""
@ -62,6 +60,13 @@ elif grep -q "$repo_id" "$__object/explorer/all_repo_ids"; then
act_id="$repo_id" act_id="$repo_id"
fi fi
if grep -q "$act_id" "$__object/explorer/enabled_repo_ids"; then
state="enabled"
else
state="disabled"
fi
case "$state" in case "$state" in
present) present)
if [ -z "$desc" ] || [ -z "$uri" ]; then if [ -z "$desc" ] || [ -z "$uri" ]; then
@ -78,12 +83,12 @@ case "$state" in
fi fi
;; ;;
enabled) enabled)
if [ ! -z "$act_id" ]; then if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
echo zypper $zypper_def_opts modifyrepo -e "$act_id" echo zypper $zypper_def_opts modifyrepo -e "$act_id"
fi fi
;; ;;
disabled) disabled)
if [ ! -z "$act_id" ]; then if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
echo zypper $zypper_def_opts modifyrepo -d "$act_id" echo zypper $zypper_def_opts modifyrepo -d "$act_id"
fi fi
;; ;;