Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed SuperRepo for Kodi compliance #19

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions content-tpl/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,6 @@ xbianGroups(){
usermod -a -G audio,video,input xbian
}

superRepo(){
KODI="$(dpkg-query -W --showformat='${Package} %%${Origin}%% %%${Status}%% %%${Description}%%\n' | grep -i '%%XBian%%' | grep '%%XBMC (' | grep -w '%%install ok installed%%' | cut -f 7 -d ' ' | tr -d '()' | cut -f 2 -d '/')"
[ -z "$KODI" ] && KODI="jarvis"
for SOURCESXML in $(find /home/xbian -name sources.xml); do
if [ $(grep "<name>SuperRepo.org Virtual Disk</name>" $SOURCESXML | wc -l) -eq 0 ]; then
sed -i --follow-symlinks "s|<files>|<files>\n\t<default pathversion=\"1\"></default>\n\t<source>\n\t\t<name>SuperRepo.org Virtual Disk</name>\n\t\t<path pathversion=\"1\">http://srp.nu/${KODI}/</path>\n\t</source>|g" $SOURCESXML
if [ $(grep "<name>SuperRepo.org Virtual Disk</name>" $SOURCESXML | wc -l) -eq 1 ]; then
echo "Success: changed Fusion to SuperRepo in $SOURCESXML" >> /home/xbian/xbian-update.log;
else
echo "Error: failed to change Fusion to SuperRepo $SOURCESXML" >> /home/xbian/xbian-update.log;
fi
else
echo "Notice: Updating SuperRepo URL in $SOURCESXML" >> /home/xbian/xbian-update.log;
sed -i -r "s|http://(use\|mirrors).superrepo.org/.*</path>|http://srp.nu/${KODI}/</path>|g" $SOURCESXML
sed -i "s|http://srp.nu/.*</path>|http://srp.nu/${KODI}/</path>|g" $SOURCESXML
fi
done
}

adaptAdvancedSettings(){
if [ "$(stat --printf="%s" /home/xbian/.xbmc/userdata/advancedsettings.xml)" -eq 0 ]; then
cat << \EOF > /home/xbian/.xbmc/userdata/advancedsettings.xml
Expand Down Expand Up @@ -274,8 +255,8 @@ version1011() {

echo "7) Adding SuperRepo"

superRepo
: # SuperRepo removed for Kodi compliancy

echo "8) Modifying avahi-deamon defaults"

if [ $(grep "AVAHI_DAEMON_DETECT_LOCAL=1" /etc/default/avahi-daemon| wc -l) -eq 1 ]; then
Expand Down Expand Up @@ -882,7 +863,7 @@ if [ $1 == "configure" ]; then

rmlibshairport

superRepo
: # SuperRepo removed for Kodi compliancy

if [ -e /dev/rtc0 ]; then
grep -q "UTC" /etc/default/rcS || echo -e "\nUTC=yes\n" >> /etc/default/rcS
Expand Down