Unverified Commit ae3e406e authored by David Beniamine's avatar David Beniamine

Merge branch '64-catfish' of...

Merge branch '64-catfish' of gitlab.tetras-libre.fr:primtux-eole/grenoble/primtux-eole into Primtux4
parents 360d62d0 9062928e
#!/bin/bash
if [ -z "$(dpkg -l | grep catfish)" ]
then
export DEBIAN_FRONTEND=noninteractive
apt-get install -y catfish
fi
USERS="prof direction administrateur"
for u in $USERS
do
launcher_path="/home/$u/.config/xfce4/panel/launcher-18/catfish.desktop"
mkdir -p /home/$u/.config/xfce4/panel/launcher-18
cp /usr/share/applications/catfish.desktop $launcher_path
xml_path="/home/$u/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
if [ -z "`grep plugin-18 $xml_path`" ]
then
sed -i.bak \
-e 's@\(\s*\)\(<value type="int" value="2"/>\)@\1<value type="int" value="18"/>\n\1\2@' \
$xml_path
tmp_path="/tmp/$$"
head -n -2 $xml_path > $tmp_path
cat << EOF >> $tmp_path
<property name="plugin-18" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="catfish.desktop"/>
</property>
</property>
</property>
</channel>
EOF
mv /tmp/$$ $xml_path
chown -R $u:$u $xml_path
chown $u:$u $xml_path
fi
done
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