Last year I wrote two shell scripts, a chatting program to chat with other logged in users on different terminals (ttys), and a program that makes .deb packages for Debian based systems.
Cli-Chat (Part 1: The main program): http://cemetech.pastebin.com/nQeCgGBi
Cli-Chat (Part 2: Clears the chat logs): http://cemetech.pastebin.com/TXajEFCh
deb-make: http://cemetech.pastebin.com/th8yGWWt
You can run these by downloading them and executing chmod +x <name of script here>. The first script (Cli-Chat) is buggy, so don't execute it.
Edit: It seems that Pastebin is doing something weird to deb-make, so I will just post it here:
Code:
Cli-Chat (Part 1: The main program): http://cemetech.pastebin.com/nQeCgGBi
Cli-Chat (Part 2: Clears the chat logs): http://cemetech.pastebin.com/TXajEFCh
deb-make: http://cemetech.pastebin.com/th8yGWWt
You can run these by downloading them and executing chmod +x <name of script here>. The first script (Cli-Chat) is buggy, so don't execute it.
Edit: It seems that Pastebin is doing something weird to deb-make, so I will just post it here:
Code:
#!/bin/bash
touch debian.control1
touch debian.control2
touch debian.control3
while [ "$input" != "" ]; do
echo "Enter file path to be added to deb archive"
read input
dir=`dirname $input`
echo $input $dir
mkdir -p $HOME/build-deb/$name$dir > /dev/null
cp $input /home/`whoami`/build-deb/$name$input > /dev/null
done
mkdir `echo $name`
cd `echo $name`
while [ "A" == "A" ]; do
clear
debian_control
pwd
case $choice in
1) echo "Source"
read source
echo "Source: $source" > debian.control
;;
2) echo "Section"
read section
echo "Section: $section" > debian.control
;;
3) echo "Priority"
echo "Choose from Required, Important, Standard, Optional, Extra"
read priority
echo "Priority: $priority" > debian.control
;;
4) echo "Maintainer"
read maintainer
echo "Maintainer: $maintainer" > debian.control
;;
5) echo "Standards Version"
read standards-version
echo "Standards-version: $standards-version" > debian.control
;;
6) echo "Build Depends"
echo "Packages required to be used by build-essential"
read build-depends
echo "Build-Depends: $build-depends" > debian.control
;;
7) echo "Homepage"
read homepage
echo "Homepage: $homepage" > debian.control
;;
8) echo "Architecture"
echo "Current architecture is "`arch`
echo "but use i386 or something else like that."
read arch
echo "Architecture: $arch" > debian.control
;;
9) echo "Depends"
read depends
echo "Depends: $depends" > debian.control
;;
10) echo "Recommends"
read rec
echo "Recommends: $rec" > debian.control
;;
11) echo "Suggests"
read sug
echo "Suggests: $sug" > debian.control
;;
12) echo "Conflicts"
read con
echo "Conflicts: $con" > debian.control
;;
13) echo "Description"
read desc
echo -e "Description: $desc" > debian.control
;;
14) builddeb
;;
15 ) builddeb
;;
esac
cat debian.control1 debian.control > debian.control3
cat debian.control3 > debian.control1
echo "" > debian.control3
done