#!/bin/sh
# set -e

systemctl --system daemon-reload >/dev/null || true

cachePath="/var/cache/RevisionsManager"
if [ -d ${cachePath} ];then
    rm -rf ${cachePath}
fi

user="$(ls -ln /home/ | awk '$3>=1000' | awk '{printf "%s ", $NF}')"
for x in ${user}; do
    path1="/home/$x/桌面/RevisionsManager.desktop"
    if [ -e $path1 ];then
        rm $path1
    fi

    path2="/home/$x/Desktop/RevisionsManager.desktop"
    if [ -e $path2 ];then
        rm $path2
    fi
done
