post_install() {
echo All new users will have this extension installed and available, but never enabled automatically
export IFS=$(echo -en \\n\\b)
for f in `ls -d /home/*/.local/share/orca`;do
export installowner=`ls -lnd $f|cut -f 3 -d \  `
export installgroup=`ls -lnd $f|cut -f 4 -d \  `
export setperms=0
if [ -e $f/extensions ];then
echo user with uid $installowner and group $installgroup already has an extension directory
else
echo user with uid $installowner and group $installgroup does not have an extension directory, creating
mkdir -p $f/extensions
export setperms=1
fi
if [ -e $f/extensions/remote ];then
echo remote already installed for user $installowner", to upgrade, run: cp -rf /etc/skel/.local/share/orca/extentions/remote " $f/extensions
else
echo copying remote extension directory to user $installowner
cp -rf /etc/skel/.local/share/orca/extensions/remote $f/extensions
export setperms=1
fi
if echo $setperms|grep -iqw 1;then
echo setting permissions
chown -R $installowner":"$installgroup $f/extensions
fi
export setperms=0
done
}
post_upgrade() {
post_install $@
}
