Verified Commit 1dda0d61 authored by Martin Vician's avatar Martin Vician
Browse files

pridan odkaz na plochu

parent a34ffbd3
......@@ -108,6 +108,44 @@ if [ $aliases_source_ok -ne 1 ]; then
fi
fi
if [ $programs_ok -eq 1 ] && [ $aliases_ok -eq 1 ]; then
desktop_ok=0
desktop_dir="$HOME/Plocha"
if [ -d "$HOME/Desktop" ]; then
desktop_dir="$HOME/Desktop"
fi
desktop_name="uvod-do-linuxu.desktop"
desktop_cv="$desktop_dir/$desktop_name"
if [ ! -f $desktop_cv ]; then
echo "Chybí vám odkaz na ploše!"
if [ $install -eq 1 ]; then
echo -n "Vytvářím..."
cp $base_dir/$desktop_name $desktop_cv
if [ $? -eq 0 ]; then
echo "OK"
else
echo "FAILED!"
fi
fi
fi
if [ -f $desktop_cv ]; then
grep USERNAME $desktop_cv 1>/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
echo "Odkaz na ploše pro první cvičení nemá správnou cestu."
if [ $install -eq 1 ]; then
echo -n "Opravuji..."
sed -i "s/USERNAME/$USER/g" $desktop_cv
if [ $? -eq 0 ]; then
echo "OK"
else
echo "FAILED!"
fi
fi
else
echo "Odkaz na ploše existuje a je správný."
fi
fi
if [ $programs_ok -eq 1 ] && [ $aliases_ok -eq 1 ] && [ $desktop_ok -eq 1 ]; then
figlet -f big OK
fi
......@@ -5,4 +5,4 @@ Exec=gnome-terminal
Terminal=false
Type=Application
Categories=Utility;Application;
Path=/home/student/uvod-do-linuxu
Path=/home/USERNAME/uvod-do-linuxu
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment