代码: 全选
#!/bin/bash
#$1=install.log
echo "#!/bin/bash" >real_uninstall
echo rm -f `cat $1| grep "install -m"| awk '{print $5}'` >>real_uninstall
echo "`cat $1| grep novendor |grep -v "su root"| sed 's/install/uninstall/g'`" >>real_uninstall
echo "xdg-icon-resource forceupdate" >>real_uninstall
echo "`cat $1| grep "su root -c"| sed 's/su root -c -- //g'| sed 's/ "realplay %s"//g'| sed 's/ false//g'| sed 's/ true//g'| sed 's/ --type=bool//g'| sed 's/ --type=string//g'|sed 's/set/unset/g'|sed 's/install/uninstall/g'`" >>real_uninstall
a=`cat $1| grep "ln -sf"| sed -n '1p;1q'| awk '{print $4}'| sed 's/nphelix.so//g'`
echo "rm -f $a/nphelix.so" >>real_uninstall
echo "rm -f $a/nphelix.xpt" >>real_uninstall
a=`cat $1| grep "ln -sf"| sed -n '3p;3q'| awk '{print $4}'| sed 's/nphelix.so//g'`
echo "rm -f $a/nphelix.so" >>real_uninstall
echo "rm -f $a/nphelix.xpt" >>real_uninstall
a=`cat $1| grep "ln -sf"| sed -n '5p;5q'| awk '{print $4}'| sed 's/nphelix.so//g'`
echo "rm -f $a/nphelix.so" >>real_uninstall
echo "rm -f $a/nphelix.xpt" >>real_uninstall
echo rm -f `cat $1| grep "ln -s "|awk '{print $4}'` >>real_uninstall
dirc=`cat $1|grep "files extracted to"|awk '{print $4}'|sed 's/://g'`
echo rm -fr "$dirc" >>real_uninstall
chmod 755 real_uninstall