supertuxkart 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #!/bin/sh
  2. # AM INSTALL SCRIPT VERSION 3.
  3. set -u
  4. APP=supertuxkart
  5. SITE="supertuxkart/stk-code"
  6. # CREATE DIRECTORIES AND ADD REMOVER
  7. [ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
  8. printf "#!/bin/sh\nset -e\nrm -f /usr/local/bin/$APP\nrm -R -f /opt/$APP" > ../remove
  9. printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
  10. chmod a+x ../remove || exit 1
  11. # DOWNLOAD AND PREPARE THE APP, $version is also used for updates
  12. version=$(curl -Ls https://api.github.com/repos/supertuxkart/stk-code/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*linux.*tar.xz$" | grep -v "arm\|64" | head -1)
  13. wget "$version" || exit 1
  14. [ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
  15. [ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
  16. [ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
  17. cd ..
  18. if [ -d ./tmp/* 2>/dev/null ]; then mv ./tmp/*/* ./; else mv ./tmp/* ./"$APP" 2>/dev/null || mv ./tmp/* ./; fi
  19. rm -R -f ./tmp || exit 1
  20. echo "$version" > ./version
  21. chmod a+x ./run_game.sh || exit 1
  22. # LINK TO PATH
  23. ln -s "/opt/$APP/run_game.sh" "/usr/local/bin/$APP"
  24. # SCRIPT TO UPDATE THE PROGRAM
  25. cat >> ./AM-updater << 'EOF'
  26. #!/bin/sh
  27. set -u
  28. APP=supertuxkart
  29. SITE="supertuxkart/stk-code"
  30. version0=$(cat "/opt/$APP/version")
  31. version=$(curl -Ls https://api.github.com/repos/supertuxkart/stk-code/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*linux.*tar.xz$" | grep -v "arm\|64" | head -1)
  32. [ -n "$version" ] || { echo "Error getting link"; exit 1; }
  33. if [ "$version" != "$version0" ]; then
  34. mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
  35. notify-send "A new version of $APP is available, please wait"
  36. wget "$version" || exit 1
  37. [ -e ./*7z ] && 7z x ./*7z && rm -f ./*7z
  38. [ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
  39. [ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
  40. cd ..
  41. if [ -d ./tmp/* 2>/dev/null ]; then mv --backup=t ./tmp/*/* ./; else mv --backup=t ./tmp/* ./"$APP" 2>/dev/null || mv --backup=t ./tmp/* ./; fi
  42. chmod a+x ./run_game.sh || exit 1
  43. echo "$version" > ./version
  44. rm -R -f ./tmp ./*~
  45. notify-send "$APP is updated!"
  46. else
  47. echo "Update not needed!"
  48. fi
  49. EOF
  50. chmod a+x ./AM-updater || exit 1
  51. # ICON
  52. mkdir -p icons
  53. cp ./data/*512.png ./icons/"$APP" 2> /dev/null
  54. # LAUNCHER
  55. echo "[Desktop Entry]
  56. Name=SuperTuxKart
  57. Icon=/opt/$APP/icons/$APP
  58. #I18N: Generic name in desktop file entry, summary in AppData and short description in Google Play
  59. GenericName[ar]=لعبة سباق سيارات ثلاثية الأبعاد مفتوحة المصدر
  60. GenericName[be]=3D-гульня для гонак на картах з адкрытым зыходным кодам
  61. GenericName[bg]=3-измерна състезателна игра с колички, с отворен код
  62. GenericName[ca]=Un joc de curses de karts en 3D de codi obert.
  63. GenericName[cs]=3D open source závodní hra motokár
  64. GenericName[da]=Et 3D-kartracerspil i open source
  65. GenericName[de]=Ein Open-Source 3D-Kart-Rennspiel
  66. GenericName[el]=Ενα 3D ανοιχτού κώδικα παιχνίδι αγώνων με κάρτ
  67. GenericName[eo]=3D-a malfermitkoda karta vetkurad-ludo
  68. GenericName[es]=Un juego de carreras de karts en 3D de código abierto.
  69. GenericName[eu]=Kart lasterketetako 3D jolas librea
  70. GenericName[fi]=Avoimen lähdekoodin kolmiulotteinen kilpa-ajopeli
  71. GenericName[fil]=Isang 3D at open-source na kart racing game.
  72. GenericName[fr]=Un jeu libre de course de karts en 3D
  73. GenericName[gd]=Geama rèisidh chartaichean 3D le bun-tùs fosgailte
  74. GenericName[gl]=Un xogo de carreiras de karts en 3D e de código aberto.
  75. GenericName[he]=משחק מֵרוצי מכוניות בתלת־ממד ובקוד פתוח
  76. GenericName[hu]=Egy 3D-s, nyílt forráskódú gokartverseny játék
  77. GenericName[id]=Sebuah permainan balap kart 3D sumber-terbuka
  78. GenericName[it]=Un gioco open-source 3D di corse su kart
  79. GenericName[ja]=オープンソースな3Dレーシングカートゲーム
  80. GenericName[ko]=3D 오픈소스 카트 경주 게임
  81. GenericName[mk]=3D open-source тркачка картинг игра
  82. GenericName[ml]=ഒരു സ്വതന്ത്ര 3D കാർട്ട് റേസിംഗ് ഗെയിം
  83. GenericName[nl]=Een open source 3D kartracespel
  84. GenericName[nn]=Eit racerspel i 3D med open kjeldekode
  85. GenericName[oc]=Un jòc de corsa de kart liure en 3D
  86. GenericName[pl]=Trójwymiarowe wyścigi gokartów open-source
  87. GenericName[pt]=Um jogo 3D de karting com mascotes de aplicativos open source.
  88. GenericName[pt_BR]=Corridas de kart em 3D e código aberto
  89. GenericName[ro]=Un joc de curse 3D open-source
  90. GenericName[ru]=Свободная трёхмерная гоночная игра на машинках
  91. GenericName[rue]=3х-мірна возикова перебігова бавка
  92. GenericName[sk]=3D open-source závodná hra v štýle arkády
  93. GenericName[sl]=3D odprtokodna dirkalna igra
  94. GenericName[sr]=Игра тркања колицима слободног кода
  95. GenericName[sv]=Ett 3D-racingspel med öppen källkod
  96. GenericName[th]=เกมแข่งรถโอเพ่นซอร์ส 3 มิติ
  97. GenericName[tr]=3D açık kaynaklı kart yarış oyunu
  98. GenericName[zh_CN]=一个三维开源赛车游戏
  99. GenericName[zh_HK]=3D 開源卡丁車賽車遊戲
  100. GenericName[zh_TW]=3D 開源卡丁車賽車遊戲
  101. GenericName=A 3D open-source kart racing game
  102. Exec=supertuxkart
  103. Terminal=false
  104. StartupNotify=false
  105. Type=Application
  106. Categories=Game;ArcadeGame;
  107. #I18N: Keywords in desktop entry, translators please keep it separated with semicolons
  108. Keywords[ar]=بطريق؛لعبة؛سباق؛
  109. Keywords[be]=tux;game;race;тукс;такс;гульня;гонка;футбол;
  110. Keywords[bg]=тъкс;кола;коли;количка;колички;състезание;състезания
  111. Keywords[ca]=tux;joc;cursa;
  112. Keywords[cs]=tux;hra;závod;
  113. Keywords[da]=tux;spil;racerløb;
  114. Keywords[de]=tux;spiel;rennen;
  115. Keywords[el]=tux;παιχνίδι;αγώνας;
  116. Keywords[eo]=tukso;ludo;vetkuro;
  117. Keywords[es]=tux;juego;carreras;
  118. Keywords[fi]=tux;game;race;peli;ralli;kilpa-ajo;autopeli;
  119. Keywords[fil]=tux;game;race;
  120. Keywords[fr]=tux;jeu;course;
  121. Keywords[gd]=tux;game;race;geama;rèis;rèiseadh;
  122. Keywords[gl]=tux;xogo;carreira;
  123. Keywords[he]=tux;game;race;טקס;טאקס;טוקס;משחק;מרוץ;מרוצים;מירוץ;מירוצים;
  124. Keywords[hr]=tux;igra;utrka
  125. Keywords[hu]=tux;játék;verseny;
  126. Keywords[id]=tux;permainan;balapan;
  127. Keywords[it]=tux;gioco;gara;
  128. Keywords[ja]=tux;game;race;
  129. Keywords[ko]=턱스;게임;경주
  130. Keywords[mk]=тукс;игра;трка;
  131. Keywords[ml]=ടക്സ്;ഗെയിം;റേസ്;
  132. Keywords[nl]=tux;game;race;spel;kart;super;auto;parcours;
  133. Keywords[nn]=tux;spel;billøp;racerspel;
  134. Keywords[oc]=tux;game;race;corsa;jòc;
  135. Keywords[pl]=tux;gra;wyścigi;
  136. Keywords[pt]=tux;jogo;corrida
  137. Keywords[pt_BR]=tux;jogo;corrida;
  138. Keywords[ro]=tux;joc;cursa
  139. Keywords[ru]=такс;игра;гонка;
  140. Keywords[rue]=tux;бавка;гонитва;
  141. Keywords[sk]=tučniak;hra;závody;
  142. Keywords[sl]=tuks;igra;dirka;
  143. Keywords[sr]=такс;игра;трка;тукс;игрица;
  144. Keywords[sv]=tux;spel;tävla;
  145. Keywords[th]=tux;game;race;
  146. Keywords[tr]=tux;oyun;yarış;
  147. Keywords[tt]=tux;game;race;
  148. Keywords[uk]=пінгвін;гра;перегони;
  149. Keywords[zh_CN]=企鹅、游戏、赛车
  150. Keywords[zh_HK]=tux;game;race;
  151. Keywords[zh_TW]=tux;game;race;
  152. Keywords=tux;game;race;
  153. PrefersNonDefaultGPU=true" > /usr/local/share/applications/"$APP"-AM.desktop