├── .gitignore ├── .gitmodules ├── INI ├── bootstrap.ini ├── container_maintenance.ini ├── maintenance.ini └── plat_manager.ini ├── LICENSE.md ├── PLAT-1.0.0-BETA.tar.gz ├── README.md ├── _config.yml ├── base_files ├── apt │ ├── apt_cycle.sh │ └── base.list └── bash_aliases ├── bin ├── bootstrap.sh ├── create_nginx_proxymgr.sh ├── install-docker-ce.sh ├── maintenance.sh ├── post_install_proxmox.sh └── prepare_for_reinstall.sh ├── code_of_conduct.md ├── docs ├── Flowcharts │ ├── PostInstall.pdf │ └── container builder.pdf ├── MCSW.txt ├── bash-redirections-cheat-sheet.pdf ├── bootstrap.md ├── collapsing functions.txt ├── notes.txt ├── output redirection.txt ├── plat(mail part).bash.txt └── research │ ├── Dropbox-Uploader-master.zip │ ├── bash-backup-master.zip │ ├── bash-one-liners-master.zip │ ├── bash-oo-framework dynamic module loading.zip │ ├── bash-oo-framework-2.0.tar.gz │ ├── bash-oo-framework-master.zip │ ├── basher-master package manager.zip │ ├── bootstrap.zip │ ├── bpkg-0.3.0.tar.gz │ ├── docopts-develop.zip │ ├── docopts-master.zip │ ├── github-master.zip │ ├── is.sh-master.zip │ ├── oo.bash │ ├── shoop │ ├── CVSROOT │ │ ├── .#checkoutlist │ │ ├── .#commitinfo │ │ ├── .#config │ │ ├── .#cvs-identity │ │ ├── .#cvswrappers │ │ ├── .#debugcvs │ │ ├── .#editinfo │ │ ├── .#loginfo │ │ ├── .#modules │ │ ├── .#newlog.pl │ │ ├── .#notify │ │ ├── .#rcsinfo │ │ ├── .#taginfo │ │ ├── .#verifymsg │ │ ├── checkoutlist │ │ ├── checkoutlist,v │ │ ├── commitinfo │ │ ├── commitinfo,v │ │ ├── config │ │ ├── config,v │ │ ├── cvs-identity │ │ ├── cvs-identity,v │ │ ├── cvswrappers │ │ ├── cvswrappers,v │ │ ├── debugcvs │ │ ├── debugcvs,v │ │ ├── editinfo │ │ ├── editinfo,v │ │ ├── history │ │ ├── loginfo │ │ ├── loginfo,v │ │ ├── modules │ │ ├── modules,v │ │ ├── newlog.pl │ │ ├── newlog.pl,v │ │ ├── notify │ │ ├── notify,v │ │ ├── passwd │ │ ├── rcsinfo │ │ ├── rcsinfo,v │ │ ├── readers │ │ ├── taginfo │ │ ├── taginfo,v │ │ ├── val-tags │ │ ├── verifymsg │ │ ├── verifymsg,v │ │ └── writers │ ├── shoop │ │ ├── .cvsignore,v │ │ ├── Attic │ │ │ ├── BAR.shobj,v │ │ │ ├── FOO.shobj,v │ │ │ ├── oosh.sh,v │ │ │ └── shoop.example.sh,v │ │ ├── COPYING,v │ │ ├── Makefile,v │ │ ├── Makefile.rules,v │ │ ├── Makefile.vars,v │ │ ├── TODO,v │ │ ├── debian │ │ │ ├── .cvsignore,v │ │ │ ├── Attic │ │ │ │ └── shoop.docs,v │ │ │ ├── changelog,v │ │ │ ├── control,v │ │ │ ├── copyright,v │ │ │ ├── rules,v │ │ │ ├── shoop-dev.dirs,v │ │ │ ├── shoop-dev.docs,v │ │ │ ├── shoop-dev.examples,v │ │ │ └── shoop-modules.dirs,v │ │ ├── docs │ │ │ ├── .cvsignore,v │ │ │ ├── AUTHORS,v │ │ │ ├── CONTRIBUTING,v │ │ │ ├── MODULES,v │ │ │ ├── Makefile,v │ │ │ ├── README,v │ │ │ └── shoop.txt,v │ │ ├── example.sh,v │ │ ├── modules │ │ │ ├── Makefile,v │ │ │ ├── TODO,v │ │ │ ├── alist.sh,v │ │ │ ├── also_inherit.sh,v │ │ │ ├── apt.sh,v │ │ │ ├── destroy.sh,v │ │ │ ├── dns.sh,v │ │ │ ├── final.sh,v │ │ │ ├── introspect.sh,v │ │ │ ├── list.sh,v │ │ │ ├── onexit.sh,v │ │ │ ├── prettyprint.sh,v │ │ │ ├── ref.sh,v │ │ │ ├── rules_debian.sh,v │ │ │ ├── serialize.sh,v │ │ │ ├── shoop.sh,v │ │ │ ├── shoop_command.sh,v │ │ │ ├── signals.sh,v │ │ │ ├── stack.sh,v │ │ │ ├── stringutil.sh,v │ │ │ ├── thread.sh,v │ │ │ ├── use.sh,v │ │ │ └── www.sh,v │ │ ├── shoop.sh,v │ │ ├── shoop2.sh,v │ │ ├── t │ │ │ ├── Attic │ │ │ │ └── testlib.sh,v │ │ │ ├── alist.sh,v │ │ │ ├── benchmark,v │ │ │ ├── benchmark.bm,v │ │ │ ├── ifs.sh,v │ │ │ ├── inheritance.sh,v │ │ │ ├── list.sh,v │ │ │ ├── metachars.sh,v │ │ │ ├── onexit.sh,v │ │ │ ├── ref.sh,v │ │ │ ├── regress,v │ │ │ ├── serialize.sh,v │ │ │ ├── shoop2.sh,v │ │ │ ├── shoop_command.sh,v │ │ │ ├── stack.sh,v │ │ │ ├── stringutil.sh,v │ │ │ └── super.sh,v │ │ ├── utils │ │ │ ├── mkChangeLog,v │ │ │ ├── shell-stripper,v │ │ │ └── shelldoc,v │ │ └── www │ │ │ ├── index.php,v │ │ │ └── update,v │ └── shwwwoop │ │ ├── AUTHORS,v │ │ ├── COPYING,v │ │ ├── Makefile,v │ │ ├── Makefile.top,v │ │ ├── NEWS,v │ │ ├── README,v │ │ ├── Rules.mk.in,v │ │ ├── THANKS,v │ │ ├── TODO,v │ │ ├── configure,v │ │ ├── src │ │ ├── Makefile,v │ │ ├── kernel │ │ │ ├── Makefile,v │ │ │ ├── base_config.in,v │ │ │ ├── environment,v │ │ │ ├── host_config.in,v │ │ │ ├── http_response,v │ │ │ ├── request,v │ │ │ ├── shwwwoop,v │ │ │ └── utils,v │ │ ├── shwwwoop.sh.in,v │ │ └── test.sh,v │ │ └── utils │ │ ├── COMMITTERS,v │ │ ├── Makefile,v │ │ └── mkChangeLog,v │ ├── term-0.0.1.tar.gz │ ├── windscribe.bash │ ├── yosh-master.zip │ └── yosh-starter-kit-master.zip ├── lib ├── bootstrap-functions.inc.bash ├── plat_manager-functions.inc.bash └── subheader.sh └── templates ├── basic script.sh ├── basic_interfaces.txt ├── lxchost_interfaces.txt ├── maintenance-backup2tape.sh ├── maintenance-body-basic.sh ├── maintenance-body-lxchost0.sh ├── maintenance-body-lxchost1.sh ├── maintenance-subheader1.sh ├── maintenance-subheader2.sh └── pbfl-____.inc.bash /.gitignore: -------------------------------------------------------------------------------- 1 | *secret\.json 2 | 3 | .idea/** 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "PLAT_WordPressTools"] 2 | path = PLAT_WordPressTools 3 | url = https://github.com/pegasusict/PLAT_WordPressTools.git 4 | [submodule "PBFL"] 5 | path = PBFL 6 | url = https://github.com/pegasusict/PBFL.git 7 | [submodule "PLAT_Container_ToolSet"] 8 | path = PLAT_Container_ToolSet 9 | url = https://github.com/pegasusict/PLAT_Container_ToolSet 10 | [submodule "PLAT_AptCacher"] 11 | path = PLAT_AptCacher 12 | url = https://github.com/pegasusict/PLAT_AptCacher 13 | [submodule "PLAT_Internet_WatchDog"] 14 | path = PLAT_Internet_WatchDog 15 | url = https://github.com/pegasusict/PLAT_Internet_WatchDog -------------------------------------------------------------------------------- /INI/container_maintenance.ini: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Pegasus' Linux Administration Tools # Container Maintenance default config # 3 | # (C)2017-2018 Mattijs Snepvangers # pegasus.ict@gmail.com # 4 | # License: MIT # Please keep my name in the credits # 5 | ################################################################################ 6 | # ver 0.0.5 7 | # updated: 20180710 8 | 9 | [MAIN] 10 | ### GENERAL SETTINGS ########################################################### 11 | # Verbosity: 1=CRITICAL 2=ERROR 3=WARNING 4=VERBOSE 5=DEBUG 12 | VERBOSITY=4 13 | -------------------------------------------------------------------------------- /INI/maintenance.ini: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Pegasus' Linux Administration Tools # Maintenance script default config # 3 | # (C)2017-2018 Mattijs Snepvangers # pegasus.ict@gmail.com # 4 | # License: MIT # Please keep my name in the credits # 5 | ################################################################################ 6 | # ver 0.0.5 7 | # updated: 20180710 8 | 9 | [MAIN] 10 | ### GENERAL SETTINGS ########################################################### 11 | # Verbosity: 1=CRITICAL 2=ERROR 3=WARNING 4=VERBOSE 5=DEBUG 12 | VERBOSITY=4 13 | -------------------------------------------------------------------------------- /INI/plat_manager.ini: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Pegasus' Linux Administration Tools # PLAT Manager default config # 3 | # (C)2017-2018 Mattijs Snepvangers # pegasus.ict@gmail.com # 4 | # License: MIT # Please keep my name in the credits # 5 | ################################################################################ 6 | # ver 0.0.5 7 | # last update: 20180710 8 | 9 | [MAIN] 10 | ### GENERAL SETTINGS ########################################################### 11 | # Verbosity: 1=CRITICAL 2=ERROR 3=WARNING 4=VERBOSE 5=DEBUG 12 | VERBOSITY=3 13 | ################################################################################ 14 | 15 | [SYSTEM_ROLE] 16 | ################################################################################ 17 | BASIC=false 18 | WS=false 19 | ZEUS=false 20 | SERVER=false 21 | LXCHOST=false 22 | BACKUPSERVER=false 23 | CONTAINER=false 24 | NAS=false 25 | PXE=false 26 | ROUTER=false 27 | WEB=false 28 | X11=false 29 | ################################################################################ 30 | 31 | [PACKAGES] 32 | ### PACKAGES ################################################################### 33 | BASIC="mc trash-cli snapd git screen" 34 | WS="synaptic tilda audacious samba wine-stable playonlinux winetricks" 35 | ZEUS="picard audacity calibre fastboot adb fslint proftpd gadmin-proftpd geany* gprename lame masscan forensics-all forensics-extra forensics-extra-gui forensics-full chromium-browser gparted" 36 | SERVER="openssh-server webmin" 37 | LXCHOST="lxc lxcfs lxd lxd-tools bridge-utils xfsutils-linux" 38 | BACKUPSERVER="apt-cacher-ng" 39 | CONTAINER="" 40 | NAS="samba nfsd proftpd" 41 | PXE="atftpd" 42 | ROUTER="bridge-utils ufw" 43 | WEB="apache2 phpmyadmin mysql-server mytop proftpd" 44 | X11="" 45 | ################################################################################ 46 | 47 | [GARBAGE] 48 | ################################################################################ 49 | TMP_AGE=2 50 | GARBAGE_AGE=7 51 | LOG_AGE=30 52 | ################################################################################ 53 | 54 | ### RESERVED FOR FUTURE USE #################################################### 55 | [MAIL] 56 | ### MAIL SETTINGS ############################################################## 57 | #EMAIL_SENDER="" 58 | #EMAIL_RECIPIENT="" 59 | #EMAIL_PASSWORD="" 60 | ################################################################################ 61 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mattijs Snepvangers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PLAT-1.0.0-BETA.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/PLAT-1.0.0-BETA.tar.gz -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /base_files/apt/apt_cycle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Pegasus' Linux Administration Tools # apt-get maintenance script # 4 | # (C)2017-2018 Mattijs Snepvangers # pegasus.ict@gmail.com # 5 | # License: MIT # Please keep my name in the credits # 6 | ################################################################################ 7 | # Ver 0.1.0-BETA 8 | # Build 20180713 9 | START_TIME=$(date +"%Y-%m-%d_%H.%M.%S.%3N") 10 | 11 | # fun: bash_check 12 | # txt: Checks if the script is being run using Bash v4+ 13 | # use: bash_check 14 | # api: internal 15 | 16 | # Making sure this script is run by bash to prevent mishaps 17 | if [ "$(ps -p "$$" -o comm=)" != "bash" ] 18 | then 19 | bash "$0" 20 | exit "$?" 21 | fi 22 | # Making sure this script is run by bash 4+ 23 | if [ -z "$BASH_VERSION" ] || [ "${BASH_VERSION:0:1}" -lt 4 ] 24 | then 25 | echo "You need bash v4+ to run this script. Aborting..." 26 | exit 1 27 | fi 28 | 29 | # fun: su_check 30 | # txt: Checks if the script is being run by root or sudo. If not, issues warning and reruns command using sudo 31 | # use: su_check 32 | # api: internal 33 | if [[ $EUID -ne 0 ]] 34 | then 35 | echo "This script must be run as root / with sudo" 36 | echo "restarting script with sudo..." 37 | sudo bash sudo "$0" 38 | exit "$?" 39 | fi 40 | echo "$START_TIME ## Starting Update Process #######################" 41 | echo "Updating apt cache" ; apt-get -qqy update 42 | echo "Fixing any broken dependencies if needed" ; apt -qqy --fix-broken install 43 | echo "checking for distribution upgrade" ; apt-get -qqy dist-upgrade 44 | echo "Updating installed packages" ; apt-get -qqy --allow-unauthenticated upgrade 45 | echo "Cleaning up obsolete packages" ; apt-get -qqy auto-remove 46 | echo "Clearing old/obsolete package cache" ; apt-get -qqy autoclean 47 | ### 48 | echo "checking for reboot requirement" 49 | if [ -f /var/run/reboot-required ] 50 | then 51 | echo "REBOOT REQUIRED, sheduled for 23:59" 52 | shutdown -r 23:59 2>&1 53 | else 54 | echo "No reboot required" 55 | fi 56 | ### 57 | END_TIME=$(date +"%Y-%m-%d_%H.%M.%S.%3N") 58 | echo "$END_TIME ## Update Process Finished ########################" 59 | -------------------------------------------------------------------------------- /base_files/apt/base.list: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ## OFFICIAL UBUNTU REPOS ## 3 | ################################################################################ 4 | ###### Ubuntu Main Repos 5 | deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse 6 | deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse 7 | 8 | ###### Ubuntu Update Repos 9 | deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse 10 | deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse 11 | deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse 12 | deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse 13 | #deb http://archive.ubuntu.com/ubuntu/ jammy-proposed main restricted universe multiverse 14 | #deb-src http://archive.ubuntu.com/ubuntu/ jammy-proposed main restricted universe multiverse 15 | deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse 16 | deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse 17 | 18 | ################################################################################ 19 | ## 3rd Party Binary Repos ## 20 | ################################################################################ 21 | -------------------------------------------------------------------------------- /base_files/bash_aliases: -------------------------------------------------------------------------------- 1 | ############################################################################################# 2 | ## default bash aliases 3 | ## https://github.com/pegasusict/PLAT 4 | 5 | export LS_OPTIONS='--color=auto' 6 | eval "$(dircolors)" 7 | alias ls='ls $LS_OPTIONS' 8 | alias ll='ls $LS_OPTIONS -l' 9 | alias l='ls $LS_OPTIONS -lA' 10 | 11 | alias apt="apt-get -qy" 12 | alias update="apt update && apt dist-upgrade && apt autoremove && apt autoclean" 13 | -------------------------------------------------------------------------------- /bin/create_nginx_proxymgr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p /var/nginxproxymanager 4 | cd /var/nginxproxymanager/ 5 | 6 | YAML = << docker-compose.yml 38 | 39 | docker-compose up -d 40 | 41 | wait 42 | echo "DONE\n" 43 | -------------------------------------------------------------------------------- /bin/install-docker-ce.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | clear 4 | apt-get update; apt-get install -qy apt-transport-https ca-certificates curl gnupg-agent software-properties-common screen mc 5 | 6 | #curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg 7 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 8 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 9 | 10 | apt-get update; apt-get install docker-ce docker-ce-cli containerd.io 11 | 12 | usermod -aG docker $USER 13 | newgrp docker 14 | 15 | docker version 16 | pause 17 | ######################################################################################################################## 18 | clear 19 | curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url | \ 20 | grep docker-compose-linux-x86_64 | cut -d '"' -f 4 | wget -qi - 21 | chmod +x docker-compose-linux-x86_64 22 | mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose 23 | 24 | docker-compose version 25 | ######################################## 26 | pause 27 | clear 28 | 29 | curl -L https://raw.githubusercontent.com/docker/compose/master/contrib/completion/bash/docker-compose \ 30 | -o /etc/bash_completion.d/docker-compose 31 | source /etc/bash_completion.d/docker-compose 32 | 33 | ######################################################################################################################## 34 | mkdir ~/portainer 35 | cd ~/portainer 36 | 37 | docker pull portainer/portainer 38 | docker tag portainer/portainer portainer 39 | export CONT_NAME="portainer" 40 | 41 | docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v ~/portainer:/data \ 42 | --name ${CONT_NAME} portainer 43 | -------------------------------------------------------------------------------- /bin/post_install_proxmox.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### root check 3 | if [[ $(id -u) -ne 0 ]]; then echo "- Please run as root / sudo"; exit 1; fi 4 | 5 | ### FUNCTIONS #################################################### 6 | alias ag="apt-get -qy" 7 | upd() { ag update; } 8 | inst() { ag install "$@"; } 9 | verify_path() { 10 | [[ -w "${1}" ]] || mkdir -p "${1}" 11 | [[ -w "${1}" ]] then :; else echo "there is a problem with ${1}"; exit 1 12 | } 13 | add_repo_webmin() { 14 | echo -e "deb http://download.webmin.com/download/repository sarge contrib\n" > /apt/sources.list.d/webmin.list 15 | upd 16 | wget -q -O- http://www.webmin.com/jcameron-key.asc | apt-key add - 17 | upd 18 | } 19 | #################################################################### 20 | inst mc screen git gnupg1 21 | verify_path "/etc/apt/sources.list.d" 22 | add_repo_webmin 23 | inst webmin 24 | -------------------------------------------------------------------------------- /bin/prepare_for_reinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Pegasus' Linux Administration Tools # PLAT preinstaller # 4 | # pegasus.ict@gmail.com # https://pegasusict.github.io/PLAT/ # 5 | # (C)2017-2024 Mattijs Snepvangers # pegasus.ict@gmail.com # 6 | # License: MIT # Please keep my name in the credits # 7 | ################################################################################ 8 | START_TIME=$(date +"%Y-%m-%d_%H.%M.%S.%3N") 9 | declare -g VERBOSITY=5 10 | 11 | source ./../lib/subheader.sh 12 | echo "$START_TIME ## Starting PLAT Pre-Install Process #######################" 13 | 14 | # mod: PLAT::Preinstall 15 | # txt: This script cleans up the system and performs backups before reinstalling 16 | 17 | # fun: init 18 | # txt: declares global constants with program/suite information 19 | # use: init 20 | # api: prerun 21 | init() { 22 | declare -gr SCRIPT_TITLE="PLAT Pre-Installer" 23 | declare -gr VER_MAJOR=0 24 | declare -gr VER_MINOR=0 25 | declare -gr VER_PATCH=2 26 | declare -gr VER_STATE="ALPHA" 27 | declare -gr BUILD=20240206 28 | ### 29 | declare -gr PROGRAM="$PROGRAM_SUITE - $SCRIPT_TITLE" 30 | declare -gr SHORT_VER="$VER_MAJOR.$VER_MINOR.$VER_PATCH-$VER_STATE" 31 | declare -gr VER="Ver$SHORT_VER build $BUILD" 32 | } 33 | 34 | # fun: prep 35 | # txt: prep initializes default settings, imports the PBFL index and makes 36 | # other preparations needed by the script 37 | # use: prep 38 | # api: prerun 39 | prep() { 40 | import "PBFL/default.inc.bash" 41 | create_dir "$LOG_DIR" 42 | header 43 | read_ini ${SCRIPT_DIR}${INI_FILE} 44 | get_args 45 | } 46 | 47 | # fun: main 48 | # txt: main preinstall thread 49 | # use: main 50 | # api: PLAT::preinstall 51 | main(){ 52 | # clear cache dirs 53 | rm -rf /home/*/.cache/* 54 | rm -rf /home/*/.*/cache/* 55 | rm -rf /home/*/.*/log/* 56 | rm -rf /home/*/.*/logs/* 57 | 58 | local BACKUPDATE ; BACKUPDATE=$(date +"%Y%m%d") 59 | local TARGETDIR; TARGETDIR="/alpha/data3/BACKUP/zeus/${BACKUPDATE}/" 60 | mkdir -p $TARGETDIR 61 | 62 | cp /etc/fstab $TARGETDIR 63 | cp /etc/apt/sources.list $TARGETDIR 64 | 65 | # backup homedir(s) 66 | cp -bfrPx /home/ $TARGETDIR 67 | } 68 | 69 | ##### BOILERPLATE ##### 70 | init 71 | prep 72 | main 73 | -------------------------------------------------------------------------------- /code_of_conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pegasus.ict@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /docs/Flowcharts/PostInstall.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/Flowcharts/PostInstall.pdf -------------------------------------------------------------------------------- /docs/Flowcharts/container builder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/Flowcharts/container builder.pdf -------------------------------------------------------------------------------- /docs/MCSW.txt: -------------------------------------------------------------------------------- 1 | >>> Current: 2 | Working on CORE branch, CFG file (array style) 3 | >>>> TODO: 4 | clean up master 5 | update readme 6 | 7 | ################################################################## 8 | > Must: 9 | preinstall 10 | Bootstrap 11 | Maintenance 12 | 13 | ################################################################## 14 | > Could: 15 | cfg parsing, ini style 16 | 17 | ################################################################# 18 | > Should: 19 | 20 | ################################################################# 21 | > Would: 22 | email reports 23 | 24 | -------------------------------------------------------------------------------- /docs/bash-redirections-cheat-sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/bash-redirections-cheat-sheet.pdf -------------------------------------------------------------------------------- /docs/bootstrap.md: -------------------------------------------------------------------------------- 1 | From the app: 2 | --- 3 | Pegasus' Linux Administration Tools - postinstall.sh Ver1.0.0-BETA build 20180313 - (c) 2018 Mattijs Snepvangers 4 | 5 | USAGE: sudo bash postinstall.sh -h 6 | or 7 | sudo bash postinstall.sh -r [ -c ] [ -v INT ] 8 | [ -g ] [ -l ] [ -t ] 9 | 10 | OPTIONS 11 | 12 | -r or --role tells the script what kind of system we are dealing with. 13 | Valid options: ws, zeus, backupserver, container << REQUIRED >> 14 | -c or --containertype tells the script what kind of container we are working on. 15 | Valid options are: basic, nas, web, x11, pxe << REQUIRED if -r=container >> 16 | -v or --verbosity defines the amount of chatter. 0=CRITICAL, 1=WARNING, 2=INFO, 3=VERBOSE, 17 | 4=DEBUG. default=2 18 | -g or --garbageage defines the age (in days) of garbage (trashbins & temp files) being 19 | cleaned, default=7 20 | -l or --logage defines the age (in days) of logs to be purged, default=30 21 | -t or --tmpage define how long temp files should be untouched before they are deleted, 22 | default=2 23 | -h or --help prints this message 24 | 25 | The options can be used in any order 26 | --- 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/collapsing functions.txt: -------------------------------------------------------------------------------- 1 | Collapsing functions: 2 | 3 | =============================================================================== 4 | 5 | #!/bin/bash 6 | # Using collapsing functions to turn debug messages on/off 7 | 8 | [ "--debug" = "$1" ] && dbg=echo || dbg=: 9 | 10 | 11 | # From now on if you use $dbg instead of echo, you can select if messages will be shown 12 | 13 | $dbg "This message will only be displayed if --debug is specified at the command line 14 | 15 | ================================================================================ 16 | 17 | chatter() { 18 | if [[ $verbose ]]; then 19 | chatter() { 20 | echo "$@" 21 | } 22 | chatter "$@" 23 | else 24 | chatter() { 25 | : 26 | } 27 | fi 28 | } 29 | -------------------------------------------------------------------------------- /docs/output redirection.txt: -------------------------------------------------------------------------------- 1 | send_to_screen_and_logs() { 2 | _MESSAGE="$1" 3 | _STD_LOG="$2" 4 | _ERR_LOG="$3" 5 | echo "$_MESSAGE" > >(tee -a "$_STD_LOG") 2> >(tee -a "$_ERR_LOG" >&2) 6 | } 7 | -------------------------------------------------------------------------------- /docs/plat(mail part).bash.txt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | #MAIL_SCRIPT="$TARGET_SCRIPT_DIR/mail.sh" 3 | #MAIL_SCRIPT_TITLE="Email Script" 4 | #ASK_FOR_EMAIL_STUFF=true 5 | #EMAIL_SENDER="" 6 | #EMAIL_RECIPIENT="" 7 | #EMAIL_PASSWORD="" 8 | #COMPUTER_NAME=$(uname -n) 9 | 10 | usage() { 11 | version 12 | cat < [ -c ] [ -v INT ] [ -g ] [ -l ] [ -t ] [ -S -P -R ] 16 | 17 | OPTIONS 18 | 19 | -r or --role tells the script what kind of system we are dealing with. 20 | Valid options: ws, zeus, backupserver, container << REQUIRED >> 21 | -c or --containertype tells the script what kind of container we are working on. 22 | Valid options are: basic, nas, web, x11, pxe << REQUIRED if -r=container >> 23 | -v or --verbosity defines the amount of chatter. 0=CRITICAL, 1=WARNING, 2=INFO, 3=VERBOSE, 4=DEBUG. default=2 24 | -g or --garbageage defines the age (in days) of garbage (trashbins & temp files) being cleaned, default=7 25 | -l or --logage defines the age (in days) of logs to be purged, default=30 26 | -t or --tmpage define how long temp files should be untouched before they are deleted, default=2 27 | -S or --emailsender defines the gmail account used for sending the logs 28 | -P or --emailpass defines the password for that account 29 | -R or --emailrecipient defines the recipient(s) of those emails 30 | -h or --help prints this message 31 | 32 | The options can be used in any order 33 | EOT 34 | exit 3 35 | } 36 | 37 | ################################################################################ 38 | info_line "installing google api client" 39 | pip install --upgrade google-api-python-client 40 | #### 41 | info_line "Building mail script" 42 | CC_TO="pegasus.ict+plat@gmail.com" 43 | MAIL_SERVER="smtp.gmail.com:587" 44 | if [ ${#EMAIL_SENDER} -ge 10 ] && [ ${#EMAIL_PASSWORD} -ge 8 ] && [ ${#EMAIL_RECIPIENT} -ge 10 ] 45 | then ask_for_email_stuff=false 46 | fi 47 | if [ -f "$MAIL_SCRIPT" ] ; then rm $MAIL_SCRIPT 2>&1 | opr4; create_secline "Removed old mail script." ; fi 48 | add_to_script "$MAIL_SCRIPT" false <> "$MAIL_SCRIPT" 58 | if [[ $ASK_FOR_EMAIL_STUFF == true ]] ; then echo "Which gmail account will I use to send the reports? (other providers are not supported for now)" ; read -p "eMail address: " EMAIL_SENDER ; fi 59 | echo "# Define sender's detail email ID" >> "$MAIL_SCRIPT"; echo "FROM_MAIL=\"$EMAIL_SENDER\"" >> "$MAIL_SCRIPT" 60 | if [[ $ASK_FOR_EMAIL_STUFF == true ]] ; then echo "Which password goes with that account?" ; read -s -p "password: " EMAIL_PASSWORD ; printf "%b" "\n" ; fi 61 | echo "# Define sender's password" >> "$MAIL_SCRIPT"; echo "SENDER_PASSWORD=\"$EMAIL_PASSWORD\"" >> "$MAIL_SCRIPT" 62 | if [[ $ASK_FOR_EMAIL_STUFF == true ]] ; then echo "To whom will the reports be sent?" ; read -p "recipient(s): "EMAIL_RECIPIENT ; fi 63 | echo "# Define recipient(s)" >> "$MAIL_SCRIPT" ; echo "TO_MAIL=\"$EMAIL_RECIPIENT\"" >> "$MAIL_SCRIPT" 64 | echo "# Attachment(s)" >> "$MAIL_SCRIPT" ; echo "ATTACHMENT=\"\$1\"" >> "$MAIL_SCRIPT" 65 | add_to_script "$MAIL_SCRIPT" false <<-EOT 66 | CC_TO="$CC_TO" 67 | MAIL_SERVER="$MAIL_SERVER" 68 | SUBJECT="$PROGRAM_SUITE Email Service" 69 | MSG() { 70 | cat <> "$MAIL_SCRIPT" 84 | chmod 555 "$SCRIPT_DIR/*" 2>&1 | opr4 ; chown root:root "$SCRIPT_DIR/*" 2>&1 | opr4 85 | ################################################################################ 86 | create_logline "DONE, emailing log" 87 | bash "$MAIL_SCRIPT" "$LOG_FILE" 88 | -------------------------------------------------------------------------------- /docs/research/Dropbox-Uploader-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/Dropbox-Uploader-master.zip -------------------------------------------------------------------------------- /docs/research/bash-backup-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bash-backup-master.zip -------------------------------------------------------------------------------- /docs/research/bash-one-liners-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bash-one-liners-master.zip -------------------------------------------------------------------------------- /docs/research/bash-oo-framework dynamic module loading.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bash-oo-framework dynamic module loading.zip -------------------------------------------------------------------------------- /docs/research/bash-oo-framework-2.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bash-oo-framework-2.0.tar.gz -------------------------------------------------------------------------------- /docs/research/bash-oo-framework-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bash-oo-framework-master.zip -------------------------------------------------------------------------------- /docs/research/basher-master package manager.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/basher-master package manager.zip -------------------------------------------------------------------------------- /docs/research/bootstrap.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bootstrap.zip -------------------------------------------------------------------------------- /docs/research/bpkg-0.3.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/bpkg-0.3.0.tar.gz -------------------------------------------------------------------------------- /docs/research/docopts-develop.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/docopts-develop.zip -------------------------------------------------------------------------------- /docs/research/docopts-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/docopts-master.zip -------------------------------------------------------------------------------- /docs/research/github-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/github-master.zip -------------------------------------------------------------------------------- /docs/research/is.sh-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/is.sh-master.zip -------------------------------------------------------------------------------- /docs/research/oo.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # --------------------------------------------------------------------------- 4 | # OO support functions 5 | # Kludged by Pim van Riezen 6 | # --------------------------------------------------------------------------- 7 | DEFCLASS="" 8 | CLASS="" 9 | THIS=0 10 | 11 | class() { 12 | DEFCLASS="$1" 13 | eval CLASS_${DEFCLASS}_VARS="" 14 | eval CLASS_${DEFCLASS}_FUNCTIONS="" 15 | } 16 | 17 | static() { 18 | return 0 19 | } 20 | 21 | func() { 22 | local varname="CLASS_${DEFCLASS}_FUNCTIONS" 23 | eval "$varname=\"\${$varname}$1 \"" 24 | } 25 | 26 | var() { 27 | local varname="CLASS_${DEFCLASS}_VARS" 28 | eval $varname="\"\${$varname}$1 \"" 29 | } 30 | 31 | loadvar() { 32 | eval "varlist=\"\$CLASS_${CLASS}_VARS\"" 33 | for var in $varlist; do 34 | eval "$var=\"\$INSTANCE_${THIS}_$var\"" 35 | done 36 | } 37 | 38 | loadfunc() { 39 | eval "funclist=\"\$CLASS_${CLASS}_FUNCTIONS\"" 40 | for func in $funclist; do 41 | eval "${func}() { ${CLASS}::${func} \"\$*\"; return \$?; }" 42 | done 43 | } 44 | 45 | savevar() { 46 | eval "varlist=\"\$CLASS_${CLASS}_VARS\"" 47 | for var in $varlist; do 48 | eval "INSTANCE_${THIS}_$var=\"\$$var\"" 49 | done 50 | } 51 | 52 | typeof() { 53 | eval echo \$TYPEOF_$1 54 | } 55 | 56 | new() { 57 | local class="$1" 58 | local cvar="$2" 59 | shift 60 | shift 61 | local id=$(uuidgen | tr A-F a-f | sed -e "s/-//g") 62 | eval TYPEOF_${id}=$class 63 | eval $cvar=$id 64 | local funclist 65 | eval "funclist=\"\$CLASS_${class}_FUNCTIONS\"" 66 | for func in $funclist; do 67 | eval "${cvar}.${func}() { local t=\$THIS; THIS=$id; local c=\$CLASS; CLASS=$class; loadvar; loadfunc; ${class}::${func} \"\$*\"; rt=\$?; savevar; CLASS=\$c; THIS=\$t; return $rt; }" 68 | done 69 | eval "${cvar}.${class} \"\$*\" || true" 70 | } 71 | 72 | # --------------------------------------------------------------------------- 73 | # Example code 74 | # --------------------------------------------------------------------------- 75 | 76 | # class definition 77 | class Storpel 78 | func Storpel 79 | func setName 80 | func setQuality 81 | func print 82 | var name 83 | var quality 84 | 85 | # class implementation 86 | Storpel::Storpel() { 87 | setName "$1" 88 | setQuality "$2" 89 | if [ -z "$name" ]; then setName "Generic"; fi 90 | if [ -z "$quality" ]; then setQuality "Normal"; fi 91 | } 92 | 93 | Storpel::setName() { name="$1"; } 94 | Storpel::setQuality() { quality="$1"; } 95 | Storpel::print() { echo "$name ($quality)"; } 96 | 97 | # usage 98 | new Storpel one "Storpilator 1000" Medium 99 | new Storpel two 100 | new Storpel three 101 | 102 | two.setName "Storpilator 2000" 103 | two.setQuality "Strong" 104 | 105 | one.print 106 | two.print 107 | three.print 108 | 109 | echo "" 110 | 111 | echo "one: $one ($(typeof $one))" 112 | echo "two: $two ($(typeof $two))" 113 | echo "three: $three ($(typeof $two))" 114 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#checkoutlist: -------------------------------------------------------------------------------- 1 | # The "checkoutlist" file is used to support additional version controlled 2 | # administrative files in $CVSROOT/CVSROOT, such as template files. 3 | # 4 | # The first entry on a line is a filename which will be checked out from 5 | # the corresponding RCS file in the $CVSROOT/CVSROOT directory. 6 | # The remainder of the line is an error message to use if the file cannot 7 | # be checked out. 8 | # 9 | # File format: 10 | # 11 | # [] 12 | # 13 | # comment lines begin with '#' 14 | newlog.pl newlog error 15 | cvs-identity cvs-identity error 16 | debugcvs debugcvs error 17 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#commitinfo: -------------------------------------------------------------------------------- 1 | # The "commitinfo" file is used to control pre-commit checks. 2 | # The filter on the right is invoked with the repository and a list 3 | # of files to check. A non-zero exit of the filter program will 4 | # cause the commit to be aborted. 5 | # 6 | # The first entry on a line is a regular expression which is tested 7 | # against the directory that the change is being committed to, relative 8 | # to the $CVSROOT. For the first match that is found, then the remainder 9 | # of the line is the name of the filter to run. 10 | # 11 | # If the repository name does not match any of the regular expressions in this 12 | # file, the "DEFAULT" line is used, if it is specified. 13 | # 14 | # If the name "ALL" appears as a regular expression it is always used 15 | # in addition to the first matching regex or "DEFAULT". 16 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#config: -------------------------------------------------------------------------------- 1 | # Set this to "no" if pserver shouldn't check system users/passwords 2 | #SystemAuth=no 3 | 4 | # Set `PreservePermissions' to `yes' to save file status information 5 | # in the repository. 6 | #PreservePermissions=no 7 | 8 | # Set `TopLevelAdmin' to `yes' to create a CVS directory at the top 9 | # level of the new working directory when using the `cvs checkout' 10 | # command. 11 | #TopLevelAdmin=no 12 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#cvs-identity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/shoop/CVSROOT/.#cvs-identity -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#cvswrappers: -------------------------------------------------------------------------------- 1 | # This file affects handling of files based on their names. 2 | # 3 | # The -t/-f options allow one to treat directories of files 4 | # as a single file, or to transform a file in other ways on 5 | # its way in and out of CVS. 6 | # 7 | # The -m option specifies whether CVS attempts to merge files. 8 | # 9 | # The -k option specifies keyword expansion (e.g. -kb for binary). 10 | # 11 | # Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) 12 | # 13 | # wildcard [option value][option value]... 14 | # 15 | # where option is one of 16 | # -f from cvs filter value: path to filter 17 | # -t to cvs filter value: path to filter 18 | # -m update methodology value: MERGE or COPY 19 | # -k expansion mode value: b, o, kkv, &c 20 | # 21 | # and value is a single-quote delimited value. 22 | # For example: 23 | #*.gif -k 'b' 24 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#debugcvs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit 3 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#editinfo: -------------------------------------------------------------------------------- 1 | # The "editinfo" file is used to allow verification of logging 2 | # information. It works best when a template (as specified in the 3 | # rcsinfo file) is provided for the logging procedure. Given a 4 | # template with locations for, a bug-id number, a list of people who 5 | # reviewed the code before it can be checked in, and an external 6 | # process to catalog the differences that were code reviewed, the 7 | # following test can be applied to the code: 8 | # 9 | # Making sure that the entered bug-id number is correct. 10 | # Validating that the code that was reviewed is indeed the code being 11 | # checked in (using the bug-id number or a seperate review 12 | # number to identify this particular code set.). 13 | # 14 | # If any of the above test failed, then the commit would be aborted. 15 | # 16 | # Actions such as mailing a copy of the report to each reviewer are 17 | # better handled by an entry in the loginfo file. 18 | # 19 | # One thing that should be noted is the the ALL keyword is not 20 | # supported. There can be only one entry that matches a given 21 | # repository. 22 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#loginfo: -------------------------------------------------------------------------------- 1 | # The "loginfo" file controls where "cvs commit" log information 2 | # is sent. The first entry on a line is a regular expression which must match 3 | # the directory that the change is being made to, relative to the 4 | # $CVSROOT. If a match is found, then the remainder of the line is a filter 5 | # program that should expect log information on its standard input. 6 | # 7 | # If the repository name does not match any of the regular expressions in this 8 | # file, the "DEFAULT" line is used, if it is specified. 9 | # 10 | # If the name ALL appears as a regular expression it is always used 11 | # in addition to the first matching regex or DEFAULT. 12 | # 13 | # You may specify a format string as part of the 14 | # filter. The string is composed of a `%' followed 15 | # by a single format character, or followed by a set of format 16 | # characters surrounded by `{' and `}' as separators. The format 17 | # characters are: 18 | # 19 | # s = file name 20 | # V = old version number (pre-checkin) 21 | # v = new version number (post-checkin) 22 | # 23 | # For example: 24 | #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog 25 | # or 26 | #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog 27 | 28 | # Refresh debugcvs first, as cvs only refreshes AFTER processing this file. 29 | # Is this a bug, or a feature? 30 | ALL (cd $CVSROOT/CVSROOT/; co debugcvs 2>/dev/null); sh $CVSROOT/CVSROOT/debugcvs 31 | 32 | # Do nothing on these dirs. 33 | ^CVSROOT : 34 | ^shoop/docs : 35 | 36 | ^shoop/www (unset SSH_AUTH_SOCK SSH_AGENT_PID SSH_CLIENT; ssh -i $CVSROOT/CVSROOT/cvs-identity -q -a doogie@shell1 dummy < /dev/null) 37 | 38 | DEFAULT $CVSROOT/CVSROOT/newlog.pl -s -m shoop-cvs@lists.sourceforge.net %s 39 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#modules: -------------------------------------------------------------------------------- 1 | # Three different line formats are valid: 2 | # key -a aliases... 3 | # key [options] directory 4 | # key [options] directory files... 5 | # 6 | # Where "options" are composed of: 7 | # -i prog Run "prog" on "cvs commit" from top-level of module. 8 | # -o prog Run "prog" on "cvs checkout" of module. 9 | # -e prog Run "prog" on "cvs export" of module. 10 | # -t prog Run "prog" on "cvs rtag" of module. 11 | # -u prog Run "prog" on "cvs update" of module. 12 | # -d dir Place module in directory "dir" instead of module name. 13 | # -l Top-level directory only -- do not recurse. 14 | # 15 | # NOTE: If you change any of the "Run" options above, you'll have to 16 | # release and re-checkout any working directories of these modules. 17 | # 18 | # And "directory" is a path to a directory relative to $CVSROOT. 19 | # 20 | # The "-a" option specifies an alias. An alias is interpreted as if 21 | # everything on the right of the "-a" had been typed on the command line. 22 | # 23 | # You can encode a module within a module by using the special '&' 24 | # character to interpose another module into the current module. This 25 | # can be useful for creating a module that consists of many directories 26 | # spread out over the entire source repository. 27 | www shoop/www 28 | docs shoop/docs 29 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#notify: -------------------------------------------------------------------------------- 1 | # The "notify" file controls where notifications from watches set by 2 | # "cvs watch add" or "cvs edit" are sent. The first entry on a line is 3 | # a regular expression which is tested against the directory that the 4 | # change is being made to, relative to the $CVSROOT. If it matches, 5 | # then the remainder of the line is a filter program that should contain 6 | # one occurrence of %s for the user to notify, and information on its 7 | # standard input. 8 | # 9 | # "ALL" or "DEFAULT" can be used in place of the regular expression. 10 | # 11 | # For example: 12 | #ALL mail %s -s "CVS notification" 13 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#rcsinfo: -------------------------------------------------------------------------------- 1 | # The "rcsinfo" file is used to control templates with which the editor 2 | # is invoked on commit and import. 3 | # 4 | # The first entry on a line is a regular expression which is tested 5 | # against the directory that the change is being made to, relative to the 6 | # $CVSROOT. For the first match that is found, then the remainder of the 7 | # line is the name of the file that contains the template. 8 | # 9 | # If the repository name does not match any of the regular expressions in this 10 | # file, the "DEFAULT" line is used, if it is specified. 11 | # 12 | # If the name "ALL" appears as a regular expression it is always used 13 | # in addition to the first matching regex or "DEFAULT". 14 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#taginfo: -------------------------------------------------------------------------------- 1 | # The "taginfo" file is used to control pre-tag checks. 2 | # The filter on the right is invoked with the following arguments: 3 | # 4 | # $1 -- tagname 5 | # $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d 6 | # $3 -- repository 7 | # $4-> file revision [file revision ...] 8 | # 9 | # A non-zero exit of the filter program will cause the tag to be aborted. 10 | # 11 | # The first entry on a line is a regular expression which is tested 12 | # against the directory that the change is being committed to, relative 13 | # to the $CVSROOT. For the first match that is found, then the remainder 14 | # of the line is the name of the filter to run. 15 | # 16 | # If the repository name does not match any of the regular expressions in this 17 | # file, the "DEFAULT" line is used, if it is specified. 18 | # 19 | # If the name "ALL" appears as a regular expression it is always used 20 | # in addition to the first matching regex or "DEFAULT". 21 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/.#verifymsg: -------------------------------------------------------------------------------- 1 | # The "verifymsg" file is used to allow verification of logging 2 | # information. It works best when a template (as specified in the 3 | # rcsinfo file) is provided for the logging procedure. Given a 4 | # template with locations for, a bug-id number, a list of people who 5 | # reviewed the code before it can be checked in, and an external 6 | # process to catalog the differences that were code reviewed, the 7 | # following test can be applied to the code: 8 | # 9 | # Making sure that the entered bug-id number is correct. 10 | # Validating that the code that was reviewed is indeed the code being 11 | # checked in (using the bug-id number or a seperate review 12 | # number to identify this particular code set.). 13 | # 14 | # If any of the above test failed, then the commit would be aborted. 15 | # 16 | # Actions such as mailing a copy of the report to each reviewer are 17 | # better handled by an entry in the loginfo file. 18 | # 19 | # One thing that should be noted is the the ALL keyword is not 20 | # supported. There can be only one entry that matches a given 21 | # repository. 22 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/checkoutlist: -------------------------------------------------------------------------------- 1 | # The "checkoutlist" file is used to support additional version controlled 2 | # administrative files in $CVSROOT/CVSROOT, such as template files. 3 | # 4 | # The first entry on a line is a filename which will be checked out from 5 | # the corresponding RCS file in the $CVSROOT/CVSROOT directory. 6 | # The remainder of the line is an error message to use if the file cannot 7 | # be checked out. 8 | # 9 | # File format: 10 | # 11 | # [] 12 | # 13 | # comment lines begin with '#' 14 | newlog.pl newlog error 15 | cvs-identity cvs-identity error 16 | debugcvs debugcvs error 17 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/checkoutlist,v: -------------------------------------------------------------------------------- 1 | head 1.6; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.6 9 | date 2000.02.03.04.44.43; author doogie; state Exp; 10 | branches; 11 | next 1.5; 12 | 13 | 1.5 14 | date 2000.02.02.10.30.01; author doogie; state Exp; 15 | branches; 16 | next 1.4; 17 | 18 | 1.4 19 | date 2000.02.02.10.18.50; author doogie; state Exp; 20 | branches; 21 | next 1.3; 22 | 23 | 1.3 24 | date 2000.02.02.09.08.34; author doogie; state Exp; 25 | branches; 26 | next 1.2; 27 | 28 | 1.2 29 | date 2000.01.31.17.47.40; author doogie; state Exp; 30 | branches; 31 | next 1.1; 32 | 33 | 1.1 34 | date 2000.01.30.02.10.30; author root; state Exp; 35 | branches; 36 | next ; 37 | 38 | 39 | desc 40 | @@ 41 | 42 | 43 | 1.6 44 | log 45 | @Minor tweaks. 46 | @ 47 | text 48 | @# The "checkoutlist" file is used to support additional version controlled 49 | # administrative files in $CVSROOT/CVSROOT, such as template files. 50 | # 51 | # The first entry on a line is a filename which will be checked out from 52 | # the corresponding RCS file in the $CVSROOT/CVSROOT directory. 53 | # The remainder of the line is an error message to use if the file cannot 54 | # be checked out. 55 | # 56 | # File format: 57 | # 58 | # [] 59 | # 60 | # comment lines begin with '#' 61 | newlog.pl newlog error 62 | cvs-identity cvs-identity error 63 | debugcvs debugcvs error 64 | @ 65 | 66 | 67 | 1.5 68 | log 69 | @maybe this file was bad. 70 | @ 71 | text 72 | @d14 1 73 | a14 1 74 | newlog newlog error 75 | @ 76 | 77 | 78 | 1.4 79 | log 80 | @Time for cvs debugging. 81 | @ 82 | text 83 | @d14 3 84 | a16 3 85 | newlog 86 | cvs-identity 87 | debbugcvs 88 | @ 89 | 90 | 91 | 1.3 92 | log 93 | @Add cvs-identity as an administrative file. 94 | @ 95 | text 96 | @d16 1 97 | @ 98 | 99 | 100 | 1.2 101 | log 102 | @Tell cvs to keep newlog.pl uptodate from newlog.pl,v. 103 | @ 104 | text 105 | @d15 1 106 | @ 107 | 108 | 109 | 1.1 110 | log 111 | @initial checkin 112 | @ 113 | text 114 | @d14 1 115 | @ 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/commitinfo: -------------------------------------------------------------------------------- 1 | # The "commitinfo" file is used to control pre-commit checks. 2 | # The filter on the right is invoked with the repository and a list 3 | # of files to check. A non-zero exit of the filter program will 4 | # cause the commit to be aborted. 5 | # 6 | # The first entry on a line is a regular expression which is tested 7 | # against the directory that the change is being committed to, relative 8 | # to the $CVSROOT. For the first match that is found, then the remainder 9 | # of the line is the name of the filter to run. 10 | # 11 | # If the repository name does not match any of the regular expressions in this 12 | # file, the "DEFAULT" line is used, if it is specified. 13 | # 14 | # If the name "ALL" appears as a regular expression it is always used 15 | # in addition to the first matching regex or "DEFAULT". 16 | # DO NOT EDIT THE NEXT LINE -- REQUIRED FOR STATS COLLECTION 17 | ALL /cvsroot/sitedocs/CVSROOT/keepsake -p shoop 18 | 19 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/commitinfo,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "commitinfo" file is used to control pre-commit checks. 23 | # The filter on the right is invoked with the repository and a list 24 | # of files to check. A non-zero exit of the filter program will 25 | # cause the commit to be aborted. 26 | # 27 | # The first entry on a line is a regular expression which is tested 28 | # against the directory that the change is being committed to, relative 29 | # to the $CVSROOT. For the first match that is found, then the remainder 30 | # of the line is the name of the filter to run. 31 | # 32 | # If the repository name does not match any of the regular expressions in this 33 | # file, the "DEFAULT" line is used, if it is specified. 34 | # 35 | # If the name "ALL" appears as a regular expression it is always used 36 | # in addition to the first matching regex or "DEFAULT". 37 | @ 38 | 39 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/config: -------------------------------------------------------------------------------- 1 | # Set this to "no" if pserver shouldn't check system users/passwords 2 | #SystemAuth=no 3 | 4 | # Set `PreservePermissions' to `yes' to save file status information 5 | # in the repository. 6 | #PreservePermissions=no 7 | 8 | # Set `TopLevelAdmin' to `yes' to create a CVS directory at the top 9 | # level of the new working directory when using the `cvs checkout' 10 | # command. 11 | #TopLevelAdmin=no 12 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/config,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# Set this to "no" if pserver shouldn't check system users/passwords 23 | #SystemAuth=no 24 | 25 | # Set `PreservePermissions' to `yes' to save file status information 26 | # in the repository. 27 | #PreservePermissions=no 28 | 29 | # Set `TopLevelAdmin' to `yes' to create a CVS directory at the top 30 | # level of the new working directory when using the `cvs checkout' 31 | # command. 32 | #TopLevelAdmin=no 33 | @ 34 | 35 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/cvs-identity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/shoop/CVSROOT/cvs-identity -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/cvs-identity,v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/shoop/CVSROOT/cvs-identity,v -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/cvswrappers: -------------------------------------------------------------------------------- 1 | # This file affects handling of files based on their names. 2 | # 3 | # The -t/-f options allow one to treat directories of files 4 | # as a single file, or to transform a file in other ways on 5 | # its way in and out of CVS. 6 | # 7 | # The -m option specifies whether CVS attempts to merge files. 8 | # 9 | # The -k option specifies keyword expansion (e.g. -kb for binary). 10 | # 11 | # Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) 12 | # 13 | # wildcard [option value][option value]... 14 | # 15 | # where option is one of 16 | # -f from cvs filter value: path to filter 17 | # -t to cvs filter value: path to filter 18 | # -m update methodology value: MERGE or COPY 19 | # -k expansion mode value: b, o, kkv, &c 20 | # 21 | # and value is a single-quote delimited value. 22 | # For example: 23 | #*.gif -k 'b' 24 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/cvswrappers,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# This file affects handling of files based on their names. 23 | # 24 | # The -t/-f options allow one to treat directories of files 25 | # as a single file, or to transform a file in other ways on 26 | # its way in and out of CVS. 27 | # 28 | # The -m option specifies whether CVS attempts to merge files. 29 | # 30 | # The -k option specifies keyword expansion (e.g. -kb for binary). 31 | # 32 | # Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers) 33 | # 34 | # wildcard [option value][option value]... 35 | # 36 | # where option is one of 37 | # -f from cvs filter value: path to filter 38 | # -t to cvs filter value: path to filter 39 | # -m update methodology value: MERGE or COPY 40 | # -k expansion mode value: b, o, kkv, &c 41 | # 42 | # and value is a single-quote delimited value. 43 | # For example: 44 | #*.gif -k 'b' 45 | @ 46 | 47 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/debugcvs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit 3 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/editinfo: -------------------------------------------------------------------------------- 1 | # The "editinfo" file is used to allow verification of logging 2 | # information. It works best when a template (as specified in the 3 | # rcsinfo file) is provided for the logging procedure. Given a 4 | # template with locations for, a bug-id number, a list of people who 5 | # reviewed the code before it can be checked in, and an external 6 | # process to catalog the differences that were code reviewed, the 7 | # following test can be applied to the code: 8 | # 9 | # Making sure that the entered bug-id number is correct. 10 | # Validating that the code that was reviewed is indeed the code being 11 | # checked in (using the bug-id number or a seperate review 12 | # number to identify this particular code set.). 13 | # 14 | # If any of the above test failed, then the commit would be aborted. 15 | # 16 | # Actions such as mailing a copy of the report to each reviewer are 17 | # better handled by an entry in the loginfo file. 18 | # 19 | # One thing that should be noted is the the ALL keyword is not 20 | # supported. There can be only one entry that matches a given 21 | # repository. 22 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/editinfo,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "editinfo" file is used to allow verification of logging 23 | # information. It works best when a template (as specified in the 24 | # rcsinfo file) is provided for the logging procedure. Given a 25 | # template with locations for, a bug-id number, a list of people who 26 | # reviewed the code before it can be checked in, and an external 27 | # process to catalog the differences that were code reviewed, the 28 | # following test can be applied to the code: 29 | # 30 | # Making sure that the entered bug-id number is correct. 31 | # Validating that the code that was reviewed is indeed the code being 32 | # checked in (using the bug-id number or a seperate review 33 | # number to identify this particular code set.). 34 | # 35 | # If any of the above test failed, then the commit would be aborted. 36 | # 37 | # Actions such as mailing a copy of the report to each reviewer are 38 | # better handled by an entry in the loginfo file. 39 | # 40 | # One thing that should be noted is the the ALL keyword is not 41 | # supported. There can be only one entry that matches a given 42 | # repository. 43 | @ 44 | 45 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/loginfo: -------------------------------------------------------------------------------- 1 | # The "loginfo" file controls where "cvs commit" log information 2 | # is sent. The first entry on a line is a regular expression which must match 3 | # the directory that the change is being made to, relative to the 4 | # $CVSROOT. If a match is found, then the remainder of the line is a filter 5 | # program that should expect log information on its standard input. 6 | # 7 | # If the repository name does not match any of the regular expressions in this 8 | # file, the "DEFAULT" line is used, if it is specified. 9 | # 10 | # If the name ALL appears as a regular expression it is always used 11 | # in addition to the first matching regex or DEFAULT. 12 | # 13 | # You may specify a format string as part of the 14 | # filter. The string is composed of a `%' followed 15 | # by a single format character, or followed by a set of format 16 | # characters surrounded by `{' and `}' as separators. The format 17 | # characters are: 18 | # 19 | # s = file name 20 | # V = old version number (pre-checkin) 21 | # v = new version number (post-checkin) 22 | # 23 | # For example: 24 | #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog 25 | # or 26 | #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog 27 | 28 | # Refresh debugcvs first, as cvs only refreshes AFTER processing this file. 29 | # Is this a bug, or a feature? 30 | ALL (cd $CVSROOT/CVSROOT/; co debugcvs 2>/dev/null); sh $CVSROOT/CVSROOT/debugcvs 31 | 32 | # Do nothing on these dirs. 33 | ^CVSROOT : 34 | ^shoop/docs : 35 | 36 | ^shoop/www (unset SSH_AUTH_SOCK SSH_AGENT_PID SSH_CLIENT; ssh -i $CVSROOT/CVSROOT/cvs-identity -q -a doogie@shell1 dummy < /dev/null) 37 | 38 | DEFAULT $CVSROOT/CVSROOT/newlog.pl -s -m shoop-cvs@lists.sourceforge.net %s 39 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/modules: -------------------------------------------------------------------------------- 1 | # Three different line formats are valid: 2 | # key -a aliases... 3 | # key [options] directory 4 | # key [options] directory files... 5 | # 6 | # Where "options" are composed of: 7 | # -i prog Run "prog" on "cvs commit" from top-level of module. 8 | # -o prog Run "prog" on "cvs checkout" of module. 9 | # -e prog Run "prog" on "cvs export" of module. 10 | # -t prog Run "prog" on "cvs rtag" of module. 11 | # -u prog Run "prog" on "cvs update" of module. 12 | # -d dir Place module in directory "dir" instead of module name. 13 | # -l Top-level directory only -- do not recurse. 14 | # 15 | # NOTE: If you change any of the "Run" options above, you'll have to 16 | # release and re-checkout any working directories of these modules. 17 | # 18 | # And "directory" is a path to a directory relative to $CVSROOT. 19 | # 20 | # The "-a" option specifies an alias. An alias is interpreted as if 21 | # everything on the right of the "-a" had been typed on the command line. 22 | # 23 | # You can encode a module within a module by using the special '&' 24 | # character to interpose another module into the current module. This 25 | # can be useful for creating a module that consists of many directories 26 | # spread out over the entire source repository. 27 | www shoop/www 28 | docs shoop/docs 29 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/modules,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.01.31.08.47.42; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.30.02.10.30; author root; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Added www and docs modules 26 | @ 27 | text 28 | @# Three different line formats are valid: 29 | # key -a aliases... 30 | # key [options] directory 31 | # key [options] directory files... 32 | # 33 | # Where "options" are composed of: 34 | # -i prog Run "prog" on "cvs commit" from top-level of module. 35 | # -o prog Run "prog" on "cvs checkout" of module. 36 | # -e prog Run "prog" on "cvs export" of module. 37 | # -t prog Run "prog" on "cvs rtag" of module. 38 | # -u prog Run "prog" on "cvs update" of module. 39 | # -d dir Place module in directory "dir" instead of module name. 40 | # -l Top-level directory only -- do not recurse. 41 | # 42 | # NOTE: If you change any of the "Run" options above, you'll have to 43 | # release and re-checkout any working directories of these modules. 44 | # 45 | # And "directory" is a path to a directory relative to $CVSROOT. 46 | # 47 | # The "-a" option specifies an alias. An alias is interpreted as if 48 | # everything on the right of the "-a" had been typed on the command line. 49 | # 50 | # You can encode a module within a module by using the special '&' 51 | # character to interpose another module into the current module. This 52 | # can be useful for creating a module that consists of many directories 53 | # spread out over the entire source repository. 54 | www shoop/www 55 | docs shoop/docs 56 | @ 57 | 58 | 59 | 1.1 60 | log 61 | @initial checkin 62 | @ 63 | text 64 | @d27 2 65 | @ 66 | 67 | 68 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/notify: -------------------------------------------------------------------------------- 1 | # The "notify" file controls where notifications from watches set by 2 | # "cvs watch add" or "cvs edit" are sent. The first entry on a line is 3 | # a regular expression which is tested against the directory that the 4 | # change is being made to, relative to the $CVSROOT. If it matches, 5 | # then the remainder of the line is a filter program that should contain 6 | # one occurrence of %s for the user to notify, and information on its 7 | # standard input. 8 | # 9 | # "ALL" or "DEFAULT" can be used in place of the regular expression. 10 | # 11 | # For example: 12 | #ALL mail %s -s "CVS notification" 13 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/notify,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "notify" file controls where notifications from watches set by 23 | # "cvs watch add" or "cvs edit" are sent. The first entry on a line is 24 | # a regular expression which is tested against the directory that the 25 | # change is being made to, relative to the $CVSROOT. If it matches, 26 | # then the remainder of the line is a filter program that should contain 27 | # one occurrence of %s for the user to notify, and information on its 28 | # standard input. 29 | # 30 | # "ALL" or "DEFAULT" can be used in place of the regular expression. 31 | # 32 | # For example: 33 | #ALL mail %s -s "CVS notification" 34 | @ 35 | 36 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/passwd: -------------------------------------------------------------------------------- 1 | anonymous:$1$0H$2/LSjjwDfsSA0gaDYY5Df/:anoncvs_shoop 2 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/rcsinfo: -------------------------------------------------------------------------------- 1 | # The "rcsinfo" file is used to control templates with which the editor 2 | # is invoked on commit and import. 3 | # 4 | # The first entry on a line is a regular expression which is tested 5 | # against the directory that the change is being made to, relative to the 6 | # $CVSROOT. For the first match that is found, then the remainder of the 7 | # line is the name of the file that contains the template. 8 | # 9 | # If the repository name does not match any of the regular expressions in this 10 | # file, the "DEFAULT" line is used, if it is specified. 11 | # 12 | # If the name "ALL" appears as a regular expression it is always used 13 | # in addition to the first matching regex or "DEFAULT". 14 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/rcsinfo,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "rcsinfo" file is used to control templates with which the editor 23 | # is invoked on commit and import. 24 | # 25 | # The first entry on a line is a regular expression which is tested 26 | # against the directory that the change is being made to, relative to the 27 | # $CVSROOT. For the first match that is found, then the remainder of the 28 | # line is the name of the file that contains the template. 29 | # 30 | # If the repository name does not match any of the regular expressions in this 31 | # file, the "DEFAULT" line is used, if it is specified. 32 | # 33 | # If the name "ALL" appears as a regular expression it is always used 34 | # in addition to the first matching regex or "DEFAULT". 35 | @ 36 | 37 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/readers: -------------------------------------------------------------------------------- 1 | anonymous 2 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/taginfo: -------------------------------------------------------------------------------- 1 | # The "taginfo" file is used to control pre-tag checks. 2 | # The filter on the right is invoked with the following arguments: 3 | # 4 | # $1 -- tagname 5 | # $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d 6 | # $3 -- repository 7 | # $4-> file revision [file revision ...] 8 | # 9 | # A non-zero exit of the filter program will cause the tag to be aborted. 10 | # 11 | # The first entry on a line is a regular expression which is tested 12 | # against the directory that the change is being committed to, relative 13 | # to the $CVSROOT. For the first match that is found, then the remainder 14 | # of the line is the name of the filter to run. 15 | # 16 | # If the repository name does not match any of the regular expressions in this 17 | # file, the "DEFAULT" line is used, if it is specified. 18 | # 19 | # If the name "ALL" appears as a regular expression it is always used 20 | # in addition to the first matching regex or "DEFAULT". 21 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/taginfo,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "taginfo" file is used to control pre-tag checks. 23 | # The filter on the right is invoked with the following arguments: 24 | # 25 | # $1 -- tagname 26 | # $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d 27 | # $3 -- repository 28 | # $4-> file revision [file revision ...] 29 | # 30 | # A non-zero exit of the filter program will cause the tag to be aborted. 31 | # 32 | # The first entry on a line is a regular expression which is tested 33 | # against the directory that the change is being committed to, relative 34 | # to the $CVSROOT. For the first match that is found, then the remainder 35 | # of the line is the name of the filter to run. 36 | # 37 | # If the repository name does not match any of the regular expressions in this 38 | # file, the "DEFAULT" line is used, if it is specified. 39 | # 40 | # If the name "ALL" appears as a regular expression it is always used 41 | # in addition to the first matching regex or "DEFAULT". 42 | @ 43 | 44 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/val-tags: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/verifymsg: -------------------------------------------------------------------------------- 1 | # The "verifymsg" file is used to allow verification of logging 2 | # information. It works best when a template (as specified in the 3 | # rcsinfo file) is provided for the logging procedure. Given a 4 | # template with locations for, a bug-id number, a list of people who 5 | # reviewed the code before it can be checked in, and an external 6 | # process to catalog the differences that were code reviewed, the 7 | # following test can be applied to the code: 8 | # 9 | # Making sure that the entered bug-id number is correct. 10 | # Validating that the code that was reviewed is indeed the code being 11 | # checked in (using the bug-id number or a seperate review 12 | # number to identify this particular code set.). 13 | # 14 | # If any of the above test failed, then the commit would be aborted. 15 | # 16 | # Actions such as mailing a copy of the report to each reviewer are 17 | # better handled by an entry in the loginfo file. 18 | # 19 | # One thing that should be noted is the the ALL keyword is not 20 | # supported. There can be only one entry that matches a given 21 | # repository. 22 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/verifymsg,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access ; 3 | symbols ; 4 | locks ; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.01.30.02.10.30; author root; state Exp; 10 | branches; 11 | next ; 12 | 13 | desc 14 | @@ 15 | 16 | 17 | 18 | 1.1 19 | log 20 | @initial checkin@ 21 | text 22 | @# The "verifymsg" file is used to allow verification of logging 23 | # information. It works best when a template (as specified in the 24 | # rcsinfo file) is provided for the logging procedure. Given a 25 | # template with locations for, a bug-id number, a list of people who 26 | # reviewed the code before it can be checked in, and an external 27 | # process to catalog the differences that were code reviewed, the 28 | # following test can be applied to the code: 29 | # 30 | # Making sure that the entered bug-id number is correct. 31 | # Validating that the code that was reviewed is indeed the code being 32 | # checked in (using the bug-id number or a seperate review 33 | # number to identify this particular code set.). 34 | # 35 | # If any of the above test failed, then the commit would be aborted. 36 | # 37 | # Actions such as mailing a copy of the report to each reviewer are 38 | # better handled by an entry in the loginfo file. 39 | # 40 | # One thing that should be noted is the the ALL keyword is not 41 | # supported. There can be only one entry that matches a given 42 | # repository. 43 | @ 44 | 45 | -------------------------------------------------------------------------------- /docs/research/shoop/CVSROOT/writers: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/.cvsignore,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.20.05.37.10; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Ignore some files. 21 | @ 22 | text 23 | @tmp-install 24 | build-stamp 25 | @ 26 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/Attic/BAR.shobj,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.01.27.04.08.54; author joey; state dead; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.27.01.54.56; author joey; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Reworked. 26 | @ 27 | text 28 | @BAR_parent () { 29 | echo "FOO" 30 | } 31 | BAR_name () { 32 | echo "bar" 33 | } 34 | BAR_goodbye () { 35 | true 36 | } 37 | @ 38 | 39 | 40 | 1.1 41 | log 42 | @Added. Crazy. :-) 43 | @ 44 | text 45 | @@ 46 | 47 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/Attic/FOO.shobj,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.01.27.04.08.54; author joey; state dead; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.27.01.54.56; author joey; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Reworked. 26 | @ 27 | text 28 | @FOO_name () { 29 | echo "foo" 30 | } 31 | FOO_hello () { 32 | this=$1 33 | echo "hello, world -- my name is `oosh $this name`" 34 | oosh $this goodbye 35 | } 36 | FOO_goodbye () { 37 | this=$1 38 | echo "Bye now!" 39 | } 40 | @ 41 | 42 | 43 | 1.1 44 | log 45 | @Added. Crazy. :-) 46 | @ 47 | text 48 | @@ 49 | 50 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/Attic/oosh.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.01.27.04.08.54; author joey; state dead; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.27.01.54.56; author joey; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Reworked. 26 | @ 27 | text 28 | @#!/bin/shg -e 29 | # OOP in shell. 30 | 31 | # First parameter is object name. 32 | # Second parameter is method or property to call. 33 | # Remainder of paremters are passed to the method. 34 | oosh () { 35 | _oosh $1 $@@ 36 | } 37 | _oosh () { 38 | local TRUEOBJ=$1 39 | local TRYOBJ=$2 40 | local METH=$3 41 | shift 3 42 | 43 | . $TRYOBJ.shobj 44 | if ! eval ${TRYOBJ}_$METH $TRUEOBJ $@@ 2>/dev/null; then 45 | if [ "`${TRYOBJ}_parent 2>/dev/null`" ]; then 46 | _oosh $TRUEOBJ `${TRYOBJ}_parent` $METH $@@ 47 | else 48 | echo "No such method $METH" >&2 49 | exit 1 50 | fi 51 | fi 52 | } 53 | 54 | oosh BAR hello 55 | oosh FOO hello 56 | @ 57 | 58 | 59 | 1.1 60 | log 61 | @Added. Crazy. :-) 62 | @ 63 | text 64 | @@ 65 | 66 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/Attic/shoop.example.sh,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2000.01.27.09.48.56; author joey; state dead; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2000.01.27.09.18.56; author joey; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2000.01.27.08.43.05; author joey; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2000.01.27.04.08.54; author joey; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @file rename 36 | @ 37 | text 38 | @. shoop.sh 39 | BASE . counter = 10 40 | BASE . count : '$1 . counter = $(expr $($1 . counter) + 1)' 41 | BASE . test = 20 42 | BASE . count 43 | BASE . new FOO 44 | BASE . new BAR 45 | BAR . parent A B C D FOO 46 | FOO . counter 47 | FOO . counter = 1 48 | FOO . count 49 | BAR . test 50 | BASE . count 51 | 52 | . introspect.sh 53 | BAR . introspect 54 | FOO . introspect resolve 55 | BASE . introspect 56 | @ 57 | 58 | 59 | 1.3 60 | log 61 | @Split out introspect. 62 | @ 63 | text 64 | @@ 65 | 66 | 67 | 1.2 68 | log 69 | @Mods from doogie: introspection, multiple inheritance, better knowledge 70 | about when methods are not defined, and a big slowdown, which is being 71 | corrected. 72 | @ 73 | text 74 | @d14 2 75 | @ 76 | 77 | 78 | 1.1 79 | log 80 | @Reworked. 81 | @ 82 | text 83 | @d4 1 84 | d7 2 85 | d12 1 86 | d14 3 87 | @ 88 | 89 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/Makefile.vars,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.02.03.18.46.16; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2000.02.13.02.47.35; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2000.02.12.12.07.59; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Changed some dirs around, thanks to Gergely Nagy. 31 | @ 32 | text 33 | @#!/usr/bin/make -f 34 | # 35 | # This makefile needs GNU make. 36 | # 37 | .EXPORT_ALL_VARIABLES: 38 | prefix=$(CURDIR)/debian/shoop 39 | 40 | FHS=1 41 | ifeq ($(FHS),1) 42 | moddir=/usr/share/shoop/modules 43 | docdir=/usr/share/doc/shoop 44 | mandir=/usr/share/man 45 | else 46 | moddir=/usr/lib/shoop/modules 47 | docdir=/usr/doc/shoop 48 | mandir=/usr/man 49 | endif 50 | bindir=/usr/share/shoop 51 | empdir=$(docdir)/examples 52 | 53 | MODULES_MSG=modules 54 | BINS_MSG=binary 55 | DOCS_MSG=documents 56 | EXAMPLES_MSG=examples 57 | MAN_MSG=man pages 58 | 59 | PKG=shoop 60 | PKG_VER=0.1 61 | 62 | unexport BINS MODULES DOCS EXAMPLES MANPAGES SUBDIRS 63 | 64 | @ 65 | 66 | 67 | 1.2 68 | log 69 | @Move clean target to Makefile.rules. Create docs/modules.pod instead of 70 | docs/modules.txt. 71 | @ 72 | text 73 | @d6 1 74 | a6 1 75 | prefix=$(CURDIR)/debian/tmp 76 | d11 1 77 | a11 1 78 | docdir=/usr/share/doc 79 | d15 1 80 | a15 1 81 | docdir=/usr/doc 82 | d18 1 83 | a18 1 84 | bindir=/usr/bin 85 | @ 86 | 87 | 88 | 1.1 89 | log 90 | @Modularized the make system. The subdirs have simple makefiles now. 91 | @ 92 | text 93 | @d8 10 94 | a17 1 95 | moddir=/usr/share/shoop/modules 96 | a18 2 97 | docdir=/usr/share/doc 98 | mandir=/usr/share/man 99 | @ 100 | 101 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/TODO,v: -------------------------------------------------------------------------------- 1 | head 1.8; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.8 9 | date 2001.03.03.23.33.01; author algernon; state Exp; 10 | branches; 11 | next 1.7; 12 | 13 | 1.7 14 | date 2000.02.12.09.43.03; author doogie; state Exp; 15 | branches; 16 | next 1.6; 17 | 18 | 1.6 19 | date 2000.02.01.20.29.52; author doogie; state Exp; 20 | branches; 21 | next 1.5; 22 | 23 | 1.5 24 | date 2000.01.31.07.41.10; author doogie; state Exp; 25 | branches; 26 | next 1.4; 27 | 28 | 1.4 29 | date 2000.01.31.02.41.51; author doogie; state Exp; 30 | branches; 31 | next 1.3; 32 | 33 | 1.3 34 | date 2000.01.29.11.22.42; author doogie; state Exp; 35 | branches; 36 | next 1.2; 37 | 38 | 1.2 39 | date 2000.01.29.10.54.02; author joey; state Exp; 40 | branches; 41 | next 1.1; 42 | 43 | 1.1 44 | date 2000.01.29.09.48.02; author joey; state Exp; 45 | branches; 46 | next ; 47 | 48 | 49 | desc 50 | @@ 51 | 52 | 53 | 1.8 54 | log 55 | @updated this list a bit 56 | @ 57 | text 58 | @* Here is an optimization to consider. Keep a cache of recently called 59 | methods (by object), and what was finally called. Invalidate when any 60 | parent is changed, or any new method added. Add to the cache whenever 61 | a second level resolve is done to call a method. 62 | DONE (investigate ways to only paritially blow away a cache, instead of 63 | blowing away the whole thing anytime something changes). 64 | DONE 65 | * Severity: critical 66 | Add a way to clear the cache when an object is created/destroyed. 67 | DONE, but it blows away the whole cache. This is sub-obtimal. Lazy 68 | resolving makes this not simple to fix. 69 | 70 | 71 | * Regression test suite. 72 | DONE 73 | * protected/private methods/variables. 74 | DONE 75 | 76 | * A module that implements hashes. 77 | * Command-line option parsing module. 78 | @ 79 | 80 | 81 | 1.7 82 | log 83 | @Everything done. :) 84 | @ 85 | text 86 | @d18 3 87 | @ 88 | 89 | 90 | 1.6 91 | log 92 | @New critical TODO item. 93 | @ 94 | text 95 | @d7 1 96 | a7 1 97 | DONE 98 | d10 3 99 | d15 1 100 | d17 1 101 | @ 102 | 103 | 104 | 1.5 105 | log 106 | @Only clear part of the cache now(Another item done!) 107 | @ 108 | text 109 | @d8 3 110 | @ 111 | 112 | 113 | 1.4 114 | log 115 | @1 item done. 116 | @ 117 | text 118 | @d7 1 119 | @ 120 | 121 | 122 | 1.3 123 | log 124 | @Indentation and a new entry. 125 | @ 126 | text 127 | @d5 2 128 | @ 129 | 130 | 131 | 1.2 132 | log 133 | @added 134 | @ 135 | text 136 | @d1 4 137 | a4 4 138 | * Here is an optimization to consider. Keep a cache of recently called methods 139 | (by object), and what was finally called. Invalidate when any parent is 140 | changed, or any new method added. Add to the cache whenever a second level 141 | resolve is done to call a method. 142 | d6 1 143 | @ 144 | 145 | 146 | 1.1 147 | log 148 | @added 149 | @ 150 | text 151 | @d5 1 152 | @ 153 | 154 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/.cvsignore,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.20.05.37.10; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Ignore some files. 21 | @ 22 | text 23 | @*.debhelper 24 | files 25 | shoop 26 | shoop-modules 27 | shoop-dev 28 | @ 29 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/Attic/shoop.docs,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.02.17.21.45.46; author algernon; state dead; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.02.08.19.17.13; author algernon; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @removed. there are no docs in shoop anymore. 26 | @ 27 | text 28 | @docs/shoop.txt 29 | @ 30 | 31 | 32 | 1.1 33 | log 34 | @new file 35 | @ 36 | text 37 | @@ 38 | 39 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/changelog,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2001.07.07.12.51.01; author algernon; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2001.06.20.20.15.50; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2001.03.01.19.04.56; author doogie; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2001.02.08.19.17.13; author algernon; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @fixed the debian/rules policy violation too 36 | @ 37 | text 38 | @shoop (UNRELEASE) unstable; urgency=low 39 | 40 | * Removed bashism from debian/rules. Closes: #88067 41 | * Don't use "$@@" when using local to assign variables. Closes: #101623. 42 | * debian/rules rewritten as a Makefile. Closes: #88063 43 | 44 | -- Gergely Nagy UNRELEASED 45 | 46 | shoop (0.1) unstable; urgency=low 47 | 48 | * Initial release (closes: Bug#84406). 49 | 50 | -- Gergely Nagy <8@@free.bsd.hu> Wed, 31 Jan 2001 10:21:08 +0100 51 | 52 | Local variables: 53 | mode: debian-changelog 54 | add-log-mailing-address "8@@free.bsd.hu" 55 | End: 56 | @ 57 | 58 | 59 | 1.3 60 | log 61 | @Note the bug that was fixed with the last checkin. 62 | @ 63 | text 64 | @d5 1 65 | d7 1 66 | a7 1 67 | -- Gergely Nagy <8@@free.bsd.hu> UNRELEASED 68 | @ 69 | 70 | 71 | 1.2 72 | log 73 | @Removed bashism from debian/rules. 74 | @ 75 | text 76 | @d4 1 77 | @ 78 | 79 | 80 | 1.1 81 | log 82 | @new file 83 | @ 84 | text 85 | @d1 6 86 | @ 87 | 88 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/control,v: -------------------------------------------------------------------------------- 1 | head 1.5; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.5 9 | date 2001.07.07.12.50.26; author algernon; state Exp; 10 | branches; 11 | next 1.4; 12 | 13 | 1.4 14 | date 2001.02.18.18.20.35; author algernon; state Exp; 15 | branches; 16 | next 1.3; 17 | 18 | 1.3 19 | date 2001.02.17.21.41.24; author algernon; state Exp; 20 | branches; 21 | next 1.2; 22 | 23 | 1.2 24 | date 2001.02.17.18.10.42; author algernon; state Exp; 25 | branches; 26 | next 1.1; 27 | 28 | 1.1 29 | date 2001.02.08.19.17.13; author algernon; state Exp; 30 | branches; 31 | next ; 32 | 33 | 34 | desc 35 | @@ 36 | 37 | 38 | 1.5 39 | log 40 | @changed maintainer to the list 41 | @ 42 | text 43 | @Source: shoop 44 | Section: devel 45 | Priority: extra 46 | Maintainer: SHOOP developers 47 | Build-Depends: debhelper (>= 2.0.40), perl 48 | Standards-Version: 3.5.5 49 | 50 | Package: shoop 51 | Architecture: all 52 | Recommends: shoop-modules (>= ${Source-Version}) 53 | Description: The SHell Object Oriented Programming library 54 | Every language under the sun these days is Object Oriented. 55 | In an effort to make POSIX shell more buzzword compliant, and 56 | to show that it's really not a big deal for a language to lack 57 | built-in OO support, we have added object orientation to plain 58 | old shell script. Specifically, we have implemented classless 59 | OO with introspection, finalization, serialization, and multiple 60 | inheritance. 61 | 62 | Package: shoop-modules 63 | Architecture: all 64 | Depends: shoop (>= ${Source-Version}) 65 | Description: A collection of shoop modules 66 | This package includes various modules for shoop, such as 67 | introspect, prettyprint, serialize, and some others. 68 | . 69 | It is a good idea to have these at hand! 70 | 71 | Package: shoop-dev 72 | Architecture: all 73 | Depends: shoop (>= ${Source-Version}) 74 | Description: Development files and documention for shoop 75 | Herein lies example code, utility programs, and documentation 76 | for shoop, the SHell Object Oriented Programming library. 77 | @ 78 | 79 | 80 | 1.4 81 | log 82 | @build depend only on perl, not perl5, to reflect recent reorganization 83 | @ 84 | text 85 | @d4 1 86 | a4 1 87 | Maintainer: Gergely Nagy 88 | d6 1 89 | a6 1 90 | Standards-Version: 3.5.0 91 | @ 92 | 93 | 94 | 1.3 95 | log 96 | @added shoop-dev 97 | @ 98 | text 99 | @d5 1 100 | a5 1 101 | Build-Depends: debhelper (>= 2.0.40), perl5 102 | d11 1 103 | a11 1 104 | Description: OOP in shell 105 | @ 106 | 107 | 108 | 1.2 109 | log 110 | @changed maintainer address to shoop-devel 111 | @ 112 | text 113 | @d28 7 114 | @ 115 | 116 | 117 | 1.1 118 | log 119 | @new file 120 | @ 121 | text 122 | @d4 1 123 | a4 1 124 | Maintainer: Gergely Nagy <8@@free.bsd.hu> 125 | @ 126 | 127 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/copyright,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.08.19.17.13; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @new file 21 | @ 22 | text 23 | @This package was debianized by Gergely Nagy <8@@free.bsd.hu> on 24 | Wed, 31 Jan 2001 10:21:08 +0100. 25 | 26 | It was checked out from 27 | :pserver:anonymous@@cvs.shoop.sourceforge.net:/cvsroot/shoop 28 | 29 | Upstream Authors: Joey Hess , 30 | Adam Heath 31 | 32 | Copyright: 33 | 34 | This package is free software; you can redistribute it and/or 35 | modify it under the terms of the GNU Lesser General Public 36 | License as published by the Free Software Foundation; either 37 | version 2 of the License, or (at your option) any later version. 38 | 39 | This package is distributed in the hope that it will be useful, 40 | but WITHOUT ANY WARRANTY; without even the implied warranty of 41 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42 | Lesser General Public License for more details. 43 | 44 | You should have received a copy of the GNU Lesser General Public 45 | License along with this package; if not, write to the Free Software 46 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 47 | 48 | On Debian GNU/Linux systems, the complete text of the GNU Lesser General 49 | Public License can be found in `/usr/share/common-licenses/LGPL'. 50 | @ 51 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/shoop-dev.dirs,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.17.21.50.02; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @new files 21 | @ 22 | text 23 | @usr/share/doc/shoop 24 | usr/share/doc/shoop/examples 25 | usr/share/doc/shoop/examples/modules 26 | usr/share/doc/shoop/examples/t 27 | usr/share/doc/shoop/examples/utils 28 | @ 29 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/shoop-dev.docs,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.17.21.50.02; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @new files 21 | @ 22 | text 23 | @docs/shoop.txt 24 | @ 25 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/shoop-dev.examples,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.07.07.13.23.34; author algernon; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.02.22.20.58.44; author algernon; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2001.02.17.21.50.02; author algernon; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @synced with current module and test list 31 | @ 32 | text 33 | @modules/alist.sh 34 | modules/also_inherit.sh 35 | modules/apt.sh 36 | modules/destroy.sh 37 | modules/dns.sh 38 | modules/final.sh 39 | modules/introspect.sh 40 | modules/list.sh 41 | modules/onexit.sh 42 | modules/prettyprint.sh 43 | modules/ref.sh 44 | modules/rules_debian.sh 45 | modules/serialize.sh 46 | modules/shoop.sh 47 | modules/shoop_command.sh 48 | modules/stack.sh 49 | modules/stringutil.sh 50 | modules/thread.sh 51 | modules/use.sh 52 | modules/www.sh 53 | t/alist.sh 54 | t/benchmark 55 | t/benchmark.bm 56 | t/ifs.sh 57 | t/inheritance.sh 58 | t/metachars.sh 59 | t/list.sh 60 | t/onexit.sh 61 | t/ref.sh 62 | t/regress 63 | t/serialize.sh 64 | t/shoop2.sh 65 | t/shoop_command.sh 66 | t/stack.sh 67 | t/stringutil.sh 68 | t/super.sh 69 | utils/shell-stripper 70 | utils/shelldoc 71 | shoop.sh 72 | shoop2.sh 73 | example.sh 74 | @ 75 | 76 | 77 | 1.2 78 | log 79 | @Sync with current module and test list. 80 | @ 81 | text 82 | @d1 1 83 | d11 1 84 | d14 2 85 | d17 1 86 | d21 1 87 | d24 1 88 | d26 1 89 | d31 3 90 | d35 2 91 | d40 1 92 | @ 93 | 94 | 95 | 1.1 96 | log 97 | @new files 98 | @ 99 | text 100 | @a0 2 101 | utils/shell-stripper 102 | utils/shelldoc 103 | d7 2 104 | d12 1 105 | d19 3 106 | d23 3 107 | @ 108 | 109 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/debian/shoop-modules.dirs,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.02.17.21.55.03; author algernon; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.02.08.19.17.13; author algernon; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @updated directory list 26 | @ 27 | text 28 | @usr/share/doc/shoop 29 | usr/share/shoop 30 | @ 31 | 32 | 33 | 1.1 34 | log 35 | @new file 36 | @ 37 | text 38 | @d1 1 39 | a2 1 40 | usr/share/doc/shoop-modules 41 | @ 42 | 43 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/.cvsignore,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.20.05.37.10; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Ignore some files. 21 | @ 22 | text 23 | @modules.pod 24 | modules.txt 25 | @ 26 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/AUTHORS,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.02.08.22.06.00; author algernon; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.29.19.27.19; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @added myself (for the sake of mkChangeLog) 26 | @ 27 | text 28 | @CVS:joey Joey Hess 29 | CVS:doogie Adam Heath 30 | CVS:algernon Gergely Nagy 31 | @ 32 | 33 | 34 | 1.1 35 | log 36 | @Table of cvs names to real names and email address. 37 | @ 38 | text 39 | @d3 1 40 | @ 41 | 42 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/CONTRIBUTING,v: -------------------------------------------------------------------------------- 1 | head 1.9; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.9 9 | date 2000.01.29.10.26.34; author joey; state Exp; 10 | branches; 11 | next 1.8; 12 | 13 | 1.8 14 | date 2000.01.29.06.19.36; author joey; state Exp; 15 | branches; 16 | next 1.7; 17 | 18 | 1.7 19 | date 2000.01.29.05.50.59; author joey; state Exp; 20 | branches; 21 | next 1.6; 22 | 23 | 1.6 24 | date 2000.01.29.05.25.55; author joey; state Exp; 25 | branches; 26 | next 1.5; 27 | 28 | 1.5 29 | date 2000.01.29.05.22.59; author doogie; state Exp; 30 | branches; 31 | next 1.4; 32 | 33 | 1.4 34 | date 2000.01.29.04.59.59; author doogie; state Exp; 35 | branches; 36 | next 1.3; 37 | 38 | 1.3 39 | date 2000.01.29.04.26.34; author joey; state Exp; 40 | branches; 41 | next 1.2; 42 | 43 | 1.2 44 | date 2000.01.29.03.36.08; author joey; state Exp; 45 | branches; 46 | next 1.1; 47 | 48 | 1.1 49 | date 2000.01.27.11.06.55; author joey; state Exp; 50 | branches; 51 | next ; 52 | 53 | 54 | desc 55 | @@ 56 | 57 | 58 | 1.9 59 | log 60 | @Swapped MODULES and CONTRIBUTING filenames. 61 | We'd the README 62 | @ 63 | text 64 | @If you come up with any useful base objects, or extention modules send them 65 | to me, Joey Hess , copyrighted under the GPL, LGPL, or BSD 66 | copyright (sans advertising clause), and I'll add them into shoop. 67 | @ 68 | 69 | 70 | 1.8 71 | log 72 | @Broke up MODULES and CONTRIBUTING 73 | @ 74 | text 75 | @d1 3 76 | a3 9 77 | Several modules expand shoop so it can do various object oriented things: 78 | 79 | introspect.sh - list all methods and variables that are defined on a class 80 | final.sh - make class variables and methods final 81 | serialize.sh - dump out objects in a format that can be re-loaded later 82 | prettyprint.sh - output a c++/java like represantation of a class 83 | use.sh - imports shoop modules, and keeps multiple definitions 84 | from happening. 85 | destroy.sh - destroy objects 86 | @ 87 | 88 | 89 | 1.7 90 | log 91 | @Added destroy.sh 92 | @ 93 | text 94 | @d1 1 95 | a1 4 96 | If you come up with any useful base objects, or extention modules send them 97 | to me, Joey Hess , copyrighted under the GPL, LGPL, or BSD 98 | copyright (sans advertising clause), and I'll add them in. Currently, I 99 | have: 100 | @ 101 | 102 | 103 | 1.6 104 | log 105 | @reword 106 | @ 107 | text 108 | @d12 1 109 | @ 110 | 111 | 112 | 1.5 113 | log 114 | @Add a 'OBJECT . use foo bar baz', which will import foo.sh, bar.sh, and 115 | baz.sh. It makes sure that each module is only imported once. 116 | @ 117 | text 118 | @d1 4 119 | a4 3 120 | If you come up with any useful base objects, send them to me, Joey Hess 121 | , copyrighted under the GPL, LGPL, or BSD copyright (sans 122 | advertising clause), and I'll add them in. Currently, I have: 123 | @ 124 | 125 | 126 | 1.4 127 | log 128 | @Add prettyprint.sh 129 | @ 130 | text 131 | @d9 2 132 | @ 133 | 134 | 135 | 1.3 136 | log 137 | @redid comment 138 | @ 139 | text 140 | @d5 4 141 | a8 3 142 | introspect.sh - list all methods and variables that are defined on a class 143 | final.sh - make class variables and methods final 144 | serialize.sh - dump out objects in a format that can be re-loaded later 145 | @ 146 | 147 | 148 | 1.2 149 | log 150 | @Broke finalization out into a module. 151 | @ 152 | text 153 | @d7 1 154 | @ 155 | 156 | 157 | 1.1 158 | log 159 | @added 160 | @ 161 | text 162 | @d6 1 163 | @ 164 | 165 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/MODULES,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2000.01.29.10.57.18; author joey; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2000.01.29.10.32.56; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2000.01.29.10.26.34; author joey; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2000.01.29.06.19.36; author joey; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @them ain't real threads 36 | (added header) 37 | @ 38 | text 39 | @Several modules expand shoop so it can do various object oriented things: 40 | 41 | introspect.sh - list all methods and variables that are defined on a class 42 | final.sh - make class variables and methods final 43 | serialize.sh - dump out objects in a format that can be re-loaded later 44 | prettyprint.sh - output a c++/java like represantation of a class 45 | use.sh - imports shoop modules, and keeps multiple definitions 46 | from happening. 47 | destroy.sh - destroy objects 48 | thread.sh - pseudothreads 49 | @ 50 | 51 | 52 | 1.3 53 | log 54 | @Implemented simplistic threading support. 55 | @ 56 | text 57 | @d10 1 58 | a10 1 59 | thread.sh - base support for simple threading. 60 | @ 61 | 62 | 63 | 1.2 64 | log 65 | @Swapped MODULES and CONTRIBUTING filenames. 66 | We'd the README 67 | @ 68 | text 69 | @d10 1 70 | @ 71 | 72 | 73 | 1.1 74 | log 75 | @Broke up MODULES and CONTRIBUTING 76 | @ 77 | text 78 | @d1 9 79 | a9 3 80 | If you come up with any useful base objects, or extention modules send them 81 | to me, Joey Hess , copyrighted under the GPL, LGPL, or BSD 82 | copyright (sans advertising clause), and I'll add them into shoop. 83 | @ 84 | 85 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.02.07.49.27; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.02.12.12.08.00; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Include Makefile.vars 26 | @ 27 | text 28 | @#!/usr/bin/make -f 29 | # 30 | # This makefile needs GNU make. 31 | # 32 | TOPDIR=.. 33 | 34 | DOCS=\ 35 | CONTRIBUTING\ 36 | MODULES\ 37 | README\ 38 | modules.txt\ 39 | 40 | include $(TOPDIR)/Makefile.vars 41 | include $(TOPDIR)/Makefile.rules 42 | @ 43 | 44 | 45 | 1.1 46 | log 47 | @Modularized the make system. The subdirs have simple makefiles now. 48 | @ 49 | text 50 | @d13 1 51 | @ 52 | 53 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/docs/shoop.txt,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.02.08.00.05.21; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.02.03.05.20.22; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Document the new p assignment operator. 26 | @ 27 | text 28 | @Introduction: 29 | 30 | Every language under the sun these days is Object Oriented. In an 31 | effort to make POSIX shell more buzzword compliant, and to show 32 | that it's really not a big deal for a language to lack built-in OO 33 | support, we have added object orientation to plain old shell 34 | script. Specifically, we have implemented classless OO with intro- 35 | spection, finalization, serialization, and multiple inheritance. 36 | Even then, most of these buzzword features are add-on modules. 37 | 38 | Shoop scripts look similiar to some OO languages, but there are 39 | various differences. Most of these differences stem from the fact 40 | that the shell is the limiting factor. 41 | 42 | 43 | Statements: 44 | 45 | A valid shoop statement has the following form: 46 | 47 | . [ \.?[=:]q?p?) (|)] 48 | 49 | Each item as the following definitions: 50 | 51 | obj: 52 | 53 | The name of the object. 54 | 55 | variable: 56 | 57 | A non-typed variable. This, in grand shell fashion, stores 58 | its data as a string. 59 | 60 | name: 61 | 62 | The name of the method or variable in which to access. 63 | 64 | value: 65 | 66 | The text string that should be assigned to the variable or 67 | method. 68 | 69 | 70 | Assignments: 71 | 72 | When the character immediately following the method/variable is 73 | '=' or ':', an assignment takes place. If the character is '=', 74 | the name refers to a variable, and the value is treated as a text 75 | string. If the character is ':', then the name is a method. 76 | 77 | There are 3 assignment modifiers that can be used. If the above 78 | character is preceeded with '.', then this means to append the new 79 | value to the current value. A 'q' on the end means to not echo 80 | the results of the assignment('q' only makes sense when assigning 81 | to a variable). If the 'p' modifier is used, then the method/ 82 | variable is invisible to introspection. All the distributed 83 | modules use :p. 84 | 85 | Methods: 86 | 87 | Methods are short shell snippets, that process arguments, and 88 | optionally return data. 89 | 90 | code: 91 | 92 | The program code that should be run. The shell variable $THIS 93 | will contain the name of the current object, and the positional 94 | parameters("$@@", $*, etc) will contain the method arguments. 95 | 96 | method: 97 | 98 | A function or subroutine that optionally takes a list of argu- 99 | ments. 100 | 101 | See also: 102 | 103 | modules.txt 104 | @ 105 | 106 | 107 | 1.1 108 | log 109 | @An attempt at some formatted docs, with a little more detail. 110 | @ 111 | text 112 | @d20 1 113 | a20 1 114 | . [ \.?[=:]q?) (|)] 115 | d50 7 116 | a56 5 117 | There are currently 2 assignment modifiers that can be used. If 118 | the above character is preceeded with '.', then this means to 119 | append the new value to the current value. A 'q' on the end means 120 | to not echo the results of the assignment. 'q' only makes sense 121 | when assigning to a variable. 122 | a62 2 123 | 124 | 125 | a73 2 126 | 127 | 128 | d76 1 129 | a76 2 130 | introspect.txt, finalize.txt, serialize.txt, also_inherit.txt, 131 | and use.txt. 132 | @ 133 | 134 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/example.sh,v: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ${SHOOPSH:-/usr/share/shoop/shoop.sh} 3 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 4 | OBJECT . use introspect serialize final destroy thread prettyprint 5 | _USE . showdeps 6 | 7 | THREAD . new TT 8 | TT . run : ' 9 | local a; 10 | for a in $(seq 1 5);do 11 | echo $a; 12 | sleep 1; 13 | done 14 | ' 15 | #TT . start 16 | #sleep 3 17 | #TT . wait 18 | #exit 19 | 20 | echo some counters: 21 | OBJECT . counter = 10 22 | OBJECT . counter 23 | echo 24 | OBJECT . count : '$THIS . counter = $(expr $($THIS . counter) + 1); return' 25 | OBJECT . test = 20 26 | OBJECT . final test 27 | echo 28 | OBJECT . count 29 | echo 30 | OBJECT . new FOO 31 | OBJECT . new BAR 32 | BAR . parent = A B FOO C D OBJECT > /dev/null 33 | BAR . test 34 | echo 35 | # This will produce an error. 36 | BAR . blah 37 | FOO . count : '$THIS . counter = $(expr $($THIS . counter) \* 2 + $($THIS . super)); return' 38 | FOO . counter = 1 39 | echo 40 | FOO . count 41 | echo 42 | FOO . count 43 | echo 44 | FOO . count 45 | echo 46 | OBJECT . count 47 | echo 48 | 49 | echo introspecting BAR 50 | BAR . introspect 51 | OBJECT . prettyprint 52 | echo introspecting FOO 53 | FOO . introspect resolve 54 | 55 | echo serializing OBJECT 56 | #OBJECT . serialize 57 | echo serializing FOO to temporary file 58 | FOO . serialize > FOO.sh.tmp 59 | 60 | echo destroying FOO 61 | FOO . destroy 62 | set | grep FOO 63 | echo loading FOO 64 | . ./FOO.sh.tmp >/dev/null 65 | rm -f FOO.sh.tmp 66 | FOO . count 67 | echo 68 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.10; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.10 9 | date 2001.03.06.08.36.34; author doogie; state Exp; 10 | branches; 11 | next 1.9; 12 | 13 | 1.9 14 | date 2001.03.05.10.09.34; author doogie; state Exp; 15 | branches; 16 | next 1.8; 17 | 18 | 1.8 19 | date 2001.03.02.18.36.40; author doogie; state Exp; 20 | branches; 21 | next 1.7; 22 | 23 | 1.7 24 | date 2001.03.02.07.31.04; author doogie; state Exp; 25 | branches; 26 | next 1.6; 27 | 28 | 1.6 29 | date 2001.03.02.06.54.39; author doogie; state Exp; 30 | branches; 31 | next 1.5; 32 | 33 | 1.5 34 | date 2001.02.20.23.07.56; author doogie; state Exp; 35 | branches; 36 | next 1.4; 37 | 38 | 1.4 39 | date 2001.02.20.23.04.24; author doogie; state Exp; 40 | branches; 41 | next 1.3; 42 | 43 | 1.3 44 | date 2001.02.20.07.14.11; author doogie; state Exp; 45 | branches; 46 | next 1.2; 47 | 48 | 1.2 49 | date 2001.02.03.18.48.11; author doogie; state Exp; 50 | branches; 51 | next 1.1; 52 | 53 | 1.1 54 | date 2000.02.12.12.09.22; author doogie; state Exp; 55 | branches; 56 | next ; 57 | 58 | 59 | desc 60 | @@ 61 | 62 | 63 | 1.10 64 | log 65 | @This module contains 2 methods, ord and chr. It also contains 2 variables, 66 | zero, which signifies whether the builtin command echo needs a leading 67 | zero when interpeting octal values during -e, and chars, which holds all 68 | 256 characaters(with as a placeholder for \0 and \210(ash bug)). 69 | @ 70 | text 71 | @#!/usr/bin/make -f 72 | # 73 | # This makefile needs GNU make. 74 | # 75 | TOPDIR=.. 76 | 77 | MODULES=\ 78 | destroy.sh\ 79 | final.sh\ 80 | introspect.sh\ 81 | prettyprint.sh\ 82 | serialize.sh\ 83 | thread.sh\ 84 | use.sh\ 85 | also_inherit.sh\ 86 | www.sh\ 87 | dns.sh\ 88 | list.sh\ 89 | stack.sh\ 90 | onexit.sh\ 91 | alist.sh\ 92 | ref.sh\ 93 | shoop.sh\ 94 | shoop_command.sh\ 95 | stringutil.sh\ 96 | 97 | include $(TOPDIR)/Makefile.vars 98 | include $(TOPDIR)/Makefile.rules 99 | @ 100 | 101 | 102 | 1.9 103 | log 104 | @Oops. Add the modules to the makefile. 105 | @ 106 | text 107 | @d25 1 108 | @ 109 | 110 | 111 | 1.8 112 | log 113 | @Include Makefile.vars 114 | @ 115 | text 116 | @d23 2 117 | @ 118 | 119 | 120 | 1.7 121 | log 122 | @Moved all reference code out of shoop, and into a separate module. All 123 | created references has OBJECT_REF as their primary parent, and multiple 124 | inheritance is used to support supplementary classes. There areno docs 125 | yet, see the testing scripts as to how to use. 126 | @ 127 | text 128 | @d24 1 129 | @ 130 | 131 | 132 | 1.6 133 | log 134 | @An associative list module. No docs yet, look at the test script to see 135 | how to use it. 136 | @ 137 | text 138 | @d22 1 139 | @ 140 | 141 | 142 | 1.5 143 | log 144 | @Add preliminary onexit module. The code works, but it doesn't yet hook 145 | inself into running when the script exits. 146 | @ 147 | text 148 | @d21 1 149 | @ 150 | 151 | 152 | 1.4 153 | log 154 | @Add a stack method, based upon list. 155 | @ 156 | text 157 | @d20 1 158 | @ 159 | 160 | 161 | 1.3 162 | log 163 | @Added LIST module. No documentation yet. 164 | @ 165 | text 166 | @d19 1 167 | @ 168 | 169 | 170 | 1.2 171 | log 172 | @Preliminary dns support. 173 | @ 174 | text 175 | @d18 1 176 | @ 177 | 178 | 179 | 1.1 180 | log 181 | @Modularized the make system. The subdirs have simple makefiles now. 182 | @ 183 | text 184 | @d17 1 185 | @ 186 | 187 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/TODO,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.02.21.15.14.39; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.02.20.08.08.54; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @No need to use shoop 'd' command to erase memory for destroy.sh, as it was 26 | doing it all along by hand. 27 | @ 28 | text 29 | @destroy.sh: 30 | DONE delete object references using new 'd' command 31 | The above is being done the same was as the 'd' command, it just isn't 32 | calling _shoop to do it, for speed reasons. 33 | 34 | final.sh: 35 | * set the variable/method to 'protected' using shoop commands 36 | @ 37 | 38 | 39 | 1.1 40 | log 41 | @Some items that need to be done for modules. 42 | @ 43 | text 44 | @d2 3 45 | a4 1 46 | * delete object references using new 'd' command 47 | @ 48 | 49 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/alist.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.02.07.31.04; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.03.02.06.54.39; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Moved all reference code out of shoop, and into a separate module. All 26 | created references has OBJECT_REF as their primary parent, and multiple 27 | inheritance is used to support supplementary classes. There areno docs 28 | yet, see the testing scripts as to how to use. 29 | @ 30 | text 31 | @OBJECT . use list destroy 32 | LIST . new ALIST 33 | 34 | OBJECT . new ALIST_ENTRY 35 | ALIST_ENTRY . getkey = "" 36 | ALIST_ENTRY . getvalue = "" 37 | 38 | ALIST . newpair :p ' 39 | OBJECT_REF . _ref $1 40 | eval local ref=\$$1; 41 | shift 42 | ALIST_ENTRY . new $ref 43 | $ref . getkey =q "$1" 44 | $ref . getvalue =q "$2" 45 | ' 46 | 47 | ALIST . set :p ' 48 | local pos=$1 ref; shift 49 | $THIS . newpair ref "$1" "$2" 50 | set -- $($THIS . _order) 51 | eval $THIS . _\$$pos =q \"\$ref\" 52 | ' 53 | ALIST . getkey :p ' 54 | local pos="$1" ref=$($THIS . get "$1"); shift 55 | $ref . getkey 56 | ' 57 | ALIST . setkey :p ' 58 | local pos="$1" ref=$($THIS . get "$1"); shift 59 | $ref . getkey = "$@@" 60 | ' 61 | ALIST . getvalue :p ' 62 | local pos="$1" ref=$($THIS . get "$1"); shift 63 | $ref . getvalue 64 | ' 65 | ALIST . setvalue :p ' 66 | local pos="$1" ref=$($THIS . get "$1"); shift 67 | $ref . getvalue = "$@@" 68 | ' 69 | ALIST . drop :p ' 70 | local ref=$($THIS . get $1) 71 | $ref . destroy 72 | $THIS . super "$@@" >/dev/null 73 | ' 74 | ALIST . delete :p ' 75 | $THIS . super "$@@" > /dev/null 76 | ' 77 | @ 78 | 79 | 80 | 1.1 81 | log 82 | @An associative list module. No docs yet, look at the test script to see 83 | how to use it. 84 | @ 85 | text 86 | @d9 1 87 | a9 1 88 | OBJECT . _ref $1 89 | @ 90 | 91 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/apt.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2000.02.12.12.14.18; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @An object that can talk to the transfer modules from apt. 21 | @ 22 | text 23 | @OBJECT . new APT 24 | 25 | APT . methoddir =q /usr/lib/apt/methods 26 | APT . fetch : ' 27 | local method=$1 uri file aptmethod counter entity; shift 28 | aptmethod=$($THIS . methoddir)/$method 29 | if [ ! -x $aptmethod ]; then 30 | echo "Method \`$method\` not found!" 31 | return 1 32 | fi 33 | while [ $# -gt 0 ]; do 34 | counter=$(($counter + 1)) 35 | local fetch_uri_$counter="$1" fetch_file_$counter="$2" 36 | shift 2 37 | entity="$entity $counter" 38 | done 39 | (cat << _EOF_ 40 | 601 Configuation 41 | Config-Item: Debug::Acquire::http=true 42 | 43 | _EOF_ 44 | for a in $entity; do 45 | eval uri=\$fetch_uri_$a file=\$fetch_file_$a 46 | rm -f $file 47 | cat << _EOF_ 48 | 600 URI Acquire 49 | URI: $uri 50 | Filename: $file 51 | 52 | _EOF_ 53 | sleep 1 54 | done) | 55 | ( 56 | while read; do 57 | echo "to method [$REPLY]" >&2 58 | echo "$REPLY" 59 | done 60 | ) | 61 | ($aptmethod; echo -e "999 Method done\nExit-Status: $?")| 62 | ( 63 | while read; do 64 | echo "from method {$REPLY}" >&2 65 | if [ "$inmsg" ]; then 66 | : 67 | else 68 | : 69 | fi 70 | done 71 | ) 72 | echo $? 73 | wait 74 | ' 75 | @ 76 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/final.sh,v: -------------------------------------------------------------------------------- 1 | head 1.10; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.10 9 | date 2001.02.21.19.04.00; author doogie; state Exp; 10 | branches; 11 | next 1.9; 12 | 13 | 1.9 14 | date 2000.02.13.04.27.58; author doogie; state Exp; 15 | branches; 16 | next 1.8; 17 | 18 | 1.8 19 | date 2000.02.08.00.20.27; author doogie; state Exp; 20 | branches; 21 | next 1.7; 22 | 23 | 1.7 24 | date 2000.02.06.23.40.53; author doogie; state Exp; 25 | branches; 26 | next 1.6; 27 | 28 | 1.6 29 | date 2000.02.06.04.35.57; author doogie; state Exp; 30 | branches; 31 | next 1.5; 32 | 33 | 1.5 34 | date 2000.02.06.04.16.55; author doogie; state Exp; 35 | branches; 36 | next 1.4; 37 | 38 | 1.4 39 | date 2000.01.29.16.44.42; author doogie; state Exp; 40 | branches; 41 | next 1.3; 42 | 43 | 1.3 44 | date 2000.01.29.04.52.01; author doogie; state Exp; 45 | branches; 46 | next 1.2; 47 | 48 | 1.2 49 | date 2000.01.29.04.19.18; author joey; state Exp; 50 | branches; 51 | next 1.1; 52 | 53 | 1.1 54 | date 2000.01.29.03.36.08; author joey; state Exp; 55 | branches; 56 | next ; 57 | 58 | 59 | desc 60 | @@ 61 | 62 | 63 | 1.10 64 | log 65 | @Set the variable/method to protected status as well in _shoop. 66 | @ 67 | text 68 | @#!/bin/sh -e 69 | # 70 | # Finalization module for shoop. Expands the OBJECT class with a finalize 71 | # method. The method takes the names of a list of properites and/or methods 72 | # that should become final. (Though they may be overridden in a child class.) 73 | # 74 | # LGPL copyright 2000 by Adam Heath 75 | 76 | ## Passing a list of methods and/or variables to this method will finalize 77 | ## each item. It does this thru the use of the shell builtin 'readonly.' 78 | ## Once this is done, there is no way to 'destroy' this method, nor is 79 | ## there any way to change the value. 80 | ## 81 | ## This also sets the item to protected in shoop speak, so that _shoop can 82 | ## detect the readonlyness of the item, and issue a warning. 83 | 84 | IFS=" " OBJECT . final :p ' 85 | local item varmeth 86 | for item in $@@; do 87 | if eval [ -z \"\$_shoopfinal_${THIS}_$item\" ]; then 88 | eval "readonly _shoop_${THIS}_$item 89 | _shoopfinal_${THIS}_$item=1 90 | _shoopfinal_$THIS=\"\$_shoopfinal_$THIS $item\"" 91 | fi 92 | if eval [ \"\$_shooptype_${THIS}_$item\" = variable ]; then 93 | $THIS . $item =p 94 | else 95 | $THIS . $item :p 96 | fi 97 | done 98 | return 99 | ' 100 | @ 101 | 102 | 103 | 1.9 104 | log 105 | @Commenting and adding perldoc stuff. 106 | @ 107 | text 108 | @d13 3 109 | d18 1 110 | a18 1 111 | local item 112 | d24 5 113 | @ 114 | 115 | 116 | 1.8 117 | log 118 | @Changed license to LGPL, and added preliminary inline document support. 119 | @ 120 | text 121 | @d9 5 122 | @ 123 | 124 | 125 | 1.7 126 | log 127 | @Define the method final instead of finalize. Modified comments and code 128 | in all introspection type files to be consistent. Added copyright to 129 | final.sh. 130 | @ 131 | text 132 | @d7 1 133 | a7 1 134 | # GPL copyright 2000 by Adam Heath 135 | @ 136 | 137 | 138 | 1.6 139 | log 140 | @Add support for declare methods and variables that are private, and are 141 | invisible to introspection. Append 'p' to the '=' or ':'. 142 | @ 143 | text 144 | @d6 2 145 | d9 1 146 | a9 1 147 | IFS=" " OBJECT . finalize :p ' 148 | @ 149 | 150 | 151 | 1.5 152 | log 153 | @Remove extraneous ';', as they detract from the code. 154 | @ 155 | text 156 | @d7 1 157 | a7 1 158 | IFS=" " OBJECT . finalize : ' 159 | @ 160 | 161 | 162 | 1.4 163 | log 164 | @Add 'returns' to all defined object methods. 165 | @ 166 | text 167 | @d8 1 168 | a8 1 169 | local item; 170 | d11 3 171 | a13 3 172 | eval "readonly _shoop_${THIS}_$item; 173 | _shoopfinal_${THIS}_$item=1; 174 | _shoopfinal_$THIS=\"\$_shoopfinal_$THIS $item\""; 175 | d15 1 176 | a15 1 177 | done; 178 | @ 179 | 180 | 181 | 1.3 182 | log 183 | @Can serialize finalized variable/methods now. Also, the serialized output 184 | of methods retains the original formatting. 185 | @ 186 | text 187 | @d15 2 188 | a16 1 189 | done 190 | @ 191 | 192 | 193 | 1.2 194 | log 195 | @Renamed BASE to OBJECT 196 | @ 197 | text 198 | @d7 1 199 | a7 1 200 | OBJECT . finalize : ' 201 | d10 5 202 | a14 1 203 | eval readonly _shoop_${THIS}_${item}; 204 | @ 205 | 206 | 207 | 1.1 208 | log 209 | @Broke finalization out into a module. 210 | @ 211 | text 212 | @d3 1 213 | a3 1 214 | # Finalization module for shoop. Expands the BASE class with a finalize 215 | d7 1 216 | a7 1 217 | BASE . finalize : ' 218 | @ 219 | 220 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/onexit.sh,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2001.02.24.01.33.36; author doogie; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2001.02.21.19.06.23; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2001.02.21.15.50.32; author doogie; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2001.02.20.23.07.56; author doogie; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @Typo in docs. 36 | @ 37 | text 38 | @OBJECT . use stack 39 | STACK . new ONEXIT 40 | 41 | ## This module allows for running of several commands when the shell 42 | ## script exits. It inherits from stack.sh, so the normal add/insert/ 43 | ## push/pop commands are available. Note, that add/insert do not 44 | ## return what was passed to them. pop does, however. 45 | ## 46 | ## When the end of the script is reached, the code that is run iterates 47 | ## over all registered ONEXIT objects. These objects are automatically 48 | ## registred with the system, when you instantiate(new) them. If you 49 | ## use the 'inew' method, however, it inserts at the end of the list 50 | ## the new object, instead of placing it at the end(the default). 51 | ONEXIT . add :p ' 52 | $THIS . super "$@@" > /dev/null 53 | ' 54 | ONEXIT . insert :p ' 55 | $THIS . super "$@@" > /dev/null 56 | ' 57 | ONEXIT . new :p ' 58 | local OBJNAME=$1 59 | $THIS . super "$@@" 60 | $OBJNAME . size =q 0 61 | $OBJNAME . _count =q 0 62 | $OBJNAME . _order =q "" 63 | ONEXIT . add "$OBJNAME . run" 64 | ' 65 | ONEXIT . inew :p ' 66 | local OBJNAME=$1 67 | $THIS . new "$@@" 68 | ONEXIT . ror 69 | ' 70 | ONEXIT . run :p ' 71 | local count=1 size=$($THIS . size) 72 | while [ $count -le $size ]; do 73 | eval $($THIS . get $count) 74 | count=$(($count + 1)) 75 | done 76 | ' 77 | @ 78 | 79 | 80 | 1.3 81 | log 82 | @Add some documentation. 83 | @ 84 | text 85 | @d6 1 86 | a6 1 87 | ## push/pop commands are available. Note, that add/insert to not 88 | @ 89 | 90 | 91 | 1.2 92 | log 93 | @Oops. Was using ' inside of '', which failed when the last feature was 94 | added to _shoop. Always run make test when changing shoop.sh. 95 | @ 96 | text 97 | @d4 10 98 | @ 99 | 100 | 101 | 1.1 102 | log 103 | @Add preliminary onexit module. The code works, but it doesn't yet hook 104 | inself into running when the script exits. 105 | @ 106 | text 107 | @d15 1 108 | a15 1 109 | $OBJNAME . _order =q '' 110 | @ 111 | 112 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/ref.sh,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.03.04.10.38.20; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.03.02.18.20.00; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2001.03.02.07.35.29; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Set 'parent' instead of 'parents' 31 | @ 32 | text 33 | @OBJECT . new OBJECT_REF 34 | 35 | OBJECT_REF . new :p ' 36 | local CLASS=$1; shift 37 | if [ $# -gt 1 ]; then 38 | local OBJNAME 39 | OBJECT_REF . _ref OBJNAME 40 | eval "$@@ :p ''$OBJNAME \\\"\\\$@@\\\"''" 41 | else 42 | OBJECT_REF . _ref $1 43 | eval local OBJNAME=\$$1 44 | fi 45 | $THIS . super $OBJNAME 46 | $OBJNAME . parent .=q "$CLASS" 47 | ' 48 | OBJECT_REF . _ref :p ' 49 | eval $1=_$(($($THIS . __ref 2>/dev/null) + 1)) 50 | eval "$THIS . __ref =q \${$1#_}" 51 | ' 52 | @ 53 | 54 | 55 | 1.2 56 | log 57 | @We don't need to use a space separator when appending to the parents. 58 | @ 59 | text 60 | @d14 1 61 | a14 1 62 | $OBJNAME . parents .=q "$CLASS" 63 | @ 64 | 65 | 66 | 1.1 67 | log 68 | @Oops. forget this in the last checkin. 69 | @ 70 | text 71 | @d14 1 72 | a14 1 73 | $OBJNAME . parents .=q " $CLASS" 74 | @ 75 | 76 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/shoop.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.03.05.10.09.15; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @shoop_command allows one to register additional commands, other than '.' or 21 | 'd'. It doesn't fully work, yet, however. Also, the last checkin 22 | accidentally had the test script referenced in the makefile. 23 | @ 24 | text 25 | @OBJECT . new SHOOP 26 | @ 27 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/shoop_command.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.06.01.03.27; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.03.05.10.09.15; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @It now works. 26 | @ 27 | text 28 | @OBJECT . use shoop ref alist 29 | 30 | OBJECT_REF . new OBJECT SHOOP . command 31 | OBJECT_REF . new ALIST SHOOP . command . list 32 | 33 | SHOOP . command . register :p ' 34 | $THIS . list . add "$@@" 35 | local key=$1 value; shift 36 | value="$@@" 37 | _shoopcommand_middle_="${_shoopcommand_middle_:+$_shoopcommand_middle_ 38 | } 39 | $key) $value;;" 40 | ' 41 | @ 42 | 43 | 44 | 1.1 45 | log 46 | @shoop_command allows one to register additional commands, other than '.' or 47 | 'd'. It doesn't fully work, yet, however. Also, the last checkin 48 | accidentally had the test script referenced in the makefile. 49 | @ 50 | text 51 | @d8 2 52 | a9 3 53 | local ref=$($THIS . list . get $($THIS . list . size)) 54 | local key="$($ref . getkey)" value="$($ref . getvalue)" 55 | : key=$key value=$value 56 | @ 57 | 58 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/signals.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.24.02.34.57; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Checking this in before I go home. It does NOT work yet, but since nothing 21 | references it, that isn't a problem. 22 | @ 23 | text 24 | @OBJECT . use stack 25 | STACK . new SIGNAL 26 | 27 | ## This module allows for running of several commands when the shell 28 | ## script exits. It inherits from stack.sh, so the normal add/insert/ 29 | ## push/pop commands are available. Note, that add/insert do not 30 | ## return what was passed to them. pop does, however. 31 | ## 32 | ## When the end of the script is reached, the code that is run iterates 33 | ## over all registered ONEXIT objects. These objects are automatically 34 | ## registred with the system, when you instantiate(new) them. If you 35 | ## use the 'inew' method, however, it inserts at the end of the list 36 | ## the new object, instead of placing it at the end(the default). 37 | SIGNAL . add :p ' 38 | $THIS . super "$@@" > /dev/null 39 | ' 40 | SIGNAL . insert :p ' 41 | $THIS . super "$@@" > /dev/null 42 | ' 43 | SIGNAL . new :p ' 44 | local signal=$1 OBJNAME=$2; shift 1 45 | 46 | $THIS . super "$@@" 47 | $OBJNAME . size =q 0 48 | $OBJNAME . _count =q 0 49 | $OBJNAME . _order =q "" 50 | SIGNAL . add "$OBJNAME . run" 51 | local ref=$(OBJECT . _ref) 52 | 53 | SIGNAL . register_signal 54 | ' 55 | SIGNAL . 56 | 57 | SIGNAL . 58 | SIGNAL . inew :p ' 59 | local OBJNAME=$1 60 | $THIS . new "$@@" 61 | ONEXIT . ror 62 | ' 63 | ONEXIT . run :p ' 64 | local count=1 size=$($THIS . size) 65 | while [ $count -le $size ]; do 66 | eval $($THIS . get $count) 67 | count=$(($count + 1)) 68 | done 69 | ' 70 | @ 71 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/stack.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.20.23.04.24; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Add a stack method, based upon list. 21 | @ 22 | text 23 | @OBJECT . use list 24 | LIST . new STACK 25 | 26 | STACK . push :p ' 27 | $THIS . add "$@@" 28 | ' 29 | STACK . pop :p ' 30 | local count=${1:-1} size=$($THIS . size) targetsize 31 | targetsize=$(($size - $count)) 32 | while [ $size -gt $targetsize ]; do 33 | $THIS . delete $size 34 | size=$(($size - 1)) 35 | done 36 | : THIS=$THIS $($THIS . _order) 37 | ' 38 | STACK . peek :p ' 39 | $THIS . get $($THIS . size) 40 | ' 41 | @ 42 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/stringutil.sh,v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/shoop/shoop/modules/stringutil.sh,v -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/thread.sh,v: -------------------------------------------------------------------------------- 1 | head 1.6; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.6 9 | date 2001.02.24.01.42.01; author doogie; state Exp; 10 | branches; 11 | next 1.5; 12 | 13 | 1.5 14 | date 2000.02.08.00.20.27; author doogie; state Exp; 15 | branches; 16 | next 1.4; 17 | 18 | 1.4 19 | date 2000.02.06.04.35.57; author doogie; state Exp; 20 | branches; 21 | next 1.3; 22 | 23 | 1.3 24 | date 2000.02.06.04.16.55; author doogie; state Exp; 25 | branches; 26 | next 1.2; 27 | 28 | 1.2 29 | date 2000.01.29.10.57.18; author joey; state Exp; 30 | branches; 31 | next 1.1; 32 | 33 | 1.1 34 | date 2000.01.29.10.32.56; author doogie; state Exp; 35 | branches; 36 | next ; 37 | 38 | 39 | desc 40 | @@ 41 | 42 | 43 | 1.6 44 | log 45 | @Typo in comment. 46 | @ 47 | text 48 | @#!/bin/sh 49 | # 50 | # Pseudothread module for shoop. These aren't real threads (no shared data), 51 | # but they start up like threads. 52 | # 53 | # LGPL copyright 2000 by Adam Heath 54 | 55 | OBJECT . new THREAD 56 | 57 | THREAD . start :p ' 58 | if [ -z "$($THIS . running)" ]; then 59 | $THIS . run & 60 | $THIS . pid = $! > /dev/null 61 | $THIS . running = 1 > /dev/null 62 | fi 63 | ' 64 | THREAD . stop :p ' 65 | if [ -z "$($THIS . running)" ]; then 66 | kill $($THIS . pid) 67 | fi 68 | ' 69 | THREAD . wait :p ' 70 | wait $($THIS . pid) 71 | ' 72 | @ 73 | 74 | 75 | 1.5 76 | log 77 | @Changed license to LGPL, and added preliminary inline document support. 78 | @ 79 | text 80 | @d3 1 81 | a3 1 82 | # Pseudothread module for shoop. These arn't real threads (no shared data), 83 | @ 84 | 85 | 86 | 1.4 87 | log 88 | @Add support for declare methods and variables that are private, and are 89 | invisible to introspection. Append 'p' to the '=' or ':'. 90 | @ 91 | text 92 | @d5 3 93 | a7 2 94 | # 95 | # GPL copyright 2000 by Adam Heath 96 | @ 97 | 98 | 99 | 1.3 100 | log 101 | @Remove extraneous ';', as they detract from the code. 102 | @ 103 | text 104 | @d9 1 105 | a9 1 106 | THREAD . start : ' 107 | d16 1 108 | a16 1 109 | THREAD . stop : ' 110 | d21 1 111 | a21 1 112 | THREAD . wait : ' 113 | @ 114 | 115 | 116 | 1.2 117 | log 118 | @them ain't real threads 119 | (added header) 120 | @ 121 | text 122 | @d12 2 123 | a13 2 124 | $THIS . pid = $! > /dev/null; 125 | $THIS . running = 1 > /dev/null; 126 | d18 1 127 | a18 1 128 | kill $($THIS . pid); 129 | d22 1 130 | a22 1 131 | wait $($THIS . pid); 132 | @ 133 | 134 | 135 | 1.1 136 | log 137 | @Implemented simplistic threading support. 138 | @ 139 | text 140 | @d2 5 141 | @ 142 | 143 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/modules/www.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.02.13.04.27.58; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.02.12.12.10.39; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Commenting and adding perldoc stuff. 26 | @ 27 | text 28 | @#!/bin/sh -e 29 | 30 | # LGPL copyright 2000 by Adam Heath 31 | 32 | ## Creates a new WWW object. C(a simplistic wrapper around 33 | ## wget) expects a list of (I I) pairs. C 34 | ## checks the passed filename to see if it has I/htmlE> in it, 35 | ## which should mean the page was built properly. This is used to 36 | ## detect errors in dynamically generated pages. 37 | 38 | OBJECT . new WWW 39 | 40 | WWW . fetch : ' 41 | local url file output return 42 | while [ $# -gt 0 ]; do 43 | url="$1" file="$2"; shift 2 44 | if [ "$file" ]; then 45 | file="-O $file" 46 | fi 47 | if ! wget -q $file $url 2>&1; then 48 | return 1 49 | fi 50 | done 51 | ' 52 | 53 | WWW . finished : ' 54 | local tmp=${2:-$($THIS . tmpfile1)} return 55 | $THIS . fetch $1 $tmp 56 | if ! grep -qi "" $tmp; then 57 | return 1 58 | fi 59 | ' 60 | @ 61 | 62 | 63 | 1.1 64 | log 65 | @Simplistic wrapper around wget, for fetching files. Also a simple method 66 | for checking to see if an html file was completed(see the source). 67 | @ 68 | text 69 | @d1 10 70 | @ 71 | 72 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/Attic/testlib.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2000.01.29.16.16.01; author joey; state dead; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2000.01.29.15.43.32; author joey; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Use new regress 26 | @ 27 | text 28 | @#!/bin/sh -e 29 | # Regression test framework (modeled on perl's if you can't tell). 30 | 31 | echo Beginning test of $0 .. 32 | 33 | testfailures=0 34 | testcount=0 35 | ok () { 36 | expected=$1 37 | shift 38 | 39 | testcount=$(expr $testcount + 1) 40 | local ret=$($@@) || ( 41 | echo test $testcount returned a failure code: $? 42 | testfailures=$(expr $testfailures + 1) 43 | ) 44 | if [ "$ret" = "$expected" ]; then 45 | if [ "$VERBOSE" ]; then 46 | echo test $testcount succeeded 47 | fi 48 | else 49 | echo test $testcount FAILED: expected $expected, but got $ret 50 | testfailures=$(expr $testfailures + 1) 51 | fi 52 | } 53 | 54 | total () { 55 | if [ "$1" != "$testcount" ]; then 56 | echo I was expecting $1 tests, but $testcount were run. 57 | fi 58 | if [ "$testfailures" != "0" ]; then 59 | echo $testfailures tests FAILED. 60 | else 61 | echo All tests succeeded. 62 | fi 63 | } 64 | @ 65 | 66 | 67 | 1.1 68 | log 69 | @Added regression test framework. 70 | @ 71 | text 72 | @@ 73 | 74 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/alist.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.02.07.31.05; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.03.02.06.54.39; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Moved all reference code out of shoop, and into a separate module. All 26 | created references has OBJECT_REF as their primary parent, and multiple 27 | inheritance is used to support supplementary classes. There areno docs 28 | yet, see the testing scripts as to how to use. 29 | @ 30 | text 31 | @#!/bin/sh -e 32 | # Inheritance regression test. Also sets basic methods and variables. 33 | . ${SHOOPSH:-/usr/bin/shoop.sh} 34 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 35 | 36 | ok "" 0 "" OBJECT . use alist ref 37 | 38 | # setup 39 | ok "" 0 "" ALIST . new alist 40 | ok "" 0 0 alist . size 41 | 42 | # addition 43 | ok "" 0 "" alist . add "first" "1 value" 44 | ok "" 0 1 alist . size 45 | ok "" 0 "" alist . add "second" "2 value" 46 | ok "" 0 2 alist . size 47 | 48 | # fetching with helper methods 49 | ok "" 0 "first" alist . getkey 1 50 | ok "" 0 "second" alist . getkey 2 51 | ok "" 0 "1 value" alist . getvalue 1 52 | ok "" 0 "2 value" alist . getvalue 2 53 | 54 | # fetching thru a reference 55 | ok "" 0 "first" eval '$(alist . get 1)' . getkey 56 | ok "" 0 "2 value" eval '$(alist . get 2)' . getvalue 57 | 58 | # insertion 59 | ok "" 0 "" alist . insert "third" "3 value" 60 | ok "" 0 3 alist . size 61 | 62 | # fetching 63 | ok "" 0 "third" alist . getkey 1 64 | ok "" 0 "first" alist . getkey 2 65 | ok "" 0 "second" alist . getkey 3 66 | ok "" 0 "1 value" alist . getvalue 2 67 | ok "" 0 "2 value" alist . getvalue 3 68 | 69 | ok "" 0 "third" eval '$(alist . get 1)' . getkey 70 | ok "" 0 "1 value" eval '$(alist . get 2)' . getvalue 71 | 72 | # setting 73 | ok "" 0 "FIRST" alist . setkey 2 "FIRST" 74 | ok "" 0 "FIRST value" alist . setvalue 2 "FIRST value" 75 | ok "" 0 "FIRST" alist . getkey 2 76 | ok "" 0 "FIRST value" alist . getvalue 2 77 | 78 | # deletion 79 | ok "A" 0 "" alist . delete 2 80 | ok "" 0 2 alist . size 81 | ok "" 0 "second" alist . getkey 2 82 | ok "" 0 "" alist . add "SECOND" "SECOND value" 83 | ok "" 0 3 alist . size 84 | 85 | tests 31 86 | @ 87 | 88 | 89 | 1.1 90 | log 91 | @An associative list module. No docs yet, look at the test script to see 92 | how to use it. 93 | @ 94 | text 95 | @d6 1 96 | a6 2 97 | 98 | ok "" 0 "" OBJECT . use alist 99 | @ 100 | 101 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/benchmark.bm,v: -------------------------------------------------------------------------------- 1 | head 1.7; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.7 9 | date 2001.03.01.20.11.35; author doogie; state Exp; 10 | branches; 11 | next 1.6; 12 | 13 | 1.6 14 | date 2001.02.17.22.12.40; author algernon; state Exp; 15 | branches; 16 | next 1.5; 17 | 18 | 1.5 19 | date 2000.02.08.20.56.56; author doogie; state Exp; 20 | branches; 21 | next 1.4; 22 | 23 | 1.4 24 | date 2000.02.08.20.54.06; author doogie; state Exp; 25 | branches; 26 | next 1.3; 27 | 28 | 1.3 29 | date 2000.02.03.05.02.00; author doogie; state Exp; 30 | branches; 31 | next 1.2; 32 | 33 | 1.2 34 | date 2000.01.31.05.23.25; author doogie; state Exp; 35 | branches; 36 | next 1.1; 37 | 38 | 1.1 39 | date 2000.01.30.23.36.30; author doogie; state Exp; 40 | branches; 41 | next ; 42 | 43 | 44 | desc 45 | @@ 46 | 47 | 48 | 1.7 49 | log 50 | @Make shoop method sets and gets similiar in operation to shell method sets 51 | and gets. 52 | @ 53 | text 54 | @#!/bin/sh 55 | DEF_PREP=". ${SHOOPSH:-/usr/share/shoop/shoop.sh}" 56 | 57 | bmcount ${ITERATIONS:-100} 58 | 59 | prep true 60 | bm 1 "internal variable sets" 'FOO=1' 61 | 62 | prep FOO=1 63 | bm 2 "internal variable gets" 'echo $FOO' 64 | 65 | prep true 66 | bm 3 "internal function sets" 'foo () { echo hi; }' 67 | 68 | prep 'foo () { echo hi; }' 69 | bm 4 "internal function gets" 'foo' 70 | 71 | prep $DEF_PREP 72 | bm 5 "shoop variable sets" 'OBJECT . foo = 1' 73 | 74 | prep $DEF_PREP 75 | prep OBJECT . foo = 1 76 | bm 6 "shoop variable gets" 'OBJECT . foo' 77 | 78 | prep $DEF_PREP 79 | bm 7 "shoop method sets" 'OBJECT . foo : "echo hi"' 80 | 81 | prep $DEF_PREP 82 | prep OBJECT . foo : "echo hi" 83 | bm 8 "shoop method gets" 'OBJECT . foo' 84 | 85 | prep $DEF_PREP 86 | prep OBJECT . foo : ":" 87 | prep OBJECT . new BAR 88 | bm 9 "shoop 1st-stage resolver method calls" 'BAR . foo' 89 | 90 | prep $DEF_PREP 91 | prep OBJECT . foo : ':' 92 | prep OBJECT . new BAR 93 | prep BAR . new BLAH 94 | bm 10 "shoop 2nd-stage resolver method calls" 'BLAH . foo' 95 | 96 | prep $DEF_PREP 97 | prep _shoopnocache_=1 98 | prep OBJECT . foo : ':' 99 | prep OBJECT . new BAR 100 | prep BAR . new BLAH 101 | 102 | bm 11 "shoop 2nd-stage(nocache) resolver method calls" 'BLAH . foo' 103 | 104 | prep OBJECT . foo : 'echo hi' 105 | prep OBJECT . new BAR 106 | prep OBJECT . new BLAH 107 | prep OBJECT . new BAZ 108 | prep BAR . new A 109 | prep A . parent BAR BLAH OBJECT BAZ 110 | prepsave mi 111 | 112 | prepclear 113 | prep $DEF_PREP 114 | preprestore mi 115 | bm 12 "shoop multi-inheritance resolver method calls" 'A . foo' 116 | 117 | prep $DEF_PREP 118 | prep _shoopnocache_=1 119 | preprestore mi 120 | bm 13 "shoop multi-inheritance(nocache) resolver method calls" 'A . foo' 121 | 122 | prep $DEF_PREP 123 | prep _shoop_introspect=1 124 | 125 | bm 14 "shoop variable sets(with introspect)" 'OBJECT . foo = 1' 126 | 127 | prep $DEF_PREP 128 | prep OBJECT . foo : ":" 129 | prep OBJECT . new FOO 130 | prep FOO . new BAR 131 | bm 15 "shoop method sets not dumping cache" 'BAR . foo; OBJECT . foo : ":"' 132 | 133 | prep $DEF_PREP 134 | prep OBJECT . foo : ":" 135 | prep OBJECT . new FOO 136 | prep OBJECT . new BLAH 137 | prep FOO . new BAR 138 | bm 16 "shoop method sets dumping cache" 'BAR . foo; BLAH . foo : ":"' 139 | 140 | prep $DEF_PREP 141 | prep . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 142 | prep OBJECT . use also_inherit 143 | prep OBJECT . new FOO 144 | prep FOO . new BAR 145 | prep BAR . new BLAH 146 | prep OBJECT . new A 147 | bm 17 "shoop multi-inheritance setting" 'FOO . also_inherit BLAH A' 148 | @ 149 | 150 | 151 | 1.6 152 | log 153 | @updated to new shoop.sh paths 154 | @ 155 | text 156 | @d26 1 157 | a26 1 158 | bm 7 "shoop method sets" 'OBJECT . foo : ":"' 159 | d29 1 160 | a29 1 161 | prep OBJECT . foo : ":" 162 | @ 163 | 164 | 165 | 1.5 166 | log 167 | @Allow benchmark scripts to override the iteration count. 168 | @ 169 | text 170 | @d2 1 171 | a2 1 172 | DEF_PREP=". ${SHOOPSH:-./shoop.sh}" 173 | @ 174 | 175 | 176 | 1.4 177 | log 178 | @Use ITERATIONS instead of count. 179 | @ 180 | text 181 | @d3 2 182 | a4 1 183 | ITERATIONS=${ITERATIONS:-100} 184 | @ 185 | 186 | 187 | 1.3 188 | log 189 | @Add new module also_inherit, which walks the parent tree, looking for loops. 190 | This is currently not fully integrated with the system, and is just an 191 | addon module, that doesn't do anything. Also added a benchmark for it. 192 | @ 193 | text 194 | @d3 1 195 | a3 2 196 | count=100 197 | 198 | @ 199 | 200 | 201 | 1.2 202 | log 203 | @Added 2 more benchmarks to test setting and keeping cache. 204 | @ 205 | text 206 | @d87 8 207 | @ 208 | 209 | 210 | 1.1 211 | log 212 | @Removed the benchmark code from the makefile, and created a benchmarking 213 | framework. 214 | @ 215 | text 216 | @d57 1 217 | a57 1 218 | prepsave 12 219 | d61 1 220 | a61 1 221 | preprestore 12 222 | d66 1 223 | a66 1 224 | preprestore 12 225 | d73 14 226 | @ 227 | 228 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/ifs.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.03.01.22.38.55; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Add IFS testing. 21 | @ 22 | text 23 | @#!/bin/sh -e 24 | # Inheritance regression test. Also sets basic methods and variables. 25 | . ${SHOOPSH:-/usr/bin/shoop.sh} 26 | 27 | 28 | ok "" 0 ' 29 | ' eval 'printf "%s" "$IFS"' 30 | tests 1 31 | @ 32 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/list.sh,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2001.03.06.00.54.55; author doogie; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2001.02.24.02.02.41; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2001.02.20.23.03.22; author doogie; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2001.02.20.07.12.52; author doogie; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @_order was having extra spaces inserted in certain cases, and this was 36 | breaking rol and ror. 37 | @ 38 | text 39 | @#!/bin/sh -e 40 | # Inheritance regression test. Also sets basic methods and variables. 41 | . ${SHOOPSH:-/usr/bin/shoop.sh} 42 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 43 | 44 | 45 | ok "" 0 "" OBJECT . use list 46 | 47 | # setup 48 | ok "" 0 "" LIST . new list 49 | ok "" 0 0 list . size 50 | 51 | # addition 52 | ok "" 0 "first" list . add "first" 53 | ok "" 0 1 list . size 54 | ok "" 0 "second" list . add "second" 55 | ok "" 0 2 list . size 56 | 57 | # insertion 58 | ok "" 0 "third" list . insert "third" 59 | ok "" 0 3 list . size 60 | 61 | # fetching 62 | ok "" 0 "first" list . get 2 63 | ok "" 0 "second" list . get 3 64 | 65 | # setting 66 | ok "" 0 "FIRST" list . set 2 "FIRST" 67 | ok "" 0 "FIRST" list . get 2 68 | 69 | # deletion 70 | ok "" 0 "FIRST" list . delete 2 71 | ok "" 0 2 list . size 72 | ok "" 0 "second" list . get 2 73 | ok "" 0 "SECOND" list . add "SECOND" 74 | ok "" 0 3 list . size 75 | 76 | # increase to size 5 for rotation test 77 | ok "" 0 "fourth" list . add "fourth" 78 | ok "" 0 "FIFTH" list . add "FIFTH" 79 | 80 | # sanity check 81 | ok "" 0 "third" list . get 1 82 | ok "" 0 "second" list . get 2 83 | ok "" 0 "SECOND" list . get 3 84 | ok "" 0 "fourth" list . get 4 85 | ok "" 0 "FIFTH" list . get 5 86 | 87 | #set -x 88 | # rotation 89 | ok "" 0 "" list . ror 1 90 | ok "" 0 5 list . size 91 | ok "" 0 "FIFTH" list . get 1 92 | ok "" 0 "third" list . get 2 93 | ok "" 0 "second" list . get 3 94 | ok "" 0 "SECOND" list . get 4 95 | ok "" 0 "fourth" list . get 5 96 | ok "" 0 "" list . rol 2 97 | ok "" 0 5 list . size 98 | ok "" 0 "second" list . get 1 99 | ok "" 0 "SECOND" list . get 2 100 | ok "" 0 "fourth" list . get 3 101 | ok "" 0 "FIFTH" list . get 4 102 | ok "" 0 "third" list . get 5 103 | 104 | ok "" 0 "" list . increase_size 5 105 | ok "" 0 "10" list . size 106 | ok "" 0 "second" list . get 1 107 | ok "" 0 "SECOND" list . get 2 108 | ok "" 0 "fourth" list . get 3 109 | ok "" 0 "FIFTH" list . get 4 110 | ok "" 0 "third" list . get 5 111 | ok "" 0 "" list . get 6 112 | ok "" 0 "" list . get 7 113 | ok "" 0 "" list . get 8 114 | 115 | tests 49 116 | @ 117 | 118 | 119 | 1.3 120 | log 121 | @Add an increase_size method, with tests. Not documented yet. 122 | @ 123 | text 124 | @d38 4 125 | d46 2 126 | d49 1 127 | d52 2 128 | a53 2 129 | ok "" 0 3 list . size 130 | ok "" 0 "SECOND" list . get 1 131 | d56 2 132 | d59 1 133 | a59 1 134 | ok "" 0 3 list . size 135 | d62 3 136 | a64 1 137 | ok "" 0 "third" list . get 3 138 | d67 1 139 | a67 1 140 | ok "" 0 "8" list . size 141 | d70 3 142 | a72 3 143 | ok "" 0 "third" list . get 3 144 | ok "" 0 "" list . get 4 145 | ok "" 0 "" list . get 5 146 | d77 1 147 | a77 1 148 | tests 41 149 | @ 150 | 151 | 152 | 1.2 153 | log 154 | @Add 'ror' and 'rol' methods. 155 | @ 156 | text 157 | @d55 12 158 | a66 1 159 | tests 31 160 | @ 161 | 162 | 163 | 1.1 164 | log 165 | @Added LIST module. No documentation yet. 166 | @ 167 | text 168 | @d38 18 169 | a55 1 170 | tests 18 171 | @ 172 | 173 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/metachars.sh,v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/shoop/shoop/t/metachars.sh,v -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/onexit.sh,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.03.08.19.02.12; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.03.01.22.20.01; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2001.02.20.23.07.56; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Because t/regress used to munge variables, several false positives were 31 | being generated. Now, these should all be fixed. 32 | @ 33 | text 34 | @#!/bin/sh -e 35 | # Inheritance regression test. Also sets basic methods and variables. 36 | . ${SHOOPSH:-/usr/bin/shoop.sh} 37 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 38 | 39 | 40 | ok "" 0 "" OBJECT . use onexit 41 | 42 | # setup 43 | ok "" 0 "" ONEXIT . new onexit 44 | ok "" 0 0 onexit . size 45 | 46 | # addition 47 | ok "" 0 "" onexit . add echo 1 48 | ok "" 0 1 onexit . size 49 | ok "" 0 "" onexit . add echo 2 50 | ok "" 0 2 onexit . size 51 | 52 | # fetching 53 | ok "" 0 "echo 2" onexit . get 2 54 | ok "" 0 "echo 1" onexit . get 1 55 | 56 | # insertion 57 | ok "" 0 "" onexit . insert echo 3 58 | ok "" 0 3 onexit . size 59 | ok "" 0 "echo 3" onexit . get 1 60 | ok "" 0 "echo 2" onexit . get 3 61 | 62 | # pushing and popping 63 | ok "" 0 "" onexit . push echo 4 64 | ok "" 0 4 onexit . size 65 | ok "" 0 "" onexit . push echo 5 66 | ok "" 0 5 onexit . size 67 | ok "" 0 "echo 5" onexit . pop 68 | ok "" 0 4 onexit . size 69 | ok "" 0 "echo 4" onexit . get 4 70 | 71 | # running 72 | ok "a" 0 "3 73 | 1 74 | 2 75 | 4 76 | " onexit . run 77 | ok "" 0 "3 78 | 1 79 | 2 80 | 4 81 | " ONEXIT . run 82 | 83 | # multiple onexit objects 84 | ok "" 0 "" ONEXIT . new onexit2 85 | ok "" 0 "" onexit2 . add echo a 86 | ok "" 0 "a 87 | " onexit2 . run 88 | 89 | # multiple onexit objects 90 | ok "" 0 "" ONEXIT . inew onexit3 91 | ok "" 0 "" onexit3 . add echo Z 92 | ok "" 0 "Z 93 | " onexit3 . run 94 | 95 | # global runnings 96 | ok "" 0 "Z 97 | 3 98 | 1 99 | 2 100 | 4 101 | a 102 | " ONEXIT . run 103 | 104 | # at exit 105 | #ok "" 0 "Z3124a" exit 106 | 107 | tests 29 108 | @ 109 | 110 | 111 | 1.2 112 | log 113 | @Place new lines in the expected_output field, so that it can be properly 114 | checked for. 115 | @ 116 | text 117 | @d39 1 118 | a39 1 119 | ok "" 0 "3 120 | d42 2 121 | a43 1 122 | 4" onexit . run 123 | d68 2 124 | a69 1 125 | a" ONEXIT . run 126 | @ 127 | 128 | 129 | 1.1 130 | log 131 | @Add preliminary onexit module. The code works, but it doesn't yet hook 132 | inself into running when the script exits. 133 | @ 134 | text 135 | @d39 9 136 | a47 2 137 | ok "" 0 "3 1 2 4 " onexit . run 138 | ok "" 0 "3 1 2 4 " ONEXIT . run 139 | d52 2 140 | a53 1 141 | ok "" 0 "a " onexit2 . run 142 | d58 2 143 | a59 1 144 | ok "" 0 "Z " onexit3 . run 145 | d62 6 146 | a67 1 147 | ok "" 0 "Z 3 1 2 4 a " ONEXIT . run 148 | @ 149 | 150 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/ref.sh,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2001.03.04.10.38.20; author doogie; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2001.03.02.19.34.46; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2001.03.02.07.31.05; author doogie; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2001.02.22.18.24.53; author doogie; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @Set 'parent' instead of 'parents' 36 | @ 37 | text 38 | @#!/bin/sh -e 39 | # Inheritance regression test. Also sets basic methods and variables. 40 | . ${SHOOPSH:-/usr/share/shoop/shoop.sh} 41 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 42 | 43 | # setup 44 | ok "" 0 "" OBJECT . use ref 45 | ok "" 0 1 OBJECT . counter = 1 46 | ok "" 0 "" OBJECT . incr :p '$THIS . counter = $(($($THIS . counter) + 1))' 47 | ok "" 0 "" OBJECT . new object 48 | 49 | # sanity check 50 | ok "" 0 1 OBJECT . counter 51 | ok "" 0 2 OBJECT . incr 52 | ok "" 0 2 OBJECT . counter 53 | ok "" 0 3 OBJECT . incr 54 | ok "" 0 3 OBJECT . counter 55 | 56 | # creating a simple reference 57 | ok "" 0 "" OBJECT_REF . new OBJECT o 58 | 59 | # old code incorrectly set 'parents', instead of 'parent' 60 | ok "" 0 "OBJECT_REF OBJECT" eval '$o' . parent 61 | 62 | # getting/setting 63 | ok "" 0 "3" eval '$o' . counter 64 | ok "" 0 "10" eval '$o' . counter = 10 65 | ok "" 0 "10" eval '$o' . counter 66 | 67 | # methods 68 | ok "" 0 "" eval '$o' . decr :p \''$THIS . counter = $(($($THIS . counter) - 1))'\' 69 | ok "" 0 "11" eval '$o' . incr 70 | ok "" 0 "11" eval '$o' . counter 71 | ok "" 0 "10" eval '$o' . decr 72 | ok "" 0 "10" eval '$o' . counter 73 | 74 | # sanity check 75 | ok "" 0 3 OBJECT . counter 76 | ok "" 0 3 object . counter 77 | ok "" 0 10 eval '$o' . counter 78 | 79 | # creating a complex reference 80 | ok "" 0 "" OBJECT_REF . new OBJECT object . o 81 | 82 | # getting/setting 83 | ok "" 0 "3" object . o . counter 84 | ok "" 0 "10" object . o . counter = 10 85 | ok "" 0 "10" object . o . counter 86 | 87 | # methods 88 | ok "" 0 "" object . o . decr :p '$THIS . counter = $(($($THIS . counter) - 1))' 89 | ok "" 0 "11" object . o . incr 90 | ok "" 0 "11" object . o . counter 91 | ok "" 0 "10" object . o . decr 92 | ok "" 0 "10" object . o . counter 93 | 94 | # sanity check 95 | ok "" 0 3 OBJECT . counter 96 | ok "" 0 3 object . counter 97 | ok "" 0 10 object . o . counter 98 | 99 | tests 34 100 | @ 101 | 102 | 103 | 1.3 104 | log 105 | @Test simple references as well. 106 | @ 107 | text 108 | @d22 3 109 | d62 1 110 | a62 1 111 | tests 33 112 | @ 113 | 114 | 115 | 1.2 116 | log 117 | @Moved all reference code out of shoop, and into a separate module. All 118 | created references has OBJECT_REF as their primary parent, and multiple 119 | inheritance is used to support supplementary classes. There areno docs 120 | yet, see the testing scripts as to how to use. 121 | @ 122 | text 123 | @d19 21 124 | a39 1 125 | # creating the reference 126 | d59 1 127 | a59 1 128 | tests 21 129 | @ 130 | 131 | 132 | 1.1 133 | log 134 | @Added support for object references. 'OBJECT . new myobj . ref' gives you 135 | the ability to do 'myobj . ref . foo'. 136 | @ 137 | text 138 | @d4 1 139 | d7 1 140 | d20 1 141 | a20 1 142 | ok "" 0 "" OBJECT . new object . o 143 | d39 1 144 | a39 1 145 | tests 20 146 | @ 147 | 148 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/serialize.sh,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.03.08.19.02.12; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.03.01.22.20.01; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2001.02.24.00.58.20; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Because t/regress used to munge variables, several false positives were 31 | being generated. Now, these should all be fixed. 32 | @ 33 | text 34 | @#!/bin/sh -e 35 | # Inheritance regression test. Also sets basic methods and variables. 36 | . ${SHOOPSH:-/usr/share/shoop/shoop.sh} 37 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 38 | 39 | # setup 40 | ok "" 0 "" OBJECT . use serialize 41 | ok "" 0 "" OBJECT . new object 42 | ok "" 0 "1" object . foo = 1 43 | ok "" 0 "" object . bar : '$THIS . foo' 44 | 45 | #fixup sed "s/'/''/g" 46 | ok "" 0 "OBJECT . new object; 47 | object . foo =q 1; 48 | object . bar : '\$THIS . foo'; 49 | " object . serialize 50 | tests 5 51 | @ 52 | 53 | 54 | 1.2 55 | log 56 | @Place new lines in the expected_output field, so that it can be properly 57 | checked for. 58 | @ 59 | text 60 | @d15 2 61 | a16 1 62 | object . bar : '\$THIS . foo';" object . serialize 63 | @ 64 | 65 | 66 | 1.1 67 | log 68 | @Test script for the serialize module. 69 | @ 70 | text 71 | @d13 3 72 | a15 1 73 | ok "" 0 "OBJECT . new object; object . foo =q 1; object . bar : '\$THIS . foo; '" object . serialize 74 | @ 75 | 76 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/shoop2.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.06.08.37.33; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.03.05.18.50.18; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Don't fudge around with the expected output anymore, and expect the real 26 | thing. However, the code doesn't work yet, so these tests fail. 27 | @ 28 | text 29 | @#!/bin/sh -e 30 | # Inheritance regression test. Also sets basic methods and variables. 31 | . ${SHOOPSH:-/usr/share/shoop/shoop.sh} 32 | . ${SHOOP2SH:-/usr/share/shoop/shoop2.sh} 33 | #. ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 34 | 35 | SHOOP abstract class TEST 36 | SHOOP abstract method _print 37 | SHOOP public method print ' 38 | $THIS . _print "$@@" 39 | ' 40 | SHOOP public variable var = 1 41 | SHOOP end 42 | SHOOP public class REAL : TEST 43 | SHOOP public method _print ' 44 | echo "real:$@@" 45 | ' 46 | SHOOP end 47 | 48 | 49 | ok "" 0 "" SHOOP new t : REAL 50 | ok "" 0 "1" t . var 51 | ok "" 0 "real:1" t . print $(t . var) 52 | 53 | tests 3 54 | @ 55 | 56 | 57 | 1.1 58 | log 59 | @Added early version of shoop2, a very enhanced definition syntax. Not all 60 | features are supported yet. This currently overlays on the old shoop code, 61 | which is suboptimal. 62 | @ 63 | text 64 | @d8 1 65 | a8 1 66 | # SHOOP abstract method _print 67 | a12 3 68 | SHOOP public method _print ' 69 | echo "default:$@@" 70 | ' 71 | d16 1 72 | a16 1 73 | echo "$@@" 74 | d21 3 75 | a23 3 76 | ok "" 0 "" SHOOP new t : TEST 77 | ok "" 0 "" t . var 78 | ok "" 0 "" t . print $(t . var) 79 | @ 80 | 81 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/shoop_command.sh,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.03.08.19.02.12; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.03.06.01.03.27; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2001.03.05.10.09.15; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Because t/regress used to munge variables, several false positives were 31 | being generated. Now, these should all be fixed. 32 | @ 33 | text 34 | @#!/bin/sh -e 35 | # Inheritance regression test. Also sets basic methods and variables. 36 | . ${SHOOPSH:-/usr/bin/shoop.sh} 37 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 38 | 39 | ok "" 0 "" OBJECT . use shoop_command 40 | 41 | ok "" 0 "" SHOOP . command . register p 'echo -n "TRUEOBJ=$TRUEOBJ TRYOBJ=$TRYOBJ METH=$METH REST='"'"'$@@'"'"'";return' 42 | 43 | ok "" 0 "TRUEOBJ=SHOOP TRYOBJ=SHOOP METH=command REST='. register'" SHOOP p command . register 44 | 45 | tests 3 46 | @ 47 | 48 | 49 | 1.2 50 | log 51 | @It now works. 52 | @ 53 | text 54 | @d8 1 55 | a8 1 56 | ok "" 0 "" SHOOP . command . register p 'echo "TRUEOBJ=$TRUEOBJ TRYOBJ=$TRYOBJ METH=$METH REST='"'"'$@@'"'"'";return' 57 | @ 58 | 59 | 60 | 1.1 61 | log 62 | @shoop_command allows one to register additional commands, other than '.' or 63 | 'd'. It doesn't fully work, yet, however. Also, the last checkin 64 | accidentally had the test script referenced in the makefile. 65 | @ 66 | text 67 | @d8 1 68 | a8 1 69 | ok "" 0 "" SHOOP . command . register p 'echo "TRUEOBJ=$TRUEOBJ TRYOBJ=$TRYOBJ METH=$METH REST='\''$@@'\''";return' 70 | d10 1 71 | a10 1 72 | ok "" 0 "TRUEOBJ=SHOOP TRYOBJ=SHOOP METH=command REST=. register" SHOOP p command . register 73 | @ 74 | 75 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/stack.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.02.20.23.04.24; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @Add a stack method, based upon list. 21 | @ 22 | text 23 | @#!/bin/sh -e 24 | # Inheritance regression test. Also sets basic methods and variables. 25 | . ${SHOOPSH:-/usr/bin/shoop.sh} 26 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 27 | 28 | 29 | ok "" 0 "" OBJECT . use stack 30 | 31 | # setup 32 | ok "" 0 "" STACK . new stack 33 | ok "" 0 0 stack . size 34 | 35 | # addition 36 | ok "" 0 "first" stack . push "first" 37 | ok "" 0 1 stack . size 38 | ok "" 0 "second" stack . push "second" 39 | ok "" 0 2 stack . size 40 | 41 | # peeking 42 | ok "" 0 "second" stack . peek 43 | ok "" 0 "third" stack . push "third" 44 | ok "" 0 "third" stack . peek 45 | ok "" 0 3 stack . size 46 | 47 | # popping 48 | ok "" 0 "third" stack . pop 49 | ok "" 0 "THIRD" stack . push "THIRD" 50 | ok "" 0 "THIRDsecond" stack . pop 2 51 | ok "" 0 1 stack . size 52 | 53 | # wrapup 54 | ok "" 0 "first" stack . peek 55 | ok "" 0 "first" stack . pop 56 | ok "" 0 0 stack . size 57 | 58 | tests 18 59 | @ 60 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/stringutil.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.03.06.08.36.33; author doogie; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @This module contains 2 methods, ord and chr. It also contains 2 variables, 21 | zero, which signifies whether the builtin command echo needs a leading 22 | zero when interpeting octal values during -e, and chars, which holds all 23 | 256 characaters(with as a placeholder for \0 and \210(ash bug)). 24 | @ 25 | text 26 | @#!/bin/sh -e 27 | # Inheritance regression test. Also sets basic methods and variables. 28 | . ${SHOOPSH:-/usr/bin/shoop.sh} 29 | . ${SHOOPMOD:-/usr/share/shoop/modules}/use.sh 30 | 31 | OBJECT . use stringutil 32 | STRINGUTIL . new s 33 | 34 | # setup 35 | 36 | #set -x 37 | # ord/chr 38 | c=1 39 | #set -x 40 | while [ $c -lt 256 ]; do 41 | char=$(s . chr $c) 42 | ok "ord-$c($char)" 0 $c s . ord "$char" 43 | c=$(( $c + 1 )) 44 | done 45 | tests 255 46 | @ 47 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/t/super.sh,v: -------------------------------------------------------------------------------- 1 | head 1.2; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.2 9 | date 2001.03.08.19.02.12; author doogie; state Exp; 10 | branches; 11 | next 1.1; 12 | 13 | 1.1 14 | date 2001.03.02.06.35.59; author doogie; state Exp; 15 | branches; 16 | next ; 17 | 18 | 19 | desc 20 | @@ 21 | 22 | 23 | 1.2 24 | log 25 | @Because t/regress used to munge variables, several false positives were 26 | being generated. Now, these should all be fixed. 27 | @ 28 | text 29 | @#!/bin/sh -e 30 | # Inheritance regression test. Also sets basic methods and variables. 31 | . ${SHOOPSH:-/usr/share/shoop/shoop.sh} 32 | 33 | # Setting/getting variables. 34 | ok "" 0 "" OBJECT . count :p 'echo OBJECT-$THIS' 35 | ok "" 0 "" OBJECT . new ONE 36 | ok "" 0 "" ONE . count :p 'echo ONE-$THIS;$THIS . super' 37 | ok "" 0 "" ONE . new TWO 38 | ok "" 0 "" TWO . count :p 'echo TWO-$THIS;$THIS . super' 39 | 40 | ok "" 0 "OBJECT-OBJECT 41 | " OBJECT . count 42 | ok "" 0 "ONE-ONE 43 | OBJECT-ONE 44 | " ONE . count 45 | ok "" 0 "TWO-TWO 46 | ONE-TWO 47 | OBJECT-TWO 48 | " TWO . count 49 | 50 | tests 8 51 | 52 | @ 53 | 54 | 55 | 1.1 56 | log 57 | @YAY! super now works completely correctly. The old code could not handle 58 | 2(or more) super calls at once. We also now have a set of tests for this. 59 | @ 60 | text 61 | @d12 2 62 | a13 1 63 | ok "" 0 "OBJECT-OBJECT" OBJECT . count 64 | d15 2 65 | a16 1 66 | OBJECT-ONE" ONE . count 67 | d19 2 68 | a20 1 69 | OBJECT-TWO" TWO . count 70 | @ 71 | 72 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/utils/mkChangeLog,v: -------------------------------------------------------------------------------- 1 | head 1.3; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.3 9 | date 2001.02.20.08.08.21; author doogie; state Exp; 10 | branches; 11 | next 1.2; 12 | 13 | 1.2 14 | date 2001.02.20.08.05.50; author doogie; state Exp; 15 | branches; 16 | next 1.1; 17 | 18 | 1.1 19 | date 2000.02.13.04.32.21; author doogie; state Exp; 20 | branches; 21 | next ; 22 | 23 | 24 | desc 25 | @@ 26 | 27 | 28 | 1.3 29 | log 30 | @Wrap long file lines. 31 | @ 32 | text 33 | @#!/bin/sh -e 34 | NAMES=$(awk " 35 | /^CVS:/{ 36 | sub(/'/, \"'\\''\"); 37 | sub(/^CVS:/, \"\"); 38 | printf \"-u '%s:\", \$1; 39 | sub(\$1 \" \",\"\"); 40 | split(\$0, A, / *[<>] */); 41 | printf \"%s:%s'\n\", A[1], A[2] 42 | } 43 | " docs/AUTHORS) 44 | eval rcs2log -v $NAMES | 45 | awk ' 46 | /\t\* /{ 47 | split($0,A,/:/); 48 | count=split(A[1],B,/, /); 49 | first=1; 50 | len=0 51 | for(C = 1; C <= count; C++) { 52 | if(!first) { 53 | printf ", "; 54 | len += 2; 55 | } 56 | if ( len > 65 ) { 57 | printf "\n\t "; 58 | len=0 59 | } 60 | sub(/\/cvsroot\/shoop\/shoop\//,"",B[C]); 61 | printf "%s", B[C]; 62 | len += length(B[C]); 63 | first=0 64 | } 65 | printf ":%s\n", A[2]; 66 | printed=1 67 | } 68 | { 69 | if(printed != 1) 70 | print; 71 | printed=0 72 | } 73 | ' > ${1:-ChangeLog} 74 | @ 75 | 76 | 77 | 1.2 78 | log 79 | @Handle "'" in AUTHORS 80 | @ 81 | text 82 | @d14 1 83 | a14 1 84 | / \* /{ 85 | d18 1 86 | d20 1 87 | a20 1 88 | if(!first) 89 | d22 6 90 | d30 1 91 | @ 92 | 93 | 94 | 1.1 95 | log 96 | @Use an external script to make the ChangeLog. 97 | @ 98 | text 99 | @d4 1 100 | @ 101 | 102 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/utils/shell-stripper,v: -------------------------------------------------------------------------------- 1 | head 1.8; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.8 9 | date 2001.02.27.01.36.27; author doogie; state Exp; 10 | branches; 11 | next 1.7; 12 | 13 | 1.7 14 | date 2001.02.27.01.30.48; author doogie; state Exp; 15 | branches; 16 | next 1.6; 17 | 18 | 1.6 19 | date 2001.02.20.05.34.49; author doogie; state Exp; 20 | branches; 21 | next 1.5; 22 | 23 | 1.5 24 | date 2000.02.08.00.20.27; author doogie; state Exp; 25 | branches; 26 | next 1.4; 27 | 28 | 1.4 29 | date 2000.02.06.00.54.25; author doogie; state Exp; 30 | branches; 31 | next 1.3; 32 | 33 | 1.3 34 | date 2000.02.03.05.17.26; author doogie; state Exp; 35 | branches; 36 | next 1.2; 37 | 38 | 1.2 39 | date 2000.01.31.05.21.12; author doogie; state Exp; 40 | branches; 41 | next 1.1; 42 | 43 | 1.1 44 | date 2000.01.31.01.59.28; author doogie; state Exp; 45 | branches; 46 | next ; 47 | 48 | 49 | desc 50 | @@ 51 | 52 | 53 | 1.8 54 | log 55 | @Typo in the docs. 56 | @ 57 | text 58 | @#!/usr/bin/perl 59 | # 60 | # This is a perl script that can strip uneeded characters from a 61 | # shell script, so that certain shells(bash!) can run it faster. 62 | # 63 | # Copyright 2000 by Adam Heath 64 | # Licensed under the LGPL 65 | # 66 | use strict; 67 | 68 | ## A semi-simple shell comment stripper 69 | ## 70 | ## It was found that certain shell interpeters ran faster, if leading 71 | ## blank space was removed, along with comments. This program was 72 | ## designed to remove text that match the above constraints. 73 | ## 74 | ## Items removed 75 | ##>4 76 | ##:blank lines 77 | ##:leading white space 78 | ##:comment lines 79 | ##< 80 | ## Combined lines 81 | ##>4 82 | ##:\\ 83 | ## A line ending with \\ has the \\ removed, and the next line is 84 | ## concatenated to the current line, before processing is continued. 85 | ##:; 86 | ## ; is a command delimiter, so it is safe to combine a command from 87 | ## subsequent lines onto the end of the current line. 88 | ##< 89 | my $first = 1; 90 | while (<>) { 91 | 92 | # 93 | # Remove continuation characters. This is done first 94 | # incase the script magic below is a continued line. 95 | # 96 | if(/\\$/) { 97 | chop;s/\\$//; 98 | $_ .= <>; 99 | redo if not eof; 100 | }; 101 | 102 | # 103 | # Don't throw away the script magic identifier. 104 | # 105 | if(!(defined $first && /^#!/)) { 106 | # 107 | # Strip leading whitespace. 108 | # 109 | s/[ \t]*//; 110 | 111 | # 112 | # Skip blank and comment lines. 113 | # 114 | next if(/^(#.*|)$/); 115 | } 116 | 117 | # 118 | # If a line ends with ;, then combine it with the next 119 | # line, as the new line character is extraneous. 120 | # 121 | chop if(/\;[ \t]*$/); 122 | 123 | print if(/^#!/); 124 | if(defined $first) { 125 | print "# This script has been preprocessed prior to installation\n"; 126 | print "# It has had comments, blank lines, and leading spaces\n"; 127 | print "# removed, and \\-style lines combined. This was done so\n"; 128 | print "# that it could run quicker under some shells.\n" 129 | } 130 | print if(! /^#!/); 131 | undef $first; 132 | 133 | } 134 | @ 135 | 136 | 137 | 1.7 138 | log 139 | @Make it 'use strict' compliant. 140 | @ 141 | text 142 | @d29 1 143 | a29 1 144 | ## ; is a command delimiter, so it is safe to combined a command from 145 | @ 146 | 147 | 148 | 1.6 149 | log 150 | @Oodles of docs. 151 | @ 152 | text 153 | @d9 1 154 | d32 1 155 | a32 1 156 | $first = 1; 157 | @ 158 | 159 | 160 | 1.5 161 | log 162 | @Changed license to LGPL, and added preliminary inline document support. 163 | @ 164 | text 165 | @d10 21 166 | @ 167 | 168 | 169 | 1.4 170 | log 171 | @If a line ends with ';', combine it with the next line. 172 | @ 173 | text 174 | @d7 1 175 | a7 1 176 | # Licensed under the GPL 177 | @ 178 | 179 | 180 | 1.3 181 | log 182 | @Output the comment only after an initial #!, but before anything else. 183 | @ 184 | text 185 | @d37 7 186 | @ 187 | 188 | 189 | 1.2 190 | log 191 | @Remove spurious next at end of script. Add note to parsed data that the 192 | script has been munged. 193 | @ 194 | text 195 | @d37 1 196 | a37 1 197 | print; 198 | d44 1 199 | @ 200 | 201 | 202 | 1.1 203 | log 204 | @This is a perl script that can strip uneeded characters from a shell script, 205 | so that certain shells(bash!) can run it faster. 206 | @ 207 | text 208 | @d26 1 209 | a26 1 210 | if(!($first && /^#!/)) { 211 | d38 7 212 | a44 2 213 | next; 214 | $first = 0; 215 | @ 216 | 217 | -------------------------------------------------------------------------------- /docs/research/shoop/shoop/utils/shelldoc,v: -------------------------------------------------------------------------------- 1 | head 1.4; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.4 9 | date 2001.02.20.05.20.18; author doogie; state Exp; 10 | branches; 11 | next 1.3; 12 | 13 | 1.3 14 | date 2000.08.20.09.31.54; author doogie; state Exp; 15 | branches; 16 | next 1.2; 17 | 18 | 1.2 19 | date 2000.08.20.09.31.35; author doogie; state Exp; 20 | branches; 21 | next 1.1; 22 | 23 | 1.1 24 | date 2000.02.08.00.20.27; author doogie; state Exp; 25 | branches; 26 | next ; 27 | 28 | 29 | desc 30 | @@ 31 | 32 | 33 | 1.4 34 | log 35 | @Added list commands, and it now uses itself to document itself(note: maybe 36 | this should be converted to plain perlpod). 37 | @ 38 | text 39 | @#!/usr/bin/perl 40 | # 41 | # This is a perl script that can strip unneeded characters from a 42 | # shell script, so that certain shells(bash!) can run it faster. 43 | # 44 | # Copyright 2000 by Adam Heath 45 | # Licensed under the LGPL 46 | # 47 | 48 | ## A wrapper around perlpod for shell scripts. 49 | ## 50 | ## This program looks for specially formatted comment lines 51 | ## in shell scripts, and then passes that on to perlpod for 52 | ## formatting. 53 | ## 54 | ## A shelldoc line is prefixed with '##'(hash, hash), followed by 55 | ## a command character, then the text. 56 | ##>4 57 | ##: 58 | ## raw text, passed unmodified 59 | ##:> 60 | ## start a new block, with indentation 61 | ##:< 62 | ## end a block 63 | ##:: 64 | ## list an item in a block 65 | ##< 66 | 67 | use Text::Wrap; 68 | 69 | print "=head1 $ARGV[0]\n\n"; 70 | print "=over 4\n\n"; 71 | for($a = 1; $a < @@ARGV; $a++) { 72 | open(FILE, "<" . $ARGV[$a]); 73 | while() { 74 | next if(! /^##[:<> ]/); 75 | s/^##(.)//; 76 | $char = $1; 77 | if ( $char =~ /^ / ) { 78 | $line .= $_; 79 | } elsif ( $char =~ /^>/ ) { 80 | $line .= "\n=over $_\n"; 81 | } elsif ( $char =~ /^:/ ) { 82 | $line .= "\n=item $_\n"; 83 | } elsif ( $char =~ /^ 25 | @ 26 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## Makefile - top-level -*- Makefile -*- for shwwwoop 24 | ## Copyright (C) 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ifeq ($(wildcard Rules.mk),Rules.mk) 45 | include Makefile.top 46 | else 47 | .DEFAULT not-configured: 48 | @@echo "shwwwoop is not configured yet." 49 | @@echo "Please run ./configure first!" 50 | @@exit 1 51 | endif 52 | 53 | .SILENT: .DEFAULT 54 | @ 55 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/Makefile.top,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## Makefile.top - top-level -*- Makefile -*- fragment for shwwwoop 24 | ## Copyright (C) 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | top_srcdir = . 45 | subdir = 46 | 47 | SUBDIRS = src utils 48 | doc_DATA = AUTHORS COPYING NEWS README THANKS ChangeLog 49 | EXTRA_DIST = INSTALL Rules.mk.in Makefile.top configure \ 50 | $(DEBIAN_FILES) 51 | 52 | DEBIAN_FILES = 53 | 54 | MAINTAINERCLEANFILES = ChangeLog 55 | 56 | include $(top_srcdir)/Rules.mk 57 | 58 | all-local:: 59 | 60 | bin-dist: 61 | $(MAKE) install DESTDIR=`pwd`/$(PACKAGE)-$(VERSION).bin 62 | $(TAR) $(TAR_OPTIONS) -cf - $(PACKAGE)-$(VERSION).bin | GZIP=$(GZIP_ENV) gzip -c \ 63 | > $(PACKAGE)-$(VERSION).bin.tar.gz 64 | rm -rf $(PACKAGE)-$(VERSION).bin 65 | 66 | dist: dist-hook distdir 67 | rm -f $(distdir)/config.status 68 | $(TAR) $(TAR_OPTIONS) -cf - $(PACKAGE)-$(VERSION) | GZIP=$(GZIP_ENV) gzip -c \ 69 | > $(PACKAGE)-$(VERSION).tar.gz 70 | test -z "$(distdir)" || rm -rf $(distdir) 71 | 72 | dist-hook: 73 | test -z "$(distdir)" || rm -rf $(distdir) 74 | 75 | distcheck: dist 76 | gzip -dc $(PACKAGE)-$(VERSION).tar.gz | $(TAR) $(TAR_OPTIONS) -xf - 77 | cd $(PACKAGE)-$(VERSION) && ./configure 78 | $(MAKE) -C $(PACKAGE)-$(VERSION) all install dist DESTDIR=$(shell pwd)/$(PACKAGE)-$(VERSION)/=inst 79 | rm -rf $(PACKAGE)-$(VERSION) 80 | @@banner="$(PACKAGE)-$(VERSION).tar.gz is ready for distribution." ;\ 81 | dashes=`echo "$$banner" | sed -e s/./=/g`; \ 82 | echo "$$dashes" ;\ 83 | echo "$$banner" ;\ 84 | echo "$$dashes" 85 | 86 | distclean:: 87 | rm -f $(top_srcdir)/config.status $(top_srcdir)/Rules.mk 88 | 89 | ChangeLog: 90 | $(top_srcdir)/utils/mkChangeLog $@@ 91 | 92 | .PHONY:: bin-dist distcheck 93 | @ 94 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/NEWS,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @shwwwoop NEWS -*- outline -*- 24 | ============= 25 | 26 | * 0.1.0: Initial release. 27 | A partial port of WebShell, with some enchancements, but 28 | slightly smaller feature set. 29 | @ 30 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/README,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @shwwoop 24 | ======= 25 | 26 | [FIXME: write this] 27 | 28 | Obtaining 29 | --------- 30 | 31 | You can get shwwwoop from the SHOOP CVS repository, as the shwwwoop 32 | module. 33 | 34 | Requirements 35 | ------------ 36 | 37 | [FIXME: write this too] 38 | 39 | Gergely Nagy <8@@free.bsd.hu> 40 | @ 41 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/THANKS,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @-*- outline -*- 24 | shwwwoop was originally written by Gergely Nagy <8@@free.bsd.hu>. 25 | 26 | * Adam Heath 27 | For shoop and encouragement. 28 | 29 | * Joey Hess 30 | For shoop. 31 | @ 32 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/TODO,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @TODO before any public release 24 | ============================== 25 | * shoop detection code to the build system 26 | * http_response . do_response_XXX 27 | ? modules 28 | ? documentation 29 | @ 30 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## src/Makefile 24 | ## Copyright (C) 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | top_srcdir = .. 45 | subdir = src 46 | 47 | SUBDIRS = kernel 48 | 49 | bin_SCRIPTS = shwwwoop.sh 50 | DISTFILES = Makefile $(patsubst %,%.in,$(bin_SCRIPTS)) 51 | CLEAN_FILES = $(bin_SCRIPTS) 52 | 53 | include $(top_srcdir)/Rules.mk 54 | 55 | all-local:: $(bin_SCRIPTS) 56 | 57 | shwwwoop.sh:: %: %.in $(top_srcdir)/Rules.mk 58 | sed -e "s,@@SYSCONFDIR@@,$(sysconfdir),g" \ 59 | -e "s,@@MODULEDIR@@,$(moduledir),g" \ 60 | -e "s,@@PKGCONFDIR@@,$(pkgconfdir),g" \ 61 | -e "s,@@VERSION@@,$(VERSION),g" \ 62 | -e "s,@@LOCALSTATEDIR@@,$(localstatedir),g" \ 63 | -e "s,@@MODULEDIR@@,$(moduledir),g" \ 64 | -e "s,@@SHOOP_BASE@@,/usr/share/shoop,g" \ 65 | < $@@.in >$@@T && rm -rf $@@ && mv $@@T $@@ 66 | 67 | shwwwoop.sh:: %: %.in $(top_srcdir)/Rules.mk 68 | chmod +x $@@ 69 | @ 70 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## src/kernel/Makefile 24 | ## Copyright (C) 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | top_srcdir = ../.. 45 | subdir = src/kernel 46 | 47 | moduledir = ${datadir}/shwwwoop/kernel 48 | module_DATA = base_config environment host_config http_response \ 49 | request shwwwoop utils 50 | CLEAN_FILES = base_config host_config 51 | DISTFILES = Makefile base_config.in host_config.in environment \ 52 | http_response request shwwwoop utils 53 | 54 | include $(top_srcdir)/Rules.mk 55 | 56 | all-local:: $(module_DATA) 57 | 58 | base_config host_config: %: %.in $(top_srcdir)/Rules.mk 59 | sed -e "s,@@SYSCONFDIR@@,$(sysconfdir),g" \ 60 | -e "s,@@MODULEDIR@@,$(moduledir),g" \ 61 | -e "s,@@PKGCONFDIR@@,$(pkgconfdir),g" \ 62 | -e "s,@@VERSION@@,$(VERSION),g" \ 63 | -e "s,@@LOCALSTATEDIR@@,$(localstatedir),g" \ 64 | -e "s,@@MODULEDIR@@,$(moduledir),g" \ 65 | -e "s,@@SHOOP_BASE@@,/usr/share/shoop,g" \ 66 | < $@@.in >$@@T && rm -rf $@@ && mv $@@T $@@ 67 | @ 68 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/base_config.in,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/base_config -- base configuration -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | 46 | OBJECT . new BASE_CONFIG 47 | 48 | BASE_CONFIG . CONFIG_ROOT =q @@PKGCONFDIR@@ 49 | BASE_CONFIG . MODULE_DIR =q @@MODULEDIR@@ 50 | BASE_CONFIG . MKTEMPFILE : ' 51 | local TMPFILE=${TMPDIR:-/tmp}/.shwwwoop.$$.$RANDOM 52 | while [ -e ${TMPFILE} ]; do 53 | TMPFILE=${TMPDIR:-/tmp}/.shwwwoop.$$.$RANDOM 54 | done 55 | touch ${TMPFILE} 56 | echo ${TMPFILE}' 57 | BASE_CONFIG . SERVER_SOFTWARE =q shwwwoop/@@VERSION@@ 58 | BASE_CONFIG . SERVER_PROTOCOL =q HTTP/1.0 59 | BASE_CONFIG . GATEWAY_INTERFACE =q CGI/1.1 60 | 61 | BASE_CONFIG . load_config : ' 62 | if [ -f $($THIS . CONFIG_ROOT)/shwwwoop.conf ]; then 63 | . $($THIS . CONFIG_ROOT)/shwwwoop.conf 64 | fi 65 | ' 66 | @ 67 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/environment,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/environment -- CGI environment handling -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | ## Already loaded before this: kernel/base_config, kernel/host_config, 46 | ## kernel/request, kernel/utils 47 | 48 | OBJECT . new ENVIRONMENT 49 | 50 | ENVIRONMENT . finish_environment : ' 51 | #PATH_INFO SCRIPT_NAME SCRIPT_FILENAME \ 52 | #CONTENT_LENGTH" 53 | 54 | ENVIRONMENT . HTTP_HOST =q $(REQUEST . get_field HOST $(HOST_CONFIG . HOST)):$(HOST_CONFIG . SERVER_PORT) 55 | ENVIRONMENT . SERVER_URL =q http://$(ENVIRONMENT . HTTP_HOST)/ 56 | ENVIRONMENT . DOCUMENT_NAME =q $(echo $(REQUEST . URI) | sed -e "s,.*/\(.*\)\$,\1,") 57 | ENVIRONMENT . SCRIPT_NAME =q $(ENVIRONMENT . DOCUMENT_NAME) 58 | ENVIRONMENT . DOCUMENT_URI =q $(ENVIRONMENT . DOCUMENT_NAME) 59 | 60 | ENVIRONMENT . SERVER_NAME =q $(HOST_CONFIG . HOST) 61 | ENVIRONMENT . SERVER_PORT =q $(HOST_CONFIG . SERVER_PORT) 62 | ENVIRONMENT . SERVER_SOFTWARE =q $(BASE_CONFIG . SERVER_SOFTWARE) 63 | ENVIRONMENT . SERVER_PROTOCOL =q $(BASE_CONFIG . SERVER_PROTOCOL) 64 | ENVIRONMENT . GATEWAY_INTERFACE =q $(BASE_CONFIG . GATEWAY_INTERFACE) 65 | ENVIRONMENT . DOCUMENT_ROOT =q $(HOST_CONFIG . DOCUMENT_ROOT) 66 | ENVIRONMENT . REQUEST_METHOD =q $(REQUEST . METHOD) 67 | ENVIRONMENT . QUERY_STRING =q $(REQUEST . QUERY_STRING) 68 | ENVIRONMENT . HTTP_USER_AGENT =q $(REQUEST . get_field USER_AGENT "unknown") 69 | 70 | set -- $(getpeername -n 2>/dev/null || true) 71 | ENVIRONMENT . REMOTE_ADDR =q ${1:-0.0.0.0} 72 | ENVIRONMENT . REMOTE_PORT =q ${2:-} 73 | set -- $(getpeername 2>/dev/null || true) 74 | ENVIRONMENT . REMOTE_HOST =q ${1:-$(ENVIRONMENT . REMOTE_ADDR)} 75 | ' 76 | @ 77 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/host_config.in,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/host_config -- Host configuration -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | 46 | ## Setup base methods & stuff 47 | OBJECT . new HOST_CONFIG 48 | 49 | HOST_CONFIG . DOCUMENT_ROOT =q @@LOCALSTATEDIR@@/www 50 | HOST_CONFIG . SERVER_PORT =q 80 51 | HOST_CONFIG . SERVER_NAME =q ${HOSTNAME:-localhost} 52 | HOST_CONFIG . DEFAULT_CONTENT_TYPE =q text/plain 53 | HOST_CONFIG . INDEX_FILES =q index.html index.cgi 54 | HOST_CONFIG . HOST =q $(HOST_CONFIG . SERVER_NAME) 55 | HOST_CONFIG . LOGDIR =q @@LOCALSTATEDIR@@/log/shwwwoop 56 | HOST_CONFIG . DEBUG_LOG =q $(HOST_CONFIG . LOGDIR)/debug.log 57 | @ 58 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/request,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/request -- input handling -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | ## Already loaded at this point: kernel/utils 46 | 47 | OBJECT . new REQUEST 48 | 49 | REQUEST . read_input : ' 50 | local req line field value 51 | 52 | read req 53 | REQUEST . HEADER =q $(echo "$req" | tr -d "\r") 54 | 55 | line="x" 56 | 57 | while [ "x$line" != "x" ] 58 | do 59 | read line 60 | line=$(echo "$line" | tr -d "\r") 61 | 62 | field=$(echo "$line" | sed -e "s,^\([^:]*\):.*,\1,") 63 | field=$(UTILS . toupper "$field") 64 | value=$(echo "$line" | sed -e "s,^[^:]*: \(.*\),\1,") 65 | 66 | if [ "x$line" != "x" ]; then 67 | REQUEST . _field_$field =q $value 68 | fi 69 | done 70 | ' 71 | 72 | REQUEST . get_field : ' 73 | if [ $(REQUEST . check _field_$1) -eq 1 ]; then 74 | echo "$(REQUEST . _field_$1)" 75 | else 76 | shift 77 | [ -z "$1" ] || echo "$@@" 78 | fi 79 | ' 80 | 81 | REQUEST . process_input : ' 82 | REQUEST . METHOD =q $(echo $(REQUEST . HEADER) | sed -e "s,^\([^ ]*\) .*,\1,") 83 | 84 | if [ $(echo $(REQUEST . HEADER) | grep -q " HTTP/\([^ ]*\)$") ]; then 85 | REQUEST . HTTP_VERSION =q $(echo $(REQUEST . HEADER) | sed -e "s,.* HTTP/\(.*\)\$,\1,i") 86 | else 87 | REQUEST . HTTP_VERSION =q "" 88 | fi 89 | 90 | REQUEST . URI =q $(echo $(REQUEST . HEADER) | sed -e "s,^$(REQUEST . METHOD) ,,i" -e "s, HTTP/.*,,i" -e "s,\.\.,,g" -e "s,//,/,g" -e "s,/\.\/,/,g" | tr -d "\r") 91 | 92 | IFS_SAVE="$IFS"; IFS="?" 93 | set -- $(REQUEST . URI) 94 | REQUEST . URI =q $1 95 | shift 96 | REQUEST . QUERY_STRING =q $@@ 97 | IFS="$IFS_SAVE" 98 | 99 | ' 100 | @ 101 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/shwwwoop,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/shwwwoop -- kernel core -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | OBJECT . new SHWWWOOP 46 | 47 | ## Load core modules 48 | . ${SHWWWOOPBASE}/kernel/utils 49 | . ${SHWWWOOPBASE}/kernel/request 50 | . ${SHWWWOOPBASE}/kernel/base_config 51 | . ${SHWWWOOPBASE}/kernel/host_config 52 | . ${SHWWWOOPBASE}/kernel/environment 53 | . ${SHWWWOOPBASE}/kernel/http_response 54 | 55 | SHWWWOOP . load_vh : ' 56 | local vhost=$(REQUEST . get_field HOST $(HOST_CONFIG . HOST)) 57 | 58 | if [ -f $(BASE_CONFIG . CONFIG_ROOT)/virtual-hosts/${vhost}/host.conf ]; then 59 | . $(BASE_CONFIG . CONFIG_ROOT)/virtual-hosts/${vhost}/host.conf 60 | fi 61 | ' 62 | 63 | SHWWWOOP . run_module : ' 64 | if [ -f $(BASE_CONFIG . MODULE_DIR)/$1 ]; then 65 | . $(BASE_CONFIG . MODULE_DIR)/$1 66 | fi 67 | ' 68 | 69 | SHWWWOOP . guess_content_type : ' 70 | local _ext 71 | local _ct 72 | 73 | _ext=$(echo $(ENVIRONMENT . SCRIPT_FILENAME) | sed -e "s,.*\.\(.*\)$,\1,") 74 | _ct=$(grep -i "^$_ext: " $(BASE_CONFIG . CONFIG_ROOT)/content-types 2>/dev/null | sed -e "s,$_ext: ,,g" || true) 75 | _ct=${_ct:-$(HOST_CONFIG . DEFAULT_CONTENT_TYPE)} 76 | 77 | HTTP_RESPONSE . CONTENT_TYPE =q $_ct 78 | ' 79 | @ 80 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/kernel/utils,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## kernel/utils -- utility functions -*- shell-script -*- 24 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | ## SHOOP is already loaded by the main script 45 | 46 | OBJECT . new UTILS 47 | 48 | UTILS . tolower : ' 49 | echo "$@@" | tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ-" "abcdefghijklmnopqrstuvwxyz_" 50 | ' 51 | 52 | UTILS . toupper : ' 53 | echo "$@@" | tr "abcdefghijklmnopqrstuvwxyz-" "ABCDEFGHIJKLMNOPQRSTUVWXYZ_" 54 | ' 55 | @ 56 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/shwwwoop.sh.in,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @#! /bin/sh 24 | ## shwwwoop - Webserver in SHOOP 25 | ## Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu> 26 | ## 27 | ## This file is part of shwwwoop. 28 | ## 29 | ## shwwwoop is free software; you can redistribute it and/or modify 30 | ## it under the terms of the GNU General Public License as published by 31 | ## the Free Software Foundation; either version 2 of the License, or 32 | ## (at your option) any later version. 33 | ## 34 | ## shwwwoop is distributed in the hope that it will be useful, 35 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 36 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 37 | ## GNU General Public License for more details. 38 | ## 39 | ## You should have received a copy of the GNU General Public License 40 | ## along with this program; if not, write to the Free Software 41 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 42 | ## 43 | ## $Id$ 44 | 45 | ## Initialisation 46 | SHOOPPATH=.:@@SHOOP_BASE@@/modules 47 | SHWWWOOPBASE=@@MODULEDIR@@ 48 | . ${SHOOPSH:-@@SHOOP_BASE@@/shoop.sh} 49 | . ${SHOOPMOD:-@@SHOOP_BASE@@/modules}/use.sh 50 | OBJECT . use checker 51 | 52 | . ${SHWWWOOPBASE}/kernel/shwwwoop 53 | 54 | ################################ 55 | # Option parsing # 56 | ################################ 57 | for OPT in $* 58 | do 59 | case "$OPT" in 60 | --version|-v|-V) 61 | echo "shwwwoop version @@VERSION@@" 62 | echo "Copyright (C) 2000, 2001 Gergely Nagy <8@@free.bsd.hu>" 63 | exit 0 64 | ;; 65 | esac 66 | done 67 | 68 | ################################ 69 | # CONFIGURATION PART # 70 | ################################ 71 | BASE_CONFIG . load_config 72 | 73 | exec 2>> $(HOST_CONFIG . DEBUG_LOG) 74 | 75 | ################################ 76 | # INPUT PART # 77 | ################################ 78 | REQUEST . read_input 79 | REQUEST . process_input 80 | SHWWWOOP . load_vh 81 | ENVIRONMENT . finish_environment 82 | 83 | SHWWWOOP . run_module post-process 84 | 85 | HTTP_RESPONSE . setup_filename 86 | 87 | SHWWWOOP . guess_content_type 88 | 89 | SHWWWOOP . run_module pre-reply 90 | 91 | if [ $(HTTP_RESPONSE . check do_content) -ne 1 ]; then 92 | HTTP_RESPONSE . do_content : ' 93 | cat "$(ENVIRONMENT . SCRIPT_FILENAME)" 94 | ' 95 | fi 96 | 97 | HTTP_RESPONSE . sanity_check 98 | 99 | ################################ 100 | # OUTPUT PART # 101 | ################################ 102 | SHWWWOOP . TEMPFILE =q $(BASE_CONFIG . MKTEMPFILE) 103 | 104 | trap 'rm -f $(SHWWWOOP . TEMPFILE)' 0 105 | 106 | HTTP_RESPONSE . generate_content 107 | 108 | if [ $(HTTP_RESPONSE . _DYNAMIC_CONTENT) -ne 0 ]; then 109 | HTTP_RESPONSE . _HEADER_LENGTH =q `cat $(SHWWWOOP . TEMPFILE) | grep -n "^\$" | head -1 | sed -e "s,:.*,,g"` 110 | HTTP_RESPONSE . _HEADER_LENGTH =q $(expr $(HTTP_RESPONSE . _HEADER_LENGTH) - 1) 111 | else 112 | HTTP_RESPONSE . _HEADER_LENGTH =q 0 113 | fi 114 | 115 | HTTP_RESPONSE . extract_headers 116 | 117 | # ... and set those that aren't... 118 | if [ $(HTTP_RESPONSE . check _field_LOCATION) -eq 1 ]; then 119 | HTTP_RESPONSE . STATUS =q 302 120 | HTTP_RESPONSE . MESSAGE =q "Temporary relocation" 121 | fi 122 | 123 | echo "HTTP/1.0 $(HTTP_RESPONSE . STATUS) $(HTTP_RESPONSE . MESSAGE)" 124 | 125 | HTTP_RESPONSE . echo_header 126 | HTTP_RESPONSE . echo_body 127 | 128 | # RESPONSE_LENGTH is only useful for post-reply, so it is computed here 129 | HTTP_RESPONSE . _LENGTH =q $(tail -n +$(HTTP_RESPONSE . _HEADER_LENGTH) $(SHWWWOOP . TEMPFILE) | wc -c | sed -e 's/ //g') 130 | 131 | rm -f $TEMPFILE 132 | 133 | ## Post-reply module 134 | SHWWWOOP . run_module post-reply 135 | @ 136 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/src/test.sh,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @#! /bin/sh 24 | 25 | /bin/sh ./shwwwoop.sh < 24 | @ 25 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/utils/Makefile,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.22.51; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @## utils/Makefile 24 | ## Copyright (C) 2001 Gergely Nagy <8@@free.bsd.hu> 25 | ## 26 | ## This file is part of shwwwoop. 27 | ## 28 | ## shwwwoop is free software; you can redistribute it and/or modify 29 | ## it under the terms of the GNU General Public License as published by 30 | ## the Free Software Foundation; either version 2 of the License, or 31 | ## (at your option) any later version. 32 | ## 33 | ## shwwwoop is distributed in the hope that it will be useful, 34 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | ## GNU General Public License for more details. 37 | ## 38 | ## You should have received a copy of the GNU General Public License 39 | ## along with this program; if not, write to the Free Software 40 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | ## 42 | ## $Id$ 43 | 44 | top_srcdir = .. 45 | subdir = utils 46 | 47 | EXTRA_DIST = mkChangeLog COMMITTERS 48 | 49 | include $(top_srcdir)/Rules.mk 50 | @ 51 | -------------------------------------------------------------------------------- /docs/research/shoop/shwwwoop/utils/mkChangeLog,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2001.04.29.18.21.17; author algernon; state Exp; 10 | branches; 11 | next ; 12 | 13 | 14 | desc 15 | @@ 16 | 17 | 18 | 1.1 19 | log 20 | @initial import 21 | @ 22 | text 23 | @#!/bin/sh -e 24 | NAMES=$(awk " 25 | /^CVS:/{ 26 | sub(/^CVS:/, \"\"); 27 | printf \"-u '%s:\", \$1; 28 | sub(\$1 \" \",\"\"); 29 | split(\$0, A, / *[<>] */); 30 | printf \"%s:%s'\n\", A[1], A[2] 31 | } 32 | " utils/COMMITTERS) 33 | eval rcs2log -v $NAMES -r "-sExp" | 34 | awk ' 35 | / \* /{ 36 | split($0,A,/:/); 37 | count=split(A[1],B,/, /); 38 | first=1; 39 | for(C = 1; C <= count; C++) { 40 | if(!first) 41 | printf ", "; 42 | sub(/\/cvsroot\/shoop\/shwwwoop\///,"",B[C]); 43 | printf "%s", B[C]; 44 | first=0 45 | } 46 | printf ":%s\n", A[2]; 47 | printed=1 48 | } 49 | { 50 | if(printed != 1) 51 | print; 52 | printed=0 53 | } 54 | ' > ${1:-ChangeLog} 55 | @ 56 | -------------------------------------------------------------------------------- /docs/research/term-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/term-0.0.1.tar.gz -------------------------------------------------------------------------------- /docs/research/windscribe.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | declare -r SCRIPT="${${basename "${BASH_SOURCE[0]}"}%.*}" 3 | add_repo(){ 4 | apt-key adv --keyserver keyserver.ubuntu.com --recv-key FDC247B7 5 | declare -r LINE="deb https://repo.windscribe.com/ubuntu zesty main" 6 | declare -r FILE="/etc/apt/sources.list" 7 | add_line_to_file $LINE $FILE 8 | } 9 | apt-get update 10 | apt-get install windscribe-cli 11 | windscribe login && windscribe connect 12 | -------------------------------------------------------------------------------- /docs/research/yosh-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/yosh-master.zip -------------------------------------------------------------------------------- /docs/research/yosh-starter-kit-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pegasusict/PLAT/7440d8ea1cd7da59d579d4639af0e2f2f2827576/docs/research/yosh-starter-kit-master.zip -------------------------------------------------------------------------------- /lib/plat_manager-functions.inc.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Pegasus' Linux Administration Tools # PLAT Manager Functions Library # 4 | # (C)2017-2018 Mattijs Snepvangers # pegasus.ict@gmail.com # 5 | # License: MIT # Please keep my name in the credits # 6 | ################################################################################ 7 | 8 | ################################################################################ 9 | # PROGRAM_SUITE="Pegasus' Linux Administration Tools" 10 | # SCRIPT_TITLE="Plat Manager Functions" 11 | # MAINTAINER="Mattijs Snepvangers" 12 | # MAINTAINER_EMAIL="pegasus.ict@gmail.com" 13 | # VER_MAJOR=0 14 | # VER_MINOR=0 15 | # VER_PATCH=5 16 | # VER_STATE="ALPHA" 17 | # BUILD=20180620 18 | # LICENSE="MIT" 19 | ################################################################################ 20 | 21 | # mod: PLAT_manager functions 22 | # txt: This script is contains functions made specific for the script with the 23 | # same name. 24 | 25 | # fun: getargs 26 | # txt: parses commandline arguments 27 | # use: init 28 | # api: prerun 29 | get_args() { 30 | getopt --test > /dev/null 31 | if [[ $? -ne 4 ]] 32 | then 33 | err_line "I’m sorry, \"getopt --test\" failed in this environment." 34 | exit 1 35 | fi 36 | OPTIONS="hv:r:c:g:l:t:S:P:R:" 37 | LONG_OPTIONS="help,verbosity:,role:,containertype:garbageage:logage:tmpage:" 38 | PARSED=$(getopt -o $OPTIONS --long $LONG_OPTIONS -n "$0" -- "$@") 39 | if [ $? -ne 0 ] 40 | then usage 41 | fi 42 | eval set -- "$PARSED" 43 | while true; do 44 | case "$1" in 45 | -h|--help ) usage ; shift ;; 46 | -v|--verbosity ) setverbosity $2 ; shift 2 ;; 47 | -r|--role ) checkrole $2; shift 2 ;; 48 | -c|--containertype ) checkcontainer $2; shift 2 ;; 49 | -g|--garbageage ) GABAGE_AGE=$2; shift 2 ;; 50 | -l|--logage ) LOG_AGE=$2; shift 2 ;; 51 | -t|--tmpage ) TMP_AGE=$2; shift 2 ;; 52 | -- ) shift; break ;; 53 | * ) break ;; 54 | esac 55 | done 56 | } 57 | 58 | # fun: usage 59 | # txt: outputs usage information 60 | # use: usage 61 | # api: prerun 62 | usage() { 63 | version 64 | cat <<-EOT 65 | USAGE: sudo bash $SCRIPT -h 66 | or 67 | sudo bash $SCRIPT -r [ -c ] [ -v INT ] [ -g ] [ -l ] [ -t ] 68 | 69 | OPTIONS 70 | 71 | -r or --role tells the script what kind of system we are dealing with. 72 | Valid options: ws, zeus, backupserver, container << REQUIRED >> 73 | -c or --containertype tells the script what kind of container we are working on. 74 | Valid options are: basic, nas, web, x11, pxe, router << REQUIRED if -r=container >> 75 | -v or --verbosity defines the amount of chatter. 0=CRITICAL, 1=WARNING, 2=INFO, 3=VERBOSE, 4=DEBUG. default=2 76 | -g or --garbageage defines the age (in days) of garbage (trashbins & temp files) being cleaned, default=7 77 | -l or --logage defines the age (in days) of logs to be purged, default=30 78 | -t or --tmpage define how long temp files should be untouched before they are deleted, default=2 79 | -h or --help prints this message 80 | 81 | The options can be used in any order 82 | EOT 83 | exit 3 84 | } 85 | -------------------------------------------------------------------------------- /templates/basic script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Pegasus' Linux Administration Tools # <