Bienvenido! Aquí usted puede subir sus pastes (códigos) para posteriormente compartirlos, inclusive puede protegerlos con password. Siéntase libre de explorar :)

Subido por vista fonts el May Mon 25th 10:56 PM - Nunca expira
Ver siguiente de Anonymous | Descargar | Nuevo Paste

  1. #!/bin/sh
  2. # Copyright (c) 2007 Aristotle Pagaltzis
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a copy
  5. # of this software and associated documentation files (the "Software"), to
  6. # deal in the Software without restriction, including without limitation the
  7. # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. # sell copies of the Software, and to permit persons to whom the Software is
  9. # furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included in
  12. # all copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. # IN THE SOFTWARE.
  21.  
  22. set -e
  23.  
  24. exists() { which "$1" &> /dev/null ; }
  25.  
  26. if ! [ -d ~/.fonts ] ; then
  27.         exec 2>&1
  28.         echo 'There is no .fonts directory in your home.'
  29.         echo 'Is fontconfig set up for privately installed fonts?'
  30.         exit 1
  31. fi
  32.  
  33. # split up to keep the download command short
  34. DL_HOST=download.microsoft.com
  35. DL_PATH=download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26
  36. ARCHIVE=PowerPointViewer.exe
  37. URL="http://$DL_HOST/$DL_PATH/$ARCHIVE"
  38.  
  39. if ! [ -e "$ARCHIVE" ] ; then
  40.         if   exists curl  ; then curl -O "$URL"
  41.         elif exists wget  ; then wget    "$URL"
  42.         elif exists fetch ; then fetch   "$URL"
  43.         fi
  44. fi
  45.  
  46. TMPDIR=`mktemp -d`
  47. trap 'rm -rf "$TMPDIR"' EXIT INT QUIT TERM
  48.  
  49. cabextract -L -F ppviewer.cab -d "$TMPDIR" "$ARCHIVE"
  50.  
  51. cabextract -L -F '*.TT[FC]' -d ~/.fonts "$TMPDIR/ppviewer.cab"
  52.  
  53. ( cd ~/.fonts && mv cambria.ttc cambria.ttf && chmod 600 \
  54.         calibri{,b,i,z}.ttf cambria{,b,i,z}.ttf candara{,b,i,z}.ttf \
  55.         consola{,b,i,z}.ttf constan{,b,i,z}.ttf corbel{,b,i,z}.ttf )
  56.  
  57. fc-cache -fv ~/.fonts
Lenguaje:
Para seńalar algunas líneas en particular, al inicio de cada línea pon: @@





© 2017 - Powered by PASTE 1.0. Traducido al ESP y modificado por DesdeLinux.net