- #!/bin/csh
- @ last = $#
- @ penultimate = ($last - 1)
- set root = $argv[$penultimate]
- set directory = $argv[$last]
- set file_exclude = ''
- set file_edit = ''
- while ($argv[1])
- set option = $argv[1]
- shift
- switch ($option)
- case '--exclude'
- set file_exclude = $argv[1]
- shift
- breaksw
- case '--edit'
- set file_edit = $argv[1]
- shift
- breaksw
- default
- return 0
- endsw
- done
- set files = `ls -a $root/$directory/`
- foreach file ($files)
- if (($file != '.') && ($file != '..')) then
- if (-e $root/$directory/$file) then
- if ($file_exclude) set exclude = `grep "^/$directory/$file$" $file_exclude`
- if ((-f $root/$directory/$file) && !($exclude)) then
- cat $root/$directory/$file >> /$directory/$file
- if ($file_edit) set edit = `grep "^/$directory/$file$" $file_edit`
- if ($edit) then
- $EDITOR /$directory/$file
- endif
- endif
- if ($file_exclude) set exclude = `grep "^/$directory/$file/$" $file_exclude`
- if ((-d $root/$directory/$file/) && !($exclude)) then
- mkdir /$directory/$file/
- $0 --exclude $exclude --edit $edit $root $directory/$file/
- endif
- else
- echo "Error: $file is not a file."
- endif
- endif
- done
- ______________________________________________________________________________________________
- #!/bin/csh
- set root = `dirname $0`
- while (`basename $root` != 'FreeBSD')
- set root = `dirname $root`
- end
- # Setting up the X.Org server – http://www.freebsd.org/doc/en/books/handbook/x-config.html {
- Xorg -configure && cp /root/xorg.conf.new /etc/X11/xorg.conf
- # }
- # Setting up the sound card – http://www.freebsd.org/doc/en/books/handbook/sound-setup.html {
- kldload snd_driver
- cat /dev/sndstat >> /boot/loader.conf
- # }
- # Setting up network interface cards – http://www.freebsd.org/doc/en/books/handbook/config-network-setup.html {
- # Using Microsoft Windows NDIS (Network Driver Interface Specification) {
- # Unfortunately, there are still many vendors that do not provide schematics for their drivers to the open source community because they regard such information as trade secrets. Consequently, the developers of FreeBSD and other operating systems are left two choices: develop the drivers by a long and pain-staking process of reverse engineering or using the existing driver binaries available for the Microsoft® Windows platforms. Most developers, including those involved with FreeBSD, have taken the latter approach.
- # The FreeBSD NDISulator (otherwise known as Project Evil) takes a Windows driver binary and basically tricks it into thinking it is running on Windows.
- # NDISulator requirements:
- # – kernel sources;
- # – Windows XP driver binary (.sys extension);
- # – Windows XP driver configuration file (.inf extension).
- # Locate the files for the specific card. Generally, they can be found on the included CDs (Compact Discs) or at the vendors’ websites.
- # Note: it may have to extract Microsoft cabinet (.cab extension) files.
- # The next step is to compile the driver binary into a loadable kernel module.
- #cd /boot/modules/ && ndisgen /<path_to>/<network_driver>.inf /<path_to>/<network_driver>.sys # \
- ## > <network_kernel_module>.ko
- kldload <network_kernel_module> # load the network kernel module.
- kldload ndis # load the NDIS driver wrapper.
- kldload if_ndis # load the actual network interface.
- # Then, add the following line to /boot/loader.conf: <network_kernel_mudule>_load="YES".
- # }
- # }
- # VirtualBox configuration {
- # /boot/loader.conf # /boot/modules/vboxdrv: VirtualBox kernel module.
- # /etc/rc.conf # /usr/local/etc/rc.d/vboxnet: VirtualBox kernel modules for bridged or host-only networking.
- # pw groupmod vboxusers -m <user_name>[,]… # add all users that need VirtualBox.
- # }
- # Pivot {
- set tmp = "$root/usr/home/beastie/.tmp/"
- csh merge.csh --exclude $tmp/wide_list_exclude --edit $tmp/wide_list_edit $root ./
- # }
- # Using localization – http://www.freebsd.org/doc/en/books/handbook/using-localization.html {
- # Localization settings are based on three main terms: LanguageCode_CountryCode.Encoding.
- #/etc/login.conf \
- # language_name|Account Type Description: \
- # :charset=MIME_charset: \
- # :lang=locale_name: \
- # :tc=default:
- cap_mkdb /etc/login.conf # create capability database.
- # }
- # Make changes {
- vipw # \
- ## > <user_name>:<password>:1001:1001:<language>:0:0:<first_name> <last_name>:/home/user:/[usr/local]/bin/<shell>
- # }
- ____________________________________________________________________________________________
- #!/bin/csh
- set root = `dirname $0`
- while (`basename $root` != 'FreeBSD')
- set root = `dirname $root`
- end
- # Default compiler: Clang/LLVM (Low Level Virtual Machine).
- make CC='clang'
- make CXX='clang++'
- # Global
- # Note: search the other ports with “cd /usr/ports/ && make search display=path key=<key_search>”.
- cd /usr/ports/archivers/cabextract/ && make install clean -DBATCH
- cd /usr/ports/archivers/p7zip/ && make install clean -DBATCH
- cd /usr/ports/archivers/unrar/ && make install clean -DBATCH
- cd /usr/ports/archivers/xarchiver/ && make install clean -DBATCH
- cd /usr/ports/astro/celestia/ && make install clean -DBATCH
- cd /usr/ports/audio/rhythmbox/ && make install clean -DBATCH
- cd /usr/ports/converters/libiconv/ && make install clean -DBATCH
- cd /usr/ports/deskutils/calibre/ && make install clean -DBATCH
- cd /usr/ports/deskutils/fbreader/ && make install clean -DBATCH
- cd /usr/ports/devel/git/ && make install clean -DBATCH # \
- ## > /hand/book/git.viki
- cd /usr/ports/devel/sdl12/ && make install clean -DBATCH
- cd /usr/ports/editors/kile/ && make install clean -DBATCH
- cd /usr/ports/editors/libreoffice/ && make install clean -DBATCH
- cd /usr/ports/editors/vim/ && make install clean -DBATCH
- cd /usr/ports/emulators/dolphin-emu-devel/ && make install clean -DBATCH # Gamecube (project Dolphin: 2001-09-14) and Wii (2006-11-19) emulator – Dolphin.
- cd /usr/ports/emulators/fceux/ && make install clean -DBATCH # Nintendo Entertainment System (1983-07-15) emulator – FCEUX (Family Computer Emulator Ultra X).
- cd /usr/ports/emulators/mupen64/ && make install clean -DBATCH # Nintendo Entertainment System 64 (project Reality: 1996-06-23) emulator – Mupen64 (Multi-Platform Emulator for the Nintendo Entertainment System 64).
- cd /usr/ports/emulators/virtualbox-ose/ && make install clean -DBATCH # VirtualBox OSE (Open Source Edition).
- cd /usr/ports/emulators/wine/ && make install clean -DBATCH # Wine (Wine Is Not an Emulator), Microsoft Windows compatibility layer for UNIX-like systems.
- cd /usr/ports/emulators/zsnes/ && make install clean -DBATCH # Super Nintendo Entertainment System (1990-11-21) emulator – ZSNES (Z Super Nintendo Entertainment System). Note: Z letter may refer to zsKnight – and _Demo_, the authors.
- cd /usr/ports/ftp/filezilla/ && make install clean -DBTACH
- cd /usr/ports/ftp/wget/ && make install clean -DBATCH
- cd /usr/ports/games/py-pychess/ && make install clean -DBATCH # \
- ## > http://www.freechess.org/
- cd /usr/ports/graphics/blender/ && make install clean -DBATCH
- cd /usr/ports/graphics/dia/ && make install clean -DBATCH && \
- sed -i '' -e "s/dia \%F/dia --integrated \%F/" /usr/local/share/applications/dia.desktop
- cd /usr/ports/graphics/feh/ && make install clean -DBATCH
- cd /usr/ports/graphics/gimp/ && make install clean -DBATCH
- cd /usr/ports/graphics/ImageMagick/ && make install clean -DBATCH
- cd /usr/ports/graphics/xpdf/ && make install clean -DBATCH
- cd /usr/ports/graphics/zathura/ && make install clean -DBATCH
- cd /usr/ports/irc/xchat/ && make install clean -DBATCH
- cd /usr/ports/lang/clisp/ && make install clean -DBATCH # Common Lisp (list processing) is an impure functional language Lisp family – ANSI (American National Standards Institute) implementation (actually, it is not an implementation but rather a language specification, that Lisp implementations try to comply).
- cd /usr/ports/lang/perl5.14/ && make install clean -DBATCH
- cd /usr/ports/lang/python32/ && make install clean -DBATCH
- cd /usr/ports/lang/ruby19/ && make install clean -DBATCH
- cd /usr/ports/lang/squeak/ && make install clean -DBTACH # Smalltalk-80 implementation.
- cd /usr/ports/lang/swi-pl/ && make install clean -DBATCH # SWI-Prolog is derived from Sociaal-Wetenschappelijke Informatica (Social Science Informatics), the former name of the group at the University of Amsterdam). Note: the name of this group has changed to HCS (Human-Computer Studies).
- cd /usr/ports/mail/fetchmail/ && make install clean -DBATCH
- cd /usr/ports/mail/mutt-devel/ && make install clean \ # development version: the use of port (/usr/ports/mail/mutt/) does not enable to add some bundles.
- WITH_MUTT_CYRUS_SASL2=yes \ # enable SASL2 (Simple Authentication and Security Layer) support – SMTP (Simple Mail Transfer Protocol) authentication requires SASL.
- WITH_MUTT_SIDEBAR_PATCH=yes \ # enable sidebar.
- WITH_MUTT_SMTP=yes \ # enable SMTP (Simple Mail Transfer Protocol) relay support.
- BATCH=yes
- cd /usr/ports/mail/mutt/ && make install clean -DBATCH
- cd /usr/ports/mail/p5-Mail-SpamAssassin/ && make install clean -DBATCH
- cd /usr/ports/mail/procmail/ && make install clean -DBATCH
- cd /usr/ports/mail/sendmail/ && make install clean -DBATCH
- cd /usr/ports/multimedia/vlc/ && make install clean -DBATCH
- cd /usr/ports/net-im/psi/ && make install clean -DBATCH
- cd /usr/ports/net-mgmt/aircrack-ng/ && make install clean -DBATCH
- cd /usr/ports/net-p2p/transmission/ && make install clean -DBATCH
- cd /usr/ports/net/rsync/ && make install clean -DBATCH # remote synchronization.
- cd /usr/ports/ports-mgmt/pkg/ && make install clean -DBATCH
- cd /usr/ports/ports-mgmt/portmaster/ && make install clean \ # use “portmaster [<category>/<port>] [<flag>…]”.
- WITH_ZSH=yes \
- BATCH=yes
- cd /usr/ports/ports-mgmt/portshaker/ && make install clean -DBATCH
- cd /usr/ports/ports-mgmt/portshaker-config/ && make install clean \
- WITH_TEXLIVE=yes \
- BATCH=yes
- cd /usr/ports/print/cups/ && make install clean -DBATCH # Common UNIX Printing System \
- ## > /boot/loader.conf # load lpt, ulpt, unlpt.
- ## > /etc/rc.conf # enable cupsd and set localrules.
- ## > /etc/devfs.rules # CUPS group local rules: give a path to required devices.
- ## > cd /dev/ && ls lpt* ulpt* unlpt*
- ## > http://localhost:631/
- ### > Add Printer:
- #### > set a name for the printer;
- #### > provide a PPD file – look in /usr/local/share/ppd/;
- ##### > Note: PPD (PostScript Printer Description) files are created by vendors to describe the entire set of features and capabilities available for their PostScript printers.
- ## > lpstat -p # display printers.
- ## > lpstat -d <printer_name> # default destination.
- ## > /usr/local/bin/lpr # LPR (Line Printer Remote) works with CUPS instead of LPD (Line Printer DAEMON).
- cd /usr/ports/print/ghostscript9/ && make install clean -DBATCH
- cd /usr/ports/print/ghostview/ && make install clean -DBATCH
- cd /usr/ports/print/texlive/ && make install clean -DBATCH
- cd /usr/ports/print/xdvi/ && make install clean -DBATCH
- cd /usr/ports/security/sudo/ && make install clean -DBATCH # \
- ## > uncomment '#' . '%wheel ALL=(ALL) ALL' /usr/local/etc/sudoers
- cd /usr/ports/security/tor/ && make install clean -DBATCH # Tor (The Onion Router).
- cd /usr/ports/shells/zsh/ && make install clean -DBATCH # \
- ## > pw usermod <user_name> -s /usr/local/bin/zsh
- cd /usr/ports/sysutils/conky/ && make install clean \
- WITH_XFT=yes \
- BATCH=yes
- cd /usr/ports/sysutils/tmux/ && make install clean -DBATCH
- cd /usr/ports/sysutils/tracker/ && make install clean \
- WITH_GNOME=yes \
- BATCH=yes
- cd /usr/ports/textproc/stardict3/ && make install clean -DBATCH # \
- ## Note: push dictionaries to /usr/local/share/stardict/dic/; a comprehensive list of dictionaries is maintained by Polyglotte and available from http://polyglotte.tuxfamily.org/doku.php?id=donnees:dicos_bilingues.
- ## > XDXF (XML Dictionary Exchange Format): http://xdxf.sourceforge.net/.
- ### > english to french: http://sourceforge.net/projects/xdxf/files/dicts-stardict-form-xdxf/001/stardict-comn_sdict_axm03_English_French-2.4.2.tar.bz2/download.
- ### > french to english: http://sourceforge.net/projects/xdxf/files/dicts-stardict-form-xdxf/001/stardict-comn_sdict_axm03_French_English-2.4.2.tar.bz2/download.
- cd /usr/ports/www/chromium/ && make install clean -DBATCH # \
- ## > AdBlock Plus
- ## > DuckDuckGo Zero-click Info
- ## > Google Dictionary (by Google)
- ## > Search by Image (by Google)
- ## > Vrome
- cd /usr/ports/www/links/ && make install clean -DBATCH
- cd /usr/ports/x11-fm/pcmanfm/ && make install clean -DBATCH # \
- ## > build automation: /usr/local/share/applications/mimeinfo.cache.
- ## > build hand: $HOME/.local/share/applications/mimeapps.list.
- cd /usr/ports/x11-fonts/freefonts/ && make install clean -DBATCH
- cd /usr/ports/x11-fonts/liberation-fonts-ttf/ && make install clean -DBATCH
- cd /usr/ports/x11-fonts/urwfonts/ && make install clean -DBATCH
- cd /usr/ports/x11-fonts/webfonts/ && make install clean -DBATCH
- cd /usr/ports/x11-themes/openbox-themes/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/devilspie/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/obconf/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/obmenu/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/obpager/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/openbox/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/transset-df/ && make install clean -DBATCH
- cd /usr/ports/x11-wm/xcompmgr/ && make install clean -DBATCH
- cd /usr/ports/x11/gnome2/ && make install clean -DBATCH
- cd /usr/ports/x11/slim/ && make install clean -DBATCH
- cd /usr/ports/x11/tint/ && make install clean -DBATCH
- cd /usr/ports/x11/wmctrl/ && make install clean -DBATCH
- cd /usr/ports/x11/xdialog/ && make install clean -DBATCH
- cd /usr/ports/x11/xorg/ && make install clean -DBATCH
- cd /usr/ports/x11/xterm/ && make deinstall clean && make install clean \ # fix a side effect: x11/xorg/, x11/xorg-apps/, x11/xterm/. Note: it is a way to crap; fortunately, you can can place “cd /usr/ports/x11/xterm/ && make config” in first, but this script is not intended to be interactive.
- WITH_256_COLOR=yes \
- BATCH=yes
- cd /usr/ports/x11/zenity/ && make install clean -DBATCH
- # Restricted
- # Note: redistribution not allowed.
- ## Adobe Flash Player
- kldload linux
- # GNU/Linux mode (Fedora 10)
- cd /usr/ports/emulators/linux_base-f10/ && make install clean -DBATCH
- # Adobe Flash Player ported on GNU/Linux (Fedora 10).
- # Note: the use of port will install binaries (object files) without accompanying source.
- # Adobe Flash Player NPAPI plug-in.
- cd /usr/ports/www/linux-f10-flashplugin11/ && make install clean -DBATCH \
- && mkdir /usr/local/lib/browser_plugins/ ; ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so /usr/local/lib/browser_plugins/libflashplayerplugin.so
- # NSPluginWrapper: a compatibility plug-in for Mozilla NPAPI (Netscape Plugin Application Programming Interface) plug-ins.
- cd /usr/ports/www/nspluginwrapper/ && make install clean -DBATCH \
- && nspluginwrapper --verbose --auto --install
- # Note: emulate GNU/Linux process file system is required for the complete operation of some GNU/Linux binaries.
- mount -t linprocfs linproc /compat/linux/proc/
- echo 'linproc /compat/linux/proc linprocfs rw 0 0' >> /etc/fstab
- ## Java
- # Note: OpenJDK requires FreeBSD Foundation license and Oracle license:
- # FreeBSD Foundation license:
- ## > Caffe Diablo (i386): http://www.freebsdfoundation.org/cgi-bin/download?download=oem/diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2
- ## > Caffe Diablo (amd64): http://www.freebsdfoundation.org/cgi-bin/download?download=oem/diablo-caffe-freebsd7-amd64-1.6.0_07-b02.tar.bz2
- mkdir /usr/ports/distfiles/ ; cp $root/FreeBSD/usr/ports/distfiles/diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2 /usr/ports/distfiles/
- # Oracle license
- ## > JDK DST Timezone Update Tool: http://www.oracle.com/technetwork/java/javase/downloads/.
- mkdir /usr/ports/distfiles/ ; cp $root/FreeBSD/usr/ports/distfiles/tzupdater-1_3_45-2011n.zip /usr/ports/distfiles/
- cd /usr/ports/java/openjdk7/ && make install clean -DBATCH
- # IcedTea-Web: a free Java plug-in and Java Web Start for OpenJDK.
- cd /usr/ports/java/icedtea-web/ && make install clean -DBATCH \
- && mkdir /usr/local/lib/browser_plugins/ ; ln -s /usr/local/lib/IcedTeaPlugin.so /usr/local/lib/browser_plugins/libjavaplugin.so
- # Note: FreeBSD process file system is required for the complete operation of some FreeBSD binaries.
- mount -t procfs proc /proc/
- echo 'proc /proc procfs rw 0 0' >> /etc/fstab
- # Unofficial ports
- portshaker
- ## TeX Live
- cd /usr/ports/print/texlive-scheme-full/ && make install clean -DBATCH