woof_gui 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/sh
  2. #(c) Copyright Barry Kauler 2009
  3. #This is a GUI frontend for Woof.
  4. #121102 file DISTRO_SPECS has new variable DISTRO_DB_SUBNAME. ex: for 14.0-based slacko, DISTRO_DB_SUBNAME=slacko14
  5. #130306 fix arch linux build.
  6. export LANG=C
  7. #Specifications
  8. [ ! -f DISTRO_SPECS ] && exit
  9. . ./DISTRO_SPECS
  10. [ ! "$DISTRO_DB_SUBNAME" ] && DISTRO_DB_SUBNAME="$DISTRO_COMPAT_VERSION" #121102 fallback if DISTRO_DB_SUBNAME not defined in file DISTRO_SPECS.
  11. . ./support/HISTORY_DISTRO_SPECS
  12. . ./DISTRO_PET_REPOS
  13. if [ -f DISTRO_PKGS_SPECS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION} ];then #130306
  14. . ./DISTRO_PKGS_SPECS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}
  15. DPSFILE="DISTRO_PKGS_SPECS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}"
  16. else
  17. . ./DISTRO_PKGS_SPECS-${DISTRO_BINARY_COMPAT}
  18. DPSFILE="DISTRO_PKGS_SPECS-${DISTRO_BINARY_COMPAT}"
  19. fi
  20. if [ -f ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION} ];then
  21. . ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}
  22. else
  23. . ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT} #130306
  24. fi
  25. rm -f /tmp/CHOSEN_PET_PKGS #see 'Choose pkgs' tab.
  26. rm -f /tmp/CHOSEN_COMPAT_PKGS # "
  27. DEFAULTTABNUM="0"
  28. while [ 1 ]
  29. do
  30. ./woof_gui_tabs $DEFAULTTABNUM > /tmp/woof_gui_tabs
  31. . /tmp/woof_gui_tabs
  32. if [ "$EXIT" = "UPDATE_DS" ];then #'Specifications' tab.
  33. . ./DISTRO_SPECS
  34. rm -f /tmp/CHOSEN_PET_PKGS #see 'Choose pkgs' tab.
  35. rm -f /tmp/CHOSEN_COMPAT_PKGS # "
  36. DEFAULTTABNUM="0"
  37. continue
  38. fi
  39. if [ "$EXIT" = "UPDATE_PR" ];then #'PET repos' tab.
  40. . ./DISTRO_PET_REPOS
  41. DEFAULTTABNUM="1"
  42. continue
  43. fi
  44. if [ "$EXIT" = "UPDATE_CR" ];then #'Compat repos' tab.
  45. if [ -f ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION} ];then #130306
  46. . ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION}
  47. else
  48. . ./DISTRO_COMPAT_REPOS-${DISTRO_BINARY_COMPAT} #130306
  49. fi
  50. DEFAULTTABNUM="2"
  51. continue
  52. fi
  53. if [ "$EXIT" = "UPDATE_DB" ];then #'Download dbs' tab.
  54. rxvt -bg yellow -title "Update databases" -e ./0setup
  55. DEFAULTTABNUM="3"
  56. continue
  57. fi
  58. if [ "$EXIT" = "UPDATE_DP" ];then #see 'Download pkgs' tab.
  59. DEFAULTTABNUM="5"
  60. continue
  61. fi
  62. break
  63. done