i tried it but didn't work, i suppose its a command to replace all the enables words with disables..if thats so i opened catalogues file and there were no "enable" word there, only disable for a couple of catalogues i disabled before.
#!/bin/sh ACTION=$1 CAT_DIR=/etc/hildon-application-manager DEF_CAT=catalogues DISABLED_CAT=catalogues.disabled ENABLED_CAT=catalogues.enabled CUR_STATUS="" move_catalogues() { NEW_CAT=$1 OLD_CAT=$2 mv "$CAT_DIR/$DEF_CAT" "$CAT_DIR/$OLD_CAT" && mv "$CAT_DIR/$NEW_CAT" "$CAT_DIR/$DEF_CAT" } if [ ! -f "$CAT_DIR/$DEF_CAT" ]; then echo "No primary catalogue file found. Please fix before rerunning." exit 1 fi if [ -f "$CAT_DIR/$ENABLED_CAT" ]; then CUR_STATUS=disabled fi if [ -f "$CAT_DIR/$DISABLED_CAT" ]; then if [ -n "$CUR_STATUS" ]; then echo "Cannot determine status." exit 1 fi CUR_STATUS=enabled fi if [ -z "$CUR_STATUS" ]; then echo "<catalogues/>" > "$CAT_DIR/$DISABLED_CAT" CUR_STATUS="enabled" fi if [ "$ACTION" == "enable" ]; then if [ "$CUR_STATUS" == "enabled" ]; then echo "Already enabled" exit 0 fi move_catalogues $ENABLED_CAT $DISABLED_CAT elif [ "$ACTION" == "disable" ]; then if [ "$CUR_STATUS" == "disabled" ]; then echo "Already disabled" exit 0 fi move_catalogues $DISABLED_CAT $ENABLED_CAT elif [ "$ACTION" == "status" ]; then echo $CUR_STATUS else echo "Unknown action" exit 1 fi exit $?