#!/bin/bash

declare -a cydia
cydia=($CYDIA)

if [[ $1 == install || update ]]; then
    if [[ ${CYDIA+@} ]]; then
        eval "echo 'finish:restart' >&${cydia[0]}"
    else
        echo "Please respring your device."
    fi
fi

exit 0