-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First stable release, changed name to slimcat, house keeping
First Stable Release -------------------- Used this program as a replacement of cat and I have fixed everything I have found Changed Name ------------ Changed name from cat to slimcat so there is not a naming conflict Use the makefile's unsafe-install to overwrite cat but it is recomended to just add an alias to your shell House Keeping ------------- Updated copyright years Made the code more readable
- Loading branch information
Showing
5 changed files
with
41 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
cat.out: src/cat.c | ||
$(CC) -Wall -Ofast -o cat.out src/cat.c | ||
slimcat.out: src/cat.c | ||
$(CC) -Wall -Ofast -o slimcat.out src/cat.c | ||
|
||
cat.1.gz: cat.1 | ||
gzip -k cat.1 | ||
slimcat.1.gz: slimcat.1 | ||
gzip -k slimcat.1 | ||
|
||
debug: src/cat.c | ||
$(CC) -Wall -O0 -g -o cat.debug.out src/cat.c | ||
$(CC) -Wall -O0 -g -o slimcat.debug.out src/cat.c | ||
|
||
clean: | ||
rm cat.*out | ||
rm cat.1.gz | ||
rm slimcat.*out | ||
rm slimcat.1.gz | ||
|
||
install: cat.out cat.1.gz | ||
#[IMPORTANT] if you run this command twice, your original cat will be overwritten | ||
sudo cp /usr/bin/cat /usr/bin/cat.bak | ||
sudo cp cat.out /usr/bin/cat | ||
sudo cp /usr/share/man/man1/cat.1.gz /usr/share/man/man1/cat.1.gz.bak | ||
sudo cp cat.1.gz /usr/share/man/man1/ | ||
install: slimcat.out slimcat.1.gz | ||
# Moves compiled programs to their spots, might not work for BSD | ||
sudo cp slimcat.1.gz /usr/share/man/man1/ | ||
sudo cp slimcat.out /usr/bin/slimcat | ||
# You may want to add an aliase to your shell to replace cat with slimcat | ||
|
||
uninstall: /usr/bin/cat.bak /usr/share/man/man1/cat.1.gz.bak | ||
sudo mv /usr/bin/cat.bak /usr/bin/cat | ||
sudo mv /usr/share/man/man1/cat.1.gz.bak /usr/share/man/man1/cat.1.gz | ||
uninstall: | ||
sudo rm -v /usr/share/man/man1/slimcat.1.gz | ||
sudo rm -v /usr/bin/slimcat | ||
|
||
unsafe-install: | ||
# Makes slimcat your default cat and makes a backup of cat | ||
sudo cp -n /usr/bin/cat /usr/bin/cat.bak | ||
sudo cp slimcat.out /usr/bin/cat | ||
sudo cp -n /usr/share/man/man1/cat.1.gz /usr/share/man/man1/cat.1.gz.bak | ||
sudo cp slimcat.1.gz /usr/share/man/man1/cat.1.gz | ||
|
||
unsafe-install: cat.out cat.1.gz | ||
# !!! overwrites cat in /usr/bin | ||
sudo cp cat.out /usr/bin/cat | ||
sudo cp cat.1.gz /usr/share/man/man1/ | ||
|
||
unsafe-uninstall: | ||
sudo rm /usr/bin/cat | ||
sudo rm /usr/share/man/man1/cat.1.gz | ||
unsafe-uninstall: /usr/bin/cat.bak /usr/share/man/man1/cat.1.gz.bak | ||
sudo mv /usr/bin/cat.bak /usr/bin/cat | ||
sudo mv /usr/share/man/man1/cat.1.gz.bak /usr/share/man/man1/cat.1.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters